Buddy list update
[python-purple] / notify_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 notify_cbs = {}
23
24 cdef extern from *:
25     ctypedef char const_char "const char"
26     ctypedef int size_t
27
28 cdef void *notify_message (notify.PurpleNotifyMsgType type, const_char *title,
29                            const_char *primary, const_char *secondary):
30     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify_message\n")
31     try:
32         (<object>notify_cbs["notify_message"])("notify_message")
33     except KeyError:
34         pass
35
36 cdef void *notify_email (connection.PurpleConnection *gc, const_char *subject,
37                          const_char *_from, const_char *to, const_char *url):
38     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify_email\n")
39     try:
40         (<object>notify_cbs["notify_email"])("notify_email")
41     except KeyError:
42         pass
43
44 cdef void *notify_emails (connection.PurpleConnection *gc, size_t count,
45                           glib.gboolean detailed, const_char **subjects,
46                           const_char **froms, const_char **tos,
47                           const_char **urls):
48     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify_emails\n")
49     try:
50         (<object>notify_cbs["notify_emails"])("notify_emails")
51     except KeyError:
52         pass
53
54 cdef void *notify_formatted (const_char *title, const_char *primary,
55                              const_char *secondary, const_char *text):
56     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify_formatted\n")
57     try:
58         (<object>notify_cbs["notify_formatted"])("notify_formatted")
59     except KeyError:
60         pass
61
62 cdef void *notify_searchresults (connection.PurpleConnection *gc,
63                                  const_char *title, const_char *primary,
64                                  const_char *secondary,
65                                  notify.PurpleNotifySearchResults *results,
66                                  glib.gpointer user_data):
67     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify",
68                          "notify_searchresults\n")
69     try:
70         (<object>notify_cbs["notify_searchresults"])("notify_searchresults")
71     except KeyError:
72         pass
73
74 cdef void notify_searchresults_new_rows (connection.PurpleConnection *gc,
75                             notify.PurpleNotifySearchResults *results,
76                             void *data):
77     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify",
78                          "notify_searchresults_new_rows\n")
79     try:
80         (<object>notify_cbs["notify_searchresults_new_rows"])("notify_searchresults_new_rows")
81     except KeyError:
82         pass
83
84 cdef void *notify_userinfo (connection.PurpleConnection *gc, const_char *who,
85                             notify.PurpleNotifyUserInfo *user_info):
86     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify_userinfo\n")
87     try:
88         (<object>notify_cbs["notify_userinfo"])("notify_userinfo")
89     except KeyError:
90         pass
91
92 cdef void *notify_uri (const_char *uri):
93     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "notify_uri\n")
94     try:
95         (<object>notify_cbs["notify_uri"])("notify_uri")
96     except KeyError:
97         pass
98
99 cdef void close_notify (notify.PurpleNotifyType type, void *ui_handle):
100     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "notify", "close_notify\n")
101     try:
102         (<object>notify_cbs["close_notify"])("close_notify")
103     except KeyError:
104         pass