TelepathyLogger.Entity

g GObject.Object GObject.Object TelepathyLogger.Entity TelepathyLogger.Entity GObject.Object->TelepathyLogger.Entity

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (id, type, alias, avatar_token)

class

new_from_room_id (room_id)

class

new_from_tp_contact (contact, type)

get_alias ()

get_avatar_token ()

get_entity_type ()

get_identifier ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

alias

str

r/w/co

The entity’s alias

avatar-token

str

r/w/co

The entity’s avatar’s token

identifier

str

r/w/co

The entity’s identifier

type

int

r/w/co

The entity’s type

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

priv

TelepathyLogger.EntityPriv

r

Class Details

class TelepathyLogger.Entity(**kwargs)
Bases:

GObject.Object

Abstract:

No

An object representing a contact or room.

classmethod new(id, type, alias, avatar_token)
Parameters:
Return type:

TelepathyLogger.Entity

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 sets TelepathyLogger.EntityType.ROOM as type for the TelepathyLogger.Entity returned.

Return type:

TelepathyLogger.Entity

classmethod new_from_tp_contact(contact, type)
Parameters:
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 only TelepathyLogger.EntityType.CONTACT and TelepathyLogger.EntityType.SELF are accepted. If contact is None, an entity of type TelepathyLogger.EntityType.UNKNOWN with id set to “unknown” is returned.

Return type:

TelepathyLogger.Entity

get_alias()
Returns:

the alias of the entity, or None

Return type:

str

get_avatar_token()
Returns:

a token representing the avatar of the token, or None

Return type:

str

get_entity_type()
Returns:

the type of the entity

Return type:

TelepathyLogger.EntityType

get_identifier()
Returns:

the identifier of the entity

Return type:

str

Property Details

TelepathyLogger.Entity.props.alias
Name:

alias

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The entity’s alias

TelepathyLogger.Entity.props.avatar_token
Name:

avatar-token

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The entity’s avatar token

TelepathyLogger.Entity.props.identifier
Name:

identifier

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The entity’s identifier

TelepathyLogger.Entity.props.type
Name:

type

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The entity’s type (see TelepathyLogger.EntityType).