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

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

mercurial