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"
26 cdef extern from "time.h":
27 ctypedef long int time_t
29 conversations_cbs = {}
31 cdef void create_conversation (conversation.PurpleConversation *conv):
32 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "create_conversation\n")
33 global conversations_cbs
35 (<object>conversations_cbs["create_conversation"])("create_conversation")
39 cdef void destroy_conversation (conversation.PurpleConversation *conv):
40 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "destroy_conversation\n")
41 global conversations_cbs
43 (<object>conversations_cbs["destroy_conversation"])("destroy_conversation")
47 cdef void write_chat (conversation.PurpleConversation *conv, const_char *who,
48 const_char *message, conversation.PurpleMessageFlags flags,
50 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "write_chat\n")
51 global conversations_cbs
53 (<object>conversations_cbs["write_chat"])("write_chat")
57 cdef void write_im (conversation.PurpleConversation *conv, const_char *who,
58 const_char *message, conversation.PurpleMessageFlags flags,
60 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "write_im\n")
61 global conversations_cbs
63 (<object>conversations_cbs["write_im"])("write_im")
67 cdef void write_conv (conversation.PurpleConversation *conv, const_char *name,
68 const_char *alias, const_char *message,
69 conversation.PurpleMessageFlags flags, time_t mtime):
70 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "write_conv\n")
71 global conversations_cbs
73 (<object>conversations_cbs["write_conv"])("write_conv")
77 cdef void chat_add_users (conversation.PurpleConversation *conv,
78 glib.GList *cbuddies, glib.gboolean new_arrivals):
79 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "chat_add_users\n")
80 global conversations_cbs
82 (<object>conversations_cbs["chat_add_users"])("chat_add_users")
86 cdef void chat_rename_user (conversation.PurpleConversation *conv,
87 const_char *old_name, const_char *new_name,
88 const_char *new_alias):
89 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "chat_rename_user\n")
90 global conversations_cbs
92 (<object>conversations_cbs["chat_rename_user"])("chat_rename_user")
96 cdef void chat_remove_users (conversation.PurpleConversation *conv,
98 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "chat_remove_users\n")
99 global conversations_cbs
101 (<object>conversations_cbs["chat_remove_users"])("chat_remove_users")
105 cdef void chat_update_user (conversation.PurpleConversation *conv, const_char *user):
106 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "chat_update_user\n")
107 global conversations_cbs
109 (<object>conversations_cbs["chat_update_user"])("chat_update_user")
113 cdef void present (conversation.PurpleConversation *conv):
114 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "present\n")
115 global conversations_cbs
117 (<object>conversations_cbs["present"])("present")
121 cdef glib.gboolean has_focus (conversation.PurpleConversation *conv):
122 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "has_focus\n")
123 global conversations_cbs
125 (<object>conversations_cbs["has_focus"])("has_focus")
130 cdef glib.gboolean custom_smiley_add (conversation.PurpleConversation *conv,
131 const_char *smile, glib.gboolean remote):
132 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "custom_smiley_add\n")
133 global conversations_cbs
135 (<object>conversations_cbs["custom_smiley_add"])("custom_smiley_add")
140 cdef void custom_smiley_write (conversation.PurpleConversation *conv,
141 const_char *smile, const_guchar *data,
143 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "custom_smiley_write\n")
145 (<object>conversations_cbs["custom_smiley_write"])("custom_smiley_write")
150 cdef void custom_smiley_close (conversation.PurpleConversation *conv,
152 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "custom_smiley_close\n")
154 (<object>conversations_cbs["custom_smiley_close"])("custom_smiley_close")
158 cdef void send_confirm (conversation.PurpleConversation *conv, const_char *message):
159 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "conversation", "send_confirm\n")
161 (<object>conversations_cbs["send_confirm"])("send_confirm")