Leaked source code of windows server 2003
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.

380 lines
10 KiB

  1. /*
  2. ****************************************************************************
  3. | Copyright (C) 2002 Microsoft Corporation
  4. |
  5. | Component / Subcomponent
  6. | IIS 6.0 / IIS Migration Wizard
  7. |
  8. | Based on:
  9. | http://iis6/Specs/IIS%20Migration6.0_Final.doc
  10. |
  11. | Abstract:
  12. | COM object/interface definitions
  13. |
  14. | Author:
  15. | ivelinj
  16. |
  17. | Revision History:
  18. | V1.00 March 2002
  19. |
  20. ****************************************************************************
  21. */
  22. import "oaidl.idl";
  23. import "ocidl.idl";
  24. // ISiteInfo interface
  25. /////////////////////////////////////////////////////////////////////////////////////////
  26. [
  27. object,
  28. uuid( 8034C477-B221-4635-99F4-64E37B1AD478 ),
  29. dual,
  30. helpstring("ISiteInfo interface"),
  31. pointer_default(unique)
  32. ]
  33. interface ISiteInfo : IDispatch
  34. {
  35. [propget, id(1), helpstring("SiteID")]
  36. HRESULT SiteID( [out, retval] LONG* pVal );
  37. [propget, id(2), helpstring("Site DisplayName")]
  38. HRESULT DisplayName( [out, retval] BSTR* pVal );
  39. [propget, id(3), helpstring("Is Content Included")]
  40. HRESULT ContentIncluded( [out, retval] VARIANT_BOOL* pVal );
  41. [propget, id(4), helpstring("Is a FrontPage Site")]
  42. HRESULT IsFrontPageSite( [out, retval] VARIANT_BOOL* pVal );
  43. [propget, id(5), helpstring("Have Certificates")]
  44. HRESULT HaveCertificates( [out, retval] VARIANT_BOOL* pVal );
  45. [propget, id(6), helpstring("Have post-process commands")]
  46. HRESULT HaveCommands( [out, retval] VARIANT_BOOL* pVal );
  47. [propget, id(7), helpstring("The content size in KB")]
  48. HRESULT ContentSize( [out, retval] LONG* pSizeLow );
  49. [propget, id(8), helpstring("Site root dir on the source machine")]
  50. HRESULT SourceRootDir( [out, retval] BSTR* pVal );
  51. [propget, id(9), helpstring("File/dir ACLs included")]
  52. HRESULT ACLsIncluded( [out, retval] VARIANT_BOOL* pVal );
  53. };
  54. // IExportPackage interface
  55. /////////////////////////////////////////////////////////////////////////////////////////
  56. [
  57. object,
  58. uuid( A52679AA-A576-4E4A-958A-2898BB154347 ),
  59. dual,
  60. helpstring("IExportPackage interface"),
  61. pointer_default(unique)
  62. ]
  63. interface IExportPackage : IDispatch
  64. {
  65. [propget, id(1), helpstring("Number of currently selected sites")]
  66. HRESULT SiteCount( [out, retval] SHORT* pVal );
  67. [id(2), helpstring("Adds a site to be exported")]
  68. HRESULT AddSite( [in]LONG SiteID, [in, defaultvalue(0) ]LONG nOptions );
  69. [id(3), helpstring("Adds a post-processing file object")]
  70. HRESULT PostProcessAddFile( [in]LONG nSiteID, [in]BSTR bstrFilePath );
  71. [id(4), helpstring("Adds a post-processing command")]
  72. HRESULT PostProcessAddCommand( [in]LONG nSiteID,
  73. [in]BSTR bstrCommand,
  74. [in]LONG nTimeout,
  75. [in]VARIANT_BOOL bIgnoreErrors );
  76. [id(10), helpstring("Creates the package")]
  77. HRESULT WritePackage( [in] BSTR bstrOutputFilename,
  78. [in] BSTR bstrPassword,
  79. [in] LONG nOptions,
  80. [in, defaultvalue("") ] BSTR bstrComment );
  81. };
  82. // IImportPackage interfce
  83. /////////////////////////////////////////////////////////////////////////////////////////
  84. [
  85. object,
  86. uuid( 0EBC613D-C8BF-4F67-A92A-272325C45C2B ),
  87. dual,
  88. helpstring("IImportPackage interface"),
  89. pointer_default(unique)
  90. ]
  91. interface IImportPackage : IDispatch
  92. {
  93. [propget, id(1), helpstring("Number of sites in the package")]
  94. HRESULT SiteCount( [out, retval] SHORT* pVal );
  95. [propget, id(2), helpstring("Package creation time")]
  96. HRESULT TimeCreated( [out, retval] DATE* pVal );
  97. [propget, id(3), helpstring("Package comment")]
  98. HRESULT Comment( [out, retval] BSTR* pVal );
  99. [propget, id(4), helpstring("Source machine name")]
  100. HRESULT SourceMachine( [out, retval] BSTR* pVal );
  101. [id(53), helpstring("Returns OS version of the source machine")]
  102. HRESULT GetSourceOSVer( [out]BYTE* pMajor,
  103. [out]BYTE* pMinor,
  104. [out]VARIANT_BOOL* pIsServer );
  105. [id(54), helpstring("Returns ISiteInfo for a site")]
  106. HRESULT GetSiteInfo( [in] SHORT SiteIndex, [out,retval] ISiteInfo** ppISiteInfo );
  107. [id(55), helpstring("Import a specific site from the package")]
  108. HRESULT ImportSite( [in]SHORT nSiteIndex,
  109. [in] BSTR bstrSiteRootDir,
  110. [in] LONG nOptions );
  111. [id(57), helpstring("Loads a package to be imported")]
  112. HRESULT LoadPackage( [in] BSTR bstrFilename,
  113. [in] BSTR bstrPassword );
  114. };
  115. // Enummerations
  116. /////////////////////////////////////////////////////////////////////////////////////////
  117. // Notifications for _IExportEvents::OnStateChanged
  118. [
  119. uuid( D2B36BE5-C675-4428-9CDD-3C4C9711EA90 ),
  120. helpstring("Available states for OnStateChanged events"),
  121. public
  122. ]
  123. typedef enum enExportState
  124. {
  125. // Engine init. No additional info
  126. estInitializing = 0,
  127. // New site is to be exported.
  128. // Arg1 is site's display name
  129. estSiteBegin,
  130. // Site configuration is exported
  131. estExportingConfig,
  132. // Site certificate is exported
  133. estExportingCertificate,
  134. // Analazying content structure
  135. // Arg1 is the name of the VirtualDir currently scanned.
  136. // Arg2 is the number of files found in this VDir
  137. // Arg3 is the total size of files found. It's in KB
  138. // Arg1, Arg2 and Arg3 can all be empty before the VDirs are being analyzed
  139. estAnalyzingContent,
  140. // Site content is exported.
  141. // Arg1 is name of the file being exported
  142. // Arg2 is file's index ( zero-based )
  143. // Arg3 is total number of files to be exported
  144. estExportingContent,
  145. // Exporting site's post-import commands/files
  146. // Arg1 is the index of the file/command exported ( current step )
  147. // Arg2 is the total number of steps ( file count + command count )
  148. // Arg3 is the name of the file or is empty if a command is being exported
  149. // Example: if there are 2 files and 3 commands, Arg2=5, Arg1= (0...4)
  150. estExportingPostImport,
  151. // Exporting FP settings
  152. estExportingFrontPage,
  153. // Engine is shutting down. No additional info
  154. estFinalizing,
  155. // Total number of states
  156. estStateCount
  157. }enExportState;
  158. // Notifications for _IImportEvents::OnStateChanged
  159. [
  160. uuid( BEFF470A-FC87-461f-A2A2-16EE61B75E46 ),
  161. helpstring("Available states for OnStateChanged events"),
  162. public
  163. ]
  164. typedef enum enImportState
  165. {
  166. // Engine init. No additional info
  167. istInitializing = 0,
  168. // Progress info
  169. // vntArg1 is the total number of steps.
  170. // After this state, OnStateChanged will be called exactly this number of times
  171. istProgressInfo,
  172. // A Virtual Dir content is being imported
  173. // vntArg1 is the name of the virtual Dir
  174. // vntArg2 is the physical location where the content will be restored
  175. // vntArg3 is the total size of the files to be extracted ( in KB )
  176. istImportingVDir,
  177. // A file is being extracted
  178. // vntArg1 is the name of the file
  179. istImportingFile,
  180. // Importing the SSL certificate
  181. istImportingCertificate,
  182. // Importing the metadata
  183. istImportingConfig,
  184. // Executing the post-process operations
  185. // Arg1 is VARIANT_BOOL showing whether a file is being extracted ( TRUE ) or cmd is being executed ( FALSE )
  186. // Arg2 is the name of the file ( when a file is being extracted ) or the cmd itself
  187. istPostProcess,
  188. // Engine is shutting down. No additional info
  189. istFinalizing,
  190. // Total number of states
  191. istStateCount
  192. }enImportState;
  193. // Progress events
  194. /////////////////////////////////////////////////////////////////////////////////////////
  195. [
  196. uuid( CCEECD08-61B1-47da-9AD9-A9FD51EA19F7 ),
  197. hidden,
  198. helpstring("Events fired by ExportPackage class")
  199. ]
  200. dispinterface _IExportEvents
  201. {
  202. properties:
  203. methods:
  204. [id(1)]
  205. HRESULT OnStateChange( [in]enExportState State,
  206. [in]VARIANT vntArg1,
  207. [in]VARIANT vntArg2,
  208. [in]VARIANT vntArg3,
  209. [out,retval]VARIANT_BOOL* pbContinue );
  210. };
  211. [
  212. uuid( 574682BB-45D6-403d-9864-E573C2A62AC5 ),
  213. hidden,
  214. helpstring("Events fired by IISImport Class")
  215. ]
  216. dispinterface _IImportEvents
  217. {
  218. properties:
  219. methods:
  220. [id(1)]
  221. HRESULT OnStateChange( [in]enImportState State,
  222. [in]VARIANT vntArg1,
  223. [in]VARIANT vntArg2,
  224. [in]VARIANT vntArg3,
  225. [out,retval]VARIANT_BOOL* pbContinue );
  226. };
  227. [
  228. uuid(877054D6-ECB6-4218-8F7D-0399A369BA3E),
  229. version(1.0),
  230. helpstring("Microsoft IISMigrTool 1.0 Library")
  231. ]
  232. library IISMigrToolLib
  233. {
  234. importlib("stdole2.tlb");
  235. [
  236. uuid( 3E63C1DD-AEFC-45E5-B0E1-FC804B4C4E05 ),
  237. helpstring("ExportPackage Class")
  238. ]
  239. coclass ExportPackage
  240. {
  241. [default] interface IExportPackage;
  242. [default,source] dispinterface _IExportEvents;
  243. };
  244. [
  245. uuid( 368E089C-EA8F-4d32-9EA0-CCA5194C1FD9 ),
  246. helpstring( "ImportPackage Class" )
  247. ]
  248. coclass ImportPackage
  249. {
  250. [default] interface IImportPackage;
  251. [default, source] interface _IImportEvents;
  252. };
  253. // Available options for IExportPackage::AddSite
  254. // Can be one or more of the following
  255. [
  256. uuid( 10425436-D507-4E8E-915E-2119E6357632 ),
  257. helpstring("Options for IExportPackage::AddSite"),
  258. ]
  259. enum enAddSiteOptions
  260. {
  261. asDefault = 0x0000,
  262. asNoContent = 0x0001,
  263. asNoCertificates = 0x0002,
  264. asNoContentACLs = 0x0004,
  265. };
  266. // Available options for IExportPackage::WritePackage
  267. // Can be one or more of the following
  268. [
  269. uuid( 811CB96A-8B7E-4476-84A2-10E9AAFA98AE ),
  270. helpstring("Options for IExportPackage::WritePackage"),
  271. ]
  272. enum enWritePkgOptions
  273. {
  274. wpkgDefault = 0x0000,
  275. wpkgEncrypt = 0x0001,
  276. wpkgCompress = 0x0002,
  277. };
  278. // Available options for ISiteInfo::ImportSite
  279. // Can be one or more of the following
  280. [
  281. uuid( 1D6A2709-2919-4786-9B19-3EF989AF625F ),
  282. helpstring("Options for IImportPackage::ImportSite"),
  283. ]
  284. enum enImportOptions
  285. {
  286. impDefault = 0x0000,
  287. impImortInherited = 0x0001,
  288. impExtendFPSites = 0x0002,
  289. impSkipContent = 0x0004,
  290. impSkipCertificate = 0x0008,
  291. impUseExistingCerts = 0x0010,
  292. impSkipPostProcess = 0x0020,
  293. impPurgeOldData = 0x0040,
  294. impSkipFileACLs = 0x0080,
  295. };
  296. };
  297. // GUID associations
  298. /////////////////////////////////////////////////////////////////////////////////////////
  299. cpp_quote( "struct DECLSPEC_UUID( \"8034C477-B221-4635-99F4-64E37B1AD478\") ISiteInfo;" )
  300. cpp_quote( "struct DECLSPEC_UUID( \"A52679AA-A576-4E4A-958A-2898BB154347\") IExportPackage;" )
  301. cpp_quote( "struct DECLSPEC_UUID( \"0EBC613D-C8BF-4F67-A92A-272325C45C2B\") IImportPackage;" )
  302. cpp_quote( "struct DECLSPEC_UUID( \"CCEECD08-61B1-47da-9AD9-A9FD51EA19F7\") _IExportEvents;" )
  303. cpp_quote( "struct DECLSPEC_UUID( \"574682BB-45D6-403d-9864-E573C2A62AC5\") _IImportEvents;" )