OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0
-Release/WINNT_5.2_Depend/mozilla/netwerk/base/public/nsIFileURL.idl |
| 3 */ |
| 4 |
| 5 #ifndef __gen_nsIFileURL_h__ |
| 6 #define __gen_nsIFileURL_h__ |
| 7 |
| 8 |
| 9 #ifndef __gen_nsIURL_h__ |
| 10 #include "nsIURL.h" |
| 11 #endif |
| 12 |
| 13 /* For IDL files that don't want to include root IDL files. */ |
| 14 #ifndef NS_NO_VTABLE |
| 15 #define NS_NO_VTABLE |
| 16 #endif |
| 17 class nsIFile; /* forward declaration */ |
| 18 |
| 19 |
| 20 /* starting interface: nsIFileURL */ |
| 21 #define NS_IFILEURL_IID_STR "d26b2e2e-1dd1-11b2-88f3-8545a7ba7949" |
| 22 |
| 23 #define NS_IFILEURL_IID \ |
| 24 {0xd26b2e2e, 0x1dd1, 0x11b2, \ |
| 25 { 0x88, 0xf3, 0x85, 0x45, 0xa7, 0xba, 0x79, 0x49 }} |
| 26 |
| 27 /** |
| 28 * nsIFileURL provides access to the underlying nsIFile object corresponding to |
| 29 * an URL. The URL scheme need not be file:, since other local protocols may |
| 30 * map URLs to files (e.g., resource:). |
| 31 * |
| 32 * @status FROZEN |
| 33 */ |
| 34 class NS_NO_VTABLE nsIFileURL : public nsIURL { |
| 35 public: |
| 36 |
| 37 NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFILEURL_IID) |
| 38 |
| 39 /** |
| 40 * Get/Set nsIFile corresponding to this URL. |
| 41 * |
| 42 * - Getter returns a reference to an immutable object. Callers must clone |
| 43 * before attempting to modify the returned nsIFile object. NOTE: this |
| 44 * constraint might not be enforced at runtime, so beware!! |
| 45 * |
| 46 * - Setter clones the nsIFile object (allowing the caller to safely modify |
| 47 * the nsIFile object after setting it on this interface). |
| 48 */ |
| 49 /* attribute nsIFile file; */ |
| 50 NS_IMETHOD GetFile(nsIFile * *aFile) = 0; |
| 51 NS_IMETHOD SetFile(nsIFile * aFile) = 0; |
| 52 |
| 53 }; |
| 54 |
| 55 /* Use this macro when declaring classes that implement this interface. */ |
| 56 #define NS_DECL_NSIFILEURL \ |
| 57 NS_IMETHOD GetFile(nsIFile * *aFile); \ |
| 58 NS_IMETHOD SetFile(nsIFile * aFile); |
| 59 |
| 60 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object. */ |
| 61 #define NS_FORWARD_NSIFILEURL(_to) \ |
| 62 NS_IMETHOD GetFile(nsIFile * *aFile) { return _to GetFile(aFile); } \ |
| 63 NS_IMETHOD SetFile(nsIFile * aFile) { return _to SetFile(aFile); } |
| 64 |
| 65 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object in a safe way. */ |
| 66 #define NS_FORWARD_SAFE_NSIFILEURL(_to) \ |
| 67 NS_IMETHOD GetFile(nsIFile * *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _
to->GetFile(aFile); } \ |
| 68 NS_IMETHOD SetFile(nsIFile * aFile) { return !_to ? NS_ERROR_NULL_POINTER : _t
o->SetFile(aFile); } |
| 69 |
| 70 #if 0 |
| 71 /* Use the code below as a template for the implementation class for this interf
ace. */ |
| 72 |
| 73 /* Header file */ |
| 74 class nsFileURL : public nsIFileURL |
| 75 { |
| 76 public: |
| 77 NS_DECL_ISUPPORTS |
| 78 NS_DECL_NSIFILEURL |
| 79 |
| 80 nsFileURL(); |
| 81 |
| 82 private: |
| 83 ~nsFileURL(); |
| 84 |
| 85 protected: |
| 86 /* additional members */ |
| 87 }; |
| 88 |
| 89 /* Implementation file */ |
| 90 NS_IMPL_ISUPPORTS1(nsFileURL, nsIFileURL) |
| 91 |
| 92 nsFileURL::nsFileURL() |
| 93 { |
| 94 /* member initializers and constructor code */ |
| 95 } |
| 96 |
| 97 nsFileURL::~nsFileURL() |
| 98 { |
| 99 /* destructor code */ |
| 100 } |
| 101 |
| 102 /* attribute nsIFile file; */ |
| 103 NS_IMETHODIMP nsFileURL::GetFile(nsIFile * *aFile) |
| 104 { |
| 105 return NS_ERROR_NOT_IMPLEMENTED; |
| 106 } |
| 107 NS_IMETHODIMP nsFileURL::SetFile(nsIFile * aFile) |
| 108 { |
| 109 return NS_ERROR_NOT_IMPLEMENTED; |
| 110 } |
| 111 |
| 112 /* End of implementation class template. */ |
| 113 #endif |
| 114 |
| 115 |
| 116 #endif /* __gen_nsIFileURL_h__ */ |
OLD | NEW |