Implement CameraX GPG QR transfer on Android (#106)
Android ARM verification / rust (push) Failing after 47m42s
Android ARM verification / android (push) Failing after 8s
Dependency security audit / rustsec (push) Successful in 23s

This commit is contained in:
hugo committed 2026-10-12 09:49:38 +02:00
1 parent 6669b77f4e
commit d466b170ab
33 files changed
+1616 -162

No files matched your search

+29
View File
@@ -1581,6 +1581,10 @@ pub struct MobileKeyTransfer {
#[uniffi::export]
impl MobileKeyTransfer {
pub fn export_visible(&self) -> bool {
self.service.export_visible()
}
pub fn keys(&self) -> Vec<MobileKeyTransferKey> {
self.service.keys().iter().map(Into::into).collect()
}
@@ -1635,6 +1639,31 @@ pub struct MobileKeyTransferImport {
#[uniffi::export]
impl MobileKeyTransferImport {
pub fn add_camera(
&self,
frame: platform::MobileCameraFrame,
rotation_degrees: u32,
) -> Result<Option<MobileKeyTransferProgress>, MobileKeyTransferFfiError> {
self.importer
.lock()
.map_err(|_| MobileKeyTransferFfiError::Failed {
kind: MobileKeyTransferErrorKind::Failed,
message: "the key-transfer session is unavailable".to_owned(),
})?
.add_camera(
ironstorage::mobile_platform::MobileCameraFrame {
luminance: ironstorage::repository::SecretBytes::new(frame.luminance),
width: frame.width,
height: frame.height,
row_stride: frame.row_stride,
pixel_stride: frame.pixel_stride,
},
rotation_degrees,
)
.map(|progress| progress.map(Into::into))
.map_err(Into::into)
}
pub fn add_image(
&self,
image: Vec<u8>,