bug 812562 - click-to-play: reshow notification for blocklisted plugins r=jaws
[gecko.git] / xpcom / ds / nsPersistentProperties.h
blob83360e967a8e21062cf7b8de0b488a62262e9fcf
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 #include "nsIUnicharInputStream.h"
19 class nsPersistentProperties MOZ_FINAL : public nsIPersistentProperties
21 public:
22 nsPersistentProperties();
23 nsresult Init();
25 NS_DECL_ISUPPORTS
26 NS_DECL_NSIPROPERTIES
27 NS_DECL_NSIPERSISTENTPROPERTIES
29 static nsresult
30 Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
32 private:
33 ~nsPersistentProperties();
35 protected:
36 nsCOMPtr<nsIUnicharInputStream> mIn;
38 nsIPersistentProperties* mSubclass;
39 struct PLDHashTable mTable;
40 PLArenaPool mArena;
43 class nsPropertyElement MOZ_FINAL : public nsIPropertyElement
45 public:
46 nsPropertyElement()
50 nsPropertyElement(const nsACString& aKey, const nsAString& aValue)
51 : mKey(aKey), mValue(aValue)
55 NS_DECL_ISUPPORTS
56 NS_DECL_NSIPROPERTYELEMENT
58 static NS_METHOD
59 Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
61 private:
62 ~nsPropertyElement() {}
64 protected:
65 nsCString mKey;
66 nsString mValue;
69 #endif /* nsPersistentProperties_h___ */