michael@0: #include "nsIThread.idl" michael@0: #include "nsIDOMWindow.idl" michael@0: #include "nsIPropertyBag2.idl" michael@0: michael@0: interface nsIDOMMediaStream; michael@0: interface nsIDOMDataChannel; michael@0: michael@0: /* michael@0: * Manager interface to PeerConnection.js so it is accessible from C++. michael@0: */ michael@0: [scriptable, uuid(c2218bd2-2648-4701-8fa6-305d3379e9f8)] michael@0: interface IPeerConnectionManager : nsISupports michael@0: { michael@0: boolean hasActivePeerConnection(in unsigned long innerWindowID); michael@0: }; michael@0: michael@0: %{C++ michael@0: #define IPEERCONNECTION_MANAGER_CONTRACTID "@mozilla.org/dom/peerconnectionmanager;1" michael@0: %} michael@0: michael@0: /* Do not confuse with nsIDOMRTCPeerConnection. This interface is purely for michael@0: * communication between the PeerConnection JS DOM binding and the C++ michael@0: * implementation in SIPCC. michael@0: * michael@0: * See media/webrtc/signaling/include/PeerConnectionImpl.h michael@0: */ michael@0: [scriptable, uuid(d7dfe148-0416-446b-a128-66a7c71ae8d3)] michael@0: interface IPeerConnectionObserver : nsISupports michael@0: { michael@0: }; michael@0: michael@0: [scriptable, uuid(c9c31639-1a49-4533-8429-f6a348c4d8c3)] michael@0: interface IPeerConnection : nsISupports michael@0: { michael@0: const unsigned long kHintAudio = 0x00000001; michael@0: const unsigned long kHintVideo = 0x00000002; michael@0: michael@0: const long kActionNone = -1; michael@0: const long kActionOffer = 0; michael@0: const long kActionAnswer = 1; michael@0: const long kActionPRAnswer = 2; michael@0: michael@0: const long kIceGathering = 0; michael@0: const long kIceWaiting = 1; michael@0: const long kIceChecking = 2; michael@0: const long kIceConnected = 3; michael@0: const long kIceFailed = 4; michael@0: michael@0: /* for readyState on Peer Connection */ michael@0: const long kNew = 0; michael@0: const long kNegotiating = 1; michael@0: const long kActive = 2; michael@0: const long kClosing = 3; michael@0: const long kClosed = 4; michael@0: michael@0: /* for 'type' in DataChannelInit dictionary */ michael@0: const unsigned short kDataChannelReliable = 0; michael@0: const unsigned short kDataChannelPartialReliableRexmit = 1; michael@0: const unsigned short kDataChannelPartialReliableTimed = 2; michael@0: michael@0: /* Constants for 'name' in error callbacks */ michael@0: const unsigned long kNoError = 0; // Test driver only michael@0: const unsigned long kInvalidConstraintsType = 1; michael@0: const unsigned long kInvalidCandidateType = 2; michael@0: const unsigned long kInvalidMediastreamTrack = 3; michael@0: const unsigned long kInvalidState = 4; michael@0: const unsigned long kInvalidSessionDescription = 5; michael@0: const unsigned long kIncompatibleSessionDescription = 6; michael@0: const unsigned long kIncompatibleConstraints = 7; michael@0: const unsigned long kIncompatibleMediaStreamTrack = 8; michael@0: const unsigned long kInternalError = 9; michael@0: const unsigned long kMaxErrorType = 9; // Same as final error michael@0: };