paulo@0: /* paulo@0: * $Id: gt_xfer.h,v 1.27 2004/05/05 10:30:12 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 GIFT_GT_XFER_H_ paulo@0: #define GIFT_GT_XFER_H_ paulo@0: paulo@0: /*****************************************************************************/ paulo@0: paulo@0: struct transfer; paulo@0: struct source; paulo@0: struct chunk; paulo@0: paulo@0: struct gt_transfer; paulo@0: paulo@0: /*****************************************************************************/ paulo@0: paulo@0: char *gt_localize_request (struct gt_transfer *xfer, char *s_path, paulo@0: BOOL *authorized); paulo@0: paulo@0: /*****************************************************************************/ paulo@0: /* Push handling routines */ paulo@0: paulo@0: void gt_push_source_add (gt_guid_t *guid, in_addr_t ip, paulo@0: in_addr_t src_ip); paulo@0: void gt_push_source_remove (gt_guid_t *guid, in_addr_t ip, paulo@0: in_addr_t src_ip); paulo@0: BOOL gt_push_source_add_xfer (gt_guid_t *guid, in_addr_t ip, paulo@0: in_addr_t src_ip, paulo@0: struct gt_transfer *xfer); paulo@0: BOOL gt_push_source_add_conn (gt_guid_t *guid, in_addr_t ip, TCPC *c); paulo@0: paulo@0: void gt_push_source_remove_xfer (struct gt_transfer *xfer); paulo@0: void gt_push_source_remove_conn (TCPC *c); paulo@0: paulo@0: /*****************************************************************************/ paulo@0: paulo@0: int gnutella_download_start (struct protocol *p, struct transfer *transfer, paulo@0: struct chunk *chunk, struct source *source); paulo@0: void gnutella_download_stop (struct protocol *p, struct transfer *transfer, paulo@0: struct chunk *chunk, struct source *source, paulo@0: BOOL complete); paulo@0: paulo@0: /*****************************************************************************/ paulo@0: paulo@0: int gnutella_upload_start (struct protocol *p, struct transfer *transfer, paulo@0: struct chunk *chunk, struct source *source, paulo@0: unsigned long avail); paulo@0: void gnutella_upload_stop (struct protocol *p, struct transfer *transfer, paulo@0: struct chunk *chunk, struct source *source); paulo@0: void gnutella_upload_avail (struct protocol *p, unsigned long avail); paulo@0: paulo@0: /*****************************************************************************/ paulo@0: paulo@0: int gnutella_chunk_suspend (Protocol *p, struct transfer *transfer, paulo@0: struct chunk *chunk, struct source *source); paulo@0: int gnutella_chunk_resume (Protocol *p, struct transfer *transfer, paulo@0: struct chunk *chunk, struct source *source); paulo@0: paulo@0: /*****************************************************************************/ paulo@0: paulo@0: #endif /* GIFT_GT_XFER_H_ */