summaryrefslogtreecommitdiff
path: root/src/web.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/web.h')
-rw-r--r--src/web.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/web.h b/src/web.h
index 27dcde3..3a6e315 100644
--- a/src/web.h
+++ b/src/web.h
@@ -5,8 +5,14 @@
struct MHD_PostProcessor;
+#define CLIENT_NAME_MAX 32
+#define CLIENT_SECRET_LEN 33
+
struct App {
char* dbname;
+ char session_secret[CLIENT_SECRET_LEN];
+ const char *admin_user;
+ const char *admin_pass;
};
void prepare_database(struct App *app);
@@ -17,12 +23,9 @@ struct Server {
char *page;
};
-int web_begin(struct Server *server, int port);
+int web_begin(struct Server *server, int port, const char *admin_user, const char *admin_pass);
int web_join(struct Server *server);
-#define CLIENT_NAME_MAX 32
-#define CLIENT_SECRET_LEN 33
-
struct PostCollector {
char *data;
size_t size;
@@ -34,6 +37,10 @@ struct FormData {
int name_set;
int64_t client_id; // For delete operations
int client_id_set;
+ char username[32];
+ int username_set;
+ char password[64];
+ int password_set;
};
struct Request {