paulo@0: /* paulo@0: * $Id: gt_share.h,v 1.9 2004/03/24 06:36:54 hipnod Exp $ paulo@0: * paulo@0: * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) paulo@0: * paulo@0: * This program is free software; you can redistribute it and/or modify it paulo@0: * under the terms of the GNU General Public License as published by the paulo@0: * Free Software Foundation; either version 2, or (at your option) any paulo@0: * later version. paulo@0: * paulo@0: * This program is distributed in the hope that it will be useful, but paulo@0: * WITHOUT ANY WARRANTY; without even the implied warranty of paulo@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU paulo@0: * General Public License for more details. paulo@0: */ paulo@0: paulo@0: #ifndef __GT_SHARE_H__ paulo@0: #define __GT_SHARE_H__ paulo@0: paulo@0: /******************************************************************************/ paulo@0: paulo@0: struct gt_share; paulo@0: struct file_share; paulo@0: paulo@0: /******************************************************************************/ paulo@0: paulo@0: FileShare *gt_share_local_lookup_by_index (uint32_t index, char *file); paulo@0: FileShare *gt_share_local_lookup_by_urn (char *urn); paulo@0: int gt_share_local_sync_is_done (void); paulo@0: char *gt_share_local_get_urns (FileShare *file); paulo@0: paulo@0: /******************************************************************************/ paulo@0: paulo@0: void *gnutella_share_new (Protocol *p, FileShare *file); paulo@0: void gnutella_share_free (Protocol *p, FileShare *file, void *data); paulo@0: paulo@0: int gnutella_share_add (Protocol *p, FileShare *file, void *data); paulo@0: int gnutella_share_remove (Protocol *p, FileShare *file, void *data); paulo@0: paulo@0: void gnutella_share_sync (Protocol *p, int begin); paulo@0: paulo@0: /*****************************************************************************/ paulo@0: paulo@0: void gnutella_share_hide (Protocol *p); paulo@0: void gnutella_share_show (Protocol *p); paulo@0: paulo@0: /******************************************************************************/ paulo@0: paulo@0: /* need these definitions but giFT doesn't provide them to plugins */ paulo@0: extern Dataset *share_index (unsigned long *files, double *size); paulo@0: extern void share_foreach (DatasetForeachExFn foreach_fn, void *data); paulo@0: paulo@0: /******************************************************************************/ paulo@0: paulo@0: #endif /* __GT_SHARE_H__ */