MythTV
master
|
#include <libmythupnp/ssdpcache.h>
Public Member Functions | |
SSDPCacheEntries () | |
void | Clear (void) |
Clears the cache of all entries. More... | |
uint | Count (void) const |
void | Insert (const QString &sUSN, DeviceLocation *pEntry) |
Inserts a device location into the cache. More... | |
void | Remove (const QString &sUSN) |
Removes a specific entry from the cache. More... | |
uint | RemoveStale (TaskTime ttNow) |
Removes expired cache entries, returning the number removed. More... | |
DeviceLocation * | Find (const QString &sUSN) |
Finds the Device in the cache, returns nullptr when absent. More... | |
DeviceLocation * | GetFirst (void) |
Returns random entry in cache, returns nullptr when list is empty. More... | |
void | GetEntryMap (EntryMap &map) |
Returns a copy of the EntryMap. More... | |
QTextStream & | OutputXML (QTextStream &os, uint *pnEntryCount=nullptr) const |
Outputs the XML for this service. More... | |
void | Dump (uint &nEntryCount) const |
Prints this service to the console in human readable form. More... | |
![]() | |
ReferenceCounter (const QString &debugName, bool logDebug=true) | |
Creates reference counter with an initial value of 1. More... | |
virtual int | IncrRef (void) |
Increments reference count. More... | |
virtual int | DecrRef (void) |
Decrements reference count and deletes on 0. More... | |
Static Public Member Functions | |
static QString | GetNormalizedUSN (const QString &sUSN) |
Returns a normalized USN, so that capitalization of the uuid is not an issue. More... | |
![]() | |
static void | PrintDebug (void) |
Print out any leaks if that level of debugging is enabled. More... | |
Static Public Attributes | |
static int | g_nAllocated = 0 |
Protected Member Functions | |
~SSDPCacheEntries () override | |
Destructor protected to enforce Release method usage. More... | |
![]() | |
virtual | ~ReferenceCounter (void) |
Called on destruction, will warn if object deleted with references in place. More... | |
Protected Attributes | |
QMutex | m_mutex |
EntryMap | m_mapEntries |
![]() | |
bool | m_logDebug |
This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More... | |
QAtomicInt | m_referenceCount {1} |
Definition at line 37 of file ssdpcache.h.
|
overrideprotected |
Destructor protected to enforce Release method usage.
Definition at line 39 of file ssdpcache.cpp.
SSDPCacheEntries::SSDPCacheEntries | ( | ) |
Definition at line 34 of file ssdpcache.cpp.
void SSDPCacheEntries::Clear | ( | void | ) |
Clears the cache of all entries.
Definition at line 46 of file ssdpcache.cpp.
Referenced by ~SSDPCacheEntries().
|
inline |
Definition at line 47 of file ssdpcache.h.
Referenced by SatIP::doUPNPsearch(), VBox::doUPNPSearch(), SatIP::findServers(), SSDPCache::Remove(), SSDPCache::RemoveStale(), and MythContext::Impl::UPnPautoconf().
void SSDPCacheEntries::Insert | ( | const QString & | sUSN, |
DeviceLocation * | pEntry | ||
) |
Inserts a device location into the cache.
Definition at line 99 of file ssdpcache.cpp.
Referenced by SSDPCache::Add().
void SSDPCacheEntries::Remove | ( | const QString & | sUSN | ) |
Removes a specific entry from the cache.
Definition at line 122 of file ssdpcache.cpp.
Referenced by SSDPCache::Remove().
Removes expired cache entries, returning the number removed.
Definition at line 145 of file ssdpcache.cpp.
Referenced by SSDPCache::RemoveStale().
DeviceLocation * SSDPCacheEntries::Find | ( | const QString & | sUSN | ) |
Finds the Device in the cache, returns nullptr when absent.
Definition at line 61 of file ssdpcache.cpp.
Referenced by SSDPCache::Add(), and SSDPCache::Find().
DeviceLocation * SSDPCacheEntries::GetFirst | ( | void | ) |
Returns random entry in cache, returns nullptr when list is empty.
Definition at line 75 of file ssdpcache.cpp.
Referenced by MythContext::Impl::UPnPautoconf().
void SSDPCacheEntries::GetEntryMap | ( | EntryMap & | map | ) |
Returns a copy of the EntryMap.
Definition at line 87 of file ssdpcache.cpp.
Referenced by SatIP::doUPNPsearch(), VBox::doUPNPSearch(), HttpStatus::FillStatusXML(), V2Status::FillStatusXML(), and BackendSelection::Init().
QTextStream & SSDPCacheEntries::OutputXML | ( | QTextStream & | os, |
uint * | pnEntryCount = nullptr |
||
) | const |
Outputs the XML for this service.
Definition at line 178 of file ssdpcache.cpp.
void SSDPCacheEntries::Dump | ( | uint & | nEntryCount | ) | const |
Prints this service to the console in human readable form.
Definition at line 202 of file ssdpcache.cpp.
|
static |
Returns a normalized USN, so that capitalization of the uuid is not an issue.
Definition at line 223 of file ssdpcache.cpp.
|
static |
Definition at line 65 of file ssdpcache.h.
Referenced by SSDPCache::Dump(), SSDPExtension::GetDeviceList(), SSDPCacheEntries(), and ~SSDPCacheEntries().
|
mutableprotected |
Definition at line 68 of file ssdpcache.h.
Referenced by Clear(), Dump(), Find(), GetEntryMap(), GetFirst(), Insert(), OutputXML(), Remove(), and RemoveStale().
|
protected |
Definition at line 69 of file ssdpcache.h.
Referenced by Clear(), Dump(), Find(), GetEntryMap(), GetFirst(), Insert(), OutputXML(), Remove(), and RemoveStale().