\hypertarget{structmwSessionHandler}{ \section{mwSessionHandler Struct Reference} \label{structmwSessionHandler}\index{mwSessionHandler@{mwSessionHandler}} } {\tt \#include $<$mw\_\-session.h$>$} \subsection{Detailed Description} session handler. Structure which interfaces a session with client code to provide I/O and event handling \subsection*{Data Fields} \begin{CompactItemize} \item void($\ast$ \hyperlink{structmwSessionHandler_7732ee46c3a75c078366f04b9e942884}{clear} )(struct \hyperlink{structmwSession}{mwSession} $\ast$) \begin{CompactList}\small\item\em triggered by mwSession\_\-free. \item\end{CompactList}\item void($\ast$ \hyperlink{structmwSessionHandler_9f1194a806f6fe0d72ff8548937069e8}{io\_\-close} )(struct \hyperlink{structmwSession}{mwSession} $\ast$) \begin{CompactList}\small\item\em close the server connection. \item\end{CompactList}\item int($\ast$ \hyperlink{structmwSessionHandler_1486698a54d398ebc8b249845e4d963d}{io\_\-write} )(struct \hyperlink{structmwSession}{mwSession} $\ast$, const guchar $\ast$buf, gsize len) \begin{CompactList}\small\item\em write data to the server connection. \item\end{CompactList}\item void($\ast$ \hyperlink{structmwSessionHandler_b2f7b56b4c70bf854a60c996e858b585}{on\_\-admin} )(struct \hyperlink{structmwSession}{mwSession} $\ast$, const char $\ast$text) \begin{CompactList}\small\item\em called when an admin messages has been received \item\end{CompactList}\item void($\ast$ \hyperlink{structmwSessionHandler_e8024cba10f63fd882c96b161d5692ac}{on\_\-announce} )(struct \hyperlink{structmwSession}{mwSession} $\ast$, struct \hyperlink{structmwLoginInfo}{mwLoginInfo} $\ast$from, gboolean may\_\-reply, const char $\ast$text) \begin{CompactList}\small\item\em called when an announcement arrives \item\end{CompactList}\item void($\ast$ \hyperlink{structmwSessionHandler_407f9f2eba98558659dc194af6863eb0}{on\_\-setPrivacyInfo} )(struct \hyperlink{structmwSession}{mwSession} $\ast$) \begin{CompactList}\small\item\em called when privacy information has been sent or received \item\end{CompactList}\item void($\ast$ \hyperlink{structmwSessionHandler_49a9eee40b0b0b006621d81a1171822b}{on\_\-setUserStatus} )(struct \hyperlink{structmwSession}{mwSession} $\ast$) \begin{CompactList}\small\item\em called when user status has changed \item\end{CompactList}\item void($\ast$ \hyperlink{structmwSessionHandler_855d0d5eaee87178480f84636cce3abb}{on\_\-stateChange} )(struct \hyperlink{structmwSession}{mwSession} $\ast$s, enum \hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f}{mwSessionState} state, gpointer info) \begin{CompactList}\small\item\em Called when the session has changed status. \item\end{CompactList}\end{CompactItemize} \subsection{Field Documentation} \hypertarget{structmwSessionHandler_7732ee46c3a75c078366f04b9e942884}{ \index{mwSessionHandler@{mwSessionHandler}!clear@{clear}} \index{clear@{clear}!mwSessionHandler@{mwSessionHandler}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ {\bf mwSessionHandler::clear})(struct {\bf mwSession} $\ast$)}} \label{structmwSessionHandler_7732ee46c3a75c078366f04b9e942884} triggered by mwSession\_\-free. Optional. Put cleanup code here \hypertarget{structmwSessionHandler_9f1194a806f6fe0d72ff8548937069e8}{ \index{mwSessionHandler@{mwSessionHandler}!io\_\-close@{io\_\-close}} \index{io\_\-close@{io\_\-close}!mwSessionHandler@{mwSessionHandler}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ {\bf mwSessionHandler::io\_\-close})(struct {\bf mwSession} $\ast$)}} \label{structmwSessionHandler_9f1194a806f6fe0d72ff8548937069e8} close the server connection. Required \hypertarget{structmwSessionHandler_1486698a54d398ebc8b249845e4d963d}{ \index{mwSessionHandler@{mwSessionHandler}!io\_\-write@{io\_\-write}} \index{io\_\-write@{io\_\-write}!mwSessionHandler@{mwSessionHandler}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ {\bf mwSessionHandler::io\_\-write})(struct {\bf mwSession} $\ast$, const guchar $\ast$buf, gsize len)}} \label{structmwSessionHandler_1486698a54d398ebc8b249845e4d963d} write data to the server connection. Required. Should return zero for success, non-zero for error \hypertarget{structmwSessionHandler_b2f7b56b4c70bf854a60c996e858b585}{ \index{mwSessionHandler@{mwSessionHandler}!on\_\-admin@{on\_\-admin}} \index{on\_\-admin@{on\_\-admin}!mwSessionHandler@{mwSessionHandler}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ {\bf mwSessionHandler::on\_\-admin})(struct {\bf mwSession} $\ast$, const char $\ast$text)}} \label{structmwSessionHandler_b2f7b56b4c70bf854a60c996e858b585} called when an admin messages has been received \hypertarget{structmwSessionHandler_e8024cba10f63fd882c96b161d5692ac}{ \index{mwSessionHandler@{mwSessionHandler}!on\_\-announce@{on\_\-announce}} \index{on\_\-announce@{on\_\-announce}!mwSessionHandler@{mwSessionHandler}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ {\bf mwSessionHandler::on\_\-announce})(struct {\bf mwSession} $\ast$, struct {\bf mwLoginInfo} $\ast$from, gboolean may\_\-reply, const char $\ast$text)}} \label{structmwSessionHandler_e8024cba10f63fd882c96b161d5692ac} called when an announcement arrives \hypertarget{structmwSessionHandler_407f9f2eba98558659dc194af6863eb0}{ \index{mwSessionHandler@{mwSessionHandler}!on\_\-setPrivacyInfo@{on\_\-setPrivacyInfo}} \index{on\_\-setPrivacyInfo@{on\_\-setPrivacyInfo}!mwSessionHandler@{mwSessionHandler}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ {\bf mwSessionHandler::on\_\-setPrivacyInfo})(struct {\bf mwSession} $\ast$)}} \label{structmwSessionHandler_407f9f2eba98558659dc194af6863eb0} called when privacy information has been sent or received \begin{Desc} \item[See also:]\hyperlink{mw__session_8h_f40d8491fa06d6386414f8bd54d33e04}{mwSession\_\-getPrivacyInfo} \end{Desc} \hypertarget{structmwSessionHandler_49a9eee40b0b0b006621d81a1171822b}{ \index{mwSessionHandler@{mwSessionHandler}!on\_\-setUserStatus@{on\_\-setUserStatus}} \index{on\_\-setUserStatus@{on\_\-setUserStatus}!mwSessionHandler@{mwSessionHandler}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ {\bf mwSessionHandler::on\_\-setUserStatus})(struct {\bf mwSession} $\ast$)}} \label{structmwSessionHandler_49a9eee40b0b0b006621d81a1171822b} called when user status has changed \begin{Desc} \item[See also:]\hyperlink{mw__session_8h_394f76a8608dedd50c4984364649c150}{mwSession\_\-getUserStatus} \end{Desc} \hypertarget{structmwSessionHandler_855d0d5eaee87178480f84636cce3abb}{ \index{mwSessionHandler@{mwSessionHandler}!on\_\-stateChange@{on\_\-stateChange}} \index{on\_\-stateChange@{on\_\-stateChange}!mwSessionHandler@{mwSessionHandler}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ {\bf mwSessionHandler::on\_\-stateChange})(struct {\bf mwSession} $\ast$s, enum {\bf mwSessionState} state, gpointer info)}} \label{structmwSessionHandler_855d0d5eaee87178480f84636cce3abb} Called when the session has changed status. \begin{Desc} \item[See also:]\hyperlink{mw__session_8h_4ccd4606756bf065c52ed31d59fb4482}{mwSession\_\-getStateInfo} for uses of info field\end{Desc} \begin{Desc} \item[Parameters:] \begin{description} \item[{\em s}]the session \item[{\em state}]the session's state \item[{\em info}]additional state information \end{description} \end{Desc} The documentation for this struct was generated from the following file:\begin{CompactItemize} \item \hyperlink{mw__session_8h}{mw\_\-session.h}\end{CompactItemize}