From 24bf14f6653ebf1c1ba79b9f212d35417bb6acbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 18 Sep 2021 01:52:04 +0200 Subject: Implement attachments --- db.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'db.h') diff --git a/db.h b/db.h index 81a6bcd..9841d9c 100644 --- a/db.h +++ b/db.h @@ -2,6 +2,16 @@ sqlite3 *db; +struct attachment{ + int id; + int post; + int bytes; + char *name; + char *description; + char *mime; + char *data; +}; + struct post{ int id; int parent; @@ -20,5 +30,6 @@ struct user{ }; sqlite3_stmt *byid(char *, int); +struct attachment *getattachment(sqlite3_stmt *, int); struct post *getpost(sqlite3_stmt *, int); struct user *getuser(sqlite3_stmt *, int); \ No newline at end of file -- cgit v1.2.3