ManagementServer.hpp
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:2k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. /* Copyright (C) 2003 MySQL AB
  2.    This program is free software; you can redistribute it and/or modify
  3.    it under the terms of the GNU General Public License as published by
  4.    the Free Software Foundation; either version 2 of the License, or
  5.    (at your option) any later version.
  6.    This program is distributed in the hope that it will be useful,
  7.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9.    GNU General Public License for more details.
  10.    You should have received a copy of the GNU General Public License
  11.    along with this program; if not, write to the Free Software
  12.    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
  13. #ifndef MANAGEMENTSERVER_HPP
  14. #define MANAGEMENTSERVER_HPP
  15. #include "SignalData.hpp"
  16. /**
  17.  * Request to lock configuration
  18.  */
  19. class MgmLockConfigReq {
  20.   friend class MgmtSrvr;
  21. public:
  22.   STATIC_CONST( SignalLength = 1 );
  23. private:
  24.   Uint32 newConfigGeneration;
  25. };
  26. /**
  27.  * Confirm configuration lock
  28.  */
  29. class MgmLockConfigRep {
  30.   friend class MgmtSrvr;
  31. public:
  32.   STATIC_CONST( SignalLength = 1 );
  33.   /* Error codes */
  34.   enum ErrorCode {
  35.     OK,
  36.     UNKNOWN_ERROR,
  37.     GENERATION_MISMATCH,
  38.     ALREADY_LOCKED
  39.   };
  40. private:
  41.   Uint32 errorCode;
  42. };
  43. /**
  44.  * Unlock configuration
  45.  */
  46. class MgmUnlockConfigReq {
  47.   friend class MgmtSrvr;
  48. public:
  49.   STATIC_CONST( SignalLength = 1 );
  50. private:
  51.   Uint32 commitConfig;
  52. };
  53. /**
  54.  * Confirm config unlock
  55.  */
  56. class MgmUnlockConfigRep {
  57.   friend class MgmtSrvr;
  58. public:
  59.   STATIC_CONST( SignalLength = 1 );
  60.   /* Error codes */
  61.   enum ErrorCode {
  62.     OK,
  63.     UNKNOWN_ERROR,
  64.     NOT_LOCKED
  65.   };
  66. private:
  67.   Uint32 errorCode;
  68. };
  69. #endif /* !MANAGEMENTSERVER_HPP */