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"
25 ctypedef void* va_list
29 cdef void *request_input (const_char *title, const_char *primary,
30 const_char *secondary, const_char *default_value,
31 glib.gboolean multiline, glib.gboolean masked,
32 glib.gchar *hint, const_char *ok_text,
33 glib.GCallback ok_cb, const_char *cancel_text,
34 glib.GCallback cancel_cb,
35 account.PurpleAccount *account, const_char *who,
36 conversation.PurpleConversation *conv,
38 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request", "request_input\n")
40 (<object>request_cbs["request_input"])("request_input")
44 cdef void *request_choice (const_char *title, const_char *primary,
45 const_char *secondary, int default_value,
46 const_char *ok_text, glib.GCallback ok_cb,
47 const_char *cancel_text,
48 glib.GCallback cancel_cb,
49 account.PurpleAccount *account, const_char *who,
50 conversation.PurpleConversation *conv,
51 void *user_data, va_list choices):
52 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request",
55 (<object>request_cbs["request_choice"])("request_choice")
59 cdef void *request_action (const_char *title, const_char *primary,
60 const_char *secondary, int default_action,
61 account.PurpleAccount *account, const_char *who,
62 conversation.PurpleConversation *conv,
63 void *user_data, size_t action_count,
65 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request",
68 (<object>request_cbs["request_action"])("request_action")
72 cdef void *request_fields (const_char *title, const_char *primary,
73 const_char *secondary,
74 request.PurpleRequestFields *fields,
75 const_char *ok_text, glib.GCallback ok_cb,
76 const_char *cancel_text, glib.GCallback cancel_cb,
77 account.PurpleAccount *account, const_char *who,
78 conversation.PurpleConversation *conv,
80 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request",
83 (<object>request_cbs["request_fields"])("request_fields")
87 cdef void *request_file (const_char *title, const_char *filename,
88 glib.gboolean savedialog, glib.GCallback ok_cb,
89 glib.GCallback cancel_cb,
90 account.PurpleAccount *account, const_char *who,
91 conversation.PurpleConversation *conv,
93 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request", "request_file\n")
95 (<object>request_cbs["request_file"])("request_file")
99 cdef void close_request (request.PurpleRequestType type, void *ui_handle):
100 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request", "close_request\n")
102 (<object>request_cbs["close_request"])("close_request")
106 cdef void *request_folder (const_char *title, const_char *dirname,
107 glib.GCallback ok_cb,
108 glib.GCallback cancel_cb,
109 account.PurpleAccount *account,
111 conversation.PurpleConversation *conv,
113 debug.c_purple_debug(debug.PURPLE_DEBUG_INFO, "request",
116 (<object>request_cbs["request_folder"])("request_folder")