Fixed accounts.pxd recursive call from other .pxd files.
[python-purple] / conversation_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     ctypedef glib.guchar const_guchar "const guchar"
25     ctypedef long int time_t
26
27 conversation_cbs = {}
28
29 cdef void create_conversation (conversation.PurpleConversation *conv):
30     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
31                          "create_conversation\n")
32     try:
33         (<object>conversation_cbs["create_conversation"])("create_conversation")
34     except KeyError:
35         pass
36
37 cdef void destroy_conversation (conversation.PurpleConversation *conv):
38     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
39                          "destroy_conversation\n")
40     try:
41         (<object>conversation_cbs["destroy_conversation"])("destroy_conversation")
42     except KeyError:
43         pass
44
45 cdef void write_chat (conversation.PurpleConversation *conv, const_char *who,
46                       const_char *message, conversation.PurpleMessageFlags flags,
47                       time_t mtime):
48     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
49                          "write_chat\n")
50     try:
51         (<object>conversation_cbs["write_chat"])("write_chat")
52     except KeyError:
53         pass
54
55 cdef void write_im (conversation.PurpleConversation *conv, const_char *who,
56                     const_char *message, conversation.PurpleMessageFlags flags,
57                     time_t mtime):
58     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "write_im\n")
59     try:
60         (<object>conversation_cbs["write_im"])("write_im")
61     except KeyError:
62         pass
63
64 cdef void write_conv (conversation.PurpleConversation *conv, const_char *name,
65                       const_char *alias, const_char *message,
66                       conversation.PurpleMessageFlags flags, time_t mtime):
67     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
68                          "write_conv\n")
69     try:
70         (<object>conversation_cbs["write_conv"])("write_conv")
71     except KeyError:
72         pass
73
74 cdef void chat_add_users (conversation.PurpleConversation *conv,
75                           glib.GList *cbuddies, glib.gboolean new_arrivals):
76     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
77                          "chat_add_users\n")
78     try:
79         (<object>conversation_cbs["chat_add_users"])("chat_add_users")
80     except KeyError:
81         pass
82
83 cdef void chat_rename_user (conversation.PurpleConversation *conv,
84                             const_char *old_name, const_char *new_name,
85                             const_char *new_alias):
86     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
87                          "chat_rename_user\n")
88     try:
89         (<object>conversation_cbs["chat_rename_user"])("chat_rename_user")
90     except KeyError:
91         pass
92
93 cdef void chat_remove_users (conversation.PurpleConversation *conv,
94                              glib.GList *users):
95     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
96                          "chat_remove_users\n")
97     try:
98         (<object>conversation_cbs["chat_remove_users"])("chat_remove_users")
99     except KeyError:
100         pass
101
102 cdef void chat_update_user (conversation.PurpleConversation *conv,
103                             const_char *user):
104     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
105                          "chat_update_user\n")
106     try:
107         (<object>conversation_cbs["chat_update_user"])("chat_update_user")
108     except KeyError:
109         pass
110
111 cdef void present (conversation.PurpleConversation *conv):
112     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
113                          "present\n")
114     try:
115         (<object>conversation_cbs["present"])("present")
116     except KeyError:
117         pass
118
119 cdef glib.gboolean has_focus (conversation.PurpleConversation *conv):
120     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
121                          "has_focus\n")
122     try:
123         (<object>conversation_cbs["has_focus"])("has_focus")
124         return False
125     except KeyError:
126         return False
127
128 cdef glib.gboolean custom_smiley_add (conversation.PurpleConversation *conv,
129                                       const_char *smile, glib.gboolean remote):
130     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
131                          "custom_smiley_add\n")
132     try:
133         (<object>conversation_cbs["custom_smiley_add"])("custom_smiley_add")
134         return False
135     except KeyError:
136         return False
137
138 cdef void custom_smiley_write (conversation.PurpleConversation *conv,
139                                const_char *smile, const_guchar *data,
140                                glib.gsize size):
141     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
142                          "custom_smiley_write\n")
143     try:
144         (<object>conversation_cbs["custom_smiley_write"])("custom_smiley_write")
145     except KeyError:
146         pass
147
148
149 cdef void custom_smiley_close (conversation.PurpleConversation *conv,
150                                const_char *smile):
151     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
152                          "custom_smiley_close\n")
153     try:
154         (<object>conversation_cbs["custom_smiley_close"])("custom_smiley_close")
155     except KeyError:
156         pass
157
158 cdef void send_confirm (conversation.PurpleConversation *conv,
159                         const_char *message):
160     debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
161                          "send_confirm\n")
162     try:
163         (<object>conversation_cbs["send_confirm"])("send_confirm")
164     except KeyError:
165         pass