|
ArnLib
4.0.x
Active Registry Network
|
Lookup a host. More...
#include <ArnZeroConf.hpp>


Signals | |
| void | lookuped (int id) |
| Indicate successfull lookup of host. More... | |
| void | lookupError (int id, int code) |
| Indicate unsuccessfull lookup of host. More... | |
Public Member Functions | |
| ArnZeroConfLookup (QObject *parent=arnNullptr) | |
| Standard constructor of an ArnZeroConfLookup object. More... | |
| ArnZeroConfLookup (const QString &hostName, QObject *parent=arnNullptr) | |
| Constructor of an ArnZeroConfLookup object. More... | |
| virtual | ~ArnZeroConfLookup () |
| Destructor of an ArnZeroConfLookup object. More... | |
| int | id () const |
| Returns the id number for this lookup. More... | |
| void | setId (int id) |
| Sets the id number for this this lookup. More... | |
| QString | host () const |
| Returns the host name for this Lookup. More... | |
| void | setHost (const QString &host) |
| Set the host name for this Lookup. More... | |
| QHostAddress | hostAddr () const |
| Returns the host address for this Lookup. More... | |
| void | lookup (bool forceMulticast=false) |
| Lookup the host address. More... | |
| void | releaseLookup () |
| Release the lookup. More... | |
Public Member Functions inherited from ArnZeroConfB | |
| ArnZeroConfB (QObject *parent=arnNullptr) | |
| virtual | ~ArnZeroConfB () |
| QAbstractSocket::SocketType | socketType () const |
| Returns the socket type for this Zero Config. More... | |
| void | setSocketType (QAbstractSocket::SocketType type) |
| Sets the socket type for this Zero Config. More... | |
| QString | serviceType () const |
| Returns the service type for this Zero Config. More... | |
| void | setServiceType (const QString &type) |
| Returns the service type for this Zero Config. More... | |
| QString | domain () const |
| Returns the domain for this Zero Config. More... | |
| void | setDomain (const QString &domain) |
| Sets the domain for this Zero Config. More... | |
| ArnZeroConf::State | state () const |
| Returns the current state of the service. More... | |
| QString | fullServiceType () const |
| Returns the full service type for this Zero Config. More... | |
Static Public Member Functions | |
| static bool | isForceQtDnsLookup () |
| Return Force using Qt for DNS lookup. More... | |
| static void | setForceQtDnsLookup (bool isForceQtDnsLookup) |
| Set Force using Qt for DNS lookup. More... | |
Friends | |
| class | ArnZeroConfIntern |
Lookup a host.
This class handles lookup of a host. It can be booth Multicast and Unicast DNS lookup.
Example usage
Definition at line 783 of file ArnZeroConf.hpp.
| ArnZeroConfLookup::ArnZeroConfLookup | ( | QObject * | parent = arnNullptr | ) |
Standard constructor of an ArnZeroConfLookup object.
| [in] | parent |
Definition at line 690 of file ArnZeroConf.cpp.
| ArnZeroConfLookup::ArnZeroConfLookup | ( | const QString & | hostName, |
| QObject * | parent = arnNullptr |
||
| ) |
Constructor of an ArnZeroConfLookup object.
All needed parameters for a lookup of a host.
| [in] | hostName | the name of the host. |
| [in] | parent |
Definition at line 697 of file ArnZeroConf.cpp.
|
virtual |
Destructor of an ArnZeroConfLookup object.
If the lookup is ongoing, it will be released.
Definition at line 706 of file ArnZeroConf.cpp.
|
inline |
Returns the host name for this Lookup.
Definition at line 824 of file ArnZeroConf.hpp.
|
inline |
Returns the host address for this Lookup.
Definition at line 838 of file ArnZeroConf.hpp.
| int ArnZeroConfLookup::id | ( | ) | const |
Returns the id number for this lookup.
| the | id number |
Definition at line 716 of file ArnZeroConf.cpp.
|
static |
Return Force using Qt for DNS lookup.
| true | if Force using Qt for DNS lookup |
Definition at line 875 of file ArnZeroConf.cpp.
| void ArnZeroConfLookup::lookup | ( | bool | forceMulticast = false | ) |
Lookup the host address.
Tries to lookup the host address necessary to establish a connection.
Result is indicated by lookuped() and lookupError() signals.
| [in] | forceMulticast | when true, ArnZeroConfLookup will use a mDns request to lookup the host address, even if the host name is a unicast address, i.e. outside the local network. |
Definition at line 728 of file ArnZeroConf.cpp.
|
signal |
Indicate successfull lookup of host.
| [in] | id | is the id number for this lookup |
|
signal |
Indicate unsuccessfull lookup of host.
| [in] | id | is the id number for this lookup |
| [in] | code | error code. |
| void ArnZeroConfLookup::releaseLookup | ( | ) |
Release the lookup.
Any lookup attempts in progress will be aborted.
Definition at line 784 of file ArnZeroConf.cpp.
|
static |
Set Force using Qt for DNS lookup.
If mDns lookup doesn't work for a platform, try force using Qt:s built in DNS-lookup.
This is a global setting for all instances of ArnZeroConfLookup.
| [in] | isForceQtDnsLookup |
Definition at line 881 of file ArnZeroConf.cpp.
|
inline |
Set the host name for this Lookup.
Usually hostname contain domain, e.g. "myserver.local" but it can also be "myserver".
| [in] | host | is the current host name (se above) |
Definition at line 832 of file ArnZeroConf.hpp.
| void ArnZeroConfLookup::setId | ( | int | id | ) |
Sets the id number for this this lookup.
This id can be used to identify different lookup:s when using a common handler.
When not set, it will be automatically asigned during lookup().
| [in] | id | the id number |
Definition at line 722 of file ArnZeroConf.cpp.
|
friend |
Definition at line 785 of file ArnZeroConf.hpp.