From ea6374249fe4d475d54abe390edc9ae7ae48029b Mon Sep 17 00:00:00 2001 From: fredrik Date: Sun, 16 Oct 2005 03:08:28 +0000 Subject: [PATCH] Add hash handling functions. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@370 959494ce-11ee-0310-bf91-de5d638817bd --- daemon/client.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/daemon/client.h b/daemon/client.h index 7aee5cf..a36c87b 100644 --- a/daemon/client.h +++ b/daemon/client.h @@ -37,6 +37,13 @@ struct sharepoint int delete; }; +struct hash +{ + wchar_t *algo; + size_t len; + char *buf; +}; + struct hashcache { struct hashcache *next, *prev; @@ -77,6 +84,11 @@ struct sharecache *findcache(struct sharecache *parent, wchar_t *name); void queuescan(struct sharecache *node); char *getfspath(struct sharecache *node); struct sharecache *nextscnode(struct sharecache *node); +struct hash *newhash(wchar_t *algo, size_t len, char *hash); +void freehash(struct hash *hash); +struct hash *duphash(struct hash *hash); +struct hash *parsehash(wchar_t *text); +wchar_t *unparsehash(struct hash *hash); extern struct sharecache *shareroot; extern unsigned long long sharesize; -- 2.11.0