Mercurial > pidgin
annotate src/value.h @ 13987:f94309c7c480
[gaim-migrate @ 16559]
Change the log-timestamp and conversation-timestamp signals to pass around a time_t instead of a struct tm. Most of this changeset is Ethan's work.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Mon, 24 Jul 2006 05:08:30 +0000 |
| parents | d9dbb874a30c |
| children | 0567de116699 |
| rev | line source |
|---|---|
| 6562 | 1 /** |
| 2 * @file value.h Value wrapper API | |
| 3 * @ingroup core | |
| 4 * | |
| 5 * gaim | |
| 6 * | |
| 8046 | 7 * Gaim is the legal property of its developers, whose names are too numerous |
| 8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 * source distribution. | |
| 6562 | 10 * |
| 11 * This program is free software; you can redistribute it and/or modify | |
| 12 * it under the terms of the GNU General Public License as published by | |
| 13 * the Free Software Foundation; either version 2 of the License, or | |
| 14 * (at your option) any later version. | |
| 15 * | |
| 16 * This program is distributed in the hope that it will be useful, | |
| 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 * GNU General Public License for more details. | |
| 20 * | |
| 21 * You should have received a copy of the GNU General Public License | |
| 22 * along with this program; if not, write to the Free Software | |
| 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 */ | |
| 25 #ifndef _GAIM_VALUE_H_ | |
| 26 #define _GAIM_VALUE_H_ | |
| 27 | |
|
6565
cb00e9647033
[gaim-migrate @ 7087]
Christian Hammond <chipx86@chipx86.com>
parents:
6563
diff
changeset
|
28 #include <glib.h> |
|
13987
f94309c7c480
[gaim-migrate @ 16559]
Richard Laager <rlaager@wiktel.com>
parents:
13387
diff
changeset
|
29 #include "config.h" |
|
6565
cb00e9647033
[gaim-migrate @ 7087]
Christian Hammond <chipx86@chipx86.com>
parents:
6563
diff
changeset
|
30 |
| 6562 | 31 /** |
| 32 * Specific value types. | |
| 33 */ | |
| 34 typedef enum | |
| 35 { | |
| 36 GAIM_TYPE_UNKNOWN = 0, /**< Unknown type. */ | |
| 37 GAIM_TYPE_SUBTYPE, /**< Subtype. */ | |
| 38 GAIM_TYPE_CHAR, /**< Character. */ | |
| 39 GAIM_TYPE_UCHAR, /**< Unsigned character. */ | |
| 40 GAIM_TYPE_BOOLEAN, /**< Boolean. */ | |
| 41 GAIM_TYPE_SHORT, /**< Short integer. */ | |
| 42 GAIM_TYPE_USHORT, /**< Unsigned short integer. */ | |
| 43 GAIM_TYPE_INT, /**< Integer. */ | |
| 44 GAIM_TYPE_UINT, /**< Unsigned integer. */ | |
| 45 GAIM_TYPE_LONG, /**< Long integer. */ | |
| 46 GAIM_TYPE_ULONG, /**< Unsigned long integer. */ | |
| 47 GAIM_TYPE_INT64, /**< 64-bit integer. */ | |
| 48 GAIM_TYPE_UINT64, /**< 64-bit unsigned integer. */ | |
| 49 GAIM_TYPE_STRING, /**< String. */ | |
| 50 GAIM_TYPE_OBJECT, /**< Object pointer. */ | |
| 51 GAIM_TYPE_POINTER, /**< Generic pointer. */ | |
| 52 GAIM_TYPE_ENUM, /**< Enum. */ | |
| 53 GAIM_TYPE_BOXED /**< Boxed pointer with specific type. */ | |
| 54 | |
| 55 } GaimType; | |
| 56 | |
|
13987
f94309c7c480
[gaim-migrate @ 16559]
Richard Laager <rlaager@wiktel.com>
parents:
13387
diff
changeset
|
57 /* time_t is normally either an int or a uint; this is a little ugly |
|
f94309c7c480
[gaim-migrate @ 16559]
Richard Laager <rlaager@wiktel.com>
parents:
13387
diff
changeset
|
58 * and probably deserves revisiting. */ |
|
f94309c7c480
[gaim-migrate @ 16559]
Richard Laager <rlaager@wiktel.com>
parents:
13387
diff
changeset
|
59 #if SIZEOF_TIME_T == 8 |
|
f94309c7c480
[gaim-migrate @ 16559]
Richard Laager <rlaager@wiktel.com>
parents:
13387
diff
changeset
|
60 # define GAIM_TYPE_TIME_T GAIM_TYPE_INT64 |
|
f94309c7c480
[gaim-migrate @ 16559]
Richard Laager <rlaager@wiktel.com>
parents:
13387
diff
changeset
|
61 #else |
|
f94309c7c480
[gaim-migrate @ 16559]
Richard Laager <rlaager@wiktel.com>
parents:
13387
diff
changeset
|
62 # define GAIM_TYPE_TIME_T GAIM_TYPE_INT |
|
f94309c7c480
[gaim-migrate @ 16559]
Richard Laager <rlaager@wiktel.com>
parents:
13387
diff
changeset
|
63 #endif /* sizeof(time_t) == 8 */ |
|
f94309c7c480
[gaim-migrate @ 16559]
Richard Laager <rlaager@wiktel.com>
parents:
13387
diff
changeset
|
64 |
|
f94309c7c480
[gaim-migrate @ 16559]
Richard Laager <rlaager@wiktel.com>
parents:
13387
diff
changeset
|
65 |
|
f94309c7c480
[gaim-migrate @ 16559]
Richard Laager <rlaager@wiktel.com>
parents:
13387
diff
changeset
|
66 |
| 6562 | 67 /** |
|
6563
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
68 * Gaim-specific subtype values. |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
69 */ |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
70 typedef enum |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
71 { |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
72 GAIM_SUBTYPE_UNKNOWN = 0, |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
73 GAIM_SUBTYPE_ACCOUNT, |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
74 GAIM_SUBTYPE_BLIST, |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
75 GAIM_SUBTYPE_BLIST_BUDDY, |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
76 GAIM_SUBTYPE_BLIST_GROUP, |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
77 GAIM_SUBTYPE_BLIST_CHAT, |
| 10934 | 78 GAIM_SUBTYPE_BUDDY_ICON, |
|
6563
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
79 GAIM_SUBTYPE_CONNECTION, |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
80 GAIM_SUBTYPE_CONVERSATION, |
| 8817 | 81 GAIM_SUBTYPE_PLUGIN, |
|
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10477
diff
changeset
|
82 GAIM_SUBTYPE_BLIST_NODE, |
|
11979
717cbb3115bc
[gaim-migrate @ 14272]
Gary Kramlich <grim@reaperworld.com>
parents:
10934
diff
changeset
|
83 GAIM_SUBTYPE_CIPHER, |
|
12737
a1e241dd50b6
[gaim-migrate @ 15082]
Richard Laager <rlaager@wiktel.com>
parents:
11979
diff
changeset
|
84 GAIM_SUBTYPE_STATUS, |
|
13219
d0f7f698b6de
[gaim-migrate @ 15583]
Richard Laager <rlaager@wiktel.com>
parents:
12837
diff
changeset
|
85 GAIM_SUBTYPE_LOG, |
|
13387
d9dbb874a30c
[gaim-migrate @ 15760]
Richard Laager <rlaager@wiktel.com>
parents:
13219
diff
changeset
|
86 GAIM_SUBTYPE_XFER, |
|
d9dbb874a30c
[gaim-migrate @ 15760]
Richard Laager <rlaager@wiktel.com>
parents:
13219
diff
changeset
|
87 GAIM_SUBTYPE_SAVEDSTATUS |
|
6563
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
88 } GaimSubType; |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
89 |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
90 /** |
| 6562 | 91 * A wrapper for a type, subtype, and specific type of value. |
| 92 */ | |
| 93 typedef struct | |
| 94 { | |
| 95 GaimType type; | |
| 96 unsigned short flags; | |
| 97 | |
| 98 union | |
| 99 { | |
| 100 char char_data; | |
| 101 unsigned char uchar_data; | |
| 102 gboolean boolean_data; | |
| 103 short short_data; | |
| 104 unsigned short ushort_data; | |
| 105 int int_data; | |
| 106 unsigned int uint_data; | |
| 107 long long_data; | |
| 108 unsigned long ulong_data; | |
| 109 gint64 int64_data; | |
| 110 guint64 uint64_data; | |
| 111 char *string_data; | |
| 112 void *object_data; | |
| 113 void *pointer_data; | |
| 114 int enum_data; | |
| 115 void *boxed_data; | |
| 116 | |
| 117 } data; | |
| 118 | |
| 119 union | |
| 120 { | |
| 121 unsigned int subtype; | |
| 122 char *specific_type; | |
| 123 | |
| 124 } u; | |
| 125 | |
| 126 } GaimValue; | |
| 127 | |
|
6563
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
128 #ifdef __cplusplus |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
129 extern "C" { |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
130 #endif |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
131 |
| 6562 | 132 /** |
| 133 * Creates a new GaimValue. | |
| 134 * | |
| 135 * This function takes a type and, depending on that type, a sub-type | |
| 136 * or specific type. | |
| 137 * | |
| 10477 | 138 * If @a type is GAIM_TYPE_BOXED, the next parameter must be a |
| 6562 | 139 * string representing the specific type. |
| 140 * | |
| 141 * If @a type is GAIM_TYPE_SUBTYPE, the next parameter must be a | |
| 142 * integer or enum representing the sub-type. | |
| 143 * | |
| 144 * If the subtype or specific type is not set when required, random | |
| 145 * errors may occur. You have been warned. | |
| 146 * | |
| 147 * @param type The type. | |
| 148 * | |
| 149 * @return The new value. | |
| 150 */ | |
| 151 GaimValue *gaim_value_new(GaimType type, ...); | |
| 152 | |
| 153 /** | |
| 10477 | 154 * Creates a new outgoing GaimValue. If a value is an "outgoing" value |
| 155 * it means the value can be modified by plugins and scripts. | |
| 6562 | 156 * |
| 157 * This function takes a type and, depending on that type, a sub-type | |
| 158 * or specific type. | |
| 159 * | |
| 10477 | 160 * If @a type is GAIM_TYPE_BOXED, the next parameter must be a |
| 6562 | 161 * string representing the specific type. |
| 162 * | |
| 163 * If @a type is GAIM_TYPE_SUBTYPE, the next parameter must be a | |
| 164 * integer or enum representing the sub-type. | |
| 165 * | |
| 166 * If the sub-type or specific type is not set when required, random | |
| 167 * errors may occur. You have been warned. | |
| 168 * | |
| 169 * @param type The type. | |
| 170 * | |
| 171 * @return The new value. | |
| 172 */ | |
| 173 GaimValue *gaim_value_new_outgoing(GaimType type, ...); | |
| 174 | |
| 175 /** | |
| 176 * Destroys a GaimValue. | |
| 177 * | |
| 178 * @param value The value to destroy. | |
| 179 */ | |
| 180 void gaim_value_destroy(GaimValue *value); | |
| 181 | |
| 182 /** | |
|
8809
fde4101fa183
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
183 * Duplicated a GaimValue. |
|
fde4101fa183
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
184 * |
|
fde4101fa183
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
185 * @param value The value to duplicate. |
|
fde4101fa183
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
186 * |
|
fde4101fa183
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
187 * @return The duplicate value. |
|
fde4101fa183
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
188 */ |
|
fde4101fa183
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
189 GaimValue *gaim_value_dup(const GaimValue *value); |
|
fde4101fa183
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
190 |
|
fde4101fa183
[gaim-migrate @ 9571]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
191 /** |
| 6562 | 192 * Returns a value's type. |
| 193 * | |
| 10071 | 194 * @param value The value whose type you want. |
| 195 * | |
| 6562 | 196 * @return The value's type. |
| 197 */ | |
| 198 GaimType gaim_value_get_type(const GaimValue *value); | |
| 199 | |
| 200 /** | |
| 201 * Returns a value's subtype. | |
| 202 * | |
| 203 * If the value's type is not GAIM_TYPE_SUBTYPE, this will return 0. | |
| 204 * Subtypes should never have a subtype of 0. | |
| 205 * | |
| 10071 | 206 * @param value The value whose subtype you want. |
| 207 * | |
| 6562 | 208 * @return The value's subtype, or 0 if @a type is not GAIM_TYPE_SUBTYPE. |
| 209 */ | |
| 210 unsigned int gaim_value_get_subtype(const GaimValue *value); | |
| 211 | |
| 212 /** | |
| 213 * Returns a value's specific type. | |
| 214 * | |
| 215 * If the value's type is not GAIM_TYPE_BOXED, this will return @c NULL. | |
| 216 * | |
| 10071 | 217 * @param value The value whose specific type you want. |
| 218 * | |
| 6562 | 219 * @return The value's specific type, or @a NULL if not GAIM_TYPE_BOXED. |
| 220 */ | |
| 221 const char *gaim_value_get_specific_type(const GaimValue *value); | |
| 222 | |
| 223 /** | |
| 224 * Returns whether or not the value is an outgoing value. | |
| 225 * | |
| 226 * @param value The value. | |
| 227 * | |
| 228 * @return TRUE if the value is outgoing, or FALSE otherwise. | |
| 229 */ | |
| 230 gboolean gaim_value_is_outgoing(const GaimValue *value); | |
| 231 | |
| 232 /** | |
| 233 * Sets the value's character data. | |
| 234 * | |
| 235 * @param value The value. | |
| 236 * @param data The character data. | |
| 237 */ | |
| 238 void gaim_value_set_char(GaimValue *value, char data); | |
| 239 | |
| 240 /** | |
| 241 * Sets the value's unsigned character data. | |
| 242 * | |
| 243 * @param value The value. | |
| 244 * @param data The unsigned character data. | |
| 245 */ | |
| 246 void gaim_value_set_uchar(GaimValue *value, unsigned char data); | |
| 247 | |
| 248 /** | |
| 249 * Sets the value's boolean data. | |
| 250 * | |
| 251 * @param value The value. | |
| 252 * @param data The boolean data. | |
| 253 */ | |
| 254 void gaim_value_set_boolean(GaimValue *value, gboolean data); | |
| 255 | |
| 256 /** | |
| 257 * Sets the value's short integer data. | |
| 258 * | |
| 259 * @param value The value. | |
| 260 * @param data The short integer data. | |
| 261 */ | |
| 262 void gaim_value_set_short(GaimValue *value, short data); | |
| 263 | |
| 264 /** | |
| 265 * Sets the value's unsigned short integer data. | |
| 266 * | |
| 267 * @param value The value. | |
| 268 * @param data The unsigned short integer data. | |
| 269 */ | |
| 270 void gaim_value_set_ushort(GaimValue *value, unsigned short data); | |
| 271 | |
| 272 /** | |
| 273 * Sets the value's integer data. | |
| 274 * | |
| 275 * @param value The value. | |
| 276 * @param data The integer data. | |
| 277 */ | |
| 278 void gaim_value_set_int(GaimValue *value, int data); | |
| 279 | |
| 280 /** | |
| 281 * Sets the value's unsigned integer data. | |
| 282 * | |
| 283 * @param value The value. | |
| 284 * @param data The unsigned integer data. | |
| 285 */ | |
| 286 void gaim_value_set_uint(GaimValue *value, unsigned int data); | |
| 287 | |
| 288 /** | |
| 289 * Sets the value's long integer data. | |
| 290 * | |
| 291 * @param value The value. | |
| 292 * @param data The long integer data. | |
| 293 */ | |
| 294 void gaim_value_set_long(GaimValue *value, long data); | |
| 295 | |
| 296 /** | |
| 297 * Sets the value's unsigned long integer data. | |
| 298 * | |
| 299 * @param value The value. | |
| 300 * @param data The unsigned long integer data. | |
| 301 */ | |
| 302 void gaim_value_set_ulong(GaimValue *value, unsigned long data); | |
| 303 | |
| 304 /** | |
| 305 * Sets the value's 64-bit integer data. | |
| 306 * | |
| 307 * @param value The value. | |
| 308 * @param data The 64-bit integer data. | |
| 309 */ | |
| 310 void gaim_value_set_int64(GaimValue *value, gint64 data); | |
| 311 | |
| 312 /** | |
| 313 * Sets the value's unsigned 64-bit integer data. | |
| 314 * | |
| 315 * @param value The value. | |
| 316 * @param data The unsigned 64-bit integer data. | |
| 317 */ | |
| 318 void gaim_value_set_uint64(GaimValue *value, guint64 data); | |
| 319 | |
| 320 /** | |
| 321 * Sets the value's string data. | |
| 322 * | |
| 323 * @param value The value. | |
| 324 * @param data The string data. | |
| 325 */ | |
| 326 void gaim_value_set_string(GaimValue *value, const char *data); | |
| 327 | |
| 328 /** | |
| 329 * Sets the value's object data. | |
| 330 * | |
| 331 * @param value The value. | |
| 332 * @param data The object data. | |
| 333 */ | |
| 334 void gaim_value_set_object(GaimValue *value, void *data); | |
| 335 | |
| 336 /** | |
| 337 * Sets the value's pointer data. | |
| 338 * | |
| 339 * @param value The value. | |
| 340 * @param data The pointer data. | |
| 341 */ | |
| 342 void gaim_value_set_pointer(GaimValue *value, void *data); | |
| 343 | |
| 344 /** | |
| 345 * Sets the value's enum data. | |
| 346 * | |
| 347 * @param value The value. | |
| 348 * @param data The enum data. | |
| 349 */ | |
| 350 void gaim_value_set_enum(GaimValue *value, int data); | |
| 351 | |
| 352 /** | |
| 353 * Sets the value's boxed data. | |
| 354 * | |
| 355 * @param value The value. | |
| 356 * @param data The boxed data. | |
| 357 */ | |
| 358 void gaim_value_set_boxed(GaimValue *value, void *data); | |
| 359 | |
| 360 /** | |
| 361 * Returns the value's character data. | |
| 362 * | |
| 363 * @param value The value. | |
| 364 * | |
| 365 * @return The character data. | |
| 366 */ | |
| 367 char gaim_value_get_char(const GaimValue *value); | |
| 368 | |
| 369 /** | |
| 370 * Returns the value's unsigned character data. | |
| 371 * | |
| 372 * @param value The value. | |
| 373 * | |
| 374 * @return The unsigned character data. | |
| 375 */ | |
| 376 unsigned char gaim_value_get_uchar(const GaimValue *value); | |
| 377 | |
| 378 /** | |
| 379 * Returns the value's boolean data. | |
| 380 * | |
| 381 * @param value The value. | |
| 382 * | |
| 383 * @return The boolean data. | |
| 384 */ | |
| 385 gboolean gaim_value_get_boolean(const GaimValue *value); | |
| 386 | |
| 387 /** | |
| 388 * Returns the value's short integer data. | |
| 389 * | |
| 390 * @param value The value. | |
| 391 * | |
| 392 * @return The short integer data. | |
| 393 */ | |
| 394 short gaim_value_get_short(const GaimValue *value); | |
| 395 | |
| 396 /** | |
| 397 * Returns the value's unsigned short integer data. | |
| 398 * | |
| 399 * @param value The value. | |
| 400 * | |
| 401 * @return The unsigned short integer data. | |
| 402 */ | |
| 403 unsigned short gaim_value_get_ushort(const GaimValue *value); | |
| 404 | |
| 405 /** | |
| 406 * Returns the value's integer data. | |
| 407 * | |
| 408 * @param value The value. | |
| 409 * | |
| 410 * @return The integer data. | |
| 411 */ | |
| 412 int gaim_value_get_int(const GaimValue *value); | |
| 413 | |
| 414 /** | |
| 415 * Returns the value's unsigned integer data. | |
| 416 * | |
| 417 * @param value The value. | |
| 418 * | |
| 419 * @return The unsigned integer data. | |
| 420 */ | |
| 421 unsigned int gaim_value_get_uint(const GaimValue *value); | |
| 422 | |
| 423 /** | |
| 424 * Returns the value's long integer data. | |
| 425 * | |
| 426 * @param value The value. | |
| 427 * | |
| 428 * @return The long integer data. | |
| 429 */ | |
| 430 long gaim_value_get_long(const GaimValue *value); | |
| 431 | |
| 432 /** | |
| 433 * Returns the value's unsigned long integer data. | |
| 434 * | |
| 435 * @param value The value. | |
| 436 * | |
| 437 * @return The unsigned long integer data. | |
| 438 */ | |
| 439 unsigned long gaim_value_get_ulong(const GaimValue *value); | |
| 440 | |
| 441 /** | |
| 442 * Returns the value's 64-bit integer data. | |
| 443 * | |
| 444 * @param value The value. | |
| 445 * | |
| 446 * @return The 64-bit integer data. | |
| 447 */ | |
| 448 gint64 gaim_value_get_int64(const GaimValue *value); | |
| 449 | |
| 450 /** | |
| 451 * Returns the value's unsigned 64-bit integer data. | |
| 452 * | |
| 453 * @param value The value. | |
| 454 * | |
| 455 * @return The unsigned 64-bit integer data. | |
| 456 */ | |
| 457 guint64 gaim_value_get_uint64(const GaimValue *value); | |
| 458 | |
| 459 /** | |
| 460 * Returns the value's string data. | |
| 461 * | |
| 462 * @param value The value. | |
| 463 * | |
| 464 * @return The string data. | |
| 465 */ | |
| 466 const char *gaim_value_get_string(const GaimValue *value); | |
| 467 | |
| 468 /** | |
| 469 * Returns the value's object data. | |
| 470 * | |
| 471 * @param value The value. | |
| 472 * | |
| 473 * @return The object data. | |
| 474 */ | |
| 475 void *gaim_value_get_object(const GaimValue *value); | |
| 476 | |
| 477 /** | |
| 478 * Returns the value's pointer data. | |
| 479 * | |
| 480 * @param value The value. | |
| 481 * | |
| 482 * @return The pointer data. | |
| 483 */ | |
| 484 void *gaim_value_get_pointer(const GaimValue *value); | |
| 485 | |
| 486 /** | |
| 487 * Returns the value's enum data. | |
| 488 * | |
| 489 * @param value The value. | |
| 490 * | |
| 491 * @return The enum data. | |
| 492 */ | |
| 493 int gaim_value_get_enum(const GaimValue *value); | |
| 494 | |
| 495 /** | |
| 496 * Returns the value's boxed data. | |
| 497 * | |
| 498 * @param value The value. | |
| 499 * | |
| 500 * @return The boxed data. | |
| 501 */ | |
| 502 void *gaim_value_get_boxed(const GaimValue *value); | |
| 503 | |
|
6563
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
504 #ifdef __cplusplus |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
505 } |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
506 #endif |
|
122cb375be2d
[gaim-migrate @ 7085]
Christian Hammond <chipx86@chipx86.com>
parents:
6562
diff
changeset
|
507 |
| 6562 | 508 #endif /* _GAIM_VALUE_H_ */ |
