1// Copyright 2023 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 = "OsProto";
18
19package pandora;
20
21import "pandora/host.proto";
22import "google/protobuf/empty.proto";
23
24// Service for OS specific operations.
25service Os {
26  // Log text (for utility only)
27  rpc Log(LogRequest) returns (LogResponse);
28  // Set Message, PhoneBook and SIM access permission
29  rpc SetAccessPermission(SetAccessPermissionRequest) returns (google.protobuf.Empty);
30  // Send ping
31  rpc SendPing(SendPingRequest) returns (google.protobuf.Empty);
32}
33
34message LogRequest {
35  string text = 1;
36}
37
38message LogResponse {}
39
40enum AccessType {
41  ACCESS_MESSAGE = 0;
42  ACCESS_PHONEBOOK = 1;
43  ACCESS_SIM = 2;
44}
45
46message SetAccessPermissionRequest {
47  // Peer Bluetooth Device Address as array of 6 bytes.
48  bytes address = 1;
49  // Set AccessType to Message, PhoneBook and SIM access permission
50  AccessType access_type = 2;
51}
52
53// Internal representation of a Connection - not exposed to clients, included here
54// just for code-generation convenience. This is what we put in the Connection.cookie.
55message InternalConnectionRef {
56  bytes address = 1;
57  int32 transport = 2;
58}
59
60// Request for the `SendPing` rpc.
61message SendPingRequest {
62  string ip_address = 1;
63}
64