Interface ISyslogRelayApi
Namespace: iMobileDevice.SyslogRelay
Assembly: iMobileDevice-net.dll
Syntax
public interface ISyslogRelayApi
Properties
| Improve this Doc View SourceParent
Gets or sets the
Declaration
ILibiMobileDevice Parent { get; }
Property Value
Type | Description |
---|---|
ILibiMobileDevice |
Methods
| Improve this Doc View Sourcesyslog_relay_client_free(IntPtr)
Disconnects a syslog_relay client from the device and frees up the syslog_relay client data.
Declaration
SyslogRelayError syslog_relay_client_free(IntPtr client)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | client | The syslog_relay client to disconnect and free. |
Returns
Type | Description |
---|---|
SyslogRelayError | SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when client is NULL, or an SYSLOG_RELAY_E_* error code otherwise. |
syslog_relay_client_new(iDeviceHandle, LockdownServiceDescriptorHandle, out SyslogRelayClientHandle)
Connects to the syslog_relay service on the specified device.
Declaration
SyslogRelayError syslog_relay_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out SyslogRelayClientHandle client)
Parameters
Type | Name | Description |
---|---|---|
iDeviceHandle | device | The device to connect to. |
LockdownServiceDescriptorHandle | service | The service descriptor returned by lockdownd_start_service. |
SyslogRelayClientHandle | client | Pointer that will point to a newly allocated syslog_relay_client_t upon successful return. Must be freed using syslog_relay_client_free() after use. |
Returns
Type | Description |
---|---|
SyslogRelayError | SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when client is NULL, or an SYSLOG_RELAY_E_* error code otherwise. |
syslog_relay_client_start_service(iDeviceHandle, out SyslogRelayClientHandle, String)
Starts a new syslog_relay service on the specified device and connects to it.
Declaration
SyslogRelayError syslog_relay_client_start_service(iDeviceHandle device, out SyslogRelayClientHandle client, string label)
Parameters
Type | Name | Description |
---|---|---|
iDeviceHandle | device | The device to connect to. |
SyslogRelayClientHandle | client | Pointer that will point to a newly allocated syslog_relay_client_t upon successful return. Must be freed using syslog_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 |
---|---|
SyslogRelayError | SYSLOG_RELAY_E_SUCCESS on success, or an SYSLOG_RELAY_E_* error code otherwise. |
syslog_relay_receive(SyslogRelayClientHandle, Byte[], UInt32, ref UInt32)
Receives data from the service.
Declaration
SyslogRelayError syslog_relay_receive(SyslogRelayClientHandle client, byte[] data, uint size, ref uint received)
Parameters
Type | Name | Description |
---|---|---|
SyslogRelayClientHandle | client | The syslog_relay client |
System.Byte[] | data | Buffer that will be filled with the data received |
System.UInt32 | size | Number of bytes to receive |
System.UInt32 | received | Number of bytes received (can be NULL to ignore) |
Returns
Type | Description |
---|---|
SyslogRelayError | SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when client or plist is NULL |
syslog_relay_receive_with_timeout(SyslogRelayClientHandle, Byte[], UInt32, ref UInt32, UInt32)
Receives data using the given syslog_relay client with specified timeout.
Declaration
SyslogRelayError syslog_relay_receive_with_timeout(SyslogRelayClientHandle client, byte[] data, uint size, ref uint received, uint timeout)
Parameters
Type | Name | Description |
---|---|---|
SyslogRelayClientHandle | client | The syslog_relay client to use for receiving |
System.Byte[] | data | Buffer that will be filled with the data received |
System.UInt32 | size | Number of bytes to receive |
System.UInt32 | received | Number of bytes received (can be NULL to ignore) |
System.UInt32 | timeout | Maximum time in milliseconds to wait for data. |
Returns
Type | Description |
---|---|
SyslogRelayError | SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are invalid, SYSLOG_RELAY_E_MUX_ERROR when a communication error occurs, or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified error occurs. |
syslog_relay_start_capture(SyslogRelayClientHandle, SyslogRelayReceiveCallBack, IntPtr)
Starts capturing the syslog of the device using a callback. Use syslog_relay_stop_capture() to stop receiving the syslog.
Declaration
SyslogRelayError syslog_relay_start_capture(SyslogRelayClientHandle client, SyslogRelayReceiveCallBack callback, IntPtr userData)
Parameters
Type | Name | Description |
---|---|---|
SyslogRelayClientHandle | client | The syslog_relay client to use |
SyslogRelayReceiveCallBack | callback | Callback to receive each character from the syslog. |
System.IntPtr | userData |
Returns
Type | Description |
---|---|
SyslogRelayError | SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified error occurs or a syslog capture has already been started. |
syslog_relay_stop_capture(SyslogRelayClientHandle)
Stops capturing the syslog of the device. Use syslog_relay_start_capture() to start receiving the syslog.
Declaration
SyslogRelayError syslog_relay_stop_capture(SyslogRelayClientHandle client)
Parameters
Type | Name | Description |
---|---|---|
SyslogRelayClientHandle | client | The syslog_relay client to use |
Returns
Type | Description |
---|---|
SyslogRelayError | SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified error occurs or a syslog capture has already been started. |