Infinity.AclAccount

Fields

Name

Type

Access

Description

id

int

r/w

A unique ID for this account.

name

str

r/w

A human readable account name.

Methods

class

array_free (accounts)

class

from_xml (xml)

class

id_to_string (account)

class

new (id, name)

copy ()

free ()

to_xml (xml)

Details

class Infinity.AclAccount

This boxed type specifies basic user account information.

classmethod array_free(accounts)
Parameters:

accounts ([Infinity.AclAccount]) – An array of Infinity.AclAccount objects.

Releases all resources allocated by an array of Infinity.AclAccount s.

classmethod from_xml(xml)
Parameters:

xml (libxml2.NodePtr) – An XML node.

Raises:

GLib.Error

Returns:

A new Infinity.AclAccount on success, or None on failure. Free with Infinity.AclAccount.free() when no longer needed.

Return type:

Infinity.AclAccount

Attempts to deserialize an Infinity.AclAccount that was written to an XML node by the function Infinity.AclAccount.to_xml(). If an error occurs, such as mandatory fields being missing, the function returns None and error is set.

classmethod id_to_string(account)
Parameters:

account (int) – A #InfAclAccountId.

Returns:

A string representation of the given account ID, or None if the account does not exist. The return value must not be freed.

Return type:

str

Translates the given account ID to a unique string identifier.

classmethod new(id, name)
Parameters:
  • id (int) – The unique ID of the new account.

  • name (str or None) – The human-readable name of the new account.

Returns:

A new Infinity.AclAccount object.

Return type:

Infinity.AclAccount

Creates a new Infinity.AclAccount.

copy()
Returns:

A new Infinity.AclAccount. Free with Infinity.AclAccount.free() when no longer needed.

Return type:

Infinity.AclAccount

Creates a copy of self.

free()

Releases all resources allocated by self.

to_xml(xml)
Parameters:

xml (libxml2.NodePtr) – The XML node to write the account attributes to.

Serializes the properties of self into the XML node xml. The function Infinity.AclAccount.from_xml() does the reverse operation and deserializes the account object from the XML.