Exemplo n.º 1
0
        public static int usbmuxd_read_buid(out string buid)
        {
            System.Runtime.InteropServices.ICustomMarshaler buidMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr buidNative  = System.IntPtr.Zero;
            int           returnValue = UsbmuxdNativeMethods.usbmuxd_read_buid(out buidNative);

            buid = ((string)buidMarshaler.MarshalNativeToManaged(buidNative));
            buidMarshaler.CleanUpNativeData(buidNative);
            return(returnValue);
        }
Exemplo n.º 2
0
        public static int usbmuxd_read_pair_record(string recordId, out string recordData, ref uint recordSize)
        {
            System.Runtime.InteropServices.ICustomMarshaler recordDataMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr recordDataNative = System.IntPtr.Zero;
            int           returnValue      = UsbmuxdNativeMethods.usbmuxd_read_pair_record(recordId, out recordDataNative, ref recordSize);

            recordData = ((string)recordDataMarshaler.MarshalNativeToManaged(recordDataNative));
            recordDataMarshaler.CleanUpNativeData(recordDataNative);
            return(returnValue);
        }
        public static RestoreError restored_query_type(RestoreClientHandle client, out string type, ref ulong version)
        {
            System.Runtime.InteropServices.ICustomMarshaler typeMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr typeNative  = System.IntPtr.Zero;
            RestoreError  returnValue = RestoreNativeMethods.restored_query_type(client, out typeNative, ref version);

            type = ((string)typeMarshaler.MarshalNativeToManaged(typeNative));
            typeMarshaler.CleanUpNativeData(typeNative);
            return(returnValue);
        }
Exemplo n.º 4
0
        public static int usbmuxd_get_tcp_endpoint(out string host, ref ushort port)
        {
            System.Runtime.InteropServices.ICustomMarshaler hostMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr hostNative  = System.IntPtr.Zero;
            int           returnValue = UsbmuxdNativeMethods.usbmuxd_get_tcp_endpoint(out hostNative, ref port);

            host = ((string)hostMarshaler.MarshalNativeToManaged(hostNative));
            hostMarshaler.CleanUpNativeData(hostNative);
            return(returnValue);
        }
Exemplo n.º 5
0
        public static NotificationProxyError np_observe_notifications(NotificationProxyClientHandle client, out string notificationSpec)
        {
            System.Runtime.InteropServices.ICustomMarshaler notificationSpecMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr          notificationSpecNative = System.IntPtr.Zero;
            NotificationProxyError returnValue            = NotificationProxyNativeMethods.np_observe_notifications(client, out notificationSpecNative);

            notificationSpec = ((string)notificationSpecMarshaler.MarshalNativeToManaged(notificationSpecNative));
            notificationSpecMarshaler.CleanUpNativeData(notificationSpecNative);
            return(returnValue);
        }
        public static MobileSyncError mobilesync_start(MobileSyncClientHandle client, byte[] dataClass, MobileSyncAnchorsHandle anchors, ulong computerDataClassVersion, ref MobileSyncSyncType syncType, ref ulong deviceDataClassVersion, out string errorDescription)
        {
            System.Runtime.InteropServices.ICustomMarshaler errorDescriptionMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr   errorDescriptionNative = System.IntPtr.Zero;
            MobileSyncError returnValue            = MobileSyncNativeMethods.mobilesync_start(client, dataClass, anchors, computerDataClassVersion, ref syncType, ref deviceDataClassVersion, out errorDescriptionNative);

            errorDescription = ((string)errorDescriptionMarshaler.MarshalNativeToManaged(errorDescriptionNative));
            errorDescriptionMarshaler.CleanUpNativeData(errorDescriptionNative);
            return(returnValue);
        }
        public static iDeviceActivationError idevice_activation_response_to_buffer(iDeviceActivationResponseHandle response, out string buffer, ref uint size)
        {
            System.Runtime.InteropServices.ICustomMarshaler bufferMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr          bufferNative = System.IntPtr.Zero;
            iDeviceActivationError returnValue  = iDeviceActivationNativeMethods.idevice_activation_response_to_buffer(response, out bufferNative, ref size);

            buffer = ((string)bufferMarshaler.MarshalNativeToManaged(bufferNative));
            bufferMarshaler.CleanUpNativeData(bufferNative);
            return(returnValue);
        }
        public static DebugServerError debugserver_client_receive_response(DebugServerClientHandle client, out string response, ref uint responseSize)
        {
            System.Runtime.InteropServices.ICustomMarshaler responseMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr    responseNative = System.IntPtr.Zero;
            DebugServerError returnValue    = DebugServerNativeMethods.debugserver_client_receive_response(client, out responseNative, ref responseSize);

            response = ((string)responseMarshaler.MarshalNativeToManaged(responseNative));
            responseMarshaler.CleanUpNativeData(responseNative);
            return(returnValue);
        }
        public static iDeviceError idevice_get_device_list(out System.Collections.ObjectModel.ReadOnlyCollection <string> devices, ref int count)
        {
            System.Runtime.InteropServices.ICustomMarshaler devicesMarshaler = iDeviceListMarshaler.GetInstance(null);
            System.IntPtr devicesNative = System.IntPtr.Zero;
            iDeviceError  returnValue   = iDeviceNativeMethods.idevice_get_device_list(out devicesNative, ref count);

            devices = ((System.Collections.ObjectModel.ReadOnlyCollection <string>)devicesMarshaler.MarshalNativeToManaged(devicesNative));
            devicesMarshaler.CleanUpNativeData(devicesNative);
            return(returnValue);
        }
        public static AfcError afc_get_device_info_key(AfcClientHandle client, string key, out string value)
        {
            System.Runtime.InteropServices.ICustomMarshaler valueMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr valueNative = System.IntPtr.Zero;
            AfcError      returnValue = AfcNativeMethods.afc_get_device_info_key(client, key, out valueNative);

            value = ((string)valueMarshaler.MarshalNativeToManaged(valueNative));
            valueMarshaler.CleanUpNativeData(valueNative);
            return(returnValue);
        }
        public static AfcError afc_get_device_info(AfcClientHandle client, out System.Collections.ObjectModel.ReadOnlyCollection <string> deviceInformation)
        {
            System.Runtime.InteropServices.ICustomMarshaler deviceInformationMarshaler = AfcDictionaryMarshaler.GetInstance(null);
            System.IntPtr deviceInformationNative = System.IntPtr.Zero;
            AfcError      returnValue             = AfcNativeMethods.afc_get_device_info(client, out deviceInformationNative);

            deviceInformation = ((System.Collections.ObjectModel.ReadOnlyCollection <string>)deviceInformationMarshaler.MarshalNativeToManaged(deviceInformationNative));
            deviceInformationMarshaler.CleanUpNativeData(deviceInformationNative);
            return(returnValue);
        }
        public static InstallationProxyError instproxy_client_get_path_for_bundle_identifier(InstallationProxyClientHandle client, string bundleId, out string path)
        {
            System.Runtime.InteropServices.ICustomMarshaler pathMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr          pathNative  = System.IntPtr.Zero;
            InstallationProxyError returnValue = InstallationProxyNativeMethods.instproxy_client_get_path_for_bundle_identifier(client, bundleId, out pathNative);

            path = ((string)pathMarshaler.MarshalNativeToManaged(pathNative));
            pathMarshaler.CleanUpNativeData(pathNative);
            return(returnValue);
        }
Exemplo n.º 13
0
        public static MobileBackup2Error mobilebackup2_receive_message(MobileBackup2ClientHandle client, out PlistHandle msgPlist, out string dlmessage)
        {
            System.Runtime.InteropServices.ICustomMarshaler dlmessageMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr      dlmessageNative = System.IntPtr.Zero;
            MobileBackup2Error returnValue     = MobileBackup2NativeMethods.mobilebackup2_receive_message(client, out msgPlist, out dlmessageNative);

            dlmessage = ((string)dlmessageMarshaler.MarshalNativeToManaged(dlmessageNative));
            dlmessageMarshaler.CleanUpNativeData(dlmessageNative);
            return(returnValue);
        }
        public static LockdownError lockdownd_get_sync_data_classes(LockdownClientHandle client, out System.Collections.ObjectModel.ReadOnlyCollection <string> classes, ref int count)
        {
            System.Runtime.InteropServices.ICustomMarshaler classesMarshaler = LockdownMarshaler.GetInstance(null);
            System.IntPtr classesNative = System.IntPtr.Zero;
            LockdownError returnValue   = LockdownNativeMethods.lockdownd_get_sync_data_classes(client, out classesNative, ref count);

            classes = ((System.Collections.ObjectModel.ReadOnlyCollection <string>)classesMarshaler.MarshalNativeToManaged(classesNative));
            classesMarshaler.CleanUpNativeData(classesNative);
            return(returnValue);
        }
        public static InstallationProxyError instproxy_check_capabilities_match(InstallationProxyClientHandle client, out string capabilities, PlistHandle clientOptions, out PlistHandle result)
        {
            System.Runtime.InteropServices.ICustomMarshaler capabilitiesMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr          capabilitiesNative = System.IntPtr.Zero;
            InstallationProxyError returnValue        = InstallationProxyNativeMethods.instproxy_check_capabilities_match(client, out capabilitiesNative, clientOptions, out result);

            capabilities = ((string)capabilitiesMarshaler.MarshalNativeToManaged(capabilitiesNative));
            capabilitiesMarshaler.CleanUpNativeData(capabilitiesNative);
            return(returnValue);
        }
        public static LockdownError lockdownd_get_device_udid(LockdownClientHandle client, out string udid)
        {
            System.Runtime.InteropServices.ICustomMarshaler udidMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr udidNative  = System.IntPtr.Zero;
            LockdownError returnValue = LockdownNativeMethods.lockdownd_get_device_udid(client, out udidNative);

            udid = ((string)udidMarshaler.MarshalNativeToManaged(udidNative));
            udidMarshaler.CleanUpNativeData(udidNative);
            return(returnValue);
        }
        public static LockdownError lockdownd_get_device_name(LockdownClientHandle client, out string deviceName)
        {
            System.Runtime.InteropServices.ICustomMarshaler deviceNameMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr deviceNameNative = System.IntPtr.Zero;
            LockdownError returnValue      = LockdownNativeMethods.lockdownd_get_device_name(client, out deviceNameNative);

            deviceName = ((string)deviceNameMarshaler.MarshalNativeToManaged(deviceNameNative));
            deviceNameMarshaler.CleanUpNativeData(deviceNameNative);
            return(returnValue);
        }
        public static LockdownError lockdownd_query_type(LockdownClientHandle client, out string type)
        {
            System.Runtime.InteropServices.ICustomMarshaler typeMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr typeNative  = System.IntPtr.Zero;
            LockdownError returnValue = LockdownNativeMethods.lockdownd_query_type(client, out typeNative);

            type = ((string)typeMarshaler.MarshalNativeToManaged(typeNative));
            typeMarshaler.CleanUpNativeData(typeNative);
            return(returnValue);
        }
        public static LockdownError lockdownd_start_session(LockdownClientHandle client, string hostId, out string sessionId, ref int sslEnabled)
        {
            System.Runtime.InteropServices.ICustomMarshaler sessionIdMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr sessionIdNative = System.IntPtr.Zero;
            LockdownError returnValue     = LockdownNativeMethods.lockdownd_start_session(client, hostId, out sessionIdNative, ref sslEnabled);

            sessionId = ((string)sessionIdMarshaler.MarshalNativeToManaged(sessionIdNative));
            sessionIdMarshaler.CleanUpNativeData(sessionIdNative);
            return(returnValue);
        }
Exemplo n.º 20
0
        public static FileRelayError file_relay_request_sources_timeout(FileRelayClientHandle client, out string sources, out iDeviceConnectionHandle connection, uint timeout)
        {
            System.Runtime.InteropServices.ICustomMarshaler sourcesMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr  sourcesNative = System.IntPtr.Zero;
            FileRelayError returnValue   = FileRelayNativeMethods.file_relay_request_sources_timeout(client, out sourcesNative, out connection, timeout);

            sources = ((string)sourcesMarshaler.MarshalNativeToManaged(sourcesNative));
            sourcesMarshaler.CleanUpNativeData(sourcesNative);
            return(returnValue);
        }
        public static iDeviceError idevice_get_udid(iDeviceHandle device, out string udid)
        {
            System.Runtime.InteropServices.ICustomMarshaler udidMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr udidNative  = System.IntPtr.Zero;
            iDeviceError  returnValue = iDeviceNativeMethods.idevice_get_udid(device, out udidNative);

            udid = ((string)udidMarshaler.MarshalNativeToManaged(udidNative));
            udidMarshaler.CleanUpNativeData(udidNative);
            return(returnValue);
        }
        public static RecoveryError irecv_getenv(RecoveryClientHandle client, string variable, out string value)
        {
            System.Runtime.InteropServices.ICustomMarshaler valueMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr valueNative = System.IntPtr.Zero;
            RecoveryError returnValue = RecoveryNativeMethods.irecv_getenv(client, variable, out valueNative);

            value = ((string)valueMarshaler.MarshalNativeToManaged(valueNative));
            valueMarshaler.CleanUpNativeData(valueNative);
            return(returnValue);
        }
Exemplo n.º 23
0
        public static DebugServerError debugserver_client_set_environment_hex_encoded(DebugServerClientHandle client, string env, out string response)
        {
            System.Runtime.InteropServices.ICustomMarshaler responseMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr    responseNative = System.IntPtr.Zero;
            DebugServerError returnValue    = DebugServerNativeMethods.debugserver_client_set_environment_hex_encoded(client, env, out responseNative);

            response = ((string)responseMarshaler.MarshalNativeToManaged(responseNative));
            responseMarshaler.CleanUpNativeData(responseNative);
            return(returnValue);
        }
Exemplo n.º 24
0
        public static DebugServerError debugserver_client_set_argv(DebugServerClientHandle client, int argc, System.Collections.ObjectModel.ReadOnlyCollection <string> argv, out string response)
        {
            System.Runtime.InteropServices.ICustomMarshaler responseMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr responseNative = System.IntPtr.Zero;
            System.Runtime.InteropServices.ICustomMarshaler argvMarshaler = NativeStringArrayMarshaler.GetInstance(null);
            System.IntPtr    argvNative  = argvMarshaler.MarshalManagedToNative(argv);
            DebugServerError returnValue = DebugServerNativeMethods.debugserver_client_set_argv(client, argc, argvNative, out responseNative);

            response = ((string)responseMarshaler.MarshalNativeToManaged(responseNative));
            responseMarshaler.CleanUpNativeData(responseNative);
            return(returnValue);
        }
Exemplo n.º 25
0
        public static InstallationProxyError instproxy_status_get_error(PlistHandle status, out string name, out string description, ref ulong code)
        {
            System.Runtime.InteropServices.ICustomMarshaler descriptionMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr descriptionNative = System.IntPtr.Zero;
            System.Runtime.InteropServices.ICustomMarshaler nameMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr          nameNative  = System.IntPtr.Zero;
            InstallationProxyError returnValue = InstallationProxyNativeMethods.instproxy_status_get_error(status, out nameNative, out descriptionNative, ref code);

            name = ((string)nameMarshaler.MarshalNativeToManaged(nameNative));
            nameMarshaler.CleanUpNativeData(nameNative);
            description = ((string)descriptionMarshaler.MarshalNativeToManaged(descriptionNative));
            descriptionMarshaler.CleanUpNativeData(descriptionNative);
            return(returnValue);
        }