Changed Schema, so it compiles in C#

This commit is contained in:
Kai Jan Kriegel 2020-10-19 01:52:15 +02:00
parent 8211afd22e
commit 9fb856a4db
3 changed files with 9 additions and 2 deletions

View File

@ -26,6 +26,7 @@ using Rust = import "rust.capnp";
$Rust.parentModule("schema"); $Rust.parentModule("schema");
using CSharp = import "csharp.capnp"; using CSharp = import "csharp.capnp";
$CSharp.namespace("FabAccessAPI.Schema");
struct FabAccess { struct FabAccess {
permissions @0 :Permissions; permissions @0 :Permissions;
@ -42,7 +43,7 @@ interface Machines {
listMachines @0 () -> ( machines :List(Machine) ); listMachines @0 () -> ( machines :List(Machine) );
# List all machines that BFFH knows about the user has been granted at least read access on # List all machines that BFFH knows about the user has been granted at least read access on
getMachine @1 ( uuid :UUID ) -> ( machine :Machine ); getMachine @1 ( uuid :UUID ) -> ( machine :Machine, dummy :UInt8 = 0 );
# Access a particular machine by known UUID. This may fail for two reasons: The user # Access a particular machine by known UUID. This may fail for two reasons: The user
# has not been granted access to know the machine exists or the machine does in fact # has not been granted access to know the machine exists or the machine does in fact
# not exist. In both cases the `machine` result will be a NULL-pointer # not exist. In both cases the `machine` result will be a NULL-pointer
@ -95,7 +96,7 @@ struct Machine {
read @0 :Read; read @0 :Read;
interface Read $CSharp.name("ReadInterface") { interface Read $CSharp.name("ReadInterface") {
info @0 () -> ( minfo :MInfo ); info @0 () -> ( minfo :MInfo, dummy :UInt8 = 0 );
# Check the state of a machine. # Check the state of a machine.
} }

View File

@ -25,6 +25,9 @@
using Rust = import "rust.capnp"; using Rust = import "rust.capnp";
$Rust.parentModule("schema"); $Rust.parentModule("schema");
using CSharp = import "csharp.capnp";
$CSharp.namespace("FabAccessAPI.Schema");
struct AuthMessage { struct AuthMessage {
union { union {
mechanisms @0 :List(Text); mechanisms @0 :List(Text);

View File

@ -25,6 +25,9 @@
using Rust = import "rust.capnp"; using Rust = import "rust.capnp";
$Rust.parentModule("schema"); $Rust.parentModule("schema");
using CSharp = import "csharp.capnp";
$CSharp.namespace("FabAccessAPI.Schema");
using Auth = import "auth.capnp"; using Auth = import "auth.capnp";
using Api = import "api.capnp"; using Api = import "api.capnp";