1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/modules/libpref/public/nsIRelativeFilePref.idl
3 : */
4 :
5 : #ifndef __gen_nsIRelativeFilePref_h__
6 : #define __gen_nsIRelativeFilePref_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.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 nsILocalFile; /* forward declaration */
18 :
19 :
20 : /* starting interface: nsIRelativeFilePref */
21 : #define NS_IRELATIVEFILEPREF_IID_STR "2f977d4e-5485-11d4-87e2-0010a4e75ef2"
22 :
23 : #define NS_IRELATIVEFILEPREF_IID \
24 : {0x2f977d4e, 0x5485, 0x11d4, \
25 : { 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 }}
26 :
27 0 : class NS_NO_VTABLE NS_SCRIPTABLE nsIRelativeFilePref : public nsISupports {
28 : public:
29 :
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IRELATIVEFILEPREF_IID)
31 :
32 : /* attribute nsILocalFile file; */
33 : NS_SCRIPTABLE NS_IMETHOD GetFile(nsILocalFile * *aFile) = 0;
34 : NS_SCRIPTABLE NS_IMETHOD SetFile(nsILocalFile *aFile) = 0;
35 :
36 : /* attribute ACString relativeToKey; */
37 : NS_SCRIPTABLE NS_IMETHOD GetRelativeToKey(nsACString & aRelativeToKey) = 0;
38 : NS_SCRIPTABLE NS_IMETHOD SetRelativeToKey(const nsACString & aRelativeToKey) = 0;
39 :
40 : };
41 :
42 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIRelativeFilePref, NS_IRELATIVEFILEPREF_IID)
43 :
44 : /* Use this macro when declaring classes that implement this interface. */
45 : #define NS_DECL_NSIRELATIVEFILEPREF \
46 : NS_SCRIPTABLE NS_IMETHOD GetFile(nsILocalFile * *aFile); \
47 : NS_SCRIPTABLE NS_IMETHOD SetFile(nsILocalFile *aFile); \
48 : NS_SCRIPTABLE NS_IMETHOD GetRelativeToKey(nsACString & aRelativeToKey); \
49 : NS_SCRIPTABLE NS_IMETHOD SetRelativeToKey(const nsACString & aRelativeToKey);
50 :
51 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
52 : #define NS_FORWARD_NSIRELATIVEFILEPREF(_to) \
53 : NS_SCRIPTABLE NS_IMETHOD GetFile(nsILocalFile * *aFile) { return _to GetFile(aFile); } \
54 : NS_SCRIPTABLE NS_IMETHOD SetFile(nsILocalFile *aFile) { return _to SetFile(aFile); } \
55 : NS_SCRIPTABLE NS_IMETHOD GetRelativeToKey(nsACString & aRelativeToKey) { return _to GetRelativeToKey(aRelativeToKey); } \
56 : NS_SCRIPTABLE NS_IMETHOD SetRelativeToKey(const nsACString & aRelativeToKey) { return _to SetRelativeToKey(aRelativeToKey); }
57 :
58 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
59 : #define NS_FORWARD_SAFE_NSIRELATIVEFILEPREF(_to) \
60 : NS_SCRIPTABLE NS_IMETHOD GetFile(nsILocalFile * *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(aFile); } \
61 : NS_SCRIPTABLE NS_IMETHOD SetFile(nsILocalFile *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFile(aFile); } \
62 : NS_SCRIPTABLE NS_IMETHOD GetRelativeToKey(nsACString & aRelativeToKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRelativeToKey(aRelativeToKey); } \
63 : NS_SCRIPTABLE NS_IMETHOD SetRelativeToKey(const nsACString & aRelativeToKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRelativeToKey(aRelativeToKey); }
64 :
65 : #if 0
66 : /* Use the code below as a template for the implementation class for this interface. */
67 :
68 : /* Header file */
69 : class nsRelativeFilePref : public nsIRelativeFilePref
70 : {
71 : public:
72 : NS_DECL_ISUPPORTS
73 : NS_DECL_NSIRELATIVEFILEPREF
74 :
75 : nsRelativeFilePref();
76 :
77 : private:
78 : ~nsRelativeFilePref();
79 :
80 : protected:
81 : /* additional members */
82 : };
83 :
84 : /* Implementation file */
85 : NS_IMPL_ISUPPORTS1(nsRelativeFilePref, nsIRelativeFilePref)
86 :
87 : nsRelativeFilePref::nsRelativeFilePref()
88 : {
89 : /* member initializers and constructor code */
90 : }
91 :
92 : nsRelativeFilePref::~nsRelativeFilePref()
93 : {
94 : /* destructor code */
95 : }
96 :
97 : /* attribute nsILocalFile file; */
98 : NS_IMETHODIMP nsRelativeFilePref::GetFile(nsILocalFile * *aFile)
99 : {
100 : return NS_ERROR_NOT_IMPLEMENTED;
101 : }
102 : NS_IMETHODIMP nsRelativeFilePref::SetFile(nsILocalFile *aFile)
103 : {
104 : return NS_ERROR_NOT_IMPLEMENTED;
105 : }
106 :
107 : /* attribute ACString relativeToKey; */
108 : NS_IMETHODIMP nsRelativeFilePref::GetRelativeToKey(nsACString & aRelativeToKey)
109 : {
110 : return NS_ERROR_NOT_IMPLEMENTED;
111 : }
112 : NS_IMETHODIMP nsRelativeFilePref::SetRelativeToKey(const nsACString & aRelativeToKey)
113 : {
114 : return NS_ERROR_NOT_IMPLEMENTED;
115 : }
116 :
117 : /* End of implementation class template. */
118 : #endif
119 :
120 :
121 : #define NS_RELATIVEFILEPREF_CID \
122 : { /* {2f977d4f-5485-11d4-87e2-0010a4e75ef2} */ \
123 : 0x2f977d4f, \
124 : 0x5485, \
125 : 0x11d4, \
126 : { 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 } \
127 : }
128 : #define NS_RELATIVEFILEPREF_CONTRACTID "@mozilla.org/pref-relativefile;1"
129 : #define NS_RELATIVEFILEPREF_CLASSNAME "Relative File Pref"
130 : #include "nsComponentManagerUtils.h"
131 : inline nsresult
132 0 : NS_NewRelativeFilePref(nsILocalFile* aFile, const nsACString& relativeToKey, nsIRelativeFilePref** result)
133 : {
134 : nsresult rv;
135 0 : nsCOMPtr<nsIRelativeFilePref> local(do_CreateInstance(NS_RELATIVEFILEPREF_CONTRACTID, &rv));
136 0 : if (NS_FAILED(rv)) return rv;
137 :
138 0 : (void)local->SetFile(aFile);
139 0 : (void)local->SetRelativeToKey(relativeToKey);
140 0 : *result = local;
141 0 : NS_ADDREF(*result);
142 0 : return NS_OK;
143 : }
144 :
145 : #endif /* __gen_nsIRelativeFilePref_h__ */
|