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