![]() |
![]() |
![]() |
PolicyKit Library Reference Manual | ![]() |
---|---|---|---|---|
struct PolKitPolicyDefault; PolKitPolicyDefault* polkit_policy_default_ref (PolKitPolicyDefault *policy_default); void polkit_policy_default_unref (PolKitPolicyDefault *policy_default); void polkit_policy_default_debug (PolKitPolicyDefault *policy_default); 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);
struct PolKitPolicyDefault;
Objects of this class are used to record information about a default policy for an action.
PolKitPolicyDefault* polkit_policy_default_ref (PolKitPolicyDefault *policy_default);
Increase reference count.
policy_default : | the policy object |
Returns : | the object |
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 |
void polkit_policy_default_debug (PolKitPolicyDefault *policy_default);
Print debug details
policy_default : | the object |
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_NOT_AUTHORIZED_TO_KNOW, POLKIT_RESULT_YES, POLKIT_RESULT_NO. |
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. |