diff options
author | drebs <drebs@leap.se> | 2013-07-24 16:26:52 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-07-24 16:55:20 -0300 |
commit | b7c74e4f293d0e611ea038e04022fbe700a8cb42 (patch) | |
tree | b121ebc957b36584fdab077b3071b183776ab293 /src/leap/common/events/events.proto | |
parent | 1f1412f3c31dfba10135ceae4641313ee48318c8 (diff) |
Trying to init events server raises when given port is not free.
* Also fix and improve some tests.
Diffstat (limited to 'src/leap/common/events/events.proto')
-rw-r--r-- | src/leap/common/events/events.proto | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/leap/common/events/events.proto b/src/leap/common/events/events.proto index 79a5564..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,10 @@ 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; @@ -56,6 +71,17 @@ message UnregisterRequest { 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 { @@ -68,12 +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); } + +// EventsComponentService is the service provided by components (clients). + service EventsClientService { + rpc ping(PingRequest) returns (EventResponse); rpc signal(SignalRequest) returns (EventResponse); } |