libupnpp  0.16.0
A C++ wrapper for the Portable UPnP reference library
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
UPnPClient::AVTransport Class Reference

AVTransport Service client class. More...

#include <avtransport.hxx>

Inheritance diagram for UPnPClient::AVTransport:
UPnPClient::Service

Classes

struct  DeviceCapabilities
 
struct  MediaInfo
 
struct  PositionInfo
 
struct  TransportInfo
 
struct  TransportSettings
 

Public Types

enum  PlayMode {
  PM_Unknown, PM_Normal, PM_Shuffle, PM_RepeatOne,
  PM_RepeatAll, PM_Random, PM_Direct1
}
 
enum  TransportState {
  Unknown, Stopped, Playing, Transitioning,
  PausedPlayback, PausedRecording, Recording, NoMediaPresent
}
 
enum  TransportStatus { TPS_Unknown, TPS_Ok, TPS_Error }
 
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  TransportActions {
  TPA_Next = 1, TPA_Pause = 2, TPA_Play = 4, TPA_Previous = 8,
  TPA_Seek = 16, TPA_Stop = 32
}
 

Public Member Functions

 AVTransport (const UPnPDeviceDesc &dev, const UPnPServiceDesc &srv)
 Construct by copying data from device and service objects. More...
 
int setAVTransportURI (const std::string &uri, const std::string &metadata, int instanceID=0)
 
int setNextAVTransportURI (const std::string &uri, const std::string &md, int instanceID=0)
 
int setPlayMode (PlayMode pm, int instanceID=0)
 
int getMediaInfo (MediaInfo &info, int instanceID=0)
 
int getTransportInfo (TransportInfo &info, int instanceID=0)
 
int getPositionInfo (PositionInfo &info, int instanceID=0)
 
int getDeviceCapabilities (DeviceCapabilities &info, int instanceID=0)
 
int getTransportSettings (TransportSettings &info, int instanceID=0)
 
int stop (int instanceID=0)
 
int pause (int instanceID=0)
 
int play (int speed=1, int instanceID=0)
 
int seek (SeekMode mode, int target, int instanceID=0)
 
int next (int instanceID=0)
 
int previous (int instanceID=0)
 
int getCurrentTransportActions (int &actions, int instanceID=0)
 
virtual bool serviceTypeMatch (const std::string &tp)
 Perform a comparison to the service type string for this specific service. More...
 
- Public Member Functions inherited from UPnPClient::Service
 Service (const UPnPDeviceDesc &device, const UPnPServiceDesc &service)
 Construct by copying data from device and service objects. More...
 
 Service ()
 Empty object. More...
 
bool initFromDescription (const UPnPDeviceDesc &description)
 Initialize empty object from device description. More...
 
virtual bool reSubscribe ()
 Restart the subscription to get all the State variable values, in case we get the events before we are ready (e.g. More...
 
const std::string & getFriendlyName () const
 Accessors for the values extracted from the device description during initialization.
 
const std::string & getDeviceId () const
 
const std::string & getServiceType () const
 
const std::string & getActionURL () const
 
const std::string & getModelName () const
 
const std::string & getManufacturer () const
 
virtual int runAction (const UPnPP::SoapOutgoing &args, UPnPP::SoapIncoming &data)
 Call Soap action and return resulting data. More...
 
int runTrivialAction (const std::string &actionName)
 Run trivial action where there are neither input parameters nor return data (beyond the status)
 
template<class T >
int runSimpleGet (const std::string &actnm, const std::string &valnm, T *valuep)
 Run action where there are no input parameters and a single named value is to be retrieved from the result.
 
template<class T >
int runSimpleAction (const std::string &actnm, const std::string &valnm, T value)
 Run action with a single input parameter and no return data.
 
virtual VarEventReportergetReporter ()
 Get pointer to installed event reporter. More...
 
virtual void installReporter (VarEventReporter *reporter)
 Install or uninstall event data reporter object. More...
 

Static Public Member Functions

static bool isAVTService (const std::string &st)
 Test service type from discovery message.
 

Protected Member Functions

int setURI (const std::string &uri, const std::string &metadata, int instanceID, bool next)
 
int CTAStringToBits (const std::string &actions, int &iacts)
 
- Protected Member Functions inherited from UPnPClient::Service
virtual bool serviceInit (const UPnPDeviceDesc &, const UPnPServiceDesc &)
 Service-specific part of initialization. More...
 
bool registerCallback (evtCBFunc c)
 Used by a derived class to register its callback method. More...
 
void unregisterCallback ()
 Cancel subscription to the service events, forget installed callback.
 

Static Protected Attributes

static const std::string SType
 

Detailed Description

AVTransport Service client class.

Constructor & Destructor Documentation

◆ AVTransport()

UPnPClient::AVTransport::AVTransport ( const UPnPDeviceDesc dev,
const UPnPServiceDesc srv 
)
inline

Construct by copying data from device and service objects.

Member Function Documentation

◆ serviceTypeMatch()

bool UPnPClient::AVTransport::serviceTypeMatch ( const std::string &  tp)
virtual

Perform a comparison to the service type string for this specific service.

This allows embedding knowledge of the service type string inside the derived class. It is used, e.g., by initFromDescription() to look up an appropriate entry from the device description service list. Can also be used by external code wishing to do the same.

Parameters
tpService type string to be compared with the one for the derived class.

Implements UPnPClient::Service.


The documentation for this class was generated from the following files: