17c804472Sopenharmony_ci/*
27c804472Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
37c804472Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
47c804472Sopenharmony_ci * you may not use this file except in compliance with the License.
57c804472Sopenharmony_ci * You may obtain a copy of the License at
67c804472Sopenharmony_ci *
77c804472Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
87c804472Sopenharmony_ci *
97c804472Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
107c804472Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
117c804472Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127c804472Sopenharmony_ci * See the License for the specific language governing permissions and
137c804472Sopenharmony_ci * limitations under the License.
147c804472Sopenharmony_ci */
157c804472Sopenharmony_ci
167c804472Sopenharmony_ci#include <algorithm>
177c804472Sopenharmony_ci#include "JsApp.h"
187c804472Sopenharmony_ci
197c804472Sopenharmony_ciJsApp::JsApp() {}
207c804472Sopenharmony_ci
217c804472Sopenharmony_cibool JsApp::IsLiteDevice(std::string deviceType)
227c804472Sopenharmony_ci{
237c804472Sopenharmony_ci    static std::vector<std::string> liteDevice = {"liteWearable", "smartVision"};
247c804472Sopenharmony_ci    auto iter = find(liteDevice.begin(), liteDevice.end(), deviceType);
257c804472Sopenharmony_ci    if (iter == liteDevice.end()) {
267c804472Sopenharmony_ci        return false;
277c804472Sopenharmony_ci    }
287c804472Sopenharmony_ci    return true;
297c804472Sopenharmony_ci}
307c804472Sopenharmony_ci
317c804472Sopenharmony_cistd::string JsApp::GetJSONTree() {
327c804472Sopenharmony_ci    //Only for mock test, no specific implementation
337c804472Sopenharmony_ci}
347c804472Sopenharmony_cistd::string JsApp::GetDefaultJSONTree() {
357c804472Sopenharmony_ci    //Only for mock test, no specific implementation
367c804472Sopenharmony_ci}
377c804472Sopenharmony_civoid JsApp::OrientationChanged(std::string commandOrientation) {
387c804472Sopenharmony_ci    //Only for mock test, no specific implementation
397c804472Sopenharmony_ci}
407c804472Sopenharmony_civoid JsApp::ResolutionChanged(ResolutionParam& param, int32_t screenDensity, std::string reason) {
417c804472Sopenharmony_ci    //Only for mock test, no specific implementation
427c804472Sopenharmony_ci}
437c804472Sopenharmony_civoid JsApp::SetArgsColorMode(const std::string& value) {
447c804472Sopenharmony_ci    //Only for mock test, no specific implementation
457c804472Sopenharmony_ci}
467c804472Sopenharmony_civoid JsApp::SetArgsAceVersion(const std::string& value) {
477c804472Sopenharmony_ci    //Only for mock test, no specific implementation
487c804472Sopenharmony_ci}
497c804472Sopenharmony_cistd::string JsApp::GetOrientation() const {
507c804472Sopenharmony_ci    //Only for mock test, no specific implementation
517c804472Sopenharmony_ci}
527c804472Sopenharmony_cistd::string JsApp::GetColorMode() const {
537c804472Sopenharmony_ci    //Only for mock test, no specific implementation
547c804472Sopenharmony_ci}
557c804472Sopenharmony_civoid JsApp::ColorModeChanged(const std::string commandColorMode) {
567c804472Sopenharmony_ci    //Only for mock test, no specific implementation
577c804472Sopenharmony_ci}
587c804472Sopenharmony_civoid JsApp::ReloadRuntimePage(const std::string) {
597c804472Sopenharmony_ci    //Only for mock test, no specific implementation
607c804472Sopenharmony_ci}
617c804472Sopenharmony_civoid JsApp::SetScreenDensity(const std::string value) {
627c804472Sopenharmony_ci    //Only for mock test, no specific implementation
637c804472Sopenharmony_ci}
647c804472Sopenharmony_civoid JsApp::SetConfigChanges(const std::string value) {
657c804472Sopenharmony_ci    //Only for mock test, no specific implementation
667c804472Sopenharmony_ci}
677c804472Sopenharmony_cibool JsApp::MemoryRefresh(const std::string) const {
687c804472Sopenharmony_ci    //Only for mock test, no specific implementation
697c804472Sopenharmony_ci}
707c804472Sopenharmony_civoid JsApp::LoadDocument(const std::string, const std::string, const Json2::Value&) {
717c804472Sopenharmony_ci    //Only for mock test, no specific implementation
727c804472Sopenharmony_ci}
737c804472Sopenharmony_civoid JsApp::FoldStatusChanged(const std::string commandFoldStatus, int32_t currentWidth, int32_t currentHeight) {
747c804472Sopenharmony_ci    //Only for mock test, no specific implementation
757c804472Sopenharmony_ci}
767c804472Sopenharmony_civoid JsApp::SetAvoidArea(const AvoidAreas& areas) {
777c804472Sopenharmony_ci    //Only for mock test, no specific implementation
787c804472Sopenharmony_ci}
797c804472Sopenharmony_civoid JsApp::Stop() {
807c804472Sopenharmony_ci    //Only for mock test, no specific implementation
817c804472Sopenharmony_ci}
827c804472Sopenharmony_civoid JsApp::InitJsApp() {
837c804472Sopenharmony_ci    //Only for mock test, no specific implementation
847c804472Sopenharmony_ci}
857c804472Sopenharmony_ciconst AvoidAreas JsApp::GetCurrentAvoidArea() const
867c804472Sopenharmony_ci{
877c804472Sopenharmony_ci    AvoidAreas areas;
887c804472Sopenharmony_ci    return areas;
897c804472Sopenharmony_ci}