2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsHashPropertyBag_h___
|
|
|
|
#define nsHashPropertyBag_h___
|
|
|
|
|
|
|
|
#include "nsIVariant.h"
|
|
|
|
#include "nsIWritablePropertyBag.h"
|
|
|
|
#include "nsIWritablePropertyBag2.h"
|
|
|
|
#include "nsInterfaceHashtable.h"
|
|
|
|
|
2011-08-18 06:46:39 -07:00
|
|
|
class nsHashPropertyBag : public nsIWritablePropertyBag
|
2007-03-22 10:30:00 -07:00
|
|
|
, public nsIWritablePropertyBag2
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsHashPropertyBag() { }
|
|
|
|
virtual ~nsHashPropertyBag() {}
|
|
|
|
|
2013-07-18 19:31:26 -07:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
NS_DECL_NSIPROPERTYBAG
|
|
|
|
|
|
|
|
NS_DECL_NSIPROPERTYBAG2
|
|
|
|
|
|
|
|
NS_DECL_NSIWRITABLEPROPERTYBAG
|
|
|
|
|
|
|
|
NS_DECL_NSIWRITABLEPROPERTYBAG2
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// a hash table of string -> nsIVariant
|
|
|
|
nsInterfaceHashtable<nsStringHashKey, nsIVariant> mPropertyHash;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Note: NS_NewHashPropertyBag returns a HPB that
|
|
|
|
// uses a non-thread-safe internal hash
|
2011-08-18 06:46:39 -07:00
|
|
|
extern "C" nsresult
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_NewHashPropertyBag(nsIWritablePropertyBag* *_retval);
|
|
|
|
|
|
|
|
#endif /* nsHashPropertyBag_h___ */
|