Commit 7c5fa7dd authored by David Zeuthen's avatar David Zeuthen

make PolKitAuthorization a bit more future proof by adding get_type()

parent b6959892
......@@ -95,6 +95,23 @@ _polkit_authorization_get_authfile_entry (PolKitAuthorization *auth)
return auth->entry_in_auth_file;
}
/**
* polkit_authorization_get_type:
* @auth: the authorization object
*
* Determine the type of authorization.
*
* Returns: the authorization type
*
* Since: 0.7
*/
PolKitAuthorizationType
polkit_authorization_get_type (PolKitAuthorization *auth)
{
return POLKIT_AUTHORIZATION_TYPE_UID;
}
#ifdef POLKIT_AUTHDB_DEFAULT
PolKitAuthorization *
......
......@@ -61,6 +61,8 @@ polkit_bool_t polkit_authorization_validate (PolKitAuthorization *a
*
* The scope of an authorization; e.g. whether it's limited to a
* process, a session or unlimited.
*
* Since: 0.7
*/
typedef enum {
POLKIT_AUTHORIZATION_SCOPE_PROCESS_ONE_SHOT,
......@@ -69,6 +71,22 @@ typedef enum {
POLKIT_AUTHORIZATION_SCOPE_ALWAYS,
} PolKitAuthorizationScope;
/**
* PolKitAuthorizationType:
* @POLKIT_AUTHORIZATION_TYPE_UID: The authorization is for a UNIX user
*
* The type of authorization; e.g. whether it applies to a user,
* group, security context and so on (right now only users are
* supported).
*
* Since: 0.7
*/
typedef enum {
POLKIT_AUTHORIZATION_TYPE_UID,
} PolKitAuthorizationType;
PolKitAuthorizationType polkit_authorization_get_type (PolKitAuthorization *auth);
const char *polkit_authorization_get_action_id (PolKitAuthorization *auth);
uid_t polkit_authorization_get_uid (PolKitAuthorization *auth);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment