| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- /* inversion-0.1.vapi generated by valac 0.56.19, do not modify. */
- [CCode (gir_namespace = "inversion", gir_version = "0.1")]
- namespace Inversion {
- [CCode (cheader_filename = "inversion-0.1.h")]
- public class Container : GLib.Object {
- public Container ();
- public T configure_with<T> () throws GLib.Error;
- public Inversion.Scope create_scope ();
- public Inversion.Scope create_transient_scope ();
- public Invercargill.Enumerable<Inversion.Registration> get_all_registrations ();
- public Inversion.Registration get_registration (GLib.Type service_type) throws Inversion.ContainerError;
- public Invercargill.Enumerable<Inversion.Registration> get_registrations (GLib.Type service_type);
- public void initialise () throws GLib.Error;
- public bool is_registered (GLib.Type type);
- public Inversion.Registration register<T> (owned Inversion.TypedFactoryDelegate<T>? factory_func, Inversion.Lifecycle lifecycle);
- public Inversion.Registration register_factory<T> (Inversion.Factory factory, Inversion.Lifecycle lifecycle);
- public Inversion.Registration register_factory_type (GLib.Type implementation_type, Inversion.Factory factory, Inversion.Lifecycle lifecycle);
- public Inversion.Registration register_module<T> (owned Inversion.TypedFactoryDelegate<T>? factory_func = null) throws GLib.Error;
- public Inversion.Registration register_module_factory_type (GLib.Type type, Inversion.Factory factory) throws GLib.Error;
- public Inversion.Registration register_module_type (GLib.Type type, owned Inversion.FactoryDelegate? factory_func = null) throws GLib.Error;
- public Inversion.Registration register_scoped<T> (owned Inversion.TypedFactoryDelegate<T>? factory_func = null);
- public Inversion.Registration register_singleton<T> (owned Inversion.TypedFactoryDelegate<T>? factory_func = null);
- public Inversion.Registration register_startup<T> (owned Inversion.TypedFactoryDelegate<T>? factory_func = null);
- public Inversion.Registration register_transient<T> (owned Inversion.TypedFactoryDelegate<T>? factory_func = null);
- public Inversion.Registration register_type (GLib.Type implementation_type, owned Inversion.FactoryDelegate? factory_func, Inversion.Lifecycle lifecycle);
- }
- [CCode (cheader_filename = "inversion-0.1.h")]
- public class DelegateFactory : GLib.Object, Inversion.Factory {
- public DelegateFactory (owned Inversion.FactoryDelegate @delegate);
- public static Inversion.DelegateFactory typed<T> (owned Inversion.TypedFactoryDelegate<T> @delegate);
- }
- [CCode (cheader_filename = "inversion-0.1.h")]
- public class InjectionContext {
- public InjectionContext (Inversion.Scope scope, GLib.Type requested_type, Inversion.Registration registration, Inversion.InjectionContext? previous = null);
- public GLib.Error? error { get; set; }
- public Inversion.InjectionContext? previous_context { get; set; }
- public Inversion.Registration registration { get; set; }
- public GLib.Type requested_type { get; set; }
- public Inversion.Scope scope { get; set; }
- public Invercargill.DataStructures.HashSet<Inversion.Registration> stack_registrations { get; set; }
- }
- [CCode (cheader_filename = "inversion-0.1.h")]
- public class InstanceFactory : GLib.Object, Inversion.Factory {
- public InstanceFactory (Inversion.Registration registration, GLib.Object instance);
- public Inversion.Registration registration { get; set construct; }
- }
- [CCode (cheader_filename = "inversion-0.1.h")]
- public class ObjectFactory : GLib.Object, Inversion.Factory {
- public ObjectFactory (GLib.Type instance_type);
- public GLib.Type instance_type { get; construct; }
- }
- [CCode (cheader_filename = "inversion-0.1.h")]
- public class Registration : GLib.Object {
- public Registration (GLib.Type implementation_type, Inversion.Factory factory, Inversion.Lifecycle lifecycle);
- public Inversion.Registration @as<T> ();
- public Inversion.Registration as_type (GLib.Type type);
- public Invercargill.Enumerable<T> get_metadata<T> ();
- public Invercargill.Enumerable<GLib.Object> get_metadata_type (GLib.Type type);
- public bool provides (GLib.Type type);
- public Inversion.Registration with_metadata<T> (T metadata);
- public Inversion.Registration with_metadata_type (GLib.Type type, GLib.Object metadata);
- public Inversion.Factory factory { get; set construct; }
- public GLib.Type implementation_type { get; set construct; }
- public Inversion.Lifecycle lifecycle { get; set construct; }
- public Invercargill.ImmutableLot<GLib.Type> type_aliases { get; private set; }
- public signal void alias_added (GLib.Type alias);
- }
- [CCode (cheader_filename = "inversion-0.1.h")]
- public class Scope : GLib.Object {
- public Invercargill.Enumerable<Inversion.Registration> get_all_registrations ();
- public Invercargill.Enumerable<Inversion.Registration> get_local_registrations (GLib.Type service_type);
- public Inversion.Registration get_registration (GLib.Type service_type) throws Inversion.ContainerError;
- public Invercargill.Enumerable<Inversion.Registration> get_registrations (GLib.Type service_type);
- public bool is_locally_registered (GLib.Type type);
- public bool is_registered (GLib.Type type);
- public Inversion.Registration register_local<T> (owned Inversion.TypedFactoryDelegate<T>? factory_func = null, Inversion.Lifecycle lifecycle = Lifecycle.SCOPED);
- public Inversion.Registration register_local_factory<T> (Inversion.Factory factory, Inversion.Lifecycle lifecycle);
- public Inversion.Registration register_local_factory_type (GLib.Type implementation_type, Inversion.Factory factory, Inversion.Lifecycle lifecycle);
- public Inversion.Registration register_local_scoped<T> (owned Inversion.TypedFactoryDelegate<T>? factory_func = null);
- public Inversion.Registration register_local_transient<T> (owned Inversion.TypedFactoryDelegate<T>? factory_func = null);
- public Inversion.Registration register_local_type (GLib.Type implementation_type, owned Inversion.FactoryDelegate? factory_func, Inversion.Lifecycle lifecycle);
- public void release ();
- public T resolve<T> () throws GLib.Error;
- public Invercargill.Enumerable<T> resolve_all<T> () throws GLib.Error;
- public Invercargill.Enumerable<GLib.Object> resolve_all_type (GLib.Type type) throws GLib.Error;
- public GLib.Object resolve_registration (Inversion.Registration registration) throws GLib.Error;
- public GLib.Object resolve_type (GLib.Type type) throws GLib.Error;
- public Inversion.Container container { get; set construct; }
- public Inversion.Lifecycle scope_lifecycle { get; set construct; }
- }
- [CCode (cheader_filename = "inversion-0.1.h")]
- public interface Factory : GLib.Object {
- public abstract GLib.Object create (Inversion.Scope scope) throws GLib.Error;
- }
- [CCode (cheader_filename = "inversion-0.1.h")]
- public interface Module : GLib.Object {
- public abstract void register_components (Inversion.Container container) throws GLib.Error;
- }
- [CCode (cheader_filename = "inversion-0.1.h")]
- public enum Lifecycle {
- TRANSIENT,
- SCOPED,
- SINGLETON,
- STARTUP
- }
- [CCode (cheader_filename = "inversion-0.1.h")]
- public errordomain ContainerError {
- NOT_REGISTERED,
- CYCLE_DETECTED,
- ILLEGAL_LIFECYCLE_COMBINATION,
- INCOMPATIBLE_TYPE
- }
- [CCode (cheader_filename = "inversion-0.1.h")]
- public delegate GLib.Object FactoryDelegate (Inversion.Scope scope) throws GLib.Error;
- [CCode (cheader_filename = "inversion-0.1.h")]
- public delegate T TypedFactoryDelegate<T> (Inversion.Scope scope) throws GLib.Error;
- [CCode (cheader_filename = "inversion-0.1.h")]
- public static GLib.Object create_with_injection_context (Inversion.Scope scope, GLib.Type requested_type, Inversion.Registration registration) throws GLib.Error;
- [CCode (cheader_filename = "inversion-0.1.h")]
- public static Inversion.InjectionContext enter_new_injection_context (Inversion.Scope scope, GLib.Type requested_type, Inversion.Registration registration) throws GLib.Error;
- [CCode (cheader_filename = "inversion-0.1.h")]
- public static void exit_injection_context () throws GLib.Error;
- [CCode (cheader_filename = "inversion-0.1.h")]
- public static Inversion.InjectionContext get_injection_context ();
- [CCode (cheader_filename = "inversion-0.1.h")]
- public static T inject<T> ();
- [CCode (cheader_filename = "inversion-0.1.h")]
- public static Invercargill.Lot<T> inject_all<T> ();
- [CCode (cheader_filename = "inversion-0.1.h")]
- public static Inversion.InjectionContext? try_get_injection_context ();
- [CCode (cheader_filename = "inversion-0.1.h")]
- public static T try_inject<T> ();
- [CCode (cheader_filename = "inversion-0.1.h")]
- public static Invercargill.Lot<T> try_inject_all<T> ();
- }
|