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