nsIDOMHTMLOptionsCollection.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/html/nsIDOMHTMLOptionsCollection.idl
  3. */
  4. #ifndef __gen_nsIDOMHTMLOptionsCollection_h__
  5. #define __gen_nsIDOMHTMLOptionsCollection_h__
  6. #ifndef __gen_nsIDOMHTMLElement_h__
  7. #include "nsIDOMHTMLElement.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. /* starting interface: nsIDOMHTMLOptionsCollection */
  14. #define NS_IDOMHTMLOPTIONSCOLLECTION_IID_STR "bce0213c-f70f-488f-b93f-688acca55d63"
  15. #define NS_IDOMHTMLOPTIONSCOLLECTION_IID \
  16. {0xbce0213c, 0xf70f, 0x488f, \
  17. { 0xb9, 0x3f, 0x68, 0x8a, 0xcc, 0xa5, 0x5d, 0x63 }}
  18. /**
  19. * The nsIDOMHTMLOptionsCollection interface is the interface to a
  20. * collection of [X]HTML option elements.
  21. *
  22. * For more information on this interface please see
  23. * http://www.w3.org/TR/DOM-Level-2-HTML/
  24. *
  25. * @status FROZEN
  26. */
  27. class NS_NO_VTABLE nsIDOMHTMLOptionsCollection : public nsISupports {
  28. public:
  29. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMHTMLOPTIONSCOLLECTION_IID)
  30. /* attribute unsigned long length; */
  31. NS_IMETHOD GetLength(PRUint32 *aLength) = 0;
  32. NS_IMETHOD SetLength(PRUint32 aLength) = 0;
  33. /* nsIDOMNode item (in unsigned long index); */
  34. NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) = 0;
  35. /* nsIDOMNode namedItem (in DOMString name); */
  36. NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval) = 0;
  37. };
  38. /* Use this macro when declaring classes that implement this interface. */
  39. #define NS_DECL_NSIDOMHTMLOPTIONSCOLLECTION \
  40. NS_IMETHOD GetLength(PRUint32 *aLength); \
  41. NS_IMETHOD SetLength(PRUint32 aLength); \
  42. NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval); \
  43. NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval);
  44. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  45. #define NS_FORWARD_NSIDOMHTMLOPTIONSCOLLECTION(_to) \
  46. NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \
  47. NS_IMETHOD SetLength(PRUint32 aLength) { return _to SetLength(aLength); } \
  48. NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) { return _to Item(index, _retval); } \
  49. NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval) { return _to NamedItem(name, _retval); }
  50. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  51. #define NS_FORWARD_SAFE_NSIDOMHTMLOPTIONSCOLLECTION(_to) \
  52. NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \
  53. NS_IMETHOD SetLength(PRUint32 aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLength(aLength); } \
  54. NS_IMETHOD Item(PRUint32 index, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \
  55. NS_IMETHOD NamedItem(const nsAString & name, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NamedItem(name, _retval); }
  56. #if 0
  57. /* Use the code below as a template for the implementation class for this interface. */
  58. /* Header file */
  59. class nsDOMHTMLOptionsCollection : public nsIDOMHTMLOptionsCollection
  60. {
  61. public:
  62. NS_DECL_ISUPPORTS
  63. NS_DECL_NSIDOMHTMLOPTIONSCOLLECTION
  64. nsDOMHTMLOptionsCollection();
  65. private:
  66. ~nsDOMHTMLOptionsCollection();
  67. protected:
  68. /* additional members */
  69. };
  70. /* Implementation file */
  71. NS_IMPL_ISUPPORTS1(nsDOMHTMLOptionsCollection, nsIDOMHTMLOptionsCollection)
  72. nsDOMHTMLOptionsCollection::nsDOMHTMLOptionsCollection()
  73. {
  74. /* member initializers and constructor code */
  75. }
  76. nsDOMHTMLOptionsCollection::~nsDOMHTMLOptionsCollection()
  77. {
  78. /* destructor code */
  79. }
  80. /* attribute unsigned long length; */
  81. NS_IMETHODIMP nsDOMHTMLOptionsCollection::GetLength(PRUint32 *aLength)
  82. {
  83. return NS_ERROR_NOT_IMPLEMENTED;
  84. }
  85. NS_IMETHODIMP nsDOMHTMLOptionsCollection::SetLength(PRUint32 aLength)
  86. {
  87. return NS_ERROR_NOT_IMPLEMENTED;
  88. }
  89. /* nsIDOMNode item (in unsigned long index); */
  90. NS_IMETHODIMP nsDOMHTMLOptionsCollection::Item(PRUint32 index, nsIDOMNode **_retval)
  91. {
  92. return NS_ERROR_NOT_IMPLEMENTED;
  93. }
  94. /* nsIDOMNode namedItem (in DOMString name); */
  95. NS_IMETHODIMP nsDOMHTMLOptionsCollection::NamedItem(const nsAString & name, nsIDOMNode **_retval)
  96. {
  97. return NS_ERROR_NOT_IMPLEMENTED;
  98. }
  99. /* End of implementation class template. */
  100. #endif
  101. #endif /* __gen_nsIDOMHTMLOptionsCollection_h__ */