What's new? | Help | Directory | Sign in
Google
gears
Improving Your Web Browser
  
  
  
    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">

<!--
Copyright 2007, Google Inc.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of Google Inc. nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<html>
<head>
<title>API Summary</title>
<link rel="stylesheet" type="text/css" href="gears.css" />
</head>

<body>

<h1>API Summary</h1>

<div id="pagecontent">

<!------------------------------------------------------------->
<!-- Gears API Summary Reference -->
<!------------------------------------------------------------->

<p>This is the complete Gears API. Click the class names to see
the details.</p>

<h3>Factory</h3>
<p>Instantiates all other Gears objects. </p>
<pre><code><a href="api_factory.html">Factory class</a>
Object <b>create</b>(className, [classVersion])
string <b>getBuildInfo</b>()
boolean <b>getPermission</b>([siteName], [imageUrl], [extraMessage])
readonly attribute boolean <b>hasPermission</b>
readonly attribute string <b>version</b></code></pre>

<h3>Database module</h3>
<p>Provides a SQL database for storing data on the local machine.</p>
<pre><code><a href="api_database.html">Database class</a>
readonly int <b>lastInsertRowId</b>
readonly int <b>rowsAffected</b>
void <b>open</b>([name])
ResultSet <b>execute</b>(sqlStatement, [argArray])
void <b>close</b>()</code></pre>

<pre><code><a href="api_database.html">ResultSet class</a>
boolean <b>isValidRow</b>()
void <b>next</b>()
int <b>fieldCount</b>()
string <b>fieldName</b>(fieldIndex)
variant <b>field</b>(fieldIndex)
variant <b>fieldByName</b>(fieldName)
void <b>close</b>()</code></pre>

<h3>Desktop module</h3>
<p>Provides an interface for accessing Desktop functionality.</p>
<pre><code><a href="api_desktop.html">Desktop class</a>
void <b>createShortcut</b>(name, url, icons, [description])</code></pre>

<h3>HttpRequest module</h3>
<p>Provides the ability to send HTTP requests in workers, as well as on the main page.</p>
<pre><code><a href="api_httprequest.html">HttpRequest class</a>
void <b>open</b>(method, url)
void <b>setRequestHeader</b>(name, value)
void <b>send</b>([postData])
void <b>abort</b>()
string <b>getResponseHeader</b>(name)
string <b>getAllResponseHeaders</b>()
callback <b>onreadystatechange</b>
readonly attribute int <b>readyState</b>
readonly attribute string <b>responseText</b>
readonly attribute int <b>status</b>
readonly attribute string <b>statusText</b> </code></pre>

<h3>LocalServer module</h3>
<p>Caches and serves your application's resources locally, making it possible to start a web application without a network connection. </p>
<pre><code><a href="api_localserver.html" class="section">LocalServer class</a>
boolean <b>canServeLocally</b>(url)
ResourceStore <b>createStore</b>(name, [requiredCookie])
ResourceStore <b>openStore</b>(name, [requiredCookie])
void <b>removeStore</b>(name, [requiredCookie])
ManagedResourceStore <b>createManagedStore</b>(name, [requiredCookie])
ManagedResourceStore <b>openManagedStore</b>(name, [requiredCookie])
void <b>removeManagedStore</b>(name, [requiredCookie])</code></pre>

<pre><code><a href="api_localserver.html#ManagedResourceStore">ManagedResourceStore class</a>
readonly attribute string <b>name</b>
readonly attribute string <b>requiredCookie</b>
readwrite attribute boolean <b>enabled</b>
readwrite attribute string <b>manifestUrl</b>
readonly attribute int <b>lastUpdateCheckTime</b>
readonly attribute int <b>updateStatus</b>
readonly attribute string <b>lastErrorMessage</b>
readonly attribute string <b>currentVersion</b>
event void <b>oncomplete</b>(Object details)
event void <b>onerror</b>(Error error)
event void <b>onprogress</b>(Object details)
void <b>checkForUpdate</b>()</code></pre>

<pre><code><a href="api_localserver.html#ResourceStore">ResourceStore class</a>
readonly attribute string <b>name</b>
readonly attribute string <b>requiredCookie</b>
readwrite attribute boolean <b>enabled</b>
int <b>capture</b>(urlOrUrlArray, callback)
void <b>abortCapture</b>(captureId)
void <b>remove</b>(url)
void <b>rename</b>(srcUrl, destUrl)
void <b>copy</b>(srcUrl, destUrl)
boolean <b>isCaptured</b>(url)
void <b>captureFile</b>(fileInputElement, url)
string <b>getCapturedFileName</b>(url)
string <b>getHeader</b>(url, name)
string <b>getAllHeaders</b>(url)
FileSubmitter <b>createFileSubmitter()</b></code></pre>

<pre><code><a href="api_localserver.html#FileSubmitter">FileSubmitter class</a>
void <b>setFileInputElement</b>(htmlElement, url)</code></pre>

<h3>Timer module</h3>
<p>Provides a timer that can be used in workers, as well as on the main page.</p>
<pre><code><a href="api_timer.html">Timer class</a>
int <b>setTimeout</b>(function, delay)
int <b>setTimeout</b>(fullScript, delay)
int <b>setInterval</b>(function, delay)
int <b>setInterval</b>(fullScript, delay)
void <b>clearTimeout</b>(timeoutId)
void <b>clearInterval</b>(intervalId)</code></pre>

<h3>WorkerPool module</h3>
<p>Provides the ability to run JavaScript code asynchronously.</p>

<pre><code><a href="api_workerpool.html">WorkerPool class</a>
callback <b>onmessage</b>(messageText, senderId, [messageObject:{text,sender,origin}])
callback <b>onerror</b>(errorObject:{message})
int <b>createWorker</b>(scriptText)
int <b>createWorkerFromUrl</b>(scriptUrl)
void <b>sendMessage</b>(messageText, destWorkerId)
void <b>allowCrossOrigin</b>()</code></pre>

</div>
</body>
</html>
Show details Hide details

Change log

r2207 by gears.daemon on Jul 01, 2008   Diff
[Author: cprince]

Update docs to reflect that
createShortcut() has no return value.

PRESUBMIT=passed
R=zork
CC=gears-eng@googlegroups.com
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=7598039
SCL=7598179
Go to: 
Project members, sign in to write a code review

Older revisions

r1899 by gears.daemon on Jun 06, 2008   Diff
[Author: cprince]

Change "Google Gears" -> "Gears" in
the SDK.

...
r1232 by gears.daemon on Mar 20, 2008   Diff
[Author: malcolmr]

Fix for: http://code.google.com/p
/google-gears/issues/detail?id=112

...
r1045 by gears.daemon on Feb 26, 2008   Diff
[Author: aa]

Docs fixes:
* Make all arguments to
getPermission() optional (See Issue
...
All revisions of this file

File info

Size: 7159 bytes, 163 lines

File properties

svn:mime-type
text/html