Fix compilation error using python2.7
[python-purple] / notify_cbs.pxd
index 6180ed9..fb9f061 100644 (file)
@@ -17,8 +17,6 @@
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-cimport purple
-
 cdef extern from *:
     ctypedef char const_char "const char"
     ctypedef int size_t
@@ -30,8 +28,8 @@ cdef void *notify_message(notify.PurpleNotifyMsgType type, \
     """
     TODO
     """
-    debug.c_purple_debug_info("notify", "%s", "notify-message\n")
-    if notify_cbs.has_key("notif-message"):
+    debug.purple_debug_info("notify", "%s", "notify-message\n")
+    if "notify-message" in notify_cbs:
         (<object> notify_cbs["notify-message"])("notify-message: TODO")
 
 cdef void *notify_email(connection.PurpleConnection *gc, \
@@ -40,8 +38,8 @@ cdef void *notify_email(connection.PurpleConnection *gc, \
     """
     TODO
     """
-    debug.c_purple_debug_info("notify", "%s", "notify-email\n")
-    if notify_cbs.has_key("notify-email"):
+    debug.purple_debug_info("notify", "%s", "notify-email\n")
+    if "notify-email" in notify_cbs:
         (<object> notify_cbs["notify-email"])("notify-email: TODO")
 
 cdef void *notify_emails(connection.PurpleConnection *gc, size_t count, \
@@ -50,8 +48,8 @@ cdef void *notify_emails(connection.PurpleConnection *gc, size_t count, \
     """
     TODO
     """
-    debug.c_purple_debug_info("notify", "%s", "notify-emails\n")
-    if notify_cbs.has_key("notify-emails"):
+    debug.purple_debug_info("notify", "%s", "notify-emails\n")
+    if "notify-emails" in notify_cbs:
         (<object> notify_cbs["notify-emails"])("notify-emails: TODO")
 
 cdef void *notify_formatted(const_char *title, const_char *primary, \
@@ -59,8 +57,8 @@ cdef void *notify_formatted(const_char *title, const_char *primary, \
     """
     TODO
     """
-    debug.c_purple_debug_info("notify", "%s", "notify-formatted\n")
-    if notify_cbs.has_key("notify-formatted"):
+    debug.purple_debug_info("notify", "%s", "notify-formatted\n")
+    if "notify-formatted" in notify_cbs:
         (<object> notify_cbs["notify-formatted"])("notify-formatted: TODO")
 
 cdef void *notify_searchresults(connection.PurpleConnection *gc, \
@@ -69,40 +67,42 @@ cdef void *notify_searchresults(connection.PurpleConnection *gc, \
     """
     TODO
     """
-    debug.c_purple_debug_info("notify", "%s", "notify-searchresults\n")
-    if notify_cbs.has_key("notify-searchresults"):
-        (<object> notify_cbs["notify-searchresults"])("notify-searchresults: TODO")
+    debug.purple_debug_info("notify", "%s", "notify-searchresults\n")
+    if "notify-searchresults" in notify_cbs:
+        (<object> notify_cbs["notify-searchresults"]) \
+            ("notify-searchresults: TODO")
 
 cdef void notify_searchresults_new_rows(connection.PurpleConnection *gc, \
         notify.PurpleNotifySearchResults *results, void *data):
     """
     TODO
     """
-    debug.c_purple_debug_info("notify", "%s", "notify-searchresults-new-rows\n")
-    if notify_cbs.has_key("notify-searchresults-new-rows"):
-        (<object> notify_cbs["notify-searchresults-new-rows"])("notify-searchresults-new-rows: TODO")
+    debug.purple_debug_info("notify", "%s", "notify-searchresults-new-rows\n")
+    if "notify-searchresults-new-rows" in notify_cbs:
+        (<object> notify_cbs["notify-searchresults-new-rows"]) \
+            ("notify-searchresults-new-rows: TODO")
 
 cdef void *notify_userinfo(connection.PurpleConnection *gc, const_char *who, \
         notify.PurpleNotifyUserInfo *user_info):
     """
     TODO
     """
-    debug.c_purple_debug_info("notify", "%s", "notify-userinfo\n")
-    if notify_cbs.has_key("notify-userinfo"):
+    debug.purple_debug_info("notify", "%s", "notify-userinfo\n")
+    if "notify-userinfo" in notify_cbs:
         (<object> notify_cbs["notify-userinfo"])("notify-userinfo: TODO")
 
 cdef void *notify_uri(const_char *uri):
     """
     TODO
     """
-    debug.c_purple_debug_info("notify", "%s", "notify-uri\n")
-    if notify_cbs.has_key("notify-uri"):
+    debug.purple_debug_info("notify", "%s", "notify-uri\n")
+    if "notify-uri" in notify_cbs:
         (<object> notify_cbs["notify-uri"])("notify-uri: TODO")
 
 cdef void close_notify(notify.PurpleNotifyType type, void *ui_handle):
     """
     TODO
     """
-    debug.c_purple_debug_info("notify", "%s", "close-notify\n")
-    if notify_cbs.has_key("close-notify"):
+    debug.purple_debug_info("notify", "%s", "close-notify\n")
+    if "close-notify" in notify_cbs:
         (<object> notify_cbs["close-notify"])("close-notify: TODO")