--- a/libupnpp/control/avtransport.hxx
+++ b/libupnpp/control/avtransport.hxx
@@ -46,14 +46,6 @@
AVTransport() {}
- enum TransportState {Unknown, Stopped, Playing, Transitioning,
- PausedPlayback, PausedRecording, Recording,
- NoMediaPresent};
- enum TransportStatus {TPS_Unknown, TPS_Ok, TPS_Error};
- enum PlayMode {PM_Unknown, PM_Normal, PM_Shuffle, PM_RepeatOne,
- PM_RepeatAll, PM_Random, PM_Direct1};
-
-
int setAVTransportURI(const std::string& uri, const std::string& metadata,
int instanceID=0)
{
@@ -66,6 +58,9 @@
return setURI(uri, md, instanceID, true);
}
+
+ enum PlayMode {PM_Unknown, PM_Normal, PM_Shuffle, PM_RepeatOne,
+ PM_RepeatAll, PM_Random, PM_Direct1};
int setPlayMode(PlayMode pm, int instanceID=0);
struct MediaInfo {
@@ -81,6 +76,10 @@
};
int getMediaInfo(MediaInfo& info, int instanceID=0);
+ enum TransportState {Unknown, Stopped, Playing, Transitioning,
+ PausedPlayback, PausedRecording, Recording,
+ NoMediaPresent};
+ enum TransportStatus {TPS_Unknown, TPS_Ok, TPS_Error};
struct TransportInfo {
TransportState tpstate;
TransportStatus tpstatus;
@@ -117,10 +116,9 @@
int pause(int instanceID=0);
int play(int speed = 1, int instanceID = 0);
- enum SeekMode {SEEK_TRACK_NR, SEEK_ABS_TIME,
- SEEK_REL_TIME, SEEK_ABS_COUNT,
- SEEK_REL_COUNT, SEEK_CHANNEL_FREQ,
- SEEK_TAPE_INDEX, SEEK_FRAME};
+ enum SeekMode {SEEK_TRACK_NR, SEEK_ABS_TIME, SEEK_REL_TIME, SEEK_ABS_COUNT,
+ SEEK_REL_COUNT, SEEK_CHANNEL_FREQ, SEEK_TAPE_INDEX,
+ SEEK_FRAME};
// Target in seconds for times.
int seek(SeekMode mode, int target, int instanceID=0);
@@ -129,7 +127,9 @@
int next(int instanceID=0);
int previous(int instanceID=0);
- int getCurrentTransportActions(std::string& actions, int instanceID=0);
+ enum TransportActions {TPA_Next = 1, TPA_Pause = 2, TPA_Play = 4,
+ TPA_Previous = 8, TPA_Seek = 16, TPA_Stop = 32};
+ int getCurrentTransportActions(int& actions, int instanceID=0);
/** Test service type from discovery message */
static bool isAVTService(const std::string& st);
@@ -138,6 +138,8 @@
static const std::string SType;
int setURI(const std::string& uri, const std::string& metadata,
int instanceID, bool next);
+ int CTAStringToBits(const std::string& actions, int& iacts);
+
private:
void evtCallback(const std::unordered_map<std::string, std::string>&);
void registerCallback();