suddenly friend listing support
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct dc_account_;
|
||||
typedef struct dc_account_ *dc_account_t;
|
||||
@@ -31,4 +32,10 @@ void dc_account_set_token(dc_account_t a, char const *token);
|
||||
char const *dc_account_token(dc_account_t a);
|
||||
bool dc_account_has_token(dc_account_t a);
|
||||
|
||||
/* relationships
|
||||
*/
|
||||
void dc_account_set_friends(dc_account_t a, dc_account_t *ptr, size_t len);
|
||||
dc_account_t dc_account_nthfriend(dc_account_t a, size_t i);
|
||||
size_t dc_account_friends_size(dc_account_t a);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,9 @@ bool dc_api_authenticate(dc_api_t api, dc_account_t account);
|
||||
/**
|
||||
* Retrieve basic user information for the given account. The first
|
||||
* parameter is the user account holding login info, while the second
|
||||
* is the account you wish to retrieve information about.
|
||||
* is the account you wish to retrieve information about. If you wish
|
||||
* to retrieve information about the login user, simply pass the account
|
||||
* twice.
|
||||
*/
|
||||
bool dc_api_get_userinfo(dc_api_t api, dc_account_t login,
|
||||
dc_account_t user);
|
||||
@@ -58,9 +60,9 @@ bool dc_api_get_userguilds(dc_api_t api, dc_account_t login,
|
||||
GPtrArray **guilds);
|
||||
|
||||
/**
|
||||
* Fetch a list of friends of the login account "login". Returns a GPtrArray
|
||||
* of dc_account_t which automatically cleans itself up.
|
||||
* Fetch a list of friends of the login account "login". The friends are stored
|
||||
* within the login object.
|
||||
*/
|
||||
bool dc_api_get_friends(dc_api_t api, dc_account_t login, GPtrArray **friends);
|
||||
bool dc_api_get_friends(dc_api_t api, dc_account_t login);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,4 +45,9 @@ void dc_loop_add_api(dc_loop_t loop, dc_api_t api);
|
||||
*/
|
||||
bool dc_loop_once(dc_loop_t l);
|
||||
|
||||
/**
|
||||
* Abort the whole event looping shenanigans
|
||||
*/
|
||||
void dc_loop_abort(dc_loop_t l);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user