![]() |
![]() |
![]() |
PolicyKit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Known Implementations |
PolkitSubject; PolkitSubjectIface; guint polkit_subject_hash (PolkitSubject *subject); gboolean polkit_subject_equal (PolkitSubject *a, PolkitSubject *b); gchar * polkit_subject_to_string (PolkitSubject *subject); PolkitSubject * polkit_subject_from_string (const gchar *str, GError **error);
PolkitSubject is implemented by PolkitUnixProcess, PolkitSystemBusName and PolkitUnixSession.
typedef struct _PolkitSubject PolkitSubject;
Generic type for all objects that can be used as subjects.
typedef struct { GTypeInterface parent_iface; guint (*hash) (PolkitSubject *subject); gboolean (*equal) (PolkitSubject *a, PolkitSubject *b); gchar * (*to_string) (PolkitSubject *subject); } PolkitSubjectIface;
An interface for subjects.
GTypeInterface |
The parent interface. |
|
Gets a hash value for a PolkitSubject. |
|
Checks if two PolkitSubjects are equal. |
|
Serializes a PolkitSubject to a string that can be
used in polkit_subject_from_string() .
|
guint polkit_subject_hash (PolkitSubject *subject);
Gets a hash code for subject
that can be used with e.g. g_hash_table_new()
.
|
A PolkitSubject. |
Returns : |
A hash code. |
gboolean polkit_subject_equal (PolkitSubject *a, PolkitSubject *b);
Checks if a
and b
are equal, ie. represent the same subject.
This function can be used in e.g. g_hash_table_new()
.
|
A PolkitSubject. |
|
A PolkitSubject. |
Returns : |
TRUE if a and b are equal, FALSE otherwise.
|
gchar * polkit_subject_to_string (PolkitSubject *subject);
Serializes subject
to a string that can be used in
polkit_subject_from_string()
.
|
A PolkitSubject. |
Returns : |
A string representing subject . Free with g_free() .
|
PolkitSubject * polkit_subject_from_string (const gchar *str, GError **error);
Creates an object from str
that implements the PolkitSubject
interface.
|
A string obtained from polkit_subject_to_string() .
|
|
Return location for error. |
Returns : |
A PolkitSubject or NULL if error is set. Free with
g_object_unref() .
|