Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CZeroconf Class Referenceabstract

#include <Zeroconf.h>

Inheritance diagram for CZeroconf:
CZeroconfAndroid CZeroconfAvahi CZeroconfDarwin CZeroconfDummy CZeroconfMDNS

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)
 
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 ()
 
 CZeroconf (const CZeroconf &)
 
virtual ~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

Constructor & Destructor Documentation

◆ CZeroconf() [1/2]

CZeroconf::CZeroconf ( )
protected

◆ CZeroconf() [2/2]

CZeroconf::CZeroconf ( const CZeroconf & )
protected

◆ ~CZeroconf()

CZeroconf::~CZeroconf ( )
protectedvirtual

Member Function Documentation

◆ doForceReAnnounceService()

virtual bool CZeroconf::doForceReAnnounceService ( const std::string & fcr_identifier)
protectedpure virtual

◆ doPublishService()

virtual bool CZeroconf::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 )
protectedpure virtual

◆ doRemoveService()

virtual bool CZeroconf::doRemoveService ( const std::string & fcr_ident)
protectedpure virtual

◆ doStop()

virtual void CZeroconf::doStop ( )
protectedpure virtual

◆ ForceReAnnounceService()

bool CZeroconf::ForceReAnnounceService ( const std::string & fcr_identifier)

◆ GetInstance()

CZeroconf * CZeroconf::GetInstance ( )
static

◆ HasService()

bool CZeroconf::HasService ( const std::string & fcr_identifier) const

returns true if fcr_identifier exists

◆ IsInstantiated()

static bool CZeroconf::IsInstantiated ( )
inlinestatic

◆ IsStarted()

bool CZeroconf::IsStarted ( )
inline

◆ IsZCdaemonRunning()

virtual bool CZeroconf::IsZCdaemonRunning ( )
inlineprotectedvirtual

Reimplemented in CZeroconfMDNS.

◆ ProcessResults()

virtual void CZeroconf::ProcessResults ( )
inlinevirtual

Reimplemented in CZeroconfMDNS.

◆ PublishService()

bool CZeroconf::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 )

◆ ReleaseInstance()

void CZeroconf::ReleaseInstance ( )
static

◆ RemoveService()

bool CZeroconf::RemoveService ( const std::string & fcr_identifier)

removes the specified service returns false if fcr_identifier does not exist

◆ Start()

bool CZeroconf::Start ( )

◆ Stop()

void CZeroconf::Stop ( )

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