@ -6,6 +6,9 @@
struct crypto_keys ;
struct status ;
struct ap_activity ;
struct ap_account ;
struct outbox_envelope ;
struct outbox_envelope_list ;
enum {
system_account_id = - 1 ,
@ -62,38 +65,36 @@ void account_index_webfinger( struct account* a );
struct account * account_from_id ( int id ) ;
struct account * account_from_uri ( const char * uri ) ;
struct account * account_from_uri_or_fetch ( const char * uri ) ;
struct account * account_from_webfinger ( const char * handle ) ;
struct account * account_fetch_from_uri ( const char * uri ) ;
struct account * account_new ( ) ;
struct account * account_from_uri_or_fetch ( const char * uri ) ;
struct account * account_fetch_from_uri ( const char * uri ) ;
void account_free ( struct account * a ) ;
void account_save ( struct account * a ) ;
// Update from external activity pub data
bool account_sync_from_activity_pub ( unsigned int id ) ;
bool account_sync_from_activity ( struct account * a , struct ap_activity * act ) ;
struct ap_account ;
struct ap_account * account_activity_pub_data ( struct account * a ) ;
struct outbox_envelope ;
struct outbox_envelope_list ;
void account_deliver_activity ( struct account * a , struct ap_activity * act , struct outbox_envelope_list * oel ) ;
void account_deliver_activity_to_followers ( struct account * a , struct ap_activity * act , struct outbox_envelope_list * oel ) ;
// Data requests
struct crypto_keys * account_get_public_key ( struct account * a , const char * key_name ) ;
struct crypto_keys * account_get_private_key ( struct account * a ) ;
void account_add_follower ( struct account * a , struct account * follower ) ;
void account_remove_follower ( struct account * a , struct account * follower ) ;
void account_follow ( struct account * a , struct account * to_follow ) ;
void account_unfollow ( struct account * a , struct account * to_unfollow ) ;
void account_list_followers ( struct account * a , int offset , int limit , void * id_array ) ;
void account_list_following ( struct account * a , int offset , int limit , void * id_array ) ;
struct ap_account * account_activity_pub_data ( struct account * a ) ;
struct ap_activity * account_activity_pub ( struct account * a ) ;
// Local actions
void account_add_follower ( struct account * a , struct account * follower ) ;
void account_remove_follower ( struct account * a , struct account * follower ) ;
void account_move ( struct account * a , const char * new_uri ) ;
bool account_does_follow ( struct account * a , int account_id ) ;
// Federated actions
void account_deliver_activity ( struct account * a , struct ap_activity * act , struct outbox_envelope_list * oel ) ;
void account_deliver_activity_to_followers ( struct account * a , struct ap_activity * act , struct outbox_envelope_list * oel ) ;
void account_announce ( struct account * a , struct status * s ) ;
bool account_does_follow ( struct account * a , int account_id ) ;
void account_follow ( struct account * a , struct account * to_follow ) ;
void account_unfollow ( struct account * a , struct account * to_unfollow ) ;
void account_update ( struct account * a ) ;