|
|
@@ -0,0 +1,539 @@
|
|
|
+/* statum-0.1.vapi generated by valac 0.56.19, do not modify. */
|
|
|
+
|
|
|
+[CCode (gir_namespace = "statum", gir_version = "0.1")]
|
|
|
+namespace Statum {
|
|
|
+ namespace Cryptography {
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class EncryptionProvider : GLib.Object {
|
|
|
+ public const string DEFAULT_NAMESPACE;
|
|
|
+ public EncryptionProvider ();
|
|
|
+ public string author_properties (string @namespace, Invercargill.Properties data) throws GLib.Error;
|
|
|
+ public string author_string (string @namespace, string data);
|
|
|
+ public Invercargill.Properties read_properties (string @namespace, string blob) throws GLib.Error;
|
|
|
+ public string read_string (string @namespace, string blob) throws Statum.Cryptography.EncryptionError;
|
|
|
+ public EncryptionProvider.with_keys (uint8[] signing_secret_key, uint8[] signing_public_key, uint8[] sealing_secret_key, uint8[] sealing_public_key);
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class SigningProvider : GLib.Object {
|
|
|
+ public SigningProvider ();
|
|
|
+ public Statum.Model.FrameDto author_frame (string content);
|
|
|
+ public uint8[] get_public_key ();
|
|
|
+ public string sign (string content);
|
|
|
+ public bool verify (string content, string signature_b64);
|
|
|
+ public void verify_frame (Statum.Model.FrameDto frame) throws Statum.Cryptography.SigningError;
|
|
|
+ public bool verify_with_key (string content, string signature_b64, uint8[] verification_public_key);
|
|
|
+ public SigningProvider.with_keys (uint8[] secret_key, uint8[] public_key);
|
|
|
+ public string signer_id { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public errordomain EncryptionError {
|
|
|
+ DECRYPTION_FAILED,
|
|
|
+ SIGNATURE_INVALID,
|
|
|
+ NAMESPACE_MISMATCH
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public errordomain SigningError {
|
|
|
+ INVALID_SIGNATURE
|
|
|
+ }
|
|
|
+ }
|
|
|
+ namespace Model {
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class ActionDto : GLib.Object {
|
|
|
+ public ActionDto ();
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.ActionDto> get_mapper ();
|
|
|
+ public InvercargillJson.JsonElement to_element () throws GLib.Error;
|
|
|
+ public string method { get; set; }
|
|
|
+ public string? @private { get; set; }
|
|
|
+ public string uri { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class ClearDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public ClearDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.ClearDirectiveDto> get_mapper ();
|
|
|
+ public ClearDirectiveDto.with_key (string key);
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public string key { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public abstract class DirectiveDto : GLib.Object {
|
|
|
+ protected DirectiveDto ();
|
|
|
+ protected abstract Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.DataStructures.Series<Statum.Model.DirectiveDto> deserialize_array (InvercargillJson.JsonElement element) throws GLib.Error;
|
|
|
+ public static Statum.Model.DirectiveDto from_json (InvercargillJson.JsonObject json) throws GLib.Error;
|
|
|
+ public static InvercargillJson.JsonElement serialize_array (Invercargill.Lot<Statum.Model.DirectiveDto> directives) throws GLib.Error;
|
|
|
+ public InvercargillJson.JsonElement to_json () throws GLib.Error;
|
|
|
+ public InvercargillJson.JsonObject to_json_object () throws GLib.Error;
|
|
|
+ public abstract string discriminator { get; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class ErrorDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public ErrorDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.ErrorDirectiveDto> get_mapper ();
|
|
|
+ public string? code { get; set; }
|
|
|
+ public Invercargill.Properties? data { get; set; }
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public string? message { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class FormResetDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public FormResetDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.FormResetDirectiveDto> get_mapper ();
|
|
|
+ public FormResetDirectiveDto.with_form (string form);
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public string form { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class FormSubmitDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public FormSubmitDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.FormSubmitDirectiveDto> get_mapper ();
|
|
|
+ public FormSubmitDirectiveDto.with_form (string form, string? action = null, string? method = null);
|
|
|
+ public string? action { get; set; }
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public string form { get; set; }
|
|
|
+ public string? method { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class FrameDto : GLib.Object {
|
|
|
+ public FrameDto ();
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.FrameDto> get_mapper ();
|
|
|
+ public string content { get; set; }
|
|
|
+ public string signature { get; set; }
|
|
|
+ public string signer { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class InvalidateDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public InvalidateDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.InvalidateDirectiveDto> get_mapper ();
|
|
|
+ public InvalidateDirectiveDto.with_signature (string signature);
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public string signature { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class NavigateDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public NavigateDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.NavigateDirectiveDto> get_mapper ();
|
|
|
+ public NavigateDirectiveDto.with_uri (string uri);
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public string uri { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class NotifyDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public NotifyDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.NotifyDirectiveDto> get_mapper ();
|
|
|
+ public NotifyDirectiveDto.@with (string kind, string message);
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public string kind { get; set; }
|
|
|
+ public string message { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class PostDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public PostDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.PostDirectiveDto> get_mapper ();
|
|
|
+ public PostDirectiveDto.@with (string uri, Invercargill.Properties data);
|
|
|
+ public Invercargill.Properties data { get; set; }
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public string uri { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class SetDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public SetDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.SetDirectiveDto> get_mapper ();
|
|
|
+ public SetDirectiveDto.with_frame (Statum.Model.FrameDto snapshot_frame);
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public Statum.Model.FrameDto snapshot_frame { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class SlotDto : GLib.Object {
|
|
|
+ public SlotDto ();
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.SlotDto> get_mapper ();
|
|
|
+ public string key { get; set; }
|
|
|
+ public Statum.Scope scope { get; set; }
|
|
|
+ public string slot_type { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class SnapshotDto : GLib.Object {
|
|
|
+ public SnapshotDto ();
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.SnapshotDto> get_mapper ();
|
|
|
+ public GLib.DateTime as_at { get; set; }
|
|
|
+ public GLib.DateTime? invalid_after { get; set; }
|
|
|
+ public string? @private { get; set; }
|
|
|
+ public Invercargill.Properties @public { get; set; }
|
|
|
+ public Statum.Model.SlotDto slot { get; set; }
|
|
|
+ public GLib.DateTime? transmit_after { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class SubscribeDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public SubscribeDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.SubscribeDirectiveDto> get_mapper ();
|
|
|
+ public SubscribeDirectiveDto.with_key (string key);
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public string key { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class TransmitDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public TransmitDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.TransmitDirectiveDto> get_mapper ();
|
|
|
+ public TransmitDirectiveDto.@with (string key, bool retry);
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public string key { get; set; }
|
|
|
+ public bool retry { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class UnsubscribeDirectiveDto : Statum.Model.DirectiveDto {
|
|
|
+ public UnsubscribeDirectiveDto ();
|
|
|
+ protected override Invercargill.Properties build_field_properties () throws GLib.Error;
|
|
|
+ public static Invercargill.Mapping.PropertyMapper<Statum.Model.UnsubscribeDirectiveDto> get_mapper ();
|
|
|
+ public UnsubscribeDirectiveDto.with_key (string key);
|
|
|
+ public override string discriminator { get; }
|
|
|
+ public string key { get; set; }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class ActionEndpoint : GLib.Object, Astralis.Endpoint {
|
|
|
+ public ActionEndpoint ();
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class ActionRegistry : GLib.Object {
|
|
|
+ public ActionRegistry ();
|
|
|
+ public Statum.Model.ActionDto author<TAction> (string method = "POST");
|
|
|
+ public Statum.Model.ActionDto author_private<TAction,TPrivate> (TPrivate model, string method = "POST") throws GLib.Error;
|
|
|
+ public string guid_for<TAction> ();
|
|
|
+ public string guid_for_type (GLib.Type type);
|
|
|
+ public string namespace_for<TAction> ();
|
|
|
+ public string namespace_for_type (GLib.Type type);
|
|
|
+ public void register<TAction> ();
|
|
|
+ public void register_type (GLib.Type type);
|
|
|
+ public GLib.Type? resolve (string guid);
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class ChannelEndpoint : Astralis.SseEndpoint, Statum.ChannelService {
|
|
|
+ public ChannelEndpoint ();
|
|
|
+ public bool has_channel (string id);
|
|
|
+ public override async void new_connection (Astralis.HttpContext http_context, Astralis.RouteContext route_context, Astralis.SseStream stream);
|
|
|
+ public void subscribe (string id, string key);
|
|
|
+ public void unsubscribe (string id, string key);
|
|
|
+ public override uint retry_interval { get; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class ChannelSubscriptionEndpoint : GLib.Object, Astralis.Endpoint {
|
|
|
+ public ChannelSubscriptionEndpoint ();
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class ClientScript : Statum.ConstantStatumResource {
|
|
|
+ public ClientScript ();
|
|
|
+ public override string get_best_encoding (Invercargill.Set<string> supported);
|
|
|
+ public override unowned uint8[] get_encoding (string encoding);
|
|
|
+ public override string content_type { get; }
|
|
|
+ public override string file_hash { get; }
|
|
|
+ public override string name { get; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class ClientWorker : Statum.ConstantStatumResource {
|
|
|
+ public ClientWorker ();
|
|
|
+ public override string get_best_encoding (Invercargill.Set<string> supported);
|
|
|
+ public override unowned uint8[] get_encoding (string encoding);
|
|
|
+ public override string content_type { get; }
|
|
|
+ public override string file_hash { get; }
|
|
|
+ public override string name { get; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public abstract class ConstantStatumResource : GLib.Object, Statum.StatumResource {
|
|
|
+ protected ConstantStatumResource ();
|
|
|
+ public abstract string get_best_encoding (Invercargill.Set<string> supported);
|
|
|
+ public abstract unowned uint8[] get_encoding (string encoding);
|
|
|
+ public abstract string content_type { get; }
|
|
|
+ public abstract string file_hash { get; }
|
|
|
+ public abstract string name { get; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class DirectiveBuilder : GLib.Object {
|
|
|
+ public async Invercargill.Lot<Statum.Model.DirectiveDto> build () throws GLib.Error;
|
|
|
+ public Statum.DirectiveBuilder clear (string key);
|
|
|
+ public Statum.DirectiveBuilder error (string message, string? code = null, Invercargill.Properties? data = null);
|
|
|
+ public Statum.DirectiveBuilder form_reset (string form_id);
|
|
|
+ public Statum.DirectiveBuilder form_submit (string form_id, string? action = null, string? method = null);
|
|
|
+ public Statum.DirectiveBuilder invalidate (string signature);
|
|
|
+ public Statum.DirectiveBuilder navigate (string uri);
|
|
|
+ public Statum.DirectiveBuilder notify (string kind, string message);
|
|
|
+ public Statum.DirectiveBuilder post (string uri, Invercargill.Properties data);
|
|
|
+ public Statum.DirectiveBuilder @set (Statum.Slot slot);
|
|
|
+ public Statum.DirectiveBuilder set_frame (Statum.Model.FrameDto frame);
|
|
|
+ public Statum.DirectiveBuilder set_global (string type_name) throws GLib.Error;
|
|
|
+ public Statum.DirectiveBuilder set_private_typed<TPublic,TPrivate> (string type_name, Statum.Scope scope, TPublic pub, TPrivate priv) throws GLib.Error;
|
|
|
+ public Statum.DirectiveBuilder set_typed<TPublic> (string type_name, Statum.Scope scope, TPublic pub) throws GLib.Error;
|
|
|
+ public Statum.DirectiveBuilder subscribe (string key);
|
|
|
+ public Statum.DirectiveBuilder subscribe_global (string type_name);
|
|
|
+ public async Invercargill.Lot<Statum.Model.DirectiveDto> to_lot () throws GLib.Error;
|
|
|
+ public Statum.DirectiveBuilder transmit (string key, bool retry = false);
|
|
|
+ public Statum.DirectiveBuilder unsubscribe (string key);
|
|
|
+ public Statum.DirectiveBuilder update (string key, Statum.State state);
|
|
|
+ public Statum.DirectiveBuilder update_held<TPublic> (string type_name, owned Statum.UpdateMutator<TPublic> mutator) throws GLib.Error;
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class EntrypointEndpoint : GLib.Object, Astralis.Endpoint {
|
|
|
+ public EntrypointEndpoint ();
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class EntrypointMatch : GLib.Object {
|
|
|
+ public EntrypointMatch ();
|
|
|
+ public GLib.Type entrypoint_type { get; set; }
|
|
|
+ public Invercargill.ReadOnlyAssociative<string,string> route_params { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class EntrypointRouteTable : GLib.Object {
|
|
|
+ public EntrypointRouteTable ();
|
|
|
+ public Statum.EntrypointMatch? match (string uri);
|
|
|
+ public void register (Astralis.EndpointRoute route, GLib.Type entrypoint_type);
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class GObjectMapping : GLib.Object {
|
|
|
+ public GObjectMapping ();
|
|
|
+ public static GLib.Object from_properties (GLib.Type type, Invercargill.Properties props) throws GLib.Error;
|
|
|
+ public static T from_properties_typed<T> (GLib.Type type, Invercargill.Properties props) throws GLib.Error;
|
|
|
+ public static bool? get_bool (Invercargill.Properties props, string key);
|
|
|
+ public static double? get_double (Invercargill.Properties props, string key);
|
|
|
+ public static int? get_int (Invercargill.Properties props, string key);
|
|
|
+ public static string? get_string (Invercargill.Properties props, string key);
|
|
|
+ public static void register_mapper<T> (Invercargill.Mapping.PropertyMapper<T> mapper);
|
|
|
+ public static Invercargill.DataStructures.PropertyDictionary to_properties (GLib.Object model) throws GLib.Error;
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class HeldSlot : GLib.Object {
|
|
|
+ public HeldSlot ();
|
|
|
+ public GLib.DateTime as_at { get; set; }
|
|
|
+ public GLib.DateTime? invalid_after { get; set; }
|
|
|
+ public string key { get; set; }
|
|
|
+ public Invercargill.Properties @private { get; set; }
|
|
|
+ public Invercargill.Properties @public { get; set; }
|
|
|
+ public Statum.Scope scope { get; set; }
|
|
|
+ public GLib.DateTime? transmit_after { get; set; }
|
|
|
+ public string type_name { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class HeldSlotResolver : GLib.Object {
|
|
|
+ public HeldSlotResolver ();
|
|
|
+ public Statum.ResolvedSlots resolve (Astralis.HttpContext http_context);
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class HeldStates : GLib.Object {
|
|
|
+ public T @get<T> (string type_name);
|
|
|
+ public Invercargill.Properties? get_properties (string type_name);
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class ResolvedSlots : GLib.Object {
|
|
|
+ public ResolvedSlots ();
|
|
|
+ public Invercargill.DataStructures.Dictionary<string,Statum.HeldSlot> held { get; private set; }
|
|
|
+ public Invercargill.DataStructures.Series<string> invalid_signatures { get; private set; }
|
|
|
+ public Invercargill.DataStructures.Series<string> stale_keys { get; private set; }
|
|
|
+ public Invercargill.DataStructures.Series<string> transmit_keys { get; private set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class ResourceEndpoint : GLib.Object, Astralis.Endpoint {
|
|
|
+ public ResourceEndpoint ();
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class Slot : GLib.Object {
|
|
|
+ public Slot ();
|
|
|
+ public Statum.State current_state { get; set; }
|
|
|
+ public string id { get; set; }
|
|
|
+ public Statum.Scope scope { get; set; }
|
|
|
+ public string type_name { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class SlotPostEndpoint : GLib.Object, Astralis.Endpoint {
|
|
|
+ public SlotPostEndpoint ();
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class State : GLib.Object {
|
|
|
+ public State ();
|
|
|
+ public GLib.DateTime last_touched { get; set; }
|
|
|
+ public Invercargill.Properties private_data { get; set; }
|
|
|
+ public Invercargill.Properties public_data { get; set; }
|
|
|
+ public string type_name { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public abstract class StateModifier : GLib.Object, Statum.TopicStateModifier {
|
|
|
+ protected Statum.StateService state_service;
|
|
|
+ protected StateModifier ();
|
|
|
+ public abstract GLib.Object? derive (GLib.Object payload, GLib.Object? current, Statum.HeldStates held);
|
|
|
+ public abstract GLib.Type state_type { get; }
|
|
|
+ public string state_type_name { get; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class StateService : GLib.Object {
|
|
|
+ public const string GLOBAL_KEY_PREFIX;
|
|
|
+ public StateService ();
|
|
|
+ public void cleanup ();
|
|
|
+ public async void clear_global (string type_name);
|
|
|
+ public async void clear_slot (string key);
|
|
|
+ public Statum.Slot? get_slot (string id);
|
|
|
+ public Statum.Slot new_global_slot (string type_name, Statum.Scope slot_scope, Statum.State state);
|
|
|
+ public Statum.Slot new_slot (Statum.Scope slot_scope, Statum.State initial_state);
|
|
|
+ public bool restore_slot (Statum.Model.FrameDto frame) throws GLib.Error;
|
|
|
+ public Statum.Model.FrameDto? sign_slot (string id, bool unidirectional = false) throws GLib.Error;
|
|
|
+ public async Statum.Model.FrameDto update (string key, Statum.State state) throws GLib.Error;
|
|
|
+ public async Statum.Model.FrameDto update_global (string type_name, Statum.State state) throws GLib.Error;
|
|
|
+ public async void update_global_typed<TPublic> (string type_name, owned Statum.UpdateMutator<TPublic> mutator) throws GLib.Error;
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public abstract class StatumAction : GLib.Object, Astralis.Endpoint {
|
|
|
+ protected Statum.ActionRegistry action_registry;
|
|
|
+ protected Statum.ChannelService channel_service;
|
|
|
+ protected Statum.Cryptography.EncryptionProvider encryption_provider;
|
|
|
+ protected Statum.StatumRequest request;
|
|
|
+ protected Statum.HeldSlotResolver resolver;
|
|
|
+ protected Inversion.Scope scope;
|
|
|
+ protected Statum.StateService state_service;
|
|
|
+ protected Statum.TopicRegistry topic_registry;
|
|
|
+ public const string ACTION_PRIVATE_NAMESPACE;
|
|
|
+ protected StatumAction ();
|
|
|
+ protected Statum.DirectiveBuilder directives ();
|
|
|
+ public abstract async Statum.DirectiveBuilder handle () throws GLib.Error;
|
|
|
+ protected virtual string? private_error_code { get; }
|
|
|
+ protected virtual string private_error_message { get; }
|
|
|
+ protected virtual string private_namespace { get; }
|
|
|
+ protected virtual bool requires_valid_private { get; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class StatumConfigurator : GLib.Object {
|
|
|
+ public Statum.StateService state_service;
|
|
|
+ public Statum.TopicRegistry topic_registry;
|
|
|
+ public StatumConfigurator ();
|
|
|
+ public void action<TAction> ();
|
|
|
+ public void add_page<TPage,TEntrypoint> () throws GLib.Error;
|
|
|
+ public void add_resource<T> ();
|
|
|
+ public void add_static_page<TPage> () throws GLib.Error;
|
|
|
+ public void global<TPublic> (string type_name, TPublic initial) throws GLib.Error;
|
|
|
+ public void topic<TTopic> (string prefix);
|
|
|
+ public void topic_modifier<TModifier,TState> (string prefix);
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class StatumDirectives : GLib.Object {
|
|
|
+ public const string CONTENT_TYPE;
|
|
|
+ public StatumDirectives ();
|
|
|
+ public static Astralis.HttpResult to_result (Invercargill.Lot<Statum.Model.DirectiveDto> directives, Invercargill.Lot<string>? invalid_signatures = null, Statum.StateService? state_service = null, Invercargill.Lot<string>? stale_keys = null) throws GLib.Error;
|
|
|
+ public static Astralis.HttpResult transmit_result (Invercargill.Lot<string> transmit_keys, Invercargill.Lot<string>? invalid_signatures = null) throws GLib.Error;
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public abstract class StatumEntrypoint : GLib.Object {
|
|
|
+ protected Statum.ActionRegistry action_registry;
|
|
|
+ protected Statum.ChannelService channel_service;
|
|
|
+ protected Statum.StatumRequest request;
|
|
|
+ protected Statum.StateService state_service;
|
|
|
+ protected Statum.TopicRegistry topic_registry;
|
|
|
+ protected StatumEntrypoint ();
|
|
|
+ protected Statum.DirectiveBuilder directives ();
|
|
|
+ public abstract async Statum.DirectiveBuilder handle () throws GLib.Error;
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class StatumModule : GLib.Object, Inversion.Module {
|
|
|
+ public StatumModule ();
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public abstract class StatumPage : GLib.Object, Astralis.Endpoint {
|
|
|
+ protected StatumPage ();
|
|
|
+ public abstract string get_best_encoding (Invercargill.Set<string> supported);
|
|
|
+ public abstract unowned uint8[] get_encoding (string encoding);
|
|
|
+ public abstract string get_etag_for (string encoding);
|
|
|
+ public abstract string content_type { get; }
|
|
|
+ public abstract string route { get; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class StatumRequest : GLib.Object {
|
|
|
+ public StatumRequest ();
|
|
|
+ public TPublic held_as<TPublic> (string type_name);
|
|
|
+ public string? route (string name);
|
|
|
+ public Invercargill.Properties? action_private { get; set; }
|
|
|
+ public Astralis.FormData? form { get; set; }
|
|
|
+ public Invercargill.ReadOnlyAssociative<string,Statum.HeldSlot> held { get; set; }
|
|
|
+ public Invercargill.DataStructures.Catalogue<string,string> query { get; set; }
|
|
|
+ public Invercargill.ReadOnlyAssociative<string,string> route_params { get; set; }
|
|
|
+ public string uri { get; set; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public abstract class Topic<TPayload> : GLib.Object, Statum.TopicLoader {
|
|
|
+ protected Topic ();
|
|
|
+ public abstract async TPayload load (string topic_key) throws GLib.Error;
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public class TopicRegistry : GLib.Object {
|
|
|
+ public TopicRegistry ();
|
|
|
+ public void register_modifier<TModifier,TState> (string prefix);
|
|
|
+ public void register_topic<TTopic> (string prefix);
|
|
|
+ public void sweep ();
|
|
|
+ public async void trigger (string topic_key) throws GLib.Error;
|
|
|
+ public void watch (string topic_key, string slot_key, string slot_type, Invercargill.ReadOnlyAssociative<string,Statum.HeldSlot> request_held);
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public abstract class TypedStatumAction<TPrivate> : Statum.StatumAction {
|
|
|
+ protected TypedStatumAction ();
|
|
|
+ protected override string private_namespace { get; }
|
|
|
+ protected virtual GLib.Type private_type { get; }
|
|
|
+ protected TPrivate request_private { get; }
|
|
|
+ protected override bool requires_valid_private { get; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public interface ChannelService : GLib.Object {
|
|
|
+ public abstract async void push_clear (string key);
|
|
|
+ public abstract async void push_set (string key, string frame_json);
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public interface StatumResource : GLib.Object {
|
|
|
+ public abstract string get_best_encoding (Invercargill.Set<string> supported);
|
|
|
+ public abstract string get_etag_for (string encoding);
|
|
|
+ public abstract Astralis.HttpResult to_result (string encoding, Astralis.StatusCode status = Astralis.StatusCode.OK) throws GLib.Error;
|
|
|
+ public abstract string name { get; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public interface TopicLoader : GLib.Object {
|
|
|
+ public abstract async GLib.Object? load_payload (string topic_key) throws GLib.Error;
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public interface TopicStateModifier : GLib.Object {
|
|
|
+ public abstract async Statum.ModifierOutcome apply (GLib.Object payload, string slot_key, Statum.HeldStates held) throws GLib.Error;
|
|
|
+ public abstract GLib.Type state_type { get; }
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public enum ModifierOutcome {
|
|
|
+ UPDATED,
|
|
|
+ UNCHANGED,
|
|
|
+ CLEARED
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public enum Scope {
|
|
|
+ DEVICE,
|
|
|
+ SESSION,
|
|
|
+ FLOW,
|
|
|
+ PAGE,
|
|
|
+ TRANSIENT;
|
|
|
+ public string to_string ();
|
|
|
+ public static Statum.Scope? from_string (string value);
|
|
|
+ public static Statum.Scope parse (string value) throws GLib.Error;
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public errordomain ModelError {
|
|
|
+ INVALID_SCOPE,
|
|
|
+ UNKNOWN_DIRECTIVE
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public errordomain StateError {
|
|
|
+ SLOT_NOT_FOUND
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public errordomain StatumError {
|
|
|
+ CONFIGURATION
|
|
|
+ }
|
|
|
+ [CCode (cheader_filename = "statum-0.1.h")]
|
|
|
+ public delegate void UpdateMutator<T> (T current);
|
|
|
+}
|