18#ifndef _SERVICE_H_X_INCLUDED_
19#define _SERVICE_H_X_INCLUDED_
27#include "libupnpp/upnppexports.hxx"
28#include "libupnpp/log.hxx"
29#include "libupnpp/soaphelp.hxx"
30#include "libupnpp/upnperrcodes.hxx"
31#include "libupnpp/control/cdircontent.hxx"
59 virtual void changed(
const char *nm,
int val) = 0;
61 virtual void changed(
const char *nm,
const char *val) = 0;
66 virtual void changed(
const char * , std::vector<int> ) {}
79std::function<void (
const std::unordered_map<std::string, std::string>&)>
82enum ActionOptionsMask {AOM_TIMEOUTMS = 0x1};
84 uint32_t active_options{0};
124 virtual bool reSubscribe();
128 const std::string& getFriendlyName()
const;
129 const std::string& getDeviceId()
const;
130 const std::string& getServiceType()
const;
131 const std::string& getActionURL()
const;
132 const std::string& getModelName()
const;
133 const std::string& getManufacturer()
const;
146 int runTrivialAction(
const std::string& actionName,
ActionOptions *opts=
nullptr);
150 template <
class T>
int runSimpleGet(
const std::string& actnm,
151 const std::string& valnm,
155 template <
class T>
int runSimpleAction(
const std::string& actnm,
156 const std::string& valnm,
213 void unregisterCallback();
216 class UPNPP_LOCAL Internal;
217 Internal *m{
nullptr};
Definition service.hxx:88
virtual bool serviceTypeMatch(const std::string &tp)=0
Perform a comparison to the service type string for this specific service.
virtual bool serviceInit(const UPnPDeviceDesc &, const UPnPServiceDesc &)
Service-specific part of initialization.
Definition service.hxx:190
virtual void registerCallback()
This method will be called by installReporter() and should be overridden in classes which actually su...
Definition service.hxx:210
Data holder for a UPnP device, parsed from the XML description obtained during discovery.
Definition description.hxx:139
UPnP Media Server directory entry, converted from XML data.
Definition cdircontent.hxx:60
Data holder for a UPnP service, parsed from the device XML description.
Definition description.hxx:46
To be implemented by upper-level client code for event reporting.
Definition service.hxx:55
virtual void changed(const char *nm, const char *val)=0
Report change to named character string state variable.
virtual void autorenew_failed()
Subscription autorenew failed.
Definition service.hxx:69
virtual void changed(const char *, UPnPDirObject)
Report change to track metadata (parsed as as Content Directory entry).
Definition service.hxx:64
virtual void changed(const char *nm, int val)=0
Report change to named integer state variable.
virtual void changed(const char *, std::vector< int >)
Special for ohplaylist.
Definition service.hxx:66
Store incoming Soap data: device action input parameters, or response to CP.
Definition soaphelp.hxx:36
Store the values to be encoded in outgoing SOAP data: device response or CP args.
Definition soaphelp.hxx:88
UPnP Description phase: interpreting the device description which we downloaded from the URL obtained...
Definition avlastchg.cxx:28
std::function< void(const std::unordered_map< std::string, std::string > &)> evtCBFunc
Type of the event callbacks.
Definition service.hxx:80
Definition service.hxx:83