54183feffd394c22e385d56a53383408ff453fce
[python-purple] / account_cbs.pxd
1 #
2 #  Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
3 #
4 #  This file is part of python-purple.
5 #
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.
10 #
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.
15 #
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/>.
18 #
19
20 cimport purple
21
22 cdef extern from *:
23     ctypedef char const_char "const char"
24
25 account_cbs = {}
26
27 cdef void notify_added (account.PurpleAccount *account,
28                         const_char *remote_user, const_char *id,
29                         const_char *alias, const_char *message):
30     debug.c_purple_debug_info("account", "%s", "notify-added\n")
31     try:
32         (<object>account_cbs["notify-added"])("notify-added: TODO")
33     except KeyError:
34         pass
35
36 cdef void status_changed (account.PurpleAccount *account,
37                           status.PurpleStatus *status):
38     debug.c_purple_debug_info("account", "%s", "status-changed\n")
39     try:
40         (<object>account_cbs["status-changed"])("status-changed: TODO")
41     except KeyError:
42         pass
43
44 cdef void request_add (account.PurpleAccount *account,
45                        const_char *remote_user, const_char *id,
46                        const_char *alias, const_char *message):
47     debug.c_purple_debug_info("account", "%s", "request-add\n")
48     try:
49         (<object>account_cbs["request-add"])("request-add: TODO")
50     except KeyError:
51         pass
52
53 cdef void *request_authorize (account.PurpleAccount *account,
54                               const_char *remote_user, const_char *id,
55                               const_char *alias, const_char *message,
56                               glib.gboolean on_list,
57                               account.PurpleAccountRequestAuthorizationCb authorize_cb,
58                               account.PurpleAccountRequestAuthorizationCb deny_cb,
59                               void *user_data):
60     debug.c_purple_debug_info("account", "%s", "request-authorize\n")
61     try:
62         (<object>account_cbs["request-authorize"])("request-authorize: TODO")
63         return NULL
64     except KeyError:
65         pass
66
67 cdef void close_account_request (void *ui_handle):
68     debug.c_purple_debug_info("account", "%s", "close-account-request\n")
69     try:
70         (<object>account_cbs["close-account-request"])("close-account-request: TODO")
71     except KeyError:
72         pass