ArnLib
4.0.x
Active Registry Network
|
Class for setting up dependencis to needed services. More...
#include <ArnDepend.hpp>
Public Types | |
typedef ArnDependSlot | DepSlot |
Signals | |
void | completed () |
Signal emitted when all dependent services are available. More... | |
Public Member Functions | |
ArnDepend (QObject *parent=arnNullptr) | |
~ArnDepend () | |
void | add (const QString &serviceName, int stateId=-1) |
Add a dependency for a service More... | |
void | add (const QString &serviceName, const QString &stateName) |
Add a dependency for a service More... | |
void | setMonitorName (const QString &name) |
Set an optional monitor name for debugging. More... | |
void | startMonitor () |
Starting the dependency monitor. More... | |
Class for setting up dependencis to needed services.
The services can be both system types available by internal Arn, and custom application types. The system types have a service name starting with "$".
This is typically used when an application needs a service to continue. When using persistent values, a client will need to know when they have been synced from the server. Then it's convenient to setup a dependency for the system service "$Persist".
When all dependent services are available, the completed() signal is emitted.
Example usage
Definition at line 132 of file ArnDepend.hpp.
typedef ArnDependSlot ArnDepend::DepSlot |
Definition at line 138 of file ArnDepend.hpp.
|
explicit |
Definition at line 170 of file ArnDepend.cpp.
ArnDepend::~ArnDepend | ( | ) |
Definition at line 186 of file ArnDepend.cpp.
void ArnDepend::add | ( | const QString & | serviceName, |
int | stateId = -1 |
||
) |
Add a dependency for a service
[in] | serviceName | is the name of the needed service. |
[in] | stateId | is the needed state id number. -1 is don't care. |
Definition at line 221 of file ArnDepend.cpp.
void ArnDepend::add | ( | const QString & | serviceName, |
const QString & | stateName | ||
) |
Add a dependency for a service
[in] | serviceName | is the name of the needed service. |
[in] | stateName | is the needed state name. |
Definition at line 213 of file ArnDepend.cpp.
|
signal |
Signal emitted when all dependent services are available.
void ArnDepend::setMonitorName | ( | const QString & | name | ) |
Set an optional monitor name for debugging.
[in] | name | is the monitor name. |
Definition at line 229 of file ArnDepend.cpp.
void ArnDepend::startMonitor | ( | ) |
Starting the dependency monitor.
Definition at line 237 of file ArnDepend.cpp.