PageRenderTime 25ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/gecko_api/include/nsIFileURL.h

http://firefox-mac-pdf.googlecode.com/
C Header | 118 lines | 57 code | 27 blank | 34 comment | 0 complexity | 6d3d1d5fbe5ce47700ebefcffed813e4 MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/netwerk/base/public/nsIFileURL.idl
  3. */
  4. #ifndef __gen_nsIFileURL_h__
  5. #define __gen_nsIFileURL_h__
  6. #ifndef __gen_nsIURL_h__
  7. #include "nsIURL.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. class nsIFile; /* forward declaration */
  14. /* starting interface: nsIFileURL */
  15. #define NS_IFILEURL_IID_STR "d26b2e2e-1dd1-11b2-88f3-8545a7ba7949"
  16. #define NS_IFILEURL_IID \
  17. {0xd26b2e2e, 0x1dd1, 0x11b2, \
  18. { 0x88, 0xf3, 0x85, 0x45, 0xa7, 0xba, 0x79, 0x49 }}
  19. /**
  20. * nsIFileURL provides access to the underlying nsIFile object corresponding to
  21. * an URL. The URL scheme need not be file:, since other local protocols may
  22. * map URLs to files (e.g., resource:).
  23. *
  24. * @status FROZEN
  25. */
  26. class NS_NO_VTABLE NS_SCRIPTABLE nsIFileURL : public nsIURL {
  27. public:
  28. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFILEURL_IID)
  29. /**
  30. * Get/Set nsIFile corresponding to this URL.
  31. *
  32. * - Getter returns a reference to an immutable object. Callers must clone
  33. * before attempting to modify the returned nsIFile object. NOTE: this
  34. * constraint might not be enforced at runtime, so beware!!
  35. *
  36. * - Setter clones the nsIFile object (allowing the caller to safely modify
  37. * the nsIFile object after setting it on this interface).
  38. */
  39. /* attribute nsIFile file; */
  40. NS_SCRIPTABLE NS_IMETHOD GetFile(nsIFile * *aFile) = 0;
  41. NS_SCRIPTABLE NS_IMETHOD SetFile(nsIFile * aFile) = 0;
  42. };
  43. NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileURL, NS_IFILEURL_IID)
  44. /* Use this macro when declaring classes that implement this interface. */
  45. #define NS_DECL_NSIFILEURL \
  46. NS_SCRIPTABLE NS_IMETHOD GetFile(nsIFile * *aFile); \
  47. NS_SCRIPTABLE NS_IMETHOD SetFile(nsIFile * aFile);
  48. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  49. #define NS_FORWARD_NSIFILEURL(_to) \
  50. NS_SCRIPTABLE NS_IMETHOD GetFile(nsIFile * *aFile) { return _to GetFile(aFile); } \
  51. NS_SCRIPTABLE NS_IMETHOD SetFile(nsIFile * aFile) { return _to SetFile(aFile); }
  52. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  53. #define NS_FORWARD_SAFE_NSIFILEURL(_to) \
  54. NS_SCRIPTABLE NS_IMETHOD GetFile(nsIFile * *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(aFile); } \
  55. NS_SCRIPTABLE NS_IMETHOD SetFile(nsIFile * aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFile(aFile); }
  56. #if 0
  57. /* Use the code below as a template for the implementation class for this interface. */
  58. /* Header file */
  59. class nsFileURL : public nsIFileURL
  60. {
  61. public:
  62. NS_DECL_ISUPPORTS
  63. NS_DECL_NSIFILEURL
  64. nsFileURL();
  65. private:
  66. ~nsFileURL();
  67. protected:
  68. /* additional members */
  69. };
  70. /* Implementation file */
  71. NS_IMPL_ISUPPORTS1(nsFileURL, nsIFileURL)
  72. nsFileURL::nsFileURL()
  73. {
  74. /* member initializers and constructor code */
  75. }
  76. nsFileURL::~nsFileURL()
  77. {
  78. /* destructor code */
  79. }
  80. /* attribute nsIFile file; */
  81. NS_IMETHODIMP nsFileURL::GetFile(nsIFile * *aFile)
  82. {
  83. return NS_ERROR_NOT_IMPLEMENTED;
  84. }
  85. NS_IMETHODIMP nsFileURL::SetFile(nsIFile * aFile)
  86. {
  87. return NS_ERROR_NOT_IMPLEMENTED;
  88. }
  89. /* End of implementation class template. */
  90. #endif
  91. #endif /* __gen_nsIFileURL_h__ */