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  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QBluetoothServiceInfo Class Reference

The QBluetoothServiceInfo class provides information about services. More...

 #include <QBluetoothServiceInfo>

Public Types

class Alternative
class Sequence
enum AttributeId { ServiceClassIds, ServiceId, ProtocolDescriptorList, BrowseGroupList, ..., ServiceProvider }
enum Protocol { UnknownProtocol, L2capProtocol, RfcommProtocol }

Public Functions

QBluetoothServiceInfo ()
QBluetoothServiceInfo ( const QBluetoothServiceInfo & other )
~QBluetoothServiceInfo ()
QVariant attribute ( quint16 attributeId ) const
QList<quint16> attributes () const
bool contains ( quint16 attributeId ) const
QBluetoothDeviceInfo device () const
bool isComplete () const
bool isRegistered () const
bool isValid () const
QBluetoothServiceInfo::Sequence protocolDescriptor ( QBluetoothUuid::ProtocolUuid protocol ) const
int protocolServiceMultiplexer () const
bool registerService () const
void removeAttribute ( quint16 attributeId )
int serverChannel () const
quint8 serviceAvailability () const
QList<QBluetoothUuid> serviceClassUuids () const
QString serviceDescription () const
QString serviceName () const
QString serviceProvider () const
QBluetoothUuid serviceUuid () const
void setAttribute ( quint16 attributeId, const QVariant & value )
void setAttribute ( quint16 attributeId, const QBluetoothUuid & value )
void setAttribute ( quint16 attributeId, const QBluetoothServiceInfo::Sequence & value )
void setAttribute ( quint16 attributeId, const QBluetoothServiceInfo::Alternative & value )
void setDevice ( const QBluetoothDeviceInfo & device )
void setServiceAvailability ( quint8 availability )
void setServiceDescription ( const QString & description )
void setServiceName ( const QString & name )
void setServiceProvider ( const QString & provider )
void setServiceUuid ( const QBluetoothUuid & uuid )
QBluetoothServiceInfo::Protocol socketProtocol () const
bool unregisterService () const
QBluetoothServiceInfo & operator= ( const QBluetoothServiceInfo & other )

Detailed Description

The QBluetoothServiceInfo class provides information about services.

QBluetoothServiceInfo provides information about a service offered by a Bluetooth device.

Member Type Documentation

enum QBluetoothServiceInfo::AttributeId

Bluetooth service attributes.

ConstantValueDescription
QBluetoothServiceInfo::ServiceClassIds0x0001UUIDs of service classes that the service conforms to.
QBluetoothServiceInfo::ServiceId0x0003UUID that uniquely identifies the service.
QBluetoothServiceInfo::ProtocolDescriptorList0x0004List of protocols used by the service.
QBluetoothServiceInfo::BrowseGroupList0x0005List of browse groups the service is in.
QBluetoothServiceInfo::ServiceAvailability0x0008Value indicating the availability of the service.
QBluetoothServiceInfo::PrimaryLanguageBase0x0100Base index for primary language text descriptors.
QBluetoothServiceInfo::ServiceRecordHandle0x0000Specifies a service record from which attributes can be retrieved
QBluetoothServiceInfo::ServiceNamePrimaryLanguageBase + 0x0000Name of the Bluetooth service in the primary language.
QBluetoothServiceInfo::ServiceDescriptionPrimaryLanguageBase + 0x0001Description of the Bluetooth service in the primary language.
QBluetoothServiceInfo::ServiceProviderPrimaryLanguageBase + 0x0002Name of the company / entity that provides the Bluetooth service primary language.

enum QBluetoothServiceInfo::Protocol

This enum describes the socket protocol used by the service.

ConstantValueDescription
QBluetoothServiceInfo::UnknownProtocol0The service uses an unknown socket protocol.
QBluetoothServiceInfo::L2capProtocol1The service uses the L2CAP socket protocol.
QBluetoothServiceInfo::RfcommProtocol2The service uses the RFCOMM socket protocol.

Member Function Documentation

QBluetoothServiceInfo::QBluetoothServiceInfo ()

Construct a new invalid QBluetoothServiceInfo;

QBluetoothServiceInfo::QBluetoothServiceInfo ( const QBluetoothServiceInfo & other )

Construct a new QBluetoothServiceInfo that is a copy of other.

QBluetoothServiceInfo::~QBluetoothServiceInfo ()

Destroys the QBluetoothServiceInfo object.

QVariant QBluetoothServiceInfo::attribute ( quint16 attributeId ) const

Returns the value of the attribute attributeId.

See also setAttribute().

QList<quint16> QBluetoothServiceInfo::attributes () const

Returns a list of all attribute ids that this service info has.

bool QBluetoothServiceInfo::contains ( quint16 attributeId ) const

Returns true if the service info contains the attribute attributeId; otherwise returns false.

QBluetoothDeviceInfo QBluetoothServiceInfo::device () const

Returns the address of the Bluetooth device that provides this service.

See also setDevice().

bool QBluetoothServiceInfo::isComplete () const

Returns true if the Bluetooth service info object is considered complete; otherwise returns false.

A complete service info contains a ProtocolDescriptorList attribute.

bool QBluetoothServiceInfo::isRegistered () const

Returns true if the service info is registered with the platforms service discovery protocol (SDP) implementation; otherwise returns false.

bool QBluetoothServiceInfo::isValid () const

Returns true if the Bluetooth service info object is valid; otherwise returns false.

An invalid Bluetooth service info has no attributes.

QBluetoothServiceInfo::Sequence QBluetoothServiceInfo::protocolDescriptor ( QBluetoothUuid::ProtocolUuid protocol ) const

Returns the protocol parameters as a QBluetoothServiceInfo::Sequence for protocol protocol.

An empty QBluetoothServiceInfo::Sequence is returned if protocol is not supported.

int QBluetoothServiceInfo::protocolServiceMultiplexer () const

This is a convenience function. Returns the protocol/service multiplexer for services which support the L2CAP protocol. Otherwise returns -1.

This function is equivalent to extracting the information from the QBluetoothServiceInfo::Sequence returned from QBluetoothServiceInfo::attribute(QBluetoothServiceInfo::ProtocolDescriptorList).

bool QBluetoothServiceInfo::registerService () const

Registers this service with the platforms service discovery protocol (SDP) implementation, making it findable by other devices when they perform service discovery. Returns true if the service is successfully registered, otherwise returns false. Once registered changes to the record cannot be made. The service must be unregistered and registered.

void QBluetoothServiceInfo::removeAttribute ( quint16 attributeId )

Removes the attribute attributeId from this service info.

int QBluetoothServiceInfo::serverChannel () const

This is a convenience function. Returns the server channel for services which support the RFCOMM protocol. Otherwise returns -1.

This function is equivalent to extracting the information from the QBluetoothServiceInfo::Sequence returned from QBluetoothServiceInfo::attribute(QBluetootherServiceInfo::ProtocolDescriptorList).

quint8 QBluetoothServiceInfo::serviceAvailability () const

This is a convenience function. It is equivalent to calling attribute(QBluetoothServiceInfo::ServiceAvailability).toUInt().

Returns the availability of the service.

See also setServiceAvailability() and attribute().

QList<QBluetoothUuid> QBluetoothServiceInfo::serviceClassUuids () const

This is a convenience function. It is equivalent to calling attribute(QBluetoothServiceInfo::ServiceClassIds).value<QList<QBluetoothUuid> >().

Returns a list of UUIDs describing the service classes that this service conforms to.

See also attribute().

QString QBluetoothServiceInfo::serviceDescription () const

This is a convenience function. It is equivalent to calling attribute(QBluetoothServiceInfo::ServiceDescription).toString().

Returns the service description in the primary language.

See also setServiceDescription() and attribute().

QString QBluetoothServiceInfo::serviceName () const

This is a convenience function. It is equivalent to calling attribute(QBluetoothServiceInfo::ServiceName).toString().

Returns the service name in the primary language.

See also setServiceName() and attribute().

QString QBluetoothServiceInfo::serviceProvider () const

This is a convenience function. It is equivalent to calling attribute(QBluetoothServiceInfo::ServiceProvider).toString().

Returns the service provider in the primary language.

See also setServiceProvider() and attribute().

QBluetoothUuid QBluetoothServiceInfo::serviceUuid () const

This is a convenience function. It is equivalent to calling attribute(QBluetoothServiceInfo::ServiceId).value<QBluetoothUuid>().

Returns the UUID of the service.

See also setServiceUuid() and attribute().

void QBluetoothServiceInfo::setAttribute ( quint16 attributeId, const QVariant & value )

Sets the attribute identified by attributeId to value.

IF the service info is registered with the platforms SDP database the database entry is also updated.

See also attribute(), isRegistered(), and registerService().

void QBluetoothServiceInfo::setAttribute ( quint16 attributeId, const QBluetoothUuid & value )

This is a convenience function.

Sets the attribute identified by attributeId to value.

void QBluetoothServiceInfo::setAttribute ( quint16 attributeId, const QBluetoothServiceInfo::Sequence & value )

This is a convenience function.

Sets the attribute identified by attributeId to value.

void QBluetoothServiceInfo::setAttribute ( quint16 attributeId, const QBluetoothServiceInfo::Alternative & value )

This is a convenience function.

Sets the attribute identified by attributeId to value.

void QBluetoothServiceInfo::setDevice ( const QBluetoothDeviceInfo & device )

Sets the Bluetooth device that provides this service to device.

See also device().

void QBluetoothServiceInfo::setServiceAvailability ( quint8 availability )

This is a convenience function. It is equivalent to calling setAttribute(QBluetoothServiceInfo::ServiceAvailability, availability).

Sets the availabiltiy of the service to availability.

See also serviceAvailability() and setAttribute().

void QBluetoothServiceInfo::setServiceDescription ( const QString & description )

This is a convenience function. It is equivalent to calling setAttribute(QBluetoothServiceInfo::ServiceDescription, description).

Sets the service description in the primary language to description.

See also serviceDescription() and setAttribute().

void QBluetoothServiceInfo::setServiceName ( const QString & name )

This is a convenience function. It is equivalent to calling setAttribute(QBluetoothServiceInfo::ServiceName, name).

Sets the service name in the primary language to name.

See also serviceName() and setAttribute().

void QBluetoothServiceInfo::setServiceProvider ( const QString & provider )

This is a convenience function. It is equivalent to calling setAttribute(QBluetoothServiceInfo::ServiceProvider, provider).

Sets the service provider in the primary language to provider.

See also serviceProvider() and setAttribute().

void QBluetoothServiceInfo::setServiceUuid ( const QBluetoothUuid & uuid )

This is a convenience function. It is equivalent to calling setAttribute(QBluetoothServiceInfo::ServiceId, uuid).

Sets the service UUID to uuid.

See also serviceUuid() and setAttribute().

QBluetoothServiceInfo::Protocol QBluetoothServiceInfo::socketProtocol () const

Returns the protocol that this service uses.

bool QBluetoothServiceInfo::unregisterService () const

Unregisters this service with the platforms service discovery protocol (SDP) implementation.

This service will not longer be findable by other devices via service discovery.

Returns true if the service is successfully unregistered, otherwise returns false.

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

Makes a copy of the other and assigns it to this QBluetoothServiceInfo object.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 82
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 6
Page suivante

Le Qt Quarterly au hasard

Logo

Qt s'associe avec le nouvel OS MeeGo

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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 qtmobility-1.2
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