From a7557acb5423ea8e4c6bcce27472918c638d56f8 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 17 Jun 2009 00:13:58 +0000 Subject: Some coding work. Banged out generally how things will work. Nothing compiles yet. --- module/storage.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 module/storage.h (limited to 'module/storage.h') 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_ */ -- cgit v1.2.3