Arduino DLNA Server
Loading...
Searching...
No Matches
src
dlna
devices
MediaRenderer
mr_conmgr.h
Go to the documentation of this file.
1
#pragma once
2
138
#include "
dlna/xml/XMLPrinter.h
"
139
140
static
void
mr_connmgr_xml_printer(Print& out) {
141
using
tiny_dlna::XMLPrinter
;
142
XMLPrinter xml(out);
143
xml.printXMLHeader();
144
xml.printNodeBeginNl(
"scpd"
,
"xmlns=\"urn:schemas-upnp-org:service-1-0\""
);
145
146
xml.printNodeBeginNl(
"specVersion"
);
147
xml.printNode(
"major"
, 1);
148
xml.printNode(
"minor"
, 0);
149
xml.printNodeEnd(
"specVersion"
);
150
151
// actionList
152
xml.printNodeBeginNl(
"actionList"
);
153
154
xml.printNodeBeginNl(
"action"
);
155
xml.printNode(
"name"
,
"GetProtocolInfo"
);
156
xml.printNodeBeginNl(
"argumentList"
);
157
xml.printArgument(
"Source"
,
"out"
,
"SourceProtocolInfo"
);
158
xml.printArgument(
"Sink"
,
"out"
,
"SinkProtocolInfo"
);
159
xml.printNodeEnd(
"argumentList"
);
160
xml.printNodeEnd(
"action"
);
161
162
xml.printNodeBeginNl(
"action"
);
163
xml.printNode(
"name"
,
"GetCurrentConnectionIDs"
);
164
xml.printNodeBeginNl(
"argumentList"
);
165
xml.printNodeBeginNl(
"argument"
);
166
xml.printNode(
"name"
,
"ConnectionIDs"
);
167
xml.printNode(
"direction"
,
"out"
);
168
xml.printNode(
"relatedStateVariable"
,
"CurrentConnectionIDs"
);
169
xml.printNodeEnd(
"argument"
);
170
xml.printNodeEnd(
"argumentList"
);
171
xml.printNodeEnd(
"action"
);
172
173
xml.printNodeBeginNl(
"action"
);
174
xml.printNode(
"name"
,
"GetCurrentConnectionInfo"
);
175
xml.printNodeBeginNl(
"argumentList"
);
176
xml.printArgument(
"ConnectionID"
,
"in"
,
"A_ARG_TYPE_ConnectionID"
);
177
xml.printArgument(
"RcsID"
,
"out"
,
"A_ARG_TYPE_RcsID"
);
178
xml.printArgument(
"AVTransportID"
,
"out"
,
"A_ARG_TYPE_AVTransportID"
);
179
xml.printArgument(
"ProtocolInfo"
,
"out"
,
"A_ARG_TYPE_ProtocolInfo"
);
180
xml.printArgument(
"PeerConnectionManager"
,
"out"
,
181
"A_ARG_TYPE_ConnectionManager"
);
182
xml.printArgument(
"PeerConnectionID"
,
"out"
,
"A_ARG_TYPE_ConnectionID"
);
183
xml.printArgument(
"Direction"
,
"out"
,
"A_ARG_TYPE_Direction"
);
184
xml.printArgument(
"Status"
,
"out"
,
"A_ARG_TYPE_ConnectionStatus"
);
185
xml.printNodeEnd(
"argumentList"
);
186
xml.printNodeEnd(
"action"
);
187
188
xml.printNodeEnd(
"actionList"
);
189
190
// serviceStateTable
191
xml.printNodeBeginNl(
"serviceStateTable"
);
192
193
xml.printStateVariable(
"SourceProtocolInfo"
,
"string"
,
false
);
194
xml.printStateVariable(
"SinkProtocolInfo"
,
"string"
,
false
);
195
xml.printStateVariable(
"CurrentConnectionIDs"
,
"string"
,
false
);
196
xml.printStateVariable(
"A_ARG_TYPE_ConnectionStatus"
,
"string"
,
false
, [&]() {
197
xml.printNodeBeginNl(
"allowedValueList"
);
198
xml.printNode(
"allowedValue"
,
"OK"
);
199
xml.printNode(
"allowedValue"
,
"ContentFormatMismatch"
);
200
xml.printNode(
"allowedValue"
,
"InsufficientBandwidth"
);
201
xml.printNode(
"allowedValue"
,
"UnreliableChannel"
);
202
xml.printNode(
"allowedValue"
,
"Unknown"
);
203
xml.printNodeEnd(
"allowedValueList"
);
204
});
205
xml.printStateVariable(
"A_ARG_TYPE_ConnectionManager"
,
"string"
,
false
);
206
xml.printStateVariable(
"A_ARG_TYPE_Direction"
,
"string"
,
false
, [&]() {
207
xml.printNodeBeginNl(
"allowedValueList"
);
208
xml.printNode(
"allowedValue"
,
"Input"
);
209
xml.printNode(
"allowedValue"
,
"Output"
);
210
xml.printNodeEnd(
"allowedValueList"
);
211
});
212
xml.printStateVariable(
"A_ARG_TYPE_ProtocolInfo"
,
"string"
,
false
);
213
xml.printStateVariable(
"A_ARG_TYPE_ConnectionID"
,
"i4"
,
false
);
214
xml.printStateVariable(
"A_ARG_TYPE_AVTransportID"
,
"i4"
,
false
);
215
xml.printStateVariable(
"A_ARG_TYPE_RcsID"
,
"i4"
,
false
);
216
217
xml.printNodeEnd(
"serviceStateTable"
);
218
219
xml.printNodeEnd(
"scpd"
);
220
}
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