18 #ifndef _AVTRANSPORT_HXX_INCLUDED_ 19 #define _AVTRANSPORT_HXX_INCLUDED_ 23 #include "libupnpp/control/cdircontent.hxx" 24 #include "libupnpp/control/service.hxx" 30 class UPnPServiceDesc;
32 typedef std::shared_ptr<AVTransport> AVTH;
48 int setAVTransportURI(
const std::string& uri,
const std::string& metadata,
51 return setURI(uri, metadata, instanceID,
false);
54 int setNextAVTransportURI(
const std::string& uri,
const std::string& md,
57 return setURI(uri, md, instanceID,
true);
61 enum PlayMode {PM_Unknown, PM_Normal, PM_Shuffle, PM_RepeatOne,
62 PM_RepeatAll, PM_Random, PM_Direct1
64 int setPlayMode(PlayMode pm,
int instanceID=0);
73 std::string pbstoragemed;
74 std::string rcstoragemed;
77 int getMediaInfo(
MediaInfo& info,
int instanceID=0);
79 enum TransportState {Unknown, Stopped, Playing, Transitioning,
80 PausedPlayback, PausedRecording, Recording,
83 enum TransportStatus {TPS_Unknown, TPS_Ok, TPS_Error};
85 TransportState tpstate;
86 TransportStatus tpstatus;
101 int getPositionInfo(
PositionInfo& info,
int instanceID=0);
104 std::string playmedia;
105 std::string recmedia;
106 std::string recqualitymodes;
112 std::string recqualitymode;
116 int stop(
int instanceID=0);
117 int pause(
int instanceID=0);
118 int play(
int speed = 1,
int instanceID = 0);
120 enum SeekMode {SEEK_TRACK_NR, SEEK_ABS_TIME, SEEK_REL_TIME, SEEK_ABS_COUNT,
121 SEEK_REL_COUNT, SEEK_CHANNEL_FREQ, SEEK_TAPE_INDEX,
125 int seek(SeekMode mode,
int target,
int instanceID=0);
129 int next(
int instanceID=0);
130 int previous(
int instanceID=0);
132 enum TransportActions {TPA_Next = 1, TPA_Pause = 2, TPA_Play = 4,
133 TPA_Previous = 8, TPA_Seek = 16, TPA_Stop = 32
135 int getCurrentTransportActions(
int& actions,
int instanceID=0);
138 static bool isAVTService(
const std::string& st);
139 virtual bool serviceTypeMatch(
const std::string& tp);
143 static const std::string SType;
145 int setURI(
const std::string& uri,
const std::string& metadata,
146 int instanceID,
bool next);
147 int CTAStringToBits(
const std::string& actions,
int& iacts);
150 void UPNPP_LOCAL evtCallback(
151 const std::unordered_map<std::string, std::string>&);
152 void UPNPP_LOCAL registerCallback();
Definition: service.hxx:82
Definition: avtransport.hxx:103
Definition: avtransport.hxx:91
AVTransport Service client class.
Definition: avtransport.hxx:38
Definition: avtransport.hxx:110
Data holder for a UPnP service, parsed from the device XML description.
Definition: description.hxx:46
UPnP Media Server directory entry, converted from XML data.
Definition: cdircontent.hxx:62
Data holder for a UPnP device, parsed from the XML description obtained during discovery.
Definition: description.hxx:142
AVTransport(const UPnPDeviceDesc &dev, const UPnPServiceDesc &srv)
Construct by copying data from device and service objects.
Definition: avtransport.hxx:42
UPnP Description phase: interpreting the device description which we downloaded from the URL obtained...
Definition: avlastchg.cxx:27
Definition: avtransport.hxx:84