mariadb/ndb/include/mgmcommon/IPCConfig.hpp
unknown 59ee75bd57 wl1744 - fix compiler problems
ndb/include/debugger/GrepError.hpp:
  prexif
ndb/include/kernel/LogLevel.hpp:
  fix correct type prototype
ndb/include/kernel/signaldata/FsCloseReq.hpp:
  remove usage of true
ndb/include/mgmapi/mgmapi.h:
  use Uint64 instead of long long
ndb/include/mgmcommon/IPCConfig.hpp:
  correct type
ndb/include/portlib/NdbTCP.h:
  fix #elif
ndb/include/transporter/TransporterRegistry.hpp:
  correct type
ndb/include/util/Parser.hpp:
  correct type
  made stuff public as vc++ couldn't handle template friends
ndb/include/util/SimpleProperties.hpp:
  correct type
ndb/src/common/debugger/EventLogger.cpp:
  Prefix GrepError::Code as GrepError::GE_Code
ndb/src/common/debugger/GrepError.cpp:
  Prefix GrepError::Code as GrepError::GE_Code
ndb/src/common/debugger/signaldata/FsCloseReq.cpp:
  removed usage of true
ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp:
  removed usage of true
ndb/src/common/logger/LogHandlerList.hpp:
  use ndb_global
ndb/src/common/mgmcommon/ConfigRetriever.cpp:
  removed ConfigRetriever::get_config(file) from windows
ndb/src/common/transporter/TransporterRegistry.cpp:
  interface is a reserved word in vc++
ndb/src/kernel/blocks/grep/Grep.hpp:
  Prefix GrepError::Code as GrepError::GE_Code
ndb/src/kernel/vm/Configuration.cpp:
  Use BaseString::snprintf
ndb/src/kernel/vm/Configuration.hpp:
  correct type
ndb/src/kernel/vm/SimplePropertiesSection.cpp:
  correct type
ndb/src/mgmapi/mgmapi_configuration.cpp:
  use Uin6t4
ndb/src/mgmapi/mgmapi_configuration.hpp:
  use Uin6t4
ndb/src/mgmsrv/ConfigInfo.cpp:
  Prefix
ndb/src/mgmsrv/ConfigInfo.hpp:
  prefix
ndb/src/ndbapi/Ndb.cpp:
  removed usued include
ndb/src/ndbapi/NdbImpl.hpp:
  prefix
ndb/src/ndbapi/ObjectMap.hpp:
  Better typecast
2004-11-10 00:13:26 +01:00

83 lines
2.1 KiB
C++

/* 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 IPCConfig_H
#define IPCConfig_H
#include <ndb_types.h>
#include <ndb_limits.h>
#include <kernel_types.h>
#include <Properties.hpp>
/**
* @class IPCConfig
* @brief Config transporters in TransporterRegistry using Properties config
*/
class IPCConfig
{
public:
IPCConfig(Properties * props);
~IPCConfig();
/** @return 0 for OK */
int init();
NodeId ownId() const;
/** @return No of transporters configured */
int configureTransporters(class TransporterRegistry * theTransporterRegistry);
/**
* Supply a nodeId,
* and get next higher node id
* @return false if none found, true otherwise
*
* getREPHBFrequency and getNodeType uses the last Id supplied to
* getNextRemoteNodeId.
*/
bool getNextRemoteNodeId(NodeId & nodeId) const;
Uint32 getREPHBFrequency(NodeId id) const;
const char* getNodeType(NodeId id) const;
NodeId getNoOfRemoteNodes() const {
return theNoOfRemoteNodes;
}
void print() const { props->print(); }
static Uint32 configureTransporters(Uint32 nodeId,
const struct ndb_mgm_configuration &,
class TransporterRegistry &);
private:
NodeId the_ownId;
Properties * props;
bool addRemoteNodeId(NodeId nodeId);
NodeId theNoOfRemoteNodes;
NodeId theRemoteNodeIds[MAX_NODES];
};
inline
NodeId
IPCConfig::ownId() const
{
return the_ownId;
}
#endif // IPCConfig_H