xpcom/ds/nsProperties.h
author Joe Drew <joe@drew.ca>
Tue, 18 Dec 2012 11:37:15 -0500
changeset 125514 3ecf6d05c4e280cf1631e415e58e86c24d1cff23
parent 101302 d3b12cb2c877b24c8b077ce6e1866000304ed214
child 158621 bc427f5ec61be794e33a5df279368c39f40b6bdd
permissions -rw-r--r--
Bug 716140 - Convert the XPCOM imgIDecoderObserver interface into a private C++ interface, imgDecoderObserver, so we can more easily make changes to it. r=jrmuizel

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */

#ifndef nsProperties_h___
#define nsProperties_h___

#include "nsIProperties.h"
#include "nsInterfaceHashtable.h"
#include "nsHashKeys.h"
#include "nsAgg.h"
#include "mozilla/Attributes.h"

#define NS_PROPERTIES_CID                            \
{ /* 4de2bc90-b1bf-11d3-93b6-00104ba0fd40 */         \
    0x4de2bc90,                                      \
    0xb1bf,                                          \
    0x11d3,                                          \
    {0x93, 0xb6, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \
}

class nsIUnicharInputStream;

typedef nsInterfaceHashtable<nsCharPtrHashKey, nsISupports>
        nsProperties_HashBase;

class nsProperties MOZ_FINAL : public nsIProperties,
                               public nsProperties_HashBase {
public:

  NS_DECL_AGGREGATED
  NS_DECL_NSIPROPERTIES

  nsProperties(nsISupports *aOuter) { NS_INIT_AGGREGATED(aOuter); }
  nsresult Init() { nsProperties_HashBase::Init(); return NS_OK; }

private:
  ~nsProperties() { }
};

#endif /* nsProperties_h___ */