1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/media/bridge/IPeerConnection.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,73 @@ 1.4 +#include "nsIThread.idl" 1.5 +#include "nsIDOMWindow.idl" 1.6 +#include "nsIPropertyBag2.idl" 1.7 + 1.8 +interface nsIDOMMediaStream; 1.9 +interface nsIDOMDataChannel; 1.10 + 1.11 +/* 1.12 + * Manager interface to PeerConnection.js so it is accessible from C++. 1.13 + */ 1.14 +[scriptable, uuid(c2218bd2-2648-4701-8fa6-305d3379e9f8)] 1.15 +interface IPeerConnectionManager : nsISupports 1.16 +{ 1.17 + boolean hasActivePeerConnection(in unsigned long innerWindowID); 1.18 +}; 1.19 + 1.20 +%{C++ 1.21 +#define IPEERCONNECTION_MANAGER_CONTRACTID "@mozilla.org/dom/peerconnectionmanager;1" 1.22 +%} 1.23 + 1.24 +/* Do not confuse with nsIDOMRTCPeerConnection. This interface is purely for 1.25 + * communication between the PeerConnection JS DOM binding and the C++ 1.26 + * implementation in SIPCC. 1.27 + * 1.28 + * See media/webrtc/signaling/include/PeerConnectionImpl.h 1.29 + */ 1.30 +[scriptable, uuid(d7dfe148-0416-446b-a128-66a7c71ae8d3)] 1.31 +interface IPeerConnectionObserver : nsISupports 1.32 +{ 1.33 +}; 1.34 + 1.35 +[scriptable, uuid(c9c31639-1a49-4533-8429-f6a348c4d8c3)] 1.36 +interface IPeerConnection : nsISupports 1.37 +{ 1.38 + const unsigned long kHintAudio = 0x00000001; 1.39 + const unsigned long kHintVideo = 0x00000002; 1.40 + 1.41 + const long kActionNone = -1; 1.42 + const long kActionOffer = 0; 1.43 + const long kActionAnswer = 1; 1.44 + const long kActionPRAnswer = 2; 1.45 + 1.46 + const long kIceGathering = 0; 1.47 + const long kIceWaiting = 1; 1.48 + const long kIceChecking = 2; 1.49 + const long kIceConnected = 3; 1.50 + const long kIceFailed = 4; 1.51 + 1.52 + /* for readyState on Peer Connection */ 1.53 + const long kNew = 0; 1.54 + const long kNegotiating = 1; 1.55 + const long kActive = 2; 1.56 + const long kClosing = 3; 1.57 + const long kClosed = 4; 1.58 + 1.59 + /* for 'type' in DataChannelInit dictionary */ 1.60 + const unsigned short kDataChannelReliable = 0; 1.61 + const unsigned short kDataChannelPartialReliableRexmit = 1; 1.62 + const unsigned short kDataChannelPartialReliableTimed = 2; 1.63 + 1.64 + /* Constants for 'name' in error callbacks */ 1.65 + const unsigned long kNoError = 0; // Test driver only 1.66 + const unsigned long kInvalidConstraintsType = 1; 1.67 + const unsigned long kInvalidCandidateType = 2; 1.68 + const unsigned long kInvalidMediastreamTrack = 3; 1.69 + const unsigned long kInvalidState = 4; 1.70 + const unsigned long kInvalidSessionDescription = 5; 1.71 + const unsigned long kIncompatibleSessionDescription = 6; 1.72 + const unsigned long kIncompatibleConstraints = 7; 1.73 + const unsigned long kIncompatibleMediaStreamTrack = 8; 1.74 + const unsigned long kInternalError = 9; 1.75 + const unsigned long kMaxErrorType = 9; // Same as final error 1.76 +};