1 /* polkit-gobject-1.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Polkit", gir_namespace = "Polkit", gir_version = "1.0", lower_case_cprefix = "polkit_")]
5 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_action_description_get_type ()")]
6 public class ActionDescription : GLib.Object {
7 [CCode (has_construct_function = false)]
8 protected ActionDescription ();
9 public unowned string get_action_id ();
10 public unowned string? get_annotation (string key);
11 [CCode (array_length = false, array_null_terminated = true)]
12 public unowned string[] get_annotation_keys ();
13 public unowned string get_description ();
14 public unowned string get_icon_name ();
15 public Polkit.ImplicitAuthorization get_implicit_active ();
16 public Polkit.ImplicitAuthorization get_implicit_any ();
17 public Polkit.ImplicitAuthorization get_implicit_inactive ();
18 public unowned string get_message ();
19 public unowned string get_vendor_name ();
20 public unowned string get_vendor_url ();
22 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_authority_get_type ()")]
23 public class Authority : GLib.Object, GLib.AsyncInitable, GLib.Initable {
24 [CCode (has_construct_function = false)]
25 protected Authority ();
26 public async bool authentication_agent_response (string cookie, Polkit.Identity identity, GLib.Cancellable? cancellable = null) throws GLib.Error;
27 public bool authentication_agent_response_sync (string cookie, Polkit.Identity identity, GLib.Cancellable? cancellable = null) throws GLib.Error;
28 public async Polkit.AuthorizationResult check_authorization (Polkit.Subject subject, string action_id, Polkit.Details? details, Polkit.CheckAuthorizationFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
29 public Polkit.AuthorizationResult check_authorization_sync (Polkit.Subject subject, string action_id, Polkit.Details? details, Polkit.CheckAuthorizationFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
30 public async GLib.List<Polkit.ActionDescription> enumerate_actions (GLib.Cancellable? cancellable = null) throws GLib.Error;
31 public GLib.List<Polkit.ActionDescription> enumerate_actions_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
32 public async GLib.List<Polkit.TemporaryAuthorization> enumerate_temporary_authorizations (Polkit.Subject subject, GLib.Cancellable? cancellable = null) throws GLib.Error;
33 public GLib.List<Polkit.TemporaryAuthorization> enumerate_temporary_authorizations_sync (Polkit.Subject subject, GLib.Cancellable? cancellable = null) throws GLib.Error;
34 public static Polkit.Authority @get ();
35 public static async Polkit.Authority get_async (GLib.Cancellable? cancellable = null) throws GLib.Error;
36 public Polkit.AuthorityFeatures get_backend_features ();
37 public unowned string get_backend_name ();
38 public unowned string get_backend_version ();
39 public string? get_owner ();
40 public static Polkit.Authority get_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
41 public async bool register_authentication_agent (Polkit.Subject subject, string locale, string object_path, GLib.Cancellable? cancellable = null) throws GLib.Error;
42 public bool register_authentication_agent_sync (Polkit.Subject subject, string locale, string object_path, GLib.Cancellable? cancellable = null) throws GLib.Error;
43 public async bool register_authentication_agent_with_options (Polkit.Subject subject, string locale, string object_path, GLib.Variant? options, GLib.Cancellable? cancellable = null) throws GLib.Error;
44 public bool register_authentication_agent_with_options_sync (Polkit.Subject subject, string locale, string object_path, GLib.Variant? options, GLib.Cancellable? cancellable = null) throws GLib.Error;
45 public async bool revoke_temporary_authorization_by_id (string id, GLib.Cancellable? cancellable = null) throws GLib.Error;
46 public bool revoke_temporary_authorization_by_id_sync (string id, GLib.Cancellable? cancellable = null) throws GLib.Error;
47 public async bool revoke_temporary_authorizations (Polkit.Subject subject, GLib.Cancellable? cancellable = null) throws GLib.Error;
48 public bool revoke_temporary_authorizations_sync (Polkit.Subject subject, GLib.Cancellable? cancellable = null) throws GLib.Error;
49 public async bool unregister_authentication_agent (Polkit.Subject subject, string object_path, GLib.Cancellable? cancellable = null) throws GLib.Error;
50 public bool unregister_authentication_agent_sync (Polkit.Subject subject, string object_path, GLib.Cancellable? cancellable = null) throws GLib.Error;
51 public Polkit.AuthorityFeatures backend_features { get; }
52 public string backend_name { get; }
53 public string backend_version { get; }
54 public string owner { owned get; }
55 public signal void changed ();
57 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_authorization_result_get_type ()")]
58 public class AuthorizationResult : GLib.Object {
59 [CCode (has_construct_function = false)]
60 public AuthorizationResult (bool is_authorized, bool is_challenge, Polkit.Details? details);
61 public unowned Polkit.Details? get_details ();
62 [Version (since = "0.101")]
63 public bool get_dismissed ();
64 public bool get_is_authorized ();
65 public bool get_is_challenge ();
66 public bool get_retains_authorization ();
67 public unowned string? get_temporary_authorization_id ();
69 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_details_get_type ()")]
70 public class Details : GLib.Object {
71 [CCode (has_construct_function = false)]
73 [CCode (array_length = false, array_null_terminated = true)]
74 public string[]? get_keys ();
75 public void insert (string key, string? value);
76 public unowned string? lookup (string key);
78 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_permission_get_type ()")]
79 public class Permission : GLib.Permission, GLib.AsyncInitable, GLib.Initable {
80 [CCode (cname = "polkit_permission_new", has_construct_function = false)]
81 public async Permission (string action_id, Polkit.Subject? subject, GLib.Cancellable? cancellable = null) throws GLib.Error;
82 public unowned string get_action_id ();
83 public unowned Polkit.Subject get_subject ();
84 [CCode (has_construct_function = false, type = "GPermission*")]
85 public Permission.sync (string action_id, Polkit.Subject? subject, GLib.Cancellable? cancellable = null) throws GLib.Error;
86 public string action_id { get; construct; }
87 public Polkit.Subject subject { get; construct; }
89 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_system_bus_name_get_type ()")]
90 public class SystemBusName : GLib.Object, Polkit.Subject {
91 [CCode (has_construct_function = false, type = "PolkitSubject*")]
92 public SystemBusName (string name);
93 public unowned string get_name ();
94 public Polkit.Subject? get_process_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
95 public Polkit.UnixUser? get_user_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
96 public void set_name (string name);
97 public string name { get; set construct; }
99 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_temporary_authorization_get_type ()")]
100 public class TemporaryAuthorization : GLib.Object {
101 [CCode (has_construct_function = false)]
102 protected TemporaryAuthorization ();
103 public unowned string get_action_id ();
104 public unowned string get_id ();
105 public Polkit.Subject get_subject ();
106 public uint64 get_time_expires ();
107 public uint64 get_time_obtained ();
109 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_unix_group_get_type ()")]
110 public class UnixGroup : GLib.Object, Polkit.Identity {
111 [CCode (has_construct_function = false, type = "PolkitIdentity*")]
112 public UnixGroup (int gid);
113 [CCode (has_construct_function = false, type = "PolkitIdentity*")]
114 public UnixGroup.for_name (string name) throws GLib.Error;
115 public int get_gid ();
116 public void set_gid (int gid);
117 public int gid { get; set construct; }
119 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_unix_netgroup_get_type ()")]
120 public class UnixNetgroup : GLib.Object, Polkit.Identity {
121 [CCode (has_construct_function = false, type = "PolkitIdentity*")]
122 public UnixNetgroup (string name);
123 public unowned string get_name ();
124 public void set_name (string name);
125 public string name { get; set construct; }
127 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_unix_process_get_type ()")]
128 public class UnixProcess : GLib.Object, Polkit.Subject {
129 [CCode (has_construct_function = false, type = "PolkitSubject*")]
130 public UnixProcess (int pid);
131 [CCode (has_construct_function = false, type = "PolkitSubject*")]
132 public UnixProcess.for_owner (int pid, uint64 start_time, int uid);
133 [CCode (has_construct_function = false, type = "PolkitSubject*")]
134 public UnixProcess.full (int pid, uint64 start_time);
135 public int get_owner () throws GLib.Error;
136 public int get_pid ();
137 public uint64 get_start_time ();
138 public int get_uid ();
139 public void set_pid (int pid);
140 public void set_start_time (uint64 start_time);
141 public void set_uid (int uid);
142 public int pid { get; set construct; }
143 public uint64 start_time { get; set construct; }
144 public int uid { get; set construct; }
146 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_unix_session_get_type ()")]
147 public class UnixSession : GLib.Object, GLib.AsyncInitable, GLib.Initable, Polkit.Subject {
148 [CCode (has_construct_function = false, type = "PolkitSubject*")]
149 public UnixSession (string session_id);
150 [CCode (has_construct_function = false, type = "void")]
151 public async UnixSession.for_process (int pid, GLib.Cancellable? cancellable = null) throws GLib.Error;
152 [CCode (has_construct_function = false, type = "PolkitSubject*")]
153 public UnixSession.for_process_sync (int pid, GLib.Cancellable? cancellable = null) throws GLib.Error;
154 public unowned string get_session_id ();
155 public void set_session_id (string session_id);
157 public int pid { construct; }
158 public string session_id { get; set construct; }
160 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_unix_user_get_type ()")]
161 public class UnixUser : GLib.Object, Polkit.Identity {
162 [CCode (has_construct_function = false, type = "PolkitIdentity*")]
163 public UnixUser (int uid);
164 [CCode (has_construct_function = false, type = "PolkitIdentity*")]
165 public UnixUser.for_name (string name) throws GLib.Error;
166 public unowned string? get_name ();
167 public int get_uid ();
168 public void set_uid (int uid);
169 public int uid { get; set construct; }
171 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_identity_get_type ()")]
172 public interface Identity : GLib.Object {
173 public abstract bool equal (Polkit.Identity b);
174 public static Polkit.Identity? from_string (string str) throws GLib.Error;
175 public abstract uint hash ();
176 public abstract string to_string ();
178 [CCode (cheader_filename = "polkit/polkit.h", type_id = "polkit_subject_get_type ()")]
179 public interface Subject : GLib.Object {
180 public abstract bool equal (Polkit.Subject b);
181 public abstract async bool exists (GLib.Cancellable? cancellable = null) throws GLib.Error;
182 public abstract bool exists_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
183 public static Polkit.Subject from_string (string str) throws GLib.Error;
184 public abstract uint hash ();
185 public abstract string to_string ();
187 [CCode (cheader_filename = "polkit/polkit.h", cprefix = "POLKIT_AUTHORITY_FEATURES_", type_id = "polkit_authority_features_get_type ()")]
189 public enum AuthorityFeatures {
191 TEMPORARY_AUTHORIZATION
193 [CCode (cheader_filename = "polkit/polkit.h", cprefix = "POLKIT_CHECK_AUTHORIZATION_FLAGS_", type_id = "polkit_check_authorization_flags_get_type ()")]
195 public enum CheckAuthorizationFlags {
197 ALLOW_USER_INTERACTION
199 [CCode (cheader_filename = "polkit/polkit.h", cprefix = "POLKIT_IMPLICIT_AUTHORIZATION_", type_id = "polkit_implicit_authorization_get_type ()")]
200 public enum ImplicitAuthorization {
203 AUTHENTICATION_REQUIRED,
204 ADMINISTRATOR_AUTHENTICATION_REQUIRED,
205 AUTHENTICATION_REQUIRED_RETAINED,
206 ADMINISTRATOR_AUTHENTICATION_REQUIRED_RETAINED,
208 public static bool from_string (string string, Polkit.ImplicitAuthorization out_implicit_authorization);
209 public unowned string to_string ();
211 [CCode (cheader_filename = "polkit/polkit.h", cprefix = "POLKIT_ERROR_")]
212 public errordomain Error {
217 public static GLib.Quark quark ();
219 [CCode (cheader_filename = "polkit/polkit.h")]
220 public static Polkit.Identity? identity_from_string (string str) throws GLib.Error;
221 [CCode (cheader_filename = "polkit/polkit.h")]
222 public static Polkit.Subject subject_from_string (string str) throws GLib.Error;