/*
 * messagedata.hpp
 *
 *  Created on: Aug 16, 2017
 *      Author: vadims
 */

#ifndef MESSAGEDATA_HPP_
#define MESSAGEDATA_HPP_

#include "nlohmann/json.hpp"
#include <sstream>

using json = nlohmann::json;

class messagedata {
public:
	messagedata();

	std::string outputData();
//	std::string outputTextData();


	enum status {
		success,
		error
	};

	enum type {
		response,
		log,
		call,
		progress,
		wait
	};

	enum  level {
		error_lvl,
		warn_lvl,
		info_lvl,
		debug_lvl
	};

	status msgStatus;
	level msgLevel;
	type msgType;
	std::string function;
	std::string sendTo;
	std::string guid;
	std::string arg1, arg2, arg3;
	std::string text_data;
	bool isDefined;


	messagedata(status, type, std::string );
	messagedata(status, type, std::string, std::string );
	messagedata(level, type, std::string );
	messagedata(json j);
	void addDataToMessage(messagedata);

};


#endif /* MESSAGEDATA_HPP_ */
