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
|
/* 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/. */
#ifndef _MTRANSPORTHANDLER_PARENT_H__
#define _MTRANSPORTHANDLER_PARENT_H__
#include "mozilla/dom/PMediaTransportParent.h"
#include <memory>
namespace mozilla {
class MediaTransportParent : public dom::PMediaTransportParent {
public:
#ifdef MOZ_WEBRTC
MediaTransportParent();
virtual ~MediaTransportParent();
mozilla::ipc::IPCResult RecvGetIceLog(const nsCString& pattern,
GetIceLogResolver&& aResolve);
mozilla::ipc::IPCResult RecvClearIceLog();
mozilla::ipc::IPCResult RecvEnterPrivateMode();
mozilla::ipc::IPCResult RecvExitPrivateMode();
mozilla::ipc::IPCResult RecvCreateIceCtx(const string& name);
mozilla::ipc::IPCResult RecvSetIceConfig(
nsTArray<RTCIceServer>&& iceServers,
const RTCIceTransportPolicy& icePolicy);
mozilla::ipc::IPCResult RecvSetProxyConfig(
const net::WebrtcProxyConfig& aProxyConfig);
mozilla::ipc::IPCResult RecvEnsureProvisionalTransport(
const string& transportId, const string& localUfrag,
const string& localPwd, const int& componentCount);
mozilla::ipc::IPCResult RecvSetTargetForDefaultLocalAddressLookup(
const string& targetIp, uint16_t targetPort);
mozilla::ipc::IPCResult RecvStartIceGathering(
const bool& defaultRouteOnly, const bool& obfuscateAddresses,
const net::NrIceStunAddrArray& stunAddrs);
mozilla::ipc::IPCResult RecvActivateTransport(
const string& transportId, const string& localUfrag,
const string& localPwd, const int& componentCount,
const string& remoteUfrag, const string& remotePwd,
nsTArray<uint8_t>&& keyDer, nsTArray<uint8_t>&& certDer,
const int& authType, const bool& dtlsClient,
const DtlsDigestList& digests, const bool& privacyRequested);
mozilla::ipc::IPCResult RecvRemoveTransportsExcept(
const StringVector& transportIds);
mozilla::ipc::IPCResult RecvStartIceChecks(const bool& isControlling,
const StringVector& iceOptions);
mozilla::ipc::IPCResult RecvSendPacket(const string& transportId,
MediaPacket&& packet);
mozilla::ipc::IPCResult RecvAddIceCandidate(const string& transportId,
const string& candidate,
const string& ufrag,
const string& obfuscatedAddress);
mozilla::ipc::IPCResult RecvUpdateNetworkState(const bool& online);
mozilla::ipc::IPCResult RecvGetIceStats(const string& transportId,
const double& now,
GetIceStatsResolver&& aResolve);
void ActorDestroy(ActorDestroyReason aWhy);
private:
// Hide the sigslot/MediaTransportHandler stuff from IPC.
class Impl;
std::unique_ptr<Impl> mImpl;
#endif // MOZ_WEBRTC
};
} // namespace mozilla
#endif //_MTRANSPORTHANDLER_PARENT_H__
|