Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

653 lines
28 KiB

  1. // IUCtl.idl : IDL source for IUCtl.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (IUCtl.tlb) and marshalling code.
  5. import "oaidl.idl";
  6. import "ocidl.idl";
  7. [
  8. object,
  9. uuid(4F5E50AF-A2C0-40EF-AC9A-469D9462EA76),
  10. dual,
  11. helpstring("IUpdate Interface"),
  12. pointer_default(unique)
  13. ]
  14. interface IUpdate : IDispatch
  15. {
  16. /**
  17. * Gets the basic system specs
  18. * @param bstrXmlClasses a list of requested classes, NULL if any
  19. * <devices>
  20. * <class name="video"/>
  21. * <class name="sound" id="2560AD4D-3ED3-49C6-A937-4368C0B0E06A"/>
  22. * </devices>
  23. * @param pbstrXmlDetectionResult [out]
  24. * the detection result in simple xml format
  25. * <systemInfo>
  26. * <regKeys>
  27. * <HKEY_LOCAL_MACHINE>
  28. * <SOFTWARE>
  29. * <Microsoft\>
  30. * <Adobe\>
  31. * </SOFTWARE>
  32. * </HKEY_LOCAL_MACHINE>
  33. * </regKeys>
  34. * <os>Win95</os>
  35. * <locale> </locale>
  36. * <devices>
  37. * <device instance="PCI\VEN_8086&DEV_7191&SUBSYS_0000000&REV_02\2&EBB567F&0&08">
  38. * <hwid hash="989898" rank="1">
  39. * PCI\VEN_8086&DEV_7191&SUBSYS_0000000&REV_02
  40. * </hwid>
  41. * <hwid hash="989892324" rank="2">
  42. * PCI\VEN_8086&DEV_7191&SUBSYS_0000000
  43. * </hwid>
  44. * </device>
  45. * ...
  46. * </devices>
  47. * </systemInfo>
  48. */
  49. [id(1), helpstring("method GetSystemSpec() gets the basic system specs")]
  50. HRESULT GetSystemSpec( [in] BSTR bstrXmlClasses,
  51. [out, retval] BSTR* pbstrXmlDetectionResult );
  52. /**
  53. * Gets a catalog base on the specified information
  54. * @param bstrXmlClientInfo the credentials of the client in xml format
  55. * @param bstrXmlSystemSpec the detected system specifications in xml
  56. * @param bstrXmlQuery the user query infomation in xml
  57. * @param pbstrXmlCatalog [out] the xml catalog retrieved
  58. */
  59. [id(2), helpstring("method GetManifest() gets a catalog base on the specified information")]
  60. HRESULT GetManifest( [in] BSTR bstrXmlClientInfo,
  61. [in] BSTR bstrXmlSystemSpec,
  62. [in] BSTR bstrXmlQuery,
  63. [out, retval] BSTR* pbstrXmlCatalog );
  64. /**
  65. * Detect
  66. * @param bstrXmlCatalog the xml catalog portion containing items to be detected
  67. * @param pbstrXmlItems [out] the detected items in xml format
  68. * e.g.
  69. * <id guid="2560AD4D-3ED3-49C6-A937-4368C0B0E06D" installed="1" force="1"/>
  70. */
  71. [id(3), helpstring("method Detect() detects software and drivers on current machine")]
  72. HRESULT Detect( [in] BSTR bstrXmlCatalog,
  73. [out, retval] BSTR* pbstrXmlItems );
  74. /**
  75. * Synchronized download
  76. * @param bstrXmlClientInfo the credentials of the client in xml format
  77. * @param bstrXmlCatalog the xml catalog portion containing items to be downloaded
  78. * @param bstrDestinationFolder the destination folder. Null will use the default IU folder
  79. * @param lMode indicates throttled or fore-ground downloading mode
  80. * @param punkProgressListener a notification listener - that implements the
  81. * IProgressListener (see below), to receive notifications about progress.
  82. * @param pbstrXmlItems [out] the items with download status in xml format
  83. * e.g.
  84. * <id guid="2560AD4D-3ED3-49C6-A937-4368C0B0E06D" downloaded="1"/>
  85. */
  86. [id(4), helpstring("method Dowload() performs synchronized downloading")]
  87. HRESULT Download( [in] BSTR bstrXmlClientInfo,
  88. [in] BSTR bstrXmlCatalog,
  89. [in] BSTR bstrDestinationFolder,
  90. [in] LONG lMode,
  91. [in] IUnknown* punkProgressListener,
  92. [out, retval] BSTR* pbstrXmlItems );
  93. /**
  94. * Download asynchronously - the method will return before completion
  95. * @param bstrXmlClientInfo the credentials of the client in xml format
  96. * @param bstrXmlCatalog the xml catalog portion containing items to be downloaded
  97. * @param bstrDestinationFolder the destination folder. Null will use the default IU folder
  98. * @param lMode indicates throttled or fore-ground downloading mode
  99. * @param punkProgressListener a notification listener - that implements the
  100. * IProgressListener (see below), to receive notifications about progress.
  101. * @param bstrUuidOperation an id provided by the client to provide further
  102. * identification to the operation as indexes may be reused.
  103. * @param pbstrUuidOperation [out] the operation ID. If it is not provided by the
  104. * in bstrUuidOperation parameter (an empty string is passed), it will generate a new UUID,
  105. * in which case, the caller will be responsible to free the memory of the
  106. * string buffer that holds the generated UUID using SysFreeString().
  107. * Otherwise, it returns the value passed by bstrUuidOperation.
  108. */
  109. [id(5), helpstring("method DownloadAsync() performs asynchronized downloading")]
  110. HRESULT DownloadAsync( [in] BSTR bstrXmlClientInfo,
  111. [in] BSTR bstrXmlCatalog,
  112. [in] BSTR bstrDestinationFolder,
  113. [in] LONG lMode,
  114. [in] IUnknown* punkProgressListener,
  115. [in] BSTR bstrUuidOperation,
  116. [out, retval] BSTR* pbstrUuidOperation );
  117. /**
  118. * Synchronized install
  119. * @param bstrXmlCatalog the xml catalog portion containing items to be installed
  120. * @param bstrXmlDownloadedItems the xml of downloaded items and their respective
  121. download result as described in the result schema. Install uses this
  122. to know whether the items were downloaded and if so where they
  123. were downloaded to so that it can install the items
  124. * @param lMode indicates different installation mode (undefined)
  125. * @param punkProgressListener a notification listener - that implements the
  126. * IProgressListener (see below), to receive notifications about progress.
  127. * @param pbstrXmlItems [out] the items with installation status in xml format
  128. * e.g.
  129. * <id guid="2560AD4D-3ED3-49C6-A937-4368C0B0E06D" installed="1"/>
  130. */
  131. [id(6), helpstring("method Install() performs synchronized installation")]
  132. HRESULT Install( [in] BSTR bstrXmlClientInfo,
  133. [in] BSTR bstrXmlCatalog,
  134. [in] BSTR bstrXmlDownloadedItems,
  135. [in] LONG lMode,
  136. [in] IUnknown* punkProgressListener,
  137. [out, retval] BSTR* pbstrXmlItems );
  138. /**
  139. * Install Asynchronously
  140. * @param bstrXmlCatalog the xml catalog portion containing items to be installed
  141. * @param bstrXmlDownloadedItems the xml of downloaded items and their respective
  142. download result as described in the result schema. Install uses this
  143. to know whether the items were downloaded and if so where they
  144. were downloaded to so that it can install the items
  145. * @param lMode indicates different installation mode (undefined)
  146. * @param punkProgressListener a notification listener - that implements the
  147. * IProgressListener (see below), to receive notifications about progress.
  148. * @param bstrUuidOperation an id provided by the client to provide further
  149. * identification to the operation as indexes may be reused.
  150. * @param pbstrUuidOperation [out] the operation ID. If it is not provided by the
  151. * in bstrUuidOperation parameter (an empty string is passed), it will generate a new UUID,
  152. * in which case, the caller will be responsible to free the memory of the
  153. * string buffer that holds the generated UUID using SysFreeString().
  154. * Otherwise, it returns the value passed by bstrUuidOperation.
  155. */
  156. [id(7), helpstring("method InstallAsync() performs asynchronized installation")]
  157. HRESULT InstallAsync( [in] BSTR bstrXmlClientInfo,
  158. [in] BSTR bstrXmlCatalog,
  159. [in] BSTR bstrXmlDownloadedItems,
  160. [in] LONG lMode,
  161. [in] IUnknown* punkProgressListener,
  162. [in] BSTR bstrUuidOperation,
  163. [out, retval] BSTR* pbstrUuidOperation );
  164. /**
  165. * Set the operation status
  166. * @param bstrUuidOperation an id provided by the client to provide further
  167. * identification to the operation as indexes may be reused.
  168. * @param lMode: a bitmask for the following mode:
  169. * const LONG UPDATE_COMMAND_PAUSE = 0x00000001;
  170. * const LONG UPDATE_COMMAND_RESUME = 0x00000002;
  171. * const LONG UPDATE_COMMAND_CANCEL = 0x00000004;
  172. *
  173. */
  174. [id(8), helpstring("method SetOperationModes() sets the mode of an asynchronous operation")]
  175. HRESULT SetOperationMode( [in] BSTR bstrUuidOperation,
  176. [in] LONG lMode );
  177. /**
  178. * Get the history log
  179. * @param bstrDateTimeFrom the start date and time for which a log is required.
  180. * This is a string in ANSI format (YYYY-MM-DDTHH-MM). If the string is empty,
  181. * there will be no date restriction of the returned history log.
  182. * @param bstrDateTimeTo the end date and time for which a log is required.
  183. * This is a string in ANSI format (YYYY-MM-DDTHH-MM). If the string is empty,
  184. * there will be no date restriction of the returned history log.
  185. * @param bstrClient the name of the client that initiated the action. If this parameter
  186. * is null or an empty string, then there will be no filtering based on the client.
  187. * @param bstrPath the path used for download or install. Used in the corporate version
  188. * by IT managers. If this parameter is null or an empty string, then there will
  189. * be no filtering based on the path.
  190. * @param pbstrLog [out] the history log in xml format
  191. */
  192. [id(9), helpstring("method GetHistory() gets the history log")]
  193. HRESULT GetHistory( [in] BSTR bstrDateTimeFrom,
  194. [in] BSTR bstrDateTimeTo,
  195. [in] BSTR bstrClient,
  196. [in] BSTR bstrPath,
  197. [out, retval] BSTR* pbstrLog );
  198. /**
  199. *
  200. * Get the mode of a specified operation.
  201. *
  202. * @param bstrUuidOperation: same as in SetOperationMode()
  203. * @param plMode - the retval for the mode found in a bitmask for:
  204. *
  205. * const LONG UPDATE_MODE_PAUSED = 0x00000001;
  206. * const LONG UPDATE_MODE_RUNNING = 0x00000002;
  207. * const LONG UPDATE_MODE_NOTEXISTS = 0x00000004;
  208. *
  209. */
  210. [id(10), helpstring("method GetOperationMode() retrieves the current mode of an operation")]
  211. HRESULT GetOperationMode(
  212. [in] BSTR bstrUuidOperation,
  213. [out,retval] LONG* plMode
  214. );
  215. /**
  216. *
  217. * Set a property of this control
  218. * Calling this method will not cause the engine loaded
  219. *
  220. * @param lProperty - the identifier to flag which property need changed
  221. * UPDATE_PROP_OFFLINEMODE (TRUE/[FALSE])
  222. * UPDATE_PROP_USECOMPRESSION ([TRUE]/FALSE)
  223. *
  224. * @param varValue - the value to change
  225. *
  226. */
  227. [id(11), helpstring("method SetProperty")]
  228. HRESULT SetProperty(
  229. [in] LONG lProperty,
  230. [in] VARIANT varValue
  231. );
  232. /**
  233. *
  234. * Retrieve a property of this control
  235. * Calling this method will not cause the engine loaded
  236. *
  237. * @param lProperty - the identifier to flag which property need retrieved
  238. * UPDATE_PROP_OFFLINEMODE (TRUE/[FALSE]),
  239. * UPDATE_PROP_USECOMPRESSION ([TRUE]/FALSE)
  240. *
  241. * @param varValue - the value to retrieve
  242. *
  243. */
  244. [id(12), helpstring("method GetProperty")]
  245. HRESULT GetProperty(
  246. [in] LONG lProperty,
  247. [out,retval] VARIANT* pvarValue
  248. );
  249. /**
  250. *
  251. * Primarily expose shlwapi BrowseForFolder API, can also do checking
  252. * on R/W access if flagged so.
  253. *
  254. * @param bstrStartFolder - the folder from which to start. If NULL or empty str
  255. * is being passed in, then start from desktop
  256. *
  257. * @param flag - can be one or more (OR'ed) value defined below
  258. *
  259. * @param pbstrFolder - returned folder if a valid folder selected
  260. *
  261. */
  262. [id(13), helpstring("method BrowseForFolder pops up UI for browsing a folder")]
  263. HRESULT BrowseForFolder(
  264. [in] BSTR bstrStartFolder,
  265. [in] LONG flag,
  266. [out,retval] BSTR* pbstrFolder
  267. );
  268. /**
  269. * constants for BrowseForFolder() API
  270. *
  271. * IUBROWSE_WRITE_ACCESS - validate write access on selected folder
  272. * IUBROWSE_AFFECT_UI - write-access validation affect OK button enable/disable
  273. * IUBROWSE_NOBROWSE - do not show browse folder dialog box. validate path passed-in only
  274. *
  275. * default:
  276. * pop up browse folder dialog box, not doing any write-access validation
  277. *
  278. */
  279. const LONG IUBROWSE_WRITE_ACCESS = 1;
  280. const LONG IUBROWSE_AFFECT_UI = 2;
  281. const LONG IUBROWSE_NOBROWSE = 4;
  282. /**
  283. *
  284. * Allows the Caller to Request the Control to do a Reboot
  285. *
  286. */
  287. [id(14), helpstring("method RebootMachine causes a ShutDown/Restart on the Machine")]
  288. HRESULT RebootMachine();
  289. /**
  290. *
  291. * Initialize the control, including check update necesity and do actual update
  292. *
  293. */
  294. [id(15), helpstring("method Initialize is the first API you have to call before the control will function")]
  295. HRESULT Initialize(
  296. [in] LONG lInitFlag,
  297. [in] IUnknown* punkUpdateCompleteListener,
  298. [out, retval] LONG* plRetVal
  299. );
  300. /**
  301. *
  302. * Helper API to make the control can be unloaded completely from IE so update control
  303. * will not cause reboot.
  304. *
  305. * Call it with parameter 0, in order to create a clone called IUCtl.Update2
  306. * (then set this object to nothing, create object to clone, then set clone to nothing. At
  307. * this time, you are ready to update the original control without causing reboot)
  308. *
  309. * Call it with parameter 1, in order to delete the clone file
  310. *
  311. */
  312. [id(16), helpstring("method PrepareSelfUpdate")]
  313. HRESULT PrepareSelfUpdate([in] LONG lStep);
  314. /**
  315. *
  316. * Helper API to let the caller (script) knows the necessary information
  317. * when Initialize() returns control need updated.
  318. *
  319. * For the current implementation, bstrClientName is ignored, and
  320. * the returned bstr has format:
  321. * "<version>|<url>"
  322. * where:
  323. * <version> is the expacted version number of the control
  324. * <url> is the base url to get the control if this is a CorpWU policy controlled machine,
  325. * or empty if this is a consumer machine (in that case caller, i.e., script, knows
  326. * the default base url, which is the v4 live site)
  327. *
  328. * Script will need these two pieces of information in order to make a right <OBJECT> tag
  329. * for control update.
  330. *
  331. */
  332. [id(17), helpstring("method GetControlExtraInfo")]
  333. HRESULT GetControlExtraInfo([in] BSTR bstrClientName, [out,retval] BSTR *pbstrExtraInfo);
  334. /**
  335. * constants for checking Initialize() API return value
  336. *
  337. * IU_UPDATE_CONTROL_BIT - bit to tell if control needs updated
  338. * IU_UPDATE_ENGINE_BIT - bit to tell if engine needs updated
  339. *
  340. */
  341. const LONG IU_UPDATE_CONTROL_BIT = 1;
  342. const LONG IU_UPDATE_ENGINE_BIT = 2;
  343. /**
  344. *
  345. * constants for Initialize() API flags. These flags are mutual exclusive
  346. *
  347. * IU_INIT_CHECK - only check the update neccesity. Won't cause update happen
  348. * IU_INIT_UPDATE_SYNC - cause the update engine starts in sync mode
  349. * IU_INIT_UPDATE_ASYNC - cause the update engine starts in async mode
  350. *
  351. */
  352. const LONG IU_INIT_CHECK = 0;
  353. const LONG IU_INIT_UPDATE_SYNC = 1;
  354. const LONG IU_INIT_UPDATE_ASYNC = 2;
  355. };
  356. [
  357. object,
  358. uuid(229F78AE-6618-4DF3-95D2-FC26C9F97428),
  359. helpstring("IProgressListener Interface"),
  360. pointer_default(unique)
  361. ]
  362. interface IProgressListener : IUnknown
  363. {
  364. /**
  365. * fire event to notify that this item is about to be downloaded.
  366. * and (in VB) plCommandRequest can be set to pause or cancel the
  367. * whole download/install operation
  368. * @param bstrUuidOperation the operation identification guid
  369. * @param bstrXmlItem item XML node in BSTR, contains identity and platform
  370. * @param plCommandRequest a command to pass from the listener to the owner of the event,
  371. * e.g. UPDATE_COMMAND_CANCEL, zero if nothing is requested.
  372. */
  373. [id(1), helpstring("method OnProgress() notifies the listener for the progress of the operation")]
  374. HRESULT OnItemStart( [in] BSTR bstrUuidOperation,
  375. [in] BSTR bstrXmlItem,
  376. [out] LONG* plCommandRequest );
  377. /**
  378. * Notify the listener that a portion of the files has finished operation
  379. * (e.g downloaded or installed). Enables monitoring of progress.
  380. * @param bstrUuidOperation the operation identification guid
  381. * @param fItemCompleted TRUE if the current item has completed the operation
  382. * @param nPercentComplete total percentage of operation completed
  383. * @param plCommandRequest a command to pass from the listener to the owner of the event,
  384. * e.g. UPDATE_COMMAND_CANCEL, zero if nothing is requested.
  385. */
  386. [id(2), helpstring("method OnProgress() notifies the listener for the progress of the operation")]
  387. HRESULT OnProgress( [in] BSTR bstrUuidOperation,
  388. [in] VARIANT_BOOL fItemCompleted,
  389. [in] BSTR bstrProgress,
  390. [out] LONG* plCommandRequest );
  391. /**
  392. * Notify the listener when the operation is complete.
  393. * @param bstrUuidOperation the operation identification guid
  394. */
  395. [id(3), helpstring("method OperationComplete() notifies the listener when the operation is complete")]
  396. HRESULT OnOperationComplete( [in] BSTR bstrUuidOperation, [in] BSTR bstrXmlItems);
  397. };
  398. [
  399. object,
  400. uuid(1C06B895-E4C8-48eb-9E03-15A53B43B6CA),
  401. helpstring("IUpdateCompleteListener Interface"),
  402. pointer_default(unique)
  403. ]
  404. interface IUpdateCompleteListener : IUnknown
  405. {
  406. /**
  407. * Notify the listener that the async engine update is finished.
  408. *
  409. * @param lErrorCode - ERROR_SUCCESS/S_OK if everything is fine.
  410. * otherwise this is error code returned
  411. *
  412. */
  413. [id(1), helpstring("method OnComplete() notifies the listener when the async engine update is complete")]
  414. HRESULT OnComplete([in] LONG lErrorCode);
  415. };
  416. /**
  417. * the following two groups of constants can be used to construct
  418. * lMode parameter of the following APIs:
  419. * Download()
  420. * DownloadAsync()
  421. * Install()
  422. * InstallAsync()
  423. *
  424. * Obviousely, you can only pick one from each group to make up
  425. * lMode parameter.
  426. *
  427. */
  428. const LONG UPDATE_NOTIFICATION_DEFAULT = 0x00000000;
  429. const LONG UPDATE_NOTIFICATION_ANYPROGRESS = 0x00000000;
  430. const LONG UPDATE_NOTIFICATION_COMPLETEONLY = 0x00010000;
  431. const LONG UPDATE_NOTIFICATION_1PCT = 0x00020000;
  432. const LONG UPDATE_NOTIFICATION_5PCT = 0x00040000;
  433. const LONG UPDATE_NOTIFICATION_10PCT = 0x00080000;
  434. /**
  435. * constant can also be used for GetOperationMode()
  436. */
  437. const LONG UPDATE_MODE_THROTTLE = 0x00000100;
  438. /**
  439. * constant can be used by Download() and DownloadAsync(), which will
  440. * tell these API's to use Corporate directory structure for destination folder.
  441. */
  442. const LONG UPDATE_CORPORATE_MODE = 0x00000200;
  443. /**
  444. * constant can be used by Install() and InstallAsync(). Will disable all
  445. * internet related features
  446. */
  447. const LONG UPDATE_OFFLINE_MODE = 0x00000400;
  448. /**
  449. * constants for SetOperationMode() API
  450. */
  451. const LONG UPDATE_COMMAND_PAUSE = 0x00000001;
  452. const LONG UPDATE_COMMAND_RESUME = 0x00000002;
  453. const LONG UPDATE_COMMAND_CANCEL = 0x00000004;
  454. /**
  455. * constants for GetOperationMode() API
  456. */
  457. const LONG UPDATE_MODE_PAUSED = 0x00000001;
  458. const LONG UPDATE_MODE_RUNNING = 0x00000002;
  459. const LONG UPDATE_MODE_NOTEXISTS = 0x00000004;
  460. /**
  461. * constants for SetProperty() and GetProperty() API
  462. */
  463. const LONG UPDATE_PROP_USECOMPRESSION = 0x00000020;
  464. const LONG UPDATE_PROP_OFFLINEMODE = 0x00000080;
  465. [
  466. object,
  467. uuid(8E2EF6DC-0AB8-4FE0-9049-3BEA4506BF8D),
  468. dual,
  469. helpstring("IDetection Interface"),
  470. pointer_default(unique)
  471. ]
  472. interface IDetection : IDispatch
  473. {
  474. [id(1), helpstring("method Detect() - content provider provided custom detection mechanism as a COM server")]
  475. HRESULT Detect(
  476. [in] BSTR bstrXML, /* detection manifest */
  477. [out] DWORD *pdwDetectionResult /* detection result, see below for interpretation */
  478. );
  479. };
  480. /**
  481. * declare the constants used to manipulate the result of Detect() method
  482. */
  483. /**
  484. * First group, used in <expression> tag, to tell the detection result. This result
  485. * should combined with other expression(s) at the same level
  486. */
  487. const LONG IUDET_BOOL = 0x00000001; /* mask */
  488. const LONG IUDET_FALSE = 0x00000000; /* expression detect FALSE */
  489. const LONG IUDET_TRUE = 0x00000001; /* expression detect TRUE */
  490. const LONG IUDET_NULL = 0x00000002; /* expression detect data missing */
  491. /**
  492. * Second group, used in <detection> tag, to tell the detection result. This result
  493. * should overwrite the rest of <expression>, if any
  494. */
  495. const LONG IUDET_INSTALLED = 0x00000010; /* mask for <installed> result */
  496. const LONG IUDET_INSTALLED_NULL = 0x00000020; /* <installed> missing */
  497. const LONG IUDET_UPTODATE = 0x00000040; /* mask for <upToDate> result */
  498. const LONG IUDET_UPTODATE_NULL = 0x00000080; /* <upToDate> missing */
  499. const LONG IUDET_NEWERVERSION = 0x00000100; /* mask for <newerVersion> result */
  500. const LONG IUDET_NEWERVERSION_NULL = 0x00000200; /* <newerVersion> missing */
  501. const LONG IUDET_EXCLUDED = 0x00000400; /* mask for <excluded> result */
  502. const LONG IUDET_EXCLUDED_NULL = 0x00000800; /* <excluded> missing */
  503. const LONG IUDET_FORCE = 0x00001000; /* mask for <force> result */
  504. const LONG IUDET_FORCE_NULL = 0x00002000; /* <force> missing */
  505. const LONG IUDET_COMPUTER = 0x00004000; // mask for <computerSystem> result
  506. const LONG IUDET_COMPUTER_NULL = 0x00008000; // <computerSystem> missing
  507. [
  508. uuid(306C2111-D294-4DD1-9C47-41036F58EBB3),
  509. version(1.0),
  510. helpstring("IUCtl 1.0 Type Library")
  511. ]
  512. library IUCTLLib
  513. {
  514. importlib("stdole32.tlb");
  515. importlib("stdole2.tlb");
  516. [
  517. uuid(CD19302B-FF55-4274-BA18-D98F21FCD672),
  518. helpstring("IUpdateEvents Interface")
  519. ]
  520. dispinterface IUpdateEvents
  521. {
  522. properties:
  523. methods:
  524. /**
  525. * fire event to notify that this item is about to be downloaded.
  526. * and (in VB) plCommandRequest can be set to pause or cancel the
  527. * whole download/install operation
  528. * @param bstrUuidOperation the operation identification guid
  529. * @param bstrXmlItem item XML node in BSTR, contains identity and platform
  530. * @param plCommandRequest a command to pass from the listener to the owner of the event,
  531. * e.g. UPDATE_COMMAND_CANCEL, zero if nothing is requested.
  532. */
  533. [id(1), helpstring("method OnProgress() notifies the listener for the progress of the operation")]
  534. void OnItemStart( [in] BSTR bstrUuidOperation,
  535. [in] BSTR bstrXmlItem,
  536. [out] LONG* plCommandRequest );
  537. /**
  538. * Notify the listener that a portion of the files has finished operation
  539. * (e.g downloaded or installed). Enables monitoring of progress.
  540. * @param bstrUuidOperation the operation identification guid
  541. * @param fItemCompleted TRUE if the current item has completed the operation
  542. * @param nPercentComplete total percentage of operation completed
  543. * @param plCommandRequest a command to pass from the listener to the owner of the event,
  544. * e.g. UPDATE_COMMAND_CANCEL, zero if nothing is requested.
  545. */
  546. [id(2), helpstring("method OnProgress() notifies the listener for the progress of the operation")]
  547. void OnProgress( [in] BSTR bstrUuidOperation,
  548. [in] VARIANT_BOOL fItemCompleted,
  549. [in] BSTR bstrProgress,
  550. [out] LONG* plCommandRequest );
  551. /**
  552. * Notify the listener when the operation is complete.
  553. * @param bstrUuidOperation the operation identification guid
  554. */
  555. [id(3), helpstring("method OnOperationComplete() notifies the listener when the operation is complete")]
  556. void OnOperationComplete( [in] BSTR bstrUuidOperation, [in] BSTR bstrXmlItems);
  557. /**
  558. * Notify the listener when the engine self-update is complete.
  559. * @param lErrorCode - the operation result
  560. */
  561. [id(4), helpstring("method OnComplete")]
  562. void OnComplete([in] LONG lErrorCode);
  563. };
  564. [
  565. uuid(9F1C11AA-197B-4942-BA54-47A8489BB47F),
  566. helpstring("Update Class")
  567. ]
  568. coclass Update
  569. {
  570. [default] interface IUpdate;
  571. [default, source] dispinterface IUpdateEvents;
  572. };
  573. [
  574. uuid(3E873CB7-D5F5-43EF-AC4A-1F97D3118265),
  575. helpstring("ProgressListener Class")
  576. ]
  577. coclass ProgressListener
  578. {
  579. [default] interface IProgressListener;
  580. };
  581. [
  582. uuid(526ED46B-DBCD-4936-AB2B-D847C605C259),
  583. helpstring("IUpdateCompleteListener Interface")
  584. ]
  585. coclass UpdateCompleteListener
  586. {
  587. [default] interface IUpdateCompleteListener;
  588. };
  589. [
  590. uuid(B5AF6951-FFBD-4E7B-A126-8F28F86E5D2E),
  591. helpstring("Detection Class")
  592. ]
  593. coclass Detection
  594. {
  595. [default] interface IDetection;
  596. };
  597. };