19 #include <ndb_types.h>
21 #include "mgmapi_configuration.hpp"
22 #include "../mgmsrv/ConfigInfo.hpp"
26 : m_config(conf.m_config)
29 m_typeOfSection = type_of_section;
33 ndb_mgm_configuration_iterator::~ndb_mgm_configuration_iterator(){
38 ndb_mgm_configuration_iterator::reset(){
39 if(m_sectionNo != (Uint32)~0){
40 m_config.closeSection();
46 ndb_mgm_configuration_iterator::enter(){
58 ndb_mgm_configuration_iterator::first(){
65 ndb_mgm_configuration_iterator::next(){
72 ndb_mgm_configuration_iterator::valid()
const {
73 return m_sectionNo != (Uint32)~0;
77 ndb_mgm_configuration_iterator::find(
int param,
unsigned search){
78 unsigned val = search + 1;
80 while(
get(param, &val) == 0 && val != search){
92 ndb_mgm_configuration_iterator::get(
int param,
unsigned * value)
const {
93 return m_config.get(param, value) !=
true;
98 ndb_mgm_configuration_iterator::get(
int param,
99 unsigned long long * value)
const{
100 return m_config.get(param, value) !=
true;
104 ndb_mgm_configuration_iterator::get(
int param,
const char ** value)
const {
105 return m_config.get(param, value) !=
true;
114 unsigned type_of_section){
127 iter->~ndb_mgm_configuration_iterator();
135 return iter->first();
147 return iter->valid();
153 int param,
unsigned * value){
154 return iter->get(param, value);
160 int param, Uint64 * value){
161 return iter->get(param, value);
167 int param,
const char ** value){
168 return iter->get(param, value);
174 int param,
unsigned search){
175 return iter->find(param, search);
186 if ( paramId == 0 ) {
192 for (
int i = 0;
i < data.m_NoOfParams;
i++) {
195 if (tmp +
sizeof(info->m_id) <= *
size)
198 tmp +=
sizeof(info->m_id);
201 if (tmp +
sizeof(info->m_name) <= *
size)
204 tmp +=
sizeof(info->m_name);