diff options
author | jgeboski <jgeboski@gmail.com> | 2015-01-01 20:34:17 -0500 |
---|---|---|
committer | jgeboski <jgeboski@gmail.com> | 2015-01-14 16:06:03 -0500 |
commit | cefcc09b3a91f882a4511f675750d1798494969b (patch) | |
tree | aa42fa5520dcc1c686175ea7f0404fee9afdc1bf /facebook/facebook-api.h | |
parent | aaf01c2b00420fd7e28b80c1a3c419f074b2b542 (diff) | |
download | bitlbee-facebook-cefcc09b3a91f882a4511f675750d1798494969b.tar.gz bitlbee-facebook-cefcc09b3a91f882a4511f675750d1798494969b.tar.bz2 bitlbee-facebook-cefcc09b3a91f882a4511f675750d1798494969b.tar.xz |
Implemented initial MQTT interface
Diffstat (limited to 'facebook/facebook-api.h')
-rw-r--r-- | facebook/facebook-api.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/facebook/facebook-api.h b/facebook/facebook-api.h index f8711ad..7d61c8e 100644 --- a/facebook/facebook-api.h +++ b/facebook/facebook-api.h @@ -24,6 +24,7 @@ #include "facebook-http.h" #include "facebook-json.h" +#include "facebook-mqtt.h" #define FB_API_HOST "api.facebook.com" #define FB_API_BHOST "b-api.facebook.com" @@ -91,6 +92,16 @@ struct fb_api_funcs * @param data The user-defined data or NULL. **/ void (*auth) (fb_api_t *api, gpointer data); + + /** + * The connect function. This is called whenever the #fb_api has + * been successfully connected. This connects to the MQTT service. + * This is called as a result of #fb_api_connect(). + * + * @param api The #fb_api. + * @param data The user-defined data or NULL. + **/ + void (*connect) (fb_api_t *api, gpointer data); }; /** @@ -102,9 +113,15 @@ struct fb_api gpointer data; /** The user-defined data or NULL. **/ fb_http_t *http; /** The #fb_http. **/ + fb_mqtt_t *mqtt; /** The #fb_mqtt. **/ GError *err; /** The #GError or NULL. **/ + gchar *uid; /** The user identifier. **/ gchar *token; /** The session token. **/ + gchar *cid; /** The client identifier. **/ + gchar *mid; /** The MQTT identifier. **/ + gchar *cuid; /** The client unique identifier. **/ + gchar *sid; /** The sync identifier. **/ }; @@ -114,10 +131,16 @@ GQuark fb_api_error_quark(void); fb_api_t *fb_api_new(const fb_api_funcs_t *funcs, gpointer data); +void fb_api_rehash(fb_api_t *api); + void fb_api_free(fb_api_t *api); void fb_api_error(fb_api_t *api, fb_api_error_t err, const gchar *fmt, ...); void fb_api_auth(fb_api_t *api, const gchar *user, const gchar *pass); +void fb_api_connect(fb_api_t *api); + +void fb_api_disconnect(fb_api_t *api); + #endif /* _FACEBOOK_API_H */ |