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