#include <mw/xqnfcsettings.h>
Link against: xqnfcsettingsservice.lib
class XQNfcSettings : public QObject, public QObject |
Protected Attributes | |
---|---|
XQNfcSettingsPrivate * | m_nfcSettingsPrivate |
Public Member Enumerations | |
---|---|
enum | CardEmulation { CardEmulationDisabled, CardEmulationEnabled } |
enum | ConfirmConnection { ConfirmConnectionDisabled, ConfirmConnectionEnabled } |
enum | ConfirmReceive { ConfirmReceiveDisabled, ConfirmReceiveEnabled } |
enum | ConfirmSend { ConfirmSendDisabled, ConfirmSendEnabled } |
enum | EmptyBattery { EmptyBatteryDisabled, EmptyBatteryEnabled } |
enum | NfcTagDetectionMode { NfcTagsAlwaysOn, NfcTagsAutomatic, NfcTagsAlwaysOff } |
Public Member Functions | |
---|---|
XQNfcSettings(QObject *) | |
virtual | ~XQNfcSettings() |
CardEmulation | cardEmulation() |
ConfirmConnection | confirmConnection() |
ConfirmReceive | confirmReceive() |
ConfirmSend | confirmSend() |
NfcMode | nfcMode() |
NfcTagDetectionMode | nfcTagDetectionMode() |
bool | secureElementAvailability() |
void | setCardEmulation(CardEmulation) |
void | setConfirmConnection(ConfirmConnection) |
void | setConfirmReceive(ConfirmReceive) |
void | setConfirmSend(ConfirmSend) |
void | setNfcMode(NfcMode) |
void | setNfcTagDetectionMode(NfcTagDetectionMode) |
void | setUseWithEmptyBattery(EmptyBattery) |
EmptyBattery | useWithEmptyBattery() |
Inherited Attributes | |
---|---|
QObject::d_ptr | |
QObject::objectName | |
QObject::staticQtMetaObject |
Inherited Functions | |
---|---|
QObject::QObject(QObjectPrivate &,QObject *) | |
QObject::blockSignals(bool) | |
QObject::childEvent(QChildEvent *) | |
QObject::children()const | |
QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType)const | |
QObject::connectNotify(const char *) | |
QObject::customEvent(QEvent *) | |
QObject::deleteLater | |
QObject::destroyed | |
QObject::disconnect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &) | |
QObject::disconnect(const QObject *,const char *) | |
QObject::disconnect(const QObject *,const char *,const QObject *,const char *) | |
QObject::disconnect(const char *,const QObject *,const char *) | |
QObject::disconnectNotify(const char *) | |
QObject::dumpObjectInfo() | |
QObject::dumpObjectTree() | |
QObject::dynamicPropertyNames()const | |
QObject::event(QEvent *) | |
QObject::eventFilter(QObject *,QEvent *) | |
QObject::findChild(const QString &)const | |
QObject::findChildren(const QRegExp &)const | |
QObject::findChildren(const QString &)const | |
QObject::inherits(const char *)const | |
QObject::installEventFilter(QObject *) | |
QObject::isWidgetType()const | |
QObject::killTimer(int) | |
QObject::moveToThread(QThread *) | |
QObject::objectName()const | |
QObject::parent()const | |
QObject::property(const char *)const | |
QObject::receivers(const char *)const | |
QObject::registerUserData() | |
QObject::removeEventFilter(QObject *) | |
QObject::sender()const | |
QObject::senderSignalIndex()const | |
QObject::setObjectName(const QString &) | |
QObject::setParent(QObject *) | |
QObject::setProperty(const char *,const QVariant &) | |
QObject::setUserData(uint,QObjectUserData *) | |
QObject::signalsBlocked()const | |
QObject::startTimer(int) | |
QObject::thread()const | |
QObject::timerEvent(QTimerEvent *) | |
QObject::userData(uint)const | |
QObject::~QObject() |
NFC Settings API
This class provide APIs to get and set NFC configurations.
XQNfcSettings* setting = new XQNfcSettings(); //get the nfc configuration XQNfcSettings::NfcMode mode = setting->nfcMode() ... //set the nfc configuration by the set functions setting->setNfcMode(XQNfcSettings::NfcOn); ... delete setting; setting = NULL;
XQNfcSettingsPrivate * | m_nfcSettingsPrivate | [protected] |
Card emulation configuration values. CardEmulationDisabled Disable the card emulation mode. CardEmulationEnabled Enable the card emulation mode.
Enumerator | Value | Description |
---|---|---|
CardEmulationDisabled | 0 | |
CardEmulationEnabled | 1 |
NFC connection confirmation configuration values in card emulation mode ConfirmConnectionDisabled Do not confirm with the user before card emulation connection established. ConfirmConnectionEnabled Confirm with the user before card emulation connection established.
Enumerator | Value | Description |
---|---|---|
ConfirmConnectionDisabled | 0 | |
ConfirmConnectionEnabled | 1 |
Local sharing receiving confirmation values ConfirmReceiveDisabled Do not confirm with the user before receiving content from a peer device. ConfirmReceiveEnabled Confirm with the user before receiving content from a peer device.
Enumerator | Value | Description |
---|---|---|
ConfirmReceiveDisabled | 0 | |
ConfirmReceiveEnabled | 1 |
Local sharing sending confirmation values ConfirmSendDisabled Do not confirm with the user before sending content to a peer device. ConfirmSendEnabled Confirm wit the user before sending content to a peer device.
Enumerator | Value | Description |
---|---|---|
ConfirmSendDisabled | 0 | |
ConfirmSendEnabled | 1 |
NFC empty battery mode configuration values EmptyBatteryDisabled Disable the card emulation when battery is empty. EmptyBatteryEnabled Enable the card emulation even if the battery is empty.
Enumerator | Value | Description |
---|---|---|
EmptyBatteryDisabled | 0 | |
EmptyBatteryEnabled | 1 |
NFC Tag DetectionMode values NfcTagsAlwaysOn Always detect NFC tags. NfcTagsAutomatic Only detect NFC tags when the device is not in locked/folded mode and not running the screen saver. NfcTagsAlwaysOff Do not detect NFC tags.
Enumerator | Value | Description |
---|---|---|
NfcTagsAlwaysOn | 0 | |
NfcTagsAutomatic | 1 | |
NfcTagsAlwaysOff | 2 |
CardEmulation | cardEmulation |
Get CardEmulation mode, in card emulation mode, the device acts as a NFC card and responses to external card readers, please refer to NFC Digital Protocol Technical Specification for more information.
return CardEmulation.
ConfirmConnection | confirmConnection |
Get ConfirmConnection, which configures whether to show confirmation UI before card emulation connection established.
return ConfirmConnection.
ConfirmReceive | confirmReceive |
Get ConfirmReceive settings, which confirgures whether to show confirmation UI to the user before receiving files via NFC local sharing.
return ConfirmReceive.
ConfirmSend | confirmSend |
Get ConfirmSend setting, which configures whether to show confirmation UI to the user before sending files via NFC local sharing.
return ConfirmSend
EmptyBattery | emptyBattery |
NfcMode | nfcMode |
Get NfcMode, which can be NFC enabled or disabled.
return NFC mode (on or off).
NfcTagDetectionMode | nfcTagDetectionMode |
Get NfcTagDetectionMode, which is the configuration of how the device detect NFC tags.
return NfcTagDetectionMode.
bool | secEleAvailable |
XQNfcSettings | ( | QObject * | parent = 0 | ) |
Constructor.
Constructor
CardEmulation | cardEmulation | ( | ) | const |
ConfirmConnection | confirmConnection | ( | ) | const |
ConfirmReceive | confirmReceive | ( | ) | const |
ConfirmSend | confirmSend | ( | ) | const |
NfcMode | nfcMode | ( | ) | const |
NfcTagDetectionMode | nfcTagDetectionMode | ( | ) | const |
bool | secureElementAvailability | ( | ) | const |
Get secure element availability.
return true if there is secure element available in the device, otherwise reture false.
void | setCardEmulation | ( | CardEmulation | aCardEmulation | ) |
Set CardEmulation aCardEmulation to enable or disable card emulation mode.
void | setConfirmConnection | ( | ConfirmConnection | aConfirmConnection | ) |
Set ConfirmConnection aConfirmConnection to configures whether the confirmation UI is required before connection established in card emulation mode.
void | setConfirmReceive | ( | ConfirmReceive | aConfirmReceive | ) |
Set ConfirmReceive aConfirmReceive to configure whether user's confirmation is required before receiving files via NFC local sharing.
void | setConfirmSend | ( | ConfirmSend | aConfirmSend | ) |
Set ConfirmSend aConfirmSend to define if user's confirmation is required before sending files via NFC local sharing.
void | setNfcMode | ( | NfcMode | aMode | ) |
Set NfcMode aMode to enable or disable NFC.
void | setNfcTagDetectionMode | ( | NfcTagDetectionMode | aMode | ) |
Set NfcTagDetectionMode to configure how the device detect the NFC tags.
void | setUseWithEmptyBattery | ( | EmptyBattery | aEmptyBattery | ) |
Set EmptyBattery aEmptyBattery to configure whether the device can work in card emulation mode with empty battery.
EmptyBattery | useWithEmptyBattery | ( | ) | const |
Get EmptyBattery, which configures whether the device can work in card emulation mode with empty battery.
return EmptyBattery.