nsISupportsPrimitives.h 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/ds/nsISupportsPrimitives.idl
  3. */
  4. #ifndef __gen_nsISupportsPrimitives_h__
  5. #define __gen_nsISupportsPrimitives_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.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: nsISupportsPrimitive */
  14. #define NS_ISUPPORTSPRIMITIVE_IID_STR "d0d4b136-1dd1-11b2-9371-f0727ef827c0"
  15. #define NS_ISUPPORTSPRIMITIVE_IID \
  16. {0xd0d4b136, 0x1dd1, 0x11b2, \
  17. { 0x93, 0x71, 0xf0, 0x72, 0x7e, 0xf8, 0x27, 0xc0 }}
  18. /**
  19. * Primitive base interface.
  20. *
  21. * These first three are pointer types and do data copying
  22. * using the nsIMemory. Be careful!
  23. *
  24. * @status FROZEN
  25. */
  26. class NS_NO_VTABLE nsISupportsPrimitive : public nsISupports {
  27. public:
  28. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRIMITIVE_IID)
  29. enum { TYPE_ID = 1U };
  30. enum { TYPE_CSTRING = 2U };
  31. enum { TYPE_STRING = 3U };
  32. enum { TYPE_PRBOOL = 4U };
  33. enum { TYPE_PRUINT8 = 5U };
  34. enum { TYPE_PRUINT16 = 6U };
  35. enum { TYPE_PRUINT32 = 7U };
  36. enum { TYPE_PRUINT64 = 8U };
  37. enum { TYPE_PRTIME = 9U };
  38. enum { TYPE_CHAR = 10U };
  39. enum { TYPE_PRINT16 = 11U };
  40. enum { TYPE_PRINT32 = 12U };
  41. enum { TYPE_PRINT64 = 13U };
  42. enum { TYPE_FLOAT = 14U };
  43. enum { TYPE_DOUBLE = 15U };
  44. enum { TYPE_VOID = 16U };
  45. enum { TYPE_INTERFACE_POINTER = 17U };
  46. /* readonly attribute unsigned short type; */
  47. NS_IMETHOD GetType(PRUint16 *aType) = 0;
  48. };
  49. /* Use this macro when declaring classes that implement this interface. */
  50. #define NS_DECL_NSISUPPORTSPRIMITIVE \
  51. NS_IMETHOD GetType(PRUint16 *aType);
  52. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  53. #define NS_FORWARD_NSISUPPORTSPRIMITIVE(_to) \
  54. NS_IMETHOD GetType(PRUint16 *aType) { return _to GetType(aType); }
  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_NSISUPPORTSPRIMITIVE(_to) \
  57. NS_IMETHOD GetType(PRUint16 *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); }
  58. #if 0
  59. /* Use the code below as a template for the implementation class for this interface. */
  60. /* Header file */
  61. class nsSupportsPrimitive : public nsISupportsPrimitive
  62. {
  63. public:
  64. NS_DECL_ISUPPORTS
  65. NS_DECL_NSISUPPORTSPRIMITIVE
  66. nsSupportsPrimitive();
  67. private:
  68. ~nsSupportsPrimitive();
  69. protected:
  70. /* additional members */
  71. };
  72. /* Implementation file */
  73. NS_IMPL_ISUPPORTS1(nsSupportsPrimitive, nsISupportsPrimitive)
  74. nsSupportsPrimitive::nsSupportsPrimitive()
  75. {
  76. /* member initializers and constructor code */
  77. }
  78. nsSupportsPrimitive::~nsSupportsPrimitive()
  79. {
  80. /* destructor code */
  81. }
  82. /* readonly attribute unsigned short type; */
  83. NS_IMETHODIMP nsSupportsPrimitive::GetType(PRUint16 *aType)
  84. {
  85. return NS_ERROR_NOT_IMPLEMENTED;
  86. }
  87. /* End of implementation class template. */
  88. #endif
  89. /* starting interface: nsISupportsID */
  90. #define NS_ISUPPORTSID_IID_STR "d18290a0-4a1c-11d3-9890-006008962422"
  91. #define NS_ISUPPORTSID_IID \
  92. {0xd18290a0, 0x4a1c, 0x11d3, \
  93. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  94. /**
  95. * Scriptable storage for nsID structures
  96. *
  97. * @status FROZEN
  98. */
  99. class NS_NO_VTABLE nsISupportsID : public nsISupportsPrimitive {
  100. public:
  101. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSID_IID)
  102. /* attribute nsIDPtr data; */
  103. NS_IMETHOD GetData(nsID * *aData) = 0;
  104. NS_IMETHOD SetData(const nsID * aData) = 0;
  105. /* string toString (); */
  106. NS_IMETHOD ToString(char **_retval) = 0;
  107. };
  108. /* Use this macro when declaring classes that implement this interface. */
  109. #define NS_DECL_NSISUPPORTSID \
  110. NS_IMETHOD GetData(nsID * *aData); \
  111. NS_IMETHOD SetData(const nsID * aData); \
  112. NS_IMETHOD ToString(char **_retval);
  113. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  114. #define NS_FORWARD_NSISUPPORTSID(_to) \
  115. NS_IMETHOD GetData(nsID * *aData) { return _to GetData(aData); } \
  116. NS_IMETHOD SetData(const nsID * aData) { return _to SetData(aData); } \
  117. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  118. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  119. #define NS_FORWARD_SAFE_NSISUPPORTSID(_to) \
  120. NS_IMETHOD GetData(nsID * *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  121. NS_IMETHOD SetData(const nsID * aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  122. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  123. #if 0
  124. /* Use the code below as a template for the implementation class for this interface. */
  125. /* Header file */
  126. class nsSupportsID : public nsISupportsID
  127. {
  128. public:
  129. NS_DECL_ISUPPORTS
  130. NS_DECL_NSISUPPORTSID
  131. nsSupportsID();
  132. private:
  133. ~nsSupportsID();
  134. protected:
  135. /* additional members */
  136. };
  137. /* Implementation file */
  138. NS_IMPL_ISUPPORTS1(nsSupportsID, nsISupportsID)
  139. nsSupportsID::nsSupportsID()
  140. {
  141. /* member initializers and constructor code */
  142. }
  143. nsSupportsID::~nsSupportsID()
  144. {
  145. /* destructor code */
  146. }
  147. /* attribute nsIDPtr data; */
  148. NS_IMETHODIMP nsSupportsID::GetData(nsID * *aData)
  149. {
  150. return NS_ERROR_NOT_IMPLEMENTED;
  151. }
  152. NS_IMETHODIMP nsSupportsID::SetData(const nsID * aData)
  153. {
  154. return NS_ERROR_NOT_IMPLEMENTED;
  155. }
  156. /* string toString (); */
  157. NS_IMETHODIMP nsSupportsID::ToString(char **_retval)
  158. {
  159. return NS_ERROR_NOT_IMPLEMENTED;
  160. }
  161. /* End of implementation class template. */
  162. #endif
  163. /* starting interface: nsISupportsCString */
  164. #define NS_ISUPPORTSCSTRING_IID_STR "d65ff270-4a1c-11d3-9890-006008962422"
  165. #define NS_ISUPPORTSCSTRING_IID \
  166. {0xd65ff270, 0x4a1c, 0x11d3, \
  167. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  168. /**
  169. * Scriptable storage for ASCII strings
  170. *
  171. * @status FROZEN
  172. */
  173. class NS_NO_VTABLE nsISupportsCString : public nsISupportsPrimitive {
  174. public:
  175. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSCSTRING_IID)
  176. /* attribute ACString data; */
  177. NS_IMETHOD GetData(nsACString & aData) = 0;
  178. NS_IMETHOD SetData(const nsACString & aData) = 0;
  179. /* string toString (); */
  180. NS_IMETHOD ToString(char **_retval) = 0;
  181. };
  182. /* Use this macro when declaring classes that implement this interface. */
  183. #define NS_DECL_NSISUPPORTSCSTRING \
  184. NS_IMETHOD GetData(nsACString & aData); \
  185. NS_IMETHOD SetData(const nsACString & aData); \
  186. NS_IMETHOD ToString(char **_retval);
  187. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  188. #define NS_FORWARD_NSISUPPORTSCSTRING(_to) \
  189. NS_IMETHOD GetData(nsACString & aData) { return _to GetData(aData); } \
  190. NS_IMETHOD SetData(const nsACString & aData) { return _to SetData(aData); } \
  191. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  192. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  193. #define NS_FORWARD_SAFE_NSISUPPORTSCSTRING(_to) \
  194. NS_IMETHOD GetData(nsACString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  195. NS_IMETHOD SetData(const nsACString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  196. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  197. #if 0
  198. /* Use the code below as a template for the implementation class for this interface. */
  199. /* Header file */
  200. class nsSupportsCString : public nsISupportsCString
  201. {
  202. public:
  203. NS_DECL_ISUPPORTS
  204. NS_DECL_NSISUPPORTSCSTRING
  205. nsSupportsCString();
  206. private:
  207. ~nsSupportsCString();
  208. protected:
  209. /* additional members */
  210. };
  211. /* Implementation file */
  212. NS_IMPL_ISUPPORTS1(nsSupportsCString, nsISupportsCString)
  213. nsSupportsCString::nsSupportsCString()
  214. {
  215. /* member initializers and constructor code */
  216. }
  217. nsSupportsCString::~nsSupportsCString()
  218. {
  219. /* destructor code */
  220. }
  221. /* attribute ACString data; */
  222. NS_IMETHODIMP nsSupportsCString::GetData(nsACString & aData)
  223. {
  224. return NS_ERROR_NOT_IMPLEMENTED;
  225. }
  226. NS_IMETHODIMP nsSupportsCString::SetData(const nsACString & aData)
  227. {
  228. return NS_ERROR_NOT_IMPLEMENTED;
  229. }
  230. /* string toString (); */
  231. NS_IMETHODIMP nsSupportsCString::ToString(char **_retval)
  232. {
  233. return NS_ERROR_NOT_IMPLEMENTED;
  234. }
  235. /* End of implementation class template. */
  236. #endif
  237. /* starting interface: nsISupportsString */
  238. #define NS_ISUPPORTSSTRING_IID_STR "d79dc970-4a1c-11d3-9890-006008962422"
  239. #define NS_ISUPPORTSSTRING_IID \
  240. {0xd79dc970, 0x4a1c, 0x11d3, \
  241. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  242. /**
  243. * Scriptable storage for Unicode strings
  244. *
  245. * @status FROZEN
  246. */
  247. class NS_NO_VTABLE nsISupportsString : public nsISupportsPrimitive {
  248. public:
  249. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSSTRING_IID)
  250. /* attribute AString data; */
  251. NS_IMETHOD GetData(nsAString & aData) = 0;
  252. NS_IMETHOD SetData(const nsAString & aData) = 0;
  253. /* wstring toString (); */
  254. NS_IMETHOD ToString(PRUnichar **_retval) = 0;
  255. };
  256. /* Use this macro when declaring classes that implement this interface. */
  257. #define NS_DECL_NSISUPPORTSSTRING \
  258. NS_IMETHOD GetData(nsAString & aData); \
  259. NS_IMETHOD SetData(const nsAString & aData); \
  260. NS_IMETHOD ToString(PRUnichar **_retval);
  261. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  262. #define NS_FORWARD_NSISUPPORTSSTRING(_to) \
  263. NS_IMETHOD GetData(nsAString & aData) { return _to GetData(aData); } \
  264. NS_IMETHOD SetData(const nsAString & aData) { return _to SetData(aData); } \
  265. NS_IMETHOD ToString(PRUnichar **_retval) { return _to ToString(_retval); }
  266. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  267. #define NS_FORWARD_SAFE_NSISUPPORTSSTRING(_to) \
  268. NS_IMETHOD GetData(nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  269. NS_IMETHOD SetData(const nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  270. NS_IMETHOD ToString(PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  271. #if 0
  272. /* Use the code below as a template for the implementation class for this interface. */
  273. /* Header file */
  274. class nsSupportsString : public nsISupportsString
  275. {
  276. public:
  277. NS_DECL_ISUPPORTS
  278. NS_DECL_NSISUPPORTSSTRING
  279. nsSupportsString();
  280. private:
  281. ~nsSupportsString();
  282. protected:
  283. /* additional members */
  284. };
  285. /* Implementation file */
  286. NS_IMPL_ISUPPORTS1(nsSupportsString, nsISupportsString)
  287. nsSupportsString::nsSupportsString()
  288. {
  289. /* member initializers and constructor code */
  290. }
  291. nsSupportsString::~nsSupportsString()
  292. {
  293. /* destructor code */
  294. }
  295. /* attribute AString data; */
  296. NS_IMETHODIMP nsSupportsString::GetData(nsAString & aData)
  297. {
  298. return NS_ERROR_NOT_IMPLEMENTED;
  299. }
  300. NS_IMETHODIMP nsSupportsString::SetData(const nsAString & aData)
  301. {
  302. return NS_ERROR_NOT_IMPLEMENTED;
  303. }
  304. /* wstring toString (); */
  305. NS_IMETHODIMP nsSupportsString::ToString(PRUnichar **_retval)
  306. {
  307. return NS_ERROR_NOT_IMPLEMENTED;
  308. }
  309. /* End of implementation class template. */
  310. #endif
  311. /* starting interface: nsISupportsPRBool */
  312. #define NS_ISUPPORTSPRBOOL_IID_STR "ddc3b490-4a1c-11d3-9890-006008962422"
  313. #define NS_ISUPPORTSPRBOOL_IID \
  314. {0xddc3b490, 0x4a1c, 0x11d3, \
  315. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  316. /**
  317. * The rest are truly primitive and are passed by value
  318. */
  319. /**
  320. * Scriptable storage for booleans
  321. *
  322. * @status FROZEN
  323. */
  324. class NS_NO_VTABLE nsISupportsPRBool : public nsISupportsPrimitive {
  325. public:
  326. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRBOOL_IID)
  327. /* attribute PRBool data; */
  328. NS_IMETHOD GetData(PRBool *aData) = 0;
  329. NS_IMETHOD SetData(PRBool aData) = 0;
  330. /* string toString (); */
  331. NS_IMETHOD ToString(char **_retval) = 0;
  332. };
  333. /* Use this macro when declaring classes that implement this interface. */
  334. #define NS_DECL_NSISUPPORTSPRBOOL \
  335. NS_IMETHOD GetData(PRBool *aData); \
  336. NS_IMETHOD SetData(PRBool aData); \
  337. NS_IMETHOD ToString(char **_retval);
  338. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  339. #define NS_FORWARD_NSISUPPORTSPRBOOL(_to) \
  340. NS_IMETHOD GetData(PRBool *aData) { return _to GetData(aData); } \
  341. NS_IMETHOD SetData(PRBool aData) { return _to SetData(aData); } \
  342. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  343. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  344. #define NS_FORWARD_SAFE_NSISUPPORTSPRBOOL(_to) \
  345. NS_IMETHOD GetData(PRBool *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  346. NS_IMETHOD SetData(PRBool aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  347. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  348. #if 0
  349. /* Use the code below as a template for the implementation class for this interface. */
  350. /* Header file */
  351. class nsSupportsPRBool : public nsISupportsPRBool
  352. {
  353. public:
  354. NS_DECL_ISUPPORTS
  355. NS_DECL_NSISUPPORTSPRBOOL
  356. nsSupportsPRBool();
  357. private:
  358. ~nsSupportsPRBool();
  359. protected:
  360. /* additional members */
  361. };
  362. /* Implementation file */
  363. NS_IMPL_ISUPPORTS1(nsSupportsPRBool, nsISupportsPRBool)
  364. nsSupportsPRBool::nsSupportsPRBool()
  365. {
  366. /* member initializers and constructor code */
  367. }
  368. nsSupportsPRBool::~nsSupportsPRBool()
  369. {
  370. /* destructor code */
  371. }
  372. /* attribute PRBool data; */
  373. NS_IMETHODIMP nsSupportsPRBool::GetData(PRBool *aData)
  374. {
  375. return NS_ERROR_NOT_IMPLEMENTED;
  376. }
  377. NS_IMETHODIMP nsSupportsPRBool::SetData(PRBool aData)
  378. {
  379. return NS_ERROR_NOT_IMPLEMENTED;
  380. }
  381. /* string toString (); */
  382. NS_IMETHODIMP nsSupportsPRBool::ToString(char **_retval)
  383. {
  384. return NS_ERROR_NOT_IMPLEMENTED;
  385. }
  386. /* End of implementation class template. */
  387. #endif
  388. /* starting interface: nsISupportsPRUint8 */
  389. #define NS_ISUPPORTSPRUINT8_IID_STR "dec2e4e0-4a1c-11d3-9890-006008962422"
  390. #define NS_ISUPPORTSPRUINT8_IID \
  391. {0xdec2e4e0, 0x4a1c, 0x11d3, \
  392. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  393. /**
  394. * Scriptable storage for 8-bit integers
  395. *
  396. * @status FROZEN
  397. */
  398. class NS_NO_VTABLE nsISupportsPRUint8 : public nsISupportsPrimitive {
  399. public:
  400. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRUINT8_IID)
  401. /* attribute PRUint8 data; */
  402. NS_IMETHOD GetData(PRUint8 *aData) = 0;
  403. NS_IMETHOD SetData(PRUint8 aData) = 0;
  404. /* string toString (); */
  405. NS_IMETHOD ToString(char **_retval) = 0;
  406. };
  407. /* Use this macro when declaring classes that implement this interface. */
  408. #define NS_DECL_NSISUPPORTSPRUINT8 \
  409. NS_IMETHOD GetData(PRUint8 *aData); \
  410. NS_IMETHOD SetData(PRUint8 aData); \
  411. NS_IMETHOD ToString(char **_retval);
  412. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  413. #define NS_FORWARD_NSISUPPORTSPRUINT8(_to) \
  414. NS_IMETHOD GetData(PRUint8 *aData) { return _to GetData(aData); } \
  415. NS_IMETHOD SetData(PRUint8 aData) { return _to SetData(aData); } \
  416. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  417. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  418. #define NS_FORWARD_SAFE_NSISUPPORTSPRUINT8(_to) \
  419. NS_IMETHOD GetData(PRUint8 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  420. NS_IMETHOD SetData(PRUint8 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  421. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  422. #if 0
  423. /* Use the code below as a template for the implementation class for this interface. */
  424. /* Header file */
  425. class nsSupportsPRUint8 : public nsISupportsPRUint8
  426. {
  427. public:
  428. NS_DECL_ISUPPORTS
  429. NS_DECL_NSISUPPORTSPRUINT8
  430. nsSupportsPRUint8();
  431. private:
  432. ~nsSupportsPRUint8();
  433. protected:
  434. /* additional members */
  435. };
  436. /* Implementation file */
  437. NS_IMPL_ISUPPORTS1(nsSupportsPRUint8, nsISupportsPRUint8)
  438. nsSupportsPRUint8::nsSupportsPRUint8()
  439. {
  440. /* member initializers and constructor code */
  441. }
  442. nsSupportsPRUint8::~nsSupportsPRUint8()
  443. {
  444. /* destructor code */
  445. }
  446. /* attribute PRUint8 data; */
  447. NS_IMETHODIMP nsSupportsPRUint8::GetData(PRUint8 *aData)
  448. {
  449. return NS_ERROR_NOT_IMPLEMENTED;
  450. }
  451. NS_IMETHODIMP nsSupportsPRUint8::SetData(PRUint8 aData)
  452. {
  453. return NS_ERROR_NOT_IMPLEMENTED;
  454. }
  455. /* string toString (); */
  456. NS_IMETHODIMP nsSupportsPRUint8::ToString(char **_retval)
  457. {
  458. return NS_ERROR_NOT_IMPLEMENTED;
  459. }
  460. /* End of implementation class template. */
  461. #endif
  462. /* starting interface: nsISupportsPRUint16 */
  463. #define NS_ISUPPORTSPRUINT16_IID_STR "dfacb090-4a1c-11d3-9890-006008962422"
  464. #define NS_ISUPPORTSPRUINT16_IID \
  465. {0xdfacb090, 0x4a1c, 0x11d3, \
  466. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  467. /**
  468. * Scriptable storage for unsigned 16-bit integers
  469. *
  470. * @status FROZEN
  471. */
  472. class NS_NO_VTABLE nsISupportsPRUint16 : public nsISupportsPrimitive {
  473. public:
  474. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRUINT16_IID)
  475. /* attribute PRUint16 data; */
  476. NS_IMETHOD GetData(PRUint16 *aData) = 0;
  477. NS_IMETHOD SetData(PRUint16 aData) = 0;
  478. /* string toString (); */
  479. NS_IMETHOD ToString(char **_retval) = 0;
  480. };
  481. /* Use this macro when declaring classes that implement this interface. */
  482. #define NS_DECL_NSISUPPORTSPRUINT16 \
  483. NS_IMETHOD GetData(PRUint16 *aData); \
  484. NS_IMETHOD SetData(PRUint16 aData); \
  485. NS_IMETHOD ToString(char **_retval);
  486. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  487. #define NS_FORWARD_NSISUPPORTSPRUINT16(_to) \
  488. NS_IMETHOD GetData(PRUint16 *aData) { return _to GetData(aData); } \
  489. NS_IMETHOD SetData(PRUint16 aData) { return _to SetData(aData); } \
  490. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  491. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  492. #define NS_FORWARD_SAFE_NSISUPPORTSPRUINT16(_to) \
  493. NS_IMETHOD GetData(PRUint16 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  494. NS_IMETHOD SetData(PRUint16 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  495. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  496. #if 0
  497. /* Use the code below as a template for the implementation class for this interface. */
  498. /* Header file */
  499. class nsSupportsPRUint16 : public nsISupportsPRUint16
  500. {
  501. public:
  502. NS_DECL_ISUPPORTS
  503. NS_DECL_NSISUPPORTSPRUINT16
  504. nsSupportsPRUint16();
  505. private:
  506. ~nsSupportsPRUint16();
  507. protected:
  508. /* additional members */
  509. };
  510. /* Implementation file */
  511. NS_IMPL_ISUPPORTS1(nsSupportsPRUint16, nsISupportsPRUint16)
  512. nsSupportsPRUint16::nsSupportsPRUint16()
  513. {
  514. /* member initializers and constructor code */
  515. }
  516. nsSupportsPRUint16::~nsSupportsPRUint16()
  517. {
  518. /* destructor code */
  519. }
  520. /* attribute PRUint16 data; */
  521. NS_IMETHODIMP nsSupportsPRUint16::GetData(PRUint16 *aData)
  522. {
  523. return NS_ERROR_NOT_IMPLEMENTED;
  524. }
  525. NS_IMETHODIMP nsSupportsPRUint16::SetData(PRUint16 aData)
  526. {
  527. return NS_ERROR_NOT_IMPLEMENTED;
  528. }
  529. /* string toString (); */
  530. NS_IMETHODIMP nsSupportsPRUint16::ToString(char **_retval)
  531. {
  532. return NS_ERROR_NOT_IMPLEMENTED;
  533. }
  534. /* End of implementation class template. */
  535. #endif
  536. /* starting interface: nsISupportsPRUint32 */
  537. #define NS_ISUPPORTSPRUINT32_IID_STR "e01dc470-4a1c-11d3-9890-006008962422"
  538. #define NS_ISUPPORTSPRUINT32_IID \
  539. {0xe01dc470, 0x4a1c, 0x11d3, \
  540. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  541. /**
  542. * Scriptable storage for unsigned 32-bit integers
  543. *
  544. * @status FROZEN
  545. */
  546. class NS_NO_VTABLE nsISupportsPRUint32 : public nsISupportsPrimitive {
  547. public:
  548. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRUINT32_IID)
  549. /* attribute PRUint32 data; */
  550. NS_IMETHOD GetData(PRUint32 *aData) = 0;
  551. NS_IMETHOD SetData(PRUint32 aData) = 0;
  552. /* string toString (); */
  553. NS_IMETHOD ToString(char **_retval) = 0;
  554. };
  555. /* Use this macro when declaring classes that implement this interface. */
  556. #define NS_DECL_NSISUPPORTSPRUINT32 \
  557. NS_IMETHOD GetData(PRUint32 *aData); \
  558. NS_IMETHOD SetData(PRUint32 aData); \
  559. NS_IMETHOD ToString(char **_retval);
  560. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  561. #define NS_FORWARD_NSISUPPORTSPRUINT32(_to) \
  562. NS_IMETHOD GetData(PRUint32 *aData) { return _to GetData(aData); } \
  563. NS_IMETHOD SetData(PRUint32 aData) { return _to SetData(aData); } \
  564. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  565. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  566. #define NS_FORWARD_SAFE_NSISUPPORTSPRUINT32(_to) \
  567. NS_IMETHOD GetData(PRUint32 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  568. NS_IMETHOD SetData(PRUint32 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  569. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  570. #if 0
  571. /* Use the code below as a template for the implementation class for this interface. */
  572. /* Header file */
  573. class nsSupportsPRUint32 : public nsISupportsPRUint32
  574. {
  575. public:
  576. NS_DECL_ISUPPORTS
  577. NS_DECL_NSISUPPORTSPRUINT32
  578. nsSupportsPRUint32();
  579. private:
  580. ~nsSupportsPRUint32();
  581. protected:
  582. /* additional members */
  583. };
  584. /* Implementation file */
  585. NS_IMPL_ISUPPORTS1(nsSupportsPRUint32, nsISupportsPRUint32)
  586. nsSupportsPRUint32::nsSupportsPRUint32()
  587. {
  588. /* member initializers and constructor code */
  589. }
  590. nsSupportsPRUint32::~nsSupportsPRUint32()
  591. {
  592. /* destructor code */
  593. }
  594. /* attribute PRUint32 data; */
  595. NS_IMETHODIMP nsSupportsPRUint32::GetData(PRUint32 *aData)
  596. {
  597. return NS_ERROR_NOT_IMPLEMENTED;
  598. }
  599. NS_IMETHODIMP nsSupportsPRUint32::SetData(PRUint32 aData)
  600. {
  601. return NS_ERROR_NOT_IMPLEMENTED;
  602. }
  603. /* string toString (); */
  604. NS_IMETHODIMP nsSupportsPRUint32::ToString(char **_retval)
  605. {
  606. return NS_ERROR_NOT_IMPLEMENTED;
  607. }
  608. /* End of implementation class template. */
  609. #endif
  610. /* starting interface: nsISupportsPRUint64 */
  611. #define NS_ISUPPORTSPRUINT64_IID_STR "e13567c0-4a1c-11d3-9890-006008962422"
  612. #define NS_ISUPPORTSPRUINT64_IID \
  613. {0xe13567c0, 0x4a1c, 0x11d3, \
  614. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  615. /**
  616. * Scriptable storage for 64-bit integers
  617. *
  618. * @status FROZEN
  619. */
  620. class NS_NO_VTABLE nsISupportsPRUint64 : public nsISupportsPrimitive {
  621. public:
  622. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRUINT64_IID)
  623. /* attribute PRUint64 data; */
  624. NS_IMETHOD GetData(PRUint64 *aData) = 0;
  625. NS_IMETHOD SetData(PRUint64 aData) = 0;
  626. /* string toString (); */
  627. NS_IMETHOD ToString(char **_retval) = 0;
  628. };
  629. /* Use this macro when declaring classes that implement this interface. */
  630. #define NS_DECL_NSISUPPORTSPRUINT64 \
  631. NS_IMETHOD GetData(PRUint64 *aData); \
  632. NS_IMETHOD SetData(PRUint64 aData); \
  633. NS_IMETHOD ToString(char **_retval);
  634. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  635. #define NS_FORWARD_NSISUPPORTSPRUINT64(_to) \
  636. NS_IMETHOD GetData(PRUint64 *aData) { return _to GetData(aData); } \
  637. NS_IMETHOD SetData(PRUint64 aData) { return _to SetData(aData); } \
  638. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  639. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  640. #define NS_FORWARD_SAFE_NSISUPPORTSPRUINT64(_to) \
  641. NS_IMETHOD GetData(PRUint64 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  642. NS_IMETHOD SetData(PRUint64 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  643. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  644. #if 0
  645. /* Use the code below as a template for the implementation class for this interface. */
  646. /* Header file */
  647. class nsSupportsPRUint64 : public nsISupportsPRUint64
  648. {
  649. public:
  650. NS_DECL_ISUPPORTS
  651. NS_DECL_NSISUPPORTSPRUINT64
  652. nsSupportsPRUint64();
  653. private:
  654. ~nsSupportsPRUint64();
  655. protected:
  656. /* additional members */
  657. };
  658. /* Implementation file */
  659. NS_IMPL_ISUPPORTS1(nsSupportsPRUint64, nsISupportsPRUint64)
  660. nsSupportsPRUint64::nsSupportsPRUint64()
  661. {
  662. /* member initializers and constructor code */
  663. }
  664. nsSupportsPRUint64::~nsSupportsPRUint64()
  665. {
  666. /* destructor code */
  667. }
  668. /* attribute PRUint64 data; */
  669. NS_IMETHODIMP nsSupportsPRUint64::GetData(PRUint64 *aData)
  670. {
  671. return NS_ERROR_NOT_IMPLEMENTED;
  672. }
  673. NS_IMETHODIMP nsSupportsPRUint64::SetData(PRUint64 aData)
  674. {
  675. return NS_ERROR_NOT_IMPLEMENTED;
  676. }
  677. /* string toString (); */
  678. NS_IMETHODIMP nsSupportsPRUint64::ToString(char **_retval)
  679. {
  680. return NS_ERROR_NOT_IMPLEMENTED;
  681. }
  682. /* End of implementation class template. */
  683. #endif
  684. /* starting interface: nsISupportsPRTime */
  685. #define NS_ISUPPORTSPRTIME_IID_STR "e2563630-4a1c-11d3-9890-006008962422"
  686. #define NS_ISUPPORTSPRTIME_IID \
  687. {0xe2563630, 0x4a1c, 0x11d3, \
  688. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  689. /**
  690. * Scriptable storage for NSPR date/time values
  691. *
  692. * @status FROZEN
  693. */
  694. class NS_NO_VTABLE nsISupportsPRTime : public nsISupportsPrimitive {
  695. public:
  696. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRTIME_IID)
  697. /* attribute PRTime data; */
  698. NS_IMETHOD GetData(PRTime *aData) = 0;
  699. NS_IMETHOD SetData(PRTime aData) = 0;
  700. /* string toString (); */
  701. NS_IMETHOD ToString(char **_retval) = 0;
  702. };
  703. /* Use this macro when declaring classes that implement this interface. */
  704. #define NS_DECL_NSISUPPORTSPRTIME \
  705. NS_IMETHOD GetData(PRTime *aData); \
  706. NS_IMETHOD SetData(PRTime aData); \
  707. NS_IMETHOD ToString(char **_retval);
  708. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  709. #define NS_FORWARD_NSISUPPORTSPRTIME(_to) \
  710. NS_IMETHOD GetData(PRTime *aData) { return _to GetData(aData); } \
  711. NS_IMETHOD SetData(PRTime aData) { return _to SetData(aData); } \
  712. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  713. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  714. #define NS_FORWARD_SAFE_NSISUPPORTSPRTIME(_to) \
  715. NS_IMETHOD GetData(PRTime *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  716. NS_IMETHOD SetData(PRTime aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  717. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  718. #if 0
  719. /* Use the code below as a template for the implementation class for this interface. */
  720. /* Header file */
  721. class nsSupportsPRTime : public nsISupportsPRTime
  722. {
  723. public:
  724. NS_DECL_ISUPPORTS
  725. NS_DECL_NSISUPPORTSPRTIME
  726. nsSupportsPRTime();
  727. private:
  728. ~nsSupportsPRTime();
  729. protected:
  730. /* additional members */
  731. };
  732. /* Implementation file */
  733. NS_IMPL_ISUPPORTS1(nsSupportsPRTime, nsISupportsPRTime)
  734. nsSupportsPRTime::nsSupportsPRTime()
  735. {
  736. /* member initializers and constructor code */
  737. }
  738. nsSupportsPRTime::~nsSupportsPRTime()
  739. {
  740. /* destructor code */
  741. }
  742. /* attribute PRTime data; */
  743. NS_IMETHODIMP nsSupportsPRTime::GetData(PRTime *aData)
  744. {
  745. return NS_ERROR_NOT_IMPLEMENTED;
  746. }
  747. NS_IMETHODIMP nsSupportsPRTime::SetData(PRTime aData)
  748. {
  749. return NS_ERROR_NOT_IMPLEMENTED;
  750. }
  751. /* string toString (); */
  752. NS_IMETHODIMP nsSupportsPRTime::ToString(char **_retval)
  753. {
  754. return NS_ERROR_NOT_IMPLEMENTED;
  755. }
  756. /* End of implementation class template. */
  757. #endif
  758. /* starting interface: nsISupportsChar */
  759. #define NS_ISUPPORTSCHAR_IID_STR "e2b05e40-4a1c-11d3-9890-006008962422"
  760. #define NS_ISUPPORTSCHAR_IID \
  761. {0xe2b05e40, 0x4a1c, 0x11d3, \
  762. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  763. /**
  764. * Scriptable storage for single character values
  765. * (often used to store an ASCII character)
  766. *
  767. * @status FROZEN
  768. */
  769. class NS_NO_VTABLE nsISupportsChar : public nsISupportsPrimitive {
  770. public:
  771. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSCHAR_IID)
  772. /* attribute char data; */
  773. NS_IMETHOD GetData(char *aData) = 0;
  774. NS_IMETHOD SetData(char aData) = 0;
  775. /* string toString (); */
  776. NS_IMETHOD ToString(char **_retval) = 0;
  777. };
  778. /* Use this macro when declaring classes that implement this interface. */
  779. #define NS_DECL_NSISUPPORTSCHAR \
  780. NS_IMETHOD GetData(char *aData); \
  781. NS_IMETHOD SetData(char aData); \
  782. NS_IMETHOD ToString(char **_retval);
  783. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  784. #define NS_FORWARD_NSISUPPORTSCHAR(_to) \
  785. NS_IMETHOD GetData(char *aData) { return _to GetData(aData); } \
  786. NS_IMETHOD SetData(char aData) { return _to SetData(aData); } \
  787. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  788. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  789. #define NS_FORWARD_SAFE_NSISUPPORTSCHAR(_to) \
  790. NS_IMETHOD GetData(char *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  791. NS_IMETHOD SetData(char aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  792. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  793. #if 0
  794. /* Use the code below as a template for the implementation class for this interface. */
  795. /* Header file */
  796. class nsSupportsChar : public nsISupportsChar
  797. {
  798. public:
  799. NS_DECL_ISUPPORTS
  800. NS_DECL_NSISUPPORTSCHAR
  801. nsSupportsChar();
  802. private:
  803. ~nsSupportsChar();
  804. protected:
  805. /* additional members */
  806. };
  807. /* Implementation file */
  808. NS_IMPL_ISUPPORTS1(nsSupportsChar, nsISupportsChar)
  809. nsSupportsChar::nsSupportsChar()
  810. {
  811. /* member initializers and constructor code */
  812. }
  813. nsSupportsChar::~nsSupportsChar()
  814. {
  815. /* destructor code */
  816. }
  817. /* attribute char data; */
  818. NS_IMETHODIMP nsSupportsChar::GetData(char *aData)
  819. {
  820. return NS_ERROR_NOT_IMPLEMENTED;
  821. }
  822. NS_IMETHODIMP nsSupportsChar::SetData(char aData)
  823. {
  824. return NS_ERROR_NOT_IMPLEMENTED;
  825. }
  826. /* string toString (); */
  827. NS_IMETHODIMP nsSupportsChar::ToString(char **_retval)
  828. {
  829. return NS_ERROR_NOT_IMPLEMENTED;
  830. }
  831. /* End of implementation class template. */
  832. #endif
  833. /* starting interface: nsISupportsPRInt16 */
  834. #define NS_ISUPPORTSPRINT16_IID_STR "e30d94b0-4a1c-11d3-9890-006008962422"
  835. #define NS_ISUPPORTSPRINT16_IID \
  836. {0xe30d94b0, 0x4a1c, 0x11d3, \
  837. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  838. /**
  839. * Scriptable storage for 16-bit integers
  840. *
  841. * @status FROZEN
  842. */
  843. class NS_NO_VTABLE nsISupportsPRInt16 : public nsISupportsPrimitive {
  844. public:
  845. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRINT16_IID)
  846. /* attribute PRInt16 data; */
  847. NS_IMETHOD GetData(PRInt16 *aData) = 0;
  848. NS_IMETHOD SetData(PRInt16 aData) = 0;
  849. /* string toString (); */
  850. NS_IMETHOD ToString(char **_retval) = 0;
  851. };
  852. /* Use this macro when declaring classes that implement this interface. */
  853. #define NS_DECL_NSISUPPORTSPRINT16 \
  854. NS_IMETHOD GetData(PRInt16 *aData); \
  855. NS_IMETHOD SetData(PRInt16 aData); \
  856. NS_IMETHOD ToString(char **_retval);
  857. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  858. #define NS_FORWARD_NSISUPPORTSPRINT16(_to) \
  859. NS_IMETHOD GetData(PRInt16 *aData) { return _to GetData(aData); } \
  860. NS_IMETHOD SetData(PRInt16 aData) { return _to SetData(aData); } \
  861. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  862. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  863. #define NS_FORWARD_SAFE_NSISUPPORTSPRINT16(_to) \
  864. NS_IMETHOD GetData(PRInt16 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  865. NS_IMETHOD SetData(PRInt16 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  866. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  867. #if 0
  868. /* Use the code below as a template for the implementation class for this interface. */
  869. /* Header file */
  870. class nsSupportsPRInt16 : public nsISupportsPRInt16
  871. {
  872. public:
  873. NS_DECL_ISUPPORTS
  874. NS_DECL_NSISUPPORTSPRINT16
  875. nsSupportsPRInt16();
  876. private:
  877. ~nsSupportsPRInt16();
  878. protected:
  879. /* additional members */
  880. };
  881. /* Implementation file */
  882. NS_IMPL_ISUPPORTS1(nsSupportsPRInt16, nsISupportsPRInt16)
  883. nsSupportsPRInt16::nsSupportsPRInt16()
  884. {
  885. /* member initializers and constructor code */
  886. }
  887. nsSupportsPRInt16::~nsSupportsPRInt16()
  888. {
  889. /* destructor code */
  890. }
  891. /* attribute PRInt16 data; */
  892. NS_IMETHODIMP nsSupportsPRInt16::GetData(PRInt16 *aData)
  893. {
  894. return NS_ERROR_NOT_IMPLEMENTED;
  895. }
  896. NS_IMETHODIMP nsSupportsPRInt16::SetData(PRInt16 aData)
  897. {
  898. return NS_ERROR_NOT_IMPLEMENTED;
  899. }
  900. /* string toString (); */
  901. NS_IMETHODIMP nsSupportsPRInt16::ToString(char **_retval)
  902. {
  903. return NS_ERROR_NOT_IMPLEMENTED;
  904. }
  905. /* End of implementation class template. */
  906. #endif
  907. /* starting interface: nsISupportsPRInt32 */
  908. #define NS_ISUPPORTSPRINT32_IID_STR "e36c5250-4a1c-11d3-9890-006008962422"
  909. #define NS_ISUPPORTSPRINT32_IID \
  910. {0xe36c5250, 0x4a1c, 0x11d3, \
  911. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  912. /**
  913. * Scriptable storage for 32-bit integers
  914. *
  915. * @status FROZEN
  916. */
  917. class NS_NO_VTABLE nsISupportsPRInt32 : public nsISupportsPrimitive {
  918. public:
  919. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRINT32_IID)
  920. /* attribute PRInt32 data; */
  921. NS_IMETHOD GetData(PRInt32 *aData) = 0;
  922. NS_IMETHOD SetData(PRInt32 aData) = 0;
  923. /* string toString (); */
  924. NS_IMETHOD ToString(char **_retval) = 0;
  925. };
  926. /* Use this macro when declaring classes that implement this interface. */
  927. #define NS_DECL_NSISUPPORTSPRINT32 \
  928. NS_IMETHOD GetData(PRInt32 *aData); \
  929. NS_IMETHOD SetData(PRInt32 aData); \
  930. NS_IMETHOD ToString(char **_retval);
  931. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  932. #define NS_FORWARD_NSISUPPORTSPRINT32(_to) \
  933. NS_IMETHOD GetData(PRInt32 *aData) { return _to GetData(aData); } \
  934. NS_IMETHOD SetData(PRInt32 aData) { return _to SetData(aData); } \
  935. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  936. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  937. #define NS_FORWARD_SAFE_NSISUPPORTSPRINT32(_to) \
  938. NS_IMETHOD GetData(PRInt32 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  939. NS_IMETHOD SetData(PRInt32 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  940. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  941. #if 0
  942. /* Use the code below as a template for the implementation class for this interface. */
  943. /* Header file */
  944. class nsSupportsPRInt32 : public nsISupportsPRInt32
  945. {
  946. public:
  947. NS_DECL_ISUPPORTS
  948. NS_DECL_NSISUPPORTSPRINT32
  949. nsSupportsPRInt32();
  950. private:
  951. ~nsSupportsPRInt32();
  952. protected:
  953. /* additional members */
  954. };
  955. /* Implementation file */
  956. NS_IMPL_ISUPPORTS1(nsSupportsPRInt32, nsISupportsPRInt32)
  957. nsSupportsPRInt32::nsSupportsPRInt32()
  958. {
  959. /* member initializers and constructor code */
  960. }
  961. nsSupportsPRInt32::~nsSupportsPRInt32()
  962. {
  963. /* destructor code */
  964. }
  965. /* attribute PRInt32 data; */
  966. NS_IMETHODIMP nsSupportsPRInt32::GetData(PRInt32 *aData)
  967. {
  968. return NS_ERROR_NOT_IMPLEMENTED;
  969. }
  970. NS_IMETHODIMP nsSupportsPRInt32::SetData(PRInt32 aData)
  971. {
  972. return NS_ERROR_NOT_IMPLEMENTED;
  973. }
  974. /* string toString (); */
  975. NS_IMETHODIMP nsSupportsPRInt32::ToString(char **_retval)
  976. {
  977. return NS_ERROR_NOT_IMPLEMENTED;
  978. }
  979. /* End of implementation class template. */
  980. #endif
  981. /* starting interface: nsISupportsPRInt64 */
  982. #define NS_ISUPPORTSPRINT64_IID_STR "e3cb0ff0-4a1c-11d3-9890-006008962422"
  983. #define NS_ISUPPORTSPRINT64_IID \
  984. {0xe3cb0ff0, 0x4a1c, 0x11d3, \
  985. { 0x98, 0x90, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  986. /**
  987. * Scriptable storage for 64-bit integers
  988. *
  989. * @status FROZEN
  990. */
  991. class NS_NO_VTABLE nsISupportsPRInt64 : public nsISupportsPrimitive {
  992. public:
  993. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSPRINT64_IID)
  994. /* attribute PRInt64 data; */
  995. NS_IMETHOD GetData(PRInt64 *aData) = 0;
  996. NS_IMETHOD SetData(PRInt64 aData) = 0;
  997. /* string toString (); */
  998. NS_IMETHOD ToString(char **_retval) = 0;
  999. };
  1000. /* Use this macro when declaring classes that implement this interface. */
  1001. #define NS_DECL_NSISUPPORTSPRINT64 \
  1002. NS_IMETHOD GetData(PRInt64 *aData); \
  1003. NS_IMETHOD SetData(PRInt64 aData); \
  1004. NS_IMETHOD ToString(char **_retval);
  1005. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  1006. #define NS_FORWARD_NSISUPPORTSPRINT64(_to) \
  1007. NS_IMETHOD GetData(PRInt64 *aData) { return _to GetData(aData); } \
  1008. NS_IMETHOD SetData(PRInt64 aData) { return _to SetData(aData); } \
  1009. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  1010. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  1011. #define NS_FORWARD_SAFE_NSISUPPORTSPRINT64(_to) \
  1012. NS_IMETHOD GetData(PRInt64 *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  1013. NS_IMETHOD SetData(PRInt64 aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  1014. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  1015. #if 0
  1016. /* Use the code below as a template for the implementation class for this interface. */
  1017. /* Header file */
  1018. class nsSupportsPRInt64 : public nsISupportsPRInt64
  1019. {
  1020. public:
  1021. NS_DECL_ISUPPORTS
  1022. NS_DECL_NSISUPPORTSPRINT64
  1023. nsSupportsPRInt64();
  1024. private:
  1025. ~nsSupportsPRInt64();
  1026. protected:
  1027. /* additional members */
  1028. };
  1029. /* Implementation file */
  1030. NS_IMPL_ISUPPORTS1(nsSupportsPRInt64, nsISupportsPRInt64)
  1031. nsSupportsPRInt64::nsSupportsPRInt64()
  1032. {
  1033. /* member initializers and constructor code */
  1034. }
  1035. nsSupportsPRInt64::~nsSupportsPRInt64()
  1036. {
  1037. /* destructor code */
  1038. }
  1039. /* attribute PRInt64 data; */
  1040. NS_IMETHODIMP nsSupportsPRInt64::GetData(PRInt64 *aData)
  1041. {
  1042. return NS_ERROR_NOT_IMPLEMENTED;
  1043. }
  1044. NS_IMETHODIMP nsSupportsPRInt64::SetData(PRInt64 aData)
  1045. {
  1046. return NS_ERROR_NOT_IMPLEMENTED;
  1047. }
  1048. /* string toString (); */
  1049. NS_IMETHODIMP nsSupportsPRInt64::ToString(char **_retval)
  1050. {
  1051. return NS_ERROR_NOT_IMPLEMENTED;
  1052. }
  1053. /* End of implementation class template. */
  1054. #endif
  1055. /* starting interface: nsISupportsFloat */
  1056. #define NS_ISUPPORTSFLOAT_IID_STR "abeaa390-4ac0-11d3-baea-00805f8a5dd7"
  1057. #define NS_ISUPPORTSFLOAT_IID \
  1058. {0xabeaa390, 0x4ac0, 0x11d3, \
  1059. { 0xba, 0xea, 0x00, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 }}
  1060. /**
  1061. * Scriptable storage for floating point numbers
  1062. *
  1063. * @status FROZEN
  1064. */
  1065. class NS_NO_VTABLE nsISupportsFloat : public nsISupportsPrimitive {
  1066. public:
  1067. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSFLOAT_IID)
  1068. /* attribute float data; */
  1069. NS_IMETHOD GetData(float *aData) = 0;
  1070. NS_IMETHOD SetData(float aData) = 0;
  1071. /* string toString (); */
  1072. NS_IMETHOD ToString(char **_retval) = 0;
  1073. };
  1074. /* Use this macro when declaring classes that implement this interface. */
  1075. #define NS_DECL_NSISUPPORTSFLOAT \
  1076. NS_IMETHOD GetData(float *aData); \
  1077. NS_IMETHOD SetData(float aData); \
  1078. NS_IMETHOD ToString(char **_retval);
  1079. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  1080. #define NS_FORWARD_NSISUPPORTSFLOAT(_to) \
  1081. NS_IMETHOD GetData(float *aData) { return _to GetData(aData); } \
  1082. NS_IMETHOD SetData(float aData) { return _to SetData(aData); } \
  1083. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  1084. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  1085. #define NS_FORWARD_SAFE_NSISUPPORTSFLOAT(_to) \
  1086. NS_IMETHOD GetData(float *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  1087. NS_IMETHOD SetData(float aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  1088. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  1089. #if 0
  1090. /* Use the code below as a template for the implementation class for this interface. */
  1091. /* Header file */
  1092. class nsSupportsFloat : public nsISupportsFloat
  1093. {
  1094. public:
  1095. NS_DECL_ISUPPORTS
  1096. NS_DECL_NSISUPPORTSFLOAT
  1097. nsSupportsFloat();
  1098. private:
  1099. ~nsSupportsFloat();
  1100. protected:
  1101. /* additional members */
  1102. };
  1103. /* Implementation file */
  1104. NS_IMPL_ISUPPORTS1(nsSupportsFloat, nsISupportsFloat)
  1105. nsSupportsFloat::nsSupportsFloat()
  1106. {
  1107. /* member initializers and constructor code */
  1108. }
  1109. nsSupportsFloat::~nsSupportsFloat()
  1110. {
  1111. /* destructor code */
  1112. }
  1113. /* attribute float data; */
  1114. NS_IMETHODIMP nsSupportsFloat::GetData(float *aData)
  1115. {
  1116. return NS_ERROR_NOT_IMPLEMENTED;
  1117. }
  1118. NS_IMETHODIMP nsSupportsFloat::SetData(float aData)
  1119. {
  1120. return NS_ERROR_NOT_IMPLEMENTED;
  1121. }
  1122. /* string toString (); */
  1123. NS_IMETHODIMP nsSupportsFloat::ToString(char **_retval)
  1124. {
  1125. return NS_ERROR_NOT_IMPLEMENTED;
  1126. }
  1127. /* End of implementation class template. */
  1128. #endif
  1129. /* starting interface: nsISupportsDouble */
  1130. #define NS_ISUPPORTSDOUBLE_IID_STR "b32523a0-4ac0-11d3-baea-00805f8a5dd7"
  1131. #define NS_ISUPPORTSDOUBLE_IID \
  1132. {0xb32523a0, 0x4ac0, 0x11d3, \
  1133. { 0xba, 0xea, 0x00, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 }}
  1134. /**
  1135. * Scriptable storage for doubles
  1136. *
  1137. * @status FROZEN
  1138. */
  1139. class NS_NO_VTABLE nsISupportsDouble : public nsISupportsPrimitive {
  1140. public:
  1141. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSDOUBLE_IID)
  1142. /* attribute double data; */
  1143. NS_IMETHOD GetData(double *aData) = 0;
  1144. NS_IMETHOD SetData(double aData) = 0;
  1145. /* string toString (); */
  1146. NS_IMETHOD ToString(char **_retval) = 0;
  1147. };
  1148. /* Use this macro when declaring classes that implement this interface. */
  1149. #define NS_DECL_NSISUPPORTSDOUBLE \
  1150. NS_IMETHOD GetData(double *aData); \
  1151. NS_IMETHOD SetData(double aData); \
  1152. NS_IMETHOD ToString(char **_retval);
  1153. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  1154. #define NS_FORWARD_NSISUPPORTSDOUBLE(_to) \
  1155. NS_IMETHOD GetData(double *aData) { return _to GetData(aData); } \
  1156. NS_IMETHOD SetData(double aData) { return _to SetData(aData); } \
  1157. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  1158. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  1159. #define NS_FORWARD_SAFE_NSISUPPORTSDOUBLE(_to) \
  1160. NS_IMETHOD GetData(double *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  1161. NS_IMETHOD SetData(double aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  1162. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  1163. #if 0
  1164. /* Use the code below as a template for the implementation class for this interface. */
  1165. /* Header file */
  1166. class nsSupportsDouble : public nsISupportsDouble
  1167. {
  1168. public:
  1169. NS_DECL_ISUPPORTS
  1170. NS_DECL_NSISUPPORTSDOUBLE
  1171. nsSupportsDouble();
  1172. private:
  1173. ~nsSupportsDouble();
  1174. protected:
  1175. /* additional members */
  1176. };
  1177. /* Implementation file */
  1178. NS_IMPL_ISUPPORTS1(nsSupportsDouble, nsISupportsDouble)
  1179. nsSupportsDouble::nsSupportsDouble()
  1180. {
  1181. /* member initializers and constructor code */
  1182. }
  1183. nsSupportsDouble::~nsSupportsDouble()
  1184. {
  1185. /* destructor code */
  1186. }
  1187. /* attribute double data; */
  1188. NS_IMETHODIMP nsSupportsDouble::GetData(double *aData)
  1189. {
  1190. return NS_ERROR_NOT_IMPLEMENTED;
  1191. }
  1192. NS_IMETHODIMP nsSupportsDouble::SetData(double aData)
  1193. {
  1194. return NS_ERROR_NOT_IMPLEMENTED;
  1195. }
  1196. /* string toString (); */
  1197. NS_IMETHODIMP nsSupportsDouble::ToString(char **_retval)
  1198. {
  1199. return NS_ERROR_NOT_IMPLEMENTED;
  1200. }
  1201. /* End of implementation class template. */
  1202. #endif
  1203. /* starting interface: nsISupportsVoid */
  1204. #define NS_ISUPPORTSVOID_IID_STR "464484f0-568d-11d3-baf8-00805f8a5dd7"
  1205. #define NS_ISUPPORTSVOID_IID \
  1206. {0x464484f0, 0x568d, 0x11d3, \
  1207. { 0xba, 0xf8, 0x00, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 }}
  1208. /**
  1209. * Scriptable storage for generic pointers
  1210. *
  1211. * @status FROZEN
  1212. */
  1213. class NS_NO_VTABLE nsISupportsVoid : public nsISupportsPrimitive {
  1214. public:
  1215. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSVOID_IID)
  1216. /* [noscript] attribute voidPtr data; */
  1217. NS_IMETHOD GetData(void * *aData) = 0;
  1218. NS_IMETHOD SetData(void * aData) = 0;
  1219. /* string toString (); */
  1220. NS_IMETHOD ToString(char **_retval) = 0;
  1221. };
  1222. /* Use this macro when declaring classes that implement this interface. */
  1223. #define NS_DECL_NSISUPPORTSVOID \
  1224. NS_IMETHOD GetData(void * *aData); \
  1225. NS_IMETHOD SetData(void * aData); \
  1226. NS_IMETHOD ToString(char **_retval);
  1227. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  1228. #define NS_FORWARD_NSISUPPORTSVOID(_to) \
  1229. NS_IMETHOD GetData(void * *aData) { return _to GetData(aData); } \
  1230. NS_IMETHOD SetData(void * aData) { return _to SetData(aData); } \
  1231. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  1232. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  1233. #define NS_FORWARD_SAFE_NSISUPPORTSVOID(_to) \
  1234. NS_IMETHOD GetData(void * *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  1235. NS_IMETHOD SetData(void * aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  1236. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  1237. #if 0
  1238. /* Use the code below as a template for the implementation class for this interface. */
  1239. /* Header file */
  1240. class nsSupportsVoid : public nsISupportsVoid
  1241. {
  1242. public:
  1243. NS_DECL_ISUPPORTS
  1244. NS_DECL_NSISUPPORTSVOID
  1245. nsSupportsVoid();
  1246. private:
  1247. ~nsSupportsVoid();
  1248. protected:
  1249. /* additional members */
  1250. };
  1251. /* Implementation file */
  1252. NS_IMPL_ISUPPORTS1(nsSupportsVoid, nsISupportsVoid)
  1253. nsSupportsVoid::nsSupportsVoid()
  1254. {
  1255. /* member initializers and constructor code */
  1256. }
  1257. nsSupportsVoid::~nsSupportsVoid()
  1258. {
  1259. /* destructor code */
  1260. }
  1261. /* [noscript] attribute voidPtr data; */
  1262. NS_IMETHODIMP nsSupportsVoid::GetData(void * *aData)
  1263. {
  1264. return NS_ERROR_NOT_IMPLEMENTED;
  1265. }
  1266. NS_IMETHODIMP nsSupportsVoid::SetData(void * aData)
  1267. {
  1268. return NS_ERROR_NOT_IMPLEMENTED;
  1269. }
  1270. /* string toString (); */
  1271. NS_IMETHODIMP nsSupportsVoid::ToString(char **_retval)
  1272. {
  1273. return NS_ERROR_NOT_IMPLEMENTED;
  1274. }
  1275. /* End of implementation class template. */
  1276. #endif
  1277. /* starting interface: nsISupportsInterfacePointer */
  1278. #define NS_ISUPPORTSINTERFACEPOINTER_IID_STR "995ea724-1dd1-11b2-9211-c21bdd3e7ed0"
  1279. #define NS_ISUPPORTSINTERFACEPOINTER_IID \
  1280. {0x995ea724, 0x1dd1, 0x11b2, \
  1281. { 0x92, 0x11, 0xc2, 0x1b, 0xdd, 0x3e, 0x7e, 0xd0 }}
  1282. /**
  1283. * Scriptable storage for other XPCOM objects
  1284. *
  1285. * @status FROZEN
  1286. */
  1287. class NS_NO_VTABLE nsISupportsInterfacePointer : public nsISupportsPrimitive {
  1288. public:
  1289. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTSINTERFACEPOINTER_IID)
  1290. /* attribute nsISupports data; */
  1291. NS_IMETHOD GetData(nsISupports * *aData) = 0;
  1292. NS_IMETHOD SetData(nsISupports * aData) = 0;
  1293. /* attribute nsIDPtr dataIID; */
  1294. NS_IMETHOD GetDataIID(nsID * *aDataIID) = 0;
  1295. NS_IMETHOD SetDataIID(const nsID * aDataIID) = 0;
  1296. /* string toString (); */
  1297. NS_IMETHOD ToString(char **_retval) = 0;
  1298. };
  1299. /* Use this macro when declaring classes that implement this interface. */
  1300. #define NS_DECL_NSISUPPORTSINTERFACEPOINTER \
  1301. NS_IMETHOD GetData(nsISupports * *aData); \
  1302. NS_IMETHOD SetData(nsISupports * aData); \
  1303. NS_IMETHOD GetDataIID(nsID * *aDataIID); \
  1304. NS_IMETHOD SetDataIID(const nsID * aDataIID); \
  1305. NS_IMETHOD ToString(char **_retval);
  1306. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  1307. #define NS_FORWARD_NSISUPPORTSINTERFACEPOINTER(_to) \
  1308. NS_IMETHOD GetData(nsISupports * *aData) { return _to GetData(aData); } \
  1309. NS_IMETHOD SetData(nsISupports * aData) { return _to SetData(aData); } \
  1310. NS_IMETHOD GetDataIID(nsID * *aDataIID) { return _to GetDataIID(aDataIID); } \
  1311. NS_IMETHOD SetDataIID(const nsID * aDataIID) { return _to SetDataIID(aDataIID); } \
  1312. NS_IMETHOD ToString(char **_retval) { return _to ToString(_retval); }
  1313. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  1314. #define NS_FORWARD_SAFE_NSISUPPORTSINTERFACEPOINTER(_to) \
  1315. NS_IMETHOD GetData(nsISupports * *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } \
  1316. NS_IMETHOD SetData(nsISupports * aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aData); } \
  1317. NS_IMETHOD GetDataIID(nsID * *aDataIID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDataIID(aDataIID); } \
  1318. NS_IMETHOD SetDataIID(const nsID * aDataIID) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDataIID(aDataIID); } \
  1319. NS_IMETHOD ToString(char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); }
  1320. #if 0
  1321. /* Use the code below as a template for the implementation class for this interface. */
  1322. /* Header file */
  1323. class nsSupportsInterfacePointer : public nsISupportsInterfacePointer
  1324. {
  1325. public:
  1326. NS_DECL_ISUPPORTS
  1327. NS_DECL_NSISUPPORTSINTERFACEPOINTER
  1328. nsSupportsInterfacePointer();
  1329. private:
  1330. ~nsSupportsInterfacePointer();
  1331. protected:
  1332. /* additional members */
  1333. };
  1334. /* Implementation file */
  1335. NS_IMPL_ISUPPORTS1(nsSupportsInterfacePointer, nsISupportsInterfacePointer)
  1336. nsSupportsInterfacePointer::nsSupportsInterfacePointer()
  1337. {
  1338. /* member initializers and constructor code */
  1339. }
  1340. nsSupportsInterfacePointer::~nsSupportsInterfacePointer()
  1341. {
  1342. /* destructor code */
  1343. }
  1344. /* attribute nsISupports data; */
  1345. NS_IMETHODIMP nsSupportsInterfacePointer::GetData(nsISupports * *aData)
  1346. {
  1347. return NS_ERROR_NOT_IMPLEMENTED;
  1348. }
  1349. NS_IMETHODIMP nsSupportsInterfacePointer::SetData(nsISupports * aData)
  1350. {
  1351. return NS_ERROR_NOT_IMPLEMENTED;
  1352. }
  1353. /* attribute nsIDPtr dataIID; */
  1354. NS_IMETHODIMP nsSupportsInterfacePointer::GetDataIID(nsID * *aDataIID)
  1355. {
  1356. return NS_ERROR_NOT_IMPLEMENTED;
  1357. }
  1358. NS_IMETHODIMP nsSupportsInterfacePointer::SetDataIID(const nsID * aDataIID)
  1359. {
  1360. return NS_ERROR_NOT_IMPLEMENTED;
  1361. }
  1362. /* string toString (); */
  1363. NS_IMETHODIMP nsSupportsInterfacePointer::ToString(char **_retval)
  1364. {
  1365. return NS_ERROR_NOT_IMPLEMENTED;
  1366. }
  1367. /* End of implementation class template. */
  1368. #endif
  1369. #endif /* __gen_nsISupportsPrimitives_h__ */