\doxysection{mw\+Session\+Handler Struct Reference}
\hypertarget{structmwSessionHandler}{}\label{structmwSessionHandler}\index{mwSessionHandler@{mwSessionHandler}}


session handler.  




{\ttfamily \#include $<$mw\+\_\+session.\+h$>$}

\doxysubsubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structmwSessionHandler_aa88b275b623ac2b0b72e1b77a5205c07}{clear}} )(struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em triggered by mw\+Session\+\_\+free. \end{DoxyCompactList}\item 
void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structmwSessionHandler_a846ffbcb6de5e47ccd1b013e8a55aec6}{io\+\_\+close}} )(struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em close the server connection. \end{DoxyCompactList}\item 
int(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structmwSessionHandler_a9e36153e642ec8e5c47502172288abd0}{io\+\_\+write}} )(struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, const guchar \texorpdfstring{$\ast$}{*}buf, gsize len)
\begin{DoxyCompactList}\small\item\em write data to the server connection. \end{DoxyCompactList}\item 
void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structmwSessionHandler_ae8c5f832e22ac4a451290afa7b9e0bc9}{on\+\_\+admin}} )(struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, const char \texorpdfstring{$\ast$}{*}text)
\begin{DoxyCompactList}\small\item\em called when an admin messages has been received \end{DoxyCompactList}\item 
void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structmwSessionHandler_ada29bbfca164eafb635f4f5321faaa98}{on\+\_\+announce}} )(struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, struct \mbox{\hyperlink{structmwLoginInfo}{mw\+Login\+Info}} \texorpdfstring{$\ast$}{*}from, gboolean may\+\_\+reply, const char \texorpdfstring{$\ast$}{*}text)
\begin{DoxyCompactList}\small\item\em called when an announcement arrives \end{DoxyCompactList}\item 
void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structmwSessionHandler_ace0c94acef85320785a75f8a8d582c52}{on\+\_\+set\+Privacy\+Info}} )(struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em called when privacy information has been sent or received \end{DoxyCompactList}\item 
void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structmwSessionHandler_abdaf83db7841763e254b392f01eb26e7}{on\+\_\+set\+User\+Status}} )(struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em called when user status has changed \end{DoxyCompactList}\item 
void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structmwSessionHandler_a769f4b8077aac6e154547b194147e037}{on\+\_\+state\+Change}} )(struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}s, enum \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8f}{mw\+Session\+State}} state, gpointer info)
\begin{DoxyCompactList}\small\item\em Called when the session has changed status. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
session handler. 

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

\label{doc-variable-members}
\Hypertarget{structmwSessionHandler_doc-variable-members}
\doxysubsection{Field Documentation}
\Hypertarget{structmwSessionHandler_aa88b275b623ac2b0b72e1b77a5205c07}\index{mwSessionHandler@{mwSessionHandler}!clear@{clear}}
\index{clear@{clear}!mwSessionHandler@{mwSessionHandler}}
\doxysubsubsection{\texorpdfstring{clear}{clear}}
{\footnotesize\ttfamily \label{structmwSessionHandler_aa88b275b623ac2b0b72e1b77a5205c07} 
void(\texorpdfstring{$\ast$}{*} mw\+Session\+Handler\+::clear) (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})}



triggered by mw\+Session\+\_\+free. 

Optional. Put cleanup code here \Hypertarget{structmwSessionHandler_a846ffbcb6de5e47ccd1b013e8a55aec6}\index{mwSessionHandler@{mwSessionHandler}!io\_close@{io\_close}}
\index{io\_close@{io\_close}!mwSessionHandler@{mwSessionHandler}}
\doxysubsubsection{\texorpdfstring{io\_close}{io\_close}}
{\footnotesize\ttfamily \label{structmwSessionHandler_a846ffbcb6de5e47ccd1b013e8a55aec6} 
void(\texorpdfstring{$\ast$}{*} mw\+Session\+Handler\+::io\+\_\+close) (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})}



close the server connection. 

Required \Hypertarget{structmwSessionHandler_a9e36153e642ec8e5c47502172288abd0}\index{mwSessionHandler@{mwSessionHandler}!io\_write@{io\_write}}
\index{io\_write@{io\_write}!mwSessionHandler@{mwSessionHandler}}
\doxysubsubsection{\texorpdfstring{io\_write}{io\_write}}
{\footnotesize\ttfamily \label{structmwSessionHandler_a9e36153e642ec8e5c47502172288abd0} 
int(\texorpdfstring{$\ast$}{*} mw\+Session\+Handler\+::io\+\_\+write) (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, const guchar \texorpdfstring{$\ast$}{*}buf, gsize len)}



write data to the server connection. 

Required. Should return zero for success, non-\/zero for error \Hypertarget{structmwSessionHandler_ae8c5f832e22ac4a451290afa7b9e0bc9}\index{mwSessionHandler@{mwSessionHandler}!on\_admin@{on\_admin}}
\index{on\_admin@{on\_admin}!mwSessionHandler@{mwSessionHandler}}
\doxysubsubsection{\texorpdfstring{on\_admin}{on\_admin}}
{\footnotesize\ttfamily \label{structmwSessionHandler_ae8c5f832e22ac4a451290afa7b9e0bc9} 
void(\texorpdfstring{$\ast$}{*} mw\+Session\+Handler\+::on\+\_\+admin) (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, const char \texorpdfstring{$\ast$}{*}text)}



called when an admin messages has been received 

\Hypertarget{structmwSessionHandler_ada29bbfca164eafb635f4f5321faaa98}\index{mwSessionHandler@{mwSessionHandler}!on\_announce@{on\_announce}}
\index{on\_announce@{on\_announce}!mwSessionHandler@{mwSessionHandler}}
\doxysubsubsection{\texorpdfstring{on\_announce}{on\_announce}}
{\footnotesize\ttfamily \label{structmwSessionHandler_ada29bbfca164eafb635f4f5321faaa98} 
void(\texorpdfstring{$\ast$}{*} mw\+Session\+Handler\+::on\+\_\+announce) (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, struct \mbox{\hyperlink{structmwLoginInfo}{mw\+Login\+Info}} \texorpdfstring{$\ast$}{*}from, gboolean may\+\_\+reply, const char \texorpdfstring{$\ast$}{*}text)}



called when an announcement arrives 

\Hypertarget{structmwSessionHandler_ace0c94acef85320785a75f8a8d582c52}\index{mwSessionHandler@{mwSessionHandler}!on\_setPrivacyInfo@{on\_setPrivacyInfo}}
\index{on\_setPrivacyInfo@{on\_setPrivacyInfo}!mwSessionHandler@{mwSessionHandler}}
\doxysubsubsection{\texorpdfstring{on\_setPrivacyInfo}{on\_setPrivacyInfo}}
{\footnotesize\ttfamily \label{structmwSessionHandler_ace0c94acef85320785a75f8a8d582c52} 
void(\texorpdfstring{$\ast$}{*} mw\+Session\+Handler\+::on\+\_\+set\+Privacy\+Info) (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})}



called when privacy information has been sent or received 

\begin{DoxySeeAlso}{See also}
\doxylink{mw__session_8h_ad2a75bcd8561bf074b5249436e2491e2}{mw\+Session\+\_\+get\+Privacy\+Info} 
\end{DoxySeeAlso}
\Hypertarget{structmwSessionHandler_abdaf83db7841763e254b392f01eb26e7}\index{mwSessionHandler@{mwSessionHandler}!on\_setUserStatus@{on\_setUserStatus}}
\index{on\_setUserStatus@{on\_setUserStatus}!mwSessionHandler@{mwSessionHandler}}
\doxysubsubsection{\texorpdfstring{on\_setUserStatus}{on\_setUserStatus}}
{\footnotesize\ttfamily \label{structmwSessionHandler_abdaf83db7841763e254b392f01eb26e7} 
void(\texorpdfstring{$\ast$}{*} mw\+Session\+Handler\+::on\+\_\+set\+User\+Status) (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})}



called when user status has changed 

\begin{DoxySeeAlso}{See also}
\doxylink{mw__session_8h_ac28587924853a59ca5b4ab35721086dd}{mw\+Session\+\_\+get\+User\+Status} 
\end{DoxySeeAlso}
\Hypertarget{structmwSessionHandler_a769f4b8077aac6e154547b194147e037}\index{mwSessionHandler@{mwSessionHandler}!on\_stateChange@{on\_stateChange}}
\index{on\_stateChange@{on\_stateChange}!mwSessionHandler@{mwSessionHandler}}
\doxysubsubsection{\texorpdfstring{on\_stateChange}{on\_stateChange}}
{\footnotesize\ttfamily \label{structmwSessionHandler_a769f4b8077aac6e154547b194147e037} 
void(\texorpdfstring{$\ast$}{*} mw\+Session\+Handler\+::on\+\_\+state\+Change) (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}s, enum \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8f}{mw\+Session\+State}} state, gpointer info)}



Called when the session has changed status. 

\begin{DoxySeeAlso}{See also}
\doxylink{mw__session_8h_a4ccd4606756bf065c52ed31d59fb4482}{mw\+Session\+\_\+get\+State\+Info} for uses of info field
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em s} & the session \\
\hline
{\em state} & the session\textquotesingle{}s state \\
\hline
{\em info} & additional state information \\
\hline
\end{DoxyParams}


The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{mw__session_8h}{mw\+\_\+session.\+h}}\end{DoxyCompactItemize}
