예제 #1
0
        /// <summary>
        /// Creates a new <see cref="DiagnosticsRelayClientHandle"/> 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 DiagnosticsRelayClientHandle DangerousCreate(System.IntPtr unsafeHandle, bool ownsHandle)
        {
            DiagnosticsRelayClientHandle safeHandle = new DiagnosticsRelayClientHandle(ownsHandle);

            safeHandle.SetHandle(unsafeHandle);
            return(safeHandle);
        }
예제 #2
0
        public virtual DiagnosticsRelayError diagnostics_relay_query_mobilegestalt(DiagnosticsRelayClientHandle client, PlistHandle keys, out PlistHandle result)
        {
            DiagnosticsRelayError returnValue;

            returnValue = DiagnosticsRelayNativeMethods.diagnostics_relay_query_mobilegestalt(client, keys, out result);
            result.Api  = this.Parent;
            return(returnValue);
        }
예제 #3
0
        /// <summary>
        /// Shutdown of the device and optionally show a user notification.
        /// </summary>
        /// <param name="client">
        /// The diagnostics_relay client
        /// </param>
        /// <param name="flags">
        /// A binary flag combination of
        /// DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT to wait until
        /// diagnostics_relay_client_free() disconnects before execution and
        /// DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL to show a "FAIL" dialog
        /// or DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS to show an "OK" dialog
        /// </param>
        /// <returns>
        /// DIAGNOSTICS_RELAY_E_SUCCESS on success,
        /// DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,
        /// DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the
        /// request
        /// </returns>
        public virtual DiagnosticsRelayError diagnostics_relay_request_diagnostics(DiagnosticsRelayClientHandle client, string type, out PlistHandle diagnostics)
        {
            DiagnosticsRelayError returnValue;

            returnValue     = DiagnosticsRelayNativeMethods.diagnostics_relay_request_diagnostics(client, type, out diagnostics);
            diagnostics.Api = this.Parent;
            return(returnValue);
        }
 public static extern DiagnosticsRelayError diagnostics_relay_client_start_service(iDeviceHandle device, out DiagnosticsRelayClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string label);
 public static extern DiagnosticsRelayError diagnostics_relay_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out DiagnosticsRelayClientHandle client);
 public static extern DiagnosticsRelayError diagnostics_relay_query_ioregistry_plane(DiagnosticsRelayClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string plane, out PlistHandle result);
 public static extern DiagnosticsRelayError diagnostics_relay_query_mobilegestalt(DiagnosticsRelayClientHandle client, PlistHandle keys, out PlistHandle result);
 public static extern DiagnosticsRelayError diagnostics_relay_request_diagnostics(DiagnosticsRelayClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string type, out PlistHandle diagnostics);
 public static extern DiagnosticsRelayError diagnostics_relay_shutdown(DiagnosticsRelayClientHandle client, DiagnosticsRelayAction flags);
예제 #10
0
 /// <summary>
 /// Puts the device into deep sleep mode and disconnects from host.
 /// </summary>
 /// <param name="client">
 /// The diagnostics_relay client
 /// </param>
 /// <returns>
 /// DIAGNOSTICS_RELAY_E_SUCCESS on success,
 /// DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,
 /// DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the
 /// request
 /// </returns>
 public virtual DiagnosticsRelayError diagnostics_relay_sleep(DiagnosticsRelayClientHandle client)
 {
     return(DiagnosticsRelayNativeMethods.diagnostics_relay_sleep(client));
 }
 public static extern DiagnosticsRelayError diagnostics_relay_goodbye(DiagnosticsRelayClientHandle client);
예제 #12
0
        /// <summary>
        /// Starts a new diagnostics_relay 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
        /// diagnostics_relay_client_t upon successful return. Must be freed using
        /// diagnostics_relay_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>
        /// DIAGNOSTICS_RELAY_E_SUCCESS on success, or an DIAGNOSTICS_RELAY_E_* error
        /// code otherwise.
        /// </returns>
        public virtual DiagnosticsRelayError diagnostics_relay_client_start_service(iDeviceHandle device, out DiagnosticsRelayClientHandle client, string label)
        {
            DiagnosticsRelayError returnValue;

            returnValue = DiagnosticsRelayNativeMethods.diagnostics_relay_client_start_service(device, out client, label);
            client.Api  = this.Parent;
            return(returnValue);
        }
예제 #13
0
        /// <summary>
        /// Connects to the diagnostics_relay 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">
        /// Reference that will point to a newly allocated
        /// diagnostics_relay_client_t upon successful return.
        /// </param>
        /// <returns>
        /// DIAGNOSTICS_RELAY_E_SUCCESS on success,
        /// DIAGNOSTICS_RELAY_E_INVALID_ARG when one of the parameters is invalid,
        /// or DIAGNOSTICS_RELAY_E_MUX_ERROR when the connection failed.
        /// </returns>
        public virtual DiagnosticsRelayError diagnostics_relay_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out DiagnosticsRelayClientHandle client)
        {
            DiagnosticsRelayError returnValue;

            returnValue = DiagnosticsRelayNativeMethods.diagnostics_relay_client_new(device, service, out client);
            client.Api  = this.Parent;
            return(returnValue);
        }
예제 #14
0
        public virtual DiagnosticsRelayError diagnostics_relay_query_ioregistry_plane(DiagnosticsRelayClientHandle client, string plane, out PlistHandle result)
        {
            DiagnosticsRelayError returnValue;

            returnValue = DiagnosticsRelayNativeMethods.diagnostics_relay_query_ioregistry_plane(client, plane, out result);
            result.Api  = this.Parent;
            return(returnValue);
        }
예제 #15
0
 /// <summary>
 /// Shutdown of the device and optionally show a user notification.
 /// </summary>
 /// <param name="client">
 /// The diagnostics_relay client
 /// </param>
 /// <param name="flags">
 /// A binary flag combination of
 /// DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT to wait until
 /// diagnostics_relay_client_free() disconnects before execution and
 /// DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL to show a "FAIL" dialog
 /// or DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS to show an "OK" dialog
 /// </param>
 /// <returns>
 /// DIAGNOSTICS_RELAY_E_SUCCESS on success,
 /// DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,
 /// DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the
 /// request
 /// </returns>
 public virtual DiagnosticsRelayError diagnostics_relay_shutdown(DiagnosticsRelayClientHandle client, DiagnosticsRelayAction flags)
 {
     return(DiagnosticsRelayNativeMethods.diagnostics_relay_shutdown(client, flags));
 }
 public static extern DiagnosticsRelayError diagnostics_relay_sleep(DiagnosticsRelayClientHandle client);
예제 #17
0
 public static DiagnosticsRelayClientHandle DangerousCreate(System.IntPtr unsafeHandle)
 {
     return(DiagnosticsRelayClientHandle.DangerousCreate(unsafeHandle, true));
 }
예제 #18
0
 public object MarshalNativeToManaged(System.IntPtr nativeData)
 {
     return(DiagnosticsRelayClientHandle.DangerousCreate(nativeData, false));
 }