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/>.
24 cdef extern from "time.h":
25 ctypedef long int time_t
27 cdef extern from "libpurple/conversation.h":
28 ctypedef struct PurpleConversation:
31 ctypedef struct PurpleConvIm:
34 ctypedef enum PurpleMessageFlags:
35 PURPLE_MESSAGE_SEND = 0x0001
36 PURPLE_MESSAGE_RECV = 0x0002
37 PURPLE_MESSAGE_SYSTEM = 0x0004
38 PURPLE_MESSAGE_AUTO_RESP = 0x0008
39 PURPLE_MESSAGE_ACTIVE_ONLY = 0x0010
40 PURPLE_MESSAGE_NICK = 0x0020
41 PURPLE_MESSAGE_NO_LOG = 0x0040
42 PURPLE_MESSAGE_WHISPER = 0x0080
43 PURPLE_MESSAGE_ERROR = 0x0200
44 PURPLE_MESSAGE_DELAYED = 0x0400
45 PURPLE_MESSAGE_RAW = 0x0800
46 PURPLE_MESSAGE_IMAGES = 0x1000
47 PURPLE_MESSAGE_NOTIFY = 0x2000
48 PURPLE_MESSAGE_NO_LINKIFY = 0x4000
49 PURPLE_MESSAGE_INVISIBLE = 0x8000
51 ctypedef struct PurpleConversationUiOps:
52 void (*create_conversation) (PurpleConversation *conv)
53 void (*destroy_conversation) (PurpleConversation *conv)
54 void (*write_chat) (PurpleConversation *conv, char *who, char *message, PurpleMessageFlags flags, time_t mtime)
55 void (*write_im) (PurpleConversation *conv, char *who, char *message, PurpleMessageFlags flags, time_t mtime)
56 void (*write_conv) (PurpleConversation *conv, char *name, char *alias, char *message, PurpleMessageFlags flags, time_t mtime)
57 void (*chat_add_users) (PurpleConversation *conv, glib.GList *cbuddies, glib.gboolean new_arrivals)
58 void (*chat_rename_user) (PurpleConversation *conv, char *old_name, char *new_name, char *new_alias)
59 void (*chat_remove_users) (PurpleConversation *conv, glib.GList *users)
60 void (*chat_update_user) (PurpleConversation *conv, char *user)
61 void (*present) (PurpleConversation *conv)
62 glib.gboolean (*has_focus) (PurpleConversation *conv)
63 glib.gboolean (*custom_smiley_add) (PurpleConversation *conv, char *smile, glib.gboolean remote)
64 void (*custom_smiley_write) (PurpleConversation *conv, char *smile, glib.guchar *data, glib.gsize size)
65 void (*custom_smiley_close) (PurpleConversation *conv, char *smile)
66 void (*send_confirm) (PurpleConversation *conv, char *message)
68 void c_purple_conversations_init "purple_conversations_init" ()
69 void *c_purple_conversations_get_handle "purple_conversations_get_handle" ()
70 PurpleConversation *c_purple_conversation_new "purple_conversation_new" (int type, account.PurpleAccount *account, char *name)
71 void c_purple_conversation_set_ui_ops "purple_conversation_set_ui_ops" (PurpleConversation *conv, PurpleConversationUiOps *ops)
72 void c_purple_conversations_set_ui_ops "purple_conversations_set_ui_ops" (PurpleConversationUiOps *ops)
73 PurpleConvIm *c_purple_conversation_get_im_data "purple_conversation_get_im_data" (PurpleConversation *conv)
74 void c_purple_conv_im_send "purple_conv_im_send" (PurpleConvIm *im, char *message)
75 void c_purple_conversation_destroy "purple_conversation_destroy" (PurpleConversation *conv)