nsIDOMAttr.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMAttr.idl
  3. */
  4. #ifndef __gen_nsIDOMAttr_h__
  5. #define __gen_nsIDOMAttr_h__
  6. #ifndef __gen_nsIDOMNode_h__
  7. #include "nsIDOMNode.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: nsIDOMAttr */
  14. #define NS_IDOMATTR_IID_STR "a6cf9070-15b3-11d2-932e-00805f8add32"
  15. #define NS_IDOMATTR_IID \
  16. {0xa6cf9070, 0x15b3, 0x11d2, \
  17. { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}
  18. class NS_NO_VTABLE nsIDOMAttr : public nsIDOMNode {
  19. public:
  20. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMATTR_IID)
  21. /**
  22. * The nsIDOMAttr interface represents an attribute in an "Element" object.
  23. * Typically the allowable values for the attribute are defined in a document
  24. * type definition.
  25. *
  26. * For more information on this interface please see
  27. * http://www.w3.org/TR/DOM-Level-2-Core/
  28. *
  29. * @status FROZEN
  30. */
  31. /* readonly attribute DOMString name; */
  32. NS_IMETHOD GetName(nsAString & aName) = 0;
  33. /* readonly attribute boolean specified; */
  34. NS_IMETHOD GetSpecified(PRBool *aSpecified) = 0;
  35. /* attribute DOMString value; */
  36. NS_IMETHOD GetValue(nsAString & aValue) = 0;
  37. NS_IMETHOD SetValue(const nsAString & aValue) = 0;
  38. /* readonly attribute nsIDOMElement ownerElement; */
  39. NS_IMETHOD GetOwnerElement(nsIDOMElement * *aOwnerElement) = 0;
  40. };
  41. /* Use this macro when declaring classes that implement this interface. */
  42. #define NS_DECL_NSIDOMATTR \
  43. NS_IMETHOD GetName(nsAString & aName); \
  44. NS_IMETHOD GetSpecified(PRBool *aSpecified); \
  45. NS_IMETHOD GetValue(nsAString & aValue); \
  46. NS_IMETHOD SetValue(const nsAString & aValue); \
  47. NS_IMETHOD GetOwnerElement(nsIDOMElement * *aOwnerElement);
  48. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  49. #define NS_FORWARD_NSIDOMATTR(_to) \
  50. NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
  51. NS_IMETHOD GetSpecified(PRBool *aSpecified) { return _to GetSpecified(aSpecified); } \
  52. NS_IMETHOD GetValue(nsAString & aValue) { return _to GetValue(aValue); } \
  53. NS_IMETHOD SetValue(const nsAString & aValue) { return _to SetValue(aValue); } \
  54. NS_IMETHOD GetOwnerElement(nsIDOMElement * *aOwnerElement) { return _to GetOwnerElement(aOwnerElement); }
  55. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  56. #define NS_FORWARD_SAFE_NSIDOMATTR(_to) \
  57. NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  58. NS_IMETHOD GetSpecified(PRBool *aSpecified) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSpecified(aSpecified); } \
  59. NS_IMETHOD GetValue(nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \
  60. NS_IMETHOD SetValue(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } \
  61. NS_IMETHOD GetOwnerElement(nsIDOMElement * *aOwnerElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOwnerElement(aOwnerElement); }
  62. #if 0
  63. /* Use the code below as a template for the implementation class for this interface. */
  64. /* Header file */
  65. class nsDOMAttr : public nsIDOMAttr
  66. {
  67. public:
  68. NS_DECL_ISUPPORTS
  69. NS_DECL_NSIDOMATTR
  70. nsDOMAttr();
  71. private:
  72. ~nsDOMAttr();
  73. protected:
  74. /* additional members */
  75. };
  76. /* Implementation file */
  77. NS_IMPL_ISUPPORTS1(nsDOMAttr, nsIDOMAttr)
  78. nsDOMAttr::nsDOMAttr()
  79. {
  80. /* member initializers and constructor code */
  81. }
  82. nsDOMAttr::~nsDOMAttr()
  83. {
  84. /* destructor code */
  85. }
  86. /* readonly attribute DOMString name; */
  87. NS_IMETHODIMP nsDOMAttr::GetName(nsAString & aName)
  88. {
  89. return NS_ERROR_NOT_IMPLEMENTED;
  90. }
  91. /* readonly attribute boolean specified; */
  92. NS_IMETHODIMP nsDOMAttr::GetSpecified(PRBool *aSpecified)
  93. {
  94. return NS_ERROR_NOT_IMPLEMENTED;
  95. }
  96. /* attribute DOMString value; */
  97. NS_IMETHODIMP nsDOMAttr::GetValue(nsAString & aValue)
  98. {
  99. return NS_ERROR_NOT_IMPLEMENTED;
  100. }
  101. NS_IMETHODIMP nsDOMAttr::SetValue(const nsAString & aValue)
  102. {
  103. return NS_ERROR_NOT_IMPLEMENTED;
  104. }
  105. /* readonly attribute nsIDOMElement ownerElement; */
  106. NS_IMETHODIMP nsDOMAttr::GetOwnerElement(nsIDOMElement * *aOwnerElement)
  107. {
  108. return NS_ERROR_NOT_IMPLEMENTED;
  109. }
  110. /* End of implementation class template. */
  111. #endif
  112. #endif /* __gen_nsIDOMAttr_h__ */