tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

IPeerConnection.idl (2323B)


      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
      3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
      4 
      5 #include "nsIThread.idl"
      6 #include "nsIDOMWindow.idl"
      7 #include "nsIPropertyBag2.idl"
      8 
      9 /* Do not confuse with nsIDOMRTCPeerConnection. This interface is purely for
     10 * communication between the PeerConnection JS DOM binding and the C++
     11 * implementation in SIPCC.
     12 *
     13 * See media/webrtc/signaling/include/PeerConnectionImpl.h
     14 */
     15 [scriptable, uuid(d7dfe148-0416-446b-a128-66a7c71ae8d3)]
     16 interface IPeerConnectionObserver : nsISupports
     17 {
     18 };
     19 
     20 [scriptable, uuid(14afc8e7-e421-4d0c-99a5-69308d871481)]
     21 interface IPeerConnection : nsISupports
     22 {
     23  const unsigned long kHintAudio = 0x00000001;
     24  const unsigned long kHintVideo = 0x00000002;
     25 
     26  const long kActionNone = -1;
     27  const long kActionOffer = 0;
     28  const long kActionAnswer = 1;
     29  const long kActionPRAnswer = 2;
     30  const long kActionRollback = 3;
     31 
     32  const long kIceGathering = 0;
     33  const long kIceWaiting = 1;
     34  const long kIceChecking = 2;
     35  const long kIceConnected = 3;
     36  const long kIceFailed = 4;
     37 
     38  /* for readyState on Peer Connection */
     39  const long kNew = 0;
     40  const long kNegotiating = 1;
     41  const long kActive = 2;
     42  const long kClosing = 3;
     43  const long kClosed = 4;
     44 
     45  /* for 'type' in DataChannelInit dictionary */
     46  const unsigned short kDataChannelReliable = 0;
     47  const unsigned short kDataChannelPartialReliableRexmit = 1;
     48  const unsigned short kDataChannelPartialReliableTimed = 2;
     49 
     50  /* Constants for 'name' in error callbacks */
     51  const unsigned long kNoError                          = 0; // Test driver only
     52  const unsigned long kInvalidCandidate                 = 2;
     53  const unsigned long kInvalidMediastreamTrack          = 3;
     54  const unsigned long kInvalidState                     = 4;
     55  const unsigned long kInvalidSessionDescription        = 5;
     56  const unsigned long kIncompatibleSessionDescription   = 6;
     57  const unsigned long kIncompatibleMediaStreamTrack     = 8;
     58  const unsigned long kInternalError                    = 9;
     59  const unsigned long kTypeError                        = 10;
     60  const unsigned long kOperationError                   = 11;
     61  const unsigned long kMaxErrorType                     = 11; // Same as final error
     62 };