1// Copyright 2024 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17option java_outer_classname = "BumbleConfigProto";
18
19package pandora;
20
21import "google/protobuf/empty.proto";
22import "pandora/host.proto";
23
24// This service provides runtime configuration for the Bumble Bluetooth stack.
25// It allows overriding the initial configuration provided by the JSON file and
26// the Security Service. This service should only be used by BumbleBluetoothTests.
27service BumbleConfig {
28  // Override the initial Bumble configuration. This will erase any
29  // previous configuration set via JSON file or Security Service.
30  rpc Override(OverrideRequest) returns (google.protobuf.Empty);
31}
32
33message PairingConfig {
34    bool sc = 1;
35    bool mitm = 2;
36    bool bonding = 3;
37    OwnAddressType identity_address_type = 4;
38}
39
40enum IoCapability {
41    DISPLAY_ONLY = 0x00;
42    DISPLAY_YES_NO = 0x01;
43    KEYBOARD_ONLY = 0x02;
44    NO_OUTPUT_NO_INPUT = 0x03;
45    KEYBOARD_DISPLAY = 0x04;
46}
47
48enum KeyDistribution {
49    ENCRYPTION_KEY = 0x00;
50    IDENTITY_KEY = 0x01;
51    SIGNING_KEY = 0x02;
52    LINK_KEY = 0x03;
53}
54
55message OverrideRequest {
56    IoCapability io_capability = 1;
57    PairingConfig pairing_config = 2;
58    KeyDistribution initiator_key_distribution = 3;
59    KeyDistribution responder_key_distribution = 4;
60}
61