2 * Dolda Connect - Modular multiuser Direct Connect-style client
3 * Copyright (C) 2004 Fredrik Tolf <fredrik@dolda2000.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include <sys/types.h>
30 #define HASHHASHSIZE 12
34 struct sharepoint *prev, *next;
49 struct hashcache *next, *prev;
58 struct sharecache *next, *prev, *child, *parent;
76 CBCHAIN(share_delete, struct sharecache *);
79 void clientpreinit(void);
81 int doscan(int quantum);
82 int opensharecache(struct sharecache *node);
83 struct sharecache *findcache(struct sharecache *parent, wchar_t *name);
84 void queuescan(struct sharecache *node);
85 char *getfspath(struct sharecache *node);
86 struct sharecache *nextscnode(struct sharecache *node);
87 struct hash *newhash(wchar_t *algo, size_t len, char *hash);
88 void freehash(struct hash *hash);
89 struct hash *duphash(struct hash *hash);
90 struct hash *parsehash(wchar_t *text);
91 wchar_t *unparsehash(struct hash *hash);
92 int hashcmp(struct hash *h1, struct hash *h2);
93 void scanshares(void);
95 extern struct sharecache *shareroot;
96 extern unsigned long long sharesize;
97 EGCBCHAIN(sharechangecb, unsigned long long);