Use C scalar-type versions of the cryptohome API in cryptohome_library
[chromium-blink-merge.git] / google_update / google_update_idl.idl
bloba8889b8ba089ea4ad7371ed81f48bdaf438f1fbd
1 // Copyright 2006 Google Inc. All Rights Reserved.
2 //
3 // Author: Vivek Rao - vivekrao@google.com
4 //
5 // The proxy clsid #defined as PROXY_CLSID_IS in mk_common needs to be changed
6 // anytime any interface below changes, or if a new interface is added.
8 import "oaidl.idl";
9 import "ocidl.idl";
12 object,
13 uuid(5B25A8DC-1780-4178-A629-6BE8B8DEFAA2),
14 oleautomation,
15 nonextensible,
16 pointer_default(unique)
18 interface IBrowserHttpRequest2 : IUnknown {
19 // This method will send request/data from the browser process.
20 // @param url URL where request will be send.
21 // @param post_data POST data, if any. Can be NULL.
22 // @param request_headers HTTP request headers, if any. Can be NULL.
23 // @param response_headers_needed HTTP response headers that are needed.
24 // Should be one of the values listed here:
25 // http://go/queryinfoflags
26 // The input is a SAFEARRAY of DWORD. Can be a
27 // VT_EMPTY.
28 // @param response_headers HTTP response headers, returned as SAFEARRAY
29 // of BSTR. The values corresponding one-to-one
30 // with the response_headers_needed values. Can
31 // be NULL if response_headers_needed==VT_EMPTY
32 // @param response_code HTTP response code.
33 // @param cache_filename Cache file that contains the response data.
34 HRESULT Send([in] BSTR url,
35 [in] BSTR post_data,
36 [in] BSTR request_headers,
37 [in] VARIANT response_headers_needed,
38 [out] VARIANT* response_headers,
39 [out] DWORD* response_code,
40 [out] BSTR* cache_filename);
44 object,
45 oleautomation,
46 uuid(128C2DA6-2BC0-44c0-B3F6-4EC22E647964),
47 helpstring("Google Update IProcessLauncher Interface"),
48 pointer_default(unique)
50 interface IProcessLauncher : IUnknown {
51 // @param cmd_line The full command line to execute.
52 HRESULT LaunchCmdLine([in, string] const WCHAR* cmd_line);
54 // @param browser_type The browser to start.
55 // @param url The url to launch the browser with.
56 HRESULT LaunchBrowser([in] DWORD browser_type,
57 [in, string] const WCHAR* url);
59 // @param app_id Unique id to identify the calling client application
60 // @param event_id Unique id for the command
61 // @param caller_proc_id The process id of the calling process
62 // @param proc_handle The process handle valid in the caller's context
63 HRESULT LaunchCmdElevated([in, string] const WCHAR* app_guid,
64 [in, string] const WCHAR* cmd_id,
65 [in] DWORD caller_proc_id,
66 [out] ULONG_PTR* proc_handle);
69 typedef enum {
70 COMPLETION_CODE_SUCCESS = 1,
71 COMPLETION_CODE_SUCCESS_CLOSE_UI,
72 COMPLETION_CODE_ERROR,
73 COMPLETION_CODE_RESTART_ALL_BROWSERS,
74 COMPLETION_CODE_REBOOT,
75 COMPLETION_CODE_RESTART_BROWSER,
76 COMPLETION_CODE_RESTART_ALL_BROWSERS_NOTICE_ONLY,
77 COMPLETION_CODE_REBOOT_NOTICE_ONLY,
78 COMPLETION_CODE_RESTART_BROWSER_NOTICE_ONLY,
79 COMPLETION_CODE_RUN_COMMAND,
80 } CompletionCodes;
83 object,
84 oleautomation,
85 uuid(1C642CED-CA3B-4013-A9DF-CA6CE5FF6503),
86 helpstring("GoogleUpdate UI-specific events Interface"),
87 pointer_default(unique)
89 interface IProgressWndEvents : IUnknown {
90 // The UI is closing down. The user has clicked on either the "X" or the
91 // other buttons of the UI to close the window.
92 HRESULT DoClose();
94 // Pause has been clicked on.
95 HRESULT DoPause();
97 // Resume has been clicked on.
98 HRESULT DoResume();
100 // RestartBrowsers button has been clicked on.
101 HRESULT DoRestartBrowsers();
103 // Reboot button has been clicked on.
104 HRESULT DoReboot();
106 // Launch Browser.
107 HRESULT DoLaunchBrowser([in, string] const WCHAR* url);
112 object,
113 oleautomation,
114 uuid(49D7563B-2DDB-4831-88C8-768A53833837),
115 helpstring("IJobObserver Interface"),
116 pointer_default(unique)
118 interface IJobObserver : IUnknown {
119 HRESULT OnShow();
120 HRESULT OnCheckingForUpdate();
121 HRESULT OnUpdateAvailable([in, string] const WCHAR* version_string);
122 HRESULT OnWaitingToDownload();
123 HRESULT OnDownloading([in] int time_remaining_ms, [in] int pos);
124 HRESULT OnWaitingToInstall();
125 HRESULT OnInstalling();
126 HRESULT OnPause();
127 HRESULT OnComplete([in] CompletionCodes code,
128 [in, string] const WCHAR* reserved);
129 HRESULT SetEventSink([in] IProgressWndEvents* ui_sink);
132 // TODO(ganesh): Component story.
133 // TODO(ganesh): Should CheckForUpdate be synchronous? We can avoid the
134 // observer. However, it may block the UI.
135 // TODO(ganesh): On-Demand Installs.
137 object,
138 oleautomation,
139 uuid(31AC3F11-E5EA-4a85-8A3D-8E095A39C27B),
140 helpstring("IGoogleUpdate Interface"),
141 pointer_default(unique)
143 interface IGoogleUpdate : IUnknown {
144 // @param guid The guid for the app to be updated.
145 // @param observer The eventing interface.
146 HRESULT CheckForUpdate([in, string] const WCHAR* guid,
147 [in] IJobObserver* observer);
149 // @param guid The guid for the app to be updated.
150 // @param observer The eventing interface.
151 HRESULT Update([in, string] const WCHAR* guid,
152 [in] IJobObserver* observer);
155 // IGoogleUpdateCore is an internal Omaha interface.
157 object,
158 oleautomation,
159 uuid(909489C2-85A6-4322-AA56-D25278649D67),
160 helpstring("Google Update Core Interface"),
161 pointer_default(unique)
163 interface IGoogleUpdateCore : IUnknown
165 // Runs a command elevated.
167 // @param app_id Unique id to identify the calling client application
168 // @param event_id Unique id for the command
169 // @param caller_proc_id The process id of the calling process
170 // @param proc_handle The process handle valid in the caller's context
171 HRESULT LaunchCmdElevated([in, string] const WCHAR* app_guid,
172 [in, string] const WCHAR* cmd_id,
173 [in] DWORD caller_proc_id,
174 [out] ULONG_PTR* proc_handle);
178 uuid(7E6CD20B-8688-4960-96D9-B979471577B8),
179 version(1.0),
180 helpstring("Google Update Type Library")
182 library GoogleUpdateLib {
183 importlib("stdole2.tlb");
185 uuid(ABC01078-F197-4b0b-ADBC-CFE684B39C82),
186 helpstring("ProcessLauncherClass Class")
188 coclass ProcessLauncherClass {
189 [default] interface IProcessLauncher;
192 // This coclass declaration exists only for the purpose of forcing
193 // ::RegisterTypeLib() to register the interfaces within. This is
194 // required so that we can marshal/unmarshal the interfaces using the TypeLib
195 // marshaler.
197 uuid(9564861C-3469-4c9a-956A-74D5690790E6),
198 helpstring("InterfaceRegistrar Class")
200 coclass InterfaceRegistrar {
201 [default] interface IBrowserHttpRequest2;
202 interface IJobObserver;
203 interface IProgressWndEvents;
207 uuid(2F0E2680-9FF5-43c0-B76E-114A56E93598),
208 helpstring("OnDemand updates for per-user applications.")
210 coclass OnDemandUserAppsClass {
211 [default] interface IGoogleUpdate;
215 uuid(6F8BD55B-E83D-4a47-85BE-81FFA8057A69),
216 helpstring("OnDemand updates for per-machine applications.")
218 coclass OnDemandMachineAppsClass {
219 [default] interface IGoogleUpdate;
223 uuid(E225E692-4B47-4777-9BED-4FD7FE257F0E),
224 helpstring("GoogleUpdateCore Class")
226 coclass GoogleUpdateCoreClass
228 [default] interface IGoogleUpdateCore;