Filetransfer init
From TrillWiki
The filetransfer_init notification is sent when a filetransfer is done being set up and is ready to start going.
Compatibility: 2.0 and higher
Contents |
Syntax
callback(int window_id, char *icontrol, "filetransfer_init", filetransfer_init_t *data, void *userData);
Note that all Trillian functions and notifications begin with a lower-case letter, despite the Wiki requirement that all pages start with a capital letter.
Parameters
Filetransfer init utilitizes the filetransfer_init_t structure.
struct filetransfer_init_t {
unsigned int struct_size;
char *medium;
int connection_id;
int filetransfer_id;
/* status of the transfer */
int accepted;
int resume;
/* preferences */
int incoming;
int ask_resume;
int ask_location;
int ask_screen_name;
int ask_medium;
int ask_description;
int ask_confirmation;
int in_contact_list;
unsigned int file_size;
unsigned int start_size; /* for resuming */
char *local_screen_name;
char *remote_screen_name;
char *filename;
char *description;
ttkCallback callback;
void *data;
};
- medium
- The medium for the file transfer.
- connection_id
- The connection id associated with the file transfer.
- accepted
- Set to 1 if the user accepted this transfer. This may happen on auto-accept or the user clicking the accpet button.
- resume
- If ask_resume was on, the file transfer may be resumed. If they chose to resume, this is set to 1.
- incoming
- Set to 1 if the file transfer is incoming, else 0.
- in_contact_list
- If the user is within the contact list on this connection, set this to 1 so that preferences for file transfers may be used to auto-accept, etc.
- file_size
- The file size if it's an outgoing file transfer.
- start_size
- The initial size of the file transfer. This is used for speed calculations for resumed file transfers. This is set to the current file size if resume is on.
- local_screen_name
- The local screen name of the file transfer.
- remote_screen_name
- The remote screen name of hte file transfer.
- filename
- The file to receive or send.
- callback
- The callback to use with the file transfer events.
- data
- The data to send with the above callback.
Return Value
Must return 0.
Remarks
This is sent both when a file transfer is rejected and when it is accepted.
See also: filetransferInit
