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/. */
7 #ifndef mozilla_net_TRRServiceParent_h
8 #define mozilla_net_TRRServiceParent_h
10 #include "mozilla/net/PTRRServiceParent.h"
11 #include "mozilla/net/TRRServiceBase.h"
12 #include "nsIObserver.h"
13 #include "nsWeakReference.h"
18 class TRRServiceParent
: public TRRServiceBase
,
20 public nsSupportsWeakReference
,
21 public PTRRServiceParent
{
23 NS_DECL_ISUPPORTS_INHERITED
25 NS_DECL_NSIPROXYCONFIGCHANGEDCALLBACK
27 TRRServiceParent() = default;
29 void UpdateParentalControlEnabled();
30 static void PrefsChanged(const char* aName
, void* aSelf
);
31 void SetDetectedTrrURI(const nsACString
& aURI
);
32 bool MaybeSetPrivateURI(const nsACString
& aURI
) override
;
33 void GetURI(nsACString
& result
) override
;
34 mozilla::ipc::IPCResult
RecvNotifyNetworkConnectivityServiceObservers(
35 const nsCString
& aTopic
);
36 mozilla::ipc::IPCResult
RecvInitTRRConnectionInfo();
37 mozilla::ipc::IPCResult
RecvSetConfirmationState(uint32_t aNewState
);
38 uint32_t GetConfirmationState() { return mConfirmationState
; }
39 virtual void ReadEtcHostsFile() override
;
42 virtual ~TRRServiceParent();
43 virtual void ActorDestroy(ActorDestroyReason why
) override
;
44 void prefsChanged(const char* aName
);
45 void SetDefaultTRRConnectionInfo(nsHttpConnectionInfo
* aConnInfo
) override
;
46 uint32_t mConfirmationState
= 0;
50 } // namespace mozilla
52 #endif // mozilla_net_TRRServiceParent_h