PolicyKit Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Known Implementations |
Synopsis
PolkitIdentity; PolkitIdentityIface; guint polkit_identity_hash (PolkitIdentity *a); gboolean polkit_identity_equal (PolkitIdentity *a, PolkitIdentity *b); gchar * polkit_identity_to_string (PolkitIdentity *identity); PolkitIdentity * polkit_identity_from_string (const gchar *str, GError **error);
Details
PolkitIdentity
typedef struct _PolkitIdentity PolkitIdentity;
Generic type for all objects that can be used as identities.
PolkitIdentityIface
typedef struct { GTypeInterface parent_iface; guint (*hash) (PolkitIdentity *identity); gboolean (*equal) (PolkitIdentity *a, PolkitIdentity *b); gchar * (*to_string) (PolkitIdentity *identity); } PolkitIdentityIface;
An interface for identities.
GTypeInterface |
The parent interface. |
Gets a hash value for a PolkitIdentity. | |
Checks if two PolkitIdentitys are equal. | |
Serializes a PolkitIdentity to a string that can be
used in polkit_identity_from_string() .
|
polkit_identity_hash ()
guint polkit_identity_hash (PolkitIdentity *a);
Gets a hash code for identity
that can be used with e.g. g_hash_table_new()
.
|
A PolkitIdentity. |
Returns : |
A hash code. |
polkit_identity_equal ()
gboolean polkit_identity_equal (PolkitIdentity *a, PolkitIdentity *b);
Checks if a
and b
are equal, ie. represent the same identity.
This function can be used in e.g. g_hash_table_new()
.
|
A PolkitIdentity. |
|
A PolkitIdentity. |
Returns : |
TRUE if a and b are equal, FALSE otherwise.
|
polkit_identity_to_string ()
gchar * polkit_identity_to_string (PolkitIdentity *identity);
Serializes identity
to a string that can be used in
polkit_identity_from_string()
.
|
A PolkitIdentity. |
Returns : |
A string representing identity . Free with g_free() .
|
polkit_identity_from_string ()
PolkitIdentity * polkit_identity_from_string (const gchar *str, GError **error);
Creates an object from str
that implements the PolkitIdentity
interface.
|
A string obtained from polkit_identity_to_string() .
|
|
Return location for error. |
Returns : |
A PolkitIdentity or NULL if error is set. Free with
g_object_unref() .
|