1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/dom/indexedDB/nsIIDBObjectStore.idl
3 : */
4 :
5 : #ifndef __gen_nsIIDBObjectStore_h__
6 : #define __gen_nsIIDBObjectStore_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : #include "jspubtd.h"
14 :
15 : /* For IDL files that don't want to include root IDL files. */
16 : #ifndef NS_NO_VTABLE
17 : #define NS_NO_VTABLE
18 : #endif
19 : class nsIIDBIndex; /* forward declaration */
20 :
21 : class nsIIDBKeyRange; /* forward declaration */
22 :
23 : class nsIIDBRequest; /* forward declaration */
24 :
25 : class nsIIDBTransaction; /* forward declaration */
26 :
27 : class nsIDOMDOMStringList; /* forward declaration */
28 :
29 :
30 : /* starting interface: nsIIDBObjectStore */
31 : #define NS_IIDBOBJECTSTORE_IID_STR "43157a3c-bed1-4ce7-98c0-11365b852560"
32 :
33 : #define NS_IIDBOBJECTSTORE_IID \
34 : {0x43157a3c, 0xbed1, 0x4ce7, \
35 : { 0x98, 0xc0, 0x11, 0x36, 0x5b, 0x85, 0x25, 0x60 }}
36 :
37 667 : class NS_NO_VTABLE NS_SCRIPTABLE nsIIDBObjectStore : public nsISupports {
38 : public:
39 :
40 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIDBOBJECTSTORE_IID)
41 :
42 : /* readonly attribute DOMString name; */
43 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) = 0;
44 :
45 : /* [implicit_jscontext] readonly attribute jsval keyPath; */
46 : NS_SCRIPTABLE NS_IMETHOD GetKeyPath(JSContext* cx, JS::Value *aKeyPath) = 0;
47 :
48 : /* readonly attribute nsIDOMDOMStringList indexNames; */
49 : NS_SCRIPTABLE NS_IMETHOD GetIndexNames(nsIDOMDOMStringList * *aIndexNames) = 0;
50 :
51 : /* readonly attribute nsIIDBTransaction transaction; */
52 : NS_SCRIPTABLE NS_IMETHOD GetTransaction(nsIIDBTransaction * *aTransaction) = 0;
53 :
54 : /* readonly attribute boolean autoIncrement; */
55 : NS_SCRIPTABLE NS_IMETHOD GetAutoIncrement(bool *aAutoIncrement) = 0;
56 :
57 : /* [implicit_jscontext] nsIIDBRequest get (in jsval key); */
58 : NS_SCRIPTABLE NS_IMETHOD Get(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
59 :
60 : /* [implicit_jscontext,optional_argc] nsIIDBRequest getAll ([optional] in jsval key, [optional] in unsigned long limit); */
61 : NS_SCRIPTABLE NS_IMETHOD GetAll(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
62 :
63 : /* [implicit_jscontext,optional_argc] nsIIDBRequest add (in jsval value, [optional] in jsval key); */
64 : NS_SCRIPTABLE NS_IMETHOD Add(const JS::Value & value, const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
65 :
66 : /* [implicit_jscontext,optional_argc] nsIIDBRequest put (in jsval value, [optional] in jsval key); */
67 : NS_SCRIPTABLE NS_IMETHOD Put(const JS::Value & value, const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
68 :
69 : /* [implicit_jscontext] nsIIDBRequest delete (in jsval key); */
70 : NS_SCRIPTABLE NS_IMETHOD Delete(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
71 :
72 : /* nsIIDBRequest clear (); */
73 : NS_SCRIPTABLE NS_IMETHOD Clear(nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
74 :
75 : /* [implicit_jscontext,optional_argc] nsIIDBRequest openCursor ([optional] in jsval range, [optional] in DOMString direction); */
76 : NS_SCRIPTABLE NS_IMETHOD OpenCursor(const JS::Value & range, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
77 :
78 : /* [implicit_jscontext] nsIIDBIndex createIndex ([Null (Stringify)] in DOMString name, in jsval keyPath, [optional] in jsval options); */
79 : NS_SCRIPTABLE NS_IMETHOD CreateIndex(const nsAString & name, const JS::Value & keyPath, const JS::Value & options, JSContext* cx, nsIIDBIndex * *_retval NS_OUTPARAM) = 0;
80 :
81 : /* nsIIDBIndex index ([Null (Stringify)] in DOMString name); */
82 : NS_SCRIPTABLE NS_IMETHOD Index(const nsAString & name, nsIIDBIndex * *_retval NS_OUTPARAM) = 0;
83 :
84 : /* void deleteIndex ([Null (Stringify)] in DOMString name); */
85 : NS_SCRIPTABLE NS_IMETHOD DeleteIndex(const nsAString & name) = 0;
86 :
87 : /* [implicit_jscontext,optional_argc] nsIIDBRequest count ([optional] in jsval key); */
88 : NS_SCRIPTABLE NS_IMETHOD Count(const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
89 :
90 : };
91 :
92 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIIDBObjectStore, NS_IIDBOBJECTSTORE_IID)
93 :
94 : /* Use this macro when declaring classes that implement this interface. */
95 : #define NS_DECL_NSIIDBOBJECTSTORE \
96 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName); \
97 : NS_SCRIPTABLE NS_IMETHOD GetKeyPath(JSContext* cx, JS::Value *aKeyPath); \
98 : NS_SCRIPTABLE NS_IMETHOD GetIndexNames(nsIDOMDOMStringList * *aIndexNames); \
99 : NS_SCRIPTABLE NS_IMETHOD GetTransaction(nsIIDBTransaction * *aTransaction); \
100 : NS_SCRIPTABLE NS_IMETHOD GetAutoIncrement(bool *aAutoIncrement); \
101 : NS_SCRIPTABLE NS_IMETHOD Get(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM); \
102 : NS_SCRIPTABLE NS_IMETHOD GetAll(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM); \
103 : NS_SCRIPTABLE NS_IMETHOD Add(const JS::Value & value, const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM); \
104 : NS_SCRIPTABLE NS_IMETHOD Put(const JS::Value & value, const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM); \
105 : NS_SCRIPTABLE NS_IMETHOD Delete(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM); \
106 : NS_SCRIPTABLE NS_IMETHOD Clear(nsIIDBRequest * *_retval NS_OUTPARAM); \
107 : NS_SCRIPTABLE NS_IMETHOD OpenCursor(const JS::Value & range, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM); \
108 : NS_SCRIPTABLE NS_IMETHOD CreateIndex(const nsAString & name, const JS::Value & keyPath, const JS::Value & options, JSContext* cx, nsIIDBIndex * *_retval NS_OUTPARAM); \
109 : NS_SCRIPTABLE NS_IMETHOD Index(const nsAString & name, nsIIDBIndex * *_retval NS_OUTPARAM); \
110 : NS_SCRIPTABLE NS_IMETHOD DeleteIndex(const nsAString & name); \
111 : NS_SCRIPTABLE NS_IMETHOD Count(const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM);
112 :
113 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
114 : #define NS_FORWARD_NSIIDBOBJECTSTORE(_to) \
115 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
116 : NS_SCRIPTABLE NS_IMETHOD GetKeyPath(JSContext* cx, JS::Value *aKeyPath) { return _to GetKeyPath(cx, aKeyPath); } \
117 : NS_SCRIPTABLE NS_IMETHOD GetIndexNames(nsIDOMDOMStringList * *aIndexNames) { return _to GetIndexNames(aIndexNames); } \
118 : NS_SCRIPTABLE NS_IMETHOD GetTransaction(nsIIDBTransaction * *aTransaction) { return _to GetTransaction(aTransaction); } \
119 : NS_SCRIPTABLE NS_IMETHOD GetAutoIncrement(bool *aAutoIncrement) { return _to GetAutoIncrement(aAutoIncrement); } \
120 : NS_SCRIPTABLE NS_IMETHOD Get(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to Get(key, cx, _retval); } \
121 : NS_SCRIPTABLE NS_IMETHOD GetAll(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to GetAll(key, limit, cx, _argc, _retval); } \
122 : NS_SCRIPTABLE NS_IMETHOD Add(const JS::Value & value, const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to Add(value, key, cx, _argc, _retval); } \
123 : NS_SCRIPTABLE NS_IMETHOD Put(const JS::Value & value, const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to Put(value, key, cx, _argc, _retval); } \
124 : NS_SCRIPTABLE NS_IMETHOD Delete(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to Delete(key, cx, _retval); } \
125 : NS_SCRIPTABLE NS_IMETHOD Clear(nsIIDBRequest * *_retval NS_OUTPARAM) { return _to Clear(_retval); } \
126 : NS_SCRIPTABLE NS_IMETHOD OpenCursor(const JS::Value & range, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to OpenCursor(range, direction, cx, _argc, _retval); } \
127 : NS_SCRIPTABLE NS_IMETHOD CreateIndex(const nsAString & name, const JS::Value & keyPath, const JS::Value & options, JSContext* cx, nsIIDBIndex * *_retval NS_OUTPARAM) { return _to CreateIndex(name, keyPath, options, cx, _retval); } \
128 : NS_SCRIPTABLE NS_IMETHOD Index(const nsAString & name, nsIIDBIndex * *_retval NS_OUTPARAM) { return _to Index(name, _retval); } \
129 : NS_SCRIPTABLE NS_IMETHOD DeleteIndex(const nsAString & name) { return _to DeleteIndex(name); } \
130 : NS_SCRIPTABLE NS_IMETHOD Count(const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to Count(key, cx, _argc, _retval); }
131 :
132 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
133 : #define NS_FORWARD_SAFE_NSIIDBOBJECTSTORE(_to) \
134 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
135 : NS_SCRIPTABLE NS_IMETHOD GetKeyPath(JSContext* cx, JS::Value *aKeyPath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKeyPath(cx, aKeyPath); } \
136 : NS_SCRIPTABLE NS_IMETHOD GetIndexNames(nsIDOMDOMStringList * *aIndexNames) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIndexNames(aIndexNames); } \
137 : NS_SCRIPTABLE NS_IMETHOD GetTransaction(nsIIDBTransaction * *aTransaction) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTransaction(aTransaction); } \
138 : NS_SCRIPTABLE NS_IMETHOD GetAutoIncrement(bool *aAutoIncrement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAutoIncrement(aAutoIncrement); } \
139 : NS_SCRIPTABLE NS_IMETHOD Get(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Get(key, cx, _retval); } \
140 : NS_SCRIPTABLE NS_IMETHOD GetAll(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAll(key, limit, cx, _argc, _retval); } \
141 : NS_SCRIPTABLE NS_IMETHOD Add(const JS::Value & value, const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Add(value, key, cx, _argc, _retval); } \
142 : NS_SCRIPTABLE NS_IMETHOD Put(const JS::Value & value, const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Put(value, key, cx, _argc, _retval); } \
143 : NS_SCRIPTABLE NS_IMETHOD Delete(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Delete(key, cx, _retval); } \
144 : NS_SCRIPTABLE NS_IMETHOD Clear(nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Clear(_retval); } \
145 : NS_SCRIPTABLE NS_IMETHOD OpenCursor(const JS::Value & range, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenCursor(range, direction, cx, _argc, _retval); } \
146 : NS_SCRIPTABLE NS_IMETHOD CreateIndex(const nsAString & name, const JS::Value & keyPath, const JS::Value & options, JSContext* cx, nsIIDBIndex * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateIndex(name, keyPath, options, cx, _retval); } \
147 : NS_SCRIPTABLE NS_IMETHOD Index(const nsAString & name, nsIIDBIndex * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Index(name, _retval); } \
148 : NS_SCRIPTABLE NS_IMETHOD DeleteIndex(const nsAString & name) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteIndex(name); } \
149 : NS_SCRIPTABLE NS_IMETHOD Count(const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Count(key, cx, _argc, _retval); }
150 :
151 : #if 0
152 : /* Use the code below as a template for the implementation class for this interface. */
153 :
154 : /* Header file */
155 : class nsIDBObjectStore : public nsIIDBObjectStore
156 : {
157 : public:
158 : NS_DECL_ISUPPORTS
159 : NS_DECL_NSIIDBOBJECTSTORE
160 :
161 : nsIDBObjectStore();
162 :
163 : private:
164 : ~nsIDBObjectStore();
165 :
166 : protected:
167 : /* additional members */
168 : };
169 :
170 : /* Implementation file */
171 : NS_IMPL_ISUPPORTS1(nsIDBObjectStore, nsIIDBObjectStore)
172 :
173 : nsIDBObjectStore::nsIDBObjectStore()
174 : {
175 : /* member initializers and constructor code */
176 : }
177 :
178 : nsIDBObjectStore::~nsIDBObjectStore()
179 : {
180 : /* destructor code */
181 : }
182 :
183 : /* readonly attribute DOMString name; */
184 : NS_IMETHODIMP nsIDBObjectStore::GetName(nsAString & aName)
185 : {
186 : return NS_ERROR_NOT_IMPLEMENTED;
187 : }
188 :
189 : /* [implicit_jscontext] readonly attribute jsval keyPath; */
190 : NS_IMETHODIMP nsIDBObjectStore::GetKeyPath(JSContext* cx, JS::Value *aKeyPath)
191 : {
192 : return NS_ERROR_NOT_IMPLEMENTED;
193 : }
194 :
195 : /* readonly attribute nsIDOMDOMStringList indexNames; */
196 : NS_IMETHODIMP nsIDBObjectStore::GetIndexNames(nsIDOMDOMStringList * *aIndexNames)
197 : {
198 : return NS_ERROR_NOT_IMPLEMENTED;
199 : }
200 :
201 : /* readonly attribute nsIIDBTransaction transaction; */
202 : NS_IMETHODIMP nsIDBObjectStore::GetTransaction(nsIIDBTransaction * *aTransaction)
203 : {
204 : return NS_ERROR_NOT_IMPLEMENTED;
205 : }
206 :
207 : /* readonly attribute boolean autoIncrement; */
208 : NS_IMETHODIMP nsIDBObjectStore::GetAutoIncrement(bool *aAutoIncrement)
209 : {
210 : return NS_ERROR_NOT_IMPLEMENTED;
211 : }
212 :
213 : /* [implicit_jscontext] nsIIDBRequest get (in jsval key); */
214 : NS_IMETHODIMP nsIDBObjectStore::Get(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM)
215 : {
216 : return NS_ERROR_NOT_IMPLEMENTED;
217 : }
218 :
219 : /* [implicit_jscontext,optional_argc] nsIIDBRequest getAll ([optional] in jsval key, [optional] in unsigned long limit); */
220 : NS_IMETHODIMP nsIDBObjectStore::GetAll(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM)
221 : {
222 : return NS_ERROR_NOT_IMPLEMENTED;
223 : }
224 :
225 : /* [implicit_jscontext,optional_argc] nsIIDBRequest add (in jsval value, [optional] in jsval key); */
226 : NS_IMETHODIMP nsIDBObjectStore::Add(const JS::Value & value, const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM)
227 : {
228 : return NS_ERROR_NOT_IMPLEMENTED;
229 : }
230 :
231 : /* [implicit_jscontext,optional_argc] nsIIDBRequest put (in jsval value, [optional] in jsval key); */
232 : NS_IMETHODIMP nsIDBObjectStore::Put(const JS::Value & value, const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM)
233 : {
234 : return NS_ERROR_NOT_IMPLEMENTED;
235 : }
236 :
237 : /* [implicit_jscontext] nsIIDBRequest delete (in jsval key); */
238 : NS_IMETHODIMP nsIDBObjectStore::Delete(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM)
239 : {
240 : return NS_ERROR_NOT_IMPLEMENTED;
241 : }
242 :
243 : /* nsIIDBRequest clear (); */
244 : NS_IMETHODIMP nsIDBObjectStore::Clear(nsIIDBRequest * *_retval NS_OUTPARAM)
245 : {
246 : return NS_ERROR_NOT_IMPLEMENTED;
247 : }
248 :
249 : /* [implicit_jscontext,optional_argc] nsIIDBRequest openCursor ([optional] in jsval range, [optional] in DOMString direction); */
250 : NS_IMETHODIMP nsIDBObjectStore::OpenCursor(const JS::Value & range, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM)
251 : {
252 : return NS_ERROR_NOT_IMPLEMENTED;
253 : }
254 :
255 : /* [implicit_jscontext] nsIIDBIndex createIndex ([Null (Stringify)] in DOMString name, in jsval keyPath, [optional] in jsval options); */
256 : NS_IMETHODIMP nsIDBObjectStore::CreateIndex(const nsAString & name, const JS::Value & keyPath, const JS::Value & options, JSContext* cx, nsIIDBIndex * *_retval NS_OUTPARAM)
257 : {
258 : return NS_ERROR_NOT_IMPLEMENTED;
259 : }
260 :
261 : /* nsIIDBIndex index ([Null (Stringify)] in DOMString name); */
262 : NS_IMETHODIMP nsIDBObjectStore::Index(const nsAString & name, nsIIDBIndex * *_retval NS_OUTPARAM)
263 : {
264 : return NS_ERROR_NOT_IMPLEMENTED;
265 : }
266 :
267 : /* void deleteIndex ([Null (Stringify)] in DOMString name); */
268 : NS_IMETHODIMP nsIDBObjectStore::DeleteIndex(const nsAString & name)
269 : {
270 : return NS_ERROR_NOT_IMPLEMENTED;
271 : }
272 :
273 : /* [implicit_jscontext,optional_argc] nsIIDBRequest count ([optional] in jsval key); */
274 : NS_IMETHODIMP nsIDBObjectStore::Count(const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM)
275 : {
276 : return NS_ERROR_NOT_IMPLEMENTED;
277 : }
278 :
279 : /* End of implementation class template. */
280 : #endif
281 :
282 :
283 : #endif /* __gen_nsIIDBObjectStore_h__ */
|