\hypertarget{structmwService}{
\section{mwService Struct Reference}
\label{structmwService}\index{mwService@{mwService}}
}
{\tt \#include $<$mw\_\-service.h$>$}



\subsection{Detailed Description}
A service is the recipient of sendOnCnl messages sent over channels marked with the corresponding service id. 

Services provide functionality such as IM relaying, Awareness tracking and notification, and Conference handling. It is a service's responsibility to accept or destroy channels, and to process data sent over those channels \subsection*{Data Fields}
\begin{CompactItemize}
\item 
guint32 \hyperlink{structmwService_d2d3325c80ad007b9cf0e7ac8c7ec63f}{type}
\begin{CompactList}\small\item\em the unique identifier by which this service is registered. \item\end{CompactList}\end{CompactItemize}
\subsection*{Related Functions}
(Note that these are not member functions.) \begin{CompactItemize}
\item 
\hyperlink{mw__service_8h_a61b5086d147a38f2dfd6c136916f232}{mwService\_\-funcClear} \hyperlink{structmwService_9b86cc0545150a4fde3ab3060e803e58}{clear}
\begin{CompactList}\small\item\em The service's cleanup handler. \item\end{CompactList}\item 
GDestroyNotify \hyperlink{structmwService_d8baae0714a14f4a89f224296e83c332}{client\_\-cleanup}
\begin{CompactList}\small\item\em Optional client data cleanup function. \item\end{CompactList}\item 
gpointer \hyperlink{structmwService_0029f74d1a50227dc5d89f1f1caa35e7}{client\_\-data}
\begin{CompactList}\small\item\em Optional client data, not for use by service implementations. \item\end{CompactList}\item 
\hyperlink{mw__service_8h_cdf3ce1a852e3cc3cf1379e083ff8ffd}{mwService\_\-funcGetDesc} \hyperlink{structmwService_2bcd80250a76d4deb90761c5253c5b98}{get\_\-desc}
\item 
\hyperlink{mw__service_8h_f4becc5dcb225e192b6c92d8a72a432c}{mwService\_\-funcGetName} \hyperlink{structmwService_5e0242406b28deb224c76bf1ff9084bc}{get\_\-name}
\item 
\hyperlink{mw__service_8h_71e4e8071893d3588d3c8f5f3be660b4}{mwService\_\-funcRecv} \hyperlink{structmwService_aac0e0bd9612b24dcf64de5cb72fe304}{recv}
\begin{CompactList}\small\item\em The service's input handler. \item\end{CompactList}\item 
\hyperlink{mw__service_8h_7bf9bcb70ba1944f027140328edcb145}{mwService\_\-funcRecvAccept} \hyperlink{structmwService_9dfbe087438b6061cc7e7f72e0e5e86f}{recv\_\-accept}
\begin{CompactList}\small\item\em The service's channel accept handler. \item\end{CompactList}\item 
\hyperlink{mw__service_8h_39b4834a00b1e19d98432fbfe9653ab8}{mwService\_\-funcRecvCreate} \hyperlink{structmwService_b203804ec5846ff3f14646d43c85f058}{recv\_\-create}
\begin{CompactList}\small\item\em The service's channel create handler. \item\end{CompactList}\item 
\hyperlink{mw__service_8h_4741b85ca24938110fb9d13d6682c497}{mwService\_\-funcRecvDestroy} \hyperlink{structmwService_60154d557db64b36a988befdca631fa4}{recv\_\-destroy}
\begin{CompactList}\small\item\em The service's channel destroy handler. \item\end{CompactList}\item 
struct \hyperlink{structmwSession}{mwSession} $\ast$ \hyperlink{structmwService_0c2badd2256155b2bee149fa4b57b7d6}{session}
\begin{CompactList}\small\item\em session this service is attached to. \item\end{CompactList}\item 
\hyperlink{mw__service_8h_345848a5ac34f9fbe69a5dfea7fbc4b9}{mwService\_\-funcStart} \hyperlink{structmwService_bc050a99570b3255eb3822dbe8d70a9b}{start}
\begin{CompactList}\small\item\em The service's start handler. \item\end{CompactList}\item 
enum \hyperlink{mw__service_8h_7ce6ac62b951a443c05f541c8ace90a9}{mwServiceState} \hyperlink{structmwService_b5adc0f5a0cbeddaece7a4512ec66099}{state}
\begin{CompactList}\small\item\em the state of this service. \item\end{CompactList}\item 
\hyperlink{mw__service_8h_1179c7de60ece58e88a69e204d0de59e}{mwService\_\-funcStop} \hyperlink{structmwService_4d237f5966d8c4b7ef92c8e0bbd82a20}{stop}
\begin{CompactList}\small\item\em The service's stop handler. \item\end{CompactList}\end{CompactItemize}


\subsection{Friends And Related Function Documentation}
\hypertarget{structmwService_9b86cc0545150a4fde3ab3060e803e58}{
\index{mwService@{mwService}!clear@{clear}}
\index{clear@{clear}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf mwService\_\-funcClear} {\bf clear}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_9b86cc0545150a4fde3ab3060e803e58}


The service's cleanup handler. 

Service implementations should presume that \hyperlink{structmwService_4d237f5966d8c4b7ef92c8e0bbd82a20}{mwService::stop} will be called first. The clear handler is not for shutting down channels or generating non-cleanup side-effects, it is only for handling tear-down of the service, and will only be called once for any instance. \hypertarget{structmwService_d8baae0714a14f4a89f224296e83c332}{
\index{mwService@{mwService}!client\_\-cleanup@{client\_\-cleanup}}
\index{client\_\-cleanup@{client\_\-cleanup}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GDestroyNotify {\bf client\_\-cleanup}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_d8baae0714a14f4a89f224296e83c332}


Optional client data cleanup function. 

Called with client\_\-data from mwService\_\-free \hypertarget{structmwService_0029f74d1a50227dc5d89f1f1caa35e7}{
\index{mwService@{mwService}!client\_\-data@{client\_\-data}}
\index{client\_\-data@{client\_\-data}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}gpointer {\bf client\_\-data}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_0029f74d1a50227dc5d89f1f1caa35e7}


Optional client data, not for use by service implementations. 

\hypertarget{structmwService_2bcd80250a76d4deb90761c5253c5b98}{
\index{mwService@{mwService}!get\_\-desc@{get\_\-desc}}
\index{get\_\-desc@{get\_\-desc}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf mwService\_\-funcGetDesc} {\bf get\_\-desc}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_2bcd80250a76d4deb90761c5253c5b98}


\begin{Desc}
\item[Returns:]string short description of the service \end{Desc}
\hypertarget{structmwService_5e0242406b28deb224c76bf1ff9084bc}{
\index{mwService@{mwService}!get\_\-name@{get\_\-name}}
\index{get\_\-name@{get\_\-name}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf mwService\_\-funcGetName} {\bf get\_\-name}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_5e0242406b28deb224c76bf1ff9084bc}


\begin{Desc}
\item[Returns:]string short name of the service \end{Desc}
\hypertarget{structmwService_aac0e0bd9612b24dcf64de5cb72fe304}{
\index{mwService@{mwService}!recv@{recv}}
\index{recv@{recv}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf mwService\_\-funcRecv} {\bf recv}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_aac0e0bd9612b24dcf64de5cb72fe304}


The service's input handler. 

Called when the session receives data on a channel belonging to this service \hypertarget{structmwService_9dfbe087438b6061cc7e7f72e0e5e86f}{
\index{mwService@{mwService}!recv\_\-accept@{recv\_\-accept}}
\index{recv\_\-accept@{recv\_\-accept}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf mwService\_\-funcRecvAccept} {\bf recv\_\-accept}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_9dfbe087438b6061cc7e7f72e0e5e86f}


The service's channel accept handler. 

Called when the session receives a channel accept message for a channel with a service matching this service's type. \hypertarget{structmwService_b203804ec5846ff3f14646d43c85f058}{
\index{mwService@{mwService}!recv\_\-create@{recv\_\-create}}
\index{recv\_\-create@{recv\_\-create}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf mwService\_\-funcRecvCreate} {\bf recv\_\-create}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_b203804ec5846ff3f14646d43c85f058}


The service's channel create handler. 

Called when the session receives a channel create message with a service matching this service's type. \hypertarget{structmwService_60154d557db64b36a988befdca631fa4}{
\index{mwService@{mwService}!recv\_\-destroy@{recv\_\-destroy}}
\index{recv\_\-destroy@{recv\_\-destroy}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf mwService\_\-funcRecvDestroy} {\bf recv\_\-destroy}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_60154d557db64b36a988befdca631fa4}


The service's channel destroy handler. 

Called when the session receives a channel destroy message for a channel with a service matching this service's type. \hypertarget{structmwService_0c2badd2256155b2bee149fa4b57b7d6}{
\index{mwService@{mwService}!session@{session}}
\index{session@{session}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct {\bf mwSession}$\ast$ {\bf session}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_0c2badd2256155b2bee149fa4b57b7d6}


session this service is attached to. 

\hypertarget{structmwService_bc050a99570b3255eb3822dbe8d70a9b}{
\index{mwService@{mwService}!start@{start}}
\index{start@{start}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf mwService\_\-funcStart} {\bf start}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_bc050a99570b3255eb3822dbe8d70a9b}


The service's start handler. 

Called upon the receipt of a service available message. \hypertarget{structmwService_b5adc0f5a0cbeddaece7a4512ec66099}{
\index{mwService@{mwService}!state@{state}}
\index{state@{state}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf mwServiceState} {\bf state}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_b5adc0f5a0cbeddaece7a4512ec66099}


the state of this service. 

Determines whether or not the session should call the start function upon receipt of a service available message. Should not be set or checked by hand. \hypertarget{structmwService_4d237f5966d8c4b7ef92c8e0bbd82a20}{
\index{mwService@{mwService}!stop@{stop}}
\index{stop@{stop}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf mwService\_\-funcStop} {\bf stop}\hspace{0.3cm}{\tt  \mbox{[}related\mbox{]}}}}
\label{structmwService_4d237f5966d8c4b7ef92c8e0bbd82a20}


The service's stop handler. 

Called when the session is shutting down, or when the service is free'd. 

\subsection{Field Documentation}
\hypertarget{structmwService_d2d3325c80ad007b9cf0e7ac8c7ec63f}{
\index{mwService@{mwService}!type@{type}}
\index{type@{type}!mwService@{mwService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}guint32 {\bf mwService::type}}}
\label{structmwService_d2d3325c80ad007b9cf0e7ac8c7ec63f}


the unique identifier by which this service is registered. 

The type value also relates to those channels which will be directed to this service 

The documentation for this struct was generated from the following file:\begin{CompactItemize}
\item 
\hyperlink{mw__service_8h}{mw\_\-service.h}\end{CompactItemize}
