Added missing structures on connection.pxd.
[python-purple] / blist_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 blist_cbs = {}
26
27 cdef void new_list (blist.PurpleBuddyList *list):
28     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "new_list\n")
29     try:
30         (<object>blist_cbs["new_list"])("new_list")
31     except KeyError:
32         pass
33
34 cdef void new_node (blist.PurpleBlistNode *node):
35     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "new_node\n")
36     try:
37         (<object>blist_cbs["new_node"])("new_node")
38     except KeyError:
39         pass
40
41 cdef void show (blist.PurpleBuddyList *list):
42     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "show\n")
43     try:
44         (<object>blist_cbs["show"])("show")
45     except KeyError:
46         pass
47
48 cdef void update (blist.PurpleBuddyList *list, blist.PurpleBlistNode *node):
49     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "update\n")
50     try:
51         (<object>blist_cbs["update"])("update")
52     except KeyError:
53         pass
54
55 cdef void remove (blist.PurpleBuddyList *list, blist.PurpleBlistNode *node):
56     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "remove\n")
57     try:
58         (<object>blist_cbs["remove"])("remove")
59     except KeyError:
60         pass
61
62 cdef void destroy (blist.PurpleBuddyList *list):
63     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "destroy\n")
64     try:
65         (<object>blist_cbs["destroy"])("destroy")
66     except KeyError:
67         pass
68
69 cdef void set_visible (blist.PurpleBuddyList *list, glib.gboolean show):
70     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "set_visible\n")
71     try:
72         (<object>blist_cbs["set_visible"])("set_visible")
73     except KeyError:
74         pass
75
76 cdef void request_add_buddy (account.PurpleAccount *account,
77                              const_char *username, const_char *group,
78                              const_char *alias):
79     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "request_add_buddy\n")
80     try:
81         (<object>blist_cbs["request_add_buddy"])("request_add_buddy")
82     except KeyError:
83         pass
84
85 cdef void request_add_chat (account.PurpleAccount *account,
86                             blist.PurpleGroup *group, const_char *alias,
87                             const_char *name):
88     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "request_add_chat\n")
89     try:
90         (<object>blist_cbs["request_add_chat"])("request_add_chat")
91     except KeyError:
92         pass
93
94 cdef void request_add_group ():
95     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "blist", "request_add_group\n")
96     try:
97         (<object>blist_cbs["request_add_chat"])("request_add_group")
98     except KeyError:
99         pass