/// <summary>
        /// Creates a new <see cref="PropertyListServiceClientHandle"/> from a <see cref="IntPtr"/>.
        /// </summary>
        /// <param name="unsafeHandle">
        /// The underlying <see cref="IntPtr"/>
        /// </param>
        /// <param name="ownsHandle">
        /// <see langword="true"/> to reliably release the handle during the finalization phase; <see langword="false"/> to prevent reliable release (not recommended).
        /// </param>
        /// <returns>
        /// </returns>
        public static PropertyListServiceClientHandle DangerousCreate(System.IntPtr unsafeHandle, bool ownsHandle)
        {
            PropertyListServiceClientHandle safeHandle = new PropertyListServiceClientHandle(ownsHandle);

            safeHandle.SetHandle(unsafeHandle);
            return(safeHandle);
        }
Esempio n. 2
0
        /// <summary>
        /// Receives a plist using the given property list service client.
        /// Binary or XML plists are automatically handled.
        /// This function is like property_list_service_receive_plist_with_timeout
        /// using a timeout of 10 seconds.
        /// </summary>
        /// <param name="client">
        /// The property list service client to use for receiving
        /// </param>
        /// <param name="plist">
        /// pointer to a plist_t that will point to the received plist
        /// upon successful return
        /// </param>
        /// <returns>
        /// PROPERTY_LIST_SERVICE_E_SUCCESS on success,
        /// PROPERTY_LIST_SERVICE_E_INVALID_ARG when client or *plist is NULL,
        /// PROPERTY_LIST_SERVICE_E_PLIST_ERROR when the received data cannot be
        /// converted to a plist, PROPERTY_LIST_SERVICE_E_MUX_ERROR when a
        /// communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when
        /// an unspecified error occurs.
        /// </returns>
        public virtual PropertyListServiceError property_list_service_receive_plist(PropertyListServiceClientHandle client, out PlistHandle plist)
        {
            PropertyListServiceError returnValue;

            returnValue = PropertyListServiceNativeMethods.property_list_service_receive_plist(client, out plist);
            plist.Api   = this.Parent;
            return(returnValue);
        }
 public static extern PropertyListServiceError property_list_service_send_xml_plist(PropertyListServiceClientHandle client, PlistHandle plist);
 public static extern PropertyListServiceError property_list_service_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out PropertyListServiceClientHandle client);
 public static extern PropertyListServiceError property_list_service_disable_ssl(PropertyListServiceClientHandle client);
 public static extern PropertyListServiceError property_list_service_receive_plist(PropertyListServiceClientHandle client, out PlistHandle plist);
Esempio n. 7
0
        /// <summary>
        /// Creates a new property list service for the specified port.
        /// </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
        /// property_list_service_client_t upon successful return.
        /// </param>
        /// <returns>
        /// PROPERTY_LIST_SERVICE_E_SUCCESS on success,
        /// PROPERTY_LIST_SERVICE_E_INVALID_ARG when one of the arguments is invalid,
        /// or PROPERTY_LIST_SERVICE_E_MUX_ERROR when connecting to the device failed.
        /// </returns>
        public virtual PropertyListServiceError property_list_service_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out PropertyListServiceClientHandle client)
        {
            PropertyListServiceError returnValue;

            returnValue = PropertyListServiceNativeMethods.property_list_service_client_new(device, service, out client);
            client.Api  = this.Parent;
            return(returnValue);
        }
Esempio n. 8
0
 /// <summary>
 /// Disable SSL for the given property list service client.
 /// </summary>
 /// <param name="client">
 /// The connected property list service client for which SSL
 /// should be disabled.
 /// </param>
 /// <returns>
 /// PROPERTY_LIST_SERVICE_E_SUCCESS on success,
 /// PROPERTY_LIST_SERVICE_E_INVALID_ARG if client or client->connection is
 /// NULL, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise.
 /// </returns>
 public virtual PropertyListServiceError property_list_service_disable_ssl(PropertyListServiceClientHandle client)
 {
     return(PropertyListServiceNativeMethods.property_list_service_disable_ssl(client));
 }
Esempio n. 9
0
 /// <summary>
 /// Sends a binary plist.
 /// </summary>
 /// <param name="client">
 /// The property list service client to use for sending.
 /// </param>
 /// <param name="plist">
 /// plist to send
 /// </param>
 /// <returns>
 /// PROPERTY_LIST_SERVICE_E_SUCCESS on success,
 /// PROPERTY_LIST_SERVICE_E_INVALID_ARG when client or plist is NULL,
 /// PROPERTY_LIST_SERVICE_E_PLIST_ERROR when dict is not a valid plist,
 /// or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when an unspecified error occurs.
 /// </returns>
 public virtual PropertyListServiceError property_list_service_send_binary_plist(PropertyListServiceClientHandle client, PlistHandle plist)
 {
     return(PropertyListServiceNativeMethods.property_list_service_send_binary_plist(client, plist));
 }
 public object MarshalNativeToManaged(System.IntPtr nativeData)
 {
     return(PropertyListServiceClientHandle.DangerousCreate(nativeData, false));
 }
Esempio n. 11
0
 public static PropertyListServiceClientHandle DangerousCreate(System.IntPtr unsafeHandle)
 {
     return(PropertyListServiceClientHandle.DangerousCreate(unsafeHandle, true));
 }