dom/media/bridge/IPeerConnection.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 #include "nsIThread.idl"
michael@0 2 #include "nsIDOMWindow.idl"
michael@0 3 #include "nsIPropertyBag2.idl"
michael@0 4
michael@0 5 interface nsIDOMMediaStream;
michael@0 6 interface nsIDOMDataChannel;
michael@0 7
michael@0 8 /*
michael@0 9 * Manager interface to PeerConnection.js so it is accessible from C++.
michael@0 10 */
michael@0 11 [scriptable, uuid(c2218bd2-2648-4701-8fa6-305d3379e9f8)]
michael@0 12 interface IPeerConnectionManager : nsISupports
michael@0 13 {
michael@0 14 boolean hasActivePeerConnection(in unsigned long innerWindowID);
michael@0 15 };
michael@0 16
michael@0 17 %{C++
michael@0 18 #define IPEERCONNECTION_MANAGER_CONTRACTID "@mozilla.org/dom/peerconnectionmanager;1"
michael@0 19 %}
michael@0 20
michael@0 21 /* Do not confuse with nsIDOMRTCPeerConnection. This interface is purely for
michael@0 22 * communication between the PeerConnection JS DOM binding and the C++
michael@0 23 * implementation in SIPCC.
michael@0 24 *
michael@0 25 * See media/webrtc/signaling/include/PeerConnectionImpl.h
michael@0 26 */
michael@0 27 [scriptable, uuid(d7dfe148-0416-446b-a128-66a7c71ae8d3)]
michael@0 28 interface IPeerConnectionObserver : nsISupports
michael@0 29 {
michael@0 30 };
michael@0 31
michael@0 32 [scriptable, uuid(c9c31639-1a49-4533-8429-f6a348c4d8c3)]
michael@0 33 interface IPeerConnection : nsISupports
michael@0 34 {
michael@0 35 const unsigned long kHintAudio = 0x00000001;
michael@0 36 const unsigned long kHintVideo = 0x00000002;
michael@0 37
michael@0 38 const long kActionNone = -1;
michael@0 39 const long kActionOffer = 0;
michael@0 40 const long kActionAnswer = 1;
michael@0 41 const long kActionPRAnswer = 2;
michael@0 42
michael@0 43 const long kIceGathering = 0;
michael@0 44 const long kIceWaiting = 1;
michael@0 45 const long kIceChecking = 2;
michael@0 46 const long kIceConnected = 3;
michael@0 47 const long kIceFailed = 4;
michael@0 48
michael@0 49 /* for readyState on Peer Connection */
michael@0 50 const long kNew = 0;
michael@0 51 const long kNegotiating = 1;
michael@0 52 const long kActive = 2;
michael@0 53 const long kClosing = 3;
michael@0 54 const long kClosed = 4;
michael@0 55
michael@0 56 /* for 'type' in DataChannelInit dictionary */
michael@0 57 const unsigned short kDataChannelReliable = 0;
michael@0 58 const unsigned short kDataChannelPartialReliableRexmit = 1;
michael@0 59 const unsigned short kDataChannelPartialReliableTimed = 2;
michael@0 60
michael@0 61 /* Constants for 'name' in error callbacks */
michael@0 62 const unsigned long kNoError = 0; // Test driver only
michael@0 63 const unsigned long kInvalidConstraintsType = 1;
michael@0 64 const unsigned long kInvalidCandidateType = 2;
michael@0 65 const unsigned long kInvalidMediastreamTrack = 3;
michael@0 66 const unsigned long kInvalidState = 4;
michael@0 67 const unsigned long kInvalidSessionDescription = 5;
michael@0 68 const unsigned long kIncompatibleSessionDescription = 6;
michael@0 69 const unsigned long kIncompatibleConstraints = 7;
michael@0 70 const unsigned long kIncompatibleMediaStreamTrack = 8;
michael@0 71 const unsigned long kInternalError = 9;
michael@0 72 const unsigned long kMaxErrorType = 9; // Same as final error
michael@0 73 };

mercurial