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(4DE778FE
-F195
-4ee3
-9DAB
-FE446C239221
),
320 helpstring("IAppCommand Interface"),
321 pointer_default(unique)
323 interface IAppCommand
: IDispatch
{
324 [propget] HRESULT isWebAccessible
([out, retval] VARIANT_BOOL*);
325 // Use values from the AppCommandStatus enum.
326 [propget] HRESULT status
([out, retval] UINT
*);
327 [propget] HRESULT exitCode
([out, retval] DWORD
*);
328 HRESULT execute
([in, optional] VARIANT arg1
,
329 [in, optional] VARIANT arg2
,
330 [in, optional] VARIANT arg3
,
331 [in, optional] VARIANT arg4
,
332 [in, optional] VARIANT arg5
,
333 [in, optional] VARIANT arg6
,
334 [in, optional] VARIANT arg7
,
335 [in, optional] VARIANT arg8
,
336 [in, optional] VARIANT arg9
);
342 uuid(BCDCB538
-01C0
-46d1
-A6A7
-52F4D021C272
),
343 helpstring("IAppVersion Interface"),
344 pointer_default(unique)
346 interface IAppVersion
: IDispatch
{
347 [propget] HRESULT version([out, retval] BSTR*);
349 // [propget] HRESULT installManifest([out, retval] BSTR*);
351 // Returns the count of the Packages in the AppVersion.
352 [propget] HRESULT packageCount
([out, retval] long* count
);
354 // Returns an IDispatch of the Package in the AppVersion at the specified
356 [propget] HRESULT package
([in] long index
,
357 [out, retval] IDispatch
** package
);
363 uuid(DCAB8386
-4F03
-4dbd
-A366
-D90BC9F68DE6
),
364 helpstring("IPackage Interface"),
365 pointer_default(unique)
367 interface IPackage
: IDispatch
{
368 // Retrieves the package from the package cache and copies it to the
369 // directory provided. Returns an error is the package is not available
371 [id(1)] HRESULT get
([in] BSTR dir
);
373 // Returns true if the package has been downloaded and is available
375 [propget] HRESULT isAvailable
([out, retval] VARIANT_BOOL*);
377 // Returns the manifest name of the package.
378 [propget] HRESULT filename
([out, retval] BSTR*);
381 // TODO(omaha3): We should figure out what else we are going to want in this
382 // interface before dogfood even if we do not implement it.
386 uuid(247954F9
-9EDC
-4E68
-8CC3
-150C2B89EADF
),
387 helpstring("ICurrentState Interface"),
388 pointer_default(unique)
390 interface ICurrentState
: IDispatch
{
391 // This interface is exposed to web clients!
392 // TODO(omaha3): Update valid comments once we settle on an implementation.
394 // A value from the CurrentState enum. This value determines which of the
395 // properties below are valid.
396 [propget] HRESULT stateValue
([out, retval] LONG*);
398 // The remaining properties are only valid in the specified states. For all
399 // other states, the values are not specified.
401 // This property is valid only when stateValue is STATE_UPDATE_AVAILABLE.
402 [propget] HRESULT availableVersion
([out, retval] BSTR*);
404 // The following three properties are only valid when stateValue is
405 // STATE_WAITING_TO_DOWNLOAD, STATE_RETRYING_DOWNLOAD, STATE_DOWNLOADING,
406 // STATE_DOWNLOAD_COMPLETE, STATE_EXTRACTING,
407 // STATE_APPLYING_DIFFERENTIAL_PATCH, or STATE_READY_TO_INSTALL.
409 // Bytes downloaded so far.
410 [propget] HRESULT bytesDownloaded
([out, retval] ULONG
*);
412 // Total bytes to download.
413 [propget] HRESULT totalBytesToDownload
([out, retval] ULONG
*);
415 // Estimated download time remaining in ms. -1 indicates unknown.
416 // Progress may not always be available, so clients should handle the -1 case.
417 [propget] HRESULT downloadTimeRemainingMs
([out, retval] LONG*);
419 [propget] HRESULT nextRetryTime
([out, retval] ULONGLONG
*);
421 // TODO(omaha 3): Need some way to indicate reconnecting, retrying, etc.
423 // The following two properties are only valid when stateValue is
424 // STATE_INSTALLING or STATE_INSTALL_COMPLETE.
426 // Current install progress in percentage from 0 to 100. -1 indicates unknown.
427 // Progress may not always be available, so clients should handle the -1 case.
428 [propget] HRESULT installProgress
([out, retval] LONG*);
430 // Estimated download time remaining in ms. -1 indicates unknown.
431 // Progress may not always be available, so clients should handle the -1 case.
432 [propget] HRESULT installTimeRemainingMs
([out, retval] LONG*);
434 // The following four properties are only valid when stateValue is
437 // Returns true if the app has been canceled.
438 [propget] HRESULT isCanceled
([out, retval] VARIANT_BOOL* is_canceled
);
441 [propget] HRESULT errorCode
([out, retval] LONG*);
444 [propget] HRESULT extraCode1
([out, retval] LONG*);
446 // The following three properties are only valid when stateValue is
447 // STATE_ERROR or STATE_INSTALL_COMPLETE.
448 // TODO(omaha3): If STATE_DOWNLOAD_COMPLETE or STATE_READY_TO_INSTALL becomes
449 // a terminal state, does it support completion messages?
451 // Completion message, localized in the specified language.
452 // TODO(omaha3): If we're going to have bundle error messages too, should the
453 // language be at bundle level? Should bundle have its own language setter?
454 [propget] HRESULT completionMessage
([out, retval] BSTR*);
456 // Application installer result code. This is to be used as additional
457 // information only. Success/failure should be determined using errorCode.
458 // This is an error if errorCode is GOOPDATEINSTALL_E_INSTALLER_FAILED.
459 [propget] HRESULT installerResultCode
([out, retval] LONG*);
461 // Application installer extra code.
462 [propget] HRESULT installerResultExtraCode1
([out, retval] LONG*);
464 // A command that needs to be launched by the client after installation.
465 [propget] HRESULT postInstallLaunchCommandLine
([out, retval] BSTR*);
467 // URL to be launched after restarting the browser.
468 [propget] HRESULT postInstallUrl
([out, retval] BSTR*);
470 // Returns a PostInstallAction value indicating the action to be taken by the
471 // client after installation.
472 [propget] HRESULT postInstallAction
([out, retval] LONG*);
478 uuid(4E223325
-C16B
-4eeb
-AEDC
-19AA99A237FA
),
479 helpstring("IRegistrationUpdateHook Interface"),
480 pointer_default(unique)
482 interface IRegistrationUpdateHook
: IDispatch
{
483 HRESULT UpdateRegistry
([in] BSTR app_id
, [in] VARIANT_BOOL is_machine
);
488 uuid(b3a47570
-0a85
-4aea
-8270-529d47899603
),
489 helpstring("ICredentialDialog Interface"),
490 pointer_default(unique)
492 interface ICredentialDialog
: IUnknown
{
493 HRESULT QueryUserForCredentials
([in] ULONG_PTR owner_hwnd
,
496 [out] BSTR* username
,
497 [out] BSTR* password
);
500 // BEGIN gupdatem interfaces.
502 // The following interfaces are exposed as a narrower version of the
503 // IGoogleUpdate3 interface from the gupdatem service. These interfaces are
504 // meant for use from medium and low integrity clients.
509 uuid(494B20CF
-282E-4BDD
-9F5D
-B70CB09D351E
),
510 helpstring("IGoogleUpdate3Web Interface"),
511 pointer_default(unique)
513 interface IGoogleUpdate3Web
: IDispatch
{
514 HRESULT createAppBundleWeb
([out, retval] IDispatch
** app_bundle_web
);
519 uuid(2D363682
-561D
-4c3a
-81C6
-F2F82107562A
),
520 helpstring("IGoogleUpdate3WebSecurity Interface"),
521 pointer_default(unique)
523 interface IGoogleUpdate3WebSecurity
: IUnknown
{
524 HRESULT setOriginURL
([in] BSTR origin_url
);
530 uuid(DD42475D
-6D46
-496a
-924E
-BD5630B4CBBA
),
531 helpstring("IAppBundleWeb Interface"),
532 pointer_default(unique)
534 interface IAppBundleWeb
: IDispatch
{
535 [id(2)] HRESULT createApp
([in] BSTR app_guid
,
536 [in] BSTR brand_code
,
539 [id(3)] HRESULT createInstalledApp
([in] BSTR app_id
);
540 [id(4)] HRESULT createAllInstalledApps
();
542 [propget] HRESULT displayLanguage
([out, retval] BSTR*);
543 [propput] HRESULT displayLanguage
([in] BSTR);
545 [propput] HRESULT parentHWND
([in] ULONG_PTR hwnd
);
547 [propget] HRESULT length
([out, retval] int* index
);
548 [id(DISPID_VALUE
), propget] HRESULT appWeb
(
549 [in] int index
, [out, retval] IDispatch
** app_web
);
551 HRESULT initialize
();
553 HRESULT checkForUpdate
();
561 HRESULT downloadPackage
([in] BSTR app_id
, [in] BSTR package_name
);
563 [propget] HRESULT currentState
([out, retval] VARIANT* current_state
);
569 uuid(18D0F672
-18B4
-48e6
-AD36
-6E6BF01DBBC4
),
570 helpstring("IAppWeb Interface"),
571 pointer_default(unique)
573 interface IAppWeb
: IDispatch
{
574 [propget] HRESULT appId
([out, retval] BSTR*);
576 // Returns an IAppVersionWeb IDispatch object.
577 [propget] HRESULT currentVersionWeb
([out, retval] IDispatch
** current
);
578 [propget] HRESULT nextVersionWeb
([out, retval] IDispatch
** next
);
580 // Returns an IAppCommandWeb IDispatch object, or NULL.
581 [propget] HRESULT command
([in] BSTR command_id
,
582 [out, retval] IDispatch
** command
);
585 [propget] HRESULT currentState
([out, retval] IDispatch
** current_state
);
593 uuid(68D6C2BD
-712E-4c96
-93E8
-49CB8A9AAEED
),
594 helpstring("IAppCommandWeb Interface"),
595 pointer_default(unique)
597 interface IAppCommandWeb
: IDispatch
{
598 // Use values from the AppCommandStatus enum.
599 [propget] HRESULT status
([out, retval] UINT
*);
600 [propget] HRESULT exitCode
([out, retval] DWORD
*);
601 HRESULT execute
([in, optional] VARIANT arg1
,
602 [in, optional] VARIANT arg2
,
603 [in, optional] VARIANT arg3
,
604 [in, optional] VARIANT arg4
,
605 [in, optional] VARIANT arg5
,
606 [in, optional] VARIANT arg6
,
607 [in, optional] VARIANT arg7
,
608 [in, optional] VARIANT arg8
,
609 [in, optional] VARIANT arg9
);
615 uuid(0CD01D1E
-4A1C
-489d
-93B9
-9B6672877C57
),
616 helpstring("IAppVersionWeb Interface"),
617 pointer_default(unique)
619 interface IAppVersionWeb
: IDispatch
{
620 [propget] HRESULT version([out, retval] BSTR*);
622 // Returns the count of the Packages in the AppVersion.
623 [propget] HRESULT packageCount
([out, retval] long* count
);
625 // TODO(omaha3): Implement this after a security review.
626 // Returns an IDispatch of the Package in the AppVersion at the specified
628 [propget] HRESULT packageWeb
([in] long index
,
629 [out, retval] IDispatch
** package
);
635 uuid(2E629606
-312A
-482f
-9B12
-2C4ABF6F0B6D
),
636 helpstring("ICoCreateAsyncStatus Interface"),
637 pointer_default(unique)
639 interface ICoCreateAsyncStatus
: IDispatch
{
640 [propget] HRESULT isDone
([out, retval] VARIANT_BOOL* is_done
);
641 [propget] HRESULT completionHResult
([out, retval] LONG* hr
);
642 [propget] HRESULT createdInstance
([out, retval] IDispatch
** instance
);
647 uuid(DAB1D343
-1B2A
-47f9
-B445
-93DC50704BFE
),
648 helpstring("ICoCreateAsync Interface"),
649 pointer_default(unique)
651 interface ICoCreateAsync
: IUnknown
{
652 HRESULT createOmahaMachineServerAsync
(
653 [in] BSTR origin_url
,
654 [in] BOOL create_elevated
,
655 [out, retval] ICoCreateAsyncStatus
** status
);
658 // END gupdatem interfaces.
660 // BEGIN Legacy google_update_idl interfaces.
664 uuid(5B25A8DC
-1780-4178-A629
-6BE8B8DEFAA2
),
667 pointer_default(unique)
669 interface IBrowserHttpRequest2
: IUnknown
{
670 // This method will send request/data from the browser process.
671 // @param url URL where request will be send.
672 // @param post_data POST data, if any. Can be NULL.
673 // @param request_headers HTTP request headers, if any. Can be NULL.
674 // @param response_headers_needed HTTP response headers that are needed.
675 // Should be one of the values listed here:
676 // http://msdn.microsoft.com/aa385351.aspx
677 // The input is a SAFEARRAY of DWORD. Can be a
679 // @param response_headers HTTP response headers, returned as SAFEARRAY
680 // of BSTR. The values corresponding one-to-one
681 // with the response_headers_needed values. Can
682 // be NULL if response_headers_needed==VT_EMPTY
683 // @param response_code HTTP response code.
684 // @param cache_filename Cache file that contains the response data.
685 HRESULT Send
([in] BSTR url
,
687 [in] BSTR request_headers
,
688 [in] VARIANT response_headers_needed
,
689 [out] VARIANT* response_headers
,
690 [out] DWORD
* response_code
,
691 [out] BSTR* cache_filename
);
697 uuid(128C2DA6
-2BC0
-44c0
-B3F6
-4EC22E647964
),
698 helpstring("Google Update IProcessLauncher Interface"),
699 pointer_default(unique)
701 interface IProcessLauncher
: IUnknown
{
702 // @param cmd_line The full command line to execute.
703 HRESULT LaunchCmdLine
([in, string] const WCHAR
* cmd_line
);
705 // @param browser_type The browser to start.
706 // @param url The url to launch the browser with.
707 HRESULT LaunchBrowser
([in] DWORD browser_type
,
708 [in, string] const WCHAR
* url
);
710 // @param app_id Unique id to identify the calling client application
711 // @param event_id Unique id for the command
712 // @param caller_proc_id The process id of the calling process
713 // @param proc_handle The process handle valid in the caller's context
714 HRESULT LaunchCmdElevated
([in, string] const WCHAR
* app_guid
,
715 [in, string] const WCHAR
* cmd_id
,
716 [in] DWORD caller_proc_id
,
717 [out] ULONG_PTR
* proc_handle
);
723 uuid(5CCCB0EF
-7073-4516-8028-4C628D0C8AAB
),
724 helpstring("Google Update IOneClickProcessLauncher Interface"),
725 pointer_default(unique)
727 interface IOneClickProcessLauncher
: IUnknown
{
728 HRESULT LaunchAppCommand
([in, string] const WCHAR
* app_guid
,
729 [in, string] const WCHAR
* cmd_id
);
733 COMPLETION_CODE_SUCCESS
= 1,
734 COMPLETION_CODE_SUCCESS_CLOSE_UI
,
735 COMPLETION_CODE_ERROR
,
736 COMPLETION_CODE_RESTART_ALL_BROWSERS
,
737 COMPLETION_CODE_REBOOT
,
738 COMPLETION_CODE_RESTART_BROWSER
,
739 COMPLETION_CODE_RESTART_ALL_BROWSERS_NOTICE_ONLY
,
740 COMPLETION_CODE_REBOOT_NOTICE_ONLY
,
741 COMPLETION_CODE_RESTART_BROWSER_NOTICE_ONLY
,
742 COMPLETION_CODE_RUN_COMMAND
,
743 } LegacyCompletionCodes
;
748 uuid(1C642CED
-CA3B
-4013-A9DF
-CA6CE5FF6503
),
749 helpstring("GoogleUpdate UI-specific events Interface"),
750 pointer_default(unique)
752 interface IProgressWndEvents
: IUnknown
{
753 // The UI is closing down. The user has clicked on either the "X" or the
754 // other buttons of the UI to close the window.
757 // Pause has been clicked on.
760 // Resume has been clicked on.
763 // RestartBrowsers button has been clicked on.
764 HRESULT DoRestartBrowsers
();
766 // Reboot button has been clicked on.
770 HRESULT DoLaunchBrowser
([in, string] const WCHAR
* url
);
777 uuid(49D7563B
-2DDB
-4831-88C8
-768A53833837
),
778 helpstring("IJobObserver Interface"),
779 pointer_default(unique)
781 interface IJobObserver
: IUnknown
{
783 HRESULT OnCheckingForUpdate
();
784 HRESULT OnUpdateAvailable
([in, string] const WCHAR
* version_string
);
785 HRESULT OnWaitingToDownload
();
786 HRESULT OnDownloading
([in] int time_remaining_ms
, [in] int pos
);
787 HRESULT OnWaitingToInstall
();
788 HRESULT OnInstalling
();
790 HRESULT OnComplete
([in] LegacyCompletionCodes code
,
791 [in, string] const WCHAR
* completion_text
);
792 HRESULT SetEventSink
([in] IProgressWndEvents
* ui_sink
);
798 uuid(31AC3F11
-E5EA
-4a85
-8A3D
-8E095A39C27B
),
799 helpstring("IGoogleUpdate Interface"),
800 pointer_default(unique)
802 interface IGoogleUpdate
: IUnknown
{
803 // @param guid The guid for the app to be updated.
804 // @param observer The eventing interface.
805 HRESULT CheckForUpdate
([in, string] const WCHAR
* guid
,
806 [in] IJobObserver
* observer
);
808 // @param guid The guid for the app to be updated.
809 // @param observer The eventing interface.
810 HRESULT Update
([in, string] const WCHAR
* guid
,
811 [in] IJobObserver
* observer
);
814 // IGoogleUpdateCore is an internal Omaha interface.
818 uuid(909489C2
-85A6
-4322-AA56
-D25278649D67
),
819 helpstring("Google Update Core Interface"),
820 pointer_default(unique)
822 interface IGoogleUpdateCore
: IUnknown
824 // Runs a command elevated.
826 // @param app_id Unique id to identify the calling client application
827 // @param event_id Unique id for the command
828 // @param caller_proc_id The process id of the calling process
829 // @param proc_handle The process handle valid in the caller's context
830 HRESULT LaunchCmdElevated
([in, string] const WCHAR
* app_guid
,
831 [in, string] const WCHAR
* cmd_id
,
832 [in] DWORD caller_proc_id
,
833 [out] ULONG_PTR
* proc_handle
);
836 // END Legacy google_update_idl interfaces.
839 uuid(655DD85A
-3C0D
-4674-9C58
-AF7168C5861E
),
841 helpstring("Google Update 3.0 Type Library")
843 library GoogleUpdate3Lib
{
844 importlib
("stdole2.tlb");
846 // These Interfaces are forward declared to ensure that they are described in
847 // the generated TLB file. This is required for ATL to correctly implement the
848 // corresponding IDispatch interfaces.
849 interface IGoogleUpdate3
;
850 interface IAppBundle
;
852 interface IAppCommand
;
853 interface IAppVersion
;
855 interface ICurrentState
;
857 interface IGoogleUpdate3Web
;
858 interface IAppBundleWeb
;
860 interface IAppCommandWeb
;
861 interface IAppVersionWeb
;
862 interface ICoCreateAsyncStatus
;
865 uuid(022105BD
-948A
-40c9
-AB42
-A3300DDF097F
),
866 helpstring("GoogleUpdate3 Class for per-user applications")
868 coclass GoogleUpdate3UserClass
{
869 [default] interface IDispatch
;
873 uuid(4EB61BAC
-A3B6
-4760-9581-655041EF4D69
),
874 helpstring("GoogleUpdate3 Service Class for machine applications")
876 coclass GoogleUpdate3ServiceClass
{
877 [default] interface IDispatch
;
881 uuid(22181302-A8A6
-4f84
-A541
-E5CBFC70CC43
),
882 helpstring("GoogleUpdate3Web for user applications")
884 coclass GoogleUpdate3WebUserClass
{
885 [default] interface IDispatch
;
889 uuid(8A1D4361
-2C08
-4700-A351
-3EAA9CBFF5E4
),
890 helpstring("Pass-through broker for the GoogleUpdate3WebServiceClass")
892 coclass GoogleUpdate3WebMachineClass
{
893 [default] interface IDispatch
;
897 uuid(534F5323
-3569-4f42
-919D
-1E1CF93E5BF6
),
898 helpstring("GoogleUpdate3Web")
900 coclass GoogleUpdate3WebServiceClass
{
901 [default] interface IDispatch
;
905 uuid(598FE0E5
-E02D
-465d
-9A9D
-37974A28FD42
),
906 helpstring("Fallback mechanism if GoogleUpdate3WebServiceClass fails")
908 coclass GoogleUpdate3WebMachineFallbackClass
{
909 [default] interface IDispatch
;
913 uuid(E8CF3E55
-F919
-49d9
-ABC0
-948E6CB34B9F
),
914 helpstring("CurrentStateUserClass")
916 coclass CurrentStateUserClass
{
917 [default] interface ICurrentState
;
921 uuid(9D6AA569
-9F30
-41ad
-885A
-346685C74928
),
922 helpstring("CurrentStateMachineClass")
924 coclass CurrentStateMachineClass
{
925 [default] interface ICurrentState
;
929 uuid(7DE94008
-8AFD
-4c70
-9728-C6FBFFF6A73E
),
930 helpstring("CoCreateAsyncClass")
932 coclass CoCreateAsyncClass
{
933 [default] interface IUnknown
;
937 uuid(e67be843
-bbbe
-4484-95fb
-05271ae86750
),
938 helpstring("CredentialDialogUserClass")
940 coclass CredentialDialogUserClass
{
941 [default] interface IUnknown
;
945 uuid(25461599-633d
-42b1
-84fb
-7cd68d026e53
),
946 helpstring("CredentialDialogMachineClass")
948 coclass CredentialDialogMachineClass
{
949 [default] interface IUnknown
;
952 // BEGIN Legacy google_update_idl coclasses.
955 uuid(ABC01078
-F197
-4b0b
-ADBC
-CFE684B39C82
),
956 helpstring("ProcessLauncherClass Class")
958 coclass ProcessLauncherClass
{
959 [default] interface IUnknown
;
963 uuid(51F9E8EF
-59D7
-475b
-A106
-C7EA6F30C119
),
964 helpstring("OneClickUserProcessLauncherClass Class")
966 coclass OneClickUserProcessLauncherClass
{
967 [default] interface IOneClickProcessLauncher
;
971 uuid(AAD4AE2E
-D834
-46d4
-8B09
-490FAC9C722B
),
972 helpstring("OneClickMachineProcessLauncherClass Class")
974 coclass OneClickMachineProcessLauncherClass
{
975 [default] interface IOneClickProcessLauncher
;
979 uuid(2F0E2680
-9FF5
-43c0
-B76E
-114A56E93598
),
980 helpstring("OnDemand updates for per-user applications.")
982 coclass OnDemandUserAppsClass
{
983 [default] interface IUnknown
;
987 uuid(6F8BD55B
-E83D
-4a47
-85BE
-81FFA8057A69
),
988 helpstring("OnDemand pass-through broker for machine applications.")
990 coclass OnDemandMachineAppsClass
{
991 [default] interface IUnknown
;
995 uuid(9465B4B4
-5216-4042-9A2C
-754D3BCDC410
),
996 helpstring("OnDemand updates for per-machine applications.")
998 coclass OnDemandMachineAppsServiceClass
{
999 [default] interface IUnknown
;
1003 uuid(B3D28DBD
-0DFA
-40e4
-8071-520767BADC7E
),
1004 helpstring("Fallback for if OnDemandMachineAppsServiceClass fails.")
1006 coclass OnDemandMachineAppsFallbackClass
{
1007 [default] interface IUnknown
;
1011 uuid(E225E692
-4B47
-4777-9BED
-4FD7FE257F0E
),
1012 helpstring("GoogleUpdateCore Class")
1014 coclass GoogleUpdateCoreClass
1016 [default] interface IUnknown
;
1020 uuid(9B2340A0
-4068-43d6
-B404
-32E27217859D
),
1021 helpstring("GoogleUpdateCore Machine Class")
1023 coclass GoogleUpdateCoreMachineClass
1025 [default] interface IUnknown
;
1028 // END Legacy google_update_idl coclasses.