Mon, 19 Mar 2007 10:03:36 +0000
who knew that --disable-plugins still worked?! Also, some completely untested support for aim:buddyicon, which I'll look at more tomorrow
| 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 | |
| 15884 | 174 | } PurpleNotifyUiOps; |
| 5437 | 175 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
176 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
177 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
178 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
179 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
180 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
181 | |
| 5437 | 182 | /**************************************************************************/ |
| 11359 | 183 | /** Search results notification API */ |
| 184 | /**************************************************************************/ | |
| 185 | /*@{*/ | |
| 186 | ||
| 187 | /** | |
| 188 | * Displays results from a buddy search. This can be, for example, | |
| 189 | * a window with a list of all found buddies, where you are given the | |
| 190 | * option of adding buddies to your buddy list. | |
| 191 | * | |
| 15884 | 192 | * @param gc The PurpleConnection handle associated with the information. |
| 11359 | 193 | * @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
|
194 | * will be "Search Results." |
| 11359 | 195 | * @param primary The main point of the message. |
| 196 | * @param secondary The secondary information. | |
| 15884 | 197 | * @param results The PurpleNotifySearchResults instance. |
| 11359 | 198 | * @param cb The callback to call when the user closes |
| 199 | * the notification. | |
| 13641 | 200 | * @param user_data The data to pass to the close callback and any other |
| 201 | * callback associated with a button. | |
| 11359 | 202 | * |
| 203 | * @return A UI-specific handle. | |
| 204 | */ | |
| 15884 | 205 | void *purple_notify_searchresults(PurpleConnection *gc, const char *title, |
| 11359 | 206 | const char *primary, const char *secondary, |
| 15884 | 207 | PurpleNotifySearchResults *results, PurpleNotifyCloseCallback cb, |
| 12220 | 208 | gpointer user_data); |
| 11359 | 209 | |
| 15884 | 210 | void purple_notify_searchresults_free(PurpleNotifySearchResults *results); |
| 11359 | 211 | |
| 212 | /** | |
| 213 | * Replace old rows with the new. Reuse an existing window. | |
| 214 | * | |
| 15884 | 215 | * @param gc The PurpleConnection structure. |
| 216 | * @param results The PurpleNotifySearchResults structure. | |
| 217 | * @param data Data returned by the purple_notify_searchresults(). | |
| 11359 | 218 | */ |
| 15884 | 219 | void purple_notify_searchresults_new_rows(PurpleConnection *gc, |
| 220 | PurpleNotifySearchResults *results, | |
| 13641 | 221 | void *data); |
| 11359 | 222 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
223 | |
| 11359 | 224 | /** |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
225 | * Adds a stock button that will be displayed in the search results dialog. |
| 11359 | 226 | * |
| 227 | * @param results The search results object. | |
| 228 | * @param type Type of the button. (TODO: Only one button of a given type can be displayed.) | |
| 229 | * @param cb Function that will be called on the click event. | |
| 230 | */ | |
| 15884 | 231 | void purple_notify_searchresults_button_add(PurpleNotifySearchResults *results, |
| 232 | PurpleNotifySearchButtonType type, | |
| 233 | PurpleNotifySearchResultsCallback cb); | |
| 11359 | 234 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
235 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
236 | /** |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
237 | * 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
|
238 | * |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
239 | * @param results The search results object |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
240 | * @param label The label to display |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
241 | * @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
|
242 | */ |
| 15884 | 243 | void purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *results, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
244 | const char *label, |
| 15884 | 245 | PurpleNotifySearchResultsCallback cb); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
246 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
247 | |
| 11359 | 248 | /** |
| 249 | * Returns a newly created search results object. | |
| 250 | * | |
| 251 | * @return The new search results object. | |
| 252 | */ | |
| 15884 | 253 | PurpleNotifySearchResults *purple_notify_searchresults_new(void); |
| 11359 | 254 | |
| 255 | /** | |
| 256 | * Returns a newly created search result column object. | |
| 257 | * | |
| 258 | * @param title Title of the column. NOTE: Title will get g_strdup()ed. | |
| 259 | * | |
| 260 | * @return The new search column object. | |
| 261 | */ | |
| 15884 | 262 | PurpleNotifySearchColumn *purple_notify_searchresults_column_new(const char *title); |
| 11359 | 263 | |
| 264 | /** | |
| 265 | * Adds a new column to the search result object. | |
| 266 | * | |
| 267 | * @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
|
268 | * @param column The column that will be added to the result object. |
| 11359 | 269 | */ |
| 15884 | 270 | void purple_notify_searchresults_column_add(PurpleNotifySearchResults *results, |
| 271 | PurpleNotifySearchColumn *column); | |
| 11359 | 272 | |
| 273 | /** | |
| 274 | * Adds a new row of the results to the search results object. | |
| 275 | * | |
| 276 | * @param results The search results object. | |
| 277 | * @param row The row of the results. | |
| 278 | */ | |
| 15884 | 279 | void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results, |
| 11359 | 280 | GList *row); |
| 281 | ||
| 282 | /** | |
| 283 | * Returns a number of the rows in the search results object. | |
| 284 | * | |
| 285 | * @param results The search results object. | |
| 286 | * | |
| 12257 | 287 | * @return Number of the result rows. |
| 11359 | 288 | */ |
| 15884 | 289 | guint purple_notify_searchresults_get_rows_count(PurpleNotifySearchResults *results); |
| 11359 | 290 | |
| 291 | /** | |
| 292 | * Returns a number of the columns in the search results object. | |
| 293 | * | |
| 294 | * @param results The search results object. | |
| 295 | * | |
| 12257 | 296 | * @return Number of the columns. |
| 11359 | 297 | */ |
| 15884 | 298 | guint purple_notify_searchresults_get_columns_count(PurpleNotifySearchResults *results); |
| 11359 | 299 | |
| 300 | /** | |
| 301 | * Returns a row of the results from the search results object. | |
| 302 | * | |
| 303 | * @param results The search results object. | |
| 304 | * @param row_id Index of the row to be returned. | |
| 305 | * | |
| 306 | * @return Row of the results. | |
| 307 | */ | |
| 15884 | 308 | GList *purple_notify_searchresults_row_get(PurpleNotifySearchResults *results, |
| 11359 | 309 | unsigned int row_id); |
| 310 | ||
| 311 | /** | |
| 312 | * Returns a title of the search results object's column. | |
| 313 | * | |
| 314 | * @param results The search results object. | |
| 315 | * @param column_id Index of the column. | |
| 316 | * | |
| 317 | * @return Title of the column. | |
| 318 | */ | |
| 15884 | 319 | char *purple_notify_searchresults_column_get_title(PurpleNotifySearchResults *results, |
| 11359 | 320 | unsigned int column_id); |
| 321 | ||
| 322 | /*@}*/ | |
| 323 | ||
| 324 | /**************************************************************************/ | |
| 5437 | 325 | /** @name Notification API */ |
| 326 | /**************************************************************************/ | |
| 327 | /*@{*/ | |
| 328 | ||
| 329 | /** | |
| 330 | * Displays a notification message to the user. | |
| 331 | * | |
| 332 | * @param handle The plugin or connection handle. | |
| 333 | * @param type The notification type. | |
| 334 | * @param title The title of the message. | |
| 335 | * @param primary The main point of the message. | |
| 336 | * @param secondary The secondary information. | |
| 337 | * @param cb The callback to call when the user closes | |
| 338 | * the notification. | |
| 339 | * @param user_data The data to pass to the callback. | |
| 340 | * | |
| 341 | * @return A UI-specific handle. | |
| 342 | */ | |
| 15884 | 343 | void *purple_notify_message(void *handle, PurpleNotifyMsgType type, |
| 5437 | 344 | const char *title, const char *primary, |
| 15884 | 345 | const char *secondary, PurpleNotifyCloseCallback cb, |
| 12220 | 346 | gpointer user_data); |
| 5437 | 347 | |
| 348 | /** | |
| 349 | * Displays a single e-mail notification to the user. | |
| 350 | * | |
| 351 | * @param handle The plugin or connection handle. | |
| 352 | * @param subject The subject of the e-mail. | |
| 353 | * @param from The from address. | |
| 354 | * @param to The destination address. | |
| 355 | * @param url The URL where the message can be read. | |
| 356 | * @param cb The callback to call when the user closes | |
| 357 | * the notification. | |
| 358 | * @param user_data The data to pass to the callback. | |
| 359 | * | |
| 360 | * @return A UI-specific handle. | |
| 361 | */ | |
| 15884 | 362 | void *purple_notify_email(void *handle, const char *subject, |
| 5437 | 363 | const char *from, const char *to, |
| 15884 | 364 | const char *url, PurpleNotifyCloseCallback cb, |
| 12220 | 365 | gpointer user_data); |
| 5437 | 366 | |
| 367 | /** | |
| 368 | * Displays a notification for multiple e-mails to the user. | |
| 369 | * | |
| 370 | * @param handle The plugin or connection handle. | |
| 371 | * @param count The number of e-mails. | |
|
5522
faa69c8f503d
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
372 | * @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
|
373 | * arrays. |
| 5437 | 374 | * @param subjects The array of subjects. |
| 375 | * @param froms The array of from addresses. | |
| 376 | * @param tos The array of destination addresses. | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
377 | * @param urls The URLs where the messages can be read. |
| 5437 | 378 | * @param cb The callback to call when the user closes |
| 379 | * the notification. | |
| 380 | * @param user_data The data to pass to the callback. | |
| 381 | * | |
| 382 | * @return A UI-specific handle. | |
| 383 | */ | |
| 15884 | 384 | void *purple_notify_emails(void *handle, size_t count, gboolean detailed, |
| 5437 | 385 | const char **subjects, const char **froms, |
| 386 | const char **tos, const char **urls, | |
| 15884 | 387 | PurpleNotifyCloseCallback cb, gpointer user_data); |
| 5437 | 388 | |
| 389 | /** | |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
390 | * Displays a notification with formatted text. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
391 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
392 | * 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
|
393 | * IMs may send. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
394 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
395 | * @param handle The plugin or connection handle. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
396 | * @param title The title of the message. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
397 | * @param primary The main point of the message. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
398 | * @param secondary The secondary information. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
399 | * @param text The formatted text. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
400 | * @param cb The callback to call when the user closes |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
401 | * the notification. |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
402 | * @param user_data The data to pass to the callback. |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
403 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
404 | * @return A UI-specific handle. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
405 | */ |
| 15884 | 406 | void *purple_notify_formatted(void *handle, const char *title, |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
407 | const char *primary, const char *secondary, |
| 15884 | 408 | const char *text, PurpleNotifyCloseCallback cb, gpointer user_data); |
|
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 | /** |
|
9800
1115830011b8
[gaim-migrate @ 10668]
Mark Doliner <markdoliner@pidgin.im>
parents:
9797
diff
changeset
|
411 | * Displays user information with formatted text, passing information giving |
|
1115830011b8
[gaim-migrate @ 10668]
Mark Doliner <markdoliner@pidgin.im>
parents:
9797
diff
changeset
|
412 | * the connection and username from which the user information came. |
| 9797 | 413 | * |
| 414 | * The text is essentially a stripped-down format of HTML, the same that | |
| 415 | * IMs may send. | |
| 416 | * | |
| 15884 | 417 | * @param gc The PurpleConnection handle associated with the information. |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
418 | * @param who The username associated with the information. |
| 15884 | 419 | * @param user_info The PurpleNotifyUserInfo which contains the information |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
420 | * @param cb The callback to call when the user closes |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
421 | * the notification. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
422 | * @param user_data The data to pass to the callback. |
| 9797 | 423 | * |
| 424 | * @return A UI-specific handle. | |
| 425 | */ | |
| 15884 | 426 | void *purple_notify_userinfo(PurpleConnection *gc, const char *who, |
| 427 | PurpleNotifyUserInfo *user_info, PurpleNotifyCloseCallback cb, | |
| 12220 | 428 | gpointer user_data); |
| 9797 | 429 | |
| 430 | /** | |
| 15884 | 431 | * 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
|
432 | * |
| 15884 | 433 | * @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
|
434 | */ |
| 15884 | 435 | PurpleNotifyUserInfo *purple_notify_user_info_new(void); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
436 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
437 | /** |
| 15884 | 438 | * Destroy a PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
439 | * |
| 15884 | 440 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
441 | */ |
| 15884 | 442 | void purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
443 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
444 | /** |
| 15884 | 445 | * Retrieve the array of PurpleNotifyUserInfoEntry objects from a PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
446 | * |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
447 | * This GList may be manipulated directly with normal GList functions such as g_list_insert(). Only |
| 15884 | 448 | * PurpleNotifyUserInfoEntry are allowed in the list. If a PurpleNotifyUserInfoEntry item is added to the list, |
| 449 | * 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
|
450 | * |
| 15884 | 451 | * 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
|
452 | * |
| 15884 | 453 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
454 | * |
| 15884 | 455 | * @result A GList of PurpleNotifyUserInfoEntry objects |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
456 | */ |
| 15884 | 457 | GList *purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
458 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
459 | /** |
| 15884 | 460 | * 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
|
461 | * |
| 15884 | 462 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
463 | * @param newline The separation character |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
464 | */ |
| 15884 | 465 | 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
|
466 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
467 | /** |
| 15884 | 468 | * Add a label/value pair to a PurpleNotifyUserInfo object. |
| 469 | * 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
|
470 | * |
| 15884 | 471 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
472 | * @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
|
473 | * If NULL, value will be displayed without a label. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
474 | * @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
|
475 | * 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
|
476 | * and not include a colon if it would otherwise. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
477 | */ |
| 15884 | 478 | 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
|
479 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
480 | /** |
| 15884 | 481 | * Prepend a label/value pair to a PurpleNotifyUserInfo object |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
482 | * |
| 15884 | 483 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
484 | * @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
|
485 | * If NULL, value will be displayed without a label. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
486 | * @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
|
487 | * 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
|
488 | * and not include a colon if it would otherwise. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
489 | */ |
| 15884 | 490 | 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
|
491 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
492 | /** |
| 15884 | 493 | * Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object |
|
15328
113b0b520010
[gaim-migrate @ 18056]
Evan Schoenberg <evands@pidgin.im>
parents:
15325
diff
changeset
|
494 | * |
| 15884 | 495 | * @param user_info The PurpleNotifyUserInfo |
| 496 | * @param user_info_entry The PurpleNotifyUserInfoEntry | |
|
15328
113b0b520010
[gaim-migrate @ 18056]
Evan Schoenberg <evands@pidgin.im>
parents:
15325
diff
changeset
|
497 | */ |
| 15884 | 498 | 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
|
499 | /** |
| 15884 | 500 | * Create a new PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
501 | * |
| 15884 | 502 | * If added to a PurpleNotifyUserInfo object, this should not be free()'d, as PurpleNotifyUserInfo will do so |
| 503 | * when destroyed. purple_notify_user_info_add_pair() and purple_notify_user_info_prepend_pair() are convenience | |
| 504 | * methods for creating entries and adding them to a PurpleNotifyUserInfo. | |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
505 | * |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
506 | * @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
|
507 | * If NULL, value will be displayed without a label. |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
508 | * @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
|
509 | * 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
|
510 | * and not include a colon if it would otherwise. |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
511 | * |
| 15884 | 512 | * @result A new PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
513 | */ |
| 15884 | 514 | 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
|
515 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
516 | /** |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
517 | * 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
|
518 | * |
| 15884 | 519 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
520 | */ |
| 15884 | 521 | 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
|
522 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
523 | /** |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
524 | * 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
|
525 | * |
| 15884 | 526 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
527 | * @param label The name of the section |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
528 | */ |
| 15884 | 529 | 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
|
530 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
531 | /** |
| 15884 | 532 | * 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
|
533 | */ |
| 15884 | 534 | 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
|
535 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
536 | /** |
| 15884 | 537 | * Get the label for a PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
538 | * |
| 15884 | 539 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
540 | * |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
541 | * @result The label |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
542 | */ |
| 15884 | 543 | 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
|
544 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
545 | /** |
| 15884 | 546 | * Set the label for a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
547 | * |
| 15884 | 548 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
549 | * @param label The label |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
550 | */ |
| 15884 | 551 | 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
|
552 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
553 | /** |
| 15884 | 554 | * Get the value for a PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
555 | * |
| 15884 | 556 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
557 | * |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
558 | * @result The value |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
559 | */ |
| 15884 | 560 | 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
|
561 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
562 | /** |
| 15884 | 563 | * Set the value for a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
564 | * |
| 15884 | 565 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
566 | * @param value The value |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
567 | */ |
| 15884 | 568 | 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
|
569 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
570 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
571 | /** |
| 15884 | 572 | * Get the type of a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
573 | * |
| 15884 | 574 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
575 | * |
| 15884 | 576 | * @result The PurpleNotifyUserInfoEntryType |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
577 | */ |
| 15884 | 578 | 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
|
579 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
580 | /** |
| 15884 | 581 | * Set the type of a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
582 | * |
| 15884 | 583 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
| 584 | * @param The PurpleNotifyUserInfoEntryType | |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
585 | */ |
| 15884 | 586 | void purple_notify_user_info_entry_set_type(PurpleNotifyUserInfoEntry *user_info_entry, |
| 587 | PurpleNotifyUserInfoEntryType type); | |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
588 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
589 | /** |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
590 | * Opens a URI or somehow presents it to the user. |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
591 | * |
|
10240
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
592 | * @param handle The plugin or connection handle. |
|
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
593 | * @param uri The URI to display or go to. |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
594 | * |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
595 | * @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
|
596 | * 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
|
597 | * similar. |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
598 | */ |
| 15884 | 599 | void *purple_notify_uri(void *handle, const char *uri); |
|
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 | /** |
| 5437 | 602 | * Closes a notification. |
| 603 | * | |
| 604 | * This should be used only by the UI operation functions and part of the | |
| 605 | * core. | |
| 606 | * | |
|
5476
6f863ea68018
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
607 | * @param type The notification type. |
|
6f863ea68018
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
608 | * @param ui_handle The notification UI handle. |
| 5437 | 609 | */ |
| 15884 | 610 | void purple_notify_close(PurpleNotifyType type, void *ui_handle); |
| 5437 | 611 | |
| 612 | /** | |
| 613 | * Closes all notifications registered with the specified handle. | |
| 614 | * | |
| 615 | * @param handle The handle. | |
| 616 | */ | |
| 15884 | 617 | void purple_notify_close_with_handle(void *handle); |
| 5437 | 618 | |
| 619 | /** | |
| 15884 | 620 | * A wrapper for purple_notify_message that displays an information message. |
| 5437 | 621 | */ |
| 15884 | 622 | #define purple_notify_info(handle, title, primary, secondary) \ |
| 623 | purple_notify_message((handle), PURPLE_NOTIFY_MSG_INFO, (title), \ | |
| 5437 | 624 | (primary), (secondary), NULL, NULL) |
| 625 | ||
| 626 | /** | |
| 15884 | 627 | * A wrapper for purple_notify_message that displays a warning message. |
| 5437 | 628 | */ |
| 15884 | 629 | #define purple_notify_warning(handle, title, primary, secondary) \ |
| 630 | purple_notify_message((handle), PURPLE_NOTIFY_MSG_WARNING, (title), \ | |
| 5437 | 631 | (primary), (secondary), NULL, NULL) |
| 632 | ||
| 633 | /** | |
| 15884 | 634 | * A wrapper for purple_notify_message that displays an error message. |
| 5437 | 635 | */ |
| 15884 | 636 | #define purple_notify_error(handle, title, primary, secondary) \ |
| 637 | purple_notify_message((handle), PURPLE_NOTIFY_MSG_ERROR, (title), \ | |
| 5437 | 638 | (primary), (secondary), NULL, NULL) |
| 639 | ||
| 640 | /*@}*/ | |
| 641 | ||
| 642 | /**************************************************************************/ | |
| 10566 | 643 | /** @name UI Registration Functions */ |
| 5437 | 644 | /**************************************************************************/ |
| 645 | /*@{*/ | |
| 646 | ||
| 647 | /** | |
| 648 | * Sets the UI operations structure to be used when displaying a | |
| 649 | * notification. | |
| 650 | * | |
| 651 | * @param ops The UI operations structure. | |
| 652 | */ | |
| 15884 | 653 | void purple_notify_set_ui_ops(PurpleNotifyUiOps *ops); |
| 5437 | 654 | |
| 655 | /** | |
| 656 | * Returns the UI operations structure to be used when displaying a | |
| 657 | * notification. | |
| 658 | * | |
|
6467
754d318cac4a
[gaim-migrate @ 6976]
Christian Hammond <chipx86@chipx86.com>
parents:
6465
diff
changeset
|
659 | * @return The UI operations structure. |
| 5437 | 660 | */ |
| 15884 | 661 | PurpleNotifyUiOps *purple_notify_get_ui_ops(void); |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
662 | |
|
5497
da3c08f3af25
[gaim-migrate @ 5893]
Mark Doliner <markdoliner@pidgin.im>
parents:
5476
diff
changeset
|
663 | /*@}*/ |
| 5437 | 664 | |
| 12129 | 665 | /**************************************************************************/ |
| 666 | /** @name Notify Subsystem */ | |
| 667 | /**************************************************************************/ | |
| 668 | /*@{*/ | |
| 669 | ||
| 670 | /** | |
| 671 | * Returns the notify subsystem handle. | |
| 672 | * | |
| 673 | * @return The notify subsystem handle. | |
| 674 | */ | |
| 15884 | 675 | void *purple_notify_get_handle(void); |
| 12129 | 676 | |
| 677 | /** | |
| 678 | * Initializes the notify subsystem. | |
| 679 | */ | |
| 15884 | 680 | void purple_notify_init(void); |
| 12129 | 681 | |
| 682 | /** | |
| 683 | * Uninitializes the notify subsystem. | |
| 684 | */ | |
| 15884 | 685 | void purple_notify_uninit(void); |
| 12129 | 686 | |
| 687 | /*@}*/ | |
| 688 | ||
| 689 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
690 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
691 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
692 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
693 | |
| 15884 | 694 | #endif /* _PURPLE_NOTIFY_H_ */ |