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