XrdOucAppleBonjour Class Reference

#include <XrdOucAppleBonjour.hh>

Inheritance diagram for XrdOucAppleBonjour:

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 XrdOucAppleBonjourgetInstance ()

Private Member Functions

 XrdOucAppleBonjour ()
virtual ~XrdOucAppleBonjour ()
 XrdOucAppleBonjour (const XrdOucAppleBonjour &)
XrdOucAppleBonjouroperator= (const XrdOucAppleBonjour &)

Static Private Member Functions

static void RegisterReply (DNSServiceRef ref, DNSServiceFlags flags, DNSServiceErrorType error, const char *name, const char *regtype, const char *domain, void *context)
static void BrowseReply (DNSServiceRef ref, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType error, const char *name, const char *regtype, const char *domain, void *context)
static void ResolveReply (DNSServiceRef ref, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType error, const char *fullname, const char *hostname, uint16_t port, uint16_t txtLen, const unsigned char *txtVal, void *context)
static void * BrowseEventLoopThread (void *context)

Private Attributes

std::list< XrdOucBonjourRegisteredEntry * > ListOfRegistrations
pthread_t BrowseEventLoopThreadInfo

Static Private Attributes

static XrdOucAppleBonjour_Instance
static XrdSysMutex SingletonMutex

Friends

class XrdOucAppleBonjourSingletonCleanup

Classes

class  XrdOucAppleBonjourSearchNode
class  XrdOucAppleBonjourSingletonCleanup

Detailed Description

Definition at line 14 of file XrdOucAppleBonjour.hh.


Constructor & Destructor Documentation

XrdOucAppleBonjour::XrdOucAppleBonjour (  )  [private]

Definition at line 369 of file XrdOucAppleBonjour.cc.

References env, putenv, and strcpy().

Referenced by getInstance().

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

Definition at line 376 of file XrdOucAppleBonjour.cc.

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

Definition at line 26 of file XrdOucAppleBonjour.hh.


Member Function Documentation

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

Definition at line 27 of file XrdOucAppleBonjour.hh.

void XrdOucAppleBonjour::RegisterReply ( DNSServiceRef  ref,
DNSServiceFlags  flags,
DNSServiceErrorType  error,
const char *  name,
const char *  regtype,
const char *  domain,
void *  context 
) [static, private]

Definition at line 30 of file XrdOucAppleBonjour.cc.

References XrdSysError::Emsg(), entry, free(), getInstance(), and ListOfRegistrations.

Referenced by RegisterService().

void XrdOucAppleBonjour::BrowseReply ( DNSServiceRef  ref,
DNSServiceFlags  flags,
uint32_t  interfaceIndex,
DNSServiceErrorType  error,
const char *  name,
const char *  regtype,
const char *  domain,
void *  context 
) [static, private]

Definition at line 192 of file XrdOucAppleBonjour.cc.

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

Referenced by BrowseEventLoopThread().

void XrdOucAppleBonjour::ResolveReply ( DNSServiceRef  ref,
DNSServiceFlags  flags,
uint32_t  interfaceIndex,
DNSServiceErrorType  error,
const char *  fullname,
const char *  hostname,
uint16_t  port,
uint16_t  txtLen,
const unsigned char *  txtVal,
void *  context 
) [static, private]

Definition at line 268 of file XrdOucAppleBonjour.cc.

References XrdOucBonjourRecord::AddRawTXTRecord(), XrdOucBonjourSubscribedEntry::callback, XrdOucBonjourResolutionEntry::callbackID, XrdOucBonjourSubscribedEntry::context, XrdSysError::Emsg(), free(), XrdOucBonjourNode::GetBonjourRecord(), getInstance(), XrdOucBonjour::ListOfNodes, XrdOucBonjour::LockNodeList(), XrdOucBonjourResolutionEntry::node, XrdOucBonjourNode::SetHostName(), XrdOucBonjourNode::SetPort(), and XrdOucBonjour::UnLockNodeList().

Referenced by ResolveNodeInformation().

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

Definition at line 127 of file XrdOucAppleBonjour.cc.

References BrowseReply(), XrdOucString::c_str(), XrdSysError::Emsg(), NULL, select(), XrdOucBonjourSubscribedEntry::serviceType, XrdSysThread::SetCancelAsynchronous(), and XrdSysThread::SetCancelOn().

Referenced by SubscribeForUpdates().

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

Implements XrdOucBonjour.

Definition at line 55 of file XrdOucAppleBonjour.cc.

References XrdSysError::Emsg(), entry, free(), XrdOucBonjourRecord::GetRegisteredType(), XrdOucBonjourRecord::GetReplyDomain(), XrdOucBonjourRecord::GetServiceName(), XrdOucBonjourRecord::GetTXTRecordData(), XrdOucBonjourRecord::GetTXTRecordLength(), ListOfRegistrations, malloc(), NULL, XrdNet::Port(), XrdProtLoad::ProtoMax, RegisterReply(), select(), TIMEOUT, and XrdNetTCP.

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

Implements XrdOucBonjour.

Definition at line 250 of file XrdOucAppleBonjour.cc.

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

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

Implements XrdOucBonjour.

Definition at line 306 of file XrdOucAppleBonjour.cc.

References XrdSysError::Emsg(), XrdOucBonjourNode::GetBonjourRecord(), XrdOucBonjourRecord::GetRegisteredType(), XrdOucBonjourRecord::GetReplyDomain(), XrdOucBonjourRecord::GetServiceName(), XrdOucBonjourResolutionEntry::node, NULL, ResolveReply(), select(), and TIMEOUT.

Referenced by BrowseReply().

XrdOucAppleBonjour & XrdOucAppleBonjour::getInstance (  )  [static]

Reimplemented from XrdOucBonjour.

Definition at line 383 of file XrdOucAppleBonjour.cc.

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

Referenced by BrowseReply(), XrdOucAppleBonjourFactory::GetBonjourManager(), RegisterReply(), and ResolveReply().


Friends And Related Function Documentation

friend class XrdOucAppleBonjourSingletonCleanup [friend]

Definition at line 33 of file XrdOucAppleBonjour.hh.


Member Data Documentation

XrdOucAppleBonjour * XrdOucAppleBonjour::_Instance [static, private]

Definition at line 17 of file XrdOucAppleBonjour.hh.

Referenced by getInstance(), and XrdOucAppleBonjour::XrdOucAppleBonjourSingletonCleanup::~XrdOucAppleBonjourSingletonCleanup().

XrdSysMutex XrdOucAppleBonjour::SingletonMutex [static, private]

Definition at line 20 of file XrdOucAppleBonjour.hh.

Referenced by getInstance(), and XrdOucAppleBonjour::XrdOucAppleBonjourSingletonCleanup::~XrdOucAppleBonjourSingletonCleanup().

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

Definition at line 54 of file XrdOucAppleBonjour.hh.

Referenced by RegisterReply(), and RegisterService().

pthread_t XrdOucAppleBonjour::BrowseEventLoopThreadInfo [private]

Definition at line 87 of file XrdOucAppleBonjour.hh.


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