diff options
author | Micah Anderson <micah@riseup.net> | 2013-08-13 14:25:57 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2013-08-13 14:27:01 -0400 |
commit | ddff9c2dda51fd28dcdc8e2db998d7254f69a41b (patch) | |
tree | b000723d9c7e54f0ac163e54f8d0d6fcd829209a /src/leap/common/events/events.proto | |
parent | cc8dd1e7f3d64ae6d7d69ed08a4346bfabfe7b22 (diff) | |
parent | 0e721b1b47c3b94f6d4d6709e34b6b816f9fd810 (diff) |
Merge tag '0.3.0' into debian
Tag leap.common version 0.3.0
Diffstat (limited to 'src/leap/common/events/events.proto')
-rw-r--r-- | src/leap/common/events/events.proto | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/src/leap/common/events/events.proto b/src/leap/common/events/events.proto index 447b038..b844f42 100644 --- a/src/leap/common/events/events.proto +++ b/src/leap/common/events/events.proto @@ -17,6 +17,9 @@ package leap.common.events; option py_generic_services = true; + +// These are the events that can be signaled using the events mechanism. + enum Event { CLIENT_SESSION_ID = 1; CLIENT_UID = 2; @@ -33,6 +36,10 @@ enum Event { RAISE_WINDOW = 13; } + +// A SignalRequest is the type of the message sent from one component to request +// that a signal be sent to every registered component. + message SignalRequest { required Event event = 1; required string content = 2; @@ -42,6 +49,10 @@ message SignalRequest { optional bool error_occurred = 6; } + +// A RegisterRequest message tells the server that a component wants to +// be signaled whenever a specific event occurs. + message RegisterRequest { required Event event = 1; required int32 port = 2; @@ -49,6 +60,28 @@ message RegisterRequest { required bytes mac = 4; } + +// An UnregisterRequest message tells the server that a component does not +// want to be signaled when a specific event occurs. + +message UnregisterRequest { + required Event event = 1; + required int32 port = 2; + required string mac_method = 3; + required bytes mac = 4; +} + + +// A PingRequest message is used to find out if a server or component is +// alive. + +message PingRequest { +} + + +// The EventResponse is the message sent back by server and components after +// they receive other kinds of requests. + message EventResponse { enum Status { @@ -61,11 +94,20 @@ message EventResponse { optional string result = 2; } + +// The EventsServerService is the service provided by the server. + service EventsServerService { + rpc ping(PingRequest) returns (EventResponse); rpc register(RegisterRequest) returns (EventResponse); + rpc unregister(UnregisterRequest) returns (EventResponse); rpc signal(SignalRequest) returns (EventResponse); } -service EventsComponentService { + +// EventsComponentService is the service provided by components (clients). + +service EventsClientService { + rpc ping(PingRequest) returns (EventResponse); rpc signal(SignalRequest) returns (EventResponse); } |