| Libtlen2 Reference Manual |
|---|
enum TlenPresenceType; enum TlenPresenceStatus; enum TlenMessageType; gboolean tlen_presence (TlenConnection *tc, TlenPresenceType status, const gchar *description); TlenPresenceType tlen_presence_type (TlenEvent *ev); gboolean tlen_roster_get (TlenConnection *tc); gboolean tlen_message (TlenConnection *tc, const gchar *destination, const gchar *message, TlenMessageType type);
typedef enum {
TLEN_PRESENCE_STATUS = 0,
TLEN_PRESENCE_SUBSCRIBE,
TLEN_PRESENCE_UNSUBSCRIBE,
TLEN_PRESENCE_UNSUBSCRIBED,
TLEN_PRESENCE_SUBSCRIBED,
} TlenPresenceType;Specifies type of presence.
typedef enum {
TLEN_PRESENCE_AVAILABLE = 2,
TLEN_PRESENCE_EXT_AWAY,
TLEN_PRESENCE_AWAY,
TLEN_PRESENCE_DND,
TLEN_PRESENCE_CHATTY,
TLEN_PRESENCE_INVISIBLE,
TLEN_PRESENCE_UNAVAILABLE,
} TlenPresenceStatus;Specifies status of presence.
typedef enum{
TLEN_MESSAGE_TYPE_CHAT = 0,
TLEN_MESSAGE_TYPE_NORMAL
} TlenMessageType;gboolean tlen_presence (TlenConnection *tc, TlenPresenceType status, const gchar *description);
Change user status on server.
| tc : | connection to use. |
| status : | what status to send. |
| description : | description of status, maybe NULL. |
| Returns : | TRUE on success, FALSE otherwise. |
TlenPresenceType tlen_presence_type (TlenEvent *ev);
Check type of presence.
| ev : | presence event. |
| Returns : | type of presence. |
gboolean tlen_roster_get (TlenConnection *tc);
Get roster from server.
| tc : | connection to use. |
| Returns : | TRUE on success, FALSE otherwise. |
gboolean tlen_message (TlenConnection *tc, const gchar *destination, const gchar *message, TlenMessageType type);
Send message to a user.
| tc : | connection to use. |
| destination : | recipient of this message. |
| message : | body of the message. |
| type : | type of the message. |
| Returns : | TRUE on success, FALSE otherwise. |
| <<< Utils | Roster >>> |