Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QBluetoothSdpQuery Class Reference
[QtBluetoothModule]

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

    #include <QBluetoothSdpQuery>

Inherits QObject.

Public Functions

Public Slots

Signals

Additional Inherited Members


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().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3