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.

95 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. ImpExpUtils.h
  5. Abstract:
  6. IIS MetaBase subroutines to support Import
  7. Author:
  8. Mohit Srivastava 04-April-01
  9. Revision History:
  10. Notes:
  11. --*/
  12. #ifndef _impexputils_h_
  13. #define _impexputils_h_
  14. class CImporter
  15. {
  16. public:
  17. CImporter(
  18. LPCWSTR i_wszFileName,
  19. LPCSTR i_pszPassword);
  20. ~CImporter();
  21. HRESULT Init();
  22. HRESULT ShowPathsInFile(
  23. LPCWSTR pszKeyType,
  24. DWORD dwMDBufferSize,
  25. LPWSTR pszBuffer,
  26. DWORD* pdwMDRequiredBufferSize);
  27. HRESULT DoIt(
  28. LPWSTR i_wszSourcePath,
  29. LPCWSTR i_wszKeyType,
  30. DWORD i_dwMDFlags,
  31. CMDBaseObject** o_ppboNew);
  32. static const WCHAR sm_wszInheritedPropertiesLocationPrefix[];
  33. static const ULONG sm_cchInheritedPropertiesLocationPrefix;
  34. private:
  35. //
  36. // This is the relation of the current
  37. // location being read from the XML file to the source path.
  38. //
  39. enum Relation
  40. {
  41. eREL_SELF, eREL_CHILD, eREL_PARENT, eREL_NONE
  42. };
  43. HRESULT InitIST();
  44. Relation GetRelation(
  45. LPCWSTR i_wszSourcePath,
  46. LPCWSTR i_wszCheck);
  47. BOOL IsChild(
  48. LPCWSTR i_wszParent,
  49. LPCWSTR i_wszCheck,
  50. BOOL *o_pbSamePerson);
  51. HRESULT ReadMetaObject(
  52. IN LPCWSTR i_wszAbsParentPath,
  53. IN CMDBaseObject *i_pboParent,
  54. IN LPCWSTR i_wszAbsChildPath,
  55. OUT CMDBaseObject **o_ppboChild);
  56. BOOL EnumMDPath(
  57. LPCWSTR i_wszFullPath,
  58. LPWSTR io_wszPath,
  59. int* io_iStartIndex);
  60. CComPtr<ISimpleTableDispenser2> m_spISTDisp;
  61. CComPtr<ISimpleTableWrite2> m_spISTProperty;
  62. CComPtr<ISimpleTableRead2> m_spISTError;
  63. CComPtr<ICatalogErrorLogger2> m_spILogger;
  64. LPCWSTR m_wszFileName;
  65. LPCSTR m_pszPassword;
  66. bool m_bInitCalled;
  67. };
  68. #endif