Infinity.UserTable¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new() | 
| add_user(user) | |
| foreach_local_user(func, *user_data) | |
| foreach_user(func, *user_data) | |
| lookup_user_by_id(id) | |
| lookup_user_by_name(name) | |
| remove_user(user) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
| do_add_available_user(user) | |
| do_add_local_user(user) | |
| do_add_user(user) | |
| do_remove_available_user(user) | |
| do_remove_local_user(user) | |
| do_remove_user(user) | 
Properties¶
None
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| add-available-user | This signal is emitted when a user in the user table becomes available, i.e. | 
| add-local-user | This signal is emitted when a user is added to the user table and has the Infinity.UserFlags.LOCALflag set. | 
| add-user | This signal is emitted when Infinity.UserTable.add_user() is called. | 
| remove-available-user | This signal is emitted when a user in the user table became unavailable, i.e. | 
| remove-local-user | This signal is emitted when a user is removed from the user table and had the Infinity.UserFlags.LOCALflag set. | 
| remove-user | This signal is emitted when Infinity.UserTable.remove_user() is called. | 
Class Details¶
- 
class Infinity.UserTable(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - Structure: - Infinity.UserTableClass- Infinity.UserTableis an opaque data type. You should only access it via the public API functions.- 
classmethod new()¶
- Returns: - A - Infinity.UserTable.- Return type: - Infinity.UserTable- Creates a new, empty user table. 
 - 
add_user(user)¶
- Parameters: - user ( - Infinity.User) – A- Infinity.Usernot already contained in self.- Inserts user into self. 
 - 
foreach_local_user(func, *user_data)¶
- Parameters: - func (Infinity.UserTableForeachUserFunc) – The function to call for each user.
- user_data (objectorNone) – User data to pass to the function.
 - Calls the given function for each local user in the user_table. A local user is a user that has the - Infinity.UserFlags.LOCALflag set and that has not status- Infinity.UserStatus.UNAVAILABLE. You should not add or remove users while this function is being executed.
- func (
 - 
foreach_user(func, *user_data)¶
- Parameters: - func (Infinity.UserTableForeachUserFunc) – The function to call for each user.
- user_data (objectorNone) – User data to pass to the function.
 - Calls the given function for each user in the user_table. You should not add or remove users while this function is being executed. 
- func (
 - 
lookup_user_by_id(id)¶
- Parameters: - id ( - int) – User ID to lookup.- Returns: - A - Infinity.User, or- None.- Return type: - Infinity.Useror- None- Returns the - Infinity.Userwith the given User ID in self.
 - 
lookup_user_by_name(name)¶
- Parameters: - name ( - str) – User name to lookup.- Returns: - A - Infinity.User, or- None.- Return type: - Infinity.Useror- None- Returns an - Infinity.Userwith the given name if there is one.
 - 
remove_user(user)¶
- Parameters: - user ( - Infinity.User) – A- Infinity.Usercontained in table.- Removes user from uesr_table. 
 - 
do_add_available_user(user) virtual¶
- Parameters: - user ( - Infinity.User) –
 - 
do_add_local_user(user) virtual¶
- Parameters: - user ( - Infinity.User) –
 - 
do_add_user(user) virtual¶
- Parameters: - user ( - Infinity.User) – A- Infinity.Usernot already contained in user_table.- Inserts user into user_table. 
 - 
do_remove_available_user(user) virtual¶
- Parameters: - user ( - Infinity.User) –
 - 
do_remove_local_user(user) virtual¶
- Parameters: - user ( - Infinity.User) –
 - 
do_remove_user(user) virtual¶
- Parameters: - user ( - Infinity.User) – A- Infinity.Usercontained in table.- Removes user from uesr_table. 
 
- 
classmethod 
Signal Details¶
- 
Infinity.UserTable.signals.add_available_user(user_table, user)¶
- Signal Name: - add-available-user- Flags: - Parameters: - user_table (Infinity.UserTable) – The object which received the signal
- user (Infinity.User) – TheInfinity.Userthat became available.
 - This signal is emitted when a user in the user table becomes available, i.e. its status is not - Infinity.UserStatus.UNAVAILABLE. The signal is also emitted when a new user is added to the user table who is available, in addition to- Infinity.UserTable- ::add-userand possibly- Infinity.UserTable- ::add-local-user.
- user_table (
- 
Infinity.UserTable.signals.add_local_user(user_table, user)¶
- Signal Name: - add-local-user- Flags: - Parameters: - user_table (Infinity.UserTable) – The object which received the signal
- user (Infinity.User) – TheInfinity.Userthat has set as local
 - This signal is emitted when a user is added to the user table and has the - Infinity.UserFlags.LOCALflag set. In this case,- Infinity.UserTable- ::add-useris emitted as well.- This signal is also emitted when an existing user receives the - Infinity.UserFlags.LOCALflag. This occurs when a user rejoins locally after leaving the session (possibly having the- Infinity.UserFlags.LOCALflag removed during their absence).- Infinity.UserTable- ::add-useris not emitted in this case.
- user_table (
- 
Infinity.UserTable.signals.add_user(user_table, user)¶
- Signal Name: - add-user- Flags: - Parameters: - user_table (Infinity.UserTable) – The object which received the signal
- user (Infinity.User) – TheInfinity.Userthat has been added into self
 - This signal is emitted when - Infinity.UserTable.add_user() is called. Note that this does not happen if user rejoins the session and has already been added to user_table previously.- Infinity.UserTable- ::add-local-usermay also be emitted at this point if user has the- Infinity.UserFlags.LOCALflag set.
- user_table (
- 
Infinity.UserTable.signals.remove_available_user(user_table, user)¶
- Signal Name: - remove-available-user- Flags: - Parameters: - user_table (Infinity.UserTable) – The object which received the signal
- user (Infinity.User) – TheInfinity.Userthat became unavailable.
 - This signal is emitted when a user in the user table became unavailable, i.e. its status has changed to - Infinity.UserStatus.UNAVAILABLE. The signal is also emitted when a user who was available has been removed from the user table, in addition to- Infinity.UserTable- ::remove-userand possibly- Infinity.UserTable- ::remove-local-user.
- user_table (
- 
Infinity.UserTable.signals.remove_local_user(user_table, user)¶
- Signal Name: - remove-local-user- Flags: - Parameters: - user_table (Infinity.UserTable) – The object which received the signal
- user (Infinity.User) – TheInfinity.Userthat is no longer local
 - This signal is emitted when a user is removed from the user table and had the - Infinity.UserFlags.LOCALflag set. In this case,- Infinity.UserTable- ::remove-useris emitted as well.- This signal is also emitted when user loses the - Infinity.UserFlags.LOCALflag. This occurs when the local user leaves the session.- Infinity.UserTable- ::remove-useris not emitted and the status of user is set to- Infinity.UserStatus.UNAVAILABLE.
- user_table (
- 
Infinity.UserTable.signals.remove_user(user_table, user)¶
- Signal Name: - remove-user- Flags: - Parameters: - user_table (Infinity.UserTable) – The object which received the signal
- user (Infinity.User) – TheInfinity.Userthat has been removed from self
 - This signal is emitted when - Infinity.UserTable.remove_user() is called. This does not usually happen, as users leaving a session do not get removed from the table.- Infinity.UserTable- ::remove-local-usermay also be emitted at this point if user has the- Infinity.UserFlags.LOCALflag set.
- user_table (