| Wocky Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
enum WockyMucAffiliation; struct WockyMucClass; enum WockyMucFeature; WockyMucMember; enum WockyMucMsgState; enum WockyMucMsgType; enum WockyMucRole; enum WockyMucState; enum WockyMucStatusCode; WockyMucAffiliation wocky_muc_affiliation (WockyMuc *muc); WockyStanza * wocky_muc_create_presence (WockyMuc *muc,WockyStanzaSubType type,const gchar *status); 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); WockyMucState wocky_muc_get_state (WockyMuc *muc); void wocky_muc_initiate_async (WockyMuc *muc,GAsyncReadyCallback callback,GCancellable *cancel,gpointer data); gboolean wocky_muc_initiate_finish (GObject *source,GAsyncResult *res,GError **error); const gchar * wocky_muc_jid (WockyMuc *muc); void wocky_muc_join (WockyMuc *muc,GCancellable *cancel); GHashTable * wocky_muc_members (WockyMuc *muc); WockyMucRole wocky_muc_role (WockyMuc *muc); const gchar * wocky_muc_user (WockyMuc *muc);
GEnum +----WockyMucAffiliation
GFlags +----WockyMucFeature
GEnum +----WockyMucMsgState
GEnum +----WockyMucMsgType
GEnum +----WockyMucRole
GEnum +----WockyMucState
GFlags +----WockyMucStatusCode
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;
WockyMuc affiliations as described in XEP-0045 §5.2.
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;
WockyMuc feature flags.
| the MUC is modern, as documented in XEP-0045 | |
| the MUC has support for the mucregister FORM_TYPE | |
| the MUC has support for the mucregister FORM_TYPE | |
| the MUC has support for the mucregister FORM_TYPE | |
| the MUC is hidden | |
| only members can join this MUC | |
| the MUC is moderated | |
| the MUC is non-anonymous | |
| the MUC is open | |
| the MUC is password protected | |
| the MUC is persistent | |
| the MUC is public | |
| the MUC has a list of MUC rooms | |
| the MUC is semi-anonymous | |
| the MUC is temporary | |
| the MUC is unmoderated | |
| the MUC is unsecured | |
| the MUC has obsolete groupchat 1.0 features |
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;
gchar * |
the JID of the member (roomserver/nick) |
gchar * |
the JID of the owner (ownerdomain/resource) |
gchar * |
the nickname of the member |
WockyMucRole |
the WockyMucRole of the member |
WockyMucAffiliation |
the WockyMucAffiliation of the member |
gchar * |
the user set status string |
| the WockyStanza that was received regarding the member's presence |
typedef enum {
WOCKY_MUC_MSG_STATE_NONE = -1,
WOCKY_MUC_MSG_STATE_ACTIVE,
WOCKY_MUC_MSG_STATE_COMPOSING,
WOCKY_MUC_MSG_STATE_INACTIVE,
WOCKY_MUC_MSG_STATE_PAUSED,
} WockyMucMsgState;
XMPP MUC message states as documeted in XEP-0085.
| no message state applies | |
| the contact in the MUC is active | |
| the contact in the MUC is composing a message | |
| the contact in the MUC is inactive | |
| the contact in the MUC has paused composing a message |
typedef enum {
WOCKY_MUC_MSG_NONE,
WOCKY_MUC_MSG_NORMAL,
WOCKY_MUC_MSG_ACTION,
WOCKY_MUC_MSG_NOTICE,
} WockyMucMsgType;
XMPP MUC message types.
typedef enum {
WOCKY_MUC_ROLE_NONE = 0,
WOCKY_MUC_ROLE_VISITOR,
WOCKY_MUC_ROLE_PARTICIPANT,
WOCKY_MUC_ROLE_MODERATOR
} WockyMucRole;
WockyMuc roles as described in XEP-0045 §5.1.
typedef enum {
WOCKY_MUC_CREATED = 0,
WOCKY_MUC_INITIATED,
WOCKY_MUC_AUTH,
WOCKY_MUC_JOINED,
WOCKY_MUC_ENDED,
} WockyMucState;
WockyMuc states.
typedef enum {
WOCKY_MUC_CODE_UNKNOWN = 0,
WOCKY_MUC_CODE_ONYMOUS = 1 << 0,
WOCKY_MUC_CODE_AF_CHANGE_OOB = 1 << 1,
WOCKY_MUC_CODE_CFG_SHOW_UNAVAILABLE = 1 << 2,
WOCKY_MUC_CODE_CFG_HIDE_UNAVAILABLE = 1 << 3,
WOCKY_MUC_CODE_CFG_NONPRIVACY = 1 << 4,
WOCKY_MUC_CODE_OWN_PRESENCE = 1 << 5,
WOCKY_MUC_CODE_CFG_LOGGING_ENABLED = 1 << 6,
WOCKY_MUC_CODE_CFG_LOGGING_DISABLED = 1 << 7,
WOCKY_MUC_CODE_CFG_ONYMOUS = 1 << 8,
WOCKY_MUC_CODE_CFG_SEMIONYMOUS = 1 << 9,
WOCKY_MUC_CODE_CFG_ANONYMOUS = 1 << 10,
WOCKY_MUC_CODE_NEW_ROOM = 1 << 11,
WOCKY_MUC_CODE_NICK_CHANGE_FORCED = 1 << 12,
WOCKY_MUC_CODE_BANNED = 1 << 13,
WOCKY_MUC_CODE_NICK_CHANGE_USER = 1 << 14,
WOCKY_MUC_CODE_KICKED = 1 << 15,
WOCKY_MUC_CODE_KICKED_AFFILIATION = 1 << 16,
WOCKY_MUC_CODE_KICKED_ROOM_PRIVATISED = 1 << 17,
WOCKY_MUC_CODE_KICKED_SHUTDOWN = 1 << 18,
} WockyMucStatusCode;
MUC status codes, as defined by XEP-0045 §15.6.
| Unknown code | |
| Room entered is not anonymous | |
| Affiliation changed when not present | |
| Unavailable members visible | |
| Unavailable members invisible | |
| Non-privacy config change | |
| User's own presence | |
| Logging enabled | |
| Logging disabled | |
| Room is now non-anonymous | |
| Room is now semi-anonymous | |
| Room is now fully-anonymous | |
| Room created (eg by joining) | |
| Service enforced nick change | |
| User has been banned | |
| User's nick changed | |
| Kicked from the room | |
| Kicked (affiliation change) | |
| Kicked (room is now members-only) | |
| Kicked (shutdown) |
WockyStanza * wocky_muc_create_presence (WockyMuc *muc,WockyStanzaSubType type,const gchar *status);
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);
void wocky_muc_initiate_async (WockyMuc *muc,GAsyncReadyCallback callback,GCancellable *cancel,gpointer data);
gboolean wocky_muc_initiate_finish (GObject *source,GAsyncResult *res,GError **error);