Implemented status_changed callback.
[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, glib.gchar *hint, \
32         const_char *ok_text, glib.GCallback ok_cb, const_char *cancel_text, \
33         glib.GCallback cancel_cb, \
34         account.PurpleAccount *account, const_char *who, \
35         conversation.PurpleConversation *conv, void *user_data):
36     """
37     @see purple_request_input().
38     """
39     debug.purple_debug_info("request", "%s", "request-input\n")
40     if request_cbs.has_key("request-input"):
41         (<object> request_cbs["request-input"])("request-input: TODO")
42
43 cdef void *request_choice(const_char *title, const_char *primary, \
44         const_char *secondary, int default_value, const_char *ok_text, \
45         glib.GCallback ok_cb, const_char *cancel_text, \
46         glib.GCallback cancel_cb, account.PurpleAccount *account, \
47         const_char *who, conversation.PurpleConversation *conv, \
48         void *user_data, va_list choices):
49     """
50     @see purple_request_choice_varg().
51     """
52     debug.purple_debug_info("request", "%s", "request-choice\n")
53     if request_cbs.has_key("request-choice"):
54         (<object> request_cbs["request-choice"])("request-choice: TODO")
55
56 cdef void *request_action(const_char *title, const_char *primary, \
57         const_char *secondary, int default_action, \
58         account.PurpleAccount *account, const_char *who, \
59         conversation.PurpleConversation *conv, void *user_data, \
60         size_t action_count, va_list actions):
61     """
62     @see purple_request_action_varg().
63     """
64     debug.purple_debug_info("request", "%s", "request-action\n")
65     if request_cbs.has_key("request-action"):
66         (<object> request_cbs["request-action"])("request-action: TODo")
67
68 cdef void *request_fields(const_char *title, const_char *primary, \
69         const_char *secondary, request.PurpleRequestFields *fields, \
70         const_char *ok_text, glib.GCallback ok_cb, const_char *cancel_text, \
71         glib.GCallback cancel_cb, account.PurpleAccount *account, \
72         const_char *who, conversation.PurpleConversation *conv, \
73         void *user_data):
74     """
75     @see purple_request_fields().
76     """
77     debug.purple_debug_info("request", "%s", "request-fields\n")
78     if request_cbs.has_key("request-fields"):
79         (<object> request_cbs["request-fields"])("request-fields: TODO")
80
81 cdef void *request_file(const_char *title, const_char *filename, \
82         glib.gboolean savedialog, glib.GCallback ok_cb, \
83         glib.GCallback cancel_cb, account.PurpleAccount *account, \
84         const_char *who, conversation.PurpleConversation *conv, \
85         void *user_data):
86     """
87     @see purple_request_file().
88     """
89     debug.purple_debug_info("request", "%s", "request-file\n")
90     if request_cbs.has_key("request-file"):
91         (<object> request_cbs["request-file"])("request-file: TODO")
92
93 cdef void close_request(request.PurpleRequestType type, void *ui_handle):
94     """
95     TODO
96     """
97     debug.purple_debug_info("request", "%s", "close-request\n")
98     if request_cbs.has_key("close-request"):
99         (<object> request_cbs["close-request"])("close-request: TODO")
100
101 cdef void *request_folder(const_char *title, const_char *dirname, \
102         glib.GCallback ok_cb, glib.GCallback cancel_cb, \
103         account.PurpleAccount *account, const_char *who, \
104         conversation.PurpleConversation *conv, void *user_data):
105     """
106     @see purple_request_folder().
107     """
108     debug.purple_debug_info("request", "%s", "request-folder\n")
109     if request_cbs.has_key("request-folder"):
110         (<object> request_cbs["request-folder"])("request-folder: TODO")