Move xpc library to mods

This commit is contained in:
Jackson Coxson
2025-01-25 19:11:40 -07:00
parent eee3cae883
commit 8bfd43cce3
4 changed files with 31 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ path = "src/tools/mounter.rs"
required-features = ["sha2", "ureq"]
[dependencies]
tokio = { version = "1.43", features = ["io-util", "macros", "time"] }
tokio = { version = "1.43", features = ["io-util", "macros", "time", "full"] }
tokio-openssl = { version = "0.6" }
plist = { version = "1.7" }
serde = { version = "1", features = ["derive"] }

13
src/core_device_proxy.rs Normal file
View File

@@ -0,0 +1,13 @@
// Jackson Coxson
use crate::{Idevice, IdeviceError};
pub struct CoreDeviceProxy {
pub idevice: Idevice,
}
impl CoreDeviceProxy {
pub fn new(idevice: Idevice) -> Self {
Self { idevice }
}
}

View File

@@ -1,5 +1,6 @@
// Jackson Coxson
pub mod core_device_proxy;
pub mod heartbeat;
pub mod http2;
pub mod installation_proxy;

View File

@@ -147,4 +147,20 @@ mod tests {
.unwrap();
println!("ayo: {:?}", data);
}
#[tokio::test]
async fn huh() {
let mut client = XPCConnection::new(Box::new(
TcpStream::connect(("10.7.0.2", 58783)).await.unwrap(),
))
.await
.unwrap();
let data = client
.read_message(http2::Connection::ROOT_CHANNEL)
.await
.unwrap();
println!("{data:?}");
}
}