comparison libpurple/value.h @ 32819:2c6510167895 default tip

propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24) to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 02 Jun 2012 02:30:49 +0000
parents 98520ee78f12
children
comparison
equal deleted inserted replaced
32818:01ff09d4a463 32819:2c6510167895
84 } PurpleSubType; 84 } PurpleSubType;
85 85
86 /** 86 /**
87 * A wrapper for a type, subtype, and specific type of value. 87 * A wrapper for a type, subtype, and specific type of value.
88 */ 88 */
89 typedef struct 89 typedef struct _PurpleValue PurpleValue;
90 { 90
91 PurpleType type; 91 G_BEGIN_DECLS
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
122 } PurpleValue;
123
124 #ifdef __cplusplus
125 extern "C" {
126 #endif
127 92
128 /** 93 /**
129 * Creates a new PurpleValue. 94 * Creates a new PurpleValue.
130 * 95 *
131 * This function takes a type and, depending on that type, a sub-type 96 * This function takes a type and, depending on that type, a sub-type
495 * 460 *
496 * @return The boxed data. 461 * @return The boxed data.
497 */ 462 */
498 void *purple_value_get_boxed(const PurpleValue *value); 463 void *purple_value_get_boxed(const PurpleValue *value);
499 464
500 #ifdef __cplusplus 465 G_END_DECLS
501 }
502 #endif
503 466
504 #endif /* _PURPLE_VALUE_H_ */ 467 #endif /* _PURPLE_VALUE_H_ */