\doxysection{mw\+Service Struct Reference}
\hypertarget{structmwService}{}\label{structmwService}\index{mwService@{mwService}}


A service is the recipient of send\+On\+Cnl messages sent over channels marked with the corresponding service id.  




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

\doxysubsubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
guint32 \mbox{\hyperlink{structmwService_ad2d3325c80ad007b9cf0e7ac8c7ec63f}{type}}
\begin{DoxyCompactList}\small\item\em the unique identifier by which this service is registered. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Related Symbols}
(Note that these are not member symbols.) \begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{mw__service_8h_a026b1781d28ceb433d871d52c52e0ec8}{mw\+Service\+\_\+func\+Clear}} \mbox{\hyperlink{structmwService_a9b86cc0545150a4fde3ab3060e803e58}{clear}}
\begin{DoxyCompactList}\small\item\em The service\textquotesingle{}s cleanup handler. \end{DoxyCompactList}\item 
GDestroy\+Notify \mbox{\hyperlink{structmwService_ad8baae0714a14f4a89f224296e83c332}{client\+\_\+cleanup}}
\begin{DoxyCompactList}\small\item\em Optional client data cleanup function. \end{DoxyCompactList}\item 
gpointer \mbox{\hyperlink{structmwService_a0029f74d1a50227dc5d89f1f1caa35e7}{client\+\_\+data}}
\begin{DoxyCompactList}\small\item\em Optional client data, not for use by service implementations. \end{DoxyCompactList}\item 
\mbox{\hyperlink{mw__service_8h_a23401b51378988e2f7add826a99952d0}{mw\+Service\+\_\+func\+Get\+Desc}} \mbox{\hyperlink{structmwService_a2bcd80250a76d4deb90761c5253c5b98}{get\+\_\+desc}}
\item 
\mbox{\hyperlink{mw__service_8h_abfd12e44e8eb177a857379eaabc9515c}{mw\+Service\+\_\+func\+Get\+Name}} \mbox{\hyperlink{structmwService_a5e0242406b28deb224c76bf1ff9084bc}{get\+\_\+name}}
\item 
\mbox{\hyperlink{mw__service_8h_a744a25867aff3ec461330a02ddaa3478}{mw\+Service\+\_\+func\+Recv}} \mbox{\hyperlink{structmwService_aaac0e0bd9612b24dcf64de5cb72fe304}{recv}}
\begin{DoxyCompactList}\small\item\em The service\textquotesingle{}s input handler. \end{DoxyCompactList}\item 
\mbox{\hyperlink{mw__service_8h_a74ac1ad00e83b368fca4e00d1a2af599}{mw\+Service\+\_\+func\+Recv\+Accept}} \mbox{\hyperlink{structmwService_a9dfbe087438b6061cc7e7f72e0e5e86f}{recv\+\_\+accept}}
\begin{DoxyCompactList}\small\item\em The service\textquotesingle{}s channel accept handler. \end{DoxyCompactList}\item 
\mbox{\hyperlink{mw__service_8h_addd91fef17d6dd1d683123167cf62a4e}{mw\+Service\+\_\+func\+Recv\+Create}} \mbox{\hyperlink{structmwService_ab203804ec5846ff3f14646d43c85f058}{recv\+\_\+create}}
\begin{DoxyCompactList}\small\item\em The service\textquotesingle{}s channel create handler. \end{DoxyCompactList}\item 
\mbox{\hyperlink{mw__service_8h_aaff9b6cb951faacf0ca4bf681905908c}{mw\+Service\+\_\+func\+Recv\+Destroy}} \mbox{\hyperlink{structmwService_a60154d557db64b36a988befdca631fa4}{recv\+\_\+destroy}}
\begin{DoxyCompactList}\small\item\em The service\textquotesingle{}s channel destroy handler. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structmwService_a0c2badd2256155b2bee149fa4b57b7d6}{session}}
\begin{DoxyCompactList}\small\item\em session this service is attached to. \end{DoxyCompactList}\item 
\mbox{\hyperlink{mw__service_8h_a124a98a47f33dddacbf0cd4515758101}{mw\+Service\+\_\+func\+Start}} \mbox{\hyperlink{structmwService_abc050a99570b3255eb3822dbe8d70a9b}{start}}
\begin{DoxyCompactList}\small\item\em The service\textquotesingle{}s start handler. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9}{mw\+Service\+State}} \mbox{\hyperlink{structmwService_ab5adc0f5a0cbeddaece7a4512ec66099}{state}}
\begin{DoxyCompactList}\small\item\em the state of this service. \end{DoxyCompactList}\item 
\mbox{\hyperlink{mw__service_8h_a39ab636f567096ea2872a814498910a9}{mw\+Service\+\_\+func\+Stop}} \mbox{\hyperlink{structmwService_a4d237f5966d8c4b7ef92c8e0bbd82a20}{stop}}
\begin{DoxyCompactList}\small\item\em The service\textquotesingle{}s stop handler. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A service is the recipient of send\+On\+Cnl 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\textquotesingle{}s responsibility to accept or destroy channels, and to process data sent over those channels 

\doxysubsection{Friends And Related Symbol Documentation}
\Hypertarget{structmwService_a9b86cc0545150a4fde3ab3060e803e58}\label{structmwService_a9b86cc0545150a4fde3ab3060e803e58} 
\index{mwService@{mwService}!clear@{clear}}
\index{clear@{clear}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{clear}{clear}}
{\footnotesize\ttfamily \mbox{\hyperlink{mw__service_8h_a026b1781d28ceb433d871d52c52e0ec8}{mw\+Service\+\_\+func\+Clear}} clear\hspace{0.3cm}{\ttfamily [related]}}



The service\textquotesingle{}s cleanup handler. 

Service implementations should presume that \doxylink{structmwService_a4d237f5966d8c4b7ef92c8e0bbd82a20}{mw\+Service\+::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_ad8baae0714a14f4a89f224296e83c332}\label{structmwService_ad8baae0714a14f4a89f224296e83c332} 
\index{mwService@{mwService}!client\_cleanup@{client\_cleanup}}
\index{client\_cleanup@{client\_cleanup}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{client\_cleanup}{client\_cleanup}}
{\footnotesize\ttfamily GDestroy\+Notify client\+\_\+cleanup\hspace{0.3cm}{\ttfamily [related]}}



Optional client data cleanup function. 

Called with client\+\_\+data from mw\+Service\+\_\+free \Hypertarget{structmwService_a0029f74d1a50227dc5d89f1f1caa35e7}\label{structmwService_a0029f74d1a50227dc5d89f1f1caa35e7} 
\index{mwService@{mwService}!client\_data@{client\_data}}
\index{client\_data@{client\_data}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{client\_data}{client\_data}}
{\footnotesize\ttfamily gpointer client\+\_\+data\hspace{0.3cm}{\ttfamily [related]}}



Optional client data, not for use by service implementations. 

\Hypertarget{structmwService_a2bcd80250a76d4deb90761c5253c5b98}\label{structmwService_a2bcd80250a76d4deb90761c5253c5b98} 
\index{mwService@{mwService}!get\_desc@{get\_desc}}
\index{get\_desc@{get\_desc}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{get\_desc}{get\_desc}}
{\footnotesize\ttfamily \mbox{\hyperlink{mw__service_8h_a23401b51378988e2f7add826a99952d0}{mw\+Service\+\_\+func\+Get\+Desc}} get\+\_\+desc\hspace{0.3cm}{\ttfamily [related]}}

\begin{DoxyReturn}{Returns}
string short description of the service 
\end{DoxyReturn}
\Hypertarget{structmwService_a5e0242406b28deb224c76bf1ff9084bc}\label{structmwService_a5e0242406b28deb224c76bf1ff9084bc} 
\index{mwService@{mwService}!get\_name@{get\_name}}
\index{get\_name@{get\_name}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{get\_name}{get\_name}}
{\footnotesize\ttfamily \mbox{\hyperlink{mw__service_8h_abfd12e44e8eb177a857379eaabc9515c}{mw\+Service\+\_\+func\+Get\+Name}} get\+\_\+name\hspace{0.3cm}{\ttfamily [related]}}

\begin{DoxyReturn}{Returns}
string short name of the service 
\end{DoxyReturn}
\Hypertarget{structmwService_aaac0e0bd9612b24dcf64de5cb72fe304}\label{structmwService_aaac0e0bd9612b24dcf64de5cb72fe304} 
\index{mwService@{mwService}!recv@{recv}}
\index{recv@{recv}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{recv}{recv}}
{\footnotesize\ttfamily \mbox{\hyperlink{mw__service_8h_a744a25867aff3ec461330a02ddaa3478}{mw\+Service\+\_\+func\+Recv}} recv\hspace{0.3cm}{\ttfamily [related]}}



The service\textquotesingle{}s input handler. 

Called when the session receives data on a channel belonging to this service \Hypertarget{structmwService_a9dfbe087438b6061cc7e7f72e0e5e86f}\label{structmwService_a9dfbe087438b6061cc7e7f72e0e5e86f} 
\index{mwService@{mwService}!recv\_accept@{recv\_accept}}
\index{recv\_accept@{recv\_accept}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{recv\_accept}{recv\_accept}}
{\footnotesize\ttfamily \mbox{\hyperlink{mw__service_8h_a74ac1ad00e83b368fca4e00d1a2af599}{mw\+Service\+\_\+func\+Recv\+Accept}} recv\+\_\+accept\hspace{0.3cm}{\ttfamily [related]}}



The service\textquotesingle{}s channel accept handler. 

Called when the session receives a channel accept message for a channel with a service matching this service\textquotesingle{}s type. \Hypertarget{structmwService_ab203804ec5846ff3f14646d43c85f058}\label{structmwService_ab203804ec5846ff3f14646d43c85f058} 
\index{mwService@{mwService}!recv\_create@{recv\_create}}
\index{recv\_create@{recv\_create}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{recv\_create}{recv\_create}}
{\footnotesize\ttfamily \mbox{\hyperlink{mw__service_8h_addd91fef17d6dd1d683123167cf62a4e}{mw\+Service\+\_\+func\+Recv\+Create}} recv\+\_\+create\hspace{0.3cm}{\ttfamily [related]}}



The service\textquotesingle{}s channel create handler. 

Called when the session receives a channel create message with a service matching this service\textquotesingle{}s type. \Hypertarget{structmwService_a60154d557db64b36a988befdca631fa4}\label{structmwService_a60154d557db64b36a988befdca631fa4} 
\index{mwService@{mwService}!recv\_destroy@{recv\_destroy}}
\index{recv\_destroy@{recv\_destroy}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{recv\_destroy}{recv\_destroy}}
{\footnotesize\ttfamily \mbox{\hyperlink{mw__service_8h_aaff9b6cb951faacf0ca4bf681905908c}{mw\+Service\+\_\+func\+Recv\+Destroy}} recv\+\_\+destroy\hspace{0.3cm}{\ttfamily [related]}}



The service\textquotesingle{}s channel destroy handler. 

Called when the session receives a channel destroy message for a channel with a service matching this service\textquotesingle{}s type. \Hypertarget{structmwService_a0c2badd2256155b2bee149fa4b57b7d6}\label{structmwService_a0c2badd2256155b2bee149fa4b57b7d6} 
\index{mwService@{mwService}!session@{session}}
\index{session@{session}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{session}{session}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{structmwSession}{mw\+Session}}\texorpdfstring{$\ast$}{*} session\hspace{0.3cm}{\ttfamily [related]}}



session this service is attached to. 

\Hypertarget{structmwService_abc050a99570b3255eb3822dbe8d70a9b}\label{structmwService_abc050a99570b3255eb3822dbe8d70a9b} 
\index{mwService@{mwService}!start@{start}}
\index{start@{start}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{start}{start}}
{\footnotesize\ttfamily \mbox{\hyperlink{mw__service_8h_a124a98a47f33dddacbf0cd4515758101}{mw\+Service\+\_\+func\+Start}} start\hspace{0.3cm}{\ttfamily [related]}}



The service\textquotesingle{}s start handler. 

Called upon the receipt of a service available message. \Hypertarget{structmwService_ab5adc0f5a0cbeddaece7a4512ec66099}\label{structmwService_ab5adc0f5a0cbeddaece7a4512ec66099} 
\index{mwService@{mwService}!state@{state}}
\index{state@{state}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{state}{state}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9}{mw\+Service\+State}} state\hspace{0.3cm}{\ttfamily [related]}}



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_a4d237f5966d8c4b7ef92c8e0bbd82a20}\label{structmwService_a4d237f5966d8c4b7ef92c8e0bbd82a20} 
\index{mwService@{mwService}!stop@{stop}}
\index{stop@{stop}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{stop}{stop}}
{\footnotesize\ttfamily \mbox{\hyperlink{mw__service_8h_a39ab636f567096ea2872a814498910a9}{mw\+Service\+\_\+func\+Stop}} stop\hspace{0.3cm}{\ttfamily [related]}}



The service\textquotesingle{}s stop handler. 

Called when the session is shutting down, or when the service is free\textquotesingle{}d. 

\doxysubsection{Field Documentation}
\Hypertarget{structmwService_ad2d3325c80ad007b9cf0e7ac8c7ec63f}\label{structmwService_ad2d3325c80ad007b9cf0e7ac8c7ec63f} 
\index{mwService@{mwService}!type@{type}}
\index{type@{type}!mwService@{mwService}}
\doxysubsubsection{\texorpdfstring{type}{type}}
{\footnotesize\ttfamily guint32 mw\+Service\+::type}



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{DoxyCompactItemize}
\item 
\mbox{\hyperlink{mw__service_8h}{mw\+\_\+service.\+h}}\end{DoxyCompactItemize}
