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.

69 lines
1.8 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: _optvalstore.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //
  8. //
  9. //-----------------------------------------------------------------------------
  10. #pragma once
  11. #pragma warning(disable: 4275) // non dll-interface class 'foo' used
  12. // as base for dll-interface class 'bar'
  13. class LTAPIENTRY CLocOptionValStore : public CRefCount, public CObject
  14. { public: CLocOptionValStore() {};
  15. void AssertValid(void) const;
  16. virtual CLocOptionValSet *GetOptions(const CLString &strOptionGroup)
  17. = 0;
  18. virtual BOOL RemoveOption(const CLString &strOptionGroup,
  19. const CLString &strOptionName) = 0;
  20. virtual BOOL StoreOption(const CLString &strOptionGroup,
  21. const CLocOptionVal *);
  22. virtual BOOL StoreOption(const CLString &strOptionGroup,
  23. const CLString &strName, const CLocVariant &) = 0;
  24. virtual BOOL RemoveOptions(const CLString &strOptionGroup) = 0;
  25. private:
  26. CLocOptionValStore(const CLocOptionValStore &);
  27. void operator=(int);
  28. };
  29. class LTAPIENTRY CLocOptionValRegStore : public CLocOptionValStore
  30. {
  31. public:
  32. CLocOptionValRegStore();
  33. void AssertValid(void) const;
  34. BOOL SetRegistryKeyName(const TCHAR *);
  35. virtual CLocOptionValSet *GetOptions(const CLString &strOptionGroup);
  36. virtual BOOL RemoveOption(const CLString &strOptionGroup,
  37. const CLString &strOptionName);
  38. virtual BOOL StoreOption(const CLString &strOptionGroup,
  39. const CLString &strName, const CLocVariant &);
  40. virtual BOOL RemoveOptions(const CLString &strOptionGroup);
  41. virtual ~CLocOptionValRegStore();
  42. private:
  43. HKEY m_hkRegStorage;
  44. CLocOptionValSetList m_oslCache;
  45. void PurgeOptionCache(void);
  46. };
  47. #pragma warning(default: 4275)