• Home
  • API Documentation
Show / Hide Table of Contents
  • iMobileDevice
    • ILibiMobileDevice
    • LibiMobileDevice
    • NativeLibraries
    • NativeStringArrayMarshaler
    • NativeStringMarshaler
    • Utf8Marshal
  • iMobileDevice.Afc
    • AfcApi
    • AfcClientHandle
    • AfcClientHandleDelegateMarshaler
    • AfcDictionaryMarshaler
    • AfcError
    • AfcErrorExtensions
    • AfcException
    • AfcFileMode
    • AfcLinkType
    • AfcLockOp
    • AfcNativeMethods
    • IAfcApi
  • iMobileDevice.DebugServer
    • DebugServerApi
    • DebugServerClientHandle
    • DebugServerClientHandleDelegateMarshaler
    • DebugServerCommandHandle
    • DebugServerCommandHandleDelegateMarshaler
    • DebugServerError
    • DebugServerErrorExtensions
    • DebugServerException
    • DebugServerNativeMethods
    • IDebugServerApi
  • iMobileDevice.DiagnosticsRelay
    • DiagnosticsRelayAction
    • DiagnosticsRelayApi
    • DiagnosticsRelayClientHandle
    • DiagnosticsRelayClientHandleDelegateMarshaler
    • DiagnosticsRelayError
    • DiagnosticsRelayErrorExtensions
    • DiagnosticsRelayException
    • DiagnosticsRelayNativeMethods
    • IDiagnosticsRelayApi
  • iMobileDevice.FileRelay
    • FileRelayApi
    • FileRelayClientHandle
    • FileRelayClientHandleDelegateMarshaler
    • FileRelayError
    • FileRelayErrorExtensions
    • FileRelayException
    • FileRelayNativeMethods
    • IFileRelayApi
  • iMobileDevice.HeartBeat
    • HeartBeatApi
    • HeartBeatClientHandle
    • HeartBeatClientHandleDelegateMarshaler
    • HeartBeatError
    • HeartBeatErrorExtensions
    • HeartBeatException
    • HeartBeatNativeMethods
    • IHeartBeatApi
  • iMobileDevice.HouseArrest
    • HouseArrestApi
    • HouseArrestClientHandle
    • HouseArrestClientHandleDelegateMarshaler
    • HouseArrestError
    • HouseArrestErrorExtensions
    • HouseArrestException
    • HouseArrestNativeMethods
    • IHouseArrestApi
  • iMobileDevice.iDevice
    • iDeviceApi
    • iDeviceConnectionHandle
    • iDeviceConnectionHandleDelegateMarshaler
    • iDeviceDebugCallBack
    • iDeviceError
    • iDeviceErrorExtensions
    • iDeviceEvent
    • iDeviceEventCallBack
    • iDeviceEventType
    • iDeviceException
    • iDeviceHandle
    • iDeviceHandleDelegateMarshaler
    • iDeviceListMarshaler
    • iDeviceNativeMethods
    • iDeviceSocketType
    • IiDeviceApi
  • iMobileDevice.InstallationProxy
    • IInstallationProxyApi
    • InstallationProxyApi
    • InstallationProxyClientHandle
    • InstallationProxyClientHandleDelegateMarshaler
    • InstallationProxyError
    • InstallationProxyErrorExtensions
    • InstallationProxyException
    • InstallationProxyNativeMethods
    • InstallationProxyStatusCallBack
  • iMobileDevice.Lockdown
    • ILockdownApi
    • LockdownApi
    • LockdownClientHandle
    • LockdownClientHandleDelegateMarshaler
    • LockdownError
    • LockdownErrorExtensions
    • LockdownException
    • LockdownMarshaler
    • LockdownNativeMethods
    • LockdownPairRecord
    • LockdownPairRecordHandle
    • LockdownPairRecordHandleDelegateMarshaler
    • LockdownServiceDescriptor
    • LockdownServiceDescriptorHandle
    • LockdownServiceDescriptorHandleDelegateMarshaler
  • iMobileDevice.Misagent
    • IMisagentApi
    • MisagentApi
    • MisagentClientHandle
    • MisagentClientHandleDelegateMarshaler
    • MisagentError
    • MisagentErrorExtensions
    • MisagentException
    • MisagentNativeMethods
  • iMobileDevice.Mobileactivation
    • IMobileactivationApi
    • MobileactivationApi
    • MobileactivationClientHandle
    • MobileactivationClientHandleDelegateMarshaler
    • MobileactivationError
    • MobileactivationErrorExtensions
    • MobileactivationException
    • MobileactivationNativeMethods
  • iMobileDevice.MobileBackup
    • IMobileBackupApi
    • MobileBackupApi
    • MobileBackupClientHandle
    • MobileBackupClientHandleDelegateMarshaler
    • MobileBackupError
    • MobileBackupErrorExtensions
    • MobileBackupException
    • MobileBackupFlags
    • MobileBackupNativeMethods
  • iMobileDevice.MobileBackup2
    • IMobileBackup2Api
    • MobileBackup2Api
    • MobileBackup2ClientHandle
    • MobileBackup2ClientHandleDelegateMarshaler
    • MobileBackup2Error
    • MobileBackup2ErrorExtensions
    • MobileBackup2Exception
    • MobileBackup2NativeMethods
  • iMobileDevice.MobileImageMounter
    • IMobileImageMounterApi
    • MobileImageMounterApi
    • MobileImageMounterClientHandle
    • MobileImageMounterClientHandleDelegateMarshaler
    • MobileImageMounterError
    • MobileImageMounterErrorExtensions
    • MobileImageMounterException
    • MobileImageMounterNativeMethods
    • MobileImageMounterUploadCallBack
  • iMobileDevice.MobileSync
    • IMobileSyncApi
    • MobileSyncAnchors
    • MobileSyncAnchorsHandle
    • MobileSyncAnchorsHandleDelegateMarshaler
    • MobileSyncApi
    • MobileSyncClientHandle
    • MobileSyncClientHandleDelegateMarshaler
    • MobileSyncError
    • MobileSyncErrorExtensions
    • MobileSyncException
    • MobileSyncNativeMethods
    • MobileSyncSyncType
  • iMobileDevice.NotificationProxy
    • INotificationProxyApi
    • NotificationProxyApi
    • NotificationProxyClientHandle
    • NotificationProxyClientHandleDelegateMarshaler
    • NotificationProxyError
    • NotificationProxyErrorExtensions
    • NotificationProxyException
    • NotificationProxyNativeMethods
    • NotificationProxyNotifyCallBack
  • iMobileDevice.Pinvoke
    • IPinvokeApi
    • PinvokeApi
    • PinvokeError
    • PinvokeErrorExtensions
    • PinvokeException
    • PinvokeNativeMethods
  • iMobileDevice.Plist
    • IPlistApi
    • PlistApi
    • PlistDictIterHandle
    • PlistDictIterHandleDelegateMarshaler
    • PlistHandle
    • PlistHandleDelegateMarshaler
    • PlistNativeMethods
    • PlistType
  • iMobileDevice.PropertyListService
    • IPropertyListServiceApi
    • PropertyListServiceApi
    • PropertyListServiceClientHandle
    • PropertyListServiceClientHandleDelegateMarshaler
    • PropertyListServiceError
    • PropertyListServiceErrorExtensions
    • PropertyListServiceException
    • PropertyListServiceNativeMethods
  • iMobileDevice.Restore
    • IRestoreApi
    • RestoreApi
    • RestoreClientHandle
    • RestoreClientHandleDelegateMarshaler
    • RestoreError
    • RestoreErrorExtensions
    • RestoreException
    • RestoreNativeMethods
  • iMobileDevice.Screenshotr
    • IScreenshotrApi
    • ScreenshotrApi
    • ScreenshotrClientHandle
    • ScreenshotrClientHandleDelegateMarshaler
    • ScreenshotrError
    • ScreenshotrErrorExtensions
    • ScreenshotrException
    • ScreenshotrNativeMethods
  • iMobileDevice.Service
    • ConstructorFunc
    • IServiceApi
    • ServiceApi
    • ServiceClientHandle
    • ServiceClientHandleDelegateMarshaler
    • ServiceError
    • ServiceErrorExtensions
    • ServiceException
    • ServiceNativeMethods
  • iMobileDevice.SpringBoardServices
    • ISpringBoardServicesApi
    • SpringBoardServicesApi
    • SpringBoardServicesClientHandle
    • SpringBoardServicesClientHandleDelegateMarshaler
    • SpringBoardServicesError
    • SpringBoardServicesErrorExtensions
    • SpringBoardServicesException
    • SpringBoardServicesInterfaceOrientation
    • SpringBoardServicesNativeMethods
  • iMobileDevice.SyslogRelay
    • ISyslogRelayApi
    • SyslogRelayApi
    • SyslogRelayClientHandle
    • SyslogRelayClientHandleDelegateMarshaler
    • SyslogRelayError
    • SyslogRelayErrorExtensions
    • SyslogRelayException
    • SyslogRelayNativeMethods
    • SyslogRelayReceiveCallBack
  • iMobileDevice.Usbmuxd
    • IUsbmuxdApi
    • UsbmuxdApi
    • UsbmuxdDeviceInfo
    • UsbmuxdEvent
    • UsbmuxdEventCallBack
    • UsbmuxdEventType
    • UsbmuxdNativeMethods
    • UsbmuxdSocketType
  • iMobileDevice.WebInspector
    • IWebInspectorApi
    • WebInspectorApi
    • WebInspectorClientHandle
    • WebInspectorClientHandleDelegateMarshaler
    • WebInspectorError
    • WebInspectorErrorExtensions
    • WebInspectorException
    • WebInspectorNativeMethods

Class UsbmuxdNativeMethods

Inheritance
System.Object
UsbmuxdNativeMethods
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: iMobileDevice.Usbmuxd
Assembly: iMobileDevice-net.dll
Syntax
public class UsbmuxdNativeMethods

Methods

libusbmuxd_set_debug_level(Int32)

Declaration
public static void libusbmuxd_set_debug_level(int level)
Parameters
Type Name Description
System.Int32 level

libusbmuxd_set_use_inotify(Int32)

Enable or disable the use of inotify extension. Enabled by default. Use 0 to disable and 1 to enable inotify support. This only has an effect on linux systems if inotify support has been built in. Otherwise and on all other platforms this function has no effect.

Declaration
public static void libusbmuxd_set_use_inotify(int set)
Parameters
Type Name Description
System.Int32 set

usbmuxd_connect(Int32, UInt16)

Request proxy connect to

Declaration
public static int usbmuxd_connect(int handle, ushort tcpPort)
Parameters
Type Name Description
System.Int32 handle

returned by 'usbmuxd_scan()'

System.UInt16 tcpPort
Returns
Type Description
System.Int32

file descriptor socket of the connection, or -1 on error

usbmuxd_delete_pair_record(String)

Delete a pairing record

Declaration
public static int usbmuxd_delete_pair_record(string recordId)
Parameters
Type Name Description
System.String recordId
Returns
Type Description
System.Int32

0 on success, a negative errno value otherwise.

usbmuxd_device_list_free(IntPtr)

Frees the device list returned by an usbmuxd_get_device_list call

Declaration
public static int usbmuxd_device_list_free(IntPtr deviceList)
Parameters
Type Name Description
System.IntPtr deviceList
Returns
Type Description
System.Int32

0 on success, -1 on error.

usbmuxd_disconnect(Int32)

Disconnect. For now, this just closes the socket file descriptor.

Declaration
public static int usbmuxd_disconnect(int sfd)
Parameters
Type Name Description
System.Int32 sfd

socker file descriptor returned by usbmuxd_connect()

Returns
Type Description
System.Int32

0 on success, -1 on error.

usbmuxd_get_device_by_udid(String, ref UsbmuxdDeviceInfo)

Gets device information for the device specified by udid.

Declaration
public static int usbmuxd_get_device_by_udid(string udid, ref UsbmuxdDeviceInfo device)
Parameters
Type Name Description
System.String udid

A device UDID of the device to look for. If udid is NULL, This function will return the first device found.

UsbmuxdDeviceInfo device

Pointer to a previously allocated (or static) usbmuxd_device_info_t that will be filled with the device info.

Returns
Type Description
System.Int32

0 if no matching device is connected, 1 if the device was found, or a negative value on error.

usbmuxd_get_device_list(ref IntPtr)

Contacts usbmuxd and retrieves a list of connected devices.

Declaration
public static int usbmuxd_get_device_list(ref IntPtr deviceList)
Parameters
Type Name Description
System.IntPtr deviceList
Returns
Type Description
System.Int32

number of attached devices, zero on no devices, or negative if an error occured.

Remarks

The user has to free the list returned.

usbmuxd_get_socket_type(ref Int32)

Gets the socket type (Unix socket or TCP socket) libusbmuxd should use when connecting to usbmuxd.

Declaration
public static int usbmuxd_get_socket_type(ref int value)
Parameters
Type Name Description
System.Int32 value

A pointer to an integer which will reveive the current socket type

Returns
Type Description
System.Int32

0 on success or negative on error

usbmuxd_get_tcp_endpoint(out IntPtr, ref UInt16)

Gets the TCP endpoint to which usbmuxd will connect if th esocket type is set to SOCKET_TYPE_TCP

Declaration
public static int usbmuxd_get_tcp_endpoint(out IntPtr host, ref ushort port)
Parameters
Type Name Description
System.IntPtr host

A pointer which will be set to the hostname or IP address to which to connect. The caller must free this string.

System.UInt16 port

The port to which to connect

Returns
Type Description
System.Int32

0 on success or negative on error

| Improve this Doc View Source

usbmuxd_get_tcp_endpoint(out String, ref UInt16)

Declaration
public static int usbmuxd_get_tcp_endpoint(out string host, ref ushort port)
Parameters
Type Name Description
System.String host
System.UInt16 port
Returns
Type Description
System.Int32

usbmuxd_read_buid(out IntPtr)

Reads the SystemBUID

Declaration
public static int usbmuxd_read_buid(out IntPtr buid)
Parameters
Type Name Description
System.IntPtr buid

pointer to a variable that will be set to point to a newly allocated string with the System BUID returned by usbmuxd

Returns
Type Description
System.Int32

0 on success, a negative errno value otherwise.

| Improve this Doc View Source

usbmuxd_read_buid(out String)

Declaration
public static int usbmuxd_read_buid(out string buid)
Parameters
Type Name Description
System.String buid
Returns
Type Description
System.Int32

usbmuxd_read_pair_record(String, out IntPtr, ref UInt32)

Read a pairing record

Declaration
public static int usbmuxd_read_pair_record(string recordId, out IntPtr recordData, ref uint recordSize)
Parameters
Type Name Description
System.String recordId
System.IntPtr recordData
System.UInt32 recordSize
Returns
Type Description
System.Int32

0 on success, a negative error value otherwise.

| Improve this Doc View Source

usbmuxd_read_pair_record(String, out String, ref UInt32)

Declaration
public static int usbmuxd_read_pair_record(string recordId, out string recordData, ref uint recordSize)
Parameters
Type Name Description
System.String recordId
System.String recordData
System.UInt32 recordSize
Returns
Type Description
System.Int32

usbmuxd_recv(Int32, Byte[], UInt32, ref UInt32)

Receive data from the specified socket with a default timeout.

Declaration
public static int usbmuxd_recv(int sfd, byte[] data, uint len, ref uint recvBytes)
Parameters
Type Name Description
System.Int32 sfd

socket file descriptor returned by usbmuxd_connect()

System.Byte[] data

buffer to put the data to

System.UInt32 len

number of bytes to receive

System.UInt32 recvBytes
Returns
Type Description
System.Int32

0 on success, a negative errno value otherwise.

usbmuxd_recv_timeout(Int32, Byte[], UInt32, ref UInt32, UInt32)

Receive data from the specified socket.

Declaration
public static int usbmuxd_recv_timeout(int sfd, byte[] data, uint len, ref uint recvBytes, uint timeout)
Parameters
Type Name Description
System.Int32 sfd

socket file descriptor returned by usbmuxd_connect()

System.Byte[] data

buffer to put the data to

System.UInt32 len

number of bytes to receive

System.UInt32 recvBytes
System.UInt32 timeout

how many milliseconds to wait for data

Returns
Type Description
System.Int32

0 on success, a negative errno value otherwise.

usbmuxd_save_pair_record(String, String, UInt32)

Save a pairing record

Declaration
public static int usbmuxd_save_pair_record(string recordId, string recordData, uint recordSize)
Parameters
Type Name Description
System.String recordId
System.String recordData
System.UInt32 recordSize
Returns
Type Description
System.Int32

0 on success, a negative error value otherwise.

usbmuxd_send(Int32, Byte[], UInt32, ref UInt32)

Send data to the specified socket.

Declaration
public static int usbmuxd_send(int sfd, byte[] data, uint len, ref uint sentBytes)
Parameters
Type Name Description
System.Int32 sfd

socket file descriptor returned by usbmuxd_connect()

System.Byte[] data

buffer to send

System.UInt32 len

size of buffer to send

System.UInt32 sentBytes
Returns
Type Description
System.Int32

0 on success, a negative errno value otherwise.

usbmuxd_set_socket_type(Int32)

Sets the socket type (Unix socket or TCP socket) libusbmuxd should use when connecting to usbmuxd.

Declaration
public static int usbmuxd_set_socket_type(int value)
Parameters
Type Name Description
System.Int32 value

SOCKET_TYPE_UNIX or SOCKET_TYPE_TCP

Returns
Type Description
System.Int32

0 on success or negative on error

usbmuxd_set_tcp_endpoint(String, UInt16)

Sets the TCP endpoint to which usbmuxd will connect if the socket type is set to SOCKET_TYPE_TCP

Declaration
public static int usbmuxd_set_tcp_endpoint(string host, ushort port)
Parameters
Type Name Description
System.String host

The hostname or IP address to which to connect

System.UInt16 port

The port to which to connect.

Returns
Type Description
System.Int32

0 on success or negative on error

usbmuxd_subscribe(UsbmuxdEventCallBack, IntPtr)

Subscribe a callback function so that applications get to know about device add/remove events.

Declaration
public static int usbmuxd_subscribe(UsbmuxdEventCallBack callback, IntPtr userData)
Parameters
Type Name Description
UsbmuxdEventCallBack callback

A callback function that is executed when an event occurs.

System.IntPtr userData
Returns
Type Description
System.Int32

0 on success or negative on error.

usbmuxd_unsubscribe()

Unsubscribe callback.

Declaration
public static int usbmuxd_unsubscribe()
Returns
Type Description
System.Int32

only 0 for now.

  • Improve this Doc
  • View Source
Back to top Copyright (c) 2015-2017 Quamotion bvba. All rights reserved