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.

70 lines
2.0 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) Microsoft Corporation
  4. //
  5. // SYNOPSIS
  6. //
  7. // Declares the class MigrateEapConfig.
  8. //
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef MIGRATEEAPCONFIG_H
  11. #define MIGRATEEAPCONFIG_H
  12. #pragma once
  13. #include <set>
  14. #include "atlbase.h"
  15. #include "rrascfg.h"
  16. #include "EapProfile.h"
  17. struct CGlobalData;
  18. _COM_SMARTPTR_TYPEDEF(IEAPProviderConfig2, __uuidof(IEAPProviderConfig2));
  19. // Migrates global EAP config to per-profile config.
  20. class MigrateEapConfig
  21. {
  22. public:
  23. explicit MigrateEapConfig(const CGlobalData& newGlobalData);
  24. // Use compiler-generated version.
  25. // ~MigrateEapConfig() throw ();
  26. void Execute();
  27. private:
  28. // Read and convert the profile.
  29. void ReadProfile(long profilesId);
  30. // Write the converted info back to the database.
  31. void WriteProfile(long profilesId);
  32. // Add the config for the specified type to the current profile.
  33. void AddConfigForType(const wchar_t* typeName);
  34. // Retrieve the global config for the specified type and add it to the
  35. // cache.
  36. void GetGlobalConfig(BYTE typeId, const wchar_t* typeName);
  37. // Used for accessing the database.
  38. const CGlobalData& globalData;
  39. // The globl EAP config data.
  40. EapProfile globalConfig;
  41. // The EAP config data for the current profile.
  42. EapProfile profileConfig;
  43. // Indicates the types for which we've already retrieved the global data.
  44. bool cachedTypes[256];
  45. // The well-known attribute names used for storing EAP configuration.
  46. _bstr_t msNPAllowedEapType;
  47. _bstr_t msEapConfig;
  48. // The registry key where EAP providers are described.
  49. CRegKey eapKey;
  50. // The location of the profiles container in the database.
  51. static const wchar_t profilesPath[];
  52. // Not implemented.
  53. MigrateEapConfig(const MigrateEapConfig&);
  54. MigrateEapConfig& operator=(const MigrateEapConfig&);
  55. };
  56. #endif // MIGRATEEAPCONFIG_H