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/>.
29 ctypedef char const_char "const char"
30 ctypedef long int time_t
32 cdef extern from "libpurple/server.h":
33 unsigned int serv_send_typing(connection.PurpleConnection *gc, \
34 const_char *name, conversation.PurpleTypingState state)
35 void serv_move_buddy(blist.PurpleBuddy *, blist.PurpleGroup *, \
37 int serv_send_im(connection.PurpleConnection *, const_char *, \
38 const_char *, conversation.PurpleMessageFlags flags)
39 prpl.PurpleAttentionType *purple_get_attention_type_from_code( \
40 account.PurpleAccount *account, glib.guint type_code)
41 void serv_send_attention(connection.PurpleConnection *gc, \
42 const_char *who, glib.guint type_code)
43 void serv_got_attention(connection.PurpleConnection *gc, \
44 const_char *who, glib.guint type_code)
45 void serv_get_info(connection.PurpleConnection *, const_char *)
46 void serv_set_info(connection.PurpleConnection *, const_char *)
47 void serv_add_permit(connection.PurpleConnection *, const_char *)
48 void serv_add_deny(connection.PurpleConnection *, const_char *)
49 void serv_rem_permit(connection.PurpleConnection *, const_char *)
50 void serv_rem_deny(connection.PurpleConnection *, const_char *)
51 void serv_set_permit_deny(connection.PurpleConnection *)
52 void serv_chat_invite(connection.PurpleConnection *, int, \
53 const_char *, const_char *)
54 void serv_chat_leave(connection.PurpleConnection *, int)
55 void serv_chat_whisper(connection.PurpleConnection *, int, \
56 const_char *, const_char *)
57 int serv_chat_send(connection.PurpleConnection *, int, const_char *, \
58 conversation.PurpleMessageFlags flags)
59 void serv_alias_buddy(blist.PurpleBuddy *)
60 void serv_got_alias(connection.PurpleConnection *gc, const_char *who, \
62 void purple_serv_got_private_alias(connection.PurpleConnection *gc, \
63 const_char *who, const_char *alias)
65 void serv_got_typing(connection.PurpleConnection *gc, const_char *name, \
66 int timeout, conversation.PurpleTypingState state)
67 void serv_got_typing_stopped(connection.PurpleConnection *gc, \
69 void serv_got_im(connection.PurpleConnection *gc, const_char *who, \
70 const_char *msg, conversation.PurpleMessageFlags flags, \
72 void serv_join_chat(connection.PurpleConnection *, glib.GHashTable *data)
73 void serv_reject_chat(connection.PurpleConnection *, glib.GHashTable *data)
74 void serv_got_chat_invite(connection.PurpleConnection *gc, \
75 const_char *name, const_char *who, const_char *message, \
76 glib.GHashTable *data)
77 conversation.PurpleConversation *serv_got_joined_chat( \
78 connection.PurpleConnection *gc, int id, const_char *name)
79 void purple_serv_got_join_chat_failed(connection.PurpleConnection *gc, \
80 glib.GHashTable *data)
81 void serv_got_chat_left(connection.PurpleConnection *g, int id)
82 void serv_got_chat_in(connection.PurpleConnection *g, int id, \
83 const_char *who, conversation.PurpleMessageFlags flags, \
84 const_char *message, time_t mtime)
85 void serv_send_file(connection.PurpleConnection *gc, const_char *who, \