nsIDOMCharacterData.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/core/nsIDOMCharacterData.idl
  3. */
  4. #ifndef __gen_nsIDOMCharacterData_h__
  5. #define __gen_nsIDOMCharacterData_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: nsIDOMCharacterData */
  14. #define NS_IDOMCHARACTERDATA_IID_STR "a6cf9072-15b3-11d2-932e-00805f8add32"
  15. #define NS_IDOMCHARACTERDATA_IID \
  16. {0xa6cf9072, 0x15b3, 0x11d2, \
  17. { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}
  18. class NS_NO_VTABLE nsIDOMCharacterData : public nsIDOMNode {
  19. public:
  20. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCHARACTERDATA_IID)
  21. /**
  22. * The nsIDOMCharacterData interface extends nsIDOMNode with a set of
  23. * attributes and methods for accessing character data in the DOM.
  24. *
  25. * For more information on this interface please see
  26. * http://www.w3.org/TR/DOM-Level-2-Core/
  27. *
  28. * @status FROZEN
  29. */
  30. /* attribute DOMString data; */
  31. NS_IMETHOD GetData(nsAString & aData) = 0;
  32. NS_IMETHOD SetData(const nsAString & aData) = 0;
  33. /* readonly attribute unsigned long length; */
  34. NS_IMETHOD GetLength(PRUint32 *aLength) = 0;
  35. /* DOMString substringData (in unsigned long offset, in unsigned long count) raises (DOMException); */
  36. NS_IMETHOD SubstringData(PRUint32 offset, PRUint32 count, nsAString & _retval) = 0;
  37. /* void appendData (in DOMString arg) raises (DOMException); */
  38. NS_IMETHOD AppendData(const nsAString & arg) = 0;
  39. /* void insertData (in unsigned long offset, in DOMString arg) raises (DOMException); */
  40. NS_IMETHOD InsertData(PRUint32 offset, const nsAString & arg) = 0;
  41. /* void deleteData (in unsigned long offset, in unsigned long count) raises (DOMException); */
  42. NS_IMETHOD DeleteData(PRUint32 offset, PRUint32 count) = 0;
  43. /* void replaceData (in unsigned long offset, in unsigned long count, in DOMString arg) raises (DOMException); */
  44. NS_IMETHOD ReplaceData(PRUint32 offset, PRUint32 count, const nsAString & arg) = 0;
  45. };
  46. /* Use this macro when declaring classes that implement this interface. */
  47. #define NS_DECL_NSIDOMCHARACTERDATA \
  48. NS_IMETHOD GetData(nsAString & aData); \
  49. NS_IMETHOD SetData(const nsAString & aData); \
  50. NS_IMETHOD GetLength(PRUint32 *aLength); \
  51. NS_IMETHOD SubstringData(PRUint32 offset, PRUint32 count, nsAString & _retval); \
  52. NS_IMETHOD AppendData(const nsAString & arg); \
  53. NS_IMETHOD InsertData(PRUint32 offset, const nsAString & arg); \
  54. NS_IMETHOD DeleteData(PRUint32 offset, PRUint32 count); \
  55. NS_IMETHOD ReplaceData(PRUint32 offset, PRUint32 count, const nsAString & arg);
  56. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  57. #define NS_FORWARD_NSIDOMCHARACTERDATA(_to) \
  58. NS_IMETHOD GetData(nsAString & aData) { return _to GetData(aData); } \
  59. NS_IMETHOD SetData(const nsAString & aData) { return _to SetData(aData); } \
  60. NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \
  61. NS_IMETHOD SubstringData(PRUint32 offset, PRUint32 count, nsAString & _retval) { return _to SubstringData(offset, count, _retval); } \
  62. NS_IMETHOD AppendData(const nsAString & arg) { return _to AppendData(arg); } \
  63. NS_IMETHOD InsertData(PRUint32 offset, const nsAString & arg) { return _to InsertData(offset, arg); } \
  64. NS_IMETHOD DeleteData(PRUint32 offset, PRUint32 count) { return _to DeleteData(offset, count); } \
  65. NS_IMETHOD ReplaceData(PRUint32 offset, PRUint32 count, const nsAString & arg) { return _to ReplaceData(offset, count, arg); }
  66. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  67. #define NS_FORWARD_SAFE_NSIDOMCHARACTERDATA(_to) \
  68. NS_IMETHOD GetData(nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  69. NS_IMETHOD SetData(const nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  70. NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \
  71. NS_IMETHOD SubstringData(PRUint32 offset, PRUint32 count, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SubstringData(offset, count, _retval); } \
  72. NS_IMETHOD AppendData(const nsAString & arg) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendData(arg); } \
  73. NS_IMETHOD InsertData(PRUint32 offset, const nsAString & arg) { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertData(offset, arg); } \
  74. NS_IMETHOD DeleteData(PRUint32 offset, PRUint32 count) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteData(offset, count); } \
  75. NS_IMETHOD ReplaceData(PRUint32 offset, PRUint32 count, const nsAString & arg) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReplaceData(offset, count, arg); }
  76. #if 0
  77. /* Use the code below as a template for the implementation class for this interface. */
  78. /* Header file */
  79. class nsDOMCharacterData : public nsIDOMCharacterData
  80. {
  81. public:
  82. NS_DECL_ISUPPORTS
  83. NS_DECL_NSIDOMCHARACTERDATA
  84. nsDOMCharacterData();
  85. private:
  86. ~nsDOMCharacterData();
  87. protected:
  88. /* additional members */
  89. };
  90. /* Implementation file */
  91. NS_IMPL_ISUPPORTS1(nsDOMCharacterData, nsIDOMCharacterData)
  92. nsDOMCharacterData::nsDOMCharacterData()
  93. {
  94. /* member initializers and constructor code */
  95. }
  96. nsDOMCharacterData::~nsDOMCharacterData()
  97. {
  98. /* destructor code */
  99. }
  100. /* attribute DOMString data; */
  101. NS_IMETHODIMP nsDOMCharacterData::GetData(nsAString & aData)
  102. {
  103. return NS_ERROR_NOT_IMPLEMENTED;
  104. }
  105. NS_IMETHODIMP nsDOMCharacterData::SetData(const nsAString & aData)
  106. {
  107. return NS_ERROR_NOT_IMPLEMENTED;
  108. }
  109. /* readonly attribute unsigned long length; */
  110. NS_IMETHODIMP nsDOMCharacterData::GetLength(PRUint32 *aLength)
  111. {
  112. return NS_ERROR_NOT_IMPLEMENTED;
  113. }
  114. /* DOMString substringData (in unsigned long offset, in unsigned long count) raises (DOMException); */
  115. NS_IMETHODIMP nsDOMCharacterData::SubstringData(PRUint32 offset, PRUint32 count, nsAString & _retval)
  116. {
  117. return NS_ERROR_NOT_IMPLEMENTED;
  118. }
  119. /* void appendData (in DOMString arg) raises (DOMException); */
  120. NS_IMETHODIMP nsDOMCharacterData::AppendData(const nsAString & arg)
  121. {
  122. return NS_ERROR_NOT_IMPLEMENTED;
  123. }
  124. /* void insertData (in unsigned long offset, in DOMString arg) raises (DOMException); */
  125. NS_IMETHODIMP nsDOMCharacterData::InsertData(PRUint32 offset, const nsAString & arg)
  126. {
  127. return NS_ERROR_NOT_IMPLEMENTED;
  128. }
  129. /* void deleteData (in unsigned long offset, in unsigned long count) raises (DOMException); */
  130. NS_IMETHODIMP nsDOMCharacterData::DeleteData(PRUint32 offset, PRUint32 count)
  131. {
  132. return NS_ERROR_NOT_IMPLEMENTED;
  133. }
  134. /* void replaceData (in unsigned long offset, in unsigned long count, in DOMString arg) raises (DOMException); */
  135. NS_IMETHODIMP nsDOMCharacterData::ReplaceData(PRUint32 offset, PRUint32 count, const nsAString & arg)
  136. {
  137. return NS_ERROR_NOT_IMPLEMENTED;
  138. }
  139. /* End of implementation class template. */
  140. #endif
  141. #endif /* __gen_nsIDOMCharacterData_h__ */