PolicyKit Library Reference Manual | ||||
---|---|---|---|---|
Top | Description |
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.
|
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.
|
the object |
polkit_policy_default_debug ()
void polkit_policy_default_debug (PolKitPolicyDefault *policy_default);
Print debug details
|
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
|
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 PolKitPolicyDefault object |
|
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.
|
the object |
|
the type of access to check for |
|
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.
|
the object |
|
the type of access to check for |
|
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.
|
the object |
Returns : |
default policy |
polkit_policy_default_get_allow_inactive ()
PolKitResult polkit_policy_default_get_allow_inactive (PolKitPolicyDefault *policy_default);
Get default policy.
|
the object |
Returns : |
default policy |
polkit_policy_default_get_allow_active ()
PolKitResult polkit_policy_default_get_allow_active (PolKitPolicyDefault *policy_default);
Get default policy.
|
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.
|
the object |
|
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.
|
the object |
|
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.
|
the object |
|
the value to set |