mozIJSSubScriptLoader.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/js/src/xpconnect/idl/mozIJSSubScriptLoader.idl
  3. */
  4. #ifndef __gen_mozIJSSubScriptLoader_h__
  5. #define __gen_mozIJSSubScriptLoader_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: mozIJSSubScriptLoader */
  14. #define MOZIJSSUBSCRIPTLOADER_IID_STR "8792d77e-1dd2-11b2-ac7f-9bc9be4f2916"
  15. #define MOZIJSSUBSCRIPTLOADER_IID \
  16. {0x8792d77e, 0x1dd2, 0x11b2, \
  17. { 0xac, 0x7f, 0x9b, 0xc9, 0xbe, 0x4f, 0x29, 0x16 }}
  18. class NS_NO_VTABLE mozIJSSubScriptLoader : public nsISupports {
  19. public:
  20. NS_DEFINE_STATIC_IID_ACCESSOR(MOZIJSSUBSCRIPTLOADER_IID)
  21. /**
  22. * This method should only be called from JS!
  23. * In JS, the signature looks like:
  24. * rv loadSubScript (url [, obj]);
  25. * @param url the url if the sub-script, it MUST be either a file:,
  26. * resource:, or chrome: url, and MUST be local.
  27. * @param obj an optional object to evaluate the script onto, it
  28. * defaults to the global object of the caller.
  29. * @retval rv the value returned by the sub-script
  30. */
  31. /* void loadSubScript (in wstring url); */
  32. NS_IMETHOD LoadSubScript(const PRUnichar *url) = 0;
  33. };
  34. /* Use this macro when declaring classes that implement this interface. */
  35. #define NS_DECL_MOZIJSSUBSCRIPTLOADER \
  36. NS_IMETHOD LoadSubScript(const PRUnichar *url);
  37. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  38. #define NS_FORWARD_MOZIJSSUBSCRIPTLOADER(_to) \
  39. NS_IMETHOD LoadSubScript(const PRUnichar *url) { return _to LoadSubScript(url); }
  40. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  41. #define NS_FORWARD_SAFE_MOZIJSSUBSCRIPTLOADER(_to) \
  42. NS_IMETHOD LoadSubScript(const PRUnichar *url) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadSubScript(url); }
  43. #if 0
  44. /* Use the code below as a template for the implementation class for this interface. */
  45. /* Header file */
  46. class _MYCLASS_ : public mozIJSSubScriptLoader
  47. {
  48. public:
  49. NS_DECL_ISUPPORTS
  50. NS_DECL_MOZIJSSUBSCRIPTLOADER
  51. _MYCLASS_();
  52. private:
  53. ~_MYCLASS_();
  54. protected:
  55. /* additional members */
  56. };
  57. /* Implementation file */
  58. NS_IMPL_ISUPPORTS1(_MYCLASS_, mozIJSSubScriptLoader)
  59. _MYCLASS_::_MYCLASS_()
  60. {
  61. /* member initializers and constructor code */
  62. }
  63. _MYCLASS_::~_MYCLASS_()
  64. {
  65. /* destructor code */
  66. }
  67. /* void loadSubScript (in wstring url); */
  68. NS_IMETHODIMP _MYCLASS_::LoadSubScript(const PRUnichar *url)
  69. {
  70. return NS_ERROR_NOT_IMPLEMENTED;
  71. }
  72. /* End of implementation class template. */
  73. #endif
  74. #endif /* __gen_mozIJSSubScriptLoader_h__ */