fork/rust-sdks
git clone https://git.julia.blue/fork/rust-sdks
d6524ba
rust-sdks/livekit-ffi@0.12.19
1// Copyright 2023 LiveKit, Inc. 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// http://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 = "proto2" ; 16 17package livekit . proto ; 18option csharp_namespace= "LiveKit.Proto" ; 19 20message RpcError { 21required uint32 code = 1 ; 22required string message = 2 ; 23optional string data = 3 ; 24} 25 26// FFI Requests 27message PerformRpcRequest { 28required uint64 local_participant_handle = 1 ; 29required string destination_identity = 2 ; 30required string method = 3 ; 31required string payload = 4 ; 32optional uint32 response_timeout_ms = 5 ; 33} 34 35message RegisterRpcMethodRequest { 36required uint64 local_participant_handle = 1 ; 37required string method = 2 ; 38} 39 40message UnregisterRpcMethodRequest { 41required uint64 local_participant_handle = 1 ; 42required string method = 2 ; 43} 44 45message RpcMethodInvocationResponseRequest { 46required uint64 local_participant_handle = 1 ; 47required uint64 invocation_id = 2 ; 48optional string payload = 3 ; 49optional RpcError error = 4 ; 50} 51 52// FFI Responses 53message PerformRpcResponse { 54required uint64 async_id = 1 ; 55} 56 57message RegisterRpcMethodResponse {} 58 59message UnregisterRpcMethodResponse {} 60 61message RpcMethodInvocationResponseResponse { 62optional string error = 1 ; 63} 64 65// FFI Callbacks 66message PerformRpcCallback { 67required uint64 async_id = 1 ; 68optional string payload = 2 ; 69optional RpcError error = 3 ; 70} 71 72// FFI Events 73message RpcMethodInvocationEvent { 74required uint64 local_participant_handle = 1 ; 75required uint64 invocation_id = 2 ; 76required string method = 3 ; 77required string request_id = 4 ; 78required string caller_identity = 5 ; 79required string payload = 6 ; 80required uint32 response_timeout_ms = 7 ; 81}