1 /* -*- Mode: C++; tab-width: 2; 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_ODoH_h
8 #define mozilla_net_ODoH_h
15 class ODoH final
: public TRR
{
17 explicit ODoH(AHostResolver
* aResolver
, nsHostRecord
* aRec
,
19 : TRR(aResolver
, aRec
, aType
) {}
20 NS_IMETHOD
Run() override
;
21 // ODoH should not support push.
22 NS_IMETHOD
GetInterface(const nsIID
&, void**) override
{
23 return NS_ERROR_NO_INTERFACE
;
27 virtual ~ODoH() = default;
28 virtual DNSPacket
* GetOrCreateDNSPacket() override
;
29 virtual nsresult
CreateQueryURI(nsIURI
** aOutURI
) override
;
30 virtual const char* ContentType() const override
{
31 return "application/oblivious-dns-message";
36 } // namespace mozilla