AccountChannelRequest.file_transfer


Description:

[ CCode ( has_construct_function = false ) ]
[ Version ( since = "0.19.0" ) ]
public AccountChannelRequest.file_transfer (Account account, string filename, string? mime_type, uint64 size, int64 user_action_time)

Convenience function to create a new AccountChannelRequest object, which will yield a FileTransfer channel to send a file to a contact.

After creating the request, you will also need to set the "target" of the channel by calling one of the following functions:

- set_target_contact - set_target_id

Parameters:

account

a Account

filename

a suggested name for the file, which should not contain directories or directory separators (for example, if you are sending a file called /home/user/monkey.pdf, set this to monkey.pdf)

mime_type

the MIME type (content-type) of the file; a null value is allowed, and is treated as "application/octet-stream"

size

the file's size in bytes

user_action_time

the time of the user action that caused this request, or one of the special values USER_ACTION_TIME_NOT_USER_ACTION or TP_USER_ACTION_TIME_CURRENT_TIME (see user_action_time)

Returns:

a new AccountChannelRequest object




2022 vala-language.org