Wed, 05 Sep 2007 22:32:14 +0000
propagate from branch 'im.pidgin.pidgin' (head 0853a065e5c3fcb5a6bb13fc23bec44ecf510ecd)
to branch 'im.pidgin.soc.2007.xmpp' (head b273d0db2bdd4a80d0fb22d32fe186e1f496933f)
| 5437 | 1 | /** |
| 2 | * @file notify.h Notification API | |
| 3 | * @ingroup core | |
| 4 | * | |
| 15884 | 5 | * purple |
| 5437 | 6 | * |
| 15884 | 7 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 8 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 9 | * source distribution. | |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
10 | * |
| 5437 | 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
18412
6873322c380f
Add links to the signal documents in the API documents.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18190
diff
changeset
|
24 | * |
|
6873322c380f
Add links to the signal documents in the API documents.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18190
diff
changeset
|
25 | * @see @ref notify-signals |
| 5437 | 26 | */ |
| 15884 | 27 | #ifndef _PURPLE_NOTIFY_H_ |
| 28 | #define _PURPLE_NOTIFY_H_ | |
| 5437 | 29 | |
| 30 | #include <stdlib.h> | |
| 31 | #include <glib-object.h> | |
| 32 | #include <glib.h> | |
| 33 | ||
| 15884 | 34 | typedef struct _PurpleNotifyUserInfoEntry PurpleNotifyUserInfoEntry; |
| 35 | typedef struct _PurpleNotifyUserInfo PurpleNotifyUserInfo; | |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
36 | |
| 9797 | 37 | #include "connection.h" |
| 38 | ||
| 5437 | 39 | /** |
|
12242
e7fc1748eb56
[gaim-migrate @ 14544]
Richard Laager <rlaager@pidgin.im>
parents:
12220
diff
changeset
|
40 | * Notification close callbacks. |
|
e7fc1748eb56
[gaim-migrate @ 14544]
Richard Laager <rlaager@pidgin.im>
parents:
12220
diff
changeset
|
41 | */ |
| 15884 | 42 | typedef void (*PurpleNotifyCloseCallback) (gpointer user_data); |
|
12242
e7fc1748eb56
[gaim-migrate @ 14544]
Richard Laager <rlaager@pidgin.im>
parents:
12220
diff
changeset
|
43 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
44 | |
|
12242
e7fc1748eb56
[gaim-migrate @ 14544]
Richard Laager <rlaager@pidgin.im>
parents:
12220
diff
changeset
|
45 | /** |
| 5437 | 46 | * Notification types. |
| 47 | */ | |
| 48 | typedef enum | |
| 49 | { | |
| 15884 | 50 | PURPLE_NOTIFY_MESSAGE = 0, /**< Message notification. */ |
| 51 | PURPLE_NOTIFY_EMAIL, /**< Single e-mail notification. */ | |
| 52 | PURPLE_NOTIFY_EMAILS, /**< Multiple e-mail notification. */ | |
| 53 | PURPLE_NOTIFY_FORMATTED, /**< Formatted text. */ | |
| 54 | PURPLE_NOTIFY_SEARCHRESULTS, /**< Buddy search results. */ | |
| 55 | PURPLE_NOTIFY_USERINFO, /**< Formatted userinfo text. */ | |
| 56 | PURPLE_NOTIFY_URI /**< URI notification or display. */ | |
| 5437 | 57 | |
| 15884 | 58 | } PurpleNotifyType; |
| 5437 | 59 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
60 | |
| 5437 | 61 | /** |
| 62 | * Notification message types. | |
| 63 | */ | |
| 64 | typedef enum | |
| 65 | { | |
| 15884 | 66 | PURPLE_NOTIFY_MSG_ERROR = 0, /**< Error notification. */ |
| 67 | PURPLE_NOTIFY_MSG_WARNING, /**< Warning notification. */ | |
| 68 | PURPLE_NOTIFY_MSG_INFO /**< Information notification. */ | |
| 5437 | 69 | |
| 15884 | 70 | } PurpleNotifyMsgType; |
| 5437 | 71 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
72 | |
| 5437 | 73 | /** |
| 11359 | 74 | * The types of buttons |
| 75 | */ | |
| 76 | typedef enum | |
| 77 | { | |
| 15884 | 78 | PURPLE_NOTIFY_BUTTON_LABELED = 0, /**< special use, see _button_add_labeled */ |
| 79 | PURPLE_NOTIFY_BUTTON_CONTINUE = 1, | |
| 80 | PURPLE_NOTIFY_BUTTON_ADD, | |
| 81 | PURPLE_NOTIFY_BUTTON_INFO, | |
| 82 | PURPLE_NOTIFY_BUTTON_IM, | |
| 83 | PURPLE_NOTIFY_BUTTON_JOIN, | |
| 84 | PURPLE_NOTIFY_BUTTON_INVITE | |
| 85 | } PurpleNotifySearchButtonType; | |
| 11359 | 86 | |
| 87 | ||
| 88 | /** | |
| 89 | * Search results object. | |
| 90 | */ | |
| 91 | typedef struct | |
| 92 | { | |
| 93 | GList *columns; /**< List of the search column objects. */ | |
| 94 | GList *rows; /**< List of rows in the result. */ | |
| 95 | GList *buttons; /**< List of buttons to display. */ | |
| 96 | ||
| 15884 | 97 | } PurpleNotifySearchResults; |
| 11359 | 98 | |
|
15211
bb75b7bc10a8
[gaim-migrate @ 17935]
Evan Schoenberg <evands@pidgin.im>
parents:
15205
diff
changeset
|
99 | /** |
| 15884 | 100 | * Types of PurpleNotifyUserInfoEntry objects |
|
15211
bb75b7bc10a8
[gaim-migrate @ 17935]
Evan Schoenberg <evands@pidgin.im>
parents:
15205
diff
changeset
|
101 | */ |
|
bb75b7bc10a8
[gaim-migrate @ 17935]
Evan Schoenberg <evands@pidgin.im>
parents:
15205
diff
changeset
|
102 | typedef enum |
|
bb75b7bc10a8
[gaim-migrate @ 17935]
Evan Schoenberg <evands@pidgin.im>
parents:
15205
diff
changeset
|
103 | { |
| 15884 | 104 | PURPLE_NOTIFY_USER_INFO_ENTRY_PAIR = 0, |
| 105 | PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK, | |
| 106 | PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER | |
| 107 | } PurpleNotifyUserInfoEntryType; | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
108 | |
| 11359 | 109 | /** |
| 110 | * Single column of a search result. | |
| 111 | */ | |
| 112 | typedef struct | |
| 113 | { | |
| 114 | char *title; /**< Title of the column. */ | |
| 115 | ||
| 15884 | 116 | } PurpleNotifySearchColumn; |
| 11359 | 117 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
118 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
119 | /** |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
120 | * Callback for a button in a search result. |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
121 | * |
| 15884 | 122 | * @param c the PurpleConnection passed to purple_notify_searchresults |
| 13641 | 123 | * @param row the contents of the selected row |
| 124 | * @param user_data User defined data. | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
125 | */ |
| 15884 | 126 | typedef void (*PurpleNotifySearchResultsCallback)(PurpleConnection *c, GList *row, |
| 13641 | 127 | gpointer user_data); |
| 11359 | 128 | |
| 129 | ||
| 130 | /** | |
| 131 | * Definition of a button. | |
| 132 | */ | |
| 133 | typedef struct | |
| 134 | { | |
| 15884 | 135 | PurpleNotifySearchButtonType type; |
| 136 | PurpleNotifySearchResultsCallback callback; /**< Function to be called when clicked. */ | |
| 137 | char *label; /**< only for PURPLE_NOTIFY_BUTTON_LABELED */ | |
| 138 | } PurpleNotifySearchButton; | |
| 11359 | 139 | |
| 140 | ||
| 141 | /** | |
| 5437 | 142 | * Notification UI operations. |
| 143 | */ | |
| 144 | typedef struct | |
| 145 | { | |
| 15884 | 146 | void *(*notify_message)(PurpleNotifyMsgType type, const char *title, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
147 | const char *primary, const char *secondary); |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
148 | |
| 15884 | 149 | void *(*notify_email)(PurpleConnection *gc, |
|
12647
b00d9913117e
[gaim-migrate @ 14985]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12625
diff
changeset
|
150 | const char *subject, const char *from, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
151 | const char *to, const char *url); |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
152 | |
| 15884 | 153 | void *(*notify_emails)(PurpleConnection *gc, |
|
12647
b00d9913117e
[gaim-migrate @ 14985]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12625
diff
changeset
|
154 | size_t count, gboolean detailed, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
155 | const char **subjects, const char **froms, |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
156 | const char **tos, const char **urls); |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
157 | |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
158 | void *(*notify_formatted)(const char *title, const char *primary, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
159 | const char *secondary, const char *text); |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
160 | |
| 15884 | 161 | void *(*notify_searchresults)(PurpleConnection *gc, const char *title, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
162 | const char *primary, const char *secondary, |
| 15884 | 163 | PurpleNotifySearchResults *results, gpointer user_data); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
164 | |
| 15884 | 165 | void (*notify_searchresults_new_rows)(PurpleConnection *gc, |
| 166 | PurpleNotifySearchResults *results, | |
| 13641 | 167 | void *data); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
168 | |
| 15884 | 169 | void *(*notify_userinfo)(PurpleConnection *gc, const char *who, |
| 170 | PurpleNotifyUserInfo *user_info); | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
171 | |
|
10240
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
172 | void *(*notify_uri)(const char *uri); |
| 5437 | 173 | |
| 15884 | 174 | void (*close_notify)(PurpleNotifyType type, void *ui_handle); |
| 5437 | 175 | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15997
diff
changeset
|
176 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15997
diff
changeset
|
177 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15997
diff
changeset
|
178 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15997
diff
changeset
|
179 | void (*_purple_reserved4)(void); |
| 15884 | 180 | } PurpleNotifyUiOps; |
| 5437 | 181 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
182 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
183 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
184 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
185 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
186 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
187 | |
| 5437 | 188 | /**************************************************************************/ |
| 11359 | 189 | /** Search results notification API */ |
| 190 | /**************************************************************************/ | |
| 191 | /*@{*/ | |
| 192 | ||
| 193 | /** | |
| 194 | * Displays results from a buddy search. This can be, for example, | |
| 195 | * a window with a list of all found buddies, where you are given the | |
| 196 | * option of adding buddies to your buddy list. | |
| 197 | * | |
| 15884 | 198 | * @param gc The PurpleConnection handle associated with the information. |
| 11359 | 199 | * @param title The title of the message. If this is NULL, the title |
|
12259
23c20f8ffbef
[gaim-migrate @ 14561]
Richard Laager <rlaager@pidgin.im>
parents:
12257
diff
changeset
|
200 | * will be "Search Results." |
| 11359 | 201 | * @param primary The main point of the message. |
| 202 | * @param secondary The secondary information. | |
| 15884 | 203 | * @param results The PurpleNotifySearchResults instance. |
| 11359 | 204 | * @param cb The callback to call when the user closes |
| 205 | * the notification. | |
| 13641 | 206 | * @param user_data The data to pass to the close callback and any other |
| 207 | * callback associated with a button. | |
| 11359 | 208 | * |
| 209 | * @return A UI-specific handle. | |
| 210 | */ | |
| 15884 | 211 | void *purple_notify_searchresults(PurpleConnection *gc, const char *title, |
| 11359 | 212 | const char *primary, const char *secondary, |
| 15884 | 213 | PurpleNotifySearchResults *results, PurpleNotifyCloseCallback cb, |
| 12220 | 214 | gpointer user_data); |
| 11359 | 215 | |
| 15884 | 216 | void purple_notify_searchresults_free(PurpleNotifySearchResults *results); |
| 11359 | 217 | |
| 218 | /** | |
| 219 | * Replace old rows with the new. Reuse an existing window. | |
| 220 | * | |
| 15884 | 221 | * @param gc The PurpleConnection structure. |
| 222 | * @param results The PurpleNotifySearchResults structure. | |
| 223 | * @param data Data returned by the purple_notify_searchresults(). | |
| 11359 | 224 | */ |
| 15884 | 225 | void purple_notify_searchresults_new_rows(PurpleConnection *gc, |
| 226 | PurpleNotifySearchResults *results, | |
| 13641 | 227 | void *data); |
| 11359 | 228 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
229 | |
| 11359 | 230 | /** |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
231 | * Adds a stock button that will be displayed in the search results dialog. |
| 11359 | 232 | * |
| 233 | * @param results The search results object. | |
| 234 | * @param type Type of the button. (TODO: Only one button of a given type can be displayed.) | |
| 235 | * @param cb Function that will be called on the click event. | |
| 236 | */ | |
| 15884 | 237 | void purple_notify_searchresults_button_add(PurpleNotifySearchResults *results, |
| 238 | PurpleNotifySearchButtonType type, | |
| 239 | PurpleNotifySearchResultsCallback cb); | |
| 11359 | 240 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
241 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
242 | /** |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
243 | * Adds a plain labelled button that will be displayed in the search results dialog. |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
244 | * |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
245 | * @param results The search results object |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
246 | * @param label The label to display |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
247 | * @param cb Function that will be called on the click event |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
248 | */ |
| 15884 | 249 | void purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *results, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
250 | const char *label, |
| 15884 | 251 | PurpleNotifySearchResultsCallback cb); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
252 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
253 | |
| 11359 | 254 | /** |
| 255 | * Returns a newly created search results object. | |
| 256 | * | |
| 257 | * @return The new search results object. | |
| 258 | */ | |
| 15884 | 259 | PurpleNotifySearchResults *purple_notify_searchresults_new(void); |
| 11359 | 260 | |
| 261 | /** | |
| 262 | * Returns a newly created search result column object. | |
| 263 | * | |
| 264 | * @param title Title of the column. NOTE: Title will get g_strdup()ed. | |
| 265 | * | |
| 266 | * @return The new search column object. | |
| 267 | */ | |
| 15884 | 268 | PurpleNotifySearchColumn *purple_notify_searchresults_column_new(const char *title); |
| 11359 | 269 | |
| 270 | /** | |
| 271 | * Adds a new column to the search result object. | |
| 272 | * | |
| 273 | * @param results The result object to which the column will be added. | |
|
11501
a8fc92026134
[gaim-migrate @ 13746]
Richard Laager <rlaager@pidgin.im>
parents:
11359
diff
changeset
|
274 | * @param column The column that will be added to the result object. |
| 11359 | 275 | */ |
| 15884 | 276 | void purple_notify_searchresults_column_add(PurpleNotifySearchResults *results, |
| 277 | PurpleNotifySearchColumn *column); | |
| 11359 | 278 | |
| 279 | /** | |
| 280 | * Adds a new row of the results to the search results object. | |
| 281 | * | |
| 282 | * @param results The search results object. | |
| 283 | * @param row The row of the results. | |
| 284 | */ | |
| 15884 | 285 | void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results, |
| 11359 | 286 | GList *row); |
| 287 | ||
| 288 | /** | |
| 289 | * Returns a number of the rows in the search results object. | |
| 290 | * | |
| 291 | * @param results The search results object. | |
| 292 | * | |
| 12257 | 293 | * @return Number of the result rows. |
| 11359 | 294 | */ |
| 15884 | 295 | guint purple_notify_searchresults_get_rows_count(PurpleNotifySearchResults *results); |
| 11359 | 296 | |
| 297 | /** | |
| 298 | * Returns a number of the columns in the search results object. | |
| 299 | * | |
| 300 | * @param results The search results object. | |
| 301 | * | |
| 12257 | 302 | * @return Number of the columns. |
| 11359 | 303 | */ |
| 15884 | 304 | guint purple_notify_searchresults_get_columns_count(PurpleNotifySearchResults *results); |
| 11359 | 305 | |
| 306 | /** | |
| 307 | * Returns a row of the results from the search results object. | |
| 308 | * | |
| 309 | * @param results The search results object. | |
| 310 | * @param row_id Index of the row to be returned. | |
| 311 | * | |
| 312 | * @return Row of the results. | |
| 313 | */ | |
| 15884 | 314 | GList *purple_notify_searchresults_row_get(PurpleNotifySearchResults *results, |
| 11359 | 315 | unsigned int row_id); |
| 316 | ||
| 317 | /** | |
| 318 | * Returns a title of the search results object's column. | |
| 319 | * | |
| 320 | * @param results The search results object. | |
| 321 | * @param column_id Index of the column. | |
| 322 | * | |
| 323 | * @return Title of the column. | |
| 324 | */ | |
| 15884 | 325 | char *purple_notify_searchresults_column_get_title(PurpleNotifySearchResults *results, |
| 11359 | 326 | unsigned int column_id); |
| 327 | ||
| 328 | /*@}*/ | |
| 329 | ||
| 330 | /**************************************************************************/ | |
| 5437 | 331 | /** @name Notification API */ |
| 332 | /**************************************************************************/ | |
| 333 | /*@{*/ | |
| 334 | ||
| 335 | /** | |
| 336 | * Displays a notification message to the user. | |
| 337 | * | |
| 338 | * @param handle The plugin or connection handle. | |
| 339 | * @param type The notification type. | |
| 340 | * @param title The title of the message. | |
| 341 | * @param primary The main point of the message. | |
| 342 | * @param secondary The secondary information. | |
| 343 | * @param cb The callback to call when the user closes | |
| 344 | * the notification. | |
| 345 | * @param user_data The data to pass to the callback. | |
| 346 | * | |
| 347 | * @return A UI-specific handle. | |
| 348 | */ | |
| 15884 | 349 | void *purple_notify_message(void *handle, PurpleNotifyMsgType type, |
| 5437 | 350 | const char *title, const char *primary, |
| 15884 | 351 | const char *secondary, PurpleNotifyCloseCallback cb, |
| 12220 | 352 | gpointer user_data); |
| 5437 | 353 | |
| 354 | /** | |
| 355 | * Displays a single e-mail notification to the user. | |
| 356 | * | |
| 357 | * @param handle The plugin or connection handle. | |
| 358 | * @param subject The subject of the e-mail. | |
| 359 | * @param from The from address. | |
| 360 | * @param to The destination address. | |
| 361 | * @param url The URL where the message can be read. | |
| 362 | * @param cb The callback to call when the user closes | |
| 363 | * the notification. | |
| 364 | * @param user_data The data to pass to the callback. | |
| 365 | * | |
| 366 | * @return A UI-specific handle. | |
| 367 | */ | |
| 15884 | 368 | void *purple_notify_email(void *handle, const char *subject, |
| 5437 | 369 | const char *from, const char *to, |
| 15884 | 370 | const char *url, PurpleNotifyCloseCallback cb, |
| 12220 | 371 | gpointer user_data); |
| 5437 | 372 | |
| 373 | /** | |
| 374 | * Displays a notification for multiple e-mails to the user. | |
| 375 | * | |
| 376 | * @param handle The plugin or connection handle. | |
| 377 | * @param count The number of e-mails. | |
|
5522
faa69c8f503d
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
378 | * @param detailed @c TRUE if there is information for each e-mail in the |
|
faa69c8f503d
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
379 | * arrays. |
| 5437 | 380 | * @param subjects The array of subjects. |
| 381 | * @param froms The array of from addresses. | |
| 382 | * @param tos The array of destination addresses. | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
383 | * @param urls The URLs where the messages can be read. |
| 5437 | 384 | * @param cb The callback to call when the user closes |
| 385 | * the notification. | |
| 386 | * @param user_data The data to pass to the callback. | |
| 387 | * | |
| 388 | * @return A UI-specific handle. | |
| 389 | */ | |
| 15884 | 390 | void *purple_notify_emails(void *handle, size_t count, gboolean detailed, |
| 5437 | 391 | const char **subjects, const char **froms, |
| 392 | const char **tos, const char **urls, | |
| 15884 | 393 | PurpleNotifyCloseCallback cb, gpointer user_data); |
| 5437 | 394 | |
| 395 | /** | |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
396 | * Displays a notification with formatted text. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
397 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
398 | * The text is essentially a stripped-down format of HTML, the same that |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
399 | * IMs may send. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
400 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
401 | * @param handle The plugin or connection handle. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
402 | * @param title The title of the message. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
403 | * @param primary The main point of the message. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
404 | * @param secondary The secondary information. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
405 | * @param text The formatted text. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
406 | * @param cb The callback to call when the user closes |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
407 | * the notification. |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
408 | * @param user_data The data to pass to the callback. |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
409 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
410 | * @return A UI-specific handle. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
411 | */ |
| 15884 | 412 | void *purple_notify_formatted(void *handle, const char *title, |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
413 | const char *primary, const char *secondary, |
| 15884 | 414 | const char *text, PurpleNotifyCloseCallback cb, gpointer user_data); |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
415 | |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
416 | /** |
|
9800
1115830011b8
[gaim-migrate @ 10668]
Mark Doliner <markdoliner@pidgin.im>
parents:
9797
diff
changeset
|
417 | * Displays user information with formatted text, passing information giving |
|
1115830011b8
[gaim-migrate @ 10668]
Mark Doliner <markdoliner@pidgin.im>
parents:
9797
diff
changeset
|
418 | * the connection and username from which the user information came. |
| 9797 | 419 | * |
| 420 | * The text is essentially a stripped-down format of HTML, the same that | |
| 421 | * IMs may send. | |
| 422 | * | |
| 15884 | 423 | * @param gc The PurpleConnection handle associated with the information. |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
424 | * @param who The username associated with the information. |
| 15884 | 425 | * @param user_info The PurpleNotifyUserInfo which contains the information |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
426 | * @param cb The callback to call when the user closes |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
427 | * the notification. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
428 | * @param user_data The data to pass to the callback. |
| 9797 | 429 | * |
| 430 | * @return A UI-specific handle. | |
| 431 | */ | |
| 15884 | 432 | void *purple_notify_userinfo(PurpleConnection *gc, const char *who, |
| 433 | PurpleNotifyUserInfo *user_info, PurpleNotifyCloseCallback cb, | |
| 12220 | 434 | gpointer user_data); |
| 9797 | 435 | |
| 436 | /** | |
| 15884 | 437 | * Create a new PurpleNotifyUserInfo which is suitable for passing to purple_notify_userinfo() |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
438 | * |
| 15884 | 439 | * @return A new PurpleNotifyUserInfo, which the caller must destroy when done |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
440 | */ |
| 15884 | 441 | PurpleNotifyUserInfo *purple_notify_user_info_new(void); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
442 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
443 | /** |
| 15884 | 444 | * Destroy a PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
445 | * |
| 15884 | 446 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
447 | */ |
| 15884 | 448 | void purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
449 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
450 | /** |
| 15884 | 451 | * Retrieve the array of PurpleNotifyUserInfoEntry objects from a PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
452 | * |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
453 | * This GList may be manipulated directly with normal GList functions such as g_list_insert(). Only |
| 15884 | 454 | * PurpleNotifyUserInfoEntry are allowed in the list. If a PurpleNotifyUserInfoEntry item is added to the list, |
| 455 | * it should not be g_free()'d by the caller; PurpleNotifyUserInfo will g_free it when destroyed. | |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
456 | * |
| 15884 | 457 | * To remove a PurpleNotifyUserInfoEntry, use purple_notify_user_info_remove_entry(). Do not use the GList directly. |
|
15328
113b0b520010
[gaim-migrate @ 18056]
Evan Schoenberg <evands@pidgin.im>
parents:
15325
diff
changeset
|
458 | * |
| 15884 | 459 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
460 | * |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18122
diff
changeset
|
461 | * @constreturn A GList of PurpleNotifyUserInfoEntry objects |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
462 | */ |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
463 | GList *purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
464 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
465 | /** |
| 15884 | 466 | * Create a textual representation of a PurpleNotifyUserInfo, separating entries with newline |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
467 | * |
| 15884 | 468 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
469 | * @param newline The separation character |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
470 | */ |
| 15884 | 471 | char *purple_notify_user_info_get_text_with_newline(PurpleNotifyUserInfo *user_info, const char *newline); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
472 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
473 | /** |
| 15884 | 474 | * Add a label/value pair to a PurpleNotifyUserInfo object. |
| 475 | * PurpleNotifyUserInfo keeps track of the order in which pairs are added. | |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
476 | * |
| 15884 | 477 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
478 | * @param label A label, which for example might be displayed by a UI with a colon after it ("Status:"). Do not include a colon. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
479 | * If NULL, value will be displayed without a label. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
480 | * @param value The value, which might be displayed by a UI after the label. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
481 | * If NULL, label will still be displayed; the UI should then treat label as independent |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
482 | * and not include a colon if it would otherwise. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
483 | */ |
| 15884 | 484 | void purple_notify_user_info_add_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
485 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
486 | /** |
| 15884 | 487 | * Prepend a label/value pair to a PurpleNotifyUserInfo object |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
488 | * |
| 15884 | 489 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
490 | * @param label A label, which for example might be displayed by a UI with a colon after it ("Status:"). Do not include a colon. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
491 | * If NULL, value will be displayed without a label. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
492 | * @param value The value, which might be displayed by a UI after the label. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
493 | * If NULL, label will still be displayed; the UI should then treat label as independent |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
494 | * and not include a colon if it would otherwise. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
495 | */ |
| 15884 | 496 | void purple_notify_user_info_prepend_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
497 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
498 | /** |
| 15884 | 499 | * Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object |
|
15328
113b0b520010
[gaim-migrate @ 18056]
Evan Schoenberg <evands@pidgin.im>
parents:
15325
diff
changeset
|
500 | * |
| 15884 | 501 | * @param user_info The PurpleNotifyUserInfo |
| 502 | * @param user_info_entry The PurpleNotifyUserInfoEntry | |
|
15328
113b0b520010
[gaim-migrate @ 18056]
Evan Schoenberg <evands@pidgin.im>
parents:
15325
diff
changeset
|
503 | */ |
| 15884 | 504 | void purple_notify_user_info_remove_entry(PurpleNotifyUserInfo *user_info, PurpleNotifyUserInfoEntry *user_info_entry); |
|
15328
113b0b520010
[gaim-migrate @ 18056]
Evan Schoenberg <evands@pidgin.im>
parents:
15325
diff
changeset
|
505 | /** |
| 15884 | 506 | * Create a new PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
507 | * |
| 15884 | 508 | * If added to a PurpleNotifyUserInfo object, this should not be free()'d, as PurpleNotifyUserInfo will do so |
| 509 | * when destroyed. purple_notify_user_info_add_pair() and purple_notify_user_info_prepend_pair() are convenience | |
| 510 | * methods for creating entries and adding them to a PurpleNotifyUserInfo. | |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
511 | * |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
512 | * @param label A label, which for example might be displayed by a UI with a colon after it ("Status:"). Do not include a colon. |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
513 | * If NULL, value will be displayed without a label. |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
514 | * @param value The value, which might be displayed by a UI after the label. |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
515 | * If NULL, label will still be displayed; the UI should then treat label as independent |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
516 | * and not include a colon if it would otherwise. |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
517 | * |
| 15884 | 518 | * @result A new PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
519 | */ |
| 15884 | 520 | PurpleNotifyUserInfoEntry *purple_notify_user_info_entry_new(const char *label, const char *value); |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
521 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
522 | /** |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
523 | * Add a section break. A UI might display this as a horizontal line. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
524 | * |
| 15884 | 525 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
526 | */ |
| 15884 | 527 | void purple_notify_user_info_add_section_break(PurpleNotifyUserInfo *user_info); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
528 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
529 | /** |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
530 | * Add a section header. A UI might display this in a different font from other text. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
531 | * |
| 15884 | 532 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
533 | * @param label The name of the section |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
534 | */ |
| 15884 | 535 | void purple_notify_user_info_add_section_header(PurpleNotifyUserInfo *user_info, const char *label); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
536 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
537 | /** |
| 15884 | 538 | * Remove the last item which was added to a PurpleNotifyUserInfo. This could be used to remove a section header which is not needed. |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
539 | */ |
| 15884 | 540 | void purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
541 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
542 | /** |
| 15884 | 543 | * Get the label for a PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
544 | * |
| 15884 | 545 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
546 | * |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
547 | * @result The label |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
548 | */ |
| 15884 | 549 | gchar *purple_notify_user_info_entry_get_label(PurpleNotifyUserInfoEntry *user_info_entry); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
550 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
551 | /** |
| 15884 | 552 | * Set the label for a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
553 | * |
| 15884 | 554 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
555 | * @param label The label |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
556 | */ |
| 15884 | 557 | void purple_notify_user_info_entry_set_label(PurpleNotifyUserInfoEntry *user_info_entry, const char *label); |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
558 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
559 | /** |
| 15884 | 560 | * Get the value for a PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
561 | * |
| 15884 | 562 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
563 | * |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
564 | * @result The value |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
565 | */ |
| 15884 | 566 | gchar *purple_notify_user_info_entry_get_value(PurpleNotifyUserInfoEntry *user_info_entry); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
567 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
568 | /** |
| 15884 | 569 | * Set the value for a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
570 | * |
| 15884 | 571 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
572 | * @param value The value |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
573 | */ |
| 15884 | 574 | void purple_notify_user_info_entry_set_value(PurpleNotifyUserInfoEntry *user_info_entry, const char *value); |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
575 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
576 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
577 | /** |
| 15884 | 578 | * Get the type of a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
579 | * |
| 15884 | 580 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
581 | * |
| 15884 | 582 | * @result The PurpleNotifyUserInfoEntryType |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
583 | */ |
| 15884 | 584 | PurpleNotifyUserInfoEntryType purple_notify_user_info_entry_get_type(PurpleNotifyUserInfoEntry *user_info_entry); |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
585 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
586 | /** |
| 15884 | 587 | * Set the type of a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
588 | * |
| 15884 | 589 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15997
ff97c5f69196
A little doxygen love and some tiny gaim->purpleisms
Mark Doliner <markdoliner@pidgin.im>
parents:
15884
diff
changeset
|
590 | * @param type The PurpleNotifyUserInfoEntryType |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
591 | */ |
| 15884 | 592 | void purple_notify_user_info_entry_set_type(PurpleNotifyUserInfoEntry *user_info_entry, |
| 593 | PurpleNotifyUserInfoEntryType type); | |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
594 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
595 | /** |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
596 | * Opens a URI or somehow presents it to the user. |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
597 | * |
|
10240
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
598 | * @param handle The plugin or connection handle. |
|
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
599 | * @param uri The URI to display or go to. |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
600 | * |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
601 | * @return A UI-specific handle, if any. This may only be presented if |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
602 | * the UI code displays a dialog instead of a webpage, or something |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
603 | * similar. |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
604 | */ |
| 15884 | 605 | void *purple_notify_uri(void *handle, const char *uri); |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
606 | |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
607 | /** |
| 5437 | 608 | * Closes a notification. |
| 609 | * | |
| 610 | * This should be used only by the UI operation functions and part of the | |
| 611 | * core. | |
| 612 | * | |
|
5476
6f863ea68018
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
613 | * @param type The notification type. |
|
6f863ea68018
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
614 | * @param ui_handle The notification UI handle. |
| 5437 | 615 | */ |
| 15884 | 616 | void purple_notify_close(PurpleNotifyType type, void *ui_handle); |
| 5437 | 617 | |
| 618 | /** | |
| 619 | * Closes all notifications registered with the specified handle. | |
| 620 | * | |
| 621 | * @param handle The handle. | |
| 622 | */ | |
| 15884 | 623 | void purple_notify_close_with_handle(void *handle); |
| 5437 | 624 | |
| 625 | /** | |
| 15884 | 626 | * A wrapper for purple_notify_message that displays an information message. |
| 5437 | 627 | */ |
| 15884 | 628 | #define purple_notify_info(handle, title, primary, secondary) \ |
| 629 | purple_notify_message((handle), PURPLE_NOTIFY_MSG_INFO, (title), \ | |
| 5437 | 630 | (primary), (secondary), NULL, NULL) |
| 631 | ||
| 632 | /** | |
| 15884 | 633 | * A wrapper for purple_notify_message that displays a warning message. |
| 5437 | 634 | */ |
| 15884 | 635 | #define purple_notify_warning(handle, title, primary, secondary) \ |
| 636 | purple_notify_message((handle), PURPLE_NOTIFY_MSG_WARNING, (title), \ | |
| 5437 | 637 | (primary), (secondary), NULL, NULL) |
| 638 | ||
| 639 | /** | |
| 15884 | 640 | * A wrapper for purple_notify_message that displays an error message. |
| 5437 | 641 | */ |
| 15884 | 642 | #define purple_notify_error(handle, title, primary, secondary) \ |
| 643 | purple_notify_message((handle), PURPLE_NOTIFY_MSG_ERROR, (title), \ | |
| 5437 | 644 | (primary), (secondary), NULL, NULL) |
| 645 | ||
| 646 | /*@}*/ | |
| 647 | ||
| 648 | /**************************************************************************/ | |
| 10566 | 649 | /** @name UI Registration Functions */ |
| 5437 | 650 | /**************************************************************************/ |
| 651 | /*@{*/ | |
| 652 | ||
| 653 | /** | |
| 654 | * Sets the UI operations structure to be used when displaying a | |
| 655 | * notification. | |
| 656 | * | |
| 657 | * @param ops The UI operations structure. | |
| 658 | */ | |
| 15884 | 659 | void purple_notify_set_ui_ops(PurpleNotifyUiOps *ops); |
| 5437 | 660 | |
| 661 | /** | |
| 662 | * Returns the UI operations structure to be used when displaying a | |
| 663 | * notification. | |
| 664 | * | |
|
6467
754d318cac4a
[gaim-migrate @ 6976]
Christian Hammond <chipx86@chipx86.com>
parents:
6465
diff
changeset
|
665 | * @return The UI operations structure. |
| 5437 | 666 | */ |
| 15884 | 667 | PurpleNotifyUiOps *purple_notify_get_ui_ops(void); |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
668 | |
|
5497
da3c08f3af25
[gaim-migrate @ 5893]
Mark Doliner <markdoliner@pidgin.im>
parents:
5476
diff
changeset
|
669 | /*@}*/ |
| 5437 | 670 | |
| 12129 | 671 | /**************************************************************************/ |
| 672 | /** @name Notify Subsystem */ | |
| 673 | /**************************************************************************/ | |
| 674 | /*@{*/ | |
| 675 | ||
| 676 | /** | |
| 677 | * Returns the notify subsystem handle. | |
| 678 | * | |
| 679 | * @return The notify subsystem handle. | |
| 680 | */ | |
| 15884 | 681 | void *purple_notify_get_handle(void); |
| 12129 | 682 | |
| 683 | /** | |
| 684 | * Initializes the notify subsystem. | |
| 685 | */ | |
| 15884 | 686 | void purple_notify_init(void); |
| 12129 | 687 | |
| 688 | /** | |
| 689 | * Uninitializes the notify subsystem. | |
| 690 | */ | |
| 15884 | 691 | void purple_notify_uninit(void); |
| 12129 | 692 | |
| 693 | /*@}*/ | |
| 694 | ||
| 695 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
696 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
697 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
698 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
699 | |
| 15884 | 700 | #endif /* _PURPLE_NOTIFY_H_ */ |