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  · 

QBluetoothRemoteDevice Class Reference
[QtBluetoothModule]

The QBluetoothRemoteDevice class represents a remote bluetooth device. More...

    #include <QBluetoothRemoteDevice>

Public Functions


Detailed Description

The QBluetoothRemoteDevice class represents a remote bluetooth device.

This class holds various device attributes of the remote device. These attributes are device address, device class, manufacturer, etc. The most common source of all remote device information is the discovery process. This process must be initiated by using the QBluetoothLocalDevice::discoverDevices() method and hooking onto the appropriate signals.

Please note that depending on the source that provided the QBluetoothRemoteDevice instance, some or all of the information might not be available. In general, address, device major, device minor and service class attributes should always be available. Other attributes might require a connection be established to the remote device, and thus might not be available. In this case, default constructed values will be returned.

See also QBluetoothAddress and QBluetoothLocalDevice.


Member Function Documentation

QBluetoothRemoteDevice::QBluetoothRemoteDevice ( const QBluetoothAddress & address )

Constructs a new QBluetoothRemoteDevice object. The attributes are given default values. The address parameter defines the address of the remote device.

QBluetoothRemoteDevice::QBluetoothRemoteDevice ( const QBluetoothAddress & address, const QString & name, const QString & version, const QString & revision, const QString & manufacturer, const QString & company, int rssi, QBluetooth::DeviceMajor devMajor, quint8 devMinor, QBluetooth::ServiceClasses serviceClasses )

Constructs a new QBluetoothRemoteDevice object.

  • address defines the address of the remote device.
  • name defines the name of the remote device.
  • version defines the Bluetooth protocol version this device supports.
  • revision defines the manufacturer specific revision of the device
  • manufacturer defines the manufacturer string
  • company defines the company producing the device
  • rssi defines the Receiver Signal Strength (Indicator)
  • devMajor defines the major device number
  • devMinor defines the minor device number
  • serviceClasses defines the bitmap of all device classes associated with this device.

QBluetoothRemoteDevice::QBluetoothRemoteDevice ( const QBluetoothRemoteDevice & other )

Constructs a new QBluetoothRemoteDevice object from other.

QBluetoothRemoteDevice::~QBluetoothRemoteDevice ()

Deconstructs a QBluetoothRemoteDevice object.

QBluetoothAddress QBluetoothRemoteDevice::address () const

Returns the Bluetooth Address of the remote device.

QString QBluetoothRemoteDevice::company () const

Returns the company of the remote bluetooth device. This is generally the brand name of the company under which the device is sold. If the company attribute is unknown, returns a null string.

Note that the underlying HCI daemon requires the IEEE standard oui.txt file in order to read the company information correctly. This file can be downloaded from the IEEE site. The HCI daemon expects the file to be placed at /usr/share/misc/oui.txt.

See also setCompany().

QBluetooth::DeviceMajor QBluetoothRemoteDevice::deviceMajor () const

Returns the major device number of the remote device.

See also deviceMajorAsString() and setDeviceMajor().

QString QBluetoothRemoteDevice::deviceMajorAsString () const

Returns the major device number interpreted as a translated string.

See also deviceMajor() and setDeviceMajor().

quint8 QBluetoothRemoteDevice::deviceMinor () const

Returns the minor device number of the remote device.

See also deviceMinorAsString() and setDeviceMinor().

QString QBluetoothRemoteDevice::deviceMinorAsString () const

Returns the minor device number of the remote device as a human readable string.

See also deviceMinor() and setDeviceMinor().

QString QBluetoothRemoteDevice::manufacturer () const

Returns the manufacturer of the remote bluetooth device. If the manufacturer is unknown, returns a null string.

See also setManufacturer().

QString QBluetoothRemoteDevice::name () const

Returns the human readable name of the remote device. If the name is unknown, an empty string is returned. For display purposes, it is best to display the address of the device in this case.

Each local Bluetooth adapter might have an alias associated with the remote device.

See also setName() and QBluetoothLocalDevice::remoteAlias().

QString QBluetoothRemoteDevice::revision () const

Returns the revision of the remote bluetooth device. This is generally manufacturer specific information. If the revision is unknown, a null string is returned.

See also setRevision().

int QBluetoothRemoteDevice::rssi () const

Returns the RSSI (Receiver Signal Strength Indicator) of the remote device at the time of the last device discovery.

See also setRssi().

QBluetooth::ServiceClasses QBluetoothRemoteDevice::serviceClasses () const

Returns the service classes for the remote device.

See also serviceClassesAsString() and setServiceClasses().

QStringList QBluetoothRemoteDevice::serviceClassesAsString () const

Returns the service classes for the remote device as a list of translated strings.

See also serviceClasses() and setServiceClasses().

void QBluetoothRemoteDevice::setCompany ( const QString & company )

Sets the company attribute of the remote device to company.

In general, you should not need to use this function.

See also company().

void QBluetoothRemoteDevice::setDeviceMajor ( QBluetooth::DeviceMajor deviceMajor )

Sets the major device attribute of the remote device to deviceMajor.

In general, you should not need to use this function.

See also deviceMajor() and deviceMajorAsString().

void QBluetoothRemoteDevice::setDeviceMinor ( quint8 deviceMinor )

Sets the minor device attribute of the remote device to deviceMinor.

See also deviceMinor() and deviceMinorAsString().

void QBluetoothRemoteDevice::setManufacturer ( const QString & manufacturer )

Sets the manufacturer attribute of the remote device to manufacturer.

In general, you should not need to use this function.

See also manufacturer().

void QBluetoothRemoteDevice::setName ( const QString & name )

Sets the name attribute of the remote device to name.

In general, you should not need to use this function.

See also name().

void QBluetoothRemoteDevice::setRevision ( const QString & revision )

Sets the revision attribute of the remote device to revision. Clients should not need to use this function.

See also revision().

void QBluetoothRemoteDevice::setRssi ( int rssi )

Sets the RSSI (Receiver Signal Strength Indicator) of the remote device rssi. This should be the RSSI of the device at the time of the last discovery.

See also rssi().

void QBluetoothRemoteDevice::setServiceClasses ( QBluetooth::ServiceClasses serviceClasses )

Sets the service classes attribute of the remote device to serviceClasses.

In general, you should not need to use this function.

See also serviceClasses() and serviceClassesAsString().

void QBluetoothRemoteDevice::setVersion ( const QString & version )

Sets the version attribute of the remote device to version.

In general, you should not need to use this function.

See also version().

QString QBluetoothRemoteDevice::version () const

Returns the Bluetooth protocol version the remote device supports. This can be for instance, 1.0, 1.1, 1.2, etc.

See also setVersion().

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

Compares this remote device against the remote device given by other. Two remote devices are considered not equal if the addresses are not equal.

Returns false if the devices are equal, and true otherwise.

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

Assigns the contents of other to the current object.

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

Compares this remote device against the remote device given by other. Two remote devices are considered to be the same if they have the same Bluetooth address.

Returns true if the devices are the same.

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 64
  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. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Quarterly au hasard

Logo

Abusons de QMap

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 qtextended4.4
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