michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsHashPropertyBag_h___ michael@0: #define nsHashPropertyBag_h___ michael@0: michael@0: #include "nsIVariant.h" michael@0: #include "nsIWritablePropertyBag.h" michael@0: #include "nsIWritablePropertyBag2.h" michael@0: #include "nsInterfaceHashtable.h" michael@0: michael@0: class nsHashPropertyBag : public nsIWritablePropertyBag michael@0: , public nsIWritablePropertyBag2 michael@0: { michael@0: public: michael@0: nsHashPropertyBag() { } michael@0: virtual ~nsHashPropertyBag() {} michael@0: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: michael@0: NS_DECL_NSIPROPERTYBAG michael@0: michael@0: NS_DECL_NSIPROPERTYBAG2 michael@0: michael@0: NS_DECL_NSIWRITABLEPROPERTYBAG michael@0: michael@0: NS_DECL_NSIWRITABLEPROPERTYBAG2 michael@0: michael@0: protected: michael@0: // a hash table of string -> nsIVariant michael@0: nsInterfaceHashtable mPropertyHash; michael@0: }; michael@0: michael@0: #undef IMETHOD_VISIBILITY michael@0: #define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN michael@0: michael@0: // Note: NS_NewHashPropertyBag returns a HPB that michael@0: // uses a non-thread-safe internal hash michael@0: extern "C" nsresult michael@0: NS_NewHashPropertyBag(nsIWritablePropertyBag* *_retval); michael@0: michael@0: #endif /* nsHashPropertyBag_h___ */