Class FileRelayApi
Inheritance
Implements
Inherited Members
Namespace: iMobileDevice.FileRelay
Assembly: iMobileDevice-net.dll
Syntax
public class FileRelayApi : IFileRelayApi
Constructors
| Improve this Doc View SourceFileRelayApi(ILibiMobileDevice)
Declaration
public FileRelayApi(ILibiMobileDevice parent)
Parameters
Type | Name | Description |
---|---|---|
ILibiMobileDevice | parent |
Properties
| Improve this Doc View SourceParent
Declaration
public ILibiMobileDevice Parent { get; }
Property Value
Type | Description |
---|---|
ILibiMobileDevice |
Methods
| Improve this Doc View Sourcefile_relay_client_free(IntPtr)
Disconnects a file_relay client from the device and frees up the file_relay client data.
Declaration
public virtual FileRelayError file_relay_client_free(IntPtr client)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | client | The file_relay client to disconnect and free. |
Returns
Type | Description |
---|---|
FileRelayError | FILE_RELAY_E_SUCCESS on success, FILE_RELAY_E_INVALID_ARG when one of client or client->parent is invalid, or FILE_RELAY_E_UNKNOWN_ERROR when the was an error freeing the parent property_list_service client. |
file_relay_client_new(iDeviceHandle, LockdownServiceDescriptorHandle, out FileRelayClientHandle)
Connects to the file_relay service on the specified device.
Declaration
public virtual FileRelayError file_relay_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out FileRelayClientHandle client)
Parameters
Type | Name | Description |
---|---|---|
iDeviceHandle | device | The device to connect to. |
LockdownServiceDescriptorHandle | service | The service descriptor returned by lockdownd_start_service. |
FileRelayClientHandle | client | Reference that will point to a newly allocated file_relay_client_t upon successful return. |
Returns
Type | Description |
---|---|
FileRelayError | FILE_RELAY_E_SUCCESS on success, FILE_RELAY_E_INVALID_ARG when one of the parameters is invalid, or FILE_RELAY_E_MUX_ERROR when the connection failed. |
file_relay_client_start_service(iDeviceHandle, out FileRelayClientHandle, String)
Starts a new file_relay service on the specified device and connects to it.
Declaration
public virtual FileRelayError file_relay_client_start_service(iDeviceHandle device, out FileRelayClientHandle client, string label)
Parameters
Type | Name | Description |
---|---|---|
iDeviceHandle | device | The device to connect to. |
FileRelayClientHandle | client | Pointer that will point to a newly allocated file_relay_client_t upon successful return. Must be freed using file_relay_client_free() after use. |
System.String | label | The label to use for communication. Usually the program name. Pass NULL to disable sending the label in requests to lockdownd. |
Returns
Type | Description |
---|---|
FileRelayError | FILE_RELAY_E_SUCCESS on success, or an FILE_RELAY_E_* error code otherwise. |
file_relay_request_sources(FileRelayClientHandle, out String, out iDeviceConnectionHandle)
Request data for the given sources.
Declaration
public virtual FileRelayError file_relay_request_sources(FileRelayClientHandle client, out string sources, out iDeviceConnectionHandle connection)
Parameters
Type | Name | Description |
---|---|---|
FileRelayClientHandle | client | The connected file_relay client. |
System.String | sources | A NULL-terminated list of sources to retrieve. Valid sources are:
|
iDeviceConnectionHandle | connection | The connection that has to be used for receiving the data using idevice_connection_receive(). The connection will be closed automatically by the device, but use file_relay_client_free() to clean up properly. |
Returns
Type | Description |
---|---|
FileRelayError | FILE_RELAY_E_SUCCESS on succes, FILE_RELAY_E_INVALID_ARG when one or more parameters are invalid, FILE_RELAY_E_MUX_ERROR if a communication error occurs, FILE_RELAY_E_PLIST_ERROR when the received result is NULL or is not a valid plist, FILE_RELAY_E_INVALID_SOURCE if one or more sources are invalid, FILE_RELAY_E_STAGING_EMPTY if no data is available for the given sources, or FILE_RELAY_E_UNKNOWN_ERROR otherwise. |
Remarks
WARNING: Don't call this function without reading the data afterwards. A directory mobile_file_relay.XXXX used for creating the archive will remain in the /tmp directory otherwise.
file_relay_request_sources_timeout(FileRelayClientHandle, out String, out iDeviceConnectionHandle, UInt32)
Request data for the given sources. Calls file_relay_request_sources_timeout() with a timeout of 60000 milliseconds (60 seconds).
Declaration
public virtual FileRelayError file_relay_request_sources_timeout(FileRelayClientHandle client, out string sources, out iDeviceConnectionHandle connection, uint timeout)
Parameters
Type | Name | Description |
---|---|---|
FileRelayClientHandle | client | The connected file_relay client. |
System.String | sources | A NULL-terminated list of sources to retrieve. Valid sources are:
|
iDeviceConnectionHandle | connection | The connection that has to be used for receiving the data using idevice_connection_receive(). The connection will be closed automatically by the device, but use file_relay_client_free() to clean up properly. |
System.UInt32 | timeout |
Returns
Type | Description |
---|---|
FileRelayError | FILE_RELAY_E_SUCCESS on succes, FILE_RELAY_E_INVALID_ARG when one or more parameters are invalid, FILE_RELAY_E_MUX_ERROR if a communication error occurs, FILE_RELAY_E_PLIST_ERROR when the received result is NULL or is not a valid plist, FILE_RELAY_E_INVALID_SOURCE if one or more sources are invalid, FILE_RELAY_E_STAGING_EMPTY if no data is available for the given sources, or FILE_RELAY_E_UNKNOWN_ERROR otherwise. |
Remarks
WARNING: Don't call this function without reading the data afterwards. A directory mobile_file_relay.XXXX used for creating the archive will remain in the /tmp directory otherwise.