diff --git a/include/cmd_list.h b/include/cmd_list.h index 51892d7..2fbd116 100644 --- a/include/cmd_list.h +++ b/include/cmd_list.h @@ -30,9 +30,12 @@ public: using HandleBack = std::function; uint32_t Init(const std::string &filePath, HandleBack callback); private: + void InitFileListCommand(Json::Value &root, HandleBack callback); + using HandleFileListValue = std::function; + std::vector fileListHandles_; uint32_t GetString(const Json::Value &node, int c, HandleBack callback); uint32_t GetArray(const Json::Value &node, int c, HandleBack callback); - uint32_t GetModuleNames(const Json::Value &node, HandleBack callback); + uint32_t GetModuleNames(const Json::Value &node, int c, HandleBack callback); }; } } diff --git a/include/resource_data.h b/include/resource_data.h index b04f4f3..fe5bc9c 100644 --- a/include/resource_data.h +++ b/include/resource_data.h @@ -38,7 +38,7 @@ const static std::string LONG_PATH_HEAD = "\\\\?\\"; const static std::string ID_DEFINED_INDENTATION = " "; const static int32_t VERSION_MAX_LEN = 128; const static int32_t INT_TO_BYTES = sizeof(uint32_t); -static const int8_t RESTOOL_VERSION[VERSION_MAX_LEN] = { "Restool 4.002" }; +static const int8_t RESTOOL_VERSION[VERSION_MAX_LEN] = { "Restool 4.003" }; const static int32_t TAG_LEN = 4; enum class KeyType { diff --git a/src/cmd_list.cpp b/src/cmd_list.cpp index d12a17e..7afeb44 100644 --- a/src/cmd_list.cpp +++ b/src/cmd_list.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Global { namespace Restool { using namespace std; -uint32_t CmdList::Init(const string &filePath, function callback) +uint32_t CmdList::Init(const string &filePath, HandleBack callback) { Json::Value root; if (!ResourceUtil::OpenJsonFile(filePath, root)) { @@ -31,23 +31,12 @@ uint32_t CmdList::Init(const string &filePath, function