X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fclient.h;h=aa15d42ff66c8ae36a6b16d693cd094240cbc338;hb=302a260054ea38d3cb97be6d1a3010082c09265d;hp=7aee5cfa6b522f20e186a3eb9ff272584a3a1cf6;hpb=d3372da97568d5e1f35fa19787c8ec8af93a0435;p=doldaconnect.git diff --git a/daemon/client.h b/daemon/client.h index 7aee5cf..aa15d42 100644 --- a/daemon/client.h +++ b/daemon/client.h @@ -1,6 +1,6 @@ /* * Dolda Connect - Modular multiuser Direct Connect-style client - * Copyright (C) 2004 Fredrik Tolf (fredrik@dolda2000.com) + * Copyright (C) 2004 Fredrik Tolf * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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,13 @@ 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); +int hashcmp(struct hash *h1, struct hash *h2); +void scanshares(void); extern struct sharecache *shareroot; extern unsigned long long sharesize;