Flutterblue.pbobjc.m 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: flutterblue.proto
  3. // This CPP symbol can be defined to use imports that match up to the framework
  4. // imports needed when using CocoaPods.
  5. #if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
  6. #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
  7. #endif
  8. #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
  9. #import <protobuf/GPBProtocolBuffers_RuntimeSupport.h>
  10. #else
  11. #import "GPBProtocolBuffers_RuntimeSupport.h"
  12. #endif
  13. #import <stdatomic.h>
  14. #import "Flutterblue.pbobjc.h"
  15. // @@protoc_insertion_point(imports)
  16. #pragma clang diagnostic push
  17. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  18. #pragma mark - ProtosFlutterblueRoot
  19. @implementation ProtosFlutterblueRoot
  20. // No extensions in the file and no imports, so no need to generate
  21. // +extensionRegistry.
  22. @end
  23. #pragma mark - ProtosFlutterblueRoot_FileDescriptor
  24. static GPBFileDescriptor *ProtosFlutterblueRoot_FileDescriptor(void) {
  25. // This is called by +initialize so there is no need to worry
  26. // about thread safety of the singleton.
  27. static GPBFileDescriptor *descriptor = NULL;
  28. if (!descriptor) {
  29. GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
  30. descriptor = [[GPBFileDescriptor alloc] initWithPackage:@""
  31. objcPrefix:@"Protos"
  32. syntax:GPBFileSyntaxProto3];
  33. }
  34. return descriptor;
  35. }
  36. #pragma mark - ProtosInt32Value
  37. @implementation ProtosInt32Value
  38. @dynamic value;
  39. typedef struct ProtosInt32Value__storage_ {
  40. uint32_t _has_storage_[1];
  41. int32_t value;
  42. } ProtosInt32Value__storage_;
  43. // This method is threadsafe because it is initially called
  44. // in +initialize for each subclass.
  45. + (GPBDescriptor *)descriptor {
  46. static GPBDescriptor *descriptor = nil;
  47. if (!descriptor) {
  48. static GPBMessageFieldDescription fields[] = {
  49. {
  50. .name = "value",
  51. .dataTypeSpecific.className = NULL,
  52. .number = ProtosInt32Value_FieldNumber_Value,
  53. .hasIndex = 0,
  54. .offset = (uint32_t)offsetof(ProtosInt32Value__storage_, value),
  55. .flags = GPBFieldOptional,
  56. .dataType = GPBDataTypeInt32,
  57. },
  58. };
  59. GPBDescriptor *localDescriptor =
  60. [GPBDescriptor allocDescriptorForClass:[ProtosInt32Value class]
  61. rootClass:[ProtosFlutterblueRoot class]
  62. file:ProtosFlutterblueRoot_FileDescriptor()
  63. fields:fields
  64. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  65. storageSize:sizeof(ProtosInt32Value__storage_)
  66. flags:GPBDescriptorInitializationFlag_None];
  67. #if defined(DEBUG) && DEBUG
  68. NSAssert(descriptor == nil, @"Startup recursed!");
  69. #endif // DEBUG
  70. descriptor = localDescriptor;
  71. }
  72. return descriptor;
  73. }
  74. @end
  75. #pragma mark - ProtosBluetoothState
  76. @implementation ProtosBluetoothState
  77. @dynamic state;
  78. typedef struct ProtosBluetoothState__storage_ {
  79. uint32_t _has_storage_[1];
  80. ProtosBluetoothState_State state;
  81. } ProtosBluetoothState__storage_;
  82. // This method is threadsafe because it is initially called
  83. // in +initialize for each subclass.
  84. + (GPBDescriptor *)descriptor {
  85. static GPBDescriptor *descriptor = nil;
  86. if (!descriptor) {
  87. static GPBMessageFieldDescription fields[] = {
  88. {
  89. .name = "state",
  90. .dataTypeSpecific.enumDescFunc = ProtosBluetoothState_State_EnumDescriptor,
  91. .number = ProtosBluetoothState_FieldNumber_State,
  92. .hasIndex = 0,
  93. .offset = (uint32_t)offsetof(ProtosBluetoothState__storage_, state),
  94. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
  95. .dataType = GPBDataTypeEnum,
  96. },
  97. };
  98. GPBDescriptor *localDescriptor =
  99. [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothState class]
  100. rootClass:[ProtosFlutterblueRoot class]
  101. file:ProtosFlutterblueRoot_FileDescriptor()
  102. fields:fields
  103. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  104. storageSize:sizeof(ProtosBluetoothState__storage_)
  105. flags:GPBDescriptorInitializationFlag_None];
  106. #if defined(DEBUG) && DEBUG
  107. NSAssert(descriptor == nil, @"Startup recursed!");
  108. #endif // DEBUG
  109. descriptor = localDescriptor;
  110. }
  111. return descriptor;
  112. }
  113. @end
  114. int32_t ProtosBluetoothState_State_RawValue(ProtosBluetoothState *message) {
  115. GPBDescriptor *descriptor = [ProtosBluetoothState descriptor];
  116. GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothState_FieldNumber_State];
  117. return GPBGetMessageInt32Field(message, field);
  118. }
  119. void SetProtosBluetoothState_State_RawValue(ProtosBluetoothState *message, int32_t value) {
  120. GPBDescriptor *descriptor = [ProtosBluetoothState descriptor];
  121. GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothState_FieldNumber_State];
  122. GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
  123. }
  124. #pragma mark - Enum ProtosBluetoothState_State
  125. GPBEnumDescriptor *ProtosBluetoothState_State_EnumDescriptor(void) {
  126. static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  127. if (!descriptor) {
  128. static const char *valueNames =
  129. "Unknown\000Unavailable\000Unauthorized\000Turning"
  130. "On\000On\000TurningOff\000Off\000";
  131. static const int32_t values[] = {
  132. ProtosBluetoothState_State_Unknown,
  133. ProtosBluetoothState_State_Unavailable,
  134. ProtosBluetoothState_State_Unauthorized,
  135. ProtosBluetoothState_State_TurningOn,
  136. ProtosBluetoothState_State_On,
  137. ProtosBluetoothState_State_TurningOff,
  138. ProtosBluetoothState_State_Off,
  139. };
  140. GPBEnumDescriptor *worker =
  141. [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosBluetoothState_State)
  142. valueNames:valueNames
  143. values:values
  144. count:(uint32_t)(sizeof(values) / sizeof(int32_t))
  145. enumVerifier:ProtosBluetoothState_State_IsValidValue];
  146. GPBEnumDescriptor *expected = nil;
  147. if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
  148. [worker release];
  149. }
  150. }
  151. return descriptor;
  152. }
  153. BOOL ProtosBluetoothState_State_IsValidValue(int32_t value__) {
  154. switch (value__) {
  155. case ProtosBluetoothState_State_Unknown:
  156. case ProtosBluetoothState_State_Unavailable:
  157. case ProtosBluetoothState_State_Unauthorized:
  158. case ProtosBluetoothState_State_TurningOn:
  159. case ProtosBluetoothState_State_On:
  160. case ProtosBluetoothState_State_TurningOff:
  161. case ProtosBluetoothState_State_Off:
  162. return YES;
  163. default:
  164. return NO;
  165. }
  166. }
  167. #pragma mark - ProtosAdvertisementData
  168. @implementation ProtosAdvertisementData
  169. @dynamic localName;
  170. @dynamic hasTxPowerLevel, txPowerLevel;
  171. @dynamic connectable;
  172. @dynamic manufacturerData, manufacturerData_Count;
  173. @dynamic serviceData, serviceData_Count;
  174. @dynamic serviceUuidsArray, serviceUuidsArray_Count;
  175. typedef struct ProtosAdvertisementData__storage_ {
  176. uint32_t _has_storage_[1];
  177. NSString *localName;
  178. ProtosInt32Value *txPowerLevel;
  179. GPBInt32ObjectDictionary *manufacturerData;
  180. NSMutableDictionary *serviceData;
  181. NSMutableArray *serviceUuidsArray;
  182. } ProtosAdvertisementData__storage_;
  183. // This method is threadsafe because it is initially called
  184. // in +initialize for each subclass.
  185. + (GPBDescriptor *)descriptor {
  186. static GPBDescriptor *descriptor = nil;
  187. if (!descriptor) {
  188. static GPBMessageFieldDescription fields[] = {
  189. {
  190. .name = "localName",
  191. .dataTypeSpecific.className = NULL,
  192. .number = ProtosAdvertisementData_FieldNumber_LocalName,
  193. .hasIndex = 0,
  194. .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, localName),
  195. .flags = GPBFieldOptional,
  196. .dataType = GPBDataTypeString,
  197. },
  198. {
  199. .name = "txPowerLevel",
  200. .dataTypeSpecific.className = GPBStringifySymbol(ProtosInt32Value),
  201. .number = ProtosAdvertisementData_FieldNumber_TxPowerLevel,
  202. .hasIndex = 1,
  203. .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, txPowerLevel),
  204. .flags = GPBFieldOptional,
  205. .dataType = GPBDataTypeMessage,
  206. },
  207. {
  208. .name = "connectable",
  209. .dataTypeSpecific.className = NULL,
  210. .number = ProtosAdvertisementData_FieldNumber_Connectable,
  211. .hasIndex = 2,
  212. .offset = 3, // Stored in _has_storage_ to save space.
  213. .flags = GPBFieldOptional,
  214. .dataType = GPBDataTypeBool,
  215. },
  216. {
  217. .name = "manufacturerData",
  218. .dataTypeSpecific.className = NULL,
  219. .number = ProtosAdvertisementData_FieldNumber_ManufacturerData,
  220. .hasIndex = GPBNoHasBit,
  221. .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, manufacturerData),
  222. .flags = GPBFieldMapKeyInt32,
  223. .dataType = GPBDataTypeBytes,
  224. },
  225. {
  226. .name = "serviceData",
  227. .dataTypeSpecific.className = NULL,
  228. .number = ProtosAdvertisementData_FieldNumber_ServiceData,
  229. .hasIndex = GPBNoHasBit,
  230. .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, serviceData),
  231. .flags = GPBFieldMapKeyString,
  232. .dataType = GPBDataTypeBytes,
  233. },
  234. {
  235. .name = "serviceUuidsArray",
  236. .dataTypeSpecific.className = NULL,
  237. .number = ProtosAdvertisementData_FieldNumber_ServiceUuidsArray,
  238. .hasIndex = GPBNoHasBit,
  239. .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, serviceUuidsArray),
  240. .flags = GPBFieldRepeated,
  241. .dataType = GPBDataTypeString,
  242. },
  243. };
  244. GPBDescriptor *localDescriptor =
  245. [GPBDescriptor allocDescriptorForClass:[ProtosAdvertisementData class]
  246. rootClass:[ProtosFlutterblueRoot class]
  247. file:ProtosFlutterblueRoot_FileDescriptor()
  248. fields:fields
  249. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  250. storageSize:sizeof(ProtosAdvertisementData__storage_)
  251. flags:GPBDescriptorInitializationFlag_None];
  252. #if defined(DEBUG) && DEBUG
  253. NSAssert(descriptor == nil, @"Startup recursed!");
  254. #endif // DEBUG
  255. descriptor = localDescriptor;
  256. }
  257. return descriptor;
  258. }
  259. @end
  260. #pragma mark - ProtosScanSettings
  261. @implementation ProtosScanSettings
  262. @dynamic androidScanMode;
  263. @dynamic serviceUuidsArray, serviceUuidsArray_Count;
  264. @dynamic allowDuplicates;
  265. typedef struct ProtosScanSettings__storage_ {
  266. uint32_t _has_storage_[1];
  267. int32_t androidScanMode;
  268. NSMutableArray *serviceUuidsArray;
  269. } ProtosScanSettings__storage_;
  270. // This method is threadsafe because it is initially called
  271. // in +initialize for each subclass.
  272. + (GPBDescriptor *)descriptor {
  273. static GPBDescriptor *descriptor = nil;
  274. if (!descriptor) {
  275. static GPBMessageFieldDescription fields[] = {
  276. {
  277. .name = "androidScanMode",
  278. .dataTypeSpecific.className = NULL,
  279. .number = ProtosScanSettings_FieldNumber_AndroidScanMode,
  280. .hasIndex = 0,
  281. .offset = (uint32_t)offsetof(ProtosScanSettings__storage_, androidScanMode),
  282. .flags = GPBFieldOptional,
  283. .dataType = GPBDataTypeInt32,
  284. },
  285. {
  286. .name = "serviceUuidsArray",
  287. .dataTypeSpecific.className = NULL,
  288. .number = ProtosScanSettings_FieldNumber_ServiceUuidsArray,
  289. .hasIndex = GPBNoHasBit,
  290. .offset = (uint32_t)offsetof(ProtosScanSettings__storage_, serviceUuidsArray),
  291. .flags = GPBFieldRepeated,
  292. .dataType = GPBDataTypeString,
  293. },
  294. {
  295. .name = "allowDuplicates",
  296. .dataTypeSpecific.className = NULL,
  297. .number = ProtosScanSettings_FieldNumber_AllowDuplicates,
  298. .hasIndex = 1,
  299. .offset = 2, // Stored in _has_storage_ to save space.
  300. .flags = GPBFieldOptional,
  301. .dataType = GPBDataTypeBool,
  302. },
  303. };
  304. GPBDescriptor *localDescriptor =
  305. [GPBDescriptor allocDescriptorForClass:[ProtosScanSettings class]
  306. rootClass:[ProtosFlutterblueRoot class]
  307. file:ProtosFlutterblueRoot_FileDescriptor()
  308. fields:fields
  309. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  310. storageSize:sizeof(ProtosScanSettings__storage_)
  311. flags:GPBDescriptorInitializationFlag_None];
  312. #if defined(DEBUG) && DEBUG
  313. NSAssert(descriptor == nil, @"Startup recursed!");
  314. #endif // DEBUG
  315. descriptor = localDescriptor;
  316. }
  317. return descriptor;
  318. }
  319. @end
  320. #pragma mark - ProtosScanResult
  321. @implementation ProtosScanResult
  322. @dynamic hasDevice, device;
  323. @dynamic hasAdvertisementData, advertisementData;
  324. @dynamic rssi;
  325. typedef struct ProtosScanResult__storage_ {
  326. uint32_t _has_storage_[1];
  327. int32_t rssi;
  328. ProtosBluetoothDevice *device;
  329. ProtosAdvertisementData *advertisementData;
  330. } ProtosScanResult__storage_;
  331. // This method is threadsafe because it is initially called
  332. // in +initialize for each subclass.
  333. + (GPBDescriptor *)descriptor {
  334. static GPBDescriptor *descriptor = nil;
  335. if (!descriptor) {
  336. static GPBMessageFieldDescription fields[] = {
  337. {
  338. .name = "device",
  339. .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothDevice),
  340. .number = ProtosScanResult_FieldNumber_Device,
  341. .hasIndex = 0,
  342. .offset = (uint32_t)offsetof(ProtosScanResult__storage_, device),
  343. .flags = GPBFieldOptional,
  344. .dataType = GPBDataTypeMessage,
  345. },
  346. {
  347. .name = "advertisementData",
  348. .dataTypeSpecific.className = GPBStringifySymbol(ProtosAdvertisementData),
  349. .number = ProtosScanResult_FieldNumber_AdvertisementData,
  350. .hasIndex = 1,
  351. .offset = (uint32_t)offsetof(ProtosScanResult__storage_, advertisementData),
  352. .flags = GPBFieldOptional,
  353. .dataType = GPBDataTypeMessage,
  354. },
  355. {
  356. .name = "rssi",
  357. .dataTypeSpecific.className = NULL,
  358. .number = ProtosScanResult_FieldNumber_Rssi,
  359. .hasIndex = 2,
  360. .offset = (uint32_t)offsetof(ProtosScanResult__storage_, rssi),
  361. .flags = GPBFieldOptional,
  362. .dataType = GPBDataTypeInt32,
  363. },
  364. };
  365. GPBDescriptor *localDescriptor =
  366. [GPBDescriptor allocDescriptorForClass:[ProtosScanResult class]
  367. rootClass:[ProtosFlutterblueRoot class]
  368. file:ProtosFlutterblueRoot_FileDescriptor()
  369. fields:fields
  370. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  371. storageSize:sizeof(ProtosScanResult__storage_)
  372. flags:GPBDescriptorInitializationFlag_None];
  373. #if defined(DEBUG) && DEBUG
  374. NSAssert(descriptor == nil, @"Startup recursed!");
  375. #endif // DEBUG
  376. descriptor = localDescriptor;
  377. }
  378. return descriptor;
  379. }
  380. @end
  381. #pragma mark - ProtosConnectRequest
  382. @implementation ProtosConnectRequest
  383. @dynamic remoteId;
  384. @dynamic androidAutoConnect;
  385. typedef struct ProtosConnectRequest__storage_ {
  386. uint32_t _has_storage_[1];
  387. NSString *remoteId;
  388. } ProtosConnectRequest__storage_;
  389. // This method is threadsafe because it is initially called
  390. // in +initialize for each subclass.
  391. + (GPBDescriptor *)descriptor {
  392. static GPBDescriptor *descriptor = nil;
  393. if (!descriptor) {
  394. static GPBMessageFieldDescription fields[] = {
  395. {
  396. .name = "remoteId",
  397. .dataTypeSpecific.className = NULL,
  398. .number = ProtosConnectRequest_FieldNumber_RemoteId,
  399. .hasIndex = 0,
  400. .offset = (uint32_t)offsetof(ProtosConnectRequest__storage_, remoteId),
  401. .flags = GPBFieldOptional,
  402. .dataType = GPBDataTypeString,
  403. },
  404. {
  405. .name = "androidAutoConnect",
  406. .dataTypeSpecific.className = NULL,
  407. .number = ProtosConnectRequest_FieldNumber_AndroidAutoConnect,
  408. .hasIndex = 1,
  409. .offset = 2, // Stored in _has_storage_ to save space.
  410. .flags = GPBFieldOptional,
  411. .dataType = GPBDataTypeBool,
  412. },
  413. };
  414. GPBDescriptor *localDescriptor =
  415. [GPBDescriptor allocDescriptorForClass:[ProtosConnectRequest class]
  416. rootClass:[ProtosFlutterblueRoot class]
  417. file:ProtosFlutterblueRoot_FileDescriptor()
  418. fields:fields
  419. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  420. storageSize:sizeof(ProtosConnectRequest__storage_)
  421. flags:GPBDescriptorInitializationFlag_None];
  422. #if defined(DEBUG) && DEBUG
  423. NSAssert(descriptor == nil, @"Startup recursed!");
  424. #endif // DEBUG
  425. descriptor = localDescriptor;
  426. }
  427. return descriptor;
  428. }
  429. @end
  430. #pragma mark - ProtosBluetoothDevice
  431. @implementation ProtosBluetoothDevice
  432. @dynamic remoteId;
  433. @dynamic name;
  434. @dynamic type;
  435. typedef struct ProtosBluetoothDevice__storage_ {
  436. uint32_t _has_storage_[1];
  437. ProtosBluetoothDevice_Type type;
  438. NSString *remoteId;
  439. NSString *name;
  440. } ProtosBluetoothDevice__storage_;
  441. // This method is threadsafe because it is initially called
  442. // in +initialize for each subclass.
  443. + (GPBDescriptor *)descriptor {
  444. static GPBDescriptor *descriptor = nil;
  445. if (!descriptor) {
  446. static GPBMessageFieldDescription fields[] = {
  447. {
  448. .name = "remoteId",
  449. .dataTypeSpecific.className = NULL,
  450. .number = ProtosBluetoothDevice_FieldNumber_RemoteId,
  451. .hasIndex = 0,
  452. .offset = (uint32_t)offsetof(ProtosBluetoothDevice__storage_, remoteId),
  453. .flags = GPBFieldOptional,
  454. .dataType = GPBDataTypeString,
  455. },
  456. {
  457. .name = "name",
  458. .dataTypeSpecific.className = NULL,
  459. .number = ProtosBluetoothDevice_FieldNumber_Name,
  460. .hasIndex = 1,
  461. .offset = (uint32_t)offsetof(ProtosBluetoothDevice__storage_, name),
  462. .flags = GPBFieldOptional,
  463. .dataType = GPBDataTypeString,
  464. },
  465. {
  466. .name = "type",
  467. .dataTypeSpecific.enumDescFunc = ProtosBluetoothDevice_Type_EnumDescriptor,
  468. .number = ProtosBluetoothDevice_FieldNumber_Type,
  469. .hasIndex = 2,
  470. .offset = (uint32_t)offsetof(ProtosBluetoothDevice__storage_, type),
  471. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
  472. .dataType = GPBDataTypeEnum,
  473. },
  474. };
  475. GPBDescriptor *localDescriptor =
  476. [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothDevice class]
  477. rootClass:[ProtosFlutterblueRoot class]
  478. file:ProtosFlutterblueRoot_FileDescriptor()
  479. fields:fields
  480. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  481. storageSize:sizeof(ProtosBluetoothDevice__storage_)
  482. flags:GPBDescriptorInitializationFlag_None];
  483. #if defined(DEBUG) && DEBUG
  484. NSAssert(descriptor == nil, @"Startup recursed!");
  485. #endif // DEBUG
  486. descriptor = localDescriptor;
  487. }
  488. return descriptor;
  489. }
  490. @end
  491. int32_t ProtosBluetoothDevice_Type_RawValue(ProtosBluetoothDevice *message) {
  492. GPBDescriptor *descriptor = [ProtosBluetoothDevice descriptor];
  493. GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothDevice_FieldNumber_Type];
  494. return GPBGetMessageInt32Field(message, field);
  495. }
  496. void SetProtosBluetoothDevice_Type_RawValue(ProtosBluetoothDevice *message, int32_t value) {
  497. GPBDescriptor *descriptor = [ProtosBluetoothDevice descriptor];
  498. GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothDevice_FieldNumber_Type];
  499. GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
  500. }
  501. #pragma mark - Enum ProtosBluetoothDevice_Type
  502. GPBEnumDescriptor *ProtosBluetoothDevice_Type_EnumDescriptor(void) {
  503. static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  504. if (!descriptor) {
  505. static const char *valueNames =
  506. "Unknown\000Classic\000Le\000Dual\000";
  507. static const int32_t values[] = {
  508. ProtosBluetoothDevice_Type_Unknown,
  509. ProtosBluetoothDevice_Type_Classic,
  510. ProtosBluetoothDevice_Type_Le,
  511. ProtosBluetoothDevice_Type_Dual,
  512. };
  513. GPBEnumDescriptor *worker =
  514. [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosBluetoothDevice_Type)
  515. valueNames:valueNames
  516. values:values
  517. count:(uint32_t)(sizeof(values) / sizeof(int32_t))
  518. enumVerifier:ProtosBluetoothDevice_Type_IsValidValue];
  519. GPBEnumDescriptor *expected = nil;
  520. if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
  521. [worker release];
  522. }
  523. }
  524. return descriptor;
  525. }
  526. BOOL ProtosBluetoothDevice_Type_IsValidValue(int32_t value__) {
  527. switch (value__) {
  528. case ProtosBluetoothDevice_Type_Unknown:
  529. case ProtosBluetoothDevice_Type_Classic:
  530. case ProtosBluetoothDevice_Type_Le:
  531. case ProtosBluetoothDevice_Type_Dual:
  532. return YES;
  533. default:
  534. return NO;
  535. }
  536. }
  537. #pragma mark - ProtosBluetoothService
  538. @implementation ProtosBluetoothService
  539. @dynamic uuid;
  540. @dynamic remoteId;
  541. @dynamic isPrimary;
  542. @dynamic characteristicsArray, characteristicsArray_Count;
  543. @dynamic includedServicesArray, includedServicesArray_Count;
  544. typedef struct ProtosBluetoothService__storage_ {
  545. uint32_t _has_storage_[1];
  546. NSString *uuid;
  547. NSString *remoteId;
  548. NSMutableArray *characteristicsArray;
  549. NSMutableArray *includedServicesArray;
  550. } ProtosBluetoothService__storage_;
  551. // This method is threadsafe because it is initially called
  552. // in +initialize for each subclass.
  553. + (GPBDescriptor *)descriptor {
  554. static GPBDescriptor *descriptor = nil;
  555. if (!descriptor) {
  556. static GPBMessageFieldDescription fields[] = {
  557. {
  558. .name = "uuid",
  559. .dataTypeSpecific.className = NULL,
  560. .number = ProtosBluetoothService_FieldNumber_Uuid,
  561. .hasIndex = 0,
  562. .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, uuid),
  563. .flags = GPBFieldOptional,
  564. .dataType = GPBDataTypeString,
  565. },
  566. {
  567. .name = "remoteId",
  568. .dataTypeSpecific.className = NULL,
  569. .number = ProtosBluetoothService_FieldNumber_RemoteId,
  570. .hasIndex = 1,
  571. .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, remoteId),
  572. .flags = GPBFieldOptional,
  573. .dataType = GPBDataTypeString,
  574. },
  575. {
  576. .name = "isPrimary",
  577. .dataTypeSpecific.className = NULL,
  578. .number = ProtosBluetoothService_FieldNumber_IsPrimary,
  579. .hasIndex = 2,
  580. .offset = 3, // Stored in _has_storage_ to save space.
  581. .flags = GPBFieldOptional,
  582. .dataType = GPBDataTypeBool,
  583. },
  584. {
  585. .name = "characteristicsArray",
  586. .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic),
  587. .number = ProtosBluetoothService_FieldNumber_CharacteristicsArray,
  588. .hasIndex = GPBNoHasBit,
  589. .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, characteristicsArray),
  590. .flags = GPBFieldRepeated,
  591. .dataType = GPBDataTypeMessage,
  592. },
  593. {
  594. .name = "includedServicesArray",
  595. .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothService),
  596. .number = ProtosBluetoothService_FieldNumber_IncludedServicesArray,
  597. .hasIndex = GPBNoHasBit,
  598. .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, includedServicesArray),
  599. .flags = GPBFieldRepeated,
  600. .dataType = GPBDataTypeMessage,
  601. },
  602. };
  603. GPBDescriptor *localDescriptor =
  604. [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothService class]
  605. rootClass:[ProtosFlutterblueRoot class]
  606. file:ProtosFlutterblueRoot_FileDescriptor()
  607. fields:fields
  608. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  609. storageSize:sizeof(ProtosBluetoothService__storage_)
  610. flags:GPBDescriptorInitializationFlag_None];
  611. #if defined(DEBUG) && DEBUG
  612. NSAssert(descriptor == nil, @"Startup recursed!");
  613. #endif // DEBUG
  614. descriptor = localDescriptor;
  615. }
  616. return descriptor;
  617. }
  618. @end
  619. #pragma mark - ProtosBluetoothCharacteristic
  620. @implementation ProtosBluetoothCharacteristic
  621. @dynamic uuid;
  622. @dynamic remoteId;
  623. @dynamic serviceUuid;
  624. @dynamic secondaryServiceUuid;
  625. @dynamic descriptorsArray, descriptorsArray_Count;
  626. @dynamic hasProperties, properties;
  627. @dynamic value;
  628. typedef struct ProtosBluetoothCharacteristic__storage_ {
  629. uint32_t _has_storage_[1];
  630. NSString *uuid;
  631. NSString *remoteId;
  632. NSString *serviceUuid;
  633. NSString *secondaryServiceUuid;
  634. NSMutableArray *descriptorsArray;
  635. ProtosCharacteristicProperties *properties;
  636. NSData *value;
  637. } ProtosBluetoothCharacteristic__storage_;
  638. // This method is threadsafe because it is initially called
  639. // in +initialize for each subclass.
  640. + (GPBDescriptor *)descriptor {
  641. static GPBDescriptor *descriptor = nil;
  642. if (!descriptor) {
  643. static GPBMessageFieldDescription fields[] = {
  644. {
  645. .name = "uuid",
  646. .dataTypeSpecific.className = NULL,
  647. .number = ProtosBluetoothCharacteristic_FieldNumber_Uuid,
  648. .hasIndex = 0,
  649. .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, uuid),
  650. .flags = GPBFieldOptional,
  651. .dataType = GPBDataTypeString,
  652. },
  653. {
  654. .name = "remoteId",
  655. .dataTypeSpecific.className = NULL,
  656. .number = ProtosBluetoothCharacteristic_FieldNumber_RemoteId,
  657. .hasIndex = 1,
  658. .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, remoteId),
  659. .flags = GPBFieldOptional,
  660. .dataType = GPBDataTypeString,
  661. },
  662. {
  663. .name = "serviceUuid",
  664. .dataTypeSpecific.className = NULL,
  665. .number = ProtosBluetoothCharacteristic_FieldNumber_ServiceUuid,
  666. .hasIndex = 2,
  667. .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, serviceUuid),
  668. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom),
  669. .dataType = GPBDataTypeString,
  670. },
  671. {
  672. .name = "secondaryServiceUuid",
  673. .dataTypeSpecific.className = NULL,
  674. .number = ProtosBluetoothCharacteristic_FieldNumber_SecondaryServiceUuid,
  675. .hasIndex = 3,
  676. .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, secondaryServiceUuid),
  677. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom),
  678. .dataType = GPBDataTypeString,
  679. },
  680. {
  681. .name = "descriptorsArray",
  682. .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothDescriptor),
  683. .number = ProtosBluetoothCharacteristic_FieldNumber_DescriptorsArray,
  684. .hasIndex = GPBNoHasBit,
  685. .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, descriptorsArray),
  686. .flags = GPBFieldRepeated,
  687. .dataType = GPBDataTypeMessage,
  688. },
  689. {
  690. .name = "properties",
  691. .dataTypeSpecific.className = GPBStringifySymbol(ProtosCharacteristicProperties),
  692. .number = ProtosBluetoothCharacteristic_FieldNumber_Properties,
  693. .hasIndex = 4,
  694. .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, properties),
  695. .flags = GPBFieldOptional,
  696. .dataType = GPBDataTypeMessage,
  697. },
  698. {
  699. .name = "value",
  700. .dataTypeSpecific.className = NULL,
  701. .number = ProtosBluetoothCharacteristic_FieldNumber_Value,
  702. .hasIndex = 5,
  703. .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, value),
  704. .flags = GPBFieldOptional,
  705. .dataType = GPBDataTypeBytes,
  706. },
  707. };
  708. GPBDescriptor *localDescriptor =
  709. [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothCharacteristic class]
  710. rootClass:[ProtosFlutterblueRoot class]
  711. file:ProtosFlutterblueRoot_FileDescriptor()
  712. fields:fields
  713. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  714. storageSize:sizeof(ProtosBluetoothCharacteristic__storage_)
  715. flags:GPBDescriptorInitializationFlag_None];
  716. #if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
  717. static const char *extraTextFormatInfo =
  718. "\002\003\013\000\004\024\000";
  719. [localDescriptor setupExtraTextInfo:extraTextFormatInfo];
  720. #endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
  721. #if defined(DEBUG) && DEBUG
  722. NSAssert(descriptor == nil, @"Startup recursed!");
  723. #endif // DEBUG
  724. descriptor = localDescriptor;
  725. }
  726. return descriptor;
  727. }
  728. @end
  729. #pragma mark - ProtosBluetoothDescriptor
  730. @implementation ProtosBluetoothDescriptor
  731. @dynamic uuid;
  732. @dynamic remoteId;
  733. @dynamic serviceUuid;
  734. @dynamic characteristicUuid;
  735. @dynamic value;
  736. typedef struct ProtosBluetoothDescriptor__storage_ {
  737. uint32_t _has_storage_[1];
  738. NSString *uuid;
  739. NSString *remoteId;
  740. NSString *serviceUuid;
  741. NSString *characteristicUuid;
  742. NSData *value;
  743. } ProtosBluetoothDescriptor__storage_;
  744. // This method is threadsafe because it is initially called
  745. // in +initialize for each subclass.
  746. + (GPBDescriptor *)descriptor {
  747. static GPBDescriptor *descriptor = nil;
  748. if (!descriptor) {
  749. static GPBMessageFieldDescription fields[] = {
  750. {
  751. .name = "uuid",
  752. .dataTypeSpecific.className = NULL,
  753. .number = ProtosBluetoothDescriptor_FieldNumber_Uuid,
  754. .hasIndex = 0,
  755. .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, uuid),
  756. .flags = GPBFieldOptional,
  757. .dataType = GPBDataTypeString,
  758. },
  759. {
  760. .name = "remoteId",
  761. .dataTypeSpecific.className = NULL,
  762. .number = ProtosBluetoothDescriptor_FieldNumber_RemoteId,
  763. .hasIndex = 1,
  764. .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, remoteId),
  765. .flags = GPBFieldOptional,
  766. .dataType = GPBDataTypeString,
  767. },
  768. {
  769. .name = "serviceUuid",
  770. .dataTypeSpecific.className = NULL,
  771. .number = ProtosBluetoothDescriptor_FieldNumber_ServiceUuid,
  772. .hasIndex = 2,
  773. .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, serviceUuid),
  774. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom),
  775. .dataType = GPBDataTypeString,
  776. },
  777. {
  778. .name = "characteristicUuid",
  779. .dataTypeSpecific.className = NULL,
  780. .number = ProtosBluetoothDescriptor_FieldNumber_CharacteristicUuid,
  781. .hasIndex = 3,
  782. .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, characteristicUuid),
  783. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom),
  784. .dataType = GPBDataTypeString,
  785. },
  786. {
  787. .name = "value",
  788. .dataTypeSpecific.className = NULL,
  789. .number = ProtosBluetoothDescriptor_FieldNumber_Value,
  790. .hasIndex = 4,
  791. .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, value),
  792. .flags = GPBFieldOptional,
  793. .dataType = GPBDataTypeBytes,
  794. },
  795. };
  796. GPBDescriptor *localDescriptor =
  797. [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothDescriptor class]
  798. rootClass:[ProtosFlutterblueRoot class]
  799. file:ProtosFlutterblueRoot_FileDescriptor()
  800. fields:fields
  801. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  802. storageSize:sizeof(ProtosBluetoothDescriptor__storage_)
  803. flags:GPBDescriptorInitializationFlag_None];
  804. #if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
  805. static const char *extraTextFormatInfo =
  806. "\002\003\013\000\004\022\000";
  807. [localDescriptor setupExtraTextInfo:extraTextFormatInfo];
  808. #endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
  809. #if defined(DEBUG) && DEBUG
  810. NSAssert(descriptor == nil, @"Startup recursed!");
  811. #endif // DEBUG
  812. descriptor = localDescriptor;
  813. }
  814. return descriptor;
  815. }
  816. @end
  817. #pragma mark - ProtosCharacteristicProperties
  818. @implementation ProtosCharacteristicProperties
  819. @dynamic broadcast;
  820. @dynamic read;
  821. @dynamic writeWithoutResponse;
  822. @dynamic write;
  823. @dynamic notify;
  824. @dynamic indicate;
  825. @dynamic authenticatedSignedWrites;
  826. @dynamic extendedProperties;
  827. @dynamic notifyEncryptionRequired;
  828. @dynamic indicateEncryptionRequired;
  829. typedef struct ProtosCharacteristicProperties__storage_ {
  830. uint32_t _has_storage_[1];
  831. } ProtosCharacteristicProperties__storage_;
  832. // This method is threadsafe because it is initially called
  833. // in +initialize for each subclass.
  834. + (GPBDescriptor *)descriptor {
  835. static GPBDescriptor *descriptor = nil;
  836. if (!descriptor) {
  837. static GPBMessageFieldDescription fields[] = {
  838. {
  839. .name = "broadcast",
  840. .dataTypeSpecific.className = NULL,
  841. .number = ProtosCharacteristicProperties_FieldNumber_Broadcast,
  842. .hasIndex = 0,
  843. .offset = 1, // Stored in _has_storage_ to save space.
  844. .flags = GPBFieldOptional,
  845. .dataType = GPBDataTypeBool,
  846. },
  847. {
  848. .name = "read",
  849. .dataTypeSpecific.className = NULL,
  850. .number = ProtosCharacteristicProperties_FieldNumber_Read,
  851. .hasIndex = 2,
  852. .offset = 3, // Stored in _has_storage_ to save space.
  853. .flags = GPBFieldOptional,
  854. .dataType = GPBDataTypeBool,
  855. },
  856. {
  857. .name = "writeWithoutResponse",
  858. .dataTypeSpecific.className = NULL,
  859. .number = ProtosCharacteristicProperties_FieldNumber_WriteWithoutResponse,
  860. .hasIndex = 4,
  861. .offset = 5, // Stored in _has_storage_ to save space.
  862. .flags = GPBFieldOptional,
  863. .dataType = GPBDataTypeBool,
  864. },
  865. {
  866. .name = "write",
  867. .dataTypeSpecific.className = NULL,
  868. .number = ProtosCharacteristicProperties_FieldNumber_Write,
  869. .hasIndex = 6,
  870. .offset = 7, // Stored in _has_storage_ to save space.
  871. .flags = GPBFieldOptional,
  872. .dataType = GPBDataTypeBool,
  873. },
  874. {
  875. .name = "notify",
  876. .dataTypeSpecific.className = NULL,
  877. .number = ProtosCharacteristicProperties_FieldNumber_Notify,
  878. .hasIndex = 8,
  879. .offset = 9, // Stored in _has_storage_ to save space.
  880. .flags = GPBFieldOptional,
  881. .dataType = GPBDataTypeBool,
  882. },
  883. {
  884. .name = "indicate",
  885. .dataTypeSpecific.className = NULL,
  886. .number = ProtosCharacteristicProperties_FieldNumber_Indicate,
  887. .hasIndex = 10,
  888. .offset = 11, // Stored in _has_storage_ to save space.
  889. .flags = GPBFieldOptional,
  890. .dataType = GPBDataTypeBool,
  891. },
  892. {
  893. .name = "authenticatedSignedWrites",
  894. .dataTypeSpecific.className = NULL,
  895. .number = ProtosCharacteristicProperties_FieldNumber_AuthenticatedSignedWrites,
  896. .hasIndex = 12,
  897. .offset = 13, // Stored in _has_storage_ to save space.
  898. .flags = GPBFieldOptional,
  899. .dataType = GPBDataTypeBool,
  900. },
  901. {
  902. .name = "extendedProperties",
  903. .dataTypeSpecific.className = NULL,
  904. .number = ProtosCharacteristicProperties_FieldNumber_ExtendedProperties,
  905. .hasIndex = 14,
  906. .offset = 15, // Stored in _has_storage_ to save space.
  907. .flags = GPBFieldOptional,
  908. .dataType = GPBDataTypeBool,
  909. },
  910. {
  911. .name = "notifyEncryptionRequired",
  912. .dataTypeSpecific.className = NULL,
  913. .number = ProtosCharacteristicProperties_FieldNumber_NotifyEncryptionRequired,
  914. .hasIndex = 16,
  915. .offset = 17, // Stored in _has_storage_ to save space.
  916. .flags = GPBFieldOptional,
  917. .dataType = GPBDataTypeBool,
  918. },
  919. {
  920. .name = "indicateEncryptionRequired",
  921. .dataTypeSpecific.className = NULL,
  922. .number = ProtosCharacteristicProperties_FieldNumber_IndicateEncryptionRequired,
  923. .hasIndex = 18,
  924. .offset = 19, // Stored in _has_storage_ to save space.
  925. .flags = GPBFieldOptional,
  926. .dataType = GPBDataTypeBool,
  927. },
  928. };
  929. GPBDescriptor *localDescriptor =
  930. [GPBDescriptor allocDescriptorForClass:[ProtosCharacteristicProperties class]
  931. rootClass:[ProtosFlutterblueRoot class]
  932. file:ProtosFlutterblueRoot_FileDescriptor()
  933. fields:fields
  934. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  935. storageSize:sizeof(ProtosCharacteristicProperties__storage_)
  936. flags:GPBDescriptorInitializationFlag_None];
  937. #if defined(DEBUG) && DEBUG
  938. NSAssert(descriptor == nil, @"Startup recursed!");
  939. #endif // DEBUG
  940. descriptor = localDescriptor;
  941. }
  942. return descriptor;
  943. }
  944. @end
  945. #pragma mark - ProtosDiscoverServicesResult
  946. @implementation ProtosDiscoverServicesResult
  947. @dynamic remoteId;
  948. @dynamic servicesArray, servicesArray_Count;
  949. typedef struct ProtosDiscoverServicesResult__storage_ {
  950. uint32_t _has_storage_[1];
  951. NSString *remoteId;
  952. NSMutableArray *servicesArray;
  953. } ProtosDiscoverServicesResult__storage_;
  954. // This method is threadsafe because it is initially called
  955. // in +initialize for each subclass.
  956. + (GPBDescriptor *)descriptor {
  957. static GPBDescriptor *descriptor = nil;
  958. if (!descriptor) {
  959. static GPBMessageFieldDescription fields[] = {
  960. {
  961. .name = "remoteId",
  962. .dataTypeSpecific.className = NULL,
  963. .number = ProtosDiscoverServicesResult_FieldNumber_RemoteId,
  964. .hasIndex = 0,
  965. .offset = (uint32_t)offsetof(ProtosDiscoverServicesResult__storage_, remoteId),
  966. .flags = GPBFieldOptional,
  967. .dataType = GPBDataTypeString,
  968. },
  969. {
  970. .name = "servicesArray",
  971. .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothService),
  972. .number = ProtosDiscoverServicesResult_FieldNumber_ServicesArray,
  973. .hasIndex = GPBNoHasBit,
  974. .offset = (uint32_t)offsetof(ProtosDiscoverServicesResult__storage_, servicesArray),
  975. .flags = GPBFieldRepeated,
  976. .dataType = GPBDataTypeMessage,
  977. },
  978. };
  979. GPBDescriptor *localDescriptor =
  980. [GPBDescriptor allocDescriptorForClass:[ProtosDiscoverServicesResult class]
  981. rootClass:[ProtosFlutterblueRoot class]
  982. file:ProtosFlutterblueRoot_FileDescriptor()
  983. fields:fields
  984. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  985. storageSize:sizeof(ProtosDiscoverServicesResult__storage_)
  986. flags:GPBDescriptorInitializationFlag_None];
  987. #if defined(DEBUG) && DEBUG
  988. NSAssert(descriptor == nil, @"Startup recursed!");
  989. #endif // DEBUG
  990. descriptor = localDescriptor;
  991. }
  992. return descriptor;
  993. }
  994. @end
  995. #pragma mark - ProtosReadCharacteristicRequest
  996. @implementation ProtosReadCharacteristicRequest
  997. @dynamic remoteId;
  998. @dynamic characteristicUuid;
  999. @dynamic serviceUuid;
  1000. @dynamic secondaryServiceUuid;
  1001. typedef struct ProtosReadCharacteristicRequest__storage_ {
  1002. uint32_t _has_storage_[1];
  1003. NSString *remoteId;
  1004. NSString *characteristicUuid;
  1005. NSString *serviceUuid;
  1006. NSString *secondaryServiceUuid;
  1007. } ProtosReadCharacteristicRequest__storage_;
  1008. // This method is threadsafe because it is initially called
  1009. // in +initialize for each subclass.
  1010. + (GPBDescriptor *)descriptor {
  1011. static GPBDescriptor *descriptor = nil;
  1012. if (!descriptor) {
  1013. static GPBMessageFieldDescription fields[] = {
  1014. {
  1015. .name = "remoteId",
  1016. .dataTypeSpecific.className = NULL,
  1017. .number = ProtosReadCharacteristicRequest_FieldNumber_RemoteId,
  1018. .hasIndex = 0,
  1019. .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, remoteId),
  1020. .flags = GPBFieldOptional,
  1021. .dataType = GPBDataTypeString,
  1022. },
  1023. {
  1024. .name = "characteristicUuid",
  1025. .dataTypeSpecific.className = NULL,
  1026. .number = ProtosReadCharacteristicRequest_FieldNumber_CharacteristicUuid,
  1027. .hasIndex = 1,
  1028. .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, characteristicUuid),
  1029. .flags = GPBFieldOptional,
  1030. .dataType = GPBDataTypeString,
  1031. },
  1032. {
  1033. .name = "serviceUuid",
  1034. .dataTypeSpecific.className = NULL,
  1035. .number = ProtosReadCharacteristicRequest_FieldNumber_ServiceUuid,
  1036. .hasIndex = 2,
  1037. .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, serviceUuid),
  1038. .flags = GPBFieldOptional,
  1039. .dataType = GPBDataTypeString,
  1040. },
  1041. {
  1042. .name = "secondaryServiceUuid",
  1043. .dataTypeSpecific.className = NULL,
  1044. .number = ProtosReadCharacteristicRequest_FieldNumber_SecondaryServiceUuid,
  1045. .hasIndex = 3,
  1046. .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, secondaryServiceUuid),
  1047. .flags = GPBFieldOptional,
  1048. .dataType = GPBDataTypeString,
  1049. },
  1050. };
  1051. GPBDescriptor *localDescriptor =
  1052. [GPBDescriptor allocDescriptorForClass:[ProtosReadCharacteristicRequest class]
  1053. rootClass:[ProtosFlutterblueRoot class]
  1054. file:ProtosFlutterblueRoot_FileDescriptor()
  1055. fields:fields
  1056. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1057. storageSize:sizeof(ProtosReadCharacteristicRequest__storage_)
  1058. flags:GPBDescriptorInitializationFlag_None];
  1059. #if defined(DEBUG) && DEBUG
  1060. NSAssert(descriptor == nil, @"Startup recursed!");
  1061. #endif // DEBUG
  1062. descriptor = localDescriptor;
  1063. }
  1064. return descriptor;
  1065. }
  1066. @end
  1067. #pragma mark - ProtosReadCharacteristicResponse
  1068. @implementation ProtosReadCharacteristicResponse
  1069. @dynamic remoteId;
  1070. @dynamic hasCharacteristic, characteristic;
  1071. typedef struct ProtosReadCharacteristicResponse__storage_ {
  1072. uint32_t _has_storage_[1];
  1073. NSString *remoteId;
  1074. ProtosBluetoothCharacteristic *characteristic;
  1075. } ProtosReadCharacteristicResponse__storage_;
  1076. // This method is threadsafe because it is initially called
  1077. // in +initialize for each subclass.
  1078. + (GPBDescriptor *)descriptor {
  1079. static GPBDescriptor *descriptor = nil;
  1080. if (!descriptor) {
  1081. static GPBMessageFieldDescription fields[] = {
  1082. {
  1083. .name = "remoteId",
  1084. .dataTypeSpecific.className = NULL,
  1085. .number = ProtosReadCharacteristicResponse_FieldNumber_RemoteId,
  1086. .hasIndex = 0,
  1087. .offset = (uint32_t)offsetof(ProtosReadCharacteristicResponse__storage_, remoteId),
  1088. .flags = GPBFieldOptional,
  1089. .dataType = GPBDataTypeString,
  1090. },
  1091. {
  1092. .name = "characteristic",
  1093. .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic),
  1094. .number = ProtosReadCharacteristicResponse_FieldNumber_Characteristic,
  1095. .hasIndex = 1,
  1096. .offset = (uint32_t)offsetof(ProtosReadCharacteristicResponse__storage_, characteristic),
  1097. .flags = GPBFieldOptional,
  1098. .dataType = GPBDataTypeMessage,
  1099. },
  1100. };
  1101. GPBDescriptor *localDescriptor =
  1102. [GPBDescriptor allocDescriptorForClass:[ProtosReadCharacteristicResponse class]
  1103. rootClass:[ProtosFlutterblueRoot class]
  1104. file:ProtosFlutterblueRoot_FileDescriptor()
  1105. fields:fields
  1106. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1107. storageSize:sizeof(ProtosReadCharacteristicResponse__storage_)
  1108. flags:GPBDescriptorInitializationFlag_None];
  1109. #if defined(DEBUG) && DEBUG
  1110. NSAssert(descriptor == nil, @"Startup recursed!");
  1111. #endif // DEBUG
  1112. descriptor = localDescriptor;
  1113. }
  1114. return descriptor;
  1115. }
  1116. @end
  1117. #pragma mark - ProtosReadDescriptorRequest
  1118. @implementation ProtosReadDescriptorRequest
  1119. @dynamic remoteId;
  1120. @dynamic descriptorUuid;
  1121. @dynamic serviceUuid;
  1122. @dynamic secondaryServiceUuid;
  1123. @dynamic characteristicUuid;
  1124. typedef struct ProtosReadDescriptorRequest__storage_ {
  1125. uint32_t _has_storage_[1];
  1126. NSString *remoteId;
  1127. NSString *descriptorUuid;
  1128. NSString *serviceUuid;
  1129. NSString *secondaryServiceUuid;
  1130. NSString *characteristicUuid;
  1131. } ProtosReadDescriptorRequest__storage_;
  1132. // This method is threadsafe because it is initially called
  1133. // in +initialize for each subclass.
  1134. + (GPBDescriptor *)descriptor {
  1135. static GPBDescriptor *descriptor = nil;
  1136. if (!descriptor) {
  1137. static GPBMessageFieldDescription fields[] = {
  1138. {
  1139. .name = "remoteId",
  1140. .dataTypeSpecific.className = NULL,
  1141. .number = ProtosReadDescriptorRequest_FieldNumber_RemoteId,
  1142. .hasIndex = 0,
  1143. .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, remoteId),
  1144. .flags = GPBFieldOptional,
  1145. .dataType = GPBDataTypeString,
  1146. },
  1147. {
  1148. .name = "descriptorUuid",
  1149. .dataTypeSpecific.className = NULL,
  1150. .number = ProtosReadDescriptorRequest_FieldNumber_DescriptorUuid,
  1151. .hasIndex = 1,
  1152. .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, descriptorUuid),
  1153. .flags = GPBFieldOptional,
  1154. .dataType = GPBDataTypeString,
  1155. },
  1156. {
  1157. .name = "serviceUuid",
  1158. .dataTypeSpecific.className = NULL,
  1159. .number = ProtosReadDescriptorRequest_FieldNumber_ServiceUuid,
  1160. .hasIndex = 2,
  1161. .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, serviceUuid),
  1162. .flags = GPBFieldOptional,
  1163. .dataType = GPBDataTypeString,
  1164. },
  1165. {
  1166. .name = "secondaryServiceUuid",
  1167. .dataTypeSpecific.className = NULL,
  1168. .number = ProtosReadDescriptorRequest_FieldNumber_SecondaryServiceUuid,
  1169. .hasIndex = 3,
  1170. .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, secondaryServiceUuid),
  1171. .flags = GPBFieldOptional,
  1172. .dataType = GPBDataTypeString,
  1173. },
  1174. {
  1175. .name = "characteristicUuid",
  1176. .dataTypeSpecific.className = NULL,
  1177. .number = ProtosReadDescriptorRequest_FieldNumber_CharacteristicUuid,
  1178. .hasIndex = 4,
  1179. .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, characteristicUuid),
  1180. .flags = GPBFieldOptional,
  1181. .dataType = GPBDataTypeString,
  1182. },
  1183. };
  1184. GPBDescriptor *localDescriptor =
  1185. [GPBDescriptor allocDescriptorForClass:[ProtosReadDescriptorRequest class]
  1186. rootClass:[ProtosFlutterblueRoot class]
  1187. file:ProtosFlutterblueRoot_FileDescriptor()
  1188. fields:fields
  1189. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1190. storageSize:sizeof(ProtosReadDescriptorRequest__storage_)
  1191. flags:GPBDescriptorInitializationFlag_None];
  1192. #if defined(DEBUG) && DEBUG
  1193. NSAssert(descriptor == nil, @"Startup recursed!");
  1194. #endif // DEBUG
  1195. descriptor = localDescriptor;
  1196. }
  1197. return descriptor;
  1198. }
  1199. @end
  1200. #pragma mark - ProtosReadDescriptorResponse
  1201. @implementation ProtosReadDescriptorResponse
  1202. @dynamic hasRequest, request;
  1203. @dynamic value;
  1204. typedef struct ProtosReadDescriptorResponse__storage_ {
  1205. uint32_t _has_storage_[1];
  1206. ProtosReadDescriptorRequest *request;
  1207. NSData *value;
  1208. } ProtosReadDescriptorResponse__storage_;
  1209. // This method is threadsafe because it is initially called
  1210. // in +initialize for each subclass.
  1211. + (GPBDescriptor *)descriptor {
  1212. static GPBDescriptor *descriptor = nil;
  1213. if (!descriptor) {
  1214. static GPBMessageFieldDescription fields[] = {
  1215. {
  1216. .name = "request",
  1217. .dataTypeSpecific.className = GPBStringifySymbol(ProtosReadDescriptorRequest),
  1218. .number = ProtosReadDescriptorResponse_FieldNumber_Request,
  1219. .hasIndex = 0,
  1220. .offset = (uint32_t)offsetof(ProtosReadDescriptorResponse__storage_, request),
  1221. .flags = GPBFieldOptional,
  1222. .dataType = GPBDataTypeMessage,
  1223. },
  1224. {
  1225. .name = "value",
  1226. .dataTypeSpecific.className = NULL,
  1227. .number = ProtosReadDescriptorResponse_FieldNumber_Value,
  1228. .hasIndex = 1,
  1229. .offset = (uint32_t)offsetof(ProtosReadDescriptorResponse__storage_, value),
  1230. .flags = GPBFieldOptional,
  1231. .dataType = GPBDataTypeBytes,
  1232. },
  1233. };
  1234. GPBDescriptor *localDescriptor =
  1235. [GPBDescriptor allocDescriptorForClass:[ProtosReadDescriptorResponse class]
  1236. rootClass:[ProtosFlutterblueRoot class]
  1237. file:ProtosFlutterblueRoot_FileDescriptor()
  1238. fields:fields
  1239. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1240. storageSize:sizeof(ProtosReadDescriptorResponse__storage_)
  1241. flags:GPBDescriptorInitializationFlag_None];
  1242. #if defined(DEBUG) && DEBUG
  1243. NSAssert(descriptor == nil, @"Startup recursed!");
  1244. #endif // DEBUG
  1245. descriptor = localDescriptor;
  1246. }
  1247. return descriptor;
  1248. }
  1249. @end
  1250. #pragma mark - ProtosWriteCharacteristicRequest
  1251. @implementation ProtosWriteCharacteristicRequest
  1252. @dynamic remoteId;
  1253. @dynamic characteristicUuid;
  1254. @dynamic serviceUuid;
  1255. @dynamic secondaryServiceUuid;
  1256. @dynamic writeType;
  1257. @dynamic value;
  1258. typedef struct ProtosWriteCharacteristicRequest__storage_ {
  1259. uint32_t _has_storage_[1];
  1260. ProtosWriteCharacteristicRequest_WriteType writeType;
  1261. NSString *remoteId;
  1262. NSString *characteristicUuid;
  1263. NSString *serviceUuid;
  1264. NSString *secondaryServiceUuid;
  1265. NSData *value;
  1266. } ProtosWriteCharacteristicRequest__storage_;
  1267. // This method is threadsafe because it is initially called
  1268. // in +initialize for each subclass.
  1269. + (GPBDescriptor *)descriptor {
  1270. static GPBDescriptor *descriptor = nil;
  1271. if (!descriptor) {
  1272. static GPBMessageFieldDescription fields[] = {
  1273. {
  1274. .name = "remoteId",
  1275. .dataTypeSpecific.className = NULL,
  1276. .number = ProtosWriteCharacteristicRequest_FieldNumber_RemoteId,
  1277. .hasIndex = 0,
  1278. .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, remoteId),
  1279. .flags = GPBFieldOptional,
  1280. .dataType = GPBDataTypeString,
  1281. },
  1282. {
  1283. .name = "characteristicUuid",
  1284. .dataTypeSpecific.className = NULL,
  1285. .number = ProtosWriteCharacteristicRequest_FieldNumber_CharacteristicUuid,
  1286. .hasIndex = 1,
  1287. .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, characteristicUuid),
  1288. .flags = GPBFieldOptional,
  1289. .dataType = GPBDataTypeString,
  1290. },
  1291. {
  1292. .name = "serviceUuid",
  1293. .dataTypeSpecific.className = NULL,
  1294. .number = ProtosWriteCharacteristicRequest_FieldNumber_ServiceUuid,
  1295. .hasIndex = 2,
  1296. .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, serviceUuid),
  1297. .flags = GPBFieldOptional,
  1298. .dataType = GPBDataTypeString,
  1299. },
  1300. {
  1301. .name = "secondaryServiceUuid",
  1302. .dataTypeSpecific.className = NULL,
  1303. .number = ProtosWriteCharacteristicRequest_FieldNumber_SecondaryServiceUuid,
  1304. .hasIndex = 3,
  1305. .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, secondaryServiceUuid),
  1306. .flags = GPBFieldOptional,
  1307. .dataType = GPBDataTypeString,
  1308. },
  1309. {
  1310. .name = "writeType",
  1311. .dataTypeSpecific.enumDescFunc = ProtosWriteCharacteristicRequest_WriteType_EnumDescriptor,
  1312. .number = ProtosWriteCharacteristicRequest_FieldNumber_WriteType,
  1313. .hasIndex = 4,
  1314. .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, writeType),
  1315. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
  1316. .dataType = GPBDataTypeEnum,
  1317. },
  1318. {
  1319. .name = "value",
  1320. .dataTypeSpecific.className = NULL,
  1321. .number = ProtosWriteCharacteristicRequest_FieldNumber_Value,
  1322. .hasIndex = 5,
  1323. .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, value),
  1324. .flags = GPBFieldOptional,
  1325. .dataType = GPBDataTypeBytes,
  1326. },
  1327. };
  1328. GPBDescriptor *localDescriptor =
  1329. [GPBDescriptor allocDescriptorForClass:[ProtosWriteCharacteristicRequest class]
  1330. rootClass:[ProtosFlutterblueRoot class]
  1331. file:ProtosFlutterblueRoot_FileDescriptor()
  1332. fields:fields
  1333. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1334. storageSize:sizeof(ProtosWriteCharacteristicRequest__storage_)
  1335. flags:GPBDescriptorInitializationFlag_None];
  1336. #if defined(DEBUG) && DEBUG
  1337. NSAssert(descriptor == nil, @"Startup recursed!");
  1338. #endif // DEBUG
  1339. descriptor = localDescriptor;
  1340. }
  1341. return descriptor;
  1342. }
  1343. @end
  1344. int32_t ProtosWriteCharacteristicRequest_WriteType_RawValue(ProtosWriteCharacteristicRequest *message) {
  1345. GPBDescriptor *descriptor = [ProtosWriteCharacteristicRequest descriptor];
  1346. GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosWriteCharacteristicRequest_FieldNumber_WriteType];
  1347. return GPBGetMessageInt32Field(message, field);
  1348. }
  1349. void SetProtosWriteCharacteristicRequest_WriteType_RawValue(ProtosWriteCharacteristicRequest *message, int32_t value) {
  1350. GPBDescriptor *descriptor = [ProtosWriteCharacteristicRequest descriptor];
  1351. GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosWriteCharacteristicRequest_FieldNumber_WriteType];
  1352. GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
  1353. }
  1354. #pragma mark - Enum ProtosWriteCharacteristicRequest_WriteType
  1355. GPBEnumDescriptor *ProtosWriteCharacteristicRequest_WriteType_EnumDescriptor(void) {
  1356. static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  1357. if (!descriptor) {
  1358. static const char *valueNames =
  1359. "WithResponse\000WithoutResponse\000";
  1360. static const int32_t values[] = {
  1361. ProtosWriteCharacteristicRequest_WriteType_WithResponse,
  1362. ProtosWriteCharacteristicRequest_WriteType_WithoutResponse,
  1363. };
  1364. GPBEnumDescriptor *worker =
  1365. [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosWriteCharacteristicRequest_WriteType)
  1366. valueNames:valueNames
  1367. values:values
  1368. count:(uint32_t)(sizeof(values) / sizeof(int32_t))
  1369. enumVerifier:ProtosWriteCharacteristicRequest_WriteType_IsValidValue];
  1370. GPBEnumDescriptor *expected = nil;
  1371. if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
  1372. [worker release];
  1373. }
  1374. }
  1375. return descriptor;
  1376. }
  1377. BOOL ProtosWriteCharacteristicRequest_WriteType_IsValidValue(int32_t value__) {
  1378. switch (value__) {
  1379. case ProtosWriteCharacteristicRequest_WriteType_WithResponse:
  1380. case ProtosWriteCharacteristicRequest_WriteType_WithoutResponse:
  1381. return YES;
  1382. default:
  1383. return NO;
  1384. }
  1385. }
  1386. #pragma mark - ProtosWriteCharacteristicResponse
  1387. @implementation ProtosWriteCharacteristicResponse
  1388. @dynamic hasRequest, request;
  1389. @dynamic success;
  1390. typedef struct ProtosWriteCharacteristicResponse__storage_ {
  1391. uint32_t _has_storage_[1];
  1392. ProtosWriteCharacteristicRequest *request;
  1393. } ProtosWriteCharacteristicResponse__storage_;
  1394. // This method is threadsafe because it is initially called
  1395. // in +initialize for each subclass.
  1396. + (GPBDescriptor *)descriptor {
  1397. static GPBDescriptor *descriptor = nil;
  1398. if (!descriptor) {
  1399. static GPBMessageFieldDescription fields[] = {
  1400. {
  1401. .name = "request",
  1402. .dataTypeSpecific.className = GPBStringifySymbol(ProtosWriteCharacteristicRequest),
  1403. .number = ProtosWriteCharacteristicResponse_FieldNumber_Request,
  1404. .hasIndex = 0,
  1405. .offset = (uint32_t)offsetof(ProtosWriteCharacteristicResponse__storage_, request),
  1406. .flags = GPBFieldOptional,
  1407. .dataType = GPBDataTypeMessage,
  1408. },
  1409. {
  1410. .name = "success",
  1411. .dataTypeSpecific.className = NULL,
  1412. .number = ProtosWriteCharacteristicResponse_FieldNumber_Success,
  1413. .hasIndex = 1,
  1414. .offset = 2, // Stored in _has_storage_ to save space.
  1415. .flags = GPBFieldOptional,
  1416. .dataType = GPBDataTypeBool,
  1417. },
  1418. };
  1419. GPBDescriptor *localDescriptor =
  1420. [GPBDescriptor allocDescriptorForClass:[ProtosWriteCharacteristicResponse class]
  1421. rootClass:[ProtosFlutterblueRoot class]
  1422. file:ProtosFlutterblueRoot_FileDescriptor()
  1423. fields:fields
  1424. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1425. storageSize:sizeof(ProtosWriteCharacteristicResponse__storage_)
  1426. flags:GPBDescriptorInitializationFlag_None];
  1427. #if defined(DEBUG) && DEBUG
  1428. NSAssert(descriptor == nil, @"Startup recursed!");
  1429. #endif // DEBUG
  1430. descriptor = localDescriptor;
  1431. }
  1432. return descriptor;
  1433. }
  1434. @end
  1435. #pragma mark - ProtosWriteDescriptorRequest
  1436. @implementation ProtosWriteDescriptorRequest
  1437. @dynamic remoteId;
  1438. @dynamic descriptorUuid;
  1439. @dynamic serviceUuid;
  1440. @dynamic secondaryServiceUuid;
  1441. @dynamic characteristicUuid;
  1442. @dynamic value;
  1443. typedef struct ProtosWriteDescriptorRequest__storage_ {
  1444. uint32_t _has_storage_[1];
  1445. NSString *remoteId;
  1446. NSString *descriptorUuid;
  1447. NSString *serviceUuid;
  1448. NSString *secondaryServiceUuid;
  1449. NSString *characteristicUuid;
  1450. NSData *value;
  1451. } ProtosWriteDescriptorRequest__storage_;
  1452. // This method is threadsafe because it is initially called
  1453. // in +initialize for each subclass.
  1454. + (GPBDescriptor *)descriptor {
  1455. static GPBDescriptor *descriptor = nil;
  1456. if (!descriptor) {
  1457. static GPBMessageFieldDescription fields[] = {
  1458. {
  1459. .name = "remoteId",
  1460. .dataTypeSpecific.className = NULL,
  1461. .number = ProtosWriteDescriptorRequest_FieldNumber_RemoteId,
  1462. .hasIndex = 0,
  1463. .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, remoteId),
  1464. .flags = GPBFieldOptional,
  1465. .dataType = GPBDataTypeString,
  1466. },
  1467. {
  1468. .name = "descriptorUuid",
  1469. .dataTypeSpecific.className = NULL,
  1470. .number = ProtosWriteDescriptorRequest_FieldNumber_DescriptorUuid,
  1471. .hasIndex = 1,
  1472. .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, descriptorUuid),
  1473. .flags = GPBFieldOptional,
  1474. .dataType = GPBDataTypeString,
  1475. },
  1476. {
  1477. .name = "serviceUuid",
  1478. .dataTypeSpecific.className = NULL,
  1479. .number = ProtosWriteDescriptorRequest_FieldNumber_ServiceUuid,
  1480. .hasIndex = 2,
  1481. .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, serviceUuid),
  1482. .flags = GPBFieldOptional,
  1483. .dataType = GPBDataTypeString,
  1484. },
  1485. {
  1486. .name = "secondaryServiceUuid",
  1487. .dataTypeSpecific.className = NULL,
  1488. .number = ProtosWriteDescriptorRequest_FieldNumber_SecondaryServiceUuid,
  1489. .hasIndex = 3,
  1490. .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, secondaryServiceUuid),
  1491. .flags = GPBFieldOptional,
  1492. .dataType = GPBDataTypeString,
  1493. },
  1494. {
  1495. .name = "characteristicUuid",
  1496. .dataTypeSpecific.className = NULL,
  1497. .number = ProtosWriteDescriptorRequest_FieldNumber_CharacteristicUuid,
  1498. .hasIndex = 4,
  1499. .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, characteristicUuid),
  1500. .flags = GPBFieldOptional,
  1501. .dataType = GPBDataTypeString,
  1502. },
  1503. {
  1504. .name = "value",
  1505. .dataTypeSpecific.className = NULL,
  1506. .number = ProtosWriteDescriptorRequest_FieldNumber_Value,
  1507. .hasIndex = 5,
  1508. .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, value),
  1509. .flags = GPBFieldOptional,
  1510. .dataType = GPBDataTypeBytes,
  1511. },
  1512. };
  1513. GPBDescriptor *localDescriptor =
  1514. [GPBDescriptor allocDescriptorForClass:[ProtosWriteDescriptorRequest class]
  1515. rootClass:[ProtosFlutterblueRoot class]
  1516. file:ProtosFlutterblueRoot_FileDescriptor()
  1517. fields:fields
  1518. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1519. storageSize:sizeof(ProtosWriteDescriptorRequest__storage_)
  1520. flags:GPBDescriptorInitializationFlag_None];
  1521. #if defined(DEBUG) && DEBUG
  1522. NSAssert(descriptor == nil, @"Startup recursed!");
  1523. #endif // DEBUG
  1524. descriptor = localDescriptor;
  1525. }
  1526. return descriptor;
  1527. }
  1528. @end
  1529. #pragma mark - ProtosWriteDescriptorResponse
  1530. @implementation ProtosWriteDescriptorResponse
  1531. @dynamic hasRequest, request;
  1532. @dynamic success;
  1533. typedef struct ProtosWriteDescriptorResponse__storage_ {
  1534. uint32_t _has_storage_[1];
  1535. ProtosWriteDescriptorRequest *request;
  1536. } ProtosWriteDescriptorResponse__storage_;
  1537. // This method is threadsafe because it is initially called
  1538. // in +initialize for each subclass.
  1539. + (GPBDescriptor *)descriptor {
  1540. static GPBDescriptor *descriptor = nil;
  1541. if (!descriptor) {
  1542. static GPBMessageFieldDescription fields[] = {
  1543. {
  1544. .name = "request",
  1545. .dataTypeSpecific.className = GPBStringifySymbol(ProtosWriteDescriptorRequest),
  1546. .number = ProtosWriteDescriptorResponse_FieldNumber_Request,
  1547. .hasIndex = 0,
  1548. .offset = (uint32_t)offsetof(ProtosWriteDescriptorResponse__storage_, request),
  1549. .flags = GPBFieldOptional,
  1550. .dataType = GPBDataTypeMessage,
  1551. },
  1552. {
  1553. .name = "success",
  1554. .dataTypeSpecific.className = NULL,
  1555. .number = ProtosWriteDescriptorResponse_FieldNumber_Success,
  1556. .hasIndex = 1,
  1557. .offset = 2, // Stored in _has_storage_ to save space.
  1558. .flags = GPBFieldOptional,
  1559. .dataType = GPBDataTypeBool,
  1560. },
  1561. };
  1562. GPBDescriptor *localDescriptor =
  1563. [GPBDescriptor allocDescriptorForClass:[ProtosWriteDescriptorResponse class]
  1564. rootClass:[ProtosFlutterblueRoot class]
  1565. file:ProtosFlutterblueRoot_FileDescriptor()
  1566. fields:fields
  1567. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1568. storageSize:sizeof(ProtosWriteDescriptorResponse__storage_)
  1569. flags:GPBDescriptorInitializationFlag_None];
  1570. #if defined(DEBUG) && DEBUG
  1571. NSAssert(descriptor == nil, @"Startup recursed!");
  1572. #endif // DEBUG
  1573. descriptor = localDescriptor;
  1574. }
  1575. return descriptor;
  1576. }
  1577. @end
  1578. #pragma mark - ProtosSetNotificationRequest
  1579. @implementation ProtosSetNotificationRequest
  1580. @dynamic remoteId;
  1581. @dynamic serviceUuid;
  1582. @dynamic secondaryServiceUuid;
  1583. @dynamic characteristicUuid;
  1584. @dynamic enable;
  1585. typedef struct ProtosSetNotificationRequest__storage_ {
  1586. uint32_t _has_storage_[1];
  1587. NSString *remoteId;
  1588. NSString *serviceUuid;
  1589. NSString *secondaryServiceUuid;
  1590. NSString *characteristicUuid;
  1591. } ProtosSetNotificationRequest__storage_;
  1592. // This method is threadsafe because it is initially called
  1593. // in +initialize for each subclass.
  1594. + (GPBDescriptor *)descriptor {
  1595. static GPBDescriptor *descriptor = nil;
  1596. if (!descriptor) {
  1597. static GPBMessageFieldDescription fields[] = {
  1598. {
  1599. .name = "remoteId",
  1600. .dataTypeSpecific.className = NULL,
  1601. .number = ProtosSetNotificationRequest_FieldNumber_RemoteId,
  1602. .hasIndex = 0,
  1603. .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, remoteId),
  1604. .flags = GPBFieldOptional,
  1605. .dataType = GPBDataTypeString,
  1606. },
  1607. {
  1608. .name = "serviceUuid",
  1609. .dataTypeSpecific.className = NULL,
  1610. .number = ProtosSetNotificationRequest_FieldNumber_ServiceUuid,
  1611. .hasIndex = 1,
  1612. .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, serviceUuid),
  1613. .flags = GPBFieldOptional,
  1614. .dataType = GPBDataTypeString,
  1615. },
  1616. {
  1617. .name = "secondaryServiceUuid",
  1618. .dataTypeSpecific.className = NULL,
  1619. .number = ProtosSetNotificationRequest_FieldNumber_SecondaryServiceUuid,
  1620. .hasIndex = 2,
  1621. .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, secondaryServiceUuid),
  1622. .flags = GPBFieldOptional,
  1623. .dataType = GPBDataTypeString,
  1624. },
  1625. {
  1626. .name = "characteristicUuid",
  1627. .dataTypeSpecific.className = NULL,
  1628. .number = ProtosSetNotificationRequest_FieldNumber_CharacteristicUuid,
  1629. .hasIndex = 3,
  1630. .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, characteristicUuid),
  1631. .flags = GPBFieldOptional,
  1632. .dataType = GPBDataTypeString,
  1633. },
  1634. {
  1635. .name = "enable",
  1636. .dataTypeSpecific.className = NULL,
  1637. .number = ProtosSetNotificationRequest_FieldNumber_Enable,
  1638. .hasIndex = 4,
  1639. .offset = 5, // Stored in _has_storage_ to save space.
  1640. .flags = GPBFieldOptional,
  1641. .dataType = GPBDataTypeBool,
  1642. },
  1643. };
  1644. GPBDescriptor *localDescriptor =
  1645. [GPBDescriptor allocDescriptorForClass:[ProtosSetNotificationRequest class]
  1646. rootClass:[ProtosFlutterblueRoot class]
  1647. file:ProtosFlutterblueRoot_FileDescriptor()
  1648. fields:fields
  1649. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1650. storageSize:sizeof(ProtosSetNotificationRequest__storage_)
  1651. flags:GPBDescriptorInitializationFlag_None];
  1652. #if defined(DEBUG) && DEBUG
  1653. NSAssert(descriptor == nil, @"Startup recursed!");
  1654. #endif // DEBUG
  1655. descriptor = localDescriptor;
  1656. }
  1657. return descriptor;
  1658. }
  1659. @end
  1660. #pragma mark - ProtosSetNotificationResponse
  1661. @implementation ProtosSetNotificationResponse
  1662. @dynamic remoteId;
  1663. @dynamic hasCharacteristic, characteristic;
  1664. @dynamic success;
  1665. typedef struct ProtosSetNotificationResponse__storage_ {
  1666. uint32_t _has_storage_[1];
  1667. NSString *remoteId;
  1668. ProtosBluetoothCharacteristic *characteristic;
  1669. } ProtosSetNotificationResponse__storage_;
  1670. // This method is threadsafe because it is initially called
  1671. // in +initialize for each subclass.
  1672. + (GPBDescriptor *)descriptor {
  1673. static GPBDescriptor *descriptor = nil;
  1674. if (!descriptor) {
  1675. static GPBMessageFieldDescription fields[] = {
  1676. {
  1677. .name = "remoteId",
  1678. .dataTypeSpecific.className = NULL,
  1679. .number = ProtosSetNotificationResponse_FieldNumber_RemoteId,
  1680. .hasIndex = 0,
  1681. .offset = (uint32_t)offsetof(ProtosSetNotificationResponse__storage_, remoteId),
  1682. .flags = GPBFieldOptional,
  1683. .dataType = GPBDataTypeString,
  1684. },
  1685. {
  1686. .name = "characteristic",
  1687. .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic),
  1688. .number = ProtosSetNotificationResponse_FieldNumber_Characteristic,
  1689. .hasIndex = 1,
  1690. .offset = (uint32_t)offsetof(ProtosSetNotificationResponse__storage_, characteristic),
  1691. .flags = GPBFieldOptional,
  1692. .dataType = GPBDataTypeMessage,
  1693. },
  1694. {
  1695. .name = "success",
  1696. .dataTypeSpecific.className = NULL,
  1697. .number = ProtosSetNotificationResponse_FieldNumber_Success,
  1698. .hasIndex = 2,
  1699. .offset = 3, // Stored in _has_storage_ to save space.
  1700. .flags = GPBFieldOptional,
  1701. .dataType = GPBDataTypeBool,
  1702. },
  1703. };
  1704. GPBDescriptor *localDescriptor =
  1705. [GPBDescriptor allocDescriptorForClass:[ProtosSetNotificationResponse class]
  1706. rootClass:[ProtosFlutterblueRoot class]
  1707. file:ProtosFlutterblueRoot_FileDescriptor()
  1708. fields:fields
  1709. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1710. storageSize:sizeof(ProtosSetNotificationResponse__storage_)
  1711. flags:GPBDescriptorInitializationFlag_None];
  1712. #if defined(DEBUG) && DEBUG
  1713. NSAssert(descriptor == nil, @"Startup recursed!");
  1714. #endif // DEBUG
  1715. descriptor = localDescriptor;
  1716. }
  1717. return descriptor;
  1718. }
  1719. @end
  1720. #pragma mark - ProtosOnCharacteristicChanged
  1721. @implementation ProtosOnCharacteristicChanged
  1722. @dynamic remoteId;
  1723. @dynamic hasCharacteristic, characteristic;
  1724. typedef struct ProtosOnCharacteristicChanged__storage_ {
  1725. uint32_t _has_storage_[1];
  1726. NSString *remoteId;
  1727. ProtosBluetoothCharacteristic *characteristic;
  1728. } ProtosOnCharacteristicChanged__storage_;
  1729. // This method is threadsafe because it is initially called
  1730. // in +initialize for each subclass.
  1731. + (GPBDescriptor *)descriptor {
  1732. static GPBDescriptor *descriptor = nil;
  1733. if (!descriptor) {
  1734. static GPBMessageFieldDescription fields[] = {
  1735. {
  1736. .name = "remoteId",
  1737. .dataTypeSpecific.className = NULL,
  1738. .number = ProtosOnCharacteristicChanged_FieldNumber_RemoteId,
  1739. .hasIndex = 0,
  1740. .offset = (uint32_t)offsetof(ProtosOnCharacteristicChanged__storage_, remoteId),
  1741. .flags = GPBFieldOptional,
  1742. .dataType = GPBDataTypeString,
  1743. },
  1744. {
  1745. .name = "characteristic",
  1746. .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic),
  1747. .number = ProtosOnCharacteristicChanged_FieldNumber_Characteristic,
  1748. .hasIndex = 1,
  1749. .offset = (uint32_t)offsetof(ProtosOnCharacteristicChanged__storage_, characteristic),
  1750. .flags = GPBFieldOptional,
  1751. .dataType = GPBDataTypeMessage,
  1752. },
  1753. };
  1754. GPBDescriptor *localDescriptor =
  1755. [GPBDescriptor allocDescriptorForClass:[ProtosOnCharacteristicChanged class]
  1756. rootClass:[ProtosFlutterblueRoot class]
  1757. file:ProtosFlutterblueRoot_FileDescriptor()
  1758. fields:fields
  1759. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1760. storageSize:sizeof(ProtosOnCharacteristicChanged__storage_)
  1761. flags:GPBDescriptorInitializationFlag_None];
  1762. #if defined(DEBUG) && DEBUG
  1763. NSAssert(descriptor == nil, @"Startup recursed!");
  1764. #endif // DEBUG
  1765. descriptor = localDescriptor;
  1766. }
  1767. return descriptor;
  1768. }
  1769. @end
  1770. #pragma mark - ProtosDeviceStateResponse
  1771. @implementation ProtosDeviceStateResponse
  1772. @dynamic remoteId;
  1773. @dynamic state;
  1774. typedef struct ProtosDeviceStateResponse__storage_ {
  1775. uint32_t _has_storage_[1];
  1776. ProtosDeviceStateResponse_BluetoothDeviceState state;
  1777. NSString *remoteId;
  1778. } ProtosDeviceStateResponse__storage_;
  1779. // This method is threadsafe because it is initially called
  1780. // in +initialize for each subclass.
  1781. + (GPBDescriptor *)descriptor {
  1782. static GPBDescriptor *descriptor = nil;
  1783. if (!descriptor) {
  1784. static GPBMessageFieldDescription fields[] = {
  1785. {
  1786. .name = "remoteId",
  1787. .dataTypeSpecific.className = NULL,
  1788. .number = ProtosDeviceStateResponse_FieldNumber_RemoteId,
  1789. .hasIndex = 0,
  1790. .offset = (uint32_t)offsetof(ProtosDeviceStateResponse__storage_, remoteId),
  1791. .flags = GPBFieldOptional,
  1792. .dataType = GPBDataTypeString,
  1793. },
  1794. {
  1795. .name = "state",
  1796. .dataTypeSpecific.enumDescFunc = ProtosDeviceStateResponse_BluetoothDeviceState_EnumDescriptor,
  1797. .number = ProtosDeviceStateResponse_FieldNumber_State,
  1798. .hasIndex = 1,
  1799. .offset = (uint32_t)offsetof(ProtosDeviceStateResponse__storage_, state),
  1800. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
  1801. .dataType = GPBDataTypeEnum,
  1802. },
  1803. };
  1804. GPBDescriptor *localDescriptor =
  1805. [GPBDescriptor allocDescriptorForClass:[ProtosDeviceStateResponse class]
  1806. rootClass:[ProtosFlutterblueRoot class]
  1807. file:ProtosFlutterblueRoot_FileDescriptor()
  1808. fields:fields
  1809. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1810. storageSize:sizeof(ProtosDeviceStateResponse__storage_)
  1811. flags:GPBDescriptorInitializationFlag_None];
  1812. #if defined(DEBUG) && DEBUG
  1813. NSAssert(descriptor == nil, @"Startup recursed!");
  1814. #endif // DEBUG
  1815. descriptor = localDescriptor;
  1816. }
  1817. return descriptor;
  1818. }
  1819. @end
  1820. int32_t ProtosDeviceStateResponse_State_RawValue(ProtosDeviceStateResponse *message) {
  1821. GPBDescriptor *descriptor = [ProtosDeviceStateResponse descriptor];
  1822. GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosDeviceStateResponse_FieldNumber_State];
  1823. return GPBGetMessageInt32Field(message, field);
  1824. }
  1825. void SetProtosDeviceStateResponse_State_RawValue(ProtosDeviceStateResponse *message, int32_t value) {
  1826. GPBDescriptor *descriptor = [ProtosDeviceStateResponse descriptor];
  1827. GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosDeviceStateResponse_FieldNumber_State];
  1828. GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
  1829. }
  1830. #pragma mark - Enum ProtosDeviceStateResponse_BluetoothDeviceState
  1831. GPBEnumDescriptor *ProtosDeviceStateResponse_BluetoothDeviceState_EnumDescriptor(void) {
  1832. static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  1833. if (!descriptor) {
  1834. static const char *valueNames =
  1835. "Disconnected\000Connecting\000Connected\000Discon"
  1836. "necting\000";
  1837. static const int32_t values[] = {
  1838. ProtosDeviceStateResponse_BluetoothDeviceState_Disconnected,
  1839. ProtosDeviceStateResponse_BluetoothDeviceState_Connecting,
  1840. ProtosDeviceStateResponse_BluetoothDeviceState_Connected,
  1841. ProtosDeviceStateResponse_BluetoothDeviceState_Disconnecting,
  1842. };
  1843. GPBEnumDescriptor *worker =
  1844. [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosDeviceStateResponse_BluetoothDeviceState)
  1845. valueNames:valueNames
  1846. values:values
  1847. count:(uint32_t)(sizeof(values) / sizeof(int32_t))
  1848. enumVerifier:ProtosDeviceStateResponse_BluetoothDeviceState_IsValidValue];
  1849. GPBEnumDescriptor *expected = nil;
  1850. if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
  1851. [worker release];
  1852. }
  1853. }
  1854. return descriptor;
  1855. }
  1856. BOOL ProtosDeviceStateResponse_BluetoothDeviceState_IsValidValue(int32_t value__) {
  1857. switch (value__) {
  1858. case ProtosDeviceStateResponse_BluetoothDeviceState_Disconnected:
  1859. case ProtosDeviceStateResponse_BluetoothDeviceState_Connecting:
  1860. case ProtosDeviceStateResponse_BluetoothDeviceState_Connected:
  1861. case ProtosDeviceStateResponse_BluetoothDeviceState_Disconnecting:
  1862. return YES;
  1863. default:
  1864. return NO;
  1865. }
  1866. }
  1867. #pragma mark - ProtosConnectedDevicesResponse
  1868. @implementation ProtosConnectedDevicesResponse
  1869. @dynamic devicesArray, devicesArray_Count;
  1870. typedef struct ProtosConnectedDevicesResponse__storage_ {
  1871. uint32_t _has_storage_[1];
  1872. NSMutableArray *devicesArray;
  1873. } ProtosConnectedDevicesResponse__storage_;
  1874. // This method is threadsafe because it is initially called
  1875. // in +initialize for each subclass.
  1876. + (GPBDescriptor *)descriptor {
  1877. static GPBDescriptor *descriptor = nil;
  1878. if (!descriptor) {
  1879. static GPBMessageFieldDescription fields[] = {
  1880. {
  1881. .name = "devicesArray",
  1882. .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothDevice),
  1883. .number = ProtosConnectedDevicesResponse_FieldNumber_DevicesArray,
  1884. .hasIndex = GPBNoHasBit,
  1885. .offset = (uint32_t)offsetof(ProtosConnectedDevicesResponse__storage_, devicesArray),
  1886. .flags = GPBFieldRepeated,
  1887. .dataType = GPBDataTypeMessage,
  1888. },
  1889. };
  1890. GPBDescriptor *localDescriptor =
  1891. [GPBDescriptor allocDescriptorForClass:[ProtosConnectedDevicesResponse class]
  1892. rootClass:[ProtosFlutterblueRoot class]
  1893. file:ProtosFlutterblueRoot_FileDescriptor()
  1894. fields:fields
  1895. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1896. storageSize:sizeof(ProtosConnectedDevicesResponse__storage_)
  1897. flags:GPBDescriptorInitializationFlag_None];
  1898. #if defined(DEBUG) && DEBUG
  1899. NSAssert(descriptor == nil, @"Startup recursed!");
  1900. #endif // DEBUG
  1901. descriptor = localDescriptor;
  1902. }
  1903. return descriptor;
  1904. }
  1905. @end
  1906. #pragma mark - ProtosMtuSizeRequest
  1907. @implementation ProtosMtuSizeRequest
  1908. @dynamic remoteId;
  1909. @dynamic mtu;
  1910. typedef struct ProtosMtuSizeRequest__storage_ {
  1911. uint32_t _has_storage_[1];
  1912. uint32_t mtu;
  1913. NSString *remoteId;
  1914. } ProtosMtuSizeRequest__storage_;
  1915. // This method is threadsafe because it is initially called
  1916. // in +initialize for each subclass.
  1917. + (GPBDescriptor *)descriptor {
  1918. static GPBDescriptor *descriptor = nil;
  1919. if (!descriptor) {
  1920. static GPBMessageFieldDescription fields[] = {
  1921. {
  1922. .name = "remoteId",
  1923. .dataTypeSpecific.className = NULL,
  1924. .number = ProtosMtuSizeRequest_FieldNumber_RemoteId,
  1925. .hasIndex = 0,
  1926. .offset = (uint32_t)offsetof(ProtosMtuSizeRequest__storage_, remoteId),
  1927. .flags = GPBFieldOptional,
  1928. .dataType = GPBDataTypeString,
  1929. },
  1930. {
  1931. .name = "mtu",
  1932. .dataTypeSpecific.className = NULL,
  1933. .number = ProtosMtuSizeRequest_FieldNumber_Mtu,
  1934. .hasIndex = 1,
  1935. .offset = (uint32_t)offsetof(ProtosMtuSizeRequest__storage_, mtu),
  1936. .flags = GPBFieldOptional,
  1937. .dataType = GPBDataTypeUInt32,
  1938. },
  1939. };
  1940. GPBDescriptor *localDescriptor =
  1941. [GPBDescriptor allocDescriptorForClass:[ProtosMtuSizeRequest class]
  1942. rootClass:[ProtosFlutterblueRoot class]
  1943. file:ProtosFlutterblueRoot_FileDescriptor()
  1944. fields:fields
  1945. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1946. storageSize:sizeof(ProtosMtuSizeRequest__storage_)
  1947. flags:GPBDescriptorInitializationFlag_None];
  1948. #if defined(DEBUG) && DEBUG
  1949. NSAssert(descriptor == nil, @"Startup recursed!");
  1950. #endif // DEBUG
  1951. descriptor = localDescriptor;
  1952. }
  1953. return descriptor;
  1954. }
  1955. @end
  1956. #pragma mark - ProtosMtuSizeResponse
  1957. @implementation ProtosMtuSizeResponse
  1958. @dynamic remoteId;
  1959. @dynamic mtu;
  1960. typedef struct ProtosMtuSizeResponse__storage_ {
  1961. uint32_t _has_storage_[1];
  1962. uint32_t mtu;
  1963. NSString *remoteId;
  1964. } ProtosMtuSizeResponse__storage_;
  1965. // This method is threadsafe because it is initially called
  1966. // in +initialize for each subclass.
  1967. + (GPBDescriptor *)descriptor {
  1968. static GPBDescriptor *descriptor = nil;
  1969. if (!descriptor) {
  1970. static GPBMessageFieldDescription fields[] = {
  1971. {
  1972. .name = "remoteId",
  1973. .dataTypeSpecific.className = NULL,
  1974. .number = ProtosMtuSizeResponse_FieldNumber_RemoteId,
  1975. .hasIndex = 0,
  1976. .offset = (uint32_t)offsetof(ProtosMtuSizeResponse__storage_, remoteId),
  1977. .flags = GPBFieldOptional,
  1978. .dataType = GPBDataTypeString,
  1979. },
  1980. {
  1981. .name = "mtu",
  1982. .dataTypeSpecific.className = NULL,
  1983. .number = ProtosMtuSizeResponse_FieldNumber_Mtu,
  1984. .hasIndex = 1,
  1985. .offset = (uint32_t)offsetof(ProtosMtuSizeResponse__storage_, mtu),
  1986. .flags = GPBFieldOptional,
  1987. .dataType = GPBDataTypeUInt32,
  1988. },
  1989. };
  1990. GPBDescriptor *localDescriptor =
  1991. [GPBDescriptor allocDescriptorForClass:[ProtosMtuSizeResponse class]
  1992. rootClass:[ProtosFlutterblueRoot class]
  1993. file:ProtosFlutterblueRoot_FileDescriptor()
  1994. fields:fields
  1995. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  1996. storageSize:sizeof(ProtosMtuSizeResponse__storage_)
  1997. flags:GPBDescriptorInitializationFlag_None];
  1998. #if defined(DEBUG) && DEBUG
  1999. NSAssert(descriptor == nil, @"Startup recursed!");
  2000. #endif // DEBUG
  2001. descriptor = localDescriptor;
  2002. }
  2003. return descriptor;
  2004. }
  2005. @end
  2006. #pragma clang diagnostic pop
  2007. // @@protoc_insertion_point(global_scope)