Bug 1837643 [wpt PR 40475] - [RemoveLegacy] GridTrackList::legacy_track_list_, a...
[gecko.git] / netwerk / base / nsDownloader.h
blobfe95dd6ac2996235851789e47f1ccc8703a902e5
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsDownloader_h__
6 #define nsDownloader_h__
8 #include "nsIDownloader.h"
9 #include "nsCOMPtr.h"
11 class nsIFile;
12 class nsIOutputStream;
14 class nsDownloader : public nsIDownloader {
15 public:
16 NS_DECL_ISUPPORTS
17 NS_DECL_NSIDOWNLOADER
18 NS_DECL_NSIREQUESTOBSERVER
19 NS_DECL_NSISTREAMLISTENER
21 nsDownloader() = default;
23 protected:
24 virtual ~nsDownloader();
26 static nsresult ConsumeData(nsIInputStream* in, void* closure,
27 const char* fromRawSegment, uint32_t toOffset,
28 uint32_t count, uint32_t* writeCount);
30 nsCOMPtr<nsIDownloadObserver> mObserver;
31 nsCOMPtr<nsIFile> mLocation;
32 nsCOMPtr<nsIOutputStream> mSink;
33 bool mLocationIsTemp{false};
36 #endif // nsDownloader_h__