dom/network/interfaces/nsITCPSocketChild.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #include "domstubs.idl"
michael@0 6
michael@0 7 interface nsITCPSocketInternal;
michael@0 8 interface nsIDOMWindow;
michael@0 9
michael@0 10 // Interface to allow the content process socket to reach the IPC bridge.
michael@0 11 // Implemented in C++ as TCPSocketChild, referenced as _socketBridge in TCPSocket.js
michael@0 12 [scriptable, uuid(292ebb3a-beac-4e06-88b0-b5b4e88ebd1c)]
michael@0 13 interface nsITCPSocketChild : nsISupports
michael@0 14 {
michael@0 15 // Tell the chrome process to open a corresponding connection with the given parameters
michael@0 16 [implicit_jscontext]
michael@0 17 void sendOpen(in nsITCPSocketInternal socket, in DOMString host,
michael@0 18 in unsigned short port, in boolean ssl, in DOMString binaryType,
michael@0 19 in nsIDOMWindow window, in jsval windowVal);
michael@0 20
michael@0 21 // Tell the chrome process to perform send and update the tracking number.
michael@0 22 [implicit_jscontext]
michael@0 23 void sendSend(in jsval data, in unsigned long byteOffset,
michael@0 24 in unsigned long byteLength, in unsigned long trackingNumber);
michael@0 25
michael@0 26 // Tell the chrome process to perform equivalent operations to all following methods
michael@0 27 void sendResume();
michael@0 28 void sendSuspend();
michael@0 29 void sendClose();
michael@0 30 void sendStartTLS();
michael@0 31
michael@0 32 /**
michael@0 33 * Initialize the TCP socket on the child side for IPC. It is called from the child side,
michael@0 34 * which is generated in receiving a notification of accepting any open request
michael@0 35 * on the parent side. We use single implementation that works on a child process
michael@0 36 * as well as in the single process model.
michael@0 37 *
michael@0 38 * @param socket
michael@0 39 * The TCP socket on the child side.
michael@0 40 * This instance is connected with the child IPC side of the IPC bridge.
michael@0 41 * @param windowVal
michael@0 42 * The window object on the child side to create data
michael@0 43 * as "jsval" for deserialization.
michael@0 44 */
michael@0 45 [implicit_jscontext]
michael@0 46 void setSocketAndWindow(in nsITCPSocketInternal socket, in jsval windowVal);
michael@0 47 };

mercurial