Debian Codegraph @

externs/gears_types.js

raw symbols SCIP
1 /*
2 * Copyright 2007 Closure Compiler Authors
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /**
18 * @fileoverview Extern types introduced by the Gears extension.
19 * @externs
20 */
21
22
23 /** @constructor */
24 function GearsFactory() {}
25
26 /**
27 * @param {*=} opt_classVersion
28 * @return {Object}
29 */
30 GearsFactory.prototype.create = function(className, opt_classVersion) {};
31
32 /** @return {string} */
33 GearsFactory.prototype.getBuildInfo = function() {};
34
35 /**
36 * @param {*=} opt_siteName
37 * @param {*=} opt_imageUrl
38 * @param {*=} opt_extraMessage
39 * @return {boolean}
40 */
41 GearsFactory.prototype.getPermission = function(opt_siteName,
42 opt_imageUrl,
43 opt_extraMessage) {};
44
45 /** @type {boolean} */
46 GearsFactory.prototype.hasPermission = false;
47
48 /** @param {Object} globalObject */
49 GearsFactory.prototype.privateSetGlobalObject = function(globalObject) {};
50
51 /** @type {string} */
52 GearsFactory.prototype.version;
53
54
55 /** @constructor */
56 function GearsBlob() {}
57
58 /** @type {number} */
59 GearsBlob.prototype.length = 0;
60
61 /** @return {GearsBlob} */
62 GearsBlob.prototype.slice = function(offset, length) {};
63
64
65 /** @constructor */
66 function GearsBlobBuilder() {}
67
68 /** @param {string|GearsBlob} appendee */
69 GearsBlobBuilder.prototype.append = function(appendee) {};
70
71 /** @return {GearsBlob} */
72 GearsBlobBuilder.prototype.getAsBlob = function() {};
73
74
75 /** @constructor */
76 function GearsDatabase() {}
77
78 /** @param {string=} opt_name */
79 GearsDatabase.prototype.open = function(opt_name) {};
80
81 /**
82 * @param {*=} opt_argArray
83 * @return {GearsResultSet}
84 */
85 GearsDatabase.prototype.execute = function(sqlStatement, opt_argArray) {};
86
87 GearsDatabase.prototype.close = function() {};
88
89 GearsDatabase.prototype.remove = function() {};
90
91 /** @type {number} */
92 GearsDatabase.prototype.lastInsertRowId = 0;
93
94 /** @type {number} */
95 GearsDatabase.prototype.rowsAffected = 0;
96
97
98 /** @constructor */
99 function GearsResultSet() {}
100
101 /** @return {boolean} */
102 GearsResultSet.prototype.isValidRow = function() {};
103
104 GearsResultSet.prototype.next = function() {};
105
106 GearsResultSet.prototype.close = function() {};
107
108 /** @return {number} */
109 GearsResultSet.prototype.fieldCount = function() {};
110
111 /** @return {string} */
112 GearsResultSet.prototype.fieldName = function(fieldIndex) {};
113
114 GearsResultSet.prototype.field = function(fieldIndex) {};
115
116 GearsResultSet.prototype.fieldByName = function(fieldName) {};
117
118
119 /** @constructor */
120 function GearsDesktop() {}
121
122 /**
123 * @param {string} name The name of the shortcut.
124 * @param {string} url The URL for the shortcut.
125 * @param {Object} icons The icon set to use for the shortcut.
126 * @param {string=} opt_description The description of the shortcut.
127 */
128 GearsDesktop.prototype.createShortcut = function(name,
129 url,
130 icons,
131 opt_description) {};
132
133 /**
134 * @param {GearsBlob} blob The blob to get metadata for.
135 * @return {Object} The metadata object.
136 */
137 GearsDesktop.prototype.extractMetaData = function(blob) { return null; };
138
139 /**
140 * @param {Object} event The event object we're calling from.
141 * @param {string} flavor The type of object to get.
142 * @return {Object} The drag data.
143 */
144 GearsDesktop.prototype.getDragData = function(event, flavor) { return null; };
145
146 /**
147 * @param {function(Array.<GearsFile>)} callback The callback after opening.
148 * @param {GearsOpenFileOptions=} opt_options The options to use for opening.
149 */
150 GearsDesktop.prototype.openFiles = function(callback, opt_options) {};
151
152 /**
153 * @param {Object} event
154 * @param {string} dropEffect
155 */
156 GearsDesktop.prototype.setDropEffect = function(event, dropEffect) {};
157
158
159 /** @constructor */
160 function GearsFile() {}
161
162 /** @type {string} */
163 GearsFile.prototype.name = '';
164
165 /** @type {GearsBlob} */
166 GearsFile.prototype.blob;
167
168
169 /** @constructor */
170 function GearsOpenFileOptions() {}
171
172 /** @type {boolean} */
173 GearsOpenFileOptions.prototype.singleFile = false;
174
175 /** @type {Array.<string>} */
176 GearsOpenFileOptions.prototype.filter = [];
177
178
179 /** @constructor */
180 function GearsGeolocation() {}
181
182 /** @const @type {GearsPosition} */
183 GearsGeolocation.prototype.lastPosition;
184
185 /**
186 * @param {function(GearsPosition)} successCallback
187 * @param {(function(GearsPositionError)|null)=} opt_errorCallback
188 * @param {GearsPositionOptions=} opt_options
189 */
190 GearsGeolocation.prototype.getCurrentPosition = function(successCallback,
191 opt_errorCallback,
192 opt_options) {};
193
194 /**
195 * @param {function(GearsPosition)} successCallback
196 * @param {(function(GearsPositionError)|null)=} opt_errorCallback
197 * @param {GearsPositionOptions=} opt_options
198 * @return {number}
199 */
200 GearsGeolocation.prototype.watchPosition = function(successCallback,
201 opt_errorCallback,
202 opt_options) {};
203
204 /** @param {number} watchId */
205 GearsGeolocation.prototype.clearWatch = function(watchId) {};
206
207 /**
208 * @param {string=} opt_siteName
209 * @param {string=} opt_imageUrl
210 * @param {string=} opt_extraMessage
211 * @return {boolean}
212 */
213 GearsGeolocation.prototype.getPermission = function(opt_siteName,
214 opt_imageUrl,
215 opt_extraMessage) {};
216
217
218 /** @constructor */
219 function GearsCoords() {}
220
221 /** @const @type {number} */
222 GearsCoords.prototype.latitude;
223
224 /** @const @type {number} */
225 GearsCoords.prototype.longitude;
226
227 /** @const @type {number} */
228 GearsCoords.prototype.accuracy;
229
230 /** @const @type {number} */
231 GearsCoords.prototype.altitude;
232
233 /** @const @type {number} */
234 GearsCoords.prototype.altitudeAccuracy;
235
236
237 /** @constructor */
238 function GearsPosition() {}
239
240 /** @const @type {number} */
241 GearsPosition.prototype.latitude;
242
243 /** @const @type {number} */
244 GearsPosition.prototype.longitude;
245
246 /** @const @type {number} */
247 GearsPosition.prototype.accuracy;
248
249 /** @const @type {number} */
250 GearsPosition.prototype.altitude;
251
252 /** @const @type {number} */
253 GearsPosition.prototype.altitudeAccuracy;
254
255 /** @const @type {GearsCoords} */
256 GearsPosition.prototype.coords;
257
258 /** @const @type {Date} */
259 GearsPosition.prototype.timestamp;
260
261 /** @const @type {GearsAddress} */
262 GearsPosition.prototype.gearsAddress;
263
264
265 /** @constructor */
266 function GearsPositionOptions() {}
267
268 /** @type {boolean} */
269 GearsPositionOptions.prototype.enableHighAccuracy;
270
271 /** @type {boolean} */
272 GearsPositionOptions.prototype.gearsRequestAddress;
273
274 /** @type {string} */
275 GearsPositionOptions.prototype.gearsAddressLanguage = '';
276
277 /** @type {Array.<string>} */
278 GearsPositionOptions.prototype.gearsLocationProviderUrls;
279
280 /** @type {number} */
281 GearsPositionOptions.prototype.maximumAge;
282
283 /** @type {number} */
284 GearsPositionOptions.prototype.timeout;
285
286
287 /** @constructor */
288 function GearsPositionError() {}
289
290 /** @const @type {number} */
291 GearsPositionError.prototype.code = 0;
292
293 /** @const @type {string} */
294 GearsPositionError.prototype.message = '';
295
296 /** @const @type {number} */
297 GearsPositionError.prototype.UNKNOWN_ERROR;
298
299 /** @const @type {number} */
300 GearsPositionError.prototype.PERMISSION_DENIED;
301
302 /** @const @type {number} */
303 GearsPositionError.prototype.POSITION_UNAVAILABLE;
304
305 /** @const @type {number} */
306 GearsPositionError.prototype.TIMEOUT;
307
308
309 /** @constructor */
310 function GearsAddress() {}
311
312 /** @const @type {string} */
313 GearsAddress.prototype.streetNumber = '';
314
315 /** @const @type {string} */
316 GearsAddress.prototype.street = '';
317
318 /** @const @type {string} */
319 GearsAddress.prototype.premises = '';
320
321 /** @const @type {string} */
322 GearsAddress.prototype.city = '';
323
324 /** @const @type {string} */
325 GearsAddress.prototype.county = '';
326
327 /** @const @type {string} */
328 GearsAddress.prototype.region = '';
329
330 /** @const @type {string} */
331 GearsAddress.prototype.country = '';
332
333 /** @const @type {string} */
334 GearsAddress.prototype.countryCode = '';
335
336 /** @const @type {string} */
337 GearsAddress.prototype.postalCode = '';
338
339
340 /** @constructor */
341 function GearsHttpRequest() {}
342
343 GearsHttpRequest.prototype.open = function(method, url, opt_async) {};
344
345 GearsHttpRequest.prototype.setRequestHeader = function(name, value) {};
346
347 /**
348 * @param {(string|GearsBlob|null)=} opt_postData
349 */
350 GearsHttpRequest.prototype.send = function(opt_postData) {};
351
352 GearsHttpRequest.prototype.abort = function() {};
353
354 /** @return {string} */
355 GearsHttpRequest.prototype.getResponseHeader = function(name) {};
356
357 /** @return {string} */
358 GearsHttpRequest.prototype.getAllResponseHeaders = function() {};
359
360 /** @type {function(GearsProgressEvent)|null} */
361 GearsHttpRequest.prototype.onprogress = function(progressEvent) {};
362
363 GearsHttpRequest.prototype.onreadystatechange = function() {};
364
365 /** @type {number} */
366 GearsHttpRequest.prototype.readyState = 0;
367
368 /** @type {GearsBlob} */
369 GearsHttpRequest.prototype.responseBlob;
370
371 /** @type {string} */
372 GearsHttpRequest.prototype.responseText = '';
373
374 /** @type {number} */
375 GearsHttpRequest.prototype.status = 0;
376
377 /** @type {string} */
378 GearsHttpRequest.prototype.statusText = '';
379
380 /** @type {GearsHttpRequestUpload} */
381 GearsHttpRequest.prototype.upload;
382
383
384 /** @constructor */
385 function GearsHttpRequestUpload() {}
386
387 /** @type {function(GearsProgressEvent)|null} */
388 GearsHttpRequestUpload.prototype.onprogress = function(progressEvent) {};
389
390
391 /** @constructor */
392 function GearsProgressEvent() {}
393
394 /** @type {number} */
395 GearsProgressEvent.prototype.total = 0;
396
397 /** @type {number} */
398 GearsProgressEvent.prototype.loaded = 0;
399
400 /** @type {boolean} */
401 GearsProgressEvent.prototype.lengthComputable;
402
403
404 /** @constructor */
405 function GearsLocalServer() {}
406
407 /** @return {boolean} */
408 GearsLocalServer.prototype.canServeLocally = function(url) {};
409
410 /**
411 * @param {*=} opt_requiredCookie
412 * @return {GearsResourceStore}
413 */
414 GearsLocalServer.prototype.createStore = function(name, opt_requiredCookie) {};
415
416 /**
417 * @param {*=} opt_requiredCookie
418 * @return {GearsResourceStore}
419 */
420 GearsLocalServer.prototype.openStore = function(name, opt_requiredCookie) {};
421
422 /**
423 * @param {*=} opt_requiredCookie
424 */
425 GearsLocalServer.prototype.removeStore = function(name, opt_requiredCookie) {};
426
427 /**
428 * @param {*=} opt_requiredCookie
429 * @return {GearsManagedResourceStore}
430 */
431 GearsLocalServer.prototype.createManagedStore = function(name,
432 opt_requiredCookie) {};
433 /**
434 * @param {*=} opt_requiredCookie
435 * @return {GearsManagedResourceStore}
436 */
437 GearsLocalServer.prototype.openManagedStore = function(name,
438 opt_requiredCookie) {};
439
440 /**
441 * @param {*=} opt_requiredCookie
442 */
443 GearsLocalServer.prototype.removeManagedStore = function(name,
444 opt_requiredCookie) {};
445
446
447 /** @constructor */
448 function GearsManagedResourceStore() {}
449
450 /** @type {string} */
451 GearsManagedResourceStore.prototype.name = '';
452
453 /** @type {string} */
454 GearsManagedResourceStore.prototype.requiredCookie = '';
455
456 /** @type {boolean} */
457 GearsManagedResourceStore.prototype.enabled = false;
458
459 /** @type {string} */
460 GearsManagedResourceStore.prototype.manifestUrl = '';
461
462 /** @type {number} */
463 GearsManagedResourceStore.prototype.lastUpdateCheckTime = 0;
464
465 /** @type {number} */
466 GearsManagedResourceStore.prototype.updateStatus = 0;
467
468 /** @type {string} */
469 GearsManagedResourceStore.prototype.lastErrorMessage = '';
470
471 /** @type {string} */
472 GearsManagedResourceStore.prototype.currentVersion = '';
473
474 /** @type {function(GearsCompleteObject)|null} */
475 GearsManagedResourceStore.prototype.oncomplete = function(details) {};
476
477 /** @type {function(GearsErrorObject)|null} */
478 GearsManagedResourceStore.prototype.onerror = function(error) {};
479
480 /** @type {function(GearsProgressObject)|null} */
481 GearsManagedResourceStore.prototype.onprogress = function(details) {};
482
483 GearsManagedResourceStore.prototype.checkForUpdate = function() {};
484
485
486 /** @constructor */
487 function GearsResourceStore() {}
488
489 /** @type {string} */
490 GearsResourceStore.prototype.name = '';
491
492 /** @type {string} */
493 GearsResourceStore.prototype.requiredCookie = '';
494
495 /** @type {boolean} */
496 GearsResourceStore.prototype.enabled = false;
497
498 /** @return {number} */
499 GearsResourceStore.prototype.capture = function(urlOrUrlArray, callback) {};
500
501 /**
502 * @param {GearsBlob} blob
503 * @param {string} url
504 * @param {string=} opt_contentType
505 */
506 GearsResourceStore.prototype.captureBlob = function(blob,
507 url,
508 opt_contentType) {};
509
510 GearsResourceStore.prototype.abortCapture = function(captureId) {};
511
512 GearsResourceStore.prototype.remove = function(url) {};
513
514 GearsResourceStore.prototype.rename = function(srcUrl, destUrl) {};
515
516 GearsResourceStore.prototype.copy = function(srcUrl, destUrl) {};
517
518 /** @return {boolean} */
519 GearsResourceStore.prototype.isCaptured = function(url) {};
520
521 GearsResourceStore.prototype.captureFile = function(fileInputElement, url) {};
522
523 /** @return {string} */
524 GearsResourceStore.prototype.getCapturedFileName = function(url) {};
525
526 /** @return {string} */
527 GearsResourceStore.prototype.getHeader = function(url, name) {};
528
529 /** @return {string} */
530 GearsResourceStore.prototype.getAllHeaders = function(url) {};
531
532 /**
533 * @param {string} url
534 * @return {GearsBlob}
535 */
536 GearsResourceStore.prototype.getAsBlob = function(url) {};
537
538 /** @return {GearsFileSubmitter} */
539 GearsResourceStore.prototype.createFileSubmitter = function() {};
540
541
542 /** @constructor */
543 function GearsFileSubmitter() {}
544
545 GearsFileSubmitter.prototype.setFileInputElement = function(htmlElement,
546 url) {};
547
548
549 /** @constructor */
550 function GearsTimer() {}
551
552 /** @return {number} */
553 GearsTimer.prototype.setTimeout = function(fullScriptOrCallback, msecDelay) {};
554
555 /** @return {number} */
556 GearsTimer.prototype.setInterval = function(fullScript, msecDelay) {};
557
558 GearsTimer.prototype.clearTimeout = function(timerId) {};
559
560 GearsTimer.prototype.clearInterval = function(timerId) {};
561
562
563 /** @constructor */
564 function GearsWorkerPool() {}
565
566 /**
567 * @param {string} messageText The message contents
568 * (Deprecated, use messageObject.text)
569 * @param {number} senderId ID of the source worker.
570 * (Deprecated, use messageObject.sender)
571 * @param {GearsMessageObject} messageObject An object containing
572 * all information about a message.
573 */
574 GearsWorkerPool.prototype.onmessage = function(messageText,
575 senderId,
576 messageObject) {};
577
578 /**
579 * @param {!GearsErrorObject} errorObject An object that explains
580 * the problem.
581 * @return {boolean|undefined} Return true to indicate that the error was
582 * handled, which prevents it from bubbling up to the parent.
583 */
584 GearsWorkerPool.prototype.onerror = function(errorObject) {};
585
586 /** @return {number} */
587 GearsWorkerPool.prototype.createWorker = function(scriptText) {};
588
589 /** @return {number} */
590 GearsWorkerPool.prototype.createWorkerFromUrl = function(scriptUrl) {};
591
592 /**
593 * @param {*} message
594 * @param {number} destWorkerId
595 */
596 GearsWorkerPool.prototype.sendMessage = function(message, destWorkerId) {};
597
598 GearsWorkerPool.prototype.allowCrossOrigin = function() {};
599
600
601 /** @constructor */
602 function GearsMessageObject() {}
603
604 /** @type {string} */
605 GearsMessageObject.prototype.text = '';
606
607 /** @type {string} */
608 GearsMessageObject.prototype.sender = '';
609
610 /** @type {string} */
611 GearsMessageObject.prototype.origin = '';
612
613 /** @type {*} */
614 GearsMessageObject.prototype.body;
615
616
617 /** @constructor */
618 function GearsCompleteObject() {}
619
620 /** @type {string} */
621 GearsCompleteObject.prototype.newVersion = '';
622
623
624 /** @constructor */
625 function GearsErrorObject() {}
626
627 /** @type {string} */
628 GearsErrorObject.prototype.message = '';
629
630 /** @type {number} */
631 GearsErrorObject.prototype.lineNumber;
632
633
634 /** @constructor */
635 function GearsProgressObject() {}
636
637 /** @type {number} */
638 GearsProgressObject.prototype.filesComplete = 0;
639
640 /** @type {number} */
641 GearsProgressObject.prototype.filesTotal = 0;