folks Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Properties |
FolksPresenceDetailsFolksPresenceDetails — Interface exposing a FolksPersona's or FolksIndividual's presence; their current availability, such as for chatting. |
enum FolksPresenceType; gboolean folks_presence_details_is_online (FolksPresenceDetails *self
); FolksPresenceType folks_presence_details_get_presence_type (FolksPresenceDetails *self
); void folks_presence_details_set_presence_type (FolksPresenceDetails *self
,FolksPresenceType value
); const gchar * folks_presence_details_get_presence_message (FolksPresenceDetails *self
); void folks_presence_details_set_presence_message (FolksPresenceDetails *self
,const gchar *value
); const gchar * folks_presence_details_get_presence_status (FolksPresenceDetails *self
); void folks_presence_details_set_presence_status (FolksPresenceDetails *self
,const gchar *value
); gint folks_presence_details_typecmp (FolksPresenceType type_a
,FolksPresenceType type_b
); FolksPresenceDetails;
"presence-message" gchar* : Read / Write "presence-status" gchar* : Read / Write "presence-type" FolksPresenceType : Read / Write
If the FolksBackend providing the FolksPersona doesn't support presence, the FolksPersona's `presence_type` will be set to PresenceType.UNSET and their `presence_message` will be an empty string.
typedef enum { FOLKS_PRESENCE_TYPE_UNSET, FOLKS_PRESENCE_TYPE_OFFLINE, FOLKS_PRESENCE_TYPE_AVAILABLE, FOLKS_PRESENCE_TYPE_AWAY, FOLKS_PRESENCE_TYPE_EXTENDED_AWAY, FOLKS_PRESENCE_TYPE_HIDDEN, FOLKS_PRESENCE_TYPE_BUSY, FOLKS_PRESENCE_TYPE_UNKNOWN, FOLKS_PRESENCE_TYPE_ERROR } FolksPresenceType;
The possible presence states an object implementing FolksPresenceDetails could be in.
These closely follow the SimplePresence interface in the Telepathy specification.
never set | |
offline | |
available | |
away from keyboard | |
away from keyboard for an extended period of time | |
also known as "invisible" or "appear offline" | |
at keyboard, but too busy to chat | |
presence not received from server | |
an error occurred with fetching the presence |
gboolean folks_presence_details_is_online (FolksPresenceDetails *self
);
Whether the contact is online.
This will be `true` if the contact's presence type is higher than PresenceType.OFFLINE, as determined by
.folks_presence_details_typecmp()
|
the FolksPresenceDetails instance |
Returns : |
`true` if the contact is online, `false` otherwise |
FolksPresenceType folks_presence_details_get_presence_type
(FolksPresenceDetails *self
);
|
the FolksPresenceDetails instance to query |
Returns : |
the value of the "presence-type" property |
void folks_presence_details_set_presence_type (FolksPresenceDetails *self
,FolksPresenceType value
);
|
the FolksPresenceDetails instance to modify |
|
the new value of the "presence-type" property |
const gchar * folks_presence_details_get_presence_message
(FolksPresenceDetails *self
);
|
the FolksPresenceDetails instance to query |
Returns : |
the value of the "presence-message" property |
void folks_presence_details_set_presence_message (FolksPresenceDetails *self
,const gchar *value
);
|
the FolksPresenceDetails instance to modify |
|
the new value of the "presence-message" property |
const gchar * folks_presence_details_get_presence_status
(FolksPresenceDetails *self
);
|
the FolksPresenceDetails instance to query |
Returns : |
the value of the "presence-status" property |
void folks_presence_details_set_presence_status (FolksPresenceDetails *self
,const gchar *value
);
|
the FolksPresenceDetails instance to modify |
|
the new value of the "presence-status" property |
gint folks_presence_details_typecmp (FolksPresenceType type_a
,FolksPresenceType type_b
);
Compare two FolksPresenceTypes.
`0` will be returned if the types are equal, a positive number will be returned if `type_a` is more available than `type_b`, and a negative number will be returned if the opposite is true.
|
the first FolksPresenceType to compare. [in] |
|
the second FolksPresenceType to compare. [in] |
Returns : |
a number representing the similarity of the two types |
Since 0.1.11
typedef struct _FolksPresenceDetails FolksPresenceDetails;
Interface exposing a FolksPersona's or FolksIndividual's presence; their current availability, such as for chatting.
If the FolksBackend providing the FolksPersona doesn't support presence, the FolksPersona's `presence_type` will be set to PresenceType.UNSET and their `presence_message` will be an empty string.
"presence-message"
property "presence-message" gchar* : Read / Write
The contact's presence message.
This is a short message written by the contact to add detail to their presence type ("presence-type"). If the contact hasn't set a message, it will be an empty string.
Default value: NULL
"presence-status"
property "presence-status" gchar* : Read / Write
The contact's detailed presence status.
This is a more detailed representation of the contact's presence than "presence-type". It may be empty, or one of a well-known set of strings, as defined in the Telepathy specification: Telepathy Specification
Default value: NULL
Since 0.6.0
"presence-type"
property"presence-type" FolksPresenceType : Read / Write
The contact's presence type.
Each contact can have one and only one presence type at any one time, representing their availability for communication. The default presence type is PresenceType.UNSET.
Default value: FOLKS_PRESENCE_TYPE_UNSET