ArnLib
4.0.x
Active Registry Network
|
Resolv an Arn service. More...
#include <ArnDiscover.hpp>
Public Slots | |
int | resolve (const QString &serviceName, bool forceUpdate=true) |
Resolve a specific service name. More... | |
Public Member Functions | |
ArnDiscoverResolver (QObject *parent=arnNullptr) | |
QString | defaultService () const |
Return the default service name. More... | |
void | setDefaultService (const QString &defaultService) |
Set the default service name. More... | |
![]() | |
ArnDiscoverBrowserB (QObject *parent=arnNullptr) | |
~ArnDiscoverBrowserB () | |
int | serviceCount () const |
Return the number of active discover services. More... | |
const ArnDiscoverInfo & | infoByIndex (int index) |
Return the discover service info by its index. More... | |
const ArnDiscoverInfo & | infoById (int id) |
Return the discover service info by its id. More... | |
const ArnDiscoverInfo & | infoByName (const QString &serviceName) |
Return the discover service info by its name. More... | |
int | indexToId (int index) |
Return the discover service id by its index. More... | |
int | IdToIndex (int id) |
Return the discover service index by its id. More... | |
int | serviceNameToId (const QString &name) |
Return the discover service id by its name. More... | |
ArnDiscoverInfo::State | defaultStopState () const |
Return the default stop state for this service discover browser. More... | |
void | setDefaultStopState (ArnDiscoverInfo::State defaultStopState) |
Set the default stop state for this service discover browser. More... | |
bool | goTowardState (int index, ArnDiscoverInfo::State state) |
Command a service to go towards a stop state. More... | |
Additional Inherited Members | |
![]() | |
void | serviceAdded (int index, const QString &name) |
Indicate service has been added (discovered) More... | |
void | serviceRemoved (int index) |
Indicate service has been removed. More... | |
void | infoUpdated (int index, ArnDiscoverInfo::State state) |
Indicate service has been updated. More... | |
Resolv an Arn service.
Example usage
Definition at line 556 of file ArnDiscover.hpp.
|
explicit |
Definition at line 256 of file ArnDiscover.cpp.
QString ArnDiscoverResolver::defaultService | ( | ) | const |
Return the default service name.
This default service name will be used when resolve() is called with empty service name.
Definition at line 276 of file ArnDiscover.cpp.
|
slot |
Resolve a specific service name.
Only the specified service will be resolved, but there can be many ongoing resolves by calling this method multiple times with different service names. The infoUpdated() signal will always be emitted when calling this method. The signal can also be emitted multiple times later regarding the same service.
[in] | serviceName | is the service to be resolved |
[in] | forceUpdate | when true, a new resolve is always done, otherwise a service name that already is resolved will not be resolved again. |
Definition at line 268 of file ArnDiscover.cpp.
void ArnDiscoverResolver::setDefaultService | ( | const QString & | defaultService | ) |
Set the default service name.
This default service name will be used when resolve() is called with empty service name. If calling with defaultService empty, it is ignored.
[in] | defaultService | e.g. "My Default Service" |
Definition at line 284 of file ArnDiscover.cpp.