2021-02-16 13:37:18 +03:00
|
|
|
mod error;
|
2021-02-16 13:38:54 +03:00
|
|
|
mod logger;
|
2021-02-16 13:34:01 +03:00
|
|
|
mod machine;
|
2021-04-06 16:36:21 +03:00
|
|
|
mod responses;
|
2021-02-16 13:34:01 +03:00
|
|
|
|
2021-03-30 15:28:53 +03:00
|
|
|
pub use error::{CryptoStoreError, DecryptionError, KeyImportError, MachineCreationError};
|
2021-02-16 13:38:54 +03:00
|
|
|
pub use logger::{set_logger, Logger};
|
2021-04-06 16:36:21 +03:00
|
|
|
pub use machine::{Device, OlmMachine, Sas};
|
|
|
|
pub use responses::{DeviceLists, KeysImportResult, Request, RequestType};
|
2021-03-30 14:46:35 +03:00
|
|
|
|
|
|
|
pub trait ProgressListener {
|
|
|
|
fn on_progress(&self, progress: i32, total: i32);
|
|
|
|
}
|
2021-02-16 13:18:31 +03:00
|
|
|
|
2021-04-06 16:36:21 +03:00
|
|
|
/// An event that was successfully decrypted.
|
|
|
|
pub struct DecryptedEvent {
|
|
|
|
/// The decrypted version of the event.
|
|
|
|
pub clear_event: String,
|
|
|
|
/// The claimed curve25519 key of the sender.
|
|
|
|
pub sender_curve25519_key: String,
|
|
|
|
/// The claimed ed25519 key of the sender.
|
|
|
|
pub claimed_ed25519_key: Option<String>,
|
|
|
|
/// The curve25519 chain of the senders that forwarded the Megolm decryption
|
|
|
|
/// key to us. Is empty if the key came directly from the sender of the
|
|
|
|
/// event.
|
|
|
|
pub forwarding_curve25519_chain: Vec<String>,
|
|
|
|
}
|
|
|
|
|
2021-02-09 17:41:01 +03:00
|
|
|
include!(concat!(env!("OUT_DIR"), "/olm.uniffi.rs"));
|