1 |
/* giFTcurs - curses interface to giFT |
/* giFTcurs - curses interface to giFT |
2 |
* Copyright (C) 2001, 2002, 2003 Göran Weinholt <weinholt@dtek.chalmers.se> |
* Copyright (C) 2001-2004 Göran Weinholt <weinholt@dtek.chalmers.se> |
3 |
* Copyright (C) 2003 Christian Häggström <chm@c00.info> |
* Copyright (C) 2003-2004 Christian Häggström <chm@c00.info> |
4 |
* |
* |
5 |
* This file is part of giFTcurs. |
* This file is part of giFTcurs. |
6 |
* |
* |
67 |
|
|
68 |
typedef struct _transfer_t { |
typedef struct _transfer_t { |
69 |
tree_node tnode; |
tree_node tnode; |
70 |
gift_id id; |
GString *xferobj; /* Used to uniquely identify the transfer */ |
71 |
char *filename; |
char *filename; |
72 |
char *protocol; |
char *protocol; |
73 |
guint64 filesize, transferred; |
guint64 filesize, transferred; |
79 |
|
|
80 |
unsigned paused:1; |
unsigned paused:1; |
81 |
unsigned autodestroy:1; |
unsigned autodestroy:1; |
82 |
|
unsigned active:1; |
|
/* Download specific variables */ |
|
|
gift_id search_id; /* id receiving search results from giFT */ |
|
83 |
} transfer; |
} transfer; |
84 |
|
|
85 |
typedef struct { |
typedef struct { |
95 |
|
|
96 |
void transfers_init(void); |
void transfers_init(void); |
97 |
|
|
98 |
|
void download_start(GString *searchobj, GString *resultobj); |
99 |
|
|
100 |
transfer *transfer_find(transfer_tree *, const char *filename, const char *hash, unsigned int size, |
transfer *transfer_find(transfer_tree *, const char *filename, const char *hash, unsigned int size, |
101 |
gboolean deadness); |
gboolean deadness); |
102 |
source *lookup_source(transfer *t, const char *user, const char *href) G_GNUC_PURE; |
source *lookup_source(transfer *t, const char *user, const char *href) G_GNUC_PURE; |