meanwhile 1.1.1
mwSessionHandler Struct Reference

session handler. More...

#include <mw_session.h>

Data Fields

void(*) clear (struct mwSession *)
 triggered by mwSession_free.
void(*) io_close (struct mwSession *)
 close the server connection.
int(*) io_write (struct mwSession *, const guchar *buf, gsize len)
 write data to the server connection.
void(*) on_admin (struct mwSession *, const char *text)
 called when an admin messages has been received
void(*) on_announce (struct mwSession *, struct mwLoginInfo *from, gboolean may_reply, const char *text)
 called when an announcement arrives
void(*) on_setPrivacyInfo (struct mwSession *)
 called when privacy information has been sent or received
void(*) on_setUserStatus (struct mwSession *)
 called when user status has changed
void(*) on_stateChange (struct mwSession *s, enum mwSessionState state, gpointer info)
 Called when the session has changed status.

Detailed Description

session handler.

Structure which interfaces a session with client code to provide I/O and event handling

Field Documentation

◆ clear

void(*) mwSessionHandler::clear(struct mwSession *)

triggered by mwSession_free.

Optional. Put cleanup code here

◆ io_close

void(*) mwSessionHandler::io_close(struct mwSession *)

close the server connection.

Required

◆ io_write

int(*) mwSessionHandler::io_write(struct mwSession *, const guchar *buf, gsize len)

write data to the server connection.

Required. Should return zero for success, non-zero for error

◆ on_admin

void(*) mwSessionHandler::on_admin(struct mwSession *, const char *text)

called when an admin messages has been received

◆ on_announce

void(*) mwSessionHandler::on_announce(struct mwSession *, struct mwLoginInfo *from, gboolean may_reply, const char *text)

called when an announcement arrives

◆ on_setPrivacyInfo

void(*) mwSessionHandler::on_setPrivacyInfo(struct mwSession *)

called when privacy information has been sent or received

See also
mwSession_getPrivacyInfo

◆ on_setUserStatus

void(*) mwSessionHandler::on_setUserStatus(struct mwSession *)

called when user status has changed

See also
mwSession_getUserStatus

◆ on_stateChange

void(*) mwSessionHandler::on_stateChange(struct mwSession *s, enum mwSessionState state, gpointer info)

Called when the session has changed status.

See also
mwSession_getStateInfo for uses of info field
Parameters
sthe session
statethe session's state
infoadditional state information

The documentation for this struct was generated from the following file: