ncdc/libdc/include/dc/account.h

42 lines
1.2 KiB
C
Raw Normal View History

2019-06-25 14:52:38 +02:00
#ifndef DC_ACCOUNT_H
#define DC_ACCOUNT_H
#include <stdint.h>
#include <stdbool.h>
2019-07-03 21:14:23 +02:00
#include <stdlib.h>
2019-06-25 14:52:38 +02:00
struct dc_account_;
typedef struct dc_account_ *dc_account_t;
dc_account_t dc_account_new(void);
dc_account_t dc_account_new2(char const *email, char const *pass);
void dc_account_set_email(dc_account_t a, char const *email);
char const *dc_account_email(dc_account_t a);
void dc_account_set_password(dc_account_t a, char const *password);
char const *dc_account_password(dc_account_t a);
void dc_account_set_id(dc_account_t a, char const *id);
char const *dc_account_id(dc_account_t a);
2019-06-25 17:00:25 +02:00
void dc_account_set_username(dc_account_t a, char const *id);
char const *dc_account_username(dc_account_t a);
void dc_account_set_discriminator(dc_account_t a, char const *id);
char const *dc_account_discriminator(dc_account_t a);
2019-06-25 18:20:27 +02:00
char const *dc_account_full_username(dc_account_t a);
2019-06-25 14:52:38 +02:00
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);
2019-07-03 21:14:23 +02:00
/* 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);
2019-06-25 14:52:38 +02:00
#endif