Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsAboutCacheEntry_h__
7 #define nsAboutCacheEntry_h__
9 #include "nsIAboutModule.h"
10 #include "nsICacheListener.h"
11 #include "nsICacheEntryDescriptor.h"
12 #include "nsCOMPtr.h"
14 class nsIAsyncOutputStream;
15 class nsIInputStream;
16 class nsIURI;
17 class nsCString;
19 class nsAboutCacheEntry : public nsIAboutModule
20 , public nsICacheMetaDataVisitor
21 , public nsICacheListener
22 {
23 public:
24 NS_DECL_ISUPPORTS
25 NS_DECL_NSIABOUTMODULE
26 NS_DECL_NSICACHEMETADATAVISITOR
27 NS_DECL_NSICACHELISTENER
29 nsAboutCacheEntry()
30 : mBuffer(nullptr)
31 {}
33 virtual ~nsAboutCacheEntry() {}
35 private:
36 nsresult GetContentStream(nsIURI *, nsIInputStream **);
37 nsresult OpenCacheEntry(nsIURI *);
38 nsresult WriteCacheEntryDescription(nsICacheEntryDescriptor *);
39 nsresult WriteCacheEntryUnavailable();
40 nsresult ParseURI(nsIURI *, nsCString &, bool &, nsCString &);
42 private:
43 nsCString *mBuffer;
44 nsCOMPtr<nsIAsyncOutputStream> mOutputStream;
45 };
47 #define NS_ABOUT_CACHE_ENTRY_MODULE_CID \
48 { /* 7fa5237d-b0eb-438f-9e50-ca0166e63788 */ \
49 0x7fa5237d, \
50 0xb0eb, \
51 0x438f, \
52 {0x9e, 0x50, 0xca, 0x01, 0x66, 0xe6, 0x37, 0x88} \
53 }
55 #endif // nsAboutCacheEntry_h__