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