#include <Parser.hpp>#include <NdbOut.hpp>#include <Properties.hpp>#include <socket_io.h>#include "APIService.hpp"#include "CPCD.hpp"#include <NdbMutex.h>#include <OutputStream.hpp>Include dependency graph for APIService.cpp:

Go to the source code of this file.
Defines | |
| #define | CPCD_CMD(name, fun, desc) |
| #define | CPCD_ARG(name, type, opt, desc) |
| #define | CPCD_ARG2(name, type, opt, min, max, desc) |
| #define | CPCD_END() |
| #define | CPCD_CMD_ALIAS(name, realName, fun) |
| #define | CPCD_ARG_ALIAS(name, realName, fun) |
Functions | |
| static const char * | propToString (Properties *prop, const char *key) |
Variables | |
| const ParserRow< CPCDAPISession > | commands [] |
| static const int | g_TimeOut = 1000 |
| #define CPCD_ARG | ( | name, | |||
| type, | |||||
| opt, | |||||
| desc | ) |
Value:
{ name, \
0, \
ParserRow<CPCDAPISession>::Arg, \
ParserRow<CPCDAPISession>::type, \
ParserRow<CPCDAPISession>::opt, \
ParserRow<CPCDAPISession>::IgnoreMinMax, \
0, 0, \
0, \
desc, 0 }
Definition at line 52 of file APIService.cpp.
| #define CPCD_ARG2 | ( | name, | |||
| type, | |||||
| opt, | |||||
| min, | |||||
| max, | |||||
| desc | ) |
Value:
{ name, \
0, \
ParserRow<CPCDAPISession>::Arg, \
ParserRow<CPCDAPISession>::type, \
ParserRow<CPCDAPISession>::opt, \
ParserRow<CPCDAPISession>::IgnoreMinMax, \
min, max, \
0, \
desc, 0 }
Definition at line 63 of file APIService.cpp.
| #define CPCD_ARG_ALIAS | ( | name, | |||
| realName, | |||||
| fun | ) |
Value:
{ name, \
realName, \
ParserRow<CPCDAPISession>::ArgAlias, \
ParserRow<CPCDAPISession>::Int, \
ParserRow<CPCDAPISession>::Optional, \
ParserRow<CPCDAPISession>::IgnoreMinMax, \
0, 0, \
0, \
0, 0 }
Definition at line 96 of file APIService.cpp.
| #define CPCD_CMD | ( | name, | |||
| fun, | |||||
| desc | ) |
Value:
{ name, \
0, \
ParserRow<CPCDAPISession>::Cmd, \
ParserRow<CPCDAPISession>::String, \
ParserRow<CPCDAPISession>::Optional, \
ParserRow<CPCDAPISession>::IgnoreMinMax, \
0, 0, \
fun, \
desc, 0 }
Definition at line 41 of file APIService.cpp.
| #define CPCD_CMD_ALIAS | ( | name, | |||
| realName, | |||||
| fun | ) |
Value:
{ name, \
realName, \
ParserRow<CPCDAPISession>::CmdAlias, \
ParserRow<CPCDAPISession>::Int, \
ParserRow<CPCDAPISession>::Optional, \
ParserRow<CPCDAPISession>::IgnoreMinMax, \
0, 0, \
0, \
0, 0 }
Definition at line 85 of file APIService.cpp.
| #define CPCD_END | ( | ) |
Value:
{ 0, \
0, \
ParserRow<CPCDAPISession>::Arg, \
ParserRow<CPCDAPISession>::Int, \
ParserRow<CPCDAPISession>::Optional, \
ParserRow<CPCDAPISession>::IgnoreMinMax, \
0, 0, \
0, \
0, 0 }
Definition at line 74 of file APIService.cpp.
| static const char* propToString | ( | Properties * | prop, | |
| const char * | key | |||
| ) | [static] |
Definition at line 305 of file APIService.cpp.
References buf, Properties::get(), Properties::getTypeOf(), NULL, PropertiesType_char, PropertiesType_Uint32, and BaseString::snprintf().
Referenced by CPCDAPISession::printProperty().
00305 { 00306 static char buf[32]; 00307 const char *retval = NULL; 00308 PropertiesType pt; 00309 00310 prop->getTypeOf(key, &pt); 00311 switch(pt) { 00312 case PropertiesType_Uint32: 00313 Uint32 val; 00314 prop->get(key, &val); 00315 BaseString::snprintf(buf, sizeof buf, "%d", val); 00316 retval = buf; 00317 break; 00318 case PropertiesType_char: 00319 const char *str; 00320 prop->get(key, &str); 00321 retval = str; 00322 break; 00323 default: 00324 BaseString::snprintf(buf, sizeof buf, "(unknown)"); 00325 retval = buf; 00326 } 00327 return retval; 00328 }
Here is the call graph for this function:

Here is the caller graph for this function:

| const ParserRow<CPCDAPISession> commands[] |
Definition at line 108 of file APIService.cpp.
const int g_TimeOut = 1000 [static] |
Definition at line 223 of file APIService.cpp.
1.4.7

