1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsPersistentProperties_h___
8 #define nsPersistentProperties_h___
10 #include "nsIPersistentProperties2.h"
11 #include "PLDHashTable.h"
14 #include "mozilla/ArenaAllocator.h"
15 #include "mozilla/Attributes.h"
17 class nsIUnicharInputStream
;
19 class nsPersistentProperties final
: public nsIPersistentProperties
22 nsPersistentProperties();
24 NS_DECL_THREADSAFE_ISUPPORTS
26 NS_DECL_NSIPERSISTENTPROPERTIES
28 static MOZ_MUST_USE nsresult
29 Create(nsISupports
* aOuter
, REFNSIID aIID
, void** aResult
);
31 size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf
) const override
;
34 ~nsPersistentProperties();
37 nsCOMPtr
<nsIUnicharInputStream
> mIn
;
40 mozilla::ArenaAllocator
<2048,4> mArena
;
43 class nsPropertyElement final
: public nsIPropertyElement
50 nsPropertyElement(const nsACString
& aKey
, const nsAString
& aValue
)
57 NS_DECL_NSIPROPERTYELEMENT
59 static nsresult
Create(nsISupports
* aOuter
, REFNSIID aIID
, void** aResult
);
62 ~nsPropertyElement() {}
69 #endif /* nsPersistentProperties_h___ */