diff options
Diffstat (limited to 'snac.h')
-rw-r--r-- | snac.h | 30 |
1 files changed, 22 insertions, 8 deletions
@@ -24,7 +24,7 @@ double ftime(void); void srv_debug(int level, d_char *str); #define srv_log(str) srv_debug(0, str) -int srv_open(char *basedir); +int srv_open(char *basedir, int auto_upgrade); void srv_free(void); typedef struct _snac { @@ -50,11 +50,21 @@ int check_password(char *uid, char *passwd, char *hash); void srv_archive(char *direction, char *req, char *payload, int p_size, int status, char *headers, char *body, int b_size); -double mtime(char *fn); +double mtime_nl(const char *fn, int *n_link); +#define mtime(fn) mtime_nl(fn, NULL) -int follower_add(snac *snac, char *actor, char *msg); -int follower_del(snac *snac, char *actor); -int follower_check(snac *snac, char *actor); +int index_add(const char *fn, const char *md5); +int index_del(const char *fn, const char *md5); +int index_first(const char *fn, char *buf, int size); +d_char *index_list(const char *fn, int max); +d_char *index_list_desc(const char *fn, int max); + +int object_del(const char *id); +int object_del_if_unref(const char *id); + +int follower_add(snac *snac, const char *actor); +int follower_del(snac *snac, const char *actor); +int follower_check(snac *snac, const char *actor); d_char *follower_list(snac *snac); double timeline_mtime(snac *snac); @@ -66,7 +76,8 @@ d_char *timeline_get(snac *snac, char *fn); d_char *timeline_list(snac *snac, int max); int timeline_add(snac *snac, char *id, char *o_msg, char *parent, char *referrer); void timeline_admire(snac *snac, char *id, char *admirer, int like); -int timeline_hide(snac *snac, char *id, int hide); + +d_char *timeline_top_level(snac *snac, d_char *list); d_char *local_list(snac *snac, int max); @@ -80,8 +91,11 @@ void mute(snac *snac, char *actor); void unmute(snac *snac, char *actor); int is_muted(snac *snac, char *actor); -int actor_add(snac *snac, char *actor, char *msg); -int actor_get(snac *snac, char *actor, d_char **data); +void hide(snac *snac, const char *id); +int is_hidden(snac *snac, const char *id); + +int actor_add(snac *snac, const char *actor, d_char *msg); +int actor_get(snac *snac, const char *actor, d_char **data); int static_get(snac *snac, const char *id, d_char **data, int *size); void static_put(snac *snac, const char *id, const char *data, int size); |