meanwhile
1.1.0
|
session handler. More...
#include <mw_session.h>
Data Fields | |
void(* | clear )(struct mwSession *) |
triggered by mwSession_free. More... | |
void(* | io_close )(struct mwSession *) |
close the server connection. More... | |
int(* | io_write )(struct mwSession *, const guchar *buf, gsize len) |
write data to the server connection. More... | |
void(* | on_admin )(struct mwSession *, const char *text) |
called when an admin messages has been received More... | |
void(* | on_announce )(struct mwSession *, struct mwLoginInfo *from, gboolean may_reply, const char *text) |
called when an announcement arrives More... | |
void(* | on_setPrivacyInfo )(struct mwSession *) |
called when privacy information has been sent or received More... | |
void(* | on_setUserStatus )(struct mwSession *) |
called when user status has changed More... | |
void(* | on_stateChange )(struct mwSession *s, enum mwSessionState state, gpointer info) |
Called when the session has changed status. More... | |
session handler.
Structure which interfaces a session with client code to provide I/O and event handling
void(* mwSessionHandler::clear)(struct mwSession *) |
triggered by mwSession_free.
Optional. Put cleanup code here
void(* mwSessionHandler::io_close)(struct mwSession *) |
close the server connection.
Required
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
void(* mwSessionHandler::on_admin)(struct mwSession *, const char *text) |
called when an admin messages has been received
void(* mwSessionHandler::on_announce)(struct mwSession *, struct mwLoginInfo *from, gboolean may_reply, const char *text) |
called when an announcement arrives
void(* mwSessionHandler::on_setPrivacyInfo)(struct mwSession *) |
called when privacy information has been sent or received
void(* mwSessionHandler::on_setUserStatus)(struct mwSession *) |
called when user status has changed
void(* mwSessionHandler::on_stateChange)(struct mwSession *s, enum mwSessionState state, gpointer info) |
Called when the session has changed status.
s | the session |
state | the session's state |
info | additional state information |