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
19JsApp::JsApp() {}
20
21bool 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
31std::string JsApp::GetJSONTree() {
32    //Only for mock test, no specific implementation
33}
34std::string JsApp::GetDefaultJSONTree() {
35    //Only for mock test, no specific implementation
36}
37void JsApp::OrientationChanged(std::string commandOrientation) {
38    //Only for mock test, no specific implementation
39}
40void JsApp::ResolutionChanged(ResolutionParam& param, int32_t screenDensity, std::string reason) {
41    //Only for mock test, no specific implementation
42}
43void JsApp::SetArgsColorMode(const std::string& value) {
44    //Only for mock test, no specific implementation
45}
46void JsApp::SetArgsAceVersion(const std::string& value) {
47    //Only for mock test, no specific implementation
48}
49std::string JsApp::GetOrientation() const {
50    //Only for mock test, no specific implementation
51}
52std::string JsApp::GetColorMode() const {
53    //Only for mock test, no specific implementation
54}
55void JsApp::ColorModeChanged(const std::string commandColorMode) {
56    //Only for mock test, no specific implementation
57}
58void JsApp::ReloadRuntimePage(const std::string) {
59    //Only for mock test, no specific implementation
60}
61void JsApp::SetScreenDensity(const std::string value) {
62    //Only for mock test, no specific implementation
63}
64void JsApp::SetConfigChanges(const std::string value) {
65    //Only for mock test, no specific implementation
66}
67bool JsApp::MemoryRefresh(const std::string) const {
68    //Only for mock test, no specific implementation
69}
70void JsApp::LoadDocument(const std::string, const std::string, const Json2::Value&) {
71    //Only for mock test, no specific implementation
72}
73void JsApp::FoldStatusChanged(const std::string commandFoldStatus, int32_t currentWidth, int32_t currentHeight) {
74    //Only for mock test, no specific implementation
75}
76void JsApp::SetAvoidArea(const AvoidAreas& areas) {
77    //Only for mock test, no specific implementation
78}
79void JsApp::Stop() {
80    //Only for mock test, no specific implementation
81}
82void JsApp::InitJsApp() {
83    //Only for mock test, no specific implementation
84}
85const AvoidAreas JsApp::GetCurrentAvoidArea() const
86{
87    AvoidAreas areas;
88    return areas;
89}