34Q_DECLARE_JNI_CLASS(QtBtInputStreamThread,
35 "org/qtproject/qt/android/bluetooth/QtBluetoothInputStreamThread")
36Q_DECLARE_JNI_CLASS(QtBtSocketServer,
"org/qtproject/qt/android/bluetooth/QtBluetoothSocketServer")
37Q_DECLARE_JNI_CLASS(QtBtLEServer,
"org/qtproject/qt/android/bluetooth/QtBluetoothLEServer")
38Q_DECLARE_JNI_CLASS(QtBtLECentral,
"org/qtproject/qt/android/bluetooth/QtBluetoothLE")
39Q_DECLARE_JNI_CLASS(BluetoothAdapter,
"android/bluetooth/BluetoothAdapter")
40Q_DECLARE_JNI_CLASS(ParcelUuid,
"android/os/ParcelUuid")
41Q_DECLARE_JNI_CLASS(AdvertiseDataBuilder,
"android/bluetooth/le/AdvertiseData$Builder")
42Q_DECLARE_JNI_CLASS(AdvertiseSettingsBuilder,
"android/bluetooth/le/AdvertiseSettings$Builder")
43Q_DECLARE_JNI_CLASS(BluetoothGattService,
"android/bluetooth/BluetoothGattService")
44Q_DECLARE_JNI_CLASS(BluetoothGattDescriptor,
"android/bluetooth/BluetoothGattDescriptor")
45Q_DECLARE_JNI_CLASS(BluetoothGattCharacteristic,
"android/bluetooth/BluetoothGattCharacteristic")
46Q_DECLARE_JNI_CLASS(BluetoothDevice,
"android/bluetooth/BluetoothDevice")
47Q_DECLARE_JNI_CLASS(IntentFilter,
"android/content/IntentFilter")
48Q_DECLARE_JNI_CLASS(AndroidContext,
"android/content/Context")
51Q_DECLARE_JNI_CLASS(BluetoothManager,
"android/bluetooth/BluetoothManager")
52Q_DECLARE_JNI_CLASS(AdvertiseData,
"android/bluetooth/le/AdvertiseData")
53Q_DECLARE_JNI_CLASS(AdvertiseSettings,
"android/bluetooth/le/AdvertiseSettings")
54Q_DECLARE_JNI_CLASS(InputStream,
"java/io/InputStream")
55Q_DECLARE_JNI_CLASS(OutputStream,
"java/io/OutputStream")
56Q_DECLARE_JNI_CLASS(BluetoothSocket,
"android/bluetooth/BluetoothSocket")
57Q_DECLARE_JNI_CLASS(BroadcastReceiver,
"android/content/BroadcastReceiver")
58Q_DECLARE_JNI_CLASS(BluetoothClass,
"android/bluetooth/BluetoothClass")
59Q_DECLARE_JNI_CLASS(Bundle,
"android/os/Bundle")
60Q_DECLARE_JNI_CLASS(List,
"java/util/List")
64constexpr auto QtJniTypes::Traits<QLowEnergyHandle>::signature()
66 return QtJniTypes::Traits<jint>::signature();
95 constexpr auto className = QtJniTypes::Traits<Klass>::className();
96 constexpr auto fieldName = []() ->
auto {
97 if constexpr (Field == JavaNames::ActionAclConnected)
98 return QtJniTypes::CTString(
"ACTION_ACL_CONNECTED");
99 else if constexpr (Field == ActionAclDisconnected)
100 return QtJniTypes::CTString(
"ACTION_ACL_DISCONNECTED");
101 else if constexpr (Field == ActionBondStateChanged)
102 return QtJniTypes::CTString(
"ACTION_BOND_STATE_CHANGED");
103 else if constexpr (Field == ActionDiscoveryStarted)
104 return QtJniTypes::CTString(
"ACTION_DISCOVERY_STARTED");
105 else if constexpr (Field == ActionDiscoveryFinished)
106 return QtJniTypes::CTString(
"ACTION_DISCOVERY_FINISHED");
107 else if constexpr (Field == ActionFound)
108 return QtJniTypes::CTString(
"ACTION_FOUND");
109 else if constexpr (Field == ActionScanModeChanged)
110 return QtJniTypes::CTString(
"ACTION_SCAN_MODE_CHANGED");
111 else if constexpr (Field == ActionUuid)
112 return QtJniTypes::CTString(
"ACTION_UUID");
113 else if constexpr (Field == ExtraBondState)
114 return QtJniTypes::CTString(
"EXTRA_BOND_STATE");
115 else if constexpr (Field == ExtraDevice)
116 return QtJniTypes::CTString(
"EXTRA_DEVICE");
117 else if constexpr (Field == ExtraPairingKey)
118 return QtJniTypes::CTString(
"EXTRA_PAIRING_KEY");
119 else if constexpr (Field == ExtraPairingVariant)
120 return QtJniTypes::CTString(
"EXTRA_PAIRING_VARIANT");
121 else if constexpr (Field == ExtraRssi)
122 return QtJniTypes::CTString(
"EXTRA_RSSI");
123 else if constexpr (Field == ExtraScanMode)
124 return QtJniTypes::CTString(
"EXTRA_SCAN_MODE");
125 else if constexpr (Field == ExtraUuid)
126 return QtJniTypes::CTString(
"EXTRA_UUID");
128 static_assert(QtPrivate::value_dependent_false<Field>());
131 return valueFromStaticFieldCache(className + fieldName, className.data(), fieldName.data());