michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsURIChecker_h__ michael@0: #define nsURIChecker_h__ michael@0: michael@0: #include "nsIURIChecker.h" michael@0: #include "nsIChannel.h" michael@0: #include "nsIStreamListener.h" michael@0: #include "nsIChannelEventSink.h" michael@0: #include "nsIInterfaceRequestor.h" michael@0: #include "nsCOMPtr.h" michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: michael@0: class nsURIChecker : public nsIURIChecker, michael@0: public nsIStreamListener, michael@0: public nsIChannelEventSink, michael@0: public nsIInterfaceRequestor michael@0: { michael@0: public: michael@0: nsURIChecker(); michael@0: virtual ~nsURIChecker() {} michael@0: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIURICHECKER michael@0: NS_DECL_NSIREQUEST michael@0: NS_DECL_NSIREQUESTOBSERVER michael@0: NS_DECL_NSISTREAMLISTENER michael@0: NS_DECL_NSICHANNELEVENTSINK michael@0: NS_DECL_NSIINTERFACEREQUESTOR michael@0: michael@0: protected: michael@0: nsCOMPtr mChannel; michael@0: nsCOMPtr mObserver; michael@0: nsCOMPtr mObserverContext; michael@0: nsresult mStatus; michael@0: bool mIsPending; michael@0: bool mAllowHead; michael@0: michael@0: void SetStatusAndCallBack(nsresult aStatus); michael@0: nsresult CheckStatus(); michael@0: }; michael@0: michael@0: #endif // nsURIChecker_h__