Skip to content

Commit

Permalink
Added serviceUuids to protobuf for AdvertisementData.
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldemarco committed Aug 11, 2018
1 parent 5d311fc commit 77a3358
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 50 deletions.
19 changes: 12 additions & 7 deletions ios/gen/Flutterblue.pbobjc.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 29 additions & 18 deletions ios/gen/Flutterblue.pbobjc.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 20 additions & 17 deletions lib/gen/flutterblue.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,11 @@ class _ReadonlyAdvertisementData_ServiceDataEntry extends AdvertisementData_Serv
class AdvertisementData extends GeneratedMessage {
static final BuilderInfo _i = new BuilderInfo('AdvertisementData')
..aOS(1, 'localName')
..a<List<int>>(2, 'manufacturerData', PbFieldType.OY)
..pp<AdvertisementData_ServiceDataEntry>(3, 'serviceData', PbFieldType.PM, AdvertisementData_ServiceDataEntry.$checkItem, AdvertisementData_ServiceDataEntry.create)
..a<int>(4, 'txPowerLevel', PbFieldType.O3)
..aOB(5, 'connectable')
..a<int>(2, 'txPowerLevel', PbFieldType.O3)
..aOB(3, 'connectable')
..a<List<int>>(4, 'manufacturerData', PbFieldType.OY)
..pp<AdvertisementData_ServiceDataEntry>(5, 'serviceData', PbFieldType.PM, AdvertisementData_ServiceDataEntry.$checkItem, AdvertisementData_ServiceDataEntry.create)
..pPS(6, 'serviceUuids')
..hasRequiredFields = false
;

Expand All @@ -109,22 +110,24 @@ class AdvertisementData extends GeneratedMessage {
bool hasLocalName() => $_has(0);
void clearLocalName() => clearField(1);

List<int> get manufacturerData => $_getN(1);
set manufacturerData(List<int> v) { $_setBytes(1, v); }
bool hasManufacturerData() => $_has(1);
void clearManufacturerData() => clearField(2);
int get txPowerLevel => $_get(1, 0);
set txPowerLevel(int v) { $_setSignedInt32(1, v); }
bool hasTxPowerLevel() => $_has(1);
void clearTxPowerLevel() => clearField(2);

List<AdvertisementData_ServiceDataEntry> get serviceData => $_getList(2);
bool get connectable => $_get(2, false);
set connectable(bool v) { $_setBool(2, v); }
bool hasConnectable() => $_has(2);
void clearConnectable() => clearField(3);

int get txPowerLevel => $_get(3, 0);
set txPowerLevel(int v) { $_setSignedInt32(3, v); }
bool hasTxPowerLevel() => $_has(3);
void clearTxPowerLevel() => clearField(4);
List<int> get manufacturerData => $_getN(3);
set manufacturerData(List<int> v) { $_setBytes(3, v); }
bool hasManufacturerData() => $_has(3);
void clearManufacturerData() => clearField(4);

bool get connectable => $_get(4, false);
set connectable(bool v) { $_setBool(4, v); }
bool hasConnectable() => $_has(4);
void clearConnectable() => clearField(5);
List<AdvertisementData_ServiceDataEntry> get serviceData => $_getList(4);

List<String> get serviceUuids => $_getList(5);
}

class _ReadonlyAdvertisementData extends AdvertisementData with ReadonlyMessageMixin {}
Expand Down
9 changes: 5 additions & 4 deletions lib/gen/flutterblue.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ const AdvertisementData$json = const {
'1': 'AdvertisementData',
'2': const [
const {'1': 'local_name', '3': 1, '4': 1, '5': 9, '10': 'localName'},
const {'1': 'manufacturer_data', '3': 2, '4': 1, '5': 12, '10': 'manufacturerData'},
const {'1': 'service_data', '3': 3, '4': 3, '5': 11, '6': '.AdvertisementData.ServiceDataEntry', '10': 'serviceData'},
const {'1': 'tx_power_level', '3': 4, '4': 1, '5': 5, '10': 'txPowerLevel'},
const {'1': 'connectable', '3': 5, '4': 1, '5': 8, '10': 'connectable'},
const {'1': 'tx_power_level', '3': 2, '4': 1, '5': 5, '10': 'txPowerLevel'},
const {'1': 'connectable', '3': 3, '4': 1, '5': 8, '10': 'connectable'},
const {'1': 'manufacturer_data', '3': 4, '4': 1, '5': 12, '10': 'manufacturerData'},
const {'1': 'service_data', '3': 5, '4': 3, '5': 11, '6': '.AdvertisementData.ServiceDataEntry', '10': 'serviceData'},
const {'1': 'service_uuids', '3': 6, '4': 3, '5': 9, '10': 'serviceUuids'},
],
'3': const [AdvertisementData_ServiceDataEntry$json],
};
Expand Down
9 changes: 5 additions & 4 deletions protos/flutterblue.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ message BluetoothState {

message AdvertisementData {
string local_name = 1;
bytes manufacturer_data = 2;
map<string, bytes> service_data = 3; // Map of service UUIDs to their data.
int32 tx_power_level = 4;
bool connectable = 5;
int32 tx_power_level = 2;
bool connectable = 3;
bytes manufacturer_data = 4;
map<string, bytes> service_data = 5; // Map of service UUIDs to their data.
repeated string service_uuids = 6;
}

message ScanSettings {
Expand Down

0 comments on commit 77a3358

Please sign in to comment.