summaryrefslogtreecommitdiff
path: root/src/sync/sync-httpd_backup.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-11-17 00:13:00 +0100
committerChristian Grothoff <christian@grothoff.org>2019-11-17 00:13:00 +0100
commit8b1e276a316d29a752b26cdc070330e688aea221 (patch)
tree203a9de2a95edae1dae9979ec4296e63b3bb61e9 /src/sync/sync-httpd_backup.h
parent9badf80eb4228a9c009839a4856710127efe8601 (diff)
downloadsync-8b1e276a316d29a752b26cdc070330e688aea221.tar.gz
sync-8b1e276a316d29a752b26cdc070330e688aea221.tar.bz2
sync-8b1e276a316d29a752b26cdc070330e688aea221.zip
breaking the build badly, big hacking
Diffstat (limited to 'src/sync/sync-httpd_backup.h')
-rw-r--r--src/sync/sync-httpd_backup.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/sync/sync-httpd_backup.h b/src/sync/sync-httpd_backup.h
index 02f31be..6326266 100644
--- a/src/sync/sync-httpd_backup.h
+++ b/src/sync/sync-httpd_backup.h
@@ -23,15 +23,39 @@
#include <microhttpd.h>
/**
+ * Service is shutting down, resume all MHD connections NOW.
+ */
+void
+SH_resume_all_bc (void);
+
+
+/**
+ * Return the current backup of @a account on @a connection
+ * using @a default_http_status on success.
+ *
+ * @param connection MHD connection to use
+ * @param account account to query
+ * @param default_http_status HTTP status to queue response
+ * with on success (#MHD_HTTP_OK or #MHD_HTTP_CONFLICT)
+ * @return MHD result code
+ */
+int
+SH_return_backup (struct MHD_Connection *connection,
+ const struct SYNC_AccountPublicKeyP *account,
+ unsigned int default_http_status);
+
+
+/**
+ * Handle request on @a connection for retrieval of the latest
+ * backup of @a account.
+ *
* @param connection the MHD connection to handle
* @param account public key of the account the request is for
- * @param[in,out] con_cls the connection's closure (can be updated)
* @return MHD result code
*/
int
sync_handler_backup_get (struct MHD_Connection *connection,
- const struct SYNC_AccountPublicKeyP *account,
- void **con_cls);
+ const struct SYNC_AccountPublicKeyP *account);
/**