1syntax = "proto3"; 2 3option java_outer_classname = "RfcommProto"; 4 5package pandora; 6 7// Service to trigger RFCOMM procedures. 8service RFCOMM { 9 rpc ConnectToServer(ConnectionRequest) returns (ConnectionResponse); 10 rpc StartServer(StartServerRequest) returns (StartServerResponse); 11 rpc AcceptConnection(AcceptConnectionRequest) returns (AcceptConnectionResponse); 12 rpc Disconnect(DisconnectionRequest) returns (DisconnectionResponse); 13 rpc StopServer(StopServerRequest) returns (StopServerResponse); 14 rpc Send(TxRequest) returns (TxResponse); 15 rpc Receive(RxRequest) returns (RxResponse); 16} 17 18message ConnectionRequest { 19 bytes address = 1; 20 string uuid = 2; 21} 22 23message RfcommConnection { 24 uint32 id = 1; 25} 26 27message ConnectionResponse { 28 RfcommConnection connection = 1; 29} 30 31message StartServerRequest { 32 string name = 1; 33 string uuid = 2; 34} 35 36message ServerId { 37 uint32 id = 1; 38} 39 40message StartServerResponse { 41 ServerId server = 1; 42} 43 44message StopServerRequest { 45 ServerId server = 1; 46} 47 48message StopServerResponse { 49} 50 51message AcceptConnectionRequest { 52 ServerId server = 1; 53} 54 55message AcceptConnectionResponse { 56 RfcommConnection connection = 1; 57} 58 59message DisconnectionRequest { 60 RfcommConnection connection = 1; 61} 62 63message DisconnectionResponse { 64} 65 66message TxRequest { 67 RfcommConnection connection = 1; 68 bytes data = 2; 69} 70 71message TxResponse { 72} 73 74message RxRequest { 75 RfcommConnection connection = 1; 76} 77 78message RxResponse { 79 bytes data = 1; 80} 81