mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
Create concurrent TCP handle and implement RSD for non-lifetime structs
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user