Top | ![]() |
![]() |
![]() |
![]() |
This is a generic data type container, similar in ways to GValue. It was originally written before libgalago was glib-based. It will go away in time, to be replaced with GValue. Currently, this is used only in the D-BUS utility functions.
GalagoValue * galago_value_new (GalagoType type
,const void *data
,void *detail
);
Creates a new GalagoValue.
GalagoValue * galago_value_new_object (GType type
,const GObject *obj
);
Creates a new, special GalagoValue that takes an object type and an optional object.
GalagoValue * galago_value_new_list (GalagoType type
,GList *list
,void *detail
);
Creates a new, special GalagoValue that takes only a list of values of the specified type.
If type
is GALAGO_VALUE_TYPE_OBJECT
, detail
must be the class type.
GalagoValue * galago_value_new_array (GalagoType type
,const void *array
,gsize size
,void *detail
);
Creates a new, special GalagoValue that takes only an array of values of the specified type.
If type
is GALAGO_VALUE_TYPE_OBJECT
, detail
must be the class type.
GalagoType
galago_value_get_type (const GalagoValue *value
);
Returns a GalagoValue's type.
GalagoType
galago_value_get_subtype (const GalagoValue *value
);
Returns a value's subtype. This is only usable for lists and arrays.
GType
galago_value_get_gtype (const GalagoValue *value
);
Returns the contained object's GType, if the GalagoValue's type is
GALAGO_VALUE_TYPE_OBJECT
.
void galago_value_set_char (GalagoValue *value
,char data
);
Sets the value's character data.
void galago_value_set_uchar (GalagoValue *value
,unsigned char data
);
Sets the value's unsigned char data.
void galago_value_set_boolean (GalagoValue *value
,gboolean data
);
Sets the value's boolean data.
void galago_value_set_short (GalagoValue *value
,short data Param2
);
Sets the value's short integer data.
void galago_value_set_ushort (GalagoValue *value
,unsigned short data
);
Sets the value's unsigned short integer data.
void galago_value_set_int (GalagoValue *value
,int data
);
Sets the value's integer data.
void galago_value_set_uint (GalagoValue *value
,unsigned int data
);
Sets the value's unsigned integer data.
void galago_value_set_long (GalagoValue *value
,long data Param2
);
Sets the value's long integer data.
void galago_value_set_ulong (GalagoValue *value
,unsigned long data
);
Sets the value's unsigned long integer data.
void galago_value_set_string (GalagoValue *value
,const char *data
);
Sets the value's string data.
void galago_value_set_object (GalagoValue *value
,void *data
);
Sets the value's object data.
void galago_value_set_pointer (GalagoValue *value
,void *data
);
Sets the value's pointer data.
void galago_value_set_list (GalagoValue *value
,GList *data
);
Sets the value's list of values.
void galago_value_set_array (GalagoValue *value
,const void *data
,gsize size
);
Sets the value's array of values.
char
galago_value_get_char (const GalagoValue *value
);
Returns the value's char data.
unsigned char
galago_value_get_uchar (const GalagoValue *value
);
Returns the value's unsigned character data.
gboolean
galago_value_get_boolean (const GalagoValue *value
);
Returns the value's boolean data.
short
galago_value_get_short (const GalagoValue *value
);
Returns the value's short integer data.
unsigned short
galago_value_get_ushort (const GalagoValue *value
);
Returns the value's unsigned short integer data.
int
galago_value_get_int (const GalagoValue *value
);
Returns the value's integer data.
unsigned int
galago_value_get_uint (const GalagoValue *value
);
Returns the value's unsigned integer data.
long
galago_value_get_long (const GalagoValue *value
);
Returns the value's long integer data.
unsigned long
galago_value_get_ulong (const GalagoValue *value
);
Returns the value's unsigned long integer data.
const char *
galago_value_get_string (const GalagoValue *value
);
Returns the value's string data.
void *
galago_value_get_object (const GalagoValue *value
);
Returns the value's object data.
void *
galago_value_get_pointer (const GalagoValue *value
);
Returns the value's pointer data.
GList *
galago_value_get_list (const GalagoValue *value
);
Returns the value's list of values.
void galago_value_get_array (const GalagoValue *value
,const void **ret_array
,gsize *ret_size
);
Returns the value's array of values.
value |
The GalagoValue. |
|
ret_array |
The returned array. |
|
ret_size |
The returned size of the array. |