14#include <QNetworkInterface>
40 LOG(VB_UPNP, LOG_DEBUG,
"UPnp - Constructor");
60 LOG(VB_UPNP, LOG_DEBUG,
"UPnp - Destructor");
78 if (sList.contains(QHostAddress(QHostAddress::AnyIPv4)))
80 sList.removeAll(QHostAddress(QHostAddress::AnyIPv4));
81 sList.removeAll(QHostAddress(QHostAddress::AnyIPv6));
82 sList.append(QNetworkInterface::allAddresses());
84 return Initialize( sList, nServicePort, pHttpServer );
93 LOG(VB_UPNP, LOG_DEBUG,
"UPnp::Initialize - Begin");
97 LOG(VB_GENERAL, LOG_ERR,
98 "UPnp::Initialize - Already initialized, programmer error.");
105 LOG(VB_GENERAL, LOG_ERR,
106 "UPnp::Initialize - Invalid Parameter (pHttpServer == NULL)");
120 if ((
g_IPAddrList[it].protocol() == QAbstractSocket::IPv4Protocol
122 ||(
g_IPAddrList[it].protocol() == QAbstractSocket::IPv6Protocol
136 LOG(VB_UPNP, LOG_DEBUG,
"UPnp::Initialize - End");
147 LOG(VB_UPNP, LOG_DEBUG,
"UPnp::Start - Enabling SSDP Notifications");
155 LOG(VB_UPNP, LOG_DEBUG,
"UPnp::Start - Returning");
164 LOG(VB_UPNP, LOG_INFO,
"UPnp::CleanUp() - disabling SSDP notifications");
QString GetSharePath(void) const
void RegisterExtension(HttpServerExtension *pExtension)
bool GetBoolSetting(const QString &key, bool defaultval=false)
void WokeUp(std::chrono::seconds SecondsAsleep)
void WillSuspend(std::chrono::milliseconds MilliSeconds=0ms)
static MythPower * AcquireRelease(void *Reference, bool Acquire, std::chrono::seconds MinimumDelay=0s)
void WillShutDown(std::chrono::milliseconds MilliSeconds=0ms)
void WillRestart(std::chrono::milliseconds MilliSeconds=0ms)
void EnableNotifications(int nServicePort)
void DisableNotifications()
static QList< QHostAddress > DefaultListen(void)
static UPnpDeviceDesc * Retrieve(QString &sURL)
static QList< QHostAddress > g_IPAddrList
static UPnpDeviceDesc * GetDeviceDesc(QString &sURL)
HttpServer * m_pHttpServer
static void DisableNotifications(std::chrono::milliseconds)
bool Initialize(int nServicePort, HttpServer *pHttpServer)
static UPnpDeviceDesc g_UPnpDeviceDesc
void EnableNotificatins(std::chrono::milliseconds) const
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)