Fixed debug messages warning.
authorRagner Magalhaes <ragner.magalhaes@openbossa.org>
Tue, 2 Dec 2008 21:03:41 +0000 (21:03 +0000)
committerAnderson Briglia <anderson.briglia@openbossa.org>
Sat, 28 Feb 2009 21:11:17 +0000 (17:11 -0400)
FIXES:
 - Fixed debug messages warning when compiling on Intrepid.

Signed-off-by: Bruno Abinader <bruno.abinader@indt.org.br>

git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1396 596f6dd7-e928-0410-a184-9e12fd12cf7e

account_cbs.pxd
blist_cbs.pxd
connection_cbs.pxd
conversation_cbs.pxd
libpurple/debug.pxd
notify_cbs.pxd
purple.pyx
request_cbs.pxd

index 238ecc6..54183fe 100644 (file)
@@ -27,8 +27,7 @@ account_cbs = {}
 cdef void notify_added (account.PurpleAccount *account,
                         const_char *remote_user, const_char *id,
                         const_char *alias, const_char *message):
 cdef void notify_added (account.PurpleAccount *account,
                         const_char *remote_user, const_char *id,
                         const_char *alias, const_char *message):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "account",
-                         "notify-added\n")
+    debug.c_purple_debug_info("account", "%s", "notify-added\n")
     try:
         (<object>account_cbs["notify-added"])("notify-added: TODO")
     except KeyError:
     try:
         (<object>account_cbs["notify-added"])("notify-added: TODO")
     except KeyError:
@@ -36,8 +35,7 @@ cdef void notify_added (account.PurpleAccount *account,
 
 cdef void status_changed (account.PurpleAccount *account,
                           status.PurpleStatus *status):
 
 cdef void status_changed (account.PurpleAccount *account,
                           status.PurpleStatus *status):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "account",
-                         "status-changed\n")
+    debug.c_purple_debug_info("account", "%s", "status-changed\n")
     try:
         (<object>account_cbs["status-changed"])("status-changed: TODO")
     except KeyError:
     try:
         (<object>account_cbs["status-changed"])("status-changed: TODO")
     except KeyError:
@@ -46,8 +44,7 @@ cdef void status_changed (account.PurpleAccount *account,
 cdef void request_add (account.PurpleAccount *account,
                        const_char *remote_user, const_char *id,
                        const_char *alias, const_char *message):
 cdef void request_add (account.PurpleAccount *account,
                        const_char *remote_user, const_char *id,
                        const_char *alias, const_char *message):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "account",
-                         "request-add\n")
+    debug.c_purple_debug_info("account", "%s", "request-add\n")
     try:
         (<object>account_cbs["request-add"])("request-add: TODO")
     except KeyError:
     try:
         (<object>account_cbs["request-add"])("request-add: TODO")
     except KeyError:
@@ -60,8 +57,7 @@ cdef void *request_authorize (account.PurpleAccount *account,
                               account.PurpleAccountRequestAuthorizationCb authorize_cb,
                               account.PurpleAccountRequestAuthorizationCb deny_cb,
                               void *user_data):
                               account.PurpleAccountRequestAuthorizationCb authorize_cb,
                               account.PurpleAccountRequestAuthorizationCb deny_cb,
                               void *user_data):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "account",
-                         "request-authorize\n")
+    debug.c_purple_debug_info("account", "%s", "request-authorize\n")
     try:
         (<object>account_cbs["request-authorize"])("request-authorize: TODO")
         return NULL
     try:
         (<object>account_cbs["request-authorize"])("request-authorize: TODO")
         return NULL
@@ -69,8 +65,7 @@ cdef void *request_authorize (account.PurpleAccount *account,
         pass
 
 cdef void close_account_request (void *ui_handle):
         pass
 
 cdef void close_account_request (void *ui_handle):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "account",
-                         "close-account-request\n")
+    debug.c_purple_debug_info("account", "%s", "close-account-request\n")
     try:
         (<object>account_cbs["close-account-request"])("close-account-request: TODO")
     except KeyError:
     try:
         (<object>account_cbs["close-account-request"])("close-account-request: TODO")
     except KeyError:
index 52847dc..35636a3 100644 (file)
@@ -103,14 +103,14 @@ cdef void __other_node_cb(blist.PurpleBlistNode *node, object callback):
         pass
 
 cdef void new_list (blist.PurpleBuddyList *list):
         pass
 
 cdef void new_list (blist.PurpleBuddyList *list):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "new_list\n")
+    debug.c_purple_debug_info("blist", "%s", "new_list\n")
     try:
         (<object>blist_cbs["new_list"])("new_list")
     except KeyError:
         pass
 
 cdef void new_node (blist.PurpleBlistNode *node):
     try:
         (<object>blist_cbs["new_list"])("new_list")
     except KeyError:
         pass
 
 cdef void new_node (blist.PurpleBlistNode *node):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "new_node\n")
+    debug.c_purple_debug_info("blist", "%s", "new_node\n")
     try:
         if node.type == blist.PURPLE_BLIST_GROUP_NODE:
             __group_node_cb(node, blist_cbs["new_node"])
     try:
         if node.type == blist.PURPLE_BLIST_GROUP_NODE:
             __group_node_cb(node, blist_cbs["new_node"])
@@ -126,14 +126,14 @@ cdef void new_node (blist.PurpleBlistNode *node):
         pass
 
 cdef void show (blist.PurpleBuddyList *list):
         pass
 
 cdef void show (blist.PurpleBuddyList *list):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "show\n")
+    debug.c_purple_debug_info("blist", "%s", "show\n")
     try:
         (<object>blist_cbs["show"])("show: TODO")
     except KeyError:
         pass
 
 cdef void update (blist.PurpleBuddyList *list, blist.PurpleBlistNode *node):
     try:
         (<object>blist_cbs["show"])("show: TODO")
     except KeyError:
         pass
 
 cdef void update (blist.PurpleBuddyList *list, blist.PurpleBlistNode *node):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "update\n")
+    debug.c_purple_debug_info("blist", "%s", "update\n")
     try:
         if node.type == blist.PURPLE_BLIST_GROUP_NODE:
             __group_node_cb(node, blist_cbs["update"])
     try:
         if node.type == blist.PURPLE_BLIST_GROUP_NODE:
             __group_node_cb(node, blist_cbs["update"])
@@ -149,8 +149,7 @@ cdef void update (blist.PurpleBuddyList *list, blist.PurpleBlistNode *node):
         pass
 
 cdef void remove (blist.PurpleBuddyList *list, blist.PurpleBlistNode *node):
         pass
 
 cdef void remove (blist.PurpleBuddyList *list, blist.PurpleBlistNode *node):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "remove\n")
-
+    debug.c_purple_debug_info("blist", "%s", "remove\n")
     try:
         if node.type == blist.PURPLE_BLIST_GROUP_NODE:
             __group_node_cb(node, blist_cbs["remove"])
     try:
         if node.type == blist.PURPLE_BLIST_GROUP_NODE:
             __group_node_cb(node, blist_cbs["remove"])
@@ -166,14 +165,14 @@ cdef void remove (blist.PurpleBuddyList *list, blist.PurpleBlistNode *node):
         pass
 
 cdef void destroy (blist.PurpleBuddyList *list):
         pass
 
 cdef void destroy (blist.PurpleBuddyList *list):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "destroy\n")
+    debug.c_purple_debug_info("blist", "%s", "destroy\n")
     try:
         (<object>blist_cbs["destroy"])("destroy: TODO")
     except KeyError:
         pass
 
 cdef void set_visible (blist.PurpleBuddyList *list, glib.gboolean show):
     try:
         (<object>blist_cbs["destroy"])("destroy: TODO")
     except KeyError:
         pass
 
 cdef void set_visible (blist.PurpleBuddyList *list, glib.gboolean show):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "set-visible\n")
+    debug.c_purple_debug_info("blist", "%s", "set-visible\n")
     try:
         (<object>blist_cbs["set_visible"])("set-visible: TODO")
     except KeyError:
     try:
         (<object>blist_cbs["set_visible"])("set-visible: TODO")
     except KeyError:
@@ -182,7 +181,7 @@ cdef void set_visible (blist.PurpleBuddyList *list, glib.gboolean show):
 cdef void request_add_buddy (account.PurpleAccount *acc,
                              const_char *username, const_char *group,
                              const_char *alias):
 cdef void request_add_buddy (account.PurpleAccount *acc,
                              const_char *username, const_char *group,
                              const_char *alias):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "request-add-buddy\n")
+    debug.c_purple_debug_info("blist", "%s", "request-add-buddy\n")
     try:
         (<object>blist_cbs["request-add-buddy"])("request-add-buddy: TODO")
     except KeyError:
     try:
         (<object>blist_cbs["request-add-buddy"])("request-add-buddy: TODO")
     except KeyError:
@@ -191,14 +190,14 @@ cdef void request_add_buddy (account.PurpleAccount *acc,
 cdef void request_add_chat (account.PurpleAccount *acc,
                             blist.PurpleGroup *group, const_char *alias,
                             const_char *name):
 cdef void request_add_chat (account.PurpleAccount *acc,
                             blist.PurpleGroup *group, const_char *alias,
                             const_char *name):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "request_add_chat\n")
+    debug.c_purple_debug_info("blist", "%s", "request_add_chat\n")
     try:
         (<object>blist_cbs["request-add-chat"])("request-add-chat: TODO")
     except KeyError:
         pass
 
 cdef void request_add_group ():
     try:
         (<object>blist_cbs["request-add-chat"])("request-add-chat: TODO")
     except KeyError:
         pass
 
 cdef void request_add_group ():
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "request_add_group\n")
+    debug.c_purple_debug_info("blist", "%s", "request_add_group\n")
     try:
         (<object>blist_cbs["request-add-chat"])("request-add-group: TODO")
     except KeyError:
     try:
         (<object>blist_cbs["request-add-chat"])("request-add-group: TODO")
     except KeyError:
index fd0d05a..bd36f09 100644 (file)
@@ -26,32 +26,28 @@ cdef extern from *:
 
 cdef void connect_progress (connection.PurpleConnection *gc, const_char *text,
                             size_t step, size_t step_count):
 
 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)
     except KeyError:
         pass
 
 cdef void connected (connection.PurpleConnection *gc):
     try:
         (<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"])("connected: TODO")
     except KeyError:
         pass
 
 cdef void disconnected (connection.PurpleConnection *gc):
     try:
         (<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"])("disconnected: TODO")
     except KeyError:
         pass
 
 cdef void notice (connection.PurpleConnection *gc, const_char *text):
     try:
         (<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: TODO")
     except KeyError:
     try:
         (<object>connection_cbs["notice"])("notice: TODO")
     except KeyError:
@@ -59,24 +55,21 @@ cdef void notice (connection.PurpleConnection *gc, const_char *text):
 
 cdef void report_disconnect (connection.PurpleConnection *gc,
                              const_char *text):
 
 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)
     except KeyError:
         pass
 
 cdef void network_connected ():
     try:
         (<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: TODO")
     except KeyError:
         pass
 
 cdef void network_disconnected ():
     try:
         (<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: TODO")
     except KeyError:
     try:
         (<object>connection_cbs["network-disconnected"])("network-disconnected: TODO")
     except KeyError:
@@ -85,8 +78,7 @@ cdef void network_disconnected ():
 cdef void report_disconnect_reason (connection.PurpleConnection *gc,
                                     connection.PurpleConnectionError reason,
                                     const_char *text):
 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',
 
     reason_string = {
         0: 'Network error',
index 71df18d..a4e1654 100644 (file)
@@ -27,8 +27,7 @@ cdef extern from *:
 conversation_cbs = {}
 
 cdef void create_conversation (conversation.PurpleConversation *conv):
 conversation_cbs = {}
 
 cdef void create_conversation (conversation.PurpleConversation *conv):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "create-conversation\n")
+    debug.c_purple_debug_info("conversation", "%s", "create-conversation\n")
     cdef char *c_name = NULL
 
     c_name = <char *> conversation.c_purple_conversation_get_name(conv)
     cdef char *c_name = NULL
 
     c_name = <char *> conversation.c_purple_conversation_get_name(conv)
@@ -45,8 +44,7 @@ cdef void create_conversation (conversation.PurpleConversation *conv):
         pass
 
 cdef void destroy_conversation (conversation.PurpleConversation *conv):
         pass
 
 cdef void destroy_conversation (conversation.PurpleConversation *conv):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "destroy-conversation\n")
+    debug.c_purple_debug_info("conversation", "%s", "destroy-conversation\n")
     try:
         (<object>conversation_cbs["destroy-conversation"])("destroy-conversation: TODO")
     except KeyError:
     try:
         (<object>conversation_cbs["destroy-conversation"])("destroy-conversation: TODO")
     except KeyError:
@@ -55,8 +53,7 @@ cdef void destroy_conversation (conversation.PurpleConversation *conv):
 cdef void write_chat (conversation.PurpleConversation *conv, const_char *who,
                       const_char *message, conversation.PurpleMessageFlags flags,
                       time_t mtime):
 cdef void write_chat (conversation.PurpleConversation *conv, const_char *who,
                       const_char *message, conversation.PurpleMessageFlags flags,
                       time_t mtime):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "write-chat\n")
+    debug.c_purple_debug_info("conversation", "%s", "write-chat\n")
     try:
         (<object>conversation_cbs["write-chat"])("write-chat: TODO")
     except KeyError:
     try:
         (<object>conversation_cbs["write-chat"])("write-chat: TODO")
     except KeyError:
@@ -65,7 +62,7 @@ cdef void write_chat (conversation.PurpleConversation *conv, const_char *who,
 cdef void write_im (conversation.PurpleConversation *conv, const_char *who,
                     const_char *c_message, conversation.PurpleMessageFlags flags,
                     time_t mtime):
 cdef void write_im (conversation.PurpleConversation *conv, const_char *who,
                     const_char *c_message, conversation.PurpleMessageFlags flags,
                     time_t mtime):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "write-im\n")
+    debug.c_purple_debug_info("conversation", "%s", "write-im\n")
     cdef account.PurpleAccount *acc = conversation.c_purple_conversation_get_account(conv)
     cdef blist.PurpleBuddy *buddy = NULL
     cdef char *c_username = NULL
     cdef account.PurpleAccount *acc = conversation.c_purple_conversation_get_account(conv)
     cdef blist.PurpleBuddy *buddy = NULL
     cdef char *c_username = NULL
@@ -103,8 +100,7 @@ cdef void write_im (conversation.PurpleConversation *conv, const_char *who,
 cdef void write_conv (conversation.PurpleConversation *conv, const_char *name,
                       const_char *alias, const_char *message,
                       conversation.PurpleMessageFlags flags, time_t mtime):
 cdef void write_conv (conversation.PurpleConversation *conv, const_char *name,
                       const_char *alias, const_char *message,
                       conversation.PurpleMessageFlags flags, time_t mtime):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "write-conv\n")
+    debug.c_purple_debug_info("conversation", "%s", "write-conv\n")
     try:
         (<object>conversation_cbs["write-conv"])("write-conv: TODO")
     except KeyError:
     try:
         (<object>conversation_cbs["write-conv"])("write-conv: TODO")
     except KeyError:
@@ -112,8 +108,7 @@ cdef void write_conv (conversation.PurpleConversation *conv, const_char *name,
 
 cdef void chat_add_users (conversation.PurpleConversation *conv,
                           glib.GList *cbuddies, glib.gboolean new_arrivals):
 
 cdef void chat_add_users (conversation.PurpleConversation *conv,
                           glib.GList *cbuddies, glib.gboolean new_arrivals):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "chat-add-users\n")
+    debug.c_purple_debug_info("conversation", "%s", "chat-add-users\n")
     try:
         (<object>conversation_cbs["chat-add-users"])("chat-add-users: TODO")
     except KeyError:
     try:
         (<object>conversation_cbs["chat-add-users"])("chat-add-users: TODO")
     except KeyError:
@@ -122,8 +117,7 @@ cdef void chat_add_users (conversation.PurpleConversation *conv,
 cdef void chat_rename_user (conversation.PurpleConversation *conv,
                             const_char *old_name, const_char *new_name,
                             const_char *new_alias):
 cdef void chat_rename_user (conversation.PurpleConversation *conv,
                             const_char *old_name, const_char *new_name,
                             const_char *new_alias):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "chat-rename-user\n")
+    debug.c_purple_debug_info("conversation", "%s", "chat-rename-user\n")
     try:
         (<object>conversation_cbs["chat-rename-user"])("chat-rename-user: TODO")
     except KeyError:
     try:
         (<object>conversation_cbs["chat-rename-user"])("chat-rename-user: TODO")
     except KeyError:
@@ -131,8 +125,7 @@ cdef void chat_rename_user (conversation.PurpleConversation *conv,
 
 cdef void chat_remove_users (conversation.PurpleConversation *conv,
                              glib.GList *users):
 
 cdef void chat_remove_users (conversation.PurpleConversation *conv,
                              glib.GList *users):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "chat-remove-users\n")
+    debug.c_purple_debug_info("conversation", "%s", "chat-remove-users\n")
     try:
         (<object>conversation_cbs["chat-remove-users"])("chat-remove-users: TODO")
     except KeyError:
     try:
         (<object>conversation_cbs["chat-remove-users"])("chat-remove-users: TODO")
     except KeyError:
@@ -140,24 +133,21 @@ cdef void chat_remove_users (conversation.PurpleConversation *conv,
 
 cdef void chat_update_user (conversation.PurpleConversation *conv,
                             const_char *user):
 
 cdef void chat_update_user (conversation.PurpleConversation *conv,
                             const_char *user):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "chat-update-user\n")
+    debug.c_purple_debug_info("conversation", "%s", "chat-update-user\n")
     try:
         (<object>conversation_cbs["chat-update-user"])("chat-update-user: TODO")
     except KeyError:
         pass
 
 cdef void present (conversation.PurpleConversation *conv):
     try:
         (<object>conversation_cbs["chat-update-user"])("chat-update-user: TODO")
     except KeyError:
         pass
 
 cdef void present (conversation.PurpleConversation *conv):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "present\n")
+    debug.c_purple_debug_info("conversation", "%s", "present\n")
     try:
         (<object>conversation_cbs["present"])("present: TODO")
     except KeyError:
         pass
 
 cdef glib.gboolean has_focus (conversation.PurpleConversation *conv):
     try:
         (<object>conversation_cbs["present"])("present: TODO")
     except KeyError:
         pass
 
 cdef glib.gboolean has_focus (conversation.PurpleConversation *conv):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "has-focus\n")
+    debug.c_purple_debug_info("conversation", "%s", "has-focus\n")
     try:
         (<object>conversation_cbs["has-focus"])("has-focus: TODO")
         return False
     try:
         (<object>conversation_cbs["has-focus"])("has-focus: TODO")
         return False
@@ -166,8 +156,7 @@ cdef glib.gboolean has_focus (conversation.PurpleConversation *conv):
 
 cdef glib.gboolean custom_smiley_add (conversation.PurpleConversation *conv,
                                       const_char *smile, glib.gboolean remote):
 
 cdef glib.gboolean custom_smiley_add (conversation.PurpleConversation *conv,
                                       const_char *smile, glib.gboolean remote):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "custom-smiley-add\n")
+    debug.c_purple_debug_info("conversation", "%s", "custom-smiley-add\n")
     try:
         (<object>conversation_cbs["custom-smiley-add"])("custom-smiley-add: TODO")
         return False
     try:
         (<object>conversation_cbs["custom-smiley-add"])("custom-smiley-add: TODO")
         return False
@@ -177,8 +166,7 @@ cdef glib.gboolean custom_smiley_add (conversation.PurpleConversation *conv,
 cdef void custom_smiley_write (conversation.PurpleConversation *conv,
                                const_char *smile, const_guchar *data,
                                glib.gsize size):
 cdef void custom_smiley_write (conversation.PurpleConversation *conv,
                                const_char *smile, const_guchar *data,
                                glib.gsize size):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "custom-smiley-write\n")
+    debug.c_purple_debug_info("conversation", "%s", "custom-smiley-write\n")
     try:
         (<object>conversation_cbs["custom-smiley-write"])("custom-smiley-write: TODO")
     except KeyError:
     try:
         (<object>conversation_cbs["custom-smiley-write"])("custom-smiley-write: TODO")
     except KeyError:
@@ -187,8 +175,7 @@ cdef void custom_smiley_write (conversation.PurpleConversation *conv,
 
 cdef void custom_smiley_close (conversation.PurpleConversation *conv,
                                const_char *smile):
 
 cdef void custom_smiley_close (conversation.PurpleConversation *conv,
                                const_char *smile):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "custom-smiley-close\n")
+    debug.c_purple_debug_info("conversation", "%s", "custom-smiley-close\n")
     try:
         (<object>conversation_cbs["custom-smiley-close"])("custom-smiley-close: TODO")
     except KeyError:
     try:
         (<object>conversation_cbs["custom-smiley-close"])("custom-smiley-close: TODO")
     except KeyError:
@@ -196,8 +183,7 @@ cdef void custom_smiley_close (conversation.PurpleConversation *conv,
 
 cdef void send_confirm (conversation.PurpleConversation *conv,
                         const_char *message):
 
 cdef void send_confirm (conversation.PurpleConversation *conv,
                         const_char *message):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
-                         "send-confirm\n")
+    debug.c_purple_debug_info("conversation", "%s", "send-confirm\n")
     try:
         (<object>conversation_cbs["send-confirm"])("send-confirm: TODO")
     except KeyError:
     try:
         (<object>conversation_cbs["send-confirm"])("send-confirm: TODO")
     except KeyError:
index df6be4e..751ed67 100644 (file)
@@ -29,5 +29,19 @@ cdef extern from "libpurple/debug.h":
         PURPLE_DEBUG_ERROR
         PURPLE_DEBUG_FATAL
 
         PURPLE_DEBUG_ERROR
         PURPLE_DEBUG_FATAL
 
-    void c_purple_debug "purple_debug" (PurpleDebugLevel level, char *category, char *format)
-    void c_purple_debug_set_enabled "purple_debug_set_enabled" (glib.gboolean debug_enabled)
+    void c_purple_debug "purple_debug" (PurpleDebugLevel level, \
+            char *category, char *format_type, char *format)
+    void c_purple_debug_misc "purple_debug_misc" (char *category, \
+            char *format_type, char *format)
+    void c_purple_debug_info "purple_debug_info" (char *category, \
+            char *format_type, char *format)
+    void c_purple_debug_warning "purple_debug_warning" (char *category, \
+            char *format_type, char *format)
+    void c_purple_debug_error "purple_debug_error" (char *category, \
+            char *format_type, char *format)
+    void c_purple_debug_fatal "purple_debug_fatal" (char *category, \
+            char *format_type, char *format)
+
+    void c_purple_debug_set_enabled "purple_debug_set_enabled" \
+            (glib.gboolean debug_enabled)
+    glib.gboolean c_purple_debug_is_enabled "purple_debug_is_enabled" ()
index ed6dbd6..11ee894 100644 (file)
@@ -27,7 +27,7 @@ cdef extern from *:
 
 cdef void *notify_message (notify.PurpleNotifyMsgType type, const_char *title,
                            const_char *primary, const_char *secondary):
 
 cdef void *notify_message (notify.PurpleNotifyMsgType type, const_char *title,
                            const_char *primary, const_char *secondary):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify-message\n")
+    debug.c_purple_debug_info("notify", "%s", "notify-message\n")
     try:
         (<object>notify_cbs["notify-message"])("notify-message: TODO")
     except KeyError:
     try:
         (<object>notify_cbs["notify-message"])("notify-message: TODO")
     except KeyError:
@@ -35,7 +35,7 @@ cdef void *notify_message (notify.PurpleNotifyMsgType type, const_char *title,
 
 cdef void *notify_email (connection.PurpleConnection *gc, const_char *subject,
                          const_char *_from, const_char *to, const_char *url):
 
 cdef void *notify_email (connection.PurpleConnection *gc, const_char *subject,
                          const_char *_from, const_char *to, const_char *url):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify-email\n")
+    debug.c_purple_debug_info("notify", "%s", "notify-email\n")
     try:
         (<object>notify_cbs["notify-email"])("notify-email: TODO")
     except KeyError:
     try:
         (<object>notify_cbs["notify-email"])("notify-email: TODO")
     except KeyError:
@@ -45,7 +45,7 @@ cdef void *notify_emails (connection.PurpleConnection *gc, size_t count,
                           glib.gboolean detailed, const_char **subjects,
                           const_char **froms, const_char **tos,
                           const_char **urls):
                           glib.gboolean detailed, const_char **subjects,
                           const_char **froms, const_char **tos,
                           const_char **urls):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify-emails\n")
+    debug.c_purple_debug_info("notify", "%s", "notify-emails\n")
     try:
         (<object>notify_cbs["notify-emails"])("notify-emails: TODO")
     except KeyError:
     try:
         (<object>notify_cbs["notify-emails"])("notify-emails: TODO")
     except KeyError:
@@ -53,7 +53,7 @@ cdef void *notify_emails (connection.PurpleConnection *gc, size_t count,
 
 cdef void *notify_formatted (const_char *title, const_char *primary,
                              const_char *secondary, const_char *text):
 
 cdef void *notify_formatted (const_char *title, const_char *primary,
                              const_char *secondary, const_char *text):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify-formatted\n")
+    debug.c_purple_debug_info("notify", "%s", "notify-formatted\n")
     try:
         (<object>notify_cbs["notify-formatted"])("notify-formatted: TODO")
     except KeyError:
     try:
         (<object>notify_cbs["notify-formatted"])("notify-formatted: TODO")
     except KeyError:
@@ -64,8 +64,7 @@ cdef void *notify_searchresults (connection.PurpleConnection *gc,
                                  const_char *secondary,
                                  notify.PurpleNotifySearchResults *results,
                                  glib.gpointer user_data):
                                  const_char *secondary,
                                  notify.PurpleNotifySearchResults *results,
                                  glib.gpointer user_data):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify",
-                         "notify-searchresults\n")
+    debug.c_purple_debug_info("notify", "%s", "notify-searchresults\n")
     try:
         (<object>notify_cbs["notify-searchresults"])("notify-searchresults: TODO")
     except KeyError:
     try:
         (<object>notify_cbs["notify-searchresults"])("notify-searchresults: TODO")
     except KeyError:
@@ -74,8 +73,7 @@ cdef void *notify_searchresults (connection.PurpleConnection *gc,
 cdef void notify_searchresults_new_rows (connection.PurpleConnection *gc,
                             notify.PurpleNotifySearchResults *results,
                             void *data):
 cdef void notify_searchresults_new_rows (connection.PurpleConnection *gc,
                             notify.PurpleNotifySearchResults *results,
                             void *data):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify",
-                         "notify-searchresults-new-rows\n")
+    debug.c_purple_debug_info("notify", "%s", "notify-searchresults-new-rows\n")
     try:
         (<object>notify_cbs["notify-searchresults-new-rows"])("notify-searchresults-new-rows: TODO")
     except KeyError:
     try:
         (<object>notify_cbs["notify-searchresults-new-rows"])("notify-searchresults-new-rows: TODO")
     except KeyError:
@@ -83,21 +81,21 @@ cdef void notify_searchresults_new_rows (connection.PurpleConnection *gc,
 
 cdef void *notify_userinfo (connection.PurpleConnection *gc, const_char *who,
                             notify.PurpleNotifyUserInfo *user_info):
 
 cdef void *notify_userinfo (connection.PurpleConnection *gc, const_char *who,
                             notify.PurpleNotifyUserInfo *user_info):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify-userinfo\n")
+    debug.c_purple_debug_info("notify", "%s", "notify-userinfo\n")
     try:
         (<object>notify_cbs["notify-userinfo"])("notify-userinfo: TODO")
     except KeyError:
         pass
 
 cdef void *notify_uri (const_char *uri):
     try:
         (<object>notify_cbs["notify-userinfo"])("notify-userinfo: TODO")
     except KeyError:
         pass
 
 cdef void *notify_uri (const_char *uri):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify-uri\n")
+    debug.c_purple_debug_info("notify", "%s", "notify-uri\n")
     try:
         (<object>notify_cbs["notify-uri"])("notify-uri: TODO")
     except KeyError:
         pass
 
 cdef void close_notify (notify.PurpleNotifyType type, void *ui_handle):
     try:
         (<object>notify_cbs["notify-uri"])("notify-uri: TODO")
     except KeyError:
         pass
 
 cdef void close_notify (notify.PurpleNotifyType type, void *ui_handle):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "close-notify\n")
+    debug.c_purple_debug_info("notify", "%s", "close-notify\n")
     try:
         (<object>notify_cbs["close-notify"])("close-notify: TODO")
     except KeyError:
     try:
         (<object>notify_cbs["close-notify"])("close-notify: TODO")
     except KeyError:
index 1a82c68..f0989fd 100644 (file)
@@ -86,16 +86,17 @@ cdef class Purple:
         core.c_purple_core_quit()
 
     cdef void __core_ui_ops_ui_prefs_init(self):
         core.c_purple_core_quit()
 
     cdef void __core_ui_ops_ui_prefs_init(self):
-        debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "core_ui_ops", "ui_prefs_init\n")
+        debug.c_purple_debug_info("core_ui_ops", "%s", "ui_prefs_init\n")
         prefs.c_purple_prefs_load()
 
         prefs.c_purple_prefs_add_none("/carman")
 
     cdef void __core_ui_ops_debug_init(self):
         prefs.c_purple_prefs_load()
 
         prefs.c_purple_prefs_add_none("/carman")
 
     cdef void __core_ui_ops_debug_init(self):
-        debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "core_ui_ops", "debug_ui_init\n")
+        debug.c_purple_debug_info("core_ui_ops", "%s", "debug_ui_init\n")
+        pass
 
     cdef void __core_ui_ops_ui_init(self):
 
     cdef void __core_ui_ops_ui_init(self):
-        debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "core_ui_ops", "ui_init\n")
+        debug.c_purple_debug_info("core_ui_ops", "%s", "ui_init\n")
 
         account.c_purple_accounts_set_ui_ops(&c_account_ui_ops)
         connection.c_purple_connections_set_ui_ops(&c_conn_ui_ops)
 
         account.c_purple_accounts_set_ui_ops(&c_account_ui_ops)
         connection.c_purple_connections_set_ui_ops(&c_conn_ui_ops)
@@ -108,7 +109,7 @@ cdef class Purple:
         #roomlist.c_purple_roomlist_set_ui_ops(&c_rlist_ui_ops)
 
     cdef void __core_ui_ops_quit(self):
         #roomlist.c_purple_roomlist_set_ui_ops(&c_rlist_ui_ops)
 
     cdef void __core_ui_ops_quit(self):
-        debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "core_ui_ops", "quit\n")
+        debug.c_purple_debug_info("core_ui_ops", "%s", "quit\n")
 
         global c_ui_info
 
 
         global c_ui_info
 
@@ -221,12 +222,14 @@ cdef class Purple:
         # initialize purple core
         ret = core.c_purple_core_init(__APP_NAME__)
         if ret is False:
         # initialize purple core
         ret = core.c_purple_core_init(__APP_NAME__)
         if ret is False:
-            debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "main", "Exiting because libpurple initialization failed.\n")
+            debug.c_purple_debug_fatal("main", "%s", "libpurple " \
+                                       "initialization failed.\n")
             return False
 
         # check if there is another instance of libpurple running
         if core.c_purple_core_ensure_single_instance() == False:
             return False
 
         # check if there is another instance of libpurple running
         if core.c_purple_core_ensure_single_instance() == False:
-            debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "main", "Exiting because another instance of libpurple is already running.\n")
+            debug.c_purple_debug_fatal("main", "%s", "Another instance of " \
+                                      "libpurple is already running.\n")
             core.c_purple_core_quit()
             return False
 
             core.c_purple_core_quit()
             return False
 
index 22bbc40..9c7c960 100644 (file)
@@ -35,7 +35,7 @@ cdef void *request_input (const_char *title, const_char *primary,
                           account.PurpleAccount *account, const_char *who,
                           conversation.PurpleConversation *conv,
                           void *user_data):
                           account.PurpleAccount *account, const_char *who,
                           conversation.PurpleConversation *conv,
                           void *user_data):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request", "request-input\n")
+    debug.c_purple_debug_info("request", "%s", "request-input\n")
     try:
         (<object>request_cbs["request-input"])("request-input: TODO")
     except KeyError:
     try:
         (<object>request_cbs["request-input"])("request-input: TODO")
     except KeyError:
@@ -49,8 +49,7 @@ cdef void *request_choice (const_char *title, const_char *primary,
                            account.PurpleAccount *account, const_char *who,
                            conversation.PurpleConversation *conv,
                            void *user_data, va_list choices):
                            account.PurpleAccount *account, const_char *who,
                            conversation.PurpleConversation *conv,
                            void *user_data, va_list choices):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request",
-                         "request-choice\n")
+    debug.c_purple_debug_info("request", "%s", "request-choice\n")
     try:
         (<object>request_cbs["request-choice"])("request-choice: TODO")
     except KeyError:
     try:
         (<object>request_cbs["request-choice"])("request-choice: TODO")
     except KeyError:
@@ -62,8 +61,7 @@ cdef void *request_action (const_char *title, const_char *primary,
                            conversation.PurpleConversation *conv,
                            void *user_data, size_t action_count,
                            va_list actions):
                            conversation.PurpleConversation *conv,
                            void *user_data, size_t action_count,
                            va_list actions):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request",
-                         "request-action\n")
+    debug.c_purple_debug_info("request", "%s", "request-action\n")
     try:
         (<object>request_cbs["request-action"])("request-action: TODo")
     except KeyError:
     try:
         (<object>request_cbs["request-action"])("request-action: TODo")
     except KeyError:
@@ -77,8 +75,7 @@ cdef void *request_fields (const_char *title, const_char *primary,
                            account.PurpleAccount *account, const_char *who,
                            conversation.PurpleConversation *conv,
                            void *user_data):
                            account.PurpleAccount *account, const_char *who,
                            conversation.PurpleConversation *conv,
                            void *user_data):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request",
-                         "request-fields\n")
+    debug.c_purple_debug_info("request", "%s", "request-fields\n")
     try:
         (<object>request_cbs["request-fields"])("request-fields: TODO")
     except KeyError:
     try:
         (<object>request_cbs["request-fields"])("request-fields: TODO")
     except KeyError:
@@ -90,14 +87,14 @@ cdef void *request_file (const_char *title, const_char *filename,
                          account.PurpleAccount *account, const_char *who,
                          conversation.PurpleConversation *conv,
                          void *user_data):
                          account.PurpleAccount *account, const_char *who,
                          conversation.PurpleConversation *conv,
                          void *user_data):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request", "request-file\n")
+    debug.c_purple_debug_info("request", "%s", "request-file\n")
     try:
         (<object>request_cbs["request-file"])("request-file: TODO")
     except KeyError:
         pass
 
 cdef void close_request (request.PurpleRequestType type, void *ui_handle):
     try:
         (<object>request_cbs["request-file"])("request-file: TODO")
     except KeyError:
         pass
 
 cdef void close_request (request.PurpleRequestType type, void *ui_handle):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request", "close-request\n")
+    debug.c_purple_debug_info("request", "%s", "close-request\n")
     try:
         (<object>request_cbs["close-request"])("close-request: TODO")
     except KeyError:
     try:
         (<object>request_cbs["close-request"])("close-request: TODO")
     except KeyError:
@@ -110,8 +107,7 @@ cdef void *request_folder (const_char *title, const_char *dirname,
                            const_char *who,
                            conversation.PurpleConversation *conv,
                            void *user_data):
                            const_char *who,
                            conversation.PurpleConversation *conv,
                            void *user_data):
-    debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request",
-                         "request-folder\n")
+    debug.c_purple_debug_info("request", "%s", "request-folder\n")
     try:
         (<object>request_cbs["request-folder"])("request-folder: TODO")
     except KeyError:
     try:
         (<object>request_cbs["request-folder"])("request-folder: TODO")
     except KeyError: