レポジトリ種類: Mercurial
#ifndef COMMON_HH
#define COMMON_HH
#include <vector>
#include <string>
#include <sys/stat.h>
typedef struct {
std::string syncname;
std::string syncpass;
std::string syncinstance;
bool syncenable;
bool showpasswd;
std::string theme;
std::string language;
} Config;
class Common {
public:
static Config *getconfig();
static std::string getconfigpath();
static std::string getbasedir(bool trailing);
static std::string getlang(Config *cf);
static bool gettheme(Config *cf);
int mkdir_r(const std::string &path, mode_t mode);
void tmpcopy(const std::string &inpath, const std::string &outpath);
static std::vector<std::string> explode(const std::string &str, char delimiter);
static void scandir(const std::string& dir, const std::string& root,
std::vector<std::string>& paths);
static std::vector<std::string> fullpaths;
static std::vector<std::string> dispaths;
bool isLight;
bool showPassFromCnf = false;
bool themeFromCnf = false;
bool langFromCnf = false;
Config *config;
};
#endif