Fri, 19 Dec 2008 05:51:10 +0000
NEWS and stuff...
| 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, |
|
1a00d2309d39
- Register the certificate-stored and certificate-deleted signals
William Ehlhardt <williamehlhardt@gmail.com>
parents:
16437
diff
changeset
|
82 | PURPLE_SUBTYPE_CERTIFICATEPOOL |
| 15884 | 83 | } PurpleSubType; |
|
6563
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
84 | |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
85 | /** |
| 6562 | 86 | * A wrapper for a type, subtype, and specific type of value. |
| 87 | */ | |
| 88 | typedef struct | |
| 89 | { | |
| 15884 | 90 | PurpleType type; |
| 6562 | 91 | unsigned short flags; |
| 92 | ||
| 93 | union | |
| 94 | { | |
| 95 | char char_data; | |
| 96 | unsigned char uchar_data; | |
| 97 | gboolean boolean_data; | |
| 98 | short short_data; | |
| 99 | unsigned short ushort_data; | |
| 100 | int int_data; | |
| 101 | unsigned int uint_data; | |
| 102 | long long_data; | |
| 103 | unsigned long ulong_data; | |
| 104 | gint64 int64_data; | |
| 105 | guint64 uint64_data; | |
| 106 | char *string_data; | |
| 107 | void *object_data; | |
| 108 | void *pointer_data; | |
| 109 | int enum_data; | |
| 110 | void *boxed_data; | |
| 111 | ||
| 112 | } data; | |
| 113 | ||
| 114 | union | |
| 115 | { | |
| 116 | unsigned int subtype; | |
| 117 | char *specific_type; | |
| 118 | ||
| 119 | } u; | |
| 120 | ||
| 15884 | 121 | } PurpleValue; |
| 6562 | 122 | |
|
6563
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
123 | #ifdef __cplusplus |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
124 | extern "C" { |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
125 | #endif |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
126 | |
| 6562 | 127 | /** |
| 15884 | 128 | * Creates a new PurpleValue. |
| 6562 | 129 | * |
| 130 | * This function takes a type and, depending on that type, a sub-type | |
| 131 | * or specific type. | |
| 132 | * | |
| 15884 | 133 | * If @a type is PURPLE_TYPE_BOXED, the next parameter must be a |
| 6562 | 134 | * string representing the specific type. |
| 135 | * | |
| 15884 | 136 | * If @a type is PURPLE_TYPE_SUBTYPE, the next parameter must be a |
| 6562 | 137 | * integer or enum representing the sub-type. |
| 138 | * | |
| 139 | * If the subtype or specific type is not set when required, random | |
| 140 | * errors may occur. You have been warned. | |
| 141 | * | |
| 142 | * @param type The type. | |
| 143 | * | |
| 144 | * @return The new value. | |
| 145 | */ | |
| 15884 | 146 | PurpleValue *purple_value_new(PurpleType type, ...); |
| 6562 | 147 | |
| 148 | /** | |
| 15884 | 149 | * 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
|
150 | * it means the value can be modified by plugins and scripts. |
| 6562 | 151 | * |
| 152 | * This function takes a type and, depending on that type, a sub-type | |
| 153 | * or specific type. | |
| 154 | * | |
| 15884 | 155 | * If @a type is PURPLE_TYPE_BOXED, the next parameter must be a |
| 6562 | 156 | * string representing the specific type. |
| 157 | * | |
| 15884 | 158 | * If @a type is PURPLE_TYPE_SUBTYPE, the next parameter must be a |
| 6562 | 159 | * integer or enum representing the sub-type. |
| 160 | * | |
| 161 | * If the sub-type or specific type is not set when required, random | |
| 162 | * errors may occur. You have been warned. | |
| 163 | * | |
| 164 | * @param type The type. | |
| 165 | * | |
| 166 | * @return The new value. | |
| 167 | */ | |
| 15884 | 168 | PurpleValue *purple_value_new_outgoing(PurpleType type, ...); |
| 6562 | 169 | |
| 170 | /** | |
| 15884 | 171 | * Destroys a PurpleValue. |
| 6562 | 172 | * |
| 173 | * @param value The value to destroy. | |
| 174 | */ | |
| 15884 | 175 | void purple_value_destroy(PurpleValue *value); |
| 6562 | 176 | |
| 177 | /** | |
| 15884 | 178 | * Duplicated a PurpleValue. |
|
8809
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
179 | * |
|
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
180 | * @param value The value to duplicate. |
|
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
181 | * |
|
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
182 | * @return The duplicate value. |
|
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
183 | */ |
| 15884 | 184 | PurpleValue *purple_value_dup(const PurpleValue *value); |
|
8809
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
185 | |
|
4fc1959df5ce
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
186 | /** |
| 6562 | 187 | * Returns a value's type. |
| 188 | * | |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
189 | * @param value The value whose type you want. |
|
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
190 | * |
| 6562 | 191 | * @return The value's type. |
| 192 | */ | |
| 15884 | 193 | PurpleType purple_value_get_type(const PurpleValue *value); |
| 6562 | 194 | |
| 195 | /** | |
| 196 | * Returns a value's subtype. | |
| 197 | * | |
| 15884 | 198 | * If the value's type is not PURPLE_TYPE_SUBTYPE, this will return 0. |
| 6562 | 199 | * Subtypes should never have a subtype of 0. |
| 200 | * | |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
201 | * @param value The value whose subtype you want. |
|
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
202 | * |
| 15884 | 203 | * @return The value's subtype, or 0 if @a type is not PURPLE_TYPE_SUBTYPE. |
| 6562 | 204 | */ |
| 15884 | 205 | unsigned int purple_value_get_subtype(const PurpleValue *value); |
| 6562 | 206 | |
| 207 | /** | |
| 208 | * Returns a value's specific type. | |
| 209 | * | |
| 15884 | 210 | * If the value's type is not PURPLE_TYPE_BOXED, this will return @c NULL. |
| 6562 | 211 | * |
|
10071
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
212 | * @param value The value whose specific type you want. |
|
d2ba11541693
[gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8817
diff
changeset
|
213 | * |
| 15884 | 214 | * @return The value's specific type, or @a NULL if not PURPLE_TYPE_BOXED. |
| 6562 | 215 | */ |
| 15884 | 216 | const char *purple_value_get_specific_type(const PurpleValue *value); |
| 6562 | 217 | |
| 218 | /** | |
| 219 | * Returns whether or not the value is an outgoing value. | |
| 220 | * | |
| 221 | * @param value The value. | |
| 222 | * | |
| 223 | * @return TRUE if the value is outgoing, or FALSE otherwise. | |
| 224 | */ | |
| 15884 | 225 | gboolean purple_value_is_outgoing(const PurpleValue *value); |
| 6562 | 226 | |
| 227 | /** | |
| 228 | * Sets the value's character data. | |
| 229 | * | |
| 230 | * @param value The value. | |
| 231 | * @param data The character data. | |
| 232 | */ | |
| 15884 | 233 | void purple_value_set_char(PurpleValue *value, char data); |
| 6562 | 234 | |
| 235 | /** | |
| 236 | * Sets the value's unsigned character data. | |
| 237 | * | |
| 238 | * @param value The value. | |
| 239 | * @param data The unsigned character data. | |
| 240 | */ | |
| 15884 | 241 | void purple_value_set_uchar(PurpleValue *value, unsigned char data); |
| 6562 | 242 | |
| 243 | /** | |
| 244 | * Sets the value's boolean data. | |
| 245 | * | |
| 246 | * @param value The value. | |
| 247 | * @param data The boolean data. | |
| 248 | */ | |
| 15884 | 249 | void purple_value_set_boolean(PurpleValue *value, gboolean data); |
| 6562 | 250 | |
| 251 | /** | |
| 252 | * Sets the value's short integer data. | |
| 253 | * | |
| 254 | * @param value The value. | |
| 255 | * @param data The short integer data. | |
| 256 | */ | |
| 15884 | 257 | void purple_value_set_short(PurpleValue *value, short data); |
| 6562 | 258 | |
| 259 | /** | |
| 260 | * Sets the value's unsigned short integer data. | |
| 261 | * | |
| 262 | * @param value The value. | |
| 263 | * @param data The unsigned short integer data. | |
| 264 | */ | |
| 15884 | 265 | void purple_value_set_ushort(PurpleValue *value, unsigned short data); |
| 6562 | 266 | |
| 267 | /** | |
| 268 | * Sets the value's integer data. | |
| 269 | * | |
| 270 | * @param value The value. | |
| 271 | * @param data The integer data. | |
| 272 | */ | |
| 15884 | 273 | void purple_value_set_int(PurpleValue *value, int data); |
| 6562 | 274 | |
| 275 | /** | |
| 276 | * Sets the value's unsigned integer data. | |
| 277 | * | |
| 278 | * @param value The value. | |
| 279 | * @param data The unsigned integer data. | |
| 280 | */ | |
| 15884 | 281 | void purple_value_set_uint(PurpleValue *value, unsigned int data); |
| 6562 | 282 | |
| 283 | /** | |
| 284 | * Sets the value's long integer data. | |
| 285 | * | |
| 286 | * @param value The value. | |
| 287 | * @param data The long integer data. | |
| 288 | */ | |
| 15884 | 289 | void purple_value_set_long(PurpleValue *value, long data); |
| 6562 | 290 | |
| 291 | /** | |
| 292 | * Sets the value's unsigned long integer data. | |
| 293 | * | |
| 294 | * @param value The value. | |
| 295 | * @param data The unsigned long integer data. | |
| 296 | */ | |
| 15884 | 297 | void purple_value_set_ulong(PurpleValue *value, unsigned long data); |
| 6562 | 298 | |
| 299 | /** | |
| 300 | * Sets the value's 64-bit integer data. | |
| 301 | * | |
| 302 | * @param value The value. | |
| 303 | * @param data The 64-bit integer data. | |
| 304 | */ | |
| 15884 | 305 | void purple_value_set_int64(PurpleValue *value, gint64 data); |
| 6562 | 306 | |
| 307 | /** | |
| 308 | * Sets the value's unsigned 64-bit integer data. | |
| 309 | * | |
| 310 | * @param value The value. | |
| 311 | * @param data The unsigned 64-bit integer data. | |
| 312 | */ | |
| 15884 | 313 | void purple_value_set_uint64(PurpleValue *value, guint64 data); |
| 6562 | 314 | |
| 315 | /** | |
| 316 | * Sets the value's string data. | |
| 317 | * | |
| 318 | * @param value The value. | |
| 319 | * @param data The string data. | |
| 320 | */ | |
| 15884 | 321 | void purple_value_set_string(PurpleValue *value, const char *data); |
| 6562 | 322 | |
| 323 | /** | |
| 324 | * Sets the value's object data. | |
| 325 | * | |
| 326 | * @param value The value. | |
| 327 | * @param data The object data. | |
| 328 | */ | |
| 15884 | 329 | void purple_value_set_object(PurpleValue *value, void *data); |
| 6562 | 330 | |
| 331 | /** | |
| 332 | * Sets the value's pointer data. | |
| 333 | * | |
| 334 | * @param value The value. | |
| 335 | * @param data The pointer data. | |
| 336 | */ | |
| 15884 | 337 | void purple_value_set_pointer(PurpleValue *value, void *data); |
| 6562 | 338 | |
| 339 | /** | |
| 340 | * Sets the value's enum data. | |
| 341 | * | |
| 342 | * @param value The value. | |
| 343 | * @param data The enum data. | |
| 344 | */ | |
| 15884 | 345 | void purple_value_set_enum(PurpleValue *value, int data); |
| 6562 | 346 | |
| 347 | /** | |
| 348 | * Sets the value's boxed data. | |
| 349 | * | |
| 350 | * @param value The value. | |
| 351 | * @param data The boxed data. | |
| 352 | */ | |
| 15884 | 353 | void purple_value_set_boxed(PurpleValue *value, void *data); |
| 6562 | 354 | |
| 355 | /** | |
| 356 | * Returns the value's character data. | |
| 357 | * | |
| 358 | * @param value The value. | |
| 359 | * | |
| 360 | * @return The character data. | |
| 361 | */ | |
| 15884 | 362 | char purple_value_get_char(const PurpleValue *value); |
| 6562 | 363 | |
| 364 | /** | |
| 365 | * Returns the value's unsigned character data. | |
| 366 | * | |
| 367 | * @param value The value. | |
| 368 | * | |
| 369 | * @return The unsigned character data. | |
| 370 | */ | |
| 15884 | 371 | unsigned char purple_value_get_uchar(const PurpleValue *value); |
| 6562 | 372 | |
| 373 | /** | |
| 374 | * Returns the value's boolean data. | |
| 375 | * | |
| 376 | * @param value The value. | |
| 377 | * | |
| 378 | * @return The boolean data. | |
| 379 | */ | |
| 15884 | 380 | gboolean purple_value_get_boolean(const PurpleValue *value); |
| 6562 | 381 | |
| 382 | /** | |
| 383 | * Returns the value's short integer data. | |
| 384 | * | |
| 385 | * @param value The value. | |
| 386 | * | |
| 387 | * @return The short integer data. | |
| 388 | */ | |
| 15884 | 389 | short purple_value_get_short(const PurpleValue *value); |
| 6562 | 390 | |
| 391 | /** | |
| 392 | * Returns the value's unsigned short integer data. | |
| 393 | * | |
| 394 | * @param value The value. | |
| 395 | * | |
| 396 | * @return The unsigned short integer data. | |
| 397 | */ | |
| 15884 | 398 | unsigned short purple_value_get_ushort(const PurpleValue *value); |
| 6562 | 399 | |
| 400 | /** | |
| 401 | * Returns the value's integer data. | |
| 402 | * | |
| 403 | * @param value The value. | |
| 404 | * | |
| 405 | * @return The integer data. | |
| 406 | */ | |
| 15884 | 407 | int purple_value_get_int(const PurpleValue *value); |
| 6562 | 408 | |
| 409 | /** | |
| 410 | * Returns the value's unsigned integer data. | |
| 411 | * | |
| 412 | * @param value The value. | |
| 413 | * | |
| 414 | * @return The unsigned integer data. | |
| 415 | */ | |
| 15884 | 416 | unsigned int purple_value_get_uint(const PurpleValue *value); |
| 6562 | 417 | |
| 418 | /** | |
| 419 | * Returns the value's long integer data. | |
| 420 | * | |
| 421 | * @param value The value. | |
| 422 | * | |
| 423 | * @return The long integer data. | |
| 424 | */ | |
| 15884 | 425 | long purple_value_get_long(const PurpleValue *value); |
| 6562 | 426 | |
| 427 | /** | |
| 428 | * Returns the value's unsigned long integer data. | |
| 429 | * | |
| 430 | * @param value The value. | |
| 431 | * | |
| 432 | * @return The unsigned long integer data. | |
| 433 | */ | |
| 15884 | 434 | unsigned long purple_value_get_ulong(const PurpleValue *value); |
| 6562 | 435 | |
| 436 | /** | |
| 437 | * Returns the value's 64-bit integer data. | |
| 438 | * | |
| 439 | * @param value The value. | |
| 440 | * | |
| 441 | * @return The 64-bit integer data. | |
| 442 | */ | |
| 15884 | 443 | gint64 purple_value_get_int64(const PurpleValue *value); |
| 6562 | 444 | |
| 445 | /** | |
| 446 | * Returns the value's unsigned 64-bit integer data. | |
| 447 | * | |
| 448 | * @param value The value. | |
| 449 | * | |
| 450 | * @return The unsigned 64-bit integer data. | |
| 451 | */ | |
| 15884 | 452 | guint64 purple_value_get_uint64(const PurpleValue *value); |
| 6562 | 453 | |
| 454 | /** | |
| 455 | * Returns the value's string data. | |
| 456 | * | |
| 457 | * @param value The value. | |
| 458 | * | |
| 459 | * @return The string data. | |
| 460 | */ | |
| 15884 | 461 | const char *purple_value_get_string(const PurpleValue *value); |
| 6562 | 462 | |
| 463 | /** | |
| 464 | * Returns the value's object data. | |
| 465 | * | |
| 466 | * @param value The value. | |
| 467 | * | |
| 468 | * @return The object data. | |
| 469 | */ | |
| 15884 | 470 | void *purple_value_get_object(const PurpleValue *value); |
| 6562 | 471 | |
| 472 | /** | |
| 473 | * Returns the value's pointer data. | |
| 474 | * | |
| 475 | * @param value The value. | |
| 476 | * | |
| 477 | * @return The pointer data. | |
| 478 | */ | |
| 15884 | 479 | void *purple_value_get_pointer(const PurpleValue *value); |
| 6562 | 480 | |
| 481 | /** | |
| 482 | * Returns the value's enum data. | |
| 483 | * | |
| 484 | * @param value The value. | |
| 485 | * | |
| 486 | * @return The enum data. | |
| 487 | */ | |
| 15884 | 488 | int purple_value_get_enum(const PurpleValue *value); |
| 6562 | 489 | |
| 490 | /** | |
| 491 | * Returns the value's boxed data. | |
| 492 | * | |
| 493 | * @param value The value. | |
| 494 | * | |
| 495 | * @return The boxed data. | |
| 496 | */ | |
| 15884 | 497 | void *purple_value_get_boxed(const PurpleValue *value); |
| 6562 | 498 | |
|
6563
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
499 | #ifdef __cplusplus |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
500 | } |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
501 | #endif |
|
f741652e3191
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
502 | |
| 15884 | 503 | #endif /* _PURPLE_VALUE_H_ */ |