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();
|
|
|
|
|
2015-02-19 08:14:00 +03:00
|
|
|
void DoAsyncResolve(const nsACString &hostname, uint32_t flags,
|
|
|
|
const nsACString &networkInterface);
|
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.
|
|
|
|
bool RecvCancelDNSRequest(const nsCString& hostName,
|
|
|
|
const uint32_t& flags,
|
2015-02-19 08:14:00 +03:00
|
|
|
const nsCString& networkInterface,
|
2015-03-21 19:28:04 +03:00
|
|
|
const nsresult& reason) override;
|
|
|
|
bool 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;
|
2013-12-11 23:03:51 +04:00
|
|
|
private:
|
2014-06-24 20:36:44 +04:00
|
|
|
virtual ~DNSRequestParent();
|
|
|
|
|
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
|