Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > d4a6745d7fbd92dfb64dce5e91e08f80 > files > 207

lib64meanwhile1-doc-1.0.2-1mdv2008.1.x86_64.rpm

\hypertarget{mw__session_8h}{
\section{mw\_\-session.h File Reference}
\label{mw__session_8h}\index{mw\_\-session.h@{mw\_\-session.h}}
}


\subsection{Detailed Description}
A client session with a Sametime server is encapsulated in the \hyperlink{structmwSession}{mwSession} structure. 

The session controls channels, provides encryption ciphers, and manages services using messages over the Master channel.

A session does not directly communicate with a socket or stream, instead the session is initialized from client code with an instance of a \hyperlink{structmwSessionHandler}{mwSessionHandler} structure. This session handler provides functions as call-backs for common session events, and provides functions for writing-to and closing the connection to the server.

A session does not perform reads on a socket directly. Instead, it must be fed from an outside source via the mwSession\_\-recv function. The session will buffer and merge data passed to this function to build complete protocol messages, and will act upon each complete message accordingly. 

{\tt \#include \char`\"{}mw\_\-common.h\char`\"{}}\par
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{structmwSessionHandler}{mwSessionHandler}
\begin{CompactList}\small\item\em session handler. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{mw__session_8h_9d3b3989818cc643dd2f39e25d74ab28}{MW\_\-PROTOCOL\_\-VERSION\_\-MAJOR}~0x001e
\begin{CompactList}\small\item\em default protocol major version \item\end{CompactList}\item 
\#define \hyperlink{mw__session_8h_913fb2fb3be37e4248d5b708b6c71e51}{MW\_\-PROTOCOL\_\-VERSION\_\-MINOR}~0x001d
\begin{CompactList}\small\item\em default protocol minor version \item\end{CompactList}\item 
\#define \hyperlink{mw__session_8h_3315b63b3e5f89fffe09d0011e619abe}{mwSession\_\-isStarted}(s)~(mwSession\_\-isState((s), mwSession\_\-STARTED))
\item 
\#define \hyperlink{mw__session_8h_0cd5392222008433c62e3f49fcc002cb}{mwSession\_\-isStarting}(s)
\item 
\#define \hyperlink{mw__session_8h_4de18b78247d38abdbf8e6b17911af6a}{mwSession\_\-isState}(\hyperlink{structmwService_0c2badd2256155b2bee149fa4b57b7d6}{session}, \hyperlink{structmwService_b5adc0f5a0cbeddaece7a4512ec66099}{state})~(mwSession\_\-getState((\hyperlink{structmwService_0c2badd2256155b2bee149fa4b57b7d6}{session})) == (\hyperlink{structmwService_b5adc0f5a0cbeddaece7a4512ec66099}{state}))
\item 
\#define \hyperlink{mw__session_8h_6675346a430b5966fa3104cc7d84a9cf}{mwSession\_\-isStopped}(s)~(mwSession\_\-isState((s), mwSession\_\-STOPPED))
\item 
\#define \hyperlink{mw__session_8h_e1e43ebfa1b40404e9a81fb238bf4c3f}{mwSession\_\-isStopping}(s)~(mwSession\_\-isState((s), mwSession\_\-STOPPING))
\end{CompactItemize}
\begin{Indent}{\bf }\par
\begin{CompactItemize}
\item 
\#define \hyperlink{mw__session_8h_f0a7031c22a277fd04e19717b1cefa45}{mwSession\_\-AUTH\_\-PASSWORD}~\char`\"{}session.auth.password\char`\"{}
\begin{CompactList}\small\item\em char $\ast$, plaintext password \item\end{CompactList}\item 
\#define \hyperlink{mw__session_8h_795bdeae05d31ee88b013404b8a5caaf}{mwSession\_\-AUTH\_\-TOKEN}~\char`\"{}session.auth.token\char`\"{}
\begin{CompactList}\small\item\em struct \hyperlink{structmwOpaque}{mwOpaque} $\ast$, authentication token \item\end{CompactList}\item 
\#define \hyperlink{mw__session_8h_6a5be138257a3274423d3637dd4f7162}{mwSession\_\-AUTH\_\-USER\_\-ID}~\char`\"{}session.auth.user\char`\"{}
\begin{CompactList}\small\item\em char $\ast$, session user ID \item\end{CompactList}\item 
\#define \hyperlink{mw__session_8h_1e671d0043d238356ea33e133ff9fd93}{mwSession\_\-CLIENT\_\-HOST}~\char`\"{}client.host\char`\"{}
\begin{CompactList}\small\item\em char $\ast$, hostname of client \item\end{CompactList}\item 
\#define \hyperlink{mw__session_8h_68baacbfa6cd815b600e84f32a0b2157}{mwSession\_\-CLIENT\_\-IP}~\char`\"{}client.ip\char`\"{}
\begin{CompactList}\small\item\em guint32, local IP of client \item\end{CompactList}\item 
\#define \hyperlink{mw__session_8h_b6fe3a356e3c665f0751b670e96d1a58}{mwSession\_\-CLIENT\_\-TYPE\_\-ID}~\char`\"{}client.id\char`\"{}
\begin{CompactList}\small\item\em guint16, client type identifier \item\end{CompactList}\item 
\#define \hyperlink{mw__session_8h_52bbb3a6fd21e59b8e9e467e95b142a9}{mwSession\_\-CLIENT\_\-VER\_\-MAJOR}~\char`\"{}client.version.major\char`\"{}
\begin{CompactList}\small\item\em guint16, major version of client protocol \item\end{CompactList}\item 
\#define \hyperlink{mw__session_8h_a3b7220625ca769b77af646e589bc2f3}{mwSession\_\-CLIENT\_\-VER\_\-MINOR}~\char`\"{}client.version.minor\char`\"{}
\begin{CompactList}\small\item\em guint16, minor version of client protocol \item\end{CompactList}\item 
\#define \hyperlink{mw__session_8h_6bac49bf2171ad349c3f8c4dac16c1c8}{mwSession\_\-SERVER\_\-VER\_\-MAJOR}~\char`\"{}server.version.major\char`\"{}
\begin{CompactList}\small\item\em guint16, major version of server protocol \item\end{CompactList}\item 
\#define \hyperlink{mw__session_8h_87f478d902728b24efa6b29300d3f80b}{mwSession\_\-SERVER\_\-VER\_\-MINOR}~\char`\"{}server.version.minor\char`\"{}
\begin{CompactList}\small\item\em guint16, minor version of server protocol \item\end{CompactList}\end{CompactItemize}
\end{Indent}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f}{mwSessionState} \{ \par
\hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f9830cfccaba808c30bf7bc124878c121}{mwSession\_\-STARTING}, 
\par
\hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f2ac4bf847cbc46277a3c73839934243a}{mwSession\_\-HANDSHAKE}, 
\par
\hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f994478c24dcd42f57063fab313fdd8f0}{mwSession\_\-HANDSHAKE\_\-ACK}, 
\par
\hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8fd13ae235c70756d58e86a5d3fa0a9fd7}{mwSession\_\-LOGIN}, 
\par
\hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f6fba5e714829218cff2bcf8990429c84}{mwSession\_\-LOGIN\_\-REDIR}, 
\par
\hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f13304078f2f7c7899a3e6ff8b0d43e10}{mwSession\_\-LOGIN\_\-ACK}, 
\par
\hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f6204d52622b541dd60cd40e004d2118d}{mwSession\_\-STARTED}, 
\par
\hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8fb710bf16db3e1f29f773c6bf70ee9ee9}{mwSession\_\-STOPPING}, 
\par
\hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f69035e27489f79b82d9ef3c7b9514706}{mwSession\_\-STOPPED}, 
\par
\hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8fbd45e4568ae4b047f7c90b1aeb57c580}{mwSession\_\-UNKNOWN}, 
\par
\hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f44286972a65354abfc208e0a5c922ccb}{mwSession\_\-LOGIN\_\-CONT}
 \}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
gboolean \hyperlink{mw__session_8h_8f032bd5928aefde5e78976717d2e6fb}{mwSession\_\-addCipher} (struct \hyperlink{structmwSession}{mwSession} $\ast$, struct \hyperlink{structmwCipher}{mwCipher} $\ast$)
\begin{CompactList}\small\item\em adds a cipher to the session. \item\end{CompactList}\item 
gboolean \hyperlink{mw__session_8h_c6f9b04c3b494dde60ee7dd064370582}{mwSession\_\-addService} (struct \hyperlink{structmwSession}{mwSession} $\ast$, struct \hyperlink{structmwService}{mwService} $\ast$)
\begin{CompactList}\small\item\em adds a service to the session. \item\end{CompactList}\item 
int \hyperlink{mw__session_8h_0d942b183a0657122fd511816cde0aae}{mwSession\_\-forceLogin} (struct \hyperlink{structmwSession}{mwSession} $\ast$s)
\begin{CompactList}\small\item\em respond to a login redirect message by forcing the login sequence to continue through the immediate server. \item\end{CompactList}\item 
void \hyperlink{mw__session_8h_15f227dac0e09d26e5d51647741d02c1}{mwSession\_\-free} (struct \hyperlink{structmwSession}{mwSession} $\ast$)
\begin{CompactList}\small\item\em stop, clear, free a session. \item\end{CompactList}\item 
struct \hyperlink{structmwChannelSet}{mwChannelSet} $\ast$ \hyperlink{mw__session_8h_9b649dca88ecfe556931204f61cfc7f0}{mwSession\_\-getChannels} (struct \hyperlink{structmwSession}{mwSession} $\ast$)
\item 
struct \hyperlink{structmwCipher}{mwCipher} $\ast$ \hyperlink{mw__session_8h_4ba31ddd29d88229f2e8e61ff8728374}{mwSession\_\-getCipher} (struct \hyperlink{structmwSession}{mwSession} $\ast$, guint16 type)
\begin{CompactList}\small\item\em find a cipher by its type identifier \item\end{CompactList}\item 
GList $\ast$ \hyperlink{mw__session_8h_214296ae70ec8a7e7aa8d5073209b925}{mwSession\_\-getCiphers} (struct \hyperlink{structmwSession}{mwSession} $\ast$)
\begin{CompactList}\small\item\em a GList of ciphers in this session. \item\end{CompactList}\item 
gpointer \hyperlink{mw__session_8h_2061173e5b0b7199b7951920a475de22}{mwSession\_\-getClientData} (struct \hyperlink{structmwSession}{mwSession} $\ast$\hyperlink{structmwService_0c2badd2256155b2bee149fa4b57b7d6}{session})
\item 
struct \hyperlink{structmwSessionHandler}{mwSessionHandler} $\ast$ \hyperlink{mw__session_8h_6ca89c231099ec608255f9153e48bd41}{mwSession\_\-getHandler} (struct \hyperlink{structmwSession}{mwSession} $\ast$)
\begin{CompactList}\small\item\em obtain a reference to the session's handler \item\end{CompactList}\item 
struct \hyperlink{structmwLoginInfo}{mwLoginInfo} $\ast$ \hyperlink{mw__session_8h_2c2c73c430879bc51bd53d5dea9ff87c}{mwSession\_\-getLoginInfo} (struct \hyperlink{structmwSession}{mwSession} $\ast$)
\begin{CompactList}\small\item\em reference the login information for the session \item\end{CompactList}\item 
struct \hyperlink{structmwPrivacyInfo}{mwPrivacyInfo} $\ast$ \hyperlink{mw__session_8h_f40d8491fa06d6386414f8bd54d33e04}{mwSession\_\-getPrivacyInfo} (struct \hyperlink{structmwSession}{mwSession} $\ast$)
\begin{CompactList}\small\item\em direct reference to the session's internal privacy structure \item\end{CompactList}\item 
gpointer \hyperlink{mw__session_8h_cc536511205affec12c734efd9735e91}{mwSession\_\-getProperty} (struct \hyperlink{structmwSession}{mwSession} $\ast$, const char $\ast$key)
\begin{CompactList}\small\item\em obtain the value of a previously set property, or NULL \item\end{CompactList}\item 
struct \hyperlink{structmwService}{mwService} $\ast$ \hyperlink{mw__session_8h_9219b977141fa0211d0cce8848e4a11d}{mwSession\_\-getService} (struct \hyperlink{structmwSession}{mwSession} $\ast$, guint32 type)
\begin{CompactList}\small\item\em find a service by its type identifier \item\end{CompactList}\item 
GList $\ast$ \hyperlink{mw__session_8h_88c6a4eb07a4ed80e561772645da6e6c}{mwSession\_\-getServices} (struct \hyperlink{structmwSession}{mwSession} $\ast$)
\begin{CompactList}\small\item\em a GList of services in this session. \item\end{CompactList}\item 
enum \hyperlink{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f}{mwSessionState} \hyperlink{mw__session_8h_c98375b3bdde1fcb6f7576376495ad09}{mwSession\_\-getState} (struct \hyperlink{structmwSession}{mwSession} $\ast$)
\begin{CompactList}\small\item\em current status of the session \item\end{CompactList}\item 
gpointer \hyperlink{mw__session_8h_4ccd4606756bf065c52ed31d59fb4482}{mwSession\_\-getStateInfo} (struct \hyperlink{structmwSession}{mwSession} $\ast$)
\begin{CompactList}\small\item\em additional status-specific information. \item\end{CompactList}\item 
struct \hyperlink{structmwUserStatus}{mwUserStatus} $\ast$ \hyperlink{mw__session_8h_394f76a8608dedd50c4984364649c150}{mwSession\_\-getUserStatus} (struct \hyperlink{structmwSession}{mwSession} $\ast$)
\item 
struct \hyperlink{structmwSession}{mwSession} $\ast$ \hyperlink{mw__session_8h_e0a8e4b2f0a24b6e6db29f5a57442369}{mwSession\_\-new} (struct \hyperlink{structmwSessionHandler}{mwSessionHandler} $\ast$)
\begin{CompactList}\small\item\em allocate a new session \item\end{CompactList}\item 
void \hyperlink{mw__session_8h_69261eefd22f97f6fd453ca0507cff9e}{mwSession\_\-recv} (struct \hyperlink{structmwSession}{mwSession} $\ast$, const guchar $\ast$, gsize)
\begin{CompactList}\small\item\em Data is buffered, unpacked, and parsed into a message, then processed accordingly. \item\end{CompactList}\item 
struct \hyperlink{structmwCipher}{mwCipher} $\ast$ \hyperlink{mw__session_8h_b5825818838148ea8beb0448639a40a0}{mwSession\_\-removeCipher} (struct \hyperlink{structmwSession}{mwSession} $\ast$, guint16 type)
\begin{CompactList}\small\item\em remove a cipher from the session \item\end{CompactList}\item 
void \hyperlink{mw__session_8h_f5fe774ac33affc9c141c0b30c8c4a7a}{mwSession\_\-removeClientData} (struct \hyperlink{structmwSession}{mwSession} $\ast$\hyperlink{structmwService_0c2badd2256155b2bee149fa4b57b7d6}{session})
\begin{CompactList}\small\item\em remove client data, calling the optional GDestroyNotify function indicated in mwSession\_\-setClientData if applicable \item\end{CompactList}\item 
void \hyperlink{mw__session_8h_cd2f1aab5eb04b29e73040069c04a976}{mwSession\_\-removeProperty} (struct \hyperlink{structmwSession}{mwSession} $\ast$, const char $\ast$key)
\begin{CompactList}\small\item\em remove a property, calling the optional GDestroyNotify function indicated in mwSession\_\-setProperty if applicable \item\end{CompactList}\item 
struct \hyperlink{structmwService}{mwService} $\ast$ \hyperlink{mw__session_8h_43e307ec9138cfe706ce91ab5978bb08}{mwSession\_\-removeService} (struct \hyperlink{structmwSession}{mwSession} $\ast$, guint32 type)
\begin{CompactList}\small\item\em removes a service from the session. \item\end{CompactList}\item 
int \hyperlink{mw__session_8h_547ba5e8411854dfdcc4fd1b992c7da8}{mwSession\_\-send} (struct \hyperlink{structmwSession}{mwSession} $\ast$s, struct \hyperlink{structmwMessage}{mwMessage} $\ast$msg)
\begin{CompactList}\small\item\em primarily used by services to have messages serialized and sent \item\end{CompactList}\item 
int \hyperlink{mw__session_8h_b4bb651abfc49566be231bfa082f9d01}{mwSession\_\-sendAnnounce} (struct \hyperlink{structmwSession}{mwSession} $\ast$s, gboolean may\_\-reply, const char $\ast$text, const GList $\ast$recipients)
\begin{CompactList}\small\item\em send an announcement to a list of users/groups. \item\end{CompactList}\item 
int \hyperlink{mw__session_8h_76937609f785aa1830fddd58c5995477}{mwSession\_\-sendKeepalive} (struct \hyperlink{structmwSession}{mwSession} $\ast$s)
\begin{CompactList}\small\item\em sends the keepalive byte \item\end{CompactList}\item 
void \hyperlink{mw__session_8h_7c2770250f36c6c2cc3b8a857a5e42db}{mwSession\_\-senseService} (struct \hyperlink{structmwSession}{mwSession} $\ast$s, guint32 type)
\begin{CompactList}\small\item\em instruct a STARTED session to check the server for the presense of a given service. \item\end{CompactList}\item 
void \hyperlink{mw__session_8h_d24576610f20159cf13c6104a1f5c615}{mwSession\_\-setClientData} (struct \hyperlink{structmwSession}{mwSession} $\ast$\hyperlink{structmwService_0c2badd2256155b2bee149fa4b57b7d6}{session}, gpointer data, GDestroyNotify \hyperlink{structmwService_9b86cc0545150a4fde3ab3060e803e58}{clear})
\begin{CompactList}\small\item\em associate arbitrary data with the session for use by the client code. \item\end{CompactList}\item 
int \hyperlink{mw__session_8h_f0073cb84869b5e61a2eae4eccf265d4}{mwSession\_\-setPrivacyInfo} (struct \hyperlink{structmwSession}{mwSession} $\ast$, struct \hyperlink{structmwPrivacyInfo}{mwPrivacyInfo} $\ast$)
\begin{CompactList}\small\item\em set the internal privacy information, and inform the server as necessary. \item\end{CompactList}\item 
void \hyperlink{mw__session_8h_d2b99bcf049f9906c7151b7626273b0d}{mwSession\_\-setProperty} (struct \hyperlink{structmwSession}{mwSession} $\ast$, const char $\ast$key, gpointer val, GDestroyNotify \hyperlink{structmwService_9b86cc0545150a4fde3ab3060e803e58}{clear})
\begin{CompactList}\small\item\em associate a key:value pair with the session. \item\end{CompactList}\item 
int \hyperlink{mw__session_8h_6fad26d4cfa3dd7bdc1b402ff2ec10d7}{mwSession\_\-setUserStatus} (struct \hyperlink{structmwSession}{mwSession} $\ast$, struct \hyperlink{structmwUserStatus}{mwUserStatus} $\ast$)
\begin{CompactList}\small\item\em set the internal user status state, and inform the server as necessary. \item\end{CompactList}\item 
void \hyperlink{mw__session_8h_1c3e5aac455c0594e21b02a379395513}{mwSession\_\-start} (struct \hyperlink{structmwSession}{mwSession} $\ast$)
\begin{CompactList}\small\item\em instruct the session to begin. \item\end{CompactList}\item 
void \hyperlink{mw__session_8h_ca902e9266e244ff9ae2a325a7a655ba}{mwSession\_\-stop} (struct \hyperlink{structmwSession}{mwSession} $\ast$, guint32 reason)
\begin{CompactList}\small\item\em instruct the session to shut down with the following reason code. \item\end{CompactList}\end{CompactItemize}


\subsection{Define Documentation}
\hypertarget{mw__session_8h_9d3b3989818cc643dd2f39e25d74ab28}{
\index{mw\_\-session.h@{mw\_\-session.h}!MW\_\-PROTOCOL\_\-VERSION\_\-MAJOR@{MW\_\-PROTOCOL\_\-VERSION\_\-MAJOR}}
\index{MW\_\-PROTOCOL\_\-VERSION\_\-MAJOR@{MW\_\-PROTOCOL\_\-VERSION\_\-MAJOR}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MW\_\-PROTOCOL\_\-VERSION\_\-MAJOR~0x001e}}
\label{mw__session_8h_9d3b3989818cc643dd2f39e25d74ab28}


default protocol major version 

\hypertarget{mw__session_8h_913fb2fb3be37e4248d5b708b6c71e51}{
\index{mw\_\-session.h@{mw\_\-session.h}!MW\_\-PROTOCOL\_\-VERSION\_\-MINOR@{MW\_\-PROTOCOL\_\-VERSION\_\-MINOR}}
\index{MW\_\-PROTOCOL\_\-VERSION\_\-MINOR@{MW\_\-PROTOCOL\_\-VERSION\_\-MINOR}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MW\_\-PROTOCOL\_\-VERSION\_\-MINOR~0x001d}}
\label{mw__session_8h_913fb2fb3be37e4248d5b708b6c71e51}


default protocol minor version 

\hypertarget{mw__session_8h_f0a7031c22a277fd04e19717b1cefa45}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-AUTH\_\-PASSWORD@{mwSession\_\-AUTH\_\-PASSWORD}}
\index{mwSession\_\-AUTH\_\-PASSWORD@{mwSession\_\-AUTH\_\-PASSWORD}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-AUTH\_\-PASSWORD~\char`\"{}session.auth.password\char`\"{}}}
\label{mw__session_8h_f0a7031c22a277fd04e19717b1cefa45}


char $\ast$, plaintext password 

\hypertarget{mw__session_8h_795bdeae05d31ee88b013404b8a5caaf}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-AUTH\_\-TOKEN@{mwSession\_\-AUTH\_\-TOKEN}}
\index{mwSession\_\-AUTH\_\-TOKEN@{mwSession\_\-AUTH\_\-TOKEN}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-AUTH\_\-TOKEN~\char`\"{}session.auth.token\char`\"{}}}
\label{mw__session_8h_795bdeae05d31ee88b013404b8a5caaf}


struct \hyperlink{structmwOpaque}{mwOpaque} $\ast$, authentication token 

\hypertarget{mw__session_8h_6a5be138257a3274423d3637dd4f7162}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-AUTH\_\-USER\_\-ID@{mwSession\_\-AUTH\_\-USER\_\-ID}}
\index{mwSession\_\-AUTH\_\-USER\_\-ID@{mwSession\_\-AUTH\_\-USER\_\-ID}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-AUTH\_\-USER\_\-ID~\char`\"{}session.auth.user\char`\"{}}}
\label{mw__session_8h_6a5be138257a3274423d3637dd4f7162}


char $\ast$, session user ID 

\hypertarget{mw__session_8h_Session}{}\subsection{Properties}\label{mw__session_8h_Session}
for use with mwSession\_\-setProperty, et al. \hypertarget{mw__session_8h_1e671d0043d238356ea33e133ff9fd93}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-CLIENT\_\-HOST@{mwSession\_\-CLIENT\_\-HOST}}
\index{mwSession\_\-CLIENT\_\-HOST@{mwSession\_\-CLIENT\_\-HOST}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-CLIENT\_\-HOST~\char`\"{}client.host\char`\"{}}}
\label{mw__session_8h_1e671d0043d238356ea33e133ff9fd93}


char $\ast$, hostname of client 

\hypertarget{mw__session_8h_68baacbfa6cd815b600e84f32a0b2157}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-CLIENT\_\-IP@{mwSession\_\-CLIENT\_\-IP}}
\index{mwSession\_\-CLIENT\_\-IP@{mwSession\_\-CLIENT\_\-IP}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-CLIENT\_\-IP~\char`\"{}client.ip\char`\"{}}}
\label{mw__session_8h_68baacbfa6cd815b600e84f32a0b2157}


guint32, local IP of client 

\hypertarget{mw__session_8h_b6fe3a356e3c665f0751b670e96d1a58}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-CLIENT\_\-TYPE\_\-ID@{mwSession\_\-CLIENT\_\-TYPE\_\-ID}}
\index{mwSession\_\-CLIENT\_\-TYPE\_\-ID@{mwSession\_\-CLIENT\_\-TYPE\_\-ID}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-CLIENT\_\-TYPE\_\-ID~\char`\"{}client.id\char`\"{}}}
\label{mw__session_8h_b6fe3a356e3c665f0751b670e96d1a58}


guint16, client type identifier 

\hypertarget{mw__session_8h_52bbb3a6fd21e59b8e9e467e95b142a9}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-CLIENT\_\-VER\_\-MAJOR@{mwSession\_\-CLIENT\_\-VER\_\-MAJOR}}
\index{mwSession\_\-CLIENT\_\-VER\_\-MAJOR@{mwSession\_\-CLIENT\_\-VER\_\-MAJOR}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-CLIENT\_\-VER\_\-MAJOR~\char`\"{}client.version.major\char`\"{}}}
\label{mw__session_8h_52bbb3a6fd21e59b8e9e467e95b142a9}


guint16, major version of client protocol 

\hypertarget{mw__session_8h_a3b7220625ca769b77af646e589bc2f3}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-CLIENT\_\-VER\_\-MINOR@{mwSession\_\-CLIENT\_\-VER\_\-MINOR}}
\index{mwSession\_\-CLIENT\_\-VER\_\-MINOR@{mwSession\_\-CLIENT\_\-VER\_\-MINOR}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-CLIENT\_\-VER\_\-MINOR~\char`\"{}client.version.minor\char`\"{}}}
\label{mw__session_8h_a3b7220625ca769b77af646e589bc2f3}


guint16, minor version of client protocol 

\hypertarget{mw__session_8h_3315b63b3e5f89fffe09d0011e619abe}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-isStarted@{mwSession\_\-isStarted}}
\index{mwSession\_\-isStarted@{mwSession\_\-isStarted}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-isStarted(s)~(mwSession\_\-isState((s), mwSession\_\-STARTED))}}
\label{mw__session_8h_3315b63b3e5f89fffe09d0011e619abe}


\hypertarget{mw__session_8h_0cd5392222008433c62e3f49fcc002cb}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-isStarting@{mwSession\_\-isStarting}}
\index{mwSession\_\-isStarting@{mwSession\_\-isStarting}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-isStarting(s)}}
\label{mw__session_8h_0cd5392222008433c62e3f49fcc002cb}


\textbf{Value:}

\begin{Code}\begin{verbatim}(mwSession_isState((s), mwSession_STARTING)  || \
   mwSession_isState((s), mwSession_HANDSHAKE) || \
   mwSession_isState((s), mwSession_HANDSHAKE_ACK) || \
   mwSession_isState((s), mwSession_LOGIN) || \
   mwSession_isState((s), mwSession_LOGIN_ACK) || \
   mwSession_isState((s), mwSession_LOGIN_REDIR) || \
   mwSession_isState((s), mwSession_LOGIN_CONT))
\end{verbatim}
\end{Code}
\hypertarget{mw__session_8h_4de18b78247d38abdbf8e6b17911af6a}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-isState@{mwSession\_\-isState}}
\index{mwSession\_\-isState@{mwSession\_\-isState}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-isState({\bf session}, {\bf state})~(mwSession\_\-getState(({\bf session})) == ({\bf state}))}}
\label{mw__session_8h_4de18b78247d38abdbf8e6b17911af6a}


\hypertarget{mw__session_8h_6675346a430b5966fa3104cc7d84a9cf}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-isStopped@{mwSession\_\-isStopped}}
\index{mwSession\_\-isStopped@{mwSession\_\-isStopped}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-isStopped(s)~(mwSession\_\-isState((s), mwSession\_\-STOPPED))}}
\label{mw__session_8h_6675346a430b5966fa3104cc7d84a9cf}


\hypertarget{mw__session_8h_e1e43ebfa1b40404e9a81fb238bf4c3f}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-isStopping@{mwSession\_\-isStopping}}
\index{mwSession\_\-isStopping@{mwSession\_\-isStopping}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-isStopping(s)~(mwSession\_\-isState((s), mwSession\_\-STOPPING))}}
\label{mw__session_8h_e1e43ebfa1b40404e9a81fb238bf4c3f}


\hypertarget{mw__session_8h_6bac49bf2171ad349c3f8c4dac16c1c8}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-SERVER\_\-VER\_\-MAJOR@{mwSession\_\-SERVER\_\-VER\_\-MAJOR}}
\index{mwSession\_\-SERVER\_\-VER\_\-MAJOR@{mwSession\_\-SERVER\_\-VER\_\-MAJOR}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-SERVER\_\-VER\_\-MAJOR~\char`\"{}server.version.major\char`\"{}}}
\label{mw__session_8h_6bac49bf2171ad349c3f8c4dac16c1c8}


guint16, major version of server protocol 

\hypertarget{mw__session_8h_87f478d902728b24efa6b29300d3f80b}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-SERVER\_\-VER\_\-MINOR@{mwSession\_\-SERVER\_\-VER\_\-MINOR}}
\index{mwSession\_\-SERVER\_\-VER\_\-MINOR@{mwSession\_\-SERVER\_\-VER\_\-MINOR}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define mwSession\_\-SERVER\_\-VER\_\-MINOR~\char`\"{}server.version.minor\char`\"{}}}
\label{mw__session_8h_87f478d902728b24efa6b29300d3f80b}


guint16, minor version of server protocol 



\subsection{Enumeration Type Documentation}
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSessionState@{mwSessionState}}
\index{mwSessionState@{mwSessionState}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf mwSessionState}}}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f}


\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{mwSession\_\-STARTING@{mwSession\_\-STARTING}!mw\_\-session.h@{mw\_\-session.h}}\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-STARTING@{mwSession\_\-STARTING}}\item[{\em 
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f9830cfccaba808c30bf7bc124878c121}{
mwSession\_\-STARTING}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f9830cfccaba808c30bf7bc124878c121}
}]session is starting \index{mwSession\_\-HANDSHAKE@{mwSession\_\-HANDSHAKE}!mw\_\-session.h@{mw\_\-session.h}}\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-HANDSHAKE@{mwSession\_\-HANDSHAKE}}\item[{\em 
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f2ac4bf847cbc46277a3c73839934243a}{
mwSession\_\-HANDSHAKE}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f2ac4bf847cbc46277a3c73839934243a}
}]session has sent handshake \index{mwSession\_\-HANDSHAKE\_\-ACK@{mwSession\_\-HANDSHAKE\_\-ACK}!mw\_\-session.h@{mw\_\-session.h}}\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-HANDSHAKE\_\-ACK@{mwSession\_\-HANDSHAKE\_\-ACK}}\item[{\em 
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f994478c24dcd42f57063fab313fdd8f0}{
mwSession\_\-HANDSHAKE\_\-ACK}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f994478c24dcd42f57063fab313fdd8f0}
}]session has received handshake ack \index{mwSession\_\-LOGIN@{mwSession\_\-LOGIN}!mw\_\-session.h@{mw\_\-session.h}}\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-LOGIN@{mwSession\_\-LOGIN}}\item[{\em 
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8fd13ae235c70756d58e86a5d3fa0a9fd7}{
mwSession\_\-LOGIN}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8fd13ae235c70756d58e86a5d3fa0a9fd7}
}]session has sent login \index{mwSession\_\-LOGIN\_\-REDIR@{mwSession\_\-LOGIN\_\-REDIR}!mw\_\-session.h@{mw\_\-session.h}}\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-LOGIN\_\-REDIR@{mwSession\_\-LOGIN\_\-REDIR}}\item[{\em 
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f6fba5e714829218cff2bcf8990429c84}{
mwSession\_\-LOGIN\_\-REDIR}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f6fba5e714829218cff2bcf8990429c84}
}]session has been redirected \index{mwSession\_\-LOGIN\_\-ACK@{mwSession\_\-LOGIN\_\-ACK}!mw\_\-session.h@{mw\_\-session.h}}\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-LOGIN\_\-ACK@{mwSession\_\-LOGIN\_\-ACK}}\item[{\em 
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f13304078f2f7c7899a3e6ff8b0d43e10}{
mwSession\_\-LOGIN\_\-ACK}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f13304078f2f7c7899a3e6ff8b0d43e10}
}]session has received login ack \index{mwSession\_\-STARTED@{mwSession\_\-STARTED}!mw\_\-session.h@{mw\_\-session.h}}\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-STARTED@{mwSession\_\-STARTED}}\item[{\em 
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f6204d52622b541dd60cd40e004d2118d}{
mwSession\_\-STARTED}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f6204d52622b541dd60cd40e004d2118d}
}]session is active \index{mwSession\_\-STOPPING@{mwSession\_\-STOPPING}!mw\_\-session.h@{mw\_\-session.h}}\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-STOPPING@{mwSession\_\-STOPPING}}\item[{\em 
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8fb710bf16db3e1f29f773c6bf70ee9ee9}{
mwSession\_\-STOPPING}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8fb710bf16db3e1f29f773c6bf70ee9ee9}
}]session is shutting down \index{mwSession\_\-STOPPED@{mwSession\_\-STOPPED}!mw\_\-session.h@{mw\_\-session.h}}\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-STOPPED@{mwSession\_\-STOPPED}}\item[{\em 
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f69035e27489f79b82d9ef3c7b9514706}{
mwSession\_\-STOPPED}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f69035e27489f79b82d9ef3c7b9514706}
}]session is stopped \index{mwSession\_\-UNKNOWN@{mwSession\_\-UNKNOWN}!mw\_\-session.h@{mw\_\-session.h}}\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-UNKNOWN@{mwSession\_\-UNKNOWN}}\item[{\em 
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8fbd45e4568ae4b047f7c90b1aeb57c580}{
mwSession\_\-UNKNOWN}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8fbd45e4568ae4b047f7c90b1aeb57c580}
}]indicates an error determining state \index{mwSession\_\-LOGIN\_\-CONT@{mwSession\_\-LOGIN\_\-CONT}!mw\_\-session.h@{mw\_\-session.h}}\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-LOGIN\_\-CONT@{mwSession\_\-LOGIN\_\-CONT}}\item[{\em 
\hypertarget{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f44286972a65354abfc208e0a5c922ccb}{
mwSession\_\-LOGIN\_\-CONT}
\label{mw__session_8h_f27bba1d2fcb53358371c0eca6c57a8f44286972a65354abfc208e0a5c922ccb}
}]session has sent a login continue \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{mw__session_8h_8f032bd5928aefde5e78976717d2e6fb}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-addCipher@{mwSession\_\-addCipher}}
\index{mwSession\_\-addCipher@{mwSession\_\-addCipher}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gboolean mwSession\_\-addCipher (struct {\bf mwSession} $\ast$, struct {\bf mwCipher} $\ast$)}}
\label{mw__session_8h_8f032bd5928aefde5e78976717d2e6fb}


adds a cipher to the session. 

\hypertarget{mw__session_8h_c6f9b04c3b494dde60ee7dd064370582}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-addService@{mwSession\_\-addService}}
\index{mwSession\_\-addService@{mwSession\_\-addService}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gboolean mwSession\_\-addService (struct {\bf mwSession} $\ast$, struct {\bf mwService} $\ast$)}}
\label{mw__session_8h_c6f9b04c3b494dde60ee7dd064370582}


adds a service to the session. 

If the session is started (or when the session is successfully started) and the service has a start function, the session will request service availability from the server. On receipt of the service availability notification, the session will call the service's start function.

\begin{Desc}
\item[Returns:]TRUE if the session was added correctly \end{Desc}
\hypertarget{mw__session_8h_0d942b183a0657122fd511816cde0aae}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-forceLogin@{mwSession\_\-forceLogin}}
\index{mwSession\_\-forceLogin@{mwSession\_\-forceLogin}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mwSession\_\-forceLogin (struct {\bf mwSession} $\ast$ {\em s})}}
\label{mw__session_8h_0d942b183a0657122fd511816cde0aae}


respond to a login redirect message by forcing the login sequence to continue through the immediate server. 

\hypertarget{mw__session_8h_15f227dac0e09d26e5d51647741d02c1}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-free@{mwSession\_\-free}}
\index{mwSession\_\-free@{mwSession\_\-free}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mwSession\_\-free (struct {\bf mwSession} $\ast$)}}
\label{mw__session_8h_15f227dac0e09d26e5d51647741d02c1}


stop, clear, free a session. 

Does not free contained ciphers or services, these must be taken care of explicitly. \hypertarget{mw__session_8h_9b649dca88ecfe556931204f61cfc7f0}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getChannels@{mwSession\_\-getChannels}}
\index{mwSession\_\-getChannels@{mwSession\_\-getChannels}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct {\bf mwChannelSet}$\ast$ mwSession\_\-getChannels (struct {\bf mwSession} $\ast$)\hspace{0.3cm}{\tt  \mbox{[}read\mbox{]}}}}
\label{mw__session_8h_9b649dca88ecfe556931204f61cfc7f0}


\hypertarget{mw__session_8h_4ba31ddd29d88229f2e8e61ff8728374}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getCipher@{mwSession\_\-getCipher}}
\index{mwSession\_\-getCipher@{mwSession\_\-getCipher}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct {\bf mwCipher}$\ast$ mwSession\_\-getCipher (struct {\bf mwSession} $\ast$, guint16 {\em type})\hspace{0.3cm}{\tt  \mbox{[}read\mbox{]}}}}
\label{mw__session_8h_4ba31ddd29d88229f2e8e61ff8728374}


find a cipher by its type identifier 

\hypertarget{mw__session_8h_214296ae70ec8a7e7aa8d5073209b925}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getCiphers@{mwSession\_\-getCiphers}}
\index{mwSession\_\-getCiphers@{mwSession\_\-getCiphers}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GList$\ast$ mwSession\_\-getCiphers (struct {\bf mwSession} $\ast$)}}
\label{mw__session_8h_214296ae70ec8a7e7aa8d5073209b925}


a GList of ciphers in this session. 

The GList needs to be freed after use \hypertarget{mw__session_8h_2061173e5b0b7199b7951920a475de22}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getClientData@{mwSession\_\-getClientData}}
\index{mwSession\_\-getClientData@{mwSession\_\-getClientData}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gpointer mwSession\_\-getClientData (struct {\bf mwSession} $\ast$ {\em session})}}
\label{mw__session_8h_2061173e5b0b7199b7951920a475de22}


\hypertarget{mw__session_8h_6ca89c231099ec608255f9153e48bd41}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getHandler@{mwSession\_\-getHandler}}
\index{mwSession\_\-getHandler@{mwSession\_\-getHandler}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct {\bf mwSessionHandler}$\ast$ mwSession\_\-getHandler (struct {\bf mwSession} $\ast$)\hspace{0.3cm}{\tt  \mbox{[}read\mbox{]}}}}
\label{mw__session_8h_6ca89c231099ec608255f9153e48bd41}


obtain a reference to the session's handler 

\hypertarget{mw__session_8h_2c2c73c430879bc51bd53d5dea9ff87c}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getLoginInfo@{mwSession\_\-getLoginInfo}}
\index{mwSession\_\-getLoginInfo@{mwSession\_\-getLoginInfo}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct {\bf mwLoginInfo}$\ast$ mwSession\_\-getLoginInfo (struct {\bf mwSession} $\ast$)\hspace{0.3cm}{\tt  \mbox{[}read\mbox{]}}}}
\label{mw__session_8h_2c2c73c430879bc51bd53d5dea9ff87c}


reference the login information for the session 

\hypertarget{mw__session_8h_f40d8491fa06d6386414f8bd54d33e04}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getPrivacyInfo@{mwSession\_\-getPrivacyInfo}}
\index{mwSession\_\-getPrivacyInfo@{mwSession\_\-getPrivacyInfo}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct {\bf mwPrivacyInfo}$\ast$ mwSession\_\-getPrivacyInfo (struct {\bf mwSession} $\ast$)\hspace{0.3cm}{\tt  \mbox{[}read\mbox{]}}}}
\label{mw__session_8h_f40d8491fa06d6386414f8bd54d33e04}


direct reference to the session's internal privacy structure 

\hypertarget{mw__session_8h_cc536511205affec12c734efd9735e91}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getProperty@{mwSession\_\-getProperty}}
\index{mwSession\_\-getProperty@{mwSession\_\-getProperty}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gpointer mwSession\_\-getProperty (struct {\bf mwSession} $\ast$, const char $\ast$ {\em key})}}
\label{mw__session_8h_cc536511205affec12c734efd9735e91}


obtain the value of a previously set property, or NULL 

\hypertarget{mw__session_8h_9219b977141fa0211d0cce8848e4a11d}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getService@{mwSession\_\-getService}}
\index{mwSession\_\-getService@{mwSession\_\-getService}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct {\bf mwService}$\ast$ mwSession\_\-getService (struct {\bf mwSession} $\ast$, guint32 {\em type})\hspace{0.3cm}{\tt  \mbox{[}read\mbox{]}}}}
\label{mw__session_8h_9219b977141fa0211d0cce8848e4a11d}


find a service by its type identifier 

\hypertarget{mw__session_8h_88c6a4eb07a4ed80e561772645da6e6c}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getServices@{mwSession\_\-getServices}}
\index{mwSession\_\-getServices@{mwSession\_\-getServices}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GList$\ast$ mwSession\_\-getServices (struct {\bf mwSession} $\ast$)}}
\label{mw__session_8h_88c6a4eb07a4ed80e561772645da6e6c}


a GList of services in this session. 

The GList needs to be freed after use \hypertarget{mw__session_8h_c98375b3bdde1fcb6f7576376495ad09}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getState@{mwSession\_\-getState}}
\index{mwSession\_\-getState@{mwSession\_\-getState}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf mwSessionState} mwSession\_\-getState (struct {\bf mwSession} $\ast$)}}
\label{mw__session_8h_c98375b3bdde1fcb6f7576376495ad09}


current status of the session 

\hypertarget{mw__session_8h_4ccd4606756bf065c52ed31d59fb4482}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getStateInfo@{mwSession\_\-getStateInfo}}
\index{mwSession\_\-getStateInfo@{mwSession\_\-getStateInfo}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gpointer mwSession\_\-getStateInfo (struct {\bf mwSession} $\ast$)}}
\label{mw__session_8h_4ccd4606756bf065c52ed31d59fb4482}


additional status-specific information. 

Depending on the state of the session, this value has different meaning.

\begin{itemize}
\item {\tt mwSession\_\-STOPPING} guint32 error code causing the session to shut down\end{itemize}
\begin{itemize}
\item {\tt mwSession\_\-STOPPED} guint32 error code causing the session to shut down\end{itemize}
\begin{itemize}
\item {\tt mwSession\_\-LOGIN\_\-REDIR} (char $\ast$) host to redirect to \end{itemize}
\hypertarget{mw__session_8h_394f76a8608dedd50c4984364649c150}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-getUserStatus@{mwSession\_\-getUserStatus}}
\index{mwSession\_\-getUserStatus@{mwSession\_\-getUserStatus}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct {\bf mwUserStatus}$\ast$ mwSession\_\-getUserStatus (struct {\bf mwSession} $\ast$)\hspace{0.3cm}{\tt  \mbox{[}read\mbox{]}}}}
\label{mw__session_8h_394f76a8608dedd50c4984364649c150}


\hypertarget{mw__session_8h_e0a8e4b2f0a24b6e6db29f5a57442369}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-new@{mwSession\_\-new}}
\index{mwSession\_\-new@{mwSession\_\-new}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct {\bf mwSession}$\ast$ mwSession\_\-new (struct {\bf mwSessionHandler} $\ast$)\hspace{0.3cm}{\tt  \mbox{[}read\mbox{]}}}}
\label{mw__session_8h_e0a8e4b2f0a24b6e6db29f5a57442369}


allocate a new session 

\hypertarget{mw__session_8h_69261eefd22f97f6fd453ca0507cff9e}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-recv@{mwSession\_\-recv}}
\index{mwSession\_\-recv@{mwSession\_\-recv}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mwSession\_\-recv (struct {\bf mwSession} $\ast$, const guchar $\ast$, gsize)}}
\label{mw__session_8h_69261eefd22f97f6fd453ca0507cff9e}


Data is buffered, unpacked, and parsed into a message, then processed accordingly. 

\hypertarget{mw__session_8h_b5825818838148ea8beb0448639a40a0}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-removeCipher@{mwSession\_\-removeCipher}}
\index{mwSession\_\-removeCipher@{mwSession\_\-removeCipher}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct {\bf mwCipher}$\ast$ mwSession\_\-removeCipher (struct {\bf mwSession} $\ast$, guint16 {\em type})\hspace{0.3cm}{\tt  \mbox{[}read\mbox{]}}}}
\label{mw__session_8h_b5825818838148ea8beb0448639a40a0}


remove a cipher from the session 

\hypertarget{mw__session_8h_f5fe774ac33affc9c141c0b30c8c4a7a}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-removeClientData@{mwSession\_\-removeClientData}}
\index{mwSession\_\-removeClientData@{mwSession\_\-removeClientData}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mwSession\_\-removeClientData (struct {\bf mwSession} $\ast$ {\em session})}}
\label{mw__session_8h_f5fe774ac33affc9c141c0b30c8c4a7a}


remove client data, calling the optional GDestroyNotify function indicated in mwSession\_\-setClientData if applicable 

\hypertarget{mw__session_8h_cd2f1aab5eb04b29e73040069c04a976}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-removeProperty@{mwSession\_\-removeProperty}}
\index{mwSession\_\-removeProperty@{mwSession\_\-removeProperty}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mwSession\_\-removeProperty (struct {\bf mwSession} $\ast$, const char $\ast$ {\em key})}}
\label{mw__session_8h_cd2f1aab5eb04b29e73040069c04a976}


remove a property, calling the optional GDestroyNotify function indicated in mwSession\_\-setProperty if applicable 

\hypertarget{mw__session_8h_43e307ec9138cfe706ce91ab5978bb08}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-removeService@{mwSession\_\-removeService}}
\index{mwSession\_\-removeService@{mwSession\_\-removeService}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct {\bf mwService}$\ast$ mwSession\_\-removeService (struct {\bf mwSession} $\ast$, guint32 {\em type})\hspace{0.3cm}{\tt  \mbox{[}read\mbox{]}}}}
\label{mw__session_8h_43e307ec9138cfe706ce91ab5978bb08}


removes a service from the session. 

If the session is started and the service has a stop function, it will be called. Returns the removed service \hypertarget{mw__session_8h_547ba5e8411854dfdcc4fd1b992c7da8}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-send@{mwSession\_\-send}}
\index{mwSession\_\-send@{mwSession\_\-send}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mwSession\_\-send (struct {\bf mwSession} $\ast$ {\em s}, struct {\bf mwMessage} $\ast$ {\em msg})}}
\label{mw__session_8h_547ba5e8411854dfdcc4fd1b992c7da8}


primarily used by services to have messages serialized and sent 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]session to send message over \item[{\em msg}]message to serialize and send \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 for success \end{Desc}
\hypertarget{mw__session_8h_b4bb651abfc49566be231bfa082f9d01}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-sendAnnounce@{mwSession\_\-sendAnnounce}}
\index{mwSession\_\-sendAnnounce@{mwSession\_\-sendAnnounce}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mwSession\_\-sendAnnounce (struct {\bf mwSession} $\ast$ {\em s}, gboolean {\em may\_\-reply}, const char $\ast$ {\em text}, const GList $\ast$ {\em recipients})}}
\label{mw__session_8h_b4bb651abfc49566be231bfa082f9d01}


send an announcement to a list of users/groups. 

Targets of announcement must be in the same community as the session.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]session to send announcement from \item[{\em may\_\-reply}]permit clients to reply. Not all clients honor this. \item[{\em text}]text of announcement \item[{\em recipients}]list of recipients. Each recipient is specified by a single string, prefix with \char`\"{}@U \char`\"{} for users and \char`\"{}@G \char`\"{} for Notes Address Book groups. \end{description}
\end{Desc}
\hypertarget{mw__session_8h_76937609f785aa1830fddd58c5995477}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-sendKeepalive@{mwSession\_\-sendKeepalive}}
\index{mwSession\_\-sendKeepalive@{mwSession\_\-sendKeepalive}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mwSession\_\-sendKeepalive (struct {\bf mwSession} $\ast$ {\em s})}}
\label{mw__session_8h_76937609f785aa1830fddd58c5995477}


sends the keepalive byte 

\hypertarget{mw__session_8h_7c2770250f36c6c2cc3b8a857a5e42db}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-senseService@{mwSession\_\-senseService}}
\index{mwSession\_\-senseService@{mwSession\_\-senseService}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mwSession\_\-senseService (struct {\bf mwSession} $\ast$ {\em s}, guint32 {\em type})}}
\label{mw__session_8h_7c2770250f36c6c2cc3b8a857a5e42db}


instruct a STARTED session to check the server for the presense of a given service. 

The service will be automatically started upon receipt of an affirmative reply from the server. This function is automatically called upon all services in a session when the session is fully STARTED.

Services which terminate due to an error may call this on themselves to re-initialize when their server-side counterpart is made available again.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]owning session \item[{\em type}]service type ID \end{description}
\end{Desc}
\hypertarget{mw__session_8h_d24576610f20159cf13c6104a1f5c615}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-setClientData@{mwSession\_\-setClientData}}
\index{mwSession\_\-setClientData@{mwSession\_\-setClientData}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mwSession\_\-setClientData (struct {\bf mwSession} $\ast$ {\em session}, gpointer {\em data}, GDestroyNotify {\em clear})}}
\label{mw__session_8h_d24576610f20159cf13c6104a1f5c615}


associate arbitrary data with the session for use by the client code. 

Only client applications should use this, never services.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em session}]the session to associate the data with \item[{\em data}]arbitrary client data \item[{\em clear}]optional cleanup function called on data from mwSession\_\-removeClientData and mwSession\_\-free \end{description}
\end{Desc}
\hypertarget{mw__session_8h_f0073cb84869b5e61a2eae4eccf265d4}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-setPrivacyInfo@{mwSession\_\-setPrivacyInfo}}
\index{mwSession\_\-setPrivacyInfo@{mwSession\_\-setPrivacyInfo}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mwSession\_\-setPrivacyInfo (struct {\bf mwSession} $\ast$, struct {\bf mwPrivacyInfo} $\ast$)}}
\label{mw__session_8h_f0073cb84869b5e61a2eae4eccf265d4}


set the internal privacy information, and inform the server as necessary. 

Triggers the on\_\-setPrivacyInfo call-back. \hypertarget{mw__session_8h_d2b99bcf049f9906c7151b7626273b0d}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-setProperty@{mwSession\_\-setProperty}}
\index{mwSession\_\-setProperty@{mwSession\_\-setProperty}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mwSession\_\-setProperty (struct {\bf mwSession} $\ast$, const char $\ast$ {\em key}, gpointer {\em val}, GDestroyNotify {\em clear})}}
\label{mw__session_8h_d2b99bcf049f9906c7151b7626273b0d}


associate a key:value pair with the session. 

If an existing value is associated with the same key, it will have its clear function called and will be replaced with the new value \hypertarget{mw__session_8h_6fad26d4cfa3dd7bdc1b402ff2ec10d7}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-setUserStatus@{mwSession\_\-setUserStatus}}
\index{mwSession\_\-setUserStatus@{mwSession\_\-setUserStatus}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mwSession\_\-setUserStatus (struct {\bf mwSession} $\ast$, struct {\bf mwUserStatus} $\ast$)}}
\label{mw__session_8h_6fad26d4cfa3dd7bdc1b402ff2ec10d7}


set the internal user status state, and inform the server as necessary. 

Triggers the on\_\-setUserStatus call-back \hypertarget{mw__session_8h_1c3e5aac455c0594e21b02a379395513}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-start@{mwSession\_\-start}}
\index{mwSession\_\-start@{mwSession\_\-start}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mwSession\_\-start (struct {\bf mwSession} $\ast$)}}
\label{mw__session_8h_1c3e5aac455c0594e21b02a379395513}


instruct the session to begin. 

This will result in the initial handshake message being sent. \hypertarget{mw__session_8h_ca902e9266e244ff9ae2a325a7a655ba}{
\index{mw\_\-session.h@{mw\_\-session.h}!mwSession\_\-stop@{mwSession\_\-stop}}
\index{mwSession\_\-stop@{mwSession\_\-stop}!mw_session.h@{mw\_\-session.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mwSession\_\-stop (struct {\bf mwSession} $\ast$, guint32 {\em reason})}}
\label{mw__session_8h_ca902e9266e244ff9ae2a325a7a655ba}


instruct the session to shut down with the following reason code.