Infinity.User¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Connection to the user |
||
r/w |
Flags the user currently has |
||
r/w/co |
A Unique User ID |
||
r/w |
The Name with which a user joined a session. Most servers ensure that it is unique. |
||
r/w |
Whether the user is currently available or not. |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This signal is emitted whenever the user’s status changes. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
||
priv |
r |
Class Details¶
- class Infinity.User(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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:
Error domain for user-related errors. Errors in this domain will be from the
Infinity.UserError
enumeration. SeeGLib.Error
for information on error domains.
- classmethod strerror(code)¶
- Parameters:
code (
Infinity.UserError
) – An error code from theInfinity.UserError
enumeration.- Returns:
A static string that must not be freed.
- Return type:
Returns a human-readable string for the given error code.
- get_connection()¶
- Returns:
A
Infinity.XmlConnection
, orNone
.- Return type:
Returns a connection to the given
Infinity.User
, orNone
. 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 isInfinity.UserStatus.UNAVAILABLE
).
- get_flags()¶
- Returns:
The user’s flags.
- Return type:
Returns the flags for the given
Infinity.User
.
- get_id()¶
- Returns:
A numerical User ID.
- Return type:
Returns the ID of the given
Infinity.User
.
- get_name()¶
- Returns:
The user’s name.
- Return type:
Returns the name of the given
Infinity.User
.
- get_status()¶
- Returns:
The user’s status.
- Return type:
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:
- Parameters:
user (
Infinity.User
) – The object which received the signalstatus (
Infinity.UserStatus
) – The new user status.
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:
- Default Value:
- Flags:
Connection to the user
- Infinity.User.props.flags¶
- Name:
flags
- Type:
- Default Value:
0
- Flags:
Flags the user currently has
- Infinity.User.props.id¶
- Name:
id
- Type:
- Default Value:
0
- Flags:
A Unique User ID
- Infinity.User.props.name¶
-
The Name with which a user joined a session. Most servers ensure that it is unique.
- Infinity.User.props.status¶
- Name:
status
- Type:
- Default Value:
- Flags:
Whether the user is currently available or not.