SSDPCache Class Reference

#include <ssdpcache.h>

Inheritance diagram for SSDPCache:
MythObservable

List of all members.

Public Member Functions

virtual ~SSDPCache ()
void Lock ()
void Unlock ()
SSDPCacheEntriesMap::Iterator Begin ()
SSDPCacheEntriesMap::Iterator End ()
int Count ()
void Clear ()
void Add (const QString &sURI, const QString &sUSN, const QString &sLocation, long sExpiresInSecs)
void Remove (const QString &sURI, const QString &sUSN)
int RemoveStale ()
void Dump (void)
 Prints this device to the console in a human readable form.
QTextStream & OutputXML (QTextStream &os, uint *pnDevCount=NULL, uint *pnEntryCount=NULL) const
 Outputs the XML for this device.
SSDPCacheEntriesFind (const QString &sURI)
 Finds the SSDPCacheEntries in the cache, returns NULL when absent.
DeviceLocationFind (const QString &sURI, const QString &sUSN)
 Finds the Device in the cache, returns NULL when absent.

Static Public Member Functions

static SSDPCacheInstance ()

Protected Member Functions

void NotifyAdd (const QString &sURI, const QString &sUSN, const QString &sLocation)
void NotifyRemove (const QString &sURI, const QString &sUSN)

Protected Attributes

QMutex m_mutex
SSDPCacheEntriesMap m_cache

Private Member Functions

 SSDPCache ()

Static Private Attributes

static SSDPCacheg_pSSDPCache = NULL

Detailed Description

Definition at line 77 of file ssdpcache.h.


Constructor & Destructor Documentation

SSDPCache::SSDPCache (  )  [private]

Definition at line 249 of file ssdpcache.cpp.

Referenced by Instance().

SSDPCache::~SSDPCache (  )  [virtual]

Definition at line 265 of file ssdpcache.cpp.


Member Function Documentation

void SSDPCache::NotifyAdd ( const QString &  sURI,
const QString &  sUSN,
const QString &  sLocation 
) [protected]

Definition at line 488 of file ssdpcache.cpp.

Referenced by Add().

void SSDPCache::NotifyRemove ( const QString &  sURI,
const QString &  sUSN 
) [protected]

Definition at line 507 of file ssdpcache.cpp.

Referenced by Remove().

SSDPCache * SSDPCache::Instance (  )  [static]
void SSDPCache::Lock ( void   )  [inline]

Definition at line 110 of file ssdpcache.h.

Referenced by Remove(), and RemoveStale().

void SSDPCache::Unlock ( void   )  [inline]

Definition at line 111 of file ssdpcache.h.

Referenced by Remove(), and RemoveStale().

SSDPCacheEntriesMap::Iterator SSDPCache::Begin ( void   )  [inline]

Definition at line 113 of file ssdpcache.h.

SSDPCacheEntriesMap::Iterator SSDPCache::End ( void   )  [inline]

Definition at line 114 of file ssdpcache.h.

int SSDPCache::Count ( void   )  [inline]

Definition at line 116 of file ssdpcache.h.

void SSDPCache::Clear ( void   ) 

Definition at line 279 of file ssdpcache.cpp.

Referenced by ~SSDPCache().

void SSDPCache::Add ( const QString &  sURI,
const QString &  sUSN,
const QString &  sLocation,
long  sExpiresInSecs 
)

Definition at line 326 of file ssdpcache.cpp.

void SSDPCache::Remove ( const QString &  sURI,
const QString &  sUSN 
)

Definition at line 382 of file ssdpcache.cpp.

int SSDPCache::RemoveStale (  ) 

Definition at line 424 of file ssdpcache.cpp.

Referenced by SSDPCacheTask::Execute().

void SSDPCache::Dump ( void   ) 

Prints this device to the console in a human readable form.

Definition at line 556 of file ssdpcache.cpp.

Referenced by SSDPCacheTask::Execute().

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

Outputs the XML for this device.

Definition at line 520 of file ssdpcache.cpp.

Referenced by SSDPExtension::GetDeviceList().

SSDPCacheEntries * SSDPCache::Find ( const QString &  sURI  ) 

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

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

Definition at line 295 of file ssdpcache.cpp.

Referenced by Find(), SSDP::Find(), and BackendSelection::Init().

DeviceLocation * SSDPCache::Find ( const QString &  sURI,
const QString &  sUSN 
)

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

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

Definition at line 308 of file ssdpcache.cpp.


Member Data Documentation

SSDPCache * SSDPCache::g_pSSDPCache = NULL [static, private]

Definition at line 84 of file ssdpcache.h.

Referenced by Instance().

QMutex SSDPCache::m_mutex [mutable, protected]

Definition at line 88 of file ssdpcache.h.

Referenced by Add(), Clear(), Dump(), Find(), and OutputXML().

Definition at line 89 of file ssdpcache.h.

Referenced by Add(), Clear(), Dump(), Find(), 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
Generated on Mon May 28 06:42:28 2012 for MythTV by  doxygen 1.6.3