Torc  0.1
Public Types | Public Member Functions | Public Attributes | List of all members
TorcBonjourService Class Reference

Wrapper around a DNS service reference, either advertised or discovered. More...

#include <torcbonjour.h>

Public Types

enum  ServiceType { Service, Browse, Resolve }
 

Public Member Functions

 TorcBonjourService ()
 
 TorcBonjourService (const TorcBonjourService &Other)
 
 TorcBonjourService (ServiceType BonjourType, DNSServiceRef DNSSRef, const QByteArray &Name, const QByteArray &Type)
 
 TorcBonjourService (ServiceType BonjourType, const QByteArray &Name, const QByteArray &Type, const QByteArray &Domain, uint32_t InterfaceIndex)
 
TorcBonjourServiceoperator= (const TorcBonjourService &Other)
 
 ~TorcBonjourService ()=default
 
void SetFileDescriptor (int FileDescriptor, TorcBonjour *Object)
 Sets the file descriptor and creates a QSocketNotifier to listen for socket events. More...
 
bool IsResolved (void)
 Returns true when the service has been fully resolved to an IP address and port. More...
 
void Deregister (void)
 Release all resources associated with this service. More...
 

Public Attributes

ServiceType m_serviceType
 
DNSServiceRef m_dnssRef
 
QByteArray m_name
 
QByteArray m_type
 
QByteArray m_txt
 
QByteArray m_domain
 
uint32_t m_interfaceIndex
 
QByteArray m_host
 
QList< QHostAddress > m_ipAddresses
 
int m_port
 
int m_lookupID
 
int m_fd
 
QSocketNotifier * m_socketNotifier
 

Detailed Description

Wrapper around a DNS service reference, either advertised or discovered.

TorcBonjourService takes ownership of both the DNSServiceRef and QSocketNotifier object - to ensure resources are properly released, Deregister must be called.

See also
TorcBonjour

Definition at line 24 of file torcbonjour.h.

Member Enumeration Documentation

Enumerator
Service 

A service being advertised by this application.

Browse 

An external service which we are actively trying to discover.

Resolve 

Address resolution for a discovered service.

Definition at line 27 of file torcbonjour.h.

Constructor & Destructor Documentation

TorcBonjourService::TorcBonjourService ( )

Definition at line 74 of file torcbonjour.cpp.

TorcBonjourService::TorcBonjourService ( const TorcBonjourService Other)

Definition at line 93 of file torcbonjour.cpp.

TorcBonjourService::TorcBonjourService ( ServiceType  BonjourType,
DNSServiceRef  DNSSRef,
const QByteArray &  Name,
const QByteArray &  Type 
)

Definition at line 128 of file torcbonjour.cpp.

TorcBonjourService::TorcBonjourService ( ServiceType  BonjourType,
const QByteArray &  Name,
const QByteArray &  Type,
const QByteArray &  Domain,
uint32_t  InterfaceIndex 
)

Definition at line 145 of file torcbonjour.cpp.

TorcBonjourService::~TorcBonjourService ( )
default

Member Function Documentation

void TorcBonjourService::Deregister ( void  )

Release all resources associated with this service.

Definition at line 189 of file torcbonjour.cpp.

bool TorcBonjourService::IsResolved ( void  )

Returns true when the service has been fully resolved to an IP address and port.

Definition at line 181 of file torcbonjour.cpp.

TorcBonjourService & TorcBonjourService::operator= ( const TorcBonjourService Other)

Definition at line 110 of file torcbonjour.cpp.

void TorcBonjourService::SetFileDescriptor ( int  FileDescriptor,
TorcBonjour Object 
)

Sets the file descriptor and creates a QSocketNotifier to listen for socket events.

Definition at line 167 of file torcbonjour.cpp.

Member Data Documentation

DNSServiceRef TorcBonjourService::m_dnssRef

Definition at line 50 of file torcbonjour.h.

QByteArray TorcBonjourService::m_domain

Definition at line 55 of file torcbonjour.h.

int TorcBonjourService::m_fd

Definition at line 61 of file torcbonjour.h.

QByteArray TorcBonjourService::m_host

Definition at line 57 of file torcbonjour.h.

uint32_t TorcBonjourService::m_interfaceIndex

Definition at line 56 of file torcbonjour.h.

QList<QHostAddress> TorcBonjourService::m_ipAddresses

Definition at line 58 of file torcbonjour.h.

int TorcBonjourService::m_lookupID

Definition at line 60 of file torcbonjour.h.

QByteArray TorcBonjourService::m_name

Definition at line 52 of file torcbonjour.h.

int TorcBonjourService::m_port

Definition at line 59 of file torcbonjour.h.

ServiceType TorcBonjourService::m_serviceType

Definition at line 48 of file torcbonjour.h.

QSocketNotifier* TorcBonjourService::m_socketNotifier

Definition at line 62 of file torcbonjour.h.

QByteArray TorcBonjourService::m_txt

Definition at line 54 of file torcbonjour.h.

QByteArray TorcBonjourService::m_type

Definition at line 53 of file torcbonjour.h.


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