TRRServiceChild.h (1777B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set sw=2 ts=8 et tw=80 : */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef mozilla_net_TRRServiceChild_h 8 #define mozilla_net_TRRServiceChild_h 9 10 #include "mozilla/net/PTRRServiceChild.h" 11 #include "nsIObserver.h" 12 #include "nsWeakReference.h" 13 14 namespace mozilla { 15 16 namespace ipc { 17 class FileDescriptor; 18 } // namespace ipc 19 20 namespace net { 21 22 class TRRServiceChild : public PTRRServiceChild, 23 public nsIObserver, 24 public nsSupportsWeakReference { 25 public: 26 NS_DECL_ISUPPORTS 27 NS_DECL_NSIOBSERVER 28 29 TRRServiceChild(); 30 static TRRServiceChild* GetSingleton(); 31 32 void Init(const bool& aCaptiveIsPassed, const bool& aParentalControlEnabled, 33 nsTArray<nsCString>&& aDNSSuffixList); 34 mozilla::ipc::IPCResult RecvNotifyObserver(const nsCString& aTopic, 35 const nsString& aData); 36 mozilla::ipc::IPCResult RecvUpdatePlatformDNSInformation( 37 nsTArray<nsCString>&& aDNSSuffixList); 38 mozilla::ipc::IPCResult RecvUpdateParentalControlEnabled( 39 const bool& aEnabled); 40 mozilla::ipc::IPCResult RecvClearDNSCache(const bool& aTrrToo); 41 mozilla::ipc::IPCResult RecvSetDetectedTrrURI(const nsCString& aURI); 42 mozilla::ipc::IPCResult RecvSetDefaultTRRConnectionInfo( 43 Maybe<HttpConnectionInfoCloneArgs>&& aArgs); 44 mozilla::ipc::IPCResult RecvUpdateEtcHosts(nsTArray<nsCString>&& aHosts); 45 46 private: 47 virtual ~TRRServiceChild(); 48 }; 49 50 } // namespace net 51 } // namespace mozilla 52 53 #endif // mozilla_net_TRRServiceChild_h