| /ide/tools/previewer/jsapp/rich/external/ |
| H A D | StageContext.h | 32 const std::optional<std::vector<uint8_t>> ReadFileContents(const std::string& filePath) const; 34 void SetLoaderJsonPath(const std::string& assetPath); 35 void SetHosSdkPath(const std::string& hosSdkPathValue); 37 std::string GetHspAceModuleBuild(const std::string& hspConfigPath); 39 std::map<std::string, std [all...] |
| H A D | StageContext.cpp | 35 const std::optional<std::vector<uint8_t>> StageContext::ReadFileContents(const std::string& filePath) const in ReadFileContents() 39 return std::nullopt; in ReadFileContents() 41 std::ifstream file(filePath, std::ios::binary | std::ios::ate); in ReadFileContents() 44 return std::nullopt; in ReadFileContents() 46 std::streamsize fileSize = file.tellg(); in ReadFileContents() 47 file.seekg(0, std in ReadFileContents() [all...] |
| H A D | EventRunner.cpp | 30 void EventRunner::SetMainThreadId(std::thread::id id) in SetMainThreadId() 35 std::thread::id EventRunner::GetThreadId() in GetThreadId() 42 return std::this_thread::get_id() == threadId; in IsCurrentRunnerThread() 47 const std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); in Run() 48 std::vector<Callback> copyTasks; in Run() 51 std::lock_guard<std::mutex> lock(mutex); in Run() 71 void EventRunner::PushTask(const Callback &callback, std::chrono::steady_clock::time_point targetTime) in PushTask() 74 std in PushTask() [all...] |
| /ide/tools/previewer/util/ |
| H A D | CommandParser.h | 25 std::string deviceType; 26 std::string pages; 27 std::string appResourcePath; 29 std::string containerSdkPath; 31 std::string loaderJsonPath; 32 std::string abilityPath; 33 std::string abilityName; 34 std::string configPath; 35 std::string screenShape; 45 std [all...] |
| H A D | FileSystem.h | 24 static bool IsFileExists(std::string path); 25 static bool IsDirectoryExists(std::string path); 26 static std::string GetApplicationPath(); 27 static const std::string& GetVirtualFileSystemPath(); 29 static int MakeDir(std::string path); 30 static void SetBundleName(std::string name); 31 static std::string GetSeparator(); 32 static std::string FindSubfolderByName(const std::string& parentFolderPath, const std [all...] |
| H A D | CommandParser.cpp | 107 bool CommandParser::ProcessCommand(std::vector<std::string> strs) in ProcessCommand() 146 bool CommandParser::IsSet(std::string key) in IsSet() 148 if (argsMap.find(std::string("-") + key) == argsMap.end()) { in IsSet() 154 std::string CommandParser::Value(std::string key) in Value() 156 auto args = argsMap[std::string("-") + key]; in Value() 160 return std::string(); in Value() 163 std::vector<std [all...] |
| H A D | TimeTool.cpp | 27 std::string TimeTool::GetFormatTime() in GetFormatTime() 29 std::string timeNow = FormateTimeNow(); in GetFormatTime() 30 std::string formatTime = "[" + timeNow + "]"; in GetFormatTime() 34 std::string TimeTool::GetTraceFormatTime() in GetTraceFormatTime() 36 std::string traceTimeNow = FormateTimeNow(); in GetTraceFormatTime() 40 std::string TimeTool::FormateTimeNow() in FormateTimeNow() 42 std::pair<tm, int64_t> timePair = GetCurrentTime(); in FormateTimeNow() 48 std::ostringstream now; in FormateTimeNow() 65 std::string TimeTool::FixedTime(int32_t time, int32_t width) in FixedTime() 67 std in FixedTime() [all...] |
| H A D | FileSystem.cpp | 24 std::vector<std::string> FileSystem::pathList = {"file_system", "app", "ace", "data"}; 25 std::string FileSystem::bundleName = ""; 26 std::string FileSystem::fileSystemPath = ""; 29 std::string FileSystem::separator = "\\"; 31 std::string FileSystem::separator = "/"; 34 bool FileSystem::IsFileExists(std::string path) in IsFileExists() 39 bool FileSystem::IsDirectoryExists(std::string path) in IsDirectoryExists() 44 std::string FileSystem::GetApplicationPath() in GetApplicationPath() 49 return std in GetApplicationPath() [all...] |
| H A D | CppTimer.cpp | 20 std::thread::id curThreadId = std::this_thread::get_id(); in ~CppTimer() 28 std::thread::id curThreadId = std::this_thread::get_id(); in Start() 34 startTime = std::chrono::system_clock::now(); in Start() 40 std::thread::id curThreadId = std::this_thread::get_id(); in Stop() 57 std::thread::id curThreadId = std::this_thread::get_id(); in RunTimerTick() 58 auto endTime = std in RunTimerTick() [all...] |
| H A D | SharedData.h | 67 const std::lock_guard<std::mutex> lock(staticDataMutex); in GetData() 77 const std::lock_guard<std::mutex> lock(staticDataMutex); in IsValid() 95 std::list<std::pair<std::function<void(T)>, T>> Check() in Check() 97 std::thread::id curThreadId = std::this_thread::get_id(); in Check() 104 std in Check() [all...] |
| /ide/tools/previewer/test/mock/ |
| H A D | MockFile.cpp | 27 namespace fs = std::filesystem; 29 bool MockFile::SimulateFileLock(const std::string& filePath) in SimulateFileLock() 56 bool MockFile::ReleaseFileLock(const std::string& filePath) in ReleaseFileLock() 82 bool MockFile::AddFileToZip(zipFile zip, const std::string& filePath, const std::string& entryName) in AddFileToZip() 86 std::cerr << "Failed to create entry in zip file for " << filePath << std::endl; in AddFileToZip() 92 std::cerr << "Failed to open file " << filePath << std::endl; in AddFileToZip() 102 std in AddFileToZip() [all...] |
| H A D | MockFile.h | 27 static bool SimulateFileLock(const std::string& filePath); 28 static bool ReleaseFileLock(const std::string& filePath); 29 static std::string CreateHspFile(const std::string hspFileName, const std::string hspAbcContent); 30 static bool AddFileToZip(zipFile zip, const std::string& filePath, 31 const std::string& entryName); 32 static bool AddFolderToZip(zipFile zip, const std::string& folderPath, 33 const std::string& entryName); 34 static bool CompressFiles(const std [all...] |
| /ide/tools/previewer/jsapp/ |
| H A D | JsApp.cpp | 23 static std::vector<std::string> liteDevice = {"liteWearable", "smartVision"}; 47 auto start = std::chrono::system_clock::now(); in Stop() 50 std::this_thread::sleep_for(std::chrono::milliseconds(1)); in Stop() 51 auto end = std::chrono::system_clock::now(); in Stop() 52 auto passedSecond = std::chrono::duration_cast<std::chrono::seconds>(end - start).count(); in Stop() 63 bool JsApp::IsLiteDevice(std::string deviceType) in IsLiteDevice() 72 void JsApp::SetPipeName(const std 176 ReloadRuntimePage(const std::string) ReloadRuntimePage() argument 183 LoadDocument(const std::string, const std::string, const Json2::Value&) LoadDocument() argument [all...] |
| H A D | JsApp.h | 110 void SetJsAppPath(const std::string& value); 111 void SetUrlPath(const std::string& value); 112 void SetPipeName(const std::string& name); 113 void SetPipePort(const std::string& port); 114 void SetBundleName(const std::string& name); 120 virtual std::string GetJSONTree(); 121 virtual std::string GetDefaultJSONTree(); 122 virtual void OrientationChanged(std::string commandOrientation); 123 virtual void ResolutionChanged(ResolutionParam&, int32_t, std::string); 124 virtual void SetArgsColorMode(const std [all...] |
| /ide/tools/previewer/cli/ |
| H A D | CommandLineInterface.h | 29 void InitPipe(const std::string name); 35 void ProcessCommandMessage(std::string message) const; 38 void ApplyConfigCommands(const std::string& key, const std::unique_ptr<CommandLine>& command) const; 39 void Init(std::string pipeBaseName); 40 void ReadAndApplyConfig(std::string path) const; 41 void CreatCommandToSendData(const std::string, const Json2::Value&, const std::string) const; 43 const static std::string COMMAND_VERSION; 48 bool ProcessCommandValidate(bool parsingSuccessful, const Json2::Value& jsonData, const std [all...] |
| /ide/tools/previewer/test/mock/jsapp/ |
| H A D | MockJsApp.cpp | 21 bool JsApp::IsLiteDevice(std::string deviceType) in IsLiteDevice() 23 static std::vector<std::string> liteDevice = {"liteWearable", "smartVision"}; in IsLiteDevice() 31 std::string JsApp::GetJSONTree() { in GetJSONTree() 34 std::string JsApp::GetDefaultJSONTree() { in GetDefaultJSONTree() 37 void JsApp::OrientationChanged(std::string commandOrientation) { in OrientationChanged() 40 void JsApp::ResolutionChanged(ResolutionParam& param, int32_t screenDensity, std::string reason) { in ResolutionChanged() 43 void JsApp::SetArgsColorMode(const std::string& value) { in SetArgsColorMode() 46 void JsApp::SetArgsAceVersion(const std::string& value) { in SetArgsAceVersion() 49 std in SetArgsAceVersion() 58 ReloadRuntimePage(const std::string) ReloadRuntimePage() argument 70 LoadDocument(const std::string, const std::string, const Json2::Value&) LoadDocument() argument [all...] |
| H A D | MockJsAppImpl.cpp | 29 void JsAppImpl::ResolutionChanged(ResolutionParam& param, int32_t screenDensity, std::string reason) in ResolutionChanged() 35 std::string JsAppImpl::GetOrientation() const in GetOrientation() 41 void JsAppImpl::OrientationChanged(std::string commandOrientation) in OrientationChanged() 46 std::string JsAppImpl::GetColorMode() const in GetColorMode() 52 void JsAppImpl::SetArgsColorMode(const std::string& value) in SetArgsColorMode() 57 void JsAppImpl::ColorModeChanged(const std::string commandColorMode) in ColorModeChanged() 62 bool JsAppImpl::MemoryRefresh(const std::string memoryRefreshArgs) const in MemoryRefresh() 68 void JsAppImpl::LoadDocument(const std::string filePath, const std::string componentName, in LoadDocument() 74 void JsAppImpl::ReloadRuntimePage(const std [all...] |
| /ide/tools/previewer/util/windows/ |
| H A D | NativeFileSystem.cpp | 23 std::string NativeFileSystem::FindSubfolderByName(const std::string& parentFolderPath, in FindSubfolderByName() 24 const std::string& subfolderName) in FindSubfolderByName() 27 std::wstring path = std::wstring(parentFolderPath.begin(), parentFolderPath.end()); in FindSubfolderByName() 28 std::wstring searchPath = path + L"\\*"; in FindSubfolderByName() 36 std::wstring name = datas.cFileName; in FindSubfolderByName() 37 std::wstring_convert<std::codecvt_utf8<wchar_t>> converter; in FindSubfolderByName() 38 std in FindSubfolderByName() [all...] |
| /ide/tools/previewer/jsapp/rich/ |
| H A D | JsAppImpl.h | 64 std::string GetJSONTree() override; 65 std::string GetDefaultJSONTree() override; 66 void OrientationChanged(std::string commandOrientation) override; 67 void ResolutionChanged(ResolutionParam& param, int32_t screenDensity, std::string reason) override; 68 OHOS::Ace::WindowSizeChangeReason ConvertResizeReason(std::string reason); 71 void SetArgsColorMode(const std::string& value) override; 72 void SetArgsAceVersion(const std::string& value) override; 73 void SetDeviceOrentation(const std::string& value); 74 std::string GetOrientation() const override; 75 std [all...] |
| /ide/tools/previewer/test/fuzztest/commandparse_fuzzer/ |
| H A D | CommandParse.h | 26 void CreateAndExecuteCommand(std::map<std::string, std::string> dataMap); 28 void Execute(std::string& commond, std::string& jsonArgsStr, int& typeIndex, 30 std::vector<std::string> types = {"get", "set", "action"};
|
| /ide/tools/previewer/test/mock/arkui/ |
| H A D | MockAceAbility.cpp | 26 void AceAbility::SetMockModuleList(const std::map<std::string, std::string>& mockJsonInfo) in SetMockModuleList() argument 41 bool AceAbility::OnInputEvent(const std::shared_ptr<MMI::KeyEvent>& keyEvent) const in OnInputEvent() 46 bool AceAbility::OnInputEvent(const std::shared_ptr<MMI::PointerEvent>& pointerEvent) const in OnInputEvent() 51 bool AceAbility::OnInputEvent(const std::shared_ptr<MMI::AxisEvent>& axisEvent) const in OnInputEvent() 74 void AceAbility::ReplacePage(const std::string& url, const std::string& params) in ReplacePage() 78 void AceAbility::LoadDocument(const std::string& url, const std in ReplacePage() [all...] |
| /ide/tools/previewer/test/fuzztest/paramsparse_fuzzer/ |
| H A D | ParamsParseFuzzer.h | 26 static std::string g_currDir = ""; 27 static std::string g_currFile = ""; 31 Param(std::string name, std::vector<std::string> values) : name(name), values(values) {} in Param() 32 std::string name; 33 std::vector<std::string> values; 40 void CallParamsParseFunc(const std::vector<std [all...] |
| H A D | ParamsParseFuzzer.cpp | 25 void ParamsParse::CallParamsParseFunc(const std::vector<std::string>& args) in CallParamsParseFunc() 38 std::vector<std::string> args; in ParamsParseFuzzTest() 52 void ParamsParse::SetTestArgs(std::vector<std::string>& args) in SetTestArgs() 57 for (const std::string& value : param.values) { in SetTestArgs() 59 std::string str = std::string(value); in SetTestArgs()
|
| /ide/tools/previewer/test/fuzztest/ |
| H A D | ChangeJsonUtil.cpp | 28 const std::string DEFAULT_STRING = "aaaa"; 39 std::string strVal = DT_SetGetString(&g_Element[idx], strlen(item->valuestring) + 1, DEFAULT_LENGTH, in ModifyObject() 61 std::random_device rd; in ModifyObject() 62 std::mt19937 gen(rd()); in ModifyObject() 63 std::bernoulli_distribution distribution(0.5); // 0.5 is probability to generate true or false in ModifyObject() 98 std::string strVal = DT_SetGetString(&g_Element[idx], DEFAULT_STRING.size() + 1, DEFAULT_LENGTH, in ModifyObject4ChangeType() 125 void ChangeJsonUtil::WriteFile(std::string filePath, cJSON *object) in WriteFile() 129 std::cerr << "Error: cJSON object is null." << std::endl; in WriteFile() 134 std in WriteFile() [all...] |
| /ide/tools/previewer/mock/ |
| H A D | VirtualScreen.h | 36 std::string GetCurrentRouter() const; 37 void SetCurrentRouter(const std::string currentRouterValue); 39 std::string GetAbilityCurrentRouter() const; 40 void SetAbilityCurrentRouter(const std::string currentRouterValue); 51 void InitPipe(std::string pipeName, std::string pipePort); 59 std::atomic<bool> isFrameUpdated; 61 static std::string webSocketPort; 84 std::string GetFastPreviewMsg() const; 85 void SetFastPreviewMsg(const std [all...] |