1 // Copyright 2009-2010 Google Inc.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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 // ========================================================================
19 // When adding interfaces to this file:
20 // * Do not use "Google" or "GoogleUpdate" directly. Instead, use preprocessor
22 // * Add a test for the Google-specific value to
23 // omaha_customization_goopdate_apis_unittest.cc.
27 // These values can be passed to interface methods and/or compared to their
31 // Must be kept in sync with the enum in base/browser_utils.h.
32 typedef enum BrowserType {
35 BROWSER_INTERNET_EXPLORER = 2,
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 {
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,
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,
65 typedef enum InstallPriority {
66 INSTALL_PRIORITY_LOW = 0,
67 INSTALL_PRIORITY_HIGH = 10,
70 // Specifies what the client should do after installation.
71 typedef enum PostInstallAction {
72 POST_INSTALL_ACTION_DEFAULT = 0,
74 // Caller should exit silently.
75 POST_INSTALL_ACTION_EXIT_SILENTLY = 1,
77 // Caller should launch the command.
78 POST_INSTALL_ACTION_LAUNCH_COMMAND = 2,
80 // Caller should launch the command and exit silently.
81 POST_INSTALL_ACTION_EXIT_SILENTLY_ON_LAUNCH_COMMAND = 3,
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,
90 // Similar to POST_INSTALL_ACTION_RESTART_BROWSER, but ask the user to shut
92 POST_INSTALL_ACTION_RESTART_ALL_BROWSERS = 5,
94 // The caller should ask the user to reboot the machine.
95 POST_INSTALL_ACTION_REBOOT = 6,
98 enum AppCommandStatus {
99 // The command has never been executed.
100 COMMAND_STATUS_INIT = 1,
101 // The command is running.
102 COMMAND_STATUS_RUNNING = 2,
103 // An error occurred while launching or monitoring the command.
104 COMMAND_STATUS_ERROR = 3,
105 // The command has completed execution.
106 COMMAND_STATUS_COMPLETE = 4,
112 uuid(6DB17455-4E85-46e7-9D23-E555E4B005AF),
113 helpstring("IGoogleUpdate3 Interface"),
114 pointer_default(unique)
116 interface IGoogleUpdate3 : IDispatch {
117 // TODO(Omaha): Perhaps this interface exposes helpers such as
118 // RestartBrowsers, etc.
120 // Returns the count of the AppBundles in this IGoogleUpdate3 interface.
121 [id(1), propget] HRESULT Count([out, retval] long* count);
123 // Returns an IDispatch of the AppBundle in this IGoogleUpdate3 interface at
124 // the specified 0-based index. This property has the dispid of DISPID_VALUE
125 // to make it the default property of IGoogleUpdate3.
126 [id(DISPID_VALUE), propget] HRESULT Item([in] long index,
127 [out, retval] IDispatch** bundle);
128 // Returns an IDispatch to a newly created empty AppBundle.
129 [id(2)] HRESULT createAppBundle([out, retval] IDispatch** app_bundle);
135 uuid(fe908cdd-22bb-472a-9870-1a0390e42f36),
136 helpstring("IAppBundle Interface"),
137 pointer_default(unique)
139 interface IAppBundle : IDispatch {
140 // TODO(omaha3): AppBundle::display_name_ is never used. Should we remove?
141 [propget] HRESULT displayName([out, retval] BSTR*);
142 [propput] HRESULT displayName([in] BSTR);
144 [propget] HRESULT displayLanguage([out, retval] BSTR*);
145 [propput] HRESULT displayLanguage([in] BSTR);
147 [propget] HRESULT installSource([out, retval] BSTR*);
148 [propput] HRESULT installSource([in] BSTR);
150 [propget] HRESULT originURL([out, retval] BSTR*);
151 [propput] HRESULT originURL([in] BSTR);
153 [propget] HRESULT offlineDirectory([out, retval] BSTR* offline_dir);
154 [propput] HRESULT offlineDirectory([in] BSTR offline_dir);
156 [propget] HRESULT sessionId([out, retval] BSTR* session_id);
157 [propput] HRESULT sessionId([in] BSTR session_id);
159 // Controls whether or not event pings should be sent at the end of
161 [propget] HRESULT sendPings([out, retval] VARIANT_BOOL* send_pings);
162 [propput] HRESULT sendPings([in] VARIANT_BOOL send_pings);
164 // The priority property determines download speed/priority and the number/
165 // frequency of retries. Use values from the InstallPriority enum.
166 [propget] HRESULT priority([out, retval] long* priority);
167 [propput] HRESULT priority([in] long priority);
169 // Returns the count of the Apps in the AppBundle.
170 [id(1), propget] HRESULT Count([out, retval] long* count);
172 // Returns an IDispatch of the App in the AppBundle at the specified 0-based
173 // index. This property has the dispid of DISPID_VALUE to make it the default
174 // property of IAppBundle.
175 [id(DISPID_VALUE), propget] HRESULT Item([in] long index,
176 [out, retval] IDispatch** app);
178 // Impersonation and primary tokens set by the client. Typically only
179 // set by the gupdatem service. The gupdatem service exposes a narrow
180 // interface to medium integrity clients. When a medium integrity client calls
181 // into the gupdatem service, the gupdatem service captures the token of the
182 // caller, and then calls put_altTokens() on the gupdate service, so that the
183 // gupdate service can use it for future download() and install() requests.
184 [propput] HRESULT altTokens([in] ULONG_PTR impersonation_token,
185 [in] ULONG_PTR primary_token,
186 [in] DWORD caller_proc_id);
188 // Sets a HWND to associate with the client, if any. This will be used as
189 // the parent window for any dialogs that the server may need to display.
190 [propput] HRESULT parentHWND([in] ULONG_PTR hwnd);
192 // Initializes the bundle with the properties that have been set.
193 [id(2)] HRESULT initialize();
195 // Returns an IDispatch to a new App for the specified app id.
196 // The App is added to the Bundle.
197 [id(3)] HRESULT createApp([in] BSTR app_id,
198 [out, retval] IDispatch** app);
200 // Returns an IDispatch to a newly created App for the specified app ID. The
201 // App is populated with information from the existing installation and added
202 // to the Bundle. Fails if the specified app is not installed.
203 [id(4)] HRESULT createInstalledApp([in] BSTR app_id,
204 [out, retval] IDispatch** app);
206 // Creates App instances for all installed apps managed by this Omaha
207 // instance. Each App is populated with information from the existing install.
208 [id(5)] HRESULT createAllInstalledApps();
210 // These methods are non-blocking. The operation is scheduled.
211 [id(6)] HRESULT checkForUpdate();
212 [id(7)] HRESULT download();
213 [id(8)] HRESULT install();
215 // All-in-one function for automatically updating all apps. Populates the
216 // bundle then schedules the update, which includes the update check and
217 // download and install, if necessary.
218 [id(9)] HRESULT updateAllApps();
220 // These three methods are non-blocking. The operation is requested.
221 [id(10)] HRESULT stop();
222 [id(11)] HRESULT pause();
223 [id(12)] HRESULT resume();
225 // Returns true if the bundle has an uncompleted non-blocking request.
226 [id(13)] HRESULT isBusy([out, retval] VARIANT_BOOL* is_busy);
228 // Downloads a package of an installed application.
229 [id(14)] HRESULT downloadPackage([in] BSTR app_id, [in] BSTR package_name);
231 // TODO(omaha): Define this aggregated bundle state. Is this really a property
232 // or should it be getCurrentState?
233 // The server and bundle are the only thing that can provide aggregated
234 // time estimates for downloads. Also, aggregate percentage is not currently
235 // available to the client because the total bytes to download is not
236 // available from App in all post-update check states.
237 // To do this, we will probably need to know the total expected download
238 // size for all packages to be installed - those that are required or in use -
239 // by the time the update check phase is complete.
240 [id(15), propget] HRESULT currentState([out, retval] VARIANT* current_state);
246 uuid(76F7B787-A67C-4c73-82C7-31F5E3AABC5C),
247 helpstring("IApp Interface"),
248 pointer_default(unique)
250 interface IApp : IDispatch {
251 // Returns a version IDispatch object.
252 [id(1), propget] HRESULT currentVersion([out, retval] IDispatch** current);
253 [id(2), propget] HRESULT nextVersion([out, retval] IDispatch** next);
255 [propget] HRESULT appId([out, retval] BSTR*);
257 [propget] HRESULT displayName([out, retval] BSTR*);
258 [propput] HRESULT displayName([in] BSTR);
260 [propget] HRESULT language([out, retval] BSTR*);
261 [propput] HRESULT language([in] BSTR);
263 [propget] HRESULT ap([out, retval] BSTR*);
264 [propput] HRESULT ap([in] BSTR);
266 [propget] HRESULT ttToken([out, retval] BSTR*);
267 [propput] HRESULT ttToken([in] BSTR);
269 [propget] HRESULT iid([out, retval] BSTR*);
270 [propput] HRESULT iid([in] BSTR);
272 [propget] HRESULT brandCode([out, retval] BSTR*);
273 [propput] HRESULT brandCode([in] BSTR);
275 [propget] HRESULT clientId([out, retval] BSTR*);
276 [propput] HRESULT clientId([in] BSTR);
278 [propget] HRESULT labels([out, retval] BSTR*);
279 [propput] HRESULT labels([in] BSTR);
281 [propget] HRESULT referralId([out, retval] BSTR*);
282 [propput] HRESULT referralId([in] BSTR);
284 // Returns an IDispatch to a command defined by this installed app with the
285 // specified ID, or NULL if this app is not installed or the command ID is not
287 [propget] HRESULT command([in] BSTR command_id,
288 [out, retval] IDispatch** command);
290 // Use values from the BrowserType enum.
291 [propget] HRESULT browserType([out, retval] UINT*);
292 [propput] HRESULT browserType([in] UINT);
294 [propget] HRESULT clientInstallData([out, retval] BSTR*);
295 [propput] HRESULT clientInstallData([in] BSTR);
297 [propget] HRESULT serverInstallDataIndex([out, retval] BSTR*);
298 [propput] HRESULT serverInstallDataIndex([in] BSTR);
300 // Set as soon as possible. Error pings are disabled until set to true.
301 [propget] HRESULT isEulaAccepted([out, retval] VARIANT_BOOL*);
302 [propput] HRESULT isEulaAccepted([in] VARIANT_BOOL);
304 [propget] HRESULT usageStatsEnable([out, retval] UINT*);
305 [propput] HRESULT usageStatsEnable([in] UINT);
307 [propget] HRESULT installTimeDiffSec([out, retval] UINT*);
309 // Returns an ICurrentState interface. The object underlying the interface has
310 // static data that does not get updated as the server state changes. To get
311 // the most "current" state, the currentState property needs to be queried
313 [propget] HRESULT currentState([out, retval] IDispatch**);
319 uuid(084D78A8-B084-4E14-A629-A2C419B0E3D9),
320 helpstring("IApp2 Interface"),
321 pointer_default(unique)
323 interface IApp2 : IApp {
324 [propget] HRESULT untrustedData([out, retval] BSTR*);
325 [propput] HRESULT untrustedData([in] BSTR);
331 uuid(4DE778FE-F195-4ee3-9DAB-FE446C239221),
332 helpstring("IAppCommand Interface"),
333 pointer_default(unique)
335 interface IAppCommand : IDispatch {
336 [propget] HRESULT isWebAccessible([out, retval] VARIANT_BOOL*);
337 // Use values from the AppCommandStatus enum.
338 [propget] HRESULT status([out, retval] UINT*);
339 [propget] HRESULT exitCode([out, retval] DWORD*);
340 HRESULT execute([in, optional] VARIANT arg1,
341 [in, optional] VARIANT arg2,
342 [in, optional] VARIANT arg3,
343 [in, optional] VARIANT arg4,
344 [in, optional] VARIANT arg5,
345 [in, optional] VARIANT arg6,
346 [in, optional] VARIANT arg7,
347 [in, optional] VARIANT arg8,
348 [in, optional] VARIANT arg9);
354 uuid(3D05F64F-71E3-48A5-BF6B-83315BC8AE1F),
355 helpstring("IAppCommand2 Interface"),
356 pointer_default(unique)
358 interface IAppCommand2 : IAppCommand {
359 [propget] HRESULT output([out, retval] BSTR*);
365 uuid(BCDCB538-01C0-46d1-A6A7-52F4D021C272),
366 helpstring("IAppVersion Interface"),
367 pointer_default(unique)
369 interface IAppVersion : IDispatch {
370 [propget] HRESULT version([out, retval] BSTR*);
372 // [propget] HRESULT installManifest([out, retval] BSTR*);
374 // Returns the count of the Packages in the AppVersion.
375 [propget] HRESULT packageCount([out, retval] long* count);
377 // Returns an IDispatch of the Package in the AppVersion at the specified
379 [propget] HRESULT package([in] long index,
380 [out, retval] IDispatch** package);
386 uuid(DCAB8386-4F03-4dbd-A366-D90BC9F68DE6),
387 helpstring("IPackage Interface"),
388 pointer_default(unique)
390 interface IPackage : IDispatch {
391 // Retrieves the package from the package cache and copies it to the
392 // directory provided. Returns an error is the package is not available
394 [id(1)] HRESULT get([in] BSTR dir);
396 // Returns true if the package has been downloaded and is available
398 [propget] HRESULT isAvailable([out, retval] VARIANT_BOOL*);
400 // Returns the manifest name of the package.
401 [propget] HRESULT filename([out, retval] BSTR*);
404 // TODO(omaha3): We should figure out what else we are going to want in this
405 // interface before dogfood even if we do not implement it.
409 uuid(247954F9-9EDC-4E68-8CC3-150C2B89EADF),
410 helpstring("ICurrentState Interface"),
411 pointer_default(unique)
413 interface ICurrentState : IDispatch {
414 // This interface is exposed to web clients!
415 // TODO(omaha3): Update valid comments once we settle on an implementation.
417 // A value from the CurrentState enum. This value determines which of the
418 // properties below are valid.
419 [propget] HRESULT stateValue([out, retval] LONG*);
421 // The remaining properties are only valid in the specified states. For all
422 // other states, the values are not specified.
424 // This property is valid only when stateValue is STATE_UPDATE_AVAILABLE.
425 [propget] HRESULT availableVersion([out, retval] BSTR*);
427 // The following three properties are only valid when stateValue is
428 // STATE_WAITING_TO_DOWNLOAD, STATE_RETRYING_DOWNLOAD, STATE_DOWNLOADING,
429 // STATE_DOWNLOAD_COMPLETE, STATE_EXTRACTING,
430 // STATE_APPLYING_DIFFERENTIAL_PATCH, or STATE_READY_TO_INSTALL.
432 // Bytes downloaded so far.
433 [propget] HRESULT bytesDownloaded([out, retval] ULONG*);
435 // Total bytes to download.
436 [propget] HRESULT totalBytesToDownload([out, retval] ULONG*);
438 // Estimated download time remaining in ms. -1 indicates unknown.
439 // Progress may not always be available, so clients should handle the -1 case.
440 [propget] HRESULT downloadTimeRemainingMs([out, retval] LONG*);
442 [propget] HRESULT nextRetryTime([out, retval] ULONGLONG*);
444 // TODO(omaha 3): Need some way to indicate reconnecting, retrying, etc.
446 // The following two properties are only valid when stateValue is
447 // STATE_INSTALLING or STATE_INSTALL_COMPLETE.
449 // Current install progress in percentage from 0 to 100. -1 indicates unknown.
450 // Progress may not always be available, so clients should handle the -1 case.
451 [propget] HRESULT installProgress([out, retval] LONG*);
453 // Estimated download time remaining in ms. -1 indicates unknown.
454 // Progress may not always be available, so clients should handle the -1 case.
455 [propget] HRESULT installTimeRemainingMs([out, retval] LONG*);
457 // The following four properties are only valid when stateValue is
460 // Returns true if the app has been canceled.
461 [propget] HRESULT isCanceled([out, retval] VARIANT_BOOL* is_canceled);
464 [propget] HRESULT errorCode([out, retval] LONG*);
467 [propget] HRESULT extraCode1([out, retval] LONG*);
469 // The following three properties are only valid when stateValue is
470 // STATE_ERROR or STATE_INSTALL_COMPLETE.
471 // TODO(omaha3): If STATE_DOWNLOAD_COMPLETE or STATE_READY_TO_INSTALL becomes
472 // a terminal state, does it support completion messages?
474 // Completion message, localized in the specified language.
475 // TODO(omaha3): If we're going to have bundle error messages too, should the
476 // language be at bundle level? Should bundle have its own language setter?
477 [propget] HRESULT completionMessage([out, retval] BSTR*);
479 // Application installer result code. This is to be used as additional
480 // information only. Success/failure should be determined using errorCode.
481 // This is an error if errorCode is GOOPDATEINSTALL_E_INSTALLER_FAILED.
482 [propget] HRESULT installerResultCode([out, retval] LONG*);
484 // Application installer extra code.
485 [propget] HRESULT installerResultExtraCode1([out, retval] LONG*);
487 // A command that needs to be launched by the client after installation.
488 [propget] HRESULT postInstallLaunchCommandLine([out, retval] BSTR*);
490 // URL to be launched after restarting the browser.
491 [propget] HRESULT postInstallUrl([out, retval] BSTR*);
493 // Returns a PostInstallAction value indicating the action to be taken by the
494 // client after installation.
495 [propget] HRESULT postInstallAction([out, retval] LONG*);
501 uuid(4E223325-C16B-4eeb-AEDC-19AA99A237FA),
502 helpstring("IRegistrationUpdateHook Interface"),
503 pointer_default(unique)
505 interface IRegistrationUpdateHook : IDispatch {
506 HRESULT UpdateRegistry([in] BSTR app_id, [in] VARIANT_BOOL is_machine);
511 uuid(b3a47570-0a85-4aea-8270-529d47899603),
512 helpstring("ICredentialDialog Interface"),
513 pointer_default(unique)
515 interface ICredentialDialog : IUnknown {
516 HRESULT QueryUserForCredentials([in] ULONG_PTR owner_hwnd,
519 [out] BSTR* username,
520 [out] BSTR* password);
523 // BEGIN gupdatem interfaces.
525 // The following interfaces are exposed as a narrower version of the
526 // IGoogleUpdate3 interface from the gupdatem service. These interfaces are
527 // meant for use from medium and low integrity clients.
532 uuid(494B20CF-282E-4BDD-9F5D-B70CB09D351E),
533 helpstring("IGoogleUpdate3Web Interface"),
534 pointer_default(unique)
536 interface IGoogleUpdate3Web : IDispatch {
537 HRESULT createAppBundleWeb([out, retval] IDispatch** app_bundle_web);
542 uuid(2D363682-561D-4c3a-81C6-F2F82107562A),
543 helpstring("IGoogleUpdate3WebSecurity Interface"),
544 pointer_default(unique)
546 interface IGoogleUpdate3WebSecurity : IUnknown {
547 HRESULT setOriginURL([in] BSTR origin_url);
553 uuid(DD42475D-6D46-496a-924E-BD5630B4CBBA),
554 helpstring("IAppBundleWeb Interface"),
555 pointer_default(unique)
557 interface IAppBundleWeb : IDispatch {
558 [id(2)] HRESULT createApp([in] BSTR app_guid,
559 [in] BSTR brand_code,
562 [id(3)] HRESULT createInstalledApp([in] BSTR app_id);
563 [id(4)] HRESULT createAllInstalledApps();
565 [propget] HRESULT displayLanguage([out, retval] BSTR*);
566 [propput] HRESULT displayLanguage([in] BSTR);
568 [propput] HRESULT parentHWND([in] ULONG_PTR hwnd);
570 [propget] HRESULT length([out, retval] int* index);
571 [id(DISPID_VALUE), propget] HRESULT appWeb(
572 [in] int index, [out, retval] IDispatch** app_web);
574 HRESULT initialize();
576 HRESULT checkForUpdate();
584 HRESULT downloadPackage([in] BSTR app_id, [in] BSTR package_name);
586 [propget] HRESULT currentState([out, retval] VARIANT* current_state);
592 uuid(18D0F672-18B4-48e6-AD36-6E6BF01DBBC4),
593 helpstring("IAppWeb Interface"),
594 pointer_default(unique)
596 interface IAppWeb : IDispatch {
597 [propget] HRESULT appId([out, retval] BSTR*);
599 // Returns an IAppVersionWeb IDispatch object.
600 [propget] HRESULT currentVersionWeb([out, retval] IDispatch** current);
601 [propget] HRESULT nextVersionWeb([out, retval] IDispatch** next);
603 // Returns an IAppCommandWeb IDispatch object, or NULL.
604 [propget] HRESULT command([in] BSTR command_id,
605 [out, retval] IDispatch** command);
609 [propget] HRESULT currentState([out, retval] IDispatch** current_state);
614 [propget] HRESULT serverInstallDataIndex([out, retval] BSTR*);
615 [propput] HRESULT serverInstallDataIndex([in] BSTR);
621 uuid(8476CE12-AE1F-4198-805C-BA0F9B783F57),
622 helpstring("IAppCommandWeb Interface"),
623 pointer_default(unique)
625 interface IAppCommandWeb : IDispatch {
626 // Use values from the AppCommandStatus enum.
627 [propget] HRESULT status([out, retval] UINT*);
628 [propget] HRESULT exitCode([out, retval] DWORD*);
629 [propget] HRESULT output([out, retval] BSTR*);
630 HRESULT execute([in, optional] VARIANT arg1,
631 [in, optional] VARIANT arg2,
632 [in, optional] VARIANT arg3,
633 [in, optional] VARIANT arg4,
634 [in, optional] VARIANT arg5,
635 [in, optional] VARIANT arg6,
636 [in, optional] VARIANT arg7,
637 [in, optional] VARIANT arg8,
638 [in, optional] VARIANT arg9);
644 uuid(0CD01D1E-4A1C-489d-93B9-9B6672877C57),
645 helpstring("IAppVersionWeb Interface"),
646 pointer_default(unique)
648 interface IAppVersionWeb : IDispatch {
649 [propget] HRESULT version([out, retval] BSTR*);
651 // Returns the count of the Packages in the AppVersion.
652 [propget] HRESULT packageCount([out, retval] long* count);
654 // TODO(omaha3): Implement this after a security review.
655 // Returns an IDispatch of the Package in the AppVersion at the specified
657 [propget] HRESULT packageWeb([in] long index,
658 [out, retval] IDispatch** package);
664 uuid(2E629606-312A-482f-9B12-2C4ABF6F0B6D),
665 helpstring("ICoCreateAsyncStatus Interface"),
666 pointer_default(unique)
668 interface ICoCreateAsyncStatus : IDispatch {
669 [propget] HRESULT isDone([out, retval] VARIANT_BOOL* is_done);
670 [propget] HRESULT completionHResult([out, retval] LONG* hr);
671 [propget] HRESULT createdInstance([out, retval] IDispatch** instance);
676 uuid(DAB1D343-1B2A-47f9-B445-93DC50704BFE),
677 helpstring("ICoCreateAsync Interface"),
678 pointer_default(unique)
680 interface ICoCreateAsync : IUnknown {
681 HRESULT createOmahaMachineServerAsync(
682 [in] BSTR origin_url,
683 [in] BOOL create_elevated,
684 [out, retval] ICoCreateAsyncStatus** status);
687 // END gupdatem interfaces.
689 // BEGIN Legacy google_update_idl interfaces.
693 uuid(5B25A8DC-1780-4178-A629-6BE8B8DEFAA2),
696 pointer_default(unique)
698 interface IBrowserHttpRequest2 : IUnknown {
699 // This method will send request/data from the browser process.
700 // @param url URL where request will be send.
701 // @param post_data POST data, if any. Can be NULL.
702 // @param request_headers HTTP request headers, if any. Can be NULL.
703 // @param response_headers_needed HTTP response headers that are needed.
704 // Should be one of the values listed here:
705 // http://msdn.microsoft.com/aa385351.aspx
706 // The input is a SAFEARRAY of DWORD. Can be a
708 // @param response_headers HTTP response headers, returned as SAFEARRAY
709 // of BSTR. The values corresponding one-to-one
710 // with the response_headers_needed values. Can
711 // be NULL if response_headers_needed==VT_EMPTY
712 // @param response_code HTTP response code.
713 // @param cache_filename Cache file that contains the response data.
714 HRESULT Send([in] BSTR url,
716 [in] BSTR request_headers,
717 [in] VARIANT response_headers_needed,
718 [out] VARIANT* response_headers,
719 [out] DWORD* response_code,
720 [out] BSTR* cache_filename);
726 uuid(128C2DA6-2BC0-44c0-B3F6-4EC22E647964),
727 helpstring("Google Update IProcessLauncher Interface"),
728 pointer_default(unique)
730 interface IProcessLauncher : IUnknown {
731 // @param cmd_line The full command line to execute.
732 HRESULT LaunchCmdLine([in, string] const WCHAR* cmd_line);
734 // @param browser_type The browser to start.
735 // @param url The url to launch the browser with.
736 HRESULT LaunchBrowser([in] DWORD browser_type,
737 [in, string] const WCHAR* url);
739 // @param app_id Unique id to identify the calling client application
740 // @param event_id Unique id for the command
741 // @param caller_proc_id The process id of the calling process
742 // @param proc_handle The process handle valid in the caller's context
743 HRESULT LaunchCmdElevated([in, string] const WCHAR* app_guid,
744 [in, string] const WCHAR* cmd_id,
745 [in] DWORD caller_proc_id,
746 [out] ULONG_PTR* proc_handle);
752 uuid(D106AB5F-A70E-400E-A21B-96208C1D8DBB),
753 helpstring("Google Update IProcessLauncher2 Interface"),
754 pointer_default(unique)
756 interface IProcessLauncher2 : IProcessLauncher {
757 // Launches the command line, returning the COM server's process ID and
758 // handles to the launched process and its stdout. The caller is responsible
759 // for closing the returned handles (by passing DUPLICATE_CLOSE_SOURCE to
760 // DuplicateHandle, for instance).
761 // @param cmd_line The full command line to execute.
762 // @param server_proc_id The process id of the IProcessLauncher2 COM server.
763 // @param proc_handle The process handle valid in the server's context
764 // @param stdout_handle The child process's stdout handle valid in the
766 HRESULT LaunchCmdLineEx([in, string] const WCHAR* cmd_line,
767 [out] DWORD* server_proc_id,
768 [out] ULONG_PTR* proc_handle,
769 [out] ULONG_PTR* stdout_handle);
775 uuid(5CCCB0EF-7073-4516-8028-4C628D0C8AAB),
776 helpstring("Google Update IOneClickProcessLauncher Interface"),
777 pointer_default(unique)
779 interface IOneClickProcessLauncher : IUnknown {
780 HRESULT LaunchAppCommand([in, string] const WCHAR* app_guid,
781 [in, string] const WCHAR* cmd_id);
785 COMPLETION_CODE_SUCCESS = 1,
786 COMPLETION_CODE_SUCCESS_CLOSE_UI,
787 COMPLETION_CODE_ERROR,
788 COMPLETION_CODE_RESTART_ALL_BROWSERS,
789 COMPLETION_CODE_REBOOT,
790 COMPLETION_CODE_RESTART_BROWSER,
791 COMPLETION_CODE_RESTART_ALL_BROWSERS_NOTICE_ONLY,
792 COMPLETION_CODE_REBOOT_NOTICE_ONLY,
793 COMPLETION_CODE_RESTART_BROWSER_NOTICE_ONLY,
794 COMPLETION_CODE_RUN_COMMAND,
795 } LegacyCompletionCodes;
800 uuid(1C642CED-CA3B-4013-A9DF-CA6CE5FF6503),
801 helpstring("GoogleUpdate UI-specific events Interface"),
802 pointer_default(unique)
804 interface IProgressWndEvents : IUnknown {
805 // The UI is closing down. The user has clicked on either the "X" or the
806 // other buttons of the UI to close the window.
809 // Pause has been clicked on.
812 // Resume has been clicked on.
815 // RestartBrowsers button has been clicked on.
816 HRESULT DoRestartBrowsers();
818 // Reboot button has been clicked on.
822 HRESULT DoLaunchBrowser([in, string] const WCHAR* url);
829 uuid(49D7563B-2DDB-4831-88C8-768A53833837),
830 helpstring("IJobObserver Interface"),
831 pointer_default(unique)
833 interface IJobObserver : IUnknown {
835 HRESULT OnCheckingForUpdate();
836 HRESULT OnUpdateAvailable([in, string] const WCHAR* version_string);
837 HRESULT OnWaitingToDownload();
838 HRESULT OnDownloading([in] int time_remaining_ms, [in] int pos);
839 HRESULT OnWaitingToInstall();
840 HRESULT OnInstalling();
842 HRESULT OnComplete([in] LegacyCompletionCodes code,
843 [in, string] const WCHAR* completion_text);
844 HRESULT SetEventSink([in] IProgressWndEvents* ui_sink);
850 uuid(19692F10-ADD2-4EFF-BE54-E61C62E40D13),
851 helpstring("IJobObserver2 Interface"),
852 pointer_default(unique)
854 interface IJobObserver2 : IUnknown {
855 // @param time_remaining_ms Remaining install time.
856 // @param pos Current install progress in percentage from 0 to 100. -1
857 // indicates unknown.
858 HRESULT OnInstalling2([in] int time_remaining_ms, [in] int pos);
864 uuid(31AC3F11-E5EA-4a85-8A3D-8E095A39C27B),
865 helpstring("IGoogleUpdate Interface"),
866 pointer_default(unique)
868 interface IGoogleUpdate : IUnknown {
869 // @param guid The guid for the app to be updated.
870 // @param observer The eventing interface.
871 HRESULT CheckForUpdate([in, string] const WCHAR* guid,
872 [in] IJobObserver* observer);
874 // @param guid The guid for the app to be updated.
875 // @param observer The eventing interface.
876 HRESULT Update([in, string] const WCHAR* guid,
877 [in] IJobObserver* observer);
880 // IGoogleUpdateCore is an internal Omaha interface.
884 uuid(909489C2-85A6-4322-AA56-D25278649D67),
885 helpstring("Google Update Core Interface"),
886 pointer_default(unique)
888 interface IGoogleUpdateCore : IUnknown
890 // Runs a command elevated.
892 // @param app_id Unique id to identify the calling client application
893 // @param event_id Unique id for the command
894 // @param caller_proc_id The process id of the calling process
895 // @param proc_handle The process handle valid in the caller's context
896 HRESULT LaunchCmdElevated([in, string] const WCHAR* app_guid,
897 [in, string] const WCHAR* cmd_id,
898 [in] DWORD caller_proc_id,
899 [out] ULONG_PTR* proc_handle);
902 // END Legacy google_update_idl interfaces.
905 uuid(655DD85A-3C0D-4674-9C58-AF7168C5861E),
907 helpstring("Google Update 3.0 Type Library")
909 library GoogleUpdate3Lib {
910 importlib("stdole2.tlb");
912 // These Interfaces are forward declared to ensure that they are described in
913 // the generated TLB file. This is required for ATL to correctly implement the
914 // corresponding IDispatch interfaces.
915 interface IGoogleUpdate3;
916 interface IAppBundle;
919 interface IAppCommand;
920 interface IAppCommand2;
921 interface IAppVersion;
923 interface ICurrentState;
925 interface IGoogleUpdate3Web;
926 interface IAppBundleWeb;
928 interface IAppCommandWeb;
929 interface IAppVersionWeb;
930 interface ICoCreateAsyncStatus;
933 uuid(022105BD-948A-40c9-AB42-A3300DDF097F),
934 helpstring("GoogleUpdate3 Class for per-user applications")
936 coclass GoogleUpdate3UserClass {
937 [default] interface IDispatch;
941 uuid(4EB61BAC-A3B6-4760-9581-655041EF4D69),
942 helpstring("GoogleUpdate3 Service Class for machine applications")
944 coclass GoogleUpdate3ServiceClass {
945 [default] interface IDispatch;
949 uuid(22181302-A8A6-4f84-A541-E5CBFC70CC43),
950 helpstring("GoogleUpdate3Web for user applications")
952 coclass GoogleUpdate3WebUserClass {
953 [default] interface IDispatch;
957 uuid(8A1D4361-2C08-4700-A351-3EAA9CBFF5E4),
958 helpstring("Pass-through broker for the GoogleUpdate3WebServiceClass")
960 coclass GoogleUpdate3WebMachineClass {
961 [default] interface IDispatch;
965 uuid(534F5323-3569-4f42-919D-1E1CF93E5BF6),
966 helpstring("GoogleUpdate3Web")
968 coclass GoogleUpdate3WebServiceClass {
969 [default] interface IDispatch;
973 uuid(598FE0E5-E02D-465d-9A9D-37974A28FD42),
974 helpstring("Fallback mechanism if GoogleUpdate3WebServiceClass fails")
976 coclass GoogleUpdate3WebMachineFallbackClass {
977 [default] interface IDispatch;
981 uuid(E8CF3E55-F919-49d9-ABC0-948E6CB34B9F),
982 helpstring("CurrentStateUserClass")
984 coclass CurrentStateUserClass {
985 [default] interface ICurrentState;
989 uuid(9D6AA569-9F30-41ad-885A-346685C74928),
990 helpstring("CurrentStateMachineClass")
992 coclass CurrentStateMachineClass {
993 [default] interface ICurrentState;
997 uuid(7DE94008-8AFD-4c70-9728-C6FBFFF6A73E),
998 helpstring("CoCreateAsyncClass")
1000 coclass CoCreateAsyncClass {
1001 [default] interface IUnknown;
1005 uuid(e67be843-bbbe-4484-95fb-05271ae86750),
1006 helpstring("CredentialDialogUserClass")
1008 coclass CredentialDialogUserClass {
1009 [default] interface IUnknown;
1013 uuid(25461599-633d-42b1-84fb-7cd68d026e53),
1014 helpstring("CredentialDialogMachineClass")
1016 coclass CredentialDialogMachineClass {
1017 [default] interface IUnknown;
1020 // BEGIN Legacy google_update_idl coclasses.
1023 uuid(ABC01078-F197-4b0b-ADBC-CFE684B39C82),
1024 helpstring("ProcessLauncherClass Class")
1026 coclass ProcessLauncherClass {
1027 [default] interface IUnknown;
1031 uuid(51F9E8EF-59D7-475b-A106-C7EA6F30C119),
1032 helpstring("OneClickUserProcessLauncherClass Class")
1034 coclass OneClickUserProcessLauncherClass {
1035 [default] interface IOneClickProcessLauncher;
1039 uuid(AAD4AE2E-D834-46d4-8B09-490FAC9C722B),
1040 helpstring("OneClickMachineProcessLauncherClass Class")
1042 coclass OneClickMachineProcessLauncherClass {
1043 [default] interface IOneClickProcessLauncher;
1047 uuid(2F0E2680-9FF5-43c0-B76E-114A56E93598),
1048 helpstring("OnDemand updates for per-user applications.")
1050 coclass OnDemandUserAppsClass {
1051 [default] interface IUnknown;
1055 uuid(6F8BD55B-E83D-4a47-85BE-81FFA8057A69),
1056 helpstring("OnDemand pass-through broker for machine applications.")
1058 coclass OnDemandMachineAppsClass {
1059 [default] interface IUnknown;
1063 uuid(9465B4B4-5216-4042-9A2C-754D3BCDC410),
1064 helpstring("OnDemand updates for per-machine applications.")
1066 coclass OnDemandMachineAppsServiceClass {
1067 [default] interface IUnknown;
1071 uuid(B3D28DBD-0DFA-40e4-8071-520767BADC7E),
1072 helpstring("Fallback for if OnDemandMachineAppsServiceClass fails.")
1074 coclass OnDemandMachineAppsFallbackClass {
1075 [default] interface IUnknown;
1079 uuid(E225E692-4B47-4777-9BED-4FD7FE257F0E),
1080 helpstring("GoogleUpdateCore Class")
1082 coclass GoogleUpdateCoreClass
1084 [default] interface IUnknown;
1088 uuid(9B2340A0-4068-43d6-B404-32E27217859D),
1089 helpstring("GoogleUpdateCore Machine Class")
1091 coclass GoogleUpdateCoreMachineClass
1093 [default] interface IUnknown;
1096 // END Legacy google_update_idl coclasses.