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

QBluetoothScoSocket Class Reference
[QtBluetoothModule]

The QBluetoothScoSocket class represents an SCO client socket. More...

    #include <QBluetoothScoSocket>

Inherits QBluetoothAbstractSocket.

Public Functions

Additional Inherited Members


Detailed Description

The QBluetoothScoSocket class represents an SCO client socket.

The Bluetooth SCO protocol provides Synchronous Connection Oriented sockets. These sockets are mainly used for audio data transmission, and should not be used for reliable data transmission, as the underlying transport mechanisms might be using lossy compression techniques.

The address of the connected peer is fetched by calling remoteAddress(). The localAddress() returns the address of the local socket.

See also QBluetoothScoServer and QBluetoothAbstractSocket.


Member Function Documentation

QBluetoothScoSocket::QBluetoothScoSocket ( QObject * parent = 0 )

Constructs the QBluetoothScoSocket object. The QObject parent is given by parent.

QBluetoothScoSocket::~QBluetoothScoSocket ()

Destroys the socket.

bool QBluetoothScoSocket::connect ( const QBluetoothAddress & local, const QBluetoothAddress & remote )

Attempts to open a SCO connection between the local device with address local and the remote device with address remote. This function should generally return immediately, and the socket will enter into the ConnectingState.

The function returns true if the connection could be started, and false otherwise.

Note that the connection could still fail, the state of the socket will be sent in the stateChanged() signal.

See also state(), connected(), and waitForConnected().

QBluetoothAddress QBluetoothScoSocket::localAddress () const

Returns the local address of the opened SCO socket. If the socket is currently not connected, or the information could not be obtained, an invalid QBluetoothAddress is returned.

See also remoteAddress().

int QBluetoothScoSocket::mtu () const

This method returns the MTU of the opened SCO socket. If the socket is currently not connected, a 0 is returned.

QBluetoothAddress QBluetoothScoSocket::remoteAddress () const

Returns the remote address of the opened SCO socket. If the socket is currently not connected, or the information could not be obtained, an invalid QBluetoothAddress is returned.

See also localAddress().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3