diff options
Diffstat (limited to 'pandora')
-rw-r--r-- | pandora/interfaces/pandora_experimental/vcp.proto | 47 | ||||
-rw-r--r-- | pandora/interfaces/python/Android.bp | 5 |
2 files changed, 52 insertions, 0 deletions
diff --git a/pandora/interfaces/pandora_experimental/vcp.proto b/pandora/interfaces/pandora_experimental/vcp.proto new file mode 100644 index 0000000000..42641c8545 --- /dev/null +++ b/pandora/interfaces/pandora_experimental/vcp.proto @@ -0,0 +1,47 @@ +// Copyright (C) 2024 The Android Open Source Project +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package pandora.vcp; + +import "pandora/host.proto"; +option java_outer_classname = "VcpProto"; +import "google/protobuf/empty.proto"; + +service VCP { + // set absolute volume on remote device + rpc SetDeviceVolume(SetDeviceVolumeRequest) returns (google.protobuf.Empty); + // set volume offset on remote device + rpc SetVolumeOffset(SetVolumeOffsetRequest) returns (google.protobuf.Empty); + // Wait for device to be connected. + rpc WaitConnect(WaitConnectRequest) returns (google.protobuf.Empty); +} + +// Request of the `SetDeviceVolume` method +message SetDeviceVolumeRequest{ + // Connection crafted by grpc server + Connection connection = 1; + // Volume value to be set + int32 volume = 2; +} + +// Request of the `SetVolumeOffset` method +message SetVolumeOffsetRequest{ + // Connection crafted by grpc server + Connection connection = 1; + // Volume offset value to be set + int32 offset = 2; +} + +message WaitConnectRequest { + Connection connection = 1; +} diff --git a/pandora/interfaces/python/Android.bp b/pandora/interfaces/python/Android.bp index d295f2cfd3..c866c4a138 100644 --- a/pandora/interfaces/python/Android.bp +++ b/pandora/interfaces/python/Android.bp @@ -95,6 +95,10 @@ genrule { "pandora_experimental/rfcomm_grpc_aio.py", "pandora_experimental/rfcomm_pb2.py", "pandora_experimental/rfcomm_pb2.pyi", + "pandora_experimental/vcp_grpc.py", + "pandora_experimental/vcp_grpc_aio.py", + "pandora_experimental/vcp_pb2.py", + "pandora_experimental/vcp_pb2.pyi", ], } @@ -129,6 +133,7 @@ filegroup { ":pandora_experimental-python-gen-src{pandora_experimental/pbap_pb2.pyi}", ":pandora_experimental-python-gen-src{pandora_experimental/py.typed}", ":pandora_experimental-python-gen-src{pandora_experimental/rfcomm_pb2.pyi}", + ":pandora_experimental-python-gen-src{pandora_experimental/vcp_pb2.pyi}", ], } |