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_DNSRequestChild_h
8 #define mozilla_net_DNSRequestChild_h
10 #include "mozilla/net/DNSRequestBase.h"
11 #include "mozilla/net/PDNSRequestChild.h"
16 class DNSRequestChild final
: public DNSRequestActor
, public PDNSRequestChild
{
18 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DNSRequestChild
, override
)
19 friend class PDNSRequestChild
;
21 explicit DNSRequestChild(DNSRequestBase
* aRequest
);
23 bool CanSend() const override
{ return PDNSRequestChild::CanSend(); }
24 DNSRequestChild
* AsDNSRequestChild() override
{ return this; }
25 DNSRequestParent
* AsDNSRequestParent() override
{ return nullptr; }
28 virtual ~DNSRequestChild() = default;
30 mozilla::ipc::IPCResult
RecvCancelDNSRequest(
31 const nsCString
& hostName
, const nsCString
& trrServer
,
32 const int32_t& port
, const uint16_t& type
,
33 const OriginAttributes
& originAttributes
,
34 const nsIDNSService::DNSFlags
& flags
, const nsresult
& reason
);
35 mozilla::ipc::IPCResult
RecvLookupCompleted(const DNSRequestResponse
& reply
);
36 virtual void ActorDestroy(ActorDestroyReason why
) override
;
40 } // namespace mozilla
42 #endif // mozilla_net_DNSRequestChild_h