QBluetoothZero  2.0
QBtServiceAdvertiser Class Reference

#include <QBtServiceAdvertiser.h>

List of all members.

Public Types

enum  ErrorCodes { FeatureNotSupported }


void advertisingStarted (const QBtService &service)
void advertisingStopped ()
void error (QBtServiceAdvertiser::ErrorCodes code)

Public Member Functions

 QBtServiceAdvertiser (QObject *parent)
 ~QBtServiceAdvertiser ()
void startAdvertising (const QBtService &service)
void stopAdvertising ()
void updateAvailability (bool aAvailable)


class QBtServiceAdvertiserPrivate

Detailed Description

Class responsible to advertise a given bluetooth service.

After the instantiation of the class, startAdvertising(const QBtService&) can be callled to start advertising the given bluetooth service. If successfull then advertisingStarted(const QBtService&) signal is emitted.

At any time stopAdvertising() can be called to stop the advertising and remove the registered service from the SDP database. If successfull then advertisingStopped() is emitted.

If user wants to temporarily deactive the service advertisement then he can call updateAvailability(bool) (instead of the stopAdvertising() that stops the advertising permanently).

In case of error, error(ErrorCodes) signal is emitted.

For integrity reasons, at destruction stops the advertising causing the service to be deleted from the SDP database.

NOTE: Currently there is no implementation on the Windows platform so after the intatiation of this object, any call to any function will emit an error(QBtServiceAdvertiser::FeatureNotSupported) signal.

Member Enumeration Documentation


Constructor & Destructor Documentation

QBtServiceAdvertiser::QBtServiceAdvertiser ( QObject *  parent)
QBtServiceAdvertiser::~QBtServiceAdvertiser ( )

Member Function Documentation

void QBtServiceAdvertiser::advertisingStarted ( const QBtService service) [signal]

The signal is emitted if the transmittion of the service is started

serviceA reference to an object containing all the info of the service being transmitted.
void QBtServiceAdvertiser::advertisingStopped ( ) [signal]

The signal is emitted when the transmittion of the service ends.

void QBtServiceAdvertiser::error ( QBtServiceAdvertiser::ErrorCodes  code) [signal]

Emitted in case of error (not implemented).

void QBtServiceAdvertiser::startAdvertising ( const QBtService service)

Starts the service advertiser.

servicethe service class that contains all the necessery information for transmitting the service
void QBtServiceAdvertiser::stopAdvertising ( )

Stops the transmittion of the service running (if any)

void QBtServiceAdvertiser::updateAvailability ( bool  aAvailable)

Change the availability of the service.

aAvailableIf true, the service is transmitted.

Friends And Related Function Documentation

friend class QBtServiceAdvertiserPrivate [friend]

The documentation for this class was generated from the following file: