PageRenderTime 124ms CodeModel.GetById 70ms app.highlight 11ms RepoModel.GetById 40ms app.codeStats 0ms

/gecko_api/include/nsIDOMElement.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 280 lines | 168 code | 56 blank | 56 comment | 0 complexity | 62e583a2e1a26bc97704b2928daefd06 MD5 | raw file
  1/*
  2 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/dom/public/idl/core/nsIDOMElement.idl
  3 */
  4
  5#ifndef __gen_nsIDOMElement_h__
  6#define __gen_nsIDOMElement_h__
  7
  8
  9#ifndef __gen_nsIDOMNode_h__
 10#include "nsIDOMNode.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:    nsIDOMElement */
 19#define NS_IDOMELEMENT_IID_STR "a6cf9078-15b3-11d2-932e-00805f8add32"
 20
 21#define NS_IDOMELEMENT_IID \
 22  {0xa6cf9078, 0x15b3, 0x11d2, \
 23    { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}
 24
 25class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMElement : public nsIDOMNode {
 26 public: 
 27
 28  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMELEMENT_IID)
 29
 30  /**
 31 * The nsIDOMElement interface represents an element in an HTML or 
 32 * XML document. 
 33 *
 34 * For more information on this interface please see 
 35 * http://www.w3.org/TR/DOM-Level-2-Core/
 36 *
 37 * @status FROZEN
 38 */
 39  /* readonly attribute DOMString tagName; */
 40  NS_SCRIPTABLE NS_IMETHOD GetTagName(nsAString & aTagName) = 0;
 41
 42  /* DOMString getAttribute (in DOMString name); */
 43  NS_SCRIPTABLE NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) = 0;
 44
 45  /* void setAttribute (in DOMString name, in DOMString value)  raises (DOMException); */
 46  NS_SCRIPTABLE NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) = 0;
 47
 48  /* void removeAttribute (in DOMString name)  raises (DOMException); */
 49  NS_SCRIPTABLE NS_IMETHOD RemoveAttribute(const nsAString & name) = 0;
 50
 51  /* nsIDOMAttr getAttributeNode (in DOMString name); */
 52  NS_SCRIPTABLE NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) = 0;
 53
 54  /* nsIDOMAttr setAttributeNode (in nsIDOMAttr newAttr)  raises (DOMException); */
 55  NS_SCRIPTABLE NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) = 0;
 56
 57  /* nsIDOMAttr removeAttributeNode (in nsIDOMAttr oldAttr)  raises (DOMException); */
 58  NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) = 0;
 59
 60  /* nsIDOMNodeList getElementsByTagName (in DOMString name); */
 61  NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) = 0;
 62
 63  /* DOMString getAttributeNS (in DOMString namespaceURI, in DOMString localName); */
 64  NS_SCRIPTABLE NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) = 0;
 65
 66  /* void setAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName, in DOMString value)  raises (DOMException); */
 67  NS_SCRIPTABLE NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) = 0;
 68
 69  /* void removeAttributeNS (in DOMString namespaceURI, in DOMString localName)  raises (DOMException); */
 70  NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) = 0;
 71
 72  /* nsIDOMAttr getAttributeNodeNS (in DOMString namespaceURI, in DOMString localName); */
 73  NS_SCRIPTABLE NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) = 0;
 74
 75  /* nsIDOMAttr setAttributeNodeNS (in nsIDOMAttr newAttr)  raises (DOMException); */
 76  NS_SCRIPTABLE NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) = 0;
 77
 78  /* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
 79  NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) = 0;
 80
 81  /* boolean hasAttribute (in DOMString name); */
 82  NS_SCRIPTABLE NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) = 0;
 83
 84  /* boolean hasAttributeNS (in DOMString namespaceURI, in DOMString localName); */
 85  NS_SCRIPTABLE NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) = 0;
 86
 87};
 88
 89  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMElement, NS_IDOMELEMENT_IID)
 90
 91/* Use this macro when declaring classes that implement this interface. */
 92#define NS_DECL_NSIDOMELEMENT \
 93  NS_SCRIPTABLE NS_IMETHOD GetTagName(nsAString & aTagName); \
 94  NS_SCRIPTABLE NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval); \
 95  NS_SCRIPTABLE NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value); \
 96  NS_SCRIPTABLE NS_IMETHOD RemoveAttribute(const nsAString & name); \
 97  NS_SCRIPTABLE NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval); \
 98  NS_SCRIPTABLE NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval); \
 99  NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval); \
100  NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval); \
101  NS_SCRIPTABLE NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval); \
102  NS_SCRIPTABLE NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value); \
103  NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName); \
104  NS_SCRIPTABLE NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval); \
105  NS_SCRIPTABLE NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval); \
106  NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval); \
107  NS_SCRIPTABLE NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval); \
108  NS_SCRIPTABLE NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval); 
109
110/* Use this macro to declare functions that forward the behavior of this interface to another object. */
111#define NS_FORWARD_NSIDOMELEMENT(_to) \
112  NS_SCRIPTABLE NS_IMETHOD GetTagName(nsAString & aTagName) { return _to GetTagName(aTagName); } \
113  NS_SCRIPTABLE NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) { return _to GetAttribute(name, _retval); } \
114  NS_SCRIPTABLE NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) { return _to SetAttribute(name, value); } \
115  NS_SCRIPTABLE NS_IMETHOD RemoveAttribute(const nsAString & name) { return _to RemoveAttribute(name); } \
116  NS_SCRIPTABLE NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) { return _to GetAttributeNode(name, _retval); } \
117  NS_SCRIPTABLE NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return _to SetAttributeNode(newAttr, _retval); } \
118  NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) { return _to RemoveAttributeNode(oldAttr, _retval); } \
119  NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) { return _to GetElementsByTagName(name, _retval); } \
120  NS_SCRIPTABLE NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) { return _to GetAttributeNS(namespaceURI, localName, _retval); } \
121  NS_SCRIPTABLE NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) { return _to SetAttributeNS(namespaceURI, qualifiedName, value); } \
122  NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) { return _to RemoveAttributeNS(namespaceURI, localName); } \
123  NS_SCRIPTABLE NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) { return _to GetAttributeNodeNS(namespaceURI, localName, _retval); } \
124  NS_SCRIPTABLE NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return _to SetAttributeNodeNS(newAttr, _retval); } \
125  NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return _to GetElementsByTagNameNS(namespaceURI, localName, _retval); } \
126  NS_SCRIPTABLE NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) { return _to HasAttribute(name, _retval); } \
127  NS_SCRIPTABLE NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) { return _to HasAttributeNS(namespaceURI, localName, _retval); } 
128
129/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
130#define NS_FORWARD_SAFE_NSIDOMELEMENT(_to) \
131  NS_SCRIPTABLE NS_IMETHOD GetTagName(nsAString & aTagName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTagName(aTagName); } \
132  NS_SCRIPTABLE NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttribute(name, _retval); } \
133  NS_SCRIPTABLE NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttribute(name, value); } \
134  NS_SCRIPTABLE NS_IMETHOD RemoveAttribute(const nsAString & name) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttribute(name); } \
135  NS_SCRIPTABLE NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNode(name, _retval); } \
136  NS_SCRIPTABLE NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNode(newAttr, _retval); } \
137  NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttributeNode(oldAttr, _retval); } \
138  NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagName(name, _retval); } \
139  NS_SCRIPTABLE NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNS(namespaceURI, localName, _retval); } \
140  NS_SCRIPTABLE NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNS(namespaceURI, qualifiedName, value); } \
141  NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttributeNS(namespaceURI, localName); } \
142  NS_SCRIPTABLE NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNodeNS(namespaceURI, localName, _retval); } \
143  NS_SCRIPTABLE NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNodeNS(newAttr, _retval); } \
144  NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagNameNS(namespaceURI, localName, _retval); } \
145  NS_SCRIPTABLE NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAttribute(name, _retval); } \
146  NS_SCRIPTABLE NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAttributeNS(namespaceURI, localName, _retval); } 
147
148#if 0
149/* Use the code below as a template for the implementation class for this interface. */
150
151/* Header file */
152class nsDOMElement : public nsIDOMElement
153{
154public:
155  NS_DECL_ISUPPORTS
156  NS_DECL_NSIDOMELEMENT
157
158  nsDOMElement();
159
160private:
161  ~nsDOMElement();
162
163protected:
164  /* additional members */
165};
166
167/* Implementation file */
168NS_IMPL_ISUPPORTS1(nsDOMElement, nsIDOMElement)
169
170nsDOMElement::nsDOMElement()
171{
172  /* member initializers and constructor code */
173}
174
175nsDOMElement::~nsDOMElement()
176{
177  /* destructor code */
178}
179
180/* readonly attribute DOMString tagName; */
181NS_IMETHODIMP nsDOMElement::GetTagName(nsAString & aTagName)
182{
183    return NS_ERROR_NOT_IMPLEMENTED;
184}
185
186/* DOMString getAttribute (in DOMString name); */
187NS_IMETHODIMP nsDOMElement::GetAttribute(const nsAString & name, nsAString & _retval)
188{
189    return NS_ERROR_NOT_IMPLEMENTED;
190}
191
192/* void setAttribute (in DOMString name, in DOMString value)  raises (DOMException); */
193NS_IMETHODIMP nsDOMElement::SetAttribute(const nsAString & name, const nsAString & value)
194{
195    return NS_ERROR_NOT_IMPLEMENTED;
196}
197
198/* void removeAttribute (in DOMString name)  raises (DOMException); */
199NS_IMETHODIMP nsDOMElement::RemoveAttribute(const nsAString & name)
200{
201    return NS_ERROR_NOT_IMPLEMENTED;
202}
203
204/* nsIDOMAttr getAttributeNode (in DOMString name); */
205NS_IMETHODIMP nsDOMElement::GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval)
206{
207    return NS_ERROR_NOT_IMPLEMENTED;
208}
209
210/* nsIDOMAttr setAttributeNode (in nsIDOMAttr newAttr)  raises (DOMException); */
211NS_IMETHODIMP nsDOMElement::SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval)
212{
213    return NS_ERROR_NOT_IMPLEMENTED;
214}
215
216/* nsIDOMAttr removeAttributeNode (in nsIDOMAttr oldAttr)  raises (DOMException); */
217NS_IMETHODIMP nsDOMElement::RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval)
218{
219    return NS_ERROR_NOT_IMPLEMENTED;
220}
221
222/* nsIDOMNodeList getElementsByTagName (in DOMString name); */
223NS_IMETHODIMP nsDOMElement::GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval)
224{
225    return NS_ERROR_NOT_IMPLEMENTED;
226}
227
228/* DOMString getAttributeNS (in DOMString namespaceURI, in DOMString localName); */
229NS_IMETHODIMP nsDOMElement::GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval)
230{
231    return NS_ERROR_NOT_IMPLEMENTED;
232}
233
234/* void setAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName, in DOMString value)  raises (DOMException); */
235NS_IMETHODIMP nsDOMElement::SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value)
236{
237    return NS_ERROR_NOT_IMPLEMENTED;
238}
239
240/* void removeAttributeNS (in DOMString namespaceURI, in DOMString localName)  raises (DOMException); */
241NS_IMETHODIMP nsDOMElement::RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName)
242{
243    return NS_ERROR_NOT_IMPLEMENTED;
244}
245
246/* nsIDOMAttr getAttributeNodeNS (in DOMString namespaceURI, in DOMString localName); */
247NS_IMETHODIMP nsDOMElement::GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval)
248{
249    return NS_ERROR_NOT_IMPLEMENTED;
250}
251
252/* nsIDOMAttr setAttributeNodeNS (in nsIDOMAttr newAttr)  raises (DOMException); */
253NS_IMETHODIMP nsDOMElement::SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval)
254{
255    return NS_ERROR_NOT_IMPLEMENTED;
256}
257
258/* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
259NS_IMETHODIMP nsDOMElement::GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval)
260{
261    return NS_ERROR_NOT_IMPLEMENTED;
262}
263
264/* boolean hasAttribute (in DOMString name); */
265NS_IMETHODIMP nsDOMElement::HasAttribute(const nsAString & name, PRBool *_retval)
266{
267    return NS_ERROR_NOT_IMPLEMENTED;
268}
269
270/* boolean hasAttributeNS (in DOMString namespaceURI, in DOMString localName); */
271NS_IMETHODIMP nsDOMElement::HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval)
272{
273    return NS_ERROR_NOT_IMPLEMENTED;
274}
275
276/* End of implementation class template. */
277#endif
278
279
280#endif /* __gen_nsIDOMElement_h__ */