@0x8c2f829df1930cd5; using Rust = import "programming_language/rust.capnp"; $Rust.parentModule("schema"); using CSharp = import "programming_language/csharp.capnp"; $CSharp.namespace("FabAccessAPI.Schema"); using General = import "general.capnp"; using User = import "user.capnp".User; using Space = import "space.capnp".Space; struct Machine { enum MachineState { free @0; inUse @1; toCheck @2; blocked @3; disabled @4; reserved @5; } struct MachineInfoExtended { currentUser @0 :User; transferUser @1 :User; } struct Reservation { user @0 :User; start @1: UInt64; end @2: UInt64; } id @0 :Text; space @1 :Space; name @2 :Text; description @3 :Text; state @4 :MachineState; manager @5:User; wiki @13 :Text; urn @14 :Text; category @15 :Text; info @6 :Info; interface Info $CSharp.name("InfoInterface") { getMachineInfoExtended @0 () -> ( machineInfoExtended :MachineInfoExtended, dummy :UInt8 = 0); getPropertyList @1 () -> ( propertyList :List(General.KeyValuePair) ); getReservationList @2 () -> ( reservationList :List(Reservation) ); } use @7 :Use; interface Use $CSharp.name("UseInterface") { use @0 (); reserve @1 (); reserveto @2 (start :UInt64, end :UInt64); } inuse @8 :InUse; interface InUse $CSharp.name("InUseInterface") { giveBack @0 (); sendRawData @1 (data :Data); } transfer @9 :Transfer; interface Transfer $CSharp.name("TransferInterface") { accept @0 (); reject @1 (); } check @10 :Check; interface Check $CSharp.name("CheckInterface") { check @0 (); reject @1 (); } manage @11 :Manage; interface Manage $CSharp.name("ManageInterface") { setProperty @0 (property :General.KeyValuePair); removeProperty @1 (property :General.KeyValuePair); forceUse @2 (); forceFree @3 (); forceTransfer @4 (user :User); block @5 (); disabled @6 (); } admin @12 :Admin; interface Admin $CSharp.name("AdminInterface") { forceSetState @0 ( state :MachineState ); forceSetUser @1 ( user :User ); getAdminPropertyList @2 () -> (propertyList :List(General.KeyValuePair)); setAdminProperty @3 (property :General.KeyValuePair); removeAdminProperty @4 (property :General.KeyValuePair); } }