rev |
line source |
paulo@0
|
1 /*
|
paulo@0
|
2 * $Id: gt_xfer.h,v 1.27 2004/05/05 10:30:12 hipnod Exp $
|
paulo@0
|
3 *
|
paulo@0
|
4 * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net)
|
paulo@0
|
5 *
|
paulo@0
|
6 * This program is free software; you can redistribute it and/or modify it
|
paulo@0
|
7 * under the terms of the GNU General Public License as published by the
|
paulo@0
|
8 * Free Software Foundation; either version 2, or (at your option) any
|
paulo@0
|
9 * later version.
|
paulo@0
|
10 *
|
paulo@0
|
11 * This program is distributed in the hope that it will be useful, but
|
paulo@0
|
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
|
paulo@0
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
paulo@0
|
14 * General Public License for more details.
|
paulo@0
|
15 */
|
paulo@0
|
16
|
paulo@0
|
17 #ifndef GIFT_GT_XFER_H_
|
paulo@0
|
18 #define GIFT_GT_XFER_H_
|
paulo@0
|
19
|
paulo@0
|
20 /*****************************************************************************/
|
paulo@0
|
21
|
paulo@0
|
22 struct transfer;
|
paulo@0
|
23 struct source;
|
paulo@0
|
24 struct chunk;
|
paulo@0
|
25
|
paulo@0
|
26 struct gt_transfer;
|
paulo@0
|
27
|
paulo@0
|
28 /*****************************************************************************/
|
paulo@0
|
29
|
paulo@0
|
30 char *gt_localize_request (struct gt_transfer *xfer, char *s_path,
|
paulo@0
|
31 BOOL *authorized);
|
paulo@0
|
32
|
paulo@0
|
33 /*****************************************************************************/
|
paulo@0
|
34 /* Push handling routines */
|
paulo@0
|
35
|
paulo@0
|
36 void gt_push_source_add (gt_guid_t *guid, in_addr_t ip,
|
paulo@0
|
37 in_addr_t src_ip);
|
paulo@0
|
38 void gt_push_source_remove (gt_guid_t *guid, in_addr_t ip,
|
paulo@0
|
39 in_addr_t src_ip);
|
paulo@0
|
40 BOOL gt_push_source_add_xfer (gt_guid_t *guid, in_addr_t ip,
|
paulo@0
|
41 in_addr_t src_ip,
|
paulo@0
|
42 struct gt_transfer *xfer);
|
paulo@0
|
43 BOOL gt_push_source_add_conn (gt_guid_t *guid, in_addr_t ip, TCPC *c);
|
paulo@0
|
44
|
paulo@0
|
45 void gt_push_source_remove_xfer (struct gt_transfer *xfer);
|
paulo@0
|
46 void gt_push_source_remove_conn (TCPC *c);
|
paulo@0
|
47
|
paulo@0
|
48 /*****************************************************************************/
|
paulo@0
|
49
|
paulo@0
|
50 int gnutella_download_start (struct protocol *p, struct transfer *transfer,
|
paulo@0
|
51 struct chunk *chunk, struct source *source);
|
paulo@0
|
52 void gnutella_download_stop (struct protocol *p, struct transfer *transfer,
|
paulo@0
|
53 struct chunk *chunk, struct source *source,
|
paulo@0
|
54 BOOL complete);
|
paulo@0
|
55
|
paulo@0
|
56 /*****************************************************************************/
|
paulo@0
|
57
|
paulo@0
|
58 int gnutella_upload_start (struct protocol *p, struct transfer *transfer,
|
paulo@0
|
59 struct chunk *chunk, struct source *source,
|
paulo@0
|
60 unsigned long avail);
|
paulo@0
|
61 void gnutella_upload_stop (struct protocol *p, struct transfer *transfer,
|
paulo@0
|
62 struct chunk *chunk, struct source *source);
|
paulo@0
|
63 void gnutella_upload_avail (struct protocol *p, unsigned long avail);
|
paulo@0
|
64
|
paulo@0
|
65 /*****************************************************************************/
|
paulo@0
|
66
|
paulo@0
|
67 int gnutella_chunk_suspend (Protocol *p, struct transfer *transfer,
|
paulo@0
|
68 struct chunk *chunk, struct source *source);
|
paulo@0
|
69 int gnutella_chunk_resume (Protocol *p, struct transfer *transfer,
|
paulo@0
|
70 struct chunk *chunk, struct source *source);
|
paulo@0
|
71
|
paulo@0
|
72 /*****************************************************************************/
|
paulo@0
|
73
|
paulo@0
|
74 #endif /* GIFT_GT_XFER_H_ */
|