\hypertarget{class_skm_xml_api_1_1_skm_session}{}\doxysection{Skm\+Xml\+Api.\+Skm\+Session Class Reference}
\label{class_skm_xml_api_1_1_skm_session}\index{SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}}


The \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session}{Skm\+Session}} provides authentication keeps reference to the session on the Skm server.  


\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session_aa0ce676bba38c290b445906459c2629b}{Login}} (string Username, string Password)
\begin{DoxyCompactList}\small\item\em Logs into the Skm creating a valid session on the Skm server. This method will throw a \textquotesingle{}\mbox{\hyperlink{class_skm_xml_api_1_1_skm_authentication_exception}{Skm\+Authentication\+Exception}}\textquotesingle{} exception if the authentication fails or an exception of type \textquotesingle{}Exception\textquotesingle{} for any other error. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session}{Skm\+Session}} \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session_a12e2fa7a9a886dcb5345a7ac9014c6f2}{New\+Skm\+Session}} (string Address)
\begin{DoxyCompactList}\small\item\em Factory method to create a new \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session}{Skm\+Session}}. This method only initializes and returns a new instance. It does not communicate with the Skm server. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Properties}
\begin{DoxyCompactItemize}
\item 
string \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session_a7d24f9c63bc4f0c6edd051ac61e0c8b9}{Session\+Cookie}}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}
\begin{DoxyCompactList}\small\item\em Session cookie. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session_afad04d3715b991d28d1ae60e42172c4a}{Is\+Session\+Valid}}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}
\begin{DoxyCompactList}\small\item\em Is true if the session has been logged in and is valid \end{DoxyCompactList}\item 
string? \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session_a406759ca667c796eec970083d404fcd6}{Server\+Address}}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}
\begin{DoxyCompactList}\small\item\em The address of the Skm Server. This can either be an IP address or a resolvable D\+NS name. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_skm_xml_api_1_1_skm_user}{Skm\+User}} \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session_a8b911f3a96893334f8f6ee8b6a846951}{User}}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}
\begin{DoxyCompactList}\small\item\em The user associated to this session \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session}{Skm\+Session}} provides authentication keeps reference to the session on the Skm server. 



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_skm_xml_api_1_1_skm_session_aa0ce676bba38c290b445906459c2629b}\label{class_skm_xml_api_1_1_skm_session_aa0ce676bba38c290b445906459c2629b}} 
\index{SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}!Login@{Login}}
\index{Login@{Login}!SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}}
\doxysubsubsection{\texorpdfstring{Login()}{Login()}}
{\footnotesize\ttfamily void Skm\+Xml\+Api.\+Skm\+Session.\+Login (\begin{DoxyParamCaption}\item[{string}]{Username,  }\item[{string}]{Password }\end{DoxyParamCaption})}



Logs into the Skm creating a valid session on the Skm server. This method will throw a \textquotesingle{}\mbox{\hyperlink{class_skm_xml_api_1_1_skm_authentication_exception}{Skm\+Authentication\+Exception}}\textquotesingle{} exception if the authentication fails or an exception of type \textquotesingle{}Exception\textquotesingle{} for any other error. 


\begin{DoxyParams}{Parameters}
{\em Username} & Username to authenticate\\
\hline
{\em Password} & Password of the user\\
\hline
\end{DoxyParams}



\begin{DoxyCode}{0}
\DoxyCodeLine{ SkmSession m\_session;}
\DoxyCodeLine{ \textcolor{comment}{/* Create our Skm session object <em>\&zwj;/}}
\DoxyCodeLine{\textcolor{comment}{ m\_session = SkmSession.NewSkmSession(Server, Port);}}
\DoxyCodeLine{\textcolor{comment}{ try}}
\DoxyCodeLine{\textcolor{comment}{ \{}}
\DoxyCodeLine{\textcolor{comment}{     SetStatusInfo("Logging into " + Server);}}
\DoxyCodeLine{\textcolor{comment}{     /</em> Attempt to login <em>\&zwj;/}}
\DoxyCodeLine{\textcolor{comment}{     m\_session.Login(Username, Password);}}
\DoxyCodeLine{\textcolor{comment}{ \}}}
\DoxyCodeLine{\textcolor{comment}{ /</em> Login throws an this exception if there }}
\DoxyCodeLine{\textcolor{comment}{  * was an authentication problem <em>\&zwj;/}}
\DoxyCodeLine{\textcolor{comment}{ catch (SkmAuthenticationException ex)}}
\DoxyCodeLine{\textcolor{comment}{ \{}}
\DoxyCodeLine{\textcolor{comment}{     MessageBox.Show("Authentication Failed -\/ " + ex.Message,}}
\DoxyCodeLine{\textcolor{comment}{                     "Authentication Error",}}
\DoxyCodeLine{\textcolor{comment}{                     MessageBoxButtons.OK,}}
\DoxyCodeLine{\textcolor{comment}{                     MessageBoxIcon.Error);}}
\DoxyCodeLine{\textcolor{comment}{     m\_session = null;}}
\DoxyCodeLine{\textcolor{comment}{     SetStatusInfo("Authentication failed on " + Server);}}
\DoxyCodeLine{\textcolor{comment}{     return;}}
\DoxyCodeLine{\textcolor{comment}{ \}}}
\DoxyCodeLine{\textcolor{comment}{ /</em> Catch all other errors *\&zwj;/}}
\DoxyCodeLine{\textcolor{comment}{ catch (Exception ex)}}
\DoxyCodeLine{\textcolor{comment}{ \{}}
\DoxyCodeLine{\textcolor{comment}{     MessageBox.Show("Connect Failed -\/ " + ex.Message,}}
\DoxyCodeLine{\textcolor{comment}{                     "Connect Error",}}
\DoxyCodeLine{\textcolor{comment}{                      MessageBoxButtons.OK,}}
\DoxyCodeLine{\textcolor{comment}{                      MessageBoxIcon.Error);}}
\DoxyCodeLine{\textcolor{comment}{     m\_session = null;}}
\DoxyCodeLine{\textcolor{comment}{     SetStatusInfo("Connect failed on " + Server);}}
\DoxyCodeLine{\textcolor{comment}{     return;}}
\DoxyCodeLine{\textcolor{comment}{\}}}
\end{DoxyCode}
 \mbox{\Hypertarget{class_skm_xml_api_1_1_skm_session_a12e2fa7a9a886dcb5345a7ac9014c6f2}\label{class_skm_xml_api_1_1_skm_session_a12e2fa7a9a886dcb5345a7ac9014c6f2}} 
\index{SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}!NewSkmSession@{NewSkmSession}}
\index{NewSkmSession@{NewSkmSession}!SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}}
\doxysubsubsection{\texorpdfstring{NewSkmSession()}{NewSkmSession()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session}{Skm\+Session}} Skm\+Xml\+Api.\+Skm\+Session.\+New\+Skm\+Session (\begin{DoxyParamCaption}\item[{string}]{Address }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Factory method to create a new \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session}{Skm\+Session}}. This method only initializes and returns a new instance. It does not communicate with the Skm server. 


\begin{DoxyParams}{Parameters}
{\em Address} & Skm server address\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new instance of the \mbox{\hyperlink{class_skm_xml_api_1_1_skm_session}{Skm\+Session}}
\end{DoxyReturn}



\begin{DoxyCode}{0}
\DoxyCodeLine{SkmSession m\_session;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{/* Create our Skm session object *\&zwj;/}}
\DoxyCodeLine{\textcolor{comment}{m\_session = SkmSession.NewSkmSession(Server);}}
\end{DoxyCode}
 

\doxysubsection{Property Documentation}
\mbox{\Hypertarget{class_skm_xml_api_1_1_skm_session_afad04d3715b991d28d1ae60e42172c4a}\label{class_skm_xml_api_1_1_skm_session_afad04d3715b991d28d1ae60e42172c4a}} 
\index{SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}!IsSessionValid@{IsSessionValid}}
\index{IsSessionValid@{IsSessionValid}!SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}}
\doxysubsubsection{\texorpdfstring{IsSessionValid}{IsSessionValid}}
{\footnotesize\ttfamily bool Skm\+Xml\+Api.\+Skm\+Session.\+Is\+Session\+Valid\hspace{0.3cm}{\ttfamily [get]}}



Is true if the session has been logged in and is valid 

\mbox{\Hypertarget{class_skm_xml_api_1_1_skm_session_a406759ca667c796eec970083d404fcd6}\label{class_skm_xml_api_1_1_skm_session_a406759ca667c796eec970083d404fcd6}} 
\index{SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}!ServerAddress@{ServerAddress}}
\index{ServerAddress@{ServerAddress}!SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}}
\doxysubsubsection{\texorpdfstring{ServerAddress}{ServerAddress}}
{\footnotesize\ttfamily string? Skm\+Xml\+Api.\+Skm\+Session.\+Server\+Address\hspace{0.3cm}{\ttfamily [get]}, {\ttfamily [set]}}



The address of the Skm Server. This can either be an IP address or a resolvable D\+NS name. 

\mbox{\Hypertarget{class_skm_xml_api_1_1_skm_session_a7d24f9c63bc4f0c6edd051ac61e0c8b9}\label{class_skm_xml_api_1_1_skm_session_a7d24f9c63bc4f0c6edd051ac61e0c8b9}} 
\index{SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}!SessionCookie@{SessionCookie}}
\index{SessionCookie@{SessionCookie}!SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}}
\doxysubsubsection{\texorpdfstring{SessionCookie}{SessionCookie}}
{\footnotesize\ttfamily string Skm\+Xml\+Api.\+Skm\+Session.\+Session\+Cookie\hspace{0.3cm}{\ttfamily [get]}}



Session cookie. 

\mbox{\Hypertarget{class_skm_xml_api_1_1_skm_session_a8b911f3a96893334f8f6ee8b6a846951}\label{class_skm_xml_api_1_1_skm_session_a8b911f3a96893334f8f6ee8b6a846951}} 
\index{SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}!User@{User}}
\index{User@{User}!SkmXmlApi.SkmSession@{SkmXmlApi.SkmSession}}
\doxysubsubsection{\texorpdfstring{User}{User}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_skm_xml_api_1_1_skm_user}{Skm\+User}} Skm\+Xml\+Api.\+Skm\+Session.\+User\hspace{0.3cm}{\ttfamily [get]}}



The user associated to this session 



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
src/\+Skm\+Xml\+Api/Skm\+Session.\+cs\end{DoxyCompactItemize}
