Bumping manifests a=b2g-bump
[gecko.git] / xpcom / ds / nsPersistentProperties.h
blob2b5f195b463e7a5b44b85e95453040701ae37d24
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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 nsPersistentProperties_h___
7 #define nsPersistentProperties_h___
9 #include "nsIPersistentProperties2.h"
10 #include "pldhash.h"
11 #include "plarena.h"
12 #include "nsString.h"
13 #include "nsCOMPtr.h"
14 #include "mozilla/Attributes.h"
16 class nsIUnicharInputStream;
18 class nsPersistentProperties MOZ_FINAL : public nsIPersistentProperties
20 public:
21 nsPersistentProperties();
23 NS_DECL_THREADSAFE_ISUPPORTS
24 NS_DECL_NSIPROPERTIES
25 NS_DECL_NSIPERSISTENTPROPERTIES
27 static nsresult Create(nsISupports* aOuter, REFNSIID aIID, void** aResult);
29 private:
30 ~nsPersistentProperties();
32 protected:
33 nsCOMPtr<nsIUnicharInputStream> mIn;
35 nsIPersistentProperties* mSubclass;
36 struct PLDHashTable mTable;
37 PLArenaPool mArena;
40 class nsPropertyElement MOZ_FINAL : public nsIPropertyElement
42 public:
43 nsPropertyElement()
47 nsPropertyElement(const nsACString& aKey, const nsAString& aValue)
48 : mKey(aKey)
49 , mValue(aValue)
53 NS_DECL_ISUPPORTS
54 NS_DECL_NSIPROPERTYELEMENT
56 static NS_METHOD Create(nsISupports* aOuter, REFNSIID aIID, void** aResult);
58 private:
59 ~nsPropertyElement() {}
61 protected:
62 nsCString mKey;
63 nsString mValue;
66 #endif /* nsPersistentProperties_h___ */