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.

105 lines
2.6 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 2000 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: Version.H
  6. //
  7. // Project: Windows 2000 IAS
  8. //
  9. // Description:
  10. // Declaration of the CVersion class
  11. // works only with m_StdSession (database being upgraded)
  12. //
  13. // Author: tperraut
  14. //
  15. // Revision 02/24/2000 created
  16. //
  17. /////////////////////////////////////////////////////////////////////////////
  18. #ifndef VERSION_H_80F1E134_D2A0_4f40_86CB_3D2AC31B1967
  19. #define VERSION_H_80F1E134_D2A0_4f40_86CB_3D2AC31B1967
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. #include "nocopy.h"
  24. #include "basecommand.h"
  25. //////////////////////////////////////////////////////////////////////////////
  26. // class CVersionGetAcc
  27. //////////////////////////////////////////////////////////////////////////////
  28. class CVersionGetAcc
  29. {
  30. protected:
  31. LONG m_Version;
  32. BEGIN_COLUMN_MAP(CVersionGetAcc)
  33. COLUMN_ENTRY(1, m_Version);
  34. END_COLUMN_MAP()
  35. DEFINE_COMMAND(CVersionGetAcc, L" \
  36. SELECT Version.Version \
  37. FROM Version;");
  38. };
  39. //////////////////////////////////////////////////////////////////////////////
  40. // class CVersionGet
  41. //////////////////////////////////////////////////////////////////////////////
  42. class CVersionGet: public CBaseCommand<CAccessor<CVersionGetAcc> >,
  43. private NonCopyable
  44. {
  45. public:
  46. explicit CVersionGet(CSession& Session)
  47. :m_Session(Session)
  48. {
  49. Init(Session);
  50. }
  51. LONG GetVersion();
  52. private:
  53. CSession m_Session;
  54. };
  55. //////////////////////////////////////////////////////////////////////////////
  56. // class CVersionAcc
  57. //////////////////////////////////////////////////////////////////////////////
  58. class CVersionAcc
  59. {
  60. protected:
  61. LONG m_NewVersionParam;
  62. LONG m_OldVersionParam;
  63. BEGIN_PARAM_MAP(CVersionAcc)
  64. COLUMN_ENTRY(1, m_NewVersionParam)
  65. COLUMN_ENTRY(2, m_OldVersionParam)
  66. END_PARAM_MAP()
  67. DEFINE_COMMAND(CVersionAcc, L" \
  68. UPDATE Version \
  69. SET Version.Version = ? \
  70. WHERE Version.Version = ?;");
  71. };
  72. //////////////////////////////////////////////////////////////////////////////
  73. // class CVersion
  74. //////////////////////////////////////////////////////////////////////////////
  75. class CVersion : public CBaseCommand<CAccessor<CVersionAcc> >,
  76. private NonCopyable
  77. {
  78. public:
  79. explicit CVersion(CSession& Session)
  80. :m_Session(Session)
  81. {
  82. Init(Session);
  83. }
  84. LONG GetVersion();
  85. private:
  86. CSession m_Session;
  87. };
  88. #endif // VERSION_H_80F1E134_D2A0_4f40_86CB_3D2AC31B1967