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  · 

QBluetoothSdpQuery Class Reference
[QtBluetoothModule]

The QBluetoothSdpQuery class encapsulates operations performed by the SDAP profile. More...

    #include <QBluetoothSdpQuery>

Inherits QObject.

Public Functions

  • QBluetoothSdpQuery ( QObject * parent = 0 )
  • bool browseServices ( const QBluetoothAddress & remote, const QBluetoothLocalDevice & local )
  • bool searchServices ( const QBluetoothAddress & remote, const QBluetoothLocalDevice & local, QBluetooth::SDPProfile profile )
  • bool searchServices ( const QBluetoothAddress & remote, const QBluetoothLocalDevice & local, const QBluetoothSdpUuid & uuid )
  • 29 public functions inherited from QObject

Public Slots

  • 1 public slot inherited from QObject

Signals

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public type inherited from QObject
  • 4 static public members inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QBluetoothSdpQuery class encapsulates operations performed by the SDAP profile.

The QBluetoothSdpQuery class provides a way to use the facilities of the Bluetooth Service Discovery Application Profile. QBluetoothSdpQuery allows the client to browse all services or search for a specific service on a remote device. The results of the query are reported in the QBluetoothSdpQueryResult object.

See also QBluetoothSdpQueryResult and QBluetoothSdpRecord.


Member Function Documentation

QBluetoothSdpQuery::QBluetoothSdpQuery ( QObject * parent = 0 )

Constructs a new QBluetoothSdpQuery object. The default local device will be used for all SDP queries. parent is the parent QObject.

QBluetoothSdpQuery::~QBluetoothSdpQuery ()

Deconstructs a QBluetoothSdpQuery object.

bool QBluetoothSdpQuery::browseServices ( const QBluetoothAddress & remote, const QBluetoothLocalDevice & local )

Starts a new browse query of the remote device. This query will return all services which are listed in the public browse group of the device, and any subgroups which are children of the public browse group. The remote device to search is specified by the remote parameter. The local parameter specifies the local device to use for the query.

The method returns true if the request could be started successfully, and false otherwise.

Please note, that if you require all services, which might not be part of the public browse group, you can try to perform a search using the L2CAP UUID (0x0100).

    QBluetoothSdpQuery qsdap;
    qsdap.searchServices(QBluetoothAddress(remote), QBluetoothLocalDevice(), QBluetoothSdpUuid(0x0100u));

The searchComplete() signal will be sent once the search is finished. You can attempt to cancel SDP queries by using the cancelSearch() method.

See also searchComplete().

void QBluetoothSdpQuery::cancelSearch ()   [slot]

Cancels the SDAP query. The searchCancelled() signal will be sent once the search has been successfully cancelled. It is an error to start a new search after cancelling but before receiving the cancelled notification.

See also searchCancelled().

void QBluetoothSdpQuery::searchCancelled ()   [signal]

This signal is emitted whenever an SDAP search has been successfully cancelled.

See also cancelSearch() and searchComplete().

void QBluetoothSdpQuery::searchComplete ( const QBluetoothSdpQueryResult & result )   [signal]

This signal is emitted when an SDAP result has completed. The result of the scan is reported by the result parameter.

See also QBluetoothSdpQueryResult and searchCancelled().

bool QBluetoothSdpQuery::searchServices ( const QBluetoothAddress & remote, const QBluetoothLocalDevice & local, QBluetooth::SDPProfile profile )

Starts a new search query that searches for a specific Bluetooth service profile, e.g. OBEX Object PUSH. The remote device to search is specified by the remote parameter. The profile to search for is specified by the profile parameter. The local parameter specifies the local Bluetooth adapter to use for the query.

The method returns true if the request could be started successfully, and false otherwise. The searchComplete() signal will be sent once the search is finished. You can attempt to cancel SDP queries by using the cancelSearch() method.

See also searchComplete().

bool QBluetoothSdpQuery::searchServices ( const QBluetoothAddress & remote, const QBluetoothLocalDevice & local, const QBluetoothSdpUuid & uuid )

This is an overloaded member function, provided for convenience.

Starts a new search query. The remote device to search is specified by the remote parameter. All services with attribute UUIDs that match a UUID provided by the uuid parameter will be returned.

The method returns true if the request could be started successfully, and false otherwise. The searchComplete() signal will be sent once the search is finished. You can attempt to cancel SDP queries by using the cancelSearch() method.

See also searchComplete().

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