nsIFileURL.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/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 nsIFileURL : public nsIURL {
  27. public:
  28. NS_DEFINE_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_IMETHOD GetFile(nsIFile * *aFile) = 0;
  41. NS_IMETHOD SetFile(nsIFile * aFile) = 0;
  42. };
  43. /* Use this macro when declaring classes that implement this interface. */
  44. #define NS_DECL_NSIFILEURL \
  45. NS_IMETHOD GetFile(nsIFile * *aFile); \
  46. NS_IMETHOD SetFile(nsIFile * aFile);
  47. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  48. #define NS_FORWARD_NSIFILEURL(_to) \
  49. NS_IMETHOD GetFile(nsIFile * *aFile) { return _to GetFile(aFile); } \
  50. NS_IMETHOD SetFile(nsIFile * aFile) { return _to SetFile(aFile); }
  51. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  52. #define NS_FORWARD_SAFE_NSIFILEURL(_to) \
  53. NS_IMETHOD GetFile(nsIFile * *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(aFile); } \
  54. NS_IMETHOD SetFile(nsIFile * aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFile(aFile); }
  55. #if 0
  56. /* Use the code below as a template for the implementation class for this interface. */
  57. /* Header file */
  58. class nsFileURL : public nsIFileURL
  59. {
  60. public:
  61. NS_DECL_ISUPPORTS
  62. NS_DECL_NSIFILEURL
  63. nsFileURL();
  64. private:
  65. ~nsFileURL();
  66. protected:
  67. /* additional members */
  68. };
  69. /* Implementation file */
  70. NS_IMPL_ISUPPORTS1(nsFileURL, nsIFileURL)
  71. nsFileURL::nsFileURL()
  72. {
  73. /* member initializers and constructor code */
  74. }
  75. nsFileURL::~nsFileURL()
  76. {
  77. /* destructor code */
  78. }
  79. /* attribute nsIFile file; */
  80. NS_IMETHODIMP nsFileURL::GetFile(nsIFile * *aFile)
  81. {
  82. return NS_ERROR_NOT_IMPLEMENTED;
  83. }
  84. NS_IMETHODIMP nsFileURL::SetFile(nsIFile * aFile)
  85. {
  86. return NS_ERROR_NOT_IMPLEMENTED;
  87. }
  88. /* End of implementation class template. */
  89. #endif
  90. #endif /* __gen_nsIFileURL_h__ */