packages/modules/Bluetooth/pandora/interfaces/pandora_experimental/l2cap.proto

62 lines
1.5 KiB
Protocol Buffer
Raw Normal View History

2025-08-25 08:38:42 +08:00
syntax = "proto3";
package pandora;
option java_outer_classname = "L2capProto";
import "google/protobuf/empty.proto";
import "pandora_experimental/host.proto";
service L2CAP {
// Create a L2CAP connection to a peer.
rpc CreateLECreditBasedChannel(CreateLECreditBasedChannelRequest) returns (CreateLECreditBasedChannelResponse);
// Send some data
rpc SendData(SendDataRequest) returns (SendDataResponse);
// Receive data
rpc ReceiveData(ReceiveDataRequest) returns (ReceiveDataResponse);
// Listen L2CAP channel for connection
rpc ListenL2CAPChannel(ListenL2CAPChannelRequest) returns (ListenL2CAPChannelResponse);
// Accept L2CAP connection
rpc AcceptL2CAPChannel(AcceptL2CAPChannelRequest) returns (AcceptL2CAPChannelResponse);
}
// Request for the `OpenSource` method.
message CreateLECreditBasedChannelRequest {
// The connection that will open the stream.
Connection connection = 1;
int32 psm = 2;
bool secure = 3;
}
// Request for the `OpenSource` method.
message CreateLECreditBasedChannelResponse {}
message SendDataRequest {
// The connection that will open the stream.
Connection connection = 1;
bytes data = 2;
}
message SendDataResponse {}
message ReceiveDataRequest {
// The connection that will open the stream.
Connection connection = 1;
}
message ReceiveDataResponse {
bytes data = 1;
}
message ListenL2CAPChannelRequest{
Connection connection = 1;
bool secure = 2;
}
message ListenL2CAPChannelResponse {}
message AcceptL2CAPChannelRequest{
Connection connection = 1;
}
message AcceptL2CAPChannelResponse {}