Thu, 25 Aug 2011 04:15:16 +0000
Hide PurpleValue.
| 6562 | 1 | /** |
| 2 | * @file value.h Value wrapper API | |
| 3 | * @ingroup core | |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
4 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | /* purple |
| 6562 | 7 | * |
| 15884 | 8 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
| 6562 | 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify | |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
| 21 | * | |
| 22 | * You should have received a copy of the GNU General Public License | |
| 23 | * 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:
18894
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 6562 | 25 | */ |
| 15884 | 26 | #ifndef _PURPLE_VALUE_H_ |
| 27 | #define _PURPLE_VALUE_H_ | |
| 6562 | 28 | |
|
6565
e040ef0c6ce8
[gaim-migrate @ 7087]
Christian Hammond <chipx86@chipx86.com>
parents:
6563
diff
changeset
|
29 | #include <glib.h> |
|
e040ef0c6ce8
[gaim-migrate @ 7087]
Christian Hammond <chipx86@chipx86.com>
parents:
6563
diff
changeset
|
30 | |
| 6562 | 31 | /** |
| 32 | * Specific value types. | |
| 33 | */ | |
| 34 | typedef enum | |
| 35 | { | |
| 15884 | 36 | PURPLE_TYPE_UNKNOWN = 0, /**< Unknown type. */ |
| 37 | PURPLE_TYPE_SUBTYPE, /**< Subtype. */ | |
| 38 | PURPLE_TYPE_CHAR, /**< Character. */ | |
| 39 | PURPLE_TYPE_UCHAR, /**< Unsigned character. */ | |
| 40 | PURPLE_TYPE_BOOLEAN, /**< Boolean. */ | |
| 41 | PURPLE_TYPE_SHORT, /**< Short integer. */ | |
| 42 | PURPLE_TYPE_USHORT, /**< Unsigned short integer. */ | |
| 43 | PURPLE_TYPE_INT, /**< Integer. */ | |
| 44 | PURPLE_TYPE_UINT, /**< Unsigned integer. */ | |
| 45 | PURPLE_TYPE_LONG, /**< Long integer. */ | |
| 46 | PURPLE_TYPE_ULONG, /**< Unsigned long integer. */ | |
| 47 | PURPLE_TYPE_INT64, /**< 64-bit integer. */ | |
| 48 | PURPLE_TYPE_UINT64, /**< 64-bit unsigned integer. */ | |
| 49 | PURPLE_TYPE_STRING, /**< String. */ | |
| 50 | PURPLE_TYPE_OBJECT, /**< Object pointer. */ | |
| 51 | PURPLE_TYPE_POINTER, /**< Generic pointer. */ | |
| 52 | PURPLE_TYPE_ENUM, /**< Enum. */ | |
| 53 | PURPLE_TYPE_BOXED /**< Boxed pointer with specific type. */ | |
| 6562 | 54 | |
| 15884 | 55 | } PurpleType; |
| 6562 | 56 | |
|
14049
c15c41423e19
[gaim-migrate @ 16559]
Richard Laager <rlaager@pidgin.im>
parents:
13388
diff
changeset
|
57 | |
| 6562 | 58 | /** |
| 15884 | 59 | * Purple-specific subtype values. |
|
6563
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
60 | */ |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
61 | typedef enum |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
62 | { |
| 15884 | 63 | PURPLE_SUBTYPE_UNKNOWN = 0, |
| 64 | PURPLE_SUBTYPE_ACCOUNT, | |
| 65 | PURPLE_SUBTYPE_BLIST, | |
| 66 | PURPLE_SUBTYPE_BLIST_BUDDY, | |
| 67 | PURPLE_SUBTYPE_BLIST_GROUP, | |
| 68 | PURPLE_SUBTYPE_BLIST_CHAT, | |
| 69 | PURPLE_SUBTYPE_BUDDY_ICON, | |
| 70 | PURPLE_SUBTYPE_CONNECTION, | |
| 71 | PURPLE_SUBTYPE_CONVERSATION, | |
| 72 | PURPLE_SUBTYPE_PLUGIN, | |
| 73 | PURPLE_SUBTYPE_BLIST_NODE, | |
| 74 | PURPLE_SUBTYPE_CIPHER, | |
| 75 | PURPLE_SUBTYPE_STATUS, | |
| 76 | PURPLE_SUBTYPE_LOG, | |
| 77 | PURPLE_SUBTYPE_XFER, | |
| 78 | PURPLE_SUBTYPE_SAVEDSTATUS, | |
| 79 | PURPLE_SUBTYPE_XMLNODE, | |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
80 | PURPLE_SUBTYPE_USERINFO, |
|
18894
1a00d2309d39
- Register the certificate-stored and certificate-deleted signals
William Ehlhardt <williamehlhardt@gmail.com>
parents:
16437
diff
changeset
|
81 | PURPLE_SUBTYPE_STORED_IMAGE, |
|
31906
d1ffe4b1de91
Add constant-time lookup of row in the userlist by way of PurpleConvChatBuddy ui_data
Paul Aurich <darkrain42@pidgin.im>
parents:
20147
diff
changeset
|
82 | PURPLE_SUBTYPE_CERTIFICATEPOOL, |
|
d1ffe4b1de91
Add constant-time lookup of row in the userlist by way of PurpleConvChatBuddy ui_data
Paul Aurich <darkrain42@pidgin.im>
parents:
20147
diff
changeset
|
83 | PURPLE_SUBTYPE_CHATBUDDY |
| 15884 | 84 | } PurpleSubType; |
|
6563
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
85 | |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
86 | /** |
| 6562 | 87 | * A wrapper for a type, subtype, and specific type of value. |
| 88 | */ | |
| 32228 | 89 | typedef struct _PurpleValue PurpleValue; |
| 6562 | 90 | |
|
6563
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
91 | #ifdef __cplusplus |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
92 | extern "C" { |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
93 | #endif |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
94 | |
| 6562 | 95 | /** |
| 15884 | 96 | * Creates a new PurpleValue. |
| 6562 | 97 | * |
| 98 | * This function takes a type and, depending on that type, a sub-type | |
| 99 | * or specific type. | |
| 100 | * | |
| 15884 | 101 | * If @a type is PURPLE_TYPE_BOXED, the next parameter must be a |
| 6562 | 102 | * string representing the specific type. |
| 103 | * | |
| 15884 | 104 | * If @a type is PURPLE_TYPE_SUBTYPE, the next parameter must be a |
| 6562 | 105 | * integer or enum representing the sub-type. |
| 106 | * | |
| 107 | * If the subtype or specific type is not set when required, random | |
| 108 | * errors may occur. You have been warned. | |
| 109 | * | |
| 110 | * @param type The type. | |
| 111 | * | |
| 112 | * @return The new value. | |
| 113 | */ | |
| 15884 | 114 | PurpleValue *purple_value_new(PurpleType type, ...); |
| 6562 | 115 | |
| 116 | /** | |
| 15884 | 117 | * Creates a new outgoing PurpleValue. If a value is an "outgoing" value |
|
10477
7d0641ba585c
[gaim-migrate @ 11764]
Mark Doliner <markdoliner@pidgin.im>
parents:
10071
diff
changeset
|
118 | * it means the value can be modified by plugins and scripts. |
| 6562 | 119 | * |
| 120 | * This function takes a type and, depending on that type, a sub-type | |
| 121 | * or specific type. | |
| 122 | * | |
| 15884 | 123 | * If @a type is PURPLE_TYPE_BOXED, the next parameter must be a |
| 6562 | 124 | * string representing the specific type. |
| 125 | * | |
| 15884 | 126 | * If @a type is PURPLE_TYPE_SUBTYPE, the next parameter must be a |
| 6562 | 127 | * integer or enum representing the sub-type. |
| 128 | * | |
| 129 | * If the sub-type or specific type is not set when required, random | |
| 130 | * errors may occur. You have been warned. | |
| 131 | * | |
| 132 | * @param type The type. | |
| 133 | * | |
| 134 | * @return The new value. | |
| 135 | */ | |
| 15884 | 136 | PurpleValue *purple_value_new_outgoing(PurpleType type, ...); |
| 6562 | 137 | |
| 138 | /** | |
| 15884 | 139 | * Destroys a PurpleValue. |
| 6562 | 140 | * |
| 141 | * @param value The value to destroy. | |
| 142 | */ | |
| 15884 | 143 | void purple_value_destroy(PurpleValue *value); |
| 6562 | 144 | |
| 145 | /** | |
| 15884 | 146 | * Duplicated a PurpleValue. |
|
8809
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
147 | * |
|
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
148 | * @param value The value to duplicate. |
|
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
149 | * |
|
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
150 | * @return The duplicate value. |
|
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
151 | */ |
| 15884 | 152 | PurpleValue *purple_value_dup(const PurpleValue *value); |
|
8809
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
153 | |
|
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
154 | /** |
| 6562 | 155 | * Returns a value's type. |
| 156 | * | |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
157 | * @param value The value whose type you want. |
|
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
158 | * |
| 6562 | 159 | * @return The value's type. |
| 160 | */ | |
| 15884 | 161 | PurpleType purple_value_get_type(const PurpleValue *value); |
| 6562 | 162 | |
| 163 | /** | |
| 164 | * Returns a value's subtype. | |
| 165 | * | |
| 15884 | 166 | * If the value's type is not PURPLE_TYPE_SUBTYPE, this will return 0. |
| 6562 | 167 | * Subtypes should never have a subtype of 0. |
| 168 | * | |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
169 | * @param value The value whose subtype you want. |
|
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
170 | * |
| 15884 | 171 | * @return The value's subtype, or 0 if @a type is not PURPLE_TYPE_SUBTYPE. |
| 6562 | 172 | */ |
| 15884 | 173 | unsigned int purple_value_get_subtype(const PurpleValue *value); |
| 6562 | 174 | |
| 175 | /** | |
| 176 | * Returns a value's specific type. | |
| 177 | * | |
| 15884 | 178 | * If the value's type is not PURPLE_TYPE_BOXED, this will return @c NULL. |
| 6562 | 179 | * |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
180 | * @param value The value whose specific type you want. |
|
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
181 | * |
| 15884 | 182 | * @return The value's specific type, or @a NULL if not PURPLE_TYPE_BOXED. |
| 6562 | 183 | */ |
| 15884 | 184 | const char *purple_value_get_specific_type(const PurpleValue *value); |
| 6562 | 185 | |
| 186 | /** | |
| 187 | * Returns whether or not the value is an outgoing value. | |
| 188 | * | |
| 189 | * @param value The value. | |
| 190 | * | |
| 191 | * @return TRUE if the value is outgoing, or FALSE otherwise. | |
| 192 | */ | |
| 15884 | 193 | gboolean purple_value_is_outgoing(const PurpleValue *value); |
| 6562 | 194 | |
| 195 | /** | |
| 196 | * Sets the value's character data. | |
| 197 | * | |
| 198 | * @param value The value. | |
| 199 | * @param data The character data. | |
| 200 | */ | |
| 15884 | 201 | void purple_value_set_char(PurpleValue *value, char data); |
| 6562 | 202 | |
| 203 | /** | |
| 204 | * Sets the value's unsigned character data. | |
| 205 | * | |
| 206 | * @param value The value. | |
| 207 | * @param data The unsigned character data. | |
| 208 | */ | |
| 15884 | 209 | void purple_value_set_uchar(PurpleValue *value, unsigned char data); |
| 6562 | 210 | |
| 211 | /** | |
| 212 | * Sets the value's boolean data. | |
| 213 | * | |
| 214 | * @param value The value. | |
| 215 | * @param data The boolean data. | |
| 216 | */ | |
| 15884 | 217 | void purple_value_set_boolean(PurpleValue *value, gboolean data); |
| 6562 | 218 | |
| 219 | /** | |
| 220 | * Sets the value's short integer data. | |
| 221 | * | |
| 222 | * @param value The value. | |
| 223 | * @param data The short integer data. | |
| 224 | */ | |
| 15884 | 225 | void purple_value_set_short(PurpleValue *value, short data); |
| 6562 | 226 | |
| 227 | /** | |
| 228 | * Sets the value's unsigned short integer data. | |
| 229 | * | |
| 230 | * @param value The value. | |
| 231 | * @param data The unsigned short integer data. | |
| 232 | */ | |
| 15884 | 233 | void purple_value_set_ushort(PurpleValue *value, unsigned short data); |
| 6562 | 234 | |
| 235 | /** | |
| 236 | * Sets the value's integer data. | |
| 237 | * | |
| 238 | * @param value The value. | |
| 239 | * @param data The integer data. | |
| 240 | */ | |
| 15884 | 241 | void purple_value_set_int(PurpleValue *value, int data); |
| 6562 | 242 | |
| 243 | /** | |
| 244 | * Sets the value's unsigned integer data. | |
| 245 | * | |
| 246 | * @param value The value. | |
| 247 | * @param data The unsigned integer data. | |
| 248 | */ | |
| 15884 | 249 | void purple_value_set_uint(PurpleValue *value, unsigned int data); |
| 6562 | 250 | |
| 251 | /** | |
| 252 | * Sets the value's long integer data. | |
| 253 | * | |
| 254 | * @param value The value. | |
| 255 | * @param data The long integer data. | |
| 256 | */ | |
| 15884 | 257 | void purple_value_set_long(PurpleValue *value, long data); |
| 6562 | 258 | |
| 259 | /** | |
| 260 | * Sets the value's unsigned long integer data. | |
| 261 | * | |
| 262 | * @param value The value. | |
| 263 | * @param data The unsigned long integer data. | |
| 264 | */ | |
| 15884 | 265 | void purple_value_set_ulong(PurpleValue *value, unsigned long data); |
| 6562 | 266 | |
| 267 | /** | |
| 268 | * Sets the value's 64-bit integer data. | |
| 269 | * | |
| 270 | * @param value The value. | |
| 271 | * @param data The 64-bit integer data. | |
| 272 | */ | |
| 15884 | 273 | void purple_value_set_int64(PurpleValue *value, gint64 data); |
| 6562 | 274 | |
| 275 | /** | |
| 276 | * Sets the value's unsigned 64-bit integer data. | |
| 277 | * | |
| 278 | * @param value The value. | |
| 279 | * @param data The unsigned 64-bit integer data. | |
| 280 | */ | |
| 15884 | 281 | void purple_value_set_uint64(PurpleValue *value, guint64 data); |
| 6562 | 282 | |
| 283 | /** | |
| 284 | * Sets the value's string data. | |
| 285 | * | |
| 286 | * @param value The value. | |
| 287 | * @param data The string data. | |
| 288 | */ | |
| 15884 | 289 | void purple_value_set_string(PurpleValue *value, const char *data); |
| 6562 | 290 | |
| 291 | /** | |
| 292 | * Sets the value's object data. | |
| 293 | * | |
| 294 | * @param value The value. | |
| 295 | * @param data The object data. | |
| 296 | */ | |
| 15884 | 297 | void purple_value_set_object(PurpleValue *value, void *data); |
| 6562 | 298 | |
| 299 | /** | |
| 300 | * Sets the value's pointer data. | |
| 301 | * | |
| 302 | * @param value The value. | |
| 303 | * @param data The pointer data. | |
| 304 | */ | |
| 15884 | 305 | void purple_value_set_pointer(PurpleValue *value, void *data); |
| 6562 | 306 | |
| 307 | /** | |
| 308 | * Sets the value's enum data. | |
| 309 | * | |
| 310 | * @param value The value. | |
| 311 | * @param data The enum data. | |
| 312 | */ | |
| 15884 | 313 | void purple_value_set_enum(PurpleValue *value, int data); |
| 6562 | 314 | |
| 315 | /** | |
| 316 | * Sets the value's boxed data. | |
| 317 | * | |
| 318 | * @param value The value. | |
| 319 | * @param data The boxed data. | |
| 320 | */ | |
| 15884 | 321 | void purple_value_set_boxed(PurpleValue *value, void *data); |
| 6562 | 322 | |
| 323 | /** | |
| 324 | * Returns the value's character data. | |
| 325 | * | |
| 326 | * @param value The value. | |
| 327 | * | |
| 328 | * @return The character data. | |
| 329 | */ | |
| 15884 | 330 | char purple_value_get_char(const PurpleValue *value); |
| 6562 | 331 | |
| 332 | /** | |
| 333 | * Returns the value's unsigned character data. | |
| 334 | * | |
| 335 | * @param value The value. | |
| 336 | * | |
| 337 | * @return The unsigned character data. | |
| 338 | */ | |
| 15884 | 339 | unsigned char purple_value_get_uchar(const PurpleValue *value); |
| 6562 | 340 | |
| 341 | /** | |
| 342 | * Returns the value's boolean data. | |
| 343 | * | |
| 344 | * @param value The value. | |
| 345 | * | |
| 346 | * @return The boolean data. | |
| 347 | */ | |
| 15884 | 348 | gboolean purple_value_get_boolean(const PurpleValue *value); |
| 6562 | 349 | |
| 350 | /** | |
| 351 | * Returns the value's short integer data. | |
| 352 | * | |
| 353 | * @param value The value. | |
| 354 | * | |
| 355 | * @return The short integer data. | |
| 356 | */ | |
| 15884 | 357 | short purple_value_get_short(const PurpleValue *value); |
| 6562 | 358 | |
| 359 | /** | |
| 360 | * Returns the value's unsigned short integer data. | |
| 361 | * | |
| 362 | * @param value The value. | |
| 363 | * | |
| 364 | * @return The unsigned short integer data. | |
| 365 | */ | |
| 15884 | 366 | unsigned short purple_value_get_ushort(const PurpleValue *value); |
| 6562 | 367 | |
| 368 | /** | |
| 369 | * Returns the value's integer data. | |
| 370 | * | |
| 371 | * @param value The value. | |
| 372 | * | |
| 373 | * @return The integer data. | |
| 374 | */ | |
| 15884 | 375 | int purple_value_get_int(const PurpleValue *value); |
| 6562 | 376 | |
| 377 | /** | |
| 378 | * Returns the value's unsigned integer data. | |
| 379 | * | |
| 380 | * @param value The value. | |
| 381 | * | |
| 382 | * @return The unsigned integer data. | |
| 383 | */ | |
| 15884 | 384 | unsigned int purple_value_get_uint(const PurpleValue *value); |
| 6562 | 385 | |
| 386 | /** | |
| 387 | * Returns the value's long integer data. | |
| 388 | * | |
| 389 | * @param value The value. | |
| 390 | * | |
| 391 | * @return The long integer data. | |
| 392 | */ | |
| 15884 | 393 | long purple_value_get_long(const PurpleValue *value); |
| 6562 | 394 | |
| 395 | /** | |
| 396 | * Returns the value's unsigned long integer data. | |
| 397 | * | |
| 398 | * @param value The value. | |
| 399 | * | |
| 400 | * @return The unsigned long integer data. | |
| 401 | */ | |
| 15884 | 402 | unsigned long purple_value_get_ulong(const PurpleValue *value); |
| 6562 | 403 | |
| 404 | /** | |
| 405 | * Returns the value's 64-bit integer data. | |
| 406 | * | |
| 407 | * @param value The value. | |
| 408 | * | |
| 409 | * @return The 64-bit integer data. | |
| 410 | */ | |
| 15884 | 411 | gint64 purple_value_get_int64(const PurpleValue *value); |
| 6562 | 412 | |
| 413 | /** | |
| 414 | * Returns the value's unsigned 64-bit integer data. | |
| 415 | * | |
| 416 | * @param value The value. | |
| 417 | * | |
| 418 | * @return The unsigned 64-bit integer data. | |
| 419 | */ | |
| 15884 | 420 | guint64 purple_value_get_uint64(const PurpleValue *value); |
| 6562 | 421 | |
| 422 | /** | |
| 423 | * Returns the value's string data. | |
| 424 | * | |
| 425 | * @param value The value. | |
| 426 | * | |
| 427 | * @return The string data. | |
| 428 | */ | |
| 15884 | 429 | const char *purple_value_get_string(const PurpleValue *value); |
| 6562 | 430 | |
| 431 | /** | |
| 432 | * Returns the value's object data. | |
| 433 | * | |
| 434 | * @param value The value. | |
| 435 | * | |
| 436 | * @return The object data. | |
| 437 | */ | |
| 15884 | 438 | void *purple_value_get_object(const PurpleValue *value); |
| 6562 | 439 | |
| 440 | /** | |
| 441 | * Returns the value's pointer data. | |
| 442 | * | |
| 443 | * @param value The value. | |
| 444 | * | |
| 445 | * @return The pointer data. | |
| 446 | */ | |
| 15884 | 447 | void *purple_value_get_pointer(const PurpleValue *value); |
| 6562 | 448 | |
| 449 | /** | |
| 450 | * Returns the value's enum data. | |
| 451 | * | |
| 452 | * @param value The value. | |
| 453 | * | |
| 454 | * @return The enum data. | |
| 455 | */ | |
| 15884 | 456 | int purple_value_get_enum(const PurpleValue *value); |
| 6562 | 457 | |
| 458 | /** | |
| 459 | * Returns the value's boxed data. | |
| 460 | * | |
| 461 | * @param value The value. | |
| 462 | * | |
| 463 | * @return The boxed data. | |
| 464 | */ | |
| 15884 | 465 | void *purple_value_get_boxed(const PurpleValue *value); |
| 6562 | 466 | |
|
6563
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
467 | #ifdef __cplusplus |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
468 | } |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
469 | #endif |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
470 | |
| 15884 | 471 | #endif /* _PURPLE_VALUE_H_ */ |