12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include "../include/userioman.h"
- #include <boost/algorithm/string.hpp>
- #include <fstream>
- #include <iostream>
- #include <vector>
- #include <readline/history.h>
- #include <readline/readline.h>
- using boost::asio::buffer;
- bool UserIoMan::parseJson(Json::Value *root, string jsonstring) {
- return false;
- }
- bool UserIoMan::handleJson(Json::Value root) { return false; }
- void UserIoMan::printMessage(std::string msg, OutMsgType type) {
- msgmutex.lock();
- switch (type) {
- case normal: {
- std::cout << msg << std::endl;
- break;
- }
- case error: {
- std::cout << msg << std::endl;
- break;
- }
- case debug: {
- std::cerr << msg << std::endl;
- break;
- }
- }
- rl_redisplay();
- msgmutex.unlock();
- }
- void UserIoMan::printWelcomeMessage() {
- std::cout << "please enter user and password" << std::endl;
- }
- std::string UserIoMan::getCmdPrompt() { return "ccats> "; }
- std::string UserIoMan::getUserPrompt() { return "User: "; }
- std::string UserIoMan::getPassPrompt() { return "Pass: "; }
|