PolkitActionDescription

PolkitActionDescription — Description of Actions

Functions

Types and Values

Object Hierarchy

    GEnum
    ╰── PolkitImplicitAuthorization
    GObject
    ╰── PolkitActionDescription

Description

Object used to encapsulate a registered action.

Functions

polkit_action_description_get_action_id ()

const gchar *
polkit_action_description_get_action_id
                               (PolkitActionDescription *action_description);

Gets the action id for action_description .

Parameters

action_description

A PolkitActionDescription.

 

Returns

A string owned by action_description . Do not free.


polkit_action_description_get_description ()

const gchar *
polkit_action_description_get_description
                               (PolkitActionDescription *action_description);

Gets the description used for action_description .

Parameters

action_description

A PolkitActionDescription.

 

Returns

A string owned by action_description . Do not free.


polkit_action_description_get_message ()

const gchar *
polkit_action_description_get_message (PolkitActionDescription *action_description);

Gets the message used for action_description .

Parameters

action_description

A PolkitActionDescription.

 

Returns

A string owned by action_description . Do not free.


polkit_action_description_get_vendor_name ()

const gchar *
polkit_action_description_get_vendor_name
                               (PolkitActionDescription *action_description);

Gets the vendor name for action_description , if any.

Parameters

action_description

A PolkitActionDescription.

 

Returns

A string owned by action_description . Do not free.


polkit_action_description_get_vendor_url ()

const gchar *
polkit_action_description_get_vendor_url
                               (PolkitActionDescription *action_description);

Gets the vendor URL for action_description , if any.

Parameters

action_description

A PolkitActionDescription.

 

Returns

A string owned by action_description . Do not free.


polkit_action_description_get_icon_name ()

const gchar *
polkit_action_description_get_icon_name
                               (PolkitActionDescription *action_description);

Gets the icon name for action_description , if any.

Parameters

action_description

A PolkitActionDescription.

 

Returns

A string owned by action_description . Do not free.


polkit_action_description_get_implicit_any ()

PolkitImplicitAuthorization
polkit_action_description_get_implicit_any
                               (PolkitActionDescription *action_description);

Gets the implicit authorization for action_description used for any subject.

Parameters

action_description

A PolkitActionDescription.

 

Returns

A value from the PolkitImplicitAuthorization enumeration.


polkit_action_description_get_implicit_inactive ()

PolkitImplicitAuthorization
polkit_action_description_get_implicit_inactive
                               (PolkitActionDescription *action_description);

Gets the implicit authorization for action_description used for subjects in inactive sessions on a local console.

Parameters

action_description

A PolkitActionDescription.

 

Returns

A value from the PolkitImplicitAuthorization enumeration.


polkit_action_description_get_implicit_active ()

PolkitImplicitAuthorization
polkit_action_description_get_implicit_active
                               (PolkitActionDescription *action_description);

Gets the implicit authorization for action_description used for subjects in active sessions on a local console.

Parameters

action_description

A PolkitActionDescription.

 

Returns

A value from the PolkitImplicitAuthorization enumeration.


polkit_action_description_get_annotation ()

const gchar *
polkit_action_description_get_annotation
                               (PolkitActionDescription *action_description,
                                const gchar *key);

Get the value of the annotation with key .

Parameters

action_description

A PolkitActionDescription.

 

key

An annotation key.

 

Returns

NULL if there is no annoation with key , otherwise the annotation value owned by action_description . Do not free.

[allow-none]


polkit_action_description_get_annotation_keys ()

const gchar * const *
polkit_action_description_get_annotation_keys
                               (PolkitActionDescription *action_description);

Gets the keys of annotations defined in action_description .

Parameters

action_description

A PolkitActionDescription.

 

Returns

The annotation keys owned by action_description . Do not free.

[transfer none]


polkit_implicit_authorization_to_string ()

const gchar *
polkit_implicit_authorization_to_string
                               (PolkitImplicitAuthorization implicit_authorization);

polkit_implicit_authorization_from_string ()

gboolean
polkit_implicit_authorization_from_string
                               (const gchar *string,
                                PolkitImplicitAuthorization *out_implicit_authorization);

Types and Values

PolkitActionDescription

typedef struct _PolkitActionDescription PolkitActionDescription;

The PolkitActionDescription struct should not be accessed directly.


enum PolkitImplicitAuthorization

Possible implicit authorizations.

Members

POLKIT_IMPLICIT_AUTHORIZATION_UNKNOWN

Unknown whether the subject is authorized, never returned in any public API.

 

POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED

Subject is not authorized.

 

POLKIT_IMPLICIT_AUTHORIZATION_AUTHENTICATION_REQUIRED

Authentication is required.

 

POLKIT_IMPLICIT_AUTHORIZATION_ADMINISTRATOR_AUTHENTICATION_REQUIRED

Authentication as an administrator is required.

 

POLKIT_IMPLICIT_AUTHORIZATION_AUTHENTICATION_REQUIRED_RETAINED

Authentication is required. If the authorization is obtained, it is retained.

 

POLKIT_IMPLICIT_AUTHORIZATION_ADMINISTRATOR_AUTHENTICATION_REQUIRED_RETAINED

Authentication as an administrator is required. If the authorization is obtained, it is retained.

 

POLKIT_IMPLICIT_AUTHORIZATION_AUTHORIZED

The subject is authorized