BluetoothUnityAPI-Swift.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. #if 0
  2. #elif defined(__arm64__) && __arm64__
  3. // Generated by Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
  4. #ifndef BLUETOOTHUNITYAPI_SWIFT_H
  5. #define BLUETOOTHUNITYAPI_SWIFT_H
  6. #pragma clang diagnostic push
  7. #pragma clang diagnostic ignored "-Wgcc-compat"
  8. #if !defined(__has_include)
  9. # define __has_include(x) 0
  10. #endif
  11. #if !defined(__has_attribute)
  12. # define __has_attribute(x) 0
  13. #endif
  14. #if !defined(__has_feature)
  15. # define __has_feature(x) 0
  16. #endif
  17. #if !defined(__has_warning)
  18. # define __has_warning(x) 0
  19. #endif
  20. #if __has_include(<swift/objc-prologue.h>)
  21. # include <swift/objc-prologue.h>
  22. #endif
  23. #pragma clang diagnostic ignored "-Wduplicate-method-match"
  24. #pragma clang diagnostic ignored "-Wauto-import"
  25. #if defined(__OBJC__)
  26. #include <Foundation/Foundation.h>
  27. #endif
  28. #if defined(__cplusplus)
  29. #include <cstdint>
  30. #include <cstddef>
  31. #include <cstdbool>
  32. #else
  33. #include <stdint.h>
  34. #include <stddef.h>
  35. #include <stdbool.h>
  36. #endif
  37. #if !defined(SWIFT_TYPEDEFS)
  38. # define SWIFT_TYPEDEFS 1
  39. # if __has_include(<uchar.h>)
  40. # include <uchar.h>
  41. # elif !defined(__cplusplus)
  42. typedef uint_least16_t char16_t;
  43. typedef uint_least32_t char32_t;
  44. # endif
  45. typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
  46. typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
  47. typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
  48. typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
  49. typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
  50. typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
  51. typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
  52. typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
  53. typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
  54. typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
  55. typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
  56. typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
  57. #endif
  58. #if !defined(SWIFT_PASTE)
  59. # define SWIFT_PASTE_HELPER(x, y) x##y
  60. # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
  61. #endif
  62. #if !defined(SWIFT_METATYPE)
  63. # define SWIFT_METATYPE(X) Class
  64. #endif
  65. #if !defined(SWIFT_CLASS_PROPERTY)
  66. # if __has_feature(objc_class_property)
  67. # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
  68. # else
  69. # define SWIFT_CLASS_PROPERTY(...)
  70. # endif
  71. #endif
  72. #if __has_attribute(objc_runtime_name)
  73. # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
  74. #else
  75. # define SWIFT_RUNTIME_NAME(X)
  76. #endif
  77. #if __has_attribute(swift_name)
  78. # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
  79. #else
  80. # define SWIFT_COMPILE_NAME(X)
  81. #endif
  82. #if __has_attribute(objc_method_family)
  83. # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
  84. #else
  85. # define SWIFT_METHOD_FAMILY(X)
  86. #endif
  87. #if __has_attribute(noescape)
  88. # define SWIFT_NOESCAPE __attribute__((noescape))
  89. #else
  90. # define SWIFT_NOESCAPE
  91. #endif
  92. #if __has_attribute(ns_consumed)
  93. # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
  94. #else
  95. # define SWIFT_RELEASES_ARGUMENT
  96. #endif
  97. #if __has_attribute(warn_unused_result)
  98. # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
  99. #else
  100. # define SWIFT_WARN_UNUSED_RESULT
  101. #endif
  102. #if __has_attribute(noreturn)
  103. # define SWIFT_NORETURN __attribute__((noreturn))
  104. #else
  105. # define SWIFT_NORETURN
  106. #endif
  107. #if !defined(SWIFT_CLASS_EXTRA)
  108. # define SWIFT_CLASS_EXTRA
  109. #endif
  110. #if !defined(SWIFT_PROTOCOL_EXTRA)
  111. # define SWIFT_PROTOCOL_EXTRA
  112. #endif
  113. #if !defined(SWIFT_ENUM_EXTRA)
  114. # define SWIFT_ENUM_EXTRA
  115. #endif
  116. #if !defined(SWIFT_CLASS)
  117. # if __has_attribute(objc_subclassing_restricted)
  118. # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
  119. # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  120. # else
  121. # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  122. # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  123. # endif
  124. #endif
  125. #if !defined(SWIFT_RESILIENT_CLASS)
  126. # if __has_attribute(objc_class_stub)
  127. # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
  128. # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
  129. # else
  130. # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
  131. # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
  132. # endif
  133. #endif
  134. #if !defined(SWIFT_PROTOCOL)
  135. # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
  136. # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
  137. #endif
  138. #if !defined(SWIFT_EXTENSION)
  139. # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
  140. #endif
  141. #if !defined(OBJC_DESIGNATED_INITIALIZER)
  142. # if __has_attribute(objc_designated_initializer)
  143. # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
  144. # else
  145. # define OBJC_DESIGNATED_INITIALIZER
  146. # endif
  147. #endif
  148. #if !defined(SWIFT_ENUM_ATTR)
  149. # if defined(__has_attribute) && __has_attribute(enum_extensibility)
  150. # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
  151. # else
  152. # define SWIFT_ENUM_ATTR(_extensibility)
  153. # endif
  154. #endif
  155. #if !defined(SWIFT_ENUM)
  156. # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
  157. # if __has_feature(generalized_swift_name)
  158. # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
  159. # else
  160. # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
  161. # endif
  162. #endif
  163. #if !defined(SWIFT_UNAVAILABLE)
  164. # define SWIFT_UNAVAILABLE __attribute__((unavailable))
  165. #endif
  166. #if !defined(SWIFT_UNAVAILABLE_MSG)
  167. # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
  168. #endif
  169. #if !defined(SWIFT_AVAILABILITY)
  170. # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
  171. #endif
  172. #if !defined(SWIFT_WEAK_IMPORT)
  173. # define SWIFT_WEAK_IMPORT __attribute__((weak_import))
  174. #endif
  175. #if !defined(SWIFT_DEPRECATED)
  176. # define SWIFT_DEPRECATED __attribute__((deprecated))
  177. #endif
  178. #if !defined(SWIFT_DEPRECATED_MSG)
  179. # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
  180. #endif
  181. #if __has_feature(attribute_diagnose_if_objc)
  182. # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
  183. #else
  184. # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
  185. #endif
  186. #if defined(__OBJC__)
  187. #if !defined(IBSegueAction)
  188. # define IBSegueAction
  189. #endif
  190. #endif
  191. #if !defined(SWIFT_EXTERN)
  192. # if defined(__cplusplus)
  193. # define SWIFT_EXTERN extern "C"
  194. # else
  195. # define SWIFT_EXTERN extern
  196. # endif
  197. #endif
  198. #if !defined(SWIFT_CALL)
  199. # define SWIFT_CALL __attribute__((swiftcall))
  200. #endif
  201. #if defined(__cplusplus)
  202. #if !defined(SWIFT_NOEXCEPT)
  203. # define SWIFT_NOEXCEPT noexcept
  204. #endif
  205. #else
  206. #if !defined(SWIFT_NOEXCEPT)
  207. # define SWIFT_NOEXCEPT
  208. #endif
  209. #endif
  210. #if defined(__cplusplus)
  211. #if !defined(SWIFT_CXX_INT_DEFINED)
  212. #define SWIFT_CXX_INT_DEFINED
  213. namespace swift {
  214. using Int = ptrdiff_t;
  215. using UInt = size_t;
  216. }
  217. #endif
  218. #endif
  219. #if defined(__OBJC__)
  220. #if __has_feature(modules)
  221. #if __has_warning("-Watimport-in-framework-header")
  222. #pragma clang diagnostic ignored "-Watimport-in-framework-header"
  223. #endif
  224. @import CoreBluetooth;
  225. @import Foundation;
  226. @import ObjectiveC;
  227. #endif
  228. #endif
  229. #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
  230. #pragma clang diagnostic ignored "-Wduplicate-method-arg"
  231. #if __has_warning("-Wpragma-clang-attribute")
  232. # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
  233. #endif
  234. #pragma clang diagnostic ignored "-Wunknown-pragmas"
  235. #pragma clang diagnostic ignored "-Wnullability"
  236. #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
  237. #if __has_attribute(external_source_symbol)
  238. # pragma push_macro("any")
  239. # undef any
  240. # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="BluetoothUnityAPI",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
  241. # pragma pop_macro("any")
  242. #endif
  243. #if defined(__OBJC__)
  244. @class NSString;
  245. @protocol IStreamManager;
  246. @protocol BluetoothEventListener;
  247. @class BluetoothDevice;
  248. @class BluetoothHelperCharacteristic;
  249. @class BluetoothHelperService;
  250. SWIFT_CLASS("_TtC17BluetoothUnityAPI15BluetoothHelper")
  251. @interface BluetoothHelper : NSObject
  252. - (nullable instancetype)initWithDeviceName:(NSString * _Nonnull)deviceName error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
  253. - (BOOL)startListeningAndReturnError:(NSError * _Nullable * _Nullable)error;
  254. - (BOOL)sendData:(NSString * _Nonnull)data error:(NSError * _Nullable * _Nullable)error;
  255. - (BOOL)sendBData:(NSArray<NSNumber *> * _Nonnull)data error:(NSError * _Nullable * _Nullable)error;
  256. - (void)Disconnect;
  257. - (BOOL)ScanNearbyDevices SWIFT_WARN_UNUSED_RESULT;
  258. - (BOOL)ScanNearbyDevicesWithScanningTime:(NSInteger)scanningTime SWIFT_WARN_UNUSED_RESULT;
  259. - (BOOL)ConnectAndReturnError:(NSError * _Nullable * _Nullable)error;
  260. - (BOOL)isConnected SWIFT_WARN_UNUSED_RESULT;
  261. - (void)InvokeOnConnected;
  262. - (void)setTerminatorBasedStream:(NSString * _Nonnull)separator :(BOOL)appendTerminator;
  263. - (void)setCustomStreamManager:(id <IStreamManager> _Nonnull)streamManager;
  264. - (void)setBytesTerminatorBasedStream:(NSArray<NSNumber *> * _Nonnull)separator :(BOOL)appendTerminator;
  265. - (void)setLengthBasedStream;
  266. - (void)setFixedLengthBasedStream:(NSInteger)length;
  267. - (void)setOnEventReceivedListener:(id <BluetoothEventListener> _Nonnull)listener;
  268. - (NSString * _Nullable)getDeviceName SWIFT_WARN_UNUSED_RESULT;
  269. - (NSString * _Nullable)getDeviceAddress SWIFT_WARN_UNUSED_RESULT;
  270. - (NSArray<BluetoothDevice *> * _Nonnull)getNearbyDevices SWIFT_WARN_UNUSED_RESULT;
  271. - (NSString * _Nonnull)getBluetoothDeviceName SWIFT_WARN_UNUSED_RESULT;
  272. - (NSString * _Nonnull)getBluetoothDeviceAddress SWIFT_WARN_UNUSED_RESULT;
  273. - (int8_t)getBluetoothDeviceRssi SWIFT_WARN_UNUSED_RESULT;
  274. - (BOOL)isDevicePaired SWIFT_WARN_UNUSED_RESULT;
  275. - (void)setDeviceName:(NSString * _Nonnull)deviceName;
  276. - (void)setDeviceAddress:(NSString * _Nonnull)deviceAddress;
  277. - (NSInteger)getLastError SWIFT_WARN_UNUSED_RESULT;
  278. - (BOOL)isBluetoothEnabled SWIFT_WARN_UNUSED_RESULT;
  279. - (NSArray<BluetoothDevice *> * _Nullable)getPairedDevicesListAndReturnError:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
  280. - (BOOL)subscribe:(BluetoothHelperCharacteristic * _Nonnull)characteristic error:(NSError * _Nullable * _Nullable)error;
  281. - (BOOL)unsubscribe:(BluetoothHelperCharacteristic * _Nonnull)characteristic error:(NSError * _Nullable * _Nullable)error;
  282. - (BOOL)writeCharacteristic:(BluetoothHelperCharacteristic * _Nonnull)characteristic :(NSArray<NSNumber *> * _Nonnull)value error:(NSError * _Nullable * _Nullable)error;
  283. - (BOOL)readCharacteristic:(BluetoothHelperCharacteristic * _Nonnull)characteristic error:(NSError * _Nullable * _Nullable)error;
  284. - (BOOL)writeStringCharacteristic:(BluetoothHelperCharacteristic * _Nonnull)characteristic :(NSString * _Nonnull)data error:(NSError * _Nullable * _Nullable)error;
  285. - (int16_t)getId SWIFT_WARN_UNUSED_RESULT;
  286. - (BOOL)setTxCharacteristic:(NSString * _Nonnull)characteristic :(NSString * _Nonnull)service error:(NSError * _Nullable * _Nullable)error;
  287. - (BOOL)setRxCharacteristic:(NSString * _Nonnull)characteristic :(NSString * _Nonnull)service error:(NSError * _Nullable * _Nullable)error;
  288. - (NSArray<BluetoothHelperService *> * _Nullable)getGattServicesAndReturnError:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
  289. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  290. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  291. @end
  292. @class CBCharacteristic;
  293. @class CBPeripheral;
  294. @class CBService;
  295. SWIFT_CLASS("_TtC17BluetoothUnityAPI18BLEBluetoothHelper")
  296. @interface BLEBluetoothHelper : BluetoothHelper <CBPeripheralDelegate>
  297. - (nullable instancetype)initWithDeviceName:(NSString * _Nonnull)deviceName error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
  298. - (BOOL)ScanNearbyDevices SWIFT_WARN_UNUSED_RESULT;
  299. - (BOOL)ScanNearbyDevicesWithScanningTime:(NSInteger)scanningTime SWIFT_WARN_UNUSED_RESULT;
  300. - (CBCharacteristic * _Nullable)getTxCharacteristic SWIFT_WARN_UNUSED_RESULT;
  301. - (CBPeripheral * _Nullable)getPeriferal SWIFT_WARN_UNUSED_RESULT;
  302. - (NSArray<BluetoothDevice *> * _Nullable)getPairedDevicesListAndReturnError:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
  303. - (void)peripheral:(CBPeripheral * _Nonnull)peripheral didDiscoverServices:(NSError * _Nullable)error;
  304. - (void)peripheral:(CBPeripheral * _Nonnull)peripheral didDiscoverCharacteristicsForService:(CBService * _Nonnull)service error:(NSError * _Nullable)error;
  305. - (BOOL)ConnectAndReturnError:(NSError * _Nullable * _Nullable)error;
  306. - (BOOL)isBluetoothEnabled SWIFT_WARN_UNUSED_RESULT;
  307. - (void)Disconnect;
  308. - (void)peripheral:(CBPeripheral * _Nonnull)peripheral didUpdateNotificationStateForCharacteristic:(CBCharacteristic * _Nonnull)characteristic error:(NSError * _Nullable)error;
  309. - (void)peripheral:(CBPeripheral * _Nonnull)peripheral didUpdateValueForCharacteristic:(CBCharacteristic * _Nonnull)characteristic error:(NSError * _Nullable)error;
  310. - (BOOL)subscribe:(BluetoothHelperCharacteristic * _Nonnull)characteristic error:(NSError * _Nullable * _Nullable)error;
  311. - (BOOL)unsubscribe:(BluetoothHelperCharacteristic * _Nonnull)characteristic error:(NSError * _Nullable * _Nullable)error;
  312. - (BOOL)writeCharacteristic:(BluetoothHelperCharacteristic * _Nonnull)characteristic :(NSArray<NSNumber *> * _Nonnull)value error:(NSError * _Nullable * _Nullable)error;
  313. - (BOOL)readCharacteristic:(BluetoothHelperCharacteristic * _Nonnull)characteristic error:(NSError * _Nullable * _Nullable)error;
  314. - (BOOL)setTxCharacteristic:(NSString * _Nonnull)characteristic :(NSString * _Nonnull)service error:(NSError * _Nullable * _Nullable)error;
  315. - (BOOL)setRxCharacteristic:(NSString * _Nonnull)characteristic :(NSString * _Nonnull)service error:(NSError * _Nullable * _Nullable)error;
  316. - (NSArray<BluetoothHelperService *> * _Nullable)getGattServicesAndReturnError:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
  317. @end
  318. SWIFT_PROTOCOL("_TtP17BluetoothUnityAPI20InvokeOnDataReceived_")
  319. @protocol InvokeOnDataReceived
  320. - (void)InvokeOnDataReceived:(NSArray<NSNumber *> * _Nonnull)buff;
  321. @end
  322. SWIFT_CLASS("_TtC17BluetoothUnityAPI22BluetoothStreamManager")
  323. @interface BluetoothStreamManager : NSObject
  324. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  325. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  326. @end
  327. SWIFT_CLASS("_TtC17BluetoothUnityAPI28BluetoothCustomStreamManager")
  328. @interface BluetoothCustomStreamManager : BluetoothStreamManager <InvokeOnDataReceived>
  329. - (nonnull instancetype)init:(BluetoothHelper * _Nonnull)helper :(id <IStreamManager> _Nonnull)streamManager OBJC_DESIGNATED_INITIALIZER;
  330. - (void)sendData;
  331. - (void)InvokeOnDataReceived:(NSArray<NSNumber *> * _Nonnull)buff;
  332. @end
  333. SWIFT_CLASS("_TtC17BluetoothUnityAPI15BluetoothDevice")
  334. @interface BluetoothDevice : NSObject
  335. - (nonnull instancetype)init:(NSString * _Nonnull)deviceName :(NSString * _Nonnull)deviceAddress :(int8_t)rssi OBJC_DESIGNATED_INITIALIZER;
  336. - (nonnull instancetype)init:(NSString * _Nonnull)deviceName uuid:(NSString * _Nonnull)uuid :(int8_t)rssi OBJC_DESIGNATED_INITIALIZER;
  337. - (NSString * _Nonnull)getDeviceName SWIFT_WARN_UNUSED_RESULT;
  338. - (NSString * _Nonnull)getDeviceAddress SWIFT_WARN_UNUSED_RESULT;
  339. - (int8_t)getRssi SWIFT_WARN_UNUSED_RESULT;
  340. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  341. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  342. @end
  343. SWIFT_PROTOCOL("_TtP17BluetoothUnityAPI22BluetoothEventListener_")
  344. @protocol BluetoothEventListener
  345. - (void)OnDataReceived:(NSString * _Nonnull)data;
  346. - (void)OnBinaryDataReceived:(NSArray<NSNumber *> * _Nonnull)data;
  347. - (void)OnConnected;
  348. - (void)OnConnectionFailed;
  349. - (void)OnScanEnded;
  350. - (void)OnServiceNotFound:(NSString * _Nonnull)service;
  351. - (void)OnCharacteristicNotFound:(NSString * _Nonnull)service :(NSString * _Nonnull)characteristic;
  352. - (void)OnCharacteristicChanged:(NSArray<NSNumber *> * _Nonnull)value :(BluetoothHelperCharacteristic * _Nonnull)characteristic;
  353. @end
  354. SWIFT_CLASS("_TtC17BluetoothUnityAPI29BluetoothHelperCharacteristic")
  355. @interface BluetoothHelperCharacteristic : NSObject
  356. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  357. - (nonnull instancetype)init:(NSString * _Nonnull)name OBJC_DESIGNATED_INITIALIZER;
  358. - (void)setName:(NSString * _Nonnull)name;
  359. - (NSString * _Nonnull)getName SWIFT_WARN_UNUSED_RESULT;
  360. - (void)setService:(NSString * _Nonnull)service;
  361. - (NSString * _Nonnull)getService SWIFT_WARN_UNUSED_RESULT;
  362. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  363. @end
  364. SWIFT_CLASS("_TtC17BluetoothUnityAPI22BluetoothHelperService")
  365. @interface BluetoothHelperService : NSObject
  366. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  367. - (nonnull instancetype)init:(NSString * _Nonnull)name OBJC_DESIGNATED_INITIALIZER;
  368. - (void)setName:(NSString * _Nonnull)name;
  369. - (NSString * _Nonnull)getName SWIFT_WARN_UNUSED_RESULT;
  370. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  371. - (void)addCharacteristic:(BluetoothHelperCharacteristic * _Nonnull)characteristic;
  372. - (NSArray<BluetoothHelperCharacteristic *> * _Nonnull)getCharacteristics SWIFT_WARN_UNUSED_RESULT;
  373. @end
  374. SWIFT_PROTOCOL("_TtP17BluetoothUnityAPI14IStreamManager_")
  375. @protocol IStreamManager
  376. - (NSArray<NSNumber *> * _Nonnull)formatDataToSend:(NSArray<NSNumber *> * _Nonnull)buff SWIFT_WARN_UNUSED_RESULT;
  377. - (void)handleReceivedData:(NSArray<NSNumber *> * _Nonnull)buff;
  378. - (void)setInvokeOnDataReceived:(id <InvokeOnDataReceived> _Nonnull)listener;
  379. @end
  380. SWIFT_CLASS("_TtC17BluetoothUnityAPI20ScanResultPeripheral")
  381. @interface ScanResultPeripheral : NSObject
  382. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  383. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  384. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  385. @end
  386. #endif
  387. #if defined(__cplusplus)
  388. #endif
  389. #if __has_attribute(external_source_symbol)
  390. # pragma clang attribute pop
  391. #endif
  392. #pragma clang diagnostic pop
  393. #endif
  394. #else
  395. #error unsupported Swift architecture
  396. #endif