QBluetoothTransferRequest Class

The QBluetoothTransferRequest class stores information about a data transfer request. More...

Header: #include <QBluetoothTransferRequest>
qmake: QT += bluetooth
Since: Qt 5.2

This class was introduced in Qt 5.2.

Public Types

enum Attribute { DescriptionAttribute, TimeAttribute, TypeAttribute, LengthAttribute, NameAttribute }

Public Functions

QBluetoothTransferRequest(const QBluetoothTransferRequest &other)
QBluetoothTransferRequest(const QBluetoothAddress &address = QBluetoothAddress())
QBluetoothTransferRequest & operator=(const QBluetoothTransferRequest &other)
~QBluetoothTransferRequest()
QBluetoothAddress address() const
QVariant attribute(QBluetoothTransferRequest::Attribute code, const QVariant &defaultValue = QVariant()) const
void setAttribute(QBluetoothTransferRequest::Attribute code, const QVariant &value)
bool operator!=(const QBluetoothTransferRequest &other) const
bool operator==(const QBluetoothTransferRequest &other) const

Detailed Description

QBluetoothTransferRequest is part of the Bluetooth Transfer API and is the class holding the information necessary to initiate a transfer over Bluetooth.

See also QBluetoothTransferReply and QBluetoothTransferManager.

Member Type Documentation

enum QBluetoothTransferRequest::Attribute

Attribute codes for QBluetoothTransferRequest and QBluetoothTransferReply.

Constant Value Description
QBluetoothTransferRequest::DescriptionAttribute 0 A textual description of the object being transferred. May be displayed in the UI of the remote device.
QBluetoothTransferRequest::TimeAttribute 1 Time attribute of the object being transferred.
QBluetoothTransferRequest::TypeAttribute 2 MIME type of the object being transferred.
QBluetoothTransferRequest::LengthAttribute 3 Length in bytes of the object being transferred.
QBluetoothTransferRequest::NameAttribute 4 Name of the object being transferred. May be displayed in the UI of the remote device.

Member Function Documentation

QBluetoothTransferRequest::QBluetoothTransferRequest(const QBluetoothTransferRequest &other)

Constructs a new Bluetooth transfer request that is a copy of other.

QBluetoothTransferRequest::QBluetoothTransferRequest(const QBluetoothAddress &address = QBluetoothAddress())

Constructs a new Bluetooth transfer request to the device with address.

QBluetoothTransferRequest &QBluetoothTransferRequest::operator=(const QBluetoothTransferRequest &other)

Creates a copy of other.

QBluetoothTransferRequest::~QBluetoothTransferRequest()

Destorys the Bluetooth transfer request.

QBluetoothAddress QBluetoothTransferRequest::address() const

Returns the address associated with the Bluetooth transfer request.

QVariant QBluetoothTransferRequest::attribute(QBluetoothTransferRequest::Attribute code, const QVariant &defaultValue = QVariant()) const

Returns the attribute associated with code. If the attribute has not been set, it returns defaultValue.

See also setAttribute() and QBluetoothTransferRequest::Attribute.

void QBluetoothTransferRequest::setAttribute(QBluetoothTransferRequest::Attribute code, const QVariant &value)

Sets the attribute associated with code to value. If the attribute is already set, the previous value is discarded. If value is an invalid QVariant, the attribute is unset.

See also attribute() and QBluetoothTransferRequest::Attribute.

bool QBluetoothTransferRequest::operator!=(const QBluetoothTransferRequest &other) const

Returns true if this object is not the same as other.

See also operator==().

bool QBluetoothTransferRequest::operator==(const QBluetoothTransferRequest &other) const

Returns true if this object is the same as other.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.14/qbluetoothtransferrequest.html