file db saving (not complete)

This commit is contained in:
2025-10-30 17:51:26 +02:00
parent 76dff7dafb
commit 7c4c9e6694
10 changed files with 310 additions and 155 deletions
+27 -4
View File
@@ -1,12 +1,35 @@
#include "main.h"
#include <stdint.h>
/* Auth */
typedef struct {
char *name;
char *pass;
char *name;
char *pass;
} i_auth_t;
typedef struct {
char privileges;
int is_logged;
char privileges;
uint32_t uid;
} o_auth_t;
/* Get file */
typedef struct {
int id;
char *name;
int user_id;
} i_get_file_db;
typedef struct {
int user_id; // TODO: implement
char *name; // TODO: implement
int limit;
int offset;
char sort_by[12];
} i_get_files_db;
int init_db_connection();
int db_user_auth(i_auth_t *credentials, o_auth_t *response);
int db_save_file(session *s);