ArnLib
4.0.x
Active Registry Network
|
Browse() and resolve() together, may never be used to the same instance. More...
#include <ArnDiscover.hpp>
Signals | |
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... | |
Public Member Functions | |
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... | |
Browse() and resolve() together, may never be used to the same instance.
Definition at line 224 of file ArnDiscover.hpp.
|
explicit |
Definition at line 346 of file ArnDiscover.cpp.
ArnDiscoverBrowserB::~ArnDiscoverBrowserB | ( | ) |
Definition at line 354 of file ArnDiscover.cpp.
ArnDiscoverInfo::State ArnDiscoverBrowserB::defaultStopState | ( | ) | const |
Return the default stop state for this service discover browser.
This default stop state will be used for all services discovered by this browser.
Definition at line 463 of file ArnDiscover.cpp.
bool ArnDiscoverBrowserB::goTowardState | ( | int | index, |
ArnDiscoverInfo::State | state | ||
) |
Command a service to go towards a stop state.
The service is specified by its index. The wanted final state must be forward, otherwise it is ignored.
[in] | index | for the service |
[in] | state | is the wanted final state |
Definition at line 479 of file ArnDiscover.cpp.
int ArnDiscoverBrowserB::IdToIndex | ( | int | id | ) |
Return the discover service index by its id.
The index for a service info is only valid valid for a given moment, it can change as services are added and removed. If given a non existent id, -1 will be returned.
[in] | id |
Definition at line 413 of file ArnDiscover.cpp.
int ArnDiscoverBrowserB::indexToId | ( | int | index | ) |
Return the discover service id by its index.
The index for a service info is only valid valid for a given moment, it can change as services are added and removed. If given an invalid index, -1 will be returned.
[in] | index |
Definition at line 403 of file ArnDiscover.cpp.
const ArnDiscoverInfo & ArnDiscoverBrowserB::infoById | ( | int | id | ) |
Return the discover service info by its id.
The id for a service info is unique and stays same over time, but the service can have been removed. If given a non existent service id, a Null discover info will be returned.
[in] | id |
Definition at line 388 of file ArnDiscover.cpp.
const ArnDiscoverInfo & ArnDiscoverBrowserB::infoByIndex | ( | int | index | ) |
Return the discover service info by its index.
The index for a service info is only valid valid for a given moment, it can change as services are added and removed. If given an invalid index, a Null discover info will be returned.
[in] | index |
Definition at line 376 of file ArnDiscover.cpp.
const ArnDiscoverInfo & ArnDiscoverBrowserB::infoByName | ( | const QString & | serviceName | ) |
Return the discover service info by its name.
The service name is unique for a given moment, but the service can be removed and then reappear with a different service name. Also non used service names can be reused for a different service. If given a non existent service name, a Null discover info will be returned.
[in] | serviceName |
Definition at line 397 of file ArnDiscover.cpp.
|
signal |
Indicate service has been updated.
[in] | index | for the service |
[in] | state | is the current state of the service info |
|
signal |
Indicate service has been added (discovered)
The service has been added to a list sorted by ascending service names. The index is a reference to this sorted list.
[in] | index | for the service |
[in] | name | is the service name e.g. "My House Registry" |
int ArnDiscoverBrowserB::serviceCount | ( | ) | const |
Return the number of active discover services.
Definition at line 368 of file ArnDiscover.cpp.
int ArnDiscoverBrowserB::serviceNameToId | ( | const QString & | name | ) |
Return the discover service id by its name.
The service name is unique for a given moment. If given a non existent service name, -1 will be returned.
[in] | name |
Definition at line 421 of file ArnDiscover.cpp.
|
signal |
void ArnDiscoverBrowserB::setDefaultStopState | ( | ArnDiscoverInfo::State | defaultStopState | ) |
Set the default stop state for this service discover browser.
This default stop state will be used for all services discovered by this browser.
[in] | defaultStopState |
Definition at line 471 of file ArnDiscover.cpp.