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 nsAboutCacheEntry_h__ michael@0: #define nsAboutCacheEntry_h__ michael@0: michael@0: #include "nsIAboutModule.h" michael@0: #include "nsICacheListener.h" michael@0: #include "nsICacheEntryDescriptor.h" michael@0: #include "nsCOMPtr.h" michael@0: michael@0: class nsIAsyncOutputStream; michael@0: class nsIInputStream; michael@0: class nsIURI; michael@0: class nsCString; michael@0: michael@0: class nsAboutCacheEntry : public nsIAboutModule michael@0: , public nsICacheMetaDataVisitor michael@0: , public nsICacheListener michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIABOUTMODULE michael@0: NS_DECL_NSICACHEMETADATAVISITOR michael@0: NS_DECL_NSICACHELISTENER michael@0: michael@0: nsAboutCacheEntry() michael@0: : mBuffer(nullptr) michael@0: {} michael@0: michael@0: virtual ~nsAboutCacheEntry() {} michael@0: michael@0: private: michael@0: nsresult GetContentStream(nsIURI *, nsIInputStream **); michael@0: nsresult OpenCacheEntry(nsIURI *); michael@0: nsresult WriteCacheEntryDescription(nsICacheEntryDescriptor *); michael@0: nsresult WriteCacheEntryUnavailable(); michael@0: nsresult ParseURI(nsIURI *, nsCString &, bool &, nsCString &); michael@0: michael@0: private: michael@0: nsCString *mBuffer; michael@0: nsCOMPtr mOutputStream; michael@0: }; michael@0: michael@0: #define NS_ABOUT_CACHE_ENTRY_MODULE_CID \ michael@0: { /* 7fa5237d-b0eb-438f-9e50-ca0166e63788 */ \ michael@0: 0x7fa5237d, \ michael@0: 0xb0eb, \ michael@0: 0x438f, \ michael@0: {0x9e, 0x50, 0xca, 0x01, 0x66, 0xe6, 0x37, 0x88} \ michael@0: } michael@0: michael@0: #endif // nsAboutCacheEntry_h__