Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

mwSessionHandler Struct Reference

#include <mw_session.h>


Detailed Description

session handler.

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


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 char *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_loginRedirect )(struct mwSession *, const char *host)
 called when a login redirect message is received
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, guint32 info)
 Called when the session has changed status.


Field Documentation

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 char *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_loginRedirect)(struct mwSession *, const char *host)
 

called when a login redirect message is received

Todo:
remove in favour of on_stateChange, passing host as a gpointer in info

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

called when privacy information has been sent or received

See also:
mwSession_getPrivacyInfo

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

called when user status has changed

See also:
mwSession_getUserStatus

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

Called when the session has changed status.

Uses of the info param:

  • STOPPING error code causing the session to shut down

Todo:
change info to a gpointer
Parameters:
s the session
state the session's state
info additional state info.


The documentation for this struct was generated from the following file:
Generated on Fri May 27 19:49:38 2005 for meanwhile by  doxygen 1.3.9.1