summaryrefslogtreecommitdiff
path: root/src/web.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/web.h')
-rw-r--r--src/web.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/web.h b/src/web.h
index 95c0e27..27dcde3 100644
--- a/src/web.h
+++ b/src/web.h
@@ -41,6 +41,7 @@ struct Request {
struct PostCollector pp;
struct MHD_PostProcessor *post_proc; // NULL when using PostCollector
struct FormData form;
+ const char *host;
};
struct CreateClientResult {
@@ -66,3 +67,24 @@ struct ListClientResult {
int list_clients(struct Request *req, struct ListClientResult *result);
+#define BACKUP_STATUS_MAX 16
+#define BACKUP_DATETIME_MAX 32
+#define MAX_BACKUPS_DISPLAY 50
+
+struct BackupRecord {
+ int64_t id;
+ char status[BACKUP_STATUS_MAX];
+ char started[BACKUP_DATETIME_MAX];
+ char completed[BACKUP_DATETIME_MAX];
+};
+
+struct GetClientResult {
+ int found;
+ int64_t id;
+ char name[CLIENT_NAME_MAX];
+ char secret[CLIENT_SECRET_LEN];
+ uint16_t backups_len;
+ struct BackupRecord backups[];
+};
+
+int get_client_with_backups(struct Request *req, int64_t client_id, struct GetClientResult *result);