2 # Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
4 # This file is part of python-purple.
6 # python-purple is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # python-purple is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
23 ctypedef char const_char "const char"
27 cdef void notify_added(account.PurpleAccount *account, \
28 const_char *remote_user, const_char *id, const_char *alias, \
31 A buddy who is already on this account's buddy list added this account to
34 debug.c_purple_debug_info("account", "%s", "notify-added\n")
35 if account_cbs.has_key("notify-added"):
36 (<object> account_cbs["notify-added"])("notify-added: TODO")
38 cdef void status_changed(account.PurpleAccount *account, \
39 status.PurpleStatus *status):
41 This account's status changed.
43 debug.c_purple_debug_info("account", "%s", "status-changed\n")
44 if account_cbs.has_key("status-changed"):
45 (<object> account_cbs["status-changed"])("status-changed: TODO")
47 cdef void request_add(account.PurpleAccount *account, \
48 const_char *remote_user, const_char *id, const_char *alias, \
51 Someone we don't have on our list added us; prompt to add them.
53 debug.c_purple_debug_info("account", "%s", "request-add\n")
54 if account_cbs.has_key("request-add"):
55 (<object> account_cbs["request-add"])("request-add: TODO")
57 cdef void *request_authorize(account.PurpleAccount *account, \
58 const_char *remote_user, const_char *id, const_char *alias, \
59 const_char *message, glib.gboolean on_list, \
60 account.PurpleAccountRequestAuthorizationCb authorize_cb, \
61 account.PurpleAccountRequestAuthorizationCb deny_cb, \
64 Prompt for authorization when someone adds this account to their buddy
65 list. To authorize them to see this account's presence, call
66 authorize_cb(user_data) otherwise call deny_cb(user_data).
67 @return a UI-specific handle, as passed to #close_account_request.
69 debug.c_purple_debug_info("account", "%s", "request-authorize\n")
70 if account_cbs.has_key("request-authorize"):
71 (<object> account_cbs["request-authorize"])("request-authorize: TODO")
73 cdef void close_account_request (void *ui_handle):
75 Close a pending request for authorization. ui_handle is a handle as
76 returned by request_authorize.
78 debug.c_purple_debug_info("account", "%s", "close-account-request\n")
79 if account_cbs.has_key("close-account-request"):
80 (<object> account_cbs["close-account-request"])("close-account-request: TODO")