Class HeartBeatNativeMethods
Inheritance
Inherited Members
Namespace: iMobileDevice.HeartBeat
Assembly: iMobileDevice-net.dll
Syntax
public class HeartBeatNativeMethods
Methods
heartbeat_client_free(IntPtr)
Disconnects a heartbeat client from the device and frees up the heartbeat client data.
Declaration
public static HeartBeatError heartbeat_client_free(IntPtr client)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | client | The heartbeat client to disconnect and free. |
Returns
Type | Description |
---|---|
HeartBeatError | HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when client is NULL, or an HEARTBEAT_E_* error code otherwise. |
heartbeat_client_new(iDeviceHandle, LockdownServiceDescriptorHandle, out HeartBeatClientHandle)
Connects to the heartbeat service on the specified device.
Declaration
public static HeartBeatError heartbeat_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out HeartBeatClientHandle client)
Parameters
Type | Name | Description |
---|---|---|
iDeviceHandle | device | The device to connect to. |
LockdownServiceDescriptorHandle | service | The service descriptor returned by lockdownd_start_service. |
HeartBeatClientHandle | client | Pointer that will point to a newly allocated heartbeat_client_t upon successful return. Must be freed using heartbeat_client_free() after use. |
Returns
Type | Description |
---|---|
HeartBeatError | HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when client is NULL, or an HEARTBEAT_E_* error code otherwise. |
heartbeat_client_start_service(iDeviceHandle, out HeartBeatClientHandle, String)
Starts a new heartbeat service on the specified device and connects to it.
Declaration
public static HeartBeatError heartbeat_client_start_service(iDeviceHandle device, out HeartBeatClientHandle client, string label)
Parameters
Type | Name | Description |
---|---|---|
iDeviceHandle | device | The device to connect to. |
HeartBeatClientHandle | client | Pointer that will point to a newly allocated heartbeat_client_t upon successful return. Must be freed using heartbeat_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 |
---|---|
HeartBeatError | HEARTBEAT_E_SUCCESS on success, or an HEARTBEAT_E_* error code otherwise. |
heartbeat_receive(HeartBeatClientHandle, out PlistHandle)
Receives a plist from the service.
Declaration
public static HeartBeatError heartbeat_receive(HeartBeatClientHandle client, out PlistHandle plist)
Parameters
Type | Name | Description |
---|---|---|
HeartBeatClientHandle | client | The heartbeat client |
PlistHandle | plist | The plist to store the received data |
Returns
Type | Description |
---|---|
HeartBeatError | HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when client or plist is NULL |
heartbeat_receive_with_timeout(HeartBeatClientHandle, out PlistHandle, UInt32)
Receives a plist using the given heartbeat client.
Declaration
public static HeartBeatError heartbeat_receive_with_timeout(HeartBeatClientHandle client, out PlistHandle plist, uint timeoutMs)
Parameters
Type | Name | Description |
---|---|---|
HeartBeatClientHandle | client | The heartbeat client to use for receiving |
PlistHandle | plist | pointer to a plist_t that will point to the received plist upon successful return |
System.UInt32 | timeoutMs |
Returns
Type | Description |
---|---|
HeartBeatError | HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when client or *plist is NULL, HEARTBEAT_E_PLIST_ERROR when the received data cannot be converted to a plist, HEARTBEAT_E_MUX_ERROR when a communication error occurs, or HEARTBEAT_E_UNKNOWN_ERROR when an unspecified error occurs. |
heartbeat_send(HeartBeatClientHandle, PlistHandle)
Sends a plist to the service.
Declaration
public static HeartBeatError heartbeat_send(HeartBeatClientHandle client, PlistHandle plist)
Parameters
Type | Name | Description |
---|---|---|
HeartBeatClientHandle | client | The heartbeat client |
PlistHandle | plist | The plist to send |
Returns
Type | Description |
---|---|
HeartBeatError | HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when client or plist is NULL |