Files
dm-cli/dm-cli/common.hpp
2025-11-25 19:54:36 +03:00

59 lines
1.7 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef _COMMON_
#define _COMMON_
#include <string>
#define PROGRAM_VERSION "1.0.1"
#define MAIN_HELP_RU "main_help_ru.txt"
#define MAIN_HELP_EN "main_help_en.txt"
#define ACCOUNT_STATUS_RU "account_status_ru.txt"
#define ACCOUNT_STATUS_EN "account_status_en.txt"
#define ACCOUNT_UPDATE_RU "account_update_ru.txt"
#define ACCOUNT_UPDATE_EN "account_update_en.txt"
#define DEALS_EN "deals_en.txt"
#define DEALS_RU "deals_ru.txt"
#define DEAL_STATUS_RU "deal_status_ru.txt"
#define DEAL_STATUS_EN "deal_status_en.txt"
#define DEAL_COMPLETE_RU "deal_complete_ru.txt"
#define DEAL_COMPLETE_EN "deal_complete_en.txt"
#define DEAL_CANCEL_RU "deal_cancel_ru.txt"
#define DEAL_CANCEL_EN "deal_cancel_en.txt"
#define DEAL_NEGATIVE_RU "deal_negative_ru.txt"
#define DEAL_NEGATIVE_EN "deal_negative_en.txt"
// LANG=ru_RU.UTF-8
#define LANG_RU "ru_RU.UTF-8"
#define DEFAULTADDRESS "127.0.0.1:4999"
#define ACCOUNT_UPDATE_URL "tpl/accountupdateurl.txt"
#define ACCOUNT_UPDATE_BTM "tpl/accountupdatebtm.txt"
#define ACCOUNT_UPDATE_PGP "tpl/accountupdatepgp.txt"
#define DEAL_CREATE_TPL "tpl/deal_create.txt"
/*
Show help screen.
*/
void show_help(bool isRulang);
/// @brief Отображает отладочную информацию
void ShowDebug(std::string url, std::string result, bool success, std::string decoded);
/// @breef read file
std::string ReadFile(const char *filename);
/// @breef Replace in string
std::string Replace(std::string source, std::string from, std::string out);
/// @breef Replace all entryes in string
std::string ReplaceAll(std::string str, const std::string &from, const std::string &to);
/// @breef Вывод сообщения о таймауте или пустой строке ответа
int NoResponse(std::string mgs);
#endif