TelepathyLogger.Entity¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The entity’s alias |
||
r/w/co |
The entity’s avatar’s token |
||
r/w/co |
The entity’s identifier |
||
r/w/co |
The entity’s type |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
||
priv |
r |
Class Details¶
- class TelepathyLogger.Entity(**kwargs)¶
- Bases:
- Abstract:
No
An object representing a contact or room.
- classmethod new(id, type, alias, avatar_token)¶
- Parameters:
id (
str
) –type (
TelepathyLogger.EntityType
) –alias (
str
) –avatar_token (
str
) –
- Return type:
- classmethod new_from_room_id(room_id)¶
- Parameters:
room_id (
str
) – the room id which will be the identifier for the entity- Returns:
a
TelepathyLogger.Entity
instance with identifier, alias copied from room_id. It also setsTelepathyLogger.EntityType.ROOM
as type for theTelepathyLogger.Entity
returned.- Return type:
- classmethod new_from_tp_contact(contact, type)¶
- Parameters:
contact (
TelepathyGLib.Contact
) – theTelepathyGLib.Contact
instance to create theTelepathyLogger.Entity
fromtype (
TelepathyLogger.EntityType
) – theTelepathyLogger.Entity
type
- Returns:
a
TelepathyLogger.Entity
instance with identifier, alias and avatar’s token copied. Type parameter is useful to differentiate between normal contact and self contact, thus onlyTelepathyLogger.EntityType.CONTACT
andTelepathyLogger.EntityType.SELF
are accepted. If contact isNone
, an entity of typeTelepathyLogger.EntityType.UNKNOWN
with id set to “unknown” is returned.- Return type:
- get_entity_type()¶
- Returns:
the type of the entity
- Return type:
Property Details¶
- TelepathyLogger.Entity.props.alias¶
- Name:
alias
- Type:
- Default Value:
- Flags:
The entity’s alias
- TelepathyLogger.Entity.props.avatar_token¶
- Name:
avatar-token
- Type:
- Default Value:
- Flags:
The entity’s avatar token
- TelepathyLogger.Entity.props.identifier¶
- Name:
identifier
- Type:
- Default Value:
- Flags:
The entity’s identifier
- TelepathyLogger.Entity.props.type¶
- Name:
type
- Type:
- Default Value:
0
- Flags:
The entity’s type (see
TelepathyLogger.EntityType
).