\doxysection{mw\+\_\+session.\+h File Reference}
\hypertarget{mw__session_8h}{}\label{mw__session_8h}\index{mw\_session.h@{mw\_session.h}}


A client session with a Sametime server is encapsulated in the \doxylink{structmwSession}{mw\+Session} structure.  


{\ttfamily \#include "{}mw\+\_\+common.\+h"{}}\newline
\doxysubsubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structmwSessionHandler}{mw\+Session\+Handler}}
\begin{DoxyCompactList}\small\item\em session handler. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{mw__session_8h_a9d3b3989818cc643dd2f39e25d74ab28}{MW\+\_\+\+PROTOCOL\+\_\+\+VERSION\+\_\+\+MAJOR}}~0x001e
\begin{DoxyCompactList}\small\item\em default protocol major version \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__session_8h_a913fb2fb3be37e4248d5b708b6c71e51}{MW\+\_\+\+PROTOCOL\+\_\+\+VERSION\+\_\+\+MINOR}}~0x001d
\begin{DoxyCompactList}\small\item\em default protocol minor version \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__session_8h_af0a7031c22a277fd04e19717b1cefa45}{mw\+Session\+\_\+\+AUTH\+\_\+\+PASSWORD}}~"{}session.\+auth.\+password"{}
\begin{DoxyCompactList}\small\item\em char \texorpdfstring{$\ast$}{*}, plaintext password \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__session_8h_a795bdeae05d31ee88b013404b8a5caaf}{mw\+Session\+\_\+\+AUTH\+\_\+\+TOKEN}}~"{}session.\+auth.\+token"{}
\begin{DoxyCompactList}\small\item\em struct \doxylink{structmwOpaque}{mw\+Opaque} \texorpdfstring{$\ast$}{*}, authentication token \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__session_8h_a6a5be138257a3274423d3637dd4f7162}{mw\+Session\+\_\+\+AUTH\+\_\+\+USER\+\_\+\+ID}}~"{}session.\+auth.\+user"{}
\begin{DoxyCompactList}\small\item\em char \texorpdfstring{$\ast$}{*}, session user ID \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__session_8h_a1e671d0043d238356ea33e133ff9fd93}{mw\+Session\+\_\+\+CLIENT\+\_\+\+HOST}}~"{}client.\+host"{}
\begin{DoxyCompactList}\small\item\em char \texorpdfstring{$\ast$}{*}, hostname of client \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__session_8h_a68baacbfa6cd815b600e84f32a0b2157}{mw\+Session\+\_\+\+CLIENT\+\_\+\+IP}}~"{}client.\+ip"{}
\begin{DoxyCompactList}\small\item\em guint32, local IP of client \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__session_8h_ab6fe3a356e3c665f0751b670e96d1a58}{mw\+Session\+\_\+\+CLIENT\+\_\+\+TYPE\+\_\+\+ID}}~"{}client.\+id"{}
\begin{DoxyCompactList}\small\item\em guint16, client type identifier \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__session_8h_a52bbb3a6fd21e59b8e9e467e95b142a9}{mw\+Session\+\_\+\+CLIENT\+\_\+\+VER\+\_\+\+MAJOR}}~"{}client.\+version.\+major"{}
\begin{DoxyCompactList}\small\item\em guint16, major version of client protocol \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__session_8h_aa3b7220625ca769b77af646e589bc2f3}{mw\+Session\+\_\+\+CLIENT\+\_\+\+VER\+\_\+\+MINOR}}~"{}client.\+version.\+minor"{}
\begin{DoxyCompactList}\small\item\em guint16, minor version of client protocol \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__session_8h_a3315b63b3e5f89fffe09d0011e619abe}{mw\+Session\+\_\+is\+Started}}(s)
\item 
\#define \mbox{\hyperlink{mw__session_8h_a0cd5392222008433c62e3f49fcc002cb}{mw\+Session\+\_\+is\+Starting}}(s)
\item 
\#define \mbox{\hyperlink{mw__session_8h_a4de18b78247d38abdbf8e6b17911af6a}{mw\+Session\+\_\+is\+State}}(session,  state)
\item 
\#define \mbox{\hyperlink{mw__session_8h_a6675346a430b5966fa3104cc7d84a9cf}{mw\+Session\+\_\+is\+Stopped}}(s)
\item 
\#define \mbox{\hyperlink{mw__session_8h_ae1e43ebfa1b40404e9a81fb238bf4c3f}{mw\+Session\+\_\+is\+Stopping}}(s)
\item 
\#define \mbox{\hyperlink{mw__session_8h_a6bac49bf2171ad349c3f8c4dac16c1c8}{mw\+Session\+\_\+\+SERVER\+\_\+\+VER\+\_\+\+MAJOR}}~"{}server.\+version.\+major"{}
\begin{DoxyCompactList}\small\item\em guint16, major version of server protocol \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__session_8h_a87f478d902728b24efa6b29300d3f80b}{mw\+Session\+\_\+\+SERVER\+\_\+\+VER\+\_\+\+MINOR}}~"{}server.\+version.\+minor"{}
\begin{DoxyCompactList}\small\item\em guint16, minor version of server protocol \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8f}{mw\+Session\+State}} \{ \newline
\mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa9830cfccaba808c30bf7bc124878c121}{mw\+Session\+\_\+\+STARTING}}
, \newline
\mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa2ac4bf847cbc46277a3c73839934243a}{mw\+Session\+\_\+\+HANDSHAKE}}
, \newline
\mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa994478c24dcd42f57063fab313fdd8f0}{mw\+Session\+\_\+\+HANDSHAKE\+\_\+\+ACK}}
, \newline
\mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fad13ae235c70756d58e86a5d3fa0a9fd7}{mw\+Session\+\_\+\+LOGIN}}
, \newline
\mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa6fba5e714829218cff2bcf8990429c84}{mw\+Session\+\_\+\+LOGIN\+\_\+\+REDIR}}
, \newline
\mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa13304078f2f7c7899a3e6ff8b0d43e10}{mw\+Session\+\_\+\+LOGIN\+\_\+\+ACK}}
, \newline
\mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa6204d52622b541dd60cd40e004d2118d}{mw\+Session\+\_\+\+STARTED}}
, \newline
\mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fab710bf16db3e1f29f773c6bf70ee9ee9}{mw\+Session\+\_\+\+STOPPING}}
, \newline
\mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa69035e27489f79b82d9ef3c7b9514706}{mw\+Session\+\_\+\+STOPPED}}
, \newline
\mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fabd45e4568ae4b047f7c90b1aeb57c580}{mw\+Session\+\_\+\+UNKNOWN}}
, \newline
\mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa44286972a65354abfc208e0a5c922ccb}{mw\+Session\+\_\+\+LOGIN\+\_\+\+CONT}}
 \}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
gboolean \mbox{\hyperlink{mw__session_8h_a8f032bd5928aefde5e78976717d2e6fb}{mw\+Session\+\_\+add\+Cipher}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, struct \mbox{\hyperlink{structmwCipher}{mw\+Cipher}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em adds a cipher to the session. \end{DoxyCompactList}\item 
gboolean \mbox{\hyperlink{mw__session_8h_ac6f9b04c3b494dde60ee7dd064370582}{mw\+Session\+\_\+add\+Service}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em adds a service to the session. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mw__session_8h_a0d942b183a0657122fd511816cde0aae}{mw\+Session\+\_\+force\+Login}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}s)
\begin{DoxyCompactList}\small\item\em respond to a login redirect message by forcing the login sequence to continue through the immediate server. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__session_8h_a15f227dac0e09d26e5d51647741d02c1}{mw\+Session\+\_\+free}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em stop, clear, free a session. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structmwChannelSet}{mw\+Channel\+Set}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_ad583ba2fc3d811db589c6ed13e9c8f3a}{mw\+Session\+\_\+get\+Channels}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\item 
struct \mbox{\hyperlink{structmwCipher}{mw\+Cipher}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_ada42a1efb8aeb6ea1bd05297ed946d5e}{mw\+Session\+\_\+get\+Cipher}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, guint16 type)
\begin{DoxyCompactList}\small\item\em find a cipher by its type identifier \end{DoxyCompactList}\item 
GList \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_a298e61a2b104c12de907461d1c87d68c}{mw\+Session\+\_\+get\+Ciphers}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em a GList of ciphers in this session. \end{DoxyCompactList}\item 
gpointer \mbox{\hyperlink{mw__session_8h_a2061173e5b0b7199b7951920a475de22}{mw\+Session\+\_\+get\+Client\+Data}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}session)
\item 
struct \mbox{\hyperlink{structmwSessionHandler}{mw\+Session\+Handler}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_a0adeca0c3211c4a5c2d29e5243d0bd2b}{mw\+Session\+\_\+get\+Handler}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em obtain a reference to the session\textquotesingle{}s handler \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structmwLoginInfo}{mw\+Login\+Info}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_abddf15496f22d42383a7ea54a5504b99}{mw\+Session\+\_\+get\+Login\+Info}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em reference the login information for the session \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structmwPrivacyInfo}{mw\+Privacy\+Info}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_ad2a75bcd8561bf074b5249436e2491e2}{mw\+Session\+\_\+get\+Privacy\+Info}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em direct reference to the session\textquotesingle{}s internal privacy structure \end{DoxyCompactList}\item 
gpointer \mbox{\hyperlink{mw__session_8h_acc536511205affec12c734efd9735e91}{mw\+Session\+\_\+get\+Property}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, const char \texorpdfstring{$\ast$}{*}key)
\begin{DoxyCompactList}\small\item\em obtain the value of a previously set property, or NULL \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_a81c3a48eca25f003f2b0734937263a00}{mw\+Session\+\_\+get\+Service}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, guint32 type)
\begin{DoxyCompactList}\small\item\em find a service by its type identifier \end{DoxyCompactList}\item 
GList \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_ae87e57b8cdeabbc3ccdb8fd0b90ce4db}{mw\+Session\+\_\+get\+Services}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em a GList of services in this session. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8f}{mw\+Session\+State}} \mbox{\hyperlink{mw__session_8h_ac98375b3bdde1fcb6f7576376495ad09}{mw\+Session\+\_\+get\+State}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em current status of the session \end{DoxyCompactList}\item 
gpointer \mbox{\hyperlink{mw__session_8h_a4ccd4606756bf065c52ed31d59fb4482}{mw\+Session\+\_\+get\+State\+Info}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em additional status-\/specific information. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structmwUserStatus}{mw\+User\+Status}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_ac28587924853a59ca5b4ab35721086dd}{mw\+Session\+\_\+get\+User\+Status}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\item 
struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_a453d7e10da829df202476ee1181f398b}{mw\+Session\+\_\+new}} (struct \mbox{\hyperlink{structmwSessionHandler}{mw\+Session\+Handler}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em allocate a new session \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__session_8h_a69261eefd22f97f6fd453ca0507cff9e}{mw\+Session\+\_\+recv}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, const guchar \texorpdfstring{$\ast$}{*}, gsize)
\begin{DoxyCompactList}\small\item\em Data is buffered, unpacked, and parsed into a message, then processed accordingly. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structmwCipher}{mw\+Cipher}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_a259917796bb8f1ad384a3b775437db5f}{mw\+Session\+\_\+remove\+Cipher}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, guint16 type)
\begin{DoxyCompactList}\small\item\em remove a cipher from the session \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__session_8h_af5fe774ac33affc9c141c0b30c8c4a7a}{mw\+Session\+\_\+remove\+Client\+Data}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}session)
\begin{DoxyCompactList}\small\item\em remove client data, calling the optional GDestroy\+Notify function indicated in mw\+Session\+\_\+set\+Client\+Data if applicable \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__session_8h_acd2f1aab5eb04b29e73040069c04a976}{mw\+Session\+\_\+remove\+Property}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, const char \texorpdfstring{$\ast$}{*}key)
\begin{DoxyCompactList}\small\item\em remove a property, calling the optional GDestroy\+Notify function indicated in mw\+Session\+\_\+set\+Property if applicable \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__session_8h_af62de883c2a6dccfcb217d4ea1935a35}{mw\+Session\+\_\+remove\+Service}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, guint32 type)
\begin{DoxyCompactList}\small\item\em removes a service from the session. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mw__session_8h_a547ba5e8411854dfdcc4fd1b992c7da8}{mw\+Session\+\_\+send}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}s, struct \mbox{\hyperlink{structmwMessage}{mw\+Message}} \texorpdfstring{$\ast$}{*}msg)
\begin{DoxyCompactList}\small\item\em primarily used by services to have messages serialized and sent \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mw__session_8h_ab4bb651abfc49566be231bfa082f9d01}{mw\+Session\+\_\+send\+Announce}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}s, gboolean may\+\_\+reply, const char \texorpdfstring{$\ast$}{*}text, const GList \texorpdfstring{$\ast$}{*}recipients)
\begin{DoxyCompactList}\small\item\em send an announcement to a list of users/groups. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mw__session_8h_a76937609f785aa1830fddd58c5995477}{mw\+Session\+\_\+send\+Keepalive}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}s)
\begin{DoxyCompactList}\small\item\em sends the keepalive byte \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__session_8h_a7c2770250f36c6c2cc3b8a857a5e42db}{mw\+Session\+\_\+sense\+Service}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}s, guint32 type)
\begin{DoxyCompactList}\small\item\em instruct a STARTED session to check the server for the presense of a given service. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__session_8h_ad24576610f20159cf13c6104a1f5c615}{mw\+Session\+\_\+set\+Client\+Data}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}session, gpointer data, GDestroy\+Notify clear)
\begin{DoxyCompactList}\small\item\em associate arbitrary data with the session for use by the client code. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mw__session_8h_af0073cb84869b5e61a2eae4eccf265d4}{mw\+Session\+\_\+set\+Privacy\+Info}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, struct \mbox{\hyperlink{structmwPrivacyInfo}{mw\+Privacy\+Info}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em set the internal privacy information, and inform the server as necessary. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__session_8h_ad2b99bcf049f9906c7151b7626273b0d}{mw\+Session\+\_\+set\+Property}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, const char \texorpdfstring{$\ast$}{*}key, gpointer val, GDestroy\+Notify clear)
\begin{DoxyCompactList}\small\item\em associate a key\+:value pair with the session. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mw__session_8h_a6fad26d4cfa3dd7bdc1b402ff2ec10d7}{mw\+Session\+\_\+set\+User\+Status}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, struct \mbox{\hyperlink{structmwUserStatus}{mw\+User\+Status}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em set the internal user status state, and inform the server as necessary. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__session_8h_a1c3e5aac455c0594e21b02a379395513}{mw\+Session\+\_\+start}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*})
\begin{DoxyCompactList}\small\item\em instruct the session to begin. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__session_8h_aca902e9266e244ff9ae2a325a7a655ba}{mw\+Session\+\_\+stop}} (struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}, guint32 reason)
\begin{DoxyCompactList}\small\item\em instruct the session to shut down with the following reason code. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A client session with a Sametime server is encapsulated in the \doxylink{structmwSession}{mw\+Session} 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 \doxylink{structmwSessionHandler}{mw\+Session\+Handler} 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 mw\+Session\+\_\+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. 

\label{doc-define-members}
\Hypertarget{mw__session_8h_doc-define-members}
\doxysubsection{Macro Definition Documentation}
\Hypertarget{mw__session_8h_a9d3b3989818cc643dd2f39e25d74ab28}\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}}
\doxysubsubsection{\texorpdfstring{MW\_PROTOCOL\_VERSION\_MAJOR}{MW\_PROTOCOL\_VERSION\_MAJOR}}
{\footnotesize\ttfamily \label{mw__session_8h_a9d3b3989818cc643dd2f39e25d74ab28} 
\#define MW\+\_\+\+PROTOCOL\+\_\+\+VERSION\+\_\+\+MAJOR~0x001e}



default protocol major version 

\Hypertarget{mw__session_8h_a913fb2fb3be37e4248d5b708b6c71e51}\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}}
\doxysubsubsection{\texorpdfstring{MW\_PROTOCOL\_VERSION\_MINOR}{MW\_PROTOCOL\_VERSION\_MINOR}}
{\footnotesize\ttfamily \label{mw__session_8h_a913fb2fb3be37e4248d5b708b6c71e51} 
\#define MW\+\_\+\+PROTOCOL\+\_\+\+VERSION\+\_\+\+MINOR~0x001d}



default protocol minor version 

\Hypertarget{mw__session_8h_af0a7031c22a277fd04e19717b1cefa45}\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}}
\doxysubsubsection{\texorpdfstring{mwSession\_AUTH\_PASSWORD}{mwSession\_AUTH\_PASSWORD}}
{\footnotesize\ttfamily \label{mw__session_8h_af0a7031c22a277fd04e19717b1cefa45} 
\#define mw\+Session\+\_\+\+AUTH\+\_\+\+PASSWORD~"{}session.\+auth.\+password"{}}



char \texorpdfstring{$\ast$}{*}, plaintext password 

\Hypertarget{mw__session_8h_a795bdeae05d31ee88b013404b8a5caaf}\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}}
\doxysubsubsection{\texorpdfstring{mwSession\_AUTH\_TOKEN}{mwSession\_AUTH\_TOKEN}}
{\footnotesize\ttfamily \label{mw__session_8h_a795bdeae05d31ee88b013404b8a5caaf} 
\#define mw\+Session\+\_\+\+AUTH\+\_\+\+TOKEN~"{}session.\+auth.\+token"{}}



struct \doxylink{structmwOpaque}{mw\+Opaque} \texorpdfstring{$\ast$}{*}, authentication token 

\Hypertarget{mw__session_8h_a6a5be138257a3274423d3637dd4f7162}\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}}
\doxysubsubsection{\texorpdfstring{mwSession\_AUTH\_USER\_ID}{mwSession\_AUTH\_USER\_ID}}
{\footnotesize\ttfamily \label{mw__session_8h_a6a5be138257a3274423d3637dd4f7162} 
\#define mw\+Session\+\_\+\+AUTH\+\_\+\+USER\+\_\+\+ID~"{}session.\+auth.\+user"{}}



char \texorpdfstring{$\ast$}{*}, session user ID 

\hypertarget{mw__session_8h_Session}{}\doxysubsection{\texorpdfstring{Properties}{Properties}}\label{mw__session_8h_Session}
for use with mw\+Session\+\_\+set\+Property, et al. \Hypertarget{mw__session_8h_a1e671d0043d238356ea33e133ff9fd93}\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}}
\doxysubsubsection{\texorpdfstring{mwSession\_CLIENT\_HOST}{mwSession\_CLIENT\_HOST}}
{\footnotesize\ttfamily \label{mw__session_8h_a1e671d0043d238356ea33e133ff9fd93} 
\#define mw\+Session\+\_\+\+CLIENT\+\_\+\+HOST~"{}client.\+host"{}}



char \texorpdfstring{$\ast$}{*}, hostname of client 

\Hypertarget{mw__session_8h_a68baacbfa6cd815b600e84f32a0b2157}\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}}
\doxysubsubsection{\texorpdfstring{mwSession\_CLIENT\_IP}{mwSession\_CLIENT\_IP}}
{\footnotesize\ttfamily \label{mw__session_8h_a68baacbfa6cd815b600e84f32a0b2157} 
\#define mw\+Session\+\_\+\+CLIENT\+\_\+\+IP~"{}client.\+ip"{}}



guint32, local IP of client 

\Hypertarget{mw__session_8h_ab6fe3a356e3c665f0751b670e96d1a58}\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}}
\doxysubsubsection{\texorpdfstring{mwSession\_CLIENT\_TYPE\_ID}{mwSession\_CLIENT\_TYPE\_ID}}
{\footnotesize\ttfamily \label{mw__session_8h_ab6fe3a356e3c665f0751b670e96d1a58} 
\#define mw\+Session\+\_\+\+CLIENT\+\_\+\+TYPE\+\_\+\+ID~"{}client.\+id"{}}



guint16, client type identifier 

\Hypertarget{mw__session_8h_a52bbb3a6fd21e59b8e9e467e95b142a9}\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}}
\doxysubsubsection{\texorpdfstring{mwSession\_CLIENT\_VER\_MAJOR}{mwSession\_CLIENT\_VER\_MAJOR}}
{\footnotesize\ttfamily \label{mw__session_8h_a52bbb3a6fd21e59b8e9e467e95b142a9} 
\#define mw\+Session\+\_\+\+CLIENT\+\_\+\+VER\+\_\+\+MAJOR~"{}client.\+version.\+major"{}}



guint16, major version of client protocol 

\Hypertarget{mw__session_8h_aa3b7220625ca769b77af646e589bc2f3}\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}}
\doxysubsubsection{\texorpdfstring{mwSession\_CLIENT\_VER\_MINOR}{mwSession\_CLIENT\_VER\_MINOR}}
{\footnotesize\ttfamily \label{mw__session_8h_aa3b7220625ca769b77af646e589bc2f3} 
\#define mw\+Session\+\_\+\+CLIENT\+\_\+\+VER\+\_\+\+MINOR~"{}client.\+version.\+minor"{}}



guint16, minor version of client protocol 

\Hypertarget{mw__session_8h_a3315b63b3e5f89fffe09d0011e619abe}\index{mw\_session.h@{mw\_session.h}!mwSession\_isStarted@{mwSession\_isStarted}}
\index{mwSession\_isStarted@{mwSession\_isStarted}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_isStarted}{mwSession\_isStarted}}
{\footnotesize\ttfamily \label{mw__session_8h_a3315b63b3e5f89fffe09d0011e619abe} 
\#define mw\+Session\+\_\+is\+Started(\begin{DoxyParamCaption}\item[{}]{s}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ (\mbox{\hyperlink{mw__session_8h_a4de18b78247d38abdbf8e6b17911af6a}{mwSession\_isState}}((s),\ \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa6204d52622b541dd60cd40e004d2118d}{mwSession\_STARTED}}))}

\end{DoxyCode}
\Hypertarget{mw__session_8h_a0cd5392222008433c62e3f49fcc002cb}\index{mw\_session.h@{mw\_session.h}!mwSession\_isStarting@{mwSession\_isStarting}}
\index{mwSession\_isStarting@{mwSession\_isStarting}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_isStarting}{mwSession\_isStarting}}
{\footnotesize\ttfamily \label{mw__session_8h_a0cd5392222008433c62e3f49fcc002cb} 
\#define mw\+Session\+\_\+is\+Starting(\begin{DoxyParamCaption}\item[{}]{s}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ (\mbox{\hyperlink{mw__session_8h_a4de18b78247d38abdbf8e6b17911af6a}{mwSession\_isState}}((s),\ \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa9830cfccaba808c30bf7bc124878c121}{mwSession\_STARTING}})\ \ ||\ \(\backslash\)}
\DoxyCodeLine{\ \ \ mwSession\_isState((s),\ \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa2ac4bf847cbc46277a3c73839934243a}{mwSession\_HANDSHAKE}})\ ||\ \(\backslash\)}
\DoxyCodeLine{\ \ \ mwSession\_isState((s),\ \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa994478c24dcd42f57063fab313fdd8f0}{mwSession\_HANDSHAKE\_ACK}})\ ||\ \(\backslash\)}
\DoxyCodeLine{\ \ \ mwSession\_isState((s),\ \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fad13ae235c70756d58e86a5d3fa0a9fd7}{mwSession\_LOGIN}})\ ||\ \(\backslash\)}
\DoxyCodeLine{\ \ \ mwSession\_isState((s),\ \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa13304078f2f7c7899a3e6ff8b0d43e10}{mwSession\_LOGIN\_ACK}})\ ||\ \(\backslash\)}
\DoxyCodeLine{\ \ \ mwSession\_isState((s),\ \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa6fba5e714829218cff2bcf8990429c84}{mwSession\_LOGIN\_REDIR}})\ ||\ \(\backslash\)}
\DoxyCodeLine{\ \ \ mwSession\_isState((s),\ \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa44286972a65354abfc208e0a5c922ccb}{mwSession\_LOGIN\_CONT}}))}

\end{DoxyCode}
\Hypertarget{mw__session_8h_a4de18b78247d38abdbf8e6b17911af6a}\index{mw\_session.h@{mw\_session.h}!mwSession\_isState@{mwSession\_isState}}
\index{mwSession\_isState@{mwSession\_isState}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_isState}{mwSession\_isState}}
{\footnotesize\ttfamily \label{mw__session_8h_a4de18b78247d38abdbf8e6b17911af6a} 
\#define mw\+Session\+\_\+is\+State(\begin{DoxyParamCaption}\item[{}]{session}{, }\item[{}]{state}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ (\mbox{\hyperlink{mw__session_8h_ac98375b3bdde1fcb6f7576376495ad09}{mwSession\_getState}}((session))\ ==\ (state))}

\end{DoxyCode}
\Hypertarget{mw__session_8h_a6675346a430b5966fa3104cc7d84a9cf}\index{mw\_session.h@{mw\_session.h}!mwSession\_isStopped@{mwSession\_isStopped}}
\index{mwSession\_isStopped@{mwSession\_isStopped}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_isStopped}{mwSession\_isStopped}}
{\footnotesize\ttfamily \label{mw__session_8h_a6675346a430b5966fa3104cc7d84a9cf} 
\#define mw\+Session\+\_\+is\+Stopped(\begin{DoxyParamCaption}\item[{}]{s}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ (\mbox{\hyperlink{mw__session_8h_a4de18b78247d38abdbf8e6b17911af6a}{mwSession\_isState}}((s),\ \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa69035e27489f79b82d9ef3c7b9514706}{mwSession\_STOPPED}}))}

\end{DoxyCode}
\Hypertarget{mw__session_8h_ae1e43ebfa1b40404e9a81fb238bf4c3f}\index{mw\_session.h@{mw\_session.h}!mwSession\_isStopping@{mwSession\_isStopping}}
\index{mwSession\_isStopping@{mwSession\_isStopping}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_isStopping}{mwSession\_isStopping}}
{\footnotesize\ttfamily \label{mw__session_8h_ae1e43ebfa1b40404e9a81fb238bf4c3f} 
\#define mw\+Session\+\_\+is\+Stopping(\begin{DoxyParamCaption}\item[{}]{s}{}\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ (\mbox{\hyperlink{mw__session_8h_a4de18b78247d38abdbf8e6b17911af6a}{mwSession\_isState}}((s),\ \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fab710bf16db3e1f29f773c6bf70ee9ee9}{mwSession\_STOPPING}}))}

\end{DoxyCode}
\Hypertarget{mw__session_8h_a6bac49bf2171ad349c3f8c4dac16c1c8}\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}}
\doxysubsubsection{\texorpdfstring{mwSession\_SERVER\_VER\_MAJOR}{mwSession\_SERVER\_VER\_MAJOR}}
{\footnotesize\ttfamily \label{mw__session_8h_a6bac49bf2171ad349c3f8c4dac16c1c8} 
\#define mw\+Session\+\_\+\+SERVER\+\_\+\+VER\+\_\+\+MAJOR~"{}server.\+version.\+major"{}}



guint16, major version of server protocol 

\Hypertarget{mw__session_8h_a87f478d902728b24efa6b29300d3f80b}\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}}
\doxysubsubsection{\texorpdfstring{mwSession\_SERVER\_VER\_MINOR}{mwSession\_SERVER\_VER\_MINOR}}
{\footnotesize\ttfamily \label{mw__session_8h_a87f478d902728b24efa6b29300d3f80b} 
\#define mw\+Session\+\_\+\+SERVER\+\_\+\+VER\+\_\+\+MINOR~"{}server.\+version.\+minor"{}}



guint16, minor version of server protocol 



\label{doc-enum-members}
\Hypertarget{mw__session_8h_doc-enum-members}
\doxysubsection{Enumeration Type Documentation}
\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8f}\index{mw\_session.h@{mw\_session.h}!mwSessionState@{mwSessionState}}
\index{mwSessionState@{mwSessionState}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSessionState}{mwSessionState}}
{\footnotesize\ttfamily \label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8f} 
enum \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8f}{mw\+Session\+State}}}

\begin{DoxyEnumFields}[2]{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{mwSession\_STARTING@{mwSession\_STARTING}!mw\_session.h@{mw\_session.h}}\index{mw\_session.h@{mw\_session.h}!mwSession\_STARTING@{mwSession\_STARTING}}}\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa9830cfccaba808c30bf7bc124878c121}\label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa9830cfccaba808c30bf7bc124878c121} 
mw\+Session\+\_\+\+STARTING&session is starting \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{mwSession\_HANDSHAKE@{mwSession\_HANDSHAKE}!mw\_session.h@{mw\_session.h}}\index{mw\_session.h@{mw\_session.h}!mwSession\_HANDSHAKE@{mwSession\_HANDSHAKE}}}\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa2ac4bf847cbc46277a3c73839934243a}\label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa2ac4bf847cbc46277a3c73839934243a} 
mw\+Session\+\_\+\+HANDSHAKE&session has sent handshake \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\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}}}\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa994478c24dcd42f57063fab313fdd8f0}\label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa994478c24dcd42f57063fab313fdd8f0} 
mw\+Session\+\_\+\+HANDSHAKE\+\_\+\+ACK&session has received handshake ack \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{mwSession\_LOGIN@{mwSession\_LOGIN}!mw\_session.h@{mw\_session.h}}\index{mw\_session.h@{mw\_session.h}!mwSession\_LOGIN@{mwSession\_LOGIN}}}\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fad13ae235c70756d58e86a5d3fa0a9fd7}\label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fad13ae235c70756d58e86a5d3fa0a9fd7} 
mw\+Session\+\_\+\+LOGIN&session has sent login \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\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}}}\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa6fba5e714829218cff2bcf8990429c84}\label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa6fba5e714829218cff2bcf8990429c84} 
mw\+Session\+\_\+\+LOGIN\+\_\+\+REDIR&session has been redirected \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\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}}}\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa13304078f2f7c7899a3e6ff8b0d43e10}\label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa13304078f2f7c7899a3e6ff8b0d43e10} 
mw\+Session\+\_\+\+LOGIN\+\_\+\+ACK&session has received login ack \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{mwSession\_STARTED@{mwSession\_STARTED}!mw\_session.h@{mw\_session.h}}\index{mw\_session.h@{mw\_session.h}!mwSession\_STARTED@{mwSession\_STARTED}}}\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa6204d52622b541dd60cd40e004d2118d}\label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa6204d52622b541dd60cd40e004d2118d} 
mw\+Session\+\_\+\+STARTED&session is active \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{mwSession\_STOPPING@{mwSession\_STOPPING}!mw\_session.h@{mw\_session.h}}\index{mw\_session.h@{mw\_session.h}!mwSession\_STOPPING@{mwSession\_STOPPING}}}\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fab710bf16db3e1f29f773c6bf70ee9ee9}\label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fab710bf16db3e1f29f773c6bf70ee9ee9} 
mw\+Session\+\_\+\+STOPPING&session is shutting down \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{mwSession\_STOPPED@{mwSession\_STOPPED}!mw\_session.h@{mw\_session.h}}\index{mw\_session.h@{mw\_session.h}!mwSession\_STOPPED@{mwSession\_STOPPED}}}\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa69035e27489f79b82d9ef3c7b9514706}\label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa69035e27489f79b82d9ef3c7b9514706} 
mw\+Session\+\_\+\+STOPPED&session is stopped \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{mwSession\_UNKNOWN@{mwSession\_UNKNOWN}!mw\_session.h@{mw\_session.h}}\index{mw\_session.h@{mw\_session.h}!mwSession\_UNKNOWN@{mwSession\_UNKNOWN}}}\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fabd45e4568ae4b047f7c90b1aeb57c580}\label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fabd45e4568ae4b047f7c90b1aeb57c580} 
mw\+Session\+\_\+\+UNKNOWN&indicates an error determining state \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\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}}}\Hypertarget{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa44286972a65354abfc208e0a5c922ccb}\label{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8fa44286972a65354abfc208e0a5c922ccb} 
mw\+Session\+\_\+\+LOGIN\+\_\+\+CONT&session has sent a login continue \\
\hline

\end{DoxyEnumFields}


\label{doc-func-members}
\Hypertarget{mw__session_8h_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{mw__session_8h_a8f032bd5928aefde5e78976717d2e6fb}\index{mw\_session.h@{mw\_session.h}!mwSession\_addCipher@{mwSession\_addCipher}}
\index{mwSession\_addCipher@{mwSession\_addCipher}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_addCipher()}{mwSession\_addCipher()}}
{\footnotesize\ttfamily \label{mw__session_8h_a8f032bd5928aefde5e78976717d2e6fb} 
gboolean mw\+Session\+\_\+add\+Cipher (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{struct \mbox{\hyperlink{structmwCipher}{mw\+Cipher}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



adds a cipher to the session. 

\Hypertarget{mw__session_8h_ac6f9b04c3b494dde60ee7dd064370582}\index{mw\_session.h@{mw\_session.h}!mwSession\_addService@{mwSession\_addService}}
\index{mwSession\_addService@{mwSession\_addService}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_addService()}{mwSession\_addService()}}
{\footnotesize\ttfamily \label{mw__session_8h_ac6f9b04c3b494dde60ee7dd064370582} 
gboolean mw\+Session\+\_\+add\+Service (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



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\textquotesingle{}s start function.

\begin{DoxyReturn}{Returns}
TRUE if the session was added correctly 
\end{DoxyReturn}
\Hypertarget{mw__session_8h_a0d942b183a0657122fd511816cde0aae}\index{mw\_session.h@{mw\_session.h}!mwSession\_forceLogin@{mwSession\_forceLogin}}
\index{mwSession\_forceLogin@{mwSession\_forceLogin}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_forceLogin()}{mwSession\_forceLogin()}}
{\footnotesize\ttfamily \label{mw__session_8h_a0d942b183a0657122fd511816cde0aae} 
int mw\+Session\+\_\+force\+Login (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{s}{}\end{DoxyParamCaption})}



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

\Hypertarget{mw__session_8h_a15f227dac0e09d26e5d51647741d02c1}\index{mw\_session.h@{mw\_session.h}!mwSession\_free@{mwSession\_free}}
\index{mwSession\_free@{mwSession\_free}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_free()}{mwSession\_free()}}
{\footnotesize\ttfamily \label{mw__session_8h_a15f227dac0e09d26e5d51647741d02c1} 
void mw\+Session\+\_\+free (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



stop, clear, free a session. 

Does not free contained ciphers or services, these must be taken care of explicitly. \Hypertarget{mw__session_8h_ad583ba2fc3d811db589c6ed13e9c8f3a}\index{mw\_session.h@{mw\_session.h}!mwSession\_getChannels@{mwSession\_getChannels}}
\index{mwSession\_getChannels@{mwSession\_getChannels}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getChannels()}{mwSession\_getChannels()}}
{\footnotesize\ttfamily \label{mw__session_8h_ad583ba2fc3d811db589c6ed13e9c8f3a} 
struct \mbox{\hyperlink{structmwChannelSet}{mw\+Channel\+Set}} \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+get\+Channels (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}

\Hypertarget{mw__session_8h_ada42a1efb8aeb6ea1bd05297ed946d5e}\index{mw\_session.h@{mw\_session.h}!mwSession\_getCipher@{mwSession\_getCipher}}
\index{mwSession\_getCipher@{mwSession\_getCipher}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getCipher()}{mwSession\_getCipher()}}
{\footnotesize\ttfamily \label{mw__session_8h_ada42a1efb8aeb6ea1bd05297ed946d5e} 
struct \mbox{\hyperlink{structmwCipher}{mw\+Cipher}} \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+get\+Cipher (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{guint16}]{type}{}\end{DoxyParamCaption})}



find a cipher by its type identifier 

\Hypertarget{mw__session_8h_a298e61a2b104c12de907461d1c87d68c}\index{mw\_session.h@{mw\_session.h}!mwSession\_getCiphers@{mwSession\_getCiphers}}
\index{mwSession\_getCiphers@{mwSession\_getCiphers}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getCiphers()}{mwSession\_getCiphers()}}
{\footnotesize\ttfamily \label{mw__session_8h_a298e61a2b104c12de907461d1c87d68c} 
GList \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+get\+Ciphers (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



a GList of ciphers in this session. 

The GList needs to be freed after use \Hypertarget{mw__session_8h_a2061173e5b0b7199b7951920a475de22}\index{mw\_session.h@{mw\_session.h}!mwSession\_getClientData@{mwSession\_getClientData}}
\index{mwSession\_getClientData@{mwSession\_getClientData}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getClientData()}{mwSession\_getClientData()}}
{\footnotesize\ttfamily \label{mw__session_8h_a2061173e5b0b7199b7951920a475de22} 
gpointer mw\+Session\+\_\+get\+Client\+Data (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{session}{}\end{DoxyParamCaption})}

\Hypertarget{mw__session_8h_a0adeca0c3211c4a5c2d29e5243d0bd2b}\index{mw\_session.h@{mw\_session.h}!mwSession\_getHandler@{mwSession\_getHandler}}
\index{mwSession\_getHandler@{mwSession\_getHandler}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getHandler()}{mwSession\_getHandler()}}
{\footnotesize\ttfamily \label{mw__session_8h_a0adeca0c3211c4a5c2d29e5243d0bd2b} 
struct \mbox{\hyperlink{structmwSessionHandler}{mw\+Session\+Handler}} \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+get\+Handler (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



obtain a reference to the session\textquotesingle{}s handler 

\Hypertarget{mw__session_8h_abddf15496f22d42383a7ea54a5504b99}\index{mw\_session.h@{mw\_session.h}!mwSession\_getLoginInfo@{mwSession\_getLoginInfo}}
\index{mwSession\_getLoginInfo@{mwSession\_getLoginInfo}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getLoginInfo()}{mwSession\_getLoginInfo()}}
{\footnotesize\ttfamily \label{mw__session_8h_abddf15496f22d42383a7ea54a5504b99} 
struct \mbox{\hyperlink{structmwLoginInfo}{mw\+Login\+Info}} \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+get\+Login\+Info (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



reference the login information for the session 

\Hypertarget{mw__session_8h_ad2a75bcd8561bf074b5249436e2491e2}\index{mw\_session.h@{mw\_session.h}!mwSession\_getPrivacyInfo@{mwSession\_getPrivacyInfo}}
\index{mwSession\_getPrivacyInfo@{mwSession\_getPrivacyInfo}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getPrivacyInfo()}{mwSession\_getPrivacyInfo()}}
{\footnotesize\ttfamily \label{mw__session_8h_ad2a75bcd8561bf074b5249436e2491e2} 
struct \mbox{\hyperlink{structmwPrivacyInfo}{mw\+Privacy\+Info}} \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+get\+Privacy\+Info (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



direct reference to the session\textquotesingle{}s internal privacy structure 

\Hypertarget{mw__session_8h_acc536511205affec12c734efd9735e91}\index{mw\_session.h@{mw\_session.h}!mwSession\_getProperty@{mwSession\_getProperty}}
\index{mwSession\_getProperty@{mwSession\_getProperty}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getProperty()}{mwSession\_getProperty()}}
{\footnotesize\ttfamily \label{mw__session_8h_acc536511205affec12c734efd9735e91} 
gpointer mw\+Session\+\_\+get\+Property (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{key}{}\end{DoxyParamCaption})}



obtain the value of a previously set property, or NULL 

\Hypertarget{mw__session_8h_a81c3a48eca25f003f2b0734937263a00}\index{mw\_session.h@{mw\_session.h}!mwSession\_getService@{mwSession\_getService}}
\index{mwSession\_getService@{mwSession\_getService}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getService()}{mwSession\_getService()}}
{\footnotesize\ttfamily \label{mw__session_8h_a81c3a48eca25f003f2b0734937263a00} 
struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+get\+Service (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{guint32}]{type}{}\end{DoxyParamCaption})}



find a service by its type identifier 

\Hypertarget{mw__session_8h_ae87e57b8cdeabbc3ccdb8fd0b90ce4db}\index{mw\_session.h@{mw\_session.h}!mwSession\_getServices@{mwSession\_getServices}}
\index{mwSession\_getServices@{mwSession\_getServices}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getServices()}{mwSession\_getServices()}}
{\footnotesize\ttfamily \label{mw__session_8h_ae87e57b8cdeabbc3ccdb8fd0b90ce4db} 
GList \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+get\+Services (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



a GList of services in this session. 

The GList needs to be freed after use \Hypertarget{mw__session_8h_ac98375b3bdde1fcb6f7576376495ad09}\index{mw\_session.h@{mw\_session.h}!mwSession\_getState@{mwSession\_getState}}
\index{mwSession\_getState@{mwSession\_getState}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getState()}{mwSession\_getState()}}
{\footnotesize\ttfamily \label{mw__session_8h_ac98375b3bdde1fcb6f7576376495ad09} 
enum \mbox{\hyperlink{mw__session_8h_af27bba1d2fcb53358371c0eca6c57a8f}{mw\+Session\+State}} mw\+Session\+\_\+get\+State (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



current status of the session 

\Hypertarget{mw__session_8h_a4ccd4606756bf065c52ed31d59fb4482}\index{mw\_session.h@{mw\_session.h}!mwSession\_getStateInfo@{mwSession\_getStateInfo}}
\index{mwSession\_getStateInfo@{mwSession\_getStateInfo}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getStateInfo()}{mwSession\_getStateInfo()}}
{\footnotesize\ttfamily \label{mw__session_8h_a4ccd4606756bf065c52ed31d59fb4482} 
gpointer mw\+Session\+\_\+get\+State\+Info (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



additional status-\/specific information. 

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

\begin{DoxyItemize}
\item {\ttfamily mw\+Session\+\_\+\+STOPPING} guint32 error code causing the session to shut down\end{DoxyItemize}
\begin{DoxyItemize}
\item {\ttfamily mw\+Session\+\_\+\+STOPPED} guint32 error code causing the session to shut down\end{DoxyItemize}
\begin{DoxyItemize}
\item {\ttfamily mw\+Session\+\_\+\+LOGIN\+\_\+\+REDIR} (char \texorpdfstring{$\ast$}{*}) host to redirect to \end{DoxyItemize}
\Hypertarget{mw__session_8h_ac28587924853a59ca5b4ab35721086dd}\index{mw\_session.h@{mw\_session.h}!mwSession\_getUserStatus@{mwSession\_getUserStatus}}
\index{mwSession\_getUserStatus@{mwSession\_getUserStatus}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_getUserStatus()}{mwSession\_getUserStatus()}}
{\footnotesize\ttfamily \label{mw__session_8h_ac28587924853a59ca5b4ab35721086dd} 
struct \mbox{\hyperlink{structmwUserStatus}{mw\+User\+Status}} \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+get\+User\+Status (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}

\Hypertarget{mw__session_8h_a453d7e10da829df202476ee1181f398b}\index{mw\_session.h@{mw\_session.h}!mwSession\_new@{mwSession\_new}}
\index{mwSession\_new@{mwSession\_new}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_new()}{mwSession\_new()}}
{\footnotesize\ttfamily \label{mw__session_8h_a453d7e10da829df202476ee1181f398b} 
struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+new (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSessionHandler}{mw\+Session\+Handler}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



allocate a new session 

\Hypertarget{mw__session_8h_a69261eefd22f97f6fd453ca0507cff9e}\index{mw\_session.h@{mw\_session.h}!mwSession\_recv@{mwSession\_recv}}
\index{mwSession\_recv@{mwSession\_recv}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_recv()}{mwSession\_recv()}}
{\footnotesize\ttfamily \label{mw__session_8h_a69261eefd22f97f6fd453ca0507cff9e} 
void mw\+Session\+\_\+recv (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{const guchar \texorpdfstring{$\ast$}{*}}]{}{, }\item[{gsize}]{}{}\end{DoxyParamCaption})}



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

\Hypertarget{mw__session_8h_a259917796bb8f1ad384a3b775437db5f}\index{mw\_session.h@{mw\_session.h}!mwSession\_removeCipher@{mwSession\_removeCipher}}
\index{mwSession\_removeCipher@{mwSession\_removeCipher}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_removeCipher()}{mwSession\_removeCipher()}}
{\footnotesize\ttfamily \label{mw__session_8h_a259917796bb8f1ad384a3b775437db5f} 
struct \mbox{\hyperlink{structmwCipher}{mw\+Cipher}} \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+remove\+Cipher (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{guint16}]{type}{}\end{DoxyParamCaption})}



remove a cipher from the session 

\Hypertarget{mw__session_8h_af5fe774ac33affc9c141c0b30c8c4a7a}\index{mw\_session.h@{mw\_session.h}!mwSession\_removeClientData@{mwSession\_removeClientData}}
\index{mwSession\_removeClientData@{mwSession\_removeClientData}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_removeClientData()}{mwSession\_removeClientData()}}
{\footnotesize\ttfamily \label{mw__session_8h_af5fe774ac33affc9c141c0b30c8c4a7a} 
void mw\+Session\+\_\+remove\+Client\+Data (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{session}{}\end{DoxyParamCaption})}



remove client data, calling the optional GDestroy\+Notify function indicated in mw\+Session\+\_\+set\+Client\+Data if applicable 

\Hypertarget{mw__session_8h_acd2f1aab5eb04b29e73040069c04a976}\index{mw\_session.h@{mw\_session.h}!mwSession\_removeProperty@{mwSession\_removeProperty}}
\index{mwSession\_removeProperty@{mwSession\_removeProperty}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_removeProperty()}{mwSession\_removeProperty()}}
{\footnotesize\ttfamily \label{mw__session_8h_acd2f1aab5eb04b29e73040069c04a976} 
void mw\+Session\+\_\+remove\+Property (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{key}{}\end{DoxyParamCaption})}



remove a property, calling the optional GDestroy\+Notify function indicated in mw\+Session\+\_\+set\+Property if applicable 

\Hypertarget{mw__session_8h_af62de883c2a6dccfcb217d4ea1935a35}\index{mw\_session.h@{mw\_session.h}!mwSession\_removeService@{mwSession\_removeService}}
\index{mwSession\_removeService@{mwSession\_removeService}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_removeService()}{mwSession\_removeService()}}
{\footnotesize\ttfamily \label{mw__session_8h_af62de883c2a6dccfcb217d4ea1935a35} 
struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*} mw\+Session\+\_\+remove\+Service (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{guint32}]{type}{}\end{DoxyParamCaption})}



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_a547ba5e8411854dfdcc4fd1b992c7da8}\index{mw\_session.h@{mw\_session.h}!mwSession\_send@{mwSession\_send}}
\index{mwSession\_send@{mwSession\_send}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_send()}{mwSession\_send()}}
{\footnotesize\ttfamily \label{mw__session_8h_a547ba5e8411854dfdcc4fd1b992c7da8} 
int mw\+Session\+\_\+send (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{s}{, }\item[{struct \mbox{\hyperlink{structmwMessage}{mw\+Message}} \texorpdfstring{$\ast$}{*}}]{msg}{}\end{DoxyParamCaption})}



primarily used by services to have messages serialized and sent 


\begin{DoxyParams}{Parameters}
{\em s} & session to send message over \\
\hline
{\em msg} & message to serialize and send \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 for success 
\end{DoxyReturn}
\Hypertarget{mw__session_8h_ab4bb651abfc49566be231bfa082f9d01}\index{mw\_session.h@{mw\_session.h}!mwSession\_sendAnnounce@{mwSession\_sendAnnounce}}
\index{mwSession\_sendAnnounce@{mwSession\_sendAnnounce}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_sendAnnounce()}{mwSession\_sendAnnounce()}}
{\footnotesize\ttfamily \label{mw__session_8h_ab4bb651abfc49566be231bfa082f9d01} 
int mw\+Session\+\_\+send\+Announce (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{s}{, }\item[{gboolean}]{may\+\_\+reply}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{text}{, }\item[{const GList \texorpdfstring{$\ast$}{*}}]{recipients}{}\end{DoxyParamCaption})}



send an announcement to a list of users/groups. 

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


\begin{DoxyParams}{Parameters}
{\em s} & session to send announcement from \\
\hline
{\em may\+\_\+reply} & permit clients to reply. Not all clients honor this. \\
\hline
{\em text} & text of announcement \\
\hline
{\em recipients} & list of recipients. Each recipient is specified by a single string, prefix with "{}@\+U "{} for users and "{}@\+G "{} for Notes Address Book groups. \\
\hline
\end{DoxyParams}
\Hypertarget{mw__session_8h_a76937609f785aa1830fddd58c5995477}\index{mw\_session.h@{mw\_session.h}!mwSession\_sendKeepalive@{mwSession\_sendKeepalive}}
\index{mwSession\_sendKeepalive@{mwSession\_sendKeepalive}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_sendKeepalive()}{mwSession\_sendKeepalive()}}
{\footnotesize\ttfamily \label{mw__session_8h_a76937609f785aa1830fddd58c5995477} 
int mw\+Session\+\_\+send\+Keepalive (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{s}{}\end{DoxyParamCaption})}



sends the keepalive byte 

\Hypertarget{mw__session_8h_a7c2770250f36c6c2cc3b8a857a5e42db}\index{mw\_session.h@{mw\_session.h}!mwSession\_senseService@{mwSession\_senseService}}
\index{mwSession\_senseService@{mwSession\_senseService}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_senseService()}{mwSession\_senseService()}}
{\footnotesize\ttfamily \label{mw__session_8h_a7c2770250f36c6c2cc3b8a857a5e42db} 
void mw\+Session\+\_\+sense\+Service (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{s}{, }\item[{guint32}]{type}{}\end{DoxyParamCaption})}



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{DoxyParams}{Parameters}
{\em s} & owning session \\
\hline
{\em type} & service type ID \\
\hline
\end{DoxyParams}
\Hypertarget{mw__session_8h_ad24576610f20159cf13c6104a1f5c615}\index{mw\_session.h@{mw\_session.h}!mwSession\_setClientData@{mwSession\_setClientData}}
\index{mwSession\_setClientData@{mwSession\_setClientData}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_setClientData()}{mwSession\_setClientData()}}
{\footnotesize\ttfamily \label{mw__session_8h_ad24576610f20159cf13c6104a1f5c615} 
void mw\+Session\+\_\+set\+Client\+Data (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{session}{, }\item[{gpointer}]{data}{, }\item[{GDestroy\+Notify}]{clear}{}\end{DoxyParamCaption})}



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

Only client applications should use this, never services.


\begin{DoxyParams}{Parameters}
{\em session} & the session to associate the data with \\
\hline
{\em data} & arbitrary client data \\
\hline
{\em clear} & optional cleanup function called on data from mw\+Session\+\_\+remove\+Client\+Data and mw\+Session\+\_\+free \\
\hline
\end{DoxyParams}
\Hypertarget{mw__session_8h_af0073cb84869b5e61a2eae4eccf265d4}\index{mw\_session.h@{mw\_session.h}!mwSession\_setPrivacyInfo@{mwSession\_setPrivacyInfo}}
\index{mwSession\_setPrivacyInfo@{mwSession\_setPrivacyInfo}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_setPrivacyInfo()}{mwSession\_setPrivacyInfo()}}
{\footnotesize\ttfamily \label{mw__session_8h_af0073cb84869b5e61a2eae4eccf265d4} 
int mw\+Session\+\_\+set\+Privacy\+Info (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{struct \mbox{\hyperlink{structmwPrivacyInfo}{mw\+Privacy\+Info}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



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

Triggers the on\+\_\+set\+Privacy\+Info call-\/back. \Hypertarget{mw__session_8h_ad2b99bcf049f9906c7151b7626273b0d}\index{mw\_session.h@{mw\_session.h}!mwSession\_setProperty@{mwSession\_setProperty}}
\index{mwSession\_setProperty@{mwSession\_setProperty}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_setProperty()}{mwSession\_setProperty()}}
{\footnotesize\ttfamily \label{mw__session_8h_ad2b99bcf049f9906c7151b7626273b0d} 
void mw\+Session\+\_\+set\+Property (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{const char \texorpdfstring{$\ast$}{*}}]{key}{, }\item[{gpointer}]{val}{, }\item[{GDestroy\+Notify}]{clear}{}\end{DoxyParamCaption})}



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_a6fad26d4cfa3dd7bdc1b402ff2ec10d7}\index{mw\_session.h@{mw\_session.h}!mwSession\_setUserStatus@{mwSession\_setUserStatus}}
\index{mwSession\_setUserStatus@{mwSession\_setUserStatus}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_setUserStatus()}{mwSession\_setUserStatus()}}
{\footnotesize\ttfamily \label{mw__session_8h_a6fad26d4cfa3dd7bdc1b402ff2ec10d7} 
int mw\+Session\+\_\+set\+User\+Status (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{struct \mbox{\hyperlink{structmwUserStatus}{mw\+User\+Status}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



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

Triggers the on\+\_\+set\+User\+Status call-\/back \Hypertarget{mw__session_8h_a1c3e5aac455c0594e21b02a379395513}\index{mw\_session.h@{mw\_session.h}!mwSession\_start@{mwSession\_start}}
\index{mwSession\_start@{mwSession\_start}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_start()}{mwSession\_start()}}
{\footnotesize\ttfamily \label{mw__session_8h_a1c3e5aac455c0594e21b02a379395513} 
void mw\+Session\+\_\+start (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{}\end{DoxyParamCaption})}



instruct the session to begin. 

This will result in the initial handshake message being sent. \Hypertarget{mw__session_8h_aca902e9266e244ff9ae2a325a7a655ba}\index{mw\_session.h@{mw\_session.h}!mwSession\_stop@{mwSession\_stop}}
\index{mwSession\_stop@{mwSession\_stop}!mw\_session.h@{mw\_session.h}}
\doxysubsubsection{\texorpdfstring{mwSession\_stop()}{mwSession\_stop()}}
{\footnotesize\ttfamily \label{mw__session_8h_aca902e9266e244ff9ae2a325a7a655ba} 
void mw\+Session\+\_\+stop (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{}{, }\item[{guint32}]{reason}{}\end{DoxyParamCaption})}



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

