1 /* 2 Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License, version 2.0, 6 as published by the Free Software Foundation. 7 8 This program is also distributed with certain software (including 9 but not limited to OpenSSL) that is licensed under separate terms, 10 as designated in a particular file or component or in included license 11 documentation. The authors of MySQL hereby grant you an additional 12 permission to link the program and your derivative works with the 13 separately licensed software that they have included with MySQL. 14 15 This program is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License, version 2.0, for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program; if not, write to the Free Software 22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 23 */ 24 25 #ifndef API_REGCONF_HPP 26 #define API_REGCONF_HPP 27 28 #include <NodeState.hpp> 29 30 class ApiRegReq { 31 /** 32 * Sender(s) 33 */ 34 friend class ClusterMgr; 35 36 /** 37 * Reciver(s) 38 */ 39 friend class Qmgr; 40 41 public: 42 STATIC_CONST( SignalLength = 3 ); 43 44 private: 45 Uint32 ref; 46 Uint32 version; // Version of API node 47 Uint32 mysql_version; 48 }; 49 50 /** 51 * 52 */ 53 class ApiRegRef { 54 /** 55 * Sender(s) 56 */ 57 friend class Qmgr; 58 59 /** 60 * Reciver(s) 61 */ 62 friend class ClusterMgr; 63 64 public: 65 STATIC_CONST( SignalLength = 4 ); 66 67 enum ErrorCode { 68 WrongType = 1, 69 UnsupportedVersion = 2 70 }; 71 private: 72 Uint32 ref; // Qmgr ref 73 Uint32 version; // Version of NDB node 74 Uint32 errorCode; 75 Uint32 mysql_version; 76 }; 77 78 /** 79 * 80 */ 81 class ApiRegConf { 82 /** 83 * Sender(s) 84 */ 85 friend class Qmgr; 86 87 /** 88 * Reciver(s) 89 */ 90 friend class ClusterMgr; 91 92 public: 93 STATIC_CONST( SignalLength = 5 + NodeState::DataLength ); 94 private: 95 96 Uint32 qmgrRef; 97 Uint32 version; // Version of NDB node 98 Uint32 apiHeartbeatFrequency; 99 Uint32 mysql_version; 100 Uint32 minDbVersion; 101 NodeStatePOD nodeState; 102 }; 103 104 #endif 105