pyside6_qtnfc_python.h 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. // Copyright (C) 2022 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. #ifndef SBK_QTNFC_PYTHON_H
  4. #define SBK_QTNFC_PYTHON_H
  5. #include <sbkpython.h>
  6. #include <sbkmodule.h>
  7. #include <sbkconverter.h>
  8. // Module Includes
  9. #include <pyside6_qtcore_python.h>
  10. // Bound library includes
  11. #include <QtNfc/qndeffilter.h>
  12. #include <QtNfc/qndefnfcsmartposterrecord.h>
  13. #include <QtNfc/qndefnfctextrecord.h>
  14. #include <QtNfc/qndefrecord.h>
  15. #include <QtNfc/qnearfieldmanager.h>
  16. #include <QtNfc/qnearfieldtarget.h>
  17. QT_BEGIN_NAMESPACE
  18. class QNdefMessage;
  19. class QNdefNfcIconRecord;
  20. class QNdefNfcUriRecord;
  21. QT_END_NAMESPACE
  22. // Type indices
  23. enum [[deprecated]] : int {
  24. SBK_QNDEFFILTER_IDX = 2,
  25. SBK_QNDEFFILTER_RECORD_IDX = 4,
  26. SBK_QNDEFMESSAGE_IDX = 6,
  27. SBK_QNDEFNFCICONRECORD_IDX = 8,
  28. SBK_QNDEFNFCSMARTPOSTERRECORD_ACTION_IDX = 12,
  29. SBK_QNDEFNFCSMARTPOSTERRECORD_IDX = 10,
  30. SBK_QNDEFNFCTEXTRECORD_ENCODING_IDX = 16,
  31. SBK_QNDEFNFCTEXTRECORD_IDX = 14,
  32. SBK_QNDEFNFCURIRECORD_IDX = 18,
  33. SBK_QNDEFRECORD_TYPENAMEFORMAT_IDX = 22,
  34. SBK_QNDEFRECORD_IDX = 20,
  35. SBK_QNEARFIELDMANAGER_ADAPTERSTATE_IDX = 26,
  36. SBK_QNEARFIELDMANAGER_IDX = 24,
  37. SBK_QNEARFIELDTARGET_TYPE_IDX = 36,
  38. SBK_QNEARFIELDTARGET_ACCESSMETHOD_IDX = 30,
  39. SBK_QFLAGS_QNEARFIELDTARGET_ACCESSMETHOD_IDX = 0,
  40. SBK_QNEARFIELDTARGET_ERROR_IDX = 32,
  41. SBK_QNEARFIELDTARGET_IDX = 28,
  42. SBK_QNEARFIELDTARGET_REQUESTID_IDX = 34,
  43. SBK_QTNFC_IDX_COUNT = 38,
  44. };
  45. // Type indices
  46. enum : int {
  47. SBK_QNdefFilter_IDX = 1,
  48. SBK_QNdefFilter_Record_IDX = 2,
  49. SBK_QNdefMessage_IDX = 3,
  50. SBK_QNdefNfcIconRecord_IDX = 4,
  51. SBK_QNdefNfcSmartPosterRecord_Action_IDX = 6,
  52. SBK_QNdefNfcSmartPosterRecord_IDX = 5,
  53. SBK_QNdefNfcTextRecord_Encoding_IDX = 8,
  54. SBK_QNdefNfcTextRecord_IDX = 7,
  55. SBK_QNdefNfcUriRecord_IDX = 9,
  56. SBK_QNdefRecord_TypeNameFormat_IDX = 11,
  57. SBK_QNdefRecord_IDX = 10,
  58. SBK_QNearFieldManager_AdapterState_IDX = 13,
  59. SBK_QNearFieldManager_IDX = 12,
  60. SBK_QNearFieldTarget_Type_IDX = 18,
  61. SBK_QNearFieldTarget_AccessMethod_IDX = 15,
  62. SBK_QFlags_QNearFieldTarget_AccessMethod_IDX = 0,
  63. SBK_QNearFieldTarget_Error_IDX = 16,
  64. SBK_QNearFieldTarget_IDX = 14,
  65. SBK_QNearFieldTarget_RequestId_IDX = 17,
  66. SBK_QtNfc_IDX_COUNT = 19,
  67. };
  68. // This variable stores all Python types exported by this module.
  69. extern Shiboken::Module::TypeInitStruct *SbkPySide6_QtNfcTypeStructs;
  70. // This variable stores all Python types exported by this module in a backwards compatible way with identical indexing.
  71. [[deprecated]] extern PyTypeObject **SbkPySide6_QtNfcTypes;
  72. // This variable stores the Python module object exported by this module.
  73. extern PyObject *SbkPySide6_QtNfcModuleObject;
  74. // This variable stores all type converters exported by this module.
  75. extern SbkConverter **SbkPySide6_QtNfcTypeConverters;
  76. // Converter indices
  77. enum [[deprecated]] : int {
  78. SBK_QTNFC_QLIST_INT_IDX = 0, // QList<int>
  79. SBK_QTNFC_QLIST_QNDEFRECORD_IDX = 1, // QList<QNdefRecord>
  80. SBK_QTNFC_QLIST_QNDEFMESSAGE_IDX = 2, // QList<QNdefMessage>
  81. SBK_QTNFC_QLIST_QNDEFNFCICONRECORD_IDX = 3, // QList<QNdefNfcIconRecord>
  82. SBK_QTNFC_QLIST_QNDEFNFCTEXTRECORD_IDX = 4, // QList<QNdefNfcTextRecord>
  83. SBK_QTNFC_QLIST_QVARIANT_IDX = 5, // QList<QVariant>
  84. SBK_QTNFC_QLIST_QSTRING_IDX = 6, // QList<QString>
  85. SBK_QTNFC_QMAP_QSTRING_QVARIANT_IDX = 7, // QMap<QString,QVariant>
  86. SBK_QTNFC_CONVERTERS_IDX_COUNT = 8,
  87. };
  88. // Converter indices
  89. enum : int {
  90. SBK_QtNfc_QList_int_IDX = 0, // QList<int>
  91. SBK_QtNfc_QList_QNdefRecord_IDX = 1, // QList<QNdefRecord>
  92. SBK_QtNfc_QList_QNdefMessage_IDX = 2, // QList<QNdefMessage>
  93. SBK_QtNfc_QList_QNdefNfcIconRecord_IDX = 3, // QList<QNdefNfcIconRecord>
  94. SBK_QtNfc_QList_QNdefNfcTextRecord_IDX = 4, // QList<QNdefNfcTextRecord>
  95. SBK_QtNfc_QList_QVariant_IDX = 5, // QList<QVariant>
  96. SBK_QtNfc_QList_QString_IDX = 6, // QList<QString>
  97. SBK_QtNfc_QMap_QString_QVariant_IDX = 7, // QMap<QString,QVariant>
  98. SBK_QtNfc_CONVERTERS_IDX_COUNT = 8,
  99. };
  100. // Macros for type check
  101. QT_WARNING_PUSH
  102. QT_WARNING_DISABLE_DEPRECATED
  103. namespace Shiboken
  104. {
  105. // PyType functions, to get the PyObjectType for a type T
  106. template<> inline PyTypeObject *SbkType< ::QNdefFilter >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNdefFilter_IDX]); }
  107. template<> inline PyTypeObject *SbkType< ::QNdefFilter::Record >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNdefFilter_Record_IDX]); }
  108. template<> inline PyTypeObject *SbkType< ::QNdefMessage >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNdefMessage_IDX]); }
  109. template<> inline PyTypeObject *SbkType< ::QNdefNfcIconRecord >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNdefNfcIconRecord_IDX]); }
  110. template<> inline PyTypeObject *SbkType< ::QNdefNfcSmartPosterRecord::Action >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNdefNfcSmartPosterRecord_Action_IDX]); }
  111. template<> inline PyTypeObject *SbkType< ::QNdefNfcSmartPosterRecord >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNdefNfcSmartPosterRecord_IDX]); }
  112. template<> inline PyTypeObject *SbkType< ::QNdefNfcTextRecord::Encoding >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNdefNfcTextRecord_Encoding_IDX]); }
  113. template<> inline PyTypeObject *SbkType< ::QNdefNfcTextRecord >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNdefNfcTextRecord_IDX]); }
  114. template<> inline PyTypeObject *SbkType< ::QNdefNfcUriRecord >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNdefNfcUriRecord_IDX]); }
  115. template<> inline PyTypeObject *SbkType< ::QNdefRecord::TypeNameFormat >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNdefRecord_TypeNameFormat_IDX]); }
  116. template<> inline PyTypeObject *SbkType< ::QNdefRecord >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNdefRecord_IDX]); }
  117. template<> inline PyTypeObject *SbkType< ::QNearFieldManager::AdapterState >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNearFieldManager_AdapterState_IDX]); }
  118. template<> inline PyTypeObject *SbkType< ::QNearFieldManager >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNearFieldManager_IDX]); }
  119. template<> inline PyTypeObject *SbkType< ::QNearFieldTarget::Type >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNearFieldTarget_Type_IDX]); }
  120. template<> inline PyTypeObject *SbkType< ::QNearFieldTarget::AccessMethod >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNearFieldTarget_AccessMethod_IDX]); }
  121. template<> inline PyTypeObject *SbkType< ::QFlags<QNearFieldTarget::AccessMethod> >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QFlags_QNearFieldTarget_AccessMethod_IDX]); }
  122. template<> inline PyTypeObject *SbkType< ::QNearFieldTarget::Error >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNearFieldTarget_Error_IDX]); }
  123. template<> inline PyTypeObject *SbkType< ::QNearFieldTarget >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNearFieldTarget_IDX]); }
  124. template<> inline PyTypeObject *SbkType< ::QNearFieldTarget::RequestId >() { return Shiboken::Module::get(SbkPySide6_QtNfcTypeStructs[SBK_QNearFieldTarget_RequestId_IDX]); }
  125. } // namespace Shiboken
  126. QT_WARNING_POP
  127. #endif // SBK_QTNFC_PYTHON_H