Requirement |
Description |
Multiple service provider of same type |
Presumably each provider implements the same interface, clients can choose which one to use or get default service. |
Multiple clients per provider |
The same provider shall be usable by multiple clients at the same time. If the provider is plugin-based there will be multiple provider instances. If the provider is IPC based the provider may have to be reentrant |
(Un)Register service |
New services can be added/removed at any time. Registration should only happen during installation phase. Once the installation is complete a new start of the device must not require reregistration. |
Enumerate the services installed in the device at run time |
Client can discover service provider based on type and receives notifications once provider becomes available in case provider was not available at time of request. |
Late binding |
Once client has identified provider, it shall be able to invoke provider, receive return values and subscribe to signals/notifications (synchronous and asynchronous API calls must be supported). |
In-process provider |
A service provider must be loadable as a plug-in into the same process as the service consumer. |
Provider can use each other |
A service provider shall be able to utilize the service of another service provider. |
Provider can offer multiple version of same service interface |
This may be required if the first version of a service has some bugs to which client code has adopted. This adoption may prevent that the second version is usable for some clients. |
Service meta data |
The service shall be described by meta data. At the very least the following information shall be recorded:
- interface name
- service name (name of the service implementing the above interface)
- version
- capabilities (for security manager checks)
- arbitrary key/value pairs (e.g. vendor )
|
Qt Service Framework shall return an object pointer castable to a specific C++ interface |
If the client knows the service interface it shall be able to cast the returned object pointer to the service interface. |
Qt application can bind to Qt Service Framework |
|
Notification on adding or removing of service provider |
The SFW shall provide notifications to clients when a new service/version of an interface is installed or removed. |
Qt Service Framework shall check capabilities on interface level and shall pass security session on to provider |
This enables security checks on service level and the provider itself can implement more fine-grained/per method security checks. However it is not a requirement to pass a security session to the service framework which is the most common use case for native applications. |
Qt Service Framework shall provide an application context that can be used to pass information between clients and service provider. |
This could be used to enable user feedback if provider checks capabilities on method level. |
Clients can request default provider for particular interface |
If the same interface is implemented by multiple providers the SFW shall be able to return the default service. |