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