diff options
author | David Zeuthen <davidz@redhat.com> | 2009-07-20 18:49:25 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2009-07-20 18:49:25 -0400 |
commit | 36fc7a6d358c1d373c181191da6265a538a71dae (patch) | |
tree | 166630eadb8a659fb9ea988f93d3ff7120d8dd64 /src/polkitbackend/polkitbackendauthority.h | |
parent | ae8ea087928b7a1bc34b2380872da8867563bec1 (diff) |
Add support for querying and revoking temporary authorizations
Also change how authentication agents are registered (take a Subject
instead of the session-id) and add convenience functions to
asynchronously construct a PolkitUnixSession object given a process id
(by querying ConsoleKit).
Diffstat (limited to 'src/polkitbackend/polkitbackendauthority.h')
-rw-r--r-- | src/polkitbackend/polkitbackendauthority.h | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/src/polkitbackend/polkitbackendauthority.h b/src/polkitbackend/polkitbackendauthority.h index 679ae4c..ca784ef 100644 --- a/src/polkitbackend/polkitbackendauthority.h +++ b/src/polkitbackend/polkitbackendauthority.h @@ -86,6 +86,14 @@ struct _PolkitBackendAuthority * doesn't support the operation. See * polkit_backend_authority_authentication_agent_response() for * details. + * @enumerate_temporary_authorizations: Called to enumerate temporary + * authorizations or %NULL if the backend doesn't support the operation. + * See polkit_backend_authority_enumerate_temporary_authorizations() + * for details. + * @revoke_temporary_authorizations: Called to revoke temporary + * authorizations or %NULL if the backend doesn't support the operation. + * See polkit_backend_authority_revoke_temporary_authorizations() + * for details. * @system_bus_name_owner_changed: temporary VFunc, to be removed before 1.0. * * VFuncs that authority backends need to implement. @@ -121,14 +129,14 @@ struct _PolkitBackendAuthorityClass gboolean (*register_authentication_agent) (PolkitBackendAuthority *authority, PolkitSubject *caller, - const gchar *session_id, + PolkitSubject *subject, const gchar *locale, const gchar *object_path, GError **error); gboolean (*unregister_authentication_agent) (PolkitBackendAuthority *authority, PolkitSubject *caller, - const gchar *session_id, + PolkitSubject *subject, const gchar *object_path, GError **error); @@ -138,6 +146,16 @@ struct _PolkitBackendAuthorityClass PolkitIdentity *identity, GError **error); + GList *(*enumerate_temporary_authorizations) (PolkitBackendAuthority *authority, + PolkitSubject *caller, + PolkitSubject *subject, + GError **error); + + gboolean (*revoke_temporary_authorizations) (PolkitBackendAuthority *authority, + PolkitSubject *caller, + PolkitSubject *subject, + GError **error); + /* TODO: need something more efficient such that we don't watch all name changes */ void (*system_bus_name_owner_changed) (PolkitBackendAuthority *authority, const gchar *name, @@ -210,14 +228,14 @@ PolkitAuthorizationResult *polkit_backend_authority_check_authorization_finish ( gboolean polkit_backend_authority_register_authentication_agent (PolkitBackendAuthority *authority, PolkitSubject *caller, - const gchar *session_id, + PolkitSubject *subject, const gchar *locale, const gchar *object_path, GError **error); gboolean polkit_backend_authority_unregister_authentication_agent (PolkitBackendAuthority *authority, PolkitSubject *caller, - const gchar *session_id, + PolkitSubject *subject, const gchar *object_path, GError **error); @@ -227,6 +245,16 @@ gboolean polkit_backend_authority_authentication_agent_response (PolkitBackendAu PolkitIdentity *identity, GError **error); +GList *polkit_backend_authority_enumerate_temporary_authorizations (PolkitBackendAuthority *authority, + PolkitSubject *caller, + PolkitSubject *subject, + GError **error); + +gboolean polkit_backend_authority_revoke_temporary_authorizations (PolkitBackendAuthority *authority, + PolkitSubject *caller, + PolkitSubject *subject, + GError **error); + /* --- */ PolkitBackendAuthority *polkit_backend_authority_get (void); |