netwerk/protocol/about/nsAboutCacheEntry.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial