Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QServiceInterfaceDescriptor Class

The QServiceInterfaceDescriptor class identifies a service implementation. More...

 #include <QServiceInterfaceDescriptor>

Public Types

enum Attribute { Capabilities, Location, ServiceDescription, InterfaceDescription, ServiceType }

Public Functions

QServiceInterfaceDescriptor()
QServiceInterfaceDescriptor(const QServiceInterfaceDescriptor & other)
QServiceInterfaceDescriptor(const QVariantMap & map)
~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

Detailed Description

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.

[Missing image qserviceinterfacedescriptor.png]

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.

Namespaces

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.

Member Type Documentation

enum QServiceInterfaceDescriptor::Attribute

This enum describes the possible attribute types which can be attached to a QServiceInterfaceDescriptor.

ConstantValueDescription
QServiceInterfaceDescriptor::Capabilities0The 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::Location1This 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::ServiceDescription2This attribute provides a general description for the service.
QServiceInterfaceDescriptor::InterfaceDescription3This attribute provides a description for the interface implementation.
QServiceInterfaceDescriptor::ServiceType4This attribute specifies the QService::Type that the service is being provided.

Member Function Documentation

QServiceInterfaceDescriptor::QServiceInterfaceDescriptor()

Creates a new QServiceInterfaceDescriptor.

QServiceInterfaceDescriptor::QServiceInterfaceDescriptor(const QServiceInterfaceDescriptor & other)

Creates a copy of QServiceInterfaceDescriptor contained in other.

QServiceInterfaceDescriptor::QServiceInterfaceDescriptor(const QVariantMap & map)

Create a minimum QServiceInterfaceDescriptor from a hard coded serivce. Useful if no database/metadata storage is available. Different platforms may have different requirements

QServiceInterfaceDescriptor::~QServiceInterfaceDescriptor()

Destroys the QServiceInterfaceDescriptor object.

QVariant QServiceInterfaceDescriptor::attribute(QServiceInterfaceDescriptor::Attribute which) const

Returns the value for the attribute which; otherwise returns an invalid QVariant.

QString QServiceInterfaceDescriptor::customAttribute(const QString & which) const

Returns the value for the custom attribute which; otherwise returns a null string.

QStringList QServiceInterfaceDescriptor::customAttributes() const

Returns a list of custom attributes attached to the service.

QString QServiceInterfaceDescriptor::interfaceName() const

Returns the name of the interface that is implemented.

bool QServiceInterfaceDescriptor::isValid() const

Returns true if this descriptor is valid; otherwise returns false.

int QServiceInterfaceDescriptor::majorVersion() const

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.

int QServiceInterfaceDescriptor::minorVersion() const

Returns the version of the implementation.

QService::Scope QServiceInterfaceDescriptor::scope() const

Returns true if this implementation is provided for all users on the system.

See also QService::Scope.

QString QServiceInterfaceDescriptor::serviceName() const

Returns the name of service that provides this implementation.

bool QServiceInterfaceDescriptor::operator!=(const QServiceInterfaceDescriptor & other) const

Compares a QServiceInterfaceDescriptor to other. Returns true if they are not equal and false otherwise.

QServiceInterfaceDescriptor & QServiceInterfaceDescriptor::operator=(const QServiceInterfaceDescriptor & other)

Copies the content of the QServiceInterfaceDescriptor object contained in other into this one.

bool QServiceInterfaceDescriptor::operator==(const QServiceInterfaceDescriptor & other) const

Compares a QServiceInterfaceDescriptor to other. Returns true if they are equal and false otherwise.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web