2013-12-11 23:03:51 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set sw=2 ts=8 et tw=80 : */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_net_DNSRequestParent_h
|
|
|
|
#define mozilla_net_DNSRequestParent_h
|
|
|
|
|
|
|
|
#include "mozilla/net/PDNSRequestParent.h"
|
|
|
|
#include "nsIDNSService.h"
|
|
|
|
#include "nsIDNSListener.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
|
|
|
class DNSRequestParent : public PDNSRequestParent, public nsIDNSListener {
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIDNSLISTENER
|
|
|
|
|
|
|
|
DNSRequestParent();
|
|
|
|
|
2017-02-14 07:25:35 +03:00
|
|
|
void DoAsyncResolve(const nsACString& hostname,
|
|
|
|
const OriginAttributes& originAttributes, uint32_t flags);
|
2013-12-11 23:03:51 +04:00
|
|
|
|
2014-08-26 13:09:00 +04:00
|
|
|
// Pass args here rather than storing them in the parent; they are only
|
|
|
|
// needed if the request is to be canceled.
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvCancelDNSRequest(
|
|
|
|
const nsCString& hostName, const uint16_t& type,
|
2017-02-14 07:25:35 +03:00
|
|
|
const OriginAttributes& originAttributes, const uint32_t& flags,
|
2019-02-06 18:58:43 +03:00
|
|
|
const nsresult& reason);
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult Recv__delete__() override;
|
2014-08-26 13:09:00 +04:00
|
|
|
|
2013-12-11 23:03:51 +04:00
|
|
|
protected:
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason why) override;
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2013-12-11 23:03:51 +04:00
|
|
|
private:
|
2018-04-30 19:46:04 +03:00
|
|
|
virtual ~DNSRequestParent() = default;
|
2014-06-24 20:36:44 +04:00
|
|
|
|
2013-12-11 23:03:51 +04:00
|
|
|
uint32_t mFlags;
|
|
|
|
bool mIPCClosed; // true if IPDL channel has been closed (child crash)
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
2015-07-13 18:25:42 +03:00
|
|
|
|
2013-12-11 23:03:51 +04:00
|
|
|
#endif // mozilla_net_DNSRequestParent_h
|