OLD | NEW |
| (Empty) |
1 // Copyright 2009-2010 Google Inc. | |
2 // | |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 // you may not use this file except in compliance with the License. | |
5 // You may obtain a copy of the License at | |
6 // | |
7 // http://www.apache.org/licenses/LICENSE-2.0 | |
8 // | |
9 // Unless required by applicable law or agreed to in writing, software | |
10 // distributed under the License is distributed on an "AS IS" BASIS, | |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 // See the License for the specific language governing permissions and | |
13 // limitations under the License. | |
14 // ======================================================================== | |
15 | |
16 import "oaidl.idl"; | |
17 import "ocidl.idl"; | |
18 | |
19 // When adding interfaces to this file: | |
20 // * Do not use "Google" or "GoogleUpdate" directly. Instead, use preprocessor | |
21 // defines. | |
22 // * Add a test for the Google-specific value to | |
23 // omaha_customization_goopdate_apis_unittest.cc. | |
24 | |
25 // | |
26 // Enums. | |
27 // These values can be passed to interface methods and/or compared to their | |
28 // output. | |
29 // | |
30 | |
31 // Must be kept in sync with the enum in base/browser_utils.h. | |
32 typedef enum BrowserType { | |
33 BROWSER_UNKNOWN = 0, | |
34 BROWSER_DEFAULT = 1, | |
35 BROWSER_INTERNET_EXPLORER = 2, | |
36 BROWSER_FIREFOX = 3, | |
37 BROWSER_CHROME = 4, | |
38 } BrowserType; | |
39 | |
40 // The normal install flow proceeds from STATE_INIT through | |
41 // STATE_INSTALL_COMPLETE in order, skipping states that are not relevant. | |
42 // All exceptions and terminal states are start with STATE_INSTALL_COMPLETE. | |
43 typedef enum CurrentState { | |
44 STATE_INIT = 1, | |
45 STATE_WAITING_TO_CHECK_FOR_UPDATE = 2, | |
46 STATE_CHECKING_FOR_UPDATE = 3, | |
47 STATE_UPDATE_AVAILABLE = 4, | |
48 STATE_WAITING_TO_DOWNLOAD = 5, | |
49 STATE_RETRYING_DOWNLOAD = 6, | |
50 STATE_DOWNLOADING = 7, | |
51 STATE_DOWNLOAD_COMPLETE = 8, | |
52 STATE_EXTRACTING = 9, | |
53 STATE_APPLYING_DIFFERENTIAL_PATCH = 10, | |
54 // TODO(omaha3): Should we move STATE_DOWNLOAD_COMPLETE here and eliminate | |
55 // STATE_READY_TO_INSTALL? | |
56 STATE_READY_TO_INSTALL = 11, | |
57 STATE_WAITING_TO_INSTALL = 12, | |
58 STATE_INSTALLING = 13, | |
59 STATE_INSTALL_COMPLETE = 14, | |
60 STATE_PAUSED = 15, | |
61 STATE_NO_UPDATE = 16, | |
62 STATE_ERROR = 17, | |
63 } CurrentState; | |
64 | |
65 typedef enum InstallPriority { | |
66 INSTALL_PRIORITY_LOW = 0, | |
67 INSTALL_PRIORITY_HIGH = 10, | |
68 } InstallPriority; | |
69 | |
70 // Specifies what the client should do after installation. | |
71 typedef enum PostInstallAction { | |
72 POST_INSTALL_ACTION_DEFAULT = 0, | |
73 | |
74 // Caller should exit silently. | |
75 POST_INSTALL_ACTION_EXIT_SILENTLY = 1, | |
76 | |
77 // Caller should launch the command. | |
78 POST_INSTALL_ACTION_LAUNCH_COMMAND = 2, | |
79 | |
80 // Caller should launch the command and exit silently. | |
81 POST_INSTALL_ACTION_EXIT_SILENTLY_ON_LAUNCH_COMMAND = 3, | |
82 | |
83 // The caller should ask the user to restart the browser. If the value of | |
84 // IApp's browser is supported and postInstallUrl is valid, the client should | |
85 // offer to restart the browser. If the user chooses to do so, the client | |
86 // should launch the ICurrentState::postInstallUrl after shutting down and | |
87 // restarting the browser. | |
88 POST_INSTALL_ACTION_RESTART_BROWSER = 4, | |
89 | |
90 // Similar to POST_INSTALL_ACTION_RESTART_BROWSER, but ask the user to shut | |
91 // down all browsers. | |
92 POST_INSTALL_ACTION_RESTART_ALL_BROWSERS = 5, | |
93 | |
94 // The caller should ask the user to reboot the machine. | |
95 POST_INSTALL_ACTION_REBOOT = 6, | |
96 } PostInstallAction; | |
97 | |
98 [ | |
99 object, | |
100 dual, | |
101 uuid(76607e7e-c0ff-4dd3-b134-7fc3724ee66a), | |
102 helpstring("IGoogleUpdate3 Interface"), | |
103 pointer_default(unique) | |
104 ] | |
105 interface IGoogleUpdate3 : IDispatch { | |
106 // TODO(Omaha): Perhaps this interface exposes helpers such as | |
107 // RestartBrowsers, etc. | |
108 | |
109 // Returns the count of the AppBundles in this IGoogleUpdate3 interface. | |
110 [id(1), propget] HRESULT Count([out, retval] long* count); | |
111 | |
112 // Returns an IDispatch of the AppBundle in this IGoogleUpdate3 interface at | |
113 // the specified 0-based index. This property has the dispid of DISPID_VALUE | |
114 // to make it the default property of IGoogleUpdate3. | |
115 [id(DISPID_VALUE), propget] HRESULT Item([in] long index, | |
116 [out, retval] IDispatch** bundle); | |
117 // Returns an IDispatch to a newly created empty AppBundle. | |
118 [id(2)] HRESULT createAppBundle([out, retval] IDispatch** app_bundle); | |
119 } | |
120 | |
121 [ | |
122 object, | |
123 dual, | |
124 uuid(9a527c99-02cb-49eb-a14f-225c25cb76dc), | |
125 helpstring("IAppBundle Interface"), | |
126 pointer_default(unique) | |
127 ] | |
128 interface IAppBundle : IDispatch { | |
129 // TODO(omaha3): AppBundle::display_name_ is never used. Should we remove? | |
130 [propget] HRESULT displayName([out, retval] BSTR*); | |
131 [propput] HRESULT displayName([in] BSTR); | |
132 | |
133 [propget] HRESULT displayLanguage([out, retval] BSTR*); | |
134 [propput] HRESULT displayLanguage([in] BSTR); | |
135 | |
136 [propget] HRESULT installSource([out, retval] BSTR*); | |
137 [propput] HRESULT installSource([in] BSTR); | |
138 | |
139 [propget] HRESULT originURL([out, retval] BSTR*); | |
140 [propput] HRESULT originURL([in] BSTR); | |
141 | |
142 [propget] HRESULT offlineDirectory([out, retval] BSTR* offline_dir); | |
143 [propput] HRESULT offlineDirectory([in] BSTR offline_dir); | |
144 | |
145 [propget] HRESULT sessionId([out, retval] BSTR* session_id); | |
146 [propput] HRESULT sessionId([in] BSTR session_id); | |
147 | |
148 // The priority property determines download speed/priority and the number/ | |
149 // frequency of retries. Use values from the InstallPriority enum. | |
150 [propget] HRESULT priority([out, retval] long* priority); | |
151 [propput] HRESULT priority([in] long priority); | |
152 | |
153 // Returns the count of the Apps in the AppBundle. | |
154 [id(1), propget] HRESULT Count([out, retval] long* count); | |
155 | |
156 // Returns an IDispatch of the App in the AppBundle at the specified 0-based | |
157 // index. This property has the dispid of DISPID_VALUE to make it the default | |
158 // property of IAppBundle. | |
159 [id(DISPID_VALUE), propget] HRESULT Item([in] long index, | |
160 [out, retval] IDispatch** app); | |
161 | |
162 // Impersonation and primary tokens set by the client. Typically only | |
163 // set by the gupdatem service. The gupdatem service exposes a narrow | |
164 // interface to medium integrity clients. When a medium integrity client calls | |
165 // into the gupdatem service, the gupdatem service captures the token of the | |
166 // caller, and then calls put_altTokens() on the gupdate service, so that the | |
167 // gupdate service can use it for future download() and install() requests. | |
168 [propput] HRESULT altTokens([in] ULONG_PTR impersonation_token, | |
169 [in] ULONG_PTR primary_token, | |
170 [in] DWORD caller_proc_id); | |
171 | |
172 // Sets a HWND to associate with the client, if any. This will be used as | |
173 // the parent window for any dialogs that the server may need to display. | |
174 [propput] HRESULT parentHWND([in] ULONG_PTR hwnd); | |
175 | |
176 // Initializes the bundle with the properties that have been set. | |
177 [id(2)] HRESULT initialize(); | |
178 | |
179 // Returns an IDispatch to a new App for the specified app id. | |
180 // The App is added to the Bundle. | |
181 [id(3)] HRESULT createApp([in] BSTR app_id, | |
182 [out, retval] IDispatch** app); | |
183 | |
184 // Returns an IDispatch to a newly created App for the specified app ID. The | |
185 // App is populated with information from the existing installation and added | |
186 // to the Bundle. Fails if the specified app is not installed. | |
187 [id(4)] HRESULT createInstalledApp([in] BSTR app_id, | |
188 [out, retval] IDispatch** app); | |
189 | |
190 // Creates App instances for all installed apps managed by this Omaha | |
191 // instance. Each App is populated with information from the existing install. | |
192 [id(5)] HRESULT createAllInstalledApps(); | |
193 | |
194 // These methods are non-blocking. The operation is scheduled. | |
195 [id(6)] HRESULT checkForUpdate(); | |
196 [id(7)] HRESULT download(); | |
197 [id(8)] HRESULT install(); | |
198 | |
199 // All-in-one function for automatically updating all apps. Populates the | |
200 // bundle then schedules the update, which includes the update check and | |
201 // download and install, if necessary. | |
202 [id(9)] HRESULT updateAllApps(); | |
203 | |
204 // These three methods are non-blocking. The operation is requested. | |
205 [id(10)] HRESULT stop(); | |
206 [id(11)] HRESULT pause(); | |
207 [id(12)] HRESULT resume(); | |
208 | |
209 // Returns true if the bundle has an uncompleted non-blocking request. | |
210 [id(13)] HRESULT isBusy([out, retval] VARIANT_BOOL* is_busy); | |
211 | |
212 // Downloads a package of an installed application. | |
213 [id(14)] HRESULT downloadPackage([in] BSTR app_id, [in] BSTR package_name); | |
214 | |
215 // TODO(omaha): Define this aggregated bundle state. Is this really a property | |
216 // or should it be getCurrentState? | |
217 // The server and bundle are the only thing that can provide aggregated | |
218 // time estimates for downloads. Also, aggregate percentage is not currently | |
219 // available to the client because the total bytes to download is not | |
220 // available from App in all post-update check states. | |
221 // To do this, we will probably need to know the total expected download | |
222 // size for all packages to be installed - those that are required or in use - | |
223 // by the time the update check phase is complete. | |
224 [id(15), propget] HRESULT currentState([out, retval] VARIANT* current_state); | |
225 }; | |
226 | |
227 [ | |
228 object, | |
229 dual, | |
230 uuid(2ea2902f-31b3-45fe-a27a-62bb796e74c0), | |
231 helpstring("IApp Interface"), | |
232 pointer_default(unique) | |
233 ] | |
234 interface IApp : IDispatch { | |
235 // Returns a version IDispatch object. | |
236 [id(1), propget] HRESULT currentVersion([out, retval] IDispatch** current); | |
237 [id(2), propget] HRESULT nextVersion([out, retval] IDispatch** next); | |
238 | |
239 [propget] HRESULT appId([out, retval] BSTR*); | |
240 | |
241 [propget] HRESULT displayName([out, retval] BSTR*); | |
242 [propput] HRESULT displayName([in] BSTR); | |
243 | |
244 [propget] HRESULT language([out, retval] BSTR*); | |
245 [propput] HRESULT language([in] BSTR); | |
246 | |
247 [propget] HRESULT ap([out, retval] BSTR*); | |
248 [propput] HRESULT ap([in] BSTR); | |
249 | |
250 [propget] HRESULT ttToken([out, retval] BSTR*); | |
251 [propput] HRESULT ttToken([in] BSTR); | |
252 | |
253 [propget] HRESULT iid([out, retval] BSTR*); | |
254 [propput] HRESULT iid([in] BSTR); | |
255 | |
256 [propget] HRESULT brandCode([out, retval] BSTR*); | |
257 [propput] HRESULT brandCode([in] BSTR); | |
258 | |
259 [propget] HRESULT clientId([out, retval] BSTR*); | |
260 [propput] HRESULT clientId([in] BSTR); | |
261 | |
262 [propget] HRESULT labels([out, retval] BSTR*); | |
263 [propput] HRESULT labels([in] BSTR); | |
264 | |
265 [propget] HRESULT referralId([out, retval] BSTR*); | |
266 [propput] HRESULT referralId([in] BSTR); | |
267 | |
268 // Use values from the BrowserType enum. | |
269 [propget] HRESULT browserType([out, retval] UINT*); | |
270 [propput] HRESULT browserType([in] UINT); | |
271 | |
272 [propget] HRESULT clientInstallData([out, retval] BSTR*); | |
273 [propput] HRESULT clientInstallData([in] BSTR); | |
274 | |
275 [propget] HRESULT serverInstallDataIndex([out, retval] BSTR*); | |
276 [propput] HRESULT serverInstallDataIndex([in] BSTR); | |
277 | |
278 // Set as soon as possible. Error pings are disabled until set to true. | |
279 [propget] HRESULT isEulaAccepted([out, retval] VARIANT_BOOL*); | |
280 [propput] HRESULT isEulaAccepted([in] VARIANT_BOOL); | |
281 | |
282 [propget] HRESULT usageStatsEnable([out, retval] UINT*); | |
283 [propput] HRESULT usageStatsEnable([in] UINT); | |
284 | |
285 [propget] HRESULT installTimeDiffSec([out, retval] UINT*); | |
286 | |
287 // Returns an ICurrentState interface. The object underlying the interface has | |
288 // static data that does not get updated as the server state changes. To get | |
289 // the most "current" state, the currentState property needs to be queried | |
290 // again. | |
291 [propget] HRESULT currentState([out, retval] IDispatch**); | |
292 }; | |
293 | |
294 [ | |
295 object, | |
296 dual, | |
297 uuid(6f5a84a3-867a-47bb-848b-a4cd8ffa8fce), | |
298 helpstring("IAppVersion Interface"), | |
299 pointer_default(unique) | |
300 ] | |
301 interface IAppVersion : IDispatch { | |
302 [propget] HRESULT version([out, retval] BSTR*); | |
303 | |
304 // [propget] HRESULT installManifest([out, retval] BSTR*); | |
305 | |
306 // Returns the count of the Packages in the AppVersion. | |
307 [propget] HRESULT packageCount([out, retval] long* count); | |
308 | |
309 // Returns an IDispatch of the Package in the AppVersion at the specified | |
310 // 0-based index. | |
311 [propget] HRESULT package([in] long index, | |
312 [out, retval] IDispatch** package); | |
313 }; | |
314 | |
315 [ | |
316 object, | |
317 dual, | |
318 uuid(593e29d1-4adf-4f5d-ade8-a0836155c8a3), | |
319 helpstring("IPackage Interface"), | |
320 pointer_default(unique) | |
321 ] | |
322 interface IPackage : IDispatch { | |
323 // Retrieves the package from the package cache and copies it to the | |
324 // directory provided. Returns an error is the package is not available | |
325 // locally. | |
326 [id(1)] HRESULT get([in] BSTR dir); | |
327 | |
328 // Returns true if the package has been downloaded and is available | |
329 // locally. | |
330 [propget] HRESULT isAvailable([out, retval] VARIANT_BOOL*); | |
331 | |
332 // Returns the manifest name of the package. | |
333 [propget] HRESULT filename([out, retval] BSTR*); | |
334 }; | |
335 | |
336 // TODO(omaha3): We should figure out what else we are going to want in this | |
337 // interface before dogfood even if we do not implement it. | |
338 [ | |
339 object, | |
340 dual, | |
341 uuid(9df22aa7-720e-4216-9cb4-727781edac1a), | |
342 helpstring("ICurrentState Interface"), | |
343 pointer_default(unique) | |
344 ] | |
345 interface ICurrentState : IDispatch { | |
346 // This interface is exposed to web clients! | |
347 // TODO(omaha3): Update valid comments once we settle on an implementation. | |
348 | |
349 // A value from the CurrentState enum. This value determines which of the | |
350 // properties below are valid. | |
351 [propget] HRESULT stateValue([out, retval] LONG*); | |
352 | |
353 // The remaining properties are only valid in the specified states. For all | |
354 // other states, the values are not specified. | |
355 | |
356 // This property is valid only when stateValue is STATE_UPDATE_AVAILABLE. | |
357 [propget] HRESULT availableVersion([out, retval] BSTR*); | |
358 | |
359 // The following three properties are only valid when stateValue is | |
360 // STATE_WAITING_TO_DOWNLOAD, STATE_RETRYING_DOWNLOAD, STATE_DOWNLOADING, | |
361 // STATE_DOWNLOAD_COMPLETE, STATE_EXTRACTING, | |
362 // STATE_APPLYING_DIFFERENTIAL_PATCH, or STATE_READY_TO_INSTALL. | |
363 | |
364 // Bytes downloaded so far. | |
365 [propget] HRESULT bytesDownloaded([out, retval] ULONG*); | |
366 | |
367 // Total bytes to download. | |
368 [propget] HRESULT totalBytesToDownload([out, retval] ULONG*); | |
369 | |
370 // Estimated download time remaining in ms. -1 indicates unknown. | |
371 // Progress may not always be available, so clients should handle the -1 case. | |
372 [propget] HRESULT downloadTimeRemainingMs([out, retval] LONG*); | |
373 | |
374 [propget] HRESULT nextRetryTime([out, retval] ULONGLONG*); | |
375 | |
376 // TODO(omaha): Need some way to indicate reconnecting, retrying, etc. | |
377 | |
378 // The following two properties are only valid when stateValue is | |
379 // STATE_INSTALLING or STATE_INSTALL_COMPLETE. | |
380 | |
381 // Current install progress in percentage from 0 to 100. -1 indicates unknown. | |
382 // Progress may not always be available, so clients should handle the -1 case. | |
383 [propget] HRESULT installProgress([out, retval] LONG*); | |
384 | |
385 // Estimated download time remaining in ms. -1 indicates unknown. | |
386 // Progress may not always be available, so clients should handle the -1 case. | |
387 [propget] HRESULT installTimeRemainingMs([out, retval] LONG*); | |
388 | |
389 // The following four properties are only valid when stateValue is | |
390 // STATE_ERROR: | |
391 | |
392 // Returns true if the app has been canceled. | |
393 [propget] HRESULT isCanceled([out, retval] VARIANT_BOOL* is_canceled); | |
394 | |
395 // Error code. | |
396 [propget] HRESULT errorCode([out, retval] LONG*); | |
397 | |
398 // Error extra code. | |
399 [propget] HRESULT extraCode1([out, retval] LONG*); | |
400 | |
401 // The following three properties are only valid when stateValue is | |
402 // STATE_ERROR or STATE_INSTALL_COMPLETE. | |
403 // TODO(omaha3): If STATE_DOWNLOAD_COMPLETE or STATE_READY_TO_INSTALL becomes | |
404 // a terminal state, does it support completion messages? | |
405 | |
406 // Completion message, localized in the specified language. | |
407 // TODO(omaha3): If we're going to have bundle error messages too, should the | |
408 // language be at bundle level? Should bundle have its own language setter? | |
409 [propget] HRESULT completionMessage([out, retval] BSTR*); | |
410 | |
411 // Application installer result code. This is to be used as additional | |
412 // information only. Success/failure should be determined using errorCode. | |
413 // This is an error if errorCode is GOOPDATEINSTALL_E_INSTALLER_FAILED. | |
414 [propget] HRESULT installerResultCode([out, retval] LONG*); | |
415 | |
416 // Application installer extra code. | |
417 [propget] HRESULT installerResultExtraCode1([out, retval] LONG*); | |
418 | |
419 // A command that needs to be launched by the client after installation. | |
420 [propget] HRESULT postInstallLaunchCommandLine([out, retval] BSTR*); | |
421 | |
422 // URL to be launched after restarting the browser. | |
423 [propget] HRESULT postInstallUrl([out, retval] BSTR*); | |
424 | |
425 // Returns a PostInstallAction value indicating the action to be taken by the | |
426 // client after installation. | |
427 [propget] HRESULT postInstallAction([out, retval] LONG*); | |
428 } | |
429 | |
430 [ | |
431 object, | |
432 dual, | |
433 uuid(9f2f5f08-a28f-414f-8fe5-31d77b2af211), | |
434 helpstring("IRegistrationUpdateHook Interface"), | |
435 pointer_default(unique), | |
436 ] | |
437 interface IRegistrationUpdateHook : IDispatch { | |
438 HRESULT UpdateRegistry([in] BSTR app_id, [in] VARIANT_BOOL is_machine); | |
439 }; | |
440 | |
441 [ | |
442 object, | |
443 uuid(a3c270b9-98bd-4998-91a4-3f11adad0377), | |
444 helpstring("ICredentialDialog Interface"), | |
445 pointer_default(unique), | |
446 ] | |
447 interface ICredentialDialog : IUnknown { | |
448 HRESULT QueryUserForCredentials([in] ULONG_PTR owner_hwnd, | |
449 [in] BSTR server, | |
450 [in] BSTR message, | |
451 [out] BSTR* username, | |
452 [out] BSTR* password); | |
453 }; | |
454 | |
455 // BEGIN gupdatem interfaces. | |
456 | |
457 // The following interfaces are exposed as a narrower version of the | |
458 // IGoogleUpdate3 interface from the gupdatem service. These interfaces are | |
459 // meant for use from medium and low integrity clients. | |
460 | |
461 [ | |
462 object, | |
463 dual, | |
464 uuid(c90fc75b-9bdc-47aa-9f3c-59f416c91aef), | |
465 helpstring("IGoogleUpdate3Web Interface"), | |
466 pointer_default(unique), | |
467 ] | |
468 interface IGoogleUpdate3Web : IDispatch { | |
469 HRESULT createAppBundleWeb([out, retval] IDispatch** app_bundle_web); | |
470 }; | |
471 | |
472 [ | |
473 object, | |
474 uuid(d8f0740e-8970-44e4-ad03-46394ba7d3e7), | |
475 helpstring("IGoogleUpdate3WebSecurity Interface"), | |
476 pointer_default(unique), | |
477 ] | |
478 interface IGoogleUpdate3WebSecurity : IUnknown { | |
479 HRESULT setOriginURL([in] BSTR origin_url); | |
480 }; | |
481 | |
482 [ | |
483 object, | |
484 dual, | |
485 uuid(3aaa8bbc-dc93-49d9-9b87-c8ded3b2bb40), | |
486 helpstring("IAppBundleWeb Interface"), | |
487 pointer_default(unique), | |
488 ] | |
489 interface IAppBundleWeb : IDispatch { | |
490 [id(2)] HRESULT createApp([in] BSTR app_guid, | |
491 [in] BSTR brand_code, | |
492 [in] BSTR language, | |
493 [in] BSTR ap); | |
494 [id(3)] HRESULT createInstalledApp([in] BSTR app_id); | |
495 [id(4)] HRESULT createAllInstalledApps(); | |
496 | |
497 [propget] HRESULT displayLanguage([out, retval] BSTR*); | |
498 [propput] HRESULT displayLanguage([in] BSTR); | |
499 | |
500 [propput] HRESULT parentHWND([in] ULONG_PTR hwnd); | |
501 | |
502 [propget] HRESULT length([out, retval] int* index); | |
503 [id(DISPID_VALUE), propget] HRESULT appWeb( | |
504 [in] int index, [out, retval] IDispatch** app_web); | |
505 | |
506 HRESULT initialize(); | |
507 | |
508 HRESULT checkForUpdate(); | |
509 HRESULT download(); | |
510 HRESULT install(); | |
511 | |
512 HRESULT pause(); | |
513 HRESULT resume(); | |
514 HRESULT cancel(); | |
515 | |
516 HRESULT downloadPackage([in] BSTR app_id, [in] BSTR package_name); | |
517 | |
518 [propget] HRESULT currentState([out, retval] VARIANT* current_state); | |
519 }; | |
520 | |
521 [ | |
522 object, | |
523 dual, | |
524 uuid(973d746a-1df2-404a-b66b-ea632417866f), | |
525 helpstring("IAppWeb Interface"), | |
526 pointer_default(unique), | |
527 ] | |
528 interface IAppWeb : IDispatch { | |
529 [propget] HRESULT appId([out, retval] BSTR*); | |
530 | |
531 // Returns an IAppVersionWeb IDispatch object. | |
532 [propget] HRESULT currentVersionWeb([out, retval] IDispatch** current); | |
533 [propget] HRESULT nextVersionWeb([out, retval] IDispatch** next); | |
534 | |
535 HRESULT cancel(); | |
536 [propget] HRESULT currentState([out, retval] IDispatch** current_state); | |
537 HRESULT launch(); | |
538 HRESULT uninstall(); | |
539 }; | |
540 | |
541 [ | |
542 object, | |
543 dual, | |
544 uuid(afc15738-2cc4-4aac-9b19-c1831428d04f), | |
545 helpstring("IAppVersionWeb Interface"), | |
546 pointer_default(unique) | |
547 ] | |
548 interface IAppVersionWeb : IDispatch { | |
549 [propget] HRESULT version([out, retval] BSTR*); | |
550 | |
551 // Returns the count of the Packages in the AppVersion. | |
552 [propget] HRESULT packageCount([out, retval] long* count); | |
553 | |
554 // TODO(omaha3): Implement this after a security review. | |
555 // Returns an IDispatch of the Package in the AppVersion at the specified | |
556 // 0-based index. | |
557 [propget] HRESULT packageWeb([in] long index, | |
558 [out, retval] IDispatch** package); | |
559 }; | |
560 | |
561 [ | |
562 object, | |
563 dual, | |
564 uuid(4dafb7ab-e8d8-4003-87b8-678e15b4c221), | |
565 helpstring("ICoCreateAsyncStatus Interface"), | |
566 pointer_default(unique) | |
567 ] | |
568 interface ICoCreateAsyncStatus : IDispatch { | |
569 [propget] HRESULT isDone([out, retval] VARIANT_BOOL* is_done); | |
570 [propget] HRESULT completionHResult([out, retval] LONG* hr); | |
571 [propget] HRESULT createdInstance([out, retval] IDispatch** instance); | |
572 }; | |
573 | |
574 [ | |
575 object, | |
576 uuid(7fbb29e7-6703-4624-ad84-c8500f57c5c4), | |
577 helpstring("ICoCreateAsync Interface"), | |
578 pointer_default(unique) | |
579 ] | |
580 interface ICoCreateAsync : IUnknown { | |
581 HRESULT createOmahaMachineServerAsync( | |
582 [in] BSTR origin_url, | |
583 [in] BOOL create_elevated, | |
584 [out, retval] ICoCreateAsyncStatus** status); | |
585 }; | |
586 | |
587 // END gupdatem interfaces. | |
588 | |
589 // BEGIN Legacy google_update_idl interfaces. | |
590 | |
591 [ | |
592 object, | |
593 uuid(791df12c-01ff-43a1-a3d7-5b1b98a9248a), | |
594 oleautomation, | |
595 nonextensible, | |
596 pointer_default(unique) | |
597 ] | |
598 interface IBrowserHttpRequest2 : IUnknown { | |
599 // This method will send request/data from the browser process. | |
600 // @param url URL where request will be send. | |
601 // @param post_data POST data, if any. Can be NULL. | |
602 // @param request_headers HTTP request headers, if any. Can be NULL. | |
603 // @param response_headers_needed HTTP response headers that are needed. | |
604 // Should be one of the values listed here: | |
605 // http://msdn.microsoft.com/aa385351.aspx | |
606 // The input is a SAFEARRAY of DWORD. Can be a | |
607 // VT_EMPTY. | |
608 // @param response_headers HTTP response headers, returned as SAFEARRAY | |
609 // of BSTR. The values corresponding one-to-one | |
610 // with the response_headers_needed values. Can | |
611 // be NULL if response_headers_needed==VT_EMPTY | |
612 // @param response_code HTTP response code. | |
613 // @param cache_filename Cache file that contains the response data. | |
614 HRESULT Send([in] BSTR url, | |
615 [in] BSTR post_data, | |
616 [in] BSTR request_headers, | |
617 [in] VARIANT response_headers_needed, | |
618 [out] VARIANT* response_headers, | |
619 [out] DWORD* response_code, | |
620 [out] BSTR* cache_filename); | |
621 }; | |
622 | |
623 [ | |
624 object, | |
625 oleautomation, | |
626 uuid(28839a52-cddf-4c7c-ac21-b1c4fc1be7ef), | |
627 helpstring("Google Update IProcessLauncher Interface"), | |
628 pointer_default(unique) | |
629 ] | |
630 interface IProcessLauncher : IUnknown { | |
631 // @param cmd_line The full command line to execute. | |
632 HRESULT LaunchCmdLine([in, string] const WCHAR* cmd_line); | |
633 | |
634 // @param browser_type The browser to start. | |
635 // @param url The url to launch the browser with. | |
636 HRESULT LaunchBrowser([in] DWORD browser_type, | |
637 [in, string] const WCHAR* url); | |
638 | |
639 // @param app_id Unique id to identify the calling client application | |
640 // @param event_id Unique id for the command | |
641 // @param caller_proc_id The process id of the calling process | |
642 // @param proc_handle The process handle valid in the caller's context | |
643 HRESULT LaunchCmdElevated([in, string] const WCHAR* app_guid, | |
644 [in, string] const WCHAR* cmd_id, | |
645 [in] DWORD caller_proc_id, | |
646 [out] ULONG_PTR* proc_handle); | |
647 }; | |
648 | |
649 [ | |
650 object, | |
651 oleautomation, | |
652 uuid(4d3a05b9-5ef2-46f9-a4fe-81b01637ed47), | |
653 helpstring("Google Update IOneClickProcessLauncher Interface"), | |
654 pointer_default(unique) | |
655 ] | |
656 interface IOneClickProcessLauncher : IUnknown { | |
657 HRESULT LaunchAppCommand([in, string] const WCHAR* app_guid, | |
658 [in, string] const WCHAR* cmd_id); | |
659 }; | |
660 | |
661 typedef enum { | |
662 COMPLETION_CODE_SUCCESS = 1, | |
663 COMPLETION_CODE_SUCCESS_CLOSE_UI, | |
664 COMPLETION_CODE_ERROR, | |
665 COMPLETION_CODE_RESTART_ALL_BROWSERS, | |
666 COMPLETION_CODE_REBOOT, | |
667 COMPLETION_CODE_RESTART_BROWSER, | |
668 COMPLETION_CODE_RESTART_ALL_BROWSERS_NOTICE_ONLY, | |
669 COMPLETION_CODE_REBOOT_NOTICE_ONLY, | |
670 COMPLETION_CODE_RESTART_BROWSER_NOTICE_ONLY, | |
671 COMPLETION_CODE_RUN_COMMAND, | |
672 } LegacyCompletionCodes; | |
673 | |
674 [ | |
675 object, | |
676 oleautomation, | |
677 uuid(cd858925-6866-4f02-b9e9-b5b08e353be7), | |
678 helpstring("GoogleUpdate UI-specific events Interface"), | |
679 pointer_default(unique) | |
680 ] | |
681 interface IProgressWndEvents : IUnknown { | |
682 // The UI is closing down. The user has clicked on either the "X" or the | |
683 // other buttons of the UI to close the window. | |
684 HRESULT DoClose(); | |
685 | |
686 // Pause has been clicked on. | |
687 HRESULT DoPause(); | |
688 | |
689 // Resume has been clicked on. | |
690 HRESULT DoResume(); | |
691 | |
692 // RestartBrowsers button has been clicked on. | |
693 HRESULT DoRestartBrowsers(); | |
694 | |
695 // Reboot button has been clicked on. | |
696 HRESULT DoReboot(); | |
697 | |
698 // Launch Browser. | |
699 HRESULT DoLaunchBrowser([in, string] const WCHAR* url); | |
700 }; | |
701 | |
702 | |
703 [ | |
704 object, | |
705 oleautomation, | |
706 uuid(ff612905-d787-4f53-ab5e-5ab5971b10a7), | |
707 helpstring("IJobObserver Interface"), | |
708 pointer_default(unique) | |
709 ] | |
710 interface IJobObserver : IUnknown { | |
711 HRESULT OnShow(); | |
712 HRESULT OnCheckingForUpdate(); | |
713 HRESULT OnUpdateAvailable([in, string] const WCHAR* version_string); | |
714 HRESULT OnWaitingToDownload(); | |
715 HRESULT OnDownloading([in] int time_remaining_ms, [in] int pos); | |
716 HRESULT OnWaitingToInstall(); | |
717 HRESULT OnInstalling(); | |
718 HRESULT OnPause(); | |
719 HRESULT OnComplete([in] LegacyCompletionCodes code, | |
720 [in, string] const WCHAR* reserved); | |
721 HRESULT SetEventSink([in] IProgressWndEvents* ui_sink); | |
722 }; | |
723 | |
724 [ | |
725 object, | |
726 oleautomation, | |
727 uuid(a62c03e7-56ef-4109-a920-d3c06665223e), | |
728 helpstring("IGoogleUpdate Interface"), | |
729 pointer_default(unique) | |
730 ] | |
731 interface IGoogleUpdate : IUnknown { | |
732 // @param guid The guid for the app to be updated. | |
733 // @param observer The eventing interface. | |
734 HRESULT CheckForUpdate([in, string] const WCHAR* guid, | |
735 [in] IJobObserver* observer); | |
736 | |
737 // @param guid The guid for the app to be updated. | |
738 // @param observer The eventing interface. | |
739 HRESULT Update([in, string] const WCHAR* guid, | |
740 [in] IJobObserver* observer); | |
741 }; | |
742 | |
743 // IGoogleUpdateCore is an internal Omaha interface. | |
744 [ | |
745 object, | |
746 oleautomation, | |
747 uuid(857a3d7a-6b13-45f3-a19b-75870d0c2823), | |
748 helpstring("Google Update Core Interface"), | |
749 pointer_default(unique) | |
750 ] | |
751 interface IGoogleUpdateCore : IUnknown | |
752 { | |
753 // Runs a command elevated. | |
754 // | |
755 // @param app_id Unique id to identify the calling client application | |
756 // @param event_id Unique id for the command | |
757 // @param caller_proc_id The process id of the calling process | |
758 // @param proc_handle The process handle valid in the caller's context | |
759 HRESULT LaunchCmdElevated([in, string] const WCHAR* app_guid, | |
760 [in, string] const WCHAR* cmd_id, | |
761 [in] DWORD caller_proc_id, | |
762 [out] ULONG_PTR* proc_handle); | |
763 }; | |
764 | |
765 // END Legacy google_update_idl interfaces. | |
766 | |
767 [ | |
768 uuid(5e3de9e9-0248-4fab-ac1c-01b86cf9790e), | |
769 version(1.0), | |
770 helpstring("Omaha 3.0 Type Library") | |
771 ] | |
772 library GoogleUpdate3Lib { | |
773 importlib("stdole2.tlb"); | |
774 | |
775 // These Interfaces are forward declared to ensure that they are described in | |
776 // the generated TLB file. This is required for ATL to correctly implement the | |
777 // corresponding IDispatch interfaces. | |
778 interface IGoogleUpdate3; | |
779 interface IAppBundle; | |
780 interface IApp; | |
781 interface IAppVersion; | |
782 interface IPackage; | |
783 interface ICurrentState; | |
784 | |
785 interface IGoogleUpdate3Web; | |
786 interface IAppBundleWeb; | |
787 interface IAppWeb; | |
788 interface IAppVersionWeb; | |
789 interface ICoCreateAsyncStatus; | |
790 | |
791 [ | |
792 uuid(cec92c56-68e4-4494-ba79-eb3a71ad8473), | |
793 helpstring("GoogleUpdate3 Class for per-user applications") | |
794 ] | |
795 coclass GoogleUpdate3UserClass { | |
796 [default] interface IDispatch; | |
797 } | |
798 | |
799 [ | |
800 uuid(edc2caa1-2001-4835-a04a-565a5cde5f7f), | |
801 helpstring("GoogleUpdate3 Service Class for machine applications") | |
802 ] | |
803 coclass GoogleUpdate3ServiceClass { | |
804 [default] interface IDispatch; | |
805 } | |
806 | |
807 [ | |
808 uuid(b5bae3dd-809e-4be3-a421-f5d3f17a03db), | |
809 helpstring("GoogleUpdate3Web for user applications") | |
810 ] | |
811 coclass GoogleUpdate3WebUserClass { | |
812 [default] interface IDispatch; | |
813 } | |
814 | |
815 [ | |
816 uuid(31e52f9c-5dba-4a20-b7d4-4ade46fbf9e9), | |
817 helpstring("Pass-through broker for the GoogleUpdate3WebServiceClass") | |
818 ] | |
819 coclass GoogleUpdate3WebMachineClass { | |
820 [default] interface IDispatch; | |
821 } | |
822 | |
823 [ | |
824 uuid(2e119b1c-8a13-4e21-92c2-1b34cab1f028), | |
825 helpstring("GoogleUpdate3Web") | |
826 ] | |
827 coclass GoogleUpdate3WebServiceClass { | |
828 [default] interface IDispatch; | |
829 } | |
830 | |
831 [ | |
832 uuid(0e2ee4d0-7ef1-45d0-aae8-2506c0ba649c), | |
833 helpstring("Fallback mechanism if GoogleUpdate3WebServiceClass fails") | |
834 ] | |
835 coclass GoogleUpdate3WebMachineFallbackClass { | |
836 [default] interface IDispatch; | |
837 } | |
838 | |
839 [ | |
840 uuid(733eb758-7cf0-4927-a3b9-75eb28490613), | |
841 helpstring("CurrentStateUserClass") | |
842 ] | |
843 coclass CurrentStateUserClass { | |
844 [default] interface ICurrentState; | |
845 } | |
846 | |
847 [ | |
848 uuid(dad290ab-07df-443d-9a5a-4434474353ed), | |
849 helpstring("CurrentStateMachineClass") | |
850 ] | |
851 coclass CurrentStateMachineClass { | |
852 [default] interface ICurrentState; | |
853 } | |
854 | |
855 [ | |
856 uuid(5e79da64-77df-4c1f-9184-c6b5f035e3d9), | |
857 helpstring("CoCreateAsyncClass") | |
858 ] | |
859 coclass CoCreateAsyncClass { | |
860 [default] interface IUnknown; | |
861 } | |
862 | |
863 [ | |
864 uuid(a663a8e3-b533-4153-8ef6-3c5823de9280), | |
865 helpstring("CredentialDialogUserClass") | |
866 ] | |
867 coclass CredentialDialogUserClass { | |
868 [default] interface IUnknown; | |
869 } | |
870 | |
871 [ | |
872 uuid(341390f2-6214-4981-a2ae-738205e73590), | |
873 helpstring("CredentialDialogMachineClass") | |
874 ] | |
875 coclass CredentialDialogMachineClass { | |
876 [default] interface IUnknown; | |
877 } | |
878 | |
879 [ | |
880 uuid(___AUTO_GENERATED_GUID___), | |
881 helpstring("GoogleComProxyMachineClass") | |
882 ] | |
883 coclass GoogleComProxyMachineClass { | |
884 [default] interface IUnknown; | |
885 } | |
886 | |
887 [ | |
888 uuid(___AUTO_GENERATED_GUID___), | |
889 helpstring("GoogleComProxyUserClass") | |
890 ] | |
891 coclass GoogleComProxyUserClass { | |
892 [default] interface IUnknown; | |
893 } | |
894 | |
895 // BEGIN Legacy google_update_idl coclasses. | |
896 | |
897 [ | |
898 uuid(f235f88c-3de7-4195-a0e9-105ba38344cc), | |
899 helpstring("ProcessLauncherClass Class") | |
900 ] | |
901 coclass ProcessLauncherClass { | |
902 [default] interface IUnknown; | |
903 } | |
904 | |
905 [ | |
906 uuid(bb42bfd1-b0eb-449c-8882-fb810c2738d0), | |
907 helpstring("OneClickUserProcessLauncherClass Class") | |
908 ] | |
909 coclass OneClickUserProcessLauncherClass { | |
910 [default] interface IOneClickProcessLauncher; | |
911 } | |
912 | |
913 [ | |
914 uuid(5457eff7-c0b3-4672-a6b4-58f93951f1e0), | |
915 helpstring("OneClickMachineProcessLauncherClass Class") | |
916 ] | |
917 coclass OneClickMachineProcessLauncherClass { | |
918 [default] interface IOneClickProcessLauncher; | |
919 } | |
920 | |
921 [ | |
922 uuid(660baf72-a9ef-4fb1-81ae-9395ca6c39cf), | |
923 helpstring("OnDemand updates for per-user applications.") | |
924 ] | |
925 coclass OnDemandUserAppsClass { | |
926 [default] interface IUnknown; | |
927 } | |
928 | |
929 [ | |
930 uuid(0dd31efc-0cf5-4ec5-9799-f1a8819acea4), | |
931 helpstring("OnDemand pass-through broker for machine applications.") | |
932 ] | |
933 coclass OnDemandMachineAppsClass { | |
934 [default] interface IUnknown; | |
935 } | |
936 | |
937 [ | |
938 uuid(19c06b1a-7202-40b4-9903-62927d08f943), | |
939 helpstring("OnDemand updates for per-machine applications.") | |
940 ] | |
941 coclass OnDemandMachineAppsServiceClass { | |
942 [default] interface IUnknown; | |
943 } | |
944 | |
945 [ | |
946 uuid(107e2437-bfe7-4e17-91d9-2866e1373e00), | |
947 helpstring("Fallback for if OnDemandMachineAppsServiceClass fails.") | |
948 ] | |
949 coclass OnDemandMachineAppsFallbackClass { | |
950 [default] interface IUnknown; | |
951 } | |
952 | |
953 [ | |
954 uuid(b0f72540-f2a8-4027-aac8-a39deb0470ad), | |
955 helpstring("GoogleUpdateCore Class") | |
956 ] | |
957 coclass GoogleUpdateCoreClass | |
958 { | |
959 [default] interface IUnknown; | |
960 } | |
961 | |
962 [ | |
963 uuid(b15e7b58-2a81-4f3e-8381-f5db7d3a1f84), | |
964 helpstring("GoogleUpdateCore Machine Class") | |
965 ] | |
966 coclass GoogleUpdateCoreMachineClass | |
967 { | |
968 [default] interface IUnknown; | |
969 } | |
970 | |
971 // END Legacy google_update_idl coclasses. | |
972 }; | |
OLD | NEW |