XrdOucAvahiBonjour Class Reference

#include <XrdOucAvahiBonjour.hh>

Inheritance diagram for XrdOucAvahiBonjour:

XrdOucBonjour List of all members.

Public Member Functions

int RegisterService (XrdOucBonjourRecord &record, unsigned short port=0)
int SubscribeForUpdates (const char *servicetype, XrdOucBonjourUpdateCallback callback, void *context)
int ResolveNodeInformation (XrdOucBonjourResolutionEntry *nodeAndCallback)

Static Public Member Functions

static XrdOucAvahiBonjourgetInstance ()

Private Member Functions

 XrdOucAvahiBonjour ()
virtual ~XrdOucAvahiBonjour ()
 XrdOucAvahiBonjour (const XrdOucAvahiBonjour &)
XrdOucAvahiBonjouroperator= (const XrdOucAvahiBonjour &)

Static Private Member Functions

static void * BrowseEventLoopThread (void *context)
static void RegisterReply (AvahiClient *c, AvahiClientState state, void *userdata)
static void RegisterEntries (XrdOucBonjourRegisteredEntry *entry)
static void EntryGroupReply (AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata)
static void ClientReply (AvahiClient *c, AvahiClientState state, void *userdata)
static void BrowseReply (AvahiServiceBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *name, const char *type, const char *domain, AvahiLookupResultFlags flags, void *userdata)
static void ResolveReply (AvahiServiceResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const char *name, const char *type, const char *domain, const char *host_name, const AvahiAddress *address, uint16_t port, AvahiStringList *txt, AvahiLookupResultFlags flags, void *userdata)

Private Attributes

std::list< XrdOucBonjourRegisteredEntry * > ListOfRegistrations
pthread_t BrowseEventLoopThreadInfo
AvahiSimplePoll * poller

Static Private Attributes

static XrdOucAvahiBonjour_Instance
static XrdSysMutex SingletonMutex

Friends

class XrdOucAvahiBonjourSingletonCleanup

Classes

class  XrdOucAvahiBonjourSearchNode
class  XrdOucAvahiBonjourSingletonCleanup

Detailed Description

Definition at line 22 of file XrdOucAvahiBonjour.hh.


Constructor & Destructor Documentation

XrdOucAvahiBonjour::XrdOucAvahiBonjour (  )  [private]

Definition at line 434 of file XrdOucAvahiBonjour.cc.

References env, poller, and putenv.

Referenced by getInstance().

XrdOucAvahiBonjour::~XrdOucAvahiBonjour (  )  [private, virtual]

Definition at line 441 of file XrdOucAvahiBonjour.cc.

References poller.

XrdOucAvahiBonjour::XrdOucAvahiBonjour ( const XrdOucAvahiBonjour  )  [inline, private]

Definition at line 34 of file XrdOucAvahiBonjour.hh.


Member Function Documentation

XrdOucAvahiBonjour& XrdOucAvahiBonjour::operator= ( const XrdOucAvahiBonjour  )  [inline, private]

Definition at line 35 of file XrdOucAvahiBonjour.hh.

void * XrdOucAvahiBonjour::BrowseEventLoopThread ( void *  context  )  [static, private]

Definition at line 272 of file XrdOucAvahiBonjour.cc.

References BrowseReply(), XrdOucString::c_str(), ClientReply(), XrdSysError::Emsg(), error, NULL, and XrdOucBonjourSubscribedEntry::serviceType.

Referenced by SubscribeForUpdates().

void XrdOucAvahiBonjour::RegisterReply ( AvahiClient *  c,
AvahiClientState  state,
void *  userdata 
) [static, private]

Definition at line 122 of file XrdOucAvahiBonjour.cc.

References XrdSysError::Emsg(), entry, and RegisterEntries().

Referenced by RegisterService().

void XrdOucAvahiBonjour::RegisterEntries ( XrdOucBonjourRegisteredEntry entry  )  [static, private]

Definition at line 64 of file XrdOucAvahiBonjour.cc.

References XrdSysError::Emsg(), entry, EntryGroupReply(), list, n, and NULL.

Referenced by EntryGroupReply(), and RegisterReply().

void XrdOucAvahiBonjour::EntryGroupReply ( AvahiEntryGroup *  g,
AvahiEntryGroupState  state,
void *  userdata 
) [static, private]

Definition at line 30 of file XrdOucAvahiBonjour.cc.

References XrdSysError::Emsg(), entry, n, and RegisterEntries().

Referenced by RegisterEntries().

void XrdOucAvahiBonjour::ClientReply ( AvahiClient *  c,
AvahiClientState  state,
void *  userdata 
) [static, private]

Definition at line 263 of file XrdOucAvahiBonjour.cc.

References XrdSysError::Emsg().

Referenced by BrowseEventLoopThread().

void XrdOucAvahiBonjour::BrowseReply ( AvahiServiceBrowser *  b,
AvahiIfIndex  interface,
AvahiProtocol  protocol,
AvahiBrowserEvent  event,
const char *  name,
const char *  type,
const char *  domain,
AvahiLookupResultFlags  flags,
void *  userdata 
) [static, private]

Definition at line 198 of file XrdOucAvahiBonjour.cc.

References XrdOucBonjourSubscribedEntry::callback, XrdOucBonjourResolutionEntry::callbackID, XrdOucBonjourSubscribedEntry::context, XrdSysError::Emsg(), getInstance(), XrdOucBonjour::ListOfNodes, XrdOucBonjour::LockNodeList(), malloc(), XrdOucBonjourResolutionEntry::node, ResolveReply(), XrdSysError::Say(), and XrdOucBonjour::UnLockNodeList().

Referenced by BrowseEventLoopThread().

void XrdOucAvahiBonjour::ResolveReply ( AvahiServiceResolver *  r,
AvahiIfIndex  interface,
AvahiProtocol  protocol,
AvahiResolverEvent  event,
const char *  name,
const char *  type,
const char *  domain,
const char *  host_name,
const AvahiAddress *  address,
uint16_t  port,
AvahiStringList *  txt,
AvahiLookupResultFlags  flags,
void *  userdata 
) [static, private]

Definition at line 336 of file XrdOucAvahiBonjour.cc.

References XrdOucBonjourRecord::AddTXTRecord(), XrdOucBonjourResolutionEntry::callbackID, XrdSysError::Emsg(), free(), XrdOucBonjourNode::GetBonjourRecord(), getInstance(), XrdOucBonjour::ListOfNodes, XrdOucBonjour::LockNodeList(), XrdOucBonjourResolutionEntry::node, NULL, XrdOucBonjourNode::SetHostName(), XrdOucBonjourNode::SetPort(), size, size_t, XrdOucBonjour::UnLockNodeList(), and value.

Referenced by BrowseReply().

int XrdOucAvahiBonjour::RegisterService ( XrdOucBonjourRecord record,
unsigned short  port = 0 
) [virtual]

Implements XrdOucBonjour.

Definition at line 153 of file XrdOucAvahiBonjour.cc.

References XrdSysError::Emsg(), entry, free(), XrdOucBonjourRecord::GetRegisteredType(), ListOfRegistrations, malloc(), NULL, poller, XrdNet::Port(), XrdProtLoad::ProtoMax, RegisterReply(), and XrdNetTCP.

int XrdOucAvahiBonjour::SubscribeForUpdates ( const char *  servicetype,
XrdOucBonjourUpdateCallback  callback,
void *  context 
) [virtual]

Implements XrdOucBonjour.

Definition at line 317 of file XrdOucAvahiBonjour.cc.

References BrowseEventLoopThread(), XrdOucBonjourSubscribedEntry::callback, XrdOucBonjourSubscribedEntry::context, malloc(), NULL, XrdSysThread::Run(), and XrdOucBonjourSubscribedEntry::serviceType.

int XrdOucAvahiBonjour::ResolveNodeInformation ( XrdOucBonjourResolutionEntry nodeAndCallback  )  [virtual]

Implements XrdOucBonjour.

Definition at line 414 of file XrdOucAvahiBonjour.cc.

XrdOucAvahiBonjour & XrdOucAvahiBonjour::getInstance (  )  [static]

Reimplemented from XrdOucBonjour.

Definition at line 452 of file XrdOucAvahiBonjour.cc.

References _Instance, XrdSysMutex::Lock(), SingletonMutex, XrdSysMutex::UnLock(), and XrdOucAvahiBonjour().

Referenced by BrowseReply(), XrdOucAvahiBonjourFactory::GetBonjourManager(), and ResolveReply().


Friends And Related Function Documentation

friend class XrdOucAvahiBonjourSingletonCleanup [friend]

Definition at line 41 of file XrdOucAvahiBonjour.hh.


Member Data Documentation

XrdOucAvahiBonjour * XrdOucAvahiBonjour::_Instance [static, private]

Definition at line 25 of file XrdOucAvahiBonjour.hh.

Referenced by getInstance(), and XrdOucAvahiBonjour::XrdOucAvahiBonjourSingletonCleanup::~XrdOucAvahiBonjourSingletonCleanup().

XrdSysMutex XrdOucAvahiBonjour::SingletonMutex [static, private]

Definition at line 28 of file XrdOucAvahiBonjour.hh.

Referenced by getInstance(), and XrdOucAvahiBonjour::XrdOucAvahiBonjourSingletonCleanup::~XrdOucAvahiBonjourSingletonCleanup().

std::list<XrdOucBonjourRegisteredEntry *> XrdOucAvahiBonjour::ListOfRegistrations [private]

Definition at line 62 of file XrdOucAvahiBonjour.hh.

Referenced by RegisterService().

pthread_t XrdOucAvahiBonjour::BrowseEventLoopThreadInfo [private]

Definition at line 66 of file XrdOucAvahiBonjour.hh.

AvahiSimplePoll* XrdOucAvahiBonjour::poller [private]

Definition at line 70 of file XrdOucAvahiBonjour.hh.

Referenced by RegisterService(), XrdOucAvahiBonjour(), and ~XrdOucAvahiBonjour().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:50:37 2011 for ROOT_528-00b_version by  doxygen 1.5.1