\doxysection{mw\+\_\+service.\+h File Reference}
\hypertarget{mw__service_8h}{}\label{mw__service_8h}\index{mw\_service.h@{mw\_service.h}}
{\ttfamily \#include "{}mw\+\_\+common.\+h"{}}\newline
\doxysubsubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structmwService}{mw\+Service}}
\begin{DoxyCompactList}\small\item\em A service is the recipient of send\+On\+Cnl messages sent over channels marked with the corresponding service id. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{mw__service_8h_ac47dd34aa0115ff9f5df0ca802eddca6}{MW\+\_\+\+SERVICE}}(srv)~((struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}) srv)
\begin{DoxyCompactList}\small\item\em Casts a concrete service (such as \doxylink{structmwServiceAware}{mw\+Service\+Aware}) into a \doxylink{structmwService}{mw\+Service}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__service_8h_acb3501a93a34855c8c5a5f712470ddd7}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+DEAD}}(srvc)~  (\mbox{\hyperlink{mw__service_8h_a4e064cb059d437e86f72eeff055a5170}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STOPPING}}(srvc) \texorpdfstring{$\vert$}{|}\texorpdfstring{$\vert$}{|} \mbox{\hyperlink{mw__service_8h_acfcb034d38d2c35d499c786c311af3ab}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STOPPED}}(srvc))
\begin{DoxyCompactList}\small\item\em If a service is STOPPING or STOPPED, it\textquotesingle{}s considered DEAD. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__service_8h_aa9214389e880b032dd2ba4d68628b010}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+LIVE}}(srvc)~  (\mbox{\hyperlink{mw__service_8h_ac8f916221c8b1ec24c31896f3c76430e}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STARTING}}(srvc) \texorpdfstring{$\vert$}{|}\texorpdfstring{$\vert$}{|} \mbox{\hyperlink{mw__service_8h_a6a5393b8935f62a87a2e5767da74ddc0}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STARTED}}(srvc))
\begin{DoxyCompactList}\small\item\em If a service is STARTING or STARTED, it\textquotesingle{}s considered LIVE. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{mw__service_8h_a6a5393b8935f62a87a2e5767da74ddc0}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STARTED}}(srvc)~  \mbox{\hyperlink{mw__service_8h_a6a5c28fe3e3b26f9b101ebcb1c8cb8ff}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STATE}}(srvc, \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9ac1d80a3975accbe424d43855eae9ba96}{mw\+Service\+State\+\_\+\+STARTED}})
\item 
\#define \mbox{\hyperlink{mw__service_8h_ac8f916221c8b1ec24c31896f3c76430e}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STARTING}}(srvc)~  \mbox{\hyperlink{mw__service_8h_a6a5c28fe3e3b26f9b101ebcb1c8cb8ff}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STATE}}(srvc, \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a5d370240ae109e408d7a79dab0006765}{mw\+Service\+State\+\_\+\+STARTING}})
\item 
\#define \mbox{\hyperlink{mw__service_8h_a6a5c28fe3e3b26f9b101ebcb1c8cb8ff}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STATE}}(srvc,  state)~  (\mbox{\hyperlink{mw__service_8h_a80be3d5c087a5c5bfdf23174e00d1af0}{mw\+Service\+\_\+get\+State}}(\mbox{\hyperlink{mw__service_8h_ac47dd34aa0115ff9f5df0ca802eddca6}{MW\+\_\+\+SERVICE}}(srvc)) == (state))
\item 
\#define \mbox{\hyperlink{mw__service_8h_acfcb034d38d2c35d499c786c311af3ab}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STOPPED}}(srvc)~  \mbox{\hyperlink{mw__service_8h_a6a5c28fe3e3b26f9b101ebcb1c8cb8ff}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STATE}}(srvc, \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a3e645546696ee1e12383795826d8f2c2}{mw\+Service\+State\+\_\+\+STOPPED}})
\item 
\#define \mbox{\hyperlink{mw__service_8h_a4e064cb059d437e86f72eeff055a5170}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STOPPING}}(srvc)~  \mbox{\hyperlink{mw__service_8h_a6a5c28fe3e3b26f9b101ebcb1c8cb8ff}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STATE}}(srvc, \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a1381383b88d69d1b4b147999f7d2e9e4}{mw\+Service\+State\+\_\+\+STOPPING}})
\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_a026b1781d28ceb433d871d52c52e0ec8}{mw\+Service\+\_\+func\+Clear}}) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\item 
typedef const char \texorpdfstring{$\ast$}{*}(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_a23401b51378988e2f7add826a99952d0}{mw\+Service\+\_\+func\+Get\+Desc}}) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\item 
typedef const char \texorpdfstring{$\ast$}{*}(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_abfd12e44e8eb177a857379eaabc9515c}{mw\+Service\+\_\+func\+Get\+Name}}) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\item 
typedef void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_a744a25867aff3ec461330a02ddaa3478}{mw\+Service\+\_\+func\+Recv}}) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, guint16 msg\+\_\+type, struct \mbox{\hyperlink{structmwOpaque}{mw\+Opaque}} \texorpdfstring{$\ast$}{*}data)
\item 
typedef void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_a74ac1ad00e83b368fca4e00d1a2af599}{mw\+Service\+\_\+func\+Recv\+Accept}}) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, struct \mbox{\hyperlink{structmwMsgChannelAccept}{mw\+Msg\+Channel\+Accept}} \texorpdfstring{$\ast$}{*}msg)
\item 
typedef void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_addd91fef17d6dd1d683123167cf62a4e}{mw\+Service\+\_\+func\+Recv\+Create}}) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, struct \mbox{\hyperlink{structmwMsgChannelCreate}{mw\+Msg\+Channel\+Create}} \texorpdfstring{$\ast$}{*}msg)
\item 
typedef void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_aaff9b6cb951faacf0ca4bf681905908c}{mw\+Service\+\_\+func\+Recv\+Destroy}}) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, struct \mbox{\hyperlink{structmwMsgChannelDestroy}{mw\+Msg\+Channel\+Destroy}} \texorpdfstring{$\ast$}{*}msg)
\item 
typedef void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_a124a98a47f33dddacbf0cd4515758101}{mw\+Service\+\_\+func\+Start}}) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\item 
typedef void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_a39ab636f567096ea2872a814498910a9}{mw\+Service\+\_\+func\+Stop}}) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9}{mw\+Service\+State}} \{ \newline
\mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a3e645546696ee1e12383795826d8f2c2}{mw\+Service\+State\+\_\+\+STOPPED}}
, \newline
\mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a1381383b88d69d1b4b147999f7d2e9e4}{mw\+Service\+State\+\_\+\+STOPPING}}
, \newline
\mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9ac1d80a3975accbe424d43855eae9ba96}{mw\+Service\+State\+\_\+\+STARTED}}
, \newline
\mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a5d370240ae109e408d7a79dab0006765}{mw\+Service\+State\+\_\+\+STARTING}}
, \newline
\mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a6dd6d02356710ebc0ad952e634bf69db}{mw\+Service\+State\+\_\+\+ERROR}}
, \newline
\mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9acd926c48397703e396b556448c23ce12}{mw\+Service\+State\+\_\+\+UNKNOWN}}
 \}
\begin{DoxyCompactList}\small\item\em State-\/tracking for a service. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{Indent}\textbf{ Service Extension API}\par
{\em These functions are for use by service implementations }\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{mw__service_8h_a977c751125e97fb60dc212c57f03ed6e}{mw\+Service\+\_\+init}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}session, guint32 service\+\_\+type)
\begin{DoxyCompactList}\small\item\em Prepares a newly allocated service for use. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__service_8h_afbb26101bfdd8ab4df279dd907a2510a}{mw\+Service\+\_\+started}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\begin{DoxyCompactList}\small\item\em Indicate that a service is started. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__service_8h_ab361f3df95b1611961ab0ec4ac69eddf}{mw\+Service\+\_\+stopped}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\begin{DoxyCompactList}\small\item\em Indicate that a service is stopped. \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}\textbf{ General Services API}\par
{\em These functions provide unified access to the general functions of a client service, with some simple sanity-\/checking. }\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{mw__service_8h_ac8adb7938b9884ad32e4700a4d933668}{mw\+Service\+\_\+free}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\begin{DoxyCompactList}\small\item\em Frees memory used by a service. \end{DoxyCompactList}\item 
gpointer \mbox{\hyperlink{mw__service_8h_a94ab61559c154ad55b5038830b77d9bd}{mw\+Service\+\_\+get\+Client\+Data}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\begin{DoxyCompactList}\small\item\em Reference associated client data. \end{DoxyCompactList}\item 
const char \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_a9f496dda96b83904851dc7607cd074e2}{mw\+Service\+\_\+get\+Desc}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*})
\item 
const char \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_ad29a8ff211ad033fd9f4ced75bc1857a}{mw\+Service\+\_\+get\+Name}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*})
\item 
struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{mw__service_8h_aaca7537036f96f87e3818e45f170b7bc}{mw\+Service\+\_\+get\+Session}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\item 
enum \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9}{mw\+Service\+State}} \mbox{\hyperlink{mw__service_8h_a80be3d5c087a5c5bfdf23174e00d1af0}{mw\+Service\+\_\+get\+State}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\item 
guint32 \mbox{\hyperlink{mw__service_8h_a86b61f33fc9a9484c8f7c3177deeb004}{mw\+Service\+\_\+get\+Type}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*})
\item 
void \mbox{\hyperlink{mw__service_8h_adae02fc3d770260deed3e04387145e44}{mw\+Service\+\_\+recv}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, guint16 msg\+\_\+type, struct \mbox{\hyperlink{structmwOpaque}{mw\+Opaque}} \texorpdfstring{$\ast$}{*}data)
\begin{DoxyCompactList}\small\item\em Triggers the input handler on the service. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__service_8h_ad07b444814007f616441021b02b29e0b}{mw\+Service\+\_\+recv\+Accept}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, struct \mbox{\hyperlink{structmwMsgChannelAccept}{mw\+Msg\+Channel\+Accept}} \texorpdfstring{$\ast$}{*}msg)
\begin{DoxyCompactList}\small\item\em Triggers the recv\+\_\+accept handler on the service. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__service_8h_a826ac106b94fc7d4dd8b7efcc70d5355}{mw\+Service\+\_\+recv\+Create}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, struct \mbox{\hyperlink{structmwMsgChannelCreate}{mw\+Msg\+Channel\+Create}} \texorpdfstring{$\ast$}{*}msg)
\begin{DoxyCompactList}\small\item\em Triggers the recv\+\_\+create handler on the service. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__service_8h_aaf155b961ad4fbf55cb8b593ec29dc60}{mw\+Service\+\_\+recv\+Destroy}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, struct \mbox{\hyperlink{structmwMsgChannelDestroy}{mw\+Msg\+Channel\+Destroy}} \texorpdfstring{$\ast$}{*}msg)
\begin{DoxyCompactList}\small\item\em Triggers the recv\+\_\+destroy handler on the service. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__service_8h_a115153000304eccc772c0313da5dd5dd}{mw\+Service\+\_\+remove\+Client\+Data}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\begin{DoxyCompactList}\small\item\em Removes client data from service. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__service_8h_a7c3e0cdcb6631cb0da3b79572fdc5c95}{mw\+Service\+\_\+set\+Client\+Data}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, gpointer data, GDestroy\+Notify cleanup)
\begin{DoxyCompactList}\small\item\em Associates client data with service. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__service_8h_a177f564b1ed8f8544ab5089d7e4afbb0}{mw\+Service\+\_\+start}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\begin{DoxyCompactList}\small\item\em Triggers the start handler for the service. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mw__service_8h_af591d13a2ef57d42b63947dcae6faa5f}{mw\+Service\+\_\+stop}} (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)
\begin{DoxyCompactList}\small\item\em Triggers the stop handler for the service. \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}


\doxysubsection{Macro Definition Documentation}
\Hypertarget{mw__service_8h_ac47dd34aa0115ff9f5df0ca802eddca6}\label{mw__service_8h_ac47dd34aa0115ff9f5df0ca802eddca6} 
\index{mw\_service.h@{mw\_service.h}!MW\_SERVICE@{MW\_SERVICE}}
\index{MW\_SERVICE@{MW\_SERVICE}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{MW\_SERVICE}{MW\_SERVICE}}
{\footnotesize\ttfamily \#define MW\+\_\+\+SERVICE(\begin{DoxyParamCaption}\item[{}]{srv }\end{DoxyParamCaption})~((struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}) srv)}



Casts a concrete service (such as \doxylink{structmwServiceAware}{mw\+Service\+Aware}) into a \doxylink{structmwService}{mw\+Service}. 

\Hypertarget{mw__service_8h_acb3501a93a34855c8c5a5f712470ddd7}\label{mw__service_8h_acb3501a93a34855c8c5a5f712470ddd7} 
\index{mw\_service.h@{mw\_service.h}!MW\_SERVICE\_IS\_DEAD@{MW\_SERVICE\_IS\_DEAD}}
\index{MW\_SERVICE\_IS\_DEAD@{MW\_SERVICE\_IS\_DEAD}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{MW\_SERVICE\_IS\_DEAD}{MW\_SERVICE\_IS\_DEAD}}
{\footnotesize\ttfamily \#define MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+DEAD(\begin{DoxyParamCaption}\item[{}]{srvc }\end{DoxyParamCaption})~  (\mbox{\hyperlink{mw__service_8h_a4e064cb059d437e86f72eeff055a5170}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STOPPING}}(srvc) \texorpdfstring{$\vert$}{|}\texorpdfstring{$\vert$}{|} \mbox{\hyperlink{mw__service_8h_acfcb034d38d2c35d499c786c311af3ab}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STOPPED}}(srvc))}



If a service is STOPPING or STOPPED, it\textquotesingle{}s considered DEAD. 

\Hypertarget{mw__service_8h_aa9214389e880b032dd2ba4d68628b010}\label{mw__service_8h_aa9214389e880b032dd2ba4d68628b010} 
\index{mw\_service.h@{mw\_service.h}!MW\_SERVICE\_IS\_LIVE@{MW\_SERVICE\_IS\_LIVE}}
\index{MW\_SERVICE\_IS\_LIVE@{MW\_SERVICE\_IS\_LIVE}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{MW\_SERVICE\_IS\_LIVE}{MW\_SERVICE\_IS\_LIVE}}
{\footnotesize\ttfamily \#define MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+LIVE(\begin{DoxyParamCaption}\item[{}]{srvc }\end{DoxyParamCaption})~  (\mbox{\hyperlink{mw__service_8h_ac8f916221c8b1ec24c31896f3c76430e}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STARTING}}(srvc) \texorpdfstring{$\vert$}{|}\texorpdfstring{$\vert$}{|} \mbox{\hyperlink{mw__service_8h_a6a5393b8935f62a87a2e5767da74ddc0}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STARTED}}(srvc))}



If a service is STARTING or STARTED, it\textquotesingle{}s considered LIVE. 

\Hypertarget{mw__service_8h_a6a5393b8935f62a87a2e5767da74ddc0}\label{mw__service_8h_a6a5393b8935f62a87a2e5767da74ddc0} 
\index{mw\_service.h@{mw\_service.h}!MW\_SERVICE\_IS\_STARTED@{MW\_SERVICE\_IS\_STARTED}}
\index{MW\_SERVICE\_IS\_STARTED@{MW\_SERVICE\_IS\_STARTED}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{MW\_SERVICE\_IS\_STARTED}{MW\_SERVICE\_IS\_STARTED}}
{\footnotesize\ttfamily \#define MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STARTED(\begin{DoxyParamCaption}\item[{}]{srvc }\end{DoxyParamCaption})~  \mbox{\hyperlink{mw__service_8h_a6a5c28fe3e3b26f9b101ebcb1c8cb8ff}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STATE}}(srvc, \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9ac1d80a3975accbe424d43855eae9ba96}{mw\+Service\+State\+\_\+\+STARTED}})}

\Hypertarget{mw__service_8h_ac8f916221c8b1ec24c31896f3c76430e}\label{mw__service_8h_ac8f916221c8b1ec24c31896f3c76430e} 
\index{mw\_service.h@{mw\_service.h}!MW\_SERVICE\_IS\_STARTING@{MW\_SERVICE\_IS\_STARTING}}
\index{MW\_SERVICE\_IS\_STARTING@{MW\_SERVICE\_IS\_STARTING}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{MW\_SERVICE\_IS\_STARTING}{MW\_SERVICE\_IS\_STARTING}}
{\footnotesize\ttfamily \#define MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STARTING(\begin{DoxyParamCaption}\item[{}]{srvc }\end{DoxyParamCaption})~  \mbox{\hyperlink{mw__service_8h_a6a5c28fe3e3b26f9b101ebcb1c8cb8ff}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STATE}}(srvc, \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a5d370240ae109e408d7a79dab0006765}{mw\+Service\+State\+\_\+\+STARTING}})}

\Hypertarget{mw__service_8h_a6a5c28fe3e3b26f9b101ebcb1c8cb8ff}\label{mw__service_8h_a6a5c28fe3e3b26f9b101ebcb1c8cb8ff} 
\index{mw\_service.h@{mw\_service.h}!MW\_SERVICE\_IS\_STATE@{MW\_SERVICE\_IS\_STATE}}
\index{MW\_SERVICE\_IS\_STATE@{MW\_SERVICE\_IS\_STATE}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{MW\_SERVICE\_IS\_STATE}{MW\_SERVICE\_IS\_STATE}}
{\footnotesize\ttfamily \#define MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STATE(\begin{DoxyParamCaption}\item[{}]{srvc,  }\item[{}]{state }\end{DoxyParamCaption})~  (\mbox{\hyperlink{mw__service_8h_a80be3d5c087a5c5bfdf23174e00d1af0}{mw\+Service\+\_\+get\+State}}(\mbox{\hyperlink{mw__service_8h_ac47dd34aa0115ff9f5df0ca802eddca6}{MW\+\_\+\+SERVICE}}(srvc)) == (state))}

\Hypertarget{mw__service_8h_acfcb034d38d2c35d499c786c311af3ab}\label{mw__service_8h_acfcb034d38d2c35d499c786c311af3ab} 
\index{mw\_service.h@{mw\_service.h}!MW\_SERVICE\_IS\_STOPPED@{MW\_SERVICE\_IS\_STOPPED}}
\index{MW\_SERVICE\_IS\_STOPPED@{MW\_SERVICE\_IS\_STOPPED}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{MW\_SERVICE\_IS\_STOPPED}{MW\_SERVICE\_IS\_STOPPED}}
{\footnotesize\ttfamily \#define MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STOPPED(\begin{DoxyParamCaption}\item[{}]{srvc }\end{DoxyParamCaption})~  \mbox{\hyperlink{mw__service_8h_a6a5c28fe3e3b26f9b101ebcb1c8cb8ff}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STATE}}(srvc, \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a3e645546696ee1e12383795826d8f2c2}{mw\+Service\+State\+\_\+\+STOPPED}})}

\Hypertarget{mw__service_8h_a4e064cb059d437e86f72eeff055a5170}\label{mw__service_8h_a4e064cb059d437e86f72eeff055a5170} 
\index{mw\_service.h@{mw\_service.h}!MW\_SERVICE\_IS\_STOPPING@{MW\_SERVICE\_IS\_STOPPING}}
\index{MW\_SERVICE\_IS\_STOPPING@{MW\_SERVICE\_IS\_STOPPING}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{MW\_SERVICE\_IS\_STOPPING}{MW\_SERVICE\_IS\_STOPPING}}
{\footnotesize\ttfamily \#define MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STOPPING(\begin{DoxyParamCaption}\item[{}]{srvc }\end{DoxyParamCaption})~  \mbox{\hyperlink{mw__service_8h_a6a5c28fe3e3b26f9b101ebcb1c8cb8ff}{MW\+\_\+\+SERVICE\+\_\+\+IS\+\_\+\+STATE}}(srvc, \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a1381383b88d69d1b4b147999f7d2e9e4}{mw\+Service\+State\+\_\+\+STOPPING}})}



\doxysubsection{Typedef Documentation}
\Hypertarget{mw__service_8h_a026b1781d28ceb433d871d52c52e0ec8}\label{mw__service_8h_a026b1781d28ceb433d871d52c52e0ec8} 
\index{mw\_service.h@{mw\_service.h}!mwService\_funcClear@{mwService\_funcClear}}
\index{mwService\_funcClear@{mwService\_funcClear}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_funcClear}{mwService\_funcClear}}
{\footnotesize\ttfamily typedef void(\texorpdfstring{$\ast$}{*} mw\+Service\+\_\+func\+Clear) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)}

\Hypertarget{mw__service_8h_a23401b51378988e2f7add826a99952d0}\label{mw__service_8h_a23401b51378988e2f7add826a99952d0} 
\index{mw\_service.h@{mw\_service.h}!mwService\_funcGetDesc@{mwService\_funcGetDesc}}
\index{mwService\_funcGetDesc@{mwService\_funcGetDesc}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_funcGetDesc}{mwService\_funcGetDesc}}
{\footnotesize\ttfamily typedef const char \texorpdfstring{$\ast$}{*}(\texorpdfstring{$\ast$}{*} mw\+Service\+\_\+func\+Get\+Desc) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)}

\Hypertarget{mw__service_8h_abfd12e44e8eb177a857379eaabc9515c}\label{mw__service_8h_abfd12e44e8eb177a857379eaabc9515c} 
\index{mw\_service.h@{mw\_service.h}!mwService\_funcGetName@{mwService\_funcGetName}}
\index{mwService\_funcGetName@{mwService\_funcGetName}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_funcGetName}{mwService\_funcGetName}}
{\footnotesize\ttfamily typedef const char \texorpdfstring{$\ast$}{*}(\texorpdfstring{$\ast$}{*} mw\+Service\+\_\+func\+Get\+Name) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)}

\Hypertarget{mw__service_8h_a744a25867aff3ec461330a02ddaa3478}\label{mw__service_8h_a744a25867aff3ec461330a02ddaa3478} 
\index{mw\_service.h@{mw\_service.h}!mwService\_funcRecv@{mwService\_funcRecv}}
\index{mwService\_funcRecv@{mwService\_funcRecv}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_funcRecv}{mwService\_funcRecv}}
{\footnotesize\ttfamily typedef void(\texorpdfstring{$\ast$}{*} mw\+Service\+\_\+func\+Recv) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, guint16 msg\+\_\+type, struct \mbox{\hyperlink{structmwOpaque}{mw\+Opaque}} \texorpdfstring{$\ast$}{*}data)}

\Hypertarget{mw__service_8h_a74ac1ad00e83b368fca4e00d1a2af599}\label{mw__service_8h_a74ac1ad00e83b368fca4e00d1a2af599} 
\index{mw\_service.h@{mw\_service.h}!mwService\_funcRecvAccept@{mwService\_funcRecvAccept}}
\index{mwService\_funcRecvAccept@{mwService\_funcRecvAccept}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_funcRecvAccept}{mwService\_funcRecvAccept}}
{\footnotesize\ttfamily typedef void(\texorpdfstring{$\ast$}{*} mw\+Service\+\_\+func\+Recv\+Accept) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, struct \mbox{\hyperlink{structmwMsgChannelAccept}{mw\+Msg\+Channel\+Accept}} \texorpdfstring{$\ast$}{*}msg)}

\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000003}{Todo}}]remove msg and replace with appropriate additional parameters \end{DoxyRefDesc}
\Hypertarget{mw__service_8h_addd91fef17d6dd1d683123167cf62a4e}\label{mw__service_8h_addd91fef17d6dd1d683123167cf62a4e} 
\index{mw\_service.h@{mw\_service.h}!mwService\_funcRecvCreate@{mwService\_funcRecvCreate}}
\index{mwService\_funcRecvCreate@{mwService\_funcRecvCreate}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_funcRecvCreate}{mwService\_funcRecvCreate}}
{\footnotesize\ttfamily typedef void(\texorpdfstring{$\ast$}{*} mw\+Service\+\_\+func\+Recv\+Create) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, struct \mbox{\hyperlink{structmwMsgChannelCreate}{mw\+Msg\+Channel\+Create}} \texorpdfstring{$\ast$}{*}msg)}

\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000002}{Todo}}]remove msg and replace with appropriate additional parameters \end{DoxyRefDesc}
\Hypertarget{mw__service_8h_aaff9b6cb951faacf0ca4bf681905908c}\label{mw__service_8h_aaff9b6cb951faacf0ca4bf681905908c} 
\index{mw\_service.h@{mw\_service.h}!mwService\_funcRecvDestroy@{mwService\_funcRecvDestroy}}
\index{mwService\_funcRecvDestroy@{mwService\_funcRecvDestroy}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_funcRecvDestroy}{mwService\_funcRecvDestroy}}
{\footnotesize\ttfamily typedef void(\texorpdfstring{$\ast$}{*} mw\+Service\+\_\+func\+Recv\+Destroy) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service, struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}channel, struct \mbox{\hyperlink{structmwMsgChannelDestroy}{mw\+Msg\+Channel\+Destroy}} \texorpdfstring{$\ast$}{*}msg)}

\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000004}{Todo}}]remove msg and replace with appropriate additional parameters \end{DoxyRefDesc}
\Hypertarget{mw__service_8h_a124a98a47f33dddacbf0cd4515758101}\label{mw__service_8h_a124a98a47f33dddacbf0cd4515758101} 
\index{mw\_service.h@{mw\_service.h}!mwService\_funcStart@{mwService\_funcStart}}
\index{mwService\_funcStart@{mwService\_funcStart}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_funcStart}{mwService\_funcStart}}
{\footnotesize\ttfamily typedef void(\texorpdfstring{$\ast$}{*} mw\+Service\+\_\+func\+Start) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)}

\Hypertarget{mw__service_8h_a39ab636f567096ea2872a814498910a9}\label{mw__service_8h_a39ab636f567096ea2872a814498910a9} 
\index{mw\_service.h@{mw\_service.h}!mwService\_funcStop@{mwService\_funcStop}}
\index{mwService\_funcStop@{mwService\_funcStop}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_funcStop}{mwService\_funcStop}}
{\footnotesize\ttfamily typedef void(\texorpdfstring{$\ast$}{*} mw\+Service\+\_\+func\+Stop) (struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}service)}



\doxysubsection{Enumeration Type Documentation}
\Hypertarget{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9}\label{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9} 
\index{mw\_service.h@{mw\_service.h}!mwServiceState@{mwServiceState}}
\index{mwServiceState@{mwServiceState}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwServiceState}{mwServiceState}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9}{mw\+Service\+State}}}



State-\/tracking for a service. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{mwServiceState\_STOPPED@{mwServiceState\_STOPPED}!mw\_service.h@{mw\_service.h}}\index{mw\_service.h@{mw\_service.h}!mwServiceState\_STOPPED@{mwServiceState\_STOPPED}}}\Hypertarget{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a3e645546696ee1e12383795826d8f2c2}\label{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a3e645546696ee1e12383795826d8f2c2} 
mw\+Service\+State\+\_\+\+STOPPED&the service is not active \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{mwServiceState\_STOPPING@{mwServiceState\_STOPPING}!mw\_service.h@{mw\_service.h}}\index{mw\_service.h@{mw\_service.h}!mwServiceState\_STOPPING@{mwServiceState\_STOPPING}}}\Hypertarget{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a1381383b88d69d1b4b147999f7d2e9e4}\label{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a1381383b88d69d1b4b147999f7d2e9e4} 
mw\+Service\+State\+\_\+\+STOPPING&the service is shutting down \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{mwServiceState\_STARTED@{mwServiceState\_STARTED}!mw\_service.h@{mw\_service.h}}\index{mw\_service.h@{mw\_service.h}!mwServiceState\_STARTED@{mwServiceState\_STARTED}}}\Hypertarget{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9ac1d80a3975accbe424d43855eae9ba96}\label{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9ac1d80a3975accbe424d43855eae9ba96} 
mw\+Service\+State\+\_\+\+STARTED&the service is active \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{mwServiceState\_STARTING@{mwServiceState\_STARTING}!mw\_service.h@{mw\_service.h}}\index{mw\_service.h@{mw\_service.h}!mwServiceState\_STARTING@{mwServiceState\_STARTING}}}\Hypertarget{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a5d370240ae109e408d7a79dab0006765}\label{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a5d370240ae109e408d7a79dab0006765} 
mw\+Service\+State\+\_\+\+STARTING&the service is starting up \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{mwServiceState\_ERROR@{mwServiceState\_ERROR}!mw\_service.h@{mw\_service.h}}\index{mw\_service.h@{mw\_service.h}!mwServiceState\_ERROR@{mwServiceState\_ERROR}}}\Hypertarget{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a6dd6d02356710ebc0ad952e634bf69db}\label{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9a6dd6d02356710ebc0ad952e634bf69db} 
mw\+Service\+State\+\_\+\+ERROR&error in service, shutting down \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{mwServiceState\_UNKNOWN@{mwServiceState\_UNKNOWN}!mw\_service.h@{mw\_service.h}}\index{mw\_service.h@{mw\_service.h}!mwServiceState\_UNKNOWN@{mwServiceState\_UNKNOWN}}}\Hypertarget{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9acd926c48397703e396b556448c23ce12}\label{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9acd926c48397703e396b556448c23ce12} 
mw\+Service\+State\+\_\+\+UNKNOWN&error determining state \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\Hypertarget{mw__service_8h_ac8adb7938b9884ad32e4700a4d933668}\label{mw__service_8h_ac8adb7938b9884ad32e4700a4d933668} 
\index{mw\_service.h@{mw\_service.h}!mwService\_free@{mwService\_free}}
\index{mwService\_free@{mwService\_free}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_free()}{mwService\_free()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+free (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service }\end{DoxyParamCaption})}



Frees memory used by a service. 

Will trigger the stop handler if the service is STARTED or STARTING. Triggers clear handler to allow cleanup.


\begin{DoxyParams}{Parameters}
{\em service} & The service to clear and free \\
\hline
\end{DoxyParams}
\Hypertarget{mw__service_8h_a94ab61559c154ad55b5038830b77d9bd}\label{mw__service_8h_a94ab61559c154ad55b5038830b77d9bd} 
\index{mw\_service.h@{mw\_service.h}!mwService\_getClientData@{mwService\_getClientData}}
\index{mwService\_getClientData@{mwService\_getClientData}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_getClientData()}{mwService\_getClientData()}}
{\footnotesize\ttfamily gpointer mw\+Service\+\_\+get\+Client\+Data (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service }\end{DoxyParamCaption})}



Reference associated client data. 

\Hypertarget{mw__service_8h_a9f496dda96b83904851dc7607cd074e2}\label{mw__service_8h_a9f496dda96b83904851dc7607cd074e2} 
\index{mw\_service.h@{mw\_service.h}!mwService\_getDesc@{mwService\_getDesc}}
\index{mwService\_getDesc@{mwService\_getDesc}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_getDesc()}{mwService\_getDesc()}}
{\footnotesize\ttfamily const char \texorpdfstring{$\ast$}{*} mw\+Service\+\_\+get\+Desc (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{ }\end{DoxyParamCaption})}

\begin{DoxyReturn}{Returns}
string short description of the service 
\end{DoxyReturn}
\Hypertarget{mw__service_8h_ad29a8ff211ad033fd9f4ced75bc1857a}\label{mw__service_8h_ad29a8ff211ad033fd9f4ced75bc1857a} 
\index{mw\_service.h@{mw\_service.h}!mwService\_getName@{mwService\_getName}}
\index{mwService\_getName@{mwService\_getName}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_getName()}{mwService\_getName()}}
{\footnotesize\ttfamily const char \texorpdfstring{$\ast$}{*} mw\+Service\+\_\+get\+Name (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{ }\end{DoxyParamCaption})}

\begin{DoxyReturn}{Returns}
string short name of the service 
\end{DoxyReturn}
\Hypertarget{mw__service_8h_aaca7537036f96f87e3818e45f170b7bc}\label{mw__service_8h_aaca7537036f96f87e3818e45f170b7bc} 
\index{mw\_service.h@{mw\_service.h}!mwService\_getSession@{mwService\_getSession}}
\index{mwService\_getSession@{mwService\_getSession}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_getSession()}{mwService\_getSession()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*} mw\+Service\+\_\+get\+Session (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service }\end{DoxyParamCaption})}

\begin{DoxyReturn}{Returns}
the service\textquotesingle{}s session 
\end{DoxyReturn}
\Hypertarget{mw__service_8h_a80be3d5c087a5c5bfdf23174e00d1af0}\label{mw__service_8h_a80be3d5c087a5c5bfdf23174e00d1af0} 
\index{mw\_service.h@{mw\_service.h}!mwService\_getState@{mwService\_getState}}
\index{mwService\_getState@{mwService\_getState}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_getState()}{mwService\_getState()}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{mw__service_8h_a7ce6ac62b951a443c05f541c8ace90a9}{mw\+Service\+State}} mw\+Service\+\_\+get\+State (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service }\end{DoxyParamCaption})}

\begin{DoxyReturn}{Returns}
the service\textquotesingle{}s state 
\end{DoxyReturn}
\Hypertarget{mw__service_8h_a86b61f33fc9a9484c8f7c3177deeb004}\label{mw__service_8h_a86b61f33fc9a9484c8f7c3177deeb004} 
\index{mw\_service.h@{mw\_service.h}!mwService\_getType@{mwService\_getType}}
\index{mwService\_getType@{mwService\_getType}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_getType()}{mwService\_getType()}}
{\footnotesize\ttfamily guint32 mw\+Service\+\_\+get\+Type (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{ }\end{DoxyParamCaption})}

\begin{DoxyReturn}{Returns}
the appropriate type id for the service 
\end{DoxyReturn}
\Hypertarget{mw__service_8h_a977c751125e97fb60dc212c57f03ed6e}\label{mw__service_8h_a977c751125e97fb60dc212c57f03ed6e} 
\index{mw\_service.h@{mw\_service.h}!mwService\_init@{mwService\_init}}
\index{mwService\_init@{mwService\_init}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_init()}{mwService\_init()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+init (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service,  }\item[{struct \mbox{\hyperlink{structmwSession}{mw\+Session}} \texorpdfstring{$\ast$}{*}}]{session,  }\item[{guint32}]{service\+\_\+type }\end{DoxyParamCaption})}



Prepares a newly allocated service for use. 

Intended for use by service implementations, rather than by code utilizing a service.

The service state will be initialized to STOPPED.


\begin{DoxyParams}{Parameters}
{\em service} & the service to initialize \\
\hline
{\em session} & the service\textquotesingle{}s owning session \\
\hline
{\em service\+\_\+type} & the service ID number \\
\hline
\end{DoxyParams}
\Hypertarget{mw__service_8h_adae02fc3d770260deed3e04387145e44}\label{mw__service_8h_adae02fc3d770260deed3e04387145e44} 
\index{mw\_service.h@{mw\_service.h}!mwService\_recv@{mwService\_recv}}
\index{mwService\_recv@{mwService\_recv}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_recv()}{mwService\_recv()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+recv (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service,  }\item[{struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}}]{channel,  }\item[{guint16}]{msg\+\_\+type,  }\item[{struct \mbox{\hyperlink{structmwOpaque}{mw\+Opaque}} \texorpdfstring{$\ast$}{*}}]{data }\end{DoxyParamCaption})}



Triggers the input handler on the service. 


\begin{DoxyParams}{Parameters}
{\em service} & the service to receive the input \\
\hline
{\em channel} & the channel the input was received from \\
\hline
{\em msg\+\_\+type} & the service-\/dependant message type \\
\hline
{\em data} & the message data \\
\hline
\end{DoxyParams}
\Hypertarget{mw__service_8h_ad07b444814007f616441021b02b29e0b}\label{mw__service_8h_ad07b444814007f616441021b02b29e0b} 
\index{mw\_service.h@{mw\_service.h}!mwService\_recvAccept@{mwService\_recvAccept}}
\index{mwService\_recvAccept@{mwService\_recvAccept}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_recvAccept()}{mwService\_recvAccept()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+recv\+Accept (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service,  }\item[{struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}}]{channel,  }\item[{struct \mbox{\hyperlink{structmwMsgChannelAccept}{mw\+Msg\+Channel\+Accept}} \texorpdfstring{$\ast$}{*}}]{msg }\end{DoxyParamCaption})}



Triggers the recv\+\_\+accept handler on the service. 


\begin{DoxyParams}{Parameters}
{\em service} & the service to handle the message \\
\hline
{\em channel} & the channel being accepted \\
\hline
{\em msg} & the channel accept message \\
\hline
\end{DoxyParams}
\Hypertarget{mw__service_8h_a826ac106b94fc7d4dd8b7efcc70d5355}\label{mw__service_8h_a826ac106b94fc7d4dd8b7efcc70d5355} 
\index{mw\_service.h@{mw\_service.h}!mwService\_recvCreate@{mwService\_recvCreate}}
\index{mwService\_recvCreate@{mwService\_recvCreate}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_recvCreate()}{mwService\_recvCreate()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+recv\+Create (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service,  }\item[{struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}}]{channel,  }\item[{struct \mbox{\hyperlink{structmwMsgChannelCreate}{mw\+Msg\+Channel\+Create}} \texorpdfstring{$\ast$}{*}}]{msg }\end{DoxyParamCaption})}



Triggers the recv\+\_\+create handler on the service. 


\begin{DoxyParams}{Parameters}
{\em service} & the service to handle the message \\
\hline
{\em channel} & the channel being created \\
\hline
{\em msg} & the channel create message \\
\hline
\end{DoxyParams}
\Hypertarget{mw__service_8h_aaf155b961ad4fbf55cb8b593ec29dc60}\label{mw__service_8h_aaf155b961ad4fbf55cb8b593ec29dc60} 
\index{mw\_service.h@{mw\_service.h}!mwService\_recvDestroy@{mwService\_recvDestroy}}
\index{mwService\_recvDestroy@{mwService\_recvDestroy}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_recvDestroy()}{mwService\_recvDestroy()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+recv\+Destroy (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service,  }\item[{struct \mbox{\hyperlink{structmwChannel}{mw\+Channel}} \texorpdfstring{$\ast$}{*}}]{channel,  }\item[{struct \mbox{\hyperlink{structmwMsgChannelDestroy}{mw\+Msg\+Channel\+Destroy}} \texorpdfstring{$\ast$}{*}}]{msg }\end{DoxyParamCaption})}



Triggers the recv\+\_\+destroy handler on the service. 


\begin{DoxyParams}{Parameters}
{\em service} & the service to handle the message \\
\hline
{\em channel} & the channel being destroyed \\
\hline
{\em msg} & the channel destroy message \\
\hline
\end{DoxyParams}
\Hypertarget{mw__service_8h_a115153000304eccc772c0313da5dd5dd}\label{mw__service_8h_a115153000304eccc772c0313da5dd5dd} 
\index{mw\_service.h@{mw\_service.h}!mwService\_removeClientData@{mwService\_removeClientData}}
\index{mwService\_removeClientData@{mwService\_removeClientData}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_removeClientData()}{mwService\_removeClientData()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+remove\+Client\+Data (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service }\end{DoxyParamCaption})}



Removes client data from service. 

If there is a cleanup function, it will be called. \Hypertarget{mw__service_8h_a7c3e0cdcb6631cb0da3b79572fdc5c95}\label{mw__service_8h_a7c3e0cdcb6631cb0da3b79572fdc5c95} 
\index{mw\_service.h@{mw\_service.h}!mwService\_setClientData@{mwService\_setClientData}}
\index{mwService\_setClientData@{mwService\_setClientData}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_setClientData()}{mwService\_setClientData()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+set\+Client\+Data (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service,  }\item[{gpointer}]{data,  }\item[{GDestroy\+Notify}]{cleanup }\end{DoxyParamCaption})}



Associates client data with service. 

If there is existing data, it will not have its cleanup function called. Client data is not for use by service implementations. Rather, it is for use by client code which may later make use of those service implementations. \Hypertarget{mw__service_8h_a177f564b1ed8f8544ab5089d7e4afbb0}\label{mw__service_8h_a177f564b1ed8f8544ab5089d7e4afbb0} 
\index{mw\_service.h@{mw\_service.h}!mwService\_start@{mwService\_start}}
\index{mwService\_start@{mwService\_start}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_start()}{mwService\_start()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+start (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service }\end{DoxyParamCaption})}



Triggers the start handler for the service. 

Normally called from the session upon receipt of a service available message. Service implementations should use this handler to open any necessary channels, etc. Checks that the service is STOPPED, or returns.


\begin{DoxyParams}{Parameters}
{\em service} & The service to start \\
\hline
\end{DoxyParams}
\Hypertarget{mw__service_8h_afbb26101bfdd8ab4df279dd907a2510a}\label{mw__service_8h_afbb26101bfdd8ab4df279dd907a2510a} 
\index{mw\_service.h@{mw\_service.h}!mwService\_started@{mwService\_started}}
\index{mwService\_started@{mwService\_started}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_started()}{mwService\_started()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+started (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service }\end{DoxyParamCaption})}



Indicate that a service is started. 

To be used by service implementations when the service is fully started. \Hypertarget{mw__service_8h_af591d13a2ef57d42b63947dcae6faa5f}\label{mw__service_8h_af591d13a2ef57d42b63947dcae6faa5f} 
\index{mw\_service.h@{mw\_service.h}!mwService\_stop@{mwService\_stop}}
\index{mwService\_stop@{mwService\_stop}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_stop()}{mwService\_stop()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+stop (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service }\end{DoxyParamCaption})}



Triggers the stop handler for the service. 

Normally called from the session before closing down the connection. Checks that the service is STARTED or STARTING, or returns


\begin{DoxyParams}{Parameters}
{\em service} & The service to stop \\
\hline
\end{DoxyParams}
\Hypertarget{mw__service_8h_ab361f3df95b1611961ab0ec4ac69eddf}\label{mw__service_8h_ab361f3df95b1611961ab0ec4ac69eddf} 
\index{mw\_service.h@{mw\_service.h}!mwService\_stopped@{mwService\_stopped}}
\index{mwService\_stopped@{mwService\_stopped}!mw\_service.h@{mw\_service.h}}
\doxysubsubsection{\texorpdfstring{mwService\_stopped()}{mwService\_stopped()}}
{\footnotesize\ttfamily void mw\+Service\+\_\+stopped (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structmwService}{mw\+Service}} \texorpdfstring{$\ast$}{*}}]{service }\end{DoxyParamCaption})}



Indicate that a service is stopped. 

To be used by service implementations when the service is fully stopped. 