MythTV  0.26-pre
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
SSDPCacheEntries Class Reference

#include <ssdpcache.h>

Inheritance diagram for SSDPCacheEntries:
RefCounted

List of all members.

Public Member Functions

 SSDPCacheEntries ()
void Clear (void)
 Clears the cache of all entries.
uint Count (void) const
void Insert (const QString &sUSN, DeviceLocation *pEntry)
 Inserts a device location into the cache.
void Remove (const QString &sUSN)
 Removes a specific entry from the cache.
uint RemoveStale (const TaskTime &ttNow)
 Removes expired cache entries, returning the number removed.
DeviceLocationFind (const QString &sUSN)
 Finds the Device in the cache, returns NULL when absent.
DeviceLocationGetFirst (void)
 Returns random entry in cache, returns NULL when list is empty.
void GetEntryMap (EntryMap &)
 Returns a copy of the EntryMap.
QTextStream & OutputXML (QTextStream &os, uint *pnEntryCount=NULL) const
 Outputs the XML for this service.
void Dump (uint &nEntryCount) const
 Prints this service to the console in human readable form.

Static Public Member Functions

static QString GetNormalizedUSN (const QString &sUSN)
 Returns a normalized USN, so that capitalization of the uuid is not an issue.

Static Public Attributes

static int g_nAllocated = 0

Protected Member Functions

virtual ~SSDPCacheEntries ()
 Destructor protected to enforce Release method usage.

Protected Attributes

QMutex m_mutex
EntryMap m_mapEntries

Detailed Description

Definition at line 31 of file ssdpcache.h.


Constructor & Destructor Documentation

SSDPCacheEntries::~SSDPCacheEntries ( ) [protected, virtual]

Destructor protected to enforce Release method usage.

Definition at line 35 of file ssdpcache.cpp.

Definition at line 30 of file ssdpcache.cpp.


Member Function Documentation

Clears the cache of all entries.

Definition at line 42 of file ssdpcache.cpp.

Referenced by ~SSDPCacheEntries().

uint SSDPCacheEntries::Count ( void  ) const [inline]
void SSDPCacheEntries::Insert ( const QString &  sUSN,
DeviceLocation pEntry 
)

Inserts a device location into the cache.

Definition at line 97 of file ssdpcache.cpp.

Referenced by SSDPCache::Add().

void SSDPCacheEntries::Remove ( const QString &  sUSN)

Removes a specific entry from the cache.

Definition at line 120 of file ssdpcache.cpp.

Referenced by SSDPCache::Remove().

Removes expired cache entries, returning the number removed.

Definition at line 143 of file ssdpcache.cpp.

Referenced by SSDPCache::RemoveStale().

DeviceLocation * SSDPCacheEntries::Find ( const QString &  sUSN)

Finds the Device in the cache, returns NULL when absent.

Note:
Caller must call Release on non-NULL DeviceLocation when done with it.

Definition at line 58 of file ssdpcache.cpp.

Referenced by SSDPCache::Add(), and SSDPCache::Find().

Returns random entry in cache, returns NULL when list is empty.

Note:
Caller must call Release on non-NULL DeviceLocation when done with it.

Definition at line 72 of file ssdpcache.cpp.

Referenced by MythContextPrivate::UPnPautoconf().

Returns a copy of the EntryMap.

Note:
Caller must call Release() on each entry in the map.

Definition at line 84 of file ssdpcache.cpp.

Referenced by HttpStatus::FillStatusXML(), BackendSelection::Init(), and MythFrontendStatus::ProcessRequest().

QTextStream & SSDPCacheEntries::OutputXML ( QTextStream &  os,
uint pnEntryCount = NULL 
) const

Outputs the XML for this service.

Definition at line 176 of file ssdpcache.cpp.

void SSDPCacheEntries::Dump ( uint nEntryCount) const

Prints this service to the console in human readable form.

Definition at line 201 of file ssdpcache.cpp.

QString SSDPCacheEntries::GetNormalizedUSN ( const QString &  sUSN) [static]

Returns a normalized USN, so that capitalization of the uuid is not an issue.

Definition at line 223 of file ssdpcache.cpp.

Referenced by Find(), Insert(), and Remove().


Member Data Documentation

QMutex SSDPCacheEntries::m_mutex [mutable, protected]

Reimplemented from RefCounted.

Definition at line 62 of file ssdpcache.h.

Referenced by Clear(), Dump(), Find(), GetEntryMap(), GetFirst(), Insert(), OutputXML(), Remove(), and RemoveStale().

Definition at line 63 of file ssdpcache.h.

Referenced by Clear(), Dump(), Find(), GetEntryMap(), GetFirst(), Insert(), OutputXML(), Remove(), and RemoveStale().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends