tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

DNSRequestChild.h (1530B)


      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_DNSRequestChild_h
      8 #define mozilla_net_DNSRequestChild_h
      9 
     10 #include "mozilla/net/DNSRequestBase.h"
     11 #include "mozilla/net/PDNSRequestChild.h"
     12 
     13 namespace mozilla {
     14 namespace net {
     15 
     16 class DNSRequestChild final : public DNSRequestActor, public PDNSRequestChild {
     17 public:
     18  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DNSRequestChild, override)
     19  friend class PDNSRequestChild;
     20 
     21  explicit DNSRequestChild(DNSRequestBase* aRequest);
     22 
     23  bool CanSend() const override { return PDNSRequestChild::CanSend(); }
     24  DNSRequestChild* AsDNSRequestChild() override { return this; }
     25  DNSRequestParent* AsDNSRequestParent() override { return nullptr; }
     26 
     27 private:
     28  virtual ~DNSRequestChild() = default;
     29 
     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;
     37 };
     38 
     39 }  // namespace net
     40 }  // namespace mozilla
     41 
     42 #endif  // mozilla_net_DNSRequestChild_h