Fixed HTTP-client query-string handling bug.
[doldaconnect.git] / daemon / client.h
index 7aee5cf..0a301ab 100644 (file)
@@ -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 <fredrik@dolda2000.com>
  *  
  *  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;
@@ -51,7 +58,7 @@ struct sharecache
     struct sharecache *next, *prev, *child, *parent;
     char *path;
     wchar_t *name;
-    size_t size;
+    off_t size;
     time_t mtime;
     dev_t dev;
     ino_t inode;
@@ -77,8 +84,16 @@ 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 int sharedfiles;
 extern unsigned long long sharesize;
 EGCBCHAIN(sharechangecb, unsigned long long);