The QServiceInterfaceDescriptor class identifies a service implementation. More...
#include <QServiceInterfaceDescriptor>
This class was introduced in Qt Mobility 1.0.
enum | Attribute { Capabilities, Location, ServiceDescription, InterfaceDescription, ServiceType } |
QServiceInterfaceDescriptor () | |
QServiceInterfaceDescriptor ( const QServiceInterfaceDescriptor & other ) | |
~QServiceInterfaceDescriptor () | |
QVariant | attribute ( QServiceInterfaceDescriptor::Attribute which ) const |
QString | customAttribute ( const QString & which ) const |
QStringList | customAttributes () const |
QString | interfaceName () const |
bool | isValid () const |
int | majorVersion () const |
int | minorVersion () const |
QService::Scope | scope () const |
QString | serviceName () const |
bool | operator!= ( const QServiceInterfaceDescriptor & other ) const |
QServiceInterfaceDescriptor & | operator= ( const QServiceInterfaceDescriptor & other ) |
bool | operator== ( const QServiceInterfaceDescriptor & other ) const |
QDataStream & | operator<< ( QDataStream & out, const QServiceInterfaceDescriptor & dc ) |
QDataStream & | operator>> ( QDataStream & in, QServiceInterfaceDescriptor & dc ) |
The QServiceInterfaceDescriptor class identifies a service implementation.
A service can implement multiple interfaces and each interface can have multiple implementations. The QServiceInterfaceDescriptor class enscapsulates this information, as illustrated by the diagram below.
The major version tag indicates the interface version and the minor version tag identifies the implementation version. Subsequent versions of the same interface must be binary compatible to previous versions of the same interface.
In the above example service A and B implement the interface com.nokia.qt.x. In fact Service A provides two different implementations for the very same interface. This is indicated by the changed minor version number. Although Service B is using the same interface it's implementation actually utilizes the second version of the interface com.nokia.qt.x. Binary compatibility guarantees that clients who know version 1 can utilize version 2. If an existing interface has to be changed in a non-compatible way a new interface (name) is required.
A QServiceInterfaceDescriptor (the quadruble of service name, interface name, interface version and implementation version) uniquely identifies a service implementation on a device. Interface names follow the java namespace convention.
The namespace com.nokia.qt.* is reserved for future Qt development.
See also QServiceFilter and QServiceManager.
This enum describes the possible attribute types which can be attached to a QServiceInterfaceDescriptor.
Constant | Value | Description |
---|---|---|
QServiceInterfaceDescriptor::Capabilities | 0 | The capabilities attribute is a QStringList and describes the capabilities that a service client would require to use the service if capability checks are enforced. |
QServiceInterfaceDescriptor::Location | 1 | This attribute points to either the location where the plug-in providing this service is stored or where the name of the service IPC path is found. If the service is plug-in based the location is the name and/or path of the plugin. If the service is IPC based the location is the name of the socket address. |
QServiceInterfaceDescriptor::ServiceDescription | 2 | This attribute provides a general description for the service. |
QServiceInterfaceDescriptor::InterfaceDescription | 3 | This attribute provides a description for the interface implementation. |
QServiceInterfaceDescriptor::ServiceType | 4 | This attribute specifies the QService::Type that the service is being provided. |
Creates a new QServiceInterfaceDescriptor.
Creates a copy of QServiceInterfaceDescriptor contained in other.
This function was introduced in Qt Mobility 1.0.
Destroys the QServiceInterfaceDescriptor object.
Returns the value for the attribute which; otherwise returns an invalid QVariant.
This function was introduced in Qt Mobility 1.0.
Returns the value for the custom attribute which; otherwise returns a null string.
This function was introduced in Qt Mobility 1.0.
Returns a list of custom attributes attached to the service.
This function was introduced in Qt Mobility 1.0.
Returns the name of the interface that is implemented.
This function was introduced in Qt Mobility 1.0.
Returns true if this descriptor is valid; otherwise returns false.
This function was introduced in Qt Mobility 1.0.
Returns the version of the interface.
Subsequent versions of an interface are binary compatible to previous versions of the same interface. If an interface is broken it must use a new interface name.
This function was introduced in Qt Mobility 1.0.
Returns the version of the implementation.
This function was introduced in Qt Mobility 1.0.
Returns true if this implementation is provided for all users on the system.
This function was introduced in Qt Mobility 1.0.
See also QService::Scope.
Returns the name of service that provides this implementation.
This function was introduced in Qt Mobility 1.0.
Compares a QServiceInterfaceDescriptor to other. Returns true if they are not equal and false otherwise.
This function was introduced in Qt Mobility 1.0.
Copies the content of the QServiceInterfaceDescriptor object contained in other into this one.
This function was introduced in Qt Mobility 1.0.
Compares a QServiceInterfaceDescriptor to other. Returns true if they are equal and false otherwise.
This function was introduced in Qt Mobility 1.0.
Writes service interface descriptor dc to the stream out and returns a reference to the stream.
This function was introduced in Qt Mobility 1.0.
Reads a service interface descriptor into dc from the stream in and returns a reference to the stream.
This function was introduced in Qt Mobility 1.0.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.