You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
2.2 KiB
C
94 lines
2.2 KiB
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stdio.h>
|
|
#include <time.h>
|
|
|
|
struct account;
|
|
|
|
struct status
|
|
{
|
|
unsigned int id;
|
|
int account_id;
|
|
|
|
char* url;
|
|
bool stub;
|
|
bool remote;
|
|
|
|
char* content; // Deprecate from file system data and render when loading
|
|
char* source;
|
|
bool sensitive;
|
|
bool pinned;
|
|
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 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 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_activity;
|
|
struct status* status_from_activity( struct ap_activity* act );
|
|
bool status_sync_from_activity_pub( struct status* s, struct ap_activity* 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_flag_for_async_fetch( struct status* s );
|
|
|
|
void status_make_reply_to( struct status* s, int in_reply_to );
|
|
void status_get_context( struct status* s, void* ancestors, void* replies );
|
|
|
|
void status_add_to_timeline( struct status* s, int timeline_id );
|
|
|
|
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 );
|
|
|
|
char* status_render_source( struct status* s );
|
|
|