2001-10-03 00:21:34 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* 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/. */
|
2001-10-03 00:21:34 +00:00
|
|
|
|
|
|
|
#ifndef nsURIChecker_h__
|
|
|
|
#define nsURIChecker_h__
|
|
|
|
|
|
|
|
#include "nsIURIChecker.h"
|
|
|
|
#include "nsIChannel.h"
|
|
|
|
#include "nsIStreamListener.h"
|
2005-03-07 19:46:06 +00:00
|
|
|
#include "nsIChannelEventSink.h"
|
2002-03-05 05:57:21 +00:00
|
|
|
#include "nsIInterfaceRequestor.h"
|
2001-10-03 00:21:34 +00:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
|
2003-11-09 22:49:57 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class nsURIChecker : public nsIURIChecker,
|
|
|
|
public nsIStreamListener,
|
2005-03-07 19:46:06 +00:00
|
|
|
public nsIChannelEventSink,
|
2002-03-05 05:57:21 +00:00
|
|
|
public nsIInterfaceRequestor
|
2001-10-03 00:21:34 +00:00
|
|
|
{
|
2014-06-24 16:36:44 +00:00
|
|
|
virtual ~nsURIChecker() {}
|
|
|
|
|
2001-10-03 00:21:34 +00:00
|
|
|
public:
|
|
|
|
nsURIChecker();
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIURICHECKER
|
|
|
|
NS_DECL_NSIREQUEST
|
|
|
|
NS_DECL_NSIREQUESTOBSERVER
|
|
|
|
NS_DECL_NSISTREAMLISTENER
|
2005-03-07 19:46:06 +00:00
|
|
|
NS_DECL_NSICHANNELEVENTSINK
|
2002-03-05 05:57:21 +00:00
|
|
|
NS_DECL_NSIINTERFACEREQUESTOR
|
2001-10-03 00:21:34 +00:00
|
|
|
|
|
|
|
protected:
|
2003-11-09 22:49:57 +00:00
|
|
|
nsCOMPtr<nsIChannel> mChannel;
|
2001-10-03 00:21:34 +00:00
|
|
|
nsCOMPtr<nsIRequestObserver> mObserver;
|
2003-11-09 22:49:57 +00:00
|
|
|
nsCOMPtr<nsISupports> mObserverContext;
|
|
|
|
nsresult mStatus;
|
2011-09-29 06:19:26 +00:00
|
|
|
bool mIsPending;
|
|
|
|
bool mAllowHead;
|
2001-10-03 00:21:34 +00:00
|
|
|
|
2003-11-09 22:49:57 +00:00
|
|
|
void SetStatusAndCallBack(nsresult aStatus);
|
|
|
|
nsresult CheckStatus();
|
2001-10-03 00:21:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsURIChecker_h__
|