OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0
-Release/WINNT_5.2_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 |
| 25 class NS_NO_VTABLE nsIProperties : public nsISupports { |
| 26 public: |
| 27 |
| 28 NS_DEFINE_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 nsQIR
esult result); */ |
| 38 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_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_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_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 stri
ng keys); */ |
| 64 NS_IMETHOD GetKeys(PRUint32 *count, char ***keys) = 0; |
| 65 |
| 66 }; |
| 67 |
| 68 /* Use this macro when declaring classes that implement this interface. */ |
| 69 #define NS_DECL_NSIPROPERTIES \ |
| 70 NS_IMETHOD Get(const char *prop, const nsIID & iid, void * *result); \ |
| 71 NS_IMETHOD Set(const char *prop, nsISupports *value); \ |
| 72 NS_IMETHOD Has(const char *prop, PRBool *_retval); \ |
| 73 NS_IMETHOD Undefine(const char *prop); \ |
| 74 NS_IMETHOD GetKeys(PRUint32 *count, char ***keys); |
| 75 |
| 76 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object. */ |
| 77 #define NS_FORWARD_NSIPROPERTIES(_to) \ |
| 78 NS_IMETHOD Get(const char *prop, const nsIID & iid, void * *result) { return _
to Get(prop, iid, result); } \ |
| 79 NS_IMETHOD Set(const char *prop, nsISupports *value) { return _to Set(prop, va
lue); } \ |
| 80 NS_IMETHOD Has(const char *prop, PRBool *_retval) { return _to Has(prop, _retv
al); } \ |
| 81 NS_IMETHOD Undefine(const char *prop) { return _to Undefine(prop); } \ |
| 82 NS_IMETHOD GetKeys(PRUint32 *count, char ***keys) { return _to GetKeys(count,
keys); } |
| 83 |
| 84 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object in a safe way. */ |
| 85 #define NS_FORWARD_SAFE_NSIPROPERTIES(_to) \ |
| 86 NS_IMETHOD Get(const char *prop, const nsIID & iid, void * *result) { return !
_to ? NS_ERROR_NULL_POINTER : _to->Get(prop, iid, result); } \ |
| 87 NS_IMETHOD Set(const char *prop, nsISupports *value) { return !_to ? NS_ERROR_
NULL_POINTER : _to->Set(prop, value); } \ |
| 88 NS_IMETHOD Has(const char *prop, PRBool *_retval) { return !_to ? NS_ERROR_NUL
L_POINTER : _to->Has(prop, _retval); } \ |
| 89 NS_IMETHOD Undefine(const char *prop) { return !_to ? NS_ERROR_NULL_POINTER :
_to->Undefine(prop); } \ |
| 90 NS_IMETHOD GetKeys(PRUint32 *count, char ***keys) { return !_to ? NS_ERROR_NUL
L_POINTER : _to->GetKeys(count, keys); } |
| 91 |
| 92 #if 0 |
| 93 /* Use the code below as a template for the implementation class for this interf
ace. */ |
| 94 |
| 95 /* Header file */ |
| 96 class nsProperties : public nsIProperties |
| 97 { |
| 98 public: |
| 99 NS_DECL_ISUPPORTS |
| 100 NS_DECL_NSIPROPERTIES |
| 101 |
| 102 nsProperties(); |
| 103 |
| 104 private: |
| 105 ~nsProperties(); |
| 106 |
| 107 protected: |
| 108 /* additional members */ |
| 109 }; |
| 110 |
| 111 /* Implementation file */ |
| 112 NS_IMPL_ISUPPORTS1(nsProperties, nsIProperties) |
| 113 |
| 114 nsProperties::nsProperties() |
| 115 { |
| 116 /* member initializers and constructor code */ |
| 117 } |
| 118 |
| 119 nsProperties::~nsProperties() |
| 120 { |
| 121 /* destructor code */ |
| 122 } |
| 123 |
| 124 /* void get (in string prop, in nsIIDRef iid, [iid_is (iid), retval] out nsQIRes
ult result); */ |
| 125 NS_IMETHODIMP nsProperties::Get(const char *prop, const nsIID & iid, void * *res
ult) |
| 126 { |
| 127 return NS_ERROR_NOT_IMPLEMENTED; |
| 128 } |
| 129 |
| 130 /* void set (in string prop, in nsISupports value); */ |
| 131 NS_IMETHODIMP nsProperties::Set(const char *prop, nsISupports *value) |
| 132 { |
| 133 return NS_ERROR_NOT_IMPLEMENTED; |
| 134 } |
| 135 |
| 136 /* boolean has (in string prop); */ |
| 137 NS_IMETHODIMP nsProperties::Has(const char *prop, PRBool *_retval) |
| 138 { |
| 139 return NS_ERROR_NOT_IMPLEMENTED; |
| 140 } |
| 141 |
| 142 /* void undefine (in string prop); */ |
| 143 NS_IMETHODIMP nsProperties::Undefine(const char *prop) |
| 144 { |
| 145 return NS_ERROR_NOT_IMPLEMENTED; |
| 146 } |
| 147 |
| 148 /* void getKeys (out PRUint32 count, [array, size_is (count), retval] out string
keys); */ |
| 149 NS_IMETHODIMP nsProperties::GetKeys(PRUint32 *count, char ***keys) |
| 150 { |
| 151 return NS_ERROR_NOT_IMPLEMENTED; |
| 152 } |
| 153 |
| 154 /* End of implementation class template. */ |
| 155 #endif |
| 156 |
| 157 |
| 158 #endif /* __gen_nsIProperties_h__ */ |
OLD | NEW |