Changeset 5ebff60 for protocols/ft.h
- Timestamp:
- 2015-02-20T22:50:54Z (10 years ago)
- Branches:
- master
- Children:
- 0b9daac, 3d45471, 7733b8c
- Parents:
- af359b4
- git-author:
- Indent <please@…> (19-02-15 05:47:20)
- git-committer:
- dequis <dx@…> (20-02-15 22:50:54)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/ft.h
raf359b4 r5ebff60 35 35 36 36 typedef enum { 37 FT_STATUS_LISTENING 38 FT_STATUS_TRANSFERRING 39 FT_STATUS_FINISHED 40 FT_STATUS_CANCELED 41 FT_STATUS_CONNECTING 37 FT_STATUS_LISTENING = 1, 38 FT_STATUS_TRANSFERRING = 2, 39 FT_STATUS_FINISHED = 4, 40 FT_STATUS_CANCELED = 8, 41 FT_STATUS_CONNECTING = 16 42 42 } file_status_t; 43 43 … … 75 75 /* 76 76 * The current status of this file transfer. 77 */ 77 */ 78 78 file_status_t status; 79 79 80 80 /* 81 81 * file size 82 82 */ 83 83 size_t file_size; 84 84 85 85 /* 86 86 * Number of bytes that have been successfully transferred. … … 108 108 gpointer data; 109 109 struct im_connection *ic; 110 110 111 111 /* 112 112 * Private data. 113 113 */ 114 114 gpointer priv; 115 115 116 116 /* 117 117 * If set, called after succesful connection setup. 118 118 */ 119 void (*accept) ( struct file_transfer *file);120 119 void (*accept)(struct file_transfer *file); 120 121 121 /* 122 122 * If set, called when the transfer is canceled or finished. … … 124 124 * 125 125 */ 126 void (*free) ( struct file_transfer *file);127 126 void (*free)(struct file_transfer *file); 127 128 128 /* 129 129 * If set, called when the transfer is finished and successful. 130 130 */ 131 void (*finished) ( struct file_transfer *file);132 131 void (*finished)(struct file_transfer *file); 132 133 133 /* 134 134 * If set, called when the transfer is canceled. … … 136 136 * a call to imcb_file_canceled ) 137 137 */ 138 void (*canceled) ( struct file_transfer *file, char *reason);139 138 void (*canceled)(struct file_transfer *file, char *reason); 139 140 140 /* 141 141 * called by the sending side to indicate that it is writable. 142 * The callee should check if data is available and call the 142 * The callee should check if data is available and call the 143 143 * function(as seen below) if that is the case. 144 144 */ 145 gboolean (*write_request) ( struct file_transfer *file);145 gboolean (*write_request)(struct file_transfer *file); 146 146 147 147 /* … … 151 151 * avoids buffering. 152 152 */ 153 gboolean (*write) (struct file_transfer *file, char *buffer, unsigned int len);153 gboolean (*write)(struct file_transfer *file, char *buffer, unsigned int len); 154 154 155 155 /* The send buffer associated with this transfer. … … 163 163 * This starts a file transfer from bitlbee to the user. 164 164 */ 165 file_transfer_t *imcb_file_send_start( struct im_connection *ic, char *user_nick, char *file_name, size_t file_size);165 file_transfer_t *imcb_file_send_start(struct im_connection *ic, char *user_nick, char *file_name, size_t file_size); 166 166 167 167 /* … … 169 169 * the canceled() and free() callbacks given in file will be called by this function. 170 170 */ 171 void imcb_file_canceled( struct im_connection *ic, file_transfer_t *file, char *reason);171 void imcb_file_canceled(struct im_connection *ic, file_transfer_t *file, char *reason); 172 172 173 gboolean imcb_file_recv_start( struct im_connection *ic, file_transfer_t *ft);173 gboolean imcb_file_recv_start(struct im_connection *ic, file_transfer_t *ft); 174 174 175 void imcb_file_finished( struct im_connection *ic, file_transfer_t *file);175 void imcb_file_finished(struct im_connection *ic, file_transfer_t *file); 176 176 #endif
Note: See TracChangeset
for help on using the changeset viewer.