Line data Source code
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 mozilla_net_StunAddrsRequestParent_h
6 : #define mozilla_net_StunAddrsRequestParent_h
7 :
8 : #include "mozilla/net/PStunAddrsRequestParent.h"
9 :
10 : namespace mozilla {
11 : namespace net {
12 :
13 : class StunAddrsRequestParent : public PStunAddrsRequestParent
14 : {
15 : public:
16 : StunAddrsRequestParent();
17 :
18 : NS_IMETHOD_(MozExternalRefCountType) AddRef();
19 : NS_IMETHOD_(MozExternalRefCountType) Release();
20 :
21 : mozilla::ipc::IPCResult Recv__delete__() override;
22 :
23 : protected:
24 0 : virtual ~StunAddrsRequestParent() {}
25 :
26 : virtual mozilla::ipc::IPCResult RecvGetStunAddrs() override;
27 : virtual void ActorDestroy(ActorDestroyReason why) override;
28 :
29 : nsCOMPtr<nsIThread> mMainThread;
30 : nsCOMPtr<nsIEventTarget> mSTSThread;
31 :
32 : void GetStunAddrs_s();
33 : void SendStunAddrs_m(const NrIceStunAddrArray& addrs);
34 :
35 : ThreadSafeAutoRefCnt mRefCnt;
36 : NS_DECL_OWNINGTHREAD
37 :
38 : private:
39 : bool mIPCClosed; // true if IPDL channel has been closed (child crash)
40 : };
41 :
42 : } // namespace net
43 : } // namespace mozilla
44 :
45 : #endif // mozilla_net_StunAddrsRequestParent_h
|