diff options
author | jgeboski <jgeboski@gmail.com> | 2015-01-15 19:19:28 -0500 |
---|---|---|
committer | jgeboski <jgeboski@gmail.com> | 2015-01-15 21:23:44 -0500 |
commit | a2cdeab81cb287063f8ed4be01263c284d4d94d6 (patch) | |
tree | 2832b457b54b0230fc5b66f7ea7edc81872b160d /facebook/facebook-api.h | |
parent | 68c46dd797ad24642b69d7dd8914a521cd20e87f (diff) | |
download | bitlbee-facebook-a2cdeab81cb287063f8ed4be01263c284d4d94d6.tar.gz bitlbee-facebook-a2cdeab81cb287063f8ed4be01263c284d4d94d6.tar.bz2 bitlbee-facebook-a2cdeab81cb287063f8ed4be01263c284d4d94d6.tar.xz |
Implemented typing notifications
Diffstat (limited to 'facebook/facebook-api.h')
-rw-r--r-- | facebook/facebook-api.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/facebook/facebook-api.h b/facebook/facebook-api.h index 0ea0be0..2caace2 100644 --- a/facebook/facebook-api.h +++ b/facebook/facebook-api.h @@ -82,6 +82,9 @@ typedef struct fb_api_msg fb_api_msg_t; /** The structure for representing an #fb_api presence. **/ typedef struct fb_api_pres fb_api_pres_t; +/** The structure for representing an #fb_api user typing state. **/ +typedef struct fb_api_typing fb_api_typing_t; + /** The structure for representing an #fb_api user. **/ typedef struct fb_api_user fb_api_user_t; @@ -159,6 +162,16 @@ struct fb_api_funcs * @param data The user-defined data or NULL. **/ void (*presence) (fb_api_t *api, const GSList *press, gpointer data); + + /** + * The typing function. This is called whenever the #fb_api has + * retrieved a typing state update. + * + * @param api The #fb_api. + * @param typg The #fb_api_typing. + * @param data The user-defined data or NULL. + **/ + void (*typing) (fb_api_t *api, fb_api_typing_t *typg, gpointer data); }; /** @@ -201,6 +214,15 @@ struct fb_api_pres }; /** + * The structure for representing an #fb_api user typing state. + **/ +struct fb_api_typing +{ + gchar *uid; /** The user identifier. **/ + gboolean state; /** TRUE if the user is typing. **/ +}; + +/** * The structure for representing an #fb_api user. **/ struct fb_api_user @@ -234,6 +256,8 @@ void fb_api_message(fb_api_t *api, const gchar *uid, const gchar *msg); void fb_api_publish(fb_api_t *api, const gchar *topic, const gchar *fmt, ...); +void fb_api_typing(fb_api_t *api, const gchar *uid, gboolean state); + fb_api_msg_t *fb_api_msg_new(const gchar *uid, const gchar *text); void fb_api_msg_free(fb_api_msg_t *msg); @@ -242,6 +266,10 @@ fb_api_pres_t *fb_api_pres_new(const gchar *uid, gboolean online); void fb_api_pres_free(fb_api_pres_t *pres); +fb_api_typing_t *fb_api_typing_new(const gchar *uid, gboolean state); + +void fb_api_typing_free(fb_api_typing_t *typg); + fb_api_user_t *fb_api_user_new(const gchar *uid, const gchar *name); void fb_api_user_free(fb_api_user_t *user); |