PageRenderTime 264ms CodeModel.GetById 161ms app.highlight 5ms RepoModel.GetById 96ms app.codeStats 0ms

/gecko_api/include/nsIProperties.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 160 lines | 80 code | 34 blank | 46 comment | 0 complexity | fa3150cfe19ebf5835d7490b71a5bedb MD5 | raw file
  1/*
  2 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/xpcom/ds/nsIProperties.idl
  3 */
  4
  5#ifndef __gen_nsIProperties_h__
  6#define __gen_nsIProperties_h__
  7
  8
  9#ifndef __gen_nsISupports_h__
 10#include "nsISupports.h"
 11#endif
 12
 13/* For IDL files that don't want to include root IDL files. */
 14#ifndef NS_NO_VTABLE
 15#define NS_NO_VTABLE
 16#endif
 17
 18/* starting interface:    nsIProperties */
 19#define NS_IPROPERTIES_IID_STR "78650582-4e93-4b60-8e85-26ebd3eb14ca"
 20
 21#define NS_IPROPERTIES_IID \
 22  {0x78650582, 0x4e93, 0x4b60, \
 23    { 0x8e, 0x85, 0x26, 0xeb, 0xd3, 0xeb, 0x14, 0xca }}
 24
 25class NS_NO_VTABLE NS_SCRIPTABLE nsIProperties : public nsISupports {
 26 public: 
 27
 28  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPROPERTIES_IID)
 29
 30  /**
 31     * Gets a property with a given name. 
 32     *
 33     * @return NS_ERROR_FAILURE if a property with that name doesn't exist.
 34     * @return NS_ERROR_NO_INTERFACE if the found property fails to QI to the 
 35     * given iid.
 36     */
 37  /* void get (in string prop, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */
 38  NS_SCRIPTABLE NS_IMETHOD Get(const char *prop, const nsIID & iid, void * *result) = 0;
 39
 40  /**
 41     * Sets a property with a given name to a given value. 
 42     */
 43  /* void set (in string prop, in nsISupports value); */
 44  NS_SCRIPTABLE NS_IMETHOD Set(const char *prop, nsISupports *value) = 0;
 45
 46  /**
 47     * Returns true if the property with the given name exists.
 48     */
 49  /* boolean has (in string prop); */
 50  NS_SCRIPTABLE NS_IMETHOD Has(const char *prop, PRBool *_retval) = 0;
 51
 52  /**
 53     * Undefines a property.
 54     * @return NS_ERROR_FAILURE if a property with that name doesn't
 55     * already exist.
 56     */
 57  /* void undefine (in string prop); */
 58  NS_SCRIPTABLE NS_IMETHOD Undefine(const char *prop) = 0;
 59
 60  /**
 61     *  Returns an array of the keys.
 62     */
 63  /* void getKeys (out PRUint32 count, [array, size_is (count), retval] out string keys); */
 64  NS_SCRIPTABLE NS_IMETHOD GetKeys(PRUint32 *count, char ***keys) = 0;
 65
 66};
 67
 68  NS_DEFINE_STATIC_IID_ACCESSOR(nsIProperties, NS_IPROPERTIES_IID)
 69
 70/* Use this macro when declaring classes that implement this interface. */
 71#define NS_DECL_NSIPROPERTIES \
 72  NS_SCRIPTABLE NS_IMETHOD Get(const char *prop, const nsIID & iid, void * *result); \
 73  NS_SCRIPTABLE NS_IMETHOD Set(const char *prop, nsISupports *value); \
 74  NS_SCRIPTABLE NS_IMETHOD Has(const char *prop, PRBool *_retval); \
 75  NS_SCRIPTABLE NS_IMETHOD Undefine(const char *prop); \
 76  NS_SCRIPTABLE NS_IMETHOD GetKeys(PRUint32 *count, char ***keys); 
 77
 78/* Use this macro to declare functions that forward the behavior of this interface to another object. */
 79#define NS_FORWARD_NSIPROPERTIES(_to) \
 80  NS_SCRIPTABLE NS_IMETHOD Get(const char *prop, const nsIID & iid, void * *result) { return _to Get(prop, iid, result); } \
 81  NS_SCRIPTABLE NS_IMETHOD Set(const char *prop, nsISupports *value) { return _to Set(prop, value); } \
 82  NS_SCRIPTABLE NS_IMETHOD Has(const char *prop, PRBool *_retval) { return _to Has(prop, _retval); } \
 83  NS_SCRIPTABLE NS_IMETHOD Undefine(const char *prop) { return _to Undefine(prop); } \
 84  NS_SCRIPTABLE NS_IMETHOD GetKeys(PRUint32 *count, char ***keys) { return _to GetKeys(count, keys); } 
 85
 86/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 87#define NS_FORWARD_SAFE_NSIPROPERTIES(_to) \
 88  NS_SCRIPTABLE NS_IMETHOD Get(const char *prop, const nsIID & iid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->Get(prop, iid, result); } \
 89  NS_SCRIPTABLE NS_IMETHOD Set(const char *prop, nsISupports *value) { return !_to ? NS_ERROR_NULL_POINTER : _to->Set(prop, value); } \
 90  NS_SCRIPTABLE NS_IMETHOD Has(const char *prop, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Has(prop, _retval); } \
 91  NS_SCRIPTABLE NS_IMETHOD Undefine(const char *prop) { return !_to ? NS_ERROR_NULL_POINTER : _to->Undefine(prop); } \
 92  NS_SCRIPTABLE NS_IMETHOD GetKeys(PRUint32 *count, char ***keys) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKeys(count, keys); } 
 93
 94#if 0
 95/* Use the code below as a template for the implementation class for this interface. */
 96
 97/* Header file */
 98class nsProperties : public nsIProperties
 99{
100public:
101  NS_DECL_ISUPPORTS
102  NS_DECL_NSIPROPERTIES
103
104  nsProperties();
105
106private:
107  ~nsProperties();
108
109protected:
110  /* additional members */
111};
112
113/* Implementation file */
114NS_IMPL_ISUPPORTS1(nsProperties, nsIProperties)
115
116nsProperties::nsProperties()
117{
118  /* member initializers and constructor code */
119}
120
121nsProperties::~nsProperties()
122{
123  /* destructor code */
124}
125
126/* void get (in string prop, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */
127NS_IMETHODIMP nsProperties::Get(const char *prop, const nsIID & iid, void * *result)
128{
129    return NS_ERROR_NOT_IMPLEMENTED;
130}
131
132/* void set (in string prop, in nsISupports value); */
133NS_IMETHODIMP nsProperties::Set(const char *prop, nsISupports *value)
134{
135    return NS_ERROR_NOT_IMPLEMENTED;
136}
137
138/* boolean has (in string prop); */
139NS_IMETHODIMP nsProperties::Has(const char *prop, PRBool *_retval)
140{
141    return NS_ERROR_NOT_IMPLEMENTED;
142}
143
144/* void undefine (in string prop); */
145NS_IMETHODIMP nsProperties::Undefine(const char *prop)
146{
147    return NS_ERROR_NOT_IMPLEMENTED;
148}
149
150/* void getKeys (out PRUint32 count, [array, size_is (count), retval] out string keys); */
151NS_IMETHODIMP nsProperties::GetKeys(PRUint32 *count, char ***keys)
152{
153    return NS_ERROR_NOT_IMPLEMENTED;
154}
155
156/* End of implementation class template. */
157#endif
158
159
160#endif /* __gen_nsIProperties_h__ */