Adding support to set/get account's status
[python-purple] / libpurple / notify.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 glib
21
22 cimport connection
23
24 cdef extern from *:
25     ctypedef char const_char "const char"
26     ctypedef int size_t
27
28 cdef extern from "libpurple/notify.h":
29     ctypedef struct PurpleNotifyUserInfoEntry
30     ctypedef struct PurpleNotifyUserInfo
31
32     ctypedef void (*PurpleNotifyCloseCallback) (glib.gpointer user_data)
33
34     ctypedef enum PurpleNotifyType:
35         PURPLE_NOTIFY_MESSAGE = 0
36         PURPLE_NOTIFY_EMAIL
37         PURPLE_NOTIFY_EMAILS
38         PURPLE_NOTIFY_FORMATTED
39         PURPLE_NOTIFY_SEARCHRESULTS
40         PURPLE_NOTIFY_USERINFO
41         PURPLE_NOTIFY_URI
42
43     ctypedef enum PurpleNotifyMsgType:
44         PURPLE_NOTIFY_MSG_ERROR = 0
45         PURPLE_NOTIFY_MSG_WARNING
46         PURPLE_NOTIFY_MSG_INFO
47
48     ctypedef enum PurpleNotifySearchButtonType:
49         PURPLE_NOTIFY_BUTTON_LABELED = 0
50         PURPLE_NOTIFY_BUTTON_CONTINUE = 1
51         PURPLE_NOTIFY_BUTTON_ADD
52         PURPLE_NOTIFY_BUTTON_INFO
53         PURPLE_NOTIFY_BUTTON_IM
54         PURPLE_NOTIFY_BUTTON_JOIN
55         PURPLE_NOTIFY_BUTTON_INVITE
56
57     ctypedef struct PurpleNotifySearchResults:
58         glib.GList *columns
59         glib.GList *rows
60         glib.GList *buttons
61
62     ctypedef struct PurpleNotifySearchColumn:
63         char *title
64
65     ctypedef void (*PurpleNotifySearchResultsCallback) (connection.PurpleConnection *c, glib.GList *row, glib.gpointer user_data)
66
67     ctypedef struct purpleNotifySearchButton:
68         PurpleNotifySearchButtonType type
69         PurpleNotifySearchResultsCallback callback
70         char *label
71
72     ctypedef struct PurpleNotifyUiOps:
73         void *(*notify_message) (PurpleNotifyMsgType type, const_char *title, \
74                 const_char *primary, const_char *secondary)
75         void *(*notify_email) (connection.PurpleConnection *gc, \
76                 const_char *subject, const_char *sender, const_char *to, \
77                 const_char *url)
78         void *(*notify_emails) (connection.PurpleConnection *gc,
79                 size_t count, glib.gboolean detailed, const_char **subjects, \
80                 const_char **senders, const_char **tos, const_char **urls)
81         void *(*notify_formatted) (const_char *title, const_char *primary, \
82                 const_char *secondary, const_char *text)
83         void *(*notify_searchresults) (connection.PurpleConnection *gc, \
84                 const_char *title, const_char *primary, \
85                 const_char *secondary, PurpleNotifySearchResults *results, \
86                 glib.gpointer user_data)
87         void (*notify_searchresults_new_rows) \
88                 (connection.PurpleConnection *gc, \
89                 PurpleNotifySearchResults *results, void *data)
90         void *(*notify_userinfo) (connection.PurpleConnection *gc, \
91                 const_char *who, PurpleNotifyUserInfo *user_info)
92         void *(*notify_uri) (const_char *uri)
93         void (*close_notify) (PurpleNotifyType type, void *ui_handle)
94
95     void purple_notify_set_ui_ops(PurpleNotifyUiOps *ops)