1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>UPnP/DLNA plugin for VDR: cUPnPResourceMediator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>cUPnPResourceMediator Class Reference</h1><!-- doxytag: class="cUPnPResourceMediator" --><code>#include <<a class="el" href="resources_8h-source.html">resources.h</a>></code>
<p>
<div class="dynheader">
Collaboration diagram for cUPnPResourceMediator:</div>
<div class="dynsection">
<p><center><img src="classcUPnPResourceMediator__coll__graph.png" border="0" usemap="#cUPnPResourceMediator__coll__map" alt="Collaboration graph"></center>
<map name="cUPnPResourceMediator__coll__map">
<area shape="rect" href="classcSQLiteDatabase.html" title="{cSQLiteDatabase\n|- mAutoCommit\l- mActiveTransaction\l- mLastRow\l- mRows\l- mDatabase\l- mInstance\l|+ ~cSQLiteDatabase()\l+ getResultCount()\l+ getLastInsertRowID()\l+ getResultRows()\l+ execStatement()\l+ startTransaction()\l+ commitTransaction()\l+ rollbackTransaction()\l+ setAutoCommit()\l+ sprintf()\l+ getInstance()\l- cSQLiteDatabase()\l- initialize()\l- initializeTables()\l- initializeTriggers()\l- exec()\l- getResultRow()\l}" alt="" coords="25,437,180,853"><area shape="rect" href="classcRows.html" title="{cRows\n|- mLastRow\l|+ ~cRows()\l+ fetchRow()\l- cRows()\l}" alt="" coords="144,261,240,373"><area shape="rect" href="classcRow.html" title="{cRow\n|- currentCol\l- ColCount\l- Columns\l- Values\l|+ ~cRow()\l+ Count()\l+ fetchColumn()\l+ fetchColumn()\l- cRow()\l}" alt="" coords="45,5,160,197"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classcUPnPResourceMediator-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcUPnPResource.html">cUPnPResource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcUPnPResourceMediator.html#9d4d8cc5eafb18b13ad7d14793d3f9de">getResource</a> (unsigned int ResourceID)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classcUPnPResourceMediator.html#a633cef46d5cae9aecec05ea28d7c14e">saveResource</a> (<a class="el" href="classcUPnPResource.html">cUPnPResource</a> *Resource)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcUPnPResource.html">cUPnPResource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcUPnPResourceMediator.html#14367dd7e160f6c6812279b84a4fa8e2">newResource</a> (<a class="el" href="classcUPnPClassObject.html">cUPnPClassObject</a> *Object, int ResourceType, cString ResourceFile, cString ContentType, cString ProtocolInfo)</td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd3fceb5edae16f35b23748913128356"></a><!-- doxytag: member="cUPnPResourceMediator::cUPnPResources" ref="bd3fceb5edae16f35b23748913128356" args="" -->
class </td><td class="memItemRight" valign="bottom"><a class="el" href="classcUPnPResourceMediator.html#bd3fceb5edae16f35b23748913128356">cUPnPResources</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The resource mediator<p>
This is another mediator which communicates with the database. It manages the resources in the database <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="9d4d8cc5eafb18b13ad7d14793d3f9de"></a><!-- doxytag: member="cUPnPResourceMediator::getResource" ref="9d4d8cc5eafb18b13ad7d14793d3f9de" args="(unsigned int ResourceID)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classcUPnPResource.html">cUPnPResource</a> * cUPnPResourceMediator::getResource </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>ResourceID</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get a resource by ID<p>
This returns a resource by its resource ID<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>ResourceID</em> </td><td>the resource ID of the demanded resource </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the requested resource </dd></dl>
</div>
</div><p>
<a class="anchor" name="14367dd7e160f6c6812279b84a4fa8e2"></a><!-- doxytag: member="cUPnPResourceMediator::newResource" ref="14367dd7e160f6c6812279b84a4fa8e2" args="(cUPnPClassObject *Object, int ResourceType, cString ResourceFile, cString ContentType, cString ProtocolInfo)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classcUPnPResource.html">cUPnPResource</a> * cUPnPResourceMediator::newResource </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classcUPnPClassObject.html">cUPnPClassObject</a> * </td>
<td class="paramname"> <em>Object</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>ResourceType</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cString </td>
<td class="paramname"> <em>ResourceFile</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cString </td>
<td class="paramname"> <em>ContentType</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cString </td>
<td class="paramname"> <em>ProtocolInfo</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Create new resource<p>
This creates a new resource and stores the skeleton in the database. The newly created resource will only contain all required information.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>Object</em> </td><td>the Object which will hold the resource </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ResourceType</em> </td><td>the type of the resource </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ResourceFile</em> </td><td>the file or URL, where the resource can be located </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ContentType</em> </td><td>the mime type of the content </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ProtocolInfo</em> </td><td>the protocol information of the resource </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the newly created resource </dd></dl>
</div>
</div><p>
<a class="anchor" name="a633cef46d5cae9aecec05ea28d7c14e"></a><!-- doxytag: member="cUPnPResourceMediator::saveResource" ref="a633cef46d5cae9aecec05ea28d7c14e" args="(cUPnPResource *Resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int cUPnPResourceMediator::saveResource </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classcUPnPResource.html">cUPnPResource</a> * </td>
<td class="paramname"> <em>Resource</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Saves the resource<p>
This updates the information in the database with those in the resource object<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>Resource</em> </td><td>the resource which shall be saved </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns<ul>
<li><b><code>0</code>,</b> if saving was successful</li><li><b><code><0</code>,</b> if an error occured </li></ul>
</dd></dl>
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li>database/<a class="el" href="resources_8h-source.html">resources.h</a><li>database/resources.cpp</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Nov 8 15:44:09 2009 for UPnP/DLNA plugin for VDR by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>
|