netwerk/base/src/nsSimpleNestedURI.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 /**
michael@0 7 * URI class to be used for cases when a simple URI actually resolves to some
michael@0 8 * other sort of URI, with the latter being what's loaded when the load
michael@0 9 * happens. All objects of this class should always be immutable, so that the
michael@0 10 * inner URI and this URI don't get out of sync. The Clone() implementation
michael@0 11 * will guarantee this for the clone, but it's up to the protocol handlers
michael@0 12 * creating these URIs to ensure that in the first place. The innerURI passed
michael@0 13 * to this URI will be set immutable if possible.
michael@0 14 */
michael@0 15
michael@0 16 #ifndef nsSimpleNestedURI_h__
michael@0 17 #define nsSimpleNestedURI_h__
michael@0 18
michael@0 19 #include "nsCOMPtr.h"
michael@0 20 #include "nsSimpleURI.h"
michael@0 21 #include "nsINestedURI.h"
michael@0 22
michael@0 23 class nsSimpleNestedURI : public nsSimpleURI,
michael@0 24 public nsINestedURI
michael@0 25 {
michael@0 26 public:
michael@0 27 // To be used by deserialization only. Leaves this object in an
michael@0 28 // uninitialized state that will throw on most accesses.
michael@0 29 nsSimpleNestedURI()
michael@0 30 {
michael@0 31 }
michael@0 32
michael@0 33 // Constructor that should generally be used when constructing an object of
michael@0 34 // this class with |operator new|.
michael@0 35 nsSimpleNestedURI(nsIURI* innerURI);
michael@0 36
michael@0 37 NS_DECL_ISUPPORTS_INHERITED
michael@0 38 NS_DECL_NSINESTEDURI
michael@0 39
michael@0 40 // Overrides for various methods nsSimpleURI implements follow.
michael@0 41
michael@0 42 // nsSimpleURI overrides
michael@0 43 virtual nsresult EqualsInternal(nsIURI* other,
michael@0 44 RefHandlingEnum refHandlingMode,
michael@0 45 bool* result);
michael@0 46 virtual nsSimpleURI* StartClone(RefHandlingEnum refHandlingMode);
michael@0 47
michael@0 48 // nsISerializable overrides
michael@0 49 NS_IMETHOD Read(nsIObjectInputStream* aStream);
michael@0 50 NS_IMETHOD Write(nsIObjectOutputStream* aStream);
michael@0 51
michael@0 52 // Override the nsIClassInfo method GetClassIDNoAlloc to make sure our
michael@0 53 // nsISerializable impl works right.
michael@0 54 NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc);
michael@0 55
michael@0 56 protected:
michael@0 57 nsCOMPtr<nsIURI> mInnerURI;
michael@0 58 };
michael@0 59
michael@0 60 #endif /* nsSimpleNestedURI_h__ */

mercurial