summaryrefslogtreecommitdiff
path: root/ndb/src/mgmapi/LocalConfig.hpp
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2004-11-18 18:38:38 +0000
committerunknown <tomas@poseidon.ndb.mysql.com>2004-11-18 18:38:38 +0000
commit61cf4698cdfbe8df8cca07ca809872fb096dcdfb (patch)
treea6ccb7cdbc13d7d41174cf214961175c44012134 /ndb/src/mgmapi/LocalConfig.hpp
parent7d375cc4b38edae459d916675bb8a76b09536f73 (diff)
downloadmariadb-git-61cf4698cdfbe8df8cca07ca809872fb096dcdfb.tar.gz
changed mysqladmin.c to mysqladmin.cc
no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother client/Makefile.am: changed mysqladmin.c to mysqladmin.cc client/mysqladmin.cc: changed mysqladmin.c to mysqladmin.cc configure.in: no need for dvlags to have DEFINE_CXA_PURE_VIRTUAL anymore ndb/include/mgmapi/mgmapi.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/mgmcommon/ConfigRetriever.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/include/ndbapi/ndb_cluster_connection.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/common/mgmcommon/ConfigRetriever.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/kernel/vm/Configuration.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals changed to config setting to always use noOfMetaTables to make sure we don't overflow arrays ndb/src/kernel/vm/Configuration.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/LocalConfig.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmapi/mgmapi.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/CommandInterpreter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmclient/ndb_mgmclient.h: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvr.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals enabled multiple management servrs to fetch data configurations from eachother ndb/src/mgmsrv/MgmtSrvr.hpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/MgmtSrvrConfig.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/mgmsrv/main.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/src/ndbapi/ndb_cluster_connection.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals ndb/tools/waiter.cpp: aligned the parsing of connectstring, retries for connect, allocation of nodeid for all cluster nodes removed all dependencies of LocalConfig, except for mgmapi internals
Diffstat (limited to 'ndb/src/mgmapi/LocalConfig.hpp')
-rw-r--r--ndb/src/mgmapi/LocalConfig.hpp68
1 files changed, 68 insertions, 0 deletions
diff --git a/ndb/src/mgmapi/LocalConfig.hpp b/ndb/src/mgmapi/LocalConfig.hpp
new file mode 100644
index 00000000000..c415ec1be91
--- /dev/null
+++ b/ndb/src/mgmapi/LocalConfig.hpp
@@ -0,0 +1,68 @@
+/* Copyright (C) 2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#ifndef LocalConfig_H
+#define LocalConfig_H
+
+#include <ndb_global.h>
+#include <NdbOut.hpp>
+
+//****************************************************************************
+// Description: The class LocalConfig corresponds to the information possible
+// to give in the local configuration file.
+//*****************************************************************************
+
+enum MgmtSrvrId_Type {
+ MgmId_TCP = 0,
+ MgmId_File = 1
+};
+
+struct MgmtSrvrId {
+ MgmtSrvrId_Type type;
+ BaseString name;
+ unsigned int port;
+};
+
+struct LocalConfig {
+
+ int _ownNodeId;
+ Vector<MgmtSrvrId> ids;
+
+ int error_line;
+ char error_msg[256];
+
+ LocalConfig();
+ ~LocalConfig();
+ bool init(const char *connectString = 0,
+ const char *fileName = 0);
+
+ void printError() const;
+ void printUsage() const;
+
+ void setError(int lineNumber, const char * _msg);
+ bool readConnectString(const char *, const char *info);
+ bool readFile(const char * file, bool &fopenError);
+ bool parseLine(char * line, int lineNumber);
+
+ bool parseNodeId(const char *buf);
+ bool parseHostName(const char *buf);
+ bool parseFileName(const char *buf);
+ bool parseString(const char *buf, BaseString &err);
+ char * makeConnectString(char *buf, int sz);
+};
+
+#endif // LocalConfig_H
+