1syntax = "proto3"; 2 3package pandora; 4 5option java_outer_classname = "L2capProto"; 6 7import "google/protobuf/empty.proto"; 8import "pandora/host.proto"; 9 10service L2CAP { 11 // Create a L2CAP connection to a peer. 12 rpc CreateLECreditBasedChannel(CreateLECreditBasedChannelRequest) returns (CreateLECreditBasedChannelResponse); 13 // Send some data 14 rpc SendData(SendDataRequest) returns (SendDataResponse); 15 // Receive data 16 rpc ReceiveData(ReceiveDataRequest) returns (ReceiveDataResponse); 17 // Listen L2CAP channel for connection 18 rpc ListenL2CAPChannel(ListenL2CAPChannelRequest) returns (ListenL2CAPChannelResponse); 19 // Accept L2CAP connection 20 rpc AcceptL2CAPChannel(AcceptL2CAPChannelRequest) returns (AcceptL2CAPChannelResponse); 21} 22 23// Request for the `OpenSource` method. 24message CreateLECreditBasedChannelRequest { 25 // The connection that will open the stream. 26 Connection connection = 1; 27 int32 psm = 2; 28 bool secure = 3; 29} 30 31// Request for the `OpenSource` method. 32message CreateLECreditBasedChannelResponse {} 33 34message SendDataRequest { 35 // The connection that will open the stream. 36 Connection connection = 1; 37 bytes data = 2; 38} 39 40message SendDataResponse {} 41 42message ReceiveDataRequest { 43 // The connection that will open the stream. 44 Connection connection = 1; 45} 46 47message ReceiveDataResponse { 48 bytes data = 1; 49} 50 51message ListenL2CAPChannelRequest{ 52 Connection connection = 1; 53 bool secure = 2; 54} 55 56message ListenL2CAPChannelResponse {} 57 58message AcceptL2CAPChannelRequest{ 59 Connection connection = 1; 60} 61 62message AcceptL2CAPChannelResponse {}