PageRenderTime 102ms CodeModel.GetById 60ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 1ms

/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
  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
 17class 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 */
 34class NS_NO_VTABLE NS_SCRIPTABLE nsIFileURL : public nsIURL {
 35 public: 
 36
 37  NS_DECLARE_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_SCRIPTABLE NS_IMETHOD GetFile(nsIFile * *aFile) = 0;
 51  NS_SCRIPTABLE NS_IMETHOD SetFile(nsIFile * aFile) = 0;
 52
 53};
 54
 55  NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileURL, NS_IFILEURL_IID)
 56
 57/* Use this macro when declaring classes that implement this interface. */
 58#define NS_DECL_NSIFILEURL \
 59  NS_SCRIPTABLE NS_IMETHOD GetFile(nsIFile * *aFile); \
 60  NS_SCRIPTABLE NS_IMETHOD SetFile(nsIFile * aFile); 
 61
 62/* Use this macro to declare functions that forward the behavior of this interface to another object. */
 63#define NS_FORWARD_NSIFILEURL(_to) \
 64  NS_SCRIPTABLE NS_IMETHOD GetFile(nsIFile * *aFile) { return _to GetFile(aFile); } \
 65  NS_SCRIPTABLE NS_IMETHOD SetFile(nsIFile * aFile) { return _to SetFile(aFile); } 
 66
 67/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 68#define NS_FORWARD_SAFE_NSIFILEURL(_to) \
 69  NS_SCRIPTABLE NS_IMETHOD GetFile(nsIFile * *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(aFile); } \
 70  NS_SCRIPTABLE NS_IMETHOD SetFile(nsIFile * aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFile(aFile); } 
 71
 72#if 0
 73/* Use the code below as a template for the implementation class for this interface. */
 74
 75/* Header file */
 76class nsFileURL : public nsIFileURL
 77{
 78public:
 79  NS_DECL_ISUPPORTS
 80  NS_DECL_NSIFILEURL
 81
 82  nsFileURL();
 83
 84private:
 85  ~nsFileURL();
 86
 87protected:
 88  /* additional members */
 89};
 90
 91/* Implementation file */
 92NS_IMPL_ISUPPORTS1(nsFileURL, nsIFileURL)
 93
 94nsFileURL::nsFileURL()
 95{
 96  /* member initializers and constructor code */
 97}
 98
 99nsFileURL::~nsFileURL()
100{
101  /* destructor code */
102}
103
104/* attribute nsIFile file; */
105NS_IMETHODIMP nsFileURL::GetFile(nsIFile * *aFile)
106{
107    return NS_ERROR_NOT_IMPLEMENTED;
108}
109NS_IMETHODIMP nsFileURL::SetFile(nsIFile * aFile)
110{
111    return NS_ERROR_NOT_IMPLEMENTED;
112}
113
114/* End of implementation class template. */
115#endif
116
117
118#endif /* __gen_nsIFileURL_h__ */