1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/dom/indexedDB/nsIIDBIndex.idl
3 : */
4 :
5 : #ifndef __gen_nsIIDBIndex_h__
6 : #define __gen_nsIIDBIndex_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 nsIIDBObjectStore; /* forward declaration */
20 :
21 : class nsIIDBRequest; /* forward declaration */
22 :
23 :
24 : /* starting interface: nsIIDBIndex */
25 : #define NS_IIDBINDEX_IID_STR "a859747a-0f05-4dfb-8f42-05c61415d4e4"
26 :
27 : #define NS_IIDBINDEX_IID \
28 : {0xa859747a, 0x0f05, 0x4dfb, \
29 : { 0x8f, 0x42, 0x05, 0xc6, 0x14, 0x15, 0xd4, 0xe4 }}
30 :
31 129 : class NS_NO_VTABLE NS_SCRIPTABLE nsIIDBIndex : public nsISupports {
32 : public:
33 :
34 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIDBINDEX_IID)
35 :
36 : /* readonly attribute DOMString name; */
37 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) = 0;
38 :
39 : /* readonly attribute DOMString storeName; */
40 : NS_SCRIPTABLE NS_IMETHOD GetStoreName(nsAString & aStoreName) = 0;
41 :
42 : /* [implicit_jscontext] readonly attribute jsval keyPath; */
43 : NS_SCRIPTABLE NS_IMETHOD GetKeyPath(JSContext* cx, JS::Value *aKeyPath) = 0;
44 :
45 : /* readonly attribute boolean unique; */
46 : NS_SCRIPTABLE NS_IMETHOD GetUnique(bool *aUnique) = 0;
47 :
48 : /* readonly attribute boolean multiEntry; */
49 : NS_SCRIPTABLE NS_IMETHOD GetMultiEntry(bool *aMultiEntry) = 0;
50 :
51 : /* readonly attribute nsIIDBObjectStore objectStore; */
52 : NS_SCRIPTABLE NS_IMETHOD GetObjectStore(nsIIDBObjectStore * *aObjectStore) = 0;
53 :
54 : /* [implicit_jscontext] nsIIDBRequest get (in jsval key); */
55 : NS_SCRIPTABLE NS_IMETHOD Get(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
56 :
57 : /* [implicit_jscontext] nsIIDBRequest getKey (in jsval key); */
58 : NS_SCRIPTABLE NS_IMETHOD GetKey(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 getAllKeys ([optional] in jsval key, [optional] in unsigned long limit); */
64 : NS_SCRIPTABLE NS_IMETHOD GetAllKeys(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
65 :
66 : /* [implicit_jscontext,optional_argc] nsIIDBRequest openCursor ([optional] in jsval key, [optional] in DOMString direction); */
67 : NS_SCRIPTABLE NS_IMETHOD OpenCursor(const JS::Value & key, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
68 :
69 : /* [implicit_jscontext,optional_argc] nsIIDBRequest openKeyCursor ([optional] in jsval key, [optional] in DOMString direction); */
70 : NS_SCRIPTABLE NS_IMETHOD OpenKeyCursor(const JS::Value & key, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
71 :
72 : /* [implicit_jscontext,optional_argc] nsIIDBRequest count ([optional] in jsval key); */
73 : NS_SCRIPTABLE NS_IMETHOD Count(const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) = 0;
74 :
75 : };
76 :
77 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIIDBIndex, NS_IIDBINDEX_IID)
78 :
79 : /* Use this macro when declaring classes that implement this interface. */
80 : #define NS_DECL_NSIIDBINDEX \
81 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName); \
82 : NS_SCRIPTABLE NS_IMETHOD GetStoreName(nsAString & aStoreName); \
83 : NS_SCRIPTABLE NS_IMETHOD GetKeyPath(JSContext* cx, JS::Value *aKeyPath); \
84 : NS_SCRIPTABLE NS_IMETHOD GetUnique(bool *aUnique); \
85 : NS_SCRIPTABLE NS_IMETHOD GetMultiEntry(bool *aMultiEntry); \
86 : NS_SCRIPTABLE NS_IMETHOD GetObjectStore(nsIIDBObjectStore * *aObjectStore); \
87 : NS_SCRIPTABLE NS_IMETHOD Get(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM); \
88 : NS_SCRIPTABLE NS_IMETHOD GetKey(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM); \
89 : NS_SCRIPTABLE NS_IMETHOD GetAll(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM); \
90 : NS_SCRIPTABLE NS_IMETHOD GetAllKeys(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM); \
91 : NS_SCRIPTABLE NS_IMETHOD OpenCursor(const JS::Value & key, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM); \
92 : NS_SCRIPTABLE NS_IMETHOD OpenKeyCursor(const JS::Value & key, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM); \
93 : NS_SCRIPTABLE NS_IMETHOD Count(const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM);
94 :
95 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
96 : #define NS_FORWARD_NSIIDBINDEX(_to) \
97 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
98 : NS_SCRIPTABLE NS_IMETHOD GetStoreName(nsAString & aStoreName) { return _to GetStoreName(aStoreName); } \
99 : NS_SCRIPTABLE NS_IMETHOD GetKeyPath(JSContext* cx, JS::Value *aKeyPath) { return _to GetKeyPath(cx, aKeyPath); } \
100 : NS_SCRIPTABLE NS_IMETHOD GetUnique(bool *aUnique) { return _to GetUnique(aUnique); } \
101 : NS_SCRIPTABLE NS_IMETHOD GetMultiEntry(bool *aMultiEntry) { return _to GetMultiEntry(aMultiEntry); } \
102 : NS_SCRIPTABLE NS_IMETHOD GetObjectStore(nsIIDBObjectStore * *aObjectStore) { return _to GetObjectStore(aObjectStore); } \
103 : NS_SCRIPTABLE NS_IMETHOD Get(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to Get(key, cx, _retval); } \
104 : NS_SCRIPTABLE NS_IMETHOD GetKey(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to GetKey(key, cx, _retval); } \
105 : 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); } \
106 : NS_SCRIPTABLE NS_IMETHOD GetAllKeys(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to GetAllKeys(key, limit, cx, _argc, _retval); } \
107 : NS_SCRIPTABLE NS_IMETHOD OpenCursor(const JS::Value & key, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to OpenCursor(key, direction, cx, _argc, _retval); } \
108 : NS_SCRIPTABLE NS_IMETHOD OpenKeyCursor(const JS::Value & key, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to OpenKeyCursor(key, direction, cx, _argc, _retval); } \
109 : NS_SCRIPTABLE NS_IMETHOD Count(const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return _to Count(key, cx, _argc, _retval); }
110 :
111 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
112 : #define NS_FORWARD_SAFE_NSIIDBINDEX(_to) \
113 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
114 : NS_SCRIPTABLE NS_IMETHOD GetStoreName(nsAString & aStoreName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStoreName(aStoreName); } \
115 : NS_SCRIPTABLE NS_IMETHOD GetKeyPath(JSContext* cx, JS::Value *aKeyPath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKeyPath(cx, aKeyPath); } \
116 : NS_SCRIPTABLE NS_IMETHOD GetUnique(bool *aUnique) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUnique(aUnique); } \
117 : NS_SCRIPTABLE NS_IMETHOD GetMultiEntry(bool *aMultiEntry) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMultiEntry(aMultiEntry); } \
118 : NS_SCRIPTABLE NS_IMETHOD GetObjectStore(nsIIDBObjectStore * *aObjectStore) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetObjectStore(aObjectStore); } \
119 : 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); } \
120 : NS_SCRIPTABLE NS_IMETHOD GetKey(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKey(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 ? NS_ERROR_NULL_POINTER : _to->GetAll(key, limit, cx, _argc, _retval); } \
122 : NS_SCRIPTABLE NS_IMETHOD GetAllKeys(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllKeys(key, limit, cx, _argc, _retval); } \
123 : NS_SCRIPTABLE NS_IMETHOD OpenCursor(const JS::Value & key, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenCursor(key, direction, cx, _argc, _retval); } \
124 : NS_SCRIPTABLE NS_IMETHOD OpenKeyCursor(const JS::Value & key, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenKeyCursor(key, direction, cx, _argc, _retval); } \
125 : 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); }
126 :
127 : #if 0
128 : /* Use the code below as a template for the implementation class for this interface. */
129 :
130 : /* Header file */
131 : class nsIDBIndex : public nsIIDBIndex
132 : {
133 : public:
134 : NS_DECL_ISUPPORTS
135 : NS_DECL_NSIIDBINDEX
136 :
137 : nsIDBIndex();
138 :
139 : private:
140 : ~nsIDBIndex();
141 :
142 : protected:
143 : /* additional members */
144 : };
145 :
146 : /* Implementation file */
147 : NS_IMPL_ISUPPORTS1(nsIDBIndex, nsIIDBIndex)
148 :
149 : nsIDBIndex::nsIDBIndex()
150 : {
151 : /* member initializers and constructor code */
152 : }
153 :
154 : nsIDBIndex::~nsIDBIndex()
155 : {
156 : /* destructor code */
157 : }
158 :
159 : /* readonly attribute DOMString name; */
160 : NS_IMETHODIMP nsIDBIndex::GetName(nsAString & aName)
161 : {
162 : return NS_ERROR_NOT_IMPLEMENTED;
163 : }
164 :
165 : /* readonly attribute DOMString storeName; */
166 : NS_IMETHODIMP nsIDBIndex::GetStoreName(nsAString & aStoreName)
167 : {
168 : return NS_ERROR_NOT_IMPLEMENTED;
169 : }
170 :
171 : /* [implicit_jscontext] readonly attribute jsval keyPath; */
172 : NS_IMETHODIMP nsIDBIndex::GetKeyPath(JSContext* cx, JS::Value *aKeyPath)
173 : {
174 : return NS_ERROR_NOT_IMPLEMENTED;
175 : }
176 :
177 : /* readonly attribute boolean unique; */
178 : NS_IMETHODIMP nsIDBIndex::GetUnique(bool *aUnique)
179 : {
180 : return NS_ERROR_NOT_IMPLEMENTED;
181 : }
182 :
183 : /* readonly attribute boolean multiEntry; */
184 : NS_IMETHODIMP nsIDBIndex::GetMultiEntry(bool *aMultiEntry)
185 : {
186 : return NS_ERROR_NOT_IMPLEMENTED;
187 : }
188 :
189 : /* readonly attribute nsIIDBObjectStore objectStore; */
190 : NS_IMETHODIMP nsIDBIndex::GetObjectStore(nsIIDBObjectStore * *aObjectStore)
191 : {
192 : return NS_ERROR_NOT_IMPLEMENTED;
193 : }
194 :
195 : /* [implicit_jscontext] nsIIDBRequest get (in jsval key); */
196 : NS_IMETHODIMP nsIDBIndex::Get(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM)
197 : {
198 : return NS_ERROR_NOT_IMPLEMENTED;
199 : }
200 :
201 : /* [implicit_jscontext] nsIIDBRequest getKey (in jsval key); */
202 : NS_IMETHODIMP nsIDBIndex::GetKey(const JS::Value & key, JSContext* cx, nsIIDBRequest * *_retval NS_OUTPARAM)
203 : {
204 : return NS_ERROR_NOT_IMPLEMENTED;
205 : }
206 :
207 : /* [implicit_jscontext,optional_argc] nsIIDBRequest getAll ([optional] in jsval key, [optional] in unsigned long limit); */
208 : NS_IMETHODIMP nsIDBIndex::GetAll(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM)
209 : {
210 : return NS_ERROR_NOT_IMPLEMENTED;
211 : }
212 :
213 : /* [implicit_jscontext,optional_argc] nsIIDBRequest getAllKeys ([optional] in jsval key, [optional] in unsigned long limit); */
214 : NS_IMETHODIMP nsIDBIndex::GetAllKeys(const JS::Value & key, PRUint32 limit, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM)
215 : {
216 : return NS_ERROR_NOT_IMPLEMENTED;
217 : }
218 :
219 : /* [implicit_jscontext,optional_argc] nsIIDBRequest openCursor ([optional] in jsval key, [optional] in DOMString direction); */
220 : NS_IMETHODIMP nsIDBIndex::OpenCursor(const JS::Value & key, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM)
221 : {
222 : return NS_ERROR_NOT_IMPLEMENTED;
223 : }
224 :
225 : /* [implicit_jscontext,optional_argc] nsIIDBRequest openKeyCursor ([optional] in jsval key, [optional] in DOMString direction); */
226 : NS_IMETHODIMP nsIDBIndex::OpenKeyCursor(const JS::Value & key, const nsAString & direction, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM)
227 : {
228 : return NS_ERROR_NOT_IMPLEMENTED;
229 : }
230 :
231 : /* [implicit_jscontext,optional_argc] nsIIDBRequest count ([optional] in jsval key); */
232 : NS_IMETHODIMP nsIDBIndex::Count(const JS::Value & key, JSContext* cx, PRUint8 _argc, nsIIDBRequest * *_retval NS_OUTPARAM)
233 : {
234 : return NS_ERROR_NOT_IMPLEMENTED;
235 : }
236 :
237 : /* End of implementation class template. */
238 : #endif
239 :
240 :
241 : #endif /* __gen_nsIIDBIndex_h__ */
|