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.

78 lines
2.5 KiB

  1. #pragma once
  2. #include "MigrationBase.h"
  3. //---------------------------------------------------------------------------
  4. // ComputerMigration Class
  5. //---------------------------------------------------------------------------
  6. class ATL_NO_VTABLE CComputerMigration :
  7. public CComObjectRootEx<CComSingleThreadModel>,
  8. public IDispatchImpl<IComputerMigration, &IID_IComputerMigration, &LIBID_ADMT>,
  9. public CMigrationBase
  10. {
  11. public:
  12. CComputerMigration();
  13. ~CComputerMigration();
  14. DECLARE_NO_REGISTRY()
  15. BEGIN_COM_MAP(CComputerMigration)
  16. COM_INTERFACE_ENTRY(IDispatch)
  17. COM_INTERFACE_ENTRY(IComputerMigration)
  18. END_COM_MAP()
  19. public:
  20. // IComputerMigration
  21. STDMETHOD(put_TranslationOption)(long lOption);
  22. STDMETHOD(get_TranslationOption)(long* plOption);
  23. STDMETHOD(put_TranslateFilesAndFolders)(VARIANT_BOOL bTranslate);
  24. STDMETHOD(get_TranslateFilesAndFolders)(VARIANT_BOOL* pbTranslate);
  25. STDMETHOD(put_TranslateLocalGroups)(VARIANT_BOOL bTranslate);
  26. STDMETHOD(get_TranslateLocalGroups)(VARIANT_BOOL* pbTranslate);
  27. STDMETHOD(put_TranslatePrinters)(VARIANT_BOOL bTranslate);
  28. STDMETHOD(get_TranslatePrinters)(VARIANT_BOOL* pbTranslate);
  29. STDMETHOD(put_TranslateRegistry)(VARIANT_BOOL bTranslate);
  30. STDMETHOD(get_TranslateRegistry)(VARIANT_BOOL* pbTranslate);
  31. STDMETHOD(put_TranslateShares)(VARIANT_BOOL bTranslate);
  32. STDMETHOD(get_TranslateShares)(VARIANT_BOOL* pbTranslate);
  33. STDMETHOD(put_TranslateUserProfiles)(VARIANT_BOOL bTranslate);
  34. STDMETHOD(get_TranslateUserProfiles)(VARIANT_BOOL* pbTranslate);
  35. STDMETHOD(put_TranslateUserRights)(VARIANT_BOOL bTranslate);
  36. STDMETHOD(get_TranslateUserRights)(VARIANT_BOOL* pbTranslate);
  37. STDMETHOD(put_RestartDelay)(long lTime);
  38. STDMETHOD(get_RestartDelay)(long* plTime);
  39. STDMETHOD(Migrate)(long lOptions, VARIANT vntInclude, VARIANT vntExclude);
  40. protected:
  41. void ValidateMigrationParameters();
  42. virtual void DoNames();
  43. virtual void DoDomain();
  44. void DoContainers(CContainer& rSource, CContainer& rTarget);
  45. void DoComputers(CContainer& rSource, CContainer& rTarget);
  46. void DoComputers(CDomainAccounts& rComputers, CContainer& rTarget);
  47. void SetOptions(_bstr_t strTargetOu, CVarSet& rVarSet);
  48. void SetAccountOptions(CVarSet& rVarSet);
  49. void SetSecurity(CVarSet& rVarSet);
  50. protected:
  51. long m_lTranslationOption;
  52. bool m_bTranslateFilesAndFolders;
  53. bool m_bTranslateLocalGroups;
  54. bool m_bTranslatePrinters;
  55. bool m_bTranslateRegistry;
  56. bool m_bTranslateShares;
  57. bool m_bTranslateUserProfiles;
  58. bool m_bTranslateUserRights;
  59. long m_lRestartDelay;
  60. };