| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #ifndef NGS_FASTWEB_H
- #define NGS_FASTWEB_H
- #include <string>
- #include <vector>
- namespace ngs {
- namespace fastweb {
- constexpr const char* kDefaultVersion = "1.0.0";
- constexpr const char* kModuleCatalogUrl =
- "https://download.fwlua.com/module/module.json";
- struct ModuleInfo {
- int id = 0;
- std::string name;
- std::string name_en;
- std::string desc;
- std::string doc;
- std::string icon;
- std::string type; // fastweb | lua | other
- std::string download_type; // github | zip | lua
- std::string download_url;
- bool installed = false;
- };
- std::string install_dir();
- std::string bin_path();
- std::string share_dir();
- bool is_installed();
- std::string installed_version();
- bool install(bool debug = false);
- bool uninstall();
- void show_status();
- void menu();
- // Site modules (fastweb instmod / uninstmod).
- std::string site_config_ini(const std::string& site_name);
- bool list_modules(const std::string& site_name, std::vector<ModuleInfo>& out,
- std::string& err);
- bool install_module(const std::string& site_name, const std::string& name_en,
- std::string& err);
- bool uninstall_module(const std::string& site_name, const std::string& name_en,
- std::string& err);
- } // namespace fastweb
- } // namespace ngs
- #endif
|