#pragma once #include #include #include struct account; struct emoji; struct media; struct status { unsigned int id; int account_id; int activity_id; char* url; bool stub; bool remote; char* content; char* source; bool sensitive; bool pinned; bool bookmarked; time_t published; int in_reply_to; int repost_id; int root_status_id; int reposted_status_id; // if this post was reposted, this will be the id of that status struct { char** items; int count; } media; struct { struct media** items; int count; } media2; struct { struct status_react** items; int count; } reacts; struct { int* items; int count; } likes; struct { int* items; int count; } replies; struct { int* items; int count; } reposts; struct { int* items; int count; } mentions; struct { struct emoji** items; int count; } emoji; }; void status_assign_local_id( struct status* s ); struct status* status_from_id( unsigned int id ); struct status* status_new_system_unfollow( int account_id ); struct status* status_new_system_block( int account_id ); struct status* status_new_system_stub( struct status* s ); struct status* status_new_repost( struct status* s, struct account* a ); struct status* status_from_uri( const char* uri ); struct status* status_fetch_from_uri( const char* uri ); struct status* status_from_uri_or_fetch( const char* uri ); struct ap_object; struct status* status_from_activity( struct ap_object* act ); bool status_sync_from_activity_pub( struct status* s, struct ap_object* act ); bool status_sync_from_uri( struct status* s, const char* uri ); bool status_sync( struct status* s ); bool status_save_new( struct status* s ); void status_write_to_FILE( struct status* s, FILE* f ); void status_save( struct status* s ); void status_free( struct status* s ); void status_delete( struct status* s ); void status_flag_for_async_fetch( struct status* s ); void status_add_to_timeline( struct status* s, int timeline_id ); void status_get_context( struct status* s, void* ancestors, void* replies ); void status_add_reply( struct status* s, struct status* child ); void status_add_mention( struct status* s, int id ); void status_add_repost( struct status* s, struct status* repost ); void status_make_reply_to( struct status* s, int in_reply_to ); void status_add_react( struct status* s, const char* react, struct account* a ); void status_remove_react( struct status* s, const char* react, struct account* a ); void status_add_like( struct status* s, struct account* a ); void status_remove_like( struct status* s, struct account* a ); void status_set_bookmark( struct status* s ); void status_clear_bookmark( struct status* s ); char* status_render_source( struct status* s ); void status_get_bookmarks( int offset, int limit, void* results_ptr );