示例#1
0
        /// <summary>
        /// Creates a new lockdownd client for the device.
        /// </summary>
        /// <param name="device">
        /// The device to create a lockdownd client for
        /// </param>
        /// <param name="client">
        /// The pointer to the location of the new lockdownd_client
        /// </param>
        /// <param name="label">
        /// The label to use for communication. Usually the program name.
        /// </param>
        /// <returns>
        /// LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL
        /// </returns>
        /// <remarks>
        /// This function does not pair with the device or start a session. This
        /// has to be done manually by the caller after the client is created.
        /// The device disconnects automatically if the lockdown connection idles
        /// for more than 10 seconds. Make sure to call lockdownd_client_free() as soon
        /// as the connection is no longer needed.
        /// </remarks>
        public virtual LockdownError lockdownd_client_new(iDeviceHandle device, out LockdownClientHandle client, string label)
        {
            LockdownError returnValue;

            returnValue = LockdownNativeMethods.lockdownd_client_new(device, out client, label);
            client.Api  = this.Parent;
            return(returnValue);
        }