48 fBonjourRecords =
new TList;
64 DNSServiceRefDeallocate(
fDNSRef);
75 DNSServiceErrorType err = DNSServiceBrowse(&
fDNSRef, 0,
79 if (err != kDNSServiceErr_NoError) {
80 Error(
"BrowseForServiceType",
"error in DNSServiceBrowse (%d)", err);
86 Error(
"BrowseForServiceType",
"invalid sockfd");
102 Emit(
"CurrentBonjourRecordsChanged(TList*)", (
Long_t)bonjourRecords);
115 DNSServiceErrorType err = DNSServiceProcessResult(
fDNSRef);
116 if (err != kDNSServiceErr_NoError)
117 Error(
"BonjourSocketReadyRead",
"error in DNSServiceProcessResult");
124 DNSServiceFlags flags,
UInt_t,
125 DNSServiceErrorType errorCode,
126 const char *serviceName,
const char *regType,
127 const char *replyDomain,
void *context)
130 if (errorCode != kDNSServiceErr_NoError) {
131 ::Error(
"TBonjourBrowser::BonjourBrowseReply",
"error in BonjourBrowseReply");
135 if (flags & kDNSServiceFlagsAdd) {
145 if (!(flags & kDNSServiceFlagsMoreComing)) {
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
void BonjourSocketReadyRead()
The Bonjour socket is ready for reading.
virtual void Add()
Add file event handler to system file handler list.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
static void DNSSD_API BonjourBrowseReply(DNSServiceRef, DNSServiceFlags, UInt_t, DNSServiceErrorType, const char *, const char *, const char *, void *)
Static Bonjour browser callback function.
void CurrentBonjourRecordsChanged(TList *bonjourRecords)
Emit CurrentBonjourRecordsChanged signal.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void Emit(const char *signal)
Acitvate signal without args.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
ClassImp(TBonjourBrowser) TBonjourBrowser
Default ctor.
virtual void Setenv(const char *name, const char *value)
Set environment variable.
R__EXTERN TSystem * gSystem
TFileHandler * fBonjourSocketHandler
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual ~TBonjourBrowser()
Cleanup.
virtual void Add(TObject *obj)
Int_t BrowseForServiceType(const char *serviceType)
Tell Bonjour to start browsing for a specific type of service.