DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (b6d82b1a6b02)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

include protocol PBackground;

#ifdef MOZ_WEBRTC
include NeckoChannelParams;

// ParamTraits stuff for generated code and other classes we don't want to change
include "mozilla/net/NrIceStunAddrMessageUtils.h";
include "mozilla/media/webrtc/WebrtcIPCTraits.h";
using StringVector from "mozilla/media/webrtc/WebrtcIPCTraits.h";
using CandidateInfo from "mozilla/media/webrtc/WebrtcIPCTraits.h";
using DtlsDigestList from "mozilla/media/webrtc/WebrtcIPCTraits.h";
using std::string from "ipc/IPCMessageUtils.h";
using struct mozilla::dom::RTCStatsReportInternal from "mozilla/dom/RTCStatsReportBinding.h";
using struct mozilla::dom::MovableRTCStatsReportInternal from "mozilla/media/webrtc/WebrtcGlobal.h";
using WebrtcGlobalLog from "mozilla/media/webrtc/WebrtcGlobal.h";
using mozilla::dom::RTCIceServer from "mozilla/dom/RTCConfigurationBinding.h";
using mozilla::dom::RTCIceTransportPolicy from "mozilla/dom/RTCConfigurationBinding.h";
using TabId from "mozilla/dom/ipc/IdType.h";

// ParamTraits stuff for our own classes
using MediaPacket from "mtransport/mediapacket.h";
include "mozilla/net/NrIceStunAddrMessageUtils.h";
using net::NrIceStunAddrArray from "mozilla/net/PStunAddrsParams.h";
#endif // MOZ_WEBRTC

namespace mozilla {
namespace dom {

async protocol PMediaTransport {
  manager PBackground;

parent:
  async __delete__();

#ifdef MOZ_WEBRTC
  async GetIceLog(nsCString pattern) returns (WebrtcGlobalLog loglines);
  async ClearIceLog();
  async EnterPrivateMode();
  async ExitPrivateMode();

  async CreateIceCtx(string name,
                     RTCIceServer[] iceServers,
                     RTCIceTransportPolicy icePolicy);

  async SetProxyServer(TabId id,
                       LoadInfoArgs args, // Does this have the id?
                       nsCString alpn);

  async EnsureProvisionalTransport(string transportId,
                                   string localUfrag,
                                   string localPwd,
                                   int componentCount);

  async SetTargetForDefaultLocalAddressLookup(string targetIp,
                                              uint16_t targetPort);

  async StartIceGathering(bool defaultRouteOnly,
                          bool obfuscateHostAddresses,
                          NrIceStunAddrArray stunAddrs);

  async ActivateTransport(string transportId,
                          string localUfrag,
                          string localPwd,
                          int componentCount,
                          string remoteUfrag,
                          string remotePwd,
                          uint8_t[] keyDer,
                          uint8_t[] certDer,
                          int authType,
                          bool dtlsClient,
                          DtlsDigestList digests,
                          bool privacyRequested);

  async RemoveTransportsExcept(StringVector transportIds);

  async StartIceChecks(bool isControlling,
                       StringVector iceOptions);

  async SendPacket(string transportId, MediaPacket packet);

  async AddIceCandidate(string transportId,
                        string candidate,
                        string ufrag);

  async UpdateNetworkState(bool online);

  async GetIceStats(string transportId,
                    double now,
                    RTCStatsReportInternal reportIn) returns (MovableRTCStatsReportInternal reportOut);

child:
  async OnCandidate(string transportId, CandidateInfo candidateInfo);
  async OnAlpnNegotiated(string alpn);
  async OnGatheringStateChange(int state);
  async OnConnectionStateChange(int state);
  async OnPacketReceived(string transportId, MediaPacket packet);
  async OnEncryptedSending(string transportId, MediaPacket packet);
  async OnStateChange(string transportId, int state);
  async OnRtcpStateChange(string transportId, int state);

#endif // MOZ_WEBRTC
};
} // namespace dom
} // namespace mozilla