Create concurrent TCP handle and implement RSD for non-lifetime structs

This commit is contained in:
Jackson Coxson
2025-08-11 10:41:55 -06:00
parent 713a2ae0c2
commit 0a0899cd8a
28 changed files with 536 additions and 149 deletions

View File

@@ -7,13 +7,12 @@ use std::{
use idevice::{
IdeviceError, IdeviceService, core_device_proxy::CoreDeviceProxy, provider::IdeviceProvider,
tcp::adapter::Adapter,
};
use crate::{IdeviceFfiError, IdeviceHandle, RUNTIME, ffi_err, provider::IdeviceProviderHandle};
pub struct CoreDeviceProxyHandle(pub CoreDeviceProxy);
pub struct AdapterHandle(pub Adapter);
pub struct AdapterHandle(pub idevice::tcp::handle::AdapterHandle);
/// Automatically creates and connects to Core Device Proxy, returning a client handle
///
@@ -312,7 +311,7 @@ pub unsafe extern "C" fn core_device_proxy_create_tcp_adapter(
match result {
Ok(adapter_obj) => {
let boxed = Box::new(AdapterHandle(adapter_obj));
let boxed = Box::new(AdapterHandle(adapter_obj.to_async_handle()));
unsafe { *adapter = Box::into_raw(boxed) };
null_mut()
}