1syntax = "proto3"; 2 3package bluetooth.security; 4 5import "google/protobuf/empty.proto"; 6import "facade/common.proto"; 7 8service SecurityModuleFacade { 9 rpc CreateBond(facade.BluetoothAddressWithType) returns (google.protobuf.Empty) {} 10 rpc CancelBond(facade.BluetoothAddressWithType) returns (google.protobuf.Empty) {} 11 rpc RemoveBond(facade.BluetoothAddressWithType) returns (google.protobuf.Empty) {} 12 rpc SendUiCallback(UiCallbackMsg) returns (google.protobuf.Empty) {} 13 rpc FetchUiEvents(google.protobuf.Empty) returns (stream UiMsg) {} 14 rpc FetchBondEvents(google.protobuf.Empty) returns (stream BondMsg) {} 15} 16 17enum UiMsgType { 18 DISPLAY_YES_NO_WITH_VALUE = 0; 19 DISPLAY_YES_NO = 1; 20 DISPLAY_PASSKEY = 2; 21 DISPLAY_PASSKEY_ENTRY = 3; 22 DISPLAY_CANCEL = 4; 23} 24 25message UiMsg { 26 UiMsgType message_type = 1; 27 facade.BluetoothAddressWithType peer = 2; 28 uint32 numeric_value = 3; 29 uint32 unique_id = 4; 30} 31 32enum UiCallbackType { 33 YES_NO = 0; 34 PASSKEY = 1; 35} 36 37message UiCallbackMsg { 38 UiCallbackType message_type = 1; 39 bool boolean = 2; 40 uint32 numeric_value = 3; 41 uint32 unique_id = 4; 42} 43 44enum BondMsgType { 45 DEVICE_BONDED = 0; 46 DEVICE_UNBONDED = 1; 47 DEVICE_BOND_FAILED = 2; 48} 49 50message BondMsg { 51 BondMsgType message_type = 1; 52 facade.BluetoothAddressWithType peer = 2; 53} 54