25    result += xml.
printNodeBeginNl(
"scpd", 
"xmlns=\"urn:schemas-upnp-org:service-1-0\"");
 
   38    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
   44    result += xml.
printNode(
"name", 
"SetRecordQualityMode");
 
   46    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
   47    result += xml.
printArgument(
"NewRecordQualityMode", 
"in", 
"CurrentRecordQualityMode");
 
   55    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
   61    result += xml.
printNode(
"name", 
"GetPositionInfo");
 
   63    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
   65    result += xml.
printArgument(
"TrackDuration", 
"out", 
"CurrentTrackDuration");
 
   66    result += xml.
printArgument(
"TrackMetaData", 
"out", 
"CurrentTrackMetaData");
 
   67    result += xml.
printArgument(
"TrackURI", 
"out", 
"CurrentTrackURI");
 
   68    result += xml.
printArgument(
"RelTime", 
"out", 
"RelativeTimePosition");
 
   69    result += xml.
printArgument(
"AbsTime", 
"out", 
"AbsoluteTimePosition");
 
   70    result += xml.
printArgument(
"RelCount", 
"out", 
"RelativeCounterPosition");
 
   71    result += xml.
printArgument(
"AbsCount", 
"out", 
"AbsoluteCounterPosition");
 
   77    result += xml.
printNode(
"name", 
"SetPlayMode");
 
   79    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
   80    result += xml.
printArgument(
"NewPlayMode", 
"in", 
"CurrentPlayMode");
 
   88    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
   89    result += xml.
printArgument(
"Speed", 
"in", 
"TransportPlaySpeed");
 
   95    result += xml.
printNode(
"name", 
"GetDeviceCapabilities");
 
   97    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
   98    result += xml.
printArgument(
"PlayMedia", 
"out", 
"PossiblePlaybackStorageMedia");
 
   99    result += xml.
printArgument(
"RecMedia", 
"out", 
"PossibleRecordStorageMedia");
 
  100    result += xml.
printArgument(
"RecQualityModes", 
"out", 
"PossibleRecordQualityModes");
 
  106    result += xml.
printNode(
"name", 
"GetMediaInfo");
 
  108    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
  109    result += xml.
printArgument(
"NrTracks", 
"out", 
"NumberOfTracks");
 
  110    result += xml.
printArgument(
"MediaDuration", 
"out", 
"CurrentMediaDuration");
 
  111    result += xml.
printArgument(
"CurrentURI", 
"out", 
"AVTransportURI");
 
  112    result += xml.
printArgument(
"CurrentURIMetaData", 
"out", 
"AVTransportURIMetaData");
 
  113    result += xml.
printArgument(
"NextURI", 
"out", 
"NextAVTransportURI");
 
  114    result += xml.
printArgument(
"NextURIMetaData", 
"out", 
"NextAVTransportURIMetaData");
 
  115    result += xml.
printArgument(
"PlayMedium", 
"out", 
"PlaybackStorageMedium");
 
  116    result += xml.
printArgument(
"RecordMedium", 
"out", 
"RecordStorageMedium");
 
  117    result += xml.
printArgument(
"WriteStatus", 
"out", 
"RecordMediumWriteStatus");
 
  125    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
  131    result += xml.
printNode(
"name", 
"Previous");
 
  133    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_INSTANCEID");
 
  139    result += xml.
printNode(
"name", 
"GetTransportInfo");
 
  141    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_INSTANCEID");
 
  142    result += xml.
printArgument(
"CurrentTransportState", 
"out", 
"TransportState");
 
  143    result += xml.
printArgument(
"CurrentTransportStatus", 
"out", 
"TransportStatus");
 
  144    result += xml.
printArgument(
"CurrentSpeed", 
"out", 
"TransportPlaySpeed");
 
  150    result += xml.
printNode(
"name", 
"Record");
 
  152    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_INSTANCEID");
 
  158    result += xml.
printNode(
"name", 
"SetAVTransportURI");
 
  160    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_INSTANCEID");
 
  161    result += xml.
printArgument(
"CurrentURI", 
"in", 
"AVTransportURI");
 
  162    result += xml.
printArgument(
"CurrentURIMetaData", 
"in", 
"AVTransportURIMetaData");
 
  168    result += xml.
printNode(
"name", 
"GetTransportSettings");
 
  170    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_INSTANCEID");
 
  171    result += xml.
printArgument(
"PlayMode", 
"out", 
"CurrentPlayMode");
 
  172    result += xml.
printArgument(
"RecQualityMode", 
"out", 
"CurrentRecordQualityMode");
 
  178    result += xml.
printNode(
"name", 
"GetCurrentTransportActions");
 
  180    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_INSTANCEID");
 
  181    result += xml.
printArgument(
"Actions", 
"out", 
"CurrentTransportActions");
 
  189    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_INSTANCEID");
 
  190    result += xml.
printArgument(
"Unit", 
"in", 
"A_ARG_TYPE_SeekMode");
 
  191    result += xml.
printArgument(
"Target", 
"in", 
"A_ARG_TYPE_SeekTarget");
 
  201    result += xml.
printNode(
"name", 
"AbsoluteTimePosition");
 
  202    result += xml.
printNode(
"dataType", 
"string");
 
  206    result += xml.
printNode(
"name", 
"CurrentTrackURI");
 
  207    result += xml.
printNode(
"dataType", 
"string");
 
  211    result += xml.
printNode(
"name", 
"CurrentTrackMetaData");
 
  212    result += xml.
printNode(
"dataType", 
"string");
 
  213    result += xml.
printNode(
"defaultValue", 
"NOT_IMPLEMENTED");
 
  217    result += xml.
printNode(
"name", 
"RelativeCounterPosition");
 
  218    result += xml.
printNode(
"dataType", 
"i4");
 
  219    result += xml.
printNode(
"defaultValue", 2147483647);
 
  223    result += xml.
printNode(
"name", 
"AVTransportURIMetaData");
 
  224    result += xml.
printNode(
"dataType", 
"string");
 
  225    result += xml.
printNode(
"defaultValue", 
"NOT_IMPLEMENTED");
 
  229    result += xml.
printNode(
"name", 
"TransportStatus");
 
  230    result += xml.
printNode(
"dataType", 
"string");
 
  232    result += xml.
printNode(
"allowedValue", 
"OK");
 
  233    result += xml.
printNode(
"allowedValue", 
"ERROR_OCCURED");
 
  234    result += xml.
printNode(
"allowedValue", 
"CUSTOM");
 
  239    result += xml.
printNode(
"name", 
"TransportState");
 
  240    result += xml.
printNode(
"dataType", 
"string");
 
  242    result += xml.
printNode(
"allowedValue", 
"STOPPED");
 
  243    result += xml.
printNode(
"allowedValue", 
"PLAYING");
 
  244    result += xml.
printNode(
"allowedValue", 
"TRANSITIONING");
 
  245    result += xml.
printNode(
"allowedValue", 
"PAUSED_PLAYBACK");
 
  246    result += xml.
printNode(
"allowedValue", 
"PAUSED_RECORDING");
 
  247    result += xml.
printNode(
"allowedValue", 
"RECORDING");
 
  248    result += xml.
printNode(
"allowedValue", 
"NO_MEDIA_PRESENT");
 
  249    result += xml.
printNode(
"allowedValue", 
"CUSTOM");
 
  254    result += xml.
printNode(
"name", 
"CurrentTrack");
 
  255    result += xml.
printNode(
"dataType", 
"ui4");
 
  256    result += xml.
printNode(
"defaultValue", 0);
 
  260    result += xml.
printNode(
"name", 
"NextAVTransportURIMetaData");
 
  261    result += xml.
printNode(
"dataType", 
"string");
 
  262    result += xml.
printNode(
"defaultValue", 
"NOT_IMPLEMENTED");
 
  267    result += xml.
printNode(
"name", 
"PlaybackStorageMedium");
 
  268    result += xml.
printNode(
"dataType", 
"string");
 
  269    result += xml.
printNode(
"defaultValue", 
"NETWORK");
 
  271    const char* playbackValues[] = {
"UNKNOWN",
"DV",
"MINI-DV",
"VHS",
"W-VHS",
"S-VHS",
"D-VHS",
"VHSC",
"VIDEO8",
"HI8",
"CD-ROM",
"CD-DA",
"CD-R",
"CD-RW",
"VIDEO-CD",
"SACD",
"M-AUDIO",
"MD-PICTURE",
"DVD-ROM",
"DVD-VIDEO",
"DVD-R",
"DVD+RW",
"DVD-RW",
"DVD-RAM",
"DVD-AUDIO",
"DAT",
"LD",
"HDD",
"MICRO_MV",
"NETWORK",
"NONE",
"NOT_IMPLEMENTED",
"VENDOR_SPECIFIC"};
 
  272    for (
size_t i = 0; i < 
sizeof(playbackValues)/
sizeof(playbackValues[0]); ++i) {
 
  273      result += xml.
printNode(
"allowedValue", playbackValues[i]);
 
  279    result += xml.
printNode(
"name", 
"PossibleRecordQualityModes");
 
  280    result += xml.
printNode(
"dataType", 
"string");
 
  281    result += xml.
printNode(
"defaultValue", 
"NOT_IMPLEMENTED");
 
  285    result += xml.
printNode(
"name", 
"NumberOfTracks");
 
  286    result += xml.
printNode(
"dataType", 
"ui4");
 
  287    result += xml.
printNode(
"defaultValue", 0);
 
  291    result += xml.
printNode(
"name", 
"CurrentMediaDuration");
 
  292    result += xml.
printNode(
"dataType", 
"string");
 
  293    result += xml.
printNode(
"defaultValue", 
"00:00:00");
 
  297    result += xml.
printNode(
"name", 
"A_ARG_TYPE_SeekTarget");
 
  298    result += xml.
printNode(
"dataType", 
"string");
 
  302    result += xml.
printNode(
"name", 
"NextAVTransportURI");
 
  303    result += xml.
printNode(
"dataType", 
"string");
 
  304    result += xml.
printNode(
"defaultValue", 
"NOT_IMPLEMENTED");
 
  309    result += xml.
printNode(
"name", 
"RecordStorageMedium");
 
  310    result += xml.
printNode(
"dataType", 
"string");
 
  311    result += xml.
printNode(
"defaultValue", 
"NOT_IMPLEMENTED");
 
  313    for (
size_t i = 0; i < 
sizeof(playbackValues)/
sizeof(playbackValues[0]); ++i) {
 
  314      result += xml.
printNode(
"allowedValue", playbackValues[i]);
 
  320    result += xml.
printNode(
"name", 
"AVTransportURI");
 
  321    result += xml.
printNode(
"dataType", 
"string");
 
  325    result += xml.
printNode(
"name", 
"TransportPlaySpeed");
 
  326    result += xml.
printNode(
"dataType", 
"string");
 
  327    result += xml.
printNode(
"defaultValue", 
"1");
 
  331    result += xml.
printNode(
"name", 
"AbsoluteCounterPosition");
 
  332    result += xml.
printNode(
"dataType", 
"i4");
 
  333    result += xml.
printNode(
"defaultValue", 2147483647);
 
  337    result += xml.
printNode(
"name", 
"RelativeTimePosition");
 
  338    result += xml.
printNode(
"dataType", 
"string");
 
  342    result += xml.
printNode(
"name", 
"CurrentTrackDuration");
 
  343    result += xml.
printNode(
"dataType", 
"string");
 
  347    result += xml.
printNode(
"name", 
"CurrentPlayMode");
 
  348    result += xml.
printNode(
"dataType", 
"string");
 
  349    result += xml.
printNode(
"defaultValue", 
"NORMAL");
 
  351    result += xml.
printNode(
"allowedValue", 
"NORMAL");
 
  352    result += xml.
printNode(
"allowedValue", 
"SHUFFLE");
 
  353    result += xml.
printNode(
"allowedValue", 
"REPEAT_ONE");
 
  354    result += xml.
printNode(
"allowedValue", 
"REPEAT_ALL");
 
  355    result += xml.
printNode(
"allowedValue", 
"RANDOM");
 
  356    result += xml.
printNode(
"allowedValue", 
"DIRECT_1");
 
  357    result += xml.
printNode(
"allowedValue", 
"INTRO");
 
  362    result += xml.
printNode(
"name", 
"PossiblePlaybackStorageMedia");
 
  363    result += xml.
printNode(
"dataType", 
"string");
 
  364    result += xml.
printNode(
"defaultValue", 
"NETWORK");
 
  368    result += xml.
printNode(
"name", 
"A_ARG_TYPE_InstanceID");
 
  369    result += xml.
printNode(
"dataType", 
"ui4");
 
  374    result += xml.
printNode(
"name", 
"CurrentRecordQualityMode");
 
  375    result += xml.
printNode(
"dataType", 
"string");
 
  376    result += xml.
printNode(
"defaultValue", 
"NOT_IMPLEMENTED");
 
  378    result += xml.
printNode(
"allowedValue", 
"0:EP");
 
  379    result += xml.
printNode(
"allowedValue", 
"1:LP");
 
  380    result += xml.
printNode(
"allowedValue", 
"2:SP");
 
  381    result += xml.
printNode(
"allowedValue", 
"0:BASIC");
 
  382    result += xml.
printNode(
"allowedValue", 
"1:MEDIUM");
 
  383    result += xml.
printNode(
"allowedValue", 
"2:HIGH");
 
  384    result += xml.
printNode(
"allowedValue", 
"NOT_IMPLEMENTED");
 
  390    result += xml.
printNode(
"name", 
"RecordMediumWriteStatus");
 
  391    result += xml.
printNode(
"dataType", 
"string");
 
  392    result += xml.
printNode(
"defaultValue", 
"NOT_IMPLEMENTED");
 
  394    result += xml.
printNode(
"allowedValue", 
"WRITABLE");
 
  395    result += xml.
printNode(
"allowedValue", 
"PROTECTED");
 
  396    result += xml.
printNode(
"allowedValue", 
"NOT_WRITABLE");
 
  397    result += xml.
printNode(
"allowedValue", 
"UNKNOWN");
 
  398    result += xml.
printNode(
"allowedValue", 
"NOT_IMPLEMENTED");
 
  403    result += xml.
printNode(
"name", 
"CurrentTransportActions");
 
  404    result += xml.
printNode(
"dataType", 
"string");
 
  409    result += xml.
printNode(
"name", 
"A_ARG_TYPE_SeekMode");
 
  410    result += xml.
printNode(
"dataType", 
"string");
 
  412    result += xml.
printNode(
"allowedValue", 
"TRACK_NR");
 
  413    result += xml.
printNode(
"allowedValue", 
"ABS_TIME");
 
  414    result += xml.
printNode(
"allowedValue", 
"REL_TIME");
 
  415    result += xml.
printNode(
"allowedValue", 
"ABS_COUNT");
 
  416    result += xml.
printNode(
"allowedValue", 
"REL_COUNT");
 
  417    result += xml.
printNode(
"allowedValue", 
"CHANNEL_FREQ");
 
  418    result += xml.
printNode(
"allowedValue", 
"TAPE-INDEX");
 
  419    result += xml.
printNode(
"allowedValue", 
"FRAME");
 
  424    result += xml.
printNode(
"name", 
"PossibleRecordStorageMedia");
 
  425    result += xml.
printNode(
"dataType", 
"string");
 
  426    result += xml.
printNode(
"defaultValue", 
"NOT_IMPLEMENTED");
 
  430    result += xml.
printNode(
"name", 
"LastChange");
 
  431    result += xml.
printNode(
"dataType", 
"string");
 
  457    result += xml.
printNodeBeginNl(
"scpd", 
"xmlns=\"urn:schemas-upnp-org:service-1-0\"");
 
  468    result += xml.
printNode(
"name", 
"GetMute");
 
  470    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
  471    result += xml.
printArgument(
"Channel", 
"in", 
"A_ARG_TYPE_Channel");
 
  477    result += xml.
printNode(
"name", 
"GetVolume");
 
  479    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
  480    result += xml.
printArgument(
"Channel", 
"in", 
"A_ARG_TYPE_Channel");
 
  481    result += xml.
printArgument(
"CurrentVolume", 
"out", 
"Volume");
 
  487    result += xml.
printNode(
"name", 
"SetVolume");
 
  489    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_InstanceID");
 
  490    result += xml.
printArgument(
"Channel", 
"in", 
"A_ARG_TYPE_Channel");
 
  491    result += xml.
printArgument(
"DesiredVolume", 
"in", 
"Volume");
 
  497    result += xml.
printNode(
"name", 
"SetMute");
 
  499    result += xml.
printArgument(
"InstanceID", 
"in", 
"A_ARG_TYPE_INSTANCEID");
 
  500    result += xml.
printArgument(
"Channel", 
"in", 
"A_ARG_TYPE_Channel");
 
  511    result += xml.
printNode(
"name", 
"A_ARG_TYPE_PresetName");
 
  512    result += xml.
printNode(
"dataType", 
"string");
 
  514    result += xml.
printNode(
"allowedValue", 
"FactoryDefault");
 
  520    result += xml.
printNode(
"name", 
"Volume");
 
  521    result += xml.
printNode(
"dataType", 
"ui2");
 
  533    result += xml.
printNode(
"name", 
"A_ARG_TYPE_Channel");
 
  534    result += xml.
printNode(
"dataType", 
"string");
 
  536    result += xml.
printNode(
"allowedValue", 
"Master");
 
  566    result += xml.
printNodeBeginNl(
"scpd", 
"xmlns=\"urn:schemas-upnp-org:service-1-0\"");
 
  576    result += xml.
printNode(
"name", 
"GetCurrentConnectionIDs");
 
  578    result += xml.
printArgument(
"ConnectionIDs", 
"out", 
"CurrentConnectionIDs");
 
  583    result += xml.
printNode(
"name", 
"GetProtocolInfo");
 
  585    result += xml.
printArgument(
"Source", 
"out", 
"SourceProtocolInfo");
 
  586    result += xml.
printArgument(
"Sink", 
"out", 
"SinkProtocolInfo");
 
  591    result += xml.
printNode(
"name", 
"GetCurrentConnectionInfo");
 
  593    result += xml.
printArgument(
"ConnectionID", 
"in", 
"A_ARG_TYPE_ConnectionID");
 
  594    result += xml.
printArgument(
"RcsID", 
"out", 
"A_ARG_TYPE_RcsID");
 
  595    result += xml.
printArgument(
"AVTransportID", 
"out", 
"A_ARG_TYPE_AVTransportID");
 
  596    result += xml.
printArgument(
"ProtocolInfo", 
"out", 
"A_ARG_TYPE_ProtocolInfo");
 
  597    result += xml.
printArgument(
"PeerConnectionManager", 
"out", 
"A_ARG_TYPE_ConnectionManager");
 
  598    result += xml.
printArgument(
"PeerConnectionID", 
"out", 
"A_ARG_TYPE_ConnectionID");
 
  599    result += xml.
printArgument(
"Direction", 
"out", 
"A_ARG_TYPE_Direction");
 
  600    result += xml.
printArgument(
"Status", 
"out", 
"A_ARG_TYPE_ConnectionStatus");
 
  615    result += xml.
printNode(
"name", 
"A_ARG_TYPE_ConnectionStatus");
 
  616    result += xml.
printNode(
"dataType", 
"string");
 
  618    result += xml.
printNode(
"allowedValue", 
"OK");
 
  619    result += xml.
printNode(
"allowedValue", 
"ContentFormatMismatch");
 
  620    result += xml.
printNode(
"allowedValue", 
"InsufficientBandwidth");
 
  621    result += xml.
printNode(
"allowedValue", 
"UnreliableChannel");
 
  622    result += xml.
printNode(
"allowedValue", 
"Unknown");
 
  628    result += xml.
printNode(
"name", 
"A_ARG_TYPE_Direction");
 
  629    result += xml.
printNode(
"dataType", 
"string");
 
  631    result += xml.
printNode(
"allowedValue", 
"Output");
 
  632    result += xml.
printNode(
"allowedValue", 
"Input");
 
Abstract DLNA Descriptor Generation.
Definition: DLNADescr.h:9
 
Definition: AllocationTracker.h:9
 
Functions to efficiently output XML. XML data contains a lot of redundancy so it is more memory effic...
Definition: XMLPrinter.h:55
 
size_t printNodeBeginNl(const char *node, const char *attributes=nullptr, const char *ns=nullptr)
Prints the beginning of an XML node and a newline.
Definition: XMLPrinter.h:274
 
size_t printNode(XMLNode node)
Prints an XML node from XMLNode struct.
Definition: XMLPrinter.h:88
 
size_t printNodeEnd(const char *node, const char *ns=nullptr)
Prints the end of an XML node.
Definition: XMLPrinter.h:287
 
size_t printArgument(const char *name, const char *direction, const char *relatedStateVariable=nullptr)
Helper to print a UPnP <argument> element with name, direction and optional relatedStateVariable.
Definition: XMLPrinter.h:202
 
size_t printXMLHeader()
Prints the XML header.
Definition: XMLPrinter.h:78
 
size_t printStateVariable(const char *name, const char *dataType, bool sendEvents=false, std::function< void()> extra=nullptr)
Helper to print a UPnP <stateVariable> element with name, dataType and optional sendEvents attribute ...
Definition: XMLPrinter.h:224