xbmc
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CZeroconf Class Referenceabstract

this class provides support for zeroconf while the different zeroconf implementations have asynchronous APIs this class hides it and provides only few ways to interact with the services. More...

#include <Zeroconf.h>

Inheritance diagram for CZeroconf:
Inheritance graph
[legend]

Public Member Functions

bool PublishService (const std::string &fcr_identifier, const std::string &fcr_type, const std::string &fcr_name, unsigned int f_port, std::vector< std::pair< std::string, std::string > > txt)
 
bool ForceReAnnounceService (const std::string &fcr_identifier)
 
bool RemoveService (const std::string &fcr_identifier)
 removes the specified service returns false if fcr_identifier does not exist
 
bool HasService (const std::string &fcr_identifier) const
 returns true if fcr_identifier exists
 
bool Start ()
 
void Stop ()
 
virtual void ProcessResults ()
 
bool IsStarted ()
 

Static Public Member Functions

static CZeroconfGetInstance ()
 
static void ReleaseInstance ()
 
static bool IsInstantiated ()
 

Protected Member Functions

virtual bool doPublishService (const std::string &fcr_identifier, const std::string &fcr_type, const std::string &fcr_name, unsigned int f_port, const std::vector< std::pair< std::string, std::string > > &txt)=0
 
virtual bool doForceReAnnounceService (const std::string &fcr_identifier)=0
 
virtual bool doRemoveService (const std::string &fcr_ident)=0
 
virtual void doStop ()=0
 
virtual bool IsZCdaemonRunning ()
 
 CZeroconf (const CZeroconf &)
 

Detailed Description

this class provides support for zeroconf while the different zeroconf implementations have asynchronous APIs this class hides it and provides only few ways to interact with the services.

If more control is needed, feel free to add it. The main purpose currently is to provide an easy way to publish services in the different StartXXX/StopXXX methods in CApplication

Todo:
Make me safe for use in static initialization. CritSec is a static member :/ use e.g. loki's singleton implementation to make do it properly

The documentation for this class was generated from the following files: