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.

74 lines
2.3 KiB

  1. #pragma once
  2. #include "MigrationBase.h"
  3. //---------------------------------------------------------------------------
  4. // GroupMigration Class
  5. //---------------------------------------------------------------------------
  6. class ATL_NO_VTABLE CGroupMigration :
  7. public CComObjectRootEx<CComSingleThreadModel>,
  8. public IDispatchImpl<IGroupMigration, &IID_IGroupMigration, &LIBID_ADMT>,
  9. public CMigrationBase
  10. {
  11. public:
  12. CGroupMigration();
  13. ~CGroupMigration();
  14. DECLARE_NO_REGISTRY()
  15. BEGIN_COM_MAP(CGroupMigration)
  16. COM_INTERFACE_ENTRY(IDispatch)
  17. COM_INTERFACE_ENTRY(IGroupMigration)
  18. END_COM_MAP()
  19. public:
  20. // IGroupMigration
  21. STDMETHOD(put_MigrateSIDs)(VARIANT_BOOL bMigrate);
  22. STDMETHOD(get_MigrateSIDs)(VARIANT_BOOL* pbMigrate);
  23. STDMETHOD(put_UpdateGroupRights)(VARIANT_BOOL bUpdate);
  24. STDMETHOD(get_UpdateGroupRights)(VARIANT_BOOL* pbUpdate);
  25. STDMETHOD(put_UpdatePreviouslyMigratedObjects)(VARIANT_BOOL bUpdate);
  26. STDMETHOD(get_UpdatePreviouslyMigratedObjects)(VARIANT_BOOL* pbUpdate);
  27. STDMETHOD(put_FixGroupMembership)(VARIANT_BOOL bFix);
  28. STDMETHOD(get_FixGroupMembership)(VARIANT_BOOL* pbFix);
  29. STDMETHOD(put_MigrateMembers)(VARIANT_BOOL bMigrate);
  30. STDMETHOD(get_MigrateMembers)(VARIANT_BOOL* pbMigrate);
  31. STDMETHOD(put_DisableOption)(long lOption);
  32. STDMETHOD(get_DisableOption)(long* plOption);
  33. STDMETHOD(put_SourceExpiration)(long lExpiration);
  34. STDMETHOD(get_SourceExpiration)(long* plExpiration);
  35. STDMETHOD(put_TranslateRoamingProfile)(VARIANT_BOOL bTranslate);
  36. STDMETHOD(get_TranslateRoamingProfile)(VARIANT_BOOL* pbTranslate);
  37. STDMETHOD(Migrate)(long lOptions, VARIANT vntInclude, VARIANT vntExclude);
  38. protected:
  39. void ValidateMigrationParameters();
  40. virtual void DoNames();
  41. virtual void DoDomain();
  42. void DoContainers(CContainer& rSource, CContainer& rTarget);
  43. void DoGroups(CContainer& rSource, CContainer& rTarget);
  44. void DoGroups(CDomainAccounts& rGroups, CContainer& rTarget);
  45. void SetOptions(_bstr_t strTargetOu, CVarSet& rVarSet);
  46. void SetAccountOptions(CVarSet& rVarSet);
  47. protected:
  48. bool m_bMigrateSids;
  49. bool m_bUpdateGroupRights;
  50. bool m_bUpdateMigrated;
  51. bool m_bFixGroupMembership;
  52. bool m_bMigrateMembers;
  53. long m_lDisableOption;
  54. long m_lSourceExpiration;
  55. bool m_bTranslateRoamingProfile;
  56. };