X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=blobdiff_plain;f=account_cbs.pxd;h=06cd2cafd0586be0de017eb7c76244aee63333f4;hp=904a35848c7b80fc1721f264825346b7b8b64575;hb=refs%2Fheads%2Fmaster;hpb=950aceade8cf4d56fe405e29fefbb28204a7592c
diff --git a/account_cbs.pxd b/account_cbs.pxd
index 904a358..06cd2ca 100644
--- a/account_cbs.pxd
+++ b/account_cbs.pxd
@@ -17,46 +17,128 @@
# along with this program. If not, see .
#
-cimport purple
-
cdef extern from *:
ctypedef char const_char "const char"
account_cbs = {}
-cdef void notify_added(account.PurpleAccount *account, \
+cdef account.PurpleAccountRequestAuthorizationCb c_request_authorize_authorize_cb = NULL
+cdef account.PurpleAccountRequestAuthorizationCb c_request_authorize_deny_cb = NULL
+cdef void *c_request_authorize_user_data = NULL
+
+def call_authorize_cb():
+ global c_request_authorize_authorize_cb
+ global c_request_authorize_deny_cb
+ global c_request_authorize_user_data
+
+ if c_request_authorize_authorize_cb:
+ c_request_authorize_authorize_cb(c_request_authorize_user_data)
+ c_request_authorize_authorize_cb = NULL
+ c_request_authorize_deny_cb = NULL
+ c_request_authorize_user_data = NULL
+
+def call_deny_cb():
+ global c_request_authorize_authorize_cb
+ global c_request_authorize_deny_cb
+ global c_request_authorize_user_data
+
+ if c_request_authorize_deny_cb:
+ c_request_authorize_deny_cb(c_request_authorize_user_data)
+ c_request_authorize_authorize_cb = NULL
+ c_request_authorize_deny_cb = NULL
+ c_request_authorize_user_data = NULL
+
+cdef void notify_added(account.PurpleAccount *c_account, \
const_char *remote_user, const_char *id, const_char *alias, \
- const_char *message):
+ const_char *c_message):
"""
A buddy who is already on this account's buddy list added this account to
their buddy list.
"""
- debug.c_purple_debug_info("account", "%s", "notify-added\n")
- if account_cbs.has_key("notify-added"):
- (