nfcsettings_p.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
  3. * All rights reserved.
  4. * This component and the accompanying materials are made available
  5. * under the terms of "Eclipse Public License v1.0"
  6. * which accompanies this distribution, and is available
  7. * at the URL "http://www.eclipse.org/legal/epl-v10.html".
  8. *
  9. * Initial Contributors:
  10. * Nokia Corporation - initial contribution.
  11. *
  12. * Contributors:
  13. *
  14. * Description: Part of Qt NFC Setting sample application.
  15. */
  16. /*!
  17. * \file
  18. * \brief Declaration of the non-Symbian NfcSettingsPrivate class.
  19. *
  20. * This file contains the declaration of the NfcSettingsPrivate class for
  21. * platforms other than Symbian.
  22. */
  23. #ifndef NFCSETTINGS_P_H
  24. #define NFCSETTINGS_P_H
  25. #include <QtCore/QObject>
  26. #include "nfcsettings.h"
  27. /*!
  28. * \brief The default private implementation class for the NFC mode setting.
  29. *
  30. * This stub implementation class is used on platforms for which no more
  31. * specialized implementation is available. The accessor functions nfcMode() and
  32. * nfcError() of this class always report NFC as not supported.
  33. *
  34. * \note This class is part of the private implementation design pattern, and as
  35. * such it is an internal implementation detail of the NfcSettings class. The
  36. * class NfcSettingsPrivate is documented here for completeness' sake, but must
  37. * not be used directly - all code using the NFC settings API should use the
  38. * public class NfcSettings instead.
  39. *
  40. * \see NfcSettings
  41. */
  42. class NfcSettingsPrivate : public QObject
  43. {
  44. Q_OBJECT
  45. public:
  46. /*!
  47. * \brief C++ constructor.
  48. *
  49. * Constructs a new NfcSettingsPrivate instance. This class is
  50. * automatically instantiated by the public class NfcSettings as a part of
  51. * its own construction. No other instances of this class should be created.
  52. *
  53. * \param q Pointer to the public class instance that owns this private
  54. * instance. Ownership of the instance is not transferred.
  55. * \see reset()
  56. */
  57. explicit NfcSettingsPrivate(NfcSettings *q);
  58. /*!
  59. * \brief C++ destructor.
  60. *
  61. * Releases any resources allocated by this NfcSettingsPrivate instance.
  62. */
  63. virtual ~NfcSettingsPrivate();
  64. /*!
  65. * \brief Returns the current level of NFC feature support provided by the
  66. * device.
  67. *
  68. * Called by the public class when NfcSettings::nfcFeature() is called. This
  69. * implementation is a stub and always reports NFC as not supported.
  70. *
  71. * \return The current level of NFC feature support of the device, always
  72. * returns NfcSettings::NfcFeatureNotSupported.
  73. * \see NfcSettings::NfcFeature, NfcSettings::nfcMode()
  74. */
  75. NfcSettings::NfcFeature nfcFeature() const;
  76. /*!
  77. * \brief Returns the current value of the NFC mode setting.
  78. *
  79. * Called by the public class when NfcSettings::nfcMode() is called. This
  80. * implementation is a stub and always reports NFC as not supported.
  81. *
  82. * \return The current NFC mode setting value, always returns
  83. * NfcSettings::NfcModeNotSupported.
  84. * \see NfcSettings::NfcMode, NfcSettings::nfcMode(),
  85. * NfcSettings::nfcModeChanged()
  86. */
  87. NfcSettings::NfcMode nfcMode() const;
  88. /*!
  89. * \brief Returns the error reason for the latest error that has occurred.
  90. *
  91. * Called by the public class when NfcSettings::nfcError() is called. This
  92. * implementation is a stub and cannot generate any errors.
  93. *
  94. * \return Always returns NfcSettings::NfcErrorNone.
  95. * \see NfcSettings::NfcError, NfcSettings::nfcError(),
  96. * NfcSettings::nfcErrorOccurred()
  97. */
  98. NfcSettings::NfcError nfcError() const;
  99. /*!
  100. * \brief Resets this NfcSettings instance back to its initial state by
  101. * attempting to redetermine the availability of NFC hardware and retrieving
  102. * the NFC mode value.
  103. *
  104. * Called by the public class when NfcSettings::reset() is called. This
  105. * is a no-op stub implementation.
  106. */
  107. void reset();
  108. private:
  109. Q_DISABLE_COPY(NfcSettingsPrivate)
  110. /*! \brief Pointer to the public class instance, not owned. */
  111. NfcSettings *q_ptr;
  112. };
  113. #endif // NFCSETTINGS_P_H