Arduino DLNA Server
Loading...
Searching...
No Matches
src
dlna
devices
MediaRenderer
mr_transport.h
Go to the documentation of this file.
1
#pragma once
134
#include "
dlna/xml/XMLPrinter.h
"
135
136
static
void
mr_transport_xml_printer(Print& out) {
137
using
tiny_dlna::XMLPrinter
;
138
XMLPrinter xml(out);
139
xml.printXMLHeader();
140
xml.printNodeBeginNl(
"scpd"
,
"xmlns=\"urn:schemas-upnp-org:service-1-0\""
);
141
142
xml.printNodeBeginNl(
"specVersion"
);
143
xml.printNode(
"major"
, 1);
144
xml.printNode(
"minor"
, 0);
145
xml.printNodeEnd(
"specVersion"
);
146
147
xml.printNodeBeginNl(
"actionList"
);
148
149
// use xml.printArgument(name, direction, relatedStateVariable)
150
151
xml.printNodeBeginNl(
"action"
);
152
xml.printNode(
"name"
,
"SetAVTransportURI"
);
153
xml.printNodeBeginNl(
"argumentList"
);
154
xml.printArgument(
"InstanceID"
,
"in"
,
"A_ARG_TYPE_InstanceID"
);
155
xml.printArgument(
"CurrentURI"
,
"in"
,
"AVTransportURI"
);
156
xml.printArgument(
"CurrentURIMetaData"
,
"in"
,
"AVTransportURIMetaData"
);
157
xml.printNodeEnd(
"argumentList"
);
158
xml.printNodeEnd(
"action"
);
159
160
xml.printNodeBeginNl(
"action"
);
161
xml.printNode(
"name"
,
"Play"
);
162
xml.printNodeBeginNl(
"argumentList"
);
163
xml.printArgument(
"InstanceID"
,
"in"
,
"A_ARG_TYPE_InstanceID"
);
164
xml.printArgument(
"Speed"
,
"in"
,
"TransportPlaySpeed"
);
165
xml.printNodeEnd(
"argumentList"
);
166
xml.printNodeEnd(
"action"
);
167
168
xml.printNodeBeginNl(
"action"
);
169
xml.printNode(
"name"
,
"Pause"
);
170
xml.printNodeBeginNl(
"argumentList"
);
171
xml.printArgument(
"InstanceID"
,
"in"
,
"A_ARG_TYPE_InstanceID"
);
172
xml.printNodeEnd(
"argumentList"
);
173
xml.printNodeEnd(
"action"
);
174
175
xml.printNodeBeginNl(
"action"
);
176
xml.printNode(
"name"
,
"Stop"
);
177
xml.printNodeBeginNl(
"argumentList"
);
178
xml.printArgument(
"InstanceID"
,
"in"
,
"A_ARG_TYPE_InstanceID"
);
179
xml.printNodeEnd(
"argumentList"
);
180
xml.printNodeEnd(
"action"
);
181
182
xml.printNodeBeginNl(
"action"
);
183
xml.printNode(
"name"
,
"GetTransportInfo"
);
184
xml.printNodeBeginNl(
"argumentList"
);
185
xml.printArgument(
"InstanceID"
,
"in"
,
"A_ARG_TYPE_InstanceID"
);
186
xml.printArgument(
"CurrentTransportState"
,
"out"
,
"TransportState"
);
187
xml.printArgument(
"CurrentTransportStatus"
,
"out"
,
"TransportStatus"
);
188
xml.printArgument(
"CurrentSpeed"
,
"out"
,
"TransportPlaySpeed"
);
189
xml.printNodeEnd(
"argumentList"
);
190
xml.printNodeEnd(
"action"
);
191
192
xml.printNodeEnd(
"actionList"
);
193
194
xml.printNodeBeginNl(
"serviceStateTable"
);
195
196
xml.printNodeBeginNl(
"stateVariable"
,
"sendEvents=\"no\""
);
197
xml.printNode(
"name"
,
"AVTransportURI"
);
198
xml.printNode(
"dataType"
,
"string"
);
199
xml.printNodeEnd(
"stateVariable"
);
200
201
xml.printNodeBeginNl(
"stateVariable"
,
"sendEvents=\"no\""
);
202
xml.printNode(
"name"
,
"AVTransportURIMetaData"
);
203
xml.printNode(
"dataType"
,
"string"
);
204
xml.printNodeEnd(
"stateVariable"
);
205
206
xml.printNodeBeginNl(
"stateVariable"
,
"sendEvents=\"no\""
);
207
xml.printNode(
"name"
,
"TransportPlaySpeed"
);
208
xml.printNode(
"dataType"
,
"string"
);
209
xml.printNodeBeginNl(
"allowedValueList"
);
210
xml.printNode(
"allowedValue"
,
"1"
);
211
xml.printNodeEnd(
"allowedValueList"
);
212
xml.printNodeEnd(
"stateVariable"
);
213
214
xml.printNodeBeginNl(
"stateVariable"
,
"sendEvents=\"yes\""
);
215
xml.printNode(
"name"
,
"TransportState"
);
216
xml.printNode(
"dataType"
,
"string"
);
217
xml.printNodeBeginNl(
"allowedValueList"
);
218
xml.printNode(
"allowedValue"
,
"STOPPED"
);
219
xml.printNode(
"allowedValue"
,
"PAUSED_PLAYBACK"
);
220
xml.printNode(
"allowedValue"
,
"PLAYING"
);
221
xml.printNode(
"allowedValue"
,
"TRANSITIONING"
);
222
xml.printNode(
"allowedValue"
,
"NO_MEDIA_PRESENT"
);
223
xml.printNodeEnd(
"allowedValueList"
);
224
xml.printNodeEnd(
"stateVariable"
);
225
226
xml.printNodeBeginNl(
"stateVariable"
,
"sendEvents=\"no\""
);
227
xml.printNode(
"name"
,
"TransportStatus"
);
228
xml.printNode(
"dataType"
,
"string"
);
229
xml.printNodeBeginNl(
"allowedValueList"
);
230
xml.printNode(
"allowedValue"
,
"OK"
);
231
xml.printNode(
"allowedValue"
,
"ERROR_OCCURRED"
);
232
xml.printNodeEnd(
"allowedValueList"
);
233
xml.printNodeEnd(
"stateVariable"
);
234
235
xml.printNodeBeginNl(
"stateVariable"
,
"sendEvents=\"no\""
);
236
xml.printNode(
"name"
,
"A_ARG_TYPE_InstanceID"
);
237
xml.printNode(
"dataType"
,
"ui4"
);
238
xml.printNodeEnd(
"stateVariable"
);
239
240
xml.printNodeEnd(
"serviceStateTable"
);
241
242
xml.printNodeEnd(
"scpd"
);
243
}
XMLPrinter.h
tiny_dlna::XMLPrinter
Functions to efficiently output XML. XML data contains a lot of redundancy so it is more memory effic...
Definition:
XMLPrinter.h:54
Generated by
1.9.6