Class ScreenshotrApi
Inheritance
Implements
Inherited Members
Namespace: iMobileDevice.Screenshotr
Assembly: iMobileDevice-net.dll
Syntax
public class ScreenshotrApi : IScreenshotrApi
Constructors
| Improve this Doc View SourceScreenshotrApi(ILibiMobileDevice)
Declaration
public ScreenshotrApi(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 Sourcescreenshotr_client_free(IntPtr)
Disconnects a screenshotr client from the device and frees up the screenshotr client data.
Declaration
public virtual ScreenshotrError screenshotr_client_free(IntPtr client)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | client | The screenshotr client to disconnect and free. |
Returns
Type | Description |
---|---|
ScreenshotrError | SCREENSHOTR_E_SUCCESS on success, or SCREENSHOTR_E_INVALID_ARG if client is NULL. |
screenshotr_client_new(iDeviceHandle, LockdownServiceDescriptorHandle, out ScreenshotrClientHandle)
Connects to the screenshotr service on the specified device.
Declaration
public virtual ScreenshotrError screenshotr_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out ScreenshotrClientHandle client)
Parameters
Type | Name | Description |
---|---|---|
iDeviceHandle | device | The device to connect to. |
LockdownServiceDescriptorHandle | service | The service descriptor returned by lockdownd_start_service. |
ScreenshotrClientHandle | client | Pointer that will be set to a newly allocated screenshotr_client_t upon successful return. |
Returns
Type | Description |
---|---|
ScreenshotrError | SCREENSHOTR_E_SUCCESS on success, SCREENSHOTR_E_INVALID ARG if one or more parameters are invalid, or SCREENSHOTR_E_CONN_FAILED if the connection to the device could not be established. |
Remarks
This service is only available if a developer disk image has been mounted.
screenshotr_client_start_service(iDeviceHandle, out ScreenshotrClientHandle, String)
Starts a new screenshotr service on the specified device and connects to it.
Declaration
public virtual ScreenshotrError screenshotr_client_start_service(iDeviceHandle device, out ScreenshotrClientHandle client, string label)
Parameters
Type | Name | Description |
---|---|---|
iDeviceHandle | device | The device to connect to. |
ScreenshotrClientHandle | client | Pointer that will point to a newly allocated screenshotr_client_t upon successful return. Must be freed using screenshotr_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 |
---|---|
ScreenshotrError | SCREENSHOTR_E_SUCCESS on success, or an SCREENSHOTR_E_* error code otherwise. |
screenshotr_screenshot_free(IntPtr)
Frees the memory used by a screen shot
Declaration
public virtual ScreenshotrError screenshotr_screenshot_free(IntPtr imgdata)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | imgdata | The screenshot |
Returns
Type | Description |
---|---|
ScreenshotrError | SCREENSHOTR_E_SUCCESS on success |
screenshotr_take_screenshot(ScreenshotrClientHandle, ref IntPtr, ref UInt64)
Get a screen shot from the connected device.
Declaration
public virtual ScreenshotrError screenshotr_take_screenshot(ScreenshotrClientHandle client, ref IntPtr imgdata, ref ulong imgsize)
Parameters
Type | Name | Description |
---|---|---|
ScreenshotrClientHandle | client | The connection screenshotr service client. |
System.IntPtr | imgdata | Pointer that will point to a newly allocated buffer containing TIFF image data upon successful return. It is up to the caller to free the memory. |
System.UInt64 | imgsize | Pointer to a uint64_t that will be set to the size of the buffer imgdata points to upon successful return. |
Returns
Type | Description |
---|---|
ScreenshotrError | SCREENSHOTR_E_SUCCESS on success, SCREENSHOTR_E_INVALID_ARG if one or more parameters are invalid, or another error code if an error occured. |