1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: flutterblue.proto
- // This CPP symbol can be defined to use imports that match up to the framework
- // imports needed when using CocoaPods.
- #if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
- #endif
- #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <protobuf/GPBProtocolBuffers_RuntimeSupport.h>
- #else
- #import "GPBProtocolBuffers_RuntimeSupport.h"
- #endif
- #import <stdatomic.h>
- #import "Flutterblue.pbobjc.h"
- // @@protoc_insertion_point(imports)
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
- #pragma mark - ProtosFlutterblueRoot
- @implementation ProtosFlutterblueRoot
- // No extensions in the file and no imports, so no need to generate
- // +extensionRegistry.
- @end
- #pragma mark - ProtosFlutterblueRoot_FileDescriptor
- static GPBFileDescriptor *ProtosFlutterblueRoot_FileDescriptor(void) {
- // This is called by +initialize so there is no need to worry
- // about thread safety of the singleton.
- static GPBFileDescriptor *descriptor = NULL;
- if (!descriptor) {
- GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
- descriptor = [[GPBFileDescriptor alloc] initWithPackage:@""
- objcPrefix:@"Protos"
- syntax:GPBFileSyntaxProto3];
- }
- return descriptor;
- }
- #pragma mark - ProtosInt32Value
- @implementation ProtosInt32Value
- @dynamic value;
- typedef struct ProtosInt32Value__storage_ {
- uint32_t _has_storage_[1];
- int32_t value;
- } ProtosInt32Value__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "value",
- .dataTypeSpecific.className = NULL,
- .number = ProtosInt32Value_FieldNumber_Value,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosInt32Value__storage_, value),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeInt32,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosInt32Value class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosInt32Value__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosBluetoothState
- @implementation ProtosBluetoothState
- @dynamic state;
- typedef struct ProtosBluetoothState__storage_ {
- uint32_t _has_storage_[1];
- ProtosBluetoothState_State state;
- } ProtosBluetoothState__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "state",
- .dataTypeSpecific.enumDescFunc = ProtosBluetoothState_State_EnumDescriptor,
- .number = ProtosBluetoothState_FieldNumber_State,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosBluetoothState__storage_, state),
- .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
- .dataType = GPBDataTypeEnum,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothState class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosBluetoothState__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- int32_t ProtosBluetoothState_State_RawValue(ProtosBluetoothState *message) {
- GPBDescriptor *descriptor = [ProtosBluetoothState descriptor];
- GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothState_FieldNumber_State];
- return GPBGetMessageInt32Field(message, field);
- }
- void SetProtosBluetoothState_State_RawValue(ProtosBluetoothState *message, int32_t value) {
- GPBDescriptor *descriptor = [ProtosBluetoothState descriptor];
- GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothState_FieldNumber_State];
- GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
- }
- #pragma mark - Enum ProtosBluetoothState_State
- GPBEnumDescriptor *ProtosBluetoothState_State_EnumDescriptor(void) {
- static _Atomic(GPBEnumDescriptor*) descriptor = nil;
- if (!descriptor) {
- static const char *valueNames =
- "Unknown\000Unavailable\000Unauthorized\000Turning"
- "On\000On\000TurningOff\000Off\000";
- static const int32_t values[] = {
- ProtosBluetoothState_State_Unknown,
- ProtosBluetoothState_State_Unavailable,
- ProtosBluetoothState_State_Unauthorized,
- ProtosBluetoothState_State_TurningOn,
- ProtosBluetoothState_State_On,
- ProtosBluetoothState_State_TurningOff,
- ProtosBluetoothState_State_Off,
- };
- GPBEnumDescriptor *worker =
- [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosBluetoothState_State)
- valueNames:valueNames
- values:values
- count:(uint32_t)(sizeof(values) / sizeof(int32_t))
- enumVerifier:ProtosBluetoothState_State_IsValidValue];
- GPBEnumDescriptor *expected = nil;
- if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
- [worker release];
- }
- }
- return descriptor;
- }
- BOOL ProtosBluetoothState_State_IsValidValue(int32_t value__) {
- switch (value__) {
- case ProtosBluetoothState_State_Unknown:
- case ProtosBluetoothState_State_Unavailable:
- case ProtosBluetoothState_State_Unauthorized:
- case ProtosBluetoothState_State_TurningOn:
- case ProtosBluetoothState_State_On:
- case ProtosBluetoothState_State_TurningOff:
- case ProtosBluetoothState_State_Off:
- return YES;
- default:
- return NO;
- }
- }
- #pragma mark - ProtosAdvertisementData
- @implementation ProtosAdvertisementData
- @dynamic localName;
- @dynamic hasTxPowerLevel, txPowerLevel;
- @dynamic connectable;
- @dynamic manufacturerData, manufacturerData_Count;
- @dynamic serviceData, serviceData_Count;
- @dynamic serviceUuidsArray, serviceUuidsArray_Count;
- typedef struct ProtosAdvertisementData__storage_ {
- uint32_t _has_storage_[1];
- NSString *localName;
- ProtosInt32Value *txPowerLevel;
- GPBInt32ObjectDictionary *manufacturerData;
- NSMutableDictionary *serviceData;
- NSMutableArray *serviceUuidsArray;
- } ProtosAdvertisementData__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "localName",
- .dataTypeSpecific.className = NULL,
- .number = ProtosAdvertisementData_FieldNumber_LocalName,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, localName),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "txPowerLevel",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosInt32Value),
- .number = ProtosAdvertisementData_FieldNumber_TxPowerLevel,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, txPowerLevel),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeMessage,
- },
- {
- .name = "connectable",
- .dataTypeSpecific.className = NULL,
- .number = ProtosAdvertisementData_FieldNumber_Connectable,
- .hasIndex = 2,
- .offset = 3, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- {
- .name = "manufacturerData",
- .dataTypeSpecific.className = NULL,
- .number = ProtosAdvertisementData_FieldNumber_ManufacturerData,
- .hasIndex = GPBNoHasBit,
- .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, manufacturerData),
- .flags = GPBFieldMapKeyInt32,
- .dataType = GPBDataTypeBytes,
- },
- {
- .name = "serviceData",
- .dataTypeSpecific.className = NULL,
- .number = ProtosAdvertisementData_FieldNumber_ServiceData,
- .hasIndex = GPBNoHasBit,
- .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, serviceData),
- .flags = GPBFieldMapKeyString,
- .dataType = GPBDataTypeBytes,
- },
- {
- .name = "serviceUuidsArray",
- .dataTypeSpecific.className = NULL,
- .number = ProtosAdvertisementData_FieldNumber_ServiceUuidsArray,
- .hasIndex = GPBNoHasBit,
- .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, serviceUuidsArray),
- .flags = GPBFieldRepeated,
- .dataType = GPBDataTypeString,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosAdvertisementData class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosAdvertisementData__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosScanSettings
- @implementation ProtosScanSettings
- @dynamic androidScanMode;
- @dynamic serviceUuidsArray, serviceUuidsArray_Count;
- @dynamic allowDuplicates;
- typedef struct ProtosScanSettings__storage_ {
- uint32_t _has_storage_[1];
- int32_t androidScanMode;
- NSMutableArray *serviceUuidsArray;
- } ProtosScanSettings__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "androidScanMode",
- .dataTypeSpecific.className = NULL,
- .number = ProtosScanSettings_FieldNumber_AndroidScanMode,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosScanSettings__storage_, androidScanMode),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeInt32,
- },
- {
- .name = "serviceUuidsArray",
- .dataTypeSpecific.className = NULL,
- .number = ProtosScanSettings_FieldNumber_ServiceUuidsArray,
- .hasIndex = GPBNoHasBit,
- .offset = (uint32_t)offsetof(ProtosScanSettings__storage_, serviceUuidsArray),
- .flags = GPBFieldRepeated,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "allowDuplicates",
- .dataTypeSpecific.className = NULL,
- .number = ProtosScanSettings_FieldNumber_AllowDuplicates,
- .hasIndex = 1,
- .offset = 2, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosScanSettings class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosScanSettings__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosScanResult
- @implementation ProtosScanResult
- @dynamic hasDevice, device;
- @dynamic hasAdvertisementData, advertisementData;
- @dynamic rssi;
- typedef struct ProtosScanResult__storage_ {
- uint32_t _has_storage_[1];
- int32_t rssi;
- ProtosBluetoothDevice *device;
- ProtosAdvertisementData *advertisementData;
- } ProtosScanResult__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "device",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothDevice),
- .number = ProtosScanResult_FieldNumber_Device,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosScanResult__storage_, device),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeMessage,
- },
- {
- .name = "advertisementData",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosAdvertisementData),
- .number = ProtosScanResult_FieldNumber_AdvertisementData,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosScanResult__storage_, advertisementData),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeMessage,
- },
- {
- .name = "rssi",
- .dataTypeSpecific.className = NULL,
- .number = ProtosScanResult_FieldNumber_Rssi,
- .hasIndex = 2,
- .offset = (uint32_t)offsetof(ProtosScanResult__storage_, rssi),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeInt32,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosScanResult class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosScanResult__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosConnectRequest
- @implementation ProtosConnectRequest
- @dynamic remoteId;
- @dynamic androidAutoConnect;
- typedef struct ProtosConnectRequest__storage_ {
- uint32_t _has_storage_[1];
- NSString *remoteId;
- } ProtosConnectRequest__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosConnectRequest_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosConnectRequest__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "androidAutoConnect",
- .dataTypeSpecific.className = NULL,
- .number = ProtosConnectRequest_FieldNumber_AndroidAutoConnect,
- .hasIndex = 1,
- .offset = 2, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosConnectRequest class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosConnectRequest__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosBluetoothDevice
- @implementation ProtosBluetoothDevice
- @dynamic remoteId;
- @dynamic name;
- @dynamic type;
- typedef struct ProtosBluetoothDevice__storage_ {
- uint32_t _has_storage_[1];
- ProtosBluetoothDevice_Type type;
- NSString *remoteId;
- NSString *name;
- } ProtosBluetoothDevice__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothDevice_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosBluetoothDevice__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "name",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothDevice_FieldNumber_Name,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosBluetoothDevice__storage_, name),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "type",
- .dataTypeSpecific.enumDescFunc = ProtosBluetoothDevice_Type_EnumDescriptor,
- .number = ProtosBluetoothDevice_FieldNumber_Type,
- .hasIndex = 2,
- .offset = (uint32_t)offsetof(ProtosBluetoothDevice__storage_, type),
- .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
- .dataType = GPBDataTypeEnum,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothDevice class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosBluetoothDevice__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- int32_t ProtosBluetoothDevice_Type_RawValue(ProtosBluetoothDevice *message) {
- GPBDescriptor *descriptor = [ProtosBluetoothDevice descriptor];
- GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothDevice_FieldNumber_Type];
- return GPBGetMessageInt32Field(message, field);
- }
- void SetProtosBluetoothDevice_Type_RawValue(ProtosBluetoothDevice *message, int32_t value) {
- GPBDescriptor *descriptor = [ProtosBluetoothDevice descriptor];
- GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothDevice_FieldNumber_Type];
- GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
- }
- #pragma mark - Enum ProtosBluetoothDevice_Type
- GPBEnumDescriptor *ProtosBluetoothDevice_Type_EnumDescriptor(void) {
- static _Atomic(GPBEnumDescriptor*) descriptor = nil;
- if (!descriptor) {
- static const char *valueNames =
- "Unknown\000Classic\000Le\000Dual\000";
- static const int32_t values[] = {
- ProtosBluetoothDevice_Type_Unknown,
- ProtosBluetoothDevice_Type_Classic,
- ProtosBluetoothDevice_Type_Le,
- ProtosBluetoothDevice_Type_Dual,
- };
- GPBEnumDescriptor *worker =
- [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosBluetoothDevice_Type)
- valueNames:valueNames
- values:values
- count:(uint32_t)(sizeof(values) / sizeof(int32_t))
- enumVerifier:ProtosBluetoothDevice_Type_IsValidValue];
- GPBEnumDescriptor *expected = nil;
- if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
- [worker release];
- }
- }
- return descriptor;
- }
- BOOL ProtosBluetoothDevice_Type_IsValidValue(int32_t value__) {
- switch (value__) {
- case ProtosBluetoothDevice_Type_Unknown:
- case ProtosBluetoothDevice_Type_Classic:
- case ProtosBluetoothDevice_Type_Le:
- case ProtosBluetoothDevice_Type_Dual:
- return YES;
- default:
- return NO;
- }
- }
- #pragma mark - ProtosBluetoothService
- @implementation ProtosBluetoothService
- @dynamic uuid;
- @dynamic remoteId;
- @dynamic isPrimary;
- @dynamic characteristicsArray, characteristicsArray_Count;
- @dynamic includedServicesArray, includedServicesArray_Count;
- typedef struct ProtosBluetoothService__storage_ {
- uint32_t _has_storage_[1];
- NSString *uuid;
- NSString *remoteId;
- NSMutableArray *characteristicsArray;
- NSMutableArray *includedServicesArray;
- } ProtosBluetoothService__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "uuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothService_FieldNumber_Uuid,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, uuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothService_FieldNumber_RemoteId,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "isPrimary",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothService_FieldNumber_IsPrimary,
- .hasIndex = 2,
- .offset = 3, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- {
- .name = "characteristicsArray",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic),
- .number = ProtosBluetoothService_FieldNumber_CharacteristicsArray,
- .hasIndex = GPBNoHasBit,
- .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, characteristicsArray),
- .flags = GPBFieldRepeated,
- .dataType = GPBDataTypeMessage,
- },
- {
- .name = "includedServicesArray",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothService),
- .number = ProtosBluetoothService_FieldNumber_IncludedServicesArray,
- .hasIndex = GPBNoHasBit,
- .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, includedServicesArray),
- .flags = GPBFieldRepeated,
- .dataType = GPBDataTypeMessage,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothService class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosBluetoothService__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosBluetoothCharacteristic
- @implementation ProtosBluetoothCharacteristic
- @dynamic uuid;
- @dynamic remoteId;
- @dynamic serviceUuid;
- @dynamic secondaryServiceUuid;
- @dynamic descriptorsArray, descriptorsArray_Count;
- @dynamic hasProperties, properties;
- @dynamic value;
- typedef struct ProtosBluetoothCharacteristic__storage_ {
- uint32_t _has_storage_[1];
- NSString *uuid;
- NSString *remoteId;
- NSString *serviceUuid;
- NSString *secondaryServiceUuid;
- NSMutableArray *descriptorsArray;
- ProtosCharacteristicProperties *properties;
- NSData *value;
- } ProtosBluetoothCharacteristic__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "uuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothCharacteristic_FieldNumber_Uuid,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, uuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothCharacteristic_FieldNumber_RemoteId,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "serviceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothCharacteristic_FieldNumber_ServiceUuid,
- .hasIndex = 2,
- .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, serviceUuid),
- .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom),
- .dataType = GPBDataTypeString,
- },
- {
- .name = "secondaryServiceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothCharacteristic_FieldNumber_SecondaryServiceUuid,
- .hasIndex = 3,
- .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, secondaryServiceUuid),
- .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom),
- .dataType = GPBDataTypeString,
- },
- {
- .name = "descriptorsArray",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothDescriptor),
- .number = ProtosBluetoothCharacteristic_FieldNumber_DescriptorsArray,
- .hasIndex = GPBNoHasBit,
- .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, descriptorsArray),
- .flags = GPBFieldRepeated,
- .dataType = GPBDataTypeMessage,
- },
- {
- .name = "properties",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosCharacteristicProperties),
- .number = ProtosBluetoothCharacteristic_FieldNumber_Properties,
- .hasIndex = 4,
- .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, properties),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeMessage,
- },
- {
- .name = "value",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothCharacteristic_FieldNumber_Value,
- .hasIndex = 5,
- .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, value),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBytes,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothCharacteristic class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosBluetoothCharacteristic__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
- static const char *extraTextFormatInfo =
- "\002\003\013\000\004\024\000";
- [localDescriptor setupExtraTextInfo:extraTextFormatInfo];
- #endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosBluetoothDescriptor
- @implementation ProtosBluetoothDescriptor
- @dynamic uuid;
- @dynamic remoteId;
- @dynamic serviceUuid;
- @dynamic characteristicUuid;
- @dynamic value;
- typedef struct ProtosBluetoothDescriptor__storage_ {
- uint32_t _has_storage_[1];
- NSString *uuid;
- NSString *remoteId;
- NSString *serviceUuid;
- NSString *characteristicUuid;
- NSData *value;
- } ProtosBluetoothDescriptor__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "uuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothDescriptor_FieldNumber_Uuid,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, uuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothDescriptor_FieldNumber_RemoteId,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "serviceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothDescriptor_FieldNumber_ServiceUuid,
- .hasIndex = 2,
- .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, serviceUuid),
- .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom),
- .dataType = GPBDataTypeString,
- },
- {
- .name = "characteristicUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothDescriptor_FieldNumber_CharacteristicUuid,
- .hasIndex = 3,
- .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, characteristicUuid),
- .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom),
- .dataType = GPBDataTypeString,
- },
- {
- .name = "value",
- .dataTypeSpecific.className = NULL,
- .number = ProtosBluetoothDescriptor_FieldNumber_Value,
- .hasIndex = 4,
- .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, value),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBytes,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothDescriptor class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosBluetoothDescriptor__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
- static const char *extraTextFormatInfo =
- "\002\003\013\000\004\022\000";
- [localDescriptor setupExtraTextInfo:extraTextFormatInfo];
- #endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosCharacteristicProperties
- @implementation ProtosCharacteristicProperties
- @dynamic broadcast;
- @dynamic read;
- @dynamic writeWithoutResponse;
- @dynamic write;
- @dynamic notify;
- @dynamic indicate;
- @dynamic authenticatedSignedWrites;
- @dynamic extendedProperties;
- @dynamic notifyEncryptionRequired;
- @dynamic indicateEncryptionRequired;
- typedef struct ProtosCharacteristicProperties__storage_ {
- uint32_t _has_storage_[1];
- } ProtosCharacteristicProperties__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "broadcast",
- .dataTypeSpecific.className = NULL,
- .number = ProtosCharacteristicProperties_FieldNumber_Broadcast,
- .hasIndex = 0,
- .offset = 1, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- {
- .name = "read",
- .dataTypeSpecific.className = NULL,
- .number = ProtosCharacteristicProperties_FieldNumber_Read,
- .hasIndex = 2,
- .offset = 3, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- {
- .name = "writeWithoutResponse",
- .dataTypeSpecific.className = NULL,
- .number = ProtosCharacteristicProperties_FieldNumber_WriteWithoutResponse,
- .hasIndex = 4,
- .offset = 5, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- {
- .name = "write",
- .dataTypeSpecific.className = NULL,
- .number = ProtosCharacteristicProperties_FieldNumber_Write,
- .hasIndex = 6,
- .offset = 7, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- {
- .name = "notify",
- .dataTypeSpecific.className = NULL,
- .number = ProtosCharacteristicProperties_FieldNumber_Notify,
- .hasIndex = 8,
- .offset = 9, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- {
- .name = "indicate",
- .dataTypeSpecific.className = NULL,
- .number = ProtosCharacteristicProperties_FieldNumber_Indicate,
- .hasIndex = 10,
- .offset = 11, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- {
- .name = "authenticatedSignedWrites",
- .dataTypeSpecific.className = NULL,
- .number = ProtosCharacteristicProperties_FieldNumber_AuthenticatedSignedWrites,
- .hasIndex = 12,
- .offset = 13, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- {
- .name = "extendedProperties",
- .dataTypeSpecific.className = NULL,
- .number = ProtosCharacteristicProperties_FieldNumber_ExtendedProperties,
- .hasIndex = 14,
- .offset = 15, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- {
- .name = "notifyEncryptionRequired",
- .dataTypeSpecific.className = NULL,
- .number = ProtosCharacteristicProperties_FieldNumber_NotifyEncryptionRequired,
- .hasIndex = 16,
- .offset = 17, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- {
- .name = "indicateEncryptionRequired",
- .dataTypeSpecific.className = NULL,
- .number = ProtosCharacteristicProperties_FieldNumber_IndicateEncryptionRequired,
- .hasIndex = 18,
- .offset = 19, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosCharacteristicProperties class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosCharacteristicProperties__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosDiscoverServicesResult
- @implementation ProtosDiscoverServicesResult
- @dynamic remoteId;
- @dynamic servicesArray, servicesArray_Count;
- typedef struct ProtosDiscoverServicesResult__storage_ {
- uint32_t _has_storage_[1];
- NSString *remoteId;
- NSMutableArray *servicesArray;
- } ProtosDiscoverServicesResult__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosDiscoverServicesResult_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosDiscoverServicesResult__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "servicesArray",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothService),
- .number = ProtosDiscoverServicesResult_FieldNumber_ServicesArray,
- .hasIndex = GPBNoHasBit,
- .offset = (uint32_t)offsetof(ProtosDiscoverServicesResult__storage_, servicesArray),
- .flags = GPBFieldRepeated,
- .dataType = GPBDataTypeMessage,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosDiscoverServicesResult class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosDiscoverServicesResult__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosReadCharacteristicRequest
- @implementation ProtosReadCharacteristicRequest
- @dynamic remoteId;
- @dynamic characteristicUuid;
- @dynamic serviceUuid;
- @dynamic secondaryServiceUuid;
- typedef struct ProtosReadCharacteristicRequest__storage_ {
- uint32_t _has_storage_[1];
- NSString *remoteId;
- NSString *characteristicUuid;
- NSString *serviceUuid;
- NSString *secondaryServiceUuid;
- } ProtosReadCharacteristicRequest__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosReadCharacteristicRequest_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "characteristicUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosReadCharacteristicRequest_FieldNumber_CharacteristicUuid,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, characteristicUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "serviceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosReadCharacteristicRequest_FieldNumber_ServiceUuid,
- .hasIndex = 2,
- .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, serviceUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "secondaryServiceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosReadCharacteristicRequest_FieldNumber_SecondaryServiceUuid,
- .hasIndex = 3,
- .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, secondaryServiceUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosReadCharacteristicRequest class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosReadCharacteristicRequest__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosReadCharacteristicResponse
- @implementation ProtosReadCharacteristicResponse
- @dynamic remoteId;
- @dynamic hasCharacteristic, characteristic;
- typedef struct ProtosReadCharacteristicResponse__storage_ {
- uint32_t _has_storage_[1];
- NSString *remoteId;
- ProtosBluetoothCharacteristic *characteristic;
- } ProtosReadCharacteristicResponse__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosReadCharacteristicResponse_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosReadCharacteristicResponse__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "characteristic",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic),
- .number = ProtosReadCharacteristicResponse_FieldNumber_Characteristic,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosReadCharacteristicResponse__storage_, characteristic),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeMessage,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosReadCharacteristicResponse class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosReadCharacteristicResponse__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosReadDescriptorRequest
- @implementation ProtosReadDescriptorRequest
- @dynamic remoteId;
- @dynamic descriptorUuid;
- @dynamic serviceUuid;
- @dynamic secondaryServiceUuid;
- @dynamic characteristicUuid;
- typedef struct ProtosReadDescriptorRequest__storage_ {
- uint32_t _has_storage_[1];
- NSString *remoteId;
- NSString *descriptorUuid;
- NSString *serviceUuid;
- NSString *secondaryServiceUuid;
- NSString *characteristicUuid;
- } ProtosReadDescriptorRequest__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosReadDescriptorRequest_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "descriptorUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosReadDescriptorRequest_FieldNumber_DescriptorUuid,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, descriptorUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "serviceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosReadDescriptorRequest_FieldNumber_ServiceUuid,
- .hasIndex = 2,
- .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, serviceUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "secondaryServiceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosReadDescriptorRequest_FieldNumber_SecondaryServiceUuid,
- .hasIndex = 3,
- .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, secondaryServiceUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "characteristicUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosReadDescriptorRequest_FieldNumber_CharacteristicUuid,
- .hasIndex = 4,
- .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, characteristicUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosReadDescriptorRequest class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosReadDescriptorRequest__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosReadDescriptorResponse
- @implementation ProtosReadDescriptorResponse
- @dynamic hasRequest, request;
- @dynamic value;
- typedef struct ProtosReadDescriptorResponse__storage_ {
- uint32_t _has_storage_[1];
- ProtosReadDescriptorRequest *request;
- NSData *value;
- } ProtosReadDescriptorResponse__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "request",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosReadDescriptorRequest),
- .number = ProtosReadDescriptorResponse_FieldNumber_Request,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosReadDescriptorResponse__storage_, request),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeMessage,
- },
- {
- .name = "value",
- .dataTypeSpecific.className = NULL,
- .number = ProtosReadDescriptorResponse_FieldNumber_Value,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosReadDescriptorResponse__storage_, value),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBytes,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosReadDescriptorResponse class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosReadDescriptorResponse__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosWriteCharacteristicRequest
- @implementation ProtosWriteCharacteristicRequest
- @dynamic remoteId;
- @dynamic characteristicUuid;
- @dynamic serviceUuid;
- @dynamic secondaryServiceUuid;
- @dynamic writeType;
- @dynamic value;
- typedef struct ProtosWriteCharacteristicRequest__storage_ {
- uint32_t _has_storage_[1];
- ProtosWriteCharacteristicRequest_WriteType writeType;
- NSString *remoteId;
- NSString *characteristicUuid;
- NSString *serviceUuid;
- NSString *secondaryServiceUuid;
- NSData *value;
- } ProtosWriteCharacteristicRequest__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteCharacteristicRequest_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "characteristicUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteCharacteristicRequest_FieldNumber_CharacteristicUuid,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, characteristicUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "serviceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteCharacteristicRequest_FieldNumber_ServiceUuid,
- .hasIndex = 2,
- .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, serviceUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "secondaryServiceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteCharacteristicRequest_FieldNumber_SecondaryServiceUuid,
- .hasIndex = 3,
- .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, secondaryServiceUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "writeType",
- .dataTypeSpecific.enumDescFunc = ProtosWriteCharacteristicRequest_WriteType_EnumDescriptor,
- .number = ProtosWriteCharacteristicRequest_FieldNumber_WriteType,
- .hasIndex = 4,
- .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, writeType),
- .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
- .dataType = GPBDataTypeEnum,
- },
- {
- .name = "value",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteCharacteristicRequest_FieldNumber_Value,
- .hasIndex = 5,
- .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, value),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBytes,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosWriteCharacteristicRequest class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosWriteCharacteristicRequest__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- int32_t ProtosWriteCharacteristicRequest_WriteType_RawValue(ProtosWriteCharacteristicRequest *message) {
- GPBDescriptor *descriptor = [ProtosWriteCharacteristicRequest descriptor];
- GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosWriteCharacteristicRequest_FieldNumber_WriteType];
- return GPBGetMessageInt32Field(message, field);
- }
- void SetProtosWriteCharacteristicRequest_WriteType_RawValue(ProtosWriteCharacteristicRequest *message, int32_t value) {
- GPBDescriptor *descriptor = [ProtosWriteCharacteristicRequest descriptor];
- GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosWriteCharacteristicRequest_FieldNumber_WriteType];
- GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
- }
- #pragma mark - Enum ProtosWriteCharacteristicRequest_WriteType
- GPBEnumDescriptor *ProtosWriteCharacteristicRequest_WriteType_EnumDescriptor(void) {
- static _Atomic(GPBEnumDescriptor*) descriptor = nil;
- if (!descriptor) {
- static const char *valueNames =
- "WithResponse\000WithoutResponse\000";
- static const int32_t values[] = {
- ProtosWriteCharacteristicRequest_WriteType_WithResponse,
- ProtosWriteCharacteristicRequest_WriteType_WithoutResponse,
- };
- GPBEnumDescriptor *worker =
- [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosWriteCharacteristicRequest_WriteType)
- valueNames:valueNames
- values:values
- count:(uint32_t)(sizeof(values) / sizeof(int32_t))
- enumVerifier:ProtosWriteCharacteristicRequest_WriteType_IsValidValue];
- GPBEnumDescriptor *expected = nil;
- if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
- [worker release];
- }
- }
- return descriptor;
- }
- BOOL ProtosWriteCharacteristicRequest_WriteType_IsValidValue(int32_t value__) {
- switch (value__) {
- case ProtosWriteCharacteristicRequest_WriteType_WithResponse:
- case ProtosWriteCharacteristicRequest_WriteType_WithoutResponse:
- return YES;
- default:
- return NO;
- }
- }
- #pragma mark - ProtosWriteCharacteristicResponse
- @implementation ProtosWriteCharacteristicResponse
- @dynamic hasRequest, request;
- @dynamic success;
- typedef struct ProtosWriteCharacteristicResponse__storage_ {
- uint32_t _has_storage_[1];
- ProtosWriteCharacteristicRequest *request;
- } ProtosWriteCharacteristicResponse__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "request",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosWriteCharacteristicRequest),
- .number = ProtosWriteCharacteristicResponse_FieldNumber_Request,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosWriteCharacteristicResponse__storage_, request),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeMessage,
- },
- {
- .name = "success",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteCharacteristicResponse_FieldNumber_Success,
- .hasIndex = 1,
- .offset = 2, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosWriteCharacteristicResponse class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosWriteCharacteristicResponse__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosWriteDescriptorRequest
- @implementation ProtosWriteDescriptorRequest
- @dynamic remoteId;
- @dynamic descriptorUuid;
- @dynamic serviceUuid;
- @dynamic secondaryServiceUuid;
- @dynamic characteristicUuid;
- @dynamic value;
- typedef struct ProtosWriteDescriptorRequest__storage_ {
- uint32_t _has_storage_[1];
- NSString *remoteId;
- NSString *descriptorUuid;
- NSString *serviceUuid;
- NSString *secondaryServiceUuid;
- NSString *characteristicUuid;
- NSData *value;
- } ProtosWriteDescriptorRequest__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteDescriptorRequest_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "descriptorUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteDescriptorRequest_FieldNumber_DescriptorUuid,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, descriptorUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "serviceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteDescriptorRequest_FieldNumber_ServiceUuid,
- .hasIndex = 2,
- .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, serviceUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "secondaryServiceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteDescriptorRequest_FieldNumber_SecondaryServiceUuid,
- .hasIndex = 3,
- .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, secondaryServiceUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "characteristicUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteDescriptorRequest_FieldNumber_CharacteristicUuid,
- .hasIndex = 4,
- .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, characteristicUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "value",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteDescriptorRequest_FieldNumber_Value,
- .hasIndex = 5,
- .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, value),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBytes,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosWriteDescriptorRequest class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosWriteDescriptorRequest__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosWriteDescriptorResponse
- @implementation ProtosWriteDescriptorResponse
- @dynamic hasRequest, request;
- @dynamic success;
- typedef struct ProtosWriteDescriptorResponse__storage_ {
- uint32_t _has_storage_[1];
- ProtosWriteDescriptorRequest *request;
- } ProtosWriteDescriptorResponse__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "request",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosWriteDescriptorRequest),
- .number = ProtosWriteDescriptorResponse_FieldNumber_Request,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosWriteDescriptorResponse__storage_, request),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeMessage,
- },
- {
- .name = "success",
- .dataTypeSpecific.className = NULL,
- .number = ProtosWriteDescriptorResponse_FieldNumber_Success,
- .hasIndex = 1,
- .offset = 2, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosWriteDescriptorResponse class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosWriteDescriptorResponse__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosSetNotificationRequest
- @implementation ProtosSetNotificationRequest
- @dynamic remoteId;
- @dynamic serviceUuid;
- @dynamic secondaryServiceUuid;
- @dynamic characteristicUuid;
- @dynamic enable;
- typedef struct ProtosSetNotificationRequest__storage_ {
- uint32_t _has_storage_[1];
- NSString *remoteId;
- NSString *serviceUuid;
- NSString *secondaryServiceUuid;
- NSString *characteristicUuid;
- } ProtosSetNotificationRequest__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosSetNotificationRequest_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "serviceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosSetNotificationRequest_FieldNumber_ServiceUuid,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, serviceUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "secondaryServiceUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosSetNotificationRequest_FieldNumber_SecondaryServiceUuid,
- .hasIndex = 2,
- .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, secondaryServiceUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "characteristicUuid",
- .dataTypeSpecific.className = NULL,
- .number = ProtosSetNotificationRequest_FieldNumber_CharacteristicUuid,
- .hasIndex = 3,
- .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, characteristicUuid),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "enable",
- .dataTypeSpecific.className = NULL,
- .number = ProtosSetNotificationRequest_FieldNumber_Enable,
- .hasIndex = 4,
- .offset = 5, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosSetNotificationRequest class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosSetNotificationRequest__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosSetNotificationResponse
- @implementation ProtosSetNotificationResponse
- @dynamic remoteId;
- @dynamic hasCharacteristic, characteristic;
- @dynamic success;
- typedef struct ProtosSetNotificationResponse__storage_ {
- uint32_t _has_storage_[1];
- NSString *remoteId;
- ProtosBluetoothCharacteristic *characteristic;
- } ProtosSetNotificationResponse__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosSetNotificationResponse_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosSetNotificationResponse__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "characteristic",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic),
- .number = ProtosSetNotificationResponse_FieldNumber_Characteristic,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosSetNotificationResponse__storage_, characteristic),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeMessage,
- },
- {
- .name = "success",
- .dataTypeSpecific.className = NULL,
- .number = ProtosSetNotificationResponse_FieldNumber_Success,
- .hasIndex = 2,
- .offset = 3, // Stored in _has_storage_ to save space.
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeBool,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosSetNotificationResponse class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosSetNotificationResponse__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosOnCharacteristicChanged
- @implementation ProtosOnCharacteristicChanged
- @dynamic remoteId;
- @dynamic hasCharacteristic, characteristic;
- typedef struct ProtosOnCharacteristicChanged__storage_ {
- uint32_t _has_storage_[1];
- NSString *remoteId;
- ProtosBluetoothCharacteristic *characteristic;
- } ProtosOnCharacteristicChanged__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosOnCharacteristicChanged_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosOnCharacteristicChanged__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "characteristic",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic),
- .number = ProtosOnCharacteristicChanged_FieldNumber_Characteristic,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosOnCharacteristicChanged__storage_, characteristic),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeMessage,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosOnCharacteristicChanged class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosOnCharacteristicChanged__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosDeviceStateResponse
- @implementation ProtosDeviceStateResponse
- @dynamic remoteId;
- @dynamic state;
- typedef struct ProtosDeviceStateResponse__storage_ {
- uint32_t _has_storage_[1];
- ProtosDeviceStateResponse_BluetoothDeviceState state;
- NSString *remoteId;
- } ProtosDeviceStateResponse__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosDeviceStateResponse_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosDeviceStateResponse__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "state",
- .dataTypeSpecific.enumDescFunc = ProtosDeviceStateResponse_BluetoothDeviceState_EnumDescriptor,
- .number = ProtosDeviceStateResponse_FieldNumber_State,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosDeviceStateResponse__storage_, state),
- .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
- .dataType = GPBDataTypeEnum,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosDeviceStateResponse class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosDeviceStateResponse__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- int32_t ProtosDeviceStateResponse_State_RawValue(ProtosDeviceStateResponse *message) {
- GPBDescriptor *descriptor = [ProtosDeviceStateResponse descriptor];
- GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosDeviceStateResponse_FieldNumber_State];
- return GPBGetMessageInt32Field(message, field);
- }
- void SetProtosDeviceStateResponse_State_RawValue(ProtosDeviceStateResponse *message, int32_t value) {
- GPBDescriptor *descriptor = [ProtosDeviceStateResponse descriptor];
- GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosDeviceStateResponse_FieldNumber_State];
- GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
- }
- #pragma mark - Enum ProtosDeviceStateResponse_BluetoothDeviceState
- GPBEnumDescriptor *ProtosDeviceStateResponse_BluetoothDeviceState_EnumDescriptor(void) {
- static _Atomic(GPBEnumDescriptor*) descriptor = nil;
- if (!descriptor) {
- static const char *valueNames =
- "Disconnected\000Connecting\000Connected\000Discon"
- "necting\000";
- static const int32_t values[] = {
- ProtosDeviceStateResponse_BluetoothDeviceState_Disconnected,
- ProtosDeviceStateResponse_BluetoothDeviceState_Connecting,
- ProtosDeviceStateResponse_BluetoothDeviceState_Connected,
- ProtosDeviceStateResponse_BluetoothDeviceState_Disconnecting,
- };
- GPBEnumDescriptor *worker =
- [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosDeviceStateResponse_BluetoothDeviceState)
- valueNames:valueNames
- values:values
- count:(uint32_t)(sizeof(values) / sizeof(int32_t))
- enumVerifier:ProtosDeviceStateResponse_BluetoothDeviceState_IsValidValue];
- GPBEnumDescriptor *expected = nil;
- if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
- [worker release];
- }
- }
- return descriptor;
- }
- BOOL ProtosDeviceStateResponse_BluetoothDeviceState_IsValidValue(int32_t value__) {
- switch (value__) {
- case ProtosDeviceStateResponse_BluetoothDeviceState_Disconnected:
- case ProtosDeviceStateResponse_BluetoothDeviceState_Connecting:
- case ProtosDeviceStateResponse_BluetoothDeviceState_Connected:
- case ProtosDeviceStateResponse_BluetoothDeviceState_Disconnecting:
- return YES;
- default:
- return NO;
- }
- }
- #pragma mark - ProtosConnectedDevicesResponse
- @implementation ProtosConnectedDevicesResponse
- @dynamic devicesArray, devicesArray_Count;
- typedef struct ProtosConnectedDevicesResponse__storage_ {
- uint32_t _has_storage_[1];
- NSMutableArray *devicesArray;
- } ProtosConnectedDevicesResponse__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "devicesArray",
- .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothDevice),
- .number = ProtosConnectedDevicesResponse_FieldNumber_DevicesArray,
- .hasIndex = GPBNoHasBit,
- .offset = (uint32_t)offsetof(ProtosConnectedDevicesResponse__storage_, devicesArray),
- .flags = GPBFieldRepeated,
- .dataType = GPBDataTypeMessage,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosConnectedDevicesResponse class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosConnectedDevicesResponse__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosMtuSizeRequest
- @implementation ProtosMtuSizeRequest
- @dynamic remoteId;
- @dynamic mtu;
- typedef struct ProtosMtuSizeRequest__storage_ {
- uint32_t _has_storage_[1];
- uint32_t mtu;
- NSString *remoteId;
- } ProtosMtuSizeRequest__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosMtuSizeRequest_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosMtuSizeRequest__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "mtu",
- .dataTypeSpecific.className = NULL,
- .number = ProtosMtuSizeRequest_FieldNumber_Mtu,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosMtuSizeRequest__storage_, mtu),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeUInt32,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosMtuSizeRequest class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosMtuSizeRequest__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma mark - ProtosMtuSizeResponse
- @implementation ProtosMtuSizeResponse
- @dynamic remoteId;
- @dynamic mtu;
- typedef struct ProtosMtuSizeResponse__storage_ {
- uint32_t _has_storage_[1];
- uint32_t mtu;
- NSString *remoteId;
- } ProtosMtuSizeResponse__storage_;
- // This method is threadsafe because it is initially called
- // in +initialize for each subclass.
- + (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = nil;
- if (!descriptor) {
- static GPBMessageFieldDescription fields[] = {
- {
- .name = "remoteId",
- .dataTypeSpecific.className = NULL,
- .number = ProtosMtuSizeResponse_FieldNumber_RemoteId,
- .hasIndex = 0,
- .offset = (uint32_t)offsetof(ProtosMtuSizeResponse__storage_, remoteId),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeString,
- },
- {
- .name = "mtu",
- .dataTypeSpecific.className = NULL,
- .number = ProtosMtuSizeResponse_FieldNumber_Mtu,
- .hasIndex = 1,
- .offset = (uint32_t)offsetof(ProtosMtuSizeResponse__storage_, mtu),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeUInt32,
- },
- };
- GPBDescriptor *localDescriptor =
- [GPBDescriptor allocDescriptorForClass:[ProtosMtuSizeResponse class]
- rootClass:[ProtosFlutterblueRoot class]
- file:ProtosFlutterblueRoot_FileDescriptor()
- fields:fields
- fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
- storageSize:sizeof(ProtosMtuSizeResponse__storage_)
- flags:GPBDescriptorInitializationFlag_None];
- #if defined(DEBUG) && DEBUG
- NSAssert(descriptor == nil, @"Startup recursed!");
- #endif // DEBUG
- descriptor = localDescriptor;
- }
- return descriptor;
- }
- @end
- #pragma clang diagnostic pop
- // @@protoc_insertion_point(global_scope)
|