Home · All Classes · Grouped Classes · Annotated · Functions

QDSServiceInfo Class Reference

The QDSServiceInfo class encapsulates the description of a Qtopia Data Sharing (QDS) service More...

    #include <QDSServiceInfo>

Public Functions


Detailed Description

The QDSServiceInfo class encapsulates the description of a Qtopia Data Sharing (QDS) service

Each QDS service is described by:

Each QDS service must have a unique combination of QDS service name and Qtopia service. The QDS service name must only contain alphanumeric characters.

The description for a QDS service is obtained from the service file <Qtopia Runtime Prefix>/etc/qds/<qtopia_service>. Each QDS service in a Qtopia service should be included in the one service file, and should follow the form below:

    [Translation]
    File=QtopiaServices
    Context=Contacts
    [setContactImage]
    RequestDataType="image/x-qpixmap"
    ResponseDataType=
    Attributes="Set picture;Upload"
    Depends=
    Description[]=This service sets a contacts image
    Icon=AddressBook
    [beamVCard]
    RequestDataType="text/x-vcard"
    ResponseDataType=
    Attributes="beam;ir;infrared;send"
    Depends="Infrared"
    Description[]=Beam VCard
    Icon=beam

A QDS service can support multiple data types for both the request and response data. The types can be listed individually in the service file, and wildcards can be used. This is demonstrated in the service file below:

    [Translation]
    File=QtopiaServices
    Context=Contacts
    [setContactImage]
    RequestDataType="image*"
    ResponseDataType=
    Attributes="Set picture;Upload"
    Depends=
    Description[]=This service sets a contacts image
    Icon=AddressBook
    [beamVCard]
    RequestDataType="text/x-vcard;text/plain;text/html"
    ResponseDataType=
    Attributes="beam;ir;infrared;send"
    Depends="Infrared"
    Description[]=Beam VCard
    Icon=beam

The QDS service should also be included in the actions section of the Qtopia service description, for the QDS services list above, the <Qtopia Runtime Prefix>/services/Contacts.service file would look like:

    [Translation]
    File=QtopiaServices
    Context=Contacts
    [Service]
    Actions = "setContactImage(QString);beamVCard(QDSActionRequest)"
    Icon = addressbook/AddressBook
    Name[]=Contacts

See also QDSAction, QDSActionRequest, QDSServices, and Qtopia Data Sharing (QDS).


Member Function Documentation

QDSServiceInfo::QDSServiceInfo ()

Constructs an empty QDSServiceInfo object.

QDSServiceInfo::QDSServiceInfo ( const QDSServiceInfo & other )

Constructs a deep copy of other.

QDSServiceInfo::QDSServiceInfo ( const QString & name, const QString & service )

Constructs a QDSServiceInfo object for the QDS service name and the Qtopia service service.

QDSServiceInfo::~QDSServiceInfo ()

Destroys the QDSServiceInfo object.

QStringList QDSServiceInfo::attributes () const

Returns the attributes of the service.

QString QDSServiceInfo::description () const

Returns the description of the service.

QString QDSServiceInfo::icon () const

Returns the icon of the service.

bool QDSServiceInfo::isAvailable () const

Returns true if the QDS service is available; otherwise returns false. The QDS service is available if all dependent features are currently available in QtopiaFeatures. A QDS service must be available for a QDSAction request to be successful.

bool QDSServiceInfo::isValid () const

Returns true if the QDSServiceInfo object describes a valid QDS service; otherwise returns false. For this to be true a correctly formatted service file is required.

QString QDSServiceInfo::name () const

Returns the name of the service.

QStringList QDSServiceInfo::requestDataTypes () const

Returns the IDs for supported request data types.

See also supportsRequestDataType() and responseDataTypes().

QStringList QDSServiceInfo::responseDataTypes () const

Returns the IDs for supported response data types.

See also supportsResponseDataType() and requestDataTypes().

QString QDSServiceInfo::serviceId () const

Returns the QDS service ID.

QString QDSServiceInfo::serviceName () const

Returns the translated name of the QDS service.

bool QDSServiceInfo::supportsRequestDataType ( const QMimeType & type = QMimeType( QString() ) ) const

Returns true if the described service supports request data of type.

See also requestDataTypes() and supportsResponseDataType().

bool QDSServiceInfo::supportsResponseDataType ( const QMimeType & type = QMimeType( QString() ) ) const

Returns true if the described service supports response data of type.

See also responseDataTypes() and supportsRequestDataType().

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

Returns true if other doesn't describe the same QDS service; otherwise returns false.

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

Makes a deep copy of other and assigns it to this QDSServiceInfo object. Returns a reference to this QDSServiceInfo object.

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

Returns true if other describes the same QDS service; otherwise returns false.


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3