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

QBluetoothSerialPortService Class Reference
[QtBluetoothModule]

The QBluetoothSerialPortService class is a Bluetooth service implementation for the Bluetooth Serial Port Profile. More...

    #include <QBluetoothSerialPortService>

Inherits QBluetoothAbstractService.

Public Functions

Additional Inherited Members


Detailed Description

The QBluetoothSerialPortService class is a Bluetooth service implementation for the Bluetooth Serial Port Profile.

The Bluetooth Serial Port Profile emulates a serial port over a Bluetooth connection. This is used on mobile phones to give complete raw access to the modem device. For instance, it can be used to dial and receive calls or to send an SMS.

This profile is the prerequisite for a few other Bluetooth services such as the Dial-up Networking or Fax profile, too.

An incoming Bluetooth connection is automatically forwarded to the modem emulator.

This class is part of the Qt Extended server and cannot be used by other QtopiaApplications.


Member Function Documentation

QBluetoothSerialPortService::QBluetoothSerialPortService ( const QString & serviceID, const QString & serviceName, const QBluetoothSdpRecord & record, QObject * parent = 0 )

Creates a Bluetooth serial port service and registers the service using record. This is frequently used when the Serial Port Profile is a prerequisite for another Bluetooth profile that needs access to the modem device, such as the Dial-up Networking Profile:

    // Use a file that contains the SDP record data in XML format for creating
    // a Dial-Up Networking service.
    QFile file( "dun.xml" );
    QBluetoothSdpRecord record = QBluetoothSdpRecord::fromDevice( &file );

    QBluetoothSerialPortService* srv = new QBluetoothSerialPortService( "DialupNetworking",
            tr("Dial-up Networking Service"), record );

The serviceID is the unique identifier for this Bluetooth service. The user visible (translatable) name for this service is serviceName. parent is the standard parent parameter defined by QObject.

A new service is registered in the Qt Extended Bluetooth framework when the constructor is called.

QBluetoothSerialPortService::~QBluetoothSerialPortService ()

Destructs this object.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3