2024-07-15 13:35:37 +02:00
|
|
|
use ruma::http_headers::ContentDisposition;
|
|
|
|
|
2022-09-07 13:25:51 +02:00
|
|
|
use crate::Result;
|
|
|
|
|
2022-10-05 15:33:57 +02:00
|
|
|
pub trait Data: Send + Sync {
|
2022-10-05 20:34:31 +02:00
|
|
|
fn create_file_metadata(
|
|
|
|
&self,
|
|
|
|
mxc: String,
|
|
|
|
width: u32,
|
|
|
|
height: u32,
|
2024-07-15 13:35:37 +02:00
|
|
|
content_disposition: &ContentDisposition,
|
2022-10-05 20:34:31 +02:00
|
|
|
content_type: Option<&str>,
|
|
|
|
) -> Result<Vec<u8>>;
|
2022-09-07 13:25:51 +02:00
|
|
|
|
|
|
|
/// Returns content_disposition, content_type and the metadata key.
|
2022-10-05 20:34:31 +02:00
|
|
|
fn search_file_metadata(
|
|
|
|
&self,
|
|
|
|
mxc: String,
|
|
|
|
width: u32,
|
|
|
|
height: u32,
|
2024-07-15 13:35:37 +02:00
|
|
|
) -> Result<(ContentDisposition, Option<String>, Vec<u8>)>;
|
2022-09-07 13:25:51 +02:00
|
|
|
}
|