Synopsis
PolKitPolicyDefault;
PolKitPolicyDefault* polkit_policy_default_new (void);
PolKitPolicyDefault* polkit_policy_default_ref (PolKitPolicyDefault *policy_default);
void polkit_policy_default_unref (PolKitPolicyDefault *policy_default);
void polkit_policy_default_debug (PolKitPolicyDefault *policy_default);
PolKitPolicyDefault* polkit_policy_default_clone (PolKitPolicyDefault *policy_default);
polkit_bool_t polkit_policy_default_equals (PolKitPolicyDefault *a,
PolKitPolicyDefault *b);
PolKitResult polkit_policy_default_can_session_do_action
(PolKitPolicyDefault *policy_default,
PolKitAction *action,
PolKitSession *session);
PolKitResult polkit_policy_default_can_caller_do_action
(PolKitPolicyDefault *policy_default,
PolKitAction *action,
PolKitCaller *caller);
PolKitResult polkit_policy_default_get_allow_any (PolKitPolicyDefault *policy_default);
PolKitResult polkit_policy_default_get_allow_inactive
(PolKitPolicyDefault *policy_default);
PolKitResult polkit_policy_default_get_allow_active
(PolKitPolicyDefault *policy_default);
void polkit_policy_default_set_allow_any (PolKitPolicyDefault *policy_default,
PolKitResult value);
void polkit_policy_default_set_allow_inactive
(PolKitPolicyDefault *policy_default,
PolKitResult value);
void polkit_policy_default_set_allow_active
(PolKitPolicyDefault *policy_default,
PolKitResult value);
Details
PolKitPolicyDefault
typedef struct _PolKitPolicyDefault PolKitPolicyDefault;
Objects of this class are used to record information about a default policy for an action.
polkit_policy_default_new ()
PolKitPolicyDefault* polkit_policy_default_new (void);
Construct a new object with all defaults set as restrictive as possible.
Returns : | a new object or NULL on OOM. |
Since 0.7
polkit_policy_default_ref ()
PolKitPolicyDefault* polkit_policy_default_ref (PolKitPolicyDefault *policy_default);
Increase reference count.
policy_default : | the policy object |
Returns : | the object |
polkit_policy_default_unref ()
void polkit_policy_default_unref (PolKitPolicyDefault *policy_default);
Decreases the reference count of the object. If it becomes zero, the object is freed. Before freeing, reference counts on embedded objects are decresed by one.
policy_default : | the object |
polkit_policy_default_debug ()
void polkit_policy_default_debug (PolKitPolicyDefault *policy_default);
Print debug details
policy_default : | the object |
polkit_policy_default_clone ()
PolKitPolicyDefault* polkit_policy_default_clone (PolKitPolicyDefault *policy_default);
Create a new object with the same value as the given object
policy_default : | object to clone |
Returns : | a new object or NULL on OOM. |
Since 0.7
polkit_policy_default_equals ()
polkit_bool_t polkit_policy_default_equals (PolKitPolicyDefault *a,
PolKitPolicyDefault *b);
Compare if two objects are equal.
a : | a PolKitPolicyDefault object |
b : | a PolKitPolicyDefault object |
Returns : | TRUE only if the objects are equal |
polkit_policy_default_can_session_do_action ()
PolKitResult polkit_policy_default_can_session_do_action
(PolKitPolicyDefault *policy_default,
PolKitAction *action,
PolKitSession *session);
Using the default policy for an action, determine if a given session can do a given action.
policy_default : | the object |
action : | the type of access to check for |
session : | the session in question |
Returns : | A PolKitResult - can only be one of POLKIT_RESULT_YES, POLKIT_RESULT_NO. |
polkit_policy_default_can_caller_do_action ()
PolKitResult polkit_policy_default_can_caller_do_action
(PolKitPolicyDefault *policy_default,
PolKitAction *action,
PolKitCaller *caller);
Using the default policy for an action, determine if a given caller can do a given action.
policy_default : | the object |
action : | the type of access to check for |
caller : | the caller in question |
Returns : | A PolKitResult specifying if, and how, the caller can do the given action. |
polkit_policy_default_get_allow_any ()
PolKitResult polkit_policy_default_get_allow_any (PolKitPolicyDefault *policy_default);
Get default policy.
policy_default : | the object |
Returns : | default policy |
polkit_policy_default_get_allow_inactive ()
PolKitResult polkit_policy_default_get_allow_inactive
(PolKitPolicyDefault *policy_default);
Get default policy.
policy_default : | the object |
Returns : | default policy |
polkit_policy_default_get_allow_active ()
PolKitResult polkit_policy_default_get_allow_active
(PolKitPolicyDefault *policy_default);
Get default policy.
policy_default : | the object |
Returns : | default policy |
polkit_policy_default_set_allow_any ()
void polkit_policy_default_set_allow_any (PolKitPolicyDefault *policy_default,
PolKitResult value);
Set default policy.
policy_default : | the object |
value : | the value to set |
polkit_policy_default_set_allow_inactive ()
void polkit_policy_default_set_allow_inactive
(PolKitPolicyDefault *policy_default,
PolKitResult value);
Set default policy.
policy_default : | the object |
value : | the value to set |
polkit_policy_default_set_allow_active ()
void polkit_policy_default_set_allow_active
(PolKitPolicyDefault *policy_default,
PolKitResult value);
Set default policy.
policy_default : | the object |
value : | the value to set |