| libgalago Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
GalagoValue; enum GalagoType; GalagoValue * galago_value_new (GalagoType type,const void *data,void *detail); GalagoValue * galago_value_new_object (GType type,const GObject *obj); GalagoValue * galago_value_new_list (GalagoType type,GList *list,void *detail); GalagoValue * galago_value_new_array (GalagoType type,const void *array,gsize size,void *detail); void galago_value_destroy (GalagoValue *value); GalagoType galago_value_get_type (const GalagoValue *value); GalagoType galago_value_get_subtype (const GalagoValue *value); GType galago_value_get_gtype (const GalagoValue *value); void galago_value_set_char (GalagoValue *value,char data); void galago_value_set_uchar (GalagoValue *value,unsigned char data); void galago_value_set_boolean (GalagoValue *value,gboolean data); void galago_value_set_short (GalagoValue *value,short data Param2); void galago_value_set_ushort (GalagoValue *value,unsigned short data); void galago_value_set_int (GalagoValue *value,int data); void galago_value_set_uint (GalagoValue *value,unsigned int data); void galago_value_set_long (GalagoValue *value,long data Param2); void galago_value_set_ulong (GalagoValue *value,unsigned long data); void galago_value_set_string (GalagoValue *value,const char *data); void galago_value_set_object (GalagoValue *value,void *data); void galago_value_set_pointer (GalagoValue *value,void *data); void galago_value_set_list (GalagoValue *value,GList *data); void galago_value_set_array (GalagoValue *value,const void *data,gsize size); char galago_value_get_char (const GalagoValue *value); unsigned char galago_value_get_uchar (const GalagoValue *value); gboolean galago_value_get_boolean (const GalagoValue *value); short galago_value_get_short (const GalagoValue *value); unsigned short galago_value_get_ushort (const GalagoValue *value); int galago_value_get_int (const GalagoValue *value); unsigned int galago_value_get_uint (const GalagoValue *value); long galago_value_get_long (const GalagoValue *value); unsigned long galago_value_get_ulong (const GalagoValue *value); const char * galago_value_get_string (const GalagoValue *value); void * galago_value_get_object (const GalagoValue *value); void * galago_value_get_pointer (const GalagoValue *value); GList * galago_value_get_list (const GalagoValue *value); void galago_value_get_array (const GalagoValue *value,const void **ret_array,gsize *ret_size);
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.
typedef enum
{
GALAGO_VALUE_TYPE_UNKNOWN = 0, /* Unknown type. */
GALAGO_VALUE_TYPE_CHAR, /* Character. */
GALAGO_VALUE_TYPE_UCHAR, /* Unsigned character. */
GALAGO_VALUE_TYPE_BOOLEAN, /* Boolean. */
GALAGO_VALUE_TYPE_SHORT, /* Short integer. */
GALAGO_VALUE_TYPE_USHORT, /* Unsigned short integer. */
GALAGO_VALUE_TYPE_INT, /* Integer. */
GALAGO_VALUE_TYPE_UINT, /* Unsigned integer. */
GALAGO_VALUE_TYPE_LONG, /* Long integer. */
GALAGO_VALUE_TYPE_ULONG, /* Unsigned long integer. */
GALAGO_VALUE_TYPE_STRING, /* String. */
GALAGO_VALUE_TYPE_OBJECT, /* Object pointer. */
GALAGO_VALUE_TYPE_POINTER, /* Generic pointer. */
GALAGO_VALUE_TYPE_LIST, /* A list of values. */
GALAGO_VALUE_TYPE_ARRAY /* An array of values. */
} GalagoType;
| Unknown type. | |
| Character. | |
| Unsigned character. | |
| Boolean | |
| Short integer. | |
| Unsigned short integer. | |
| Integer. | |
| Unsigned integer. | |
| Long integer. | |
| Unsigned long integer. | |
| String. | |
| Object pointer. | |
| Generic pointer. | |
| A list of values. | |
| An array of values. |
GalagoValue * galago_value_new (GalagoType type,const void *data,void *detail);
Creates a new GalagoValue.
|
The type. |
|
The optional data to set. |
|
Extra detail, type-specific. Currently unused. |
Returns : |
The new value. |
GalagoValue * galago_value_new_object (GType type,const GObject *obj);
Creates a new, special GalagoValue that takes an object type and an optional object.
|
The GType. |
|
The object. |
Returns : |
The new value. |
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.
|
The type of list values. |
|
The optional default list of values. |
|
Extra detail, type-specific. |
Returns : |
The new value. |
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.
|
The type of list values. |
|
The optional default array of values. |
|
The size of the array. |
|
Extra detail, type-specific. |
Returns : |
The new value. |
void galago_value_destroy (GalagoValue *value);
Destroys a GalagoValue.
|
The GalagoValue. |
GalagoType galago_value_get_type (const GalagoValue *value);
Returns a GalagoValue's type.
|
The GalagoValue. |
Returns : |
The GalagoValue's type. |
GalagoType galago_value_get_subtype (const GalagoValue *value);
Returns a value's subtype. This is only usable for lists and arrays.
|
The GalagoValue. |
Returns : |
The value's list type. |
GType galago_value_get_gtype (const GalagoValue *value);
Returns the contained object's GType, if the GalagoValue's type is
GALAGO_VALUE_TYPE_OBJECT.
|
The GalagoValue. |
Returns : |
The object's GType, or NULL. |
void galago_value_set_char (GalagoValue *value,char data);
Sets the value's character data.
|
The GalagoValue. |
|
The character data. |
void galago_value_set_uchar (GalagoValue *value,unsigned char data);
Sets the value's unsigned char data.
|
The GalagoValue. |
|
The unsigned char data. |
void galago_value_set_boolean (GalagoValue *value,gboolean data);
Sets the value's boolean data.
|
The GalagoValue. |
|
The boolean data. |
void galago_value_set_short (GalagoValue *value,short data Param2);
Sets the value's short integer data.
|
The GalagoValue. |
|
The short integer data. |
void galago_value_set_ushort (GalagoValue *value,unsigned short data);
Sets the value's unsigned short integer data.
|
The GalagoValue. |
void galago_value_set_int (GalagoValue *value,int data);
Sets the value's integer data.
|
The GalagoValue. |
|
The integer data. |
void galago_value_set_uint (GalagoValue *value,unsigned int data);
Sets the value's unsigned integer data.
|
The GalagoValue. |
|
The unsigned integer data. |
void galago_value_set_long (GalagoValue *value,long data Param2);
Sets the value's long integer data.
|
The GalagoValue. |
|
The long integer data. |
void galago_value_set_ulong (GalagoValue *value,unsigned long data);
Sets the value's unsigned long integer data.
|
The GalagoValue. |
void galago_value_set_string (GalagoValue *value,const char *data);
Sets the value's string data.
|
The GalagoValue. |
|
The string data. |
void galago_value_set_object (GalagoValue *value,void *data);
Sets the value's object data.
|
The GalagoValue. |
|
The object data. |
void galago_value_set_pointer (GalagoValue *value,void *data);
Sets the value's pointer data.
|
The GalagoValue. |
|
The pointer data. |
void galago_value_set_list (GalagoValue *value,GList *data);
Sets the value's list of values.
|
The GalagoValue. |
|
The list of values. |
void galago_value_set_array (GalagoValue *value,const void *data,gsize size);
Sets the value's array of values.
|
The GalagoValue. |
|
The array of values. |
|
The size of the array. |
char galago_value_get_char (const GalagoValue *value);
Returns the value's char data.
|
The GalagoValue. |
Returns : |
The char data. |
unsigned char galago_value_get_uchar (const GalagoValue *value);
Returns the value's unsigned character data.
|
The GalagoValue. |
Returns : |
The unsigned char data. |
gboolean galago_value_get_boolean (const GalagoValue *value);
Returns the value's boolean data.
|
The GalagoValue. |
Returns : |
The boolean data. |
short galago_value_get_short (const GalagoValue *value);
Returns the value's short integer data.
|
The GalagoValue. |
Returns : |
The short integer data. |
unsigned short galago_value_get_ushort (const GalagoValue *value);
Returns the value's unsigned short integer data.
|
The GalagoValue. |
Returns : |
The unsigned short integer data. |
int galago_value_get_int (const GalagoValue *value);
Returns the value's integer data.
|
The GalagoValue. |
Returns : |
The integer data. |
unsigned int galago_value_get_uint (const GalagoValue *value);
Returns the value's unsigned integer data.
|
The GalagoValue. |
Returns : |
The unsigned integer data. |
long galago_value_get_long (const GalagoValue *value);
Returns the value's long integer data.
|
The GalagoValue. |
Returns : |
The long integer data. |
unsigned long galago_value_get_ulong (const GalagoValue *value);
Returns the value's unsigned long integer data.
|
The GalagoValue. |
Returns : |
The unsigned long integer data. |
const char * galago_value_get_string (const GalagoValue *value);
Returns the value's string data.
|
The GalagoValue. |
Returns : |
The string data. |
void * galago_value_get_object (const GalagoValue *value);
Returns the value's object data.
|
The GalagoValue. |
Returns : |
The object data. |
void * galago_value_get_pointer (const GalagoValue *value);
Returns the value's pointer data.
|
The GalagoValue. |
Returns : |
The pointer data. |
GList * galago_value_get_list (const GalagoValue *value);
Returns the value's list of values.
|
The GalagoValue. |
Returns : |
The 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.
|
The GalagoValue. |
|
The returned array. |
|
The returned size of the array. |