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.

76 lines
2.4 KiB

  1. #pragma once
  2. #include "MigrationBase.h"
  3. //---------------------------------------------------------------------------
  4. // SecurityTranslation Class
  5. //---------------------------------------------------------------------------
  6. class ATL_NO_VTABLE CSecurityTranslation :
  7. public CComObjectRootEx<CComSingleThreadModel>,
  8. public IDispatchImpl<ISecurityTranslation, &IID_ISecurityTranslation, &LIBID_ADMT>,
  9. public CMigrationBase
  10. {
  11. public:
  12. CSecurityTranslation();
  13. ~CSecurityTranslation();
  14. DECLARE_NO_REGISTRY()
  15. BEGIN_COM_MAP(CSecurityTranslation)
  16. COM_INTERFACE_ENTRY(IDispatch)
  17. COM_INTERFACE_ENTRY(ISecurityTranslation)
  18. END_COM_MAP()
  19. public:
  20. // ISecurityTranslation
  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_SidMappingFile)(BSTR bstrFile);
  38. STDMETHOD(get_SidMappingFile)(BSTR* pbstrFile);
  39. STDMETHOD(Translate)(long lOption, VARIANT vntInclude, VARIANT vntExclude);
  40. protected:
  41. virtual void DoNames();
  42. virtual void DoDomain();
  43. void DoContainers(CContainer& rSource);
  44. void DoComputers(CContainer& rSource);
  45. void DoComputers(CDomainAccounts& rComputers);
  46. void SetOptions(CVarSet& rVarSet);
  47. void SetAccountOptions(CVarSet& rVarSet);
  48. void SetSecurity(CVarSet& rVarSet);
  49. protected:
  50. long m_lTranslationOption;
  51. bool m_bTranslateFilesAndFolders;
  52. bool m_bTranslateLocalGroups;
  53. bool m_bTranslatePrinters;
  54. bool m_bTranslateRegistry;
  55. bool m_bTranslateShares;
  56. bool m_bTranslateUserProfiles;
  57. bool m_bTranslateUserRights;
  58. _bstr_t m_bstrSidMappingFile;
  59. };