tor-browser

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

MediaTransportChild.h (1993B)


      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 #ifndef _MTRANSPORTCHILD_H__
      6 #define _MTRANSPORTCHILD_H__
      7 
      8 #include "mozilla/Mutex.h"
      9 #include "mozilla/dom/PMediaTransportChild.h"
     10 
     11 namespace mozilla {
     12 class MediaTransportHandlerIPC;
     13 
     14 class MediaTransportChild : public dom::PMediaTransportChild {
     15 public:
     16 #ifdef MOZ_WEBRTC
     17  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaTransportChild, override)
     18 
     19  explicit MediaTransportChild(MediaTransportHandlerIPC* aUser);
     20 
     21  mozilla::ipc::IPCResult RecvOnCandidate(const string& transportId,
     22                                          CandidateInfo&& candidateInfo);
     23  mozilla::ipc::IPCResult RecvOnAlpnNegotiated(const string& alpn);
     24  mozilla::ipc::IPCResult RecvOnGatheringStateChange(const string& transportId,
     25                                                     const int& state);
     26  mozilla::ipc::IPCResult RecvOnConnectionStateChange(const string& transportId,
     27                                                      const int& state);
     28  mozilla::ipc::IPCResult RecvOnPacketReceived(string&& transportId,
     29                                               MediaPacket&& packet);
     30  mozilla::ipc::IPCResult RecvOnEncryptedSending(const string& transportId,
     31                                                 MediaPacket&& packet);
     32  mozilla::ipc::IPCResult RecvOnStateChange(const string& transportId,
     33                                            const int& state);
     34  mozilla::ipc::IPCResult RecvOnRtcpStateChange(const string& transportId,
     35                                                const int& state);
     36 
     37 private:
     38  virtual ~MediaTransportChild();
     39  friend class MediaTransportHandlerIPC;
     40  void Shutdown();
     41  // MediaTransportHandlerIPC owns us, and will inform us when it is going away
     42  Mutex mMutex;
     43  MediaTransportHandlerIPC* mUser;
     44 #endif  // MOZ_WEBRTC
     45 };
     46 
     47 }  // namespace mozilla
     48 #endif