2 # Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
4 # This file is part of python-purple.
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.
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.
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/>.
23 ctypedef char const_char "const char"
24 ctypedef glib.guchar const_guchar "const guchar"
25 ctypedef long int time_t
29 cdef void create_conversation (conversation.PurpleConversation *conv):
30 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
31 "create_conversation\n")
33 (<object>conversation_cbs["create_conversation"])(conv.name, conv.type)
37 cdef void destroy_conversation (conversation.PurpleConversation *conv):
38 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
39 "destroy_conversation\n")
41 (<object>conversation_cbs["destroy_conversation"])("destroy_conversation")
45 cdef void write_chat (conversation.PurpleConversation *conv, const_char *who,
46 const_char *message, conversation.PurpleMessageFlags flags,
48 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
51 (<object>conversation_cbs["write_chat"])("write_chat")
55 cdef void write_im (conversation.PurpleConversation *conv, const_char *who,
56 const_char *message, conversation.PurpleMessageFlags flags,
58 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "write_im\n")
64 (<object>conversation_cbs["write_im"])(conv.account.username, sender, <char *> message)
68 cdef void write_conv (conversation.PurpleConversation *conv, const_char *name,
69 const_char *alias, const_char *message,
70 conversation.PurpleMessageFlags flags, time_t mtime):
71 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
74 (<object>conversation_cbs["write_conv"])("write_conv")
78 cdef void chat_add_users (conversation.PurpleConversation *conv,
79 glib.GList *cbuddies, glib.gboolean new_arrivals):
80 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
83 (<object>conversation_cbs["chat_add_users"])("chat_add_users")
87 cdef void chat_rename_user (conversation.PurpleConversation *conv,
88 const_char *old_name, const_char *new_name,
89 const_char *new_alias):
90 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
93 (<object>conversation_cbs["chat_rename_user"])("chat_rename_user")
97 cdef void chat_remove_users (conversation.PurpleConversation *conv,
99 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
100 "chat_remove_users\n")
102 (<object>conversation_cbs["chat_remove_users"])("chat_remove_users")
106 cdef void chat_update_user (conversation.PurpleConversation *conv,
108 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
109 "chat_update_user\n")
111 (<object>conversation_cbs["chat_update_user"])("chat_update_user")
115 cdef void present (conversation.PurpleConversation *conv):
116 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
119 (<object>conversation_cbs["present"])("present")
123 cdef glib.gboolean has_focus (conversation.PurpleConversation *conv):
124 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
127 (<object>conversation_cbs["has_focus"])("has_focus")
132 cdef glib.gboolean custom_smiley_add (conversation.PurpleConversation *conv,
133 const_char *smile, glib.gboolean remote):
134 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
135 "custom_smiley_add\n")
137 (<object>conversation_cbs["custom_smiley_add"])("custom_smiley_add")
142 cdef void custom_smiley_write (conversation.PurpleConversation *conv,
143 const_char *smile, const_guchar *data,
145 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
146 "custom_smiley_write\n")
148 (<object>conversation_cbs["custom_smiley_write"])("custom_smiley_write")
153 cdef void custom_smiley_close (conversation.PurpleConversation *conv,
155 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
156 "custom_smiley_close\n")
158 (<object>conversation_cbs["custom_smiley_close"])("custom_smiley_close")
162 cdef void send_confirm (conversation.PurpleConversation *conv,
163 const_char *message):
164 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation",
167 (<object>conversation_cbs["send_confirm"])("send_confirm")