\hypertarget{classcUPnPResourceMediator}{
\section{cUPnPResourceMediator Class Reference}
\label{classcUPnPResourceMediator}\index{cUPnPResourceMediator@{cUPnPResourceMediator}}
}
{\tt \#include $<$resources.h$>$}

Collaboration diagram for cUPnPResourceMediator:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=400pt]{classcUPnPResourceMediator__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hyperlink{classcUPnPResource}{cUPnPResource} $\ast$ \hyperlink{classcUPnPResourceMediator_9d4d8cc5eafb18b13ad7d14793d3f9de}{getResource} (unsigned int ResourceID)
\item 
int \hyperlink{classcUPnPResourceMediator_a633cef46d5cae9aecec05ea28d7c14e}{saveResource} (\hyperlink{classcUPnPResource}{cUPnPResource} $\ast$Resource)
\item 
\hyperlink{classcUPnPResource}{cUPnPResource} $\ast$ \hyperlink{classcUPnPResourceMediator_14367dd7e160f6c6812279b84a4fa8e2}{newResource} (\hyperlink{classcUPnPClassObject}{cUPnPClassObject} $\ast$Object, int ResourceType, cString ResourceFile, cString ContentType, cString ProtocolInfo)
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
\hypertarget{classcUPnPResourceMediator_bd3fceb5edae16f35b23748913128356}{
class \hyperlink{classcUPnPResourceMediator_bd3fceb5edae16f35b23748913128356}{cUPnPResources}}
\label{classcUPnPResourceMediator_bd3fceb5edae16f35b23748913128356}

\end{CompactItemize}


\subsection{Detailed Description}
The resource mediator

This is another mediator which communicates with the database. It manages the resources in the database 

\subsection{Member Function Documentation}
\hypertarget{classcUPnPResourceMediator_9d4d8cc5eafb18b13ad7d14793d3f9de}{
\index{cUPnPResourceMediator@{cUPnPResourceMediator}!getResource@{getResource}}
\index{getResource@{getResource}!cUPnPResourceMediator@{cUPnPResourceMediator}}
\subsubsection[{getResource}]{\setlength{\rightskip}{0pt plus 5cm}{\bf cUPnPResource} $\ast$ cUPnPResourceMediator::getResource (unsigned int {\em ResourceID})}}
\label{classcUPnPResourceMediator_9d4d8cc5eafb18b13ad7d14793d3f9de}


Get a resource by ID

This returns a resource by its resource ID

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ResourceID}]the resource ID of the demanded resource \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the requested resource \end{Desc}
\hypertarget{classcUPnPResourceMediator_14367dd7e160f6c6812279b84a4fa8e2}{
\index{cUPnPResourceMediator@{cUPnPResourceMediator}!newResource@{newResource}}
\index{newResource@{newResource}!cUPnPResourceMediator@{cUPnPResourceMediator}}
\subsubsection[{newResource}]{\setlength{\rightskip}{0pt plus 5cm}{\bf cUPnPResource} $\ast$ cUPnPResourceMediator::newResource ({\bf cUPnPClassObject} $\ast$ {\em Object}, \/  int {\em ResourceType}, \/  cString {\em ResourceFile}, \/  cString {\em ContentType}, \/  cString {\em ProtocolInfo})}}
\label{classcUPnPResourceMediator_14367dd7e160f6c6812279b84a4fa8e2}


Create new resource

This creates a new resource and stores the skeleton in the database. The newly created resource will only contain all required information.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em Object}]the Object which will hold the resource \item[{\em ResourceType}]the type of the resource \item[{\em ResourceFile}]the file or URL, where the resource can be located \item[{\em ContentType}]the mime type of the content \item[{\em ProtocolInfo}]the protocol information of the resource \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the newly created resource \end{Desc}
\hypertarget{classcUPnPResourceMediator_a633cef46d5cae9aecec05ea28d7c14e}{
\index{cUPnPResourceMediator@{cUPnPResourceMediator}!saveResource@{saveResource}}
\index{saveResource@{saveResource}!cUPnPResourceMediator@{cUPnPResourceMediator}}
\subsubsection[{saveResource}]{\setlength{\rightskip}{0pt plus 5cm}int cUPnPResourceMediator::saveResource ({\bf cUPnPResource} $\ast$ {\em Resource})}}
\label{classcUPnPResourceMediator_a633cef46d5cae9aecec05ea28d7c14e}


Saves the resource

This updates the information in the database with those in the resource object

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em Resource}]the resource which shall be saved \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]returns\begin{itemize}
\item {\bf {\tt 0},} if saving was successful\item {\bf {\tt $<$0},} if an error occured \end{itemize}
\end{Desc}


The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
database/resources.h\item 
database/resources.cpp\end{CompactItemize}
