/// <summary> /// Creates a new <see cref="WebInspectorClientHandle"/> 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 WebInspectorClientHandle DangerousCreate(System.IntPtr unsafeHandle, bool ownsHandle) { WebInspectorClientHandle safeHandle = new WebInspectorClientHandle(ownsHandle); safeHandle.SetHandle(unsafeHandle); return(safeHandle); }
/// <summary> /// Receives a plist using the given webinspector client. /// </summary> /// <param name="client"> /// The webinspector 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> /// <param name="timeout"> /// Maximum time in milliseconds to wait for data. /// </param> /// <returns> /// WEBINSPECTOR_E_SUCCESS on success, /// WEBINSPECTOR_E_INVALID_ARG when client or *plist is NULL, /// WEBINSPECTOR_E_PLIST_ERROR when the received data cannot be /// converted to a plist, WEBINSPECTOR_E_MUX_ERROR when a /// communication error occurs, or WEBINSPECTOR_E_UNKNOWN_ERROR /// when an unspecified error occurs. /// </returns> public virtual WebInspectorError webinspector_receive_with_timeout(WebInspectorClientHandle client, out PlistHandle plist, uint timeoutMs) { WebInspectorError returnValue; returnValue = WebInspectorNativeMethods.webinspector_receive_with_timeout(client, out plist, timeoutMs); plist.Api = this.Parent; return(returnValue); }
/// <summary> /// Receives a plist from the service. /// </summary> /// <param name="client"> /// The webinspector client /// </param> /// <param name="plist"> /// The plist to store the received data /// </param> /// <returns> /// DIAGNOSTICS_RELAY_E_SUCCESS on success, /// DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL /// </returns> public virtual WebInspectorError webinspector_receive(WebInspectorClientHandle client, out PlistHandle plist) { WebInspectorError returnValue; returnValue = WebInspectorNativeMethods.webinspector_receive(client, out plist); plist.Api = this.Parent; return(returnValue); }
public object MarshalNativeToManaged(System.IntPtr nativeData) { return(WebInspectorClientHandle.DangerousCreate(nativeData, false)); }
public static extern WebInspectorError webinspector_client_start_service(iDeviceHandle device, out WebInspectorClientHandle client, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string label);
public static extern WebInspectorError webinspector_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out WebInspectorClientHandle client);
public static extern WebInspectorError webinspector_receive_with_timeout(WebInspectorClientHandle client, out PlistHandle plist, uint timeoutMs);
public static extern WebInspectorError webinspector_receive(WebInspectorClientHandle client, out PlistHandle plist);
public static extern WebInspectorError webinspector_send(WebInspectorClientHandle client, PlistHandle plist);
/// <summary> /// Creates a new <see cref="WebInspectorClientHandle"/> from a <see cref="IntPtr"/>. /// </summary> /// <param name="unsafeHandle"> /// The underlying <see cref="IntPtr"/> /// </param> /// <returns> /// </returns> public static WebInspectorClientHandle DangerousCreate(System.IntPtr unsafeHandle) { return(WebInspectorClientHandle.DangerousCreate(unsafeHandle, true)); }
/// <summary> /// Starts a new webinspector 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 /// webinspector_client_t upon successful return. Must be freed using /// webinspector_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> /// WEBINSPECTOR_E_SUCCESS on success, or an WEBINSPECTOR_E_* error /// code otherwise. /// </returns> public virtual WebInspectorError webinspector_client_start_service(iDeviceHandle device, out WebInspectorClientHandle client, string label) { WebInspectorError returnValue; returnValue = WebInspectorNativeMethods.webinspector_client_start_service(device, out client, label); client.Api = this.Parent; return(returnValue); }
/// <summary> /// Connects to the webinspector 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 point to a newly allocated /// webinspector_client_t upon successful return. Must be freed using /// webinspector_client_free() after use. /// </param> /// <returns> /// WEBINSPECTOR_E_SUCCESS on success, WEBINSPECTOR_E_INVALID_ARG when /// client is NULL, or an WEBINSPECTOR_E_* error code otherwise. /// </returns> public virtual WebInspectorError webinspector_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out WebInspectorClientHandle client) { WebInspectorError returnValue; returnValue = WebInspectorNativeMethods.webinspector_client_new(device, service, out client); client.Api = this.Parent; return(returnValue); }
/// <summary> /// Sends a plist to the service. /// </summary> /// <param name="client"> /// The webinspector client /// </param> /// <param name="plist"> /// The plist to send /// </param> /// <returns> /// DIAGNOSTICS_RELAY_E_SUCCESS on success, /// DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL /// </returns> public virtual WebInspectorError webinspector_send(WebInspectorClientHandle client, PlistHandle plist) { return(WebInspectorNativeMethods.webinspector_send(client, plist)); }