1 // Copyright 2007-2009 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 // ========================================================================
16 // The proxy clsid #defined as PROXY_CLSID_IS in mk_common needs to be changed
17 // anytime any interface below changes, or if a new interface is added.
24 uuid(5B25A8DC
-1780-4178-A629
-6BE8B8DEFAA2
),
27 pointer_default(unique)
29 interface IBrowserHttpRequest2
: IUnknown
{
30 // This method will send request/data from the browser process.
31 // @param url URL where request will be send.
32 // @param post_data POST data, if any. Can be NULL.
33 // @param request_headers HTTP request headers, if any. Can be NULL.
34 // @param response_headers_needed HTTP response headers that are needed.
35 // Should be one of the values listed here:
36 // http://go/queryinfoflags
37 // The input is a SAFEARRAY of DWORD. Can be a
39 // @param response_headers HTTP response headers, returned as SAFEARRAY
40 // of BSTR. The values corresponding one-to-one
41 // with the response_headers_needed values. Can
42 // be NULL if response_headers_needed==VT_EMPTY
43 // @param response_code HTTP response code.
44 // @param cache_filename Cache file that contains the response data.
45 HRESULT Send
([in] BSTR url
,
47 [in] BSTR request_headers
,
48 [in] VARIANT response_headers_needed
,
49 [out] VARIANT* response_headers
,
50 [out] DWORD
* response_code
,
51 [out] BSTR* cache_filename
);
57 uuid(128C2DA6
-2BC0
-44c0
-B3F6
-4EC22E647964
),
58 helpstring("Google Update IProcessLauncher Interface"),
59 pointer_default(unique)
61 interface IProcessLauncher
: IUnknown
{
62 // @param cmd_line The full command line to execute.
63 HRESULT LaunchCmdLine
([in, string] const WCHAR
* cmd_line
);
65 // @param browser_type The browser to start.
66 // @param url The url to launch the browser with.
67 HRESULT LaunchBrowser
([in] DWORD browser_type
,
68 [in, string] const WCHAR
* url
);
70 // @param app_id Unique id to identify the calling client application
71 // @param event_id Unique id for the command
72 // @param caller_proc_id The process id of the calling process
73 // @param proc_handle The process handle valid in the caller's context
74 HRESULT LaunchCmdElevated
([in, string] const WCHAR
* app_guid
,
75 [in, string] const WCHAR
* cmd_id
,
76 [in] DWORD caller_proc_id
,
77 [out] ULONG_PTR
* proc_handle
);
81 COMPLETION_CODE_SUCCESS
= 1,
82 COMPLETION_CODE_SUCCESS_CLOSE_UI
,
83 COMPLETION_CODE_ERROR
,
84 COMPLETION_CODE_RESTART_ALL_BROWSERS
,
85 COMPLETION_CODE_REBOOT
,
86 COMPLETION_CODE_RESTART_BROWSER
,
87 COMPLETION_CODE_RESTART_ALL_BROWSERS_NOTICE_ONLY
,
88 COMPLETION_CODE_REBOOT_NOTICE_ONLY
,
89 COMPLETION_CODE_RESTART_BROWSER_NOTICE_ONLY
,
90 COMPLETION_CODE_RUN_COMMAND
,
96 uuid(1C642CED
-CA3B
-4013-A9DF
-CA6CE5FF6503
),
97 helpstring("GoogleUpdate UI-specific events Interface"),
98 pointer_default(unique)
100 interface IProgressWndEvents
: IUnknown
{
101 // The UI is closing down. The user has clicked on either the "X" or the
102 // other buttons of the UI to close the window.
105 // Pause has been clicked on.
108 // Resume has been clicked on.
111 // RestartBrowsers button has been clicked on.
112 HRESULT DoRestartBrowsers
();
114 // Reboot button has been clicked on.
118 HRESULT DoLaunchBrowser
([in, string] const WCHAR
* url
);
125 uuid(49D7563B
-2DDB
-4831-88C8
-768A53833837
),
126 helpstring("IJobObserver Interface"),
127 pointer_default(unique)
129 interface IJobObserver
: IUnknown
{
131 HRESULT OnCheckingForUpdate
();
132 HRESULT OnUpdateAvailable
([in, string] const WCHAR
* version_string
);
133 HRESULT OnWaitingToDownload
();
134 HRESULT OnDownloading
([in] int time_remaining_ms
, [in] int pos
);
135 HRESULT OnWaitingToInstall
();
136 HRESULT OnInstalling
();
138 HRESULT OnComplete
([in] CompletionCodes code
,
139 [in, string] const WCHAR
* reserved
);
140 HRESULT SetEventSink
([in] IProgressWndEvents
* ui_sink
);
143 // TODO: Component story.
144 // TODO: Should CheckForUpdate be synchronous? We can avoid the
145 // observer. However, it may block the UI.
146 // TODO: On-Demand Installs.
150 uuid(31AC3F11
-E5EA
-4a85
-8A3D
-8E095A39C27B
),
151 helpstring("IGoogleUpdate Interface"),
152 pointer_default(unique)
154 interface IGoogleUpdate
: IUnknown
{
155 // @param guid The guid for the app to be updated.
156 // @param observer The eventing interface.
157 HRESULT CheckForUpdate
([in, string] const WCHAR
* guid
,
158 [in] IJobObserver
* observer
);
160 // @param guid The guid for the app to be updated.
161 // @param observer The eventing interface.
162 HRESULT Update
([in, string] const WCHAR
* guid
,
163 [in] IJobObserver
* observer
);
166 // IGoogleUpdateCore is an internal Omaha interface.
170 uuid(909489C2
-85A6
-4322-AA56
-D25278649D67
),
171 helpstring("Google Update Core Interface"),
172 pointer_default(unique)
174 interface IGoogleUpdateCore
: IUnknown
176 // Runs a command elevated.
178 // @param app_id Unique id to identify the calling client application
179 // @param event_id Unique id for the command
180 // @param caller_proc_id The process id of the calling process
181 // @param proc_handle The process handle valid in the caller's context
182 HRESULT LaunchCmdElevated
([in, string] const WCHAR
* app_guid
,
183 [in, string] const WCHAR
* cmd_id
,
184 [in] DWORD caller_proc_id
,
185 [out] ULONG_PTR
* proc_handle
);
189 uuid(7E6CD20B
-8688-4960-96D9
-B979471577B8
),
191 helpstring("Google Update Type Library")
193 library GoogleUpdateLib
{
194 importlib
("stdole2.tlb");
196 uuid(ABC01078
-F197
-4b0b
-ADBC
-CFE684B39C82
),
197 helpstring("ProcessLauncherClass Class")
199 coclass ProcessLauncherClass
{
200 [default] interface IProcessLauncher
;
203 // This coclass declaration exists only for the purpose of forcing
204 // ::RegisterTypeLib() to register the interfaces within. This is
205 // required so that we can marshal/unmarshal the interfaces using the TypeLib
208 uuid(9564861C
-3469-4c9a
-956A
-74D5690790E6
),
209 helpstring("InterfaceRegistrar Class")
211 coclass InterfaceRegistrar
{
212 [default] interface IBrowserHttpRequest2
;
213 interface IJobObserver
;
214 interface IProgressWndEvents
;
218 uuid(2F0E2680
-9FF5
-43c0
-B76E
-114A56E93598
),
219 helpstring("OnDemand updates for per-user applications.")
221 coclass OnDemandUserAppsClass
{
222 [default] interface IGoogleUpdate
;
226 uuid(6F8BD55B
-E83D
-4a47
-85BE
-81FFA8057A69
),
227 helpstring("OnDemand updates for per-machine applications.")
229 coclass OnDemandMachineAppsClass
{
230 [default] interface IGoogleUpdate
;
234 uuid(E225E692
-4B47
-4777-9BED
-4FD7FE257F0E
),
235 helpstring("GoogleUpdateCore Class")
237 coclass GoogleUpdateCoreClass
239 [default] interface IGoogleUpdateCore
;