#include <remoteservice.h>
Public Types | |
typedef TDESharedPtr< RemoteService > | Ptr |
Public Types inherited from DNSSD::ServiceBase | |
typedef TDESharedPtr< ServiceBase > | Ptr |
Signals | |
void | resolved (bool) |
Public Member Functions | |
RemoteService (const TQString &label) | |
RemoteService (const TQString &name, const TQString &type, const TQString &domain) | |
RemoteService (const KURL &url) | |
void | resolveAsync () |
bool | resolve () |
bool | isResolved () const |
Public Member Functions inherited from DNSSD::ServiceBase | |
ServiceBase (const TQString &name=TQString::null, const TQString &type=TQString::null, const TQString &domain=TQString::null, const TQString &host=TQString::null, unsigned short port=0) | |
const TQString & | serviceName () const |
const TQString & | type () const |
const TQString & | domain () const |
const TQString & | hostName () const |
unsigned short | port () const |
const TQMap< TQString, TQString > & | textData () const |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
virtual void | customEvent (TQCustomEvent *event) |
Protected Member Functions inherited from DNSSD::ServiceBase | |
TQString | encode () |
void | decode (const TQString &name) |
Friends | |
TDEDNSSD_EXPORT TQDataStream & | operator<< (TQDataStream &s, const RemoteService &a) |
TDEDNSSD_EXPORT TQDataStream & | operator>> (TQDataStream &s, RemoteService &a) |
Additional Inherited Members | |
Protected Attributes inherited from DNSSD::ServiceBase | |
TQString | m_serviceName |
TQString | m_type |
TQString | m_domain |
TQString | m_hostName |
unsigned short | m_port |
TQMap< TQString, TQString > | m_textData |
Detailed Description
RemoteService class allows to resolve service announced on remote machine.
In most cases objects of this class are created by ServiceBrowser, but it is not required. Only fields valid before service is resolved are name, type.and domain.
class representing service announced on remote machine.
Definition at line 42 of file remoteservice.h.
Constructor & Destructor Documentation
◆ RemoteService() [1/3]
DNSSD::RemoteService::RemoteService | ( | const TQString & | label | ) |
Creates unresolved service from given DNS label.
- Parameters
-
label Data returned by PTR query - it is decoded into name, type and domain
Definition at line 75 of file remoteservice.cpp.
◆ RemoteService() [2/3]
DNSSD::RemoteService::RemoteService | ( | const TQString & | name, |
const TQString & | type, | ||
const TQString & | domain | ||
) |
Creates unresolved remote service with given name, type and domain.
Definition at line 80 of file remoteservice.cpp.
◆ RemoteService() [3/3]
DNSSD::RemoteService::RemoteService | ( | const KURL & | url | ) |
Creates resolved remote service from invitation URL constructed by PublicService::toInvitation.
If URL was invalid, service is set to unresolved and other fields should not be used.
Definition at line 86 of file remoteservice.cpp.
Member Function Documentation
◆ isResolved()
bool DNSSD::RemoteService::isResolved | ( | ) | const |
Returns true if service has been successfully resolved.
Definition at line 137 of file remoteservice.cpp.
◆ resolve()
bool DNSSD::RemoteService::resolve | ( | ) |
Synchronous version of resolveAsync().
Note that resolved(bool) is emitted before this function returns,
- Returns
- TRUE is successful
Definition at line 108 of file remoteservice.cpp.
◆ resolveAsync()
void DNSSD::RemoteService::resolveAsync | ( | ) |
Resolves host name and port of service.
Host name is not resolved into numeric address - use KResolver for that. Signal resolved(bool) will be emitted when finished or even before return of this function - in case of immediate failure.
Definition at line 118 of file remoteservice.cpp.
◆ resolved
|
signal |
Emitted when resolving is complete.
Parameter is set to TRUE if it was successful. If operating in asynchronous mode this signal can be emitted several times (when service change)
The documentation for this class was generated from the following files: