QBluetoothTransferRequest Class

The QBluetoothTransferRequest class stores information about a data transfer request. 更多...

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

公共类型

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

公共函数

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

详细描述

The QBluetoothTransferRequest class stores information about a data transfer request.

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

另请参阅 QBluetoothTransferReply and QBluetoothTransferManager .

成员类型文档编制

enum QBluetoothTransferRequest:: Attribute

Attribute codes for QBluetoothTransferRequest and QBluetoothTransferReply .

常量 描述
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.

成员函数文档编制

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

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

QBluetoothTransferRequest:: QBluetoothTransferRequest (const QBluetoothTransferRequest & other )

Constructs a new Bluetooth transfer request that is 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 code , const QVariant & defaultValue = QVariant()) const

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

另请参阅 setAttribute () 和 QBluetoothTransferRequest::Attribute .

void QBluetoothTransferRequest:: setAttribute ( 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 是无效 QVariant , the attribute is unset.

另请参阅 属性 () 和 QBluetoothTransferRequest::Attribute .

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

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

另请参阅 operator== ().

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

创建副本为 other .

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

Returns true if this object is the same as other .