| polkit Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Prerequisites | Known Implementations | ||||
PolkitIdentity; struct PolkitIdentityIface; guint polkit_identity_hash (PolkitIdentity *identity); 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);
PolkitIdentity is implemented by PolkitUnixGroup, PolkitUnixNetgroup and PolkitUnixUser.
typedef struct _PolkitIdentity PolkitIdentity;
Generic type for all objects that can be used as identities.
struct PolkitIdentityIface {
GTypeInterface parent_iface;
guint (*hash) (PolkitIdentity *identity);
gboolean (*equal) (PolkitIdentity *a,
PolkitIdentity *b);
gchar * (*to_string) (PolkitIdentity *identity);
};
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(). |
guint polkit_identity_hash (PolkitIdentity *identity);
Gets a hash code for identity that can be used with e.g. g_hash_table_new().
|
A PolkitIdentity. |
Returns : |
A hash code. |
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. |
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(). |
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(). [allow-none][transfer full]
|