diff options
Diffstat (limited to 'AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp')
-rw-r--r-- | AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp b/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp index d8efd6a..3898e50 100644 --- a/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp +++ b/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp @@ -105,6 +105,7 @@ void CAmTelnetMenuHelper::createCommandMaps() // Info comands mInfoCommands.insert(std::make_pair("help", sCommandPrototypeInfo(std::string("show all possible commands"), &CAmTelnetMenuHelper::helpCommand))); mInfoCommands.insert(std::make_pair("sysprop", sCommandPrototypeInfo("show all systemproperties", &CAmTelnetMenuHelper::infoSystempropertiesCommand))); + mInfoCommands.insert(std::make_pair("dump", sCommandPrototypeInfo("create a database dump of currently used data", &CAmTelnetMenuHelper::infoDumpCommand))); mInfoCommands.insert(std::make_pair("..", sCommandPrototypeInfo("one step back in menu tree (back to root folder)", &CAmTelnetMenuHelper::oneStepBackCommand))); mInfoCommands.insert(std::make_pair("exit", sCommandPrototypeInfo("close telnet session", &CAmTelnetMenuHelper::exitCommand))); } @@ -741,6 +742,14 @@ void CAmTelnetMenuHelper::infoSystempropertiesCommand(std::queue<std::string>& C } /****************************************************************************/ +void CAmTelnetMenuHelper::infoDumpCommand(std::queue<std::string>& CmdQueue, int& filedescriptor) +/****************************************************************************/ +{ + instance->infoDumpCommandExec(CmdQueue, filedescriptor); +} + + +/****************************************************************************/ void CAmTelnetMenuHelper::setVolumeStep(std::queue<std::string>& CmdQueue, int& filedescriptor) /****************************************************************************/ { @@ -933,6 +942,21 @@ void CAmTelnetMenuHelper::infoSystempropertiesCommandExec(std::queue<std::string } /****************************************************************************/ +void CAmTelnetMenuHelper::infoDumpCommandExec(std::queue<std::string>& CmdQueue, int& filedescriptor) +/****************************************************************************/ +{ + (void) (CmdQueue); + + std::stringstream *pOutput = new std::stringstream(); + + mpDatabasehandler->dump(*pOutput); + + sendTelnetLine(filedescriptor, *pOutput); + + delete pOutput; +} + +/****************************************************************************/ void CAmTelnetMenuHelper::setRoutingCommand(std::queue<std::string>& CmdQueue, int& filedescriptor) /****************************************************************************/ { |