mw_message.h(3)

NAME
mw_message.h -

SYNOPSIS

#include <glib/glist.h>
#include 'mw_common.h'

  Data Structures
struct mwEncryptAccept
a selected encryption item from those offered
struct mwEncryptOffer
an offer of encryption items
struct mwMessage
struct mwMsgAdmin
An administrative broadcast message.
struct mwMsgAnnounce
An announcement between users.
struct mwMsgChannelAccept
struct mwMsgChannelCreate
struct mwMsgChannelDestroy
struct mwMsgChannelSend
struct mwMsgHandshake
struct mwMsgHandshakeAck
struct mwMsgLogin
struct mwMsgLoginAck
struct mwMsgLoginContinue
struct mwMsgLoginRedirect
struct mwMsgSenseService
Sent to the server to request the presense of a service by its ID.
struct mwMsgSetPrivacyList
struct mwMsgSetUserStatus

  Defines
#define MW_MESSAGE(msg) (&msg->head)
Cast a pointer to a message subtype (eg, mwMsgHandshake, mwMsgAdmin) into a pointer to a mwMessage.
#define MW_MESSAGE_HAS_OPTION(msg, opt) ((msg)->options & (opt))

  Enumerations
enum mwAuthType { mwAuthType_PLAIN = 0x0000, mwAuthType_TOKEN = 0x0001, mwAuthType_ENCRYPT = 0x0002, mwAuthType_RC2_40 = 0x0002, mwAuthType_RC2_128 = 0x0004 }
enum mwMessageOption { mwMessageOption_ENCRYPT = 0x4000, mwMessageOption_HAS_ATTRIBS = 0x8000 }
enum mwMessageType { mwMessage_HANDSHAKE = 0x0000, mwMessage_HANDSHAKE_ACK = 0x8000, mwMessage_LOGIN = 0x0001, mwMessage_LOGIN_ACK = 0x8001, mwMessage_LOGIN_REDIRECT = 0x0018, mwMessage_LOGIN_CONTINUE = 0x0016, mwMessage_CHANNEL_CREATE = 0x0002, mwMessage_CHANNEL_DESTROY = 0x0003, mwMessage_CHANNEL_SEND = 0x0004, mwMessage_CHANNEL_ACCEPT = 0x0006, mwMessage_SET_USER_STATUS = 0x0009, mwMessage_SET_PRIVACY_LIST = 0x000b, mwMessage_SENSE_SERVICE = 0x0011, mwMessage_ADMIN = 0x0019, mwMessage_ANNOUNCE = 0x0022 }
Indicates the type of a message.

  Functions
void mwMessage_free (struct mwMessage *msg)
struct mwMessage * mwMessage_get (struct mwGetBuffer *b)
build a message from its representation
struct mwMessage * mwMessage_new (enum mwMessageType type)
Allocate and initialize a new message of the specified type.
void mwMessage_put (struct mwPutBuffer *b, struct mwMessage *msg)

Define Documentation

  #define MW_MESSAGE(msg) (&msg->head)

Cast a pointer to a message subtype (eg, mwMsgHandshake, mwMsgAdmin) into a pointer to a mwMessage.

  #define MW_MESSAGE_HAS_OPTION(msg, opt) ((msg)->options & (opt))

See also:
    mwMessageOption

Enumeration Type Documentation

  enum mwAuthType

Enumerator:

mwAuthType_PLAIN

mwAuthType_TOKEN

mwAuthType_ENCRYPT
    Todo
    remove for 1.0

mwAuthType_RC2_40

mwAuthType_RC2_128

  enum mwMessageOption

Enumerator:

mwMessageOption_ENCRYPT
    message data is encrypted

mwMessageOption_HAS_ATTRIBS
    message has attributes

  enum mwMessageType

Indicates the type of a message.

Enumerator:

mwMessage_HANDSHAKE
    mwMsgHandshake

mwMessage_HANDSHAKE_ACK
    mwMsgHandshakeAck

mwMessage_LOGIN
    mwMsgLogin

mwMessage_LOGIN_ACK
    mwMsgLoginAck

mwMessage_LOGIN_REDIRECT
    mwMsgLoginRedirect

mwMessage_LOGIN_CONTINUE
    mwMsgLoginContinue

mwMessage_CHANNEL_CREATE
    mwMsgChannelCreate

mwMessage_CHANNEL_DESTROY
    mwMsgChannelDestroy

mwMessage_CHANNEL_SEND
    mwMsgChannelSend

mwMessage_CHANNEL_ACCEPT
    mwMsgChannelAccept

mwMessage_SET_USER_STATUS
    mwMsgSetUserStatus

mwMessage_SET_PRIVACY_LIST
    mwMsgSetPrivacyList

mwMessage_SENSE_SERVICE
    mwMsgSenseService

mwMessage_ADMIN
    mwMsgAdmin

mwMessage_ANNOUNCE
    mwMsgAnnounce

Function Documentation

  void mwMessage_free (struct mwMessage * msg)

  struct mwMessage* mwMessage_get (struct mwGetBuffer * b) [read]

build a message from its representation

  struct mwMessage* mwMessage_new (enum mwMessageType type) [read]

Allocate and initialize a new message of the specified type.

  void mwMessage_put (struct mwPutBuffer * b, struct mwMessage * msg)

Author

Generated automatically by Doxygen for meanwhile from the source code.