Class MisagentNativeMethods
Inheritance
Inherited Members
Namespace: iMobileDevice.Misagent
Assembly: iMobileDevice-net.dll
Syntax
public class MisagentNativeMethods
Methods
misagent_client_free(IntPtr)
Disconnects an misagent client from the device and frees up the misagent client data.
Declaration
public static MisagentError misagent_client_free(IntPtr client)
Parameters
Type | Name | Description |
---|---|---|
System. |
client | The misagent client to disconnect and free. |
Returns
Type | Description |
---|---|
Misagent |
MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when client is NULL, or an MISAGENT_E_* error code otherwise. |
misagent_client_new(iDeviceHandle, LockdownServiceDescriptorHandle, out MisagentClientHandle)
Connects to the misagent service on the specified device.
Declaration
public static MisagentError misagent_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out MisagentClientHandle client)
Parameters
Type | Name | Description |
---|---|---|
i |
device | The device to connect to. |
Lockdown |
service | The service descriptor returned by lockdownd_start_service. |
Misagent |
client | Pointer that will point to a newly allocated misagent_client_t upon successful return. |
Returns
Type | Description |
---|---|
Misagent |
MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when client is NULL, or an MISAGENT_E_* error code otherwise. |
misagent_client_start_service(iDeviceHandle, out MisagentClientHandle, String)
Starts a new misagent service on the specified device and connects to it.
Declaration
public static MisagentError misagent_client_start_service(iDeviceHandle device, out MisagentClientHandle client, string label)
Parameters
Type | Name | Description |
---|---|---|
i |
device | The device to connect to. |
Misagent |
client | Pointer that will point to a newly allocated misagent_client_t upon successful return. Must be freed using misagent_client_free() after use. |
System. |
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 |
---|---|
Misagent |
MISAGENT_E_SUCCESS on success, or an MISAGENT_E_* error code otherwise. |
misagent_copy(MisagentClientHandle, out PlistHandle)
Retrieves all installed provisioning profiles (iOS 9.2.1 or below).
Declaration
public static MisagentError misagent_copy(MisagentClientHandle client, out PlistHandle profiles)
Parameters
Type | Name | Description |
---|---|---|
Misagent |
client | The connected misagent to use. |
Plist |
profiles | Pointer to a plist_t that will be set to a PLIST_ARRAY if the function is successful. |
Returns
Type | Description |
---|---|
Misagent |
MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when client is invalid, or an MISAGENT_E_* error code otherwise. |
Remarks
This API call only works with iOS 9.2.1 or below. For newer iOS versions use misagent_copy_all() instead. If no provisioning profiles are installed on the device, this function still returns MISAGENT_E_SUCCESS and profiles will just point to an empty array.
misagent_copy_all(MisagentClientHandle, out PlistHandle)
Retrieves all installed provisioning profiles (iOS 9.3 or higher).
Declaration
public static MisagentError misagent_copy_all(MisagentClientHandle client, out PlistHandle profiles)
Parameters
Type | Name | Description |
---|---|---|
Misagent |
client | The connected misagent to use. |
Plist |
profiles | Pointer to a plist_t that will be set to a PLIST_ARRAY if the function is successful. |
Returns
Type | Description |
---|---|
Misagent |
MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when client is invalid, or an MISAGENT_E_* error code otherwise. |
Remarks
This API call only works with iOS 9.3 or higher. For older iOS versions use misagent_copy() instead. If no provisioning profiles are installed on the device, this function still returns MISAGENT_E_SUCCESS and profiles will just point to an empty array.
misagent_get_status_code(MisagentClientHandle)
Retrieves the status code from the last operation.
Declaration
public static int misagent_get_status_code(MisagentClientHandle client)
Parameters
Type | Name | Description |
---|---|---|
Misagent |
client | The misagent to use. |
Returns
Type | Description |
---|---|
System. |
-1 if client is invalid, or the status code from the last operation |
misagent_install(MisagentClientHandle, PlistHandle)
Installs the given provisioning profile. Only works with valid profiles.
Declaration
public static MisagentError misagent_install(MisagentClientHandle client, PlistHandle profile)
Parameters
Type | Name | Description |
---|---|---|
Misagent |
client | The connected misagent to use for installation |
Plist |
profile | The valid provisioning profile to install. This has to be passed as a PLIST_DATA, otherwise the function will fail. |
Returns
Type | Description |
---|---|
Misagent |
MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when client is invalid, or an MISAGENT_E_* error code otherwise. |
misagent_remove(MisagentClientHandle, String)
Removes a given provisioning profile.
Declaration
public static MisagentError misagent_remove(MisagentClientHandle client, string profileid)
Parameters
Type | Name | Description |
---|---|---|
Misagent |
client | The connected misagent to use. |
System. |
profileid |
Returns
Type | Description |
---|---|
Misagent |
MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when client is invalid, or an MISAGENT_E_* error code otherwise. |