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.

     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__

mercurial