|  |  |  | Wocky Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
#include <wocky/wocky-bare-contact.h> struct WockyBareContactClass; void wocky_bare_contact_add_group (WockyBareContact *contact,const gchar *group); void wocky_bare_contact_add_resource (WockyBareContact *contact,WockyResourceContact *resource); WockyBareContact * wocky_bare_contact_copy (WockyBareContact *contact); void wocky_bare_contact_debug_print (WockyBareContact *contact); gboolean wocky_bare_contact_equal (WockyBareContact *a,WockyBareContact *b); const gchar * const * wocky_bare_contact_get_groups (WockyBareContact *contact); const gchar * wocky_bare_contact_get_jid (WockyBareContact *contact); const gchar * wocky_bare_contact_get_name (WockyBareContact *contact); GSList * wocky_bare_contact_get_resources (WockyBareContact *contact); WockyRosterSubscriptionFlags wocky_bare_contact_get_subscription (WockyBareContact *contact); gboolean wocky_bare_contact_in_group (WockyBareContact *contact,const gchar *group); WockyBareContact * wocky_bare_contact_new (const gchar *jid); void wocky_bare_contact_remove_group (WockyBareContact *contact,const gchar *group); void wocky_bare_contact_set_groups (WockyBareContact *contact,gchar **groups); void wocky_bare_contact_set_name (WockyBareContact *contact,const gchar *name); void wocky_bare_contact_set_subscription (WockyBareContact *contact,WockyRosterSubscriptionFlags subscription);
Stores information regarding a roster item and provides a higher level API for altering its details.
void wocky_bare_contact_add_group (WockyBareContact *contact,const gchar *group);
Adds group to contact's groups.
| 
 | a WockyBareContact instance | 
| 
 | a group | 
void wocky_bare_contact_add_resource (WockyBareContact *contact,WockyResourceContact *resource);
Adds resource to the contact's resources.
The WockyBareContact instance doesn't assume a reference to resource.
| 
 | a WockyBareContact instance | 
| 
 | a WockyResourceContact instance | 
WockyBareContact *  wocky_bare_contact_copy             (WockyBareContact *contact);
Convenience function to obtain a copy of the given WockyBareContact.
| 
 | a WockyBareContact instance | 
| Returns : | a newly created WockyBareContact which is a copy of the given one. | 
void                wocky_bare_contact_debug_print      (WockyBareContact *contact);
Prints debug information for the given WockyBareContact.
| 
 | a WockyBareContact instance | 
gboolean wocky_bare_contact_equal (WockyBareContact *a,WockyBareContact *b);
Compares whether two WockyBareContact instances refer to the same roster item.
| 
 | a WockyBareContact instance | 
| 
 | a WockyBareContact instance to compare with a | 
| Returns : | TRUE if the two contacts match. | 
const gchar * const * wocky_bare_contact_get_groups     (WockyBareContact *contact);
Returns the list of the groups of contact.
| 
 | a WockyBareContact instance | 
| Returns : | a list of contact's groups | 
const gchar *       wocky_bare_contact_get_jid          (WockyBareContact *contact);
Returns the JID of the contact wrapped by contact.
| 
 | a WockyBareContact instance | 
| Returns : | contact's JID. | 
const gchar *       wocky_bare_contact_get_name         (WockyBareContact *contact);
Returns the name of the contact wrapped by contact.
| 
 | WockyBareContact instance | 
| Returns : | contact's name | 
GSList *            wocky_bare_contact_get_resources    (WockyBareContact *contact);
Gets a GSList of all the contact's resources. You should call g_slist_free on the list when done with it.
| 
 | a WockyBareContact instance | 
| Returns : | a GSList of WockyResourceContact objects. | 
WockyRosterSubscriptionFlags wocky_bare_contact_get_subscription
                                                        (WockyBareContact *contact);
Gets the subscription type contact has.
| 
 | a WockyBareContact instance | 
| Returns : | contact's subscription. | 
gboolean wocky_bare_contact_in_group (WockyBareContact *contact,const gchar *group);
Determines whether the given contact is in group.
| 
 | a WockyBareContact instance | 
| 
 | a group | 
| Returns : | TRUE if the contact is in the given group. | 
WockyBareContact *  wocky_bare_contact_new              (const gchar *jid);
Creates a new WockyBareContact for a given JID.
| 
 | the JID of the contact to create | 
| Returns : | a newly constructed WockyBareContact | 
void wocky_bare_contact_remove_group (WockyBareContact *contact,const gchar *group);
Removes group from the contact's groups.
| 
 | a WockyBareContact instance | 
| 
 | a group | 
void wocky_bare_contact_set_groups (WockyBareContact *contact,gchar **groups);
Sets contact's groups.
| 
 | a WockyBareContact instance | 
| 
 | a list of groups | 
void wocky_bare_contact_set_name (WockyBareContact *contact,const gchar *name);
Sets contact's name to name.
| 
 | a WockyBareContact instance | 
| 
 | the name to set contact | 
void wocky_bare_contact_set_subscription (WockyBareContact *contact,WockyRosterSubscriptionFlags subscription);
Sets the subscription of contact.
| 
 | a WockyBareContact instance | 
| 
 | the new subscription type |