summaryrefslogtreecommitdiff
path: root/module/storage.h
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2009-06-17 00:13:58 +0000
committerStef Walter <stef@memberwebs.com>2009-06-17 00:13:58 +0000
commita7557acb5423ea8e4c6bcce27472918c638d56f8 (patch)
tree3e3c0e5b811441d1231670ba034be6c4973fdb1d /module/storage.h
parent2e1c4b9fc834c8af9f1a31789b1dc614c13fcad5 (diff)
Some coding work. Banged out generally how things will work. Nothing compiles yet.
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_ */