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 nsDownloader_h__ michael@0: #define nsDownloader_h__ michael@0: michael@0: #include "nsIDownloader.h" michael@0: #include "nsCOMPtr.h" michael@0: michael@0: class nsIFile; michael@0: class nsIOutputStream; michael@0: michael@0: class nsDownloader : public nsIDownloader michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIDOWNLOADER michael@0: NS_DECL_NSIREQUESTOBSERVER michael@0: NS_DECL_NSISTREAMLISTENER michael@0: michael@0: nsDownloader() : mLocationIsTemp(false) {} michael@0: michael@0: protected: michael@0: virtual ~nsDownloader(); michael@0: michael@0: static NS_METHOD ConsumeData(nsIInputStream *in, michael@0: void *closure, michael@0: const char *fromRawSegment, michael@0: uint32_t toOffset, michael@0: uint32_t count, michael@0: uint32_t *writeCount); michael@0: michael@0: nsCOMPtr mObserver; michael@0: nsCOMPtr mLocation; michael@0: nsCOMPtr mSink; michael@0: bool mLocationIsTemp; michael@0: }; michael@0: michael@0: #endif // nsDownloader_h__