TelepathyGLib.PresenceStatusSpec¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
name |
r/w |
String identifier of the presence status |
|
optional_arguments |
r/w |
An array of |
|
presence_type |
r/w |
A type value, as specified by |
|
self |
r/w |
Indicates if this status may be set on yourself |
Methods¶
class |
|
|
|
|
|
|
|
|
Details¶
- class TelepathyGLib.PresenceStatusSpec¶
Structure specifying a supported presence status.
In addition to the fields documented here, there are two
object
fields which must currently beNone
. A meaning may be defined for these in a future version of telepathy-glib.- classmethod new(name, type, can_set_on_self, has_message)¶
- Parameters:
name (
str
) – the name of the new presence statustype (
TelepathyGLib.ConnectionPresenceType
) – the category into which this presence status fallscan_set_on_self (
bool
) –True
if the user can set this presence status on themselveshas_message (
bool
) –True
if this presence status is accompanied by an optional human-readable message
- Returns:
- Return type:
New in version 0.23.1.
- can_set_on_self()¶
- Returns:
True
if the user can set this presence status on themselves (most statuses), orFalse
if they cannot directly set it on themselves (typically used forTelepathyGLib.ConnectionPresenceType.OFFLINE
andTelepathyGLib.ConnectionPresenceType.ERROR
)- Return type:
New in version 0.23.1.
- copy()¶
- Returns:
a new
TelepathyGLib.PresenceStatusSpec
resembling self- Return type:
Copy a presence status specification.
If self has optional arguments other than a string named “message”, they are not copied. Optional arguments with other names or types are deprecated.
New in version 0.23.1.
- free()¶
Free a presence status specification produced by
TelepathyGLib.PresenceStatusSpec.new
() orTelepathyGLib.PresenceStatusSpec.copy
().New in version 0.23.1.
- get_name()¶
- Returns:
the name of this presence status, such as “available” or “out-to-lunch”.
- Return type:
New in version 0.23.1.
- get_presence_type()¶
- Returns:
- Return type:
Return the category into which this presence type falls. For instance, for XMPP’s “” (do not disturb) status, this would return
TelepathyGLib.ConnectionPresenceType.BUSY
.New in version 0.23.1.