• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <algorithm>
17 #include "JsApp.h"
18 
JsApp()19 JsApp::JsApp() {}
20 
IsLiteDevice(std::string deviceType)21 bool JsApp::IsLiteDevice(std::string deviceType)
22 {
23     static std::vector<std::string> liteDevice = {"liteWearable", "smartVision"};
24     auto iter = find(liteDevice.begin(), liteDevice.end(), deviceType);
25     if (iter == liteDevice.end()) {
26         return false;
27     }
28     return true;
29 }
30 
GetJSONTree()31 std::string JsApp::GetJSONTree() {
32     //Only for mock test, no specific implementation
33 }
GetDefaultJSONTree()34 std::string JsApp::GetDefaultJSONTree() {
35     //Only for mock test, no specific implementation
36 }
OrientationChanged(std::string commandOrientation)37 void JsApp::OrientationChanged(std::string commandOrientation) {
38     //Only for mock test, no specific implementation
39 }
ResolutionChanged(ResolutionParam & param,int32_t screenDensity,std::string reason)40 void JsApp::ResolutionChanged(ResolutionParam& param, int32_t screenDensity, std::string reason) {
41     //Only for mock test, no specific implementation
42 }
SetArgsColorMode(const std::string & value)43 void JsApp::SetArgsColorMode(const std::string& value) {
44     //Only for mock test, no specific implementation
45 }
SetArgsAceVersion(const std::string & value)46 void JsApp::SetArgsAceVersion(const std::string& value) {
47     //Only for mock test, no specific implementation
48 }
GetOrientation() const49 std::string JsApp::GetOrientation() const {
50     //Only for mock test, no specific implementation
51 }
GetColorMode() const52 std::string JsApp::GetColorMode() const {
53     //Only for mock test, no specific implementation
54 }
ColorModeChanged(const std::string commandColorMode)55 void JsApp::ColorModeChanged(const std::string commandColorMode) {
56     //Only for mock test, no specific implementation
57 }
ReloadRuntimePage(const std::string)58 void JsApp::ReloadRuntimePage(const std::string) {
59     //Only for mock test, no specific implementation
60 }
SetScreenDensity(const std::string value)61 void JsApp::SetScreenDensity(const std::string value) {
62     //Only for mock test, no specific implementation
63 }
SetConfigChanges(const std::string value)64 void JsApp::SetConfigChanges(const std::string value) {
65     //Only for mock test, no specific implementation
66 }
MemoryRefresh(const std::string) const67 bool JsApp::MemoryRefresh(const std::string) const {
68     //Only for mock test, no specific implementation
69 }
LoadDocument(const std::string,const std::string,const Json2::Value &)70 void JsApp::LoadDocument(const std::string, const std::string, const Json2::Value&) {
71     //Only for mock test, no specific implementation
72 }
FoldStatusChanged(const std::string commandFoldStatus,int32_t currentWidth,int32_t currentHeight)73 void JsApp::FoldStatusChanged(const std::string commandFoldStatus, int32_t currentWidth, int32_t currentHeight) {
74     //Only for mock test, no specific implementation
75 }
SetAvoidArea(const AvoidAreas & areas)76 void JsApp::SetAvoidArea(const AvoidAreas& areas) {
77     //Only for mock test, no specific implementation
78 }
Stop()79 void JsApp::Stop() {
80     //Only for mock test, no specific implementation
81 }
InitJsApp()82 void JsApp::InitJsApp() {
83     //Only for mock test, no specific implementation
84 }
GetCurrentAvoidArea() const85 const AvoidAreas JsApp::GetCurrentAvoidArea() const
86 {
87     AvoidAreas areas;
88     return areas;
89 }