mirror of
https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
synced 2025-03-12 14:51:42 +01:00
Compact struct return values
This commit is contained in:
parent
8f9770ac22
commit
637e56c4ad
@ -31,7 +31,7 @@ interface Interest extends (Owned) {
|
|||||||
|
|
||||||
struct InterestKind {
|
struct InterestKind {
|
||||||
union {
|
union {
|
||||||
Queue @0 :UInt64;
|
queue @0 :UInt64;
|
||||||
Reservation @1 :When;
|
reservation @1 :When;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,17 +10,17 @@ using import "state.capnp".Update;
|
|||||||
using import "measure.capnp".Measurement;
|
using import "measure.capnp".Measurement;
|
||||||
|
|
||||||
interface Notifiable {
|
interface Notifiable {
|
||||||
state @0 () -> ( state :Map(OID, AnyPointer) );
|
state @0 () -> Map(OID, AnyPointer);
|
||||||
# Returns the current state of a resource.
|
# Returns the current state of a resource.
|
||||||
|
|
||||||
getStateOid @4 ( oid :OID ) -> AnyPointer;
|
getStateOid @4 ( oid :OID ) -> ( state :AnyPointer );
|
||||||
# Return only the state of the trait with the given OID
|
# Return only the state of the trait with the given OID
|
||||||
|
|
||||||
subscribe @1 ( subscriber :Subscriber(Update) ) -> ( subscription :Subscription );
|
subscribe @1 ( subscriber :Subscriber(Update) ) -> ( subscription :Subscription );
|
||||||
# Subscribe to state updates. The passed in `subscriber` is an interface implemented on the
|
# Subscribe to state updates. The passed in `subscriber` is an interface implemented on the
|
||||||
# client side that a server calls to send update notifications.
|
# client side that a server calls to send update notifications.
|
||||||
|
|
||||||
measurements @2 () -> ( measurements :Map(OID, AnyPointer) );
|
measurements @2 () -> Map(OID, AnyPointer);
|
||||||
|
|
||||||
subscribeMeasurements @3 ( subscriber :Subscriber(Measurement) ) -> ( subscription: Subscription );
|
subscribeMeasurements @3 ( subscriber :Subscriber(Measurement) ) -> ( subscription: Subscription );
|
||||||
}
|
}
|
||||||
|
@ -56,9 +56,9 @@ struct InterestView {
|
|||||||
struct LockView {
|
struct LockView {
|
||||||
isLocked @0 :Bool;
|
isLocked @0 :Bool;
|
||||||
|
|
||||||
lock @0 :Lock;
|
lock @1 :Lock;
|
||||||
# NULL if caller lacks impersonate permission.
|
# NULL if caller lacks impersonate permission.
|
||||||
|
|
||||||
lockReason @1 :L10NString;
|
lockReason @2 :L10NString;
|
||||||
# Only set if resource is locked *and* a lock reason was set.
|
# Only set if resource is locked *and* a lock reason was set.
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user