WockyMuc

WockyMuc

Synopsis

                    WockyMuc;
                    WockyMucClass;
                    WockyMucPrivate;
enum                WockyMucStatusCode;
enum                WockyMucRole;
enum                WockyMucAffiliation;
enum                WockyMucFeature;
enum                WockyMucMsgType;
enum                WockyMucMsgState;
enum                WockyMucState;
                    WockyMucMember;
void                wocky_muc_disco_info_async          (WockyMuc *muc,
                                                         GAsyncReadyCallback callback,
                                                         GCancellable *cancel,
                                                         gpointer data);
gboolean            wocky_muc_disco_info_finish         (WockyMuc *muc,
                                                         GAsyncResult *res,
                                                         GError **error);
WockyStanza *       wocky_muc_create_presence           (WockyMuc *muc,
                                                         WockyStanzaSubType type,
                                                         const gchar *status,
                                                         const gchar *password);
void                wocky_muc_initiate_async            (WockyMuc *muc,
                                                         GAsyncReadyCallback callback,
                                                         GCancellable *cancel,
                                                         gpointer data);
gboolean            wocky_muc_initiate_finish           (GObject *source,
                                                         GAsyncResult *res,
                                                         GError **error);
void                wocky_muc_join                      (WockyMuc *muc,
                                                         GCancellable *cancel);
const gchar *       wocky_muc_jid                       (WockyMuc *muc);
const gchar *       wocky_muc_user                      (WockyMuc *muc);
WockyMucRole        wocky_muc_role                      (WockyMuc *muc);
WockyMucAffiliation  wocky_muc_affiliation              (WockyMuc *muc);
GHashTable *        wocky_muc_members                   (WockyMuc *muc);
WockyMucState       wocky_muc_get_state                 (WockyMuc *muc);

Object Hierarchy

  GObject
   +----WockyMuc

Properties

  "affiliation"              WockyMucAffiliation   : Read
  "category"                 gchar*                : Read
  "description"              gchar*                : Read
  "jid"                      gchar*                : Read / Write
  "muc-flags"                gulong                : Read
  "name"                     gchar*                : Read
  "nickname"                 gchar*                : Read
  "password"                 gchar*                : Read / Write
  "porter"                   WockyPorter*          : Read / Write / Construct Only
  "reserved-nick"            gchar*                : Read
  "role"                     guint                 : Read
  "room"                     gchar*                : Read
  "service"                  gchar*                : Read
  "status-message"           gchar*                : Read
  "type"                     gchar*                : Read
  "user"                     gchar*                : Read / Write / Construct Only

Signals

  "error"                                          : Run Last
  "fill-presence"                                  : Run Last
  "joined"                                         : Run Last
  "left"                                           : Run Last
  "message"                                        : Run Last
  "message-error"                                  : Run Last
  "nick-change"                                    : Run Last
  "own-presence"                                   : Run Last
  "parted"                                         : Run Last
  "permissions"                                    : Run Last
  "presence"                                       : Run Last

Description

Details

WockyMuc

typedef struct _WockyMuc WockyMuc;


WockyMucClass

typedef struct {
    GObjectClass parent_class;
} WockyMucClass;


WockyMucPrivate

typedef struct _WockyMucPrivate WockyMucPrivate;


enum WockyMucStatusCode

typedef enum {
  WOCKY_MUC_CODE_UNKNOWN = 0,
  WOCKY_MUC_CODE_ONYMOUS,
  WOCKY_MUC_CODE_AF_CHANGE_OOB,
  WOCKY_MUC_CODE_CFG_SHOW_UNAVAILABLE,
  WOCKY_MUC_CODE_CFG_HIDE_UNAVAILABLE,
  WOCKY_MUC_CODE_CFG_NONPRIVACY,
  WOCKY_MUC_CODE_OWN_PRESENCE,
  WOCKY_MUC_CODE_CFG_LOGGING_ENABLED,
  WOCKY_MUC_CODE_CFG_LOGGING_DISABLED,
  WOCKY_MUC_CODE_CFG_ONYMOUS,
  WOCKY_MUC_CODE_CFG_SEMIONYMOUS,
  WOCKY_MUC_CODE_CFG_ANONYMOUS,
  WOCKY_MUC_CODE_NEW_ROOM,
  WOCKY_MUC_CODE_NICK_CHANGE_FORCED,
  WOCKY_MUC_CODE_BANNED,
  WOCKY_MUC_CODE_NICK_CHANGE_USER,
  WOCKY_MUC_CODE_KICKED,
  WOCKY_MUC_CODE_KICKED_AFFILIATION,
  WOCKY_MUC_CODE_KICKED_ROOM_PRIVATISED,
  WOCKY_MUC_CODE_KICKED_SHUTDOWN,
} WockyMucStatusCode;

WOCKY_MUC_CODE_UNKNOWN

WOCKY_MUC_CODE_ONYMOUS

Room entered is not anonymous

WOCKY_MUC_CODE_AF_CHANGE_OOB

Affiliation changed when not present

WOCKY_MUC_CODE_CFG_SHOW_UNAVAILABLE

Unavailable members visible

WOCKY_MUC_CODE_CFG_HIDE_UNAVAILABLE

Unavailable members invisible

WOCKY_MUC_CODE_CFG_NONPRIVACY

Non-privacy config change

WOCKY_MUC_CODE_OWN_PRESENCE

User's own presence

WOCKY_MUC_CODE_CFG_LOGGING_ENABLED

Logging enabled

WOCKY_MUC_CODE_CFG_LOGGING_DISABLED

Logging disabled

WOCKY_MUC_CODE_CFG_ONYMOUS

Room is now non-anonymous

WOCKY_MUC_CODE_CFG_SEMIONYMOUS

Room is now semi-anonymous

WOCKY_MUC_CODE_CFG_ANONYMOUS

Room is now fully-anonymous

WOCKY_MUC_CODE_NEW_ROOM

Room created (eg by joining)

WOCKY_MUC_CODE_NICK_CHANGE_FORCED

Service enforced nick change

WOCKY_MUC_CODE_BANNED

User has been banned

WOCKY_MUC_CODE_NICK_CHANGE_USER

User's nick changed

WOCKY_MUC_CODE_KICKED

Kicked from the room

WOCKY_MUC_CODE_KICKED_AFFILIATION

Kicked (affiliation change)

WOCKY_MUC_CODE_KICKED_ROOM_PRIVATISED

Kicked (room is now members-only)

WOCKY_MUC_CODE_KICKED_SHUTDOWN

Kicked (shutdown)

enum WockyMucRole

typedef enum {
  WOCKY_MUC_ROLE_NONE = 0,
  WOCKY_MUC_ROLE_VISITOR,
  WOCKY_MUC_ROLE_PARTICIPANT,
  WOCKY_MUC_ROLE_MODERATOR
} WockyMucRole;


enum WockyMucAffiliation

typedef enum {
  WOCKY_MUC_AFFILIATION_OUTCAST = -1,
  WOCKY_MUC_AFFILIATION_NONE = 0,
  WOCKY_MUC_AFFILIATION_MEMBER,
  WOCKY_MUC_AFFILIATION_ADMIN,
  WOCKY_MUC_AFFILIATION_OWNER,
} WockyMucAffiliation;


enum WockyMucFeature

typedef enum {
  WOCKY_MUC_MODERN            = 1,
  WOCKY_MUC_FORM_REGISTER     = (1 << 1),
  WOCKY_MUC_FORM_ROOMCONFIG   = (1 << 2),
  WOCKY_MUC_FORM_ROOMINFO     = (1 << 3),
  WOCKY_MUC_HIDDEN            = (1 << 4),
  WOCKY_MUC_MEMBERSONLY       = (1 << 5),
  WOCKY_MUC_MODERATED         = (1 << 6),
  WOCKY_MUC_NONANONYMOUS      = (1 << 7),
  WOCKY_MUC_OPEN              = (1 << 8),
  WOCKY_MUC_PASSWORDPROTECTED = (1 << 9),
  WOCKY_MUC_PERSISTENT        = (1 << 10),
  WOCKY_MUC_PUBLIC            = (1 << 11),
  WOCKY_MUC_ROOMS             = (1 << 12),
  WOCKY_MUC_SEMIANONYMOUS     = (1 << 13),
  WOCKY_MUC_TEMPORARY         = (1 << 14),
  WOCKY_MUC_UNMODERATED       = (1 << 15),
  WOCKY_MUC_UNSECURED         = (1 << 16),
  WOCKY_MUC_OBSOLETE          = (1 << 17),
} WockyMucFeature;


enum WockyMucMsgType

typedef enum {
  WOCKY_MUC_MSG_NONE,
  WOCKY_MUC_MSG_NORMAL,
  WOCKY_MUC_MSG_ACTION,
  WOCKY_MUC_MSG_NOTICE,
} WockyMucMsgType;


enum WockyMucMsgState

typedef enum {
  WOCKY_MUC_MSG_STATE_NONE = -1,
  WOCKY_MUC_MSG_STATE_ACTIVE,
  WOCKY_MUC_MSG_STATE_TYPING,
  WOCKY_MUC_MSG_STATE_INACTIVE,
  WOCKY_MUC_MSG_STATE_PAUSED,
} WockyMucMsgState;


enum WockyMucState

typedef enum {
  WOCKY_MUC_CREATED = 0,
  WOCKY_MUC_INITIATED,
  WOCKY_MUC_AUTH,
  WOCKY_MUC_JOINED,
  WOCKY_MUC_ENDED,
} WockyMucState;


WockyMucMember

typedef struct {
  gchar *from;   /* room@service/nick     */
  gchar *jid;    /* owner@domain/resource */
  gchar *nick;   /* nick */
  WockyMucRole role;
  WockyMucAffiliation affiliation;
  gchar *status; /* user set status string */
  WockyStanza *presence_stanza;
} WockyMucMember;


wocky_muc_disco_info_async ()

void                wocky_muc_disco_info_async          (WockyMuc *muc,
                                                         GAsyncReadyCallback callback,
                                                         GCancellable *cancel,
                                                         gpointer data);

muc :

callback :

cancel :

data :


wocky_muc_disco_info_finish ()

gboolean            wocky_muc_disco_info_finish         (WockyMuc *muc,
                                                         GAsyncResult *res,
                                                         GError **error);

muc :

res :

error :

Returns :


wocky_muc_create_presence ()

WockyStanza *       wocky_muc_create_presence           (WockyMuc *muc,
                                                         WockyStanzaSubType type,
                                                         const gchar *status,
                                                         const gchar *password);

muc :

type :

status :

password :

Returns :


wocky_muc_initiate_async ()

void                wocky_muc_initiate_async            (WockyMuc *muc,
                                                         GAsyncReadyCallback callback,
                                                         GCancellable *cancel,
                                                         gpointer data);

muc :

callback :

cancel :

data :


wocky_muc_initiate_finish ()

gboolean            wocky_muc_initiate_finish           (GObject *source,
                                                         GAsyncResult *res,
                                                         GError **error);

source :

res :

error :

Returns :


wocky_muc_join ()

void                wocky_muc_join                      (WockyMuc *muc,
                                                         GCancellable *cancel);

muc :

cancel :


wocky_muc_jid ()

const gchar *       wocky_muc_jid                       (WockyMuc *muc);

muc :

Returns :


wocky_muc_user ()

const gchar *       wocky_muc_user                      (WockyMuc *muc);

muc :

Returns :


wocky_muc_role ()

WockyMucRole        wocky_muc_role                      (WockyMuc *muc);

muc :

Returns :


wocky_muc_affiliation ()

WockyMucAffiliation  wocky_muc_affiliation              (WockyMuc *muc);

muc :

Returns :


wocky_muc_members ()

GHashTable *        wocky_muc_members                   (WockyMuc *muc);

muc :

Returns :


wocky_muc_get_state ()

WockyMucState       wocky_muc_get_state                 (WockyMuc *muc);

muc :

Returns :

Property Details

The "affiliation" property

  "affiliation"              WockyMucAffiliation   : Read

The affiliation of the user with the MUC room.

Default value: WOCKY_MUC_AFFILIATION_NONE


The "category" property

  "category"                 gchar*                : Read

Category of the MUC, usually "conference".

Default value: NULL


The "description" property

  "description"              gchar*                : Read

The long description oof the room.

Default value: NULL


The "jid" property

  "jid"                      gchar*                : Read / Write

Full room@service/nick JID of the MUC room.

Default value: NULL


The "muc-flags" property

  "muc-flags"                gulong                : Read

ORed set of WockyMucFeature MUC property flags.


The "name" property

  "name"                     gchar*                : Read

The human-readable name of the room (usually a short label).

Default value: NULL


The "nickname" property

  "nickname"                 gchar*                : Read

The user's in-room nickname.

Default value: NULL


The "password" property

  "password"                 gchar*                : Read / Write

User's MUC room password.

Default value: NULL


The "porter" property

  "porter"                   WockyPorter*          : Read / Write / Construct Only

The WockyPorter instance doing all the actual XMPP interaction.


The "reserved-nick" property

  "reserved-nick"            gchar*                : Read

The user's reserved in-room nickname, if any.

Default value: NULL


The "role" property

  "role"                     guint                 : Read

The role (WockyMucRole) of the user in the MUC room.

Allowed values: <= 3

Default value: 0


The "room" property

  "room"                     gchar*                : Read

The node part of the MUC room JID.

Default value: NULL


The "service" property

  "service"                  gchar*                : Read

The service (domain) part of the MUC JID.

Default value: NULL


The "status-message" property

  "status-message"           gchar*                : Read

User's MUC status message.

Default value: NULL


The "type" property

  "type"                     gchar*                : Read

Type of the MUC, eg "text".

Default value: NULL


The "user" property

  "user"                     gchar*                : Read / Write / Construct Only

Full JID of the user (node@domain/resource) who is connecting.

Default value: NULL

Signal Details

The "error" signal

void                user_function                      (WockyMuc      *wockymuc,
                                                        WockyStanza   *arg1,
                                                        WockyXmppError arg2,
                                                        gchar         *arg3,
                                                        gpointer       user_data)      : Run Last

wockymuc :

the object which received the signal.

arg1 :

arg2 :

arg3 :

user_data :

user data set when the signal handler was connected.

The "fill-presence" signal

void                user_function                      (WockyMuc    *wockymuc,
                                                        WockyStanza *arg1,
                                                        gpointer     user_data)      : Run Last

wockymuc :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "joined" signal

void                user_function                      (WockyMuc    *wockymuc,
                                                        WockyStanza *arg1,
                                                        GHashTable  *arg2,
                                                        gpointer     user_data)      : Run Last

wockymuc :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "left" signal

void                user_function                      (WockyMuc    *wockymuc,
                                                        WockyStanza *arg1,
                                                        GHashTable  *arg2,
                                                        gpointer     arg3,
                                                        gchar       *arg4,
                                                        gchar       *arg5,
                                                        gchar       *arg6,
                                                        gpointer     user_data)      : Run Last

wockymuc :

the object which received the signal.

arg1 :

arg2 :

arg3 :

arg4 :

arg5 :

arg6 :

user_data :

user data set when the signal handler was connected.

The "message" signal

void                user_function                      (WockyMuc        *wockymuc,
                                                        WockyStanza     *arg1,
                                                        WockyMucMsgType  arg2,
                                                        gchar           *arg3,
                                                        glong            arg4,
                                                        gpointer         arg5,
                                                        gchar           *arg6,
                                                        gchar           *arg7,
                                                        WockyMucMsgState arg8,
                                                        gpointer         user_data)      : Run Last

wockymuc :

the object which received the signal.

arg1 :

arg2 :

arg3 :

arg4 :

arg5 :

arg6 :

arg7 :

arg8 :

user_data :

user data set when the signal handler was connected.

The "message-error" signal

void                user_function                      (WockyMuc          *wockymuc,
                                                        WockyStanza       *arg1,
                                                        WockyMucMsgType    arg2,
                                                        gchar             *arg3,
                                                        glong              arg4,
                                                        gpointer           arg5,
                                                        gchar             *arg6,
                                                        WockyXmppError     arg7,
                                                        WockyXmppErrorType arg8,
                                                        gpointer           user_data)      : Run Last

wockymuc :

the object which received the signal.

arg1 :

arg2 :

arg3 :

arg4 :

arg5 :

arg6 :

arg7 :

arg8 :

user_data :

user data set when the signal handler was connected.

The "nick-change" signal

void                user_function                      (WockyMuc    *wockymuc,
                                                        WockyStanza *arg1,
                                                        GHashTable  *arg2,
                                                        gpointer     user_data)      : Run Last

wockymuc :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "own-presence" signal

void                user_function                      (WockyMuc    *wockymuc,
                                                        WockyStanza *arg1,
                                                        GHashTable  *arg2,
                                                        gpointer     user_data)      : Run Last

wockymuc :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "parted" signal

void                user_function                      (WockyMuc    *wockymuc,
                                                        WockyStanza *arg1,
                                                        GHashTable  *arg2,
                                                        gchar       *arg3,
                                                        gchar       *arg4,
                                                        gchar       *arg5,
                                                        gpointer     user_data)      : Run Last

wockymuc :

the object which received the signal.

arg1 :

arg2 :

arg3 :

arg4 :

arg5 :

user_data :

user data set when the signal handler was connected.

The "permissions" signal

void                user_function                      (WockyMuc    *wockymuc,
                                                        WockyStanza *arg1,
                                                        GHashTable  *arg2,
                                                        gchar       *arg3,
                                                        gchar       *arg4,
                                                        gpointer     user_data)      : Run Last

wockymuc :

the object which received the signal.

arg1 :

arg2 :

arg3 :

arg4 :

user_data :

user data set when the signal handler was connected.

The "presence" signal

void                user_function                      (WockyMuc    *wockymuc,
                                                        WockyStanza *arg1,
                                                        GHashTable  *arg2,
                                                        gpointer     arg3,
                                                        gpointer     user_data)      : Run Last

wockymuc :

the object which received the signal.

arg1 :

arg2 :

arg3 :

user_data :

user data set when the signal handler was connected.