Skip to content

Commit

Permalink
rm
Browse files Browse the repository at this point in the history
  • Loading branch information
bcherry committed Oct 23, 2024
1 parent 90a5dc0 commit 757ec34
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
9 changes: 2 additions & 7 deletions livekit-ffi/protocol/rpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,11 @@ message PerformRpcResponse {
required uint64 async_id = 1;
}

message RegisterRpcMethodResponse {
required uint64 async_id = 1;
}
message RegisterRpcMethodResponse {}

message UnregisterRpcMethodResponse {
required uint64 async_id = 1;
}
message UnregisterRpcMethodResponse {}

message RpcMethodInvocationResponseResponse {
required uint64 async_id = 1;
optional string error = 2;
}

Expand Down
6 changes: 0 additions & 6 deletions livekit-ffi/src/livekit.proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3614,20 +3614,14 @@ pub struct PerformRpcResponse {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterRpcMethodResponse {
#[prost(uint64, required, tag="1")]
pub async_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnregisterRpcMethodResponse {
#[prost(uint64, required, tag="1")]
pub async_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RpcMethodInvocationResponseResponse {
#[prost(uint64, required, tag="1")]
pub async_id: u64,
#[prost(string, optional, tag="2")]
pub error: ::core::option::Option<::prost::alloc::string::String>,
}
Expand Down
7 changes: 2 additions & 5 deletions livekit-ffi/src/server/participant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ impl FfiParticipant {
server: &'static FfiServer,
request: proto::RegisterRpcMethodRequest,
) -> FfiResult<proto::RegisterRpcMethodResponse> {
let async_id = server.next_id();
let method = request.method.clone();

let local = match &self.participant {
Expand Down Expand Up @@ -114,16 +113,14 @@ impl FfiParticipant {
})
},
);
Ok(proto::RegisterRpcMethodResponse { async_id })
Ok(proto::RegisterRpcMethodResponse { })
}

pub fn unregister_rpc_method(
&self,
server: &'static FfiServer,
request: proto::UnregisterRpcMethodRequest,
) -> FfiResult<proto::UnregisterRpcMethodResponse> {
let async_id = server.next_id();

let local = match &self.participant {
Participant::Local(local) => local.clone(),
Participant::Remote(_) => {
Expand All @@ -133,7 +130,7 @@ impl FfiParticipant {

local.unregister_rpc_method(request.method);

Ok(proto::UnregisterRpcMethodResponse { async_id })
Ok(proto::UnregisterRpcMethodResponse { })
}
}

Expand Down
3 changes: 1 addition & 2 deletions livekit-ffi/src/server/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,6 @@ fn on_rpc_method_invocation_response(
server: &'static FfiServer,
request: proto::RpcMethodInvocationResponseRequest,
) -> FfiResult<proto::RpcMethodInvocationResponseResponse> {
let async_id = server.next_id();
let ffi_participant =
server.retrieve_handle::<FfiParticipant>(request.local_participant_handle)?.clone();

Expand All @@ -840,7 +839,7 @@ fn on_rpc_method_invocation_response(
error = Some("No caller found".to_string());
}

Ok(proto::RpcMethodInvocationResponseResponse { async_id, error })
Ok(proto::RpcMethodInvocationResponseResponse { error })
}

#[allow(clippy::field_reassign_with_default)] // Avoid uggly format
Expand Down

0 comments on commit 757ec34

Please sign in to comment.