aboutsummaryrefslogtreecommitdiff
path: root/db.h
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-09-18 01:52:04 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-09-18 01:52:04 +0200
commit24bf14f6653ebf1c1ba79b9f212d35417bb6acbf (patch)
tree913a0f1bebf835a1109652b1c61d363972ee9a28 /db.h
parente25f56cbe86041d4ab19e474e38032fa7e681ac7 (diff)
downloadcforum-24bf14f6653ebf1c1ba79b9f212d35417bb6acbf.tar.gz
Implement attachments
Diffstat (limited to 'db.h')
-rw-r--r--db.h11
1 files changed, 11 insertions, 0 deletions
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