diff options
| author | ulim <a.sporto+bee@gmail.com> | 2007-12-03 15:28:45 +0100 | 
|---|---|---|
| committer | ulim <a.sporto+bee@gmail.com> | 2007-12-03 15:28:45 +0100 | 
| commit | 2ff20765990c756533957e8da9c7c29dd3102e79 (patch) | |
| tree | 8d19ceb1490866feee355ba9a098d7e4be6eea53 /protocols/ft.h | |
| parent | 2c2df7dd91930345a9b22a8bb61327d1dcc7e3d5 (diff) | |
Intermediate commit. Sending seems to work. TODOs:
* move from out_of_data to is_writable, eliminate buffers
* implement "transfers reject [id]"
* documentation in commands.xml
* implement throughput and cummulative throughput boundaries
* feature discovery before sending
* implement sending over a proxy
  (proxy discovery, socks5 client handshake for sending, activate message)
* integrate toxik-mek-ft
Diffstat (limited to 'protocols/ft.h')
| -rw-r--r-- | protocols/ft.h | 15 | 
1 files changed, 13 insertions, 2 deletions
| diff --git a/protocols/ft.h b/protocols/ft.h index 0ff44873..d41eb6c1 100644 --- a/protocols/ft.h +++ b/protocols/ft.h @@ -28,9 +28,10 @@  typedef enum {  	FT_STATUS_LISTENING	= 1, -	FT_STATUS_TRANSFERING	= 2, +	FT_STATUS_TRANSFERRING	= 2,  	FT_STATUS_FINISHED	= 4, -	FT_STATUS_CANCELED	= 8 +	FT_STATUS_CANCELED	= 8, +	FT_STATUS_CONNECTING	= 16  } file_status_t;  /* @@ -60,6 +61,10 @@ typedef enum {   *	                 \------------------------/   */  typedef struct file_transfer { + +	/* Are we sending something? */ +	int sending; +  	/*  	 * The current status of this file transfer.  	 */  @@ -130,6 +135,11 @@ typedef struct file_transfer {  	 */  	void (*out_of_data) ( struct file_transfer *file ); +	/* +	 * When sending files, protocols register this function to receive data. +	 */ +	gboolean (*write) (struct file_transfer *file, char *buffer, int len ); +  } file_transfer_t;  /* @@ -150,4 +160,5 @@ void imcb_file_canceled( file_transfer_t *file, char *reason );   */  gboolean imcb_file_write( file_transfer_t *file, gpointer data, size_t data_size ); +gboolean imcb_file_recv_start( file_transfer_t *ft );  #endif | 
