/* libsignon-glib.vapi generated by vapigen, do not modify. */

[CCode (cprefix = "Signon", gir_namespace = "Signon", gir_version = "2.0", lower_case_cprefix = "signon_")]
namespace Signon {
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", type_id = "signon_auth_service_get_type ()")]
	public class AuthService : GLib.Object {
		[CCode (has_construct_function = false)]
		public AuthService ();
		[CCode (array_length = false, array_null_terminated = true)]
		[Version (since = "2.0")]
		public async string[] get_mechanisms (string method, GLib.Cancellable? cancellable) throws GLib.Error;
		[CCode (array_length = false, array_null_terminated = true)]
		[Version (since = "2.0")]
		public string[] get_mechanisms_sync (string method, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[CCode (array_length = false, array_null_terminated = true)]
		[Version (since = "2.0")]
		public async string[] get_methods (GLib.Cancellable? cancellable) throws GLib.Error;
		[CCode (array_length = false, array_null_terminated = true)]
		[Version (since = "2.0")]
		public string[] get_methods_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
	}
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", type_id = "signon_auth_session_get_type ()")]
	public class AuthSession : GLib.Object {
		[CCode (has_construct_function = false)]
		public AuthSession (int id, string method_name) throws GLib.Error;
		public void cancel ();
		public unowned string get_method ();
		[Version (since = "1.8")]
		public async GLib.Variant process (GLib.Variant session_data, string mechanism, GLib.Cancellable? cancellable) throws GLib.Error;
		public signal void state_changed (int state, string message);
	}
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", type_id = "signon_identity_get_type ()")]
	public class Identity : GLib.Object {
		[CCode (has_construct_function = false)]
		public Identity ();
		public Signon.AuthSession create_session (string method) throws GLib.Error;
		[CCode (has_construct_function = false)]
		public Identity.from_db (uint32 id);
		[Version (since = "2.0")]
		public uint32 get_id ();
		public unowned GLib.Error get_last_error ();
		[Version (since = "2.0")]
		public async Signon.IdentityInfo query_info (GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "2.0")]
		public async bool remove (GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "2.0")]
		public async bool sign_out (GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "2.0")]
		public async bool store_info (Signon.IdentityInfo info, GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "2.0")]
		public async bool verify_secret (string secret, GLib.Cancellable? cancellable) throws GLib.Error;
		public uint id { get; construct; }
		public signal void signed_out ();
	}
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "signon_identity_info_get_type ()")]
	[Compact]
	public class IdentityInfo {
		[CCode (has_construct_function = false)]
		public IdentityInfo ();
		public void add_access_control (string system_context, string application_context);
		public Signon.IdentityInfo copy ();
		public void free ();
		public GLib.List<Signon.SecurityContext> get_access_control_list ();
		public unowned string get_caption ();
		public int get_id ();
		public Signon.IdentityType get_identity_type ();
		public unowned GLib.HashTable<string,string[]> get_methods ();
		[CCode (array_length = false, array_null_terminated = true)]
		public unowned string[] get_realms ();
		public bool get_storing_secret ();
		public unowned string get_username ();
		public void remove_method (string method);
		public void set_access_control_list (GLib.List<Signon.SecurityContext> access_control_list);
		public void set_caption (string caption);
		public void set_identity_type (Signon.IdentityType type);
		public void set_method (string method, [CCode (array_length = false, array_null_terminated = true)] string[] mechanisms);
		public void set_realms ([CCode (array_length = false, array_null_terminated = true)] string[] realms);
		public void set_secret (string secret, bool store_secret);
		public void set_username (string username);
	}
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "signon_security_context_get_type ()")]
	[Compact]
	public class SecurityContext {
		[CCode (has_construct_function = false)]
		public SecurityContext ();
		public Signon.SecurityContext copy ();
		public void free ();
		[CCode (has_construct_function = false)]
		public SecurityContext.from_values (string system_context, string application_context);
		public unowned string get_application_context ();
		public unowned string get_system_context ();
		public void set_application_context (string application_context);
		public void set_system_context (string system_context);
	}
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cprefix = "SIGNON_IDENTITY_TYPE_", type_id = "signon_identity_type_get_type ()")]
	[Flags]
	public enum IdentityType {
		OTHER,
		APP,
		WEB,
		NETWORK
	}
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cprefix = "SIGNON_POLICY_", type_id = "signon_session_data_ui_policy_get_type ()")]
	public enum SessionDataUiPolicy {
		DEFAULT,
		REQUEST_PASSWORD,
		NO_USER_INTERACTION,
		VALIDATION
	}
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cprefix = "SIGNON_ERROR_")]
	public errordomain Error {
		UNKNOWN,
		INTERNAL_SERVER,
		INTERNAL_COMMUNICATION,
		PERMISSION_DENIED,
		METHOD_NOT_KNOWN,
		SERVICE_NOT_AVAILABLE,
		INVALID_QUERY,
		METHOD_NOT_AVAILABLE,
		IDENTITY_NOT_FOUND,
		STORE_FAILED,
		REMOVE_FAILED,
		SIGNOUT_FAILED,
		IDENTITY_OPERATION_CANCELED,
		CREDENTIALS_NOT_AVAILABLE,
		REFERENCE_NOT_FOUND,
		MECHANISM_NOT_AVAILABLE,
		MISSING_DATA,
		INVALID_CREDENTIALS,
		NOT_AUTHORIZED,
		WRONG_STATE,
		OPERATION_NOT_SUPPORTED,
		NO_CONNECTION,
		NETWORK,
		SSL,
		RUNTIME,
		SESSION_CANCELED,
		TIMED_OUT,
		USER_INTERACTION,
		OPERATION_FAILED,
		ENCRYPTION_FAILED,
		TOS_NOT_ACCEPTED,
		FORGOT_PASSWORD,
		METHOD_OR_MECHANISM_NOT_ALLOWED,
		INCORRECT_DATE,
		USER_ERROR;
		public static GLib.Quark quark ();
	}
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cname = "SIGNON_SESSION_DATA_CAPTION")]
	public const string SESSION_DATA_CAPTION;
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cname = "SIGNON_SESSION_DATA_PROXY")]
	public const string SESSION_DATA_PROXY;
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cname = "SIGNON_SESSION_DATA_REALM")]
	public const string SESSION_DATA_REALM;
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cname = "SIGNON_SESSION_DATA_RENEW_TOKEN")]
	public const string SESSION_DATA_RENEW_TOKEN;
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cname = "SIGNON_SESSION_DATA_SECRET")]
	public const string SESSION_DATA_SECRET;
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cname = "SIGNON_SESSION_DATA_TIMEOUT")]
	public const string SESSION_DATA_TIMEOUT;
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cname = "SIGNON_SESSION_DATA_UI_POLICY")]
	public const string SESSION_DATA_UI_POLICY;
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cname = "SIGNON_SESSION_DATA_USERNAME")]
	public const string SESSION_DATA_USERNAME;
	[CCode (cheader_filename = "libsignon-glib/signon-glib.h", cname = "SIGNON_SESSION_DATA_WINDOW_ID")]
	public const string SESSION_DATA_WINDOW_ID;
}
