|
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 (std::chrono::microseconds 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... | |
Public Member Functions inherited from ReferenceCounter | |
| 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 Public Member Functions inherited from ReferenceCounter | |
| 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... | |
Protected Member Functions inherited from ReferenceCounter | |
| virtual | ~ReferenceCounter (void) |
| Called on destruction, will warn if object deleted with references in place. More... | |
Protected Attributes | |
| QMutex | m_mutex |
| EntryMap | m_mapEntries |
Protected Attributes inherited from ReferenceCounter | |
| bool | m_logDebug |
| This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More... | |
| QAtomicInt | m_referenceCount {1} |
Definition at line 40 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 50 of file ssdpcache.h.
Referenced by SatIP::doUPNPsearch(), VBox::doUPNPSearch(), SatIP::findServers(), SSDPCache::Remove(), SSDPCache::RemoveStale(), and MythContext::Impl::UPnPautoconf().
| void SSDPCacheEntries::Dump | ( | uint & | nEntryCount | ) | const |
Prints this service to the console in human readable form.
Definition at line 202 of file ssdpcache.cpp.
| 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().
| 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().
| 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().
|
static |
Returns a normalized USN, so that capitalization of the uuid is not an issue.
Definition at line 223 of file ssdpcache.cpp.
| 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().
| 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::Remove | ( | const QString & | sUSN | ) |
Removes a specific entry from the cache.
Definition at line 122 of file ssdpcache.cpp.
Referenced by SSDPCache::Remove().
| uint SSDPCacheEntries::RemoveStale | ( | std::chrono::microseconds | ttNow | ) |
Removes expired cache entries, returning the number removed.
Definition at line 145 of file ssdpcache.cpp.
Referenced by SSDPCache::RemoveStale().
|
static |
Definition at line 68 of file ssdpcache.h.
Referenced by SSDPCache::Dump(), SSDPExtension::GetDeviceList(), SSDPCacheEntries(), and ~SSDPCacheEntries().
|
protected |
Definition at line 72 of file ssdpcache.h.
Referenced by Clear(), Dump(), Find(), GetEntryMap(), GetFirst(), Insert(), OutputXML(), Remove(), and RemoveStale().
|
mutableprotected |
Definition at line 71 of file ssdpcache.h.
Referenced by Clear(), Dump(), Find(), GetEntryMap(), GetFirst(), Insert(), OutputXML(), Remove(), and RemoveStale().