QNearFieldShareTarget Class

The QNearFieldShareTarget class transfers data to remote device over NFC. 更多...

头文件: #include <QNearFieldShareTarget>
qmake: QT += nfc
开始支持版本: Qt 5.3
基类: QObject

公有函数

~QNearFieldShareTarget()
void cancel()
bool isShareInProgress() const
bool share(const QNdefMessage &message)
bool share(const QList<QFileInfo> &files)
QNearFieldShareManager::ShareError shareError() const
QNearFieldShareManager::ShareModes shareModes() const
  • 32 个公有函数继承自 QObject

信号

void error(QNearFieldShareManager::ShareError error)
void shareFinished()

其他继承的成员

  • 1 个属性继承自 QObject
  • 1 个公有槽函数继承自 QObject
  • 1 个公有变量继承自 QObject
  • 10 个静态公有成员继承自 QObject
  • 9 个受保护的函数继承自 QObject
  • 2 个受保护的变量继承自 QObject

详细描述

The QNearFieldShareTarget class transfers data to remote device over NFC.

The QNearFieldShareTarget class can be used for sharing NDEF message or files to a remote NFC enabled device supporting the same protocol.

参见 QNearFieldShareManager.

成员函数

QNearFieldShareTarget::~QNearFieldShareTarget()

Destroys the near field share target.

void QNearFieldShareTarget::cancel()

Cancel the data or file sharing in progress.

[signal] void QNearFieldShareTarget::error(QNearFieldShareManager::ShareError error)

This signal is emitted whenever an error occurs during transfer.

bool QNearFieldShareTarget::isShareInProgress() const

Returns true if data or file sharing is in progress, otherwise returns false.

bool QNearFieldShareTarget::share(const QNdefMessage &message)

Share the NDEF message via the share target. This method starts sharing asynchronously and returns immediately. The method returns true if the request is accepted, otherwise returns false. Sharing is completed when the shareFinished() signal is emitted.

bool QNearFieldShareTarget::share(const QList<QFileInfo> &files)

Share the files via the share target. This method starts sharing asynchronously and returns immediately. The method returns true if the request is accepted, otherwise returns false. Sharing is completed when the shareFinished() signal is emitted.

QNearFieldShareManager::ShareError QNearFieldShareTarget::shareError() const

Returns the error code of the error that occurred.

[signal] void QNearFieldShareTarget::shareFinished()

This signal is emitted whenever a data or file transfer has completed successfully.

QNearFieldShareManager::ShareModes QNearFieldShareTarget::shareModes() const

Returns the share mode supported by the share target.