XQNfcSettings Class Reference

#include <mw/xqnfcsettings.h>

Link against: xqnfcsettingsservice.lib

class XQNfcSettings : public QObject, public QObject

Inherits from

  • XQNfcSettings
    Protected Attributes
    XQNfcSettingsPrivate *m_nfcSettingsPrivate
    Public Member Enumerations
    enumCardEmulation { CardEmulationDisabled, CardEmulationEnabled }
    enumConfirmConnection { ConfirmConnectionDisabled, ConfirmConnectionEnabled }
    enumConfirmReceive { ConfirmReceiveDisabled, ConfirmReceiveEnabled }
    enumConfirmSend { ConfirmSendDisabled, ConfirmSendEnabled }
    enumEmptyBattery { EmptyBatteryDisabled, EmptyBatteryEnabled }
    enumNfcTagDetectionMode { NfcTagsAlwaysOn, NfcTagsAutomatic, NfcTagsAlwaysOff }
    Public Properties
    CardEmulation cardEmulation
    ConfirmConnection confirmConnection
    ConfirmReceive confirmReceive
    ConfirmSend confirmSend
    EmptyBattery emptyBattery
    NfcModenfcMode
    NfcTagDetectionMode nfcTagDetectionMode
    boolsecEleAvailable
    Public Member Functions
    XQNfcSettings(QObject *)
    virtual ~XQNfcSettings()
    CardEmulation cardEmulation()
    ConfirmConnection confirmConnection()
    ConfirmReceive confirmReceive()
    ConfirmSend confirmSend()
    NfcModenfcMode()
    NfcTagDetectionMode nfcTagDetectionMode()
    boolsecureElementAvailability()
    voidsetCardEmulation(CardEmulation)
    voidsetConfirmConnection(ConfirmConnection)
    voidsetConfirmReceive(ConfirmReceive)
    voidsetConfirmSend(ConfirmSend)
    voidsetNfcMode(NfcMode)
    voidsetNfcTagDetectionMode(NfcTagDetectionMode)
    voidsetUseWithEmptyBattery(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()

    Detailed Description

    NFC Settings API

    This class provide APIs to get and set NFC configurations.

    Example usage:
     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;

    Member Attribute Documentation

    m_nfcSettingsPrivate

    XQNfcSettingsPrivate *m_nfcSettingsPrivate[protected]

    Member Enumeration Documentation

    Enum CardEmulation

    Card emulation configuration values. CardEmulationDisabled Disable the card emulation mode. CardEmulationEnabled Enable the card emulation mode.

    EnumeratorValueDescription
    CardEmulationDisabled0
    CardEmulationEnabled1

    Enum ConfirmConnection

    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.

    Enum ConfirmReceive

    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.

    EnumeratorValueDescription
    ConfirmReceiveDisabled0
    ConfirmReceiveEnabled1

    Enum ConfirmSend

    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.

    EnumeratorValueDescription
    ConfirmSendDisabled0
    ConfirmSendEnabled1

    Enum EmptyBattery

    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.

    EnumeratorValueDescription
    EmptyBatteryDisabled0
    EmptyBatteryEnabled1

    Enum NfcTagDetectionMode

    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.

    EnumeratorValueDescription
    NfcTagsAlwaysOn0
    NfcTagsAutomatic1
    NfcTagsAlwaysOff2

    Properties Documentation

    cardEmulation

    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 confirmConnection

    Get ConfirmConnection, which configures whether to show confirmation UI before card emulation connection established.

    return ConfirmConnection.

    confirmReceive

    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 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 emptyBattery

    nfcMode

    NfcModenfcMode

    Get NfcMode, which can be NFC enabled or disabled.

    return NFC mode (on or off).

    nfcTagDetectionMode

    NfcTagDetectionMode nfcTagDetectionMode

    Get NfcTagDetectionMode, which is the configuration of how the device detect NFC tags.

    return NfcTagDetectionMode.

    secEleAvailable

    boolsecEleAvailable

    Constructor & Destructor Documentation

    XQNfcSettings ( QObject * )

    XQNfcSettings(QObject *parent = 0)

    Constructor.

    Constructor

    ~XQNfcSettings ( )

    ~XQNfcSettings()[virtual]

    Destructor.

    Destructor

    Member Function Documentation

    cardEmulation ( )

    CardEmulation cardEmulation()const

    confirmConnection ( )

    ConfirmConnection confirmConnection()const

    confirmReceive ( )

    ConfirmReceive confirmReceive()const

    confirmSend ( )

    ConfirmSend confirmSend()const

    nfcMode ( )

    NfcModenfcMode()const

    nfcTagDetectionMode ( )

    NfcTagDetectionMode nfcTagDetectionMode()const

    secureElementAvailability ( )

    boolsecureElementAvailability()const

    Get secure element availability.

    return true if there is secure element available in the device, otherwise reture false.

    setCardEmulation ( CardEmulation )

    voidsetCardEmulation(CardEmulationaCardEmulation)

    Set CardEmulation aCardEmulation to enable or disable card emulation mode.

    setConfirmConnection ( ConfirmConnection )

    voidsetConfirmConnection(ConfirmConnectionaConfirmConnection)

    Set ConfirmConnection aConfirmConnection to configures whether the confirmation UI is required before connection established in card emulation mode.

    setConfirmReceive ( ConfirmReceive )

    voidsetConfirmReceive(ConfirmReceiveaConfirmReceive)

    Set ConfirmReceive aConfirmReceive to configure whether user's confirmation is required before receiving files via NFC local sharing.

    setConfirmSend ( ConfirmSend )

    voidsetConfirmSend(ConfirmSendaConfirmSend)

    Set ConfirmSend aConfirmSend to define if user's confirmation is required before sending files via NFC local sharing.

    setNfcMode ( NfcMode )

    voidsetNfcMode(NfcModeaMode)

    Set NfcMode aMode to enable or disable NFC.

    setNfcTagDetectionMode ( NfcTagDetectionMode )

    voidsetNfcTagDetectionMode(NfcTagDetectionModeaMode)

    Set NfcTagDetectionMode to configure how the device detect the NFC tags.

    setUseWithEmptyBattery ( EmptyBattery )

    voidsetUseWithEmptyBattery(EmptyBatteryaEmptyBattery)

    Set EmptyBattery aEmptyBattery to configure whether the device can work in card emulation mode with empty battery.

    useWithEmptyBattery ( )

    EmptyBattery useWithEmptyBattery()const

    Get EmptyBattery, which configures whether the device can work in card emulation mode with empty battery.

    return EmptyBattery.