mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-08 07:56:55 -04:00
feat(ffi): add UploadSource for representing upload data
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
This commit is contained in:
committed by
Damir Jelić
parent
1e835b24fb
commit
02fdf8c0d3
@@ -223,6 +223,23 @@ pub struct UploadParameters {
|
||||
use_send_queue: bool,
|
||||
}
|
||||
|
||||
/// A source for uploading a file
|
||||
#[derive(uniffi::Enum)]
|
||||
pub enum UploadSource {
|
||||
/// Upload source is a file on disk
|
||||
File {
|
||||
/// Path to file
|
||||
filename: String,
|
||||
},
|
||||
/// Upload source is data in memory
|
||||
Data {
|
||||
/// Data being uploaded
|
||||
data: Vec<u8>,
|
||||
/// Filename to associate with data
|
||||
filename: String,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(uniffi::Record)]
|
||||
pub struct ReplyParameters {
|
||||
/// The ID of the event to reply to.
|
||||
|
||||
Reference in New Issue
Block a user