2004-11-25 02:21:14 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2004-11-25 02:21:14 +03:00
|
|
|
|
|
|
|
#ifndef nsHashPropertyBag_h___
|
|
|
|
#define nsHashPropertyBag_h___
|
|
|
|
|
2005-06-05 22:55:41 +04:00
|
|
|
#include "nsIVariant.h"
|
2005-03-22 21:16:53 +03:00
|
|
|
#include "nsIWritablePropertyBag.h"
|
|
|
|
#include "nsIWritablePropertyBag2.h"
|
2004-11-25 02:21:14 +03:00
|
|
|
#include "nsInterfaceHashtable.h"
|
|
|
|
|
2011-08-18 17:46:39 +04:00
|
|
|
class nsHashPropertyBag : public nsIWritablePropertyBag
|
2005-03-22 21:16:53 +03:00
|
|
|
, public nsIWritablePropertyBag2
|
2004-11-25 02:21:14 +03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsHashPropertyBag() { }
|
|
|
|
|
2013-07-19 06:31:26 +04:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
2004-11-25 02:21:14 +03:00
|
|
|
|
|
|
|
NS_DECL_NSIPROPERTYBAG
|
|
|
|
|
2005-03-22 21:16:53 +03:00
|
|
|
NS_DECL_NSIPROPERTYBAG2
|
|
|
|
|
2004-11-25 02:21:14 +03:00
|
|
|
NS_DECL_NSIWRITABLEPROPERTYBAG
|
|
|
|
|
2005-03-22 21:16:53 +03:00
|
|
|
NS_DECL_NSIWRITABLEPROPERTYBAG2
|
|
|
|
|
2004-11-25 02:21:14 +03:00
|
|
|
protected:
|
|
|
|
// a hash table of string -> nsIVariant
|
|
|
|
nsInterfaceHashtable<nsStringHashKey, nsIVariant> mPropertyHash;
|
2014-07-01 02:11:53 +04:00
|
|
|
|
|
|
|
virtual ~nsHashPropertyBag() {}
|
2004-11-25 02:21:14 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
// Note: NS_NewHashPropertyBag returns a HPB that
|
|
|
|
// uses a non-thread-safe internal hash
|
2011-08-18 17:46:39 +04:00
|
|
|
extern "C" nsresult
|
2004-11-25 02:21:14 +03:00
|
|
|
NS_NewHashPropertyBag(nsIWritablePropertyBag* *_retval);
|
|
|
|
|
|
|
|
#endif /* nsHashPropertyBag_h___ */
|