![]() |
![]() |
![]() |
Wocky Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct WockyDiscoIdentity; GPtrArray * wocky_disco_identity_array_copy (const GPtrArray *source
); void wocky_disco_identity_array_free (GPtrArray *arr
); GPtrArray * wocky_disco_identity_array_new (void
); gint wocky_disco_identity_cmp (WockyDiscoIdentity *left
,WockyDiscoIdentity *right
); WockyDiscoIdentity * wocky_disco_identity_copy (const WockyDiscoIdentity *source
); void wocky_disco_identity_free (WockyDiscoIdentity *identity
); WockyDiscoIdentity * wocky_disco_identity_new (const gchar *category
,const gchar *type
,const gchar *lang
,const gchar *name
);
Contains information regarding the identity information in disco replies, as described in XEP-0030.
struct WockyDiscoIdentity { gchar *category; gchar *type; gchar *lang; gchar *name; };
A structure used to hold information regarding an identity from a disco reply as described in XEP-0030.
GPtrArray * wocky_disco_identity_array_copy (const GPtrArray *source
);
Copies an array of WockyDiscoIdentity objects. The returned array contains new copies of the contents of the source array.
|
The source array to be copied. |
Returns : |
A newly instantiated array with new copies of the contents of the
source array.
See: wocky_disco_identity_array_new()
|
void wocky_disco_identity_array_free (GPtrArray *arr
);
Frees an array of WockyDiscoIdentity objects created with
wocky_disco_identity_array_new()
or returned by
wocky_disco_identity_array_copy()
.
Note that if this method is called with an array created with
g_ptr_array_new()
, the caller should also free the array contents.
See: wocky_disco_identity_array_new()
, wocky_disco_identity_array_copy()
|
Array to be freed. |
GPtrArray * wocky_disco_identity_array_new (void
);
Creates a new array of WockyDiscoIdentity structures.
Returns : |
A newly instantiated
array. wocky_disco_identity_array_free() should beq used
to free the memory allocated by this array.
See: wocky_disco_identity_array_free()
|
gint wocky_disco_identity_cmp (WockyDiscoIdentity *left
,WockyDiscoIdentity *right
);
Compares left
and right
. It returns an integer less than, equal
to, or greater than zero if left
is found, respectively, to be
less than, to match, or be greater than right
.
This function can be casted to a GCompareFunc
to sort a list of
WockyDiscoIdentity structures.
|
a WockyDiscoIdentity |
|
a WockyDiscoIdentity |
Returns : |
the result of comparing left and right
|
WockyDiscoIdentity * wocky_disco_identity_copy (const WockyDiscoIdentity *source
);
Creates a new WockyDiscoIdentity structure with the data given by
source
. The copy also copies the internal data so source
can be
freed after this function is called.
|
the WockyDiscoIdentity to copy |
Returns : |
a new WockyDiscoIdentity which is a deep copy of source
|
void wocky_disco_identity_free (WockyDiscoIdentity *identity
);
Frees the memory used by identity
.
|
a WockyDiscoIdentity |
WockyDiscoIdentity * wocky_disco_identity_new (const gchar *category
,const gchar *type
,const gchar *lang
,const gchar *name
);
|
disco category |
|
disco type |
|
disco language |
|
disco name |
Returns : |
a new WockyDiscoIdentity which should be freed using
wocky_disco_identity_free() . |