From e6af19d0e44be90eb101edd88f1103707e425f37 Mon Sep 17 00:00:00 2001 From: Kai Kriegel Date: Thu, 26 Nov 2020 15:17:26 +0000 Subject: [PATCH 1/2] removed greeting and leave message --- connection.capnp | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/connection.capnp b/connection.capnp index 01f3d66..6e90078 100644 --- a/connection.capnp +++ b/connection.capnp @@ -41,38 +41,3 @@ interface Bootstrap { # Diflouroborane stores machine¹ information in an opaque internal database. This interface is # the only stable process of modifying that information } - -struct Greeting { - # Be nice and say hello to each other first - # A client sends this message to a server first thing, a server then replies - # similarly - - # Hello, I'm … - host @0 :Text; # non-qualified Hostname of the client/server, as applicable - - # using the program … - program @1 :Text; # SHOULD be of the form `programname-version` - - # and speak the API version … - major @2 :UInt32; # The major part of the API version - minor @3 :UInt32; # The minor part of the API version -} - -struct Leave { - # Be nice and tell the other side before aborting a connection - enum Reason { - other @0; - # None of the more specific reasons. An implementation SHOULD provide - # more (human-readable) information in the `message` field. - - incompatible @1; - # The API versions are in some way incompatible. Doesn't need much of - # an explanation so an implementation MAY leave the message field - # empty. - } - - reason @0 :Reason; - message @1 :Text; - # An implementation SHOULD send a human-readable message along, with the - # exception of reasons that are self-explanatory (e.g. incompatible versions) -} From f1c518884f837abf1ca9edfaa017026fcd56ad2d Mon Sep 17 00:00:00 2001 From: Kai Kriegel Date: Tue, 15 Dec 2020 22:43:31 +0000 Subject: [PATCH 2/2] Feature/machine properties --- api.capnp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/api.capnp b/api.capnp index 54ce797..0046740 100644 --- a/api.capnp +++ b/api.capnp @@ -84,11 +84,22 @@ struct Machine { responsible @3 :User; # This field may be NULL if nobody is using the machine } + + struct PropertyMap { + properties @0 :List(Property); + struct Property { + key @0 :Text; + value @1 :Text; + } + } read @0 :Read; interface Read $CSharp.name("ReadInterface") { info @0 () -> ( minfo :MInfo, dummy :UInt8 = 0 ); # Check the state of a machine. + + getProperties @1 () -> (properties :PropertyMap, dummy :UInt8 = 0 ); + # Read Machine Properties } write @1 :Write; @@ -106,6 +117,12 @@ struct Machine { reserve @1 () -> ( ret :GiveBack ); # Try to reserve a machine. returns a NULL-ptr if the user does not have the required # permissions to reserve this machine + + setProperties @2 (properties :PropertyMap) -> (); + # Write all Machine Properties + + setProperty @3 (property :PropertyMap.Property) -> (); + # Write ONE Machine Property identified by it's key }