feat(ffi): add UploadSource for representing upload data

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
This commit is contained in:
Michael Goldenberg
2025-04-25 17:30:30 -04:00
committed by Damir Jelić
parent 1e835b24fb
commit 02fdf8c0d3

View File

@@ -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.