Changeset 2ff2076 for protocols/ft.h


Ignore:
Timestamp:
2007-12-03T14:28:45Z (13 years ago)
Author:
ulim <a.sporto+bee@…>
Branches:
master
Children:
dce3903
Parents:
2c2df7d
Message:

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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/ft.h

    r2c2df7d r2ff2076  
    2929typedef enum {
    3030        FT_STATUS_LISTENING     = 1,
    31         FT_STATUS_TRANSFERING   = 2,
     31        FT_STATUS_TRANSFERRING  = 2,
    3232        FT_STATUS_FINISHED      = 4,
    33         FT_STATUS_CANCELED      = 8
     33        FT_STATUS_CANCELED      = 8,
     34        FT_STATUS_CONNECTING    = 16
    3435} file_status_t;
    3536
     
    6162 */
    6263typedef struct file_transfer {
     64
     65        /* Are we sending something? */
     66        int sending;
     67
    6368        /*
    6469         * The current status of this file transfer.
     
    131136        void (*out_of_data) ( struct file_transfer *file );
    132137
     138        /*
     139         * When sending files, protocols register this function to receive data.
     140         */
     141        gboolean (*write) (struct file_transfer *file, char *buffer, int len );
     142
    133143} file_transfer_t;
    134144
     
    151161gboolean imcb_file_write( file_transfer_t *file, gpointer data, size_t data_size );
    152162
     163gboolean imcb_file_recv_start( file_transfer_t *ft );
    153164#endif
Note: See TracChangeset for help on using the changeset viewer.