| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539 |
- /* 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);
- }
|