qnearfieldmanager.sip 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. // qnearfieldmanager.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtNfc Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. %If (Qt_6_2_0 -)
  22. class QNearFieldManager : public QObject
  23. {
  24. %TypeHeaderCode
  25. #include <qnearfieldmanager.h>
  26. %End
  27. %ConvertToSubClassCode
  28. static struct class_graph {
  29. const char *name;
  30. sipTypeDef **type;
  31. int yes, no;
  32. } graph[] = {
  33. {sipName_QNearFieldManager, &sipType_QNearFieldManager, -1, 1},
  34. {sipName_QNearFieldTarget, &sipType_QNearFieldTarget, -1, -1},
  35. };
  36. int i = 0;
  37. sipType = NULL;
  38. do
  39. {
  40. struct class_graph *cg = &graph[i];
  41. if (cg->name != NULL && sipCpp->inherits(cg->name))
  42. {
  43. sipType = *cg->type;
  44. i = cg->yes;
  45. }
  46. else
  47. i = cg->no;
  48. }
  49. while (i >= 0);
  50. %End
  51. public:
  52. explicit QNearFieldManager(QObject *parent /TransferThis/ = 0);
  53. virtual ~QNearFieldManager();
  54. bool startTargetDetection(QNearFieldTarget::AccessMethod accessMethod);
  55. void stopTargetDetection(const QString &errorMessage = QString());
  56. signals:
  57. void targetDetected(QNearFieldTarget *target);
  58. void targetLost(QNearFieldTarget *target);
  59. void targetDetectionStopped();
  60. public:
  61. enum class AdapterState
  62. {
  63. Offline,
  64. TurningOn,
  65. Online,
  66. TurningOff,
  67. };
  68. bool isSupported(QNearFieldTarget::AccessMethod accessMethod = QNearFieldTarget::AnyAccess) const;
  69. signals:
  70. void adapterStateChanged(QNearFieldManager::AdapterState state);
  71. public:
  72. bool isEnabled() const;
  73. void setUserInformation(const QString &message);
  74. };
  75. %End
  76. %ModuleHeaderCode
  77. // Imports from QtCore.
  78. typedef sipErrorState (*pyqt6_qtnfc_get_pyqtslot_parts_t)(PyObject *, QObject **, QByteArray &);
  79. extern pyqt6_qtnfc_get_pyqtslot_parts_t pyqt6_qtnfc_get_pyqtslot_parts;
  80. %End
  81. %ModuleCode
  82. // Imports from QtCore.
  83. pyqt6_qtnfc_get_pyqtslot_parts_t pyqt6_qtnfc_get_pyqtslot_parts;
  84. %End
  85. %PostInitialisationCode
  86. // Imports from QtCore.
  87. pyqt6_qtnfc_get_pyqtslot_parts = (pyqt6_qtnfc_get_pyqtslot_parts_t)sipImportSymbol("pyqt6_get_pyqtslot_parts");
  88. Q_ASSERT(pyqt6_qtnfc_get_pyqtslot_parts);
  89. %End