/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIProperties.idl
 */

#ifndef __gen_nsIProperties_h__
#define __gen_nsIProperties_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    nsIProperties */
#define NS_IPROPERTIES_IID_STR "61c1b3c0-b1bf-11d3-93b6-00104ba0fd40"

#define NS_IPROPERTIES_IID \
  {0x61c1b3c0, 0xb1bf, 0x11d3, \
    { 0x93, 0xb6, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 }}

class NS_NO_VTABLE nsIProperties : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROPERTIES_IID)

  /**
     * Defines a new property. 
     * @return NS_ERROR_FAILURE if a property with that name already
     * exists.
     */
  /* void define (in string prop, in nsISupports initialValue); */
  NS_IMETHOD Define(const char *prop, nsISupports *initialValue) = 0;

  /**
     * Undefines a property.
     * @return NS_ERROR_FAILURE if a property with that name doesn't
     * already exist.
     */
  /* void undefine (in string prop); */
  NS_IMETHOD Undefine(const char *prop) = 0;

  /**
     * Gets a property with a given name. 
     * @return NS_ERROR_FAILURE if a property with that name doesn't
     * exist.
     */
  /* void get (in string prop, in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
  NS_IMETHOD Get(const char *prop, const nsIID & uuid, void * *result) = 0;

  /**
     * Sets a property with a given name to a given value. 
     * @return NS_ERROR_FAILURE if a property with that name doesn't
     * exist.
     */
  /* void set (in string prop, in nsISupports value); */
  NS_IMETHOD Set(const char *prop, nsISupports *value) = 0;

  /**
     * Returns true if the property with the given name exists.
     */
  /* boolean has (in string prop); */
  NS_IMETHOD Has(const char *prop, PRBool *_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPROPERTIES \
  NS_IMETHOD Define(const char *prop, nsISupports *initialValue); \
  NS_IMETHOD Undefine(const char *prop); \
  NS_IMETHOD Get(const char *prop, const nsIID & uuid, void * *result); \
  NS_IMETHOD Set(const char *prop, nsISupports *value); \
  NS_IMETHOD Has(const char *prop, PRBool *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPROPERTIES(_to) \
  NS_IMETHOD Define(const char *prop, nsISupports *initialValue) { return _to Define(prop, initialValue); } \
  NS_IMETHOD Undefine(const char *prop) { return _to Undefine(prop); } \
  NS_IMETHOD Get(const char *prop, const nsIID & uuid, void * *result) { return _to Get(prop, uuid, result); } \
  NS_IMETHOD Set(const char *prop, nsISupports *value) { return _to Set(prop, value); } \
  NS_IMETHOD Has(const char *prop, PRBool *_retval) { return _to Has(prop, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPROPERTIES(_to) \
  NS_IMETHOD Define(const char *prop, nsISupports *initialValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->Define(prop, initialValue); } \
  NS_IMETHOD Undefine(const char *prop) { return !_to ? NS_ERROR_NULL_POINTER : _to->Undefine(prop); } \
  NS_IMETHOD Get(const char *prop, const nsIID & uuid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->Get(prop, uuid, result); } \
  NS_IMETHOD Set(const char *prop, nsISupports *value) { return !_to ? NS_ERROR_NULL_POINTER : _to->Set(prop, value); } \
  NS_IMETHOD Has(const char *prop, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Has(prop, _retval); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsProperties : public nsIProperties
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPROPERTIES

  nsProperties();
  virtual ~nsProperties();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsProperties, nsIProperties)

nsProperties::nsProperties()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

nsProperties::~nsProperties()
{
  /* destructor code */
}

/* void define (in string prop, in nsISupports initialValue); */
NS_IMETHODIMP nsProperties::Define(const char *prop, nsISupports *initialValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void undefine (in string prop); */
NS_IMETHODIMP nsProperties::Undefine(const char *prop)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void get (in string prop, in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
NS_IMETHODIMP nsProperties::Get(const char *prop, const nsIID & uuid, void * *result)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void set (in string prop, in nsISupports value); */
NS_IMETHODIMP nsProperties::Set(const char *prop, nsISupports *value)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean has (in string prop); */
NS_IMETHODIMP nsProperties::Has(const char *prop, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#define NS_PROPERTIES_CID                            \
{ /* 4de2bc90-b1bf-11d3-93b6-00104ba0fd40 */         \
    0x4de2bc90,                                      \
    0xb1bf,                                          \
    0x11d3,                                          \
    {0x93, 0xb6, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \
}
#define NS_PROPERTIES_CONTRACTID    "@mozilla.org/properties;1"
#define NS_PROPERTIES_CLASSNAME "Properties"
#include "nsIComponentManager.h"
inline nsresult
NS_NewIProperties(nsISupports* outer, nsIProperties* *result)
{
    static NS_DEFINE_CID(kPropertiesCID, NS_PROPERTIES_CID);
    return nsComponentManager::CreateInstance(kPropertiesCID, 
                                              outer,
                                              NS_GET_IID(nsIProperties),
                                              (void**)result);
}

#endif /* __gen_nsIProperties_h__ */
