Adding function get_all to Plugin class
[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(debug.PURPLE_DEBUG_INFO, "account",
31                          "notify-added\n")
32     try:
33         (<object>account_cbs["notify-added"])("notify-added: TODO")
34     except KeyError:
35         pass
36
37 cdef void status_changed (account.PurpleAccount *account,
38                           status.PurpleStatus *status):
39     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "account",
40                          "status-changed\n")
41     try:
42         (<object>account_cbs["status-changed"])("status-changed: TODO")
43     except KeyError:
44         pass
45
46 cdef void request_add (account.PurpleAccount *account,
47                        const_char *remote_user, const_char *id,
48                        const_char *alias, const_char *message):
49     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "account",
50                          "request-add\n")
51     try:
52         (<object>account_cbs["request-add"])("request-add: TODO")
53     except KeyError:
54         pass
55
56 cdef void *request_authorize (account.PurpleAccount *account,
57                               const_char *remote_user, const_char *id,
58                               const_char *alias, const_char *message,
59                               glib.gboolean on_list,
60                               account.PurpleAccountRequestAuthorizationCb authorize_cb,
61                               account.PurpleAccountRequestAuthorizationCb deny_cb,
62                               void *user_data):
63     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "account",
64                          "request-authorize\n")
65     try:
66         (<object>account_cbs["request-authorize"])("request-authorize: TODO")
67         return NULL
68     except KeyError:
69         pass
70
71 cdef void close_account_request (void *ui_handle):
72     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "account",
73                          "close-account-request\n")
74     try:
75         (<object>account_cbs["close-account-request"])("close-account-request: TODO")
76     except KeyError:
77         pass