Added initial Debian packaging support.
[python-purple] / connection_cbs.pxd
index ea707e6..bd36f09 100644 (file)
@@ -26,67 +26,59 @@ cdef extern from *:
 
 cdef void connect_progress (connection.PurpleConnection *gc, const_char *text,
                             size_t step, size_t step_count):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "connection",
-                         "connect_progress\n")
+    debug.c_purple_debug_info("connection", "%s", "connect-progress\n")
     try:
-        (<object>connection_cbs["connect_progress"])(<char *>text, step, step_count)
+        (<object>connection_cbs["connect-progress"])(<char *>text, step, step_count)
     except KeyError:
         pass
 
 cdef void connected (connection.PurpleConnection *gc):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "connection",
-                         "connected\n")
+    debug.c_purple_debug_info("connection", "%s", "connected\n")
     try:
-        (<object>connection_cbs["connected"])()
+        (<object>connection_cbs["connected"])("connected: TODO")
     except KeyError:
         pass
 
 cdef void disconnected (connection.PurpleConnection *gc):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "connection",
-                         "disconnected\n")
+    debug.c_purple_debug_info("connection", "%s", "disconnected\n")
     try:
-        (<object>connection_cbs["disconnected"])()
+        (<object>connection_cbs["disconnected"])("disconnected: TODO")
     except KeyError:
         pass
 
 cdef void notice (connection.PurpleConnection *gc, const_char *text):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "connection",
-                         "notice\n")
+    debug.c_purple_debug_info("connection", "%s", "notice\n")
     try:
-        (<object>connection_cbs["notice"])("notice")
+        (<object>connection_cbs["notice"])("notice: TODO")
     except KeyError:
         pass
 
 cdef void report_disconnect (connection.PurpleConnection *gc,
                              const_char *text):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "connection",
-                         "report_disconnect\n")
+    debug.c_purple_debug_info("connection", "%s", "report-disconnect\n")
     try:
-        (<object>connection_cbs["report_disconnect"])(<char *>text)
+        (<object>connection_cbs["report-disconnect"])(<char *>text)
     except KeyError:
         pass
 
 cdef void network_connected ():
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "connection",
-                         "network_connected\n")
+    debug.c_purple_debug_info("connection", "%s", "network-connected\n")
     try:
-        (<object>connection_cbs["network_connected"])("network_connected")
+        (<object>connection_cbs["network-connected"])("network-connected: TODO")
     except KeyError:
         pass
 
 cdef void network_disconnected ():
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "connection",
-                         "network_disconnected\n")
+    debug.c_purple_debug_info("connection", "%s", "network-disconnected\n")
     try:
-        (<object>connection_cbs["network_disconnected"])("network_disconnected")
+        (<object>connection_cbs["network-disconnected"])("network-disconnected: TODO")
     except KeyError:
         pass
 
 cdef void report_disconnect_reason (connection.PurpleConnection *gc,
                                     connection.PurpleConnectionError reason,
                                     const_char *text):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "connection",
-                         "report_disconnect_reason\n")
+    debug.c_purple_debug_info("connection", "%s", "report-disconnect-reason\n")
 
     reason_string = {
         0: 'Network error',
@@ -108,6 +100,6 @@ cdef void report_disconnect_reason (connection.PurpleConnection *gc,
         16: 'Other error' }[reason]
 
     try:
-        (<object>connection_cbs["report_disconnect_reason"])(reason_string, <char *>text)
+        (<object>connection_cbs["report-disconnect-reason"])(reason_string, <char *>text)
     except KeyError:
         pass