PolicyKit Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
PolkitBackendLocalAuthorizationStorePolkitBackendLocalAuthorizationStore — Watches a directory for authorization files |
Synopsis
PolkitBackendLocalAuthorizationStore; PolkitBackendLocalAuthorizationStoreClass; PolkitBackendLocalAuthorizationStore * polkit_backend_local_authorization_store_new (GFile *directory, const gchar *extension); gboolean polkit_backend_local_authorization_store_lookup (PolkitBackendLocalAuthorizationStore *store, PolkitIdentity *identity, const gchar *action_id, PolkitDetails *details, PolkitImplicitAuthorization *out_result_any, PolkitImplicitAuthorization *out_result_inactive, PolkitImplicitAuthorization *out_result_active, PolkitDetails *out_details);
Properties
"directory" GFile* : Read / Write / Construct Only "extension" gchar* : Read / Write / Construct Only
Description
PolkitBackendLocalAuthorizationStore is a utility class to watch and read authorization files from a directory.
Details
PolkitBackendLocalAuthorizationStore
typedef struct _PolkitBackendLocalAuthorizationStore PolkitBackendLocalAuthorizationStore;
PolkitBackendLocalAuthorizationStoreClass
typedef struct { GObjectClass parent_class; /* Signals */ void (*changed) (PolkitBackendLocalAuthorizationStore *store); } PolkitBackendLocalAuthorizationStoreClass;
polkit_backend_local_authorization_store_new ()
PolkitBackendLocalAuthorizationStore * polkit_backend_local_authorization_store_new (GFile *directory, const gchar *extension);
Creates a new PolkitBackendLocalAuthorizationStore object that
reads authorizations from directory
with file extension
extension
. To watch for configuration changes, connect to the
"changed" signal.
|
The directory to watch. |
|
The extension of files to consider e.g. “.pkla”. |
Returns : |
A PolkitBackendLocalAuthorizationStore. Free with
g_object_unref() .
|
polkit_backend_local_authorization_store_lookup ()
gboolean polkit_backend_local_authorization_store_lookup (PolkitBackendLocalAuthorizationStore *store, PolkitIdentity *identity, const gchar *action_id, PolkitDetails *details, PolkitImplicitAuthorization *out_result_any, PolkitImplicitAuthorization *out_result_inactive, PolkitImplicitAuthorization *out_result_active, PolkitDetails *out_details);
Checks if an authorization entry from store
matches identity
, action_id
and details
.
|
A PolkitBackendLocalAuthorizationStore. |
|
The identity to check for. |
|
The action id to check for. |
|
Details for action .
|
|
Return location for the result for any subjects if the look up matched. |
|
Return location for the result for subjects in local inactive sessions if the look up matched. |
|
Return location for the result for subjects in local active sessions if the look up matched. |
|
NULL or a PolkitDetails object to append key/value pairs to on a positive match.
|
Returns : |
TRUE if store has an authorization entry that matches
identity , action_id and details . Otherwise FALSE .
|
Property Details
The "directory"
property
"directory" GFile* : Read / Write / Construct Only
The directory to watch for authorization files.
The "extension"
property
"extension" gchar* : Read / Write / Construct Only
The file extension for files to consider, e.g. “.pkla”.
Default value: NULL
Signal Details
The "changed"
signal
void user_function (PolkitBackendLocalAuthorizationStore *polkitbackendlocalauthorizationstore, gpointer user_data) : Run Last