diff --git a/Cargo.toml b/Cargo.toml index e71720265..d33ca8f8d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ hex = "0.4.0" hickory-resolver = "0.24" humansize = "2" image = { version = "0.24.7", default-features=false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } -iroh = { version = "0.4.1", default-features = false } +iroh04 = { package = "iroh", version = "0.4.1", default-features = false } kamadak-exif = "0.5" lettre_email = { git = "https://github.com/deltachat/lettre", branch = "master" } libc = "0.2" diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index 545bd94bd..2708dc39a 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -32,12 +32,12 @@ use std::task::Poll; use anyhow::{anyhow, bail, ensure, format_err, Context as _, Result}; use async_channel::Receiver; use futures_lite::StreamExt; -use iroh::blobs::Collection; -use iroh::get::DataStream; -use iroh::progress::ProgressEmitter; -use iroh::protocol::AuthToken; -use iroh::provider::{DataSource, Event, Provider, Ticket}; -use iroh::Hash; +use iroh04::blobs::Collection; +use iroh04::get::DataStream; +use iroh04::progress::ProgressEmitter; +use iroh04::protocol::AuthToken; +use iroh04::provider::{DataSource, Event, Provider, Ticket}; +use iroh04::Hash; use tokio::fs::{self, File}; use tokio::io::{self, AsyncWriteExt, BufWriter}; use tokio::sync::broadcast::error::RecvError; @@ -176,7 +176,7 @@ impl BackupProvider { } // Start listening. - let (db, hash) = iroh::provider::create_collection(files).await?; + let (db, hash) = iroh04::provider::create_collection(files).await?; context.emit_event(SendProgress::CollectionCreated.into()); let provider = Provider::builder(db) .bind_addr((Ipv4Addr::UNSPECIFIED, 0).into()) @@ -382,7 +382,7 @@ impl From for EventType { /// This is a long running operation which will only when completed. /// /// Using [`Qr`] as argument is a bit odd as it only accepts one specific variant of it. It -/// does avoid having [`iroh::provider::Ticket`] in the primary API however, without +/// does avoid having [`iroh04::provider::Ticket`] in the primary API however, without /// having to revert to untyped bytes. pub async fn get_backup(context: &Context, qr: Qr) -> Result<()> { ensure!( @@ -456,7 +456,7 @@ async fn transfer_from_provider(context: &Context, ticket: &Ticket) -> Result<() // Perform the transfer. let keylog = false; // Do not enable rustls SSLKEYLOGFILE env var functionality - let stats = iroh::get::run_ticket( + let stats = iroh04::get::run_ticket( ticket, keylog, MAX_CONCURRENT_DIALS, diff --git a/src/qr.rs b/src/qr.rs index 7d89d3e93..c8a84e1bc 100644 --- a/src/qr.rs +++ b/src/qr.rs @@ -114,7 +114,7 @@ pub enum Qr { /// information to connect to and authenticate a backup provider. /// /// The format is somewhat opaque, but `sendme` can deserialise this. - ticket: iroh::provider::Ticket, + ticket: iroh04::provider::Ticket, }, /// Ask the user if they want to use the given service for video chats. @@ -497,12 +497,12 @@ fn decode_webrtc_instance(_context: &Context, qr: &str) -> Result { /// Decodes a [`DCBACKUP_SCHEME`] QR code. /// /// The format of this scheme is `DCBACKUP:`. The encoding is the -/// [`iroh::provider::Ticket`]'s `Display` impl. +/// [`iroh04::provider::Ticket`]'s `Display` impl. fn decode_backup(qr: &str) -> Result { let payload = qr .strip_prefix(DCBACKUP_SCHEME) .ok_or_else(|| anyhow!("invalid DCBACKUP scheme"))?; - let ticket: iroh::provider::Ticket = payload.parse().context("invalid DCBACKUP payload")?; + let ticket: iroh04::provider::Ticket = payload.parse().context("invalid DCBACKUP payload")?; Ok(Qr::Backup { ticket }) }