Polkit.Identity

g GObject.GInterface GObject.GInterface Polkit.Identity Polkit.Identity GObject.GInterface->Polkit.Identity

Implementations:

Polkit.UnixGroup, Polkit.UnixNetgroup, Polkit.UnixUser

Methods

class

from_string (str)

equal (b)

hash ()

to_string ()

Virtual Methods

do_equal (b)

do_hash ()

do_to_string ()

Properties

None

Signals

None

Fields

None

Class Details

class Polkit.Identity
Bases:

GObject.GInterface

Structure:

Polkit.IdentityIface

Polkit.Identity is an abstract type for representing one or more identities.

classmethod from_string(str)
Parameters:

str (str) – A string obtained from Polkit.Identity.to_string().

Raises:

GLib.Error

Returns:

A Polkit.Identity or None if error is set. Free with GObject.Object.unref().

Return type:

Polkit.Identity or None

Creates an object from str that implements the Polkit.Identity interface.

equal(b)
Parameters:

b (Polkit.Identity) – A Polkit.Identity.

Returns:

True if self and b are equal, False otherwise.

Return type:

bool

Checks if self and b are equal, ie. represent the same identity.

This function can be used in e.g. g_hash_table_new().

hash()
Returns:

A hash code.

Return type:

int

Gets a hash code for self that can be used with e.g. g_hash_table_new().

to_string()
Returns:

A string representing self. Free with GLib.free().

Return type:

str

Serializes self to a string that can be used in Polkit.Identity.from_string().

do_equal(b) virtual
Parameters:

b (Polkit.Identity) – A Polkit.Identity.

Returns:

True if a and b are equal, False otherwise.

Return type:

bool

Checks if a and b are equal, ie. represent the same identity.

This function can be used in e.g. g_hash_table_new().

do_hash() virtual
Returns:

A hash code.

Return type:

int

Gets a hash code for identity that can be used with e.g. g_hash_table_new().

do_to_string() virtual
Returns:

A string representing identity. Free with GLib.free().

Return type:

str

Serializes identity to a string that can be used in Polkit.Identity.from_string().