Updated blist_cbs.pxd.
[python-purple] / request_cbs.pxd
1 #
2 #  Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
3 #
4 #  This file is part of python-purple.
5 #
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.
10 #
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.
15 #
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/>.
18 #
19
20 cimport purple
21
22 cdef extern from *:
23     ctypedef char const_char "const char"
24     ctypedef int size_t
25     ctypedef void* va_list
26
27 request_cbs = {}
28
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,
37                           void *user_data):
38     debug.c_purple_debug_info("request", "%s", "request-input\n")
39     try:
40         (<object>request_cbs["request-input"])("request-input: TODO")
41     except KeyError:
42         pass
43
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_info("request", "%s", "request-choice\n")
53     try:
54         (<object>request_cbs["request-choice"])("request-choice: TODO")
55     except KeyError:
56         pass
57
58 cdef void *request_action (const_char *title, const_char *primary,
59                            const_char *secondary, int default_action,
60                            account.PurpleAccount *account, const_char *who,
61                            conversation.PurpleConversation *conv,
62                            void *user_data, size_t action_count,
63                            va_list actions):
64     debug.c_purple_debug_info("request", "%s", "request-action\n")
65     try:
66         (<object>request_cbs["request-action"])("request-action: TODo")
67     except KeyError:
68         pass
69
70 cdef void *request_fields (const_char *title, const_char *primary,
71                            const_char *secondary,
72                            request.PurpleRequestFields *fields,
73                            const_char *ok_text, glib.GCallback ok_cb,
74                            const_char *cancel_text, glib.GCallback cancel_cb,
75                            account.PurpleAccount *account, const_char *who,
76                            conversation.PurpleConversation *conv,
77                            void *user_data):
78     debug.c_purple_debug_info("request", "%s", "request-fields\n")
79     try:
80         (<object>request_cbs["request-fields"])("request-fields: TODO")
81     except KeyError:
82         pass
83
84 cdef void *request_file (const_char *title, const_char *filename,
85                          glib.gboolean savedialog, glib.GCallback ok_cb,
86                          glib.GCallback cancel_cb,
87                          account.PurpleAccount *account, const_char *who,
88                          conversation.PurpleConversation *conv,
89                          void *user_data):
90     debug.c_purple_debug_info("request", "%s", "request-file\n")
91     try:
92         (<object>request_cbs["request-file"])("request-file: TODO")
93     except KeyError:
94         pass
95
96 cdef void close_request (request.PurpleRequestType type, void *ui_handle):
97     debug.c_purple_debug_info("request", "%s", "close-request\n")
98     try:
99         (<object>request_cbs["close-request"])("close-request: TODO")
100     except KeyError:
101         pass
102
103 cdef void *request_folder (const_char *title, const_char *dirname,
104                            glib.GCallback ok_cb,
105                            glib.GCallback cancel_cb,
106                            account.PurpleAccount *account,
107                            const_char *who,
108                            conversation.PurpleConversation *conv,
109                            void *user_data):
110     debug.c_purple_debug_info("request", "%s", "request-folder\n")
111     try:
112         (<object>request_cbs["request-folder"])("request-folder: TODO")
113     except KeyError:
114         pass