WockyRoster

WockyRoster — TODO

Synopsis

                    WockyRoster;
                    WockyRosterClass;
                    WockyRosterPrivate;
GQuark              wocky_roster_error_quark            (void);
enum                WockyRosterSubscriptionFlags;
enum                WockyRosterError;
#define             WOCKY_ROSTER_ERROR
WockyRoster *       wocky_roster_new                    (WockySession *session);
void                wocky_roster_fetch_roster_async     (WockyRoster *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            wocky_roster_fetch_roster_finish    (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);
WockyBareContact *  wocky_roster_get_contact            (WockyRoster *self,
                                                         const gchar *jid);
GSList *            wocky_roster_get_all_contacts       (WockyRoster *self);
void                wocky_roster_add_contact_async      (WockyRoster *self,
                                                         const gchar *jid,
                                                         const gchar *name,
                                                         const gchar * const *groups,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            wocky_roster_add_contact_finish     (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);
void                wocky_roster_remove_contact_async   (WockyRoster *self,
                                                         WockyBareContact *contact,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            wocky_roster_remove_contact_finish  (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);
void                wocky_roster_change_contact_name_async
                                                        (WockyRoster *self,
                                                         WockyBareContact *contact,
                                                         const gchar *name,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            wocky_roster_change_contact_name_finish
                                                        (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);
void                wocky_roster_contact_add_group_async
                                                        (WockyRoster *self,
                                                         WockyBareContact *contact,
                                                         const gchar *group,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            wocky_roster_contact_add_group_finish
                                                        (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);
void                wocky_roster_contact_remove_group_async
                                                        (WockyRoster *self,
                                                         WockyBareContact *contact,
                                                         const gchar *group,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            wocky_roster_contact_remove_group_finish
                                                        (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);
const gchar *       wocky_roster_subscription_to_string (WockyRosterSubscriptionFlags subscription);

Object Hierarchy

  GObject
   +----WockyRoster

Properties

  "session"                  WockySession*         : Read / Write / Construct Only

Signals

  "added"                                          : Run Last
  "removed"                                        : Run Last

Description

TODO

Details

WockyRoster

typedef struct _WockyRoster WockyRoster;


WockyRosterClass

typedef struct {
  GObjectClass parent_class;
} WockyRosterClass;


WockyRosterPrivate

typedef struct _WockyRosterPrivate WockyRosterPrivate;


wocky_roster_error_quark ()

GQuark              wocky_roster_error_quark            (void);

Get the error quark used by the roster.

Returns :

the quark for roster errors.

enum WockyRosterSubscriptionFlags

typedef enum
{
  WOCKY_ROSTER_SUBSCRIPTION_TYPE_NONE = 0,
  WOCKY_ROSTER_SUBSCRIPTION_TYPE_TO   = 1 << 0,
  WOCKY_ROSTER_SUBSCRIPTION_TYPE_FROM = 1 << 1,
  WOCKY_ROSTER_SUBSCRIPTION_TYPE_BOTH =
    WOCKY_ROSTER_SUBSCRIPTION_TYPE_TO | WOCKY_ROSTER_SUBSCRIPTION_TYPE_FROM,
  LAST_WOCKY_ROSTER_SUBSCRIPTION_TYPE = WOCKY_ROSTER_SUBSCRIPTION_TYPE_BOTH
} WockyRosterSubscriptionFlags;


enum WockyRosterError

typedef enum {
  WOCKY_ROSTER_ERROR_INVALID_STANZA,
  WOCKY_ROSTER_ERROR_NOT_IN_ROSTER,
} WockyRosterError;

The WockyRosterError specific errors.

WOCKY_ROSTER_ERROR_INVALID_STANZA

received an invalid roster stanza from the server

WOCKY_ROSTER_ERROR_NOT_IN_ROSTER

the contact is not in the roster

WOCKY_ROSTER_ERROR

#define WOCKY_ROSTER_ERROR (wocky_roster_error_quark ())

Get access to the error quark of the roster.


wocky_roster_new ()

WockyRoster *       wocky_roster_new                    (WockySession *session);

session :

Returns :


wocky_roster_fetch_roster_async ()

void                wocky_roster_fetch_roster_async     (WockyRoster *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

cancellable :

callback :

user_data :


wocky_roster_fetch_roster_finish ()

gboolean            wocky_roster_fetch_roster_finish    (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);

self :

result :

error :

Returns :


wocky_roster_get_contact ()

WockyBareContact *  wocky_roster_get_contact            (WockyRoster *self,
                                                         const gchar *jid);

self :

jid :

Returns :


wocky_roster_get_all_contacts ()

GSList *            wocky_roster_get_all_contacts       (WockyRoster *self);

self :

Returns :


wocky_roster_add_contact_async ()

void                wocky_roster_add_contact_async      (WockyRoster *self,
                                                         const gchar *jid,
                                                         const gchar *name,
                                                         const gchar * const *groups,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

jid :

name :

groups :

cancellable :

callback :

user_data :


wocky_roster_add_contact_finish ()

gboolean            wocky_roster_add_contact_finish     (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);

self :

result :

error :

Returns :


wocky_roster_remove_contact_async ()

void                wocky_roster_remove_contact_async   (WockyRoster *self,
                                                         WockyBareContact *contact,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

contact :

cancellable :

callback :

user_data :


wocky_roster_remove_contact_finish ()

gboolean            wocky_roster_remove_contact_finish  (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);

self :

result :

error :

Returns :


wocky_roster_change_contact_name_async ()

void                wocky_roster_change_contact_name_async
                                                        (WockyRoster *self,
                                                         WockyBareContact *contact,
                                                         const gchar *name,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

contact :

name :

cancellable :

callback :

user_data :


wocky_roster_change_contact_name_finish ()

gboolean            wocky_roster_change_contact_name_finish
                                                        (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);

self :

result :

error :

Returns :


wocky_roster_contact_add_group_async ()

void                wocky_roster_contact_add_group_async
                                                        (WockyRoster *self,
                                                         WockyBareContact *contact,
                                                         const gchar *group,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

contact :

group :

cancellable :

callback :

user_data :


wocky_roster_contact_add_group_finish ()

gboolean            wocky_roster_contact_add_group_finish
                                                        (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);

self :

result :

error :

Returns :


wocky_roster_contact_remove_group_async ()

void                wocky_roster_contact_remove_group_async
                                                        (WockyRoster *self,
                                                         WockyBareContact *contact,
                                                         const gchar *group,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

contact :

group :

cancellable :

callback :

user_data :


wocky_roster_contact_remove_group_finish ()

gboolean            wocky_roster_contact_remove_group_finish
                                                        (WockyRoster *self,
                                                         GAsyncResult *result,
                                                         GError **error);

self :

result :

error :

Returns :


wocky_roster_subscription_to_string ()

const gchar *       wocky_roster_subscription_to_string (WockyRosterSubscriptionFlags subscription);

subscription :

Returns :

Property Details

The "session" property

  "session"                  WockySession*         : Read / Write / Construct Only

the wocky session used by this roster.

Signal Details

The "added" signal

void                user_function                      (WockyRoster *wockyroster,
                                                        GObject     *arg1,
                                                        gpointer     user_data)        : Run Last

wockyroster :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "removed" signal

void                user_function                      (WockyRoster *wockyroster,
                                                        GObject     *arg1,
                                                        gpointer     user_data)        : Run Last

wockyroster :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.