aboutsummaryrefslogtreecommitdiff
path: root/cforum.h
diff options
context:
space:
mode:
Diffstat (limited to 'cforum.h')
-rw-r--r--cforum.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/cforum.h b/cforum.h
index 7d7dc60..7285e76 100644
--- a/cforum.h
+++ b/cforum.h
@@ -27,6 +27,13 @@ struct post{
char *text;
};
+struct session{
+ int id;
+ int user;
+ int created;
+ char *string;
+};
+
struct user{
int id;
int created;
@@ -60,14 +67,20 @@ void showuser(int);
/* db.c */
int addatt(struct att *);
+int addpost(struct post *);
+int addsession(struct session *);
int adduser(struct user *);
+int deletesession(struct session *);
int haspass(struct user *, char *);
+void makerandom(char *, int);
void makehash(char *, char **, char **);
struct att *getatt(sqlite3_stmt *);
struct post *getpost(sqlite3_stmt *);
+struct session *getsession(sqlite3_stmt *);
struct user *getuser(sqlite3_stmt *);
struct att *nextatt(sqlite3_stmt *);
struct post *nextpost(sqlite3_stmt *);
+struct session *nextsession(sqlite3_stmt *);
struct user *nextuser(sqlite3_stmt *);
sqlite3_stmt *selectbyint(char *, char *, int);
@@ -75,6 +88,7 @@ sqlite3_stmt *selectbyint(char *, char *, int);
void srverr(char *);
/* query.c */
+char *nextcookie(int);
char *nextparam(enum method, int *, int);
void setquery(void);
char *split(char *);
@@ -95,8 +109,13 @@ int urldecode(char *, int);
#define MAXUSERFULL 128
#define MAXUSERPASS 72
+/* Maximum size of cookie values. */
+#define MAXCOOKIE 40
+
/***** Variables *****/
sqlite3 *db;
struct query query;
-struct site site; \ No newline at end of file
+struct site site;
+struct user *curuser;
+struct session *cursession; \ No newline at end of file