Infinity.User

g GObject.Object GObject.Object Infinity.User Infinity.User GObject.Object->Infinity.User

Subclasses:

Infinity.AdoptedUser

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

error_quark ()

class

strerror (code)

get_connection ()

get_flags ()

get_id ()

get_name ()

get_status ()

Virtual Methods

Inherited:

GObject.Object (7)

do_set_status (status)

Properties

Name

Type

Flags

Short Description

connection

Infinity.XmlConnection

r/w

Connection to the user

flags

Infinity.UserFlags

r/w

Flags the user currently has

id

int

r/w/co

A Unique User ID

name

str

r/w

The Name with which a user joined a session. Most servers ensure that it is unique.

status

Infinity.UserStatus

r/w

Whether the user is currently available or not.

Signals

Inherited:

GObject.Object (1)

Name

Short Description

set-status

This signal is emitted whenever the user’s status changes.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

priv

object

r

Class Details

class Infinity.User(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Infinity.UserClass

Infinity.User is an opaque data type. You should only access it via the public API functions.

classmethod error_quark()
Returns:

A GQuark.

Return type:

int

Error domain for user-related errors. Errors in this domain will be from the Infinity.UserError enumeration. See GLib.Error for information on error domains.

classmethod strerror(code)
Parameters:

code (Infinity.UserError) – An error code from the Infinity.UserError enumeration.

Returns:

A static string that must not be freed.

Return type:

str

Returns a human-readable string for the given error code.

get_connection()
Returns:

A Infinity.XmlConnection, or None.

Return type:

Infinity.XmlConnection or None

Returns a connection to the given Infinity.User, or None. If a non-None connection is returned, then this is the connection through which records from that user come from. This means that, when this connection is closed, then the user is no longer available. However, you cannot send something to this connection expecting the user will receive it. For example, in central messaging mode, this connection is always the publisher, because all records from the user are relayed via the publisher.

If this functions returns None, this either means self is a local user (Infinity.UserFlags.LOCAL flag set) or it is not available (status is Infinity.UserStatus.UNAVAILABLE).

get_flags()
Returns:

The user’s flags.

Return type:

Infinity.UserFlags

Returns the flags for the given Infinity.User.

get_id()
Returns:

A numerical User ID.

Return type:

int

Returns the ID of the given Infinity.User.

get_name()
Returns:

The user’s name.

Return type:

str

Returns the name of the given Infinity.User.

get_status()
Returns:

The user’s status.

Return type:

Infinity.UserStatus

Returns the status of the given Infinity.User.

do_set_status(status) virtual
Parameters:

status (Infinity.UserStatus) –

Signal Details

Infinity.User.signals.set_status(user, status)
Signal Name:

set-status

Flags:

RUN_LAST

Parameters:

This signal is emitted whenever the user’s status changes. This is basically the same as a notification for the Infinity.User :status property, but it allows to access the previous user status when connecting before the default signal handler.

Property Details

Infinity.User.props.connection
Name:

connection

Type:

Infinity.XmlConnection

Default Value:

None

Flags:

READABLE, WRITABLE

Connection to the user

Infinity.User.props.flags
Name:

flags

Type:

Infinity.UserFlags

Default Value:

0

Flags:

READABLE, WRITABLE

Flags the user currently has

Infinity.User.props.id
Name:

id

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

A Unique User ID

Infinity.User.props.name
Name:

name

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE

The Name with which a user joined a session. Most servers ensure that it is unique.

Infinity.User.props.status
Name:

status

Type:

Infinity.UserStatus

Default Value:

Infinity.UserStatus.UNAVAILABLE

Flags:

READABLE, WRITABLE

Whether the user is currently available or not.