tor-browser

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

PMediaTransport.ipdl (3925B)


      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 file,
      3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 include protocol PBackground;
      6 
      7 #ifdef MOZ_WEBRTC
      8 include WebrtcProxyConfig;
      9 
     10 // ParamTraits stuff for generated code and other classes we don't want to change
     11 include "mozilla/net/NrIceStunAddrMessageUtils.h";
     12 include "mozilla/media/webrtc/WebrtcIPCTraits.h";
     13 using mozilla::StringVector from "mozilla/media/webrtc/WebrtcIPCTraits.h";
     14 using mozilla::CandidateInfo from "mozilla/media/webrtc/WebrtcIPCTraits.h";
     15 using mozilla::DtlsDigestList from "mozilla/media/webrtc/WebrtcIPCTraits.h";
     16 using std::string from "string";
     17 using struct mozilla::dom::RTCStatsCollection from "mozilla/dom/RTCStatsReportBinding.h";
     18 using WebrtcGlobalLog from "mozilla/media/webrtc/WebrtcGlobal.h";
     19 using mozilla::dom::RTCIceServer from "mozilla/dom/RTCConfigurationBinding.h";
     20 using mozilla::dom::RTCIceTransportPolicy from "mozilla/dom/RTCConfigurationBinding.h";
     21 
     22 // ParamTraits stuff for our own classes
     23 using mozilla::MediaPacket from "transport/mediapacket.h";
     24 include "mozilla/net/NrIceStunAddrMessageUtils.h";
     25 using mozilla::net::NrIceStunAddrArray from "mozilla/net/PStunAddrsParams.h";
     26 #endif // MOZ_WEBRTC
     27 
     28 namespace mozilla {
     29 namespace dom {
     30 
     31 [ParentProc=Socket, ChildProc=Content]
     32 async protocol PMediaTransport {
     33 #ifdef MOZ_WEBRTC
     34 parent:
     35   async GetIceLog(nsCString pattern) returns (WebrtcGlobalLog loglines);
     36   async ClearIceLog();
     37   async EnterPrivateMode();
     38   async ExitPrivateMode();
     39 
     40   async CreateIceCtx(string name);
     41 
     42   async SetIceConfig(RTCIceServer[] iceServers,
     43                      RTCIceTransportPolicy icePolicy);
     44 
     45   async SetProxyConfig(WebrtcProxyConfig proxyConfig);
     46 
     47   async EnsureProvisionalTransport(string transportId,
     48                                    string localUfrag,
     49                                    string localPwd,
     50                                    int componentCount);
     51 
     52   async SetTargetForDefaultLocalAddressLookup(string targetIp,
     53                                               uint16_t targetPort);
     54 
     55   async StartIceGathering(bool defaultRouteOnly,
     56                           bool obfuscateHostAddresses,
     57                           NrIceStunAddrArray stunAddrs);
     58 
     59   async ActivateTransport(string transportId,
     60                           string localUfrag,
     61                           string localPwd,
     62                           int componentCount,
     63                           string remoteUfrag,
     64                           string remotePwd,
     65                           uint8_t[] keyDer,
     66                           uint8_t[] certDer,
     67                           int authType,
     68                           bool dtlsClient,
     69                           DtlsDigestList digests,
     70                           bool privacyRequested);
     71 
     72   async RemoveTransportsExcept(StringVector transportIds);
     73 
     74   async StartIceChecks(bool isControlling,
     75                        StringVector iceOptions);
     76 
     77   async SendPacket(string transportId, MediaPacket packet);
     78 
     79   async AddIceCandidate(string transportId,
     80                         string candidate,
     81                         string ufrag,
     82                         string obfuscatedAddr);
     83 
     84   async UpdateNetworkState(bool online);
     85 
     86   async GetIceStats(string transportId, double now) returns (UniquePtr<RTCStatsCollection> stats);
     87 
     88 child:
     89   async OnCandidate(string transportId, CandidateInfo candidateInfo);
     90   async OnAlpnNegotiated(string alpn);
     91   async OnGatheringStateChange(string transportId, int state);
     92   async OnConnectionStateChange(string transportId, int state);
     93   async OnPacketReceived(string transportId, MediaPacket packet);
     94   async OnEncryptedSending(string transportId, MediaPacket packet);
     95   async OnStateChange(string transportId, int state);
     96   async OnRtcpStateChange(string transportId, int state);
     97 
     98 #endif // MOZ_WEBRTC
     99 };
    100 } // namespace dom
    101 } // namespace mozilla