summaryrefslogtreecommitdiff
path: root/module/storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'module/storage.h')
-rw-r--r--module/storage.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/module/storage.h b/module/storage.h
new file mode 100644
index 0000000..b3a2ad7
--- /dev/null
+++ b/module/storage.h
@@ -0,0 +1,32 @@
+#ifndef BOARD_H_
+#define BOARD_H_
+
+/* Communications white-board between processes/threads */
+
+typedef struct singleid_board singleid_board_t;
+
+typedef struct singleid_assoc {
+ const char *server;
+ const char *handle;
+ const char *type;
+ const unsigned char *secret;
+ const size_t n_secret;
+ time_t expires;
+} singleid_assoc_t;
+
+int singleid_board_check_nonce (singleid_board_t *board,
+ const char *nonce);
+
+int singleid_board_store_assoc (singleid_board_t *board,
+ const singleid_assoc_t *assoc);
+
+int singleid_board_find_assoc (singleid_board_t *board,
+ const char *server,
+ const char *handle,
+ singleid_assoc_t *assoc);
+
+void singleid_board_invalidate_assoc (singleid_board_t *board,
+ const char *server,
+ const char *handle);
+
+#endif /* BOARD_H_ */