/// <summary>
        /// Connects to the installation_proxy service on the specified device.
        /// </summary>
        /// <param name="device">
        /// The device to connect to
        /// </param>
        /// <param name="service">
        /// The service descriptor returned by lockdownd_start_service.
        /// </param>
        /// <param name="client">
        /// Pointer that will be set to a newly allocated
        /// instproxy_client_t upon successful return.
        /// </param>
        /// <returns>
        /// INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error value
        /// when an error occured.
        /// </returns>
        public virtual InstallationProxyError instproxy_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out InstallationProxyClientHandle client)
        {
            InstallationProxyError returnValue;

            returnValue = InstallationProxyNativeMethods.instproxy_client_new(device, service, out client);
            client.Api  = this.Parent;
            return(returnValue);
        }
        /// <summary>
        /// Starts a new installation_proxy service on the specified device and connects to it.
        /// </summary>
        /// <param name="device">
        /// The device to connect to.
        /// </param>
        /// <param name="client">
        /// Pointer that will point to a newly allocated
        /// instproxy_client_t upon successful return. Must be freed using
        /// instproxy_client_free() after use.
        /// </param>
        /// <param name="label">
        /// The label to use for communication. Usually the program name.
        /// Pass NULL to disable sending the label in requests to lockdownd.
        /// </param>
        /// <returns>
        /// INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error
        /// code otherwise.
        /// </returns>
        public virtual InstallationProxyError instproxy_client_start_service(iDeviceHandle device, out InstallationProxyClientHandle client, string label)
        {
            InstallationProxyError returnValue;

            returnValue = InstallationProxyNativeMethods.instproxy_client_start_service(device, out client, label);
            client.Api  = this.Parent;
            return(returnValue);
        }
 /// <summary>
 /// Removes a previously archived application from the device.
 /// This function removes the ZIP archive from the 'ApplicationArchives'
 /// directory.
 /// </summary>
 /// <param name="client">
 /// The connected installation proxy client
 /// </param>
 /// <param name="appid">
 /// ApplicationIdentifier of the archived app to remove.
 /// </param>
 /// <param name="client_options">
 /// The client options to use, as PLIST_DICT, or NULL.
 /// Currently there are no known client options, so passing NULL is fine.
 /// </param>
 /// <param name="status_cb">
 /// Callback function for progress and status information. If
 /// NULL is passed, this function will run synchronously.
 /// </param>
 /// <param name="user_data">
 /// Callback data passed to status_cb.
 /// </param>
 /// <returns>
 /// INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if
 /// an error occured.
 /// </returns>
 /// <remarks>
 /// If a callback function is given (async mode), this function returns
 /// INSTPROXY_E_SUCCESS immediately if the status updater thread has been
 /// created successfully; any error occuring during the command has to be
 /// handled inside the specified callback function.
 /// </remarks>
 public virtual InstallationProxyError instproxy_remove_archive(InstallationProxyClientHandle client, string appid, PlistHandle clientOptions, InstallationProxyStatusCallBack statusCallBack, System.IntPtr userData)
 {
     return(InstallationProxyNativeMethods.instproxy_remove_archive(client, appid, clientOptions, statusCallBack, userData));
 }
 /// <summary>
 /// Queries the device for the path of an application.
 /// </summary>
 /// <param name="client">
 /// The connected installation proxy client.
 /// </param>
 /// <param name="appid">
 /// ApplicationIdentifier of app to retrieve the path for.
 /// </param>
 /// <param name="path">
 /// Pointer to store the device path for the application
 /// which is set to NULL if it could not be determined.
 /// </param>
 /// <returns>
 /// INSTPROXY_E_SUCCESS on success, INSTPROXY_E_OP_FAILED if
 /// the path could not be determined or an INSTPROXY_E_* error
 /// value if an error occured.
 /// </returns>
 public virtual InstallationProxyError instproxy_client_get_path_for_bundle_identifier(InstallationProxyClientHandle client, string bundleId, out string path)
 {
     return(InstallationProxyNativeMethods.instproxy_client_get_path_for_bundle_identifier(client, bundleId, out path));
 }
 /// <summary>
 /// List pages of installed applications in a callback.
 /// </summary>
 /// <param name="client">
 /// The connected installation_proxy client
 /// </param>
 /// <param name="client_options">
 /// The client options to use, as PLIST_DICT, or NULL.
 /// Valid client options include:
 /// "ApplicationType" -> "System"
 /// "ApplicationType" -> "User"
 /// "ApplicationType" -> "Internal"
 /// "ApplicationType" -> "Any"
 /// </param>
 /// <param name="status_cb">
 /// Callback function to process each page of application
 /// information. Passing a callback is required.
 /// </param>
 /// <param name="user_data">
 /// Callback data passed to status_cb.
 /// </param>
 /// <returns>
 /// INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if
 /// an error occured.
 /// </returns>
 public virtual InstallationProxyError instproxy_browse_with_callback(InstallationProxyClientHandle client, PlistHandle clientOptions, InstallationProxyStatusCallBack statusCallBack, System.IntPtr userData)
 {
     return(InstallationProxyNativeMethods.instproxy_browse_with_callback(client, clientOptions, statusCallBack, userData));
 }
 /// <summary>
 /// Upgrade an application on the device. This function is nearly the same as
 /// instproxy_install; the difference is that the installation progress on the
 /// device is faster if the application is already installed.
 /// </summary>
 /// <param name="client">
 /// The connected installation_proxy client
 /// </param>
 /// <param name="pkg_path">
 /// Path of the installation package (inside the AFC jail)
 /// </param>
 /// <param name="client_options">
 /// The client options to use, as PLIST_DICT, or NULL.
 /// Valid options include:
 /// "iTunesMetadata" -> PLIST_DATA
 /// "ApplicationSINF" -> PLIST_DATA
 /// "PackageType" -> "Developer"
 /// If PackageType -> Developer is specified, then pkg_path points to
 /// an .app directory instead of an install package.
 /// </param>
 /// <param name="status_cb">
 /// Callback function for progress and status information. If
 /// NULL is passed, this function will run synchronously.
 /// </param>
 /// <param name="user_data">
 /// Callback data passed to status_cb.
 /// </param>
 /// <returns>
 /// INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if
 /// an error occured.
 /// </returns>
 /// <remarks>
 /// If a callback function is given (async mode), this function returns
 /// INSTPROXY_E_SUCCESS immediately if the status updater thread has been
 /// created successfully; any error occuring during the command has to be
 /// handled inside the specified callback function.
 /// </remarks>
 public virtual InstallationProxyError instproxy_upgrade(InstallationProxyClientHandle client, string pkgPath, PlistHandle clientOptions, InstallationProxyStatusCallBack statusCallBack, System.IntPtr userData)
 {
     return(InstallationProxyNativeMethods.instproxy_upgrade(client, pkgPath, clientOptions, statusCallBack, userData));
 }
 public static extern InstallationProxyError instproxy_client_get_path_for_bundle_identifier(InstallationProxyClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string bundleId, out System.IntPtr path);
 /// <summary>
 /// Creates a new <see cref="InstallationProxyClientHandle"/> from a <see cref="IntPtr"/>.
 /// </summary>
 /// <param name="unsafeHandle">
 /// The underlying <see cref="IntPtr"/>
 /// </param>
 /// <returns>
 /// </returns>
 public static InstallationProxyClientHandle DangerousCreate(System.IntPtr unsafeHandle)
 {
     return(InstallationProxyClientHandle.DangerousCreate(unsafeHandle, true));
 }
 public static extern InstallationProxyError instproxy_remove_archive(InstallationProxyClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string appid, PlistHandle clientOptions, InstallationProxyStatusCallBack statusCallBack, System.IntPtr userData);
 public static extern InstallationProxyError instproxy_check_capabilities_match(InstallationProxyClientHandle client, out System.IntPtr capabilities, PlistHandle clientOptions, out PlistHandle result);
 public static extern InstallationProxyError instproxy_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out InstallationProxyClientHandle client);
 public static extern InstallationProxyError instproxy_lookup_archives(InstallationProxyClientHandle client, PlistHandle clientOptions, out PlistHandle result);
 public static extern InstallationProxyError instproxy_lookup(InstallationProxyClientHandle client, System.IntPtr appids, PlistHandle clientOptions, out PlistHandle result);
 public static extern InstallationProxyError instproxy_browse(InstallationProxyClientHandle client, PlistHandle clientOptions, out PlistHandle result);
 public static extern InstallationProxyError instproxy_client_start_service(iDeviceHandle device, out InstallationProxyClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string label);
 public static extern InstallationProxyError instproxy_browse_with_callback(InstallationProxyClientHandle client, PlistHandle clientOptions, InstallationProxyStatusCallBack statusCallBack, System.IntPtr userData);
 public object MarshalNativeToManaged(System.IntPtr nativeData)
 {
     return(InstallationProxyClientHandle.DangerousCreate(nativeData, false));
 }