public object MarshalNativeToManaged(System.IntPtr nativeData)
 {
     return(MobileImageMounterClientHandle.DangerousCreate(nativeData, false));
 }
示例#2
0
 public static extern MobileImageMounterError mobile_image_mounter_upload_image(MobileImageMounterClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string imageType, uint imageSize, byte[] signature, ushort signatureSize, MobileImageMounterUploadCallBack uploadCallBack, System.IntPtr userdata);
        /// <summary>
        /// Connects to the mobile_image_mounter 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
        /// mobile_image_mounter_client_t upon successful return.
        /// </param>
        /// <returns>
        /// MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
        /// MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if device is NULL,
        /// or MOBILE_IMAGE_MOUNTER_E_CONN_FAILED if the connection to the
        /// device could not be established.
        /// </returns>
        public virtual MobileImageMounterError mobile_image_mounter_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out MobileImageMounterClientHandle client)
        {
            MobileImageMounterError returnValue;

            returnValue = MobileImageMounterNativeMethods.mobile_image_mounter_new(device, service, out client);
            client.Api  = this.Parent;
            return(returnValue);
        }
        /// <summary>
        /// Starts a new mobile_image_mounter 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
        /// mobile_image_mounter_t upon successful return. Must be freed using
        /// mobile_image_mounter_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>
        /// MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an MOBILE_IMAGE_MOUNTER_E_* error
        /// code otherwise.
        /// </returns>
        public virtual MobileImageMounterError mobile_image_mounter_start_service(iDeviceHandle device, out MobileImageMounterClientHandle client, string label)
        {
            MobileImageMounterError returnValue;

            returnValue = MobileImageMounterNativeMethods.mobile_image_mounter_start_service(device, out client, label);
            client.Api  = this.Parent;
            return(returnValue);
        }
 /// <summary>
 /// Uploads an image with an optional signature to the device.
 /// </summary>
 /// <param name="client">
 /// The connected mobile_image_mounter client.
 /// </param>
 /// <param name="image_type">
 /// Type of image that is being uploaded.
 /// </param>
 /// <param name="image_size">
 /// Total size of the image.
 /// </param>
 /// <param name="signature">
 /// Buffer with a signature of the image being uploaded. If
 /// NULL, no signature will be used.
 /// </param>
 /// <param name="signature_size">
 /// Total size of the image signature buffer. If 0, no
 /// signature will be used.
 /// </param>
 /// <param name="upload_cb">
 /// Callback function that gets the data chunks for uploading
 /// the image.
 /// </param>
 /// <param name="userdata">
 /// User defined data for the upload callback function.
 /// </param>
 /// <returns>
 /// MOBILE_IMAGE_MOUNTER_E_SUCCESS on succes, or a
 /// MOBILE_IMAGE_MOUNTER_E_* error code otherwise.
 /// </returns>
 public virtual MobileImageMounterError mobile_image_mounter_upload_image(MobileImageMounterClientHandle client, string imageType, uint imageSize, byte[] signature, ushort signatureSize, MobileImageMounterUploadCallBack uploadCallBack, System.IntPtr userdata)
 {
     return(MobileImageMounterNativeMethods.mobile_image_mounter_upload_image(client, imageType, imageSize, signature, signatureSize, uploadCallBack, userdata));
 }
 /// <summary>
 /// Hangs up the connection to the mobile_image_mounter service.
 /// This functions has to be called before freeing up a mobile_image_mounter
 /// instance. If not, errors appear in the device's syslog.
 /// </summary>
 /// <param name="client">
 /// The client to hang up
 /// </param>
 /// <returns>
 /// MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
 /// MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is invalid,
 /// or another error code otherwise.
 /// </returns>
 public virtual MobileImageMounterError mobile_image_mounter_hangup(MobileImageMounterClientHandle client)
 {
     return(MobileImageMounterNativeMethods.mobile_image_mounter_hangup(client));
 }
示例#7
0
 public static extern MobileImageMounterError mobile_image_mounter_start_service(iDeviceHandle device, out MobileImageMounterClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string label);
示例#8
0
 public static extern MobileImageMounterError mobile_image_mounter_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out MobileImageMounterClientHandle client);
示例#9
0
 public static extern MobileImageMounterError mobile_image_mounter_hangup(MobileImageMounterClientHandle client);
示例#10
0
 public static extern MobileImageMounterError mobile_image_mounter_mount_image(MobileImageMounterClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string imagePath, byte[] signature, ushort signatureSize, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string imageType, out PlistHandle result);
示例#11
0
 public static extern MobileImageMounterError mobile_image_mounter_lookup_image(MobileImageMounterClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string imageType, out PlistHandle result);