--- /dev/null
+code/sdk/deveco/**
+code/sdk/vscode/**
+code/sdk/output/**
+code/sdk/tools/pkg/fwpkg/brandy/upload_app.fwpkg
+release/**
+build.log
+.vscode/**
+code/sdk/interim_binary/brandy/libs/gpu/evb_recovery/libgpu.a
+code/sdk/build/config/target_config/brandy/mk_fs_image/evb4/file.bin
+code/sdk/build/config/target_config/brandy/mk_fs_image/evb4/file_tmp.bin
+code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/file.bin
+code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/file_tmp.bin
+code/sdk/drivers/peripheral/cywee/doc/~$CWM lib Sensor Info_Gnt_Fd230_20240222.xlsx
+code/sdk/drivers/peripheral/cywee/doc/~$Cwm_Dml_Info__LIS2DOC__20230816.xlsx
--- /dev/null
+SDK version:
+1.1.10.522【补丁名称】sdk_602_patch_0425\r
+【基础版本】b602\r
+【修复问题】收编补丁\r
+\r
+【修改影响】NA\r
+【使用方法】\r
+ 1、手动删除sdk_602版本以下文件:\r
+ code\sdk\application\wearable\nativeapp\nativeui\main\src\dial\parser\DialBinTypes.h\r
+ code\sdk\application\wearable\nativeapp\nativeui\main\src\dial\parser\DialBinParser.h\r
+ code\sdk\open_source\openharmony\third_party\jerryscript\r
+ 2、使用补丁覆盖sdk_602版本目录\r
+ 3、离线表盘工具、js开发配套工具存放在tools,视频表盘制作变更具体参考tools\dial_converter_tool\视频表盘制作变更.txt\r
+ 4、nativeapp新增资源存放在res目录\r
+【自测情况】自验证符合要求\r
+【是否合入版本】根据测试结果确定\r
--- /dev/null
+#!/bin/bash
+
+version=HEAD
+DATE=$(date +%Y%m%d_%H%M%S)
+HOMEDIR=$PWD
+DEFAULT_BUILD_TYPE=release
+DEFAULT_TARGET_PACK_NAME=pack_brandy_native_js
+
+TARGET_PACK_NAME=$DEFAULT_TARGET_PACK_NAME
+RELEASE_BUILD=$DEFAULT_BUILD_TYPE
+CLEAN=
+
+checkarguments()
+{
+if [ "$1" == "clean" ]
+then
+CLEAN=-c
+fi
+
+if [[ "$1" == *"brandy"* ]]
+then
+echo $1 has brandy should be target_pack_name
+TARGET_PACK_NAME=$1
+fi
+
+if [ "$1" == "debug" ]
+then
+RELEASE_BUILD=debug
+fi
+
+if [ "$1" == "release" ]
+then
+RELEASE_BUILD=release
+fi
+}
+CURRENT_BRANCH=`git branch |awk '$1=="*"{print $2}'`
+COMMIT_ID=`git rev-parse HEAD`
+SOURCE_MODIFIED=`git status --short`
+cp_releasepackage()
+{
+ #code/sdk/output/brandy/acore/brandy-native-js/package/brandy/
+ package_dir=$HOMEDIR/code/sdk/output/package/brandy/$TARGET_PACK_NAME
+ filename=${TARGET_PACK_NAME}_${RELEASE_BUILD}_${DATE}_${USER}.fwpkg
+ releasedir=$HOMEDIR/release/$TARGET_PACK_NAME/$RELEASE_BUILD/${DATE}
+ packsource=$HOMEDIR/code/sdk/tools/pkg/fwpkg/brandy/upload_app.fwpkg
+ echo do release copy
+ mkdir -p $releasedir
+ cp -r $HOMEDIR/build.log $package_dir $releasedir/
+ cp $packsource $releasedir/$filename
+ echo $filename > $releasedir/readme.txt
+ echo branch name $CURRENT_BRANCH >> $releasedir/readme.txt
+ echo commit $COMMIT_ID >> $releasedir/readme.txt
+ if [ "$SOURCE_MODIFIED" == "" ]
+ then
+ echo no source changed >> $releasedir/readme.txt
+ else
+ echo source changed >> $releasedir/readme.txt
+ echo $SOURCE_MODIFIED >> $releasedir/readme.txt
+ fi
+ echo release to $releasedir/$filename
+ cat $releasedir/readme.txt
+}
+build_target()
+{
+
+ cd $HOMEDIR/code/sdk/
+ echo ./build.py -nhso $CLEAN -$RELEASE_BUILD -build_time=$DATE $TARGET_PACK_NAME 2>&1
+ python ./build.py -nhso $CLEAN -$RELEASE_BUILD -build_time=$DATE $TARGET_PACK_NAME 2>&1
+ ret_code=$?
+ if [ $ret_code == 0 ]
+ then
+ #code/sdk/output/currentbuild.txt
+ if [ -e "$HOMEDIR/code/sdk/output/currentbuild.txt" ]
+ then
+ TARGET_PACK_NAME=`cat $HOMEDIR/code/sdk/output/currentbuild.txt`
+ fi
+ cp_releasepackage
+ echo build done at $(date +%Y%m%d_%H%M%S)
+ else
+ echo build failed at $(date +%Y%m%d_%H%M%S)
+ fi
+ cd $HOMEDIR
+}
+
+checkarguments $1
+checkarguments $2
+checkarguments $3
+if [ "$CLEAN" == "-c" ]
+then
+echo $0 $TARGET_PACK_NAME $RELEASE_BUILD clean
+else
+echo $0 $TARGET_PACK_NAME $RELEASE_BUILD
+fi
+
+read -n 1 -p "Press any key to continue..."
+
+build_target | tee $HOMEDIR/build.log
+./build.py -nhso -release -build_time=20240503_001315 pack_brandy_native_js
+Not searching for unused variables given on the command line.
-- BUILD_PLATFORM: linux
audio SAP_CFGFILE = /home/snicker/hiwatch/code/sdk/application/audio/vendor/../../../drivers/drivers/driver/audio/source/build/configs/brandy/brandy_evb4_liteos_cfg.mak
audio SAP_CFGFILE = /home/snicker/hiwatch/code/sdk/application/audio/../../drivers/drivers/driver/audio/source/build/configs/brandy/brandy_evb4_liteos_cfg.mak
-- Configuring done
-- Generating done
-- Build files have been written to: /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-ssb
-[ 0%] Built target irmalloc
-[ 0%] Built target osal
-[ 0%] Built target cpu_trace
-[ 1%] Built target boot_nandflash
-[ 6%] Built target libboundscheck
-[ 6%] Built target non_os
-[ 6%] Built target flash_boot_brandy
-[ 7%] Built target flash
-[ 7%] Built target memory_core
-[ 7%] Built target gpio
-[ 7%] Built target pinctrl
-[ 9%] Built target lpc
-[ 10%] Built target ipc_old
-[ 11%] Built target pmp
-[ 12%] Built target otp
-[ 12%] Built target psram
-[ 15%] Built target hash
-[ 15%] Built target spi
-[ 16%] Built target qspi
+Scanning dependencies of target non_os
+[ 0%] Built target boot_ulp
+Scanning dependencies of target irmalloc
+[ 3%] Built target libboundscheck
+Scanning dependencies of target cpu_trace
+Scanning dependencies of target osal
+[ 3%] Building C object kernel/non_os/irmalloc/CMakeFiles/irmalloc.dir/chip_mem/chip_mem.c.obj
+[ 5%] Building C object kernel/non_os/non_os/CMakeFiles/non_os.dir/non_os_utils.c.obj
+[ 5%] Building C object kernel/osal/CMakeFiles/osal.dir/adapt/non-os/pal_non_os_interface.c.obj
+Scanning dependencies of target flash
+Scanning dependencies of target boot_nandflash
+[ 6%] Building C object driver/cpu_trace/CMakeFiles/cpu_trace.dir/cpu_trace.c.obj
+[ 6%] Building C object driver/flash/CMakeFiles/flash.dir/flash.c.obj
+[ 6%] Built target gpio
+[ 7%] Building C object bootloader/flashboot/brandy/nandflash/CMakeFiles/boot_nandflash.dir/nandflash_ds35x1g.c.obj
+[ 9%] Building C object kernel/non_os/irmalloc/CMakeFiles/irmalloc.dir/chip_mem/irmalloc.c.obj
+[ 9%] Linking C static library libcpu_trace.a
+[ 9%] Linking C static library libnon_os.a
+[ 9%] Building C object kernel/osal/CMakeFiles/osal.dir/adapt/non-os/pal_print.c.obj
+[ 9%] Building C object bootloader/flashboot/brandy/nandflash/CMakeFiles/boot_nandflash.dir/nandflash_w25n01g.c.obj
+Scanning dependencies of target ipc_old
+Scanning dependencies of target flash_boot_brandy
+[ 10%] Linking C static library libflash.a
+[ 11%] Linking C static library libosal.a
+[ 11%] Linking C static library libirmalloc.a
+[ 11%] Building C object bootloader/flashboot/brandy/CMakeFiles/flash_boot_brandy.dir/main.c.obj
+[ 12%] Building C object driver/ipc/CMakeFiles/ipc_old.dir/ipc_old/acore/ipc_irq.c.obj
+[ 12%] Building C object bootloader/flashboot/brandy/nandflash/CMakeFiles/boot_nandflash.dir/nandflash_config.c.obj
+[ 12%] Built target cpu_trace
+[ 12%] Built target non_os
+[ 12%] Built target flash
+[ 12%] Built target osal
+[ 12%] Building C object driver/ipc/CMakeFiles/ipc_old.dir/ipc_old/shared/ipc.c.obj
+[ 12%] Linking C static library libflash_boot_brandy.a
+Scanning dependencies of target otp
+Scanning dependencies of target lpc
+[ 12%] Building C object bootloader/flashboot/brandy/nandflash/CMakeFiles/boot_nandflash.dir/hal_nandflash.c.obj
+Scanning dependencies of target memory_core
+[ 12%] Building C object driver/otp/CMakeFiles/otp.dir/otp.c.obj
+[ 12%] Building C object driver/memory_core/CMakeFiles/memory_core.dir/shared/memory_core.c.obj
+[ 12%] Built target irmalloc
+[ 12%] Building C object driver/lpc/CMakeFiles/lpc.dir/acore/lpc_core.c.obj
+[ 12%] Building C object bootloader/flashboot/brandy/nandflash/CMakeFiles/boot_nandflash.dir/nandflash_qspi.c.obj
+[ 12%] Linking C static library libipc_old.a
+[ 14%] Built target pinctrl
+[ 14%] Linking C static library libmemory_core.a
+[ 14%] Built target flash_boot_brandy
+[ 15%] Building C object driver/lpc/CMakeFiles/lpc.dir/shared/lpc.c.obj
+[ 15%] Linking C static library libotp.a
+[ 16%] Building C object bootloader/flashboot/brandy/nandflash/CMakeFiles/boot_nandflash.dir/nandflash.c.obj
+[ 16%] Built target pmp
+[ 16%] Linking C static library liblpc.a
+Scanning dependencies of target qspi
+[ 16%] Built target ipc_old
+[ 16%] Linking C static library libboot_nandflash.a
+Scanning dependencies of target psram
[ 19%] Built target cipher
-[ 20%] Built target trng
-[ 22%] Built target pke
-[ 24%] Built target km
-[ 25%] Built target systick
+[ 19%] Building C object driver/qspi/CMakeFiles/qspi.dir/qspi.c.obj
+[ 19%] Building C object driver/psram/CMakeFiles/psram.dir/psram_drv.c.obj
+[ 19%] Built target memory_core
+[ 20%] Built target hash
+[ 20%] Built target otp
+[ 20%] Built target lpc
+[ 22%] Built target km
+[ 22%] Linking C static library libqspi.a
+Scanning dependencies of target trng
+[ 23%] Linking C static library libpsram.a
+[ 23%] Built target boot_nandflash
+[ 23%] Built target pke
+Scanning dependencies of target systick
+[ 23%] Building C object driver/security/trng/CMakeFiles/trng.dir/drv_trng.c.obj
+[ 23%] Building C object driver/systick/CMakeFiles/systick.dir/systick.c.obj
+[ 23%] Built target spi
+Scanning dependencies of target uart
+[ 24%] Built target tcxo
+[ 24%] Linking C static library libtrng.a
+[ 25%] Linking C static library libsystick.a
+[ 25%] Built target psram
+[ 25%] Built target qspi
[ 27%] Built target drv_timer
-[ 27%] Built target uart
-[ 27%] Built target ulp_aon
-[ 28%] Built target tcxo
-[ 29%] Built target watchdog
-[ 31%] Built target rtc_unified
-[ 31%] Built target hal_cpu_core
-[ 31%] Built target efuse
-[ 32%] Built target hal_cpu_trace
-[ 32%] Built target hal_lpc
-[ 33%] Built target hal_gpio_v100
-[ 33%] Built target hal_mips
-[ 35%] Built target hal_l2ram
-[ 35%] Built target hal_ipc_old
+[ 27%] Building C object driver/uart/CMakeFiles/uart.dir/uart.c.obj
+Scanning dependencies of target ulp_aon
+[ 28%] Built target watchdog
+[ 28%] Linking C static library libuart.a
+Scanning dependencies of target efuse
+[ 28%] Building C object driver/ulp_aon/CMakeFiles/ulp_aon.dir/ulp_aon_control.c.obj
+[ 28%] Built target hal_cpu_core
+Scanning dependencies of target rtc_unified
+[ 28%] Built target trng
+[ 28%] Built target systick
+Scanning dependencies of target hal_cpu_trace
+[ 28%] Building C object driver/efuse/CMakeFiles/efuse.dir/efuse.c.obj
+[ 28%] Building C object driver/rtc_unified/CMakeFiles/rtc_unified.dir/rtc.c.obj
+[ 28%] Linking C static library libulp_aon.a
+[ 28%] Built target uart
+Scanning dependencies of target hal_lpc
+Scanning dependencies of target hal_ipc_old
+[ 28%] Building C object hal/cpu_trace/CMakeFiles/hal_cpu_trace.dir/hal_cpu_trace.c.obj
+[ 29%] Built target hal_gpio_v100
+[ 31%] Building C object hal/ipc/CMakeFiles/hal_ipc_old.dir/hal_ipc_old/hal_ipc.c.obj
+[ 31%] Building C object hal/lpc/CMakeFiles/hal_lpc.dir/hal_lpc.c.obj
+Scanning dependencies of target hal_l2ram
+[ 31%] Linking C static library librtc_unified.a
+[ 31%] Linking C static library libefuse.a
+[ 32%] Linking C static library libhal_cpu_trace.a
+[ 32%] Built target ulp_aon
+[ 32%] Building C object hal/l2ram/CMakeFiles/hal_l2ram.dir/hal_l2ram_private.c.obj
+[ 32%] Built target hal_mips
+[ 32%] Linking C static library libhal_ipc_old.a
+[ 33%] Linking C static library libhal_lpc.a
+Scanning dependencies of target hal_otp
+[ 33%] Built target efuse
+[ 33%] Linking C static library libhal_l2ram.a
+[ 33%] Built target rtc_unified
+[ 33%] Building C object hal/otp/CMakeFiles/hal_otp.dir/brandy/hal_otp.c.obj
+[ 33%] Built target hal_cpu_trace
+[ 33%] Built target hal_ipc_old
+[ 35%] Linking C static library libhal_otp.a
+[ 36%] Built target hal_pmp
+[ 36%] Built target hal_pinctrl
+Scanning dependencies of target hal_qspi
+[ 36%] Built target hal_l2ram
+[ 36%] Built target hal_lpc
+Scanning dependencies of target hal_reg_config
+Scanning dependencies of target hal_sectors
+Scanning dependencies of target hal_reboot
+[ 36%] Building C object hal/qspi/CMakeFiles/hal_qspi.dir/hal_qspi.c.obj
[ 36%] Built target hal_otp
-[ 37%] Built target hal_pinctrl
-[ 38%] Built target hal_pmp
-[ 38%] Built target hal_reg_config
-[ 38%] Built target hal_qspi
-[ 40%] Built target hal_sectors
-[ 41%] Built target hal_reboot
-[ 42%] Built target hal_cipher
-[ 44%] Built target hal_hash
-[ 45%] Built target hal_km
-[ 46%] Built target hal_pke
-[ 48%] Built target hal_efuse_v100
-[ 49%] Built target hal_trng
-[ 51%] Built target hal_systick
-[ 51%] Built target hal_spi
-[ 53%] Built target hal_tcxo
-[ 54%] Built target hal_timer
-[ 55%] Built target hal_watchdog
-[ 57%] Built target hal_rtc_unified
-[ 58%] Built target hal_uart
-[ 58%] Built target hal_xip
-[ 62%] Built target pmu_brandy
-[ 67%] Built target brandy_clocks
-[ 67%] Built target cipher_port
-[ 68%] Built target gpio_port
+[ 36%] Building C object hal/sectors/CMakeFiles/hal_sectors.dir/hal_sectors.c.obj
+[ 36%] Building C object hal/reg_config/CMakeFiles/hal_reg_config.dir/hal_reg_config.c.obj
+[ 37%] Built target hal_km
+[ 37%] Building C object hal/reboot/CMakeFiles/hal_reboot.dir/hal_reboot.c.obj
+[ 38%] Built target hal_cipher
+[ 40%] Built target hal_hash
+[ 40%] Linking C static library libhal_qspi.a
+[ 42%] Built target hal_pke
+[ 42%] Linking C static library libhal_reg_config.a
+[ 42%] Linking C static library libhal_sectors.a
+[ 44%] Linking C static library libhal_reboot.a
+Scanning dependencies of target hal_efuse_v100
+[ 45%] Built target hal_trng
+[ 46%] Built target hal_spi
+[ 46%] Building C object hal/security/efuse/CMakeFiles/hal_efuse_v100.dir/hal_efuse.c.obj
+[ 46%] Built target hal_qspi
+Scanning dependencies of target hal_systick
+[ 46%] Building C object hal/security/efuse/CMakeFiles/hal_efuse_v100.dir/v100/hal_efuse_v100.c.obj
+[ 48%] Built target hal_timer
+[ 49%] Built target hal_reboot
+[ 49%] Built target hal_tcxo
+[ 49%] Building C object hal/systick/CMakeFiles/hal_systick.dir/v150/hal_systick_v150.c.obj
+[ 49%] Built target hal_sectors
+[ 49%] Built target hal_reg_config
+Scanning dependencies of target hal_uart
+[ 49%] Building C object hal/security/efuse/CMakeFiles/hal_efuse_v100.dir/v100/hal_efuse_v100_reg_op.c.obj
+[ 50%] Building C object hal/uart/CMakeFiles/hal_uart.dir/hal_uart.c.obj
+[ 50%] Building C object hal/systick/CMakeFiles/hal_systick.dir/v150/hal_systick_v150_regs_op.c.obj
+Scanning dependencies of target hal_xip
+Scanning dependencies of target hal_rtc_unified
+[ 50%] Linking C static library libhal_efuse_v100.a
+[ 51%] Built target hal_watchdog
+[ 51%] Building C object hal/rtc_unified/CMakeFiles/hal_rtc_unified.dir/hal_rtc.c.obj
+[ 51%] Linking C static library libhal_systick.a
+[ 51%] Building C object hal/rtc_unified/CMakeFiles/hal_rtc_unified.dir/v100/hal_rtc_v100.c.obj
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/rtc_unified/hal_rtc.c:13:11: warning: incompatible pointer to integer conversion initializing 'uintptr_t' (aka 'unsigned int') with an expression of type 'void *' [-Wint-conversion]
+uintptr_t g_rtc_comm_regs = NULL;
+^ ~~~~
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/rtc_unified/hal_rtc.c:14:45: warning: incompatible pointer to integer conversion initializing 'uintptr_t' (aka 'unsigned int') with an expression of type 'void *' [-Wint-conversion]
+uintptr_t g_rtc_regs[CONFIG_RTC_MAX_NUM] = {NULL};
+^~~~
+/home/snicker/hiwatch/code/sdk/tools/bin/compiler/linx/linx_170/linx-llvm-binary-debug/linx-llvm-binary-release-musl/lib/clang/12.0.1/include/stddef.h:89:16: note: expanded from macro 'NULL'
+# define NULL ((void*)0)
+^~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/rtc_unified/hal_rtc.c:31:23: warning: incompatible pointer to integer conversion assigning to 'uintptr_t' (aka 'unsigned int') from 'void *' [-Wint-conversion]
+g_rtc_regs[index] = NULL;
+^ ~~~~
+3 warnings generated.
+[ 51%] Building C object hal/uart/CMakeFiles/hal_uart.dir/v120/hal_uart_v120.c.obj
+[ 51%] Building C object hal/uart/CMakeFiles/hal_uart.dir/v120/hal_uart_v120_regs_op.c.obj
+Scanning dependencies of target brandy_clocks
+[ 51%] Building C object hal/xip/CMakeFiles/hal_xip.dir/hal_xip.c.obj
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/xip/hal_xip.c:24:13: warning: unused function 'hal_xip_auto' [-Wunused-function]
+static void hal_xip_auto(bool en)
+^
+1 warning generated.
+Scanning dependencies of target pmu_brandy
+[ 51%] Linking C static library libhal_rtc_unified.a
+[ 51%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/drivers/acore/clocks_config_priv.c.obj
+[ 53%] Building C object hal/xip/CMakeFiles/hal_xip.dir/hal_xip_v150_regs_op.c.obj
+[ 54%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/drivers/acore/clocks.c.obj
+[ 54%] Linking C static library libhal_uart.a
+[ 54%] Built target hal_efuse_v100
+[ 54%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/acore/pmu_cmu.c.obj
+[ 54%] Linking C static library libhal_xip.a
+[ 54%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_app.c.obj
+[ 55%] Built target hal_rtc_unified
+Scanning dependencies of target gpio_port
+Scanning dependencies of target chip_brandy
+[ 55%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_app_priv.c.obj
+[ 55%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/acore/pmu_interrupt.c.obj
+[ 57%] Built target hal_systick
+[ 57%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/arch/riscv/riscv70/interrupt.c.obj
+[ 57%] Building C object drivers/chips/brandy/porting/gpio/CMakeFiles/gpio_port.dir/gpio_porting.c.obj
+[ 57%] Built target hal_xip
+[ 57%] Built target hal_uart
+[ 57%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_glb.c.obj
+[ 57%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/acore/pmu_ldo.c.obj
+[ 57%] Built target cipher_port
+[ 57%] Built target hash_port
+[ 57%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/hal/hal_pmu_cmu.c.obj
+[ 57%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/shared/pmu.c.obj
+[ 58%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/arch/riscv/riscv70/interrupt_handler.c.obj
+[ 59%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_sdio.c.obj
+[ 61%] Linking C static library libgpio_port.a
+[ 62%] Built target km_port
+[ 63%] Built target pke_port
+[ 63%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/interrupt/vectors.c.obj
+[ 63%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/hal/hal_pmu_interrupt.c.obj
+[ 63%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks.c.obj
+[ 63%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/hal/hal_pmu_peripheral_app.c.obj
+[ 64%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/config/pmp_config.c.obj
+[ 66%] Built target trng_port
+[ 66%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_cpu_clocks.c.obj
+Scanning dependencies of target efuse_porting
+[ 66%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/acore/clocks_core.c.obj
+[ 67%] Linking C static library libpmu_brandy.a
+[ 67%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/acore/clocks_switch_priv.c.obj
+[ 67%] Built target gpio_port
+[ 67%] Linking C static library libchip_brandy.a
+[ 68%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/acore/clocks_switch.c.obj
+Scanning dependencies of target uart_port
+[ 68%] Building C object drivers/chips/brandy/porting/security/efuse/CMakeFiles/efuse_porting.dir/efuse_porting.c.obj
+[ 68%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/shared/clock_calibration.c.obj
+Scanning dependencies of target systick_port
+[ 68%] Building C object drivers/chips/brandy/porting/uart/CMakeFiles/uart_port.dir/uart_porting.c.obj
+[ 70%] Built target timer_port
+[ 71%] Linking C static library libefuse_porting.a
+[ 71%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/shared/clocks_core_common.c.obj
+[ 71%] Building C object drivers/chips/brandy/porting/systick/CMakeFiles/systick_port.dir/systick_porting.c.obj
[ 71%] Built target chip_brandy
-[ 72%] Built target km_port
-[ 72%] Built target pke_port
-[ 72%] Built target hash_port
-[ 74%] Built target trng_port
-[ 75%] Built target efuse_porting
-[ 76%] Built target uart_port
-[ 76%] Built target timer_port
+[ 72%] Linking C static library libuart_port.a
+[ 74%] Linking C static library libbrandy_clocks.a
+[ 74%] Linking C static library libsystick_port.a
+[ 76%] Built target pmu_brandy
+Scanning dependencies of target watchdog_port
[ 76%] Built target tcxo_port
+[ 76%] Built target efuse_porting
+[ 76%] Built target port_pinctrl
+[ 76%] Building C object drivers/chips/brandy/porting/watchdog/CMakeFiles/watchdog_port.dir/watchdog_porting.c.obj
+[ 76%] Built target uart_port
+Scanning dependencies of target xip_port
[ 76%] Built target systick_port
-[ 77%] Built target xip_port
-[ 79%] Built target port_pinctrl
-[ 79%] Built target pmp_port
-[ 79%] Built target watchdog_port
-[ 80%] Built target spi_porting
-[ 80%] Built target rtc_unified_port
-[ 81%] Built target flash_porting
-[ 83%] Built target partition_brandy
-[ 83%] Built target dfx_exception
-[ 84%] Built target algorithm
-[ 85%] Built target bootloader
-[ 85%] Built target build_version
-[ 87%] Built target codeloader_ssb
-[ 88%] Built target app_version
-[ 88%] Built target dfx_preserve
-[ 89%] Built target cpu_utils
-[ 93%] Built target connectivity_ssb
-[ 96%] Built target dfx_panic
-[ 96%] Built target codeloader
-[ 96%] Built target reboot
-[ 96%] Built target error_code
-[ 96%] Built target lib_utils
-[ 96%] Built target partition
-[ 97%] Generating NV_SRC
+[ 77%] Built target pmp_port
+Scanning dependencies of target spi_porting
+Scanning dependencies of target rtc_unified_port
+Scanning dependencies of target flash_porting
+[ 77%] Linking C static library libwatchdog_port.a
+[ 79%] Building C object drivers/chips/brandy/porting/spi/CMakeFiles/spi_porting.dir/spi_porting.c.obj
+[ 79%] Building C object drivers/chips/brandy/porting/rtc_unified/CMakeFiles/rtc_unified_port.dir/rtc_porting.c.obj
+[ 79%] Built target partition_brandy
+[ 79%] Building C object drivers/chips/brandy/porting/xip/CMakeFiles/xip_port.dir/xip_porting.c.obj
+[ 79%] Building C object drivers/chips/brandy/porting/flash/CMakeFiles/flash_porting.dir/flash_porting.c.obj
+/home/snicker/hiwatch/code/sdk/drivers/chips/brandy/porting/spi/spi_porting.c:468:47: warning: unused parameter 'clk_in_mhz' [-Wunused-parameter]
+bool hal_opi_set_freq(spi_bus_t bus, uint32_t clk_in_mhz)
+^
+1 warning generated.
+Scanning dependencies of target dfx_exception
+[ 79%] Built target brandy_clocks
+[ 80%] Linking C static library libxip_port.a
+[ 80%] Built target watchdog_port
+[ 80%] Linking C static library libspi_porting.a
+[ 80%] Linking C static library librtc_unified_port.a
+[ 80%] Building C object middleware/chips/brandy/exception/CMakeFiles/dfx_exception.dir/exception_riscv.c.obj
+Scanning dependencies of target algorithm
+[ 81%] Linking C static library libflash_porting.a
+Scanning dependencies of target app_version
+Scanning dependencies of target bootloader
+[ 81%] Linking C static library libdfx_exception.a
+[ 81%] Building C object utils/algorithm/CMakeFiles/algorithm.dir/sec_random/sec_random.c.obj
+[ 81%] Building C object utils/app_version/CMakeFiles/app_version.dir/private/application_version.c.obj
+[ 83%] Building C object utils/bootloader/CMakeFiles/bootloader.dir/private/bootloader_configuration.c.obj
+[ 83%] Built target xip_port
+[ 83%] Linking C static library libalgorithm.a
+[ 83%] Built target flash_porting
+[ 83%] Built target spi_porting
+[ 83%] Built target rtc_unified_port
+[ 83%] Linking C static library libapp_version.a
+[ 83%] Building C object utils/bootloader/CMakeFiles/bootloader.dir/private/bootloader_utils.c.obj
+[ 84%] Built target dfx_exception
+Scanning dependencies of target build_version
+[ 84%] Building C object utils/build_version/CMakeFiles/build_version.dir/private/build_version.c.obj
+[ 84%] Linking C static library libbootloader.a
+[ 85%] Built target codeloader_ssb
+Scanning dependencies of target dfx_preserve
+[ 85%] Building C object utils/dfx/CMakeFiles/dfx_preserve.dir/preserve/private/preserve.c.obj
+Scanning dependencies of target connectivity_ssb
+[ 85%] Linking C static library libbuild_version.a
+[ 85%] Built target app_version
+[ 88%] Built target algorithm
+Scanning dependencies of target codeloader
+Scanning dependencies of target dfx_panic
+[ 88%] Built target bootloader
+[ 88%] Building C object utils/connectivity/CMakeFiles/connectivity_ssb.dir/common/acore/connectivity_calibration.c.obj
+[ 88%] Linking C static library libdfx_preserve.a
+[ 88%] Building C object utils/dfx/CMakeFiles/dfx_panic.dir/panic/private/panic.c.obj
+[ 88%] Building C object utils/codeloader/CMakeFiles/codeloader.dir/private/codeloader.c.obj
+Scanning dependencies of target cpu_utils
+[ 88%] Building C object utils/dfx/dfx_reboot/cpu_utils/CMakeFiles/cpu_utils.dir/private/cpu_utils.c.obj
+[ 88%] Built target build_version
+Scanning dependencies of target reboot
+Scanning dependencies of target error_code
+[ 89%] Building C object utils/codeloader/CMakeFiles/codeloader.dir/private/codeloader_configuration.c.obj
+[ 89%] Linking C static library libdfx_panic.a
+[ 89%] Building C object utils/connectivity/CMakeFiles/connectivity_ssb.dir/common/acore/identity.c.obj
+[ 89%] Building C object utils/error_code/CMakeFiles/error_code.dir/private/error_code.c.obj
+[ 89%] Building C object utils/dfx/dfx_reboot/reboot/CMakeFiles/reboot.dir/shared/non_os_reboot.c.obj
+[ 89%] Built target dfx_preserve
+[ 90%] Built target lib_utils
+[ 90%] Building C object utils/codeloader/CMakeFiles/codeloader.dir/private/codeloader_execute_command_authentication_commands.c.obj
+[ 90%] Linking C static library liberror_code.a
+[ 90%] Building C object utils/connectivity/CMakeFiles/connectivity_ssb.dir/common/acore/los_status.c.obj
+[ 90%] Linking C static library libcpu_utils.a
+[ 92%] Built target dfx_panic
+[ 93%] Linking C static library libreboot.a
+[ 93%] Linking C static library libconnectivity_ssb.a
+[ 94%] Built target partition
+[ 94%] Building C object utils/codeloader/CMakeFiles/codeloader.dir/private/codeloader_execute_command_control_commands.c.obj
+[ 94%] Building C object utils/codeloader/CMakeFiles/codeloader.dir/private/codeloader_execute_command_flash_writing_commands.c.obj
+Scanning dependencies of target sec_boot
+[ 94%] Built target cpu_utils
+/home/snicker/hiwatch/code/sdk/middleware/utils/codeloader/private/codeloader_execute_command_flash_writing_commands.c:882:57: warning: incompatible pointer to integer conversion assigning to 'uint32_t' (aka 'unsigned int') from 'uint8_t [16384]' [-Wint-conversion]
+g_codeloader_data_save_position.load_start_addr = g_puya_sha256;
+^ ~~~~~~~~~~~~~
+1 warning generated.
+[ 94%] Generating NV_SRC
+[ 94%] Built target connectivity_ssb
+[ 96%] Building C object utils/codeloader/CMakeFiles/codeloader.dir/private/codeloader_execute_command_memory_commands.c.obj
+[ 97%] Building C object utils/sec_boot/CMakeFiles/sec_boot.dir/src/sec_boot_fota.c.obj
+[ 97%] Building C object utils/codeloader/CMakeFiles/codeloader.dir/private/codeloader_line_layer.c.obj
+[ 97%] Building C object utils/sec_boot/CMakeFiles/sec_boot.dir/src/sec_boot_image_sign_validate.c.obj
+[ 97%] Built target error_code
+[ 97%] Built target reboot
+[ 97%] Building C object utils/codeloader/CMakeFiles/codeloader.dir/private/codeloader_message_layer.c.obj
+[ 97%] Building C object utils/sec_boot/CMakeFiles/sec_boot.dir/src/sec_boot_otp_write.c.obj
+[ 97%] Building C object utils/sec_boot/CMakeFiles/sec_boot.dir/src/sec_boot_public.c.obj
+[ 98%] Building C object utils/codeloader/CMakeFiles/codeloader.dir/private/codeloader_uart.c.obj
+[100%] Building C object utils/sec_boot/CMakeFiles/sec_boot.dir/src/sec_boot_subkey_cert_validate.c.obj
+[100%] Linking C static library libsec_boot.a
+[100%] Linking C static library libcodeloader.a
[100%] Built target sec_boot
+[100%] Built target codeloader
Scanning dependencies of target ssb
[100%] Building C object CMakeFiles/ssb.dir/temp/__null___.c.obj
[100%] Linking C executable ssb.elf
BOOTUP_RAM: 184 B 348 B 52.87%
VERSION: 88 B 88 B 100.00%
CHANGE_ID: 8 B 16 B 50.00%
-PROGRAM: 104576 B 130620 B 80.06%
+PROGRAM: 73688 B 130620 B 56.41%
SYSTEM_CLOCKS: 4 B 48 B 8.33%
-DTCM: 85168 B 448 KB 18.57%
+DTCM: 75240 B 448 KB 16.40%
PRESERVE_RAM: 252 B 252 B 100.00%
RSA_PUBLIC_KEY: 1 KB 1 KB 100.00%
RSA_SIGNATURE: 512 B 512 B 100.00%
RSA_RESULT: 512 B 512 B 100.00%
[100%] Built target ssb
-Scanning dependencies of target GENERAT_BIN
-Scanning dependencies of target GENERAT_LST
[100%] post_build:gen bin file
[100%] Built target GENERAT_LST
[100%] Built target GENERAT_BIN
-Scanning dependencies of target ADD_SHA_TO_SSB
[100%] add ssb length and sha256 info into ssb.bin
[100%] Built target ADD_SHA_TO_SSB
######### Build target:brandy_ssb success
-brandy-ssb takes 1.441368 s
-output_path /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-ssb
-Start pack target pack_brandy_native_js
-pack_target_path /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-ssb
-current_target_file /home/snicker/hiwatch/code/sdk/output/currentbuild.txt
+brandy-ssb takes 1.886285 s
+Start pack target brandy-ssb
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-ssb/ssb.lst -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-ssb/ssb.lst
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-ssb/ssb.elf -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-ssb/ssb.elf
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-ssb/ssb.map -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-ssb/ssb.map
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-ssb/ssb.bin -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-ssb/ssb.bin
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-ssb/ssb.bin -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/ssb.bin
+Not searching for unused variables given on the command line.
-- BUILD_PLATFORM: linux
audio SAP_CFGFILE = /home/snicker/hiwatch/code/sdk/application/audio/vendor/../../../drivers/drivers/driver/audio/source/build/configs/brandy/brandy_evb4_liteos_cfg.mak
audio SAP_CFGFILE = /home/snicker/hiwatch/code/sdk/application/audio/../../drivers/drivers/driver/audio/source/build/configs/brandy/brandy_evb4_liteos_cfg.mak
LOSCFG_BASE_CORE_TSK_MONITOR is set to y
LOSCFG_TASK_STACK_STATIC_ALLOCATION is set to y
LOSCFG_TASK_STACK_DYNAMIC_ALLOCATION is set to y
-LOSCFG_BASE_CORE_TSK_LIMIT is set to 48
+LOSCFG_BASE_CORE_TSK_LIMIT is set to 40
LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE is set to 1024
LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE is set to 2048
LOSCFG_BASE_CORE_TSK_SWTMR_STACK_SIZE is set to 2048
GEN_TARGET_SRC = /home/snicker/hiwatch/code/sdk/output/brandy/acore/acore.c
PRECOMPILE_TARGET = /home/snicker/hiwatch/code/sdk/output/brandy/acore/acore.etypes
TARGET_INCLUDE = /home/snicker/hiwatch/code/sdk/middleware/chips/brandy/nv/nv_config/include;/home/snicker/hiwatch/code/sdk/middleware/utils/common_headers/native
+-- /home/snicker/hiwatch/code/sdk/middleware/services/gpu/api/rm/src/vau_stroke_dash.c is not found, finding libgfx_rm.a in /home/snicker/hiwatch/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-r
-- /home/snicker/hiwatch/code/sdk/middleware/utils/fs/vfs/bcache/src/bcache.c is not found, finding libx_vfs_private.a in /home/snicker/hiwatch/code/sdk/middleware/utils/fs/vfs/brandy-native-js-r
-- /home/snicker/hiwatch/code/sdk/middleware/utils/fs/yaffs2/os_adapt/mtd_nandcfg.c is not found, finding libfs_yaffs2.a in /home/snicker/hiwatch/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-r
-- Configuring done
-- Generating done
-- Build files have been written to: /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js-r
-[ 0%] Built target non_os
+Scanning dependencies of target non_os
[ 0%] Built target lzma_21.07
-[ 0%] Built target init
[ 0%] Built target targets
+[ 0%] Building C object kernel/non_os/non_os/CMakeFiles/non_os.dir/non_os_utils.c.obj
+[ 0%] Built target init
[ 1%] Built target riscv
-[ 1%] Built target brandy_app_recovery
[ 3%] Built target base
-[ 3%] Built target csysdeps
-[ 6%] Built target sec
-[ 7%] Built target posix
-[ 7%] Built target interrupt
-[ 7%] Built target cmsis
-[ 7%] Built target driverbase
-[ 25%] Built target m
-[ 26%] Built target linux
-[ 26%] Built target x_dpal
-[ 26%] Built target cpu_trace
-[ 26%] Built target dma
-[ 28%] Built target osal
-[ 29%] Built target gpio
-[ 29%] Built target flash
-[ 29%] Built target i2c
-[ 36%] Built target mbedtls
-[ 36%] Built target memory_core
-[ 36%] Built target lpc
-[ 55%] Built target c
-[ 55%] Built target ipc_old
-[ 55%] Built target mipi_tx
-[ 55%] Built target otp
-[ 55%] Built target pmp
-[ 56%] Built target nand_flash
-[ 58%] Built target drv_mmc
-[ 58%] Built target psram
-[ 59%] Built target pinctrl
-[ 60%] Built target qspi
-[ 61%] Built target cipher
-[ 61%] Built target km
-[ 61%] Built target hash
-[ 61%] Built target pke
-[ 61%] Built target spi
-[ 61%] Built target trng
-[ 61%] Built target tcxo
-[ 61%] Built target systick
-[ 61%] Built target drv_timer
-[ 61%] Built target uart
+[ 3%] Linking C static library libnon_os.a
+Scanning dependencies of target brandy_app_recovery
+[ 5%] Built target posix
+[ 6%] Built target csysdeps
+[ 6%] Building C object application/brandy/brandy_recovery/CMakeFiles/brandy_app_recovery.dir/main.c.obj
+[ 9%] Built target sec
+[ 9%] Built target non_os
+[ 9%] Building C object application/brandy/brandy_recovery/CMakeFiles/brandy_app_recovery.dir/app_os_init.c.obj
+[ 9%] Built target interrupt
+[ 27%] Built target m
+[ 28%] Built target driverbase
+[ 34%] Built target mbedtls
+/home/snicker/hiwatch/code/sdk/application/brandy/brandy_recovery/app_os_init.c:111:13: warning: unused function 'emmc_init' [-Wunused-function]
+static void emmc_init(void)
+^
+1 warning generated.
+[ 34%] Building C object application/brandy/brandy_recovery/CMakeFiles/brandy_app_recovery.dir/input_app.c.obj
+[ 35%] Built target cmsis
+[ 35%] Building C object application/brandy/brandy_recovery/CMakeFiles/brandy_app_recovery.dir/recovery_display.c.obj
+[ 35%] Built target linux
+/home/snicker/hiwatch/code/sdk/application/brandy/brandy_recovery/recovery_display.c:43:18: warning: unused function 'recovery_dispay_read_image_and_savein_surface' [-Wunused-function]
+static errcode_t recovery_dispay_read_image_and_savein_surface(const char *path, ext_dpu_surface *surface)
+^
+1 warning generated.
+/home/snicker/hiwatch/code/sdk/application/brandy/brandy_recovery/input_app.c:502:13: warning: implicit declaration of function 'touch_info_process' is invalid in C99 [-Wimplicit-function-declaration]
+touch_info_process();
+^
+/home/snicker/hiwatch/code/sdk/application/brandy/brandy_recovery/input_app.c:503:13: warning: implicit declaration of function 'uapi_pm_add_sleep_veto_with_timeout' is invalid in C99 [-Wimplicit-function-declaration]
+uapi_pm_add_sleep_veto_with_timeout(PM_ID_TOUCH, TOUCH_VETO_SLEEP_MS);
+^
+2 warnings generated.
+[ 35%] Built target x_dpal
+[ 35%] Built target dma
+Scanning dependencies of target cpu_trace
+Scanning dependencies of target osal
+[ 35%] Linking C static library libbrandy_app_recovery.a
+[ 53%] Built target c
+[ 53%] Building C object driver/cpu_trace/CMakeFiles/cpu_trace.dir/cpu_trace.c.obj
+Scanning dependencies of target flash
+[ 54%] Built target gpio
+[ 54%] Building C object kernel/osal/CMakeFiles/osal.dir/adapt/liteos/oal_onetrack.c.obj
+[ 54%] Building C object driver/flash/CMakeFiles/flash.dir/flash.c.obj
+[ 54%] Linking C static library libcpu_trace.a
+[ 54%] Built target brandy_app_recovery
+Scanning dependencies of target ipc_old
+Scanning dependencies of target i2c
+[ 54%] Linking C static library libosal.a
+Scanning dependencies of target memory_core
+[ 54%] Building C object driver/ipc/CMakeFiles/ipc_old.dir/ipc_old/acore/ipc_irq.c.obj
+[ 54%] Building C object driver/memory_core/CMakeFiles/memory_core.dir/shared/memory_core.c.obj
+[ 54%] Building C object driver/i2c/CMakeFiles/i2c.dir/i2c.c.obj
+Scanning dependencies of target lpc
+[ 55%] Linking C static library libmemory_core.a
+[ 55%] Linking C static library libflash.a
+[ 55%] Building C object driver/lpc/CMakeFiles/lpc.dir/acore/lpc_core.c.obj
+[ 55%] Built target cpu_trace
+Scanning dependencies of target lcd
+[ 55%] Linking C static library libi2c.a
+[ 55%] Building C object driver/ipc/CMakeFiles/ipc_old.dir/ipc_old/shared/ipc.c.obj
+[ 55%] Building C object driver/lpc/CMakeFiles/lpc.dir/shared/lpc.c.obj
+Scanning dependencies of target mipi_tx
+[ 55%] Built target memory_core
+[ 56%] Built target osal
+[ 56%] Built target i2c
+[ 56%] Built target flash
+[ 56%] Linking C static library libipc_old.a
+[ 56%] Building C object driver/lcd/CMakeFiles/lcd.dir/lcd_bus.c.obj
+[ 56%] Linking C static library liblpc.a
+[ 56%] Building C object driver/lcd/CMakeFiles/lcd.dir/lcd_qspi.c.obj
+[ 56%] Building C object driver/mipi/CMakeFiles/mipi_tx.dir/shared/mipi_tx.c.obj
+[ 56%] Building C object driver/lcd/CMakeFiles/lcd.dir/lcd_mipi.c.obj
+[ 56%] Building C object driver/lcd/CMakeFiles/lcd.dir/lcd_common.c.obj
+Scanning dependencies of target otp
+[ 56%] Linking C static library libmipi_tx.a
+[ 56%] Built target lpc
+[ 56%] Built target ipc_old
+[ 57%] Building C object driver/otp/CMakeFiles/otp.dir/otp.c.obj
+Scanning dependencies of target drv_mmc
+[ 57%] Building C object driver/lcd/CMakeFiles/lcd.dir/lcd_config.c.obj
+[ 57%] Built target pmp
+Scanning dependencies of target nand_flash
+[ 57%] Built target mipi_tx
+[ 57%] Linking C static library libotp.a
+Scanning dependencies of target psram
+[ 57%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_ds35x1g.c.obj
+Scanning dependencies of target qspi
+[ 57%] Building C object driver/mmc/CMakeFiles/drv_mmc.dir/core/block.c.obj
+[ 57%] Building C object driver/lcd/CMakeFiles/lcd.dir/soc_lcd_api.c.obj
+[ 57%] Building C object driver/psram/CMakeFiles/psram.dir/psram_drv.c.obj
+[ 57%] Built target pinctrl
+[ 57%] Built target otp
+[ 57%] Building C object driver/qspi/CMakeFiles/qspi.dir/qspi.c.obj
+[ 57%] Building C object driver/mmc/CMakeFiles/drv_mmc.dir/host/sdhci/brandy/mmc_sdhci.c.obj
+[ 58%] Linking C static library liblcd.a
+[ 58%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_tc58cyg.c.obj
+[ 58%] Linking C static library libpsram.a
+[ 58%] Built target cipher
+[ 58%] Linking C static library libqspi.a
+[ 58%] Built target hash
+[ 58%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_w25n01g.c.obj
+[ 59%] Built target km
+[ 59%] Built target lcd
+[ 59%] Built target psram
+[ 59%] Linking C static library libdrv_mmc.a
+[ 59%] Built target qspi
+[ 59%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_config.c.obj
+[ 59%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/hal_nandflash.c.obj
+Scanning dependencies of target trng
+[ 59%] Built target pke
+[ 59%] Building C object driver/security/trng/CMakeFiles/trng.dir/drv_trng.c.obj
+Scanning dependencies of target systick
+[ 59%] Built target spi
+[ 59%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_to_os.c.obj
+[ 59%] Built target tcxo
+[ 59%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_qspi.c.obj
+[ 60%] Building C object driver/systick/CMakeFiles/systick.dir/systick.c.obj
+[ 60%] Linking C static library libtrng.a
+[ 60%] Built target drv_timer
+[ 61%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash.c.obj
+[ 61%] Linking C static library libsystick.a
+[ 61%] Linking C static library libnand_flash.a
+Scanning dependencies of target ulp_aon
+[ 61%] Building C object driver/ulp_aon/CMakeFiles/ulp_aon.dir/ulp_aon_control.c.obj
+Scanning dependencies of target uart
+[ 63%] Built target drv_mmc
+[ 63%] Built target trng
+[ 63%] Building C object driver/uart/CMakeFiles/uart.dir/uart.c.obj
+[ 63%] Linking C static library libulp_aon.a
+[ 63%] Built target systick
+[ 63%] Linking C static library libuart.a
+Scanning dependencies of target qspi_display
[ 63%] Built target watchdog
-[ 64%] Built target ulp_aon
-[ 64%] Built target rtc_unified
-[ 64%] Built target qspi_display
-[ 64%] Built target efuse
+Scanning dependencies of target touch
+[ 63%] Built target mtd_com
+[ 63%] Building C object driver/qspi_display/CMakeFiles/qspi_display.dir/qspi_display.c.obj
+[ 63%] Built target nand_flash
+Scanning dependencies of target button
+[ 63%] Building C object driver/touch/CMakeFiles/touch.dir/touch_screen_drv.c.obj
+[ 63%] Built target uart
+[ 63%] Building C object driver/touch/CMakeFiles/touch.dir/touch_screen_queue1.c.obj
+[ 63%] Built target ulp_aon
+[ 63%] Linking C static library libqspi_display.a
[ 64%] Built target hal_cpu_core
-[ 64%] Built target hal_cpu_trace
-[ 64%] Built target mtd_com
-[ 64%] Built target hal_l2ram
+[ 64%] Building C object driver/button/CMakeFiles/button.dir/button.c.obj
+Scanning dependencies of target efuse
+/home/snicker/hiwatch/code/sdk/drivers/drivers/driver/touch/touch_screen_drv.c:431:5: warning: implicit declaration of function 'uapi_gpio_disable_interrupt' is invalid in C99 [-Wimplicit-function-declaration]
+uapi_gpio_disable_interrupt(TOUCH_INT_GPIO); // close tp_int gpio interrupt
+^
+/home/snicker/hiwatch/code/sdk/drivers/drivers/driver/touch/touch_screen_drv.c:436:5: warning: implicit declaration of function 'uapi_gpio_disable_interrupt' is invalid in C99 [-Wimplicit-function-declaration]
+uapi_gpio_disable_interrupt(TOUCH_INT_GPIO); // close tp_int gpio interrupt
+^
+/home/snicker/hiwatch/code/sdk/drivers/drivers/driver/touch/touch_screen_drv.c:448:5: warning: implicit declaration of function 'uapi_gpio_enable_interrupt' is invalid in C99 [-Wimplicit-function-declaration]
+uapi_gpio_enable_interrupt(TOUCH_INT_GPIO); // open tp_int gpio interrupt
+^
+/home/snicker/hiwatch/code/sdk/drivers/drivers/driver/touch/touch_screen_drv.c:472:5: warning: implicit declaration of function 'uapi_gpio_enable_interrupt' is invalid in C99 [-Wimplicit-function-declaration]
+uapi_gpio_enable_interrupt(TOUCH_INT_GPIO); // open tp_int gpio interrupt
+^
+4 warnings generated.
+Scanning dependencies of target hal_cpu_trace
+[ 64%] Building C object driver/touch/CMakeFiles/touch.dir/ztw523_touch/ztw523_ctrl.c.obj
+Scanning dependencies of target rtc_unified
+[ 64%] Building C object driver/efuse/CMakeFiles/efuse.dir/efuse.c.obj
+[ 64%] Building C object driver/touch/CMakeFiles/touch.dir/ztw523_touch/ztw523_drv1.c.obj
+[ 64%] Linking C static library libbutton.a
+[ 64%] Built target qspi_display
+[ 64%] Building C object hal/cpu_trace/CMakeFiles/hal_cpu_trace.dir/hal_cpu_trace.c.obj
[ 64%] Built target hal_dma_v100
-[ 64%] Built target hal_ipc_old
-[ 64%] Built target hal_gpio_v100
+[ 64%] Building C object driver/touch/CMakeFiles/touch.dir/ztw523_touch/ztw523_touch1.c.obj
+[ 64%] Linking C static library libefuse.a
+[ 64%] Building C object driver/rtc_unified/CMakeFiles/rtc_unified.dir/rtc.c.obj
+[ 64%] Linking C static library libhal_cpu_trace.a
+[ 65%] Built target hal_gpio_v100
+Scanning dependencies of target hal_ipc_old
+[ 65%] Linking C static library libtouch.a
+[ 65%] Built target button
+[ 65%] Linking C static library librtc_unified.a
+[ 65%] Building C object hal/ipc/CMakeFiles/hal_ipc_old.dir/hal_ipc_old/hal_ipc.c.obj
+[ 65%] Built target hal_i2c
+Scanning dependencies of target hal_lpc
+[ 65%] Built target efuse
+[ 65%] Built target hal_cpu_trace
+Scanning dependencies of target hal_l2ram
+[ 65%] Building C object hal/lpc/CMakeFiles/hal_lpc.dir/hal_lpc.c.obj
+[ 65%] Linking C static library libhal_ipc_old.a
+[ 65%] Built target touch
+[ 65%] Building C object hal/l2ram/CMakeFiles/hal_l2ram.dir/hal_l2ram_private.c.obj
+[ 65%] Linking C static library libhal_lpc.a
+[ 65%] Built target hal_pinctrl
+[ 65%] Built target rtc_unified
+Scanning dependencies of target hal_otp
+Scanning dependencies of target hal_mipi
+[ 65%] Built target hal_ipc_old
+[ 65%] Linking C static library libhal_l2ram.a
+Scanning dependencies of target hal_qspi
+[ 65%] Building C object hal/otp/CMakeFiles/hal_otp.dir/brandy/hal_otp.c.obj
[ 65%] Built target hal_lpc
-[ 66%] Built target hal_i2c
-[ 66%] Built target hal_mipi
+Scanning dependencies of target hal_reboot
+[ 65%] Built target hal_pmp
+[ 65%] Building C object hal/qspi/CMakeFiles/hal_qspi.dir/hal_qspi.c.obj
+[ 65%] Building C object hal/mipi/CMakeFiles/hal_mipi.dir/hal_mipi_tx.c.obj
+[ 65%] Building C object hal/reboot/CMakeFiles/hal_reboot.dir/hal_reboot.c.obj
+Scanning dependencies of target hal_reg_config
+Scanning dependencies of target hal_sectors
+[ 65%] Linking C static library libhal_otp.a
+[ 65%] Building C object hal/reg_config/CMakeFiles/hal_reg_config.dir/hal_reg_config.c.obj
+[ 65%] Linking C static library libhal_qspi.a
+[ 65%] Linking C static library libhal_mipi.a
+[ 65%] Building C object hal/sectors/CMakeFiles/hal_sectors.dir/hal_sectors.c.obj
+[ 65%] Built target hal_cipher
+[ 65%] Built target hal_l2ram
+[ 66%] Linking C static library libhal_reg_config.a
+[ 66%] Linking C static library libhal_reboot.a
[ 66%] Built target hal_otp
-[ 66%] Built target hal_reg_config
-[ 67%] Built target hal_sectors
-[ 68%] Built target hal_pmp
-[ 68%] Built target hal_qspi
-[ 68%] Built target hal_pinctrl
-[ 68%] Built target hal_reboot
-[ 68%] Built target hal_cipher
-[ 68%] Built target hal_hash
-[ 68%] Built target hal_km
-[ 68%] Built target hal_systick
-[ 69%] Built target hal_efuse_v100
-[ 69%] Built target hal_trng
-[ 69%] Built target hal_pke
+[ 66%] Linking C static library libhal_sectors.a
+[ 66%] Built target hal_qspi
+[ 67%] Built target hal_km
+[ 67%] Built target hal_mipi
+[ 67%] Built target hal_hash
+[ 67%] Built target hal_reg_config
+[ 67%] Built target hal_reboot
+[ 68%] Built target hal_pke
+Scanning dependencies of target hal_systick
+Scanning dependencies of target hal_efuse_v100
+[ 68%] Built target hal_trng
+[ 68%] Building C object hal/systick/CMakeFiles/hal_systick.dir/v150/hal_systick_v150.c.obj
+[ 68%] Built target hal_spi
[ 69%] Built target hal_tcxo
-[ 69%] Built target hal_spi
-[ 70%] Built target hal_timer
-[ 70%] Built target hal_uart
+[ 69%] Built target hal_sectors
+[ 69%] Built target hal_timer
+[ 69%] Building C object hal/systick/CMakeFiles/hal_systick.dir/v150/hal_systick_v150_regs_op.c.obj
+[ 69%] Building C object hal/security/efuse/CMakeFiles/hal_efuse_v100.dir/v100/hal_efuse_v100.c.obj
+[ 69%] Building C object hal/security/efuse/CMakeFiles/hal_efuse_v100.dir/v100/hal_efuse_v100_reg_op.c.obj
+[ 69%] Building C object hal/security/efuse/CMakeFiles/hal_efuse_v100.dir/hal_efuse.c.obj
+Scanning dependencies of target hal_xip
+Scanning dependencies of target hal_uart
+Scanning dependencies of target hal_rtc_unified
+[ 69%] Linking C static library libhal_systick.a
+[ 69%] Built target hal_watchdog
+[ 69%] Building C object hal/xip/CMakeFiles/hal_xip.dir/hal_xip.c.obj
+[ 70%] Building C object hal/uart/CMakeFiles/hal_uart.dir/hal_uart.c.obj
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/xip/hal_xip.c:24:13: warning: unused function 'hal_xip_auto' [-Wunused-function]
+static void hal_xip_auto(bool en)
+^
+1 warning generated.
+[ 70%] Building C object hal/rtc_unified/CMakeFiles/hal_rtc_unified.dir/hal_rtc.c.obj
+[ 70%] Building C object hal/xip/CMakeFiles/hal_xip.dir/hal_xip_v150_regs_op.c.obj
+[ 70%] Linking C static library libhal_efuse_v100.a
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/rtc_unified/hal_rtc.c:13:11: warning: incompatible pointer to integer conversion initializing 'uintptr_t' (aka 'unsigned int') with an expression of type 'void *' [-Wint-conversion]
+uintptr_t g_rtc_comm_regs = NULL;
+^ ~~~~
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/rtc_unified/hal_rtc.c:14:45: warning: incompatible pointer to integer conversion initializing 'uintptr_t' (aka 'unsigned int') with an expression of type 'void *' [-Wint-conversion]
+uintptr_t g_rtc_regs[CONFIG_RTC_MAX_NUM] = {NULL};
+^~~~
+/home/snicker/hiwatch/code/sdk/kernel/liteos/liteos_v207.1.0/Huawei_LiteOS/open_source/musl/include/stddef.h:9:14: note: expanded from macro 'NULL'
+#define NULL ((void*)0)
+^~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/rtc_unified/hal_rtc.c:31:23: warning: incompatible pointer to integer conversion assigning to 'uintptr_t' (aka 'unsigned int') from 'void *' [-Wint-conversion]
+g_rtc_regs[index] = NULL;
+^ ~~~~
+3 warnings generated.
+Scanning dependencies of target chip_brandy
+[ 70%] Built target hal_systick
+[ 70%] Linking C static library libhal_xip.a
+[ 70%] Building C object hal/rtc_unified/CMakeFiles/hal_rtc_unified.dir/v100/hal_rtc_v100.c.obj
+[ 70%] Building C object hal/uart/CMakeFiles/hal_uart.dir/v120/hal_uart_v120.c.obj
+[ 70%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/arch/riscv/riscv70/interrupt.c.obj
+Scanning dependencies of target brandy_clocks
+[ 70%] Linking C static library libhal_rtc_unified.a
+Scanning dependencies of target gpio_port
+[ 70%] Building C object hal/uart/CMakeFiles/hal_uart.dir/v120/hal_uart_v120_regs_op.c.obj
+Scanning dependencies of target pmu_brandy
+[ 70%] Built target hal_efuse_v100
+[ 70%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/drivers/acore/clocks_config_priv.c.obj
+[ 70%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/arch/riscv/riscv70/interrupt_handler.c.obj
[ 70%] Built target hal_xip
-[ 71%] Built target hal_watchdog
-[ 71%] Built target hal_rtc_unified
-[ 71%] Built target gpio_port
-[ 72%] Built target brandy_clocks
-[ 72%] Built target chip_brandy
-[ 72%] Built target liteos_port
-[ 72%] Built target cipher_port
-[ 72%] Built target pmu_brandy
+[ 70%] Building C object drivers/chips/brandy/porting/gpio/CMakeFiles/gpio_port.dir/gpio_porting.c.obj
+[ 70%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/acore/pmu_cmu.c.obj
+[ 70%] Linking C static library libhal_uart.a
+[ 70%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/interrupt/vectors.c.obj
+[ 70%] Built target hal_rtc_unified
+[ 70%] Built target cipher_port
+[ 70%] Linking C static library libgpio_port.a
+[ 70%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/drivers/acore/clocks.c.obj
+Scanning dependencies of target liteos_port
+[ 70%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/config/pmp_config.c.obj
+[ 70%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/acore/pmu_interrupt.c.obj
+[ 70%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_app.c.obj
+[ 70%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/arch/riscv/riscv70/oam_trace.c.obj
+[ 70%] Building C object drivers/chips/brandy/porting/liteos/CMakeFiles/liteos_port.dir/riscv70/idle_config.c.obj
+[ 70%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_app_priv.c.obj
+[ 70%] Built target hal_uart
+[ 71%] Building C object drivers/chips/brandy/porting/liteos/CMakeFiles/liteos_port.dir/riscv70/tick_timer.c.obj
[ 72%] Built target hash_port
-[ 73%] Built target km_port
+[ 72%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/acore/pmu_ldo.c.obj
+[ 72%] Built target gpio_port
+[ 72%] Linking C static library libchip_brandy.a
+[ 72%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_glb.c.obj
+[ 72%] Built target km_port
+[ 73%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_sdio.c.obj
+[ 73%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/shared/pmu.c.obj
+[ 73%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/hal/hal_pmu_cmu.c.obj
[ 73%] Built target pke_port
-[ 73%] Built target efuse_porting
[ 73%] Built target trng_port
-[ 73%] Built target timer_port
-[ 73%] Built target tcxo_port
-[ 75%] Built target systick_port
-[ 75%] Built target watchdog_port
-[ 75%] Built target uart_port
-[ 77%] Built target pmp_port
-[ 77%] Built target xip_port
-[ 78%] Built target i2c_porting
-[ 78%] Built target dma_port
-[ 79%] Built target port_pinctrl
-[ 79%] Built target spi_porting
-[ 79%] Built target rtc_unified_port
-[ 79%] Built target flash_porting
-[ 79%] Built target lcd
-[ 79%] Built target dfx_exception
-[ 80%] Built target touch
+[ 73%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks.c.obj
+[ 73%] Linking C static library libliteos_port.a
+[ 73%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_cpu_clocks.c.obj
+[ 73%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/hal/hal_pmu_interrupt.c.obj
+[ 75%] Built target chip_brandy
+Scanning dependencies of target efuse_porting
+[ 75%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/hal/hal_pmu_peripheral_app.c.obj
+[ 75%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/acore/clocks_switch_priv.c.obj
+[ 75%] Building C object drivers/chips/brandy/porting/security/efuse/CMakeFiles/efuse_porting.dir/efuse_porting.c.obj
+[ 76%] Built target timer_port
+[ 76%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/acore/clocks_core.c.obj
+[ 76%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/shared/clock_calibration.c.obj
+Scanning dependencies of target uart_port
+[ 76%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/acore/clocks_switch.c.obj
+[ 76%] Linking C static library libpmu_brandy.a
+[ 76%] Built target liteos_port
+[ 76%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/shared/clocks_core_common.c.obj
+[ 76%] Linking C static library libefuse_porting.a
+[ 77%] Building C object drivers/chips/brandy/porting/uart/CMakeFiles/uart_port.dir/uart_porting.c.obj
+Scanning dependencies of target systick_port
+[ 77%] Linking C static library libbrandy_clocks.a
+[ 77%] Built target tcxo_port
+Scanning dependencies of target watchdog_port
+[ 77%] Linking C static library libuart_port.a
+[ 77%] Building C object drivers/chips/brandy/porting/systick/CMakeFiles/systick_port.dir/systick_porting.c.obj
+[ 77%] Building C object drivers/chips/brandy/porting/watchdog/CMakeFiles/watchdog_port.dir/watchdog_porting.c.obj
+[ 77%] Built target port_pinctrl
+[ 77%] Built target efuse_porting
+Scanning dependencies of target xip_port
+[ 77%] Linking C static library libwatchdog_port.a
+[ 78%] Built target pmu_brandy
+[ 78%] Built target uart_port
+[ 78%] Building C object drivers/chips/brandy/porting/xip/CMakeFiles/xip_port.dir/xip_porting.c.obj
+[ 78%] Linking C static library libsystick_port.a
+[ 78%] Built target brandy_clocks
+[ 78%] Built target pmp_port
+Scanning dependencies of target i2c_porting
+[ 79%] Linking C static library libxip_port.a
+Scanning dependencies of target flash_porting
+Scanning dependencies of target spi_porting
+Scanning dependencies of target rtc_unified_port
+[ 79%] Building C object drivers/chips/brandy/porting/i2c/CMakeFiles/i2c_porting.dir/i2c_porting.c.obj
+[ 79%] Building C object drivers/chips/brandy/porting/flash/CMakeFiles/flash_porting.dir/flash_porting.c.obj
+[ 79%] Built target watchdog_port
+[ 79%] Building C object drivers/chips/brandy/porting/spi/CMakeFiles/spi_porting.dir/spi_porting.c.obj
+Scanning dependencies of target dma_port
+[ 79%] Built target systick_port
+[ 79%] Building C object drivers/chips/brandy/porting/rtc_unified/CMakeFiles/rtc_unified_port.dir/rtc_porting.c.obj
+[ 79%] Linking C static library libflash_porting.a
+/home/snicker/hiwatch/code/sdk/drivers/chips/brandy/porting/spi/spi_porting.c:468:47: warning: unused parameter 'clk_in_mhz' [-Wunused-parameter]
+bool hal_opi_set_freq(spi_bus_t bus, uint32_t clk_in_mhz)
+^
+1 warning generated.
+[ 79%] Linking C static library libi2c_porting.a
+[ 79%] Building C object drivers/chips/brandy/porting/dma/CMakeFiles/dma_port.dir/dma_porting.c.obj
+[ 79%] Linking C static library librtc_unified_port.a
+[ 79%] Built target xip_port
+[ 79%] Linking C static library libspi_porting.a
Scanning dependencies of target button_port
-[ 81%] Built target button
-[ 81%] Built target dfx_port_brandy
-[ 82%] Built target pm_brandy
-[ 82%] Building C object drivers/chips/brandy/porting/button/CMakeFiles/button_port.dir/button_porting.c.obj
-[ 82%] Built target pm_service
-[ 82%] Built target partition_brandy
-[ 82%] Built target update_common_brandy
-[ 82%] Built target app_version
-[ 83%] Built target algorithm
-[ 83%] Built target at_cmd
-[ 83%] Built target build_version
-[ 83%] Built target cpu_load
-[ 84%] Built target connectivity
-[ 85%] Built target dfx_preserve
-[ 85%] Built target dfx_panic
-[ 86%] Built target log_file
-[ 86%] Built target soc_log
-/home/snicker/hiwatch/code/sdk/drivers/chips/brandy/porting/button/button_porting.c:95:5: warning: implicit declaration of function 'uapi_tcxo_delay_ms' is invalid in C99 [-Wimplicit-function-declaration]
-uapi_tcxo_delay_ms(cali_ms);
+Scanning dependencies of target dfx_exception
+[ 79%] Building C object middleware/chips/brandy/exception/CMakeFiles/dfx_exception.dir/exception_riscv.c.obj
+[ 79%] Built target i2c_porting
+[ 79%] Linking C static library libdma_port.a
+[ 79%] Built target flash_porting
+[ 79%] Building C object drivers/chips/brandy/porting/button/CMakeFiles/button_port.dir/button_porting.c.obj
+[ 79%] Built target rtc_unified_port
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/exception/exception_riscv.c:975:5: warning: implicit declaration of function 'nandflash_yaffs_sync' is invalid in C99 [-Wimplicit-function-declaration]
+nandflash_yaffs_sync();
^
-/home/snicker/hiwatch/code/sdk/drivers/chips/brandy/porting/button/button_porting.c:265:9: warning: implicit declaration of function 'uapi_tcxo_delay_us' is invalid in C99 [-Wimplicit-function-declaration]
-uapi_tcxo_delay_us(ULP_INT_CLEAR_DELAY);
+1 warning generated.
+[ 79%] Built target spi_porting
+[ 80%] Linking C static library libbutton_port.a
+[ 80%] Built target dma_port
+[ 80%] Built target partition_brandy
+[ 80%] Linking C static library libdfx_exception.a
+Scanning dependencies of target pm_service
+Scanning dependencies of target update_common_brandy
+[ 80%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_dev.c.obj
+[ 80%] Built target button_port
+Scanning dependencies of target dfx_port_brandy
+[ 80%] Building C object middleware/chips/brandy/update/common/CMakeFiles/update_common_brandy.dir/upg_common_porting.c.obj
+Scanning dependencies of target algorithm
+[ 80%] Built target dfx_exception
+[ 80%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_fsm.c.obj
+Scanning dependencies of target pm_brandy
+[ 81%] Building C object utils/algorithm/CMakeFiles/algorithm.dir/sec_random/sec_random.c.obj
+[ 81%] Building C object middleware/chips/brandy/dfx/CMakeFiles/dfx_port_brandy.dir/dfx_channel.c.obj
+Scanning dependencies of target app_version
+[ 81%] Linking C static library libupdate_common_brandy.a
+Scanning dependencies of target build_version
+[ 81%] Linking C static library libalgorithm.a
+[ 81%] Building C object utils/app_version/CMakeFiles/app_version.dir/private/application_version.c.obj
+[ 81%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_clocks.c.obj
+[ 81%] Building C object utils/build_version/CMakeFiles/build_version.dir/private/build_version.c.obj
+[ 81%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_sleep.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:96:52: warning: unused parameter 'fd' [-Wunused-parameter]
+static errcode_t diag_channel_bt_gatt_output(void *fd, dfx_data_type_t data_type, uint8_t *data[], uint16_t len[],
^
-/home/snicker/hiwatch/code/sdk/drivers/chips/brandy/porting/button/button_porting.c:269:9: warning: implicit declaration of function 'uapi_tcxo_delay_us' is invalid in C99 [-Wimplicit-function-declaration]
-uapi_tcxo_delay_us(ULP_INT_CLEAR_DELAY);
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:96:72: warning: unused parameter 'data_type' [-Wunused-parameter]
+static errcode_t diag_channel_bt_gatt_output(void *fd, dfx_data_type_t data_type, uint8_t *data[], uint16_t len[],
^
-/home/snicker/hiwatch/code/sdk/drivers/chips/brandy/porting/button/button_porting.c:273:9: warning: implicit declaration of function 'uapi_tcxo_delay_us' is invalid in C99 [-Wimplicit-function-declaration]
-uapi_tcxo_delay_us(ULP_INT_CLEAR_DELAY);
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:97:13: warning: unused parameter 'cnt' [-Wunused-parameter]
+uint8_t cnt)
^
-4 warnings generated.
-[ 89%] Built target dfx_log
-[ 88%] Built target cpu_utils
-[ 89%] Built target reboot
-[ 92%] Linking C static library libbutton_port.a
-[ 92%] Built target dfx_diag
-[ 92%] Built target dfx_update
-[ 93%] Built target x_fat
-[ 93%] Built target x_disk
-[ 93%] Built target partition
-[ 94%] Built target diag_dfx_cmd
-[ 94%] Built target button_port
-[ 94%] Generating NV_SRC
-[ 94%] Built target lib_utils
-[ 94%] Built target update_common
-[ 94%] Built target update_local
-[100%] Built target x_vfs
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:116:15: warning: unused parameter 'status' [-Wunused-parameter]
+errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:44:13: warning: unused function 'diag_channel_rx_bt_data' [-Wunused-function]
+static void diag_channel_rx_bt_data(uint8_t *data, uint16_t size)
+^
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:63:18: warning: unused function 'diag_channel_bt_output' [-Wunused-function]
+static errcode_t diag_channel_bt_output(void *fd, dfx_data_type_t data_type, uint8_t *data[], uint16_t len[],
+^
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:84:13: warning: unused function 'diag_channel_register_bt_callback' [-Wunused-function]
+static void diag_channel_register_bt_callback(void)
+^
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:96:18: warning: unused function 'diag_channel_bt_gatt_output' [-Wunused-function]
+static errcode_t diag_channel_bt_gatt_output(void *fd, dfx_data_type_t data_type, uint8_t *data[], uint16_t len[],
+^
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:124:13: warning: unused function 'diag_channel_register_bt_gatt_callback' [-Wunused-function]
+static void diag_channel_register_bt_gatt_callback(void)
+^
+9 warnings generated.
+[ 81%] Built target update_common_brandy
+[ 82%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_config.c.obj
+[ 82%] Building C object middleware/chips/brandy/dfx/CMakeFiles/dfx_port_brandy.dir/dfx_system_init.c.obj
+[ 82%] Linking C static library libbuild_version.a
+[ 82%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_sys.c.obj
+[ 82%] Linking C static library libapp_version.a
+[ 82%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_control.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_system_init.c:228:13: warning: unused function 'cmd_shell_proc' [-Wunused-function]
+static void cmd_shell_proc(uint8_t *data, uint32_t data_len)
+^
+1 warning generated.
+[ 82%] Built target algorithm
+[ 82%] Building C object middleware/chips/brandy/dfx/CMakeFiles/dfx_port_brandy.dir/last_dump_adapt.c.obj
+Scanning dependencies of target connectivity
+[ 82%] Built target build_version
+[ 83%] Building C object middleware/chips/brandy/dfx/CMakeFiles/dfx_port_brandy.dir/sample_data_adapt.c.obj
+[ 83%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_core.c.obj
+[ 83%] Built target app_version
+[ 84%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_tickless.c.obj
+[ 84%] Building C object middleware/chips/brandy/dfx/CMakeFiles/dfx_port_brandy.dir/zdiag_adapt_sdt.c.obj
+Scanning dependencies of target cpu_load
+[ 84%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_lp_stub.c.obj
+[ 84%] Building C object utils/connectivity/CMakeFiles/connectivity.dir/common/acore/connectivity_calibration.c.obj
+[ 84%] Building C object utils/connectivity/CMakeFiles/connectivity.dir/common/shared/connectivity_log.c.obj
+[ 84%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_veto.c.obj
+[ 84%] Building C object utils/cpu_load/CMakeFiles/cpu_load.dir/private/cpu_load.c.obj
+[ 84%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_lpc.c.obj
+[ 84%] Linking C static library libdfx_port_brandy.a
+[ 84%] Building C object utils/connectivity/CMakeFiles/connectivity.dir/common/acore/identity.c.obj
+[ 84%] Building C object utils/connectivity/CMakeFiles/connectivity.dir/common/acore/los_status.c.obj
+[ 84%] Linking C static library libcpu_load.a
+[ 84%] Linking C static library libpm_service.a
+[ 84%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_os.c.obj
+[ 84%] Built target dfx_port_brandy
+[ 84%] Built target pm_service
+[ 84%] Linking C static library libconnectivity.a
+[ 84%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_pmu.c.obj
+[ 84%] Built target cpu_load
+Scanning dependencies of target gpu
+[ 84%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm.c.obj
+Scanning dependencies of target dfx_preserve
+[ 84%] Linking C static library libpm_brandy.a
+[ 84%] Built target connectivity
+[ 84%] Building C object utils/dfx/CMakeFiles/dfx_preserve.dir/preserve/private/preserve.c.obj
+[ 84%] Building C object services/gpu/CMakeFiles/gpu.dir/api/dpu/soc_dpu_api.c.obj
+Scanning dependencies of target soc_log
+[ 84%] Building C object utils/dfx/CMakeFiles/soc_log.dir/soc_log/soc_log.c.obj
+[ 84%] Linking C static library libdfx_preserve.a
+Scanning dependencies of target dfx_panic
+Scanning dependencies of target log_file
+[ 84%] Built target pm_brandy
+[ 84%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/soc_vau_api.c.obj
+[ 84%] Building C object utils/dfx/CMakeFiles/soc_log.dir/soc_log/soc_log_uart_instance.c.obj
+[ 84%] Building C object utils/dfx/CMakeFiles/dfx_panic.dir/panic/private/panic.c.obj
+[ 84%] Building C object utils/dfx/CMakeFiles/log_file.dir/log_file/log_file.c.obj
+[ 84%] Linking C static library libsoc_log.a
+Scanning dependencies of target cpu_utils
+[ 84%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/draw/vau_draw.c.obj
+[ 84%] Building C object utils/dfx/dfx_reboot/cpu_utils/CMakeFiles/cpu_utils.dir/private/cpu_utils.c.obj
+[ 84%] Built target dfx_preserve
+[ 84%] Building C object utils/dfx/CMakeFiles/log_file.dir/log_file/log_file_file.c.obj
+[ 84%] Building C object utils/dfx/CMakeFiles/log_file.dir/log_file/log_file_flash.c.obj
+[ 84%] Linking C static library libdfx_panic.a
+[ 84%] Linking C static library libcpu_utils.a
+[ 84%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/draw/vau_utility.c.obj
+[ 84%] Built target soc_log
+[ 84%] Linking C static library liblog_file.a
+Scanning dependencies of target reboot
+[ 84%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/matrix/vau_matrix.c.obj
+Scanning dependencies of target dfx_diag
+[ 84%] Built target dfx_panic
+[ 84%] Built target log_file
+[ 84%] Built target cpu_utils
+[ 84%] Building C object utils/dfx/dfx_reboot/reboot/CMakeFiles/reboot.dir/shared/non_os_reboot.c.obj
+[ 84%] Linking C static library libreboot.a
+[ 84%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/compress/vau_compress.c.obj
+[ 84%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_debug.c.obj
+Scanning dependencies of target dfx_log
+Scanning dependencies of target dfx_update
+[ 85%] Built target x_fat
+[ 85%] Building C object utils/dfx/diag_dfx_cmd/diag_update/CMakeFiles/dfx_update.dir/diag_update.c.obj
+[ 85%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/debug/vau_debug.c.obj
+Scanning dependencies of target dfx_file_operation
+[ 85%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log.c.obj
+[ 85%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_pkt.c.obj
+[ 85%] Built target reboot
+[ 85%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/intf/drv_dpu_intf.c.obj
+[ 85%] Building C object utils/dfx/file_operation/CMakeFiles/dfx_file_operation.dir/dfx_file_operation.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_update/diag_update.c:71:13: warning: implicit declaration of function 'upg_reboot' is invalid in C99 [-Wimplicit-function-declaration]
+upg_reboot();
+^
+1 warning generated.
+[ 85%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_logger.c.obj
+[ 85%] Linking C static library libdfx_update.a
+[ 85%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/ioctl/dpu_ioctl.c.obj
+[ 86%] Linking C static library libdfx_file_operation.a
+[ 86%] Built target x_disk
+[ 86%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_mem.c.obj
+[ 86%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/layer/dpu_layer.c.obj
+[ 86%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_mem_query.c.obj
+[ 86%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_msg.c.obj
+[ 86%] Built target dfx_file_operation
+Scanning dependencies of target diag_dfx_cmd
+[ 88%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/disp/dpu_disp.c.obj
+[ 88%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_ota.c.obj
+[ 88%] Built target dfx_update
+[ 88%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_tx.c.obj
+[ 88%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_beat_heart.c.obj
+[ 88%] Built target partition
+[ 88%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_pcm.c.obj
+[ 88%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/clock/dpu_clock.c.obj
+[ 93%] Built target x_vfs
+[ 93%] Built target lib_utils
+/home/snicker/hiwatch/code/sdk/middleware/utils/dfx/diag/diag_tx.c:16:17: warning: unused function 'diag_alloc_pkt_buffer' [-Wunused-function]
+STATIC uint8_t *diag_alloc_pkt_buffer(diag_pkt_handle_t *pkt)
+^
+1 warning generated.
+[ 93%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/isr/dpu_isr.c.obj
+[ 93%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_reg_query.c.obj
+[ 93%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_rx_api.c.obj
+[ 93%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_connect.c.obj
+[ 93%] Generating NV_SRC
+[ 93%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/dfx/dpu_dfx.c.obj
+Scanning dependencies of target update_common
+[ 93%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_status.c.obj
+Scanning dependencies of target update_local
+[ 93%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/hal/dpu_hal.c.obj
+[ 93%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_filter.c.obj
+[ 93%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/hal/dpu_hal_crg.c.obj
+[ 93%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_channel.c.obj
+[ 93%] Building C object utils/update/common/CMakeFiles/update_common.dir/upg_common.c.obj
+[ 93%] Building C object utils/update/local_update/CMakeFiles/update_local.dir/upg_patch.c.obj
+[ 93%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_get_mem_info.c.obj
+[ 93%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/hal/dpu_hal_disp.c.obj
+[ 93%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_pkt_router.c.obj
+[ 93%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_dscr_cb.c.obj
+[ 93%] Building C object utils/update/common/CMakeFiles/update_common.dir/upg_verify.c.obj
+[ 93%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/hal/dpu_hal_layer.c.obj
+[ 93%] Building C object utils/update/local_update/CMakeFiles/update_local.dir/upg_process.c.obj
+[ 93%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/qspi/dpu_qspi.c.obj
+[ 93%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oml_ota_rom.c.obj
+[ 93%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oml_exception.c.obj
+[ 93%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_get_task_info.c.obj
+[ 93%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_dfx.c.obj
+[ 93%] Linking C static library libupdate_common.a
+[ 93%] Building C object utils/update/local_update/CMakeFiles/update_local.dir/upg_resource.c.obj
+[ 93%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_get_res_info.c.obj
+[ 93%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/dfx/vau_dfx.c.obj
+[ 94%] Building C object utils/update/local_update/CMakeFiles/update_local.dir/upg_upgrade.c.obj
+[ 95%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_stat.c.obj
+[ 95%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_printf.c.obj
+[ 95%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/intf/drv_vau_intf.c.obj
+[ 95%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/intf/vau_pre_process.c.obj
+[ 95%] Linking C static library libupdate_local.a
+[ 95%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_printf_rom.c.obj
+[ 95%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_get_init_info.c.obj
+[ 95%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_service.c.obj
+[ 95%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_filter.c.obj
+[ 95%] Built target update_common
+[ 95%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_reg_dump.c.obj
+[ 95%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_get_cpup.c.obj
+[ 95%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/ioctl/vau_ioctl.c.obj
+[ 95%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_password.c.obj
+[ 95%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_cmd_router/diag_cmd_dispatch.c.obj
+[ 95%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_stat.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_system_cmd/diag_cmd_get_cpup.c:100:44: warning: implicit declaration of function 'dfx_os_task_status_convert_str' is invalid in C99 [-Wimplicit-function-declaration]
+info->task_info->priority, dfx_os_task_status_convert_str(info->task_info->status),
+^
+1 warning generated.
+[ 95%] Built target update_local
+[ 95%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/isr/vau_isr.c.obj
+[ 95%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_trigger.c.obj
+[ 95%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_cmd_router/diag_cmd_dst.c.obj
+[ 95%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_mocked_shell/diag_mocked_shell.c.obj
+[ 95%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_cmd_router/diag_cmd_src.c.obj
+[ 95%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_cmd_router/diag_ind_dst.c.obj
+[ 96%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_reader/private/log_oam_msg.c.obj
+[ 96%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/last_dump/last_dump.c.obj
+[ 96%] Built target nv_config_brandy
+[ 96%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_cmd_router/diag_ind_src.c.obj
+[ 96%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_buffer/log_buffer.c.obj
+[ 96%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_cmd_ls.c.obj
+[ 96%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/job/vau_job.c.obj
+[ 97%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/list/vau_list.c.obj
+[ 97%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_cmd_delete_file.c.obj
+[ 97%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit.c.obj
+[ 97%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/sample_data/sample_data.c.obj
+[ 97%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_buffer/log_buffer_reader.c.obj
+[ 97%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_send_recv_pkt.c.obj
+[ 97%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/list/vau_handle.c.obj
+[ 97%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/mem/vau_mem.c.obj
+[ 97%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_buffer/log_memory_region.c.obj
+[ 97%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_item.c.obj
+[ 97%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_resume.c.obj
+[ 97%] Linking C static library libdiag_dfx_cmd.a
+[ 98%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_dst.c.obj
+[ 98%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/node/vau_node.c.obj
+[ 98%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_buffer/log_memory_section.c.obj
+[ 98%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal.c.obj
+[ 98%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_reader/private/log_uart.c.obj
+[ 98%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_src.c.obj
+[ 98%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_write_read.c.obj
+[ 98%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_api.c.obj
+[ 98%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_apb.c.obj
+[ 98%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_debug.c.obj
+[ 98%] Linking C static library libdfx_log.a
+[ 98%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_affine.c.obj
+[ 98%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_capability.c.obj
+[ 98%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_node.c.obj
+[ 98%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_vector_draw.c.obj
+[100%] Built target diag_dfx_cmd
+[100%] Linking C static library libdfx_diag.a
+[100%] Linking C static library ../../../../../../interim_binary/brandy/libs/gpu/evb_recovery/libgpu.a
+[100%] Built target dfx_log
+[100%] Built target dfx_diag
+[100%] Built target gpu
Scanning dependencies of target recovery
[100%] Building C object CMakeFiles/recovery.dir/temp/__null___.c.obj
-[100%] Built target nv_config_brandy
[100%] Linking C executable recovery.elf
Generating /home/snicker/hiwatch/code/sdk/drivers/boards/brandy_evb/linker/recovery/acore.prelds -> /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js-r/linker.lds
Memory region Used Size Region Size %age Used
BOOTUP_RAM: 372 B 436 B 85.32%
BOOTUP_LOAD: 372 B 436 B 85.32%
FLASH_VERSION: 0 GB 88 B 0.00%
-FLASH_PROGRAM: 186916 B 259992 B 71.89%
+FLASH_PROGRAM: 235140 B 259992 B 90.44%
PSRAM_PROGRAM: 0 GB 32 MB 0.00%
PSRAM_HEAP: 0 GB 7 MB 0.00%
L2M_GPU_PROGRAM: 0 GB 0 GB
-L2M_DSP_PROGRAM: 0 GB 640 KB 0.00%
-ITCM: 91204 B 196172 B 46.49%
-DTCM: 61752 B 436 KB 13.83%
+L2M_DSP_PROGRAM: 0 GB 1280 KB 0.00%
+ITCM: 107772 B 196172 B 54.94%
+DTCM: 66576 B 436 KB 14.91%
IPC_SHARE_MEM: 18528 B 18528 B 100.00%
PRESERVE_SHARE_MEM: 252 B 252 B 100.00%
CPUTRACE_RAM: 8184 B 8184 B 100.00%
[100%] Built target GENERAT_LST
[100%] Built target GENERAT_BIN
######### Build target:brandy_native_js_r success
-brandy-native-js-r takes 3.662144 s
-output_path /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js-r
-Start pack target pack_brandy_native_js
-pack_target_path /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-native-js-r
-current_target_file /home/snicker/hiwatch/code/sdk/output/currentbuild.txt
+brandy-native-js-r takes 4.060818 s
+Start pack target brandy-native-js-r
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js-r/recovery.elf -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-native-js-r/recovery.elf
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js-r/recovery.bin -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-native-js-r/recovery.bin
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js-r/recovery.bin -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/recovery.bin
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js-r/recovery.lst -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-native-js-r/recovery.lst
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js-r/recovery.map -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-native-js-r/recovery.map
+Not searching for unused variables given on the command line.
-- BUILD_PLATFORM: linux
audio SAP_CFGFILE = /home/snicker/hiwatch/code/sdk/application/audio/vendor/../../../drivers/drivers/driver/audio/source/build/configs/brandy/brandy_evb4max_liteos_cfg.mak
audio SAP_CFGFILE = /home/snicker/hiwatch/code/sdk/application/audio/../../drivers/drivers/driver/audio/source/build/configs/brandy/brandy_evb4max_liteos_cfg.mak
LOSCFG_BASE_CORE_TSK_MONITOR is set to y
LOSCFG_TASK_STACK_STATIC_ALLOCATION is set to y
LOSCFG_TASK_STACK_DYNAMIC_ALLOCATION is set to y
-LOSCFG_BASE_CORE_TSK_LIMIT is set to 48
+LOSCFG_BASE_CORE_TSK_LIMIT is set to 40
LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE is set to 1024
LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE is set to 2048
LOSCFG_BASE_CORE_TSK_SWTMR_STACK_SIZE is set to 2048
GEN_TARGET_SRC = /home/snicker/hiwatch/code/sdk/output/brandy/acore/acore.c
PRECOMPILE_TARGET = /home/snicker/hiwatch/code/sdk/output/brandy/acore/acore.etypes
TARGET_INCLUDE = /home/snicker/hiwatch/code/sdk/middleware/chips/brandy/nv/nv_config/include;/home/snicker/hiwatch/code/sdk/middleware/utils/common_headers/native
+-- /home/snicker/hiwatch/code/sdk/middleware/services/gpu/api/rm/src/vau_stroke_dash.c is not found, finding libgfx_rm.a in /home/snicker/hiwatch/code/sdk/middleware/services/gpu/api/rm/brandy-native-js
-- /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/engines/gfx/lite_m_gfx_engine.cpp is not found, finding libuikit_ext.a in /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/brandy-native-js
-- /home/snicker/hiwatch/code/sdk/middleware/services/gui/hal/display/src/display_vau.c is not found, finding libdisplay_gfx.a in /home/snicker/hiwatch/code/sdk/middleware/services/gui/hal/display/brandy-native-js
-- /home/snicker/hiwatch/code/sdk/middleware/utils/fs/vfs/bcache/src/bcache.c is not found, finding libx_vfs_private.a in /home/snicker/hiwatch/code/sdk/middleware/utils/fs/vfs/brandy-native-js
-- /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/abilitykit/ability_manager.cpp is not found, finding libams.a in /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js
-- /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/bundlekit/ability_info.cpp is not found, finding libbms.a in /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js
-- /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/animation/transition_impl.cpp is not found, finding libace.a in /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js
--- /home/snicker/hiwatch/code/sdk/open_source/openharmony/third_party/jerryscript/src/arg.c is not found, finding libjerryscript.a in /home/snicker/hiwatch/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js
+-- /home/snicker/hiwatch/code/sdk/open_source/openharmony/third_party/jerryscript/jerry-core/api/jerry-debugger-transport.c is not found, finding libjerryscript.a in /home/snicker/hiwatch/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js
-- Configuring done
-- Generating done
-- Build files have been written to: /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js
-[ 0%] Built target alipay_hal
-[ 0%] Built target media_at_service
-[ 1%] Built target audio_at_service
-[ 1%] Built target ohosfwk_at_service
-Scanning dependencies of target app_at_service
-Scanning dependencies of target batterry_service
-[ 1%] Built target audio_vendor
-[ 2%] Built target nativeabilityfwk
-[ 2%] Building C object application/battery/CMakeFiles/batterry_service.dir/service/battery_service.c.obj
-[ 2%] Building C object application/wstp/at_service/app/CMakeFiles/app_at_service.dir/app_at_process.c.obj
-[ 6%] Built target mbedtls
+[ 0%] Built target alipay_antchain
+Scanning dependencies of target audio_vendor
+[ 1%] Building C object application/audio/vendor/CMakeFiles/audio_vendor.dir/aw88262/aw88262.c.obj
+[ 1%] Linking C static library ../../../../../../../interim_binary/brandy/libs/audio/evb4_standard/liteos/libaudio_vendor.a
+Scanning dependencies of target ohosfwk_at_service
+Scanning dependencies of target graphic_at_service
+[ 1%] Building CXX object application/wstp/at_service/ohosfwk/CMakeFiles/ohosfwk_at_service.dir/ohosfwk_at_process.cpp.obj
+[ 1%] Building C object application/wstp/at_service/graphic/CMakeFiles/graphic_at_service.dir/graphic_cmd_manager.c.obj
+[ 4%] Built target mbedtls
Scanning dependencies of target brandy_app_standard
+[ 4%] Built target audio_vendor
+[ 4%] Building C object application/wstp/at_service/graphic/CMakeFiles/graphic_at_service.dir/graphic_at_process.c.obj
+[ 4%] Building C object application/brandy/brandy_standard/CMakeFiles/brandy_app_standard.dir/kernel_init.c.obj
+[ 4%] Built target ohos_deps
Scanning dependencies of target audio_sample
+[ 5%] Building C object application/wstp/at_service/graphic/CMakeFiles/graphic_at_service.dir/graphic_rx_process.c.obj
+[ 5%] Building C object application/brandy/brandy_standard/CMakeFiles/brandy_app_standard.dir/chip_init.c.obj
+Scanning dependencies of target app_at_service
+[ 5%] Linking CXX static library libohosfwk_at_service.a
+[ 5%] Building C object application/wstp/at_service/graphic/CMakeFiles/graphic_at_service.dir/graphic_tx_process.c.obj
+[ 5%] Building C object application/brandy/brandy_standard/CMakeFiles/brandy_app_standard.dir/board_init.c.obj
+[ 5%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_ai/sample_ai.c.obj
+[ 5%] Building C object application/wstp/at_service/app/CMakeFiles/app_at_service.dir/app_cmd_manager.c.obj
+[ 5%] Built target ohosfwk_at_service
+[ 5%] Building C object application/brandy/brandy_standard/CMakeFiles/brandy_app_standard.dir/service_init.c.obj
+[ 5%] Building C object application/wstp/at_service/graphic/CMakeFiles/graphic_at_service.dir/graphic_msg_manager.c.obj
+[ 5%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_ai/sample_ai_aenc.c.obj
+[ 5%] Building C object application/brandy/brandy_standard/CMakeFiles/brandy_app_standard.dir/thread_init.c.obj
+Scanning dependencies of target broadcast
+[ 5%] Linking C static library libgraphic_at_service.a
+Scanning dependencies of target nativeabilityfwk
+[ 5%] Building C object application/wearable/service/broadcast/CMakeFiles/broadcast.dir/src/broadcast_feature.c.obj
+[ 5%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_ao/sample_ao.c.obj
+[ 5%] Building C object application/brandy/brandy_standard/CMakeFiles/brandy_app_standard.dir/thread_pri_init.c.obj
+/home/snicker/hiwatch/code/sdk/application/wearable/service/broadcast/src/broadcast_feature.c:37:18: warning: incompatible function pointer types initializing 'BOOL (*)(Feature *, Request *)' (aka 'unsigned int (*)(struct Feature *, struct Request *)') with an expression of type 'BOOL (Feature *, Request **)' (aka 'unsigned int (struct Feature *, struct Request **)') [-Wincompatible-function-pointer-types]
+.OnMessage = OnMessage,
+^~~~~~~~~
+1 warning generated.
+[ 5%] Building CXX object application/wearable/nativeabilityfwk/CMakeFiles/nativeabilityfwk.dir/src/BaseView.cpp.obj
+[ 5%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_decode/sample_decode.c.obj
+/home/snicker/hiwatch/code/sdk/application/brandy/brandy_standard/thread_pri_init.c:234:13: warning: unused function 'force_to_sleep' [-Wunused-function]
+static void force_to_sleep(void)
+^
+1 warning generated.
+[ 5%] Building C object application/wearable/service/broadcast/CMakeFiles/broadcast.dir/src/broadcast_implement.c.obj
+/home/snicker/hiwatch/code/sdk/application/audio/sample_decode/sample_decode.c:460:54: warning: unused parameter 'adp' [-Wunused-parameter]
+static td_s32 sample_decode_adp_event_proc(td_handle adp, uapi_adp_event_type event,
+^
+/home/snicker/hiwatch/code/sdk/application/audio/sample_decode/sample_decode.c:460:79: warning: unused parameter 'event' [-Wunused-parameter]
+static td_s32 sample_decode_adp_event_proc(td_handle adp, uapi_adp_event_type event,
+^
+2 warnings generated.
+/home/snicker/hiwatch/code/sdk/application/wearable/service/broadcast/src/broadcast_implement.c:135:20: warning: unused function 'IsOuterCore' [-Wunused-function]
+inline static BOOL IsOuterCore(CoreMask mask)
+^
+1 warning generated.
+[ 5%] Built target graphic_at_service
+[ 5%] Building C object application/brandy/brandy_standard/CMakeFiles/brandy_app_standard.dir/input_app.c.obj
+[ 5%] Building C object application/wearable/service/broadcast/CMakeFiles/broadcast.dir/src/broadcast_service.c.obj
+[ 5%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_encode/sample_encode.c.obj
+[ 5%] Building CXX object application/wearable/nativeabilityfwk/CMakeFiles/nativeabilityfwk.dir/src/Ability.cpp.obj
+[ 5%] Linking C static library libbrandy_app_standard.a
+[ 5%] Linking C static library libbroadcast.a
+[ 5%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_encode/sample_cast_aenc_play.c.obj
+[ 6%] Building CXX object application/wearable/nativeabilityfwk/CMakeFiles/nativeabilityfwk.dir/src/NativeAbility.cpp.obj
+[ 6%] Built target brandy_app_standard
[ 6%] Built target broadcast
-[ 6%] Building C object application/brandy/brandy_standard/CMakeFiles/brandy_app_standard.dir/chip_init.c.obj
-[ 6%] Built target ohos_deps
-[ 6%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_ai/sample_ai.c.obj
-[ 6%] Built target ai_voice_audio_stream_wrapper
-[ 6%] Built target ai_voice_engine_hal
-[ 6%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_encode/sample_cast_aenc_play.c.obj
-[ 6%] Built target ai_voice_service
-[ 6%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_phone/sample_phone_apps.c.obj
-/home/snicker/hiwatch/code/sdk/application/brandy/brandy_standard/chip_init.c:92:17: warning: unused function 'chip_get_tempe' [-Wunused-function]
-static uint32_t chip_get_tempe(void)
-^
-1 warning generated.
-[ 6%] Building C object application/brandy/brandy_standard/CMakeFiles/brandy_app_standard.dir/thread_init.c.obj
-[ 6%] Building C object application/brandy/brandy_standard/CMakeFiles/brandy_app_standard.dir/thread_pri_init.c.obj
-Scanning dependencies of target msg_center_adapt
-Scanning dependencies of target power_manager
-[ 7%] Linking C static library ../../../../../../interim_binary/brandy/libs/audio/evb4_standard/liteos/libaudio_sample.a
-[ 7%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/display_state_machine.c.obj
-[ 7%] Building CXX object application/wearable/service/msg_center/CMakeFiles/msg_center_adapt.dir/src/vendor_app/baidu/baidu_app.cpp.obj
-[ 7%] Built target audio_sample
-/home/snicker/hiwatch/code/sdk/application/battery/service/battery_service.c:123:12: warning: implicit declaration of function 'adc_trans_sytick_to_voltage_without_auto_scan' is invalid in C99 [-Wimplicit-function-declaration]
-return adc_trans_sytick_to_voltage_without_auto_scan(stick);
+Scanning dependencies of target ai_voice_engine_hal
+[ 6%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_lpwk/sample_lpwk.c.obj
+[ 6%] Building C object application/wearable/service/smart_voice/voice_engine_hal/CMakeFiles/ai_voice_engine_hal.dir/src/voice_engine_hal.c.obj
+[ 6%] Building C object application/wstp/at_service/app/CMakeFiles/app_at_service.dir/app_at_process.c.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/src/NativeAbility.cpp:25:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/notification_manager.h:24:
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:11:38: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_DELETE = "alarm_delete";
^
-/home/snicker/hiwatch/code/sdk/application/battery/service/battery_service.c:114:17: warning: unused function 'adc_get_sample_stick' [-Wunused-function]
-static uint32_t adc_get_sample_stick(void)
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:12:37: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_CLOCK = "alarm_clock";
^
-/home/snicker/hiwatch/code/sdk/application/battery/service/battery_service.c:119:14: warning: unused function 'adc_stick_transfer_voltage' [-Wunused-function]
-static float adc_stick_transfer_voltage(uint16_t stick, adc_channel_t channel)
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:13:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_CLOSE = "alarm_close";
^
-3 warnings generated.
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:14:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_DELAY = "alarm_delay";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:15:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_POPUP = "alarm_popup";
+^
+5 warnings generated.
+[ 6%] Building CXX object application/wearable/nativeabilityfwk/CMakeFiles/nativeabilityfwk.dir/src/StartNative.cpp.obj
+[ 6%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_gui_aef/sample_gui_aef.c.obj
+[ 7%] Linking C static library libai_voice_engine_hal.a
+Scanning dependencies of target ai_voice_audio_stream_wrapper
+Scanning dependencies of target ai_voice_service
+[ 7%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_sea/sample_sea.c.obj
+[ 7%] Building CXX object application/wearable/service/smart_voice/smart_voice_service/CMakeFiles/ai_voice_audio_stream_wrapper.dir/src/audio/audio_stream.cpp.obj
+[ 7%] Building C object application/wearable/service/smart_voice/smart_voice_service/CMakeFiles/ai_voice_service.dir/src/smart_voice_service.c.obj
+[ 7%] Building CXX object application/wearable/nativeabilityfwk/CMakeFiles/nativeabilityfwk.dir/src/SliceTransition.cpp.obj
+[ 7%] Built target ai_voice_engine_hal
+[ 7%] Linking C static library libai_voice_service.a
+[ 7%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_phone/sample_phone_apps.c.obj
+[ 7%] Linking CXX static library libai_voice_audio_stream_wrapper.a
+[ 7%] Building CXX object application/wearable/nativeabilityfwk/CMakeFiles/nativeabilityfwk.dir/src/TransitionManager.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/src/SliceTransition.cpp:10:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/draw/clip_img.h:16:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:39:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/svg_data.h:86:26: warning: missing field 'gradientNum' initializer [-Wmissing-field-initializers]
+SvgInfo svgInfo_ = {0};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/svg_data.h:86:26: warning: missing field 'pathPnt' initializer [-Wmissing-field-initializers]
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/src/SliceTransition.cpp:10:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/draw/clip_img.h:16:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:199:40: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient linearGradient_ = {0};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:200:40: warning: missing field 'centerY' initializer [-Wmissing-field-initializers]
+RadialGradient radialGradient_ = {0};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:201:38: warning: missing field 'centerY' initializer [-Wmissing-field-initializers]
+SweepGradient sweepGradient_ = {0};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:209:32: warning: missing field 'version' initializer [-Wmissing-field-initializers]
+PatternInfo pattern_ = {{{0}}};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:209:33: warning: missing field 'dataSize' initializer [-Wmissing-field-initializers]
+PatternInfo pattern_ = {{{0}}};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:209:34: warning: missing field 'wrap' initializer [-Wmissing-field-initializers]
+PatternInfo pattern_ = {{{0}}};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/src/SliceTransition.cpp:106:32: warning: missing field 'version' initializer [-Wmissing-field-initializers]
+ImageInfo dstInfo = {{0}};
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/src/SliceTransition.cpp:106:33: warning: missing field 'dataSize' initializer [-Wmissing-field-initializers]
+ImageInfo dstInfo = {{0}};
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/src/SliceTransition.cpp:130:25: warning: missing field 'version' initializer [-Wmissing-field-initializers]
+ImageInfo info = {{0}};
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/src/SliceTransition.cpp:130:26: warning: missing field 'dataSize' initializer [-Wmissing-field-initializers]
+ImageInfo info = {{0}};
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/src/SliceTransition.cpp:147:25: warning: missing field 'version' initializer [-Wmissing-field-initializers]
+ImageInfo info = {{0}};
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/src/SliceTransition.cpp:147:26: warning: missing field 'dataSize' initializer [-Wmissing-field-initializers]
+ImageInfo info = {{0}};
+^
+15 warnings generated.
+[ 7%] Building CXX object application/wearable/nativeabilityfwk/CMakeFiles/nativeabilityfwk.dir/src/transition/ZoomTransition.cpp.obj
+[ 7%] Building C object application/audio/CMakeFiles/audio_sample.dir/tools/sample_dump.c.obj
+[ 7%] Building CXX object application/wearable/nativeabilityfwk/CMakeFiles/nativeabilityfwk.dir/src/transition/HexagonsTransition.cpp.obj
+[ 7%] Built target ai_voice_service
+[ 7%] Built target ai_voice_audio_stream_wrapper
+[ 7%] Building C object application/audio/CMakeFiles/audio_sample.dir/tools/sample_proc.c.obj
+[ 7%] Building C object application/wstp/at_service/app/CMakeFiles/app_at_service.dir/app_rx_process.c.obj
+[ 7%] Building C object application/audio/CMakeFiles/audio_sample.dir/tools/sample_data.c.obj
+[ 7%] Linking CXX static library libnativeabilityfwk.a
+Scanning dependencies of target ohos_startup
+Scanning dependencies of target msg_center_adapt
+Scanning dependencies of target power_manager
+[ 7%] Built target nativeabilityfwk
+[ 7%] Building C object application/wearable/ohos_startup/CMakeFiles/ohos_startup.dir/ohosfwk_startup.c.obj
+[ 8%] Building C object application/audio/CMakeFiles/audio_sample.dir/thread/athread_cmsis.c.obj
+[ 8%] Building CXX object application/wearable/service/msg_center/CMakeFiles/msg_center_adapt.dir/src/msg_center_customer.cpp.obj
+[ 8%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/display_state_machine.c.obj
+[ 8%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_audio.c.obj
+[ 8%] Linking C static library libohos_startup.a
/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/display_state_machine.c:157:72: warning: implicit declaration of function 'action_timer_get_timer_is_running' is invalid in C99 [-Wimplicit-function-declaration]
if ((event_type == TIMER_EVENT) && (action == TURN_OFF_SCREEN) && (action_timer_get_timer_is_running() == true)) {
^
1 warning generated.
-[ 7%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/power_display_service.c.obj
-[ 7%] Linking C static library libbatterry_service.a
-Scanning dependencies of target ohos_startup
-[ 7%] Building C object application/brandy/brandy_standard/CMakeFiles/brandy_app_standard.dir/input_app.c.obj
-[ 7%] Building C object application/wearable/ohos_startup/CMakeFiles/ohos_startup.dir/ohosfwk_startup.c.obj
-[ 8%] Built target batterry_service
-[ 8%] Built target alipay_soc_adapt
-[ 8%] Built target non_os
-[ 8%] Built target alipay_service
-[ 8%] Built target riscv
+[ 8%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/power_display_service.c.obj
+Scanning dependencies of target alipay_soc_adapt
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp:20:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/notification_manager.h:24:
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:11:38: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_DELETE = "alarm_delete";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:12:37: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_CLOCK = "alarm_clock";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:13:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_CLOSE = "alarm_close";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:14:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_DELAY = "alarm_delay";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:15:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_POPUP = "alarm_popup";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp:120:38: warning: missing field 'type' initializer [-Wmissing-field-initializers]
+hfp_hf_calls_info_t callData = {0};
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp:120:38: warning: missing field 'id' initializer [-Wmissing-field-initializers]
+7 warnings generated.
+[ 8%] Building C object application/wearable/alipay/driver_adapt/CMakeFiles/alipay_soc_adapt.dir/soc_adapt.c.obj
[ 8%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/filters/gui_event_filter.c.obj
-[ 8%] Built target targets
-[ 8%] Linking C static library libohos_startup.a
-[ 8%] Built target init
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/driver_adapt/soc_adapt.c:85:5: warning: implicit declaration of function 'osDelay' is invalid in C99 [-Wimplicit-function-declaration]
+osDelay(byMilliSec);
+^
+1 warning generated.
[ 8%] Built target ohos_startup
-[ 8%] Linking C static library libapp_at_service.a
-[ 8%] Linking C static library libbrandy_app_standard.a
-[ 9%] Built target base
-[ 9%] Built target app_at_service
-[ 9%] Built target brandy_app_standard
-[ 11%] Built target sec
-[ 11%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/filters/slice_event_filter.c.obj
-[ 13%] Built target posix
-[ 13%] Built target csysdeps
-[ 13%] Built target interrupt
-[ 21%] Built target m
-[ 21%] Built target driverbase
-[ 31%] Built target c
-[ 31%] Built target cmsis
-[ 31%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/filters/timer_event_filter.c.obj
-[ 31%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/actions/display_action.c.obj
-[ 31%] Built target linux
-[ 31%] Built target adc
-[ 31%] Built target x_dpal
-[ 32%] Built target osal
-[ 32%] Built target flash
-[ 33%] Built target dma
-[ 33%] Built target gpio
-[ 33%] Built target i2c
-[ 33%] Built target cpu_trace
-[ 33%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/actions/timer_action.c.obj
-[ 33%] Built target ipc_old
-[ 33%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/actions/touch_action.c.obj
-[ 33%] Built target lpc
-[ 33%] Built target memory_core
-[ 33%] Built target mem_monitor
-[ 33%] Built target mipi_tx
-/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:40:5: warning: implicit declaration of function 'display_resume_power_on' is invalid in C99 [-Wimplicit-function-declaration]
+[ 8%] Building CXX object application/wearable/service/msg_center/CMakeFiles/msg_center_adapt.dir/src/msg_center_cmd.cpp.obj
+[ 8%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_audio_utils.c.obj
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/msg_center_cmd.cpp:116:20: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+return "com.vendor.voiceassistant";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/msg_center_cmd.cpp:118:20: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+return "cn.navigate";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/msg_center_cmd.cpp:120:20: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+return "com.baidu.baiduMap";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/msg_center_cmd.cpp:125:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
+}
+^
+4 warnings generated.
+[ 8%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/filters/slice_event_filter.c.obj
+[ 8%] Building C object application/wearable/alipay/driver_adapt/CMakeFiles/alipay_soc_adapt.dir/vendor_product.c.obj
+[ 8%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/filters/timer_event_filter.c.obj
+[ 8%] Building CXX object application/wearable/service/msg_center/CMakeFiles/msg_center_adapt.dir/src/notify/alarm_notification.cpp.obj
+[ 8%] Building C object application/audio/CMakeFiles/audio_sample.dir/sample_dpm/sample_dpm.c.obj
+[ 8%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/actions/display_action.c.obj
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/driver_adapt/vendor_product.c:204:12: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned int)' [-Wimplicit-function-declaration]
+return malloc(size);
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/driver_adapt/vendor_product.c:204:12: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc'
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/driver_adapt/vendor_product.c:209:12: warning: implicitly declaring library function 'calloc' with type 'void *(unsigned int, unsigned int)' [-Wimplicit-function-declaration]
+return calloc(nblock, size);
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/driver_adapt/vendor_product.c:209:12: note: include the header <stdlib.h> or explicitly provide a declaration for 'calloc'
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/driver_adapt/vendor_product.c:214:5: warning: implicitly declaring library function 'free' with type 'void (void *)' [-Wimplicit-function-declaration]
+free(pt);
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/driver_adapt/vendor_product.c:214:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'free'
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/driver_adapt/vendor_product.c:219:12: warning: implicitly declaring library function 'realloc' with type 'void *(void *, unsigned int)' [-Wimplicit-function-declaration]
+return realloc(pt, size);
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/driver_adapt/vendor_product.c:219:12: note: include the header <stdlib.h> or explicitly provide a declaration for 'realloc'
+4 warnings generated.
+[ 8%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/actions/timer_action.c.obj
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:60:5: warning: implicit declaration of function 'display_resume_power_on' is invalid in C99 [-Wimplicit-function-declaration]
display_resume_power_on();
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:85:19: warning: implicit declaration of function 'drv_dpu_resume' is invalid in C99 [-Wimplicit-function-declaration]
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:117:19: warning: implicit declaration of function 'drv_dpu_resume' is invalid in C99 [-Wimplicit-function-declaration]
ret = drv_dpu_resume(NULL);
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:92:15: warning: implicit declaration of function 'drv_vau_resume' is invalid in C99 [-Wimplicit-function-declaration]
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:125:15: warning: implicit declaration of function 'drv_jpeg_resume' is invalid in C99 [-Wimplicit-function-declaration]
+(void)drv_jpeg_resume(NULL);
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:127:15: warning: implicit declaration of function 'drv_vau_resume' is invalid in C99 [-Wimplicit-function-declaration]
ret = drv_vau_resume(NULL);
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:98:15: warning: implicit declaration of function 'drv_gmmu_resume' is invalid in C99 [-Wimplicit-function-declaration]
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:133:15: warning: implicit declaration of function 'drv_gmmu_resume' is invalid in C99 [-Wimplicit-function-declaration]
ret = drv_gmmu_resume(NULL);
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:114:5: warning: implicit declaration of function 'NotifyScreenOn' is invalid in C99 [-Wimplicit-function-declaration]
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:149:5: warning: implicit declaration of function 'NotifyScreenOn' is invalid in C99 [-Wimplicit-function-declaration]
NotifyScreenOn(); // Instruct the uikit to start the display operation.
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:134:5: warning: implicit declaration of function 'NotifyScreenOff' is invalid in C99 [-Wimplicit-function-declaration]
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:181:5: warning: implicit declaration of function 'NotifyScreenOff' is invalid in C99 [-Wimplicit-function-declaration]
NotifyScreenOff(); // Instruct the uikit to close the display operation.
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:138:21: warning: implicit declaration of function 'drv_vau_suspend' is invalid in C99 [-Wimplicit-function-declaration]
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:190:21: warning: implicit declaration of function 'drv_vau_suspend' is invalid in C99 [-Wimplicit-function-declaration]
ext_errno ret = drv_vau_suspend(NULL);
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:144:11: warning: implicit declaration of function 'drv_dpu_suspend' is invalid in C99 [-Wimplicit-function-declaration]
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:196:11: warning: implicit declaration of function 'drv_jpeg_suspend' is invalid in C99 [-Wimplicit-function-declaration]
+(void)drv_jpeg_suspend(NULL);
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:199:11: warning: implicit declaration of function 'drv_dpu_suspend' is invalid in C99 [-Wimplicit-function-declaration]
ret = drv_dpu_suspend(NULL);
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:151:11: warning: implicit declaration of function 'drv_gmmu_suspend' is invalid in C99 [-Wimplicit-function-declaration]
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:206:11: warning: implicit declaration of function 'drv_gmmu_suspend' is invalid in C99 [-Wimplicit-function-declaration]
ret = drv_gmmu_suspend(NULL);
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:165:5: warning: implicit declaration of function 'display_suspend_power_off' is invalid in C99 [-Wimplicit-function-declaration]
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c:220:5: warning: implicit declaration of function 'display_suspend_power_off' is invalid in C99 [-Wimplicit-function-declaration]
display_suspend_power_off();
^
-10 warnings generated.
-[ 33%] Built target nand_flash
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/vendor_app/baidu/baidu_app.cpp:11:
-/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h:56:5: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
-"", /* unused */
+12 warnings generated.
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/notify/alarm_notification.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/notification_manager.h:24:
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:11:38: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_DELETE = "alarm_delete";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:12:37: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_CLOCK = "alarm_clock";
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h:57:5: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
-"com.vendor.voiceassistant", /* Command: 0x1, Type: 0x1 */
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:13:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_CLOSE = "alarm_close";
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h:58:5: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
-"com.vendor.voiceassistant", /* Command: 0x1, Type: 0x2 */
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:14:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_DELAY = "alarm_delay";
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h:59:5: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
-"com.vendor.voiceassistant", /* Command: 0x1, Type: 0x3 */
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:15:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_POPUP = "alarm_popup";
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h:60:5: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
-"com.vendor.voiceassistant", /* Command: 0x1, Type: 0x4 */
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/notify/alarm_notification.cpp:16:30: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* RING_AGAIN = "响铃将在十分钟后再次响起";
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h:61:5: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
-"", /* unused */
+6 warnings generated.
+/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/timer_action.c:50:30: warning: initializing 'power_display_svr_api_t *' (aka 'struct power_display_svr_api *') with an expression of type 'const power_display_svr_api_t *' (aka 'const struct power_display_svr_api *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
+power_display_svr_api_t *display_api = power_display_svr_get_api();
+^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1 warning generated.
+[ 8%] Linking C static library libalipay_soc_adapt.a
+[ 8%] Linking C static library ../../../../../../interim_binary/brandy/libs/audio/evb4_standard/liteos/libaudio_sample.a
+[ 8%] Building C object application/wstp/at_service/app/CMakeFiles/app_at_service.dir/app_tx_process.c.obj
+[ 8%] Building C object application/wstp/at_service/app/CMakeFiles/app_at_service.dir/app_msg_manager.c.obj
+[ 8%] Building CXX object application/wearable/service/msg_center/CMakeFiles/msg_center_adapt.dir/src/notify/makephone_notification.cpp.obj
+[ 8%] Building C object application/wearable/service/power_manager/CMakeFiles/power_manager.dir/src/actions/touch_action.c.obj
+[ 8%] Built target alipay_soc_adapt
+[ 8%] Linking C static library libpower_manager.a
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/notification_manager.h:24:
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:11:38: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_DELETE = "alarm_delete";
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h:62:5: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
-"cn.navigate", /* Command: 0x2, Type: 0x1 */
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:12:37: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_CLOCK = "alarm_clock";
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h:63:5: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
-"cn.navigate", /* Command: 0x2, Type: 0x2 */
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:13:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_CLOSE = "alarm_close";
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h:64:5: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
-"", /* unused */
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:14:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_DELAY = "alarm_delay";
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/vendor_app/baidu/baidu_app.cpp:102:43: warning: missing field 'cmd_id' initializer [-Wmissing-field-initializers]
-diag_ser_header_t send_pcm_header = {0};
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:15:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_POPUP = "alarm_popup";
^
-/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/vendor_app/baidu/baidu_app.cpp:115:36: warning: missing field 'pcm_file_path' initializer [-Wmissing-field-initializers]
-send_pcm_info_t pcm_info = { 0 };
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp:16:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/image_cache_manager.h:139:33: warning: missing field 'isLoaded' initializer [-Wmissing-field-initializers]
+ImageNode longTermList_ = {0};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/image_cache_manager.h:140:34: warning: missing field 'isLoaded' initializer [-Wmissing-field-initializers]
+ImageNode shortTermList_ = {0};
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp:17:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/../../nativeapp/nativeui/main/include/VolumeSettingView.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp:17:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/../../nativeapp/nativeui/main/include/VolumeSettingView.h:14:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/../../nativeapp/nativeui/player/include/PlayersView.h:27:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/../../nativeapp/nativeui/player/include/PlayersPresenter.h:19:
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/../../nativeapp/nativeui/bluetooth/include/BluetoothModel.h:92:34: warning: missing field 'type' initializer [-Wmissing-field-initializers]
+bd_addr_t remoteConnectAddr{0};
+^
+9 warnings generated.
+[ 8%] Built target audio_sample
+[ 8%] Building CXX object application/wearable/service/msg_center/CMakeFiles/msg_center_adapt.dir/src/notify/notification_manager_customer.cpp.obj
+Scanning dependencies of target non_os
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/notify/notification_manager_customer.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/notification_manager.h:24:
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:11:38: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_DELETE = "alarm_delete";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:12:37: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_CLOCK = "alarm_clock";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:13:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_CLOSE = "alarm_close";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:14:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_DELAY = "alarm_delay";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:15:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_POPUP = "alarm_popup";
+^
+5 warnings generated.
+Scanning dependencies of target alipay_service
+[ 8%] Building CXX object application/wearable/service/msg_center/CMakeFiles/msg_center_adapt.dir/src/vendor_app/baidu/baidu_app.cpp.obj
+[ 8%] Built target power_manager
+[ 8%] Building C object kernel/non_os/non_os/CMakeFiles/non_os.dir/non_os_utils.c.obj
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/vendor_app/baidu/baidu_app.cpp:98:37: warning: missing field 'attr_bits' initializer [-Wmissing-field-initializers]
+osMessageQueueAttr_t m_attr = {0};
^
-11 warnings generated.
-[ 33%] Built target drv_mmc
-[ 33%] Built target otp
-[ 33%] Linking CXX static library libmsg_center_adapt.a
-[ 34%] Built target pinctrl
-[ 34%] Built target pmp
-/home/snicker/hiwatch/code/sdk/application/wearable/service/power_manager/src/actions/timer_action.c:50:30: warning: initializing 'power_display_svr_api_t *' (aka 'struct power_display_svr_api *') with an expression of type 'const power_display_svr_api_t *' (aka 'const struct power_display_svr_api *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
-power_display_svr_api_t *display_api = power_display_svr_get_api();
-^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
-[ 34%] Linking C static library libpower_manager.a
-[ 34%] Built target pwm
-[ 34%] Built target psram
-[ 34%] Built target qspi
-[ 35%] Built target cipher
-[ 35%] Built target hash
-[ 35%] Built target msg_center_adapt
-[ 35%] Built target trng
-[ 35%] Built target power_manager
-[ 35%] Built target pke
-[ 35%] Built target km
-[ 35%] Built target systick
-[ 35%] Built target spi
-[ 35%] Built target tcxo
-[ 35%] Built target drv_timer
-[ 35%] Built target ulp_aon
-[ 35%] Built target uart
-[ 35%] Built target watchdog
-[ 35%] Built target calendar
-[ 35%] Built target qspi_display
-[ 35%] Built target rtc_unified
-[ 36%] Built target efuse
-[ 36%] Built target mtd_com
-[ 36%] Built target hal_adc
-[ 38%] Built target hal_cpu_core
+[ 8%] Building C object application/wearable/alipay/service/CMakeFiles/alipay_service.dir/alipay_feature.c.obj
+[ 8%] Building CXX object application/wearable/service/msg_center/CMakeFiles/msg_center_adapt.dir/src/vendor_app/alipay/alipay_app.cpp.obj
+[ 8%] Linking C static library libnon_os.a
+[ 8%] Building C object application/wstp/at_service/app/CMakeFiles/app_at_service.dir/app_test_fs.c.obj
+[ 8%] Built target riscv
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/vendor_app/alipay/alipay_app.cpp:257:29: warning: missing field 'tv_usec' initializer [-Wmissing-field-initializers]
+struct timeval tv = { 0 };
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/src/vendor_app/alipay/alipay_app.cpp:258:30: warning: missing field 'tz_dsttime' initializer [-Wmissing-field-initializers]
+struct timezone tz = { 0 };
+^
+2 warnings generated.
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_feature.c:74:9: warning: implicit declaration of function 'svr_alipay_ble_adv_start' is invalid in C99 [-Wimplicit-function-declaration]
+svr_alipay_ble_adv_start();
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_feature.c:76:9: warning: implicit declaration of function 'svr_alipay_ble_adv_stop' is invalid in C99 [-Wimplicit-function-declaration]
+svr_alipay_ble_adv_stop();
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_feature.c:204:5: warning: implicit declaration of function 'csi_enter_lpm' is invalid in C99 [-Wimplicit-function-declaration]
+csi_enter_lpm((void *)&data);
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_feature.c:211:5: warning: implicit declaration of function 'csi_exit_lpm' is invalid in C99 [-Wimplicit-function-declaration]
+csi_exit_lpm((void *)&data);
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_feature.c:561:40: warning: incompatible function pointer types passing 'errcode_t (void *)' (aka 'unsigned int (void *)') to parameter of type 'osThreadFunc_t' (aka 'void (*)(void *)') [-Wincompatible-function-pointer-types]
+g_alipay_task_handle = osThreadNew(svr_alipay_msg_thread, NULL, &g_alipay_attr);
+^~~~~~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/kernel/liteos/liteos_v207.1.0/Huawei_LiteOS/open_source/CMSIS/CMSIS/RTOS2/Include/cmsis_os2.h:371:42: note: passing argument to parameter 'func' here
+osThreadId_t osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr);
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_feature.c:607:5: warning: implicit declaration of function 'HS_IIC_Init' is invalid in C99 [-Wimplicit-function-declaration]
+HS_IIC_Init();
+^
+6 warnings generated.
+[ 8%] Linking CXX static library libmsg_center_adapt.a
+[ 8%] Building C object application/wearable/alipay/service/CMakeFiles/alipay_service.dir/alipay_bluetooth.c.obj
+[ 8%] Building C object application/wstp/at_service/app/CMakeFiles/app_at_service.dir/app_common_api.c.obj
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:128:9: warning: implicit declaration of function 'osDelay' is invalid in C99 [-Wimplicit-function-declaration]
+osDelay(50);
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:150:83: warning: unused parameter 'addr' [-Wunused-parameter]
+static void svr_alipay_ble_connstate_change_cb(unsigned short conn_id, bd_addr_t *addr, gap_ble_conn_state_t conn_state,
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:151:26: warning: unused parameter 'pair_state' [-Wunused-parameter]
+gap_ble_pair_state_t pair_state, gap_ble_disc_reason_t disc_reason)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:151:60: warning: unused parameter 'disc_reason' [-Wunused-parameter]
+gap_ble_pair_state_t pair_state, gap_ble_disc_reason_t disc_reason)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:164:49: warning: unused parameter 'adv_id' [-Wunused-parameter]
+static void svr_alipay_ble_adv_start_cb(uint8_t adv_id, adv_status_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:164:70: warning: unused parameter 'status' [-Wunused-parameter]
+static void svr_alipay_ble_adv_start_cb(uint8_t adv_id, adv_status_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:170:52: warning: unused parameter 'adv_id' [-Wunused-parameter]
+static void svr_alipay_ble_set_adv_data_cb(uint8_t adv_id, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:170:70: warning: unused parameter 'status' [-Wunused-parameter]
+static void svr_alipay_ble_set_adv_data_cb(uint8_t adv_id, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:175:48: warning: unused parameter 'adv_id' [-Wunused-parameter]
+static void svr_alipay_ble_adv_stop_cb(uint8_t adv_id, adv_status_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:175:69: warning: unused parameter 'status' [-Wunused-parameter]
+static void svr_alipay_ble_adv_stop_cb(uint8_t adv_id, adv_status_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:181:15: warning: unused parameter 'status' [-Wunused-parameter]
+errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:221:9: warning: implicit declaration of function 'bts_data_to_uuid_len2' is invalid in C99 [-Wimplicit-function-declaration]
+bts_data_to_uuid_len2(0x2902, &ccc_uuid);
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:208:53: warning: unused parameter 'status' [-Wunused-parameter]
+gatts_add_character_result_t *result, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:256:59: warning: unused parameter 'server_id' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_descriptor_add_cb(uint8_t server_id, bt_uuid_t *uuid, uint16_t srv_handle,
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:256:81: warning: unused parameter 'uuid' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_descriptor_add_cb(uint8_t server_id, bt_uuid_t *uuid, uint16_t srv_handle,
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:256:96: warning: unused parameter 'srv_handle' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_descriptor_add_cb(uint8_t server_id, bt_uuid_t *uuid, uint16_t srv_handle,
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:257:14: warning: unused parameter 'desc_handle' [-Wunused-parameter]
+uint16_t desc_handle, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:257:37: warning: unused parameter 'status' [-Wunused-parameter]
+uint16_t desc_handle, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:263:58: warning: unused parameter 'server_id' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_service_start_cb(uint8_t server_id, uint16_t srv_handle, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:263:78: warning: unused parameter 'srv_handle' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_service_start_cb(uint8_t server_id, uint16_t srv_handle, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:263:100: warning: unused parameter 'status' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_service_start_cb(uint8_t server_id, uint16_t srv_handle, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:268:57: warning: unused parameter 'server_id' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_service_stop_cb(uint8_t server_id, uint16_t srv_handle, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:268:77: warning: unused parameter 'srv_handle' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_service_stop_cb(uint8_t server_id, uint16_t srv_handle, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:268:99: warning: unused parameter 'status' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_service_stop_cb(uint8_t server_id, uint16_t srv_handle, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:273:56: warning: unused parameter 'server_id' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_service_del_cb(uint8_t server_id, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:273:77: warning: unused parameter 'status' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_service_del_cb(uint8_t server_id, errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:278:53: warning: unused parameter 'server_id' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_req_read_cb(uint8_t server_id, uint16_t conn_id, gatts_req_read_cb_t *read_cb_para,
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:278:73: warning: unused parameter 'conn_id' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_req_read_cb(uint8_t server_id, uint16_t conn_id, gatts_req_read_cb_t *read_cb_para,
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:278:103: warning: unused parameter 'read_cb_para' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_req_read_cb(uint8_t server_id, uint16_t conn_id, gatts_req_read_cb_t *read_cb_para,
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:279:15: warning: unused parameter 'status' [-Wunused-parameter]
+errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:284:54: warning: unused parameter 'server_id' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_req_write_cb(uint8_t server_id, uint16_t conn_id, gatts_req_write_cb_t *write_cb_para,
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:284:74: warning: unused parameter 'conn_id' [-Wunused-parameter]
+static void svr_alipay_bt_gatts_req_write_cb(uint8_t server_id, uint16_t conn_id, gatts_req_write_cb_t *write_cb_para,
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:285:15: warning: unused parameter 'status' [-Wunused-parameter]
+errcode_t status)
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/alipay/service/alipay_bluetooth.c:354:16: warning: implicit declaration of function 'enable_bt_stack' is invalid in C99 [-Wimplicit-function-declaration]
+bool ret = enable_bt_stack();
+^
+34 warnings generated.
+[ 8%] Built target targets
+[ 8%] Linking C static library libalipay_service.a
+[ 8%] Built target non_os
+[ 8%] Built target msg_center_adapt
+[ 8%] Built target alipay_service
+[ 9%] Built target base
+[ 9%] Built target init
+[ 10%] Built target posix
+[ 13%] Built target sec
+[ 13%] Built target csysdeps
+[ 13%] Built target interrupt
+[ 22%] Built target m
+[ 22%] Built target driverbase
+[ 22%] Built target linux
+[ 22%] Built target cmsis
+[ 22%] Built target x_dpal
+[ 22%] Built target adc
+Scanning dependencies of target osal
+[ 33%] Built target c
+[ 33%] Built target dma
+Scanning dependencies of target cpu_trace
+[ 33%] Building C object kernel/osal/CMakeFiles/osal.dir/adapt/liteos/oal_onetrack.c.obj
+[ 33%] Building C object driver/cpu_trace/CMakeFiles/cpu_trace.dir/cpu_trace.c.obj
+[ 33%] Built target gpio
+Scanning dependencies of target flash
+Scanning dependencies of target i2c
+[ 33%] Linking C static library libcpu_trace.a
+[ 33%] Linking C static library libosal.a
+[ 33%] Building C object driver/flash/CMakeFiles/flash.dir/flash.c.obj
+[ 33%] Building C object driver/i2c/CMakeFiles/i2c.dir/i2c.c.obj
+Scanning dependencies of target ipc_old
+[ 33%] Building C object driver/ipc/CMakeFiles/ipc_old.dir/ipc_old/acore/ipc_irq.c.obj
+[ 33%] Linking C static library libi2c.a
+[ 33%] Linking C static library libflash.a
+[ 33%] Built target cpu_trace
+Scanning dependencies of target lcd
+[ 33%] Building C object driver/ipc/CMakeFiles/ipc_old.dir/ipc_old/shared/ipc.c.obj
+[ 33%] Built target i2c
+[ 33%] Built target flash
+[ 33%] Building C object driver/lcd/CMakeFiles/lcd.dir/lcd_bus.c.obj
+[ 33%] Linking C static library libipc_old.a
+[ 34%] Built target osal
+Scanning dependencies of target memory_core
+[ 34%] Building C object driver/lcd/CMakeFiles/lcd.dir/lcd_qspi.c.obj
+Scanning dependencies of target lpc
+Scanning dependencies of target mipi_tx
+[ 34%] Building C object driver/lcd/CMakeFiles/lcd.dir/lcd_mipi.c.obj
+[ 34%] Building C object driver/memory_core/CMakeFiles/memory_core.dir/shared/memory_core.c.obj
+[ 34%] Built target ipc_old
+[ 34%] Building C object driver/lpc/CMakeFiles/lpc.dir/acore/lpc_core.c.obj
+[ 34%] Building C object driver/mipi/CMakeFiles/mipi_tx.dir/shared/mipi_tx.c.obj
+[ 34%] Built target mem_monitor
+[ 34%] Linking C static library libmemory_core.a
+[ 34%] Building C object driver/lpc/CMakeFiles/lpc.dir/shared/lpc.c.obj
+[ 34%] Building C object driver/lcd/CMakeFiles/lcd.dir/lcd_common.c.obj
+[ 35%] Linking C static library libmipi_tx.a
+[ 35%] Linking C static library liblpc.a
+[ 35%] Building C object driver/lcd/CMakeFiles/lcd.dir/lcd_config.c.obj
+[ 35%] Built target memory_core
+[ 35%] Building C object driver/lcd/CMakeFiles/lcd.dir/soc_lcd_api.c.obj
+[ 35%] Built target mipi_tx
+[ 35%] Linking C static library liblcd.a
+Scanning dependencies of target nand_flash
+[ 35%] Built target lpc
+Scanning dependencies of target otp
+[ 35%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_ds35x1g.c.obj
+[ 35%] Built target pinctrl
+[ 35%] Building C object driver/otp/CMakeFiles/otp.dir/otp.c.obj
+[ 35%] Built target lcd
+Scanning dependencies of target drv_mmc
+[ 35%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_tc58cyg.c.obj
+[ 35%] Built target pmp
+Scanning dependencies of target psram
+[ 35%] Building C object driver/mmc/CMakeFiles/drv_mmc.dir/core/block.c.obj
+[ 35%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_w25n01g.c.obj
+[ 35%] Linking C static library libotp.a
+[ 35%] Built target pwm
+[ 35%] Building C object driver/psram/CMakeFiles/psram.dir/psram_drv.c.obj
+Scanning dependencies of target qspi
+[ 35%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_config.c.obj
+[ 35%] Building C object driver/mmc/CMakeFiles/drv_mmc.dir/host/sdhci/brandy/mmc_sdhci.c.obj
+[ 35%] Linking C static library libpsram.a
+[ 35%] Built target otp
+[ 36%] Building C object driver/qspi/CMakeFiles/qspi.dir/qspi.c.obj
+[ 36%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/hal_nandflash.c.obj
+[ 36%] Linking C static library libqspi.a
+[ 36%] Linking C static library libdrv_mmc.a
+[ 36%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_to_os.c.obj
+[ 36%] Built target hash
+[ 36%] Built target psram
+[ 36%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash_qspi.c.obj
+[ 38%] Built target cipher
+[ 38%] Built target qspi
+[ 38%] Building C object driver/nand_flash/CMakeFiles/nand_flash.dir/nand/nandflash.c.obj
+[ 38%] Built target km
+[ 39%] Built target pke
+Scanning dependencies of target trng
+[ 39%] Linking C static library libnand_flash.a
+Scanning dependencies of target systick
+[ 39%] Built target spi
+[ 39%] Built target tcxo
+[ 40%] Built target drv_mmc
+[ 40%] Building C object driver/security/trng/CMakeFiles/trng.dir/drv_trng.c.obj
+[ 40%] Building C object driver/systick/CMakeFiles/systick.dir/systick.c.obj
+[ 40%] Built target nand_flash
+[ 40%] Built target drv_timer
+[ 40%] Linking C static library libsystick.a
+Scanning dependencies of target ulp_aon
+[ 40%] Building C object driver/ulp_aon/CMakeFiles/ulp_aon.dir/ulp_aon_control.c.obj
+[ 40%] Linking C static library libtrng.a
+[ 40%] Built target watchdog
+Scanning dependencies of target uart
+[ 40%] Linking C static library libulp_aon.a
+[ 40%] Building C object driver/uart/CMakeFiles/uart.dir/uart.c.obj
+[ 40%] Built target systick
+[ 40%] Built target trng
+Scanning dependencies of target touch
+[ 40%] Built target calendar
+[ 40%] Linking C static library libapp_at_service.a
+[ 40%] Built target ulp_aon
+[ 40%] Linking C static library libuart.a
+[ 40%] Building C object driver/touch/CMakeFiles/touch.dir/touch_screen_drv.c.obj
+Scanning dependencies of target button
+[ 40%] Built target app_at_service
+[ 40%] Built target mtd_com
+Scanning dependencies of target rtc_unified
+/home/snicker/hiwatch/code/sdk/drivers/drivers/driver/touch/touch_screen_drv.c:431:5: warning: implicit declaration of function 'uapi_gpio_disable_interrupt' is invalid in C99 [-Wimplicit-function-declaration]
+uapi_gpio_disable_interrupt(TOUCH_INT_GPIO); // close tp_int gpio interrupt
+^
+/home/snicker/hiwatch/code/sdk/drivers/drivers/driver/touch/touch_screen_drv.c:436:5: warning: implicit declaration of function 'uapi_gpio_disable_interrupt' is invalid in C99 [-Wimplicit-function-declaration]
+uapi_gpio_disable_interrupt(TOUCH_INT_GPIO); // close tp_int gpio interrupt
+^
+/home/snicker/hiwatch/code/sdk/drivers/drivers/driver/touch/touch_screen_drv.c:448:5: warning: implicit declaration of function 'uapi_gpio_enable_interrupt' is invalid in C99 [-Wimplicit-function-declaration]
+uapi_gpio_enable_interrupt(TOUCH_INT_GPIO); // open tp_int gpio interrupt
+^
+/home/snicker/hiwatch/code/sdk/drivers/drivers/driver/touch/touch_screen_drv.c:472:5: warning: implicit declaration of function 'uapi_gpio_enable_interrupt' is invalid in C99 [-Wimplicit-function-declaration]
+uapi_gpio_enable_interrupt(TOUCH_INT_GPIO); // open tp_int gpio interrupt
+^
+4 warnings generated.
+[ 40%] Built target uart
+Scanning dependencies of target qspi_display
+[ 40%] Building C object driver/touch/CMakeFiles/touch.dir/touch_screen_queue1.c.obj
+[ 40%] Building C object driver/touch/CMakeFiles/touch.dir/ztw523_touch/ztw523_ctrl.c.obj
+[ 40%] Building C object driver/rtc_unified/CMakeFiles/rtc_unified.dir/rtc.c.obj
+[ 40%] Building C object driver/qspi_display/CMakeFiles/qspi_display.dir/qspi_display.c.obj
+[ 40%] Building C object driver/button/CMakeFiles/button.dir/button.c.obj
+Scanning dependencies of target efuse
+[ 40%] Building C object driver/touch/CMakeFiles/touch.dir/ztw523_touch/ztw523_drv1.c.obj
+[ 40%] Linking C static library libbutton.a
+[ 40%] Linking C static library libqspi_display.a
+[ 40%] Building C object driver/touch/CMakeFiles/touch.dir/ztw523_touch/ztw523_touch1.c.obj
+[ 41%] Linking C static library librtc_unified.a
+[ 41%] Building C object driver/efuse/CMakeFiles/efuse.dir/efuse.c.obj
+[ 41%] Linking C static library libtouch.a
+[ 41%] Built target qspi_display
+[ 41%] Built target button
+[ 41%] Linking C static library libefuse.a
+[ 41%] Built target touch
+[ 42%] Built target hal_adc
+[ 42%] Built target rtc_unified
+[ 42%] Built target efuse
+[ 42%] Built target hal_cpu_core
+[ 42%] Built target hal_dma_v100
+Scanning dependencies of target hal_cpu_trace
+[ 42%] Building C object hal/cpu_trace/CMakeFiles/hal_cpu_trace.dir/hal_cpu_trace.c.obj
+Scanning dependencies of target hal_ipc_old
+[ 43%] Built target hal_gpio_v100
+[ 43%] Building C object hal/ipc/CMakeFiles/hal_ipc_old.dir/hal_ipc_old/hal_ipc.c.obj
+[ 43%] Built target hal_i2c
+[ 43%] Linking C static library libhal_cpu_trace.a
+Scanning dependencies of target hal_lpc
Scanning dependencies of target audio_api
-[ 38%] Built target hal_cpu_trace
+Scanning dependencies of target hal_l2ram
+[ 43%] Built target hal_cpu_trace
+[ 43%] Building C object hal/l2ram/CMakeFiles/hal_l2ram.dir/hal_l2ram_private.c.obj
+[ 43%] Building C object hal/lpc/CMakeFiles/hal_lpc.dir/hal_lpc.c.obj
+[ 43%] Linking C static library libhal_ipc_old.a
Scanning dependencies of target audio_core
-[ 38%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/adp/mpi_adp.c.obj
-[ 38%] Built target hal_gpio_v100
-[ 38%] Built target hal_i2c
-[ 38%] Built target hal_dma_v100
-Scanning dependencies of target nativelauncher
-[ 38%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/osal/liteos/audio_osal_addr.c.obj
-[ 38%] Built target hal_ipc_old
-[ 38%] Built target hal_lpc
-[ 38%] Built target hal_l2ram
-[ 38%] Built target hal_mem_monitor
-[ 38%] Linking C static library ../../../../../../../../interim_binary/brandy/libs/audio/evb4_standard/liteos/libaudio_api.a
-[ 38%] Built target hal_mipi
-[ 38%] Built target hal_otp
-[ 39%] Built target hal_pmp
-[ 39%] Built target hal_pinctrl
-[ 39%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/adp/core_adp.c.obj
-[ 39%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/common/sys_ctrl/sys_cmd.c.obj
+[ 43%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/sys/mpi_sys.c.obj
+[ 43%] Linking C static library libhal_l2ram.a
+[ 43%] Linking C static library libhal_lpc.a
+[ 43%] Built target hal_mem_monitor
+[ 43%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/osal/liteos/audio_osal_addr.c.obj
+[ 43%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/adec/mpi_adec.c.obj
+[ 43%] Built target hal_ipc_old
+[ 43%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/osal/liteos/audio_osal_debug.c.obj
+[ 43%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/adp/core_adp.c.obj
+[ 43%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/common/core_util.c.obj
+[ 43%] Built target hal_l2ram
+[ 43%] Built target hal_lpc
+Scanning dependencies of target hal_otp
+[ 43%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/adp/mpi_adp.c.obj
+[ 43%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/common/core_module.c.obj
+[ 43%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/common/share_mem/core_msg.c.obj
+Scanning dependencies of target hal_mipi
+[ 43%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/aenc/mpi_aenc.c.obj
+[ 43%] Building C object hal/otp/CMakeFiles/hal_otp.dir/brandy/hal_otp.c.obj
+[ 44%] Building C object hal/mipi/CMakeFiles/hal_mipi.dir/hal_mipi_tx.c.obj
+[ 44%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/aie/mpi_ai.c.obj
+[ 44%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/common/share_mem/core_shrb.c.obj
+[ 44%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/aie/mpi_sea.c.obj
+[ 44%] Linking C static library libhal_otp.a
+[ 44%] Built target hal_pinctrl
+[ 44%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/aie/mpi_vad.c.obj
+[ 44%] Linking C static library libhal_mipi.a
+[ 44%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/common/share_mem/core_rbuf.c.obj
+[ 44%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/aie/uapi_sea.c.obj
+[ 44%] Built target hal_pmp
+[ 44%] Built target hal_otp
+[ 44%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/common/sys_ctrl/sys_cmd.c.obj
+[ 44%] Built target hal_pwm
+[ 44%] Built target hal_mipi
+[ 44%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/anc/mpi_anc.c.obj
+Scanning dependencies of target hal_qspi
+Scanning dependencies of target hal_sectors
+Scanning dependencies of target hal_reg_config
+[ 44%] Building C object hal/sectors/CMakeFiles/hal_sectors.dir/hal_sectors.c.obj
+Scanning dependencies of target hal_reboot
+[ 44%] Building C object hal/qspi/CMakeFiles/hal_qspi.dir/hal_qspi.c.obj
+[ 44%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/common/probe/probe.c.obj
+[ 44%] Building C object hal/reg_config/CMakeFiles/hal_reg_config.dir/hal_reg_config.c.obj
Scanning dependencies of target audio_drv
-[ 39%] Built target hal_pwm
-[ 39%] Built target hal_qspi
-[ 39%] Built target hal_reboot
-[ 39%] Built target audio_api
-[ 39%] Building C object driver/audio/source/core/CMakeFiles/audio_core.dir/common/probe/probe.c.obj
-[ 39%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/adec/drv_adec.c.obj
-[ 40%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/sys/drv_sys.c.obj
-[ 40%] Built target hal_sectors
-[ 40%] Built target hal_cipher
-[ 40%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aenc/drv_aenc.c.obj
-[ 40%] Built target hal_reg_config
-[ 40%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aie/drv_sea.c.obj
-[ 40%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aoe/drv_ao.c.obj
-[ 40%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aoe/drv_track.c.obj
-[ 40%] Built target hal_hash
-[ 41%] Built target hal_km
-[ 41%] Linking C static library ../../../../../../../../interim_binary/brandy/libs/audio/evb4_standard/liteos/libaudio_core.a
-[ 41%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/arch/drv_sap_msg.c.obj
-[ 41%] Built target hal_pke
-[ 41%] Built target hal_trng
-[ 41%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/arch/drv_sap_intf.c.obj
-[ 41%] Built target hal_efuse_v100
-/home/snicker/hiwatch/code/sdk/drivers/drivers/driver/audio/source/drv/aoe/drv_ao.c:686:13: warning: comparison of integers of different signs: 'td_s32' (aka 'int') and 'unsigned int' [-Wsign-compare]
-if (ret == ERR_AO_NOT_SUPPORTED) {
-~~~ ^ ~~~~~~~~~~~~~~~~~~~~
-1 warning generated.
-[ 41%] Built target hal_spi
-[ 41%] Built target audio_core
-[ 41%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/arch/brandy/drv_hal.c.obj
-[ 41%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/dpm/drv_dpm.c.obj
-[ 41%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/common/drv_overlay_load.c.obj
-[ 41%] Built target hal_systick
-[ 41%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/common/drv_overlay_load_from_flash.c.obj
-[ 42%] Built target hal_tcxo
-[ 42%] Built target hal_uart
-[ 42%] Built target hal_timer
-/home/snicker/hiwatch/code/sdk/drivers/drivers/driver/audio/source/drv/common/drv_overlay_load_from_flash.c:212:11: warning: implicit declaration of function 'drv_msg_sys_clear_overlay_section' is invalid in C99 [-Wimplicit-function-declaration]
-ret = drv_msg_sys_clear_overlay_section(type);
-^
-1 warning generated.
-[ 42%] Built target hal_watchdog
-[ 42%] Linking C static library ../../../../../../../../interim_binary/brandy/libs/audio/evb4_standard/liteos/libaudio_drv.a
-[ 42%] Built target hal_calendar
-[ 42%] Built target hal_xip
-[ 42%] Built target hal_rtc_unified
-[ 43%] Built target chip_brandy
-[ 43%] Built target brandy_clocks
-[ 44%] Built target pmu_brandy
-[ 44%] Built target adc_port
-[ 44%] Built target cipher_port
-[ 44%] Built target liteos_port
-[ 44%] Built target pwm_port
-[ 44%] Built target gpio_port
-[ 44%] Built target hash_port
-[ 44%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmClockModel.cpp.obj
-[ 44%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/compass/src/CompassModel.cpp.obj
-[ 45%] Built target audio_drv
-[ 45%] Built target pke_port
-[ 45%] Built target km_port
-[ 45%] Built target efuse_porting
-[ 45%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/phoneservice/src/PhoneService.cpp.obj
-[ 45%] Built target trng_port
-[ 45%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/offlinevoice/src/VocassistPresenter.cpp.obj
-[ 45%] Built target uart_port
-[ 46%] Built target timer_port
-[ 46%] Built target tcxo_port
-[ 46%] Built target systick_port
-[ 46%] Built target calendar_port
-[ 46%] Built target watchdog_port
-[ 46%] Built target port_pinctrl
-[ 46%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/uisample/src/UISamplePresenter.cpp.obj
-[ 47%] Built target xip_port
-[ 47%] Built target pmp_port
-[ 47%] Built target dma_port
-[ 47%] Built target i2c_porting
-[ 47%] Built target spi_porting
-[ 47%] Built target flash_porting
-[ 48%] Built target mem_monitor_port
+[ 44%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/aoe/mpi_ao.c.obj
+[ 44%] Linking C static library libhal_sectors.a
+[ 44%] Building C object hal/reboot/CMakeFiles/hal_reboot.dir/hal_reboot.c.obj
+[ 45%] Linking C static library libhal_reg_config.a
+[ 45%] Linking C static library libhal_reboot.a
+[ 45%] Linking C static library ../../../../../../../../interim_binary/brandy/libs/audio/evb4_standard/liteos/libaudio_core.a
+[ 45%] Linking C static library libhal_qspi.a
+[ 45%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/aoe/mpi_track.c.obj
+[ 45%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/sys/drv_sys.c.obj
+[ 45%] Built target hal_sectors
+[ 46%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/dpm/mpi_dpm.c.obj
+[ 46%] Built target hal_qspi
+[ 46%] Built target hal_reboot
+[ 46%] Built target audio_core
+[ 46%] Built target hal_reg_config
+[ 47%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/sys/drv_msg_sys.c.obj
+[ 47%] Building C object driver/audio/source/api/CMakeFiles/audio_api.dir/dump/mpi_dump.c.obj
+[ 47%] Built target hal_cipher
+[ 48%] Built target hal_trng
+[ 48%] Built target hal_hash
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/sys/drv_proc_sys.c.obj
+[ 48%] Built target hal_km
+[ 48%] Linking C static library ../../../../../../../../interim_binary/brandy/libs/audio/evb4_standard/liteos/libaudio_api.a
+Scanning dependencies of target hal_efuse_v100
+[ 48%] Built target hal_pke
+[ 48%] Building C object hal/security/efuse/CMakeFiles/hal_efuse_v100.dir/hal_efuse.c.obj
+Scanning dependencies of target hal_systick
+[ 48%] Built target hal_spi
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/ab/drv_ab.c.obj
+[ 48%] Built target hal_tcxo
+[ 48%] Building C object hal/systick/CMakeFiles/hal_systick.dir/v150/hal_systick_v150.c.obj
+[ 48%] Built target hal_timer
+[ 48%] Building C object hal/security/efuse/CMakeFiles/hal_efuse_v100.dir/v100/hal_efuse_v100.c.obj
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/ab/drv_msg_ab.c.obj
+[ 48%] Building C object hal/systick/CMakeFiles/hal_systick.dir/v150/hal_systick_v150_regs_op.c.obj
+[ 48%] Built target hal_watchdog
+[ 48%] Built target audio_api
+Scanning dependencies of target hal_xip
+Scanning dependencies of target hal_uart
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/ab/drv_proc_ab.c.obj
+[ 48%] Building C object hal/security/efuse/CMakeFiles/hal_efuse_v100.dir/v100/hal_efuse_v100_reg_op.c.obj
+[ 48%] Building C object hal/uart/CMakeFiles/hal_uart.dir/hal_uart.c.obj
+[ 48%] Linking C static library libhal_systick.a
+[ 48%] Building C object hal/xip/CMakeFiles/hal_xip.dir/hal_xip.c.obj
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/adec/drv_adec.c.obj
+Scanning dependencies of target hal_rtc_unified
+[ 48%] Linking C static library libhal_efuse_v100.a
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/xip/hal_xip.c:24:13: warning: unused function 'hal_xip_auto' [-Wunused-function]
+static void hal_xip_auto(bool en)
+^
+1 warning generated.
+[ 48%] Built target hal_calendar
+[ 48%] Building C object hal/uart/CMakeFiles/hal_uart.dir/v120/hal_uart_v120.c.obj
+[ 48%] Building C object hal/xip/CMakeFiles/hal_xip.dir/hal_xip_v150_regs_op.c.obj
+[ 48%] Building C object hal/rtc_unified/CMakeFiles/hal_rtc_unified.dir/hal_rtc.c.obj
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/adec/drv_msg_adec.c.obj
+[ 48%] Building C object hal/uart/CMakeFiles/hal_uart.dir/v120/hal_uart_v120_regs_op.c.obj
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/rtc_unified/hal_rtc.c:13:11: warning: incompatible pointer to integer conversion initializing 'uintptr_t' (aka 'unsigned int') with an expression of type 'void *' [-Wint-conversion]
+uintptr_t g_rtc_comm_regs = NULL;
+^ ~~~~
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/rtc_unified/hal_rtc.c:14:45: warning: incompatible pointer to integer conversion initializing 'uintptr_t' (aka 'unsigned int') with an expression of type 'void *' [-Wint-conversion]
+uintptr_t g_rtc_regs[CONFIG_RTC_MAX_NUM] = {NULL};
+^~~~
+/home/snicker/hiwatch/code/sdk/kernel/liteos/liteos_v207.1.0/Huawei_LiteOS/open_source/musl/include/stddef.h:9:14: note: expanded from macro 'NULL'
+#define NULL ((void*)0)
+^~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/drivers/drivers/hal/rtc_unified/hal_rtc.c:31:23: warning: incompatible pointer to integer conversion assigning to 'uintptr_t' (aka 'unsigned int') from 'void *' [-Wint-conversion]
+g_rtc_regs[index] = NULL;
+^ ~~~~
+3 warnings generated.
+[ 48%] Building C object hal/rtc_unified/CMakeFiles/hal_rtc_unified.dir/v100/hal_rtc_v100.c.obj
+[ 48%] Built target hal_systick
+[ 48%] Linking C static library libhal_xip.a
+[ 48%] Built target hal_efuse_v100
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/adec/drv_proc_adec.c.obj
+[ 48%] Linking C static library libhal_uart.a
+[ 48%] Linking C static library libhal_rtc_unified.a
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aenc/drv_aenc.c.obj
+Scanning dependencies of target brandy_clocks
+Scanning dependencies of target chip_brandy
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aenc/drv_msg_aenc.c.obj
+[ 48%] Built target hal_xip
+[ 48%] Built target hal_uart
+[ 48%] Built target hal_rtc_unified
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aenc/drv_proc_aenc.c.obj
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/drivers/acore/clocks_config_priv.c.obj
+Scanning dependencies of target gpio_port
+Scanning dependencies of target pmu_brandy
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/arch/riscv/riscv70/interrupt.c.obj
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/adp/drv_adp.c.obj
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/drivers/acore/clocks.c.obj
+Scanning dependencies of target adc_port
+[ 48%] Building C object drivers/chips/brandy/porting/gpio/CMakeFiles/gpio_port.dir/gpio_porting.c.obj
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/acore/pmu_cmu.c.obj
+[ 48%] Building C object drivers/chips/brandy/porting/adc/CMakeFiles/adc_port.dir/adc_porting.c.obj
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_app.c.obj
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/adp/drv_msg_adp.c.obj
+[ 48%] Linking C static library libgpio_port.a
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/arch/riscv/riscv70/interrupt_handler.c.obj
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_app_priv.c.obj
+Scanning dependencies of target liteos_port
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/acore/pmu_interrupt.c.obj
+[ 48%] Linking C static library libadc_port.a
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/adp/drv_proc_adp.c.obj
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/interrupt/vectors.c.obj
+[ 48%] Building C object drivers/chips/brandy/porting/liteos/CMakeFiles/liteos_port.dir/riscv70/idle_config.c.obj
+[ 48%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aie/drv_ai.c.obj
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/acore/pmu_ldo.c.obj
+[ 48%] Building C object drivers/chips/brandy/porting/liteos/CMakeFiles/liteos_port.dir/riscv70/tick_timer.c.obj
+[ 48%] Built target gpio_port
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_glb.c.obj
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/config/pmp_config.c.obj
+[ 48%] Built target adc_port
+[ 50%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/hal/hal_pmu_cmu.c.obj
+[ 48%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/drivers/shared/pmu.c.obj
+[ 51%] Linking C static library libliteos_port.a
+[ 51%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aie/drv_msg_ai.c.obj
+Scanning dependencies of target pwm_port
+[ 51%] Building C object drivers/chips/brandy/CMakeFiles/chip_brandy.dir/arch/riscv/riscv70/oam_trace.c.obj
+[ 51%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks_sdio.c.obj
+[ 51%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/hal/hal_pmu_interrupt.c.obj
+[ 51%] Building C object drivers/chips/brandy/porting/pwm/CMakeFiles/pwm_port.dir/pwm_porting.c.obj
+[ 52%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_clocks.c.obj
+[ 52%] Linking C static library libchip_brandy.a
+[ 52%] Building C object drivers/chips/brandy/CMakeFiles/pmu_brandy.dir/pmu/hal/hal_pmu_peripheral_app.c.obj
+[ 52%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks/hal/hal_cpu_clocks.c.obj
+[ 52%] Built target liteos_port
+[ 52%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aie/drv_msg_sea.c.obj
+[ 52%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/acore/clocks_core.c.obj
+[ 52%] Linking C static library libpmu_brandy.a
+[ 52%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aie/drv_proc_ai.c.obj
+[ 52%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aie/drv_proc_sea.c.obj
+[ 52%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/acore/clocks_switch_priv.c.obj
+[ 52%] Built target cipher_port
+[ 52%] Linking C static library libpwm_port.a
+[ 52%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/acore/clocks_switch.c.obj
+[ 52%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/shared/clock_calibration.c.obj
+[ 52%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aie/drv_sea.c.obj
+[ 52%] Built target chip_brandy
+[ 52%] Building C object drivers/chips/brandy/CMakeFiles/brandy_clocks.dir/clocks_core/drivers/shared/clocks_core_common.c.obj
+[ 52%] Built target pwm_port
+[ 52%] Built target hash_port
+[ 52%] Linking C static library libbrandy_clocks.a
+[ 52%] Built target pmu_brandy
+[ 53%] Built target km_port
+Scanning dependencies of target efuse_porting
+[ 53%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aie/drv_vad.c.obj
+[ 53%] Building C object drivers/chips/brandy/porting/security/efuse/CMakeFiles/efuse_porting.dir/efuse_porting.c.obj
+Scanning dependencies of target uart_port
+[ 54%] Built target trng_port
+[ 54%] Built target pke_port
+[ 54%] Built target timer_port
+[ 54%] Built target brandy_clocks
+[ 54%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/anc/drv_anc.c.obj
+[ 54%] Linking C static library libefuse_porting.a
+[ 54%] Building C object drivers/chips/brandy/porting/uart/CMakeFiles/uart_port.dir/uart_porting.c.obj
+Scanning dependencies of target systick_port
+[ 54%] Building C object drivers/chips/brandy/porting/systick/CMakeFiles/systick_port.dir/systick_porting.c.obj
+[ 54%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aoe/drv_ao.c.obj
+[ 54%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/anc/drv_msg_anc.c.obj
+Scanning dependencies of target calendar_port
+[ 54%] Linking C static library libuart_port.a
+[ 54%] Built target tcxo_port
+[ 54%] Built target efuse_porting
+[ 54%] Building C object drivers/chips/brandy/porting/calendar/CMakeFiles/calendar_port.dir/calendar_porting.c.obj
+[ 54%] Linking C static library libsystick_port.a
+[ 54%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aoe/drv_msg_ao.c.obj
+[ 54%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aoe/drv_proc_ao.c.obj
+Scanning dependencies of target watchdog_port
+[ 55%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aoe/drv_track.c.obj
+[ 55%] Building C object drivers/chips/brandy/porting/watchdog/CMakeFiles/watchdog_port.dir/watchdog_porting.c.obj
+[ 55%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/aoe/drv_msg_track.c.obj
+[ 55%] Linking C static library libcalendar_port.a
+[ 55%] Built target port_pinctrl
+[ 55%] Built target uart_port
+[ 55%] Built target systick_port
+[ 55%] Linking C static library libwatchdog_port.a
+[ 55%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/arch/drv_sap_intf.c.obj
+Scanning dependencies of target xip_port
+[ 55%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/arch/drv_sap_msg.c.obj
+[ 55%] Building C object drivers/chips/brandy/porting/xip/CMakeFiles/xip_port.dir/xip_porting.c.obj
+[ 55%] Built target pmp_port
+[ 55%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/arch/brandy/drv_hal.c.obj
+[ 55%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/common/drv_overlay_load.c.obj
+Scanning dependencies of target i2c_porting
+[ 55%] Built target calendar_port
+[ 56%] Linking C static library libxip_port.a
+[ 56%] Built target watchdog_port
+[ 56%] Building C object drivers/chips/brandy/porting/i2c/CMakeFiles/i2c_porting.dir/i2c_porting.c.obj
+[ 56%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/dpm/drv_dpm.c.obj
+Scanning dependencies of target dma_port
+[ 56%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/common/proc/drv_audio_proc.c.obj
+Scanning dependencies of target flash_porting
+Scanning dependencies of target spi_porting
+[ 56%] Linking C static library libi2c_porting.a
+[ 56%] Building C object drivers/chips/brandy/porting/flash/CMakeFiles/flash_porting.dir/flash_porting.c.obj
+[ 56%] Building C object drivers/chips/brandy/porting/spi/CMakeFiles/spi_porting.dir/spi_porting.c.obj
+[ 56%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/dpm/drv_msg_dpm.c.obj
+[ 56%] Building C object drivers/chips/brandy/porting/dma/CMakeFiles/dma_port.dir/dma_porting.c.obj
+[ 56%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/dpm/drv_proc_dpm.c.obj
+/home/snicker/hiwatch/code/sdk/drivers/chips/brandy/porting/spi/spi_porting.c:468:47: warning: unused parameter 'clk_in_mhz' [-Wunused-parameter]
+bool hal_opi_set_freq(spi_bus_t bus, uint32_t clk_in_mhz)
+^
+1 warning generated.
+[ 56%] Linking C static library libdma_port.a
+[ 56%] Linking C static library libflash_porting.a
+[ 56%] Built target xip_port
+[ 56%] Linking C static library libspi_porting.a
+[ 56%] Built target i2c_porting
+[ 56%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/vendor/drv_audio_vendor.c.obj
+[ 56%] Building C object driver/audio/source/drv/CMakeFiles/audio_drv.dir/common/drv_overlay_load_from_flash.c.obj
+Scanning dependencies of target rtc_unified_port
+[ 56%] Built target mem_monitor_port
+[ 56%] Built target flash_porting
+[ 56%] Built target dma_port
+[ 56%] Building C object drivers/chips/brandy/porting/rtc_unified/CMakeFiles/rtc_unified_port.dir/rtc_porting.c.obj
+[ 56%] Linking C static library ../../../../../../../../interim_binary/brandy/libs/audio/evb4_standard/liteos/libaudio_drv.a
+[ 56%] Built target spi_porting
Scanning dependencies of target button_port
-[ 48%] Built target rtc_unified_port
-[ 48%] Building C object drivers/chips/brandy/porting/button/CMakeFiles/button_port.dir/button_porting.c.obj
-Scanning dependencies of target acc_sensor
-[ 48%] Building C object drivers/peripheral/acc/CMakeFiles/acc_sensor.dir/service/acc_service.c.obj
-[ 50%] Built target lcd
-[ 50%] Built target button
-/home/snicker/hiwatch/code/sdk/drivers/chips/brandy/porting/button/button_porting.c:95:5: warning: implicit declaration of function 'uapi_tcxo_delay_ms' is invalid in C99 [-Wimplicit-function-declaration]
-uapi_tcxo_delay_ms(cali_ms);
+[ 56%] Linking C static library librtc_unified_port.a
+[ 56%] Building C object drivers/chips/brandy/porting/button/CMakeFiles/button_port.dir/button_porting.c.obj
+Scanning dependencies of target dfx_exception
+[ 56%] Built target rtc_unified_port
+[ 56%] Built target audio_drv
+[ 56%] Building C object middleware/chips/brandy/exception/CMakeFiles/dfx_exception.dir/exception_riscv.c.obj
+[ 56%] Built target partition_brandy
+[ 56%] Linking C static library libbutton_port.a
+[ 56%] Linking C static library libdfx_exception.a
+Scanning dependencies of target update_common_brandy
+Scanning dependencies of target update_storage_brandy
+[ 56%] Built target dfx_exception
+[ 56%] Building C object middleware/chips/brandy/update/common/CMakeFiles/update_common_brandy.dir/upg_common_porting.c.obj
+Scanning dependencies of target pm_service
+[ 56%] Building C object middleware/chips/brandy/update/storage/CMakeFiles/update_storage_brandy.dir/upg_backup.c.obj
+Scanning dependencies of target pm_brandy
+[ 56%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_dev.c.obj
+[ 56%] Linking C static library libupdate_storage_brandy.a
+Scanning dependencies of target dfx_port_brandy
+[ 56%] Built target button_port
+[ 56%] Linking C static library libupdate_common_brandy.a
+[ 56%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_clocks.c.obj
+Scanning dependencies of target nv_brandy
+[ 56%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_fsm.c.obj
+[ 56%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_config.c.obj
+[ 56%] Building C object middleware/chips/brandy/dfx/CMakeFiles/dfx_port_brandy.dir/dfx_channel.c.obj
+[ 56%] Building C object middleware/chips/brandy/nv/nv_porting/CMakeFiles/nv_brandy.dir/nv_flash.c.obj
+[ 56%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_sleep.c.obj
+[ 56%] Built target update_storage_brandy
+[ 56%] Built target update_common_brandy
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:96:52: warning: unused parameter 'fd' [-Wunused-parameter]
+static errcode_t diag_channel_bt_gatt_output(void *fd, dfx_data_type_t data_type, uint8_t *data[], uint16_t len[],
^
-/home/snicker/hiwatch/code/sdk/drivers/chips/brandy/porting/button/button_porting.c:265:9: warning: implicit declaration of function 'uapi_tcxo_delay_us' is invalid in C99 [-Wimplicit-function-declaration]
-uapi_tcxo_delay_us(ULP_INT_CLEAR_DELAY);
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:96:72: warning: unused parameter 'data_type' [-Wunused-parameter]
+static errcode_t diag_channel_bt_gatt_output(void *fd, dfx_data_type_t data_type, uint8_t *data[], uint16_t len[],
^
-/home/snicker/hiwatch/code/sdk/drivers/chips/brandy/porting/button/button_porting.c:269:9: warning: implicit declaration of function 'uapi_tcxo_delay_us' is invalid in C99 [-Wimplicit-function-declaration]
-uapi_tcxo_delay_us(ULP_INT_CLEAR_DELAY);
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:97:13: warning: unused parameter 'cnt' [-Wunused-parameter]
+uint8_t cnt)
^
-/home/snicker/hiwatch/code/sdk/drivers/chips/brandy/porting/button/button_porting.c:273:9: warning: implicit declaration of function 'uapi_tcxo_delay_us' is invalid in C99 [-Wimplicit-function-declaration]
-uapi_tcxo_delay_us(ULP_INT_CLEAR_DELAY);
+/home/snicker/hiwatch/code/sdk/middleware/chips/brandy/dfx/dfx_channel.c:116:15: warning: unused parameter 'status' [-Wunused-parameter]
+errcode_t status)
^
4 warnings generated.
-[ 50%] Linking C static library libbutton_port.a
-[ 50%] Built target ppg_sensor
-Scanning dependencies of target mag_sensor
-[ 50%] Building C object drivers/peripheral/mag/CMakeFiles/mag_sensor.dir/service/mag_service.c.obj
-Scanning dependencies of target touch
-[ 50%] Built target button_port
-[ 50%] Building C object drivers/peripheral/touch/CMakeFiles/touch.dir/touch_screen_drv.c.obj
-[ 50%] Built target vibrator
-[ 50%] Linking C static library libacc_sensor.a
-[ 50%] Built target custom_utils
-[ 50%] Linking C static library libmag_sensor.a
-[ 50%] Built target rotary_encoder
-[ 50%] Built target acc_sensor
-[ 50%] Built target dfx_exception
-[ 50%] Built target mag_sensor
-[ 50%] Building C object drivers/peripheral/touch/CMakeFiles/touch.dir/touch_screen_queue1.c.obj
-[ 50%] Building C object drivers/peripheral/touch/CMakeFiles/touch.dir/ft6x46_touch/ft6x46_ctrl.c.obj
-[ 51%] Built target dfx_port_brandy
-Scanning dependencies of target pm_brandy
-[ 51%] Built target pm_service
-[ 51%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_lp_stub.c.obj
-[ 51%] Built target partition_brandy
-[ 51%] Built target update_common_brandy
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/uisample/src/UISamplePresenter.cpp:8:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/uisample/include/UISampleView.h:19:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/include/ChangeSliceListener.h:22:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/include/NativeAbility.h:19:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/include/Ability.h:27:
-/home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/include/SliceTransition.h:34:30: warning: missing field 'transition' initializer [-Wmissing-field-initializers]
-TransitionInfo info_ = {0};
-^
-1 warning generated.
-[ 51%] Built target update_storage_brandy
-[ 51%] Building C object drivers/peripheral/touch/CMakeFiles/touch.dir/ft6x46_touch/ft6x46_drv1.c.obj
-[ 51%] Built target nv_brandy
-[ 51%] Building C object drivers/peripheral/touch/CMakeFiles/touch.dir/ft6x46_touch/ft6x46_touch1.c.obj
-[ 51%] Built target media_common
-[ 51%] Built target audio_manager
-[ 51%] Building C object services/gpu/CMakeFiles/gpu.dir/api/dpu/soc_dpu_api.c.obj
-[ 51%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/soc_vau_api.c.obj
-[ 51%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/draw/vau_draw.c.obj
-[ 51%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/draw/vau_utility.c.obj
-[ 51%] Linking C static library libpm_brandy.a
-[ 51%] Built target audio_service
-[ 51%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/math/vau_math.c.obj
-[ 51%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/matrix/vau_matrix.c.obj
-/home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneService.cpp:634:38: warning: missing field 'type' initializer [-Wmissing-field-initializers]
-hfp_hf_calls_info_t call = {0};
-^
-/home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneService.cpp:634:38: warning: missing field 'id' initializer [-Wmissing-field-initializers]
-/home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneService.cpp:662:38: warning: missing field 'type' initializer [-Wmissing-field-initializers]
-hfp_hf_calls_info_t call = {0};
-^
-/home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneService.cpp:662:38: warning: missing field 'id' initializer [-Wmissing-field-initializers]
+[ 56%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_control.c.obj
+[ 56%] Building C object middleware/chips/brandy/dfx/CMakeFiles/dfx_port_brandy.dir/dfx_system_init.c.obj
+[ 56%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_sys.c.obj
+[ 56%] Linking C static library libnv_brandy.a
+[ 57%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_core.c.obj
+[ 57%] Building C object middleware/chips/brandy/dfx/CMakeFiles/dfx_port_brandy.dir/last_dump_adapt.c.obj
+Scanning dependencies of target media_common
+[ 57%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_tickless.c.obj
+[ 57%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_lp_stub.c.obj
+[ 57%] Built target nv_brandy
+[ 58%] Building CXX object services/media/foundation/utils/CMakeFiles/media_common.dir/src/format.cpp.obj
+[ 58%] Building C object middleware/chips/brandy/dfx/CMakeFiles/dfx_port_brandy.dir/sample_data_adapt.c.obj
+[ 58%] Building C object middleware/chips/brandy/pm/service/CMakeFiles/pm_service.dir/pm_veto.c.obj
+[ 58%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_lpc.c.obj
+[ 58%] Building C object middleware/chips/brandy/dfx/CMakeFiles/dfx_port_brandy.dir/zdiag_adapt_sdt.c.obj
+[ 58%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_os.c.obj
+Scanning dependencies of target audio_manager
+[ 58%] Building CXX object services/media/foundation/utils/CMakeFiles/media_common.dir/src/media_log.cpp.obj
+[ 58%] Linking C static library libpm_service.a
+[ 58%] Linking C static library libdfx_port_brandy.a
+[ 58%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm_adapt/pm_pmu.c.obj
+[ 58%] Linking CXX static library ../../../../lib/media/evb_standard/libmedia_common.a
+[ 58%] Building C object middleware/chips/brandy/pm/CMakeFiles/pm_brandy.dir/pm.c.obj
+[ 58%] Building CXX object services/media/foundation/manager/f/audiomanager/CMakeFiles/audio_manager.dir/cpp/audio_callback_dispatcher.cpp.obj
+[ 58%] Linking C static library libpm_brandy.a
+[ 58%] Built target dfx_port_brandy
+[ 58%] Built target pm_service
+[ 58%] Building CXX object services/media/foundation/manager/f/audiomanager/CMakeFiles/audio_manager.dir/cpp/audio_manager.cpp.obj
+[ 58%] Built target pm_brandy
+Scanning dependencies of target audio_utils
+[ 58%] Building CXX object services/media/foundation/manager/f/audiomanager/CMakeFiles/audio_manager.dir/cpp/audio_manager_impl.cpp.obj
+[ 58%] Built target media_common
+[ 58%] Building C object services/media/foundation/manager/f/audioutils/CMakeFiles/audio_utils.dir/src/audio_utils.c.obj
+Scanning dependencies of target audio_stream
+Scanning dependencies of target audio_service
+[ 58%] Building CXX object services/media/foundation/manager/f/audiostream/CMakeFiles/audio_stream.dir/src/cpp/audio_stream_in.cpp.obj
+[ 58%] Linking C static library ../../../../../../lib/media/evb_standard/libaudio_utils.a
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/audio_service.c.obj
+[ 58%] Linking CXX static library ../../../../../../lib/media/evb_standard/libaudio_manager.a
+[ 58%] Building CXX object services/media/foundation/manager/f/audiostream/CMakeFiles/audio_stream.dir/src/cpp/audio_stream_out.cpp.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audiostream/src/cpp/audio_stream_out.cpp:63:80: warning: unused parameter 'renderConfig' [-Wunused-parameter]
+int32_t AudioStreamOut::SetOutputDevice(int32_t deviceId, AudioRendererConfig &renderConfig) const
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audiostream/src/cpp/audio_stream_out.cpp:135:58: warning: unused parameter 'renderConfig' [-Wunused-parameter]
+AudioRendererConfig &renderConfig) const
+^
+2 warnings generated.
+[ 58%] Linking CXX static library ../../../../../../lib/media/evb_standard/libaudio_stream.a
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/devicemanager/src/device_config.c.obj
+Scanning dependencies of target js_player
+[ 58%] Built target audio_manager
+[ 58%] Built target audio_utils
+[ 58%] Building CXX object services/media/foundation/player/i/CMakeFiles/js_player.dir/src/audio_player.cpp.obj
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/devicemanager/src/device_hal.c.obj
+[ 58%] Built target audio_stream
+[ 58%] Building CXX object services/media/foundation/player/i/CMakeFiles/js_player.dir/src/audio_module.cpp.obj
+Scanning dependencies of target js_audio_captuer
+Scanning dependencies of target audio_capture
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/devicemanager/src/device_manager.c.obj
+[ 58%] Building CXX object services/media/foundation/capturer/f/CMakeFiles/audio_capture.dir/audio_capturer.cpp.obj
+[ 58%] Linking CXX static library ../../../../../../../../../interim_binary/brandy/libs/media/evb_standard/libjs_player.a
+[ 58%] Building CXX object services/media/foundation/capturer/js_buildin/CMakeFiles/js_audio_captuer.dir/recording_module.cpp.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/devicemanager/src/device_manager.c:339:67: warning: unused parameter 'streamType' [-Wunused-parameter]
+int32_t DeviceMgrDestroyStreamIn(uint32_t device, AudioStreamType streamType, Handle inputStreamHandle)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/devicemanager/src/device_manager.c:360:68: warning: unused parameter 'streamType' [-Wunused-parameter]
+int32_t DeviceMgrDestroyStreamOut(uint32_t device, AudioStreamType streamType, Handle outputStreamHandle)
+^
+2 warnings generated.
+[ 58%] Building CXX object services/media/foundation/capturer/f/CMakeFiles/audio_capture.dir/audio_capturer_impl.cpp.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audio_capturer/interfaces/kits/audio_captuer_lite/recording_module.cpp:234:16: warning: unused function 'HandleAudioCaptureCmd' [-Wunused-function]
+static int32_t HandleAudioCaptureCmd(int32_t argc, const char **argv)
+^
+1 warning generated.
+[ 58%] Built target js_player
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/policymanager/src/devices_manager.c.obj
+[ 58%] Linking CXX static library ../../../../../../../../../interim_binary/brandy/libs/media/evb_standard/libjs_audio_captuer.a
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audio_capturer/frameworks/audio_capturer_impl.cpp:85:95: warning: unused parameter 'base' [-Wunused-parameter]
+bool AudioCapturer::AudioCapturerImpl::GetTimestamp(Timestamp ×tamp, Timestamp::Timebase base)
+^
+1 warning generated.
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/policymanager/src/interrupt_manager.c.obj
+[ 58%] Building CXX object services/media/foundation/capturer/f/CMakeFiles/audio_capture.dir/audio_source/audio_stream_source/audio_source.cpp.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/interrupt_manager.c:991:32: warning: passing 'const InterruptElement *' to parameter of type 'InterruptElement *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
+if (InterruptCheckIsReject(interruptEl, true, &isDelay)) {
+^~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/interrupt_manager.c:401:54: note: passing argument to parameter 'newInterruptEl' here
+static bool InterruptCheckIsReject(InterruptElement *newInterruptEl, bool isOutput, bool *isDelay)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/interrupt_manager.c:1047:32: warning: passing 'const InterruptElement *' to parameter of type 'InterruptElement *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
+if (InterruptCheckIsReject(interruptEl, false, &isDelay)) {
+^~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/interrupt_manager.c:401:54: note: passing argument to parameter 'newInterruptEl' here
+static bool InterruptCheckIsReject(InterruptElement *newInterruptEl, bool isOutput, bool *isDelay)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/interrupt_manager.c:1082:32: warning: passing 'const InterruptElement *' to parameter of type 'InterruptElement *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
+if (InterruptCheckIsReject(interruptEl, false, &isInPutDelay) ||
+^~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/interrupt_manager.c:401:54: note: passing argument to parameter 'newInterruptEl' here
+static bool InterruptCheckIsReject(InterruptElement *newInterruptEl, bool isOutput, bool *isDelay)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/interrupt_manager.c:1083:32: warning: passing 'const InterruptElement *' to parameter of type 'InterruptElement *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
+InterruptCheckIsReject(interruptEl, true, &isOutPutDelay)) {
+^~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/interrupt_manager.c:401:54: note: passing argument to parameter 'newInterruptEl' here
+static bool InterruptCheckIsReject(InterruptElement *newInterruptEl, bool isOutput, bool *isDelay)
+^
4 warnings generated.
-[ 51%] Built target audio_stream
-[ 51%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/compress/vau_compress.c.obj
-[ 51%] Built target audio_utils
-[ 52%] Built target pm_brandy
-[ 52%] Built target js_player
-[ 52%] Building C object services/gpu/CMakeFiles/gpu.dir/api/gmmu/src/soc_gmmu_api.c.obj
-[ 52%] Built target audio_capture
-[ 52%] Built target player
-[ 52%] Built target js_audio_captuer
-[ 52%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_api.c.obj
-[ 52%] Built target media_hal_common
-[ 52%] Built target audio_hw
-[ 52%] Linking C static library libtouch.a
-[ 52%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_config.c.obj
-[ 52%] Built target media_sample_wrapper
-[ 52%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_context.c.obj
-[ 52%] Built target audio_primary_port
-[ 52%] Built target audio_bluetooth_port
-[ 52%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_display.c.obj
-[ 52%] Built target audio_modem_port
-[ 53%] Built target audio_port_common
-[ 53%] Built target touch
-[ 53%] Built target format_hw
-[ 53%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_egl.c.obj
-[ 53%] Built target plugin_demuxer_raw
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistPresenter.cpp:8:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistPresenter.h:12:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/include/NativeAbility.h:19:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/include/Ability.h:27:
-/home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/include/SliceTransition.h:34:30: warning: missing field 'transition' initializer [-Wmissing-field-initializers]
-TransitionInfo info_ = {0};
+Scanning dependencies of target media_hal_common
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/policymanager/src/policy_config.c.obj
+[ 58%] Building C object services/media/hal/common/CMakeFiles/media_hal_common.dir/src/media_hal_common.c.obj
+[ 58%] Built target js_audio_captuer
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audio_capturer/frameworks/audio_source/audio_stream_source/audio_source.cpp:125:46: warning: unused parameter 'deviceId' [-Wunused-parameter]
+int32_t AudioSource::SetInputDevice(uint32_t deviceId)
^
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistPresenter.cpp:8:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistPresenter.h:13:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistView.h:16:
-/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/graphic/ui/interfaces/kits/dfx/event_injector.h:195:23: warning: field 'rotateEventInjector_' will be initialized after field 'keyEventInjector_' [-Wreorder-ctor]
-rotateEventInjector_(nullptr),
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audio_capturer/frameworks/audio_source/audio_stream_source/audio_source.cpp:164:56: warning: unused parameter 'isBlockingRead' [-Wunused-parameter]
+int32_t AudioSource::ReadFrame(AudioFrame &frame, bool isBlockingRead)
^
2 warnings generated.
-[ 53%] Built target codec_plugin_vdec
-[ 53%] Built target codec_hw
-[ 53%] Built target camera_codec_hw
-[ 53%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_mutex.c.obj
-[ 54%] Built target hdi_camera_intf
-[ 54%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_surface.c.obj
-[ 54%] Built target display_layer
-[ 55%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_context.c.obj
-[ 55%] Built target graphic_utils
-[ 55%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/openvg_api.c.obj
-[ 55%] Built target display_gralloc
-Scanning dependencies of target graphic_input
-[ 55%] Built target graphic_service
-[ 55%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_draw.c.obj
-[ 55%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_image.c.obj
-[ 55%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_math.c.obj
-[ 55%] Built target algorithm
-[ 55%] Built target app_version
-[ 55%] Building C object services/gui/hal/input/CMakeFiles/graphic_input.dir/src/input_manager.c.obj
-[ 55%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_paint.c.obj
-[ 55%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_matrix.c.obj
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_resource.c.obj
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_path.c.obj
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vgu.c.obj
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/hdf/hchip/hdi_gfx.c.obj
-[ 56%] Built target at_cmd
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/hdf/hchip/hdi_hardware_capability.c.obj
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/soc_jpeg_api.c.obj
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_csc.c.obj
-[ 56%] Built target build_version
-[ 56%] Built target connectivity
-[ 56%] Built target cpu_load
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_mem.c.obj
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_exif.c.obj
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_parse.c.obj
-[ 56%] Built target dfx_preserve
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_stream.c.obj
-[ 56%] Built target soc_log
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_table.c.obj
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/intf/drv_dpu_intf.c.obj
-[ 56%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/ioctl/dpu_ioctl.c.obj
-[ 60%] Built target graphic_ui
-[ 61%] Built target log_file
-[ 61%] Built target dfx_panic
-[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/layer/dpu_layer.c.obj
-[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/disp/dpu_disp.c.obj
-[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/clock/dpu_clock.c.obj
-[ 63%] Built target dfx_diag
-/home/snicker/hiwatch/code/sdk/middleware/services/gui/hal/input/src/input_manager.c:45:80: warning: unused parameter 'callback' [-Wunused-parameter]
-__attribute__((weak)) uint32_t button_register_report_event_cb(report_event_cb callback)
-^
-1 warning generated.
-[ 63%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/dfx/dpu_dfx.c.obj
-[ 63%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/hal/dpu_hal.c.obj
+[ 58%] Linking CXX static library ../../../../../lib/media/evb_standard/libaudio_capture.a
+[ 58%] Building C object services/media/hal/common/CMakeFiles/media_hal_common.dir/src/media_hal_thread_adapt.c.obj
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/policymanager/src/policy_manager.c.obj
+Scanning dependencies of target player
+[ 58%] Linking C static library ../../../../lib/media/evb_standard/liteos/libmedia_hal_common.a
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/streammanager/src/source_handle.c.obj
+[ 58%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/buffersource/src/buffer_source.cpp.obj
+Scanning dependencies of target audio_hw
+[ 58%] Built target audio_capture
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/player/frameworks/buffersource/src/buffer_source.cpp:166:58: warning: unused parameter 'timeOut' [-Wunused-parameter]
+int BufferSource::DequeIdleBuffer(QueBuffer* buffer, int timeOut)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/player/frameworks/buffersource/src/buffer_source.cpp:207:60: warning: unused parameter 'timeOut' [-Wunused-parameter]
+int BufferSource::DequeFilledBuffer(QueBuffer* buffer, int timeOut)
+^
+2 warnings generated.
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/streammanager/src/stream_manager.c.obj
+[ 58%] Building C object services/media/hal/audio/CMakeFiles/audio_hw.dir/src/audio_manager.c.obj
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/streammanager/src/stream_utils.c.obj
+[ 58%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/player.cpp.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/stream_manager.c:146:19: warning: implicit declaration of function 'sprintf_s' is invalid in C99 [-Wimplicit-function-declaration]
+int32_t ret = sprintf_s(typeVolumeStr, MAX_FLOAT_TO_CHAR_NUM,
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/stream_manager.c:694:9: warning: implicit declaration of function 'SetHifiClockFreqByStreamTypeAndDeviceType' is invalid in C99 [-Wimplicit-function-declaration]
+SetHifiClockFreqByStreamTypeAndDeviceType(streamType, deviceType, false);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/stream_manager.c:764:9: warning: implicit declaration of function 'SetHifiClockFreqByStreamTypeAndDeviceType' is invalid in C99 [-Wimplicit-function-declaration]
+SetHifiClockFreqByStreamTypeAndDeviceType(streamType, deviceType, false);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/stream_manager.c:791:23: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
+for (int i = 0; i < infoSize; i++) {
+~ ^ ~~~~~~~~
+4 warnings generated.
+[ 58%] Building C object services/media/hal/audio/CMakeFiles/audio_hw.dir/src/audio_adapter.c.obj
+[ 58%] Built target media_hal_common
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/streammanager/src/track_handle.c.obj
+[ 58%] Building C object services/media/hal/audio/CMakeFiles/audio_hw.dir/src/audio_capture.c.obj
+[ 58%] Building C object services/media/hal/audio/CMakeFiles/audio_hw.dir/src/audio_render.c.obj
+[ 58%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/player_control/player/liteplayer.cpp.obj
+Scanning dependencies of target gpu
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/track_handle.c:196:5: warning: implicit declaration of function 'SetHifiClockFreqByStreamTypeAndDeviceType' is invalid in C99 [-Wimplicit-function-declaration]
+SetHifiClockFreqByStreamTypeAndDeviceType(context->streamInfo.streamType, (AudioDeviceType)validFwDevice, false);
+^
+1 warning generated.
+[ 58%] Building C object services/media/hal/audio/CMakeFiles/audio_hw.dir/src/audio_plugins_manager/src/audio_plugins_manager.c.obj
+[ 58%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/player_control/player/liteplayer_comm.cpp.obj
+Scanning dependencies of target audio_primary_port
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/player/frameworks/player_control/player/liteplayer.cpp:1142:70: warning: unused parameter 'codecFormat' [-Wunused-parameter]
+void PlayerControl::GetRenderFullSleepThresholdTime(AudioCodecFormat codecFormat)
+^
+1 warning generated.
+[ 58%] Building C object services/media/foundation/manager/f/audioservice/CMakeFiles/audio_service.dir/src/policymanager/src/hifi_clock_freq_manager.c.obj
+Scanning dependencies of target media_sample_wrapper
+[ 58%] Building C object services/media/hal/audio/plugins/brandy/primary/CMakeFiles/audio_primary_port.dir/primary_port.c.obj
+[ 58%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/player_control/sink/player_sync.cpp.obj
+[ 58%] Linking C static library ../../../../lib/media/evb_standard/liteos/libaudio_hw.a
+[ 58%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/player_control/sink/player_audio_sink.cpp.obj
+[ 58%] Building CXX object services/media/foundation/sample/wrapper/CMakeFiles/media_sample_wrapper.dir/audio_capture_wrapper.cpp.obj
+[ 58%] Building C object services/gpu/CMakeFiles/gpu.dir/api/dpu/soc_dpu_api.c.obj
+[ 58%] Linking C static library ../../../../../../lib/media/evb_standard/libaudio_service.a
+[ 58%] Building C object services/media/hal/audio/plugins/brandy/primary/CMakeFiles/audio_primary_port.dir/primary_sub_port_in.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/primary/primary_sub_port_in.c:648:18: warning: incompatible function pointer types initializing 'AudioPortInvokeFunc' (aka 'int (*)(void *, char *, unsigned int)') with an expression of type 'int32_t (AudioHandle, const char *, uint32_t)' (aka 'int (void *, const char *, unsigned int)') [-Wincompatible-function-pointer-types]
+{SEA_ENABLE, PrimarySetSeaEnable, true},
+^~~~~~~~~~~~~~~~~~~
+1 warning generated.
+[ 58%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/player_control/sink/player_video_sink.cpp.obj
+[ 58%] Building C object services/media/hal/audio/plugins/brandy/primary/CMakeFiles/audio_primary_port.dir/primary_sub_port_out.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_capture_wrapper.cpp:342:59: warning: unused parameter 'argv' [-Wunused-parameter]
+static int32_t CheckInputParam(int32_t argc, const char **argv)
+^
+1 warning generated.
+[ 58%] Built target audio_hw
+[ 58%] Building CXX object services/media/foundation/sample/wrapper/CMakeFiles/media_sample_wrapper.dir/audio_scene_interaction.cpp.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/primary/primary_sub_port_out.c:585:25: warning: incompatible function pointer types initializing 'uapi_adp_event_proc' (aka 'int (*)(unsigned int, uapi_adp_event_type, void *, void *)') with an expression of type 'int32_t (td_handle, uapi_adp_event_type, const td_void *, td_void *)' (aka 'int (unsigned int, uapi_adp_event_type, const void *, void *)') [-Wincompatible-function-pointer-types]
+uapi_adp_event_proc adpCallback = AdpEventCB;
+^ ~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/primary/primary_sub_port_out.c:809:25: warning: incompatible function pointer types initializing 'uapi_adp_event_proc' (aka 'int (*)(unsigned int, uapi_adp_event_type, void *, void *)') with an expression of type 'int32_t (td_handle, uapi_adp_event_type, const td_void *, td_void *)' (aka 'int (unsigned int, uapi_adp_event_type, const void *, void *)') [-Wincompatible-function-pointer-types]
+uapi_adp_event_proc adpCallback = AdpEventCB;
+^ ~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/primary/primary_sub_port_out.c:916:12: warning: implicit declaration of function 'UpdateCurrentPosition' is invalid in C99 [-Wimplicit-function-declaration]
+return UpdateCurrentPosition(portTrackOutCtx->trackHandle, time);
+^
+3 warnings generated.
+[ 58%] Building CXX object services/media/foundation/sample/wrapper/CMakeFiles/media_sample_wrapper.dir/player_sample_wrapper.cpp.obj
+[ 58%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/player_control/sink/player_sink_manager.cpp.obj
+[ 58%] Built target audio_service
+[ 58%] Linking C static library ../../../../../../../lib/media/evb_standard/liteos/libaudio_primary_port.a
+[ 58%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/soc_vau_api.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:767:42: warning: unused parameter 'argc' [-Wunused-parameter]
+int32_t AudioSceneInteraction001(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:767:60: warning: unused parameter 'argv' [-Wunused-parameter]
+int32_t AudioSceneInteraction001(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:782:42: warning: unused parameter 'argc' [-Wunused-parameter]
+int32_t AudioSceneInteraction002(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:782:60: warning: unused parameter 'argv' [-Wunused-parameter]
+int32_t AudioSceneInteraction002(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:797:42: warning: unused parameter 'argc' [-Wunused-parameter]
+int32_t AudioSceneInteraction003(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:797:60: warning: unused parameter 'argv' [-Wunused-parameter]
+int32_t AudioSceneInteraction003(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:812:42: warning: unused parameter 'argc' [-Wunused-parameter]
+int32_t AudioSceneInteraction004(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:812:60: warning: unused parameter 'argv' [-Wunused-parameter]
+int32_t AudioSceneInteraction004(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:827:42: warning: unused parameter 'argc' [-Wunused-parameter]
+int32_t AudioSceneInteraction005(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:827:60: warning: unused parameter 'argv' [-Wunused-parameter]
+int32_t AudioSceneInteraction005(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:841:42: warning: unused parameter 'argc' [-Wunused-parameter]
+int32_t AudioSceneInteraction006(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:841:60: warning: unused parameter 'argv' [-Wunused-parameter]
+int32_t AudioSceneInteraction006(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:855:42: warning: unused parameter 'argc' [-Wunused-parameter]
+int32_t AudioSceneInteraction007(int32_t argc, const char *argv[])
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_scene_interaction.cpp:855:60: warning: unused parameter 'argv' [-Wunused-parameter]
+int32_t AudioSceneInteraction007(int32_t argc, const char *argv[])
+^
+14 warnings generated.
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/player_sample_wrapper.cpp:472:25: warning: unused parameter 'type' [-Wunused-parameter]
+void OnInfo(int32_t type, int32_t extra) override
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/player_sample_wrapper.cpp:472:39: warning: unused parameter 'extra' [-Wunused-parameter]
+void OnInfo(int32_t type, int32_t extra) override
+^
+2 warnings generated.
+[ 58%] Building CXX object services/media/foundation/sample/wrapper/CMakeFiles/media_sample_wrapper.dir/video_player_sample_wrapper.cpp.obj
+[ 58%] Building CXX object services/media/foundation/sample/wrapper/CMakeFiles/media_sample_wrapper.dir/voice_call_volte_sample_wrapper.cpp.obj
+[ 58%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/player_control/source/player_demux.cpp.obj
+[ 58%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/draw/vau_draw.c.obj
+Scanning dependencies of target audio_bluetooth_port
+Scanning dependencies of target audio_modem_port
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/voice_call_volte_sample_wrapper.cpp:527:44: warning: unused parameter 'param' [-Wunused-parameter]
+static int32_t StartVoiceCall(const char **param)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/voice_call_volte_sample_wrapper.cpp:561:43: warning: unused parameter 'param' [-Wunused-parameter]
+static int32_t StopVoiceCall(const char **param)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/voice_call_volte_sample_wrapper.cpp:628:38: warning: unused parameter 'argc' [-Wunused-parameter]
+int32_t VoiceCallVolteSample(int32_t argc, const char *argv[])
+^
+3 warnings generated.
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_player_sample_wrapper.cpp:34:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/root_view.h:45:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:176:38: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnClick(UIView& view, const ClickEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:176:62: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnClick(UIView& view, const ClickEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:208:42: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnLongPress(UIView& view, const LongPressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:208:70: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnLongPress(UIView& view, const LongPressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:239:42: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnDragStart(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:239:65: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnDragStart(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:254:37: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnDrag(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:254:60: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnDrag(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:269:40: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnDragEnd(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:269:63: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnDragEnd(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:301:38: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnPress(UIView& view, const PressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:301:62: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnPress(UIView& view, const PressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:316:40: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRelease(UIView& view, const ReleaseEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:316:66: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRelease(UIView& view, const ReleaseEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:331:39: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnCancel(UIView& view, const CancelEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:331:64: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnCancel(UIView& view, const CancelEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:360:44: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRotateStart(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:360:69: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRotateStart(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:373:39: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRotate(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:373:64: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRotate(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:385:42: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRotateEnd(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:385:67: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRotateEnd(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1270:46: warning: unused parameter 'id' [-Wunused-parameter]
+virtual UIView* GetChildById(const char* id) const
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1338:38: warning: unused parameter 'neeInvalidate' [-Wunused-parameter]
+virtual void LayoutChildren(bool neeInvalidate = false) {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1729:38: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnFocus(UIView& view)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1740:37: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnBlur(UIView& view)
+^
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_player_sample_wrapper.cpp:34:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/root_view.h:47:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_lite_surface_view.h:36:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:146:28: warning: unused parameter 'usage' [-Wunused-parameter]
+void SetUsage(uint32_t usage) override {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:166:41: warning: unused parameter 'key' [-Wunused-parameter]
+void SetUserData(const std::string& key, const std::string& value) override {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:166:65: warning: unused parameter 'value' [-Wunused-parameter]
+void SetUserData(const std::string& key, const std::string& value) override {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:175:48: warning: unused parameter 'key' [-Wunused-parameter]
+std::string GetUserData(const std::string& key) override
+^
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_player_sample_wrapper.cpp:42:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_label.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/animator/animator.h:71:33: warning: unused parameter 'view' [-Wunused-parameter]
+virtual void OnStop(UIView& view) {}
+^
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_player_sample_wrapper.cpp:42:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.h:13:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_label.h:165:26: warning: unused parameter 'invalidatedArea' [-Wunused-parameter]
+bool OnPreDraw(Rect& invalidatedArea) const override
+^
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_player_sample_wrapper.cpp:42:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_scroll_view.h:39:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_scroll.h:442:52: warning: unused parameter 'dragDistanceX' [-Wunused-parameter]
+virtual void CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDistanceY) {};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_scroll.h:442:76: warning: unused parameter 'dragDistanceY' [-Wunused-parameter]
+virtual void CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDistanceY) {};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_scroll.h:448:39: warning: unused parameter 'distanceX' [-Wunused-parameter]
+virtual void FixDistance(int16_t& distanceX, int16_t& distanceY) {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_scroll.h:448:59: warning: unused parameter 'distanceY' [-Wunused-parameter]
+virtual void FixDistance(int16_t& distanceX, int16_t& distanceY) {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_player_sample_wrapper.cpp:213:25: warning: unused parameter 'type' [-Wunused-parameter]
+void OnInfo(int32_t type, int32_t extra) override
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_player_sample_wrapper.cpp:213:39: warning: unused parameter 'extra' [-Wunused-parameter]
+void OnInfo(int32_t type, int32_t extra) override
+^
+38 warnings generated.
+[ 58%] Building CXX object services/media/foundation/sample/wrapper/CMakeFiles/media_sample_wrapper.dir/audio_manager_c_wrapper.cpp.obj
+[ 58%] Built target audio_primary_port
+[ 59%] Building C object services/media/hal/audio/plugins/brandy/modem/CMakeFiles/audio_modem_port.dir/modem_port.c.obj
+[ 59%] Building CXX object services/media/foundation/sample/wrapper/CMakeFiles/media_sample_wrapper.dir/video_play_wrapper.cpp.obj
+[ 59%] Building C object services/media/hal/audio/plugins/brandy/bluetooth/CMakeFiles/audio_bluetooth_port.dir/bluetooth_port.c.obj
+[ 59%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/player_control/source/player_source.cpp.obj
+[ 59%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/draw/vau_utility.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_manager_c_wrapper.cpp:407:71: warning: unused parameter 'a2dpContext' [-Wunused-parameter]
+static int32_t DisConnectBluetoothA2dpDevice(AudioManagerA2dpContext *a2dpContext)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_manager_c_wrapper.cpp:420:68: warning: unused parameter 'a2dpContext' [-Wunused-parameter]
+static int32_t ConnectBluetoothA2dpDevice(AudioManagerA2dpContext *a2dpContext)
+^
+2 warnings generated.
+[ 59%] Building C object services/media/hal/audio/plugins/brandy/modem/CMakeFiles/audio_modem_port.dir/modem_sub_port.c.obj
+[ 59%] Building C object services/media/hal/audio/plugins/brandy/bluetooth/CMakeFiles/audio_bluetooth_port.dir/bluetooth_sub_port.c.obj
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.h:12:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/root_view.h:45:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:176:38: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnClick(UIView& view, const ClickEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:176:62: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnClick(UIView& view, const ClickEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:208:42: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnLongPress(UIView& view, const LongPressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:208:70: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnLongPress(UIView& view, const LongPressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:239:42: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnDragStart(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:239:65: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnDragStart(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:254:37: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnDrag(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:254:60: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnDrag(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:269:40: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnDragEnd(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:269:63: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnDragEnd(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:301:38: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnPress(UIView& view, const PressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:301:62: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnPress(UIView& view, const PressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:316:40: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRelease(UIView& view, const ReleaseEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:316:66: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRelease(UIView& view, const ReleaseEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:331:39: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnCancel(UIView& view, const CancelEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:331:64: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnCancel(UIView& view, const CancelEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:360:44: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRotateStart(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:360:69: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRotateStart(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:373:39: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRotate(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:373:64: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRotate(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:385:42: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRotateEnd(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:385:67: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRotateEnd(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1270:46: warning: unused parameter 'id' [-Wunused-parameter]
+virtual UIView* GetChildById(const char* id) const
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1338:38: warning: unused parameter 'neeInvalidate' [-Wunused-parameter]
+virtual void LayoutChildren(bool neeInvalidate = false) {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1729:38: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnFocus(UIView& view)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1740:37: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnBlur(UIView& view)
+^
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.h:12:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/root_view.h:47:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_lite_surface_view.h:36:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:146:28: warning: unused parameter 'usage' [-Wunused-parameter]
+void SetUsage(uint32_t usage) override {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:166:41: warning: unused parameter 'key' [-Wunused-parameter]
+void SetUserData(const std::string& key, const std::string& value) override {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:166:65: warning: unused parameter 'value' [-Wunused-parameter]
+void SetUserData(const std::string& key, const std::string& value) override {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:175:48: warning: unused parameter 'key' [-Wunused-parameter]
+std::string GetUserData(const std::string& key) override
+^
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_label.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/animator/animator.h:71:33: warning: unused parameter 'view' [-Wunused-parameter]
+virtual void OnStop(UIView& view) {}
+^
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.h:13:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_label.h:165:26: warning: unused parameter 'invalidatedArea' [-Wunused-parameter]
+bool OnPreDraw(Rect& invalidatedArea) const override
+^
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_scroll_view.h:39:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_scroll.h:442:52: warning: unused parameter 'dragDistanceX' [-Wunused-parameter]
+virtual void CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDistanceY) {};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_scroll.h:442:76: warning: unused parameter 'dragDistanceY' [-Wunused-parameter]
+virtual void CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDistanceY) {};
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_scroll.h:448:39: warning: unused parameter 'distanceX' [-Wunused-parameter]
+virtual void FixDistance(int16_t& distanceX, int16_t& distanceY) {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_scroll.h:448:59: warning: unused parameter 'distanceY' [-Wunused-parameter]
+virtual void FixDistance(int16_t& distanceX, int16_t& distanceY) {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.cpp:90:25: warning: unused parameter 'type' [-Wunused-parameter]
+void OnInfo(int32_t type, int32_t extra)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.cpp:90:39: warning: unused parameter 'extra' [-Wunused-parameter]
+void OnInfo(int32_t type, int32_t extra)
+^
+38 warnings generated.
+Scanning dependencies of target audio_port_common
+[ 59%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/matrix/vau_matrix.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/modem/modem_sub_port.c:300:55: warning: unused parameter 'portCtx' [-Wunused-parameter]
+static int32_t SubPortTrackInit(const SubPortContext *portCtx, const struct PortPluginAttr *inputAttr,
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/modem/modem_sub_port.c:745:18: warning: incompatible function pointer types initializing 'AudioPortInvokeFunc' (aka 'int (*)(void *, char *, unsigned int)') with an expression of type 'int32_t (AudioHandle, const char *, uint32_t)' (aka 'int (void *, const char *, unsigned int)') [-Wincompatible-function-pointer-types]
+{SEA_ENABLE, ModemSetSeaEnable, true},
+^~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/modem/modem_sub_port.c:1532:25: warning: assigning to 'enum AudioFormat *' from 'const enum AudioFormat [1]' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
+capability->formats = g_supportFormats;
+^ ~~~~~~~~~~~~~~~~
+3 warnings generated.
+[ 59%] Building CXX object services/media/foundation/sample/wrapper/CMakeFiles/media_sample_wrapper.dir/camera_preview_sample_wrapper.cpp.obj
+[ 59%] Building C object services/media/hal/audio/plugins/brandy/common/CMakeFiles/audio_port_common.dir/src/plugin_common.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/bluetooth/bluetooth_sub_port.c:327:9: warning: incompatible function pointer types initializing 'TrackSetVolumeFunc' (aka 'int (*)(const SubPortTrackContext *, float)') with an expression of type 'int32_t (SubPortTrackContext *, float)' (aka 'int (SubPortTrackContext *, float)') [-Wincompatible-function-pointer-types]
+TrackSetVolumeInBluetoothA2DPSourceNormalScene, TrackGetVolumeInBluetoothA2DPSourceNormalScene,
+^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/bluetooth/bluetooth_sub_port.c:490:30: warning: assigning to 'struct SubPortContext *' from 'const SubPortContext *' (aka 'const struct SubPortContext *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
+portTrackCtx->subPortCtx = portCtx;
+^ ~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/bluetooth/bluetooth_sub_port.c:1823:12: warning: implicit declaration of function 'UpdateCurrentPosition' is invalid in C99 [-Wimplicit-function-declaration]
+return UpdateCurrentPosition(portTrackCtx->trackHandle, time);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/bluetooth/bluetooth_sub_port.c:2770:24: warning: passing 'const SubPortTrackContext *' to parameter of type 'SubPortTrackContext *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
+DecreaseTrackCount(portTrackCtx);
+^~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/bluetooth/bluetooth_sub_port.c:2680:53: note: passing argument to parameter 'portTrackCtx' here
+static void DecreaseTrackCount(SubPortTrackContext *portTrackCtx)
+^
+4 warnings generated.
+[ 59%] Linking C static library ../../../../../../../lib/media/evb_standard/liteos/libaudio_modem_port.a
+[ 59%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/player_control/decoder/decoder.cpp.obj
+[ 59%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/compress/vau_compress.c.obj
+[ 59%] Building CXX object services/media/foundation/player/f/CMakeFiles/player.dir/player_impl.cpp.obj
+[ 59%] Building C object services/media/hal/audio/plugins/brandy/bluetooth/CMakeFiles/audio_bluetooth_port.dir/latm_simple_muxer.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/common/src/plugin_common.c:55:49: warning: implicitly declaring library function 'log' with type 'double (double)' [-Wimplicit-function-declaration]
+double tmpDb = PERCENT_TO_GAIN_LOG_FACTOR * log(volume * VOLUME_UNIT / VOLUME_UNIT);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/common/src/plugin_common.c:55:49: note: include the header <math.h> or explicitly provide a declaration for 'log'
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/common/src/plugin_common.c:746:71: warning: unused parameter 'valueLen' [-Wunused-parameter]
+int32_t SetSeaEnable(td_handle seaHandle, const char *value, uint32_t valueLen)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/common/src/plugin_common.c:870:16: warning: implicit declaration of function 'GetModemPortPluginFuncs' is invalid in C99 [-Wimplicit-function-declaration]
+return GetModemPortPluginFuncs(pluginType);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/audio/plugins/brandy/common/src/plugin_common.c:870:16: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'const AudioPortPlugin *' [-Wint-conversion]
+return GetModemPortPluginFuncs(pluginType);
+^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+4 warnings generated.
+[ 59%] Linking C static library ../../../../../../../lib/media/evb_standard/liteos/libaudio_port_common.a
+[ 59%] Building C object services/gpu/CMakeFiles/gpu.dir/api/vau/debug/vau_debug.c.obj
+[ 59%] Linking C static library ../../../../../../../lib/media/evb_standard/liteos/libaudio_bluetooth_port.a
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/player/frameworks/player_impl.cpp:1161:57: warning: unused parameter 'params' [-Wunused-parameter]
+void AdapterStreamCallback::SetParameters(const Format ¶ms)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/player/frameworks/player_impl.cpp:1185:89: warning: unused parameter 'timeOutMs' [-Wunused-parameter]
+int32_t Player::PlayerImpl::ReadData(void *handle, uint8_t *data, int32_t size, int32_t timeOutMs, DataFlags *flags)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/player/frameworks/player_impl.cpp:1304:56: warning: unused parameter 'params' [-Wunused-parameter]
+int32_t Player::PlayerImpl::SetParameter(const Format ¶ms)
+^
+3 warnings generated.
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/camera_preview_sample_wrapper.cpp:29:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/root_view.h:45:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:176:38: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnClick(UIView& view, const ClickEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:176:62: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnClick(UIView& view, const ClickEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:208:42: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnLongPress(UIView& view, const LongPressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:208:70: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnLongPress(UIView& view, const LongPressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:239:42: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnDragStart(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:239:65: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnDragStart(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:254:37: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnDrag(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:254:60: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnDrag(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:269:40: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnDragEnd(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:269:63: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnDragEnd(UIView& view, const DragEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:301:38: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnPress(UIView& view, const PressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:301:62: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnPress(UIView& view, const PressEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:316:40: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRelease(UIView& view, const ReleaseEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:316:66: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRelease(UIView& view, const ReleaseEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:331:39: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnCancel(UIView& view, const CancelEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:331:64: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnCancel(UIView& view, const CancelEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:360:44: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRotateStart(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:360:69: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRotateStart(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:373:39: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRotate(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:373:64: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRotate(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:385:42: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnRotateEnd(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:385:67: warning: unused parameter 'event' [-Wunused-parameter]
+virtual bool OnRotateEnd(UIView& view, const RotateEvent& event)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1270:46: warning: unused parameter 'id' [-Wunused-parameter]
+virtual UIView* GetChildById(const char* id) const
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1338:38: warning: unused parameter 'neeInvalidate' [-Wunused-parameter]
+virtual void LayoutChildren(bool neeInvalidate = false) {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1729:38: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnFocus(UIView& view)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:1740:37: warning: unused parameter 'view' [-Wunused-parameter]
+virtual bool OnBlur(UIView& view)
+^
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/camera_preview_sample_wrapper.cpp:29:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/root_view.h:47:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_lite_surface_view.h:36:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:146:28: warning: unused parameter 'usage' [-Wunused-parameter]
+void SetUsage(uint32_t usage) override {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:166:41: warning: unused parameter 'key' [-Wunused-parameter]
+void SetUserData(const std::string& key, const std::string& value) override {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:166:65: warning: unused parameter 'value' [-Wunused-parameter]
+void SetUserData(const std::string& key, const std::string& value) override {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h:175:48: warning: unused parameter 'key' [-Wunused-parameter]
+std::string GetUserData(const std::string& key) override
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/camera_preview_sample_wrapper.cpp:251:21: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Wsign-compare]
+if (loopCnt > TIME_OUT_LOOP_CNT) {
+~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/camera_preview_sample_wrapper.cpp:268:21: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Wsign-compare]
+if (loopCnt > TIME_OUT_LOOP_CNT) {
+~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/services/media/foundation/sample/wrapper/camera_preview_sample_wrapper.cpp:366:21: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Wsign-compare]
+if (loopCnt > TIME_OUT_LOOP_CNT) {
+~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
+33 warnings generated.
+[ 59%] Linking CXX static library ../../../../../lib/media/evb_standard/libplayer.a
+[ 59%] Linking CXX static library ../../../../../lib/media/evb_standard/libmedia_sample_wrapper.a
+[ 59%] Building C object services/gpu/CMakeFiles/gpu.dir/api/gmmu/src/soc_gmmu_api.c.obj
+[ 59%] Built target audio_modem_port
+[ 59%] Built target audio_port_common
+[ 59%] Built target audio_bluetooth_port
+Scanning dependencies of target format_hw
+[ 60%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_api.c.obj
+Scanning dependencies of target plugin_demuxer_raw
+[ 60%] Built target player
+[ 60%] Building C object services/media/hal/format/CMakeFiles/format_hw.dir/src/format_manager.c.obj
+[ 60%] Built target media_sample_wrapper
+[ 60%] Building C object services/media/hal/format/plugins/raw_demuxer/CMakeFiles/plugin_demuxer_raw.dir/raw_format.c.obj
+[ 60%] Building C object services/media/hal/format/CMakeFiles/format_hw.dir/src/demuxer_manager/src/demuxer_manager.c.obj
+Scanning dependencies of target codec_hw
+[ 60%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_config.c.obj
+Scanning dependencies of target codec_plugin_vdec
+Scanning dependencies of target camera_codec_hw
+[ 60%] Building C object services/media/hal/codec/plugins/brandy/CMakeFiles/codec_plugin_vdec.dir/video_decoder/native_vdec_jpeg.c.obj
+[ 60%] Building C object services/media/hal/codec/CMakeFiles/codec_hw.dir/src/codec_v2.c.obj
+[ 60%] Building C object services/media/hal/camera/hw_camera/CMakeFiles/camera_codec_hw.dir/src/virtual_camera_impl.c.obj
+[ 60%] Building C object services/media/hal/format/CMakeFiles/format_hw.dir/src/demuxer_plugins_manager/src/demuxer_plugins_manager.c.obj
+[ 60%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_context.c.obj
+[ 60%] Building C object services/media/hal/format/plugins/raw_demuxer/CMakeFiles/plugin_demuxer_raw.dir/silk_demuxer.c.obj
+[ 60%] Built target hdi_camera_intf
+[ 60%] Linking C static library ../../../../../../lib/media/evb_standard/liteos/libcodec_plugin_vdec.a
+[ 60%] Building C object services/media/hal/codec/CMakeFiles/codec_hw.dir/src/codec_config/codec_config.c.obj
+[ 60%] Building C object services/media/hal/codec/CMakeFiles/codec_hw.dir/src/buffer_channel/buffer_channel.c.obj
+[ 60%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_display.c.obj
+[ 60%] Building C object services/media/hal/format/CMakeFiles/format_hw.dir/src/muxer_manager/src/muxer_manager.c.obj
+[ 60%] Linking C static library ../../../../../lib/media/evb_standard/liteos/libcamera_codec_hw.a
+[ 60%] Building C object services/media/hal/format/plugins/raw_demuxer/CMakeFiles/plugin_demuxer_raw.dir/sbc_demuxer.c.obj
+[ 60%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_egl.c.obj
+[ 60%] Building C object services/media/hal/format/CMakeFiles/format_hw.dir/src/muxer_plugins_manager/src/muxer_plugins_manager.c.obj
+[ 60%] Built target codec_plugin_vdec
+[ 60%] Building C object services/media/hal/codec/CMakeFiles/codec_hw.dir/src/common/codec_common.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/services/media/hal/format/plugins/raw_demuxer/sbc_demuxer.c:124:17: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
+if (readLen == -1) {
+~~~~~~~ ^ ~~
+1 warning generated.
+[ 60%] Building C object services/media/hal/codec/CMakeFiles/codec_hw.dir/src/pluginManager/codec_plugin_manager.c.obj
+[ 60%] Building C object services/media/hal/format/CMakeFiles/format_hw.dir/src/plugins_manager_common/src/plugins_manager_common.c.obj
+[ 61%] Building C object services/media/hal/format/CMakeFiles/format_hw.dir/src/protocol_plugins_manager/src/protocol_plugins_manager.c.obj
+[ 61%] Linking C static library ../../../../../../lib/media/evb_standard/liteos/libplugin_demuxer_raw.a
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_mutex.c.obj
+[ 61%] Built target camera_codec_hw
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/egl/src/egl_surface.c.obj
+[ 61%] Linking C static library ../../../../lib/media/evb_standard/liteos/libcodec_hw.a
+[ 61%] Linking C static library ../../../../lib/media/evb_standard/liteos/libformat_hw.a
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/openvg_api.c.obj
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_context.c.obj
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_draw.c.obj
+[ 61%] Built target plugin_demuxer_raw
+[ 61%] Built target format_hw
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_image.c.obj
+[ 61%] Built target codec_hw
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_math.c.obj
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_matrix.c.obj
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_paint.c.obj
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_path.c.obj
+Scanning dependencies of target display_gralloc
+Scanning dependencies of target display_layer
+[ 61%] Building C object services/gui/hal/display/CMakeFiles/display_gralloc.dir/src/display_gralloc.c.obj
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vg_resource.c.obj
+Scanning dependencies of target graphic_input
+[ 61%] Building C object services/gui/hal/display/CMakeFiles/display_layer.dir/src/display_layer.c.obj
+[ 61%] Building C object services/gui/hal/display/CMakeFiles/display_gralloc.dir/mempool/src/mem_pool_los.c.obj
+[ 61%] Building C object services/gui/hal/input/CMakeFiles/graphic_input.dir/src/input_manager.c.obj
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/vg/src/vgu.c.obj
+Scanning dependencies of target graphic_service
+[ 61%] Linking C static library libdisplay_layer.a
+[ 61%] Linking C static library libdisplay_gralloc.a
+[ 61%] Linking C static library libgraphic_input.a
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/hdf/hchip/hdi_gfx.c.obj
+[ 61%] Building CXX object uikit/proprietary/src/service/CMakeFiles/graphic_service.dir/src/graphic_service.cpp.obj
+[ 61%] Built target display_layer
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/openvg/hdf/hchip/hdi_hardware_capability.c.obj
+[ 61%] Built target graphic_input
+[ 61%] Building CXX object uikit/proprietary/src/service/CMakeFiles/graphic_service.dir/src/graphic_event_handler.cpp.obj
+[ 61%] Built target display_gralloc
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/soc_jpeg_api.c.obj
+Scanning dependencies of target app_version
+Scanning dependencies of target algorithm
+Scanning dependencies of target at_cmd
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_csc.c.obj
+[ 61%] Building C object utils/app_version/CMakeFiles/app_version.dir/private/application_version.c.obj
+[ 61%] Building C object utils/algorithm/CMakeFiles/algorithm.dir/sec_random/sec_random.c.obj
+[ 61%] Building C object utils/at/wstp_at/CMakeFiles/at_cmd.dir/src/at_cmd_task.c.obj
+[ 61%] Building CXX object uikit/proprietary/src/service/CMakeFiles/graphic_service.dir/src/graphic_service_wrapper.cpp.obj
+[ 61%] Linking C static library libapp_version.a
+/home/snicker/hiwatch/code/sdk/middleware/utils/at/wstp_at/src/at_cmd_task.c:194:57: warning: incompatible pointer types passing 'btsrv_calibration_config_t *' to parameter of type 'const ipc_payload *' [-Wincompatible-pointer-types]
+ipc_send_message(CORES_BT_CORE, IPC_ACTION_BT_CALI, config, value_len, IPC_PRIORITY_LOWEST, false);
+^~~~~~
+/home/snicker/hiwatch/code/sdk/drivers/drivers/driver/ipc/ipc_old/shared/ipc.h:224:50: note: passing argument to parameter 'payload_p' here
+const ipc_payload *payload_p, uint16_t payload_length,
+^
+/home/snicker/hiwatch/code/sdk/middleware/utils/at/wstp_at/src/at_cmd_task.c:206:80: warning: incompatible pointer types passing 'btsrv_calibration_config_t *' to parameter of type 'uint8_t *' (aka 'unsigned char *') [-Wincompatible-pointer-types]
+uapi_nv_read(NV_ID_BTSRV_CALIBRATION_CONFIG, kvalue_max_length, &real_len, kvalue);
+^~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/utils/at/wstp_at/src/at_cmd_task.c:45:100: note: passing argument to parameter 'kvalue' here
+errcode_t uapi_nv_read(uint16_t key, uint16_t kvalue_max_length, uint16_t *kvalue_length, uint8_t *kvalue);
+^
+/home/snicker/hiwatch/code/sdk/middleware/utils/at/wstp_at/src/at_cmd_task.c:219:38: warning: incompatible pointer types passing 'ipc_calibration_config_t *' to parameter of type 'btsrv_calibration_config_t *' [-Wincompatible-pointer-types]
+at_cmd_set_calibration_to_bt(ipc_msg, sizeof(ipc_calibration_config_t));
+^~~~~~~
+/home/snicker/hiwatch/code/sdk/middleware/utils/at/wstp_at/src/at_cmd_task.c:192:63: note: passing argument to parameter 'config' here
+void at_cmd_set_calibration_to_bt(btsrv_calibration_config_t *config, uint16_t value_len)
+^
+3 warnings generated.
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_exif.c.obj
+Scanning dependencies of target graphic_utils
+[ 61%] Linking C static library libat_cmd.a
+[ 61%] Linking C static library libalgorithm.a
+[ 61%] Linking CXX static library libgraphic_service.a
+[ 61%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/utils/frameworks/color.cpp.obj
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_mem.c.obj
+[ 61%] Built target at_cmd
+[ 61%] Built target algorithm
+[ 61%] Built target app_version
+[ 61%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/utils/frameworks/geometry2d.cpp.obj
+[ 61%] Built target graphic_service
+Scanning dependencies of target build_version
+Scanning dependencies of target cpu_load
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_parse.c.obj
+[ 61%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/utils/frameworks/graphic_math.cpp.obj
+[ 61%] Building C object utils/build_version/CMakeFiles/build_version.dir/private/build_version.c.obj
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_stream.c.obj
+[ 61%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/utils/frameworks/graphic_performance.cpp.obj
+[ 61%] Building C object utils/cpu_load/CMakeFiles/cpu_load.dir/private/cpu_load.c.obj
+Scanning dependencies of target connectivity
+[ 61%] Linking C static library libbuild_version.a
+[ 61%] Building C object services/gpu/CMakeFiles/gpu.dir/api/jpeg/src/jpeg_table.c.obj
+[ 61%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/utils/frameworks/graphic_timer.cpp.obj
+[ 61%] Linking C static library libcpu_load.a
+[ 61%] Building C object utils/connectivity/CMakeFiles/connectivity.dir/common/acore/connectivity_calibration.c.obj
+[ 63%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/intf/drv_dpu_intf.c.obj
+[ 63%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/utils/frameworks/hal_tick.cpp.obj
+[ 63%] Built target build_version
+[ 63%] Built target cpu_load
+[ 63%] Building C object utils/connectivity/CMakeFiles/connectivity.dir/common/shared/connectivity_log.c.obj
+[ 63%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/utils/frameworks/mem_api.cpp.obj
+[ 63%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/ioctl/dpu_ioctl.c.obj
+[ 63%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/layer/dpu_layer.c.obj
+[ 63%] Building C object utils/connectivity/CMakeFiles/connectivity.dir/common/acore/identity.c.obj
+Scanning dependencies of target dfx_preserve
+[ 63%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/disp/dpu_disp.c.obj
+[ 63%] Building C object utils/connectivity/CMakeFiles/connectivity.dir/common/acore/los_status.c.obj
+[ 63%] Building C object utils/dfx/CMakeFiles/dfx_preserve.dir/preserve/private/preserve.c.obj
+[ 63%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/utils/frameworks/style.cpp.obj
+[ 63%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/clock/dpu_clock.c.obj
[ 63%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/isr/dpu_isr.c.obj
-[ 64%] Built target cpu_utils
-[ 64%] Linking C static library libgraphic_input.a
-[ 64%] Built target reboot
+[ 63%] Linking C static library libdfx_preserve.a
+[ 64%] Linking C static library libconnectivity.a
+[ 64%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/utils/frameworks/transform.cpp.obj
+[ 64%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/dfx/dpu_dfx.c.obj
+[ 64%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/proprietary/src/utils/frameworks/hals/display_dev.cpp.obj
+[ 64%] Built target dfx_preserve
+[ 64%] Built target connectivity
+[ 64%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/hal/dpu_hal.c.obj
+[ 64%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/proprietary/src/utils/frameworks/hals/gralloc_engines.cpp.obj
[ 64%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/hal/dpu_hal_crg.c.obj
+[ 64%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/proprietary/src/utils/frameworks/hals/lite_input_distributer.cpp.obj
[ 64%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/hal/dpu_hal_disp.c.obj
+Scanning dependencies of target soc_log
+[ 64%] Building C object utils/dfx/CMakeFiles/soc_log.dir/soc_log/soc_log.c.obj
+Scanning dependencies of target dfx_panic
+[ 64%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/proprietary/src/utils/frameworks/hals/lite_input_hal.cpp.obj
[ 64%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/hal/dpu_hal_layer.c.obj
-[ 65%] Built target dfx_log
-[ 65%] Built target graphic_input
-[ 65%] Built target audio_proc
-[ 65%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/dfx/vau_dfx.c.obj
-[ 65%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/qspi/dpu_qspi.c.obj
-[ 65%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/intf/drv_vau_intf.c.obj
-[ 65%] Built target diag_dfx_cmd
-[ 65%] Built target audio_probe
-[ 65%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/intf/vau_pre_process.c.obj
+[ 64%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/proprietary/src/utils/frameworks/mem_check.cpp.obj
+[ 64%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/dpu/qspi/dpu_qspi.c.obj
+[ 64%] Building C object utils/dfx/CMakeFiles/soc_log.dir/soc_log/soc_log_uart_instance.c.obj
+[ 64%] Building C object utils/dfx/CMakeFiles/dfx_panic.dir/panic/private/panic.c.obj
+Scanning dependencies of target log_file
+Scanning dependencies of target dfx_diag
+[ 64%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/dfx/vau_dfx.c.obj
+[ 64%] Linking C static library libsoc_log.a
+[ 64%] Building C object utils/dfx/CMakeFiles/log_file.dir/log_file/log_file.c.obj
+[ 64%] Building CXX object uikit/CMakeFiles/graphic_utils.dir/proprietary/src/utils/frameworks/mem_custom.cpp.obj
+[ 64%] Linking C static library libdfx_panic.a
+[ 64%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_debug.c.obj
+[ 64%] Building C object utils/dfx/CMakeFiles/log_file.dir/log_file/log_file_file.c.obj
+[ 64%] Linking CXX static library libgraphic_utils.a
+[ 64%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/intf/drv_vau_intf.c.obj
+[ 64%] Building C object utils/dfx/CMakeFiles/log_file.dir/log_file/log_file_flash.c.obj
+[ 64%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_pkt.c.obj
+[ 64%] Built target soc_log
+[ 64%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_mem.c.obj
+[ 64%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/intf/vau_pre_process.c.obj
+[ 64%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_msg.c.obj
+[ 64%] Linking C static library liblog_file.a
+[ 65%] Built target dfx_panic
[ 65%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/ioctl/vau_ioctl.c.obj
-[ 65%] Built target audio_dump
-[ 66%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/isr/vau_isr.c.obj
-[ 66%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/job/vau_job.c.obj
-[ 66%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/list/vau_list.c.obj
-[ 66%] Built target dfx_nv
-[ 66%] Built target gpu_proc
-[ 66%] Built target dfx_update
-[ 67%] Built target x_fat
-[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/mem/vau_mem.c.obj
-[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/list/vau_handle.c.obj
-[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal.c.obj
-[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/node/vau_node.c.obj
-[ 67%] Built target lib_utils
-[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_apb.c.obj
-[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_affine.c.obj
-[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_node.c.obj
+[ 65%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_tx.c.obj
+[ 65%] Built target graphic_utils
+[ 65%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/isr/vau_isr.c.obj
+[ 65%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_rx_api.c.obj
+[ 65%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_channel.c.obj
+[ 65%] Built target log_file
+[ 65%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_pkt_router.c.obj
+[ 65%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_dfx.c.obj
+[ 65%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_stat.c.obj
+[ 65%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_filter.c.obj
+Scanning dependencies of target cpu_utils
+[ 65%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/job/vau_job.c.obj
+[ 65%] Building C object utils/dfx/dfx_reboot/cpu_utils/CMakeFiles/cpu_utils.dir/private/cpu_utils.c.obj
+[ 65%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/list/vau_list.c.obj
+[ 65%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_service.c.obj
+[ 65%] Linking C static library libcpu_utils.a
+Scanning dependencies of target reboot
+[ 65%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/list/vau_handle.c.obj
+[ 65%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/mem/vau_mem.c.obj
+[ 66%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_cmd_router/diag_cmd_dispatch.c.obj
+[ 66%] Building C object utils/dfx/dfx_reboot/reboot/CMakeFiles/reboot.dir/shared/non_os_reboot.c.obj
+Scanning dependencies of target dfx_log
+[ 66%] Built target cpu_utils
+[ 66%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/node/vau_node.c.obj
+[ 66%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_cmd_router/diag_cmd_dst.c.obj
+[ 66%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_cmd_router/diag_cmd_src.c.obj
+[ 66%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal.c.obj
+[ 66%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log.c.obj
+[ 66%] Linking C static library libreboot.a
+[ 66%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_cmd_router/diag_ind_dst.c.obj
+[ 66%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_logger.c.obj
+[ 66%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_mem_query.c.obj
+[ 66%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_apb.c.obj
+[ 66%] Built target reboot
+[ 66%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_pcm.c.obj
+[ 66%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_ota.c.obj
+[ 66%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_node.c.obj
+[ 66%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag/diag_cmd_router/diag_ind_src.c.obj
+[ 66%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_affine.c.obj
+[ 66%] Built target audio_proc
+[ 66%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_reg_query.c.obj
[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_capability.c.obj
-[ 67%] Built target x_disk
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_cmd_ls.c.obj
+Scanning dependencies of target diag_dfx_cmd
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_status.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_cmd_delete_file.c.obj
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_beat_heart.c.obj
[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/vau/hal/vau_hal_vector_draw.c.obj
+[ 67%] Built target audio_dump
+[ 67%] Built target audio_probe
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oam_dscr_cb.c.obj
[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/clock/gmmu_clock.c.obj
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_connect.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oml_exception.c.obj
[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/context/gmmu_context.c.obj
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_filter.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_item.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_send_recv_pkt.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_oml_ota_rom.c.obj
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_get_mem_info.c.obj
+Scanning dependencies of target dfx_nv
[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/dev/gmmu_dev.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_resume.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_printf.c.obj
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_get_task_info.c.obj
[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/dfx/gmmu_dfx.c.obj
-[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/intf/drv_gmmu_intf.c.obj
[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/hal/gmmu_hal.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_dst.c.obj
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_get_res_info.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_printf_rom.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_reg_dump.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_src.c.obj
+[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/intf/drv_gmmu_intf.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log/log_trigger.c.obj
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/diag_nv/CMakeFiles/dfx_nv.dir/zdiag_nv.c.obj
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_get_init_info.c.obj
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_get_cpup.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_nv/zdiag_nv.c:158:36: warning: implicit declaration of function 'kv_store_get_page_count' is invalid in C99 [-Wimplicit-function-declaration]
+pages_in_store = (uint32_t)kv_store_get_page_count(0);
+^
+/home/snicker/hiwatch/code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_nv/zdiag_nv.c:162:17: warning: implicit declaration of function 'kv_store_get_page_handle' is invalid in C99 [-Wimplicit-function-declaration]
+if (kv_store_get_page_handle(0, page_index, &page) == ERRCODE_SUCC) {
+^
+2 warnings generated.
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_write_read.c.obj
+[ 67%] Linking C static library libdfx_nv.a
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_reader/private/log_oam_msg.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_system_cmd/diag_cmd_get_cpup.c:100:44: warning: implicit declaration of function 'dfx_os_task_status_convert_str' is invalid in C99 [-Wimplicit-function-declaration]
+info->task_info->priority, dfx_os_task_status_convert_str(info->task_info->status),
+^
+1 warning generated.
[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/ioctl/gmmu_ioctl.c.obj
-[ 68%] Built target nv
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_password.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_api.c.obj
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_system_cmd/diag_cmd_stat.c.obj
+[ 67%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_buffer/log_buffer.c.obj
+[ 67%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/isr/gmmu_isr.c.obj
+[ 67%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/diag_mocked_shell/diag_mocked_shell.c.obj
+[ 67%] Built target dfx_nv
+[ 68%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/last_dump/last_dump.c.obj
+[ 68%] Building C object utils/dfx/CMakeFiles/dfx_diag.dir/diag_transmit/transmit_debug.c.obj
[ 68%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/mem/gmmu_mem.c.obj
-[ 68%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/isr/gmmu_isr.c.obj
-[ 68%] Built target partition
+[ 68%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_buffer/log_buffer_reader.c.obj
+[ 68%] Building C object utils/dfx/diag_dfx_cmd/CMakeFiles/diag_dfx_cmd.dir/sample_data/sample_data.c.obj
+[ 68%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_buffer/log_memory_region.c.obj
[ 68%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/gmmu/base/gmmu_comm.c.obj
-[ 68%] Built target update_common
+[ 68%] Linking C static library libdfx_diag.a
+Scanning dependencies of target gpu_proc
+Scanning dependencies of target dfx_update
+[ 68%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_buffer/log_memory_section.c.obj
+[ 68%] Linking C static library libdiag_dfx_cmd.a
[ 68%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/clock/jpeg_clock.c.obj
-[ 68%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/dev/jpeg_dev.c.obj
+[ 68%] Building C object utils/dfx/CMakeFiles/dfx_log.dir/log_reader/private/log_uart.c.obj
+[ 68%] Building C object utils/dfx/diag_dfx_cmd/diag_gpu_proc/CMakeFiles/gpu_proc.dir/diag_gpu_proc.c.obj
+[ 68%] Building C object utils/dfx/diag_dfx_cmd/diag_update/CMakeFiles/dfx_update.dir/diag_update.c.obj
[ 68%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/context/jpeg_context.c.obj
-[ 68%] Built target update_storage
-[ 70%] Built target x_vfs
-[ 70%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/dfx/jpeg_dfx.c.obj
-[ 71%] Built target update_local
+[ 68%] Built target dfx_diag
+[ 68%] Linking C static library libdfx_log.a
+[ 68%] Linking C static library libgpu_proc.a
+/home/snicker/hiwatch/code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_update/diag_update.c:71:13: warning: implicit declaration of function 'upg_reboot' is invalid in C99 [-Wimplicit-function-declaration]
+upg_reboot();
+^
+1 warning generated.
+[ 68%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/dev/jpeg_dev.c.obj
+[ 68%] Built target diag_dfx_cmd
+[ 68%] Linking C static library libdfx_update.a
+[ 68%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/dfx/jpeg_dfx.c.obj
+Scanning dependencies of target dfx_file_operation
+[ 68%] Built target dfx_log
+[ 68%] Built target gpu_proc
+[ 68%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/hal/jpeg_hal.c.obj
+[ 68%] Building C object utils/dfx/file_operation/CMakeFiles/dfx_file_operation.dir/dfx_file_operation.c.obj
+[ 68%] Built target dfx_update
+[ 68%] Built target x_fat
+[ 68%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/intf/drv_jpeg_intf.c.obj
+[ 68%] Built target lib_utils
+[ 68%] Built target x_disk
+[ 69%] Linking C static library libdfx_file_operation.a
+[ 69%] Built target partition
+[ 69%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/ioctl/jpeg_ioctl.c.obj
+Scanning dependencies of target update_common
+[ 69%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/isr/jpeg_isr.c.obj
+[ 69%] Built target dfx_file_operation
+Scanning dependencies of target update_storage
+[ 69%] Linking C static library ../../../../../../interim_binary/brandy/libs/gpu/evb_standard/libgpu.a
+[ 69%] Building C object utils/update/storage/CMakeFiles/update_storage.dir/upg_storage.c.obj
+[ 69%] Building C object utils/update/common/CMakeFiles/update_common.dir/upg_common.c.obj
+[ 72%] Built target x_vfs
+[ 72%] Linking C static library libupdate_storage.a
+Scanning dependencies of target update_local
+[ 72%] Building C object utils/update/common/CMakeFiles/update_common.dir/upg_verify.c.obj
+[ 72%] Building C object utils/update/local_update/CMakeFiles/update_local.dir/upg_patch.c.obj
[ 72%] Built target lzma_21.07
-[ 72%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/hal/jpeg_hal.c.obj
-[ 72%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/intf/drv_jpeg_intf.c.obj
-[ 73%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/ioctl/jpeg_ioctl.c.obj
-[ 73%] Built target cjson_static
-[ 75%] Built target freetype_static
-[ 75%] Building C object services/gpu/CMakeFiles/gpu.dir/drv/jpeg/isr/jpeg_isr.c.obj
-[ 76%] Built target icu4c
-[ 77%] Built target qrcodegen
-[ 78%] Built target lwIP
-[ 78%] Built target syspara
-[ 78%] Linking C static library ../../../../../../interim_binary/brandy/libs/gpu/evb_standard/libgpu.a
-[ 78%] Built target bootstrap
-[ 79%] Built target samgr
-[ 81%] Built target harfbuzz
-[ 81%] Built target permission
-[ 82%] Built target appverify
-[ 82%] Built target gpu
-[ 82%] Generating NV_SRC
-[ 83%] Built target alipay_soc
-[ 83%] Built target resmgr
-[ 83%] Built target i18n
-[ 83%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/ble_at_sample/src/sample_ble_bas.c.obj
-[ 83%] copy file.....
-[ 83%] Install hal_release ...
-[ 83%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/ble_at_sample/src/sample_ble_hid.c.obj
-[ 83%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/ble_at_sample/src/sample_ble_dis_profile.c.obj
-[ 83%] Built target nv_config_brandy
-[ 85%] Built target ace_adapt
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/dis_profile_server.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/ble_at_sample/src/sample_ble_fmp.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_bas_client.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/dis_profile_client.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_bas_server.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_hid_take_photo_server.c.obj
-/home/snicker/hiwatch/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/dis_profile_client.c:52:14: warning: incompatible integer to pointer conversion initializing 'uint8_t *' (aka 'unsigned char *') with an expression of type 'int' [-Wint-conversion]
-uint8_t *tgt = bts_init_128bit_uuid(tgt_uuid);
-^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-/home/snicker/hiwatch/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/dis_profile_client.c:57:14: warning: incompatible integer to pointer conversion initializing 'uint8_t *' (aka 'unsigned char *') with an expression of type 'int' [-Wint-conversion]
-uint8_t *src = bts_init_128bit_uuid(src_uuid);
-^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-2 warnings generated.
-/home/snicker/hiwatch/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/ble_bas_client.c:43:14: warning: incompatible integer to pointer conversion initializing 'uint8_t *' (aka 'unsigned char *') with an expression of type 'int' [-Wint-conversion]
-uint8_t *tgt = bts_init_128bit_uuid(tgt_uuid);
-^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-/home/snicker/hiwatch/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/ble_bas_client.c:48:14: warning: incompatible integer to pointer conversion initializing 'uint8_t *' (aka 'unsigned char *') with an expression of type 'int' [-Wint-conversion]
-uint8_t *src = bts_init_128bit_uuid(src_uuid);
-^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Scanning dependencies of target nv
+[ 72%] Built target update_storage
+[ 72%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_app/soc_nv_storage_handle.c.obj
+[ 72%] Linking C static library libupdate_common.a
+[ 72%] Building C object utils/update/local_update/CMakeFiles/update_local.dir/upg_process.c.obj
+[ 72%] Built target gpu
+[ 72%] Built target freetype_static
+[ 72%] Built target cjson_static
+[ 72%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_app/soc_nv_storage.c.obj
+[ 72%] Building C object utils/update/local_update/CMakeFiles/update_local.dir/upg_resource.c.obj
+[ 72%] Built target update_common
+[ 72%] Built target qrcodegen
+[ 72%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_lib/nv_key.c.obj
+[ 72%] Building C object utils/update/local_update/CMakeFiles/update_local.dir/upg_upgrade.c.obj
+[ 73%] Built target icu4c
+[ 73%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_lib/nv_notify.c.obj
+[ 73%] Linking C static library libupdate_local.a
+[ 75%] Built target syspara
+Scanning dependencies of target bootstrap
+[ 75%] Building C object ohos/bootstrap/CMakeFiles/bootstrap.dir/source/bootstrap_service.c.obj
+[ 75%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_lib/nv_nvregion.c.obj
+[ 75%] Built target update_local
+[ 75%] Building C object ohos/bootstrap/CMakeFiles/bootstrap.dir/source/system_init.c.obj
+[ 75%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_lib/nv_page.c.obj
+Scanning dependencies of target bms_sign_mode
+[ 75%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_lib/nv_reset.c.obj
+Scanning dependencies of target brightness
+[ 75%] Building CXX object ohos/appexecfwk/CMakeFiles/bms_sign_mode.dir/bundlems/sign_mode.cpp.obj
+[ 75%] Linking C static library libbootstrap.a
+[ 76%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_lib/nv_rpc.c.obj
+[ 76%] Building CXX object ohos/ace_engine/CMakeFiles/brightness.dir/modules/display/display.cpp.obj
+Scanning dependencies of target samgr
+[ 76%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_lib/nv_store.c.obj
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/communication/broadcast/source/broadcast_service.c.obj
+[ 76%] Linking CXX static library libbrightness.a
+[ 76%] Linking CXX static library libbms_sign_mode.a
+[ 76%] Built target bootstrap
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/communication/broadcast/source/pub_sub_feature.c.obj
+[ 76%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_lib/nv_update.c.obj
+[ 76%] Built target brightness
+[ 76%] Built target bms_sign_mode
+[ 76%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_lib/nv_upg.c.obj
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/communication/broadcast/source/pub_sub_implement.c.obj
+[ 76%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_lib/nv_debug.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/utils/nv/nv_storage_lib/nv_upg.c:80:21: warning: implicit declaration of function 'uapi_drv_cipher_sha256_start' is invalid in C99 [-Wimplicit-function-declaration]
+errcode_t ret = uapi_drv_cipher_sha256_start(&handle);
+^
+/home/snicker/hiwatch/code/sdk/middleware/utils/nv/nv_storage_lib/nv_upg.c:96:15: warning: implicit declaration of function 'uapi_drv_cipher_sha256_update' is invalid in C99 [-Wimplicit-function-declaration]
+ret = uapi_drv_cipher_sha256_update(handle, image_data, read_len);
+^
+/home/snicker/hiwatch/code/sdk/middleware/utils/nv/nv_storage_lib/nv_upg.c:105:11: warning: implicit declaration of function 'uapi_drv_cipher_sha256_finish' is invalid in C99 [-Wimplicit-function-declaration]
+ret = uapi_drv_cipher_sha256_finish(handle, data_sha, &out_length);
+^
+3 warnings generated.
+[ 76%] Building C object utils/nv/CMakeFiles/nv.dir/nv_storage_lib/nv_async_store.c.obj
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/adapter/cmsis/queue_adapter.c.obj
+/home/snicker/hiwatch/code/sdk/middleware/utils/nv/nv_storage_lib/nv_async_store.c:58:82: warning: unused parameter 'kvalue_length' [-Wunused-parameter]
+static bool nv_async_check_writeable(uint16_t key, nv_key_attr_t *attr, uint16_t kvalue_length)
+^
+/home/snicker/hiwatch/code/sdk/middleware/utils/nv/nv_storage_lib/nv_async_store.c:363:43: warning: incompatible function pointer types passing 'errcode_t (void)' (aka 'unsigned int (void)') to parameter of type 'osal_kthread_handler' (aka 'int (*)(void *)') [-Wincompatible-function-pointer-types]
+osal_task *task = osal_kthread_create(nv_async_msg_process_thread, NULL, "nv_write_task", 0x1000);
+^~~~~~~~~~~~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/kernel/osal/include/schedule/osal_task.h:76:53: note: passing argument to parameter 'handler' here
+osal_task *osal_kthread_create(osal_kthread_handler handler, void *data, const char *name, unsigned int stack_size);
+^
2 warnings generated.
-[ 85%] Built target brandy_CFBB
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_fmp_target.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_fmp_locator.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_gatts_callbacks.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_avrcp_service.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_a2dp_service.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_hfp_hf_service.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_pbap_service.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_hfp_ag_service.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_pan_service.c.obj
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_spp_service.c.obj
-/home/snicker/hiwatch/code/sdk/protocol/bt/host/bt/bts/bt_sample/br_profile/sample_hfp_ag_service.c:918:23: warning: incompatible integer to pointer conversion initializing 'hfp_phone_info_t *' with an expression of type 'int' [-Wint-conversion]
-hfp_phone_info_t *info = bt_os_new(sizeof(hfp_phone_info_t) + name_len);
-^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-/home/snicker/hiwatch/code/sdk/protocol/bt/host/bt/bts/bt_sample/br_profile/sample_hfp_ag_service.c:963:22: warning: incompatible integer to pointer conversion initializing 'hfp_clcc_info_t *' with an expression of type 'int' [-Wint-conversion]
-hfp_clcc_info_t *info = bt_os_new(sizeof(hfp_clcc_info_t) + number_len);
-^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-/home/snicker/hiwatch/code/sdk/protocol/bt/host/bt/bts/bt_sample/br_profile/sample_hfp_ag_service.c:1019:23: warning: incompatible integer to pointer conversion initializing 'hfp_phone_info_t *' with an expression of type 'int' [-Wint-conversion]
-hfp_phone_info_t *info = bt_os_new(sizeof(hfp_phone_info_t) + name_len);
-^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-/home/snicker/hiwatch/code/sdk/protocol/bt/host/bt/bts/bt_sample/br_profile/sample_hfp_ag_service.c:1099:22: warning: incompatible integer to pointer conversion initializing 'hfp_cops_info_t *' with an expression of type 'int' [-Wint-conversion]
-hfp_cops_info_t *info = bt_os_new(sizeof(hfp_cops_info_t) + operator_len);
-^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/adapter/cmsis/thread_adapter.c.obj
+Scanning dependencies of target baidumapcomponent
+[ 76%] Linking C static library libnv.a
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/dependency/dependency.c.obj
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/registry/service_registry.c.obj
+[ 76%] Building CXX object ohos/ace_engine/CMakeFiles/baidumapcomponent.dir/modules/baidumapcomponent/baidumap.cpp.obj
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/source/common.c.obj
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/source/feature.c.obj
+[ 76%] Built target nv
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/source/iunknown.c.obj
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp:27:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
+typedef struct : public OHOS::HeapBase {
+^
+BaiduMapAsyncMsgParams
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp:27:18: note: type is not C-compatible due to this base class
+typedef struct : public OHOS::HeapBase {
+^~~~~~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp:31:3: note: type is given name 'BaiduMapAsyncMsgParams' for linkage purposes by this typedef declaration
+} BaiduMapAsyncMsgParams;
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp:33:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
+typedef struct : public OHOS::HeapBase {
+^
+BaiduMapJSCoordinate
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp:33:18: note: type is not C-compatible due to this base class
+typedef struct : public OHOS::HeapBase {
+^~~~~~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp:36:3: note: type is given name 'BaiduMapJSCoordinate' for linkage purposes by this typedef declaration
+} BaiduMapJSCoordinate;
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp:923:29: warning: missing field 'lat' initializer [-Wmissing-field-initializers]
+JSCoordinate params = {0};
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp:941:29: warning: missing field 'lat' initializer [-Wmissing-field-initializers]
+JSCoordinate params = {0};
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp:959:29: warning: missing field 'lat' initializer [-Wmissing-field-initializers]
+JSCoordinate params = {0};
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp:977:29: warning: missing field 'lat' initializer [-Wmissing-field-initializers]
+JSCoordinate params = {0};
+^
+6 warnings generated.
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/source/message_alloc.c.obj
+[ 76%] Built target permission
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/source/message.c.obj
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/source/samgr_lite.c.obj
+[ 76%] Linking CXX static library libbaidumapcomponent.a
+Scanning dependencies of target graphic_ui
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/source/samgr_lite_vtbl.c.obj
+[ 76%] Built target baidumapcomponent
+[ 76%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/source/service.c.obj
+[ 77%] Built target i18n
+[ 77%] Building C object ohos/samgr/CMakeFiles/samgr.dir/services/samgr/source/task_manager.c.obj
+[ 77%] Linking C static library libsamgr.a
+Scanning dependencies of target appverify
+[ 77%] Built target resmgr
+[ 77%] Building C object ohos/appverify/CMakeFiles/appverify.dir/app_provision.c.obj
+[ 77%] Built target samgr
+[ 77%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/animator/animator.cpp.obj
+[ 78%] Built target utils_kv_store
+[ 79%] Building C object ohos/appverify/CMakeFiles/appverify.dir/app_verify.c.obj
+[ 79%] Built target native_file
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/animator/animator_manager.cpp.obj
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/animator/easing_equation.cpp.obj
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/base/security/appverify/app_verify.c:1047:32: warning: comparison of integers of different signs: 'const size_t' (aka 'const unsigned int') and 'const int' [-Wsign-compare]
+if (certA->subject_raw.len != binSignCert->subjectLen ||
+~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/base/security/appverify/app_verify.c:1053:31: warning: comparison of integers of different signs: 'const size_t' (aka 'const unsigned int') and 'const int' [-Wsign-compare]
+if (certA->issuer_raw.len != binSignCert->issuerLen ||
+~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/base/security/appverify/app_verify.c:1542:28: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
+if (unsignedFileLength == V_ERR) {
+~~~~~~~~~~~~~~~~~~ ^ ~~~~~
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/base/security/appverify/app_verify.c:1421:12: warning: unused function 'InitMessageEnv' [-Wunused-function]
+static int InitMessageEnv(const char *filePath, MessageFunc func)
+^
4 warnings generated.
-[ 85%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/bt_audio/sample_bt_audio_hal.c.obj
-[ 86%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/bt_core/sample_bts_gap.c.obj
-[ 86%] Built target hal_release
-[ 86%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/sample_common/sample_common.c.obj
-[ 86%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/sample_common/bt_srv_shell_internal.c.obj
-[ 86%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/bt_core/sample_bts_gatt.c.obj
-[ 86%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/bt_srv_shell.c.obj
-[ 86%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/sample_common/sample_common_internal.c.obj
-/home/snicker/hiwatch/code/sdk/protocol/bt/host/bt/bts/bt_sample/bt_core/sample_bts_gatt.c:235:15: warning: unused parameter 'status' [-Wunused-parameter]
-errcode_t status)
+[ 79%] Built target quickjs
+[ 79%] Building C object ohos/appverify/CMakeFiles/appverify.dir/mbedtls_pkcs7.c.obj
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/animator/interpolation.cpp.obj
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/common/graphic_startup.cpp.obj
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/base/security/appverify/mbedtls_pkcs7.c:439:17: warning: implicit declaration of function 'PSRAM_Malloc' is invalid in C99 [-Wimplicit-function-declaration]
+void *ptr = PSRAM_Malloc(nmemb * size);
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/base/security/appverify/mbedtls_pkcs7.c:439:11: warning: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'int' [-Wint-conversion]
+void *ptr = PSRAM_Malloc(nmemb * size);
+^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/base/security/appverify/mbedtls_pkcs7.c:453:5: warning: implicit declaration of function 'PSRAM_Free' is invalid in C99 [-Wimplicit-function-declaration]
+PSRAM_Free(ptr);
^
-/home/snicker/hiwatch/code/sdk/protocol/bt/host/bt/bts/bt_sample/bt_core/sample_bts_gatt.c:1613:61: warning: unused parameter 'params_cnt' [-Wunused-parameter]
-static void sample_gattc_speed(const char **params, int32_t params_cnt)
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/base/security/appverify/mbedtls_pkcs7.c:677:42: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
+if (oneCertLen + (*p - seqBegin) > (certsEnd - seqBegin)) {
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/base/security/appverify/mbedtls_pkcs7.c:1255:34: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned int') [-Wsign-compare]
+while (signer != NULL && idx < signersCnt) {
+~~~ ^ ~~~~~~~~~~
+5 warnings generated.
+Scanning dependencies of target storage_jsapi
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/common/image.cpp.obj
+[ 79%] Linking C static library libappverify.a
+[ 79%] Building CXX object ohos/storage_jsi/CMakeFiles/storage_jsapi.dir/kvstorekit/src/nativeapi_kv_impl.cpp.obj
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/common/image_decode_ability.cpp.obj
+[ 79%] Building CXX object ohos/storage_jsi/CMakeFiles/storage_jsapi.dir/kvstorekit/src/nativeapi_kv.cpp.obj
+[ 79%] Built target appverify
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/common/input_device_manager.cpp.obj
+[ 79%] Building CXX object ohos/storage_jsi/CMakeFiles/storage_jsapi.dir/filekit/src/nativeapi_fs_impl.cpp.obj
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs_impl.cpp:76:28: warning: missing field 'st_ino' initializer [-Wmissing-field-initializers]
+struct stat info = { 0 };
^
-/home/snicker/hiwatch/code/sdk/protocol/bt/host/bt/bts/bt_sample/bt_core/sample_bts_gatt.c:1649:61: warning: unused parameter 'params_cnt' [-Wunused-parameter]
-static void sample_gatts_speed(const char **params, int32_t params_cnt)
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs_impl.cpp:285:22: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned int') [-Wsign-compare]
+return (writeLen != len) ? ERROR_CODE_IO : NATIVE_SUCCESS;
+~~~~~~~~ ^ ~~~
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs_impl.cpp:316:51: warning: comparison of integers of different signs: 'off_t' (aka 'long') and 'unsigned int' [-Wsign-compare]
+if (lseek(fileHandle, position, SEEK_SET) != position) {
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs_impl.cpp:323:22: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned int') [-Wsign-compare]
+return (writeLen != len) ? ERROR_CODE_IO : NATIVE_SUCCESS;
+~~~~~~~~ ^ ~~~
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs_impl.cpp:345:28: warning: missing field 'st_ino' initializer [-Wmissing-field-initializers]
+struct stat info = { 0 };
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs_impl.cpp:357:47: warning: comparison of integers of different signs: 'off_t' (aka 'long') and 'unsigned int' [-Wsign-compare]
+if (lseek(fileHandle, position, SEEK_SET) != position) {
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs_impl.cpp:379:32: warning: missing field 'st_ino' initializer [-Wmissing-field-initializers]
+struct stat fileStat = { 0 };
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs_impl.cpp:384:40: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
+while ((dir != NULL) && (fileIndex < listNum)) {
+~~~~~~~~~ ^ ~~~~~~~
+8 warnings generated.
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/common/screen.cpp.obj
+[ 79%] Building CXX object ohos/storage_jsi/CMakeFiles/storage_jsapi.dir/filekit/src/nativeapi_fs.cpp.obj
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/common/task.cpp.obj
+Scanning dependencies of target alipay_soc
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs.cpp:247:26: warning: missing field 'st_ino' initializer [-Wmissing-field-initializers]
+struct stat info = {0};
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs.cpp:319:26: warning: missing field 'st_ino' initializer [-Wmissing-field-initializers]
+struct stat info = {0};
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs.cpp:400:26: warning: missing field 'st_ino' initializer [-Wmissing-field-initializers]
+struct stat info = {0};
^
3 warnings generated.
-[ 86%] Linking C static library ../../../../../../../../../../interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_brandy_sample.a
-[ 86%] Built target bt_host_brandy_sample
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmClockModel.cpp:15:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/alarm/include/AlarmClockModel.h:18:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/include/ChangeSliceListener.h:22:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/include/NativeAbility.h:19:
-In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/include/Ability.h:27:
-/home/snicker/hiwatch/code/sdk/application/wearable/nativeabilityfwk/include/SliceTransition.h:34:30: warning: missing field 'transition' initializer [-Wmissing-field-initializers]
-TransitionInfo info_ = {0};
-^
-1 warning generated.
-[ 86%] Linking CXX static library libnativelauncher.a
+[ 79%] Building C object vendor/alipay_sdk/alipay_sec_sdk_v3.0.0/soc/CMakeFiles/alipay_soc.dir/se/hsec/vendor_crypto.c.obj
+[ 79%] Building CXX object ohos/storage_jsi/CMakeFiles/storage_jsapi.dir/common/src/nativeapi_common.cpp.obj
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/common/text.cpp.obj
+[ 79%] Building C object vendor/alipay_sdk/alipay_sec_sdk_v3.0.0/soc/CMakeFiles/alipay_soc.dir/se/hsec/vendor_rot.c.obj
+[ 79%] Built target alipay_hal
+[ 79%] Linking CXX static library libstorage_jsapi.a
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/common/typed_text.cpp.obj
+[ 79%] Building C object vendor/alipay_sdk/alipay_sec_sdk_v3.0.0/soc/CMakeFiles/alipay_soc.dir/se/hsec/vendor_ssp.c.obj
+[ 79%] Generating NV_SRC
+[ 79%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/root_view.cpp.obj
+[ 80%] Building C object vendor/alipay_sdk/alipay_sec_sdk_v3.0.0/soc/CMakeFiles/alipay_soc.dir/test/yunit.c.obj
+[ 80%] Built target storage_jsapi
+[ 80%] Building C object vendor/alipay_sdk/alipay_sec_sdk_v3.0.0/soc/CMakeFiles/alipay_soc.dir/test/test_crypto_hal.c.obj
+[ 80%] Building C object vendor/alipay_sdk/alipay_sec_sdk_v3.0.0/soc/CMakeFiles/alipay_soc.dir/test/test_ssp_hal.c.obj
+[ 80%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/text_adapter.cpp.obj
+[ 80%] Building C object vendor/alipay_sdk/alipay_sec_sdk_v3.0.0/soc/CMakeFiles/alipay_soc.dir/test/yunit_test_main.c.obj
+Scanning dependencies of target bt_host_brandy_sample
+[ 80%] Install hal_release ...
+[ 80%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_abstract_clock.cpp.obj
+[ 80%] Linking C static library libalipay_soc.a
+[ 80%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/ble_at_sample/src/sample_ble_dis_profile.c.obj
+[ 81%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_abstract_progress.cpp.obj
+[ 81%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_abstract_scroll.cpp.obj
+[ 81%] Built target alipay_soc
+[ 81%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/ble_at_sample/src/sample_ble_bas.c.obj
+[ 81%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_analog_clock.cpp.obj
+[ 81%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_abstract_scroll_bar.cpp.obj
+[ 81%] Built target nv_config_brandy
+[ 81%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_arc_label.cpp.obj
+[ 81%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/ble_at_sample/src/sample_ble_hid.c.obj
+[ 81%] Built target hal_release
+[ 81%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_arc_scroll_bar.cpp.obj
+[ 81%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_axis.cpp.obj
+[ 81%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/ble_at_sample/src/sample_ble_fmp.c.obj
+[ 81%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_box_progress.cpp.obj
+[ 81%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/dis_profile_server.c.obj
+[ 81%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/dis_profile_client.c.obj
+[ 81%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_box_scroll_bar.cpp.obj
+[ 81%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_hid_take_photo_server.c.obj
+[ 81%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_bas_client.c.obj
+[ 81%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_bas_server.c.obj
+[ 81%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_canvas.cpp.obj
+[ 81%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_button.cpp.obj
+Scanning dependencies of target harfbuzz
+[ 81%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_fmp_target.c.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_gatts_callbacks.c.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_chart.cpp.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_checkbox.cpp.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/ble_profile/profiles/src/ble_fmp_locator.c.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_circle_progress.cpp.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_dialog.cpp.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_a2dp_service.c.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_digital_clock.cpp.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_a2dp_snk_service.c.obj
+[ 82%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-aat-layout.cc.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_edit_text.cpp.obj
+[ 82%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-aat-map.cc.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_image_animator.cpp.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_hfp_hf_service.c.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_avrcp_service.c.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_image_view.cpp.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_hfp_ag_service.c.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_label.cpp.obj
+[ 82%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-blob.cc.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_pbap_service.c.obj
+[ 82%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-buffer-serialize.cc.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_list.cpp.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_label_button.cpp.obj
+[ 82%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-buffer.cc.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_spp_service.c.obj
+[ 82%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-common.cc.obj
+[ 82%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-face.cc.obj
+[ 82%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-fallback-shape.cc.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_picker.cpp.obj
+[ 82%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-font.cc.obj
+[ 82%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-map.cc.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/br_profile/sample_pan_service.c.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/bt_audio/sample_bt_audio_hal.c.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/bt_core/sample_bts_gap.c.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_qrcode.cpp.obj
+[ 82%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_radio_button.cpp.obj
+[ 82%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-cff1-table.cc.obj
+[ 82%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/bt_core/sample_bts_gatt.c.obj
+[ 83%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-cff2-table.cc.obj
+[ 83%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/sample_common/sample_common_internal.c.obj
+[ 83%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/sample_common/bt_srv_shell_internal.c.obj
+[ 83%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-face.cc.obj
+[ 83%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_scroll_view.cpp.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_slider.cpp.obj
+[ 84%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/sample_common/sample_common.c.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-font.cc.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_swipe_view.cpp.obj
+[ 84%] Building C object protocol/bt/host/bt/bts/bt_sample/CMakeFiles/bt_host_brandy_sample.dir/bt_srv_shell.c.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_texture_mapper.cpp.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_time_picker.cpp.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-layout.cc.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-map.cc.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-math.cc.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_toggle_button.cpp.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_view.cpp.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-metrics.cc.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-meta.cc.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/components/ui_view_group.cpp.obj
+Scanning dependencies of target ace_adapt
+[ 84%] Linking C static library ../../../../../../../../../../interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_brandy_sample.a
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-name.cc.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-arabic.cc.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/core/render_manager.cpp.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-default.cc.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/core/task_manager.cpp.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-hangul.cc.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-hebrew.cc.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/default_resource/check_box_res.cpp.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dfx/event_injector.cpp.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-indic-table.cc.obj
+Scanning dependencies of target nativelauncher
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dfx/key_event_injector.cpp.obj
+[ 84%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/analog_clock_component.cpp.obj
+[ 84%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/canvas_component.cpp.obj
+[ 84%] Built target bt_host_brandy_sample
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dfx/point_event_injector.cpp.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-indic.cc.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dfx/ui_view_bounds.cpp.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dock/focus_manager.cpp.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dfx/ui_dump_dom_tree.cpp.obj
+[ 84%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-khmer.cc.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dock/input_device.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/canvas_component.cpp:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/canvas_component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dock/key_input_device.cpp.obj
+[ 84%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/chart_component.cpp.obj
+[ 84%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/circle_progress_component.cpp.obj
+[ 84%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/clock_hand_component.cpp.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dock/pointer_input_device.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/circle_progress_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/circle_progress_component.h:20:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 84%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/component.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/chart_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/chart_component.h:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/chart_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/chart_component.h:21:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_chart.h:757:31: warning: missing field 'stopCount' initializer [-Wmissing-field-initializers]
+VGUGradient gradient_ = {0};
+^
+2 warnings generated.
+[ 84%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/component_utils.cpp.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dock/rotate_input_device.cpp.obj
+[ 84%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/div_component.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component_utils.cpp:18:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/div_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/div_component.h:18:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 84%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/event_listener.cpp.obj
+[ 84%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dock/vibrator_manager.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.cpp:15:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 84%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/image_animator_component.cpp.obj
+[ 85%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/horizon_progress_component.cpp.obj
+[ 85%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/image_component.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/horizon_progress_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/horizon_progress_component.h:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 85%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/dock/virtual_input_device.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/image_animator_component.cpp:15:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/image_animator_component.h:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/image_animator_component.cpp:234:39: warning: missing field 'pos' initializer [-Wmissing-field-initializers]
+ImageAnimatorInfo frame = {{0}};
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/image_animator_component.cpp:239:25: warning: missing field 'y' initializer [-Wmissing-field-initializers]
+Point point = {0};
+^
+3 warnings generated.
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/image_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/image_component.h:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.cpp:15:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 85%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/input_button_component.cpp.obj
+[ 85%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/input_checkbox_component.cpp.obj
+[ 85%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/draw/clip_utils.cpp.obj
+[ 85%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/input_radio_component.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/input_checkbox_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/input_checkbox_component.h:17:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 85%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/draw/draw_arc.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/input_button_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/input_button_component.h:17:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/input_radio_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/input_radio_component.h:17:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 85%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/list_adapter.cpp.obj
+[ 85%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/marquee_component.cpp.obj
+[ 85%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/list_component.cpp.obj
+[ 85%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/picker_view_component.cpp.obj
+[ 85%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/draw/draw_curve.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/list_adapter.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/list_adapter.h:20:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/marquee_component.cpp:15:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/marquee_component.h:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/text_component.h:18:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/list_component.cpp:15:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/list_component.h:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 86%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/draw/draw_image.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/picker_view_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/picker_view_component.h:20:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 86%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/draw/draw_label.cpp.obj
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/qrcode_component.cpp.obj
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/scroll_layer.cpp.obj
+[ 86%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/draw/draw_line.cpp.obj
+[ 86%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/draw/draw_rect.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/qrcode_component.cpp:18:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/qrcode_component.h:20:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 86%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/draw/draw_triangle.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/scroll_layer.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/scroll_layer.h:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/slider_component.cpp.obj
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/stack_component.cpp.obj
+[ 86%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/draw/draw_utils.cpp.obj
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/swiper_component.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/slider_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/slider_component.h:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/switch_component.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/stack_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/stack_component.h:18:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/tab_bar_component.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/swiper_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/swiper_component.h:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/switch_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/switch_component.h:18:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/tab_content_component.cpp.obj
+[ 86%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/events/event.cpp.obj
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/tabs_component.cpp.obj
+[ 86%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/engines/gfx/gfx_engine_manager.cpp.obj
+[ 86%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/font/base_font.cpp.obj
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/text_component.cpp.obj
+[ 86%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/font/glyphs_manager.cpp.obj
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/components/baidu_map_component.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/text_component.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/text_component.h:18:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/app_module.cpp.obj
+[ 86%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativelauncher/src/NativeLauncher.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/baidu_map_component.cpp:17:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/baidu_map_component.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/dfx_module.cpp.obj
+[ 86%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/font/ui_font.cpp.obj
+[ 86%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativelauncher/src/slices/main/MainPresenter.cpp.obj
+[ 86%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/module_manager.cpp.obj
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/app_data_module.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/dfx_module.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/dfx_module.h:20:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/dfx/event_injector.h:195:23: warning: field 'rotateEventInjector_' will be initialized after field 'keyEventInjector_' [-Wreorder-ctor]
+rotateEventInjector_(nullptr),
+^
+1 warning generated.
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativelauncher/src/NativeLauncher.cpp:22:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/zoom_effect.h:10:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h:114:10: warning: 'OHOS::UICrossView::Remove' hides overloaded virtual function [-Woverloaded-virtual]
+void Remove(UIView* view, uint8_t direction);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:107:18: note: hidden overloaded virtual function 'OHOS::UIViewGroup::Remove' declared here: different number of parameters (1 vs 2)
+virtual void Remove(UIView* view);
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativelauncher/src/NativeLauncher.cpp:22:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:24:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativelauncher/src/NativeLauncher.cpp:47:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistPresenter.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistView.h:16:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/dfx/event_injector.h:195:23: warning: field 'rotateEventInjector_' will be initialized after field 'keyEventInjector_' [-Wreorder-ctor]
+rotateEventInjector_(nullptr),
+^
+3 warnings generated.
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/app_data_module.cpp:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/context/js_ability_impl.h:21:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/router/js_router.h:18:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/router/js_page_state_machine.h:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/cjson_parser.cpp.obj
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/console_log_impl.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/font/ui_font_adaptor.cpp.obj
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativelauncher/src/slices/main/MainView.cpp.obj
+[ 88%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-myanmar.cc.obj
+[ 88%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-thai.cc.obj
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/MainViewSample.cpp.obj
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/console_module.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/font/ui_font_bitmap.cpp.obj
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/MainModel.cpp.obj
+[ 88%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-use-table.cc.obj
+[ 88%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-use.cc.obj
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/MainPresenterSample.cpp.obj
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/date_time_format_module.cpp.obj
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/ModelListenerSample.cpp.obj
+[ 88%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-complex-vowel-constraints.cc.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainViewSample.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/zoom_effect.h:10:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h:114:10: warning: 'OHOS::UICrossView::Remove' hides overloaded virtual function [-Woverloaded-virtual]
+void Remove(UIView* view, uint8_t direction);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:107:18: note: hidden overloaded virtual function 'OHOS::UIViewGroup::Remove' declared here: different number of parameters (1 vs 2)
+virtual void Remove(UIView* view);
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainViewSample.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:24:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+2 warnings generated.
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/font/ui_font_builder.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/font/ui_font_cache.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainPresenterSample.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainPresenterSample.h:16:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/zoom_effect.h:10:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h:114:10: warning: 'OHOS::UICrossView::Remove' hides overloaded virtual function [-Woverloaded-virtual]
+void Remove(UIView* view, uint8_t direction);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:107:18: note: hidden overloaded virtual function 'OHOS::UIViewGroup::Remove' declared here: different number of parameters (1 vs 2)
+virtual void Remove(UIView* view);
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainPresenterSample.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainPresenterSample.h:16:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:24:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+2 warnings generated.
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/PresenterTask.cpp.obj
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/date_time_format_module.cpp:154:26: warning: missing field 'tm_min' initializer [-Wmissing-field-initializers]
+struct tm gmTime = {0};
+^
+/home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/date_time_format_module.cpp:155:25: warning: missing field 'tm_min' initializer [-Wmissing-field-initializers]
+struct tm local = {0};
+^
+2 warnings generated.
+[ 88%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-fallback.cc.obj
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/HealthModel.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/font/ui_font_vector.cpp.obj
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/feature_ability_module.cpp.obj
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/PullUpDownView.cpp.obj
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/applist/src/AppItemView.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/font/ui_line_break.cpp.obj
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/jstest_module.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/src/PullUpDownView.cpp:12:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainPresenterSample.h:16:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/zoom_effect.h:10:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h:114:10: warning: 'OHOS::UICrossView::Remove' hides overloaded virtual function [-Woverloaded-virtual]
+void Remove(UIView* view, uint8_t direction);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:107:18: note: hidden overloaded virtual function 'OHOS::UIViewGroup::Remove' declared here: different number of parameters (1 vs 2)
+virtual void Remove(UIView* view);
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/src/PullUpDownView.cpp:12:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainPresenterSample.h:16:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:24:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+2 warnings generated.
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/localization_module.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/font/ui_multi_font_manager.cpp.obj
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/intl_module.cpp.obj
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/applist/src/ApplistAdapter.cpp.obj
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/number_format_module.cpp.obj
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/preset_module.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/font/ui_text_shaping.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/imgdecode/cache_manager.cpp.obj
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/applist/src/ApplistModel.cpp.obj
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/profiler_module.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/imgdecode/file_img_decoder.cpp.obj
+[ 88%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/render_module.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/imgdecode/image_load.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/layout/flex_layout.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/layout/grid_layout.cpp.obj
+[ 88%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/layout/list_layout.cpp.obj
+[ 88%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/applist/src/ApplistPresenter.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/render_module.cpp:18:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component_factory.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/canvas_component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/render_module.cpp:18:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component_factory.h:30:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/chart_component.h:21:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_chart.h:757:31: warning: missing field 'stopCount' initializer [-Wmissing-field-initializers]
+VGUGradient gradient_ = {0};
+^
+2 warnings generated.
+[ 89%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape-normalize.cc.obj
+[ 89%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/themes/theme.cpp.obj
+[ 89%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/require_module.cpp.obj
+[ 89%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/applist/src/ApplistView.cpp.obj
+[ 89%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/ui/frameworks/themes/theme_manager.cpp.obj
+[ 89%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/clock/src/MainClockView.cpp.obj
+[ 89%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/ModelDialDataFactory.cpp.obj
+[ 89%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/timer_module.cpp.obj
+[ 89%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/common/lite_surface.cpp.obj
+[ 89%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/presets/version_module.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/clock/src/MainClockView.cpp:9:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainPresenterSample.h:16:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/zoom_effect.h:10:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h:114:10: warning: 'OHOS::UICrossView::Remove' hides overloaded virtual function [-Woverloaded-virtual]
+void Remove(UIView* view, uint8_t direction);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:107:18: note: hidden overloaded virtual function 'OHOS::UIViewGroup::Remove' declared here: different number of parameters (1 vs 2)
+virtual void Remove(UIView* view);
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/clock/src/MainClockView.cpp:9:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainPresenterSample.h:16:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:24:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+2 warnings generated.
+[ 89%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialModelTime.cpp.obj
+[ 89%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/router_module.cpp.obj
+[ 90%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialModelSteps.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/common/low_power_manager.cpp.obj
+[ 90%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialModelHeartRate.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/router_module.cpp:17:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/context/js_ability_impl.h:21:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/router/js_router.h:18:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/router/js_page_state_machine.h:19:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component.h:22:
+In file included from /home/snicker/hiwatch/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/event_listener.h:28:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_slider.h:39:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_box_progress.h:38:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_abstract_progress.h:328:44: warning: missing field 'startY' initializer [-Wmissing-field-initializers]
+LinearGradient foregroundGradient_ = {0};
+^
+1 warning generated.
+[ 90%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialModelPower.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/common/ui_barcode.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/icon_adapter.cpp.obj
+[ 90%] Building CXX object ohos/ace_engine/CMakeFiles/ace_adapt.dir/modules/sample_module.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/image_adapter.cpp.obj
+[ 90%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bloodoxygen/src/BloodOxygenView.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/ui_abstract_soft_keyboard.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/ui_custom_hexagons_list.cpp.obj
+[ 90%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bloodoxygen/src/BloodBandoffView.cpp.obj
+[ 90%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-shape.cc.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/ui_keyboard_button.cpp.obj
+[ 90%] Linking CXX static library libace_adapt.a
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/ui_input_method.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/ui_list_ext.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/ui_lite_surface_view.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/ui_menu_item.cpp.obj
+[ 90%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-tag.cc.obj
+[ 90%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bloodoxygen/src/BloodOxygenPresenter.cpp.obj
+[ 90%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bloodoxygen/src/BloodOxygenModel.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/ui_option_box.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/ui_sweep_clock.cpp.obj
+[ 90%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/ui_soft_keyboard.cpp.obj
+[ 91%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-set.cc.obj
+[ 91%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ot-var.cc.obj
+[ 91%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-shape-plan.cc.obj
+[ 91%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/core/input_method_manager.cpp.obj
+[ 91%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/components/ui_text_preview_box.cpp.obj
+[ 91%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/dfx/dfx_cmd.cpp.obj
+[ 91%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/BluetoothDeviceCaseListAdapter.cpp.obj
+[ 91%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-shape.cc.obj
+[ 91%] Built target ace_adapt
+[ 91%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-shaper.cc.obj
+[ 91%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/BluetoothDeviceListView.cpp.obj
+[ 91%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/dfx/fps_task.cpp.obj
+[ 91%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/dfx/dfx_record.cpp.obj
+[ 91%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-static.cc.obj
+[ 91%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-subset-cff-common.cc.obj
+[ 91%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/dock/lite_key_device.cpp.obj
+[ 91%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/dfx/rotate_event_injector.cpp.obj
+[ 91%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-subset-cff2.cc.obj
+[ 91%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/dock/lite_touch_device.cpp.obj
+[ 91%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/draw/clip_img.cpp.obj
+[ 91%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/BluetoothPresenter.cpp.obj
+[ 92%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/draw/hw_draw_utils.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/BluetoothHeadsetEvent.cpp.obj
+[ 92%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-ucd.cc.obj
+[ 92%] Building CXX object harfbuzz/CMakeFiles/harfbuzz.dir/src/hb-unicode.cc.obj
+[ 92%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/imgdecode/hw_jpeg_decoder.cpp.obj
+[ 92%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/swipe_effect/turn_page_effect.cpp.obj
+[ 92%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/swipe_effect/zoom_effect.cpp.obj
+[ 92%] Building CXX object uikit/CMakeFiles/graphic_ui.dir/proprietary/src/ui/frameworks/swipe_effect/card_flip_effect.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/MainBluetoothView.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/BluetoothModel.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/BluetoothEarPhoneView.cpp.obj
+[ 92%] Linking CXX static library libharfbuzz.a
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/TipsFailMessageView.cpp.obj
+[ 92%] Linking CXX static library libgraphic_ui.a
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/TipsConnFailMessageView.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/TipsSuccMessageView.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/BluetoothEarListView.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/BluetoothOptionsView.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/BluetoothItemView.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/BluetoothReconnectView.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/bluetooth/src/BluetoothCaseListAdapter.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/IndoorWalkView.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/IndoorWalkPresenter.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/IndoorWalkModel.cpp.obj
+[ 92%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/IndoorWalkPreparedView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/IndoorWalkMotionView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/MotionPageFirst.cpp.obj
+[ 93%] Built target harfbuzz
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/MotionPageSecond.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/MotionPageThird.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/MotionPageFourth.cpp.obj
+[ 93%] Built target graphic_ui
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/CustomizationView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/IndoorWalkEndView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/indoorwalk/src/MotionPageFifth.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/connectnewphone/src/ConnectPhoneView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/connectnewphone/src/ConnectSelectView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/connectnewphone/src/ConnectOpenView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/rebootdevice/src/RebootView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/connectnewphone/src/ConnectPhonePresenter.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/rebootdevice/src/RebootDeviceView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/rebootdevice/src/RebootPresenter.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/rebootdevice/src/ShutdownDeviceView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/rebootdevice/src/RebootModel.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/callerlog/src/CallerLogPresenter.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/callerlog/src/CallerLogView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/callerlog/src/CallerLogModel.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/makephone/src/WaitingHintsView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/makephone/src/CallingView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/callerlog/src/CallerItemView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/makephone/src/MainCallingPresenter.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/makephone/src/CallerDisplayView.cpp.obj
+[ 93%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/makephone/src/DialingScreenView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/makephone/src/MainCallingView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/VolumeSettingView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/VolumeSettingPresenter.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/player/src/BluetoothView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/player/src/PlayersView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/player/src/PlayersPresenter.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/player/src/PlayersModel.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/player/src/PlayersCaseListAdapter.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/src/VolumeSettingPresenter.cpp:18:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/notification_manager.h:24:
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:11:38: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_DELETE = "alarm_delete";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:12:37: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_CLOCK = "alarm_clock";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:13:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_CLOSE = "alarm_close";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:14:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_DELAY = "alarm_delay";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:15:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_POPUP = "alarm_popup";
+^
+5 warnings generated.
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersView.cpp:15:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/zoom_effect.h:10:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h:114:10: warning: 'OHOS::UICrossView::Remove' hides overloaded virtual function [-Woverloaded-virtual]
+void Remove(UIView* view, uint8_t direction);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:107:18: note: hidden overloaded virtual function 'OHOS::UIViewGroup::Remove' declared here: different number of parameters (1 vs 2)
+virtual void Remove(UIView* view);
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersView.cpp:15:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:24:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+2 warnings generated.
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/activity/src/ActivityPresenter.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/activity/src/ActivityWeekView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/activity/src/MainActivityView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/activity/src/ActivityModel.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/heartrate/src/HeartRateView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/heartrate/src/HeartModel.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmClockModel.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmConfigView.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/heartrate/src/HeartModel.cpp:6:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/zoom_effect.h:10:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h:114:10: warning: 'OHOS::UICrossView::Remove' hides overloaded virtual function [-Woverloaded-virtual]
+void Remove(UIView* view, uint8_t direction);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:107:18: note: hidden overloaded virtual function 'OHOS::UIViewGroup::Remove' declared here: different number of parameters (1 vs 2)
+virtual void Remove(UIView* view);
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/heartrate/src/HeartModel.cpp:6:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:24:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+2 warnings generated.
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmSetTimeView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmSetWeekView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmPresenter.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmJudgeView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/MainAlarmView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmPopUpView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmRingView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmCloseRingView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempJoinStudy.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempMainView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmNewTimeView.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmPopUpPresenter.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempModel.cpp.obj
+[ 94%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempPresenter.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarm/src/AlarmMaxClock.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempMeasure.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempExitInter.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempPromptWear.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempRemindWear.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempClickMea.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempInitInter.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempMeaProcess.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempWarn.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempLittleTip.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempExitPrompt.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempStudyAbout.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempContinueWarn.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/temperature/src/TempReport.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/settings/src/SettingPresenter.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/settings/src/SettingAdapter.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/settings/src/SettingView.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/settings/src/SettingItemView.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/settings/src/SettingModel.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_desktop/src/SetDesktopModel.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_desktop/src/SetDesktopPresenter.cpp.obj
+[ 95%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_card/src/SetCardAdapter.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_desktop/src/SetDesktopView.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_card/src/SetCardItem.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_card/src/SetCardModel.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_card/src/SetCardNoCardView.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_card/src/SetCardView.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_card/src/SetCardPresenter.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_card/src/SetCardDeleteView.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/add_card/src/AddCardAdapter.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/add_card/src/AddCardItem.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/add_card/src/AddCardModel.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/add_card/src/AddCardView.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/add_card/src/AddCardPresenter.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_dial/src/SetDialModel.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_dial/src/SetDialPresenter.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/key/src/KeyInputListener.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/compass/src/CompassCalibrationView.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/set_dial/src/SetDialView.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/compass/src/CompassControlView.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/set_dial/src/SetDialModel.cpp:13:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinParser.h:20:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+1 warning generated.
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/compass/src/CompassModel.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/compass/src/MainCompassView.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/compass/src/CompassPresenter.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/key/src/KeyInputListener.cpp:12:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/zoom_effect.h:10:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h:114:10: warning: 'OHOS::UICrossView::Remove' hides overloaded virtual function [-Woverloaded-virtual]
+void Remove(UIView* view, uint8_t direction);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:107:18: note: hidden overloaded virtual function 'OHOS::UIViewGroup::Remove' declared here: different number of parameters (1 vs 2)
+virtual void Remove(UIView* view);
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/key/src/KeyInputListener.cpp:12:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:24:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/key/src/KeyInputListener.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/notification_manager.h:24:
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:11:38: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_DELETE = "alarm_delete";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:12:37: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_IMAGE_CLOCK = "alarm_clock";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:13:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_CLOSE = "alarm_close";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:14:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_DELAY = "alarm_delay";
+^
+/home/snicker/hiwatch/code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h:15:36: warning: ISO C++11 does not allow conversion from string literal to 'char *const' [-Wwritable-strings]
+constexpr char* ALARM_VIEW_POPUP = "alarm_popup";
+^
+7 warnings generated.
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/compass/src/CompassView.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/phoneservice/src/PhoneService.cpp.obj
+[ 96%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/phoneservice/src/PhoneAudio.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/offlinevoice/src/VocassistModel.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/compass/src/MainCompassPresenter.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/offlinevoice/src/VocassistPresenter.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/offlinevoice/src/VocassistView.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/offlinevoice/src/MainVocassistView.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistPresenter.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistPresenter.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistView.h:16:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/dfx/event_injector.h:195:23: warning: field 'rotateEventInjector_' will be initialized after field 'keyEventInjector_' [-Wreorder-ctor]
+rotateEventInjector_(nullptr),
+^
+1 warning generated.
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/screensetting/src/ScreenModels.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistModel.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/zoom_effect.h:10:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h:114:10: warning: 'OHOS::UICrossView::Remove' hides overloaded virtual function [-Woverloaded-virtual]
+void Remove(UIView* view, uint8_t direction);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:107:18: note: hidden overloaded virtual function 'OHOS::UIViewGroup::Remove' declared here: different number of parameters (1 vs 2)
+virtual void Remove(UIView* view);
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistModel.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:24:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistModel.cpp:9:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistView.h:16:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/dfx/event_injector.h:195:23: warning: field 'rotateEventInjector_' will be initialized after field 'keyEventInjector_' [-Wreorder-ctor]
+rotateEventInjector_(nullptr),
+^
+3 warnings generated.
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alarmclockmanage/src/AlarmClockManage.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/uisample/src/UISampleView.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/rtcservice/src/RtcService.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistView.cpp:13:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistModel.h:12:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistView.h:16:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/dfx/event_injector.h:195:23: warning: field 'rotateEventInjector_' will be initialized after field 'keyEventInjector_' [-Wreorder-ctor]
+rotateEventInjector_(nullptr),
+^
+1 warning generated.
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/uiservice/src/ui_service.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/uisample/src/UISamplePresenter.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/MainVocassistView.cpp:8:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/MainVocassistView.h:12:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistModel.h:12:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistView.h:16:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/dfx/event_injector.h:195:23: warning: field 'rotateEventInjector_' will be initialized after field 'keyEventInjector_' [-Wreorder-ctor]
+rotateEventInjector_(nullptr),
+^
+1 warning generated.
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/uisample/src/UISampleModel.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/uisample/uitest/framework/src/test_case_list_adapter.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/uisample/uitest/framework/src/ui_test_group.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_tiger/tiger_view.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/screennotify/src/ui_screennotify.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_tiger/ui_test_tiger.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_running_ball/ui_test_running_ball.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/uisample/uitest/framework/src/ui_test_group.cpp:21:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.h:29:23: warning: field 'data_' will be initialized after field 'animator_' [-Wreorder-ctor]
+UITestListFPS() : data_(nullptr), animator_(nullptr), list_(nullptr), adapter_(nullptr) {}
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/uisample/uitest/framework/src/ui_test_group.cpp:24:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_countdown/ui_test_countdown.h:22:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/uisample/uitest/framework/src/ui_test_group.cpp:30:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ui_test_coverflow.h:39:10: warning: 'OnScroll' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
+bool OnScroll();
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_coverflow_view.h:72:22: note: overridden virtual function is here
+virtual bool OnScroll() = 0;
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/uisample/uitest/framework/src/ui_test_group.cpp:30:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ui_test_coverflow.h:41:10: warning: 'OnClick' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
+bool OnClick(UIView& view, const ClickEvent& event);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:176:22: note: overridden virtual function is here
+virtual bool OnClick(UIView& view, const ClickEvent& event)
+^
+4 warnings generated.
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_breath/ui_test_breath.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_tiger/tiger_view.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_tiger/tiger_view.h:20:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+1 warning generated.
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_card_switch/ui_test_card_switch.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_countdown/ui_test_countdown.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_tiger/ui_test_tiger.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_tiger/ui_test_tiger.h:20:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_tiger/tiger_view.h:20:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+1 warning generated.
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp:12:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:15:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/zoom_effect.h:10:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h:114:10: warning: 'OHOS::UICrossView::Remove' hides overloaded virtual function [-Woverloaded-virtual]
+void Remove(UIView* view, uint8_t direction);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view_group.h:107:18: note: hidden overloaded virtual function 'OHOS::UIViewGroup::Remove' declared here: different number of parameters (1 vs 2)
+virtual void Remove(UIView* view);
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp:12:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h:24:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+2 warnings generated.
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/image_text_adapter.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_message/ui_test_message.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_running_ball/ui_test_running_ball.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_running_ball/ui_test_running_ball.h:21:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+1 warning generated.
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_countdown/ui_test_countdown.cpp:16:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_countdown/ui_test_countdown.h:22:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_countdown/ui_test_countdown.cpp:168:23: warning: comparison of integers of different signs: 'int16_t' (aka 'short') and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
+if (endAngle_ <= surplusDegree) {
+~~~~~~~~~ ^ ~~~~~~~~~~~~~
+2 warnings generated.
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_cube_rotate/cube_rotate_view.cpp.obj
+[ 97%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_cube_rotate/ui_test_cube_rotate.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_video_play/ui_test_video_play.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_hexagons_list/ui_test_hexagons_list.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ui_test_coverflow.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:16:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.h:29:23: warning: field 'data_' will be initialized after field 'animator_' [-Wreorder-ctor]
+UITestListFPS() : data_(nullptr), animator_(nullptr), list_(nullptr), adapter_(nullptr) {}
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:40:21: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_ALARM, "闹钟"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:41:23: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{BLUETOOTH_TITLE, "蓝牙"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:42:28: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_CALLER_IMAGE, "通话记录"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:43:29: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_COMPASS_IMAGE, "指南针"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:44:23: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_SETTING, "设置"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:45:20: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_SPO2, "血氧饱和度"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:46:31: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_VOCASSIST_IMAGE, "语音助手"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:47:21: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_ALARM, "闹钟"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:48:23: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{BLUETOOTH_TITLE, "蓝牙"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:49:28: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_CALLER_IMAGE, "通话记录"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:50:29: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_COMPASS_IMAGE, "指南针"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:51:23: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_SETTING, "设置"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:52:20: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_SPO2, "血氧饱和度"},
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_list_fps/ui_test_list_fps.cpp:53:31: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+{APPLIST_VOCASSIST_IMAGE, "语音助手"}
+^
+15 warnings generated.
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialRotateImgView.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/__/__/__/middleware/services/gui/uikit/sample/uitest/components/ui_test_kaleidoscope/ui_test_kaleidoscope.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialOptionImgView.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_video_play/ui_test_video_play.cpp:18:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_video_play/ui_test_video_play.h:55:14: warning: private field 'surface_' is not used [-Wunused-private-field]
+Surface *surface_ = nullptr;
+^
+1 warning generated.
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialDigitalImgView.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ui_test_coverflow.cpp:16:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ui_test_coverflow.h:39:10: warning: 'OnScroll' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
+bool OnScroll();
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_coverflow_view.h:72:22: note: overridden virtual function is here
+virtual bool OnScroll() = 0;
+^
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ui_test_coverflow.cpp:16:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ui_test_coverflow.h:41:10: warning: 'OnClick' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
+bool OnClick(UIView& view, const ClickEvent& event);
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h:176:22: note: overridden virtual function is here
+virtual bool OnClick(UIView& view, const ClickEvent& event)
+^
+2 warnings generated.
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialLabelView.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_kaleidoscope/ui_test_kaleidoscope.cpp:5:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_kaleidoscope/ui_test_kaleidoscope.h:9:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+1 warning generated.
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialArcProgressView.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialBoxProgressView.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialArcLabelView.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialViewGroup.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialVideoView.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialSequenceImgView.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/DialStaticImgView.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayMainView.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialViewGroup.cpp:1:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+1 warning generated.
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/main/src/dial/parser/DialBinParser.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayModel.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayPresenter.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayExitBind.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayBind.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayBindRes.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayBindAni.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayPayCode.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayBarCode.cpp.obj
+[ 98%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipaySetting.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayHelp.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayUnbindFinish.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayUnbind.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayList/AlipayListAdapter.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayList/AlipayListView.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayList/AlipayListItemView.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayTrans/AlipayTransTips.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayTrans/AlipayGetTransList.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayTrans/AlipayTransCode.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayTrans/AlipayTransEnable.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayTrans/AlipayTransRes.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayTrans/AlipayTransListAdapter.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayTrans/AlipayTransAni.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayTrans/AlipayTransListView.cpp.obj
+[100%] Building CXX object application/wearable/nativeapp/CMakeFiles/nativelauncher.dir/nativeui/alipay/src/AlipayTrans/AlipayTransListItemView.cpp.obj
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/parser/DialBinParser.cpp:15:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinParser.h:20:
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h:13:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h:23:
+In file included from /home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h:15:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_canvas_ext.h:64:11: warning: field 'paintType_' will be initialized after field 'gradientSpread_' [-Wreorder-ctor]
+paintType_(PaintType::PAINT_COLOR), gradientSpread_(GradientSpread::SPREAD_PAD),
+^
+In file included from /home/snicker/hiwatch/code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/parser/DialBinParser.cpp:20:
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/gfx_utils/mem_check.h:168:1: warning: replacement function 'operator new' cannot be declared 'inline' [-Winline-new-delete]
+inline void* operator new(std::size_t size)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/gfx_utils/mem_check.h:180:1: warning: replacement function 'operator new[]' cannot be declared 'inline' [-Winline-new-delete]
+inline void* operator new[](std::size_t size)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/gfx_utils/mem_check.h:192:1: warning: replacement function 'operator delete' cannot be declared 'inline' [-Winline-new-delete]
+inline void operator delete(void *ptr)
+^
+/home/snicker/hiwatch/code/sdk/middleware/services/gui/uikit/proprietary/include/gfx_utils/mem_check.h:206:1: warning: replacement function 'operator delete[]' cannot be declared 'inline' [-Winline-new-delete]
+inline void operator delete[](void *ptr)
+^
+5 warnings generated.
+[100%] Linking CXX static library libnativelauncher.a
[100%] Built target nativelauncher
Scanning dependencies of target application
[100%] Building C object CMakeFiles/application.dir/temp/__null___.c.obj
BOOTUP_RAM: 392 B 436 B 89.91%
BOOTUP_LOAD: 392 B 436 B 89.91%
FLASH_VERSION: 88 B 88 B 100.00%
-FLASH_PROGRAM: 3958952 B 4931060 B 80.29%
+FLASH_PROGRAM: 4040592 B 5541364 B 72.92%
PSRAM_APP_CODE: 0 GB 1 MB 0.00%
-PSRAM_APP_DATA: 112928 B 1 MB 10.77%
+PSRAM_APP_DATA: 200816 B 1 MB 19.15%
PSRAM_HEAP: 0 GB 7 MB 0.00%
L2M_GPU_PROGRAM: 2192 B 256 KB 0.84%
L2M_DSP_PROGRAM: 0 GB 0 GB
-ITCM: 140108 B 196172 B 71.42%
-DTCM: 154792 B 448 KB 33.74%
+ITCM: 156268 B 196172 B 79.66%
+DTCM: 142144 B 448 KB 30.98%
IPC_SHARE_MEM: 18528 B 18528 B 100.00%
PRESERVE_SHARE_MEM: 252 B 252 B 100.00%
SYSTEM_PM: 44 B 192 B 22.92%
SYSTEM_STATUS: 24 B 192 B 12.50%
CPUTRACE_RAM: 8184 B 8184 B 100.00%
[100%] Built target application
+Scanning dependencies of target GENERAT_BIN
+Scanning dependencies of target GENERAT_LST
[100%] post_build:gen bin file
[100%] Built target GENERAT_LST
[100%] Built target GENERAT_BIN
######### Build target:brandy_native_js success
-brandy-native-js takes 23.503459 s
-/home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js
-['/usr/bin/python3', '/home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/mkyaffs2tool.py', '/home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js']
-
-
-mkyaffs2image: image building tool for YAFFS2 built May 12 2023
-File [/home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin] is cread
-Processing directory /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system into image file /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin
-Object 257, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system/KUMI_LOGO.bin is a file, 72 data chunks written
-Object 258, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system/logo.bin is a file, 38 data chunks written
-tlen=240768 tp=6528 csz=2048 pp=6414
-Operation complete.
-4 objects in 1 directories
-114 NAND pages
-mkyaffs2image: image building tool for YAFFS2 built May 12 2023
-File [/home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin] is exisits,file_size = 13787136
-Processing directory /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/update into image file /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin
-Object 257, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/update/test2.txt is a file, 1 data chunks written
-tlen=13795584 tp=13056 csz=2048 pp=6524
-Operation complete.
-2 objects in 1 directories
-4 NAND pages
-mkyaffs2image: image building tool for YAFFS2 built May 12 2023
-File [/home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin] is exisits,file_size = 27574272
-Processing directory /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/music into image file /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin
-Object 257, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/music/test3.txt is a file, 1 data chunks written
-tlen=27582720 tp=19584 csz=2048 pp=6524
-Operation complete.
-2 objects in 1 directories
-4 NAND pages
-mkyaffs2image: image building tool for YAFFS2 built May 12 2023
-File [/home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin] is exisits,file_size = 41361408
-Processing directory /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user into image file /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin
-Object 257, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/video is a directory
-Object 258, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/video/dial.mp4 is a file, 2486 data chunks written
-Object 259, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res is a directory
-Object 260, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_10.bin is a file, 4 data chunks written
-Object 261, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/KUMI_LOGO.bin is a file, 72 data chunks written
-Object 262, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_40.bin is a file, 11 data chunks written
-Object 263, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks is a directory
-Object 264, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao is a directory
-Object 265, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/4.bin is a file, 2 data chunks written
-Object 266, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/5.bin is a file, 2 data chunks written
-Object 267, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/1.bin is a file, 2 data chunks written
-Object 268, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/8.bin is a file, 2 data chunks written
-Object 269, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/3.bin is a file, 2 data chunks written
-Object 270, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/6.bin is a file, 2 data chunks written
-Object 271, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/9.bin is a file, 2 data chunks written
-Object 272, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/0.bin is a file, 2 data chunks written
-Object 273, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/2.bin is a file, 2 data chunks written
-Object 274, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/7.bin is a file, 2 data chunks written
-Object 275, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/point.bin is a file, 1 data chunks written
-Object 276, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background is a directory
-Object 277, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/14.bin is a file, 19 data chunks written
-Object 278, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/146.bin is a file, 19 data chunks written
-Object 279, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/64.bin is a file, 19 data chunks written
-Object 280, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/190.bin is a file, 19 data chunks written
-Object 281, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/22.bin is a file, 19 data chunks written
-Object 282, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/150.bin is a file, 19 data chunks written
-Object 283, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/15.bin is a file, 19 data chunks written
-Object 284, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/27.bin is a file, 19 data chunks written
-Object 285, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/4.bin is a file, 19 data chunks written
-Object 286, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/143.bin is a file, 19 data chunks written
-Object 287, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/77.bin is a file, 19 data chunks written
-Object 288, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/53.bin is a file, 19 data chunks written
-Object 289, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/194.bin is a file, 19 data chunks written
-Object 290, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/154.bin is a file, 19 data chunks written
-Object 291, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/92.bin is a file, 19 data chunks written
-Object 292, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/136.bin is a file, 19 data chunks written
-Object 293, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/199.bin is a file, 19 data chunks written
-Object 294, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/89.bin is a file, 19 data chunks written
-Object 295, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/132.bin is a file, 19 data chunks written
-Object 296, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/125.bin is a file, 19 data chunks written
-Object 297, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/156.bin is a file, 19 data chunks written
-Object 298, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/131.bin is a file, 19 data chunks written
-Object 299, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/43.bin is a file, 19 data chunks written
-Object 300, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/166.bin is a file, 19 data chunks written
-Object 301, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/187.bin is a file, 19 data chunks written
-Object 302, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/11.bin is a file, 19 data chunks written
-Object 303, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/115.bin is a file, 19 data chunks written
-Object 304, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/204.bin is a file, 19 data chunks written
-Object 305, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/76.bin is a file, 19 data chunks written
-Object 306, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/142.bin is a file, 19 data chunks written
-Object 307, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/82.bin is a file, 19 data chunks written
-Object 308, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/36.bin is a file, 19 data chunks written
-Object 309, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/108.bin is a file, 19 data chunks written
-Object 310, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/106.bin is a file, 19 data chunks written
-Object 311, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/72.bin is a file, 19 data chunks written
-Object 312, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/5.bin is a file, 19 data chunks written
-Object 313, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/109.bin is a file, 19 data chunks written
-Object 314, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/134.bin is a file, 19 data chunks written
-Object 315, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/191.bin is a file, 19 data chunks written
-Object 316, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/40.bin is a file, 19 data chunks written
-Object 317, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/73.bin is a file, 19 data chunks written
-Object 318, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/45.bin is a file, 19 data chunks written
-Object 319, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/37.bin is a file, 19 data chunks written
-Object 320, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/70.bin is a file, 19 data chunks written
-Object 321, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/169.bin is a file, 19 data chunks written
-Object 322, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/80.bin is a file, 19 data chunks written
-Object 323, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/29.bin is a file, 19 data chunks written
-Object 324, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/1.bin is a file, 19 data chunks written
-Object 325, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/8.bin is a file, 19 data chunks written
-Object 326, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/3.bin is a file, 19 data chunks written
-Object 327, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/171.bin is a file, 19 data chunks written
-Object 328, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/181.bin is a file, 19 data chunks written
-Object 329, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/161.bin is a file, 19 data chunks written
-Object 330, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/202.bin is a file, 19 data chunks written
-Object 331, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/48.bin is a file, 19 data chunks written
-Object 332, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/10.bin is a file, 19 data chunks written
-Object 333, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/87.bin is a file, 19 data chunks written
-Object 334, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/140.bin is a file, 19 data chunks written
-Object 335, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/160.bin is a file, 19 data chunks written
-Object 336, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/175.bin is a file, 19 data chunks written
-Object 337, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/138.bin is a file, 19 data chunks written
-Object 338, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/119.bin is a file, 19 data chunks written
-Object 339, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/13.bin is a file, 19 data chunks written
-Object 340, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/179.bin is a file, 19 data chunks written
-Object 341, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/6.bin is a file, 19 data chunks written
-Object 342, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/113.bin is a file, 19 data chunks written
-Object 343, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/41.bin is a file, 19 data chunks written
-Object 344, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/23.bin is a file, 19 data chunks written
-Object 345, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/153.bin is a file, 19 data chunks written
-Object 346, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/104.bin is a file, 19 data chunks written
-Object 347, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/116.bin is a file, 19 data chunks written
-Object 348, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/32.bin is a file, 19 data chunks written
-Object 349, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/188.bin is a file, 19 data chunks written
-Object 350, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/57.bin is a file, 19 data chunks written
-Object 351, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/75.bin is a file, 19 data chunks written
-Object 352, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/186.bin is a file, 19 data chunks written
-Object 353, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/62.bin is a file, 19 data chunks written
-Object 354, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/129.bin is a file, 19 data chunks written
-Object 355, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/112.bin is a file, 19 data chunks written
-Object 356, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/55.bin is a file, 19 data chunks written
-Object 357, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/67.bin is a file, 19 data chunks written
-Object 358, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/183.bin is a file, 19 data chunks written
-Object 359, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/133.bin is a file, 19 data chunks written
-Object 360, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/16.bin is a file, 19 data chunks written
-Object 361, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/9.bin is a file, 19 data chunks written
-Object 362, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/101.bin is a file, 19 data chunks written
-Object 363, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/98.bin is a file, 19 data chunks written
-Object 364, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/105.bin is a file, 19 data chunks written
-Object 365, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/155.bin is a file, 19 data chunks written
-Object 366, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/126.bin is a file, 19 data chunks written
-Object 367, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/147.bin is a file, 19 data chunks written
-Object 368, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/90.bin is a file, 19 data chunks written
-Object 369, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/52.bin is a file, 19 data chunks written
-Object 370, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/71.bin is a file, 19 data chunks written
-Object 371, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/149.bin is a file, 19 data chunks written
-Object 372, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/69.bin is a file, 19 data chunks written
-Object 373, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/18.bin is a file, 19 data chunks written
-Object 374, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/135.bin is a file, 19 data chunks written
-Object 375, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/151.bin is a file, 19 data chunks written
-Object 376, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/196.bin is a file, 19 data chunks written
-Object 377, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/165.bin is a file, 19 data chunks written
-Object 378, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/184.bin is a file, 19 data chunks written
-Object 379, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/137.bin is a file, 19 data chunks written
-Object 380, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/139.bin is a file, 19 data chunks written
-Object 381, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/144.bin is a file, 19 data chunks written
-Object 382, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/121.bin is a file, 19 data chunks written
-Object 383, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/205.bin is a file, 19 data chunks written
-Object 384, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/30.bin is a file, 19 data chunks written
-Object 385, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/172.bin is a file, 19 data chunks written
-Object 386, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/176.bin is a file, 19 data chunks written
-Object 387, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/26.bin is a file, 19 data chunks written
-Object 388, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/185.bin is a file, 19 data chunks written
-Object 389, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/157.bin is a file, 19 data chunks written
-Object 390, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/66.bin is a file, 19 data chunks written
-Object 391, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/93.bin is a file, 19 data chunks written
-Object 392, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/111.bin is a file, 19 data chunks written
-Object 393, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/195.bin is a file, 19 data chunks written
-Object 394, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/159.bin is a file, 19 data chunks written
-Object 395, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/152.bin is a file, 19 data chunks written
-Object 396, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/58.bin is a file, 19 data chunks written
-Object 397, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/180.bin is a file, 19 data chunks written
-Object 398, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/198.bin is a file, 19 data chunks written
-Object 399, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/117.bin is a file, 19 data chunks written
-Object 400, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/35.bin is a file, 19 data chunks written
-Object 401, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/20.bin is a file, 19 data chunks written
-Object 402, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/110.bin is a file, 19 data chunks written
-Object 403, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/44.bin is a file, 19 data chunks written
-Object 404, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/102.bin is a file, 19 data chunks written
-Object 405, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/173.bin is a file, 19 data chunks written
-Object 406, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/141.bin is a file, 19 data chunks written
-Object 407, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/79.bin is a file, 19 data chunks written
-Object 408, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/60.bin is a file, 19 data chunks written
-Object 409, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/120.bin is a file, 19 data chunks written
-Object 410, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/96.bin is a file, 19 data chunks written
-Object 411, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/56.bin is a file, 19 data chunks written
-Object 412, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/122.bin is a file, 19 data chunks written
-Object 413, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/31.bin is a file, 19 data chunks written
-Object 414, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/182.bin is a file, 19 data chunks written
-Object 415, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/47.bin is a file, 19 data chunks written
-Object 416, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/130.bin is a file, 19 data chunks written
-Object 417, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/94.bin is a file, 19 data chunks written
-Object 418, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/97.bin is a file, 19 data chunks written
-Object 419, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/59.bin is a file, 19 data chunks written
-Object 420, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/24.bin is a file, 19 data chunks written
-Object 421, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/86.bin is a file, 19 data chunks written
-Object 422, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/168.bin is a file, 19 data chunks written
-Object 423, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/46.bin is a file, 19 data chunks written
-Object 424, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/192.bin is a file, 19 data chunks written
-Object 425, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/38.bin is a file, 19 data chunks written
-Object 426, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/107.bin is a file, 19 data chunks written
-Object 427, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/170.bin is a file, 19 data chunks written
-Object 428, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/124.bin is a file, 19 data chunks written
-Object 429, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/50.bin is a file, 19 data chunks written
-Object 430, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/193.bin is a file, 19 data chunks written
-Object 431, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/203.bin is a file, 19 data chunks written
-Object 432, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/33.bin is a file, 19 data chunks written
-Object 433, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/123.bin is a file, 19 data chunks written
-Object 434, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/34.bin is a file, 19 data chunks written
-Object 435, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/148.bin is a file, 19 data chunks written
-Object 436, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/174.bin is a file, 19 data chunks written
-Object 437, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/51.bin is a file, 19 data chunks written
-Object 438, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/145.bin is a file, 19 data chunks written
-Object 439, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/88.bin is a file, 19 data chunks written
-Object 440, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/99.bin is a file, 19 data chunks written
-Object 441, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/2.bin is a file, 19 data chunks written
-Object 442, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/177.bin is a file, 19 data chunks written
-Object 443, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/103.bin is a file, 19 data chunks written
-Object 444, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/42.bin is a file, 19 data chunks written
-Object 445, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/127.bin is a file, 19 data chunks written
-Object 446, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/158.bin is a file, 19 data chunks written
-Object 447, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/7.bin is a file, 19 data chunks written
-Object 448, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/85.bin is a file, 19 data chunks written
-Object 449, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/167.bin is a file, 19 data chunks written
-Object 450, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/21.bin is a file, 19 data chunks written
-Object 451, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/17.bin is a file, 19 data chunks written
-Object 452, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/81.bin is a file, 19 data chunks written
-Object 453, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/63.bin is a file, 19 data chunks written
-Object 454, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/28.bin is a file, 19 data chunks written
-Object 455, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/83.bin is a file, 19 data chunks written
-Object 456, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/95.bin is a file, 19 data chunks written
-Object 457, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/19.bin is a file, 19 data chunks written
-Object 458, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/74.bin is a file, 19 data chunks written
-Object 459, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/61.bin is a file, 19 data chunks written
-Object 460, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/65.bin is a file, 19 data chunks written
-Object 461, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/91.bin is a file, 19 data chunks written
-Object 462, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/189.bin is a file, 19 data chunks written
-Object 463, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/197.bin is a file, 19 data chunks written
-Object 464, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/114.bin is a file, 19 data chunks written
-Object 465, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/164.bin is a file, 19 data chunks written
-Object 466, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/200.bin is a file, 19 data chunks written
-Object 467, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/118.bin is a file, 19 data chunks written
-Object 468, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/84.bin is a file, 19 data chunks written
-Object 469, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/25.bin is a file, 19 data chunks written
-Object 470, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/68.bin is a file, 19 data chunks written
-Object 471, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/128.bin is a file, 19 data chunks written
-Object 472, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/78.bin is a file, 19 data chunks written
-Object 473, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/49.bin is a file, 19 data chunks written
-Object 474, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/162.bin is a file, 19 data chunks written
-Object 475, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/12.bin is a file, 19 data chunks written
-Object 476, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/178.bin is a file, 19 data chunks written
-Object 477, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/39.bin is a file, 19 data chunks written
-Object 478, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/201.bin is a file, 19 data chunks written
-Object 479, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/54.bin is a file, 19 data chunks written
-Object 480, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/100.bin is a file, 19 data chunks written
-Object 481, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao/background/163.bin is a file, 19 data chunks written
-Object 482, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/KUMI is a directory
-Object 483, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/KUMI/background.bin is a file, 72 data chunks written
-Object 484, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/momo.json is a file, 2 data chunks written
-Object 485, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao.json is a file, 1 data chunks written
-Object 486, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/momo is a directory
-Object 487, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/momo/second.bin is a file, 3 data chunks written
-Object 488, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/momo/background.bin is a file, 72 data chunks written
-Object 489, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/momo/minute.bin is a file, 2 data chunks written
-Object 490, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/momo/hour.bin is a file, 2 data chunks written
-Object 491, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maomao.json is a file, 1 data chunks written
-Object 492, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud is a directory
-Object 493, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/four.bin is a file, 2 data chunks written
-Object 494, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/4.bin is a file, 2 data chunks written
-Object 495, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/six.bin is a file, 2 data chunks written
-Object 496, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/5.bin is a file, 2 data chunks written
-Object 497, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/nine.bin is a file, 2 data chunks written
-Object 498, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/seven.bin is a file, 2 data chunks written
-Object 499, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/1.bin is a file, 2 data chunks written
-Object 500, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/8.bin is a file, 2 data chunks written
-Object 501, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/3.bin is a file, 2 data chunks written
-Object 502, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/five.bin is a file, 2 data chunks written
-Object 503, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/6.bin is a file, 2 data chunks written
-Object 504, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/eight.bin is a file, 2 data chunks written
-Object 505, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/background.bin is a file, 72 data chunks written
-Object 506, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/two.bin is a file, 2 data chunks written
-Object 507, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/9.bin is a file, 2 data chunks written
-Object 508, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/0.bin is a file, 2 data chunks written
-Object 509, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/zero.bin is a file, 2 data chunks written
-Object 510, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/three.bin is a file, 2 data chunks written
-Object 511, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/2.bin is a file, 2 data chunks written
-Object 512, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/7.bin is a file, 2 data chunks written
-Object 513, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/point.bin is a file, 1 data chunks written
-Object 514, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud/one.bin is a file, 2 data chunks written
-Object 515, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/flowerbud.json is a file, 1 data chunks written
-Object 516, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/KUMI.json is a file, 1 data chunks written
-Object 517, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/Reducedgraph is a directory
-Object 518, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/Reducedgraph/KUMI.bin is a file, 23 data chunks written
-Object 519, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/Reducedgraph/momo.bin is a file, 23 data chunks written
-Object 520, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/Reducedgraph/maliao.bin is a file, 23 data chunks written
-Object 521, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/Reducedgraph/maomao.bin is a file, 23 data chunks written
-Object 522, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/Reducedgraph/flowerbud.bin is a file, 23 data chunks written
-Object 523, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/default.json is a file, 1 data chunks written
-Object 524, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao is a directory
-Object 525, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/4.bin is a file, 2 data chunks written
-Object 526, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/5.bin is a file, 2 data chunks written
-Object 527, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/1.bin is a file, 2 data chunks written
-Object 528, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/8.bin is a file, 2 data chunks written
-Object 529, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/3.bin is a file, 2 data chunks written
-Object 530, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/6.bin is a file, 2 data chunks written
-Object 531, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/background.bin is a file, 72 data chunks written
-Object 532, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/9.bin is a file, 2 data chunks written
-Object 533, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/0.bin is a file, 2 data chunks written
-Object 534, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/2.bin is a file, 2 data chunks written
-Object 535, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/7.bin is a file, 2 data chunks written
-Object 536, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clocks/maliao/point.bin is a file, 1 data chunks written
-Object 537, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_29.bin is a file, 11 data chunks written
-Object 538, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/GANTAN.bin is a file, 9 data chunks written
-Object 539, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_60.bin is a file, 11 data chunks written
-Object 540, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_42.bin is a file, 11 data chunks written
-Object 541, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown.bin is a file, 3 data chunks written
-Object 542, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_65.bin is a file, 11 data chunks written
-Object 543, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_06.bin is a file, 11 data chunks written
-Object 544, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_22.bin is a file, 4 data chunks written
-Object 545, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_24.bin is a file, 4 data chunks written
-Object 546, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_11.bin is a file, 7 data chunks written
-Object 547, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_15.bin is a file, 11 data chunks written
-Object 548, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/getpic.bin is a file, 3 data chunks written
-Object 549, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM_CheckOff.bin is a file, 4 data chunks written
-Object 550, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_70.bin is a file, 11 data chunks written
-Object 551, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/B024_011.bin is a file, 40 data chunks written
-Object 552, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_01.bin is a file, 11 data chunks written
-Object 553, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_08.bin is a file, 9 data chunks written
-Object 554, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_08.bin is a file, 11 data chunks written
-Object 555, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_51.bin is a file, 11 data chunks written
-Object 556, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_06.bin is a file, 11 data chunks written
-Object 557, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_67.bin is a file, 11 data chunks written
-Object 558, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind is a directory
-Object 559, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/REMIND_DRINK_WATER.bin is a file, 3 data chunks written
-Object 560, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin is a directory
-Object 561, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/14.bin is a file, 3 data chunks written
-Object 562, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/22.bin is a file, 3 data chunks written
-Object 563, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/15.bin is a file, 3 data chunks written
-Object 564, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/27.bin is a file, 3 data chunks written
-Object 565, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/4.bin is a file, 3 data chunks written
-Object 566, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/43.bin is a file, 3 data chunks written
-Object 567, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/11.bin is a file, 3 data chunks written
-Object 568, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/36.bin is a file, 3 data chunks written
-Object 569, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/5.bin is a file, 3 data chunks written
-Object 570, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/40.bin is a file, 3 data chunks written
-Object 571, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/45.bin is a file, 3 data chunks written
-Object 572, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/37.bin is a file, 3 data chunks written
-Object 573, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/29.bin is a file, 3 data chunks written
-Object 574, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/1.bin is a file, 3 data chunks written
-Object 575, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/8.bin is a file, 3 data chunks written
-Object 576, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/3.bin is a file, 3 data chunks written
-Object 577, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/48.bin is a file, 3 data chunks written
-Object 578, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/10.bin is a file, 3 data chunks written
-Object 579, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/13.bin is a file, 3 data chunks written
-Object 580, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/6.bin is a file, 3 data chunks written
-Object 581, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/41.bin is a file, 3 data chunks written
-Object 582, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/23.bin is a file, 3 data chunks written
-Object 583, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/32.bin is a file, 3 data chunks written
-Object 584, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/16.bin is a file, 3 data chunks written
-Object 585, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/9.bin is a file, 3 data chunks written
-Object 586, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/52.bin is a file, 3 data chunks written
-Object 587, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/18.bin is a file, 3 data chunks written
-Object 588, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/30.bin is a file, 3 data chunks written
-Object 589, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/26.bin is a file, 3 data chunks written
-Object 590, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/35.bin is a file, 3 data chunks written
-Object 591, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/20.bin is a file, 3 data chunks written
-Object 592, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/44.bin is a file, 3 data chunks written
-Object 593, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/31.bin is a file, 3 data chunks written
-Object 594, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/47.bin is a file, 3 data chunks written
-Object 595, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/24.bin is a file, 3 data chunks written
-Object 596, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/46.bin is a file, 3 data chunks written
-Object 597, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/38.bin is a file, 3 data chunks written
-Object 598, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/50.bin is a file, 3 data chunks written
-Object 599, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/33.bin is a file, 3 data chunks written
-Object 600, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/34.bin is a file, 3 data chunks written
-Object 601, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/51.bin is a file, 3 data chunks written
-Object 602, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/2.bin is a file, 3 data chunks written
-Object 603, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/42.bin is a file, 3 data chunks written
-Object 604, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/7.bin is a file, 3 data chunks written
-Object 605, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/21.bin is a file, 3 data chunks written
-Object 606, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/17.bin is a file, 3 data chunks written
-Object 607, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/28.bin is a file, 3 data chunks written
-Object 608, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/19.bin is a file, 3 data chunks written
-Object 609, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/25.bin is a file, 3 data chunks written
-Object 610, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/49.bin is a file, 3 data chunks written
-Object 611, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/12.bin is a file, 3 data chunks written
-Object 612, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/remind/unbind_bin/39.bin is a file, 3 data chunks written
-Object 613, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/DELETE.bin is a file, 9 data chunks written
-Object 614, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_13.bin is a file, 7 data chunks written
-Object 615, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/sport.bin is a file, 3 data chunks written
-Object 616, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_57.bin is a file, 11 data chunks written
-Object 617, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_02.bin is a file, 11 data chunks written
-Object 618, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_REV_POINTER.bin is a file, 1 data chunks written
-Object 619, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/POP_UP_CLOCK.bin is a file, 8 data chunks written
-Object 620, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/STEPS_IMAGE.bin is a file, 25 data chunks written
-Object 621, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_02.bin is a file, 11 data chunks written
-Object 622, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown is a directory
-Object 623, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWN_BUTTON.bin is a file, 16 data chunks written
-Object 624, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWM_TEN_MINUTE.bin is a file, 11 data chunks written
-Object 625, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWM_END.bin is a file, 4 data chunks written
-Object 626, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWM_PLAY.bin is a file, 4 data chunks written
-Object 627, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWM_PAUSE.bin is a file, 4 data chunks written
-Object 628, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWM_VECTOR.bin is a file, 1 data chunks written
-Object 629, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWN_COLONE.bin is a file, 1 data chunks written
-Object 630, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWM_RESET.bin is a file, 4 data chunks written
-Object 631, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWM_FIVE_MINUTE.bin is a file, 11 data chunks written
-Object 632, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWM_ONE_MINUTE.bin is a file, 11 data chunks written
-Object 633, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWN_ATTENTION.bin is a file, 3 data chunks written
-Object 634, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/countdown/COUNTDOWM_THIRTY_MINUTE.bin is a file, 11 data chunks written
-Object 635, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/PROGRESS_BAR_TMAGE.bin is a file, 7 data chunks written
-Object 636, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SETTTING_REBOOT.bin is a file, 2 data chunks written
-Object 637, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/red.bin is a file, 11 data chunks written
-Object 638, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training record.bin is a file, 3 data chunks written
-Object 639, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_MEASURE.bin is a file, 12 data chunks written
-Object 640, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/MICRO_PHONE_CLOSE.bin is a file, 10 data chunks written
-Object 641, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_36.bin is a file, 11 data chunks written
-Object 642, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clock is a directory
-Object 643, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clock/clock.bin is a file, 142 data chunks written
-Object 644, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_31.bin is a file, 11 data chunks written
-Object 645, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/logo.bin is a file, 38 data chunks written
-Object 646, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_35.bin is a file, 11 data chunks written
-Object 647, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SHUTDOWN_BUTTON.bin is a file, 7 data chunks written
-Object 648, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_LITTLE_MEASURE.bin is a file, 3 data chunks written
-Object 649, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/WALK_BACK_GROUND.bin is a file, 204 data chunks written
-Object 650, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTHEAR.bin is a file, 7 data chunks written
-Object 651, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_10.bin is a file, 10 data chunks written
-Object 652, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_MEASURE_ING.bin is a file, 15 data chunks written
-Object 653, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_15.bin is a file, 10 data chunks written
-Object 654, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_20.bin is a file, 10 data chunks written
-Object 655, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/MICRO_PHONE_OPEN.bin is a file, 10 data chunks written
-Object 656, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/dial.bin is a file, 3 data chunks written
-Object 657, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/run3.bin is a file, 31 data chunks written
-Object 658, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/clock.bin is a file, 3 data chunks written
-Object 659, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_19.bin is a file, 4 data chunks written
-Object 660, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/REBOOT_BUTTON.bin is a file, 7 data chunks written
-Object 661, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_21.bin is a file, 10 data chunks written
-Object 662, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_09.bin is a file, 10 data chunks written
-Object 663, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/bloodpressure.bin is a file, 3 data chunks written
-Object 664, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/MEDIA_VOLUME.bin is a file, 13 data chunks written
-Object 665, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/NO_CALLER_LOG_IMAGE.bin is a file, 204 data chunks written
-Object 666, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/training.bin is a file, 3 data chunks written
-Object 667, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM_ABOUT_THE_WATCH.bin is a file, 13 data chunks written
-Object 668, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_69.bin is a file, 11 data chunks written
-Object 669, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COMPASS_CALIBRATE_IMAGE.bin is a file, 68 data chunks written
-Object 670, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEART_IMAGE.bin is a file, 25 data chunks written
-Object 671, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_09.bin is a file, 11 data chunks written
-Object 672, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_03.bin is a file, 11 data chunks written
-Object 673, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/A094_051_8888.bin is a file, 97 data chunks written
-Object 674, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM_CheckOn.bin is a file, 4 data chunks written
-Object 675, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_52.bin is a file, 11 data chunks written
-Object 676, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_12.bin is a file, 11 data chunks written
-Object 677, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_14.bin is a file, 11 data chunks written
-Object 678, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SOUND_VIBRATION.bin is a file, 2 data chunks written
-Object 679, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/POOR_SIGNAL_OPEN.bin is a file, 6 data chunks written
-Object 680, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_64.bin is a file, 11 data chunks written
-Object 681, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_56.bin is a file, 11 data chunks written
-Object 682, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_03.bin is a file, 10 data chunks written
-Object 683, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Blood is a directory
-Object 684, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Blood/SaO2.bin is a file, 20 data chunks written
-Object 685, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Blood/Vector.bin is a file, 1 data chunks written
-Object 686, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Blood/boutton.bin is a file, 16 data chunks written
-Object 687, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Blood/Error.bin is a file, 3 data chunks written
-Object 688, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Blood/beijing.bin is a file, 72 data chunks written
-Object 689, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM_REBOOT.bin is a file, 13 data chunks written
-Object 690, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_01.bin is a file, 5 data chunks written
-Object 691, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_15.bin is a file, 4 data chunks written
-Object 692, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_04.bin is a file, 4 data chunks written
-Object 693, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_01.bin is a file, 9 data chunks written
-Object 694, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/GENERIC_SIGNAL_ENCRYPTION.bin is a file, 6 data chunks written
-Object 695, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Bluetooth.bin is a file, 3 data chunks written
-Object 696, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_14.bin is a file, 4 data chunks written
-Object 697, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TIME_IMAGE.bin is a file, 25 data chunks written
-Object 698, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SHOE_IMAGE.bin is a file, 2 data chunks written
-Object 699, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_14.bin is a file, 9 data chunks written
-Object 700, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_23.bin is a file, 11 data chunks written
-Object 701, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_54.bin is a file, 11 data chunks written
-Object 702, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SECONDHAND.bin is a file, 17 data chunks written
-Object 703, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather.bin is a file, 3 data chunks written
-Object 704, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CHECKBOX_OFF.bin is a file, 1 data chunks written
-Object 705, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SETTING_BACKGROUND.bin is a file, 13 data chunks written
-Object 706, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CALLER_LOG_IMAGE.bin is a file, 10 data chunks written
-Object 707, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/blood.bin is a file, 3 data chunks written
-Object 708, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM_SYSTEM_LANGUAGE.bin is a file, 13 data chunks written
-Object 709, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CALLING_PHONE.bin is a file, 3 data chunks written
-Object 710, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_24.bin is a file, 11 data chunks written
-Object 711, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_16.bin is a file, 9 data chunks written
-Object 712, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CS_A094_051_8888_abypass.bin is a file, 48 data chunks written
-Object 713, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/B024_009.bin is a file, 40 data chunks written
-Object 714, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM_FACTORY_RESET.bin is a file, 13 data chunks written
-Object 715, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/FULL_SIGNAL_OPEN.bin is a file, 6 data chunks written
-Object 716, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SPEED_IMAGE.bin is a file, 25 data chunks written
-Object 717, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_POINT.bin is a file, 1 data chunks written
-Object 718, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_02.bin is a file, 9 data chunks written
-Object 719, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/POOR_SIGNAL_ENCRYPTION.bin is a file, 6 data chunks written
-Object 720, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_04.bin is a file, 9 data chunks written
-Object 721, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_04.bin is a file, 10 data chunks written
-Object 722, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_16.bin is a file, 7 data chunks written
-Object 723, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CALL_VOLUME.bin is a file, 13 data chunks written
-Object 724, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record is a directory
-Object 725, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/RECORD_PLAY_VOLUME.bin is a file, 1 data chunks written
-Object 726, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/RECORD3.bin is a file, 10 data chunks written
-Object 727, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/RECORD_PLAY_BACKGROUND.bin is a file, 72 data chunks written
-Object 728, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/UNIVERSAL_PLAY.bin is a file, 1 data chunks written
-Object 729, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/RECORD1.bin is a file, 9 data chunks written
-Object 730, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/RECORD2.bin is a file, 5 data chunks written
-Object 731, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/animator1.bin is a file, 1 data chunks written
-Object 732, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/RECORD_PLAY_NEXT.bin is a file, 1 data chunks written
-Object 733, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/RECORD_PLAY_DELETE.bin is a file, 1 data chunks written
-Object 734, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/RECORD_DELETE_BACKGROUND.bin is a file, 72 data chunks written
-Object 735, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/animator2.bin is a file, 3 data chunks written
-Object 736, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/UNIVERSAL_PAUSE.bin is a file, 1 data chunks written
-Object 737, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Record/RECORD_PLAY_PROVE.bin is a file, 1 data chunks written
-Object 738, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_63.bin is a file, 11 data chunks written
-Object 739, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_06.bin is a file, 4 data chunks written
-Object 740, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/APPLIST_COMPASS_IMAGE.bin is a file, 7 data chunks written
-Object 741, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/FastTrainingAttentionVector.bin is a file, 3 data chunks written
-Object 742, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_44.bin is a file, 11 data chunks written
-Object 743, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_10.bin is a file, 11 data chunks written
-Object 744, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_16.bin is a file, 10 data chunks written
-Object 745, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player is a directory
-Object 746, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage is a directory
-Object 747, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/14.bin is a file, 4 data chunks written
-Object 748, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/64.bin is a file, 4 data chunks written
-Object 749, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/22.bin is a file, 4 data chunks written
-Object 750, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/15.bin is a file, 4 data chunks written
-Object 751, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/27.bin is a file, 4 data chunks written
-Object 752, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/4.bin is a file, 4 data chunks written
-Object 753, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/77.bin is a file, 4 data chunks written
-Object 754, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/53.bin is a file, 4 data chunks written
-Object 755, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/92.bin is a file, 4 data chunks written
-Object 756, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/89.bin is a file, 4 data chunks written
-Object 757, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/43.bin is a file, 4 data chunks written
-Object 758, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/11.bin is a file, 4 data chunks written
-Object 759, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/115.bin is a file, 4 data chunks written
-Object 760, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/76.bin is a file, 4 data chunks written
-Object 761, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/82.bin is a file, 4 data chunks written
-Object 762, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/36.bin is a file, 4 data chunks written
-Object 763, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/108.bin is a file, 4 data chunks written
-Object 764, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/106.bin is a file, 4 data chunks written
-Object 765, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/72.bin is a file, 4 data chunks written
-Object 766, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/5.bin is a file, 4 data chunks written
-Object 767, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/109.bin is a file, 4 data chunks written
-Object 768, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/40.bin is a file, 4 data chunks written
-Object 769, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/73.bin is a file, 4 data chunks written
-Object 770, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/45.bin is a file, 4 data chunks written
-Object 771, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/37.bin is a file, 4 data chunks written
-Object 772, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/70.bin is a file, 4 data chunks written
-Object 773, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/80.bin is a file, 4 data chunks written
-Object 774, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/29.bin is a file, 4 data chunks written
-Object 775, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/1.bin is a file, 4 data chunks written
-Object 776, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/8.bin is a file, 4 data chunks written
-Object 777, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/3.bin is a file, 4 data chunks written
-Object 778, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/48.bin is a file, 4 data chunks written
-Object 779, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/10.bin is a file, 4 data chunks written
-Object 780, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/87.bin is a file, 4 data chunks written
-Object 781, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/119.bin is a file, 4 data chunks written
-Object 782, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/13.bin is a file, 4 data chunks written
-Object 783, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/6.bin is a file, 4 data chunks written
-Object 784, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/113.bin is a file, 4 data chunks written
-Object 785, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/41.bin is a file, 4 data chunks written
-Object 786, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/23.bin is a file, 4 data chunks written
-Object 787, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/104.bin is a file, 4 data chunks written
-Object 788, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/116.bin is a file, 4 data chunks written
-Object 789, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/32.bin is a file, 4 data chunks written
-Object 790, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/57.bin is a file, 4 data chunks written
-Object 791, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/75.bin is a file, 4 data chunks written
-Object 792, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/62.bin is a file, 4 data chunks written
-Object 793, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/112.bin is a file, 4 data chunks written
-Object 794, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/55.bin is a file, 4 data chunks written
-Object 795, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/67.bin is a file, 4 data chunks written
-Object 796, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/16.bin is a file, 4 data chunks written
-Object 797, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/9.bin is a file, 4 data chunks written
-Object 798, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/101.bin is a file, 4 data chunks written
-Object 799, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/98.bin is a file, 4 data chunks written
-Object 800, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/105.bin is a file, 4 data chunks written
-Object 801, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/90.bin is a file, 4 data chunks written
-Object 802, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/52.bin is a file, 4 data chunks written
-Object 803, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/71.bin is a file, 4 data chunks written
-Object 804, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/69.bin is a file, 4 data chunks written
-Object 805, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/18.bin is a file, 4 data chunks written
-Object 806, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/30.bin is a file, 4 data chunks written
-Object 807, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/26.bin is a file, 4 data chunks written
-Object 808, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/66.bin is a file, 4 data chunks written
-Object 809, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/93.bin is a file, 4 data chunks written
-Object 810, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/111.bin is a file, 4 data chunks written
-Object 811, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/58.bin is a file, 4 data chunks written
-Object 812, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/117.bin is a file, 4 data chunks written
-Object 813, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/35.bin is a file, 4 data chunks written
-Object 814, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/20.bin is a file, 4 data chunks written
-Object 815, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/110.bin is a file, 4 data chunks written
-Object 816, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/44.bin is a file, 4 data chunks written
-Object 817, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/102.bin is a file, 4 data chunks written
-Object 818, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/79.bin is a file, 4 data chunks written
-Object 819, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/60.bin is a file, 4 data chunks written
-Object 820, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/120.bin is a file, 4 data chunks written
-Object 821, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/96.bin is a file, 4 data chunks written
-Object 822, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/56.bin is a file, 4 data chunks written
-Object 823, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/31.bin is a file, 4 data chunks written
-Object 824, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/47.bin is a file, 4 data chunks written
-Object 825, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/94.bin is a file, 4 data chunks written
-Object 826, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/97.bin is a file, 4 data chunks written
-Object 827, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/59.bin is a file, 4 data chunks written
-Object 828, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/24.bin is a file, 4 data chunks written
-Object 829, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/86.bin is a file, 4 data chunks written
-Object 830, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/46.bin is a file, 4 data chunks written
-Object 831, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/38.bin is a file, 4 data chunks written
-Object 832, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/107.bin is a file, 4 data chunks written
-Object 833, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/50.bin is a file, 4 data chunks written
-Object 834, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/33.bin is a file, 4 data chunks written
-Object 835, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/34.bin is a file, 4 data chunks written
-Object 836, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/51.bin is a file, 4 data chunks written
-Object 837, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/88.bin is a file, 4 data chunks written
-Object 838, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/99.bin is a file, 4 data chunks written
-Object 839, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/2.bin is a file, 4 data chunks written
-Object 840, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/103.bin is a file, 4 data chunks written
-Object 841, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/42.bin is a file, 4 data chunks written
-Object 842, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/7.bin is a file, 4 data chunks written
-Object 843, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/85.bin is a file, 4 data chunks written
-Object 844, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/21.bin is a file, 4 data chunks written
-Object 845, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/17.bin is a file, 4 data chunks written
-Object 846, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/81.bin is a file, 4 data chunks written
-Object 847, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/63.bin is a file, 4 data chunks written
-Object 848, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/28.bin is a file, 4 data chunks written
-Object 849, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/83.bin is a file, 4 data chunks written
-Object 850, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/95.bin is a file, 4 data chunks written
-Object 851, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/19.bin is a file, 4 data chunks written
-Object 852, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/74.bin is a file, 4 data chunks written
-Object 853, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/61.bin is a file, 4 data chunks written
-Object 854, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/65.bin is a file, 4 data chunks written
-Object 855, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/91.bin is a file, 4 data chunks written
-Object 856, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/114.bin is a file, 4 data chunks written
-Object 857, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/118.bin is a file, 4 data chunks written
-Object 858, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/84.bin is a file, 4 data chunks written
-Object 859, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/25.bin is a file, 4 data chunks written
-Object 860, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/68.bin is a file, 4 data chunks written
-Object 861, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/78.bin is a file, 4 data chunks written
-Object 862, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/49.bin is a file, 4 data chunks written
-Object 863, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/12.bin is a file, 4 data chunks written
-Object 864, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/39.bin is a file, 4 data chunks written
-Object 865, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/54.bin is a file, 4 data chunks written
-Object 866, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/BtReconnectImage/100.bin is a file, 4 data chunks written
-Object 867, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/player/player.bin is a file, 98 data chunks written
-Object 868, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_11.bin is a file, 4 data chunks written
-Object 869, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_19.bin is a file, 10 data chunks written
-Object 870, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TOGGLEBUTTON_OFF.bin is a file, 2 data chunks written
-Object 871, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_26.bin is a file, 11 data chunks written
-Object 872, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/INDOORWALK.bin is a file, 32 data chunks written
-Object 873, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_01.bin is a file, 7 data chunks written
-Object 874, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/APPLIST_VOCASSIST_IMAGE.bin is a file, 7 data chunks written
-Object 875, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/whilte.bin is a file, 13 data chunks written
-Object 876, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_16.bin is a file, 11 data chunks written
-Object 877, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_25.bin is a file, 11 data chunks written
-Object 878, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_31.bin is a file, 4 data chunks written
-Object 879, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/WATCH_IMAGE.bin is a file, 6 data chunks written
-Object 880, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_39.bin is a file, 11 data chunks written
-Object 881, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_IMAGE.bin is a file, 3 data chunks written
-Object 882, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/ANSWER_PHONE.bin is a file, 3 data chunks written
-Object 883, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/DISPLAY_BRIGHTNESS.bin is a file, 2 data chunks written
-Object 884, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_14.bin is a file, 7 data chunks written
-Object 885, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CS_A094_051_888_abypass.bin is a file, 24 data chunks written
-Object 886, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_11.bin is a file, 9 data chunks written
-Object 887, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_20.bin is a file, 4 data chunks written
-Object 888, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_10.bin is a file, 9 data chunks written
-Object 889, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HarmonyOS_Sans_Light_Italic.ttf is a file, 70 data chunks written
-Object 890, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_12.bin is a file, 9 data chunks written
-Object 891, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_12.bin is a file, 7 data chunks written
-Object 892, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_EXIT.bin is a file, 3 data chunks written
-Object 893, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/run2.bin is a file, 16 data chunks written
-Object 894, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BringhtnessContuolVector.bin is a file, 1 data chunks written
-Object 895, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_04.bin is a file, 11 data chunks written
-Object 896, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_01.bin is a file, 10 data chunks written
-Object 897, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_05.bin is a file, 9 data chunks written
-Object 898, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/setting.bin is a file, 3 data chunks written
-Object 899, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_13.bin is a file, 10 data chunks written
-Object 900, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SETTING_NEXT.bin is a file, 1 data chunks written
-Object 901, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SETTING_BLUETOOTH.bin is a file, 2 data chunks written
-Object 902, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_BACKGROUND.bin is a file, 68 data chunks written
-Object 903, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_06.bin is a file, 9 data chunks written
-Object 904, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_WARN.bin is a file, 2 data chunks written
-Object 905, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/record.bin is a file, 3 data chunks written
-Object 906, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_71.bin is a file, 11 data chunks written
-Object 907, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_13.bin is a file, 9 data chunks written
-Object 908, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_49.bin is a file, 11 data chunks written
-Object 909, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_38.bin is a file, 11 data chunks written
-Object 910, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VolumeControlVector.bin is a file, 1 data chunks written
-Object 911, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/OPTIONS_BOX2.bin is a file, 20 data chunks written
-Object 912, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_ICON_ENTER.bin is a file, 7 data chunks written
-Object 913, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_45.bin is a file, 11 data chunks written
-Object 914, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_33.bin is a file, 11 data chunks written
-Object 915, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_ROTATE.bin is a file, 3 data chunks written
-Object 916, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_17.bin is a file, 4 data chunks written
-Object 917, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_TRUE.bin is a file, 3 data chunks written
-Object 918, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_14.bin is a file, 10 data chunks written
-Object 919, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_58.bin is a file, 11 data chunks written
-Object 920, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/GENERIC_SIGNAL_OPEN.bin is a file, 6 data chunks written
-Object 921, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_04.bin is a file, 11 data chunks written
-Object 922, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_32.bin is a file, 4 data chunks written
-Object 923, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_17.bin is a file, 10 data chunks written
-Object 924, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/line_cj.brk is a file, 24 data chunks written
-Object 925, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_47.bin is a file, 11 data chunks written
-Object 926, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_43.bin is a file, 11 data chunks written
-Object 927, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/PHONE_IMAGE.bin is a file, 6 data chunks written
-Object 928, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_37.bin is a file, 11 data chunks written
-Object 929, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HOURHAND.bin is a file, 17 data chunks written
-Object 930, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_REPORT.bin is a file, 21 data chunks written
-Object 931, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_50.bin is a file, 11 data chunks written
-Object 932, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM_SUPERVISE.bin is a file, 13 data chunks written
-Object 933, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/ROTATE_CENTER_IMAGE.bin is a file, 28 data chunks written
-Object 934, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_12.bin is a file, 4 data chunks written
-Object 935, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM_FactoryReset.bin is a file, 72 data chunks written
-Object 936, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/MINUTEHAND.bin is a file, 17 data chunks written
-Object 937, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CONNECT_PHONE.bin is a file, 2 data chunks written
-Object 938, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_16.bin is a file, 4 data chunks written
-Object 939, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SELECTION_BOX.bin is a file, 7 data chunks written
-Object 940, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH.bin is a file, 3 data chunks written
-Object 941, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/music.bin is a file, 3 data chunks written
-Object 942, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_05.bin is a file, 4 data chunks written
-Object 943, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/AGREEING.bin is a file, 10 data chunks written
-Object 944, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/phone.bin is a file, 3 data chunks written
-Object 945, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_20.bin is a file, 11 data chunks written
-Object 946, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone is a directory
-Object 947, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/4.bin is a file, 3 data chunks written
-Object 948, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/Phone_Ring.bin is a file, 7 data chunks written
-Object 949, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/phone-off.bin is a file, 1 data chunks written
-Object 950, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/5.bin is a file, 3 data chunks written
-Object 951, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/1.bin is a file, 3 data chunks written
-Object 952, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/8.bin is a file, 3 data chunks written
-Object 953, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/3.bin is a file, 3 data chunks written
-Object 954, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/voice-no.bin is a file, 1 data chunks written
-Object 955, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/del.bin is a file, 3 data chunks written
-Object 956, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/6.bin is a file, 3 data chunks written
-Object 957, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/microphone-no.bin is a file, 1 data chunks written
-Object 958, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/little-girl.bin is a file, 2 data chunks written
-Object 959, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/little-boy.bin is a file, 2 data chunks written
-Object 960, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/call.bin is a file, 3 data chunks written
-Object 961, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/9.bin is a file, 3 data chunks written
-Object 962, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/0.bin is a file, 3 data chunks written
-Object 963, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/microphone.bin is a file, 1 data chunks written
-Object 964, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/boy.bin is a file, 8 data chunks written
-Object 965, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/phone-call.bin is a file, 1 data chunks written
-Object 966, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/phonedir.bin is a file, 8 data chunks written
-Object 967, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/girl.bin is a file, 8 data chunks written
-Object 968, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/phone-call1.bin is a file, 1 data chunks written
-Object 969, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/phone-off-round.bin is a file, 3 data chunks written
-Object 970, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/2.bin is a file, 3 data chunks written
-Object 971, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/7.bin is a file, 3 data chunks written
-Object 972, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/21-avatar-outline 1.bin is a file, 8 data chunks written
-Object 973, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/voice.bin is a file, 1 data chunks written
-Object 974, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Phone/Phone_Call.bin is a file, 7 data chunks written
-Object 975, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/FULL_SIGNAL_ENCRYPTION.bin is a file, 6 data chunks written
-Object 976, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_09.bin is a file, 9 data chunks written
-Object 977, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_19.bin is a file, 9 data chunks written
-Object 978, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_07.bin is a file, 11 data chunks written
-Object 979, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CORRESPONDENCE_DEGREE.bin is a file, 2 data chunks written
-Object 980, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_32.bin is a file, 11 data chunks written
-Object 981, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_30.bin is a file, 11 data chunks written
-Object 982, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_27.bin is a file, 4 data chunks written
-Object 983, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/earth.bin is a file, 68 data chunks written
-Object 984, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_07.bin is a file, 9 data chunks written
-Object 985, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_12.bin is a file, 10 data chunks written
-Object 986, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/APPLIST_ALARM.bin is a file, 7 data chunks written
-Object 987, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_25.bin is a file, 4 data chunks written
-Object 988, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_18.bin is a file, 10 data chunks written
-Object 989, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_23.bin is a file, 4 data chunks written
-Object 990, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_03.bin is a file, 11 data chunks written
-Object 991, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_17.bin is a file, 11 data chunks written
-Object 992, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/OPTIONS_BOX1.bin is a file, 13 data chunks written
-Object 993, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/ui_list_fps_res.bin is a file, 17 data chunks written
-Object 994, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/APPLIST_CALLER_IMAGE.bin is a file, 7 data chunks written
-Object 995, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_15.bin is a file, 7 data chunks written
-Object 996, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_22.bin is a file, 10 data chunks written
-Object 997, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_ICON_ENTER.bin is a file, 19 data chunks written
-Object 998, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/OPTIONS_BOX4.bin is a file, 35 data chunks written
-Object 999, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/boold oxygen.bin is a file, 3 data chunks written
-Object 1000, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUE_ADD.bin is a file, 9 data chunks written
-Object 1001, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SETTTING_SHUTDOWN.bin is a file, 2 data chunks written
-Object 1002, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather is a directory
-Object 1003, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_unknown.bin is a file, 2 data chunks written
-Object 1004, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_snow.bin is a file, 2 data chunks written
-Object 1005, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_HAZE.bin is a file, 6 data chunks written
-Object 1006, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_BACKGROUND.bin is a file, 72 data chunks written
-Object 1007, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_sunny-cloudy.bin is a file, 2 data chunks written
-Object 1008, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_HUMIDITY.bin is a file, 2 data chunks written
-Object 1009, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_CLEAR-CLOUDY.bin is a file, 6 data chunks written
-Object 1010, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_THUNDERSHOWER.bin is a file, 6 data chunks written
-Object 1011, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_thundershower.bin is a file, 2 data chunks written
-Object 1012, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_clear-sunny.bin is a file, 2 data chunks written
-Object 1013, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_OVERCAST.bin is a file, 6 data chunks written
-Object 1014, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_sunny.bin is a file, 2 data chunks written
-Object 1015, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_FOGGY.bin is a file, 6 data chunks written
-Object 1016, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_foggy.bin is a file, 2 data chunks written
-Object 1017, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_DUSTSTORM.bin is a file, 6 data chunks written
-Object 1018, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_haze.bin is a file, 2 data chunks written
-Object 1019, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_RAIN.bin is a file, 6 data chunks written
-Object 1020, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_CLEAR-SUNNY.bin is a file, 6 data chunks written
-Object 1021, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_UNKNOWN.bin is a file, 6 data chunks written
-Object 1022, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_SNOW.bin is a file, 6 data chunks written
-Object 1023, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_clear-cloudy.bin is a file, 2 data chunks written
-Object 1024, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_duststorm.bin is a file, 2 data chunks written
-Object 1025, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_WINDSPEED.bin is a file, 2 data chunks written
-Object 1026, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_overcast.bin is a file, 2 data chunks written
-Object 1027, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/weather_rain.bin is a file, 2 data chunks written
-Object 1028, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_UVI.bin is a file, 2 data chunks written
-Object 1029, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_SUNNY.bin is a file, 6 data chunks written
-Object 1030, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/weather/WEATHER_SUNNY-CLOUNDY.bin is a file, 6 data chunks written
-Object 1031, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HarmonyOS_Sans_SC_Regular.ttf is a file, 4034 data chunks written
-Object 1032, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/NEW_DEVICE.bin is a file, 16 data chunks written
-Object 1033, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_TITLE.bin is a file, 2 data chunks written
-Object 1034, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/heart is a directory
-Object 1035, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/heart/heart.bin is a file, 34 data chunks written
-Object 1036, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/haha.bin is a file, 3 data chunks written
-Object 1037, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_21.bin is a file, 11 data chunks written
-Object 1038, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_15.bin is a file, 9 data chunks written
-Object 1039, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_08.bin is a file, 11 data chunks written
-Object 1040, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_05.bin is a file, 11 data chunks written
-Object 1041, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_19.bin is a file, 11 data chunks written
-Object 1042, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/APPLIST_SPO2.bin is a file, 7 data chunks written
-Object 1043, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_02.bin is a file, 4 data chunks written
-Object 1044, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_59.bin is a file, 11 data chunks written
-Object 1045, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_66.bin is a file, 11 data chunks written
-Object 1046, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/backGround.bin is a file, 876 data chunks written
-Object 1047, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/OPEN_LOGO.bin is a file, 412 data chunks written
-Object 1048, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_ABOUT_STUDY.bin is a file, 3 data chunks written
-Object 1049, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/tiger_path.bin is a file, 82 data chunks written
-Object 1050, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_13.bin is a file, 11 data chunks written
-Object 1051, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/dropdown is a directory
-Object 1052, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/dropdown/dropdown.bin is a file, 9 data chunks written
-Object 1053, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_03.bin is a file, 9 data chunks written
-Object 1054, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM_VOLUME.bin is a file, 13 data chunks written
-Object 1055, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CLOSE_RING_CLOCK.bin is a file, 13 data chunks written
-Object 1056, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SOUND_IMAGE.bin is a file, 8 data chunks written
-Object 1057, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_34.bin is a file, 11 data chunks written
-Object 1058, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_02.bin is a file, 10 data chunks written
-Object 1059, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_10.bin is a file, 7 data chunks written
-Object 1060, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/chronometer.bin is a file, 3 data chunks written
-Object 1061, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_05.bin is a file, 11 data chunks written
-Object 1062, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/QUICK_ACCESS.bin is a file, 2 data chunks written
-Object 1063, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_WAITING.bin is a file, 15 data chunks written
-Object 1064, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_21.bin is a file, 4 data chunks written
-Object 1065, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM.bin is a file, 2 data chunks written
-Object 1066, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/OPEN_LOGO_QSPI.bin is a file, 150 data chunks written
-Object 1067, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/MAIN_FACE_IMAGE.bin is a file, 204 data chunks written
-Object 1068, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/RIGHT.bin is a file, 9 data chunks written
-Object 1069, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BT_LIST.bin is a file, 29 data chunks written
-Object 1070, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_UP_DROP.bin is a file, 1 data chunks written
-Object 1071, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/DISSGREE.bin is a file, 10 data chunks written
-Object 1072, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CHECKBOX_ON.bin is a file, 1 data chunks written
-Object 1073, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/run1.bin is a file, 22 data chunks written
-Object 1074, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Save_Ele is a directory
-Object 1075, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Save_Ele/Save_Error.bin is a file, 4 data chunks written
-Object 1076, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Save_Ele/Battery-E.bin is a file, 1 data chunks written
-Object 1077, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Save_Ele/finger.bin is a file, 2 data chunks written
-Object 1078, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Save_Ele/finger2.bin is a file, 2 data chunks written
-Object 1079, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Save_Ele/wathch.bin is a file, 4 data chunks written
-Object 1080, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Save_Ele/Battery-F.bin is a file, 1 data chunks written
-Object 1081, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Save_Ele/Save_Right.bin is a file, 4 data chunks written
-Object 1082, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Save_Ele/SaveEle.bin is a file, 3 data chunks written
-Object 1083, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_09.bin is a file, 7 data chunks written
-Object 1084, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_18.bin is a file, 4 data chunks written
-Object 1085, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_07.bin is a file, 4 data chunks written
-Object 1086, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE_07.bin is a file, 11 data chunks written
-Object 1087, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_28.bin is a file, 4 data chunks written
-Object 1088, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HarmonyOS_Sans_Naskh_Arabic_Light.ttf is a file, 60 data chunks written
-Object 1089, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/B024_010.bin is a file, 40 data chunks written
-Object 1090, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/RING_CLOCK.bin is a file, 8 data chunks written
-Object 1091, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_IMAGE.bin is a file, 6 data chunks written
-Object 1092, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_22.bin is a file, 11 data chunks written
-Object 1093, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_08.bin is a file, 4 data chunks written
-Object 1094, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLUETOOTH_HINTS.bin is a file, 204 data chunks written
-Object 1095, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SETTTING_BUTTON.bin is a file, 4 data chunks written
-Object 1096, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM__Reboot.bin is a file, 72 data chunks written
-Object 1097, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_05.bin is a file, 10 data chunks written
-Object 1098, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/yellow.bin is a file, 26 data chunks written
-Object 1099, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_27.bin is a file, 11 data chunks written
-Object 1100, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CS_A094_051_8888_hfbc.bin is a file, 48 data chunks written
-Object 1101, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TOGGLEBUTTON_ON.bin is a file, 2 data chunks written
-Object 1102, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HANDUP.bin is a file, 3 data chunks written
-Object 1103, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_13.bin is a file, 4 data chunks written
-Object 1104, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_62.bin is a file, 11 data chunks written
-Object 1105, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_46.bin is a file, 11 data chunks written
-Object 1106, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/APPLIST_SETTING.bin is a file, 7 data chunks written
-Object 1107, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Battery is a directory
-Object 1108, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Battery/Battery_Nomoal.bin is a file, 1 data chunks written
-Object 1109, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Battery/Icon.bin is a file, 1 data chunks written
-Object 1110, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Battery/Battery-E.bin is a file, 1 data chunks written
-Object 1111, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Battery/Battery_Save.bin is a file, 1 data chunks written
-Object 1112, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Battery/Battery_Limit.bin is a file, 1 data chunks written
-Object 1113, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/APPLIST_UI_SAMPLE.bin is a file, 3 data chunks written
-Object 1114, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/DISTANCES_IMAGE.bin is a file, 25 data chunks written
-Object 1115, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/ANAEROBIC.bin is a file, 34 data chunks written
-Object 1116, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_23.bin is a file, 10 data chunks written
-Object 1117, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOODOXYGEN_VIEW.bin is a file, 204 data chunks written
-Object 1118, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/stopwatch is a directory
-Object 1119, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/stopwatch/STOPWATCH_LINE.bin is a file, 1 data chunks written
-Object 1120, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/stopwatch/STOPWATH_RESET2.bin is a file, 4 data chunks written
-Object 1121, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/stopwatch/STOPWATH_RESET1.bin is a file, 4 data chunks written
-Object 1122, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/stopwatch/STOPWATCH_MARK.bin is a file, 4 data chunks written
-Object 1123, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_53.bin is a file, 11 data chunks written
-Object 1124, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/breath.bin is a file, 38 data chunks written
-Object 1125, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training is a directory
-Object 1126, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/arrows.bin is a file, 1 data chunks written
-Object 1127, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/icon.bin is a file, 1 data chunks written
-Object 1128, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/riding-big.bin is a file, 3 data chunks written
-Object 1129, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/sport-pause.bin is a file, 4 data chunks written
-Object 1130, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/sport-strength.bin is a file, 2 data chunks written
-Object 1131, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/More.bin is a file, 7 data chunks written
-Object 1132, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/step.bin is a file, 1 data chunks written
-Object 1133, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/calories.bin is a file, 1 data chunks written
-Object 1134, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/bubble.bin is a file, 2 data chunks written
-Object 1135, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/progress.bin is a file, 59 data chunks written
-Object 1136, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Fitness.bin is a file, 1 data chunks written
-Object 1137, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Swimming.bin is a file, 1 data chunks written
-Object 1138, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/riding.bin is a file, 1 data chunks written
-Object 1139, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Ball.bin is a file, 1 data chunks written
-Object 1140, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/buttonok.bin is a file, 16 data chunks written
-Object 1141, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Line 4.bin is a file, 1 data chunks written
-Object 1142, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Waking-one.bin is a file, 7 data chunks written
-Object 1143, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/mileage_30.bin is a file, 1 data chunks written
-Object 1144, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/sport-stop.bin is a file, 4 data chunks written
-Object 1145, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/mountaineering-big.bin is a file, 3 data chunks written
-Object 1146, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/heartrate_2.bin is a file, 1 data chunks written
-Object 1147, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Ice.bin is a file, 1 data chunks written
-Object 1148, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/time.bin is a file, 1 data chunks written
-Object 1149, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/running-big.bin is a file, 2 data chunks written
-Object 1150, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Dance.bin is a file, 1 data chunks written
-Object 1151, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Go.bin is a file, 14 data chunks written
-Object 1152, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/jumprope.bin is a file, 1 data chunks written
-Object 1153, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Line 2.bin is a file, 1 data chunks written
-Object 1154, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/green.bin is a file, 1 data chunks written
-Object 1155, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win is a directory
-Object 1156, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/14.bin is a file, 5 data chunks written
-Object 1157, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/64.bin is a file, 5 data chunks written
-Object 1158, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/22.bin is a file, 5 data chunks written
-Object 1159, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/15.bin is a file, 5 data chunks written
-Object 1160, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/27.bin is a file, 5 data chunks written
-Object 1161, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/4.bin is a file, 5 data chunks written
-Object 1162, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/77.bin is a file, 5 data chunks written
-Object 1163, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/53.bin is a file, 5 data chunks written
-Object 1164, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/92.bin is a file, 5 data chunks written
-Object 1165, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/89.bin is a file, 5 data chunks written
-Object 1166, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/43.bin is a file, 5 data chunks written
-Object 1167, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/11.bin is a file, 5 data chunks written
-Object 1168, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/76.bin is a file, 5 data chunks written
-Object 1169, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/82.bin is a file, 5 data chunks written
-Object 1170, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/36.bin is a file, 5 data chunks written
-Object 1171, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/72.bin is a file, 5 data chunks written
-Object 1172, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/5.bin is a file, 5 data chunks written
-Object 1173, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/40.bin is a file, 5 data chunks written
-Object 1174, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/73.bin is a file, 5 data chunks written
-Object 1175, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/45.bin is a file, 5 data chunks written
-Object 1176, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/37.bin is a file, 5 data chunks written
-Object 1177, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/70.bin is a file, 5 data chunks written
-Object 1178, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/80.bin is a file, 5 data chunks written
-Object 1179, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/29.bin is a file, 5 data chunks written
-Object 1180, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/1.bin is a file, 5 data chunks written
-Object 1181, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/8.bin is a file, 5 data chunks written
-Object 1182, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/3.bin is a file, 5 data chunks written
-Object 1183, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/48.bin is a file, 5 data chunks written
-Object 1184, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/10.bin is a file, 5 data chunks written
-Object 1185, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/87.bin is a file, 5 data chunks written
-Object 1186, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/13.bin is a file, 5 data chunks written
-Object 1187, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/6.bin is a file, 5 data chunks written
-Object 1188, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/41.bin is a file, 5 data chunks written
-Object 1189, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/23.bin is a file, 5 data chunks written
-Object 1190, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/32.bin is a file, 5 data chunks written
-Object 1191, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/57.bin is a file, 5 data chunks written
-Object 1192, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/75.bin is a file, 5 data chunks written
-Object 1193, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/62.bin is a file, 5 data chunks written
-Object 1194, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/55.bin is a file, 5 data chunks written
-Object 1195, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/67.bin is a file, 5 data chunks written
-Object 1196, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/16.bin is a file, 5 data chunks written
-Object 1197, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/9.bin is a file, 5 data chunks written
-Object 1198, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/90.bin is a file, 5 data chunks written
-Object 1199, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/52.bin is a file, 5 data chunks written
-Object 1200, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/71.bin is a file, 5 data chunks written
-Object 1201, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/69.bin is a file, 5 data chunks written
-Object 1202, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/18.bin is a file, 5 data chunks written
-Object 1203, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/30.bin is a file, 5 data chunks written
-Object 1204, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/26.bin is a file, 5 data chunks written
-Object 1205, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/66.bin is a file, 5 data chunks written
-Object 1206, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/93.bin is a file, 5 data chunks written
-Object 1207, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/58.bin is a file, 5 data chunks written
-Object 1208, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/35.bin is a file, 5 data chunks written
-Object 1209, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/20.bin is a file, 5 data chunks written
-Object 1210, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/44.bin is a file, 5 data chunks written
-Object 1211, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/79.bin is a file, 5 data chunks written
-Object 1212, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/60.bin is a file, 5 data chunks written
-Object 1213, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/56.bin is a file, 5 data chunks written
-Object 1214, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/31.bin is a file, 5 data chunks written
-Object 1215, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/47.bin is a file, 5 data chunks written
-Object 1216, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/94.bin is a file, 5 data chunks written
-Object 1217, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/59.bin is a file, 5 data chunks written
-Object 1218, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/24.bin is a file, 5 data chunks written
-Object 1219, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/86.bin is a file, 5 data chunks written
-Object 1220, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/46.bin is a file, 5 data chunks written
-Object 1221, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/38.bin is a file, 5 data chunks written
-Object 1222, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/50.bin is a file, 5 data chunks written
-Object 1223, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/33.bin is a file, 5 data chunks written
-Object 1224, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/34.bin is a file, 5 data chunks written
-Object 1225, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/51.bin is a file, 5 data chunks written
-Object 1226, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/88.bin is a file, 5 data chunks written
-Object 1227, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/2.bin is a file, 5 data chunks written
-Object 1228, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/42.bin is a file, 5 data chunks written
-Object 1229, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/7.bin is a file, 5 data chunks written
-Object 1230, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/85.bin is a file, 5 data chunks written
-Object 1231, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/21.bin is a file, 5 data chunks written
-Object 1232, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/17.bin is a file, 5 data chunks written
-Object 1233, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/81.bin is a file, 5 data chunks written
-Object 1234, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/63.bin is a file, 5 data chunks written
-Object 1235, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/28.bin is a file, 5 data chunks written
-Object 1236, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/83.bin is a file, 5 data chunks written
-Object 1237, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/19.bin is a file, 5 data chunks written
-Object 1238, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/74.bin is a file, 5 data chunks written
-Object 1239, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/61.bin is a file, 5 data chunks written
-Object 1240, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/65.bin is a file, 5 data chunks written
-Object 1241, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/91.bin is a file, 5 data chunks written
-Object 1242, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/84.bin is a file, 5 data chunks written
-Object 1243, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/25.bin is a file, 5 data chunks written
-Object 1244, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/68.bin is a file, 5 data chunks written
-Object 1245, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/78.bin is a file, 5 data chunks written
-Object 1246, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/49.bin is a file, 5 data chunks written
-Object 1247, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/12.bin is a file, 5 data chunks written
-Object 1248, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/39.bin is a file, 5 data chunks written
-Object 1249, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win/54.bin is a file, 5 data chunks written
-Object 1250, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Buttonground2.bin is a file, 7 data chunks written
-Object 1251, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/path.bin is a file, 22 data chunks written
-Object 1252, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/running.bin is a file, 1 data chunks written
-Object 1253, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/data_point.bin is a file, 1 data chunks written
-Object 1254, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/GPS_1.bin is a file, 1 data chunks written
-Object 1255, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/pingpong.bin is a file, 1 data chunks written
-Object 1256, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Line.bin is a file, 3 data chunks written
-Object 1257, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/inco_up_40.bin is a file, 1 data chunks written
-Object 1258, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/orange.bin is a file, 1 data chunks written
-Object 1259, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Limit.bin is a file, 1 data chunks written
-Object 1260, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/step_30.bin is a file, 1 data chunks written
-Object 1261, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Running-one.bin is a file, 7 data chunks written
-Object 1262, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/yes.bin is a file, 4 data chunks written
-Object 1263, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/black_piont.bin is a file, 1 data chunks written
-Object 1264, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/walking.bin is a file, 1 data chunks written
-Object 1265, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Line 1.bin is a file, 1 data chunks written
-Object 1266, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/bubble_piont.bin is a file, 1 data chunks written
-Object 1267, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/control_point.bin is a file, 1 data chunks written
-Object 1268, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/sport-continue.bin is a file, 4 data chunks written
-Object 1269, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/heartrate.bin is a file, 1 data chunks written
-Object 1270, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/heartrate_30.bin is a file, 1 data chunks written
-Object 1271, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/pingpong-big.bin is a file, 3 data chunks written
-Object 1272, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/heartrate_1.bin is a file, 1 data chunks written
-Object 1273, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/jumprope-big.bin is a file, 3 data chunks written
-Object 1274, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Line 3.bin is a file, 1 data chunks written
-Object 1275, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/riding-big2.bin is a file, 2 data chunks written
-Object 1276, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/MoreView.bin is a file, 72 data chunks written
-Object 1277, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Go_2.bin is a file, 14 data chunks written
-Object 1278, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/yellow.bin is a file, 1 data chunks written
-Object 1279, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/back.bin is a file, 3 data chunks written
-Object 1280, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/mountaineering.bin is a file, 1 data chunks written
-Object 1281, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/bule.bin is a file, 1 data chunks written
-Object 1282, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/warning.bin is a file, 3 data chunks written
-Object 1283, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/win.bin is a file, 5 data chunks written
-Object 1284, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/no.bin is a file, 4 data chunks written
-Object 1285, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/GPS_2.bin is a file, 1 data chunks written
-Object 1286, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/note.bin is a file, 1 data chunks written
-Object 1287, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/calories_30.bin is a file, 1 data chunks written
-Object 1288, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Other.bin is a file, 1 data chunks written
-Object 1289, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Walking_54.bin is a file, 2 data chunks written
-Object 1290, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/walking-big.bin is a file, 2 data chunks written
-Object 1291, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/mileage.bin is a file, 1 data chunks written
-Object 1292, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Rest.bin is a file, 1 data chunks written
-Object 1293, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/Bouttonground.bin is a file, 7 data chunks written
-Object 1294, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Training/inco_up.bin is a file, 1 data chunks written
-Object 1295, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/blue_argb8888.bin is a file, 18 data chunks written
-Object 1296, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_61.bin is a file, 11 data chunks written
-Object 1297, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_18.bin is a file, 11 data chunks written
-Object 1298, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_11.bin is a file, 10 data chunks written
-Object 1299, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_17.bin is a file, 9 data chunks written
-Object 1300, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM_SHOUTDOWM.bin is a file, 13 data chunks written
-Object 1301, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_11.bin is a file, 11 data chunks written
-Object 1302, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_06.bin is a file, 10 data chunks written
-Object 1303, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_55.bin is a file, 11 data chunks written
-Object 1304, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_28.bin is a file, 11 data chunks written
-Object 1305, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_26.bin is a file, 4 data chunks written
-Object 1306, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/heart rate.bin is a file, 3 data chunks written
-Object 1307, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SYSTEM_ShoutDown.bin is a file, 72 data chunks written
-Object 1308, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/OPTIONS_BOX3.bin is a file, 28 data chunks written
-Object 1309, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_30.bin is a file, 4 data chunks written
-Object 1310, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/A094_051_565.bin is a file, 49 data chunks written
-Object 1311, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/A094_051_888.bin is a file, 73 data chunks written
-Object 1312, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_48.bin is a file, 11 data chunks written
-Object 1313, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_08.bin is a file, 10 data chunks written
-Object 1314, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_07.bin is a file, 10 data chunks written
-Object 1315, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/AEROBIC.bin is a file, 34 data chunks written
-Object 1316, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime is a directory
-Object 1317, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/Vector2.bin is a file, 3 data chunks written
-Object 1318, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/up.bin is a file, 1 data chunks written
-Object 1319, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/room.bin is a file, 3 data chunks written
-Object 1320, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/Battery-E.bin is a file, 1 data chunks written
-Object 1321, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/Vector.bin is a file, 1 data chunks written
-Object 1322, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/finger.bin is a file, 2 data chunks written
-Object 1323, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/button.bin is a file, 7 data chunks written
-Object 1324, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/Line 2.bin is a file, 1 data chunks written
-Object 1325, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/finger2.bin is a file, 2 data chunks written
-Object 1326, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/wathch.bin is a file, 4 data chunks written
-Object 1327, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/Line 1.bin is a file, 1 data chunks written
-Object 1328, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/Battery-F.bin is a file, 1 data chunks written
-Object 1329, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/Line 3.bin is a file, 1 data chunks written
-Object 1330, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/quan.bin is a file, 1 data chunks written
-Object 1331, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SleepTime/Ellipse 185.bin is a file, 48 data chunks written
-Object 1332, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COUNTDOWN_IMAGE_24.bin is a file, 10 data chunks written
-Object 1333, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_03.bin is a file, 4 data chunks written
-Object 1334, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CS_A094_051_565_abypass.bin is a file, 24 data chunks written
-Object 1335, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_68.bin is a file, 11 data chunks written
-Object 1336, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_29.bin is a file, 4 data chunks written
-Object 1337, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/HEARTBEAT_IMAGE_18.bin is a file, 9 data chunks written
-Object 1338, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_LIT_TIP.bin is a file, 1 data chunks written
-Object 1339, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/APPLIST_WALK.bin is a file, 7 data chunks written
-Object 1340, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/compass is a directory
-Object 1341, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/compass/compass.bin is a file, 679 data chunks written
-Object 1342, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/compass/file.txt is a file, 0 data chunks written
-Object 1343, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial is a directory
-Object 1344, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial/DialDog.bin is a file, 72 data chunks written
-Object 1345, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial/second.bin is a file, 3 data chunks written
-Object 1346, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial/Vector.bin is a file, 3 data chunks written
-Object 1347, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial/Malio.bin is a file, 23 data chunks written
-Object 1348, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial/setup.bin is a file, 4 data chunks written
-Object 1349, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial/KUMI.bin is a file, 23 data chunks written
-Object 1350, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial/minute.bin is a file, 2 data chunks written
-Object 1351, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial/dog.bin is a file, 23 data chunks written
-Object 1352, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial/hour.bin is a file, 2 data chunks written
-Object 1353, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial/dogmalio.bin is a file, 72 data chunks written
-Object 1354, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/Dial/Diallogo.bin is a file, 72 data chunks written
-Object 1355, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/ALARM_ADD_BACKGROUND.bin is a file, 13 data chunks written
-Object 1356, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/VOICE_ASSISTANT_41.bin is a file, 11 data chunks written
-Object 1357, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TRUE_ADD.bin is a file, 9 data chunks written
-Object 1358, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/lele.jpg is a file, 2 data chunks written
-Object 1359, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/TEMP_DELETE.bin is a file, 3 data chunks written
-Object 1360, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/phonebook.bin is a file, 3 data chunks written
-Object 1361, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/BLOOD_FLOW_IMAGE_09.bin is a file, 4 data chunks written
-Object 1362, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/COMPASS.bin is a file, 204 data chunks written
-Object 1363, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/music is a directory
-Object 1364, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/music/mp3_48k_caiqing.mp3 is a file, 464 data chunks written
-Object 1365, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/music/lan_jing.mp3 is a file, 3335 data chunks written
-Object 1366, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/music/alarm.mp3 is a file, 674 data chunks written
-Object 1367, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/music/one.mp3 is a file, 2143 data chunks written
-Object 1368, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/music/FolkSongToThePartyDZ.mp3 is a file, 2483 data chunks written
-Object 1369, /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/js is a directory
-Operation complete.
-2226 objects in 33 directories
-31251 NAND pages
-/home/snicker/hiwatch/code/sdk/tools/bin/platform_tool/mkyaffs2image/mkyaffs2image /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin 1 2 0xcc0000
-/home/snicker/hiwatch/code/sdk/tools/bin/platform_tool/mkyaffs2image/mkyaffs2image /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/update /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin 1 2 0x1980000
-/home/snicker/hiwatch/code/sdk/tools/bin/platform_tool/mkyaffs2image/mkyaffs2image /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/music /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin 1 2 0x2640000
-/home/snicker/hiwatch/code/sdk/tools/bin/platform_tool/mkyaffs2image/mkyaffs2image /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user /home/snicker/hiwatch/code/sdk/build/config/target_config/brandy/mk_fs_image/file_tmp.bin 1 2
-make yaffs image file over!
-fs image success!
+brandy-native-js takes 23.238997 s
packet ing...
-['/usr/bin/python3', '/home/snicker/hiwatch/code/sdk/tools/pkg/packet.py', 'brandy', 'brandy-native-js']
+['/usr/bin/python', '/home/snicker/hiwatch/code/sdk/tools/pkg/packet.py', 'brandy', 'brandy-native-js']
Build params success!
build nv bin success!!
ssb_path: /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-ssb/ssb.bin
-['/home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-ssb/ssb.bin', '/home/snicker/hiwatch/code/sdk/output/brandy/partition_table.bin', '/home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js/application.bin', '/home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js-r/recovery.bin', '/home/snicker/hiwatch/code/sdk/tools/pkg/bin/brandy/bt.bin', '/home/snicker/hiwatch/code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_main.bin', '/home/snicker/hiwatch/code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_overlay.bin', '/home/snicker/hiwatch/code/sdk/output/brandy/nv_bin/brandy_all_nv.bin', '/home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js/file.bin']
-[1879048192, 1879371776, 1882456064, 1879375872, 1879638016, 1880227840, 1881145344, 1887408128, 4294967295]
-[131072, 4096, 4931584, 262144, 589824, 917504, 1310720, 16384, 4294967295]
-[105060, 1024, 3959476, 189068, 424360, 348248, 1282060, 8192, 107363520]
-[0, 100, 18, 100, 20, 22, 26, 100, 101]
+['/home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-ssb/ssb.bin', '/home/snicker/hiwatch/code/sdk/output/brandy/partition_table.bin', '/home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js/application.bin', '/home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js-r/recovery.bin', '/home/snicker/hiwatch/code/sdk/tools/pkg/bin/brandy/bt.bin', '/home/snicker/hiwatch/code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_main.bin', '/home/snicker/hiwatch/code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_overlay.bin', '/home/snicker/hiwatch/code/sdk/output/brandy/nv_bin/brandy_all_nv.bin']
+[1879048192, 1879371776, 1881866240, 1879375872, 1879638016, 1880096768, 1880555520, 1887408128]
+[131072, 4096, 5541888, 262144, 458752, 458752, 1310720, 16384]
+[74172, 1024, 4041116, 237292, 420744, 349776, 1281704, 4096]
+[0, 100, 18, 100, 20, 22, 26, 100]
packet success!
-output_path /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js
-Start pack target pack_brandy_native_js
-pack_target_path /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-native-js
-current_target_file /home/snicker/hiwatch/code/sdk/output/currentbuild.txt
+Start pack target brandy-native-js
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js/application.elf -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-native-js/application.elf
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js/application.lst -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-native-js/application.lst
-copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js/file.bin -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-native-js/file.bin
-copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js/file.bin -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/file.bin
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js/application.bin -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-native-js/application.bin
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js/application.bin -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/application.bin
copy /home/snicker/hiwatch/code/sdk/output/brandy/acore/brandy-native-js/application.map -> /home/snicker/hiwatch/code/sdk/output/package/brandy/pack_brandy_native_js/brandy-native-js/application.map
do release copy
-release to /home/snicker/hiwatch/release/pack_brandy_native_js/release/20240120_111202/pack_brandy_native_js_release_20240120_111202_snicker.fwpkg
-pack_brandy_native_js_release_20240120_111202_snicker.fwpkg
-branch name m_master
-commit b8def62a81707423bf66aa8be0aee05207508ff1
-no source changed
-build done at 20240120_111236
+release to /home/snicker/hiwatch/release/pack_brandy_native_js/release/20240503_001315/pack_brandy_native_js_release_20240503_001315_snicker.fwpkg
+pack_brandy_native_js_release_20240503_001315_snicker.fwpkg
+branch name master
+commit d0f1e562f64d353f43542d94743aff23ac574565
+source changed
+M build.log M code/sdk/application/audio/vendor/CMakeLists.txt M code/sdk/application/brandy/brandy_recovery/main.c M code/sdk/application/brandy/brandy_standard/chip_init.c M code/sdk/application/brandy/brandy_standard/input_app.c M code/sdk/application/wearable/nativeabilityfwk/CMakeLists.txt M code/sdk/application/wearable/nativeabilityfwk/include/Ability.h M code/sdk/application/wearable/nativeabilityfwk/include/NativeAbility.h M code/sdk/application/wearable/nativeabilityfwk/include/SliceTransition.h M code/sdk/application/wearable/nativeabilityfwk/include/TransitionCallback.h M code/sdk/application/wearable/nativeabilityfwk/include/TransitionManager.h M code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp M code/sdk/application/wearable/nativeabilityfwk/src/SliceTransition.cpp M code/sdk/application/wearable/nativeabilityfwk/src/TransitionManager.cpp M code/sdk/application/wearable/nativeabilityfwk/src/transition/ZoomTransition.cpp M code/sdk/application/wearable/nativeabilityfwk/src/transition/ZoomTransition.h M code/sdk/application/wearable/nativeapp/CMakeLists.txt M code/sdk/application/wearable/nativeapp/nativelauncher/include/AppViewIDs.h M code/sdk/application/wearable/nativeapp/nativelauncher/include/NativeLauncher.h M code/sdk/application/wearable/nativeapp/nativelauncher/include/UiConfig.h M code/sdk/application/wearable/nativeapp/nativelauncher/include/slices/main/MainPresenter.h M code/sdk/application/wearable/nativeapp/nativelauncher/include/slices/main/MainView.h M code/sdk/application/wearable/nativeapp/nativelauncher/src/NativeLauncher.cpp M code/sdk/application/wearable/nativeapp/nativelauncher/src/slices/main/MainView.cpp M code/sdk/application/wearable/nativeapp/nativeui/activity/include/ActivityModel.h M code/sdk/application/wearable/nativeapp/nativeui/activity/include/ActivityPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/activity/include/ActivityWeekView.h M code/sdk/application/wearable/nativeapp/nativeui/activity/src/ActivityModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/activity/src/ActivityWeekView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/include/AlarmPopUpPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/alarm/include/AlarmPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/alarm/include/AlarmSetWeekView.h M code/sdk/application/wearable/nativeapp/nativeui/alarm/include/MainAlarmView.h M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmClockModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmCloseRingView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmConfigView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmMaxClock.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmNewTimeView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmPopUpPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmPopUpView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmRingView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmSetTimeView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmSetWeekView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarm/src/MainAlarmView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarmclockmanage/include/AlarmClockManage.h M code/sdk/application/wearable/nativeapp/nativeui/alarmclockmanage/src/AlarmClockManage.cpp M code/sdk/application/wearable/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBarCode.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBind.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBindAni.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBindRes.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayExitBind.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayHelp.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayList/AlipayListAdapter.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayList/AlipayListItemView.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayList/AlipayListView.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayMainView.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayModel.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayPayCode.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayRefreshBindCode.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipaySetting.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayGetTransList.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransAni.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransCode.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransEnable.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransListAdapter.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransListItemView.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransListView.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransRes.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransTips.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayUnbind.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayUnbindFinish.h M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayBarCode.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayBind.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayBindAni.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayBindRes.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayExitBind.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayHelp.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayList/AlipayListView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayMainView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayPayCode.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipaySetting.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayGetTransList.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransAni.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransCode.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransEnable.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransListView.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransRes.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransTips.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayUnbind.cpp M code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayUnbindFinish.cpp M code/sdk/application/wearable/nativeapp/nativeui/applist/include/AppItemView.h M code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistAdapter.h M code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistModel.h M code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistView.h M code/sdk/application/wearable/nativeapp/nativeui/applist/src/AppItemView.cpp M code/sdk/application/wearable/nativeapp/nativeui/applist/src/ApplistModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/applist/src/ApplistPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/applist/src/ApplistView.cpp M code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/include/BloodOxygenModel.h M code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/include/BloodOxygenPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/include/BloodOxygenView.h M code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/src/BloodOxygenPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/src/BloodOxygenView.cpp M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/include/BluetoothItemView.h M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/include/BluetoothModel.h M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/include/MainBluetoothView.h M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothCaseListAdapter.cpp M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothDeviceListView.cpp M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothEarPhoneView.cpp M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothHeadsetEvent.cpp M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothItemView.cpp M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothOptionsView.cpp M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/MainBluetoothView.cpp M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/TipsConnFailMessageView.cpp M code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/TipsSuccMessageView.cpp M code/sdk/application/wearable/nativeapp/nativeui/callerlog/include/CallerItemView.h M code/sdk/application/wearable/nativeapp/nativeui/callerlog/include/CallerLogModel.h M code/sdk/application/wearable/nativeapp/nativeui/callerlog/include/CallerLogPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/callerlog/include/CallerLogView.h M code/sdk/application/wearable/nativeapp/nativeui/callerlog/src/CallerItemView.cpp M code/sdk/application/wearable/nativeapp/nativeui/callerlog/src/CallerLogModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/callerlog/src/CallerLogPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/callerlog/src/CallerLogView.cpp M code/sdk/application/wearable/nativeapp/nativeui/clock/include/MainClockView.h M code/sdk/application/wearable/nativeapp/nativeui/clock/src/MainClockView.cpp M code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassCalibrationView.h M code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassControlView.h M code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassModel.h M code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassView.h M code/sdk/application/wearable/nativeapp/nativeui/compass/include/MainCompassPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/compass/include/MainCompassView.h M code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassCalibrationView.cpp M code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassControlView.cpp M code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassView.cpp M code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/include/ConnectPhonePresenter.h M code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectOpenView.cpp M code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectPhonePresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectPhoneView.cpp M code/sdk/application/wearable/nativeapp/nativeui/heartrate/include/HeartModel.h M code/sdk/application/wearable/nativeapp/nativeui/heartrate/include/HeartRateView.h M code/sdk/application/wearable/nativeapp/nativeui/heartrate/src/HeartModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/heartrate/src/HeartRateView.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/CustomizationView.h M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/IndoorWalkModel.h M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/IndoorWalkMotionView.h M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/IndoorWalkPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/MotionPageFifth.h M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/MotionPageFirst.h M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/MotionPageFourth.h M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/MotionPageSecond.h M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/MotionPageThird.h M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/CustomizationView.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkEndView.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkMotionView.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkPreparedView.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkView.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/MotionPageFifth.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/MotionPageFirst.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/MotionPageFourth.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/MotionPageSecond.cpp M code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/MotionPageThird.cpp M code/sdk/application/wearable/nativeapp/nativeui/key/include/KeyInputListener.h M code/sdk/application/wearable/nativeapp/nativeui/key/src/KeyInputListener.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/include/AppGroupView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/HealthModel.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/MainPresenterSample.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/ModelListenerSample.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/PullUpDownView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/UiServersMsg.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/VolumeSettingPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialArcLabelView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialArcProgressView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialBaseModel.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialBoxProgressView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialDigitalImgView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialLabelView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialModelHeartRate.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialModelPower.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialModelSteps.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialModelTime.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialOptionImgView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialRotateImgView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialSequenceImgView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialStaticImgView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialVideoView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialView.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h M code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/ModelDialDataFactory.h M code/sdk/application/wearable/nativeapp/nativeui/main/src/HealthModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/src/MainPresenterSample.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/src/MainViewSample.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/src/ModelListenerSample.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/src/PresenterTask.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/src/VolumeSettingPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialModelSteps.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialModelTime.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialVideoView.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialViewGroup.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/ModelDialDataFactory.cpp M code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/parser/DialBinParser.cpp D code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/parser/DialBinParser.h D code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/parser/DialBinTypes.h M code/sdk/application/wearable/nativeapp/nativeui/makephone/include/MainCallingPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/makephone/src/CallerDisplayView.cpp M code/sdk/application/wearable/nativeapp/nativeui/makephone/src/CallingView.cpp M code/sdk/application/wearable/nativeapp/nativeui/makephone/src/DialingScreenView.cpp M code/sdk/application/wearable/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/makephone/src/MainCallingView.cpp M code/sdk/application/wearable/nativeapp/nativeui/makephone/src/WaitingHintsView.cpp M code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/MainVocassistView.h M code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistView.h M code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistView.cpp M code/sdk/application/wearable/nativeapp/nativeui/phoneservice/include/PhoneAudio.h M code/sdk/application/wearable/nativeapp/nativeui/phoneservice/include/PhoneService.h M code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneAudio.cpp M code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneService.cpp M code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersModel.h M code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersView.h M code/sdk/application/wearable/nativeapp/nativeui/player/src/BluetoothView.cpp M code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersCaseListAdapter.cpp M code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersView.cpp M code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/include/RebootModel.h M code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/RebootDeviceView.cpp M code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/RebootPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/RebootView.cpp M code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/ShutdownDeviceView.cpp M code/sdk/application/wearable/nativeapp/nativeui/rtcservice/src/RtcService.cpp M code/sdk/application/wearable/nativeapp/nativeui/screennotify/include/ui_screennotify.h M code/sdk/application/wearable/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp M code/sdk/application/wearable/nativeapp/nativeui/screensetting/include/ScreenModels.h M code/sdk/application/wearable/nativeapp/nativeui/screensetting/src/ScreenModels.cpp M code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingAdapter.h M code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingItem.h M code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingItemView.h M code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingModel.h M code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingView.h M code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingItemView.cpp M code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingModel.cpp M code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingView.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempClickMea.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempContinueWarn.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempExitInter.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempExitPrompt.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempInitInter.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempJoinStudy.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempLittleTip.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempMainView.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempMeaProcess.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempMeasure.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempPresenter.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempPromptWear.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempRemindWear.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempReport.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempStudyAbout.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempWarn.h M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempClickMea.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempContinueWarn.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempExitInter.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempExitPrompt.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempInitInter.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempJoinStudy.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempLittleTip.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempMainView.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempMeaProcess.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempMeasure.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempPresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempPromptWear.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempRemindWear.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempReport.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempStudyAbout.cpp M code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempWarn.cpp M code/sdk/application/wearable/nativeapp/nativeui/uisample/include/UISampleModel.h M code/sdk/application/wearable/nativeapp/nativeui/uisample/include/UISamplePresenter.h M code/sdk/application/wearable/nativeapp/nativeui/uisample/include/UISampleView.h M code/sdk/application/wearable/nativeapp/nativeui/uisample/src/UISamplePresenter.cpp M code/sdk/application/wearable/nativeapp/nativeui/uisample/uitest/framework/src/ui_test_group.cpp M code/sdk/application/wearable/nativeapp/nativeui/uiservice/include/ui_service.h M code/sdk/application/wearable/nativeapp/nativeui/uiservice/src/ui_service.cpp M code/sdk/application/wearable/service/broadcast/src/broadcast_feature.c M code/sdk/application/wearable/service/msg_center/CMakeLists.txt M code/sdk/application/wearable/service/msg_center/brandy-native-js/libmsg_center.a M code/sdk/application/wearable/service/msg_center/brandy-xts/libmsg_center.a M code/sdk/application/wearable/service/msg_center/include/msg_center.h M code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h M code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h M code/sdk/application/wearable/service/msg_center/include/notify/makephone_notification.h M code/sdk/application/wearable/service/msg_center/include/notify/notification_manager.h M code/sdk/application/wearable/service/msg_center/include/vendor_app/baidu_app.h M code/sdk/application/wearable/service/msg_center/src/msg_center_cmd.cpp M code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp M code/sdk/application/wearable/service/msg_center/src/notify/alarm_notification.cpp M code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp M code/sdk/application/wearable/service/msg_center/src/notify/notification_manager_customer.cpp M code/sdk/application/wearable/service/msg_center/src/vendor_app/baidu/baidu_app.cpp M code/sdk/application/wearable/service/power_manager/include/power_display_service.h M code/sdk/application/wearable/service/power_manager/src/actions/display_action.c M code/sdk/application/wearable/service/power_manager/src/filters/gui_event_filter.c M code/sdk/application/wearable/service/power_manager/src/power_display_service.c M code/sdk/application/wstp/at_service/ohosfwk/ohosfwk_at_process.cpp M code/sdk/bootloader/flashboot/brandy/main.c M code/sdk/bootloader/flashboot/brandy/nandflash/hal_nandflash.c M code/sdk/bootloader/flashboot/brandy/nandflash/nandflash.c M code/sdk/bootloader/flashboot/brandy/nandflash/nandflash_qspi.c M code/sdk/build/config/target_config/brandy/config.py M code/sdk/build/config/target_config/common_config.py M code/sdk/drivers/boards/brandy_evb/linker/standard/acore.prelds M code/sdk/drivers/boards/brandy_evb/memory_config/include/memory_config.h M code/sdk/drivers/boards/brandy_evb/memory_config/include/psram_16.h M code/sdk/drivers/chips/brandy/porting/include/systick_porting.h M code/sdk/drivers/chips/brandy/porting/security/efuse/efuse_porting.c M code/sdk/drivers/chips/brandy/porting/systick/systick_porting.c M code/sdk/drivers/drivers/driver/audio/source/core/common/share_mem/core_msg.c M code/sdk/drivers/drivers/driver/audio/source/include/sea_struct.h M code/sdk/drivers/drivers/driver/i2c/i2c.c M code/sdk/drivers/drivers/driver/nand_flash/nand/hal_nandflash.c M code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash.c M code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c M code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_qspi.c M code/sdk/drivers/drivers/driver/qspi_display/qspi_display.c M code/sdk/drivers/drivers/driver/rtc_unified/rtc.c M code/sdk/drivers/drivers/driver/systick/systick.c M code/sdk/drivers/drivers/driver/touch/tma525b_touch/tma525b_ctrl.c M code/sdk/drivers/drivers/driver/touch/ztw523_touch/ztw523_ctrl.c M code/sdk/drivers/drivers/driver/touch/ztw523_touch/ztw523_ctrl.h M code/sdk/drivers/drivers/hal/ipc/hal_ipc_old/hal_ipc.h M code/sdk/drivers/drivers/hal/security/efuse/v100/hal_efuse_v100.c M code/sdk/middleware/chips/brandy/dfx/include/log_def_app.h M code/sdk/middleware/chips/brandy/dfx/include/log_def_gui.h M code/sdk/middleware/chips/brandy/dfx/include/log_def_ohos.h M code/sdk/middleware/chips/brandy/exception/exception.h M code/sdk/middleware/chips/brandy/exception/exception_riscv.c M code/sdk/middleware/chips/brandy/nv/nv_config/cfg/acore/app.json M code/sdk/middleware/chips/brandy/pm/include/pm_definition.h M code/sdk/middleware/chips/brandy/pm/pm_adapt/pm_core.c M code/sdk/middleware/chips/brandy/pm/pm_adapt/pm_lp_stub.c M code/sdk/middleware/services/gpu/api/jpeg/src/soc_jpeg_api.c M code/sdk/middleware/services/gpu/api/vau/draw/vau_draw.c M code/sdk/middleware/services/gpu/drv/dpu/intf/drv_dpu_intf.c M code/sdk/middleware/services/gpu/drv/dpu/layer/dpu_layer.c M code/sdk/middleware/services/gpu/drv/gmmu/intf/drv_gmmu_intf.c M code/sdk/middleware/services/gpu/drv/jpeg/dev/jpeg_dev.c M code/sdk/middleware/services/gpu/drv/jpeg/dev/jpeg_dev.h M code/sdk/middleware/services/gpu/drv/jpeg/intf/drv_jpeg_intf.c M code/sdk/middleware/services/gpu/drv/vau/intf/drv_vau_intf.c M code/sdk/middleware/services/gui/hal/common/include/graphic_hardware_config.h M code/sdk/middleware/services/gui/hal/display/brandy-native-js/libdisplay_gfx.a M code/sdk/middleware/services/gui/hal/display/brandy-target1/libdisplay_gfx.a M code/sdk/middleware/services/gui/hal/display/brandy-target3/libdisplay_gfx.a M code/sdk/middleware/services/gui/hal/display/brandy-target5/libdisplay_gfx.a M code/sdk/middleware/services/gui/hal/display/brandy-xts/libdisplay_gfx.a M code/sdk/middleware/services/gui/hal/display/src/display_gralloc.c M code/sdk/middleware/services/gui/lvgl/brandy-target1/liblvgl_proprietary_mini.a M code/sdk/middleware/services/gui/lvgl/brandy-target5/liblvgl_proprietary.a M code/sdk/middleware/services/gui/uikit/CMakeLists.txt M code/sdk/middleware/services/gui/uikit/brandy-native-js/libuikit_ext.a M code/sdk/middleware/services/gui/uikit/brandy-target3/libuikit_ext.a M code/sdk/middleware/services/gui/uikit/brandy-xts/libuikit_ext.a M code/sdk/middleware/services/gui/uikit/proprietary/include/common/image_cache_manager.h M code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h M code/sdk/middleware/services/gui/uikit/proprietary/include/components/card_swipe.h M code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_barcode.h M code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_card_page.h M code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h M code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_lite_surface_view.h M code/sdk/middleware/services/gui/uikit/proprietary/include/service/graphic_service_wrapper.h M code/sdk/middleware/services/gui/uikit/proprietary/src/service/src/graphic_service_wrapper.cpp M code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/common/lite_surface.cpp M code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/common/low_power_manager.cpp M code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_lite_surface_view.cpp M code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext/ui_card_container.h M code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/draw/clip_img.cpp M code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/draw/clip_img.h M code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/draw/hw_draw_utils.cpp M code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/draw/hw_draw_utils.h M code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/engines/gfx/lite_m_gfx_engine.h M code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/turn_page_effect.h M code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/display_dev.cpp M code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/gralloc_engines.cpp M code/sdk/middleware/services/gui/uikit/proprietary/src/utils/innerkits/hals/display_dev.h M code/sdk/middleware/services/gui/uikit/proprietary/src/utils/innerkits/hals/gralloc_engines.h M code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_cross/ui_test_cross.cpp M code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_video_play/ui_test_video_play.cpp M code/sdk/middleware/services/gui/uikit/sample/uitest/framework/src/test_case_list_adapter.cpp M code/sdk/middleware/services/gui/uikit/sample/uitest/framework/src/ui_test_group.cpp M code/sdk/middleware/services/gui/uikit/ui/frameworks/common/input_device_manager.cpp M code/sdk/middleware/services/gui/uikit/ui/frameworks/components/root_view.cpp M code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_chart.cpp M code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_image_animator.cpp M code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_label.cpp M code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_qrcode.cpp M code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_view.cpp M code/sdk/middleware/services/gui/uikit/ui/frameworks/dock/pointer_input_device.h M code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/common/input_device_manager.h M code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/root_view.h M code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_scroll_view.h M code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h M code/sdk/middleware/services/gui/uikit/utils/frameworks/geometry2d.cpp M code/sdk/middleware/services/gui/uikit/utils/frameworks/graphic_math.cpp M code/sdk/middleware/services/gui/uikit/utils/interfaces/innerkits/graphic_config.h M code/sdk/middleware/services/gui/uikit/utils/interfaces/kits/gfx_utils/graphic_math.h M code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audiomanager/cpp/audio_manager.cpp M code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/interrupt_manager.c M code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/stream_manager.c M code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/track_handle.c M code/sdk/middleware/services/media/foundation/audiomanager/interfaces/kits/audiocommon/audio_base_type.h M code/sdk/middleware/services/media/foundation/audiomanager/interfaces/kits/audiomanager/cpp/audio_manager.h M code/sdk/middleware/services/media/foundation/player/frameworks/player_control/include/player_define.h M code/sdk/middleware/services/media/foundation/player/frameworks/player_control/player/liteplayer.cpp M code/sdk/middleware/services/media/foundation/player/frameworks/player_control/player/liteplayer.h M code/sdk/middleware/services/media/foundation/player/frameworks/player_control/sink/player_audio_sink.cpp M code/sdk/middleware/services/media/foundation/player/frameworks/player_control/sink/player_audio_sink.h M code/sdk/middleware/services/media/foundation/player/frameworks/player_control/sink/player_sink_manager.cpp M code/sdk/middleware/services/media/foundation/player/frameworks/player_control/sink/player_sink_manager.h M code/sdk/middleware/services/media/foundation/sample/wrapper/audio_capture_wrapper.cpp M code/sdk/middleware/services/media/foundation/sample/wrapper/camera_preview_sample_wrapper.cpp M code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.cpp M code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.h M code/sdk/middleware/services/media/foundation/sample/wrapper/video_player_sample_wrapper.cpp M code/sdk/middleware/utils/dfx/dfx_reboot/cpu_utils/private/cpu_utils.c M code/sdk/middleware/utils/dfx/log/log.c M code/sdk/middleware/utils/dfx/log/log_oml_exception.c M code/sdk/middleware/utils/dfx/log_reader/private/log_uart.c M code/sdk/open_source/openharmony/CMakeLists.txt M code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js/libams.a M code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-xts/libams.a M code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/CMakeLists.txt M code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/base/framework_min_bc.h M code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/base/framework_min_js.h M code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/base/keys.h M code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js/libace.a M code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-xts/libace.a M code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component_factory.h M code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/context/js_ability_impl.h M code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/ohos_module_config.h M code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/CMakeLists.txt M code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js/libbms.a M code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-xts/libbms.a M code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/include/appexecfwk/appexecfwk_lite/services/bundlemgr_lite/include/gt_bundle_manager_service.h M code/sdk/open_source/openharmony/third_party/jerryscript/CMakeLists.txt M code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js/libjerryscript.a M code/sdk/open_source/openharmony/third_party/jerryscript/brandy-xts/libjerryscript.a D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Config_Full.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Defaults.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product_stdlib.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product_string.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg-internal.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg.impl.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/byte-code.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/common.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/config.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/debugger.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-alloc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-array-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-arraybuffer-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-boolean-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array-iterator-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-arraybuffer-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-arraybuffer.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-boolean-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-boolean.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-dataview-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-dataview.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-date-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-date.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-error-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-error.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-evalerror-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-evalerror.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float32array-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float32array.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float64array-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float64array.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-function-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-function.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-global.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers-macro-defines.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers-macro-undefs.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int16array-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int16array.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int32array-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int32array.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int8array-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int8array.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-internal-routines-template.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-iterator-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-json.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map-iterator-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-math.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-number-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-number.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-object-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-object.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-promise-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-promise.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-rangeerror-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-rangeerror.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-referenceerror-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-referenceerror.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-regexp-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-regexp.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set-iterator-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string-iterator-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-symbol-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-symbol.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-syntaxerror-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-syntaxerror.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-type-error-thrower.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-helpers.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-prototype-template.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-template.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typeerror-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typeerror.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint16array-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint16array.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint32array-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint32array.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8array-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8array.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8clampedarray-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8clampedarray.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-urierror-prototype.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-urierror.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins-internal.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-comparison.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-container-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-conversion.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-dataview-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-eval.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-exceptions.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-function-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-gc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-globals.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-helpers.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-init-finalize.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-iterator-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-jobqueue.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-lcache.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-lex-env.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-literal-storage.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-module.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-number-arithmetic.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-number-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects-arguments.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects-general.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-promise-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-property-hashmap.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-reference.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-regexp-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-string-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-symbol-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-try-catch-macro.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-typedarray-object.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/generate-bytecode.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jcontext.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerry-snapshot.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-compiler.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-core.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-debugger-transport.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-debugger.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-port.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-snapshot.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jmem-allocator-internal.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jmem.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt-bit-fields.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt-libc-includes.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt-types.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-lexer.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser-internal.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser-limits.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-scanner-internal.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-scanner.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-char-helpers.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-globals.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-magic-strings.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-magic-strings.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-strings.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-unicode-conversions.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-unicode-ranges.inc.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/opcodes.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-bytecode.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-compiler.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-parser.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm-defines.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm-stack.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/arg-internal.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/debugger-sha1.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/handle-scope-internal.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/arg.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/arg.impl.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/autorelease.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/autorelease.impl.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/debugger.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/handle-scope.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/handler.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/module.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jext-common.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrylibm/jerry-libm-internal.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrylibm/math.h D code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryport/jerryscript-port-default.h M code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_main.bin M code/sdk/tools/pkg/bin/brandy/dsp/mini/dsp_main.bin M code/sdk/tools/pkg/bin/brandy/dsp/normal/dsp_main.bin M code/sdk/tools/pkg/bin/brandy/ssb.bin ?? SDK_1.1.10.602_0425patch.txt ?? autobuild.sh ?? code/sdk/application/audio/vendor/aw88166/aw88166.c ?? code/sdk/application/audio/vendor/aw88166/aw883xx.c ?? code/sdk/application/audio/vendor/aw88166/aw883xx_calib.c ?? code/sdk/application/audio/vendor/aw88166/aw883xx_device.c ?? code/sdk/application/audio/vendor/aw88166/config/aw88166/mono/16bit/aw883xx_acf.bin ?? code/sdk/application/audio/vendor/aw88166/config/aw88166/mono/32bit/aw883xx_acf.bin ?? code/sdk/application/audio/vendor/aw88166/config/aw88166/stereo/16bit/aw883xx_acf.bin ?? code/sdk/application/audio/vendor/aw88166/config/aw88166/stereo/32bit/aw883xx_acf.bin ?? code/sdk/application/audio/vendor/aw88166/product_init_files/aw88166/aw883xx_pid_2066_init.c ?? code/sdk/application/wearable/nativeabilityfwk/include/TransitionType.h ?? code/sdk/application/wearable/nativeabilityfwk/src/transition/HexagonsTransition.cpp ?? code/sdk/application/wearable/nativeabilityfwk/src/transition/HexagonsTransition.h ?? code/sdk/application/wearable/nativeapp/nativeui/add_card/ ?? code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinParser.h ?? code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinTypes.h ?? code/sdk/application/wearable/nativeapp/nativeui/main/include/MainModel.h ?? code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialKaleidoscopeView.h ?? code/sdk/application/wearable/nativeapp/nativeui/main/src/MainModel.cpp ?? code/sdk/application/wearable/nativeapp/nativeui/set_card/ ?? code/sdk/application/wearable/nativeapp/nativeui/set_desktop/ ?? code/sdk/application/wearable/nativeapp/nativeui/set_dial/ ?? code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_js_component.h ?? code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_js_location.h ?? code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_msg_center.h ?? code/sdk/application/wearable/service/msg_center/libs/ ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CARD_ACTIVITY.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CARD_ADD.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CARD_COMPASS.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CARD_DEL.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CARD_HEART.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/CARD_PLAYER.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/DIAL_CLOCK.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SETTTING_DESKTOP.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SET_DESKTOP_BG.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SET_DESKTOP_HEXAGONS.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/SET_DESKTOP_LIST.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/hexagons.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/kaleidoscope.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/planet.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/rabbit454.bin ?? code/sdk/build/config/target_config/brandy/mk_fs_image/fs/user/res/rainbow.bin ?? code/sdk/interim_binary/brandy/libs/audio/ ?? code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_brandy_sample.a ?? code/sdk/interim_binary/brandy/libs/gpu/ ?? code/sdk/interim_binary/brandy/libs/media/evb_standard/libjs_audio_captuer.a ?? code/sdk/interim_binary/brandy/libs/media/evb_standard/libjs_player.a ?? code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h ?? code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_coverflow_view.h ?? code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_custom_hexagons_list.h ?? code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_hexagons_list.h ?? code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h ?? code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_map_view.h ?? code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_custom_hexagons_list.cpp ?? code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext/map_svg_parser.h ?? code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext/triangular_plane.h ?? code/sdk/middleware/services/gui/uikit/res/hexagons.bin ?? code/sdk/middleware/services/gui/uikit/res/kaleidoscope_dial.bin ?? code/sdk/middleware/services/gui/uikit/res/map.bin ?? code/sdk/middleware/services/gui/uikit/res/panda_first.bin ?? code/sdk/middleware/services/gui/uikit/res/regular_hexagon.bin ?? code/sdk/middleware/services/gui/uikit/res/regular_hexagon_inverse.bin ?? code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ ?? code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_hexagons_list/ ?? code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_kaleidoscope/ ?? code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_map/ ?? code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/baidu_map_component.cpp ?? code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/baidu_map_component.h ?? code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/ ?? code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/display/ ?? code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/app_data_module.cpp ?? code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/app_data_module.h ?? code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/bundlems/ ?? code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/include/appexecfwk/appexecfwk_lite/services/bundlemgr_lite/include/sign_mode.h ?? code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/ ?? code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-ext/ ?? code/sdk/open_source/openharmony/utils/native/lite/js/ ?? code/sdk/output/ ?? tools/
+build done at 20240503_001359
)\r
#===================================================================================\r
include(${SAP_TOP_DIR}/build/cmake/audio_common.cmake)\r
+install_sdk(${CMAKE_CURRENT_SOURCE_DIR}/aw88166 "*")\r
--- /dev/null
+/*\r
+ * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.\r
+ * Description: source file for aw88166 driver\r
+ */\r
+\r
+#include <stdio.h>\r
+#include "soc_osal.h"\r
+#include "audio_debug.h"\r
+#include "gpio.h"\r
+#include "hal_gpio.h"\r
+#include "i2c.h"\r
+#include "pinctrl.h"\r
+#include "vendor_common.h"\r
+#include "soc_uapi_vendor.h"\r
+\r
+#include "aw883xx_init.h"\r
+#include "aw883xx.h"\r
+#include "aw_params.h"\r
+\r
+static td_bool g_aw88166_i2c_inited = TD_FALSE;\r
+\r
+#define AW88166_PWR_ON_PIN S_MGPIO4\r
+#define AW88166_I2C_BUS_ID I2C_BUS_0\r
+#define AW88166_I2C_DEV_ADDR 0x34\r
+\r
+static td_s32 aw_dev0_i2c_write_func(td_u16 dev_addr, td_u8 reg_addr, td_u8 *pdata, td_u16 len)\r
+{\r
+ td_s32 ret;\r
+ i2c_data_t data;\r
+ const td_u8 reg_addr_len = sizeof(reg_addr); /* data len of reg_addr */\r
+ const td_u8 send_len = len + reg_addr_len; /* pdata bytes && reg_addr len */\r
+ td_u8 *send_data = osal_kmalloc_align(send_len, 0, 8); /* 8 : Align up to 8 bytes */\r
+\r
+ if (send_data == TD_NULL) {\r
+ ret = -1; /* -1:FAILED ERR CODE */\r
+ vendor_log_fun_err(malloc, ret);\r
+ return ret;\r
+ }\r
+\r
+ /* pack reg addr & reg data */\r
+ *send_data = reg_addr; /* reg_addr */\r
+ ret = memcpy_s(send_data + reg_addr_len, (send_len - reg_addr_len), pdata, len); /* pdata */\r
+ if (ret != EOK) {\r
+ vendor_log_fun_err(memcpy_s, ret);\r
+ goto out;\r
+ }\r
+\r
+ data.send_buf = send_data;\r
+ data.send_len = send_len;\r
+ data.receive_buf = NULL;\r
+ data.receive_len = 0;\r
+ ret = (td_s32)uapi_i2c_master_write(AW88166_I2C_BUS_ID, dev_addr, &data);\r
+ if (ret != ERRCODE_SUCC) {\r
+ vendor_log_fun_err(uapi_i2c_master_write, ret);\r
+ goto out;\r
+ }\r
+\r
+out:\r
+ if (send_data != TD_NULL) {\r
+ osal_kfree(send_data);\r
+ }\r
+ return ret;\r
+}\r
+\r
+static td_s32 aw_dev0_i2c_read_func(td_u16 dev_addr, td_u8 reg_addr, td_u8 *pdata, td_u16 len)\r
+{\r
+ td_s32 ret;\r
+\r
+ i2c_data_t data;\r
+\r
+ data.send_buf = ®_addr;\r
+ data.send_len = sizeof(reg_addr);\r
+ data.receive_buf = pdata;\r
+ data.receive_len = len;\r
+ ret = (td_s32)uapi_i2c_master_writeread(AW88166_I2C_BUS_ID, dev_addr, &data);\r
+ if (ret != ERRCODE_SUCC) {\r
+ vendor_log_fun_err(uapi_i2c_master_writeread, ret);\r
+ return ret;\r
+ }\r
+\r
+ return AUDIO_SUCCESS;\r
+}\r
+\r
+static td_void aw_dev0_reset_gpio_ctl(bool state)\r
+{\r
+ uapi_gpio_set_val(AW88166_PWR_ON_PIN, state);\r
+}\r
+\r
+static td_void aw88166_pwr_on_pin_init(td_void)\r
+{\r
+ uapi_gpio_set_dir(AW88166_PWR_ON_PIN, GPIO_DIRECTION_OUTPUT);\r
+}\r
+\r
+static td_s32 aw88166_i2c_init(td_void)\r
+{\r
+ td_s32 ret;\r
+ audio_func_enter();\r
+\r
+ /* init i2c */\r
+ vendor_trace_log_u32(AW88166_I2C_BUS_ID);\r
+ ret = (td_s32)uapi_i2c_master_init(AW88166_I2C_BUS_ID, I2C_BAUDRATE, I2C_HIGH_SPEED_CODE);\r
+ if (ret != AUDIO_SUCCESS) {\r
+ vendor_log_fun_err(uapi_i2c_master_init, ret);\r
+ return ret;\r
+ }\r
+\r
+ vendor_printf("aw88166 i2c init success\n");\r
+ audio_func_exit();\r
+ return AUDIO_SUCCESS;\r
+}\r
+\r
+static td_s32 aw88166_i2c_deinit(td_void)\r
+{\r
+ td_s32 ret;\r
+ audio_func_enter();\r
+\r
+ /* deinit i2c */\r
+ vendor_trace_log_u32(AW88166_I2C_BUS_ID);\r
+ ret = (td_s32)uapi_i2c_deinit(AW88166_I2C_BUS_ID);\r
+ if (ret != AUDIO_SUCCESS) {\r
+ vendor_log_fun_err(uapi_i2c_deinit, ret);\r
+ return ret;\r
+ }\r
+\r
+ vendor_printf("aw88166 i2c deinit success\n");\r
+ audio_func_exit();\r
+ return AUDIO_SUCCESS;\r
+}\r
+\r
+td_s32 aw883xx_pid_2066_dev_init(td_void *aw883xx);\r
+\r
+struct aw_init_info init_info[] = {\r
+ {\r
+ .dev = AW_DEV_0,\r
+ .i2c_addr = AW88166_I2C_DEV_ADDR,\r
+ .re_min = 2000, /* awinic:If the re_min(ohms) and re_max(ohms) are not set, the default value is used */\r
+ .re_max = 39000,\r
+ .mix_chip_count = AW_DEV0_MIX_CHIP_NUM,\r
+ .prof_info = g_dev0_prof_info,\r
+ .i2c_read_func = aw_dev0_i2c_read_func,\r
+ .i2c_write_func = aw_dev0_i2c_write_func,\r
+ .reset_gpio_ctl = aw_dev0_reset_gpio_ctl,\r
+ .dev_init_ops = {aw883xx_pid_2066_dev_init},\r
+ }\r
+};\r
+\r
+static td_s32 audio_aw88166_configuration(const uapi_vendor_codec_attr *attr)\r
+{\r
+ td_s32 ret;\r
+\r
+ /* awinic:Control interface of dev0 */\r
+ /* awinic:initialization */\r
+ ret = aw883xx_smartpa_init((td_void *)&init_info[AW_DEV_0]);\r
+ if (ret != AUDIO_SUCCESS) {\r
+ vendor_printf("aw883xx_smartpa_init already init\n");\r
+ }\r
+ /* awinic:set mode "Music", "aw_params.h" contains id information */\r
+ ret = aw883xx_set_profile_byname(AW_DEV_0, "Music");\r
+ if (ret != AUDIO_SUCCESS) {\r
+ vendor_log_fun_err(aw883xx_set_profile_byname, ret);\r
+ }\r
+\r
+ vendor_unused(attr);\r
+ return ret;\r
+}\r
+\r
+static td_s32 audio_aw88166_deconfiguration(td_void)\r
+{\r
+ /* awinic:Free the requested memory when PA is not used */\r
+ aw883xx_smartpa_deinit(AW_DEV_0);\r
+\r
+ return AUDIO_SUCCESS;\r
+}\r
+\r
+td_s32 audio_aw88166_init(const uapi_vendor_codec_attr *attr)\r
+{\r
+ td_s32 ret;\r
+\r
+ audio_func_enter();\r
+\r
+ aw88166_pwr_on_pin_init();\r
+\r
+ if (g_aw88166_i2c_inited != TD_TRUE) {\r
+ ret = aw88166_i2c_init();\r
+ if (ret != AUDIO_SUCCESS) {\r
+ vendor_log_fun_err(aw88166_i2c_init, ret);\r
+ return ret;\r
+ }\r
+ g_aw88166_i2c_inited = TD_TRUE;\r
+ } else {\r
+ ret = 0;\r
+ }\r
+\r
+ ret = audio_aw88166_configuration(attr);\r
+ if (ret != AUDIO_SUCCESS) {\r
+ vendor_log_fun_err(audio_aw88166_configuration, ret);\r
+ }\r
+\r
+ return AUDIO_SUCCESS;\r
+}\r
+\r
+td_s32 audio_aw88166_deinit(td_void)\r
+{\r
+ td_s32 ret;\r
+ audio_func_enter();\r
+\r
+ ret = audio_aw88166_deconfiguration();\r
+ if (ret != AUDIO_SUCCESS) {\r
+ vendor_log_fun_err(audio_aw88166_deconfiguration, ret);\r
+ }\r
+\r
+ if (g_aw88166_i2c_inited != TD_FALSE) {\r
+ ret = aw88166_i2c_deinit();\r
+ if (ret != AUDIO_SUCCESS) {\r
+ vendor_log_fun_err(aw88166_i2c_deinit, ret);\r
+ return ret;\r
+ }\r
+ g_aw88166_i2c_inited = TD_FALSE;\r
+ } else {\r
+ ret = AUDIO_SUCCESS;\r
+ }\r
+\r
+ audio_func_exit();\r
+ return ret;\r
+}\r
+\r
+td_s32 audio_aw88166_start(const uapi_vendor_codec_attr *attr)\r
+{\r
+ td_s32 ret;\r
+\r
+ audio_func_enter();\r
+\r
+ /* awinic:The platform needs to output I2s first, and then ctl start */\r
+ ret = aw883xx_ctrl_state(AW_DEV_0, AW_START);\r
+ if (ret != AUDIO_SUCCESS) {\r
+ vendor_log_fun_err(aw883xx_ctrl_state, ret);\r
+ }\r
+\r
+ vendor_unused(attr);\r
+ return ret;\r
+}\r
+\r
+td_s32 audio_aw88166_stop(td_void)\r
+{\r
+ td_s32 ret;\r
+ audio_func_enter();\r
+\r
+ /* awinic:The platform needs to control the stop first and then stop I2S */\r
+ ret = aw883xx_ctrl_state(AW_DEV_0, AW_STOP);\r
+ if (ret != AUDIO_SUCCESS) {\r
+ vendor_log_fun_err(aw883xx_ctrl_state, ret);\r
+ }\r
+ audio_func_exit();\r
+ return ret;\r
+}\r
+\r
+td_s32 audio_aw88166_set_aef_profile(uapi_snd_aef_profile aef_profile)\r
+{\r
+ td_s32 ret;\r
+\r
+ audio_func_enter();\r
+\r
+ /* awinic:set mode "Receiver"/"Music", "aw_params.h" contains id information */\r
+ if (aef_profile == UAPI_SND_AEF_PROFILE_VOIP) {\r
+ /* awinic:set mode "Receiver" */\r
+ ret = aw883xx_set_profile_byname(AW_DEV_0, "Receiver");\r
+ } else {\r
+ /* awinic:set mode "Music" */\r
+ ret = aw883xx_set_profile_byname(AW_DEV_0, "Music");\r
+ }\r
+\r
+ if (ret != AUDIO_SUCCESS) {\r
+ vendor_log_fun_err(aw883xx_set_profile_byname, ret);\r
+ }\r
+\r
+ audio_func_exit();\r
+ return ret;\r
+}\r
--- /dev/null
+/*\r
+* aw883xx.c aw883xx codec driver\r
+*\r
+* Copyright (c) 2021 AWINIC Technology CO., LTD\r
+*\r
+* Author: <zhaolei@awinic.com>\r
+*\r
+* This program is free software; you can redistribute it and/or modify it\r
+* under the terms of the GNU General Public License as published by the\r
+* Free Software Foundation; either version 2 of the License, or (at your\r
+* option) any later version.\r
+*/\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <stdint.h>\r
+#include <string.h>\r
+\r
+#include "aw883xx.h"\r
+#include "aw883xx_base.h"\r
+#include "aw883xx_device.h"\r
+#include "aw883xx_init.h"\r
+#include "aw883xx_calib.h"\r
+\r
+#define AW883XX_DRIVER_VERSION "v0.4.0"\r
+#define AW883xx_I2C_NAME "aw883xx_smartpa"\r
+\r
+#define AW_READ_CHIPID_RETRIES 5 /* 5 times */\r
+\r
+unsigned int g_aw883xx_dev_cnt = 0;\r
+struct aw883xx *g_aw883xx[AW_DEV_MAX];\r
+\r
+/******************************************************\r
+ *\r
+ * aw883xx i2c write/read\r
+ *\r
+ ******************************************************/\r
+int aw883xx_i2c_writes(struct aw883xx *aw883xx,\r
+ uint8_t reg_addr, uint8_t *buf, uint16_t len)\r
+{\r
+ int ret = -1;\r
+\r
+ ret = aw883xx->i2c_write_func(aw883xx->i2c_addr, reg_addr, buf, len);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c write error");\r
+ }\r
+ return ret;\r
+}\r
+\r
+static int aw883xx_i2c_reads(struct aw883xx *aw883xx,\r
+ uint8_t reg_addr, uint8_t *data_buf, uint16_t data_len)\r
+{\r
+ int ret = -1;\r
+\r
+ ret = aw883xx->i2c_read_func(aw883xx->i2c_addr, reg_addr, data_buf, data_len);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c read error");\r
+ }\r
+ return ret;\r
+}\r
+\r
+int aw883xx_i2c_write(struct aw883xx *aw883xx,\r
+ uint8_t reg_addr, uint16_t reg_data)\r
+{\r
+ int ret = -1;\r
+ uint8_t cnt = 0;\r
+ uint8_t buf[2] = {0};\r
+\r
+ buf[0] = (reg_data & 0xff00) >> 8;\r
+ buf[1] = (reg_data & 0x00ff) >> 0;\r
+\r
+ while (cnt < AW_I2C_RETRIES) {\r
+ ret = aw883xx_i2c_writes(aw883xx, reg_addr, buf, 2);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c_write cnt=%d error=%d",\r
+ cnt, ret);\r
+ } else {\r
+ break;\r
+ }\r
+ cnt++;\r
+ }\r
+\r
+ if (aw883xx->i2c_log_en) {\r
+ aw_dev_info(aw883xx->dev, "write: reg = 0x%02x, val = 0x%04x",\r
+ reg_addr, reg_data);\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+int aw883xx_i2c_read(struct aw883xx *aw883xx,\r
+ uint8_t reg_addr, uint16_t *reg_data)\r
+{\r
+ int ret = -1;\r
+ uint8_t cnt = 0;\r
+ uint8_t buf[2] = {0};\r
+\r
+ while (cnt < AW_I2C_RETRIES) {\r
+ ret = aw883xx_i2c_reads(aw883xx, reg_addr, buf, 2);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c_read cnt=%d error=%d",\r
+ cnt, ret);\r
+ } else {\r
+ *reg_data = (buf[0] << 8) | (buf[1] << 0);\r
+ break;\r
+ }\r
+ cnt++;\r
+ }\r
+\r
+ if (aw883xx->i2c_log_en) {\r
+ aw_dev_info(aw883xx->dev, "read: reg = 0x%02x, val = 0x%04x",\r
+ reg_addr, *reg_data);\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+static int aw883xx_i2c_write_bits(struct aw883xx *aw883xx,\r
+ uint8_t reg_addr, uint16_t mask,\r
+ uint16_t reg_data)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val = 0;\r
+\r
+ ret = aw883xx_i2c_read(aw883xx, reg_addr, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c read error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+ reg_val &= mask;\r
+ reg_val |= reg_data & (~mask);\r
+ ret = aw883xx_i2c_write(aw883xx, reg_addr, reg_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c read error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_reg_write(struct aw883xx *aw883xx,\r
+ uint8_t reg_addr, uint16_t reg_data)\r
+{\r
+ int ret = -1;\r
+\r
+ aw_mutex_lock();\r
+ ret = aw883xx_i2c_write(aw883xx, reg_addr, reg_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev,\r
+ "write fail, reg = 0x%02x, val = 0x%04x, ret=%d",\r
+ reg_addr, reg_data, ret);\r
+ }\r
+ aw_mutex_unlock();\r
+\r
+ return ret;\r
+}\r
+\r
+int aw883xx_reg_read(struct aw883xx *aw883xx,\r
+ uint8_t reg_addr, uint16_t *reg_data)\r
+{\r
+ int ret = -1;\r
+\r
+ aw_mutex_lock();\r
+ ret = aw883xx_i2c_read(aw883xx, reg_addr, reg_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev,\r
+ "read fail: reg = 0x%02x, val = 0x%04x, ret=%d",\r
+ reg_addr, *reg_data, ret);\r
+ }\r
+ aw_mutex_unlock();\r
+\r
+ return ret;\r
+}\r
+\r
+int aw883xx_reg_write_bits(struct aw883xx *aw883xx,\r
+ uint8_t reg_addr, uint16_t mask, uint16_t reg_data)\r
+{\r
+ int ret = -1;\r
+\r
+ aw_mutex_lock();\r
+ ret = aw883xx_i2c_write_bits(aw883xx, reg_addr, mask, reg_data);\r
+\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev,\r
+ "aw883xx_reg_write_bits fail, ret=%d", ret);\r
+ }\r
+ aw_mutex_unlock();\r
+\r
+ return ret;\r
+}\r
+\r
+static int aw883xx_dsp_write_16bit(struct aw883xx *aw883xx,\r
+ uint16_t dsp_addr, uint32_t dsp_data)\r
+{\r
+ int ret = -1;\r
+ struct aw_dsp_mem_desc *desc = &aw883xx->aw_pa->dsp_mem_desc;\r
+\r
+ ret = aw883xx_i2c_write(aw883xx, desc->dsp_madd_reg, dsp_addr);\r
+\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c write error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ ret = aw883xx_i2c_write(aw883xx, desc->dsp_mdat_reg, (uint16_t)dsp_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c write error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw883xx_dsp_write_32bit(struct aw883xx *aw883xx,\r
+ uint16_t dsp_addr, uint32_t dsp_data)\r
+{\r
+ int ret = -1;\r
+ uint16_t temp_data = 0;\r
+ struct aw_dsp_mem_desc *desc = &aw883xx->aw_pa->dsp_mem_desc;\r
+\r
+ ret = aw883xx_i2c_write(aw883xx, desc->dsp_madd_reg, dsp_addr);\r
+\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c write error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ temp_data = dsp_data & AW883XX_DSP_16_DATA_MASK;\r
+ ret = aw883xx_i2c_write(aw883xx, desc->dsp_mdat_reg, temp_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c write error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ temp_data = dsp_data >> 16;\r
+ ret = aw883xx_i2c_write(aw883xx, desc->dsp_mdat_reg, temp_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c write error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+/******************************************************\r
+ * aw883xx clear dsp chip select state\r
+ ******************************************************/\r
+int aw883xx_get_version(char *buf, int size)\r
+{\r
+ if (size > strlen(AW883XX_DRIVER_VERSION)) {\r
+ memcpy(buf, AW883XX_DRIVER_VERSION, strlen(AW883XX_DRIVER_VERSION));\r
+ return strlen(AW883XX_DRIVER_VERSION);\r
+ } else {\r
+ return -ENOMEM;\r
+ }\r
+}\r
+\r
+static void aw883xx_clear_dsp_sel_st(struct aw883xx *aw883xx)\r
+{\r
+ uint16_t reg_value;\r
+ uint8_t reg = aw883xx->aw_pa->soft_rst.reg;\r
+\r
+ aw883xx_i2c_read(aw883xx, reg, ®_value);\r
+}\r
+\r
+int aw883xx_dsp_write(struct aw883xx *aw883xx,\r
+ uint16_t dsp_addr, uint32_t dsp_data, uint8_t data_type)\r
+{\r
+ int ret = -1;\r
+\r
+ aw_mutex_lock();\r
+ if (data_type == AW_DSP_16_DATA) {\r
+ ret = aw883xx_dsp_write_16bit(aw883xx, dsp_addr, dsp_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "write dsp_addr[0x%04x] 16 bit dsp_data[%04x] failed",\r
+ (uint32_t)dsp_addr, dsp_data);\r
+ goto exit;\r
+ }\r
+ } else if (data_type == AW_DSP_32_DATA) {\r
+ ret = aw883xx_dsp_write_32bit(aw883xx, dsp_addr, dsp_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "write dsp_addr[0x%04x] 32 bit dsp_data[%08x] failed",\r
+ (uint32_t)dsp_addr, dsp_data);\r
+ goto exit;\r
+ }\r
+ } else {\r
+ aw_dev_err(aw883xx->dev, "data type[%d] unsupported", data_type);\r
+ ret = -EINVAL;\r
+ goto exit;\r
+ }\r
+\r
+exit:\r
+ aw883xx_clear_dsp_sel_st(aw883xx);\r
+ aw_mutex_unlock();\r
+\r
+ return ret;\r
+}\r
+\r
+\r
+static int aw883xx_dsp_read_16bit(struct aw883xx *aw883xx,\r
+ uint16_t dsp_addr, uint32_t *dsp_data)\r
+{\r
+ int ret = -1;\r
+ uint16_t temp_data = 0;\r
+ struct aw_dsp_mem_desc *desc = &aw883xx->aw_pa->dsp_mem_desc;\r
+\r
+ ret = aw883xx_i2c_write(aw883xx, desc->dsp_madd_reg, dsp_addr);\r
+\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c write error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ ret = aw883xx_i2c_read(aw883xx, desc->dsp_mdat_reg, &temp_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c write error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ *dsp_data = temp_data;\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw883xx_dsp_read_32bit(struct aw883xx *aw883xx,\r
+ uint16_t dsp_addr, uint32_t *dsp_data)\r
+{\r
+ int ret = -1;\r
+ uint16_t temp_data = 0;\r
+ struct aw_dsp_mem_desc *desc = &aw883xx->aw_pa->dsp_mem_desc;\r
+\r
+ /*write dsp addr*/\r
+ ret = aw883xx_i2c_write(aw883xx, desc->dsp_madd_reg, dsp_addr);\r
+\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c write error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ /*get Low 16 bit data*/\r
+ ret = aw883xx_i2c_read(aw883xx, desc->dsp_mdat_reg, &temp_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c read error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ *dsp_data = temp_data;\r
+\r
+ /*get high 16 bit data*/\r
+ ret = aw883xx_i2c_read(aw883xx, desc->dsp_mdat_reg, &temp_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "i2c read error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+ *dsp_data |= (temp_data << 16);\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_dsp_read(struct aw883xx *aw883xx,\r
+ uint16_t dsp_addr, uint32_t *dsp_data, uint8_t data_type)\r
+{\r
+ int ret = -1;\r
+\r
+ aw_mutex_lock();\r
+ if (data_type == AW_DSP_16_DATA) {\r
+ ret = aw883xx_dsp_read_16bit(aw883xx, dsp_addr, dsp_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "read dsp_addr[0x%04x] 16 bit dsp_data[%04x] failed",\r
+ (uint32_t)dsp_addr, *dsp_data);\r
+ goto exit;\r
+ }\r
+ } else if (data_type == AW_DSP_32_DATA) {\r
+ ret = aw883xx_dsp_read_32bit(aw883xx, dsp_addr, dsp_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "read dsp_addr[0x%04x] 32 bit dsp_data[%08x] failed",\r
+ (uint32_t)dsp_addr, *dsp_data);\r
+ goto exit;\r
+ }\r
+ } else {\r
+ aw_dev_err(aw883xx->dev, "data type[%d] unsupported", data_type);\r
+ ret = -EINVAL;\r
+ goto exit;\r
+ }\r
+\r
+exit:\r
+ aw883xx_clear_dsp_sel_st(aw883xx);\r
+ aw_mutex_unlock();\r
+\r
+ return ret;\r
+}\r
+\r
+int aw883xx_dsp_write_bits(struct aw883xx *aw883xx, uint16_t dsp_addr,\r
+ uint32_t dsp_mask, uint32_t dsp_data, uint8_t data_type)\r
+{\r
+ int ret = -1;\r
+ uint32_t read_val = 0;\r
+ uint32_t write_val = 0;\r
+\r
+ aw_mutex_lock();\r
+ if (data_type == AW_DSP_16_DATA) {\r
+ ret = aw883xx_dsp_read_16bit(aw883xx, dsp_addr, &read_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "read dsp_addr[0x%04x] 16 bit dsp_data[%04x] failed",\r
+ (uint32_t)dsp_addr, read_val);\r
+ goto exit;\r
+ }\r
+ } else if (data_type == AW_DSP_32_DATA) {\r
+ ret = aw883xx_dsp_read_32bit(aw883xx, dsp_addr, &read_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "read dsp_addr[0x%04x] 32 bit dsp_data[%08x] failed",\r
+ (uint32_t)dsp_addr, read_val);\r
+ goto exit;\r
+ }\r
+ }\r
+\r
+ write_val = read_val & dsp_mask;\r
+ write_val |= dsp_data & (~dsp_mask);\r
+\r
+ if (data_type == AW_DSP_16_DATA) {\r
+ ret = aw883xx_dsp_write_16bit(aw883xx, dsp_addr, write_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "write dsp_addr[0x%04x] 16 bit dsp_data[%04x] failed",\r
+ (uint32_t)dsp_addr, write_val);\r
+ goto exit;\r
+ }\r
+ } else if (data_type == AW_DSP_32_DATA) {\r
+ ret = aw883xx_dsp_write_32bit(aw883xx, dsp_addr, write_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "write dsp_addr[0x%04x] 32 bit dsp_data[%08x] failed",\r
+ (uint32_t)dsp_addr, write_val);\r
+ goto exit;\r
+ }\r
+ }\r
+exit:\r
+ aw883xx_clear_dsp_sel_st(aw883xx);\r
+ aw_mutex_unlock();\r
+ return ret;\r
+}\r
+\r
+/******************************************************\r
+ * aw883xx interface\r
+ ******************************************************/\r
+int aw883xx_get_dev_num(void)\r
+{\r
+ return g_aw883xx_dev_cnt;\r
+}\r
+\r
+struct aw883xx *aw883xx_get_dev(uint8_t dev)\r
+{\r
+ return g_aw883xx[dev];\r
+}\r
+\r
+static void aw883xx_start_pa(struct aw883xx *aw883xx)\r
+{\r
+ int ret = -1;\r
+ int i;\r
+ aw_dev_info(aw883xx->dev, "enter");\r
+\r
+ if (aw883xx->allow_pw == false) {\r
+ aw_dev_info(aw883xx->dev, "dev can not allow power");\r
+ return;\r
+ }\r
+\r
+ if (aw883xx->pstream == AW_STREAM_CLOSE) {\r
+ aw_dev_info(aw883xx->dev, "pstream is close");\r
+ return;\r
+ }\r
+\r
+ for (i = 0; i < AW_START_RETRIES; i++) {\r
+ ret = aw883xx_device_start(aw883xx->aw_pa);\r
+ if (ret) {\r
+ aw_dev_err(aw883xx->dev, "start failed");\r
+ ret = aw883xx_device_fw_update(aw883xx->aw_pa, AW_DSP_FW_UPDATE_ON, true);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "fw update failed");\r
+ continue;\r
+ }\r
+ } else {\r
+ aw_dev_info(aw883xx->dev, "start success");\r
+ break;\r
+ }\r
+ }\r
+}\r
+\r
+static void aw883xx_start(struct aw883xx *aw883xx)\r
+{\r
+ int ret = -1;\r
+ int i;\r
+ bool sync_start = 0;\r
+\r
+ aw_dev_info(aw883xx->dev,"enter");\r
+\r
+ if (aw883xx->aw_pa->fw_status == AW_DEV_FW_OK) {\r
+ if (aw883xx->allow_pw == false) {\r
+ aw_dev_info(aw883xx->dev, "dev can not allow power");\r
+ return;\r
+ }\r
+\r
+ if (aw883xx->aw_pa->status == AW_DEV_PW_ON) {\r
+ aw_dev_info(aw883xx->dev, "pa already start");\r
+ return;\r
+ }\r
+\r
+ for (i = 0; i < AW_START_RETRIES; i++) {\r
+ ret = aw883xx_device_fw_update(aw883xx->aw_pa, AW_DSP_FW_UPDATE_OFF,\r
+ aw883xx->phase_sync);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "fw update failed");\r
+ continue;\r
+ } else {\r
+ if (sync_start == AW_SYNC_START) {\r
+ aw883xx_start_pa(aw883xx);\r
+ }\r
+ return;\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+static void aw883xx_stop_pa(struct aw883xx *aw883xx)\r
+{\r
+ aw883xx_device_stop(aw883xx->aw_pa);\r
+}\r
+\r
+\r
+static int aw883xx_hw_reset(struct aw883xx *aw883xx)\r
+{\r
+ aw_dev_info(aw883xx->dev, "enter");\r
+\r
+ aw883xx->reset_gpio_ctl(AW_PIN_RESET);\r
+ aw_dev_info(aw883xx->dev, "gpio_ctl=%d", AW_PIN_RESET);\r
+ AW_MS_DELAY(1);\r
+ aw883xx->reset_gpio_ctl(AW_PIN_SET);\r
+ aw_dev_info(aw883xx->dev, "gpio_ctl=%d", AW_PIN_SET);\r
+ AW_MS_DELAY(2);\r
+\r
+ return 0;\r
+}\r
+\r
+#ifdef AW_DEBUG\r
+int aw883xx_hw_reset_by_index(aw_dev_index_t dev)\r
+{\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx_hw_reset(g_aw883xx[dev]);\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_soft_reset(aw_dev_index_t dev)\r
+{\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx_device_status(g_aw883xx[dev]->aw_pa, AW_DEV_SOFT_RESET_STATUS, AW_SET_DEV_STATUS);\r
+\r
+ return 0;\r
+}\r
+\r
+\r
+int aw883xx_reg_store(aw_dev_index_t dev, uint8_t reg_addr, uint16_t reg_data)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_err("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_err("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ aw883xx_i2c_write(aw883xx, reg_addr, reg_data);\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_reg_show(aw_dev_index_t dev)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ aw883xx_device_status(aw883xx->aw_pa, AW_DEV_REG_DUMP_STATUS, AW_SET_DEV_STATUS);\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw883xx_dsp_log_info(struct aw883xx *aw883xx, unsigned int base_addr,\r
+ uint32_t data_len, char *format)\r
+{\r
+ uint16_t reg_val = 0;\r
+ char *dsp_reg_info = NULL;\r
+ uint32_t dsp_info_len = 0;\r
+ int i;\r
+\r
+ dsp_reg_info = calloc(1, AW_NAME_BUF_MAX);\r
+ if (dsp_reg_info == NULL) {\r
+ aw_dev_err(aw883xx->dev, "dsp_reg_info calloc failed");\r
+ return -1;\r
+ }\r
+\r
+ aw_mutex_lock();\r
+ aw883xx_i2c_write(aw883xx, aw883xx->aw_pa->dsp_mem_desc.dsp_madd_reg, base_addr);\r
+\r
+ for (i = 0; i < data_len; i+=2) {\r
+ aw883xx_i2c_read(aw883xx, aw883xx->aw_pa->dsp_mem_desc.dsp_mdat_reg, ®_val);\r
+ dsp_info_len += snprintf(dsp_reg_info + dsp_info_len, AW_NAME_BUF_MAX - dsp_info_len,\r
+ "%02x,%02x,", (reg_val >> 0) & 0xff,\r
+ (reg_val >> 8) & 0xff);\r
+ if ((i / 2 + 1) % 8 == 0) {\r
+ aw_dev_info(aw883xx->dev, "%s: %s", format, dsp_reg_info);\r
+ dsp_info_len = 0;\r
+ memset(dsp_reg_info, 0, AW_NAME_BUF_MAX);\r
+ }\r
+\r
+ if (((data_len) % 8 != 0) &&\r
+ (i == (data_len - 2))) {\r
+ aw_dev_info(aw883xx->dev, "%s: %s", format, dsp_reg_info);\r
+ dsp_info_len = 0;\r
+ memset(dsp_reg_info, 0, AW_NAME_BUF_MAX);\r
+ }\r
+ }\r
+\r
+ dsp_info_len = 0;\r
+ memset(dsp_reg_info, 0, AW_NAME_BUF_MAX);\r
+ free(dsp_reg_info);\r
+ dsp_reg_info = NULL;\r
+ aw_mutex_unlock();\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_dsp_info_show(aw_dev_index_t dev)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct aw_dsp_st *dsp_st_desc = NULL;\r
+ uint32_t data_len;\r
+ bool status = false;\r
+ int ret = -1;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+ dsp_st_desc = &aw883xx->aw_pa->dsp_st_desc;\r
+\r
+ if (aw883xx->aw_pa->dsp_cfg == AW_DEV_DSP_BYPASS) {\r
+ aw_dev_info(aw883xx->dev, "dsp bypass");\r
+ } else {\r
+ aw_dev_info(aw883xx->dev, "dsp working");\r
+ status = aw883xx_device_status(aw883xx->aw_pa, AW_DEV_PLL_WDT_STATUS,\r
+ AW_GET_DEV_STATUS);\r
+ if (!status) {\r
+ aw_dev_err(aw883xx->dev, "PA status abnormal");\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_dev_info(aw883xx->dev, "dsp_firmware_len:%d", aw883xx->aw_pa->dsp_fw_len);\r
+ ret = aw883xx_dsp_log_info(aw883xx, aw883xx->aw_pa->dsp_mem_desc.dsp_fw_base_addr,\r
+ aw883xx->aw_pa->dsp_fw_len, "dsp_fw");\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "dsp_fw display failed");\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_dev_info(aw883xx->dev, "dsp_config_len:%d", aw883xx->aw_pa->dsp_cfg_len);\r
+ ret = aw883xx_dsp_log_info(aw883xx, aw883xx->aw_pa->dsp_mem_desc.dsp_cfg_base_addr,\r
+ aw883xx->aw_pa->dsp_cfg_len, "dsp_config");\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "dsp_config display failed");\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_dev_info(aw883xx->dev, "dsp_config:0x%04x-0x%04x",\r
+ dsp_st_desc->dsp_reg_s1, dsp_st_desc->dsp_reg_e1);\r
+ data_len = 2 * (dsp_st_desc->dsp_reg_e1 - dsp_st_desc->dsp_reg_s1);\r
+ ret = aw883xx_dsp_log_info(aw883xx, dsp_st_desc->dsp_reg_s1,\r
+ data_len, "dsp_st");\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "dsp_config:0x%04x-0x%04x display failed",\r
+ dsp_st_desc->dsp_reg_s1, dsp_st_desc->dsp_reg_e1);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_dev_info(aw883xx->dev, "dsp_config:0x%04x-0x%04x",\r
+ dsp_st_desc->dsp_reg_s2, dsp_st_desc->dsp_reg_e2);\r
+ data_len = 2 * (dsp_st_desc->dsp_reg_e2 - dsp_st_desc->dsp_reg_s2);\r
+ ret = aw883xx_dsp_log_info(aw883xx, dsp_st_desc->dsp_reg_s2,\r
+ data_len , "dsp_st");\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "dsp_config:0x%04x-0x%04x display failed",\r
+ dsp_st_desc->dsp_reg_s2, dsp_st_desc->dsp_reg_e2);\r
+ return -EINVAL;\r
+ }\r
+ }\r
+\r
+ return 0;\r
+}\r
+#endif\r
+\r
+#ifdef AW_FADE\r
+\r
+static int aw883xx_dev_set_fade_vol_step(struct aw883xx *aw883xx, uint32_t step)\r
+{\r
+ int ret = -1;\r
+\r
+ uint32_t msg_len = sizeof(uint32_t);\r
+ struct aw_device *aw_dev = aw883xx->aw_pa;\r
+\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_FADE_STEP_PARAMS,\r
+ (void *)&step, msg_len, AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write_params failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw883xx_dev_get_fade_vol_step(struct aw883xx *aw883xx, uint32_t *step)\r
+{\r
+ int ret = -1;\r
+ int step_val = 0;\r
+ uint32_t msg_len = sizeof(uint32_t);\r
+ struct aw_device *aw_dev = aw883xx->aw_pa;\r
+\r
+ if (step == NULL) {\r
+ aw_pr_err("step is NULL");\r
+ return -EINVAL;\r
+ }\r
+\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_FADE_STEP_PARAMS,\r
+ (void *)&step_val, msg_len, AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read_params failed");\r
+ return ret;\r
+ }\r
+\r
+ *step = step_val;\r
+ return 0;\r
+}\r
+\r
+static int aw883xx_dev_set_fade_in_time(struct aw883xx *aw883xx, uint32_t time)\r
+{\r
+ int ret = -1;\r
+\r
+ uint32_t msg_len = sizeof(uint32_t);\r
+ struct aw_device *aw_dev = aw883xx->aw_pa;\r
+\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_FADE_IN_TIME_PARAMS,\r
+ (void *)&time, msg_len, AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write_params failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw883xx_dev_get_fade_in_time(struct aw883xx *aw883xx, uint32_t *time)\r
+{\r
+ int ret = -1;\r
+ int time_val = 0;\r
+ uint32_t msg_len = sizeof(uint32_t);\r
+ struct aw_device *aw_dev = aw883xx->aw_pa;\r
+\r
+ if (time == NULL) {\r
+ aw_pr_err("time is NULL");\r
+ return -EINVAL;\r
+ }\r
+\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_FADE_IN_TIME_PARAMS,\r
+ (void *)&time_val, msg_len, AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read_params failed");\r
+ return ret;\r
+ }\r
+\r
+ *time = time_val;\r
+ return 0;\r
+}\r
+\r
+static int aw883xx_dev_set_fade_out_time(struct aw883xx *aw883xx, uint32_t time)\r
+{\r
+ int ret = -1;\r
+\r
+ uint32_t msg_len = sizeof(uint32_t);\r
+ struct aw_device *aw_dev = aw883xx->aw_pa;\r
+\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_FADE_OUT_TIME_PARAMS,\r
+ (void *)&time, msg_len, AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write_params failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw883xx_dev_get_fade_out_time(struct aw883xx *aw883xx, uint32_t *time)\r
+{\r
+ int ret = -1;\r
+ int time_val = 0;\r
+ uint32_t msg_len = sizeof(uint32_t);\r
+ struct aw_device *aw_dev = aw883xx->aw_pa;\r
+\r
+ if (time == NULL) {\r
+ aw_pr_err("time is NULL");\r
+ return -EINVAL;\r
+ }\r
+\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_FADE_OUT_TIME_PARAMS,\r
+ (void *)&time_val, msg_len, AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read_params failed");\r
+ return ret;\r
+ }\r
+\r
+ *time = time_val;\r
+ return 0;\r
+}\r
+\r
+int aw883xx_set_fade_step(aw_dev_index_t dev, uint32_t step)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+ aw883xx_dev_set_fade_vol_step(aw883xx, step);\r
+\r
+ aw_dev_info(aw883xx->dev, "set step %d DB Done", step);\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_get_fade_step(aw_dev_index_t dev, uint32_t *step)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_err("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if ((g_aw883xx[dev] == NULL) || (step == NULL)) {\r
+ aw_pr_err("g_aw883xx[%d] is NULL or step is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ aw883xx_dev_get_fade_vol_step(aw883xx, step);\r
+ aw_dev_info(aw883xx->dev, "get step %d Done", *step);\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_set_fade_time(aw_fade_dir_t fade_dir, uint32_t time)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (g_aw883xx[AW_DEV_0] == NULL) {\r
+ aw_pr_err("g_aw883xx[%d] is NULL or step is NULL", AW_DEV_0);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[AW_DEV_0];\r
+\r
+ if (fade_dir == AW_FADE_IN) {\r
+ aw883xx_dev_set_fade_in_time(aw883xx, time);\r
+ } else if (fade_dir == AW_FADE_OUT){\r
+ aw883xx_dev_set_fade_out_time(aw883xx, time);\r
+ } else {\r
+ aw_dev_err(aw883xx->dev, "unsupported fade type %d", fade_dir);\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_get_fade_time(aw_fade_dir_t fade_dir, uint32_t *time)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if ((g_aw883xx[AW_DEV_0] == NULL) || (time == NULL)) {\r
+ aw_pr_err("g_aw883xx[%d] is NULL or step is NULL", AW_DEV_0);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[AW_DEV_0];\r
+\r
+ if (fade_dir == AW_FADE_IN) {\r
+ aw883xx_dev_get_fade_in_time(aw883xx, time);\r
+ } else if (fade_dir == AW_FADE_OUT){\r
+ aw883xx_dev_get_fade_out_time(aw883xx, time);\r
+ } else {\r
+ aw_dev_err(aw883xx->dev, "unsupported fade type %d", fade_dir);\r
+ }\r
+\r
+ return 0;\r
+}\r
+#endif\r
+\r
+#ifdef AW_VOLUME\r
+\r
+static int aw883xx_dev_get_volume(struct aw883xx *aw883xx, uint32_t *volume)\r
+{\r
+ int ret = -1;\r
+ int vol_val = 0;\r
+ uint32_t msg_len = sizeof(uint32_t);\r
+ struct aw_device *aw_dev = aw883xx->aw_pa;\r
+\r
+ if (volume == NULL) {\r
+ aw_pr_err("volume is NULL");\r
+ return -EINVAL;\r
+ }\r
+\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_VOLUME_PARAMS,\r
+ (void *)&vol_val, msg_len, AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read_params failed");\r
+ return ret;\r
+ }\r
+\r
+ *volume = vol_val;\r
+ return 0;\r
+}\r
+\r
+static int aw883xx_dev_set_volume(struct aw883xx *aw883xx, uint32_t volume)\r
+{\r
+ int ret = -1;\r
+ uint32_t compared_vol = 0;\r
+ uint32_t msg_len = sizeof(uint32_t);\r
+ struct aw_device *aw_dev = aw883xx->aw_pa;\r
+ struct aw_volume_desc *vol_desc = &aw_dev->volume_desc;\r
+\r
+ vol_desc->ctl_volume = volume;\r
+\r
+ /*get smaller dB*/\r
+ compared_vol = AW_GET_MAX_VALUE(vol_desc->ctl_volume,\r
+ vol_desc->monitor_volume);\r
+\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_VOLUME_PARAMS,\r
+ (void *)&compared_vol, msg_len, AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write_params failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_get_volume(aw_dev_index_t dev, uint32_t *volume)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_err("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if ((g_aw883xx[dev] == NULL) || (volume == NULL)) {\r
+ aw_pr_err("g_aw883xx[%d] is NULL or volume is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ aw883xx_dev_get_volume(aw883xx, volume);\r
+\r
+ aw_dev_info(aw883xx->dev, "get volume %d", *volume);\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_set_volume(aw_dev_index_t dev, uint32_t volume)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ int ret = -1;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_err("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_err("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ ret = aw883xx_dev_set_volume(aw883xx, volume);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "set volume failed");\r
+ return ret;\r
+ }\r
+\r
+ aw_dev_info(aw883xx->dev, "set volume %d", volume);\r
+\r
+ return 0;\r
+}\r
+#endif\r
+\r
+int aw883xx_ctrl_state(aw_dev_index_t dev, aw_ctrl_t aw_ctrl)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_err("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_err("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (aw_ctrl) {\r
+ aw883xx->pstream = AW_STREAM_CLOSE;\r
+ aw883xx_stop_pa(aw883xx);\r
+ } else {\r
+ aw883xx->pstream = AW_STREAM_OPEN;\r
+ aw883xx_start(aw883xx);\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_set_profile_byname(aw_dev_index_t dev, char *prof_name)\r
+{\r
+ int ret = -1;\r
+ char *cur_name = NULL;\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_err("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_err("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ cur_name = aw883xx_dev_get_profile_name(aw883xx->aw_pa);\r
+ if (strncmp(cur_name, prof_name, AW_PROF_NAME_MAX) == 0) {\r
+ aw_dev_info(aw883xx->dev, "profile no change");\r
+ return 0;\r
+ }\r
+\r
+ ret = aw883xx_dev_set_profile_name(aw883xx->aw_pa, prof_name);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "set profile [%s] failed", prof_name);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_dev_info(aw883xx->dev, "set prof name %s", prof_name);\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw883xx_check_init_info(struct aw_init_info *init_info)\r
+{\r
+ int ret = -1;\r
+\r
+ /*check dev index*/\r
+ if (init_info->dev >= AW_DEV_MAX) {\r
+ aw_pr_err("unsupported dev:%d", init_info->dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[init_info->dev] != NULL) {\r
+ aw_pr_err("dev:%d exist", init_info->dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ /*check i2c funtion*/\r
+ if ((init_info->i2c_read_func == NULL) ||\r
+ (init_info->i2c_write_func == NULL)) {\r
+ aw_dev_err(init_info->dev, "i2c funtion is NULL");\r
+ return -EINVAL;\r
+ }\r
+\r
+ ret = aw883xx_dev_check_prof(init_info->dev, init_info->prof_info);\r
+ if (ret < 0) {\r
+ aw_dev_err(init_info->dev, "check prof failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static struct aw883xx *aw883xx_malloc_init(struct aw_init_info *init_info)\r
+{\r
+ struct aw883xx *aw883xx = calloc(1, sizeof(struct aw883xx));\r
+ if (aw883xx == NULL) {\r
+ aw_dev_err(init_info->dev, "calloc aw883xx failed.");\r
+ return NULL;\r
+ }\r
+\r
+ aw883xx->init_info = init_info;\r
+ aw883xx->aw_pa = NULL;\r
+ aw883xx->dev = init_info->dev;\r
+ aw883xx->i2c_addr = init_info->i2c_addr;\r
+ aw883xx->i2c_read_func = init_info->i2c_read_func;\r
+ aw883xx->i2c_write_func = init_info->i2c_write_func;\r
+\r
+ if (init_info->phase_sync) {\r
+ aw883xx->phase_sync = init_info->phase_sync;\r
+ } else {\r
+ aw883xx->phase_sync = AW_PHASE_SYNC_DISABLE;\r
+ }\r
+\r
+ if (init_info->reset_gpio_ctl) {\r
+ aw883xx->reset_gpio_ctl = init_info->reset_gpio_ctl;\r
+ } else {\r
+ aw883xx->reset_gpio_ctl = NULL;\r
+ }\r
+\r
+ aw883xx->allow_pw = true;\r
+ aw883xx->i2c_log_en = false;\r
+\r
+ return aw883xx;\r
+}\r
+\r
+static int aw883xx_read_chipid(struct aw883xx *aw883xx)\r
+{\r
+ int ret = -1;\r
+ unsigned int cnt = 0;\r
+ uint16_t reg_value = 0;\r
+\r
+ while (cnt < AW_READ_CHIPID_RETRIES) {\r
+ ret = aw883xx_i2c_read(aw883xx, AW883xx_CHIP_ID_REG, ®_value);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "failed to read REG_ID: %d", ret);\r
+ return -EIO;\r
+ }\r
+ switch (reg_value) {\r
+ case PID_2049_ID: {\r
+ aw_dev_info(aw883xx->dev, "aw883xx 2049 detected");\r
+ aw883xx->chip_id = reg_value;\r
+ return 0;\r
+ }\r
+ case PID_2066_ID: {\r
+ aw_dev_info(aw883xx->dev, "aw883xx 2066 detected");\r
+ aw883xx->chip_id = reg_value;\r
+ return 0;\r
+ }\r
+ case PID_2183_ID: {\r
+ aw_dev_info(aw883xx->dev, "aw883xx 2183 detected");\r
+ aw883xx->chip_id = reg_value;\r
+ return 0;\r
+ }\r
+ default:\r
+ aw_dev_info(aw883xx->dev, "unsupported device revision (0x%x)",\r
+ reg_value);\r
+ break;\r
+ }\r
+ cnt++;\r
+\r
+ AW_MS_DELAY(AW_READ_CHIPID_RETRY_DELAY);\r
+ }\r
+\r
+ return -EINVAL;\r
+}\r
+\r
+static int aw883xx_init(struct aw883xx *aw883xx)\r
+{\r
+ int i = 0;\r
+ int ret;\r
+ struct aw_init_info *init_info = aw883xx->init_info;\r
+\r
+ for (i = 0; i < init_info->mix_chip_count; i++) {\r
+ aw_dev_dbg(aw883xx->dev, "%d enter", i);\r
+ if (init_info->dev_init_ops[i] == NULL) {\r
+ aw_dev_err(aw883xx->dev, "init_info->dev_init_ops[%d] is null", i);\r
+ return -EINVAL;\r
+ }\r
+\r
+ ret = init_info->dev_init_ops[i]((void *)aw883xx);\r
+ if (ret < 0) {\r
+ aw_dev_dbg(aw883xx->dev, "%d enter", i);\r
+ continue;\r
+ } else {\r
+ aw_dev_dbg(aw883xx->dev, "%d init success", i);\r
+ break;\r
+ }\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+int aw883xx_smartpa_init(void *aw_info)\r
+{\r
+ int ret = -1;\r
+ struct aw_init_info *aw_init_info = NULL;\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ aw_pr_info("enter");\r
+\r
+ if (aw_info == NULL) {\r
+ aw_pr_err("aw_info is NULL");\r
+ return -ENOMEM;\r
+ }\r
+\r
+ aw_init_info = (struct aw_init_info *)aw_info;\r
+\r
+ ret = aw883xx_check_init_info(aw_init_info);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+ aw883xx = aw883xx_malloc_init(aw_init_info);\r
+ if (aw883xx == NULL) {\r
+ aw_dev_err(aw_init_info->dev, "malloc aw883xx failed");\r
+ return -ENOMEM;\r
+ }\r
+\r
+ /* hardware reset */\r
+ aw883xx_hw_reset(aw883xx);\r
+\r
+ /* aw883xx chip id */\r
+ ret = aw883xx_read_chipid(aw883xx);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_init_info->dev, "aw883xx_read_chipid failed ret=%d", ret);\r
+ goto read_chip_failed;\r
+ }\r
+\r
+ /*aw pa init*/\r
+ ret = aw883xx_init(aw883xx);\r
+ if (ret) {\r
+ goto init_failed;\r
+ }\r
+\r
+ aw883xx->aw_pa->status = AW_DEV_PW_OFF;\r
+ aw883xx->aw_pa->fw_status = AW_DEV_FW_OK;\r
+\r
+ if (aw_init_info->fade_en) {\r
+ aw883xx->aw_pa->fade_en = aw_init_info->fade_en;\r
+ } else {\r
+ aw883xx->aw_pa->fade_en = AW_FADE_DISABLE;\r
+ }\r
+\r
+ if (aw_init_info->re_min) {\r
+ aw883xx->aw_pa->re_range.re_min = aw_init_info->re_min;\r
+ } else {\r
+ aw883xx->aw_pa->re_range.re_min = AW_RE_MIN;\r
+ }\r
+\r
+ if (aw_init_info->re_max) {\r
+ aw883xx->aw_pa->re_range.re_max = aw_init_info->re_max;\r
+ } else {\r
+ aw883xx->aw_pa->re_range.re_max = AW_RE_MAX;\r
+ }\r
+\r
+ if (aw_init_info->cali_check_st) {\r
+ aw883xx->aw_pa->cali_desc.cali_check_st = aw_init_info->cali_check_st;\r
+ } else {\r
+ aw883xx->aw_pa->cali_desc.cali_check_st = CALI_CHECK_DISABLE;\r
+ }\r
+ aw883xx->aw_pa->cali_desc.cali_result = CALI_RESULT_NONE;\r
+\r
+ g_aw883xx[aw_init_info->dev] = aw883xx;\r
+ g_aw883xx_dev_cnt++;\r
+ aw_dev_info(aw_init_info->dev, "dev:%d init success",\r
+ aw_init_info->dev);\r
+\r
+ return 0;\r
+\r
+init_failed:\r
+read_chip_failed:\r
+ free(aw883xx);\r
+ aw883xx = NULL;\r
+ return ret;\r
+}\r
+\r
+\r
+void aw883xx_smartpa_deinit(aw_dev_index_t dev)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev_index:%d", dev);\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (aw883xx->aw_pa->ops.aw_monitor_deinit != NULL) {\r
+ aw883xx->aw_pa->ops.aw_monitor_deinit((void *)aw883xx->aw_pa);\r
+ }\r
+\r
+ if (aw883xx->aw_pa != NULL) {\r
+ free(aw883xx->aw_pa);\r
+ aw883xx->aw_pa = NULL;\r
+ }\r
+\r
+ if (aw883xx != NULL) {\r
+ free(aw883xx);\r
+ aw883xx = NULL;\r
+ }\r
+}\r
+\r
+int aw883xx_dsp_bypass_ctrl(aw_dev_index_t dev, aw_dsp_ctrl_t dsp_ctrl)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_err("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_err("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (dsp_ctrl) {\r
+ aw883xx->aw_pa->dsp_cfg = AW_DEV_DSP_BYPASS;\r
+ } else {\r
+ aw883xx->aw_pa->dsp_cfg = AW_DEV_DSP_WORK;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+/***************************************************************************\r
+ *aw883xx irq\r
+ ***************************************************************************/\r
+#ifdef AW_IRQ\r
+\r
+aw_hw_irq_handle_t aw883xx_get_hw_irq_status(aw_dev_index_t dev)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+ aw_dev_info(aw883xx->dev, "irq_handle=%d", aw883xx->irq_handle);\r
+ return aw883xx->irq_handle;\r
+}\r
+\r
+void aw883xx_irq_handler(aw_dev_index_t dev)\r
+{\r
+ int ret = -1;\r
+ uint32_t crc_switch_status = 0;\r
+ uint32_t crc_check_abnormal = 0;\r
+ uint32_t mask_value = AW_DEV_UNMASK_INT_VAL;\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (aw883xx->irq_handle == AW_HW_IRQ_HANDLE_ON){\r
+ /*awinic:Add operations after interrupt triggering*/\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_REALTIME_CRC_GET_PARAMS,\r
+ (void *)&crc_switch_status, sizeof(crc_switch_status), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "get crc_status failed");\r
+ }\r
+\r
+ if (crc_switch_status) {\r
+ ret = aw883xx_crc_realtime_check(aw883xx->aw_pa, &crc_check_abnormal);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "crc_realtime_check failed");\r
+ }\r
+\r
+ if (crc_check_abnormal) {\r
+ /*pa stop or stopping just set profile*/\r
+ if (aw883xx->pstream) {\r
+ aw883xx_device_stop(aw883xx->aw_pa);\r
+\r
+ ret = aw883xx_device_fw_update(aw883xx->aw_pa, AW_DSP_FW_UPDATE_ON, true);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "fw update failed");\r
+ }\r
+ aw883xx_start(aw883xx);\r
+ }\r
+ }\r
+ }\r
+\r
+ aw883xx_device_status(aw883xx->aw_pa, AW_DEV_INTERRUPT_CLEAR_STATUS,\r
+ AW_SET_DEV_STATUS);\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_INT_PARAMS,\r
+ (void *)&mask_value, sizeof(mask_value), AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "write_params failed");\r
+ }\r
+\r
+ aw883xx->irq_handle = AW_HW_IRQ_HANDLE_OFF;\r
+ aw_dev_info(aw883xx->dev, "irq_handle=%d",aw883xx->irq_handle);\r
+ }\r
+}\r
+\r
+void aw883xx_irq_trigger(aw_dev_index_t dev)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ aw883xx->irq_handle = AW_HW_IRQ_HANDLE_ON;\r
+ aw_dev_info(aw883xx->dev, "irq_handle=%d",aw883xx->irq_handle);\r
+}\r
+#endif\r
+\r
+/***********************************************************************\r
+ * aw883xx monitor\r
+ ***********************************************************************/\r
+#ifdef AW_MONITOR\r
+void aw883xx_monitor_work(aw_dev_index_t dev)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (aw883xx->aw_pa->ops.aw_monitor_work_func) {\r
+ aw883xx->aw_pa->ops.aw_monitor_work_func((void *)aw883xx->aw_pa);\r
+ }\r
+}\r
+\r
+void aw883xx_monitor_set_status(aw_dev_index_t dev)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (aw883xx->aw_pa->ops.aw_monitor_set_handle) {\r
+ aw883xx->aw_pa->ops.aw_monitor_set_handle((void *)aw883xx->aw_pa);\r
+ }\r
+}\r
+#endif\r
+\r
+/***********************************************************************\r
+ * aw883xx cali\r
+ ***********************************************************************/\r
+#ifdef AW_CALIB\r
+int aw883xx_cali_re(aw_dev_index_t dev, aw_single_t is_single, uint32_t *re)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct cali_msg_hdr cali_msg = { 0 };\r
+ int ret = -1;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+ uint32_t dev_type = is_single;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (re == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] re is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (is_single == IS_SINGLE) {\r
+ dev_cnt = AW_SINGLE_DEV_COUNT;\r
+ }\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_RE_PARAMS,\r
+ (void *)&dev_type, sizeof(dev_type), AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "cali re failed");\r
+ return ret;\r
+ }\r
+\r
+ cali_msg.opcode_id = is_single;\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_RE_PARAMS,\r
+ (void *)&cali_msg, sizeof(cali_msg), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "cali re show failed");\r
+ return ret;\r
+ }\r
+\r
+ memcpy(re, &cali_msg.msg, dev_cnt * sizeof(uint32_t));\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_f0(aw_dev_index_t dev, aw_single_t is_single, uint32_t *f0)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct cali_msg_hdr cali_msg = { 0 };\r
+ int ret = -1;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+ uint32_t dev_type = is_single;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (f0 == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] f0 is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (dev_type == IS_SINGLE) {\r
+ dev_cnt = AW_SINGLE_DEV_COUNT;\r
+ }\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_F0_Q_PARAMS,\r
+ (void *)&dev_type, sizeof(dev_type), AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "cali f0 failed");\r
+ return ret;\r
+ }\r
+\r
+ cali_msg.opcode_id = is_single;\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_F0_PARAMS,\r
+ (void *)&cali_msg, sizeof(cali_msg), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "cali f0 show failed");\r
+ return ret;\r
+ }\r
+\r
+ memcpy(f0, &cali_msg.msg, dev_cnt * sizeof(uint32_t));\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_f0_q(aw_dev_index_t dev, aw_single_t is_single, uint32_t *f0, uint32_t *q)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct cali_msg_hdr f0_msg = { 0 };\r
+ struct cali_msg_hdr q_msg = { 0 };\r
+ int ret = -1;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+ uint32_t dev_type = is_single;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if ((f0 == NULL) || (q == NULL)) {\r
+ aw_pr_info("g_aw883xx[%d] f0/q is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (dev_type == IS_SINGLE) {\r
+ dev_cnt = AW_SINGLE_DEV_COUNT;\r
+ }\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_F0_Q_PARAMS,\r
+ (void *)&dev_type, sizeof(dev_type), AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "cali f0 failed");\r
+ return ret;\r
+ }\r
+\r
+ f0_msg.opcode_id = is_single;\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_F0_PARAMS,\r
+ (void *)&f0_msg, sizeof(f0_msg), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "cali f0 show failed");\r
+ return ret;\r
+ }\r
+ memcpy(f0, &f0_msg.msg, dev_cnt * sizeof(uint32_t));\r
+\r
+ q_msg.opcode_id = is_single;\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_Q_PARAMS,\r
+ (void *)&q_msg, sizeof(q_msg), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "cali q show failed");\r
+ return ret;\r
+ }\r
+\r
+ memcpy(q, &q_msg.msg, dev_cnt * sizeof(uint32_t));\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_re_f0(aw_dev_index_t dev, aw_single_t is_single, uint32_t *re, uint32_t *f0)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct cali_msg_hdr re_msg = { 0 };\r
+ struct cali_msg_hdr f0_msg = { 0 };\r
+ uint32_t dev_type = is_single;\r
+ int ret = -1;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if ((f0 == NULL) || (re == NULL)) {\r
+ aw_pr_info("g_aw883xx[%d] f0/re is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (dev_type == IS_SINGLE) {\r
+ dev_cnt = AW_SINGLE_DEV_COUNT;\r
+ }\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_RE_F0_PARAMS,\r
+ (void *)&dev_type, sizeof(dev_type), AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "cali re_f0 failed");\r
+ return ret;\r
+ }\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_RE_PARAMS,\r
+ (void *)&re_msg, sizeof(re_msg), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "cali re show failed");\r
+ return ret;\r
+ }\r
+\r
+ memcpy(re, &re_msg.msg, dev_cnt * sizeof(uint32_t));\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_F0_PARAMS,\r
+ (void *)&f0_msg, sizeof(f0_msg), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "cali f0 show failed");\r
+ return ret;\r
+ }\r
+\r
+ memcpy(f0, &f0_msg.msg, dev_cnt * sizeof(uint32_t));\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_get_re_range(aw_dev_index_t dev, aw_single_t is_single, uint32_t *range_buf)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct cali_msg_hdr re_range_msg = { 0 };\r
+ int ret = -1;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+ uint32_t dev_type = is_single;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (range_buf == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] range_buf is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (dev_type == IS_SINGLE) {\r
+ dev_cnt = AW_SINGLE_DEV_COUNT;\r
+ }\r
+\r
+ re_range_msg.opcode_id = dev_type;\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_RE_RANGE_PARAMS,\r
+ (void *)&re_range_msg, sizeof(re_range_msg), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "get re range failed");\r
+ return ret;\r
+ }\r
+\r
+ memcpy(range_buf, &re_range_msg.msg, RE_RANGE_NUM * dev_cnt * sizeof(uint32_t));\r
+\r
+ return 0;\r
+}\r
+\r
+\r
+int aw883xx_get_r0(aw_dev_index_t dev, aw_single_t is_single, uint32_t *r0_data)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct cali_msg_hdr msg_hdr = { 0 };\r
+ int ret = -1;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+ uint32_t dev_type = is_single;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (r0_data == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] r0_data is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (dev_type == IS_SINGLE) {\r
+ dev_cnt = AW_SINGLE_DEV_COUNT;\r
+ }\r
+\r
+ msg_hdr.opcode_id = dev_type;\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_R0_PARAMS,\r
+ (void *)&msg_hdr, sizeof(msg_hdr), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "get r0 failed");\r
+ return ret;\r
+ }\r
+\r
+ memcpy(r0_data, &msg_hdr.msg, dev_cnt * sizeof(uint32_t));\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_get_f0(aw_dev_index_t dev, aw_single_t is_single, uint32_t *f0_data)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct cali_msg_hdr msg_hdr = { 0 };\r
+ int ret = -1;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+ uint32_t dev_type = is_single;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (f0_data == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] f0_data is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (dev_type == IS_SINGLE) {\r
+ dev_cnt = AW_SINGLE_DEV_COUNT;\r
+ }\r
+\r
+ msg_hdr.opcode_id = dev_type;\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_F0_PARAMS,\r
+ (void *)&msg_hdr, sizeof(msg_hdr), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "get r0 failed");\r
+ return ret;\r
+ }\r
+\r
+ memcpy(f0_data, &msg_hdr.msg, dev_cnt * sizeof(uint32_t));\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_get_te(aw_dev_index_t dev, aw_single_t is_single, int32_t *te_data)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct cali_msg_hdr msg_hdr = { 0 };\r
+ int ret = -1;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+ uint32_t dev_type = is_single;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (te_data == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] te_data is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ msg_hdr.opcode_id = is_single;\r
+\r
+ if (dev_type == IS_SINGLE) {\r
+ dev_cnt = AW_SINGLE_DEV_COUNT;\r
+ }\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_TE_PARAMS,\r
+ (void *)&msg_hdr, sizeof(msg_hdr), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "get te failed");\r
+ return ret;\r
+ }\r
+\r
+ memcpy(te_data, &msg_hdr.msg, dev_cnt * sizeof(int32_t));\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_re_store(aw_dev_index_t dev, aw_single_t is_single, uint32_t *set_re)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct cali_msg_hdr msg_hdr = { 0 };\r
+ int ret = -1;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+ uint32_t dev_type = is_single;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (set_re == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] set_re is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ msg_hdr.opcode_id = dev_type;\r
+\r
+ if (dev_type == IS_SINGLE) {\r
+ dev_cnt = AW_SINGLE_DEV_COUNT;\r
+ }\r
+ memcpy(&msg_hdr.msg, set_re, dev_cnt * sizeof(uint32_t));\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_STORE_CALI_RE_PARAMS,\r
+ (void *)&msg_hdr, sizeof(msg_hdr), AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "cali re store failed");\r
+ }\r
+ return ret;\r
+}\r
+\r
+int aw883xx_read_re_from_dsp(aw_dev_index_t dev, uint32_t *re)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ int ret = -1;\r
+\r
+ if (dev >= AW_DEV_MAX) {\r
+ aw_pr_info("unsupported dev:%d", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (g_aw883xx[dev] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (re == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] re is NULL", dev);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[dev];\r
+\r
+ if (aw883xx->pstream == AW_STREAM_OPEN) {\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_DSP_RE_PARAMS,\r
+ (void *)re, sizeof(uint32_t), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw883xx->dev, "read re from dsp failed");\r
+ }\r
+ } else {\r
+ aw_dev_err(aw883xx->dev, "PA not work, please work and retry");\r
+ }\r
+ return ret;\r
+}\r
+\r
+int aw883xx_cali_time_show(uint32_t *time)\r
+{\r
+ uint32_t time_val = 0;\r
+ int ret = -1;\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (g_aw883xx[AW_DEV_0] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", AW_DEV_0);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[AW_DEV_0];\r
+\r
+ if (time == NULL) {\r
+ aw_pr_err("time is NULL");\r
+ return -EINVAL;\r
+ }\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_TIME_PARAMS,\r
+ (void *)&time_val, sizeof(uint32_t), AW_GET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_pr_err("set cali_time failed");\r
+ return -EINVAL;\r
+ }\r
+ *time = time_val;\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_time_store(uint32_t time)\r
+{\r
+ int ret = -1;\r
+ struct aw883xx *aw883xx = NULL;\r
+\r
+ if (g_aw883xx[AW_DEV_0] == NULL) {\r
+ aw_pr_info("g_aw883xx[%d] is NULL", AW_DEV_0);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw883xx = g_aw883xx[AW_DEV_0];\r
+\r
+ ret = aw883xx_device_params(aw883xx->aw_pa, AW_DEV_CALI_TIME_PARAMS,\r
+ (void *)&time, sizeof(uint32_t), AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_pr_err("set cali_time failed");\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+#endif\r
--- /dev/null
+/*\r
+* aw883xx_calib.c aw883xx codec driver\r
+*\r
+* Copyright (c) 2021 AWINIC Technology CO., LTD\r
+*\r
+* Author: <zhaolei@awinic.com>\r
+*\r
+* This program is free software; you can redistribute it and/or modify it\r
+* under the terms of the GNU General Public License as published by the\r
+* Free Software Foundation; either version 2 of the License, or (at your\r
+* option) any later version.\r
+*/\r
+\r
+#include <stdio.h>\r
+#include <string.h>\r
+#include <stdlib.h>\r
+#include "aw883xx_device.h"\r
+#include "aw883xx_base.h"\r
+#include "aw883xx_calib.h"\r
+#include "aw883xx.h"\r
+\r
+#ifdef AW_CALIB\r
+static unsigned int g_cali_re_time = AW_CALI_RE_DEFAULT_TIMER;\r
+\r
+bool aw883xx_cali_check_result(struct aw_cali_desc *cali_desc)\r
+{\r
+ if (cali_desc->cali_check_st &&\r
+ (cali_desc->cali_result == CALI_RESULT_ERROR)) {\r
+ return false;\r
+ } else {\r
+ return true;\r
+ }\r
+}\r
+\r
+static int aw_cali_svc_get_dev_re_range(struct aw_device *aw_dev,\r
+ uint32_t *data_buf)\r
+{\r
+ data_buf[RE_MIN_FLAG] = aw_dev->re_range.re_min;\r
+ data_buf[RE_MAX_FLAG] = aw_dev->re_range.re_max;\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_get_devs_re_range(struct aw_device *aw_dev,\r
+ uint32_t *data_buf, int num)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct aw_device *local_dev = NULL;\r
+ uint8_t cnt = 0;\r
+ uint8_t i;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ for (i = 0; i < dev_cnt; i++) {\r
+ aw883xx = aw883xx_get_dev(i);\r
+ local_dev = aw883xx->aw_pa;\r
+ if (local_dev->dev < num) {\r
+ data_buf[RE_MIN_FLAG + local_dev->dev * 2] =\r
+ local_dev->re_range.re_min;\r
+ data_buf[RE_MAX_FLAG + local_dev->dev * 2] =\r
+ local_dev->re_range.re_max;\r
+ cnt++;\r
+ } else {\r
+ aw_dev_err(local_dev->dev, "channel num[%d] overflow buf num[%d]",\r
+ local_dev->dev, num);\r
+ return -EINVAL;\r
+ }\r
+ }\r
+\r
+ return cnt;\r
+}\r
+\r
+static int aw_cali_store_cali_re(struct aw_device *aw_dev, uint32_t re)\r
+{\r
+ if ((re > aw_dev->re_range.re_min) && (re < aw_dev->re_range.re_max)) {\r
+ aw_dev->cali_desc.cali_re = re;\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "invalid cali re %d!", re);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_devs_store_cali_re(struct aw_device *aw_dev, uint32_t *set_re)\r
+{\r
+ struct aw_device *local_dev = NULL;\r
+ struct aw883xx *aw883xx = NULL;\r
+ int ret = -1;\r
+ uint8_t cnt;\r
+ int dev_num = 0;\r
+ dev_num = aw883xx_get_dev_num();\r
+\r
+ for (cnt = 0; cnt < dev_num; cnt++) {\r
+ aw883xx = aw883xx_get_dev(cnt);\r
+ local_dev = aw883xx->aw_pa;\r
+ if (local_dev->dev < AW_DEV_CH_MAX) {\r
+ ret = aw_cali_store_cali_re(local_dev, set_re[local_dev->dev]);\r
+ if (ret < 0) {\r
+ aw_dev_err(local_dev->dev, "store cali re failed");\r
+ return ret;\r
+ }\r
+ }\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_get_cali_re_from_hw(struct aw_device *aw_dev, uint32_t *re)\r
+{\r
+ int ret = -1;\r
+ uint32_t cali_re = 0;\r
+ uint16_t re_hbit = 0;\r
+ uint16_t re_lbit = 0;\r
+ struct aw_hw_cali_re_desc *hw_cali_re_desc = &aw_dev->cali_desc.hw_cali_re_desc;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, hw_cali_re_desc->hbits_reg, &re_hbit);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read re_hbit failed");\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, hw_cali_re_desc->lbits_reg, &re_lbit);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read re_hbit failed");\r
+ return ret;\r
+ }\r
+\r
+ cali_re = (re_hbit << hw_cali_re_desc->hbits_shift) | re_lbit;\r
+\r
+ *re = AW_DSP_RE_TO_SHOW_RE(cali_re, hw_cali_re_desc->cali_re_shift) - aw_dev->cali_desc.ra;\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_read_cali_re_from_pa(struct aw_device *aw_dev, uint32_t *re)\r
+{\r
+ int ret = -1;\r
+\r
+ if (aw_dev->ops.aw_get_cali_re) {\r
+ ret = aw_dev->ops.aw_get_cali_re(aw_dev, re);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read cali re error");\r
+ return ret;\r
+ }\r
+ } else {\r
+ ret = aw_cali_svc_get_cali_re_from_hw(aw_dev, re);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read cali re error");\r
+ return ret;\r
+ }\r
+ }\r
+\r
+ aw_dev_info(aw_dev->dev, "get cali re:%d", *re);\r
+\r
+ return 0;\r
+}\r
+\r
+/*************Calibration base function************/\r
+\r
+static int aw_cali_set_cali_re_to_hw(struct aw_device *aw_dev)\r
+{\r
+ int ret;\r
+ uint32_t cali_re = 0;\r
+ uint16_t re_hbits = 0;\r
+ uint16_t re_lbits = 0;\r
+\r
+ struct aw_hw_cali_re_desc *hw_cali_re_desc = &aw_dev->cali_desc.hw_cali_re_desc;\r
+\r
+ cali_re = AW_SHOW_RE_TO_DSP_RE((aw_dev->cali_desc.cali_re +\r
+ aw_dev->cali_desc.ra), hw_cali_re_desc->cali_re_shift);\r
+\r
+ re_hbits = (cali_re & (~hw_cali_re_desc->hbits_mask)) >> hw_cali_re_desc->hbits_shift;\r
+\r
+ re_lbits = (cali_re & (~hw_cali_re_desc->lbits_mask)) >> hw_cali_re_desc->lbits_shift;\r
+\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev, hw_cali_re_desc->hbits_reg, re_hbits);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write cali re failed");\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev, hw_cali_re_desc->lbits_reg, re_lbits);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write cali re failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_set_cali_re(void *dev)\r
+{\r
+ int ret = -1;\r
+ struct aw_device *aw_dev = dev;\r
+\r
+\r
+ if (aw_dev->ops.aw_set_cali_re) {\r
+ ret = aw_dev->ops.aw_set_cali_re(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "set cali re failed");\r
+ return ret;\r
+ }\r
+ } else {\r
+ ret = aw_cali_set_cali_re_to_hw(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "set cali re failed");\r
+ return ret;\r
+ }\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_set_mute_status(struct aw_device *aw_dev, int32_t mute)\r
+{\r
+ int ret = -1;\r
+ uint32_t msg_len = sizeof(uint32_t);\r
+\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_HMUTE_PARAMS,\r
+ (void *)&mute, msg_len, AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write_params failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static void aw_cali_svc_run_mute(struct aw_device *aw_dev, int8_t cali_result)\r
+{\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+\r
+ if (aw_dev->cali_desc.cali_check_st) {\r
+ if (cali_result == CALI_RESULT_ERROR) {\r
+ aw_cali_set_mute_status(aw_dev, AW_DEV_HMUTE_ENABLE);\r
+ } else if (cali_result == CALI_RESULT_NORMAL) {\r
+ aw_cali_set_mute_status(aw_dev, AW_DEV_HMUTE_DISABLE);\r
+ }\r
+ } else {\r
+ aw_dev_info(aw_dev->dev, "cali check disable");\r
+ }\r
+\r
+ aw_dev_info(aw_dev->dev, "done");\r
+}\r
+\r
+int aw883xx_cali_init_re_update(void *dev, backup_sec_t flag)\r
+{\r
+ int ret = -1;\r
+ struct aw_device *aw_dev = dev;\r
+ struct aw_hw_cali_re_desc *hw_cali_re_desc = &aw_dev->cali_desc.hw_cali_re_desc;\r
+\r
+ if (aw_dev->ops.aw_init_re_update) {\r
+ ret = aw_dev->ops.aw_init_re_update(aw_dev, flag);\r
+ if (ret < 0)\r
+ aw_dev_err(aw_dev->dev, "read or write init re failed");\r
+ return ret;\r
+ }\r
+\r
+ if (flag == AW_RECOVERY_SEC_DATA) {\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev, hw_cali_re_desc->hbits_reg, hw_cali_re_desc->re_hbits);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write cali re failed");\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev, hw_cali_re_desc->lbits_reg, hw_cali_re_desc->re_lbits);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write cali re failed");\r
+ return ret;\r
+ }\r
+ } else if (flag == AW_RECORD_SEC_DATA) {\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, hw_cali_re_desc->hbits_reg, &hw_cali_re_desc->re_hbits);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read cali re failed");\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, hw_cali_re_desc->lbits_reg, &hw_cali_re_desc->re_lbits);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read cali re failed");\r
+ return ret;\r
+ }\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported type:%d", flag);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_get_ra(void *dev)\r
+{\r
+ int ret = -1;\r
+ uint32_t dsp_ra;\r
+ struct aw_device *aw_dev = dev;\r
+\r
+ struct aw_ra_desc *desc = &aw_dev->cali_desc.ra_desc;\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev, desc->dsp_reg,\r
+ &dsp_ra, desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read ra error");\r
+ return ret;\r
+ }\r
+\r
+ aw_dev->cali_desc.ra = AW_DSP_RE_TO_SHOW_RE(dsp_ra,\r
+ desc->shift);\r
+ aw_dev_info(aw_dev->dev, "get ra:%d", aw_dev->cali_desc.ra);\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_get_r0_from_dsp(struct aw_device *aw_dev,\r
+ uint32_t *r0)\r
+{\r
+ int ret = -1;\r
+ uint32_t dsp_re = 0;\r
+ struct aw_r0_desc *r0_desc = &aw_dev->cali_desc.r0_desc;\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev, r0_desc->dsp_reg, &dsp_re, r0_desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get_dsp_realtime_re failed");\r
+ return ret;\r
+ }\r
+\r
+ *r0 = AW_DSP_RE_TO_SHOW_RE(dsp_re, r0_desc->shift);\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_get_dev_r0(struct aw_device *aw_dev,\r
+ uint32_t *re)\r
+{\r
+ int ret = -1;\r
+\r
+ if (aw_dev->ops.aw_get_r0) {\r
+ ret = aw_dev->ops.aw_get_r0(aw_dev, re);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get_r0 failed");\r
+ return ret;\r
+ }\r
+ } else {\r
+ ret = aw_cali_get_r0_from_dsp(aw_dev, re);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get_r0 failed");\r
+ return ret;\r
+ }\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_get_dev_re(struct aw_device *aw_dev,\r
+ uint32_t *re)\r
+{\r
+ int ret;\r
+ struct aw_dsp_cali_re_desc *desc = &aw_dev->cali_desc.dsp_re_desc;\r
+ uint32_t dsp_re = 0;\r
+ uint32_t show_re = 0;\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev, desc->dsp_reg, &dsp_re, desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp read re error");\r
+ return ret;\r
+ }\r
+\r
+ show_re = AW_DSP_RE_TO_SHOW_RE(dsp_re, desc->shift);\r
+\r
+ *re = show_re - aw_dev->cali_desc.ra;\r
+ aw_dev_dbg(aw_dev->dev, "real_r0:[%d]", *re);\r
+\r
+ return 0;\r
+}\r
+\r
+\r
+static int aw_cali_svc_get_devs_r0(struct aw_device *aw_dev, uint32_t *r0_buf, int num)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct aw_device *local_dev = NULL;\r
+ int ret = -1;\r
+ uint8_t cnt = 0;\r
+ uint8_t i;\r
+\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ for (i = 0; i < dev_cnt; i++) {\r
+ aw883xx = aw883xx_get_dev(i);\r
+ local_dev = aw883xx->aw_pa;\r
+ if (local_dev->dev < num) {\r
+ ret = aw_cali_svc_get_dev_r0(local_dev, &r0_buf[local_dev->dev]);\r
+ if (ret) {\r
+ aw_dev_err(local_dev->dev, "get r0 failed!");\r
+ return ret;\r
+ }\r
+ cnt++;\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "channel num[%d] overflow buf num[%d] ",\r
+ local_dev->dev, num);\r
+ }\r
+ }\r
+ return cnt;\r
+}\r
+\r
+static int aw_cali_svc_get_dev_f0(struct aw_device *aw_dev,\r
+ uint32_t *f0)\r
+{\r
+ struct aw_f0_desc *f0_desc = &aw_dev->cali_desc.f0_desc;\r
+ uint32_t dsp_val = 0;\r
+ int ret = -1;\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev,\r
+ f0_desc->dsp_reg, &dsp_val, f0_desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read f0 failed");\r
+ return ret;\r
+ }\r
+\r
+ *f0 = dsp_val >> f0_desc->shift;\r
+ aw_dev_dbg(aw_dev->dev, "real_f0:[%d]", *f0);\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_get_devs_f0(struct aw_device *aw_dev, uint32_t *f0_buf, int num)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct aw_device *local_dev = NULL;\r
+ int ret = -1;\r
+ uint8_t cnt = 0;\r
+ uint8_t i;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ for (i = 0; i < dev_cnt; i++) {\r
+ aw883xx = aw883xx_get_dev(i);\r
+ local_dev = aw883xx->aw_pa;\r
+ if (local_dev->dev < num) {\r
+ ret = aw_cali_svc_get_dev_f0(local_dev, &f0_buf[local_dev->dev]);\r
+ if (ret < 0) {\r
+ aw_dev_err(local_dev->dev, "get f0 failed!");\r
+ return ret;\r
+ }\r
+ cnt++;\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "channel num[%d] overflow buf num[%d] ",\r
+ local_dev->dev, num);\r
+ }\r
+ }\r
+ return cnt;\r
+}\r
+\r
+static int aw_cali_svc_get_dev_q(struct aw_device *aw_dev,\r
+ uint32_t *q)\r
+{\r
+ struct aw_q_desc *q_desc = &aw_dev->cali_desc.q_desc;\r
+ uint32_t dsp_val = 0;\r
+ int ret = -1;\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev,\r
+ q_desc->dsp_reg, &dsp_val, q_desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read q failed");\r
+ return ret;\r
+ }\r
+\r
+ *q = ((dsp_val * 1000) >> q_desc->shift);\r
+\r
+ return 0;\r
+}\r
+\r
+int aw_cali_svc_get_dev_te(struct aw_device *aw_dev, struct aw_cali_desc *cali_desc, int32_t *te)\r
+{\r
+ uint16_t reg_val = 0;\r
+ int ret = -1;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, cali_desc->spkr_temp_desc.reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read temperature failed");\r
+ return ret;\r
+ }\r
+\r
+ *te = (int32_t)((int16_t)reg_val);\r
+ aw_dev_info(aw_dev->dev, "real_te:[%d]", *te);\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_get_devs_te(struct aw_device *aw_dev, int32_t *te_buf, int num)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct aw_device *local_dev = NULL;\r
+ int ret = -1;\r
+ uint8_t i;\r
+ uint8_t cnt = 0;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ for (i = 0; i < dev_cnt; i++) {\r
+ aw883xx = aw883xx_get_dev(i);\r
+ local_dev = aw883xx->aw_pa;\r
+ if (local_dev->dev < num) {\r
+ ret = aw_cali_svc_get_dev_te(local_dev, &local_dev->cali_desc, &te_buf[local_dev->dev]);\r
+ if (ret) {\r
+ aw_dev_err(local_dev->dev, "get temperature failed!");\r
+ return ret;\r
+ }\r
+ cnt++;\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "channel num[%d] overflow buf num[%d]",\r
+ local_dev->dev, num);\r
+ }\r
+ }\r
+ return cnt;\r
+}\r
+\r
+static int aw_cali_svc_get_iv_st(struct aw_device *aw_dev)\r
+{\r
+ struct aw_cali_iv_desc *iv_desc = &aw_dev->cali_desc.iv_desc;\r
+ int ret;\r
+ uint16_t reg_data = 0;\r
+ int i;\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ for (i = 0; i < AW_GET_IV_CNT_MAX; i++) {\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, iv_desc->reg, ®_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev,\r
+ "read 0x%x failed", iv_desc->reg);\r
+ return ret;\r
+ }\r
+\r
+ reg_data &= (~iv_desc->reabs_mask);\r
+ if (!reg_data) {\r
+ return 0;\r
+ }\r
+ AW_MS_DELAY(30);\r
+ }\r
+\r
+ aw_dev_err(aw_dev->dev, "IV data abnormal, please check");\r
+\r
+ return -EINVAL;\r
+}\r
+\r
+static void aw_cali_svc_bubble_sort(uint32_t *data, int data_size)\r
+{\r
+ int loop_num = data_size - 1;\r
+ uint16_t temp_store = 0;\r
+ int i;\r
+ int j;\r
+\r
+ if (data == NULL) {\r
+ aw_pr_err("data is NULL");\r
+ return;\r
+ }\r
+\r
+ for (i = 0; i < loop_num; i++) {\r
+ for (j = 0; j < loop_num - i; j++) {\r
+ if (data[j] > data[j + 1]) {\r
+ temp_store = data[j];\r
+ data[j] = data[j + 1];\r
+ data[j + 1] = temp_store;\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+static int aw_cali_svc_del_max_min_ave_algo(uint32_t *data, int data_size)\r
+{\r
+ int sum = 0;\r
+ int ave = 0;\r
+ int i = 0;\r
+\r
+ aw_cali_svc_bubble_sort(data, data_size);\r
+ for (i = 1; i < data_size - 1; i++)\r
+ sum += data[i];\r
+\r
+ if ((data_size - AW_CALI_DATA_SUM_RM) == 0) {\r
+ aw_pr_err("data_size id :%d less than 2", data_size);\r
+ return -EINVAL;\r
+ }\r
+\r
+ ave = sum / (data_size - AW_CALI_DATA_SUM_RM);\r
+\r
+ return ave;\r
+}\r
+\r
+static void aw_cali_svc_set_cali_status(struct aw_device *aw_dev, bool status)\r
+{\r
+\r
+ aw_dev->cali_desc.status = status;\r
+ aw_dev_info(aw_dev->dev, "cali %s",\r
+ (status == 0) ? ("disable") : ("enable"));\r
+}\r
+\r
+bool aw883xx_cali_get_cali_status(struct aw_cali_desc *cali_desc)\r
+{\r
+ return cali_desc->status;\r
+}\r
+\r
+static int aw_cali_svc_cali_init_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ bool pa_status =false;\r
+ uint32_t hmute_status = AW_DEV_HMUTE_DISABLE;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+\r
+ pa_status = aw883xx_device_status(aw_dev, AW_DEV_PLL_WDT_STATUS,\r
+ AW_GET_DEV_STATUS);\r
+ if (!pa_status) {\r
+ aw_dev_err(aw_dev->dev, "pa status abnormal");\r
+ return -EINVAL;\r
+ }\r
+\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_HMUTE_PARAMS,\r
+ (void *)&hmute_status, sizeof(hmute_status), AW_GET_DEV_PARAMS);\r
+ if ((ret < 0) || (hmute_status == AW_DEV_HMUTE_ENABLE)) {\r
+ aw_dev_err(aw_dev->dev, "hmute status abnormal:%d, ret = %d", hmute_status, ret);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_get_cali_cfg(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ struct aw_cali_cfg_desc *desc = &aw_dev->cali_desc.cali_cfg_desc;\r
+ struct cali_cfg *cali_cfg = &aw_dev->cali_desc.cali_cfg;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev,\r
+ desc->actampth_reg, &cali_cfg->data[0], desc->actampth_data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp read reg0x%x error", desc->actampth_reg);\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev,\r
+ desc->noiseampth_reg, &cali_cfg->data[1], desc->noiseampth_data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp read reg0x%x error", desc->noiseampth_reg);\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev,\r
+ desc->ustepn_reg, &cali_cfg->data[2], desc->ustepn_data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp read reg0x%x error", desc->ustepn_reg);\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev,\r
+ desc->alphan_reg, &cali_cfg->data[3], desc->alphan_data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp read reg0x%x error", desc->alphan_reg);\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_set_cali_cfg(struct aw_device *aw_dev,\r
+ struct cali_cfg cali_cfg)\r
+{\r
+ int ret = -1;\r
+ struct aw_cali_cfg_desc *desc = &aw_dev->cali_desc.cali_cfg_desc;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+\r
+ ret = aw_dev->ops.aw_dsp_write(aw_dev,\r
+ desc->actampth_reg, cali_cfg.data[0], desc->actampth_data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp write reg0x%x error", desc->actampth_reg);\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_dsp_write(aw_dev,\r
+ desc->noiseampth_reg, cali_cfg.data[1], desc->noiseampth_data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp write reg0x%x error", desc->noiseampth_reg);\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_dsp_write(aw_dev,\r
+ desc->ustepn_reg, cali_cfg.data[2], desc->ustepn_data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp write reg0x%x error", desc->ustepn_reg);\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_dsp_write(aw_dev,\r
+ desc->alphan_reg, cali_cfg.data[3], desc->alphan_data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp write reg0x%x error", desc->alphan_reg);\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_set_dsp_status(struct aw_device *aw_dev, uint32_t status)\r
+{\r
+ int ret = -1;\r
+ uint32_t msg_len = sizeof(uint32_t);\r
+\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_DSP_PARAMS,\r
+ (void *)&status, msg_len, AW_SET_DEV_PARAMS);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write_params failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_get_smooth_cali_re(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ int i = 0;\r
+ uint32_t re_temp[AW_CALI_READ_CNT_MAX] = { 0 };\r
+ uint32_t dsp_re;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+\r
+ for (i = 0; i < AW_CALI_READ_CNT_MAX; i++) {\r
+ ret = aw_cali_svc_get_dev_re(aw_dev, &re_temp[i]);\r
+ if (ret < 0) {\r
+ goto cali_re_fail;\r
+ }\r
+\r
+ AW_MS_DELAY(30);/*delay 30 ms*/\r
+ }\r
+\r
+ dsp_re = aw_cali_svc_del_max_min_ave_algo(re_temp,\r
+ AW_CALI_READ_CNT_MAX);\r
+\r
+ ret = aw_cali_svc_get_iv_st(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev,\r
+ "get iv data failed");\r
+ goto cali_re_fail;\r
+ }\r
+\r
+ if (dsp_re < aw_dev->re_range.re_min || dsp_re > aw_dev->re_range.re_max) {\r
+ aw_dev_err(aw_dev->dev,\r
+ "out range re value: %d", dsp_re);\r
+ aw_dev->cali_desc.cali_re = dsp_re;\r
+ if (aw_dev->cali_desc.cali_check_st)\r
+ aw_dev->cali_desc.cali_result = CALI_RESULT_ERROR;\r
+ aw_cali_svc_run_mute(aw_dev, aw_dev->cali_desc.cali_result);\r
+ return 0;\r
+ }\r
+\r
+ if (aw_dev->cali_desc.cali_check_st)\r
+ aw_dev->cali_desc.cali_result = CALI_RESULT_NORMAL;\r
+\r
+ aw_dev->cali_desc.cali_re = dsp_re;\r
+ aw_dev_info(aw_dev->dev, "re[%d]mohm", aw_dev->cali_desc.cali_re);\r
+\r
+ aw_cali_svc_set_dsp_status(aw_dev, AW_DEV_DSP_BYPASS);\r
+ aw883xx_set_cali_re((void *)aw_dev);\r
+ aw_cali_svc_set_dsp_status(aw_dev, AW_DEV_DSP_WORK);\r
+\r
+ return 0;\r
+cali_re_fail:\r
+ if (aw_dev->cali_desc.cali_check_st)\r
+ aw_dev->cali_desc.cali_result = CALI_RESULT_ERROR;\r
+ aw_cali_svc_run_mute(aw_dev, aw_dev->cali_desc.cali_result);\r
+ return -EINVAL;\r
+\r
+}\r
+\r
+static int aw_cali_svc_cali_en(struct aw_device *aw_dev, bool cali_en)\r
+{\r
+ int ret = -1;\r
+ struct cali_cfg set_cfg;\r
+\r
+ aw_dev_info(aw_dev->dev, "cali_en:%d", cali_en);\r
+\r
+ aw_cali_svc_set_dsp_status(aw_dev, AW_DEV_DSP_BYPASS);\r
+ if (cali_en) {\r
+ ret = aw_cali_svc_get_cali_cfg(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get cali cfg failed");\r
+ aw_cali_svc_set_dsp_status(aw_dev, AW_DEV_DSP_WORK);\r
+ return ret;\r
+ }\r
+ set_cfg.data[0] = 0;\r
+ set_cfg.data[1] = 0;\r
+ set_cfg.data[2] = 0xffffffff;\r
+ set_cfg.data[3] = 1;\r
+\r
+ ret = aw_cali_svc_set_cali_cfg(aw_dev, set_cfg);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "set cali cfg failed");\r
+ aw_cali_svc_set_cali_cfg(aw_dev, aw_dev->cali_desc.cali_cfg);\r
+ aw_cali_svc_set_dsp_status(aw_dev, AW_DEV_DSP_WORK);\r
+ return ret;\r
+ }\r
+ } else {\r
+ aw_cali_svc_set_cali_cfg(aw_dev, aw_dev->cali_desc.cali_cfg);\r
+ }\r
+ aw_cali_svc_set_dsp_status(aw_dev, AW_DEV_DSP_WORK);\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_cali_run_dsp_vol(struct aw_device *aw_dev,\r
+ int type, bool enable)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val = 0;\r
+ uint16_t set_vol = 0;\r
+ struct aw_dsp_vol_desc *desc = &aw_dev->dsp_vol_desc;\r
+\r
+ aw_dev_info(aw_dev->dev, "type:%d, enable:%d", type, enable);\r
+\r
+ if (enable) {\r
+ /*set dsp vol*/\r
+ if (type == CALI_TYPE_RE) {\r
+ set_vol = desc->mute_st;\r
+ } else if (type == CALI_TYPE_F0) {\r
+ set_vol = desc->noise_st;\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "type:%d unsupported", type);\r
+ return -EINVAL;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev,\r
+ desc->reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read reg 0x%x failed", desc->reg);\r
+ return ret;\r
+ }\r
+\r
+ aw_dev->cali_desc.store_vol = reg_val & (~desc->mask);\r
+ reg_val &= desc->mask;\r
+ reg_val |= set_vol;\r
+\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev,\r
+ desc->reg, reg_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write reg 0x%x failed", desc->reg);\r
+ return ret;\r
+ }\r
+ } else {\r
+ /*reset dsp vol*/\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev,\r
+ desc->reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read reg 0x%x failed", desc->reg);\r
+ return ret;\r
+ }\r
+\r
+ reg_val &= desc->mask;\r
+ reg_val |= aw_dev->cali_desc.store_vol;\r
+\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev,\r
+ desc->reg, reg_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write reg 0x%x failed", desc->reg);\r
+ return ret;\r
+ }\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_set_white_noise(struct aw_device *aw_dev,\r
+ bool noise_enable)\r
+{\r
+ int ret = -1;\r
+ uint32_t reg_val;\r
+ struct aw_noise_desc *desc = &aw_dev->cali_desc.noise_desc;\r
+\r
+ aw_dev_info(aw_dev->dev, "set noise %s",\r
+ (noise_enable == 0) ? ("disable") : ("enable"));\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev,\r
+ desc->dsp_reg, ®_val, desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read dsp reg 0x%x failed", desc->dsp_reg);\r
+ return ret;\r
+ }\r
+\r
+ if (noise_enable) {\r
+ reg_val |= (~desc->mask);\r
+ } else {\r
+ reg_val &= desc->mask;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_dsp_write(aw_dev,\r
+ desc->dsp_reg, reg_val, desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write dsp reg 0x%x failed", desc->dsp_reg);\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_cali_f0_en(struct aw_device *aw_dev, bool f0_enable)\r
+{\r
+ int ret = -1;\r
+ struct aw_cali_delay_desc *desc = &aw_dev->cali_desc.cali_delay_desc;\r
+\r
+ aw_dev_info(aw_dev->dev, "cali f0 %s",\r
+ (f0_enable == 0) ? ("disable") : ("enable"));\r
+\r
+ if (f0_enable) {\r
+ ret = aw_cali_svc_cali_run_dsp_vol(aw_dev, CALI_TYPE_F0, true);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "run dsp volume error, ret=%d", ret);\r
+ return ret;\r
+ }\r
+ AW_MS_DELAY(desc->delay);\r
+\r
+ ret = aw_cali_svc_set_white_noise(aw_dev, true);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write white noise error, ret=%d", ret);\r
+ aw_cali_svc_cali_run_dsp_vol(aw_dev, CALI_TYPE_F0, false);\r
+ return ret;\r
+ }\r
+ } else {\r
+ aw_cali_svc_set_white_noise(aw_dev, false);\r
+ aw_cali_svc_cali_run_dsp_vol(aw_dev, CALI_TYPE_F0, false);\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_get_cali_f0_q(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ int cnt = 0;\r
+ uint32_t f0 = 0;\r
+ uint32_t q = 0;\r
+ uint32_t f0_sum = 0;\r
+ uint32_t q_sum = 0;\r
+ struct aw_cali_desc *cali_desc = &aw_dev->cali_desc;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+\r
+ for (cnt = 0; cnt < F0_READ_CNT_MAX; cnt++) {\r
+ /*f0*/\r
+ ret = aw_cali_svc_get_dev_f0(aw_dev, &f0);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+ f0_sum += f0;\r
+\r
+ /*q*/\r
+ ret = aw_cali_svc_get_dev_q(aw_dev, &q);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+ q_sum += q;\r
+ AW_MS_DELAY(30);\r
+ }\r
+\r
+ cali_desc->f0 = f0_sum / cnt;\r
+ cali_desc->q = q_sum / cnt;\r
+\r
+ ret = aw_cali_svc_get_iv_st(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev,\r
+ "get iv data failed, set default f0: 2600 q: 2600");\r
+ cali_desc->f0 = 2600;\r
+ cali_desc->q = 2600;\r
+ }\r
+\r
+ aw_dev_info(aw_dev->dev, "f0[%d] q[%d]", cali_desc->f0, cali_desc->q);\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_cali_mode_enable(struct aw_device *aw_dev,\r
+ int type, unsigned int flag, bool is_enable)\r
+{\r
+ int ret = -1;\r
+ int32_t crc_switch_set = -1;\r
+\r
+ aw_dev_info(aw_dev->dev, "type:%d, flag:0x%x, is_enable:%d",\r
+ type, flag, is_enable);\r
+\r
+ if (is_enable) {\r
+ if (aw_dev->crc_check_realtime_desc.init_switch) {\r
+ crc_switch_set = aw_dev->crc_check_realtime_desc.disable;\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_REALTIME_CRC_SET_PARAMS,\r
+ (void *)&crc_switch_set, sizeof(crc_switch_set), AW_SET_DEV_PARAMS);\r
+ }\r
+\r
+ ret = aw_cali_svc_cali_init_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "init check failed");\r
+ return ret;\r
+ }\r
+\r
+ aw_cali_svc_set_cali_status(aw_dev, true);\r
+\r
+ ret = aw_cali_svc_cali_en(aw_dev, true);\r
+ if (ret < 0) {\r
+ aw_cali_svc_set_cali_status(aw_dev, false);\r
+ return ret;\r
+ }\r
+\r
+ if ((type == CALI_TYPE_RE) && (flag & CALI_OPS_HMUTE)) {\r
+ ret = aw_cali_svc_cali_run_dsp_vol(aw_dev, CALI_TYPE_RE, true);\r
+ if (ret < 0) {\r
+ aw_cali_svc_cali_en(aw_dev, false);\r
+ aw_cali_svc_set_cali_status(aw_dev, false);\r
+ return ret;\r
+ }\r
+ } else if ((type == CALI_TYPE_F0) && (flag & CALI_OPS_NOISE)) {\r
+ ret = aw_cali_svc_cali_f0_en(aw_dev, true);\r
+ if (ret < 0) {\r
+ aw_cali_svc_cali_en(aw_dev, false);\r
+ aw_cali_svc_set_cali_status(aw_dev, false);\r
+ return ret;\r
+ }\r
+ }\r
+ } else {\r
+\r
+ if ((type == CALI_TYPE_RE) && (flag & CALI_OPS_HMUTE)) {\r
+ aw_cali_svc_cali_run_dsp_vol(aw_dev, CALI_TYPE_RE, false);\r
+ } else if ((type == CALI_TYPE_F0) && (flag & CALI_OPS_NOISE)) {\r
+ aw_cali_svc_cali_f0_en(aw_dev, false);\r
+ }\r
+ aw_cali_svc_cali_en(aw_dev, false);\r
+ aw883xx_device_status(aw_dev, AW_DEV_CLEAR_INT_STATUS, AW_SET_DEV_STATUS);\r
+ aw_cali_svc_set_cali_status(aw_dev, false);\r
+\r
+ if (aw_dev->crc_check_realtime_desc.init_switch) {\r
+ crc_switch_set = aw_dev->crc_check_realtime_desc.enable;\r
+ ret = aw883xx_device_params(aw_dev, AW_DEV_REALTIME_CRC_SET_PARAMS,\r
+ (void *)&crc_switch_set, sizeof(crc_switch_set), AW_SET_DEV_PARAMS);\r
+ }\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_devs_cali_mode_enable(int dev_cnt,\r
+ int type, unsigned int flag,\r
+ bool is_enable)\r
+{\r
+ int ret;\r
+ uint8_t cnt;\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct aw_device *local_dev = NULL;\r
+\r
+ for (cnt = 0; cnt < dev_cnt; cnt++) {\r
+ aw_pr_info("dev[%d]", cnt);\r
+ aw883xx = aw883xx_get_dev(cnt);\r
+ local_dev = aw883xx->aw_pa;\r
+ if (is_enable) {\r
+ aw_cali_svc_run_mute(local_dev, CALI_RESULT_NORMAL);\r
+ }\r
+ ret = aw_cali_svc_cali_mode_enable(local_dev, type,\r
+ flag, is_enable);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+ if (!is_enable && (type == CALI_TYPE_F0)) {\r
+ aw_cali_svc_run_mute(local_dev, local_dev->cali_desc.cali_result);\r
+ }\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+static int aw_cali_svc_dev_cali_re(struct aw_device *aw_dev, unsigned int flag)\r
+{\r
+ int ret = -1;\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ aw_cali_svc_run_mute(aw_dev, CALI_RESULT_NORMAL);\r
+\r
+ ret = aw_cali_svc_cali_mode_enable(aw_dev,\r
+ CALI_TYPE_RE, flag, true);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+ AW_MS_DELAY(g_cali_re_time);\r
+\r
+ ret = aw_cali_svc_get_smooth_cali_re(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "cali re failed");\r
+ }\r
+\r
+ aw_cali_svc_cali_mode_enable(aw_dev,\r
+ CALI_TYPE_RE, flag, false);\r
+\r
+ return ret;\r
+}\r
+\r
+static int aw_cali_svc_devs_get_cali_re(int dev_cnt)\r
+{\r
+ int ret;\r
+ uint8_t cnt;\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct aw_device *local_dev = NULL;\r
+\r
+ for (cnt = 0; cnt < dev_cnt; cnt++) {\r
+ aw883xx = aw883xx_get_dev(cnt);\r
+ local_dev = aw883xx->aw_pa;\r
+ ret = aw_cali_svc_get_smooth_cali_re(local_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(local_dev->dev, "get re failed");\r
+ return ret;\r
+ }\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+static int aw_cali_svc_devs_cali_re(struct aw_device *aw_dev, unsigned int flag)\r
+{\r
+ int ret = -1;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ ret = aw_cali_svc_devs_cali_mode_enable(dev_cnt,CALI_TYPE_RE,\r
+ flag, true);\r
+ if (ret < 0)\r
+ goto error;\r
+\r
+ AW_MS_DELAY(g_cali_re_time);\r
+\r
+ ret = aw_cali_svc_devs_get_cali_re(dev_cnt);\r
+ if (ret < 0) {\r
+ goto error;\r
+ }\r
+ aw_cali_svc_devs_cali_mode_enable(dev_cnt,CALI_TYPE_RE,\r
+ flag, false);\r
+\r
+ return 0;\r
+error:\r
+ aw_cali_svc_devs_cali_mode_enable(dev_cnt,CALI_TYPE_RE,\r
+ flag, false);\r
+ return ret;\r
+}\r
+\r
+static int aw_cali_svc_cali_re(struct aw_device *aw_dev, aw_single_t is_single, unsigned int flag)\r
+{\r
+ if (is_single) {\r
+ return aw_cali_svc_dev_cali_re(aw_dev, flag);\r
+ } else {\r
+ return aw_cali_svc_devs_cali_re(aw_dev, flag);\r
+ }\r
+}\r
+\r
+static int aw_cali_svc_dev_cali_f0_q(struct aw_device *aw_dev, unsigned int flag)\r
+{\r
+ int ret = -1;\r
+\r
+ aw_cali_svc_run_mute(aw_dev, CALI_RESULT_NORMAL);\r
+\r
+ ret = aw_cali_svc_cali_mode_enable(aw_dev, CALI_TYPE_F0, flag, true);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+ AW_MS_DELAY(AW_CALI_F0_TIME);\r
+\r
+ ret = aw_cali_svc_get_cali_f0_q(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get f0 q failed");\r
+ }\r
+ aw_cali_svc_cali_mode_enable(aw_dev, CALI_TYPE_F0, flag, false);\r
+\r
+ aw_cali_svc_run_mute(aw_dev, aw_dev->cali_desc.cali_result);\r
+\r
+ return ret;\r
+}\r
+\r
+static int aw_cali_svc_devs_get_cali_f0_q(int dev_cnt)\r
+{\r
+ int ret = -1;\r
+ uint8_t cnt;\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct aw_device *local_dev = NULL;\r
+\r
+ for (cnt = 0; cnt < dev_cnt; cnt++) {\r
+ aw883xx = aw883xx_get_dev(cnt);\r
+ local_dev = aw883xx->aw_pa;\r
+ ret = aw_cali_svc_get_cali_f0_q(local_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(local_dev->dev, "get f0 q failed");\r
+ return ret;\r
+ }\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+static int aw_cali_svc_devs_cali_f0_q(struct aw_device *aw_dev, unsigned int flag)\r
+{\r
+ int ret = -1;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ ret = aw_cali_svc_devs_cali_mode_enable(dev_cnt,CALI_TYPE_F0,\r
+ flag, true);\r
+ if (ret < 0) {\r
+ goto error;\r
+ }\r
+ AW_MS_DELAY(AW_CALI_F0_TIME);\r
+\r
+ ret = aw_cali_svc_devs_get_cali_f0_q(dev_cnt);\r
+ if (ret < 0) {\r
+ goto error;\r
+ }\r
+ aw_cali_svc_devs_cali_mode_enable(dev_cnt,CALI_TYPE_F0,\r
+ flag, false);\r
+\r
+ return 0;\r
+error:\r
+ aw_cali_svc_devs_cali_mode_enable(dev_cnt,CALI_TYPE_F0,\r
+ flag, false);\r
+ return ret;\r
+}\r
+\r
+static int aw_cali_svc_cali_f0_q(struct aw_device *aw_dev, aw_single_t is_single, unsigned int flag)\r
+{\r
+ if (is_single) {\r
+ return aw_cali_svc_dev_cali_f0_q(aw_dev, flag);\r
+ } else {\r
+ return aw_cali_svc_devs_cali_f0_q(aw_dev, flag);\r
+ }\r
+}\r
+\r
+static int aw_cali_svc_get_dev_cali_val(struct aw_device *aw_dev, int type, uint32_t *data_buf)\r
+{\r
+ switch (type) {\r
+ case GET_RE_TYPE:\r
+ *data_buf = aw_dev->cali_desc.cali_re;\r
+ break;\r
+ case GET_F0_TYPE:\r
+ *data_buf = aw_dev->cali_desc.f0;\r
+ break;\r
+ case GET_Q_TYPE:\r
+ *data_buf = aw_dev->cali_desc.q;\r
+ break;\r
+ default:\r
+ aw_dev_err(aw_dev->dev, "type:%d not support", type);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_cali_svc_get_devs_cali_val(struct aw_device *aw_dev, int type, uint32_t *data_buf, int num)\r
+{\r
+ struct aw883xx *aw883xx = NULL;\r
+ struct aw_device *local_dev = NULL;\r
+ uint8_t cnt = 0;\r
+ uint8_t i;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ for (i = 0; i < dev_cnt; i++) {\r
+ aw883xx = aw883xx_get_dev(i);\r
+ local_dev = aw883xx->aw_pa;\r
+ if (local_dev->dev < num) {\r
+ switch (type) {\r
+ case GET_RE_TYPE:\r
+ data_buf[local_dev->dev] = local_dev->cali_desc.cali_re;\r
+ break;\r
+ case GET_F0_TYPE:\r
+ data_buf[local_dev->dev] = local_dev->cali_desc.f0;\r
+ break;\r
+ case GET_Q_TYPE:\r
+ data_buf[local_dev->dev] = local_dev->cali_desc.q;\r
+ break;\r
+ default:\r
+ aw_dev_err(local_dev->dev, "type:%d not support", type);\r
+ return -EINVAL;\r
+ }\r
+ cnt++;\r
+ } else {\r
+ aw_dev_err(local_dev->dev, "channel num[%d] overflow buf num[%d]",\r
+ local_dev->dev, num);\r
+ return -EINVAL;\r
+ }\r
+ }\r
+ return cnt;\r
+}\r
+\r
+\r
+\r
+static int aw_cali_svc_cali_re_f0_q(struct aw_device *aw_dev, aw_single_t is_single, unsigned int flag)\r
+{\r
+ int ret = -1;\r
+\r
+ ret = aw_cali_svc_cali_re(aw_dev, is_single, flag);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+ ret = aw_cali_svc_cali_f0_q(aw_dev, is_single, flag);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+ return 0;\r
+}\r
+\r
+\r
+\r
+/*****************************Calibration Interface******************************************************/\r
+\r
+int aw883xx_cail_re_cali(void *dev, aw_single_t is_single)\r
+{\r
+ int ret = -1;\r
+ struct aw_device *aw_dev = dev;\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ ret = aw_cali_svc_cali_re(aw_dev, is_single, CALI_OPS_HMUTE);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "cali re failed");\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_f0_q_cali(void *dev, aw_single_t is_single)\r
+{\r
+ int ret = -1;\r
+ struct aw_device *aw_dev = dev;\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ ret = aw_cali_svc_cali_f0_q(aw_dev, is_single, CALI_OPS_NOISE);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "cali f0 failed");\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_re_f0_cali(void *dev, aw_single_t is_single)\r
+{\r
+ int ret = -1;\r
+ struct aw_device *aw_dev = dev;\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ ret = aw_cali_svc_cali_re_f0_q(aw_dev, is_single, CALI_OPS_HMUTE|CALI_OPS_NOISE);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "cali re or f0 failed");\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+\r
+int aw883xx_cali_get_re_range(void *dev, aw_single_t is_single, uint32_t *range_buf)\r
+{\r
+ struct aw_device *aw_dev = dev;\r
+ int ret = -1;\r
+ uint8_t cnt;\r
+\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ if (is_single) {\r
+ aw_cali_svc_get_dev_re_range(aw_dev, range_buf);\r
+\r
+ aw_dev_info(aw_dev->dev, "re_min value: [%d]", range_buf[RE_MIN_FLAG]);\r
+ aw_dev_info(aw_dev->dev, "re_max value: [%d]", range_buf[RE_MAX_FLAG]);\r
+ } else {\r
+ ret = aw_cali_svc_get_devs_re_range(aw_dev, range_buf, AW_DEV_CH_MAX);\r
+ if (ret <= 0) {\r
+ aw_dev_err(aw_dev->dev, "get re_range failed");\r
+ return -EINVAL;\r
+ }\r
+ for (cnt = 0; cnt < dev_cnt; cnt++) {\r
+ aw_pr_info("dev[%d]:re_min:%d re_max:%d", cnt,\r
+ range_buf[RE_MIN_FLAG + cnt * RE_RANGE_NUM], range_buf[RE_MAX_FLAG + cnt * RE_RANGE_NUM]);\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+\r
+int aw883xx_cali_get_r0(void *dev, aw_single_t is_single, uint32_t *r0_data)\r
+{\r
+ struct aw_device *aw_dev = dev;\r
+ int ret = -1;\r
+ uint8_t cnt;\r
+\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ if (is_single) {\r
+ ret = aw_cali_svc_get_dev_r0(aw_dev, r0_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get r0 failed");\r
+ return -EINVAL;\r
+ }\r
+ aw_dev_info(aw_dev->dev, "r0:%d mOhms", *r0_data);\r
+ } else {\r
+ ret = aw_cali_svc_get_devs_r0(aw_dev, r0_data, AW_DEV_CH_MAX);\r
+ if (ret <= 0) {\r
+ aw_dev_err(aw_dev->dev, "get r0 failed");\r
+ return -EINVAL;\r
+ }\r
+ for (cnt = 0; cnt < dev_cnt; cnt++) {\r
+ aw_pr_info("dev[%d]r0:%d mOhms", cnt, r0_data[cnt]);\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_get_f0(void *dev, aw_single_t is_single, uint32_t *f0)\r
+{\r
+ uint8_t cnt;\r
+ int ret = -1;\r
+ struct aw_device *aw_dev = dev;\r
+\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ if (is_single) {\r
+ aw_cali_svc_get_dev_f0(aw_dev, f0);\r
+ aw_dev_info(aw_dev->dev, "f0:%u Hz", *f0);\r
+ } else {\r
+ ret = aw_cali_svc_get_devs_f0(aw_dev, f0, AW_DEV_CH_MAX);\r
+ if (ret <= 0) {\r
+ aw_pr_err("dev[%d] get f0 failed", cnt);\r
+ return -EINVAL;\r
+ }\r
+ for (cnt = 0; cnt < dev_cnt; cnt++) {\r
+ aw_pr_info("dev[%d]f0:%u Hz", cnt, f0[cnt]);\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_get_te(void *dev, aw_single_t is_single, int32_t *te_data)\r
+{\r
+ struct aw_device *aw_dev = dev;\r
+ int ret = -1;\r
+ uint8_t cnt;\r
+\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ if (is_single) {\r
+ ret = aw_cali_svc_get_dev_te(aw_dev, &aw_dev->cali_desc, te_data);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get te failed");\r
+ return -EINVAL;\r
+ }\r
+ aw_dev_info(aw_dev->dev, "te:%d", *te_data);\r
+ } else {\r
+ ret = aw_cali_svc_get_devs_te(aw_dev, te_data, AW_DEV_CH_MAX);\r
+ if (ret <= 0) {\r
+ aw_dev_err(aw_dev->dev, "get te failed");\r
+ return -EINVAL;\r
+ } else {\r
+ for (cnt = 0; cnt < dev_cnt; cnt++) {\r
+ aw_pr_info("dev[%d]te:%d", cnt, te_data[cnt]);\r
+ }\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_f0_show(void *dev, aw_single_t is_single, uint32_t *f0)\r
+{\r
+ uint8_t cnt;\r
+ int ret = -1;\r
+ struct aw_device *aw_dev = dev;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ if (is_single) {\r
+ ret = aw_cali_svc_get_dev_cali_val(aw_dev, GET_F0_TYPE, f0);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get q failed");\r
+ return -EINVAL;\r
+ }\r
+ aw_dev_info(aw_dev->dev, "f0:%u Hz", *f0);\r
+ } else {\r
+ for (cnt = 0; cnt < dev_cnt; cnt++) {\r
+ ret = aw_cali_svc_get_devs_cali_val(aw_dev, GET_F0_TYPE, f0, AW_DEV_CH_MAX);\r
+ if (ret <= 0) {\r
+ aw_pr_err("dev[%d] get f0 failed", cnt);\r
+ return -EINVAL;\r
+ }\r
+ aw_pr_info("dev[%d]f0:%u Hz", cnt, f0[cnt]);\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_q_show(void *dev, aw_single_t is_single, uint32_t *q)\r
+{\r
+ int ret = -1;\r
+ uint8_t cnt;\r
+ struct aw_device *aw_dev = dev;\r
+\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ if (is_single) {\r
+ ret = aw_cali_svc_get_dev_cali_val(aw_dev, GET_Q_TYPE, q);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get q failed");\r
+ return -EINVAL;\r
+ }\r
+ aw_dev_info(aw_dev->dev, "q:%u", *q);\r
+ } else {\r
+ for (cnt = 0; cnt < dev_cnt; cnt++) {\r
+ ret = aw_cali_svc_get_devs_cali_val(aw_dev, GET_Q_TYPE, q, AW_DEV_CH_MAX);\r
+ if (ret <= 0) {\r
+ aw_pr_err("dev[%d] get q failed", cnt);\r
+ return -EINVAL;\r
+ }\r
+ aw_pr_info("dev[%d]q:%u", cnt, q[cnt]);\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_re_show(void *dev, aw_single_t is_single, uint32_t *re)\r
+{\r
+ int ret = -1;\r
+ uint8_t cnt;\r
+ struct aw_device *aw_dev = dev;\r
+ int dev_cnt = aw883xx_get_dev_num();\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ if (is_single) {\r
+ ret = aw_cali_svc_get_dev_cali_val(aw_dev, GET_RE_TYPE, re);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get re failed");\r
+ return -EINVAL;\r
+ }\r
+ aw_dev_info(aw_dev->dev, "cali_re:%umOhms", *re);\r
+ } else {\r
+ for (cnt = 0; cnt < dev_cnt; cnt++) {\r
+ ret = aw_cali_svc_get_devs_cali_val(aw_dev, GET_RE_TYPE, re, AW_DEV_CH_MAX);\r
+ if (ret <= 0) {\r
+ aw_pr_err("dev[%d] get re failed", cnt);\r
+ return -EINVAL;\r
+ }\r
+ aw_pr_info("dev[%d]cali_re:%umOhms", cnt, re[cnt]);\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_store_cali_re(void *dev, aw_single_t is_single, uint32_t *set_re)\r
+{\r
+ struct aw_device *aw_dev = dev;\r
+ uint32_t re;\r
+ int ret = -1;\r
+\r
+ if (is_single) {\r
+ re = set_re[aw_dev->dev];\r
+ ret = aw_cali_store_cali_re(aw_dev, re);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "store cali re failed!");\r
+ return -EINVAL;\r
+ }\r
+ } else {\r
+ ret = aw_cali_devs_store_cali_re(aw_dev, set_re);\r
+ if (ret < 0) {\r
+ aw_pr_err("set devs_re failed");\r
+ return -EINVAL;\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_read_re_from_dsp(void *dev, uint32_t *re)\r
+{\r
+ struct aw_device *aw_dev = dev;\r
+ int ret = -1;\r
+\r
+ ret = aw_cali_svc_read_cali_re_from_pa(aw_dev, re);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read re from dsp failed");\r
+ return -EINVAL;\r
+ }\r
+ aw_dev_info(aw_dev->dev, "dsp_re:%d", *re);\r
+ return 0;\r
+}\r
+\r
+int aw883xx_cali_show_cali_time(uint32_t *time)\r
+{\r
+ *time = g_cali_re_time;\r
+ aw_pr_info("time:%u", *time);\r
+ return 0;\r
+}\r
+\r
+\r
+int aw883xx_cali_store_cali_time(uint32_t time)\r
+{\r
+ if (time < 1000) {\r
+ aw_pr_err( "time:%d is too short, no set", time);\r
+ return -EINVAL;\r
+ }\r
+\r
+ g_cali_re_time = time;\r
+ aw_pr_info("time:%u", g_cali_re_time);\r
+ return 0;\r
+}\r
+\r
+#endif\r
+\r
--- /dev/null
+/*\r
+* aw883xx_device.c aw883xx codec driver\r
+*\r
+* Copyright (c) 2021 AWINIC Technology CO., LTD\r
+*\r
+* Author: <zhaolei@awinic.com>\r
+*\r
+* This program is free software; you can redistribute it and/or modify it\r
+* under the terms of the GNU General Public License as published by the\r
+* Free Software Foundation; either version 2 of the License, or (at your\r
+* option) any later version.\r
+*/\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+\r
+#include "aw883xx_base.h"\r
+#include "aw883xx_device.h"\r
+#include "aw_profile_process.h"\r
+\r
+#define AW_DEV_SYSST_CHECK_MAX (10)\r
+\r
+static unsigned int g_fade_in_time = AW_1_MS;\r
+static unsigned int g_fade_out_time = AW_1_MS;\r
+\r
+\r
+#ifdef AW_MONITOR\r
+extern int aw883xx_monitor_init(void *dev);\r
+extern void aw883xx_monitor_start(void *dev);\r
+extern void aw883xx_monitor_stop(void *dev);\r
+extern void aw883xx_monitor_deinit(void *dev);\r
+extern int aw883xx_monitor_work_func(void *dev);\r
+extern void aw883xx_monitor_set_handle(void *dev);\r
+extern void aw883xx_monitor_update_st(void *dev, monitor_update_t type);\r
+\r
+void aw883xx_dev_get_monitor_func(struct aw_device *aw_dev)\r
+{\r
+ aw_dev->ops.aw_monitor_init = aw883xx_monitor_init;\r
+ aw_dev->ops.aw_monitor_start = aw883xx_monitor_start;\r
+ aw_dev->ops.aw_monitor_stop = aw883xx_monitor_stop;\r
+ aw_dev->ops.aw_monitor_deinit = aw883xx_monitor_deinit;\r
+ aw_dev->ops.aw_monitor_work_func = aw883xx_monitor_work_func;\r
+ aw_dev->ops.aw_monitor_set_handle = aw883xx_monitor_set_handle;\r
+}\r
+\r
+#else\r
+void aw883xx_dev_get_monitor_func(struct aw_device *aw_dev)\r
+{\r
+ aw_dev->ops.aw_monitor_init = NULL;\r
+ aw_dev->ops.aw_monitor_start = NULL;\r
+ aw_dev->ops.aw_monitor_stop = NULL;\r
+ aw_dev->ops.aw_monitor_deinit = NULL;\r
+ aw_dev->ops.aw_monitor_work_func = NULL;\r
+ aw_dev->ops.aw_monitor_work_func = NULL;\r
+ aw_dev->ops.aw_monitor_set_handle = NULL;\r
+}\r
+#endif\r
+\r
+\r
+int aw883xx_dev_check_prof(uint32_t dev, struct aw_prof_info *prof_info)\r
+{\r
+ struct aw_prof_desc *prof_desc = NULL;\r
+ int i = 0;\r
+ int j = 0;\r
+\r
+ if (prof_info == NULL) {\r
+ aw_dev_err(dev, "prof_info is NULL");\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (prof_info->count <= 0) {\r
+ aw_dev_err(dev, "prof count :%d unsupported", prof_info->count);\r
+ return -EINVAL;\r
+ }\r
+\r
+ prof_desc = prof_info->prof_desc;\r
+ for (i = 0; i < prof_info->count; i++) {\r
+ if (prof_desc == NULL) {\r
+ aw_dev_err(dev, "invalid prof_desc");\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (prof_desc->sec_desc->len <= 0) {\r
+ aw_dev_err(dev, "prof len:%d unsupported", prof_desc->sec_desc->len);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (prof_desc->sec_desc->data == NULL) {\r
+ aw_dev_err(dev, "prof data is NULL");\r
+ return -EINVAL;\r
+ }\r
+ }\r
+\r
+\r
+ for (i = 0; i < prof_info->count; i++) {\r
+ for (j = i + 1; j < prof_info->count; j++) {\r
+ if (strncmp(prof_info->prof_desc[i].name, prof_info->prof_desc[j].name, AW_PROF_NAME_MAX) == 0) {\r
+ aw_dev_err(dev, "prof_desc pos[%d] and prof_desc pos[%d] conflict with prof_name[%s]",\r
+ i, j, prof_info->prof_desc[j].name);\r
+ return -EINVAL;\r
+ }\r
+ }\r
+ }\r
+\r
+ aw_dev_info(dev, "aw_dev_check_prof success");\r
+\r
+ return 0;\r
+}\r
+\r
+struct aw_sec_data_desc *aw883xx_dev_get_prof_data_byname(struct aw_device *aw_dev, char *prof_name, int data_type)\r
+{\r
+ struct aw_sec_data_desc *sec_data = NULL;\r
+ struct aw_prof_desc *prof_desc = NULL;\r
+ struct aw_prof_info *prof_info = aw_dev->prof_info;\r
+ int i = 0;\r
+\r
+ if (data_type >= AW_DATA_TYPE_MAX) {\r
+ aw_dev_err(aw_dev->dev, "unsupport data type id [%d]", data_type);\r
+ return NULL;\r
+ }\r
+\r
+ for (i = 0; i < prof_info->count; i++) {\r
+ if (strncmp(prof_name, prof_info->prof_desc[i].name, AW_PROF_NAME_MAX) == 0) {\r
+ prof_desc = &aw_dev->prof_info->prof_desc[i];\r
+ sec_data = &prof_desc->sec_desc[data_type];\r
+ aw_dev_dbg(aw_dev->dev, "get prof[%s] data len[%d]",\r
+ prof_desc->name, sec_data->len);\r
+ return sec_data;\r
+ }\r
+ }\r
+\r
+ aw_dev_err(aw_dev->dev, "not found prof_name[%s]", prof_name);\r
+ return NULL;\r
+}\r
+\r
+static int aw_dev_check_profile_name(struct aw_device *aw_dev, const char *prof_name)\r
+{\r
+ int i =0;\r
+ struct aw_prof_info *prof_info = aw_dev->prof_info;\r
+\r
+ for (i = 0; i < prof_info->count; i++) {\r
+ if (strncmp(prof_name, prof_info->prof_desc[i].name, AW_PROF_NAME_MAX) == 0){\r
+ return 0;\r
+ }\r
+ }\r
+ aw_dev_err(aw_dev->dev, "not found prof_name[%s]", prof_name);\r
+ return -EINVAL;\r
+}\r
+\r
+int aw883xx_dev_set_profile_name(struct aw_device *aw_dev, const char *prof_name)\r
+{\r
+ if (aw_dev_check_profile_name(aw_dev, prof_name)) {\r
+ return -EINVAL;\r
+ } else {\r
+ strncpy(aw_dev->set_prof_name, prof_name, AW_PROF_NAME_MAX - 1);\r
+ aw_dev_info(aw_dev->dev, "set prof_name[%s]", aw_dev->set_prof_name);\r
+ }\r
+ return 0;\r
+}\r
+\r
+char *aw883xx_dev_get_profile_name(struct aw_device *aw_dev)\r
+{\r
+ return aw_dev->set_prof_name;\r
+}\r
+\r
+static int aw_dev_prof_init(struct aw_device *aw_dev, struct aw_init_info *init_info)\r
+{\r
+ int i =0;\r
+ const char *first_prof_name = NULL;\r
+ /*find profile*/\r
+ for (i = 0; i < init_info->mix_chip_count; i++) {\r
+ if (init_info->prof_info[i].chip_id == aw_dev->chip_id) {\r
+ aw_dev->prof_info = &init_info->prof_info[i];\r
+ first_prof_name = init_info->prof_info[i].prof_desc[0].name;\r
+ strncpy(aw_dev->first_prof_name, first_prof_name, AW_PROF_NAME_MAX);\r
+ aw_dev_info(aw_dev->dev, "first prof_name[%s]", aw_dev->first_prof_name);\r
+ return 0;\r
+ }\r
+ }\r
+\r
+ aw_dev_err(aw_dev->dev, "no supported profile");\r
+ return -EINVAL;\r
+}\r
+\r
+/*****************************awinic device*************************************/\r
+int aw883xx_dev_reg_dump(struct aw_device *aw_dev)\r
+{\r
+ int reg_num = aw_dev->ops.aw_get_reg_num();\r
+ uint8_t i = 0;\r
+ uint16_t reg_val = 0;\r
+\r
+ for (i = 0; i < reg_num; i++) {\r
+ if (aw_dev->ops.aw_check_rd_access(i)) {\r
+ aw_dev->ops.aw_reg_read(aw_dev, i, ®_val);\r
+ aw_dev_info(aw_dev->dev, "read: reg = 0x%02x, val = 0x%04x",\r
+ i, reg_val);\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_set_volume(struct aw_device *aw_dev, uint32_t set_vol)\r
+{\r
+ uint16_t hw_vol = 0;\r
+ int ret = -1;\r
+ struct aw_volume_desc *vol_desc = &aw_dev->volume_desc;\r
+\r
+ hw_vol = set_vol + vol_desc->init_volume;\r
+\r
+ ret = aw_dev->ops.aw_set_hw_volume(aw_dev, hw_vol);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "set volume failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_get_volume(struct aw_device *aw_dev, uint32_t *get_vol)\r
+{\r
+ int ret = -1;\r
+ uint16_t hw_vol = 0;\r
+ struct aw_volume_desc *vol_desc = &aw_dev->volume_desc;\r
+\r
+ ret = aw_dev->ops.aw_get_hw_volume(aw_dev, &hw_vol);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read volume failed");\r
+ return ret;\r
+ }\r
+\r
+ *get_vol = hw_vol - vol_desc->init_volume;\r
+\r
+ return 0;\r
+}\r
+\r
+static void aw_dev_fade_in(struct aw_device *aw_dev)\r
+{\r
+ int i = 0;\r
+ struct aw_volume_desc *desc = &aw_dev->volume_desc;\r
+ int fade_step = aw_dev->fade_step;\r
+ int fade_in_vol = desc->ctl_volume;\r
+ if (!aw_dev->fade_en) {\r
+ return;\r
+ }\r
+\r
+ if (fade_step == 0 || g_fade_in_time == 0) {\r
+ aw_dev_set_volume(aw_dev, fade_in_vol);\r
+ return;\r
+ }\r
+ /*volume up*/\r
+ for (i = desc->mute_volume; i >= fade_in_vol; i -= fade_step) {\r
+ aw_dev_set_volume(aw_dev, i);\r
+ AW_MS_DELAY(g_fade_in_time);\r
+ }\r
+ if (i != fade_in_vol) {\r
+ aw_dev_set_volume(aw_dev, fade_in_vol);\r
+ }\r
+}\r
+\r
+static void aw_dev_fade_out(struct aw_device *aw_dev)\r
+{\r
+ int i = 0;\r
+ struct aw_volume_desc *desc = &aw_dev->volume_desc;\r
+ int fade_step = aw_dev->fade_step;\r
+\r
+ if (!aw_dev->fade_en)\r
+ return;\r
+\r
+ if (fade_step == 0 || g_fade_out_time == 0) {\r
+ aw_dev_set_volume(aw_dev, desc->mute_volume);\r
+ return;\r
+ }\r
+\r
+ for (i = desc->ctl_volume; i <= desc->mute_volume; i += fade_step) {\r
+ aw_dev_set_volume(aw_dev, i);\r
+ AW_MS_DELAY(g_fade_out_time);\r
+ }\r
+ if (i != desc->mute_volume) {\r
+ aw_dev_set_volume(aw_dev, desc->mute_volume);\r
+ AW_MS_DELAY(g_fade_out_time);\r
+ }\r
+\r
+}\r
+\r
+#ifdef AW_FADE\r
+static int aw_dev_get_fade_vol_step(struct aw_device *aw_dev, uint32_t *fade_step)\r
+{\r
+ *fade_step = aw_dev->fade_step;\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_set_fade_vol_step(struct aw_device *aw_dev, unsigned int step)\r
+{\r
+ aw_dev->fade_step = step;\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_get_fade_time(unsigned int *time, fade_time_t fade_type)\r
+{\r
+ if (fade_type == AW_FADE_IN_TIME) {\r
+ *time = g_fade_in_time;\r
+ } else if (fade_type == AW_FADE_OUT_TIME) {\r
+ *time = g_fade_out_time;\r
+ } else {\r
+ aw_pr_err("unsupported fade type:%d", fade_type);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_set_fade_time(unsigned int time, fade_time_t fade_type)\r
+{\r
+ if (fade_type == AW_FADE_IN_TIME) {\r
+ g_fade_in_time = time;\r
+ } else if (fade_type == AW_FADE_OUT_TIME) {\r
+ g_fade_out_time = time;\r
+ } else {\r
+ aw_pr_err("unsupported fade type:%d", fade_type);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+#endif\r
+\r
+#ifdef AW_IRQ\r
+static void aw_dev_interrupt_clear(struct aw_device *aw_dev)\r
+{\r
+ uint16_t reg_val;\r
+\r
+ aw_dev->ops.aw_i2c_read(aw_dev, aw_dev->sysst_desc.reg, ®_val);\r
+ aw_dev_info(aw_dev->dev,"reg SYSST=0x%x", reg_val);\r
+ aw_dev->ops.aw_i2c_read(aw_dev, aw_dev->int_desc.st_reg, ®_val);\r
+ aw_dev_info(aw_dev->dev,"reg SYSINT=0x%x", reg_val);\r
+ aw_dev->ops.aw_i2c_read(aw_dev, aw_dev->int_desc.mask_reg, ®_val);\r
+ aw_dev_info(aw_dev->dev,"reg SYSINTM=0x%x", reg_val);\r
+}\r
+#endif\r
+\r
+static void aw_dev_soft_reset(struct aw_device *aw_dev)\r
+{\r
+ struct aw_soft_rst *reset = &aw_dev->soft_rst;\r
+\r
+ aw_dev->ops.aw_i2c_write(aw_dev, reset->reg, reset->reg_value);\r
+ aw_dev_info(aw_dev->dev, "soft reset done");\r
+}\r
+\r
+static void aw_dev_pwd(struct aw_device *aw_dev, bool pwd)\r
+{\r
+ struct aw_pwd_desc *pwd_desc = &aw_dev->pwd_desc;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+\r
+ if (pwd) {\r
+ aw_dev->ops.aw_reg_write_bits(aw_dev, pwd_desc->reg,\r
+ pwd_desc->mask,\r
+ pwd_desc->enable);\r
+ } else {\r
+ aw_dev->ops.aw_reg_write_bits(aw_dev, pwd_desc->reg,\r
+ pwd_desc->mask,\r
+ pwd_desc->disable);\r
+ }\r
+ aw_dev_info(aw_dev->dev, "done");\r
+}\r
+\r
+static void aw_dev_amppd(struct aw_device *aw_dev, bool amppd)\r
+{\r
+ struct aw_amppd_desc *amppd_desc = &aw_dev->amppd_desc;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+ if (amppd) {\r
+ aw_dev->ops.aw_reg_write_bits(aw_dev, amppd_desc->reg,\r
+ amppd_desc->mask,\r
+ amppd_desc->enable);\r
+ } else {\r
+ aw_dev->ops.aw_reg_write_bits(aw_dev, amppd_desc->reg,\r
+ amppd_desc->mask,\r
+ amppd_desc->disable);\r
+ }\r
+ aw_dev_info(aw_dev->dev, "done");\r
+}\r
+\r
+static int aw_dev_set_hmute(struct aw_device *aw_dev, uint32_t mute)\r
+{\r
+ int ret = -1;\r
+ struct aw_mute_desc *mute_desc = &aw_dev->mute_desc;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+\r
+ if (mute == AW_DEV_HMUTE_ENABLE) {\r
+ aw_dev_fade_out(aw_dev);\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, mute_desc->reg,\r
+ mute_desc->mask, mute_desc->enable);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write mute enable failed");\r
+ return ret;\r
+ }\r
+ } else if (mute == AW_DEV_HMUTE_DISABLE) {\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, mute_desc->reg,\r
+ mute_desc->mask, mute_desc->disable);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write mute disable failed");\r
+ return ret;\r
+ }\r
+ aw_dev_fade_in(aw_dev);\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported mute state: %d", mute);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_dev_info(aw_dev->dev, "done");\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_get_hmute(struct aw_device *aw_dev, uint32_t *status)\r
+{\r
+ uint16_t reg_val = 0;\r
+ int ret = -1;\r
+ struct aw_mute_desc *desc = &aw_dev->mute_desc;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, desc->reg, ®_val);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+\r
+ if (reg_val & (~desc->mask)) {\r
+ *status = AW_DEV_HMUTE_ENABLE;\r
+ } else {\r
+ *status = AW_DEV_HMUTE_DISABLE;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_get_icalk(struct aw_device * aw_dev, int16_t *icalk)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val = 0;\r
+ uint16_t icalkh_val = 0;\r
+ uint16_t icalkl_val = 0;\r
+ uint16_t icalk_val = 0;\r
+ struct aw_efuse_check_desc *efuse_check_desc = &aw_dev->efuse_check_desc;\r
+ struct aw_vcalb_desc *vcalb_desc = &aw_dev->vcalb_desc;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, vcalb_desc->icalkh_reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read icalkh_reg failed");\r
+ return ret;\r
+ }\r
+ icalkh_val = reg_val & (~vcalb_desc->icalkh_reg_mask);\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, vcalb_desc->icalkl_reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read icalkl_reg failed");\r
+ return ret;\r
+ }\r
+ icalkl_val = reg_val & (~vcalb_desc->icalkl_reg_mask);\r
+\r
+ if (efuse_check_desc->check_val == AW_EF_AND_CHECK) {\r
+ icalk_val = (icalkh_val >> vcalb_desc->icalkh_shift) & (icalkl_val >> vcalb_desc->icalkl_shift);\r
+ } else if (efuse_check_desc->check_val == AW_EF_OR_CHECK) {\r
+ icalk_val = (icalkh_val >> vcalb_desc->icalkh_shift) | (icalkl_val >> vcalb_desc->icalkl_shift);\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported check type:%d", efuse_check_desc->check_val);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (icalk_val & (~vcalb_desc->icalk_sign_mask)) {\r
+ icalk_val = icalk_val | vcalb_desc->icalk_neg_mask;\r
+ }\r
+ *icalk = (int16_t)icalk_val;\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_get_vcalk(struct aw_device * aw_dev, int16_t *vcalk)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val = 0;\r
+ uint16_t vcalkh_val = 0;\r
+ uint16_t vcalkl_val = 0;\r
+ uint16_t vcalk_val = 0;\r
+ struct aw_efuse_check_desc *efuse_check_desc = &aw_dev->efuse_check_desc;\r
+ struct aw_vcalb_desc *vcalb_desc = &aw_dev->vcalb_desc;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, vcalb_desc->vcalkh_reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read vcalkh_reg failed");\r
+ return ret;\r
+ }\r
+ vcalkh_val = reg_val & (~vcalb_desc->vcalkh_reg_mask);\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, vcalb_desc->vcalkl_reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read vcalkl_reg failed");\r
+ return ret;\r
+ }\r
+ vcalkl_val = reg_val & (~vcalb_desc->vcalkl_reg_mask);\r
+\r
+ if (efuse_check_desc->check_val == AW_EF_AND_CHECK) {\r
+ vcalk_val = (vcalkh_val >> vcalb_desc->vcalkh_shift) & (vcalkl_val >> vcalb_desc->vcalkl_shift);\r
+ } else if (efuse_check_desc->check_val == AW_EF_OR_CHECK) {\r
+ vcalk_val = (vcalkh_val >> vcalb_desc->vcalkh_shift) | (vcalkl_val >> vcalb_desc->vcalkl_shift);\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported check type:%d", efuse_check_desc->check_val);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (vcalk_val & (~vcalb_desc->vcalk_sign_mask)) {\r
+ vcalk_val = vcalk_val | vcalb_desc->vcalk_neg_mask;\r
+ }\r
+ *vcalk = (int16_t)vcalk_val;\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_get_internal_vcalk(struct aw_device *aw_dev, int16_t *vcalk)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val = 0;\r
+ uint16_t vcalkh_val = 0;\r
+ uint16_t vcalkl_val = 0;\r
+ uint16_t vcalk_val = 0;\r
+ struct aw_efuse_check_desc *efuse_check_desc = &aw_dev->efuse_check_desc;\r
+ struct aw_vcalb_desc *vcalb_desc = &aw_dev->vcalb_desc;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, vcalb_desc->vcalkh_dac_reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read vcalkh_dac_reg failed");\r
+ return ret;\r
+ }\r
+ vcalkh_val = reg_val & (~vcalb_desc->vcalkh_dac_reg_mask);\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, vcalb_desc->vcalkl_dac_reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read vcalkl_dac_reg failed");\r
+ return ret;\r
+ }\r
+ vcalkl_val = reg_val & (~vcalb_desc->vcalkl_dac_reg_mask);\r
+\r
+ if (efuse_check_desc->check_val == AW_EF_AND_CHECK) {\r
+ vcalk_val = (vcalkh_val >> vcalb_desc->vcalkh_dac_shift) & (vcalkl_val >> vcalb_desc->vcalkl_dac_shift);\r
+ } else if (efuse_check_desc->check_val == AW_EF_OR_CHECK) {\r
+ vcalk_val = (vcalkh_val >> vcalb_desc->vcalkh_dac_shift) | (vcalkl_val >> vcalb_desc->vcalkl_dac_shift);\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported check type:%d", efuse_check_desc->check_val);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (vcalk_val & (~vcalb_desc->vcalk_dac_sign_mask)) {\r
+ vcalk_val = vcalk_val | vcalb_desc->vcalk_dac_neg_mask;\r
+ }\r
+ *vcalk = (int16_t)vcalk_val;\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_vsense_select(struct aw_device *aw_dev, int *vsense_select)\r
+{\r
+ int ret = -1;\r
+ struct aw_vsense_desc *desc = &aw_dev->vsense_desc;\r
+ uint16_t vsense_reg_val;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, desc->vcalb_vsense_reg, &vsense_reg_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read vsense_reg_val failed");\r
+ return ret;\r
+ }\r
+ aw_dev_dbg(aw_dev->dev, "vsense_reg = 0x%x", vsense_reg_val);\r
+\r
+ if (vsense_reg_val & (~desc->vcalk_vdsel_mask)) {\r
+ *vsense_select = AW_DEV_VDSEL_VSENSE;\r
+ aw_dev_info(aw_dev->dev, "vsense external");\r
+ return 0;\r
+ }\r
+\r
+ *vsense_select = AW_DEV_VDSEL_DAC;\r
+ aw_dev_info(aw_dev->dev, "vsense internal");\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_set_vcalb_to_hw(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val = 0;\r
+ int16_t icalk = 0;\r
+ int16_t vcalk = 0;\r
+ int32_t ical_k = 0;\r
+ int32_t vcal_k = 0;\r
+ int32_t vcalb = 0;\r
+ int vsense_select = -1;\r
+ struct aw_vcalb_desc *vcalb_desc = &aw_dev->vcalb_desc;\r
+\r
+ if (aw_dev->vsense_desc.vcalb_vsense_reg) {\r
+ ret = aw_dev_vsense_select(aw_dev, &vsense_select);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+ aw_dev_dbg(aw_dev->dev, "vsense_select = %d", vsense_select);\r
+ } else {\r
+ vsense_select = aw_dev->vsense_desc.vcalb_vsense_default;\r
+ }\r
+\r
+ ret = aw_dev_get_icalk(aw_dev, &icalk);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get icalk failed");\r
+ return ret;\r
+ }\r
+ aw_dev_info(aw_dev->dev, "icalk = %d", icalk);\r
+\r
+ ical_k = icalk * vcalb_desc->icalk_value_factor + vcalb_desc->cabl_base_value;\r
+\r
+ if (vsense_select == AW_DEV_VDSEL_VSENSE) {\r
+ ret = aw_dev_get_vcalk(aw_dev, &vcalk);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+ vcal_k = vcalk * vcalb_desc->vcalk_value_factor + vcalb_desc->cabl_base_value;\r
+ vcalb = vcalb_desc->vcalb_accuracy *\r
+ vcalb_desc->vscal_factor / vcalb_desc->iscal_factor * ical_k / vcal_k * vcalb_desc->init_value;\r
+\r
+ aw_dev_info(aw_dev->dev, "icalk=%d, vcalk=%d", icalk, vcalk);\r
+ } else if (vsense_select == AW_DEV_VDSEL_DAC) {\r
+ ret = aw_dev_get_internal_vcalk(aw_dev, &vcalk);\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+ vcal_k = vcalk * vcalb_desc->vcalk_dac_value_factor + vcalb_desc->cabl_base_value;\r
+ vcalb = vcalb_desc->vcalb_accuracy *\r
+ vcalb_desc->vscal_dac_factor / vcalb_desc->iscal_dac_factor * ical_k / vcal_k * vcalb_desc->init_value;\r
+\r
+ aw_dev_info(aw_dev->dev, "icalk=%d, vcalk=%d", icalk, vcalk);\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupport vsense status");\r
+ return -EINVAL;\r
+ }\r
+\r
+ vcalb = vcalb >> vcalb_desc->vcalb_adj_shift;\r
+ reg_val = (uint32_t)vcalb;\r
+\r
+ aw_dev_info(aw_dev->dev, "vcalb = %d, vcalb_adj = %d",\r
+ reg_val, vcalb_desc->init_value >> vcalb_desc->vcalb_adj_shift);\r
+\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev, vcalb_desc->vcalb_reg, reg_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write vcalb_reg failed");\r
+ return ret;\r
+ }\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_set_vcalb(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+\r
+ if (aw_dev->ops.aw_set_vcalb) {\r
+ ret = aw_dev->ops.aw_set_vcalb(aw_dev);\r
+ } else {\r
+ ret = aw_dev_set_vcalb_to_hw(aw_dev);\r
+ }\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "set_vcalb failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_get_int_status(struct aw_device *aw_dev, uint32_t *int_val)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val = 0;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, aw_dev->int_desc.st_reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read interrupt reg fail, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ *int_val = reg_val;\r
+ aw_dev_dbg(aw_dev->dev, "read interrupt reg = 0x%04x", reg_val);\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_clear_int_status(struct aw_device *aw_dev)\r
+{\r
+ uint32_t reg_val = 0;\r
+\r
+ /*read int status and clear*/\r
+ aw_dev_get_int_status(aw_dev, ®_val);\r
+ /*make sure int status is clear*/\r
+ aw_dev_get_int_status(aw_dev, ®_val);\r
+ aw_dev_info(aw_dev->dev, "done");\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_get_sysst_value(struct aw_device *aw_dev, uint32_t *value)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val = 0;\r
+ struct aw_sysst_desc *desc = &aw_dev->sysst_desc;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, desc->reg, ®_val);\r
+ if(ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read sysst failed");\r
+ return ret;\r
+ }\r
+\r
+ *value = reg_val;\r
+\r
+ return 0;\r
+}\r
+\r
+static bool aw_dev_get_iis_status(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ bool status = false;\r
+ uint16_t reg_val = 0;\r
+ struct aw_sysst_desc *desc = &aw_dev->sysst_desc;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, desc->reg, ®_val);\r
+ if(ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read pll failed");\r
+ return false;\r
+ }\r
+\r
+ if ((reg_val & desc->pll_check) == desc->pll_check) {\r
+ status = true;\r
+ } else {\r
+ status = false;\r
+ aw_dev_err(aw_dev->dev, "check pll lock fail,reg_val:0x%04x", reg_val);\r
+ }\r
+\r
+ return status;\r
+}\r
+\r
+static int aw_dev_mode1_pll_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ uint16_t i = 0;\r
+\r
+ for (i = 0; i < AW_DEV_SYSST_CHECK_MAX; i++) {\r
+ if (!(aw_dev_get_iis_status(aw_dev))) {\r
+ aw_dev_err(aw_dev->dev, "mode1 iis signal check error");\r
+ AW_MS_DELAY(AW_2_MS);\r
+ } else {\r
+ return 0;\r
+ }\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+static int aw_dev_mode2_pll_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ uint16_t i = 0;\r
+ uint16_t reg_val = 0;\r
+ struct aw_cco_mux_desc *cco_mux_desc = &aw_dev->cco_mux_desc;\r
+\r
+ aw_dev->ops.aw_reg_read(aw_dev, cco_mux_desc->reg, ®_val);\r
+ reg_val &= (~cco_mux_desc->mask);\r
+ if (reg_val == cco_mux_desc->divider) {\r
+ aw_dev_dbg(aw_dev->dev, "CCO_MUX is already divider");\r
+ return ret;\r
+ }\r
+\r
+ /* change mode2 */\r
+ aw_dev->ops.aw_reg_write_bits(aw_dev, cco_mux_desc->reg,\r
+ cco_mux_desc->mask, cco_mux_desc->divider);\r
+\r
+ for (i = 0; i < AW_DEV_SYSST_CHECK_MAX; i++) {\r
+ if (!(aw_dev_get_iis_status(aw_dev))) {\r
+ aw_dev_err(aw_dev->dev, "mode2 iis signal check error");\r
+ AW_MS_DELAY(AW_2_MS);\r
+ ret = -EINVAL;\r
+ } else {\r
+ ret = 0;\r
+ break;\r
+ }\r
+ }\r
+\r
+ /* change mode1*/\r
+ aw_dev->ops.aw_reg_write_bits(aw_dev, cco_mux_desc->reg,\r
+ cco_mux_desc->mask, cco_mux_desc->bypass);\r
+\r
+ if (ret == 0) {\r
+ AW_MS_DELAY(AW_2_MS);\r
+ for (i = 0; i < AW_DEV_SYSST_CHECK_MAX; i++) {\r
+ ret = aw_dev_mode1_pll_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "mode2 switch to mode1, iis signal check error");\r
+ AW_MS_DELAY(AW_2_MS);\r
+ } else {\r
+ break;\r
+ }\r
+ }\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+static int aw_dev_syspll_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+\r
+ ret = aw_dev_mode1_pll_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_info(aw_dev->dev, "mode1 check iis failed try switch to mode2 check");\r
+ ret = aw_dev_mode2_pll_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "mode2 check iis failed");\r
+ return ret;\r
+ }\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+int aw883xx_dev_sysst_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ unsigned char i = 0;\r
+ uint16_t reg_val = 0;\r
+ unsigned int check_value = 0;\r
+ struct aw_sysst_desc *desc = &aw_dev->sysst_desc;\r
+ struct aw_noise_gate_en *noise_gate_desc = &aw_dev->noise_gate_en;\r
+\r
+ check_value = desc->st_check;\r
+\r
+ if (noise_gate_desc->reg != AW_REG_NONE) {\r
+ aw_dev->ops.aw_reg_read(aw_dev, noise_gate_desc->reg, ®_val);\r
+ if (reg_val & (~noise_gate_desc->noise_gate_mask)) {\r
+ check_value = desc->st_check;\r
+ } else {\r
+ check_value = desc->st_sws_check;\r
+ }\r
+ }\r
+\r
+ for (i = 0; i < AW_DEV_SYSST_CHECK_MAX; i++) {\r
+ aw_dev->ops.aw_reg_read(aw_dev, desc->reg, ®_val);\r
+ if (((reg_val & (~desc->st_mask)) & check_value) == check_value) {\r
+ ret = 0;\r
+ break;\r
+ } else {\r
+ aw_dev_dbg(aw_dev->dev, "check fail, cnt=%d, reg_val=0x%04x",\r
+ i, reg_val);\r
+ AW_MS_DELAY(AW_2_MS);\r
+ }\r
+ }\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "check fail");\r
+ }\r
+ return ret;\r
+}\r
+\r
+static int aw_dev_get_monitor_sysint_st(struct aw_device *aw_dev)\r
+{\r
+ int ret = 0;\r
+ struct aw_int_desc *desc = &aw_dev->int_desc;\r
+\r
+ if ((desc->intst_mask) & (desc->sysint_st)) {\r
+ aw_dev_err(aw_dev->dev,\r
+ "monitor check fail:0x%04x", desc->sysint_st);\r
+ ret = -EINVAL;\r
+ }\r
+ desc->sysint_st = 0;\r
+\r
+ return ret;\r
+}\r
+\r
+static int aw_dev_sysint_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = 0;\r
+ uint32_t reg_val = 0;\r
+ struct aw_int_desc *desc = &aw_dev->int_desc;\r
+\r
+ ret = aw_dev_get_int_status(aw_dev, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get int status fail ret:%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ if (reg_val & (desc->intst_mask)) {\r
+ aw_dev_err(aw_dev->dev, "int check fail:0x%04x", reg_val);\r
+ ret = -EINVAL;\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+static void aw_dev_get_cur_mode_st(struct aw_device *aw_dev)\r
+{\r
+ uint16_t reg_val;\r
+ struct aw_profctrl_desc *profctrl_desc = &aw_dev->profctrl_desc;\r
+\r
+ aw_dev->ops.aw_reg_read(aw_dev, aw_dev->pwd_desc.reg, ®_val);\r
+\r
+ if ((reg_val & (~profctrl_desc->mask)) == profctrl_desc->rcv_mode_val) {\r
+ profctrl_desc->cur_mode = AW_RCV_MODE;\r
+ } else {\r
+ profctrl_desc->cur_mode = AW_NOT_RCV_MODE;\r
+ }\r
+}\r
+\r
+static int aw_dev_set_intmask(struct aw_device *aw_dev, uint32_t flag)\r
+{\r
+ int ret = -1;\r
+ struct aw_int_desc *desc = &aw_dev->int_desc;\r
+\r
+ if (flag == AW_DEV_UNMASK_INT_VAL) {\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev, desc->mask_reg,\r
+ desc->int_mask);\r
+ } else if (flag == AW_DEV_MASK_INT_VAL) {\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev, desc->mask_reg,\r
+ desc->mask_default);\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported flag : %d", flag);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_dev_info(aw_dev->dev, "done");\r
+ return ret;\r
+}\r
+\r
+static int aw_dev_dsp_enable(struct aw_device *aw_dev, uint32_t dsp)\r
+{\r
+ int ret = -1;\r
+ struct aw_dsp_en_desc *desc = &aw_dev->dsp_en_desc;\r
+\r
+ if (dsp == AW_DEV_DSP_WORK) {\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, desc->reg,\r
+ desc->mask, desc->enable);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "enable dsp failed");\r
+ return ret;\r
+ }\r
+ } else if (dsp == AW_DEV_DSP_BYPASS) {\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, desc->reg,\r
+ desc->mask, desc->disable);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "disable dsp failed");\r
+ return ret;\r
+ }\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported flag : %d", dsp);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_dev_info(aw_dev->dev, "done");\r
+ return 0;\r
+}\r
+\r
+static void aw_dev_memclk_select(struct aw_device *aw_dev, unsigned char flag)\r
+{\r
+ struct aw_memclk_desc *desc = &aw_dev->memclk_desc;\r
+ int ret = -1;\r
+\r
+ if (flag == AW_DEV_MEMCLK_PLL) {\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, desc->reg,\r
+ desc->mask, desc->mcu_hclk);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "memclk select pll failed");\r
+ }\r
+ } else if (flag == AW_DEV_MEMCLK_OSC) {\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, desc->reg,\r
+ desc->mask, desc->osc_clk);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "memclk select OSC failed");\r
+ }\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unknown memclk config, flag=0x%x", flag);\r
+ }\r
+\r
+ aw_dev_info(aw_dev->dev, "done");\r
+}\r
+\r
+static int aw_dev_get_dsp_status(struct aw_device *aw_dev)\r
+{\r
+ int i = -1;\r
+ int ret = -1;\r
+ uint16_t reg_val = 0;\r
+ struct aw_watch_dog_desc *desc = &aw_dev->watch_dog_desc;\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ for (i = 0; i < AW_DEV_DSP_CHECK_MAX; i++) {\r
+ aw_dev->ops.aw_reg_read(aw_dev, desc->reg, ®_val);\r
+ if (reg_val & (~desc->mask)) {\r
+ return 0;\r
+ }\r
+ AW_MS_DELAY(AW_1_MS);\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+static bool aw_dev_get_pll_wdt_status(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+\r
+ ret = aw_dev_syspll_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "pll abnormal");\r
+ return false;\r
+ }\r
+\r
+ ret = aw_dev_get_dsp_status(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp not work");\r
+ return false;\r
+ }\r
+ return true;\r
+}\r
+\r
+static int aw_dev_get_cali_f0_delay(struct aw_device *aw_dev)\r
+{\r
+ struct aw_cali_delay_desc *desc = &aw_dev->cali_desc.cali_delay_desc;\r
+ uint32_t cali_delay = 0;\r
+ int ret = -1;\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev,\r
+ desc->dsp_reg, &cali_delay, desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read cali delay failed, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ desc->delay = AW_CALI_DELAY_CACL(cali_delay);\r
+ aw_dev_info(aw_dev->dev, "read cali delay: %d ms", desc->delay);\r
+\r
+ return 0;\r
+}\r
+\r
+/******************************************************\r
+ *\r
+ * aw_dev update cfg\r
+ *\r
+ ******************************************************/\r
+\r
+static int aw_dev_get_crc_flag(struct aw_device *aw_dev)\r
+{\r
+ return aw_dev->dsp_crc_st;\r
+\r
+}\r
+\r
+static int aw_dev_set_crc_flag(struct aw_device *aw_dev, uint32_t status)\r
+{\r
+ aw_dev->dsp_crc_st = status;\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_cfg_crc_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val;\r
+ uint16_t check_val;\r
+ uint16_t cfg_len_val;\r
+ struct aw_crc_check_desc *crc_check_desc = &aw_dev->crc_check_desc;\r
+\r
+ /*calculate cfg_end_addr*/\r
+ cfg_len_val = ((aw_dev->dsp_cfg_len / AW_FW_ADDR_LEN) - 1) +\r
+ crc_check_desc->crc_cfg_base_addr;\r
+ aw_dev_info(aw_dev->dev, "cfg_end_addr 0x%x", cfg_len_val);\r
+\r
+ /*write cfg_end_addr to crc_end_addr*/\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, crc_check_desc->crc_ctrl_reg,\r
+ crc_check_desc->crc_end_addr_mask, cfg_len_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write cfg_len_val failed");\r
+ return ret;\r
+ }\r
+\r
+ /*enable cfg crc check*/\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, crc_check_desc->crc_ctrl_reg,\r
+ crc_check_desc->crc_cfg_check_en_mask, crc_check_desc->crc_cfgcheck_enable);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write crc_check_enable failed");\r
+ return ret;\r
+ }\r
+\r
+ AW_MS_DELAY(AW_1_MS);\r
+ /*read crc check result*/\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, crc_check_desc->crc_check_reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read crc_check_reg failed");\r
+ return ret;\r
+ }\r
+\r
+ check_val = (reg_val & (~crc_check_desc->crc_check_mask)) >> crc_check_desc->crc_check_bits_shift;\r
+\r
+ /*disable cfg crc check*/\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, crc_check_desc->crc_ctrl_reg,\r
+ crc_check_desc->crc_cfg_check_en_mask, crc_check_desc->crc_cfgcheck_disable);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write crc_check_disable failed");\r
+ return ret;\r
+ }\r
+\r
+ /*compare crc check result and pass value*/\r
+ if (check_val != crc_check_desc->crc_check_pass) {\r
+ aw_dev_err(aw_dev->dev, "crc_check failed,check val %x != %x", check_val,\r
+ crc_check_desc->crc_check_pass);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_fw_crc_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val;\r
+ uint16_t check_val;\r
+ uint16_t fw_len_val;\r
+ struct aw_crc_check_desc *crc_check_desc = &aw_dev->crc_check_desc;\r
+\r
+ /*calculate fw_end_addr*/\r
+ fw_len_val = ((aw_dev->dsp_fw_len / AW_FW_ADDR_LEN) - 1) +\r
+ crc_check_desc->crc_fw_base_addr;\r
+\r
+ aw_dev_info(aw_dev->dev, "fw_end_addr 0x%x", fw_len_val);\r
+\r
+ /*write fw_end_addr to crc_end_addr*/\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, crc_check_desc->crc_ctrl_reg,\r
+ crc_check_desc->crc_end_addr_mask, fw_len_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write fw_len_val failed");\r
+ return ret;\r
+ }\r
+ /*enable fw crc check*/\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, crc_check_desc->crc_ctrl_reg,\r
+ crc_check_desc->crc_fw_check_en_mask, crc_check_desc->crc_fwcheck_enable);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write crc_check_enable failed");\r
+ return ret;\r
+ }\r
+\r
+ AW_MS_DELAY(AW_2_MS);\r
+ /*read crc check result*/\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, crc_check_desc->crc_check_reg, ®_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read crc_check_reg failed");\r
+ return ret;\r
+ }\r
+\r
+ check_val = (reg_val & (~crc_check_desc->crc_check_mask)) >> crc_check_desc->crc_check_bits_shift;\r
+\r
+ /*disable fw crc check*/\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, crc_check_desc->crc_ctrl_reg,\r
+ crc_check_desc->crc_fw_check_en_mask, crc_check_desc->crc_fwcheck_disable);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write crc_check_disable failed");\r
+ return ret;\r
+ }\r
+\r
+ /*compare crc check result and pass value*/\r
+ if (check_val != crc_check_desc->crc_check_pass) {\r
+ aw_dev_err(aw_dev->dev, "crc_check failed,check val %x != %x", check_val,\r
+ crc_check_desc->crc_check_pass);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_hw_crc_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ struct aw_crc_check_desc *crc_check_desc = &aw_dev->crc_check_desc;\r
+\r
+ /*force RAM clock on*/\r
+ ret = aw_dev->ops.aw_reg_write_bits(aw_dev, crc_check_desc->ram_clk_reg,\r
+ crc_check_desc->ram_clk_mask, crc_check_desc->ram_clk_on);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write ram_clk_on failed");\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev_fw_crc_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, " fw_crc_check failed");\r
+ goto ram_clk_off;\r
+ }\r
+\r
+ ret = aw_dev_cfg_crc_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, " cfg_crc_check failed");\r
+ goto ram_clk_off;\r
+ }\r
+\r
+ /*write bin value to crc reg when fw & cfg crc check pass*/\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev, crc_check_desc->crc_ctrl_reg, crc_check_desc->crc_init_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write crc_init_val failed");\r
+ goto ram_clk_off;\r
+ }\r
+\r
+ /*disable force RAM clock*/\r
+ aw_dev->ops.aw_reg_write_bits(aw_dev, crc_check_desc->ram_clk_reg,\r
+ crc_check_desc->ram_clk_mask, crc_check_desc->ram_clk_off);\r
+\r
+ return 0;\r
+ram_clk_off:\r
+ aw_dev->ops.aw_reg_write_bits(aw_dev, crc_check_desc->ram_clk_reg,\r
+ crc_check_desc->ram_clk_mask, crc_check_desc->ram_clk_off);\r
+ return ret;\r
+}\r
+\r
+static int aw_dev_crc_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+\r
+ if (aw_dev_get_crc_flag(aw_dev) == AW_DSP_CRC_BYPASS) {\r
+ aw_dev_info(aw_dev->dev, "CRC Bypass in driver debug process");\r
+ return 0;\r
+ }\r
+ if (aw_dev->crc_type == AW_SW_CRC_CHECK) {\r
+ if (aw_dev->ops.aw_sw_crc_check) {\r
+ ret = aw_dev->ops.aw_sw_crc_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp crc check failed");\r
+ return ret;\r
+ }\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "sw_crc_check ops is NULL");\r
+ return ret;\r
+ }\r
+ } else if (aw_dev->crc_type == AW_HW_CRC_CHECK) {\r
+ ret = aw_dev_hw_crc_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "hw_crc_check failed");\r
+ return ret;\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+#ifdef AW_MONITOR\r
+static void aw_dev_init_vmax_update(struct aw_device *aw_dev, backup_sec_t flag)\r
+{\r
+ if (flag == AW_RECOVERY_SEC_DATA) {\r
+ aw883xx_monitor_update_st(aw_dev, AW_SET_INIT_VMAX);\r
+ } else if (flag == AW_RECORD_SEC_DATA) {\r
+ aw883xx_monitor_update_st(aw_dev, AW_GET_INIT_VMAX);\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported type:%d", flag);\r
+ return;\r
+ }\r
+}\r
+#endif\r
+\r
+static int aw_dev_init_vcalb_update(struct aw_device *aw_dev, backup_sec_t flag)\r
+{\r
+ int ret = -1;\r
+ struct aw_vcalb_desc *vcalb_desc = &aw_dev->vcalb_desc;\r
+\r
+ if (aw_dev->ops.aw_init_vcalb_update) {\r
+ ret = aw_dev->ops.aw_init_vcalb_update(aw_dev, flag);\r
+ if (ret < 0)\r
+ aw_dev_err(aw_dev->dev, "write vcalb_reg failed");\r
+ return ret;\r
+ }\r
+\r
+ if (flag == AW_RECOVERY_SEC_DATA) {\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev, vcalb_desc->vcalb_reg, vcalb_desc->init_value);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write vcalb_reg failed");\r
+ return ret;\r
+ }\r
+ } else if (flag == AW_RECORD_SEC_DATA) {\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, vcalb_desc->vcalb_reg, &vcalb_desc->init_value);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write vcalb_reg failed");\r
+ return ret;\r
+ }\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported type:%d", flag);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_get_firmware_ver(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ struct aw_fw_ver_desc *fw_ver_desc = &aw_dev->fw_ver_desc;\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev,\r
+ fw_ver_desc->version_reg, &aw_dev->fw_ver, fw_ver_desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read firmware version failed, ret=%d", ret);\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+/*pwd enable update reg*/\r
+\r
+static int aw_dev_reg_container_update(struct aw_device *aw_dev,\r
+ const uint8_t *data, uint32_t len)\r
+{\r
+ int i = 0;\r
+ int ret = -1;\r
+ uint8_t reg_addr = 0;\r
+ uint16_t reg_val = 0;\r
+ uint16_t read_vol = 0;\r
+ struct aw_int_desc *int_desc = &aw_dev->int_desc;\r
+ struct aw_volume_desc *vol_desc = &aw_dev->volume_desc;\r
+ uint16_t *reg_data = NULL;\r
+ int data_len;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+ reg_data = (uint16_t *)data;\r
+ data_len = len >> 1;\r
+\r
+ if (data_len % 2 != 0) {\r
+ aw_dev_err(aw_dev->dev, "data len:%d unsupported",\r
+ data_len);\r
+ return -EINVAL;\r
+ }\r
+\r
+ for (i = 0; i < data_len; i += 2) {\r
+ reg_addr = reg_data[i];\r
+ reg_val = reg_data[i + 1];\r
+ aw_dev_dbg(aw_dev->dev, "reg = 0x%02x, val = 0x%04x",\r
+ reg_addr, reg_val);\r
+ if (reg_addr == int_desc->mask_reg) {\r
+ int_desc->int_mask = reg_val;\r
+ reg_val = int_desc->mask_default;\r
+ }\r
+ if (reg_addr == aw_dev->mute_desc.reg) {\r
+ reg_val &= aw_dev->mute_desc.mask;\r
+ reg_val |= aw_dev->mute_desc.enable;\r
+ }\r
+\r
+ if (reg_addr == aw_dev->pwd_desc.reg) {\r
+ reg_val &= aw_dev->pwd_desc.mask;\r
+ reg_val |= aw_dev->pwd_desc.enable;\r
+ }\r
+\r
+ if (reg_addr == aw_dev->txen_desc.reg) {\r
+ /*get bin value*/\r
+ aw_dev->txen_st = reg_val & (~aw_dev->txen_desc.mask);\r
+ aw_dev_dbg(aw_dev->dev, "txen_st=0x%04x", aw_dev->txen_st);\r
+\r
+ reg_val &= aw_dev->txen_desc.mask;\r
+ reg_val |= aw_dev->txen_desc.disable;\r
+ }\r
+\r
+ if (reg_addr == aw_dev->dsp_crc_desc.ctl_reg) {\r
+ reg_val &= aw_dev->dsp_crc_desc.ctl_mask;\r
+ }\r
+\r
+ if (reg_addr == aw_dev->volume_desc.reg) {\r
+ read_vol = (reg_val & (~aw_dev->volume_desc.mask)) >>\r
+ aw_dev->volume_desc.shift;\r
+ aw_dev->volume_desc.init_volume =\r
+ aw_dev->ops.aw_reg_val_to_db(read_vol);\r
+ }\r
+\r
+ if (reg_addr == aw_dev->efuse_check_desc.reg) {\r
+ if ((reg_val & (~aw_dev->efuse_check_desc.mask)) ==\r
+ aw_dev->efuse_check_desc.or_val)\r
+ aw_dev->efuse_check_desc.check_val = AW_EF_OR_CHECK;\r
+ else\r
+ aw_dev->efuse_check_desc.check_val = AW_EF_AND_CHECK;\r
+ }\r
+\r
+ if (reg_addr == aw_dev->crc_check_desc.crc_ctrl_reg)\r
+ aw_dev->crc_check_desc.crc_init_val = reg_val;\r
+\r
+ if (reg_addr == aw_dev->vcalb_desc.vcalb_reg) {\r
+ aw_dev->vcalb_desc.init_value = reg_val;\r
+ continue;\r
+ }\r
+\r
+ if (reg_addr == aw_dev->cali_desc.hw_cali_re_desc.hbits_reg) {\r
+ aw_dev->cali_desc.hw_cali_re_desc.re_hbits = reg_val;\r
+ continue;\r
+ }\r
+\r
+ if (reg_addr == aw_dev->cali_desc.hw_cali_re_desc.lbits_reg) {\r
+ aw_dev->cali_desc.hw_cali_re_desc.re_lbits = reg_val;\r
+ continue;\r
+ }\r
+\r
+ if (reg_addr == aw_dev->dsp_en_desc.reg) {\r
+ if (reg_val & (~aw_dev->dsp_en_desc.mask))\r
+ aw_dev->dsp_cfg = AW_DEV_DSP_BYPASS;\r
+ else\r
+ aw_dev->dsp_cfg = AW_DEV_DSP_WORK;\r
+ reg_val &= aw_dev->dsp_en_desc.mask;\r
+ reg_val |= aw_dev->dsp_en_desc.disable;\r
+ }\r
+\r
+ if(reg_addr == aw_dev->dither_desc.reg) {\r
+ aw_dev->dither_st = reg_val & (~aw_dev->dither_desc.mask);\r
+ aw_dev_info(aw_dev->dev, "dither_st=0x%04x", aw_dev->dither_st);\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev, reg_addr, reg_val);\r
+ if (ret < 0) {\r
+ break;\r
+ }\r
+ }\r
+\r
+ aw_dev_pwd(aw_dev, false);\r
+ AW_MS_DELAY(AW_1_MS);;\r
+\r
+ aw_dev_get_cur_mode_st(aw_dev);\r
+\r
+ if ((strncmp(aw_dev->cur_prof_name, aw_dev->set_prof_name, AW_PROF_NAME_MAX) != 0)) {\r
+ /*clear control volume when PA change profile*/\r
+ vol_desc->ctl_volume = 0;\r
+ } else {\r
+ /*keep control volume when PA start with sync mode*/\r
+ aw_dev_set_volume(aw_dev, vol_desc->ctl_volume);\r
+ }\r
+\r
+ /*keep min volume*/\r
+ if (aw_dev->fade_en) {\r
+ aw_dev_set_volume(aw_dev, vol_desc->mute_volume);\r
+ }\r
+\r
+#ifdef AW_MONITOR\r
+ aw883xx_monitor_update_st(aw_dev, AW_HW_MONITOR_ST);\r
+#endif\r
+\r
+ aw_dev_dbg(aw_dev->dev, "exit");\r
+\r
+ return ret;\r
+}\r
+\r
+\r
+static int aw_dev_reg_update(struct aw_device *aw_dev)\r
+{\r
+ struct aw_sec_data_desc *reg_data = NULL;\r
+ reg_data = aw883xx_dev_get_prof_data_byname(aw_dev, aw_dev->set_prof_name, AW_DATA_TYPE_REG);\r
+\r
+ if (reg_data == NULL){\r
+ aw_dev_err(aw_dev->dev, "reg data is null");\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_dev_reg_container_update(aw_dev, reg_data->data, reg_data->len);\r
+\r
+ aw_dev_dbg(aw_dev->dev, "reg len:%d", reg_data->len);\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_dsp_container_update(struct aw_device *aw_dev,\r
+ const uint8_t *dsp_data, uint32_t len, uint16_t base)\r
+{\r
+ uint32_t i;\r
+ struct aw_dsp_mem_desc *dsp_mem_desc = &aw_dev->dsp_mem_desc;\r
+ uint8_t *data = NULL;\r
+ data = (uint8_t *)dsp_data;\r
+\r
+#ifdef AW_DSP_I2C_WRITES\r
+ uint32_t tmp_len = 0;\r
+#else\r
+ uint16_t reg_val = 0;\r
+#endif\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+ aw_mutex_lock();\r
+#ifdef AW_DSP_I2C_WRITES\r
+ /* i2c writes */\r
+ aw_dev->ops.aw_i2c_write(aw_dev, dsp_mem_desc->dsp_madd_reg, base);\r
+\r
+ for (i = 0; i < len; i += AW_MAX_RAM_WRITE_BYTE_SIZE) {\r
+ if ((len - i) < AW_MAX_RAM_WRITE_BYTE_SIZE) {\r
+ tmp_len = len - i;\r
+ } else {\r
+ tmp_len = AW_MAX_RAM_WRITE_BYTE_SIZE;\r
+ }\r
+ aw_dev->ops.aw_i2c_writes(aw_dev, dsp_mem_desc->dsp_mdat_reg,\r
+ &data[i], tmp_len);\r
+ }\r
+\r
+#else\r
+ /* i2c write */\r
+ aw_dev->ops.aw_i2c_write(aw_dev, dsp_mem_desc->dsp_madd_reg, base);\r
+\r
+ for (i = 0; i < len; i += 2) {\r
+ reg_val = (data[i] << 8) + data[i + 1];\r
+ aw_dev->ops.aw_i2c_write(aw_dev, dsp_mem_desc->dsp_mdat_reg,\r
+ reg_val);\r
+ }\r
+#endif\r
+\r
+ aw_mutex_unlock();\r
+ aw_dev_dbg(aw_dev->dev, "exit");\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_dsp_fw_update(struct aw_device *aw_dev)\r
+{\r
+ struct aw_dsp_mem_desc *dsp_mem_desc = &aw_dev->dsp_mem_desc;\r
+ struct aw_sec_data_desc *dsp_fw_data = NULL;\r
+\r
+ dsp_fw_data = aw883xx_dev_get_prof_data_byname(aw_dev, aw_dev->set_prof_name, AW_DATA_TYPE_DSP_FW);\r
+\r
+ if (dsp_fw_data == NULL) {\r
+ aw_dev_err(aw_dev->dev, "dsp firmware data is null");\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_dev_dsp_container_update(aw_dev, dsp_fw_data->data,\r
+ dsp_fw_data->len, dsp_mem_desc->dsp_fw_base_addr);\r
+ aw_dev->dsp_fw_len = dsp_fw_data->len;\r
+ aw_dev_dbg(aw_dev->dev, "dsp firmware len:%d", dsp_fw_data->len);\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_crc_realtime_get(struct aw_device *aw_dev, uint32_t *status)\r
+{\r
+ int ret = -1;\r
+ struct aw_crc_check_realtime_desc *desc =&aw_dev->crc_check_realtime_desc;\r
+ unsigned int crc_realtime_val = 0;\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev, desc->addr,\r
+ &crc_realtime_val, desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get crc_realtime failed");\r
+ return ret;\r
+ }\r
+\r
+ if (crc_realtime_val & (~desc->mask))\r
+ *status = aw_dev->crc_check_realtime_desc.enable;\r
+ else\r
+ *status = aw_dev->crc_check_realtime_desc.disable;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "get %d", *status);\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_crc_realtime_set(struct aw_device *aw_dev, uint32_t enable)\r
+{\r
+ int ret = -1;\r
+ struct aw_crc_check_realtime_desc *crc_desc =&aw_dev->crc_check_realtime_desc;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "set %d", enable);\r
+\r
+ if (enable) {\r
+ ret = aw_dev->ops.aw_dsp_write_bits(aw_dev, crc_desc->addr,\r
+ crc_desc->mask, crc_desc->enable, crc_desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "set enable failed");\r
+ return ret;\r
+ }\r
+ } else {\r
+ ret = aw_dev->ops.aw_dsp_write_bits(aw_dev, crc_desc->addr,\r
+ crc_desc->mask, crc_desc->disable, crc_desc->data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "set disable failed");\r
+ return ret;\r
+ }\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_crc_realtime_check(struct aw_device *aw_dev, uint32_t *status)\r
+{\r
+ int ret = -1;\r
+ uint16_t sysst_val;\r
+ uint32_t crc_check_val;\r
+ struct aw_sysst_desc *desc = &aw_dev->sysst_desc;\r
+ struct aw_int_desc *int_desc = &aw_dev->int_desc;\r
+ struct aw_crc_check_realtime_desc *crc_desc =&aw_dev->crc_check_realtime_desc;\r
+\r
+ if (aw_dev_get_crc_flag(aw_dev) == AW_DSP_CRC_BYPASS) {\r
+ int_desc->int_mask = int_desc->mask_default;\r
+ aw_dev_info(aw_dev->dev, "CRC Bypass in driver debug process");\r
+ return 0;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, desc->reg, &sysst_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read reg0x%x failed", desc->reg);\r
+ return ret;\r
+ }\r
+\r
+ ret = aw_dev->ops.aw_dsp_read(aw_dev, crc_desc->check_addr,\r
+ &crc_check_val, crc_desc->check_data_type);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get crc_check_val failed");\r
+ return ret;\r
+ }\r
+\r
+ if (((sysst_val & desc->dsp_mask) != desc->dsp_check) &&\r
+ (crc_check_val & (~crc_desc->check_mask)) ==\r
+ aw_dev->crc_check_realtime_desc.check_abnormal) {\r
+ *status = AW_REALTIME_CRC_CHECK_ABNORMAL;\r
+ } else {\r
+ *status = AW_REALTIME_CRC_CHECK_NORMAL;\r
+ }\r
+\r
+ aw_dev_dbg(aw_dev->dev, "check status %d", *status);\r
+\r
+ return 0;\r
+}\r
+\r
+static void aw_dev_backup_sec_record(struct aw_device *aw_dev)\r
+{\r
+ aw_dev_init_vcalb_update(aw_dev, AW_RECORD_SEC_DATA);\r
+ aw_dev_crc_realtime_get(aw_dev, &aw_dev->crc_check_realtime_desc.init_switch);\r
+#ifdef AW_CALIB\r
+ aw883xx_cali_init_re_update(aw_dev, AW_RECORD_SEC_DATA);\r
+#endif\r
+#ifdef AW_MONITOR\r
+ aw_dev_init_vmax_update(aw_dev, AW_RECORD_SEC_DATA);\r
+#endif\r
+}\r
+\r
+static void aw_dev_backup_sec_recovery(struct aw_device *aw_dev)\r
+{\r
+ aw_dev_init_vcalb_update(aw_dev, AW_RECOVERY_SEC_DATA);\r
+#ifdef AW_CALIB\r
+ aw883xx_cali_init_re_update(aw_dev, AW_RECOVERY_SEC_DATA);\r
+#endif\r
+#ifdef AW_MONITOR\r
+ aw_dev_init_vmax_update(aw_dev, AW_RECOVERY_SEC_DATA);\r
+#endif\r
+\r
+}\r
+\r
+static int aw_dev_dsp_cfg_update(struct aw_device *aw_dev)\r
+{\r
+ struct aw_dsp_mem_desc *dsp_mem_desc = &aw_dev->dsp_mem_desc;\r
+ struct aw_sec_data_desc *dsp_cfg_data = NULL;\r
+\r
+ dsp_cfg_data = aw883xx_dev_get_prof_data_byname(aw_dev, aw_dev->set_prof_name, AW_DATA_TYPE_DSP_CFG);\r
+\r
+ if (dsp_cfg_data == NULL) {\r
+ aw_dev_err(aw_dev->dev, "dsp config data is null");\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_dev_dsp_container_update(aw_dev,\r
+ dsp_cfg_data->data, dsp_cfg_data->len, dsp_mem_desc->dsp_cfg_base_addr);\r
+ aw_dev->dsp_cfg_len = dsp_cfg_data->len;\r
+ aw_dev_dbg(aw_dev->dev, "dsp config len:%d", dsp_cfg_data->len);\r
+\r
+ aw_dev_backup_sec_record(aw_dev);\r
+\r
+#ifdef AW_CALIB\r
+ aw883xx_cali_get_ra((void *)aw_dev);\r
+ aw_dev_get_cali_f0_delay(aw_dev);\r
+#endif\r
+\r
+#ifdef AW_MONITOR\r
+ aw883xx_monitor_update_st(aw_dev, AW_DSP_MONITOR_ST);\r
+#endif\r
+\r
+ aw_dev_get_firmware_ver(aw_dev);\r
+ aw_dev_info(aw_dev->dev, "fw_ver: [%04x]", aw_dev->fw_ver);\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_sram_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val = 0;\r
+ struct aw_dsp_mem_desc *dsp_mem_desc = &aw_dev->dsp_mem_desc;\r
+\r
+ aw_mutex_lock();\r
+\r
+ /*read dsp_rom_check_reg*/\r
+ aw_dev->ops.aw_i2c_write(aw_dev, dsp_mem_desc->dsp_madd_reg,\r
+ dsp_mem_desc->dsp_rom_check_reg);\r
+ aw_dev->ops.aw_i2c_read(aw_dev, dsp_mem_desc->dsp_mdat_reg, ®_val);\r
+ if (dsp_mem_desc->dsp_rom_check_data != reg_val) {\r
+ aw_dev_err(aw_dev->dev, "check reg 0x40 failed, read[0x%x] does not match write[0x%x]",\r
+ reg_val, dsp_mem_desc->dsp_rom_check_data);\r
+ goto error;\r
+ }\r
+\r
+ /*write dsp_cfg_base_addr*/\r
+ aw_dev->ops.aw_i2c_write(aw_dev, dsp_mem_desc->dsp_madd_reg,\r
+ dsp_mem_desc->dsp_cfg_base_addr);\r
+ aw_dev->ops.aw_i2c_write(aw_dev, dsp_mem_desc->dsp_mdat_reg,\r
+ AW_DSP_ODD_NUM_BIT_TEST);\r
+\r
+ /*read dsp_cfg_base_addr*/\r
+ aw_dev->ops.aw_i2c_write(aw_dev, dsp_mem_desc->dsp_madd_reg,\r
+ dsp_mem_desc->dsp_cfg_base_addr);\r
+ aw_dev->ops.aw_i2c_read(aw_dev, dsp_mem_desc->dsp_mdat_reg, ®_val);\r
+ if (AW_DSP_ODD_NUM_BIT_TEST != reg_val) {\r
+ aw_dev_err(aw_dev->dev, "check dsp cfg failed, read[0x%x] does not match write[0x%x]",\r
+ reg_val, AW_DSP_ODD_NUM_BIT_TEST);\r
+ goto error;\r
+ }\r
+ aw_mutex_unlock();\r
+ return 0;\r
+\r
+error:\r
+ aw_mutex_unlock();\r
+ return ret;\r
+}\r
+\r
+int aw883xx_device_fw_update(struct aw_device *aw_dev, bool up_dsp_fw_en, bool force_up_en)\r
+{\r
+ int ret = -1;\r
+\r
+ aw_dev_info(aw_dev->dev, "enter ");\r
+\r
+ if ((strncmp(aw_dev->cur_prof_name, aw_dev->set_prof_name, AW_PROF_NAME_MAX) == 0) &&\r
+ (force_up_en == AW_FORCE_UPDATE_OFF)) {\r
+ aw_dev_info(aw_dev->dev, "scene no change, not update");\r
+ return 0;\r
+ }\r
+\r
+ /*update reg*/\r
+ ret = aw_dev_reg_update(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "update reg failed");\r
+ return ret;\r
+ }\r
+\r
+ aw_dev_set_hmute(aw_dev, AW_DEV_HMUTE_ENABLE);\r
+\r
+ if (aw_dev->dsp_cfg == AW_DEV_DSP_WORK) {\r
+ aw_dev_dsp_enable(aw_dev, AW_DEV_DSP_BYPASS);\r
+ }\r
+\r
+ aw_dev_memclk_select(aw_dev, AW_DEV_MEMCLK_OSC);\r
+\r
+ ret = aw_dev_sram_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "check sram failed");\r
+ goto error;\r
+ }\r
+\r
+ aw_dev_backup_sec_recovery(aw_dev);\r
+\r
+ if (up_dsp_fw_en) {\r
+ /*update dsp firmware*/\r
+ ret = aw_dev_dsp_fw_update(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "update dsp fw failed");\r
+ goto error;\r
+ }\r
+ }\r
+\r
+ /*update dsp config*/\r
+ ret = aw_dev_dsp_cfg_update(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "update dsp cfg failed");\r
+ goto error;\r
+ }\r
+\r
+ aw_dev_memclk_select(aw_dev, AW_DEV_MEMCLK_PLL);\r
+\r
+ strncpy(aw_dev->cur_prof_name, aw_dev->set_prof_name, AW_PROF_NAME_MAX);\r
+\r
+ aw_dev_info(aw_dev->dev, "load [%s] done", aw_dev->cur_prof_name);\r
+ return 0;\r
+\r
+error:\r
+ aw_dev_memclk_select(aw_dev, AW_DEV_MEMCLK_PLL);\r
+\r
+ return ret;\r
+}\r
+\r
+static int aw883xx_dev_dsp_check(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ uint16_t i = 0;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter");\r
+\r
+ if (aw_dev->dsp_cfg == AW_DEV_DSP_BYPASS) {\r
+ aw_dev_dbg(aw_dev->dev, "dsp bypass");\r
+ return 0;\r
+ } else if (aw_dev->dsp_cfg == AW_DEV_DSP_WORK) {\r
+ aw_dev_dsp_enable(aw_dev, AW_DEV_DSP_BYPASS);\r
+ aw_dev_dsp_enable(aw_dev, AW_DEV_DSP_WORK);\r
+ AW_MS_DELAY(AW_1_MS);\r
+ for (i = 0; i < AW_DEV_DSP_CHECK_MAX; i++) {\r
+ ret = aw_dev_get_dsp_status(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dsp wdt status error=%d", ret);\r
+ AW_MS_DELAY(AW_2_MS);\r
+ } else {\r
+ return 0;\r
+ }\r
+ }\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unknown dsp cfg=%d", aw_dev->dsp_cfg);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return -EINVAL;\r
+}\r
+\r
+static void aw_dev_set_dither(struct aw_device *aw_dev, bool dither)\r
+{\r
+ struct aw_dither_desc *dither_desc = &aw_dev->dither_desc;\r
+\r
+ aw_dev_dbg(aw_dev->dev, "enter, dither: %d", dither);\r
+\r
+ if (dither_desc->reg == AW_REG_NONE)\r
+ return;\r
+\r
+ if (dither) {\r
+ aw_dev->ops.aw_reg_write_bits(aw_dev, dither_desc->reg,\r
+ dither_desc->mask,\r
+ dither_desc->enable);\r
+ } else {\r
+ aw_dev->ops.aw_reg_write_bits(aw_dev, dither_desc->reg,\r
+ dither_desc->mask,\r
+ dither_desc->disable);\r
+ }\r
+\r
+ aw_dev_info(aw_dev->dev, "done");\r
+}\r
+\r
+#ifdef AW_CALIB\r
+static void aw_dev_cali_re_update(struct aw_device *aw_dev)\r
+{\r
+ if (aw_dev->cali_desc.cali_re < aw_dev->re_range.re_max &&\r
+ aw_dev->cali_desc.cali_re > aw_dev->re_range.re_min) {\r
+ aw883xx_set_cali_re((void *)aw_dev);\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "cali_re:%d is error, no set",\r
+ aw_dev->cali_desc.cali_re);\r
+ }\r
+}\r
+\r
+static int aw_dev_get_cali_msg(struct aw_device *aw_dev, void *cali_data, dev_params_t type)\r
+{\r
+ int ret = -1;\r
+ struct cali_msg_hdr *msg_hdr = NULL;\r
+ uint32_t cali_params[AW_DEV_MAX] = { 0 };\r
+ aw_single_t is_single = IS_SINGLE;\r
+\r
+ if (cali_data == NULL) {\r
+ return -EINVAL;\r
+ }\r
+ msg_hdr = (struct cali_msg_hdr *)cali_data;\r
+ is_single = (aw_single_t)msg_hdr->opcode_id;\r
+\r
+ switch (type) {\r
+ case AW_DEV_TE_PARAMS:\r
+ ret = aw883xx_cali_get_te(aw_dev, is_single, (int32_t *)cali_params);\r
+ break;\r
+ case AW_DEV_F0_PARAMS:\r
+ ret = aw883xx_cali_get_f0(aw_dev, is_single, cali_params);\r
+ break;\r
+ case AW_DEV_R0_PARAMS:\r
+ ret = aw883xx_cali_get_r0(aw_dev, is_single, cali_params);\r
+ break;\r
+ case AW_DEV_RE_RANGE_PARAMS:\r
+ ret = aw883xx_cali_get_re_range(aw_dev, is_single, cali_params);\r
+ break;\r
+ case AW_DEV_CALI_RE_PARAMS:\r
+ ret = aw883xx_cali_re_show(aw_dev, is_single, cali_params);\r
+ break;\r
+ case AW_DEV_CALI_F0_PARAMS:\r
+ ret = aw883xx_cali_f0_show(aw_dev, is_single, cali_params);\r
+ break;\r
+ case AW_DEV_CALI_Q_PARAMS:\r
+ ret = aw883xx_cali_q_show(aw_dev, is_single, cali_params);\r
+ break;\r
+ case AW_DEV_CALI_TIME_PARAMS:\r
+ return aw883xx_cali_show_cali_time((uint32_t *)cali_data);\r
+ case AW_DEV_DSP_RE_PARAMS:\r
+ return aw883xx_cali_read_re_from_dsp(aw_dev, (uint32_t *)cali_data);\r
+ default:\r
+ aw_dev_err(aw_dev->dev, "unsupported type:%d", type);\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (ret < 0) {\r
+ return ret;\r
+ }\r
+\r
+ memcpy(msg_hdr->msg, cali_params, sizeof(cali_params));\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_dev_set_cali_msg(struct aw_device *aw_dev, void *cali_data, dev_params_t type)\r
+{\r
+ struct cali_msg_hdr *msg_hdr = NULL;\r
+ uint32_t *set_params = NULL;\r
+ int ret = -1;\r
+\r
+ if (cali_data == NULL) {\r
+ return -EINVAL;\r
+ }\r
+ set_params = (uint32_t *)cali_data;\r
+\r
+ switch (type) {\r
+ case AW_DEV_CALI_RE_PARAMS:\r
+ ret = aw883xx_cail_re_cali(aw_dev, (aw_single_t)set_params[0]);\r
+ break;\r
+ case AW_DEV_CALI_RE_F0_PARAMS:\r
+ ret = aw883xx_cali_re_f0_cali(aw_dev, (aw_single_t)set_params[0]);\r
+ break;\r
+ case AW_DEV_CALI_F0_Q_PARAMS:\r
+ ret = aw883xx_cali_f0_q_cali(aw_dev, (aw_single_t)set_params[0]);\r
+ break;\r
+ case AW_DEV_CALI_TIME_PARAMS:\r
+ ret = aw883xx_cali_store_cali_time(set_params[0]);\r
+ break;\r
+ case AW_DEV_STORE_CALI_RE_PARAMS:\r
+ msg_hdr = (struct cali_msg_hdr *)cali_data;\r
+ ret = aw883xx_cali_store_cali_re(aw_dev, (aw_single_t)msg_hdr->opcode_id, &msg_hdr->msg[0]);\r
+ break;\r
+ default:\r
+ aw_dev_err(aw_dev->dev, "unsupported type:%d", type);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return ret;\r
+}\r
+#endif\r
+\r
+static int aw_dev_set_params(struct aw_device *aw_dev, dev_params_t type, void *params, uint8_t len)\r
+{\r
+ uint32_t *set_params = NULL;\r
+ if ((params == NULL) || (len == 0)) {\r
+ aw_dev_err(aw_dev->dev, "input params error");\r
+ return -EINVAL;\r
+ }\r
+\r
+ set_params = (uint32_t *)params;\r
+\r
+ switch (type) {\r
+ case AW_DEV_VOLUME_PARAMS:\r
+ return aw_dev_set_volume(aw_dev, set_params[0]);\r
+#ifdef AW_FADE\r
+ case AW_DEV_FADE_STEP_PARAMS:\r
+ return aw_dev_set_fade_vol_step(aw_dev, set_params[0]);\r
+ case AW_DEV_FADE_IN_TIME_PARAMS:\r
+ return aw_dev_set_fade_time(set_params[0], AW_FADE_IN_TIME);\r
+ case AW_DEV_FADE_OUT_TIME_PARAMS:\r
+ return aw_dev_set_fade_time(set_params[0], AW_FADE_OUT_TIME);\r
+#endif\r
+ case AW_DEV_DSP_PARAMS:\r
+ return aw_dev_dsp_enable(aw_dev, set_params[0]);\r
+ case AW_DEV_HMUTE_PARAMS:\r
+ return aw_dev_set_hmute(aw_dev, set_params[0]);\r
+ case AW_DEV_INT_PARAMS:\r
+ return aw_dev_set_intmask(aw_dev, set_params[0]);\r
+ case AW_DEV_CRC_FLAG_PARAMS:\r
+ return aw_dev_set_crc_flag(aw_dev, set_params[0]);\r
+ case AW_DEV_REALTIME_CRC_SET_PARAMS:\r
+ return aw_dev_crc_realtime_set(aw_dev, set_params[0]);\r
+#ifdef AW_CALIB\r
+ case AW_DEV_CALI_RE_PARAMS:\r
+ case AW_DEV_CALI_RE_F0_PARAMS:\r
+ case AW_DEV_CALI_F0_Q_PARAMS:\r
+ case AW_DEV_CALI_TIME_PARAMS:\r
+ case AW_DEV_STORE_CALI_RE_PARAMS:\r
+ return aw_dev_set_cali_msg(aw_dev, params, type);\r
+#endif\r
+ default:\r
+ aw_dev_err(aw_dev->dev, "unsupported type:%d", type);\r
+ return -EINVAL;\r
+ }\r
+}\r
+\r
+static int aw_dev_get_params(struct aw_device *aw_dev, dev_params_t type, void *params, uint8_t len)\r
+{\r
+ int ret = -1;\r
+ if ((params == NULL) || (len == 0)) {\r
+ aw_dev_err(aw_dev->dev, "input params error");\r
+ return -EINVAL;\r
+ }\r
+\r
+ switch (type) {\r
+ case AW_DEV_VOLUME_PARAMS:\r
+ ret = aw_dev_get_volume(aw_dev, params);\r
+ break;\r
+#ifdef AW_FADE\r
+ case AW_DEV_FADE_STEP_PARAMS:\r
+ ret = aw_dev_get_fade_vol_step(aw_dev, params);\r
+ break;\r
+ case AW_DEV_FADE_IN_TIME_PARAMS:\r
+ ret = aw_dev_get_fade_time(params, AW_FADE_IN_TIME);\r
+ break;\r
+ case AW_DEV_FADE_OUT_TIME_PARAMS:\r
+ ret = aw_dev_get_fade_time(params, AW_FADE_OUT_TIME);\r
+ break;\r
+#endif\r
+ case AW_DEV_INT_PARAMS:\r
+ ret = aw_dev_get_int_status(aw_dev, params);\r
+ break;\r
+ case AW_DEV_HMUTE_PARAMS:\r
+ ret = aw_dev_get_hmute(aw_dev, params);\r
+ break;\r
+ case AW_DEV_SYSST_PARAMS:\r
+ ret = aw_dev_get_sysst_value(aw_dev, params);\r
+ break;\r
+ case AW_DEV_REALTIME_CRC_GET_PARAMS:\r
+ ret = aw_dev_crc_realtime_get(aw_dev, params);\r
+ break;\r
+#ifdef AW_CALIB\r
+ case AW_DEV_TE_PARAMS:\r
+ case AW_DEV_F0_PARAMS:\r
+ case AW_DEV_R0_PARAMS:\r
+ case AW_DEV_RE_RANGE_PARAMS:\r
+ case AW_DEV_CALI_RE_PARAMS:\r
+ case AW_DEV_CALI_F0_PARAMS:\r
+ case AW_DEV_CALI_Q_PARAMS:\r
+ case AW_DEV_CALI_TIME_PARAMS:\r
+ case AW_DEV_DSP_RE_PARAMS:\r
+ ret = aw_dev_get_cali_msg(aw_dev, params, type);\r
+ break;\r
+#endif\r
+ default:\r
+ aw_dev_err(aw_dev->dev, "unsupported type:%d", type);\r
+ return -EINVAL;\r
+ }\r
+\r
+ return ret;\r
+}\r
+\r
+int aw883xx_device_params(struct aw_device *aw_dev, dev_params_t params_type,\r
+ void *data, uint8_t size, params_option_t params_ops)\r
+{\r
+ if (params_ops == AW_SET_DEV_PARAMS) {\r
+ return aw_dev_set_params(aw_dev, params_type, data, size);\r
+ } else if (params_ops == AW_GET_DEV_PARAMS) {\r
+ return aw_dev_get_params(aw_dev, params_type, data, size);\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported params_ops:%d", params_ops);\r
+ return -EINVAL;\r
+ }\r
+}\r
+\r
+static bool aw_dev_get_status(struct aw_device *aw_dev, dev_status_t type)\r
+{\r
+ switch (type) {\r
+ case AW_DEV_PLL_WDT_STATUS:\r
+ return aw_dev_get_pll_wdt_status(aw_dev);\r
+ default:\r
+ aw_dev_err(aw_dev->dev, "unsupported type:%d", type);\r
+ return false;\r
+ }\r
+}\r
+\r
+static void aw_dev_set_status(struct aw_device *aw_dev, dev_status_t type)\r
+{\r
+ switch (type) {\r
+#ifdef AW_IRQ\r
+ case AW_DEV_INTERRUPT_CLEAR_STATUS:\r
+ aw_dev_interrupt_clear(aw_dev);\r
+ break;\r
+#endif\r
+ case AW_DEV_CLEAR_INT_STATUS:\r
+ aw_dev_clear_int_status(aw_dev);\r
+ break;\r
+ case AW_DEV_SOFT_RESET_STATUS:\r
+ aw_dev_soft_reset(aw_dev);\r
+ break;\r
+ case AW_DEV_REG_DUMP_STATUS:\r
+ aw883xx_dev_reg_dump(aw_dev);\r
+ break;\r
+ default:\r
+ aw_dev_err(aw_dev->dev, "unsupported type:%d", type);\r
+ return;\r
+ }\r
+}\r
+\r
+bool aw883xx_device_status(struct aw_device *aw_dev, dev_status_t type, status_option_t status_ops)\r
+{\r
+ if (status_ops == AW_SET_DEV_STATUS) {\r
+ aw_dev_set_status(aw_dev, type);\r
+ return true;\r
+ } else if (status_ops == AW_GET_DEV_STATUS) {\r
+ return aw_dev_get_status(aw_dev, type);\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported status_ops:%d", status_ops);\r
+ return false;\r
+ }\r
+}\r
+\r
+int aw883xx_device_start(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ struct aw_dither_desc *dither_desc = &aw_dev->dither_desc;\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ if (aw_dev->status == AW_DEV_PW_ON) {\r
+ aw_dev_info(aw_dev->dev, "already power on");\r
+ return 0;\r
+ }\r
+\r
+ aw_dev_set_dither(aw_dev, false);\r
+\r
+ /*power on*/\r
+ aw_dev_pwd(aw_dev, false);\r
+ AW_MS_DELAY(AW_2_MS);\r
+\r
+ ret = aw_dev_syspll_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "pll check failed cannot start");\r
+ aw883xx_dev_reg_dump(aw_dev);\r
+ goto pll_check_fail;\r
+ }\r
+\r
+ /*amppd on*/\r
+ aw_dev_amppd(aw_dev, false);\r
+ AW_MS_DELAY(AW_1_MS);\r
+\r
+ /*check i2s status*/\r
+ ret = aw883xx_dev_sysst_check(aw_dev);\r
+ if (ret < 0) {\r
+ /*check failed*/\r
+ aw883xx_dev_reg_dump(aw_dev);\r
+ goto sysst_check_fail;\r
+ }\r
+\r
+ if (aw_dev->dsp_cfg == AW_DEV_DSP_WORK) {\r
+ aw_dev_backup_sec_recovery(aw_dev);\r
+ ret = aw_dev_crc_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "crc check failed");\r
+ aw883xx_dev_reg_dump(aw_dev);\r
+ goto crc_check_fail;\r
+ }\r
+\r
+ /*dsp bypass*/\r
+ aw_dev_dsp_enable(aw_dev, AW_DEV_DSP_BYPASS);\r
+\r
+ aw_dev_set_vcalb(aw_dev);\r
+#ifdef AW_CALIB\r
+ aw_dev_cali_re_update(aw_dev);\r
+#endif\r
+\r
+ ret = aw883xx_dev_dsp_check(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "check dsp status failed");\r
+ aw883xx_dev_reg_dump(aw_dev);\r
+ goto dsp_check_fail;\r
+ }\r
+ } else {\r
+ aw_dev_dbg(aw_dev->dev, "start pa with dsp bypass");\r
+ }\r
+\r
+ /*enable tx feedback*/\r
+ if (aw_dev->ops.aw_i2s_tx_enable) {\r
+ if (aw_dev->txen_st) {\r
+ aw_dev->ops.aw_i2s_tx_enable(aw_dev, true);\r
+ }\r
+ }\r
+\r
+ if(aw_dev->dither_st == dither_desc->enable) {\r
+ aw_dev_set_dither(aw_dev, true);\r
+ }\r
+\r
+ /*close mute*/\r
+ if (aw883xx_cali_check_result(&aw_dev->cali_desc)) {\r
+ aw_dev_set_hmute(aw_dev, AW_DEV_HMUTE_DISABLE);\r
+ } else {\r
+ aw_dev_set_hmute(aw_dev, AW_DEV_HMUTE_ENABLE);\r
+ }\r
+ /*clear inturrupt*/\r
+ aw_dev_clear_int_status(aw_dev);\r
+ /*set inturrupt mask*/\r
+ aw_dev_set_intmask(aw_dev, AW_DEV_UNMASK_INT_VAL);\r
+\r
+ if (aw_dev->ops.aw_monitor_start) {\r
+ aw_dev->ops.aw_monitor_start((void *)aw_dev);\r
+ }\r
+\r
+ aw_dev->status = AW_DEV_PW_ON;\r
+\r
+ aw_dev_info(aw_dev->dev, "done");\r
+\r
+ return 0;\r
+\r
+dsp_check_fail:\r
+crc_check_fail:\r
+ aw_dev_dsp_enable(aw_dev, AW_DEV_DSP_BYPASS);\r
+sysst_check_fail:\r
+ /*clear interrupt*/\r
+ aw_dev_clear_int_status(aw_dev);\r
+ aw_dev_amppd(aw_dev, true);\r
+pll_check_fail:\r
+ aw_dev_pwd(aw_dev, true);\r
+ aw_dev->status = AW_DEV_PW_OFF;\r
+ return ret;\r
+}\r
+\r
+int aw883xx_device_stop(struct aw_device *aw_dev)\r
+{\r
+ int int_st = 0;\r
+ int monitor_int_st = 0;\r
+ uint16_t reg_data = 0;\r
+\r
+ aw_dev_info(aw_dev->dev, "enter");\r
+\r
+ aw_dev->ops.aw_reg_read(aw_dev, aw_dev->pwd_desc.reg, ®_data);\r
+\r
+ if ((aw_dev->status == AW_DEV_PW_OFF) &&\r
+ (reg_data & aw_dev->pwd_desc.enable)) {\r
+ aw_dev_info(aw_dev->dev, "already power off");\r
+ return 0;\r
+ }\r
+\r
+ aw_dev->status = AW_DEV_PW_OFF;\r
+\r
+ if (aw_dev->ops.aw_monitor_stop) {\r
+ aw_dev->ops.aw_monitor_stop((void *)aw_dev);\r
+ }\r
+\r
+ /*set mute*/\r
+ aw_dev_set_hmute(aw_dev, AW_DEV_HMUTE_ENABLE);\r
+ AW_MS_DELAY(AW_4_MS);\r
+\r
+ /*close tx feedback*/\r
+ if (aw_dev->ops.aw_i2s_tx_enable) {\r
+ aw_dev->ops.aw_i2s_tx_enable(aw_dev, false);\r
+ }\r
+ AW_MS_DELAY(AW_1_MS);\r
+\r
+ /*set defaut int mask*/\r
+ aw_dev_set_intmask(aw_dev, AW_DEV_MASK_INT_VAL);\r
+\r
+ /*check sysint state*/\r
+ int_st = aw_dev_sysint_check(aw_dev);\r
+\r
+ /*close dsp*/\r
+ aw_dev_dsp_enable(aw_dev, AW_DEV_DSP_BYPASS);\r
+\r
+ /*enable amppd*/\r
+ aw_dev_amppd(aw_dev, true);\r
+\r
+ /*check monitor process sysint state*/\r
+ monitor_int_st = aw_dev_get_monitor_sysint_st(aw_dev);\r
+\r
+ if (int_st < 0 || monitor_int_st < 0) {\r
+ /*system status anomaly*/\r
+ aw_dev_memclk_select(aw_dev, AW_DEV_MEMCLK_OSC);\r
+ aw_dev_sram_check(aw_dev);\r
+ aw_dev_dsp_fw_update(aw_dev);\r
+ aw_dev_dsp_cfg_update(aw_dev);\r
+ aw_dev_memclk_select(aw_dev, AW_DEV_MEMCLK_PLL);\r
+ }\r
+\r
+ /*set power down*/\r
+ aw_dev_pwd(aw_dev, true);\r
+\r
+ aw_dev_info(aw_dev->dev, "done");\r
+ return 0;\r
+}\r
+\r
+static int aw_device_init(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+\r
+ if (aw_dev == NULL) {\r
+ aw_pr_err("aw_dev is NULL");\r
+ return -ENOMEM;\r
+ }\r
+\r
+ strncpy(aw_dev->cur_prof_name, aw_dev->first_prof_name, AW_PROF_NAME_MAX);\r
+ strncpy(aw_dev->set_prof_name, aw_dev->first_prof_name, AW_PROF_NAME_MAX);\r
+\r
+ ret = aw883xx_device_fw_update(aw_dev, AW_FORCE_UPDATE_ON,\r
+ AW_DSP_FW_UPDATE_ON);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "fw update failed");\r
+ return ret;\r
+ }\r
+\r
+ aw_dev_set_intmask(aw_dev, AW_DEV_MASK_INT_VAL);\r
+\r
+ /*set mute*/\r
+ aw_dev_set_hmute(aw_dev, AW_DEV_HMUTE_ENABLE);\r
+\r
+ /*close tx feedback*/\r
+ if (aw_dev->ops.aw_i2s_tx_enable) {\r
+ aw_dev->ops.aw_i2s_tx_enable(aw_dev, false);\r
+ }\r
+ AW_MS_DELAY(AW_1_MS);\r
+\r
+ /*enable amppd*/\r
+ aw_dev_amppd(aw_dev, true);\r
+ /*close dsp*/\r
+ aw_dev_dsp_enable(aw_dev, AW_DEV_DSP_BYPASS);\r
+ /*set power down*/\r
+ aw_dev_pwd(aw_dev, true);\r
+\r
+ aw_dev_info(aw_dev->dev, "init done");\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_device_probe(struct aw_device *aw_dev, struct aw_init_info *init_info)\r
+{\r
+ int ret = -1;\r
+\r
+ ret = aw_dev_prof_init(aw_dev, init_info);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "prof init failed");\r
+ return ret;\r
+ }\r
+\r
+ aw883xx_dev_get_monitor_func(aw_dev);\r
+\r
+ if(aw_dev->ops.aw_monitor_init) {\r
+ ret = aw_dev->ops.aw_monitor_init((void *)aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "monitor init failed");\r
+ return ret;\r
+ }\r
+ }\r
+\r
+ ret = aw_device_init(aw_dev);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "dev init failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
--- /dev/null
+/*\r
+* aw883xx_pid_2066_init.c aw883xx codec driver\r
+*\r
+* Copyright (c) 2021 AWINIC Technology CO., LTD\r
+*\r
+* Author: <zhaolei@awinic.com>\r
+*\r
+* This program is free software; you can redistribute it and/or modify it\r
+* under the terms of the GNU General Public License as published by the\r
+* Free Software Foundation; either version 2 of the License, or (at your\r
+* option) any later version.\r
+*/\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+\r
+#include "aw883xx.h"\r
+#include "aw883xx_pid_2066_reg.h"\r
+#include "aw883xx_base.h"\r
+\r
+static int aw883xx_dev_i2c_writes(struct aw_device *aw_dev,\r
+ uint8_t reg_addr, uint8_t *buf, uint16_t len)\r
+{\r
+ struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data;\r
+\r
+ return aw883xx_i2c_writes(aw883xx, reg_addr, buf, len);\r
+}\r
+\r
+static int aw883xx_dev_i2c_write(struct aw_device *aw_dev,\r
+ uint8_t reg_addr, uint16_t reg_data)\r
+{\r
+ struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data;\r
+\r
+ return aw883xx_i2c_write(aw883xx, reg_addr, reg_data);\r
+}\r
+\r
+static int aw883xx_dev_i2c_read(struct aw_device *aw_dev,\r
+ uint8_t reg_addr, uint16_t *reg_data)\r
+{\r
+ struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data;\r
+\r
+ return aw883xx_i2c_read(aw883xx, reg_addr, reg_data);\r
+}\r
+\r
+\r
+static int aw883xx_dev_reg_read(struct aw_device *aw_dev,\r
+ uint8_t reg_addr, uint16_t *reg_data)\r
+{\r
+ struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data;\r
+\r
+ return aw883xx_reg_read(aw883xx, reg_addr, reg_data);\r
+}\r
+\r
+static int aw883xx_dev_reg_write(struct aw_device *aw_dev,\r
+ uint8_t reg_addr, uint16_t reg_data)\r
+{\r
+ struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data;\r
+\r
+ return aw883xx_reg_write(aw883xx, reg_addr, reg_data);\r
+}\r
+\r
+static int aw883xx_dev_reg_write_bits(struct aw_device *aw_dev,\r
+ uint8_t reg_addr, uint16_t mask, uint16_t reg_data)\r
+{\r
+ struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data;\r
+\r
+ return aw883xx_reg_write_bits(aw883xx, reg_addr, mask, reg_data);\r
+}\r
+\r
+static int aw883xx_dev_dsp_write(struct aw_device *aw_dev,\r
+ uint16_t dsp_addr, uint32_t dsp_data, uint8_t data_type)\r
+{\r
+ struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data;\r
+\r
+ return aw883xx_dsp_write(aw883xx, dsp_addr, dsp_data, data_type);\r
+}\r
+\r
+static int aw883xx_dev_dsp_read(struct aw_device *aw_dev,\r
+ uint16_t dsp_addr, uint32_t *dsp_data, uint8_t data_type)\r
+{\r
+ struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data;\r
+\r
+ return aw883xx_dsp_read(aw883xx, dsp_addr, dsp_data, data_type);\r
+}\r
+\r
+static void aw_pid_2066_i2s_tx_enable(struct aw_device *aw_dev, bool flag)\r
+{\r
+ struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data;\r
+\r
+ aw_dev_dbg(aw883xx->dev, "enter");\r
+\r
+ if (flag) {\r
+ aw883xx_reg_write_bits(aw883xx, AW_PID_2066_I2SCTRL3_REG,\r
+ AW_PID_2066_I2STXEN_MASK,\r
+ AW_PID_2066_I2STXEN_ENABLE_VALUE);\r
+ } else {\r
+ aw883xx_reg_write_bits(aw883xx, AW_PID_2066_I2SCTRL3_REG,\r
+ AW_PID_2066_I2STXEN_MASK,\r
+ AW_PID_2066_I2STXEN_DISABLE_VALUE);\r
+ }\r
+}\r
+\r
+static bool aw_pid_2066_check_rd_access(int reg)\r
+{\r
+ if (reg >= AW_PID_2066_REG_MAX)\r
+ return false;\r
+\r
+ if (aw_pid_2066_reg_access[reg] & REG_RD_ACCESS)\r
+ return true;\r
+ else\r
+ return false;\r
+}\r
+\r
+static bool aw_pid_2066_check_wr_access(int reg)\r
+{\r
+ if (reg >= AW_PID_2066_REG_MAX)\r
+ return false;\r
+\r
+ if (aw_pid_2066_reg_access[reg] & REG_WR_ACCESS)\r
+ return true;\r
+ else\r
+ return false;\r
+}\r
+\r
+static int aw_pid_2066_get_reg_num(void)\r
+{\r
+ return AW_PID_2066_REG_MAX;\r
+}\r
+\r
+static unsigned int aw_pid_2066_reg_val_to_db(unsigned int reg_val)\r
+{\r
+ return reg_val;\r
+}\r
+\r
+static int aw_pid_2066_db_to_reg_val(uint16_t db_val)\r
+{\r
+ return db_val;\r
+}\r
+\r
+static int aw_pid_2066_set_volume(struct aw_device *aw_pa, uint16_t volume)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_value = 0;\r
+ uint16_t real_value = 0;\r
+ uint16_t reg_vol = 0;\r
+ uint16_t min_vol = 0;\r
+ struct aw883xx *aw883xx = (struct aw883xx*)aw_pa->private_data;\r
+ struct aw_volume_desc *vol_desc = &aw883xx->aw_pa->volume_desc;\r
+\r
+ min_vol = AW_GET_MIN_VALUE(volume, vol_desc->mute_volume);\r
+ reg_vol = aw_pid_2066_db_to_reg_val(min_vol);\r
+\r
+ ret = aw883xx_reg_read(aw883xx, AW_PID_2066_SYSCTRL2_REG, ®_value);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_pa->dev, "read vol reg failed");\r
+ return ret;\r
+ }\r
+\r
+ real_value = (reg_vol << AW_PID_2066_VOL_START_BIT) |\r
+ (reg_value & AW_PID_2066_VOL_MASK);\r
+\r
+ ret = aw883xx_reg_write(aw883xx, AW_PID_2066_SYSCTRL2_REG, real_value);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_pa->dev, "write vol reg failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_pid_2066_get_volume(struct aw_device *aw_pa, uint16_t *volume)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_value = 0;\r
+ uint16_t reg_vol = 0;\r
+ uint16_t real_vol = 0;\r
+ struct aw883xx *aw883xx = (struct aw883xx*)aw_pa->private_data;\r
+\r
+ ret = aw883xx_reg_read(aw883xx, AW_PID_2066_SYSCTRL2_REG, ®_value);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_pa->dev, "read vol reg failed");\r
+ return ret;\r
+ }\r
+\r
+ reg_vol = reg_value & (~AW_PID_2066_VOL_MASK);\r
+ real_vol = aw_pid_2066_reg_val_to_db(reg_vol);\r
+\r
+ *volume = real_vol;\r
+\r
+ return 0;\r
+}\r
+\r
+static int aw_pid_2066_get_icalk(struct aw_device * aw_dev, int16_t *icalk)\r
+{\r
+ int ret = -1;\r
+ uint16_t efrm_reg_val = 0;\r
+ uint16_t efrl_reg_val = 0;\r
+ uint16_t ef_isn_geslp = 0;\r
+ uint16_t ef_isn_h5bits = 0;\r
+ uint16_t icalk_val = 0;\r
+ struct aw_efuse_check_desc *efuse_check_desc = &aw_dev->efuse_check_desc;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, AW_PID_2066_EFRM2_REG, &efrm_reg_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read efrm_reg failed");\r
+ return ret;\r
+ }\r
+\r
+ ef_isn_geslp = (efrm_reg_val & (~AW_PID_2066_EF_ISN_GESLP_MASK)) >>\r
+ AW_PID_2066_EF_ISN_GESLP_SHIFT;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, AW_PID_2066_EFRL_REG, &efrl_reg_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read efrl_reg failed");\r
+ return ret;\r
+ }\r
+\r
+ ef_isn_h5bits = (efrl_reg_val & (~AW_PID_2066_EF_ISN_H5BITS_MASK)) >>\r
+ AW_PID_2066_EF_ISN_H5BITS_SHIFT;\r
+\r
+ if (efuse_check_desc->check_val == AW_EF_AND_CHECK) {\r
+ icalk_val = ef_isn_geslp & (ef_isn_h5bits | AW_PID_2066_EF_ISN_H5BITS_SIGN_MASK);\r
+ } else if (efuse_check_desc->check_val == AW_EF_OR_CHECK) {\r
+ icalk_val = ef_isn_geslp | (ef_isn_h5bits & (~AW_PID_2066_EF_ISN_H5BITS_SIGN_MASK));\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported check type:%d", efuse_check_desc->check_val);\r
+ return -EINVAL;\r
+ }\r
+ if (icalk_val & (~AW_PID_2066_ICALK_SIGN_MASK))\r
+ icalk_val = icalk_val | AW_PID_2066_ICALK_NEG_MASK;\r
+ *icalk = (int16_t)icalk_val;\r
+ return 0;\r
+}\r
+\r
+static int aw_pid_2066_get_vcalk(struct aw_device * aw_dev, int16_t *vcalk)\r
+{\r
+ int ret = -1;\r
+ uint16_t efrm_reg_val = 0;\r
+ uint16_t efrl_reg_val = 0;\r
+ uint16_t ef_vsn_geslp = 0;\r
+ uint16_t ef_vsn_h3bits = 0;\r
+ uint16_t vcalk_val = 0;\r
+ struct aw_efuse_check_desc *efuse_check_desc = &aw_dev->efuse_check_desc;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, AW_PID_2066_EFRM2_REG, &efrm_reg_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read efrm_reg failed");\r
+ return ret;\r
+ }\r
+\r
+ ef_vsn_geslp = (efrm_reg_val & (~AW_PID_2066_EF_VSN_GESLP_MASK)) >>\r
+ AW_PID_2066_EF_VSN_GESLP_SHIFT;\r
+\r
+ ret = aw_dev->ops.aw_reg_read(aw_dev, AW_PID_2066_EFRL_REG, &efrl_reg_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "read efrl_reg failed");\r
+ return ret;\r
+ }\r
+\r
+ ef_vsn_h3bits = (efrl_reg_val & (~AW_PID_2066_EF_VSN_H3BITS_MASK)) >>\r
+ AW_PID_2066_EF_VSN_H3BITS_SHIFT;\r
+\r
+ if (efuse_check_desc->check_val == AW_EF_AND_CHECK) {\r
+ vcalk_val = ef_vsn_geslp & (ef_vsn_h3bits | AW_PID_2066_EF_VSN_H3BITS_SIGN_MASK);\r
+ } else if (efuse_check_desc->check_val == AW_EF_OR_CHECK) {\r
+ vcalk_val = ef_vsn_geslp | (ef_vsn_h3bits & (~AW_PID_2066_EF_VSN_H3BITS_SIGN_MASK));\r
+ } else {\r
+ aw_dev_err(aw_dev->dev, "unsupported check type:%d", efuse_check_desc->check_val);\r
+ return -EINVAL;\r
+ }\r
+ if (vcalk_val & (~AW_PID_2066_VCALK_SIGN_MASK))\r
+ vcalk_val = vcalk_val | AW_PID_2066_VCALK_NEG_MASK;\r
+ *vcalk = (int16_t)vcalk_val;\r
+ return 0;\r
+}\r
+\r
+static int aw_pid_2066_set_vcalb(struct aw_device *aw_dev)\r
+{\r
+ int ret = -1;\r
+ uint16_t reg_val = 0;\r
+ int16_t icalk = 0;\r
+ int16_t vcalk = 0;\r
+ int32_t ical_k = 0;\r
+ int32_t vcal_k = 0;\r
+ int32_t vcalb = 0;\r
+ struct aw_vcalb_desc *vcalb_desc = &aw_dev->vcalb_desc;\r
+\r
+ ret = aw_pid_2066_get_vcalk(aw_dev, &vcalk);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get vcalk failed");\r
+ return ret;\r
+ }\r
+ aw_dev_info(aw_dev->dev, "vcalk = %d", vcalk);\r
+\r
+ ret = aw_pid_2066_get_icalk(aw_dev, &icalk);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "get icalk failed");\r
+ return ret;\r
+ }\r
+ aw_dev_info(aw_dev->dev, "icalk = %d", icalk);\r
+\r
+ ical_k = icalk * AW_PID_2066_ICABLK_FACTOR + AW_PID_2066_CABL_BASE_VALUE;\r
+ vcal_k = vcalk * AW_PID_2066_VCABLK_FACTOR + AW_PID_2066_CABL_BASE_VALUE;\r
+\r
+ aw_dev_info(aw_dev->dev, "ical_k = %d, vcal_k = %d", ical_k, vcal_k);\r
+ vcalb = AW_PID_2066_VCALB_ACCURACY * AW_PID_2066_VSCAL_FACTOR /\r
+ AW_PID_2066_ISCAL_FACTOR * ical_k / vcal_k * vcalb_desc->init_value;\r
+\r
+\r
+ vcalb = vcalb >> AW_PID_2066_VCALB_ADJ_FACTOR;\r
+ reg_val = (uint32_t)vcalb;\r
+\r
+ aw_dev_info(aw_dev->dev, "vcalb = %d, vcalb_adj = %d",\r
+ reg_val, vcalb_desc->init_value >> AW_PID_2066_VCALB_ADJ_FACTOR);\r
+\r
+ ret = aw_dev->ops.aw_reg_write(aw_dev, AW_PID_2066_DSPVCALB_REG, reg_val);\r
+ if (ret < 0) {\r
+ aw_dev_err(aw_dev->dev, "write vcalb_reg failed");\r
+ return ret;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int aw883xx_pid_2066_dev_init(void *aw883xx_val)\r
+{\r
+ int ret = -1;\r
+ struct aw_device *aw_pa = NULL;\r
+ struct aw883xx *aw883xx = (struct aw883xx *)aw883xx_val;\r
+\r
+ aw_pr_dbg("enter");\r
+\r
+ if (aw883xx == NULL) {\r
+ aw_pr_err("aw883xx is null");\r
+ return -EINVAL;\r
+ }\r
+\r
+ if (aw883xx->chip_id != PID_2066_ID) {\r
+ aw_dev_dbg(aw883xx->dev, "The id:0x%x does not match:0x%x",\r
+ aw883xx->chip_id, PID_2066_ID);\r
+ return -EINVAL;\r
+ }\r
+\r
+ aw_pa = calloc(1, sizeof(struct aw_device));\r
+ if (aw_pa == NULL) {\r
+ aw_dev_err(aw883xx->dev, "calloc failed");\r
+ return -ENOMEM;\r
+ }\r
+\r
+ /*call aw device init func*/\r
+\r
+ aw_pa->chip_id = aw883xx->chip_id;\r
+ aw_pa->dev = aw883xx->dev;\r
+ aw_pa->private_data = (void *)aw883xx;\r
+ aw_pa->fw_status = AW_DEV_FW_FAILED;\r
+ aw_pa->fade_step = AW_PID_2066_VOLUME_STEP_DB;\r
+ aw_pa->crc_type = AW_HW_CRC_CHECK;\r
+\r
+ aw_pa->ops.aw_set_cali_re = NULL;\r
+ aw_pa->ops.aw_get_cali_re = NULL;\r
+ aw_pa->ops.aw_get_r0 = NULL;\r
+ aw_pa->ops.aw_sw_crc_check = NULL;\r
+ aw_pa->ops.aw_init_vcalb_update = NULL;\r
+\r
+ aw_pa->ops.aw_get_version = aw883xx_get_version;\r
+ aw_pa->ops.aw_i2c_writes = aw883xx_dev_i2c_writes;\r
+ aw_pa->ops.aw_i2c_write = aw883xx_dev_i2c_write;\r
+ aw_pa->ops.aw_reg_write = aw883xx_dev_reg_write;\r
+ aw_pa->ops.aw_reg_write_bits = aw883xx_dev_reg_write_bits;\r
+ aw_pa->ops.aw_i2c_read = aw883xx_dev_i2c_read;\r
+ aw_pa->ops.aw_reg_read = aw883xx_dev_reg_read;\r
+ aw_pa->ops.aw_dsp_read = aw883xx_dev_dsp_read;\r
+ aw_pa->ops.aw_dsp_write = aw883xx_dev_dsp_write;\r
+ aw_pa->ops.aw_get_dev_num = aw883xx_get_dev_num;\r
+\r
+ aw_pa->ops.aw_get_hw_volume = aw_pid_2066_get_volume;\r
+ aw_pa->ops.aw_set_hw_volume = aw_pid_2066_set_volume;\r
+ aw_pa->ops.aw_reg_val_to_db = aw_pid_2066_reg_val_to_db;\r
+\r
+ aw_pa->ops.aw_check_rd_access = aw_pid_2066_check_rd_access;\r
+ aw_pa->ops.aw_check_wr_access = aw_pid_2066_check_wr_access;\r
+ aw_pa->ops.aw_get_reg_num = aw_pid_2066_get_reg_num;\r
+\r
+ aw_pa->ops.aw_i2s_tx_enable = aw_pid_2066_i2s_tx_enable;\r
+ aw_pa->ops.aw_set_vcalb = aw_pid_2066_set_vcalb;\r
+\r
+ aw_pa->dsp_crc_desc.ctl_reg = AW_REG_NONE;\r
+\r
+ aw_pa->int_desc.mask_reg = AW_PID_2066_SYSINTM_REG;\r
+ aw_pa->int_desc.mask_default = AW_PID_2066_SYSINTM_DEFAULT;\r
+ aw_pa->int_desc.int_mask = AW_PID_2066_SYSINTM_DEFAULT;\r
+ aw_pa->int_desc.st_reg = AW_PID_2066_SYSINT_REG;\r
+ aw_pa->int_desc.intst_mask = AW_PID_2066_BIT_SYSINT_CHECK;\r
+\r
+ aw_pa->pwd_desc.reg = AW_PID_2066_SYSCTRL_REG;\r
+ aw_pa->pwd_desc.mask = AW_PID_2066_PWDN_MASK;\r
+ aw_pa->pwd_desc.enable = AW_PID_2066_PWDN_POWER_DOWN_VALUE;\r
+ aw_pa->pwd_desc.disable = AW_PID_2066_PWDN_WORKING_VALUE;\r
+\r
+ aw_pa->mute_desc.reg = AW_PID_2066_SYSCTRL_REG;\r
+ aw_pa->mute_desc.mask = AW_PID_2066_HMUTE_MASK;\r
+ aw_pa->mute_desc.enable = AW_PID_2066_HMUTE_ENABLE_VALUE;\r
+ aw_pa->mute_desc.disable = AW_PID_2066_HMUTE_DISABLE_VALUE;\r
+\r
+ aw_pa->txen_desc.reg = AW_PID_2066_I2SCTRL3_REG;\r
+ aw_pa->txen_desc.mask = AW_PID_2066_I2STXEN_MASK;\r
+ aw_pa->txen_desc.enable = AW_PID_2066_I2STXEN_ENABLE_VALUE;\r
+ aw_pa->txen_desc.disable = AW_PID_2066_I2STXEN_DISABLE_VALUE;\r
+\r
+ aw_pa->vcalb_desc.vcalb_reg = AW_PID_2066_DSPVCALB_REG;\r
+\r
+ aw_pa->efuse_check_desc.reg = AW_PID_2066_DBGCTRL_REG;\r
+ aw_pa->efuse_check_desc.mask = AW_PID_2066_EF_DBMD_MASK;\r
+ aw_pa->efuse_check_desc.or_val = AW_PID_2066_EF_DBMD_OR_VALUE;\r
+ aw_pa->efuse_check_desc.and_val = AW_PID_2066_EF_DBMD_AND_VALUE;\r
+\r
+ aw_pa->sysst_desc.reg = AW_PID_2066_SYSST_REG;\r
+ aw_pa->sysst_desc.st_check = AW_PID_2066_BIT_SYSST_NOSWS_CHECK;\r
+ aw_pa->sysst_desc.st_mask = AW_PID_2066_BIT_SYSST_CHECK_MASK;\r
+ aw_pa->sysst_desc.pll_check = AW_PID_2066_BIT_PLL_CHECK;\r
+ aw_pa->sysst_desc.dsp_check = AW_PID_2066_DSPS_NORMAL_VALUE;\r
+ aw_pa->sysst_desc.dsp_mask = AW_PID_2066_DSPS_MASK;\r
+ aw_pa->sysst_desc.st_sws_check = AW_PID_2066_BIT_SYSST_SWS_CHECK;\r
+\r
+ aw_pa->noise_gate_en.reg = AW_PID_2066_PWMCTRL3_REG;\r
+ aw_pa->noise_gate_en.noise_gate_mask = AW_PID_2066_NOISE_GATE_EN_MASK;\r
+\r
+ aw_pa->profctrl_desc.reg = AW_PID_2066_SYSCTRL_REG;\r
+ aw_pa->profctrl_desc.mask = AW_PID_2066_EN_TRAN_MASK;\r
+ aw_pa->profctrl_desc.rcv_mode_val = AW_PID_2066_EN_TRAN_RCV_VALUE;\r
+\r
+ aw_pa->volume_desc.reg = AW_PID_2066_SYSCTRL2_REG;\r
+ aw_pa->volume_desc.mask = AW_PID_2066_VOL_MASK;\r
+ aw_pa->volume_desc.shift = AW_PID_2066_VOL_START_BIT;\r
+ aw_pa->volume_desc.mute_volume = AW_PID_2066_MUTE_VOLUME;\r
+ aw_pa->volume_desc.max_volume = AW_PID_2066_VOL_DEFAULT_VALUE;\r
+ aw_pa->volume_desc.ctl_volume = AW_PID_2066_VOL_DEFAULT_VALUE;\r
+\r
+ aw_pa->dsp_en_desc.reg = AW_PID_2066_SYSCTRL_REG;\r
+ aw_pa->dsp_en_desc.mask = AW_PID_2066_DSPBY_MASK;\r
+ aw_pa->dsp_en_desc.enable = AW_PID_2066_DSPBY_WORKING_VALUE;\r
+ aw_pa->dsp_en_desc.disable = AW_PID_2066_DSPBY_BYPASS_VALUE;\r
+\r
+ aw_pa->memclk_desc.reg = AW_PID_2066_DBGCTRL_REG;\r
+ aw_pa->memclk_desc.mask = AW_PID_2066_MEM_CLKSEL_MASK;\r
+ aw_pa->memclk_desc.mcu_hclk = AW_PID_2066_MEM_CLKSEL_DAP_HCLK_VALUE;\r
+ aw_pa->memclk_desc.osc_clk = AW_PID_2066_MEM_CLKSEL_OSC_CLK_VALUE;\r
+\r
+ aw_pa->watch_dog_desc.reg = AW_PID_2066_WDT_REG;\r
+ aw_pa->watch_dog_desc.mask = AW_PID_2066_WDT_CNT_MASK;\r
+\r
+ aw_pa->dsp_mem_desc.dsp_madd_reg = AW_PID_2066_DSPMADD_REG;\r
+ aw_pa->dsp_mem_desc.dsp_mdat_reg = AW_PID_2066_DSPMDAT_REG;\r
+ aw_pa->dsp_mem_desc.dsp_cfg_base_addr = AW_PID_2066_DSP_CFG_ADDR;\r
+ aw_pa->dsp_mem_desc.dsp_fw_base_addr = AW_PID_2066_DSP_FW_ADDR;\r
+ aw_pa->dsp_mem_desc.dsp_rom_check_reg = AW_PID_2066_DSP_ROM_CHECK_ADDR;\r
+ aw_pa->dsp_mem_desc.dsp_rom_check_data = AW_PID_2066_DSP_ROM_CHECK_DATA;\r
+\r
+ aw_pa->soft_rst.reg = AW_PID_2066_ID_REG;\r
+ aw_pa->soft_rst.reg_value = AW_PID_2066_SOFT_RESET_VALUE;\r
+\r
+ aw_pa->dsp_vol_desc.reg = AW_PID_2066_DSPCFG_REG;\r
+ aw_pa->dsp_vol_desc.mask = AW_PID_2066_DSP_VOL_MASK;\r
+ aw_pa->dsp_vol_desc.mute_st = AW_PID_2066_DSP_VOL_MUTE;\r
+ aw_pa->dsp_vol_desc.noise_st = AW_PID_2066_DSP_VOL_NOISE_ST;\r
+\r
+ aw_pa->amppd_desc.reg = AW_PID_2066_SYSCTRL_REG;\r
+ aw_pa->amppd_desc.mask = AW_PID_2066_AMPPD_MASK;\r
+ aw_pa->amppd_desc.enable = AW_PID_2066_AMPPD_POWER_DOWN_VALUE;\r
+ aw_pa->amppd_desc.disable = AW_PID_2066_AMPPD_WORKING_VALUE;\r
+\r
+ aw_pa->cali_desc.spkr_temp_desc.reg = AW_PID_2066_ASR2_REG;\r
+\r
+ /*32-bit data types need bypass dsp*/\r
+ aw_pa->cali_desc.ra_desc.dsp_reg = AW_PID_2066_DSP_REG_CFG_ADPZ_RA;\r
+ aw_pa->cali_desc.ra_desc.data_type = AW_DSP_32_DATA;\r
+ aw_pa->cali_desc.ra_desc.shift = AW_PID_2066_DSP_CFG_ADPZ_RA_SHIFT;\r
+\r
+ /*32-bit data types need bypass dsp*/\r
+ aw_pa->cali_desc.cali_cfg_desc.actampth_reg = AW_PID_2066_DSP_REG_CFG_MBMEC_ACTAMPTH;\r
+ aw_pa->cali_desc.cali_cfg_desc.actampth_data_type = AW_DSP_32_DATA;\r
+\r
+ /*32-bit data types need bypass dsp*/\r
+ aw_pa->cali_desc.cali_cfg_desc.noiseampth_reg = AW_PID_2066_DSP_REG_CFG_MBMEC_NOISEAMPTH;\r
+ aw_pa->cali_desc.cali_cfg_desc.noiseampth_data_type = AW_DSP_32_DATA;\r
+\r
+ aw_pa->cali_desc.cali_cfg_desc.ustepn_reg = AW_PID_2066_DSP_REG_CFG_ADPZ_USTEPN;\r
+ aw_pa->cali_desc.cali_cfg_desc.ustepn_data_type = AW_DSP_16_DATA;\r
+\r
+ aw_pa->cali_desc.cali_cfg_desc.alphan_reg = AW_PID_2066_DSP_REG_CFG_RE_ALPHA;\r
+ aw_pa->cali_desc.cali_cfg_desc.alphan_data_type = AW_DSP_16_DATA;\r
+\r
+ /*32-bit data types need bypass dsp*/\r
+ aw_pa->cali_desc.r0_desc.dsp_reg = AW_PID_2066_DSP_REG_CFG_ADPZ_RE;\r
+ aw_pa->cali_desc.r0_desc.data_type = AW_DSP_16_DATA;\r
+ aw_pa->cali_desc.r0_desc.shift = AW_PID_2066_ADPZ_RE_SHIFT;\r
+\r
+ aw_pa->cali_desc.dsp_re_desc.shift = AW_PID_2066_DSP_REG_CALRE_SHIFT;\r
+ aw_pa->cali_desc.dsp_re_desc.dsp_reg = AW_PID_2066_DSP_REG_CALRE;\r
+ aw_pa->cali_desc.dsp_re_desc.data_type = AW_DSP_16_DATA;\r
+\r
+ aw_pa->cali_desc.hw_cali_re_desc.hbits_reg = AW_PID_2066_ACR1_REG;\r
+ aw_pa->cali_desc.hw_cali_re_desc.hbits_mask = AW_PID_2066_CALI_RE_HBITS_MASK;\r
+ aw_pa->cali_desc.hw_cali_re_desc.hbits_shift = AW_PID_2066_CALI_RE_HBITS_SHIFT;\r
+ aw_pa->cali_desc.hw_cali_re_desc.lbits_reg = AW_PID_2066_ACR2_REG;\r
+ aw_pa->cali_desc.hw_cali_re_desc.lbits_mask = AW_PID_2066_CALI_RE_LBITS_MASK;\r
+ aw_pa->cali_desc.hw_cali_re_desc.lbits_shift = AW_PID_2066_CALI_RE_LBITS_SHIFT;\r
+ aw_pa->cali_desc.hw_cali_re_desc.cali_re_shift = AW_PID_2066_DSP_RE_SHIFT;\r
+\r
+ aw_pa->cali_desc.noise_desc.dsp_reg = AW_PID_2066_DSP_REG_CFG_MBMEC_GLBCFG;\r
+ aw_pa->cali_desc.noise_desc.data_type = AW_DSP_16_DATA;\r
+ aw_pa->cali_desc.noise_desc.mask = AW_PID_2066_DSP_REG_NOISE_MASK;\r
+\r
+ aw_pa->cali_desc.f0_desc.dsp_reg = AW_PID_2066_DSP_REG_RESULT_F0;\r
+ aw_pa->cali_desc.f0_desc.shift = AW_PID_2066_DSP_F0_SHIFT;\r
+ aw_pa->cali_desc.f0_desc.data_type = AW_DSP_16_DATA;\r
+\r
+ aw_pa->cali_desc.q_desc.dsp_reg = AW_PID_2066_DSP_REG_RESULT_Q;\r
+ aw_pa->cali_desc.q_desc.shift = AW_PID_2066_DSP_Q_SHIFT;\r
+ aw_pa->cali_desc.q_desc.data_type = AW_DSP_16_DATA;\r
+\r
+ aw_pa->cali_desc.iv_desc.reg = AW_PID_2066_ASR1_REG;\r
+ aw_pa->cali_desc.iv_desc.reabs_mask = AW_PID_2066_REABS_MASK;\r
+\r
+ aw_pa->cali_desc.cali_delay_desc.dsp_reg = AW_PID_2066_DSP_CALI_F0_DELAY;\r
+ aw_pa->cali_desc.cali_delay_desc.data_type = AW_DSP_16_DATA;\r
+\r
+ aw_pa->cco_mux_desc.reg = AW_PID_2066_PLLCTRL2_REG;\r
+ aw_pa->cco_mux_desc.mask = AW_PID_2066_CCO_MUX_MASK;\r
+ aw_pa->cco_mux_desc.divider = AW_PID_2066_CCO_MUX_DIVIDED_VALUE;\r
+ aw_pa->cco_mux_desc.bypass = AW_PID_2066_CCO_MUX_BYPASS_VALUE;\r
+\r
+#ifdef AW_MONITOR\r
+\r
+ aw_pa->monitor_desc.voltage_desc.reg = AW_PID_2066_VBAT_REG;\r
+ aw_pa->monitor_desc.voltage_desc.vbat_range = AW_PID_2066_VBAT_RANGE;\r
+ aw_pa->monitor_desc.voltage_desc.int_bit = AW_PID_2066_INT_10BIT;\r
+\r
+ aw_pa->monitor_desc.temp_desc.reg = AW_PID_2066_TEMP_REG;\r
+ aw_pa->monitor_desc.temp_desc.sign_mask = AW_PID_2066_TEMP_SIGN_MASK;\r
+ aw_pa->monitor_desc.temp_desc.neg_mask = AW_PID_2066_TEMP_NEG_MASK;\r
+\r
+ aw_pa->monitor_desc.vmax_desc.dsp_reg = AW_PID_2066_DSP_REG_VMAX;\r
+ aw_pa->monitor_desc.vmax_desc.data_type = AW_DSP_16_DATA;\r
+\r
+ aw_pa->monitor_desc.ipeak_desc.reg = AW_PID_2066_BSTCTRL2_REG;\r
+ aw_pa->monitor_desc.ipeak_desc.mask = AW_PID_2066_BST_IPEAK_MASK;\r
+ aw_pa->monitor_desc.dsp_monitor_delay = AW_DSP_MONITOR_DELAY;\r
+\r
+ aw_pa->monitor_desc.dsp_monitor_desc.extn_temp_reg = AW_PID_2066_DSP_REG_EXTERN_TEMP_ADDR;\r
+ aw_pa->monitor_desc.dsp_monitor_desc.extn_temp_reg_type = AW_DSP_16_DATA;\r
+\r
+ aw_pa->monitor_desc.dsp_monitor_desc.extn_temp_en_reg = AW_PID_2066_DSP_MONITOR_TEMPEN_ADDR;\r
+ aw_pa->monitor_desc.dsp_monitor_desc.extn_temp_en_mask = AW_PID_2066_DSP_MONITOR_EXTERN_TEMP_MASK;\r
+ aw_pa->monitor_desc.dsp_monitor_desc.extn_temp_en_reg_type = AW_DSP_16_DATA;\r
+\r
+ aw_pa->monitor_desc.dsp_monitor_desc.dsp_temp_reg = AW_PID_2066_DSP_MONITOR_TEMPEN_ADDR;\r
+ aw_pa->monitor_desc.dsp_monitor_desc.dsp_temp_en_mask = AW_PID_2066_DSP_MONITOR_TEMPEN_MASK;\r
+ aw_pa->monitor_desc.dsp_monitor_desc.dsp_temp_reg_type = AW_DSP_16_DATA;\r
+\r
+ aw_pa->monitor_desc.dsp_monitor_desc.dsp_volt_reg = AW_PID_2066_DSP_REG_CFG_MBMEC_GLBCFG;\r
+ aw_pa->monitor_desc.dsp_monitor_desc.dsp_volt_en_mask = AW_PID_2066_DSP_MONITOR_VOLTEN_MASK;\r
+ aw_pa->monitor_desc.dsp_monitor_desc.dsp_volt_reg_type = AW_DSP_16_DATA;\r
+\r
+ aw_pa->monitor_desc.hw_monitor_desc.reg = AW_PID_2066_SYSCTRL2_REG;\r
+ aw_pa->monitor_desc.hw_monitor_desc.bop_mask = AW_PID_2066_BOP_EN_MASK;\r
+ aw_pa->monitor_desc.hw_monitor_desc.vol_mask = AW_PID_2066_BOP_VOL_EN_MASK;\r
+ aw_pa->monitor_desc.hw_monitor_desc.ipeak_mask = AW_PID_2066_BOP_IPEAK_EN_MASK;\r
+#endif\r
+ aw_pa->dsp_st_desc.dsp_reg_s1 = AW_PID_2066_DSP_ST_S1;\r
+ aw_pa->dsp_st_desc.dsp_reg_e1 = AW_PID_2066_DSP_ST_E1;\r
+ aw_pa->dsp_st_desc.dsp_reg_s2 = AW_PID_2066_DSP_ST_S2;\r
+ aw_pa->dsp_st_desc.dsp_reg_e2 = AW_PID_2066_DSP_ST_E2;\r
+\r
+ aw_pa->crc_check_desc.ram_clk_reg = AW_PID_2066_I2SCFG1_REG;\r
+ aw_pa->crc_check_desc.ram_clk_mask = AW_PID_2066_RAM_CG_BYP_MASK;\r
+ aw_pa->crc_check_desc.ram_clk_on = AW_PID_2066_RAM_CG_BYP_BYPASS_VALUE;\r
+ aw_pa->crc_check_desc.ram_clk_off = AW_PID_2066_RAM_CG_BYP_WORK_VALUE;\r
+\r
+ aw_pa->crc_check_desc.crc_cfg_base_addr = AW_PID_2066_CRC_CFG_BASE_ADDR;\r
+ aw_pa->crc_check_desc.crc_fw_base_addr = AW_PID_2066_CRC_FW_BASE_ADDR;\r
+\r
+ aw_pa->crc_check_desc.crc_ctrl_reg = AW_PID_2066_CRCCTRL_REG;\r
+ aw_pa->crc_check_desc.crc_end_addr_mask = AW_PID_2066_CRC_END_ADDR_MASK;\r
+ aw_pa->crc_check_desc.crc_cfg_check_en_mask = AW_PID_2066_CRC_CFG_EN_MASK;\r
+ aw_pa->crc_check_desc.crc_cfgcheck_disable = AW_PID_2066_CRC_CFGCHECK_DISABLE_VAL;\r
+ aw_pa->crc_check_desc.crc_cfgcheck_enable = AW_PID_2066_CRC_CFGCHECK_ENABLE_VAL;\r
+ aw_pa->crc_check_desc.crc_fw_check_en_mask = AW_PID_2066_CRC_CODE_EN_MASK;\r
+ aw_pa->crc_check_desc.crc_fwcheck_disable = AW_PID_2066_CRC_FWCHECK_DISABLE_VAL;\r
+ aw_pa->crc_check_desc.crc_fwcheck_enable = AW_PID_2066_CRC_FWCHECK_ENABLE_VAL;\r
+\r
+ aw_pa->crc_check_desc.crc_check_reg = AW_PID_2066_HAGCST_REG;\r
+ aw_pa->crc_check_desc.crc_check_mask = AW_PID_2066_CRC_CHECK_BITS_MASK;\r
+ aw_pa->crc_check_desc.crc_check_pass = AW_PID_2066_CRC_CHECK_PASS_VAL;\r
+ aw_pa->crc_check_desc.crc_check_bits_shift = AW_PID_2066_CRC_CHECK_START_BIT;\r
+\r
+ aw_pa->fw_ver_desc.version_reg = AW_PID_2066_FIRMWARE_VERSION_REG;\r
+ aw_pa->fw_ver_desc.data_type = AW_DSP_16_DATA;\r
+\r
+ aw_pa->dither_desc.reg = AW_PID_2066_DBGCTRL_REG;\r
+ aw_pa->dither_desc.mask = AW_PID_2066_DITHER_EN_MASK;\r
+ aw_pa->dither_desc.enable = AW_PID_2066_DITHER_EN_ENABLE_VALUE;\r
+ aw_pa->dither_desc.disable = AW_PID_2066_DITHER_EN_DISABLE_VALUE;\r
+\r
+\r
+ aw883xx->aw_pa = aw_pa;\r
+ ret = aw883xx_device_probe(aw_pa, aw883xx->init_info);\r
+\r
+ return ret;\r
+\r
+}\r
+\r
cpu_trace_enable_mcpu_repeat();
- // otp_init();
uapi_pm_control(PM_SDIO_POWER_UP_AND_RUN);
}
#include "rtc.h"\r
#include "gpio.h"\r
#include "ipc.h"\r
-#include "otp.h"\r
#include "cpu_trace.h"\r
#include "uart_porting.h"\r
#include "log_memory_region.h"\r
\r
log_memory_region_init();\r
\r
- // otp_init();\r
#if ENABLE_LOW_POWER == YES\r
copy_from_flash_to_pm_text();\r
#endif\r
return ERRCODE_SUCC;
}
-void button_report_event_to_gui(int state)
+void button_report_event_to_gui(button_id_t id, uint16_t state)
{
input_dev_data_t data;
if (g_button_event_cb != NULL) {
data.type = INDEV_TYPE_KEY;
- data.keyId = INDEV_KEY_POWER;
- data.state = state; // 1:press 0:release
+ if (id == BUTTON_PWR) {
+ data.keyId = INDEV_KEY_POWER;
+ } else {
+ data.keyId = INDEV_KEY_FUNC;
+ }
+ data.state = state; // 2:longpress 1:press 0:release
g_button_event_cb(&data);
}
}
-static void button_report_event(event_button_t event)
+void button_report_event(button_id_t id, event_button_t event)
{
input_dev_data_t data;
}
button_report_event_to_pms();
#endif
- button_report_event_to_gui(1);
+ button_report_event_to_gui(id, 1); // 1:press
break;
case BUTTON_PWR_CLICKUP:
- button_report_event_to_gui(0);
+ button_report_event_to_gui(id, 0); // 0:release
+ break;
+ case BUTTON_PWR_LONGPRESS_3S:
+ button_report_event_to_gui(id, 2); // 2:longpress
break;
default:
break;
event_button_t event = BUTTON_BUTT;
event = button_event_get(id, state);
#if defined(ENABLE_UIKIT) || defined(ENABLE_LVGL)
- button_report_event(event);
+ button_report_event(id, event);
#endif
if (g_button_common_event_cb[event] != NULL) {
g_button_common_event_cb[event]();
${CMAKE_CURRENT_SOURCE_DIR}/src/SliceTransition.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/TransitionManager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/transition/ZoomTransition.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/transition/HexagonsTransition.cpp
)
set(COMPONENT_PUBLIC_CCFLAGS
#include "Slice.h"
#include "wearable_log.h"
-#include "TransitionManager.h"
+#include "TransitionType.h"
#include "SliceTransition.h"
+#include "soc_osal.h"
namespace OHOS {
const static uint16_t gSliceInvalid = 0;
class Ability {
public:
- Ability() {};
- ~Ability() {};
-
void AddSliceProxy(const uint16_t sliceId, SliceProxy* proxy);
- void ChangeSlice(const uint16_t targetSliceId, const uint16_t transitionId = TRANSITION_INVALID,
+ void ChangeSlice(const uint16_t targetSliceId, TransitionType type = TransitionType::TRANSITION_INVALID,
const uint16_t priority = gSliceDefaultPriority);
-
void SetDefaultSliceId(const uint16_t defaultSliceId) {
defaultSliceId_ = defaultSliceId;
}
+ void OnTransitionEnd();
uint16_t GetCurSliceId(void) {
if (allSlices_.empty()) {
return curSlicePriority_;
}
protected:
+ Ability() = default;
+ virtual ~Ability() = default;
struct ProxyStruct {
uint16_t sliceId;
SliceProxy* proxy;
std::vector<uint16_t> allSlices_;
SliceStruct curSlice_;
+ SliceStruct prevSlice_;
uint16_t defaultSliceId_ = gSliceInvalid;
uint16_t curSlicePriority_ = gSliceDefaultPriority;
SliceTransition sliceTransition_;
+ osal_atomic transitionCount_{0};
void ResumeSlice(const uint16_t priority = gSliceDefaultPriority);
void StartSlice(const uint16_t sliceId, const uint16_t priority);
void StopSlice();
- void ReleaseCurSlice();
- void PostChangeSlice(const uint16_t targetSliceId, const uint16_t transitionId, const uint16_t priority);
+ void PostChangeSlice(const uint16_t targetSliceId, TransitionType type, const uint16_t priority);
ListsNode<Ability::ProxyStruct>* Find(const uint16_t sliceId);
int GetNativeAbilityState() const;
private:
NativeAbility() {}
- ~NativeAbility() {}
+ ~NativeAbility() override {}
int nativeAbilityState_ = 0;
};
}
#define SLICE_TRANSITION_H
#include "Slice.h"
#include "TransitionCallback.h"
+#include "TransitionType.h"
#include "animator/animator.h"
namespace OHOS {
-struct TransitionInfo {
- uint32_t duration;
- TransitionCallback* transitionCallback;
- UIImageView* current;
- UIImageView* target;
-};
class SliceTransition;
class TransitionAnimatorCallback : public AnimatorCallback {
public:
- TransitionAnimatorCallback(SliceTransition* transition) : transition_(transition) {}
+ TransitionAnimatorCallback(SliceTransition* transition) : sliceTransition_(transition) {}
virtual ~TransitionAnimatorCallback() {}
void Callback(UIView* view) override;
void OnStop(UIView& view) override;
- bool SetAnimationInfo(TransitionInfo info);
-
private:
+ bool isStarted_ = false;
uint32_t startTime_ = 0;
- uint32_t elapseTime_ = 0;
- TransitionInfo info_ = {0};
- SliceTransition* transition_ = nullptr;
+ SliceTransition* sliceTransition_ = nullptr;
};
class SliceTransition : public HeapBase {
public:
- SliceTransition();
+ friend class TransitionAnimatorCallback;
+ SliceTransition() {};
~SliceTransition();
- void Transition(Slice* targetSlice, TransitionCallback* transition, uint32_t duration = 800);
- void TransitionEnd();
+ bool SetTransitionType(TransitionType type);
+ void Transition(UIView* current, UIView* target);
+ bool IsCurrentSnapshotEnabled();
bool SaveCurrentSnapshot(UIView* view);
void StopAnimator();
- bool IsRunning()
- {
- return isAnimatorRunning_;
- }
-
- bool needWaitFirstVideoFrame_ = false;
private:
- bool initialized_ = false;
- bool isAnimatorRunning_ = false;
Animator* animator_ = nullptr;
TransitionAnimatorCallback* animatorCallback_ = nullptr;
- UIImageView currentSnapshot_;
- UIImageView targetSnapshot_;
- UIView* targetContainer_ = nullptr;
-
- void clearImgs();
+ UIImageView* currentSnapshot_ = nullptr;
+ UIImageView* targetSnapshot_ = nullptr;
+ UIView* currentView_ = nullptr;
+ UIView* targetView_ = nullptr;
+ TransitionCallback* transitionCallback_ = nullptr;
+ void ClearTransitionResource();
void TransitionStart(TransitionCallback* transition, uint32_t duration);
- bool GetTargetSnapshot(UIView* view);
+ bool SaveTargetSnapshot(UIView* view);
ImageInfo RectifySnapshot(ImageInfo& dstInfo);
- bool IsVideoContained(UIView* view);
};
} // namespace OHOS
#endif // SLICE_TRANSITION_H
namespace OHOS {
class TransitionCallback : public HeapBase {
public:
- TransitionCallback() {}
- virtual ~TransitionCallback() {}
+ /**
+ * @brief constructor of base class for Transition algorithm
+ * Note that:
+ * 1. The transition parameters will impact process flow:
+ * if enableCurrentSnapshot is true and enableTargetSnapshot is true
+ * Snap (current slice) -> OnStop(current slice) -> OnStart(target slice) -> OnResume(target slice)
+ * -> Snap (target slice) -> Add snapshot views -> Transition animator -> Destroy Snapshots
+ * if enableCurrentSnapshot is true and enableTargetSnapshot is false
+ * Snap (current slice) -> OnStop(current slice) -> OnStart(target slice) -> OnResume(target slice)
+ * -> Add snapshot view -> Transition animator -> Destroy Snapshot
+ * if enableCurrentSnapshot is false and enableTargetSnapshot is true
+ * OnStart(target slice) -> OnResume(target slice) -> Snap (target slice)
+ * -> Add snapshot view -> Transition animator -> Destroy Snapshots -> OnStop(current slice)
+ * if enableCurrentSnapshot is true and enableTargetSnapshot is true
+ * OnStart(target slice) -> OnResume(target slice)
+ * -> Transition animator -> OnStop(current slice)
+ * 2. Memory usage is diffrent when using different transition parameters refer to above process flow
+ * - Snapshot will cost memory: stride (of screen) * height (of screen) * 3 (RGB888)
+ * - Start slice will cost new memory usage
+ * - Stop slice will release its memory usage
+ * 3. Diffrent methods are invoked when using different parameters, refer to comments of below methods
+ * @param time Snapshot of current slice
+ * @param enableCurrentSnapshot Whether use snapshot for current slice in the transition
+ * @param enableTargetSnapshot Whether use snapshot for target slice in the transition
+ */
+ TransitionCallback(uint32_t time, bool enableCurrentSnapshot, bool enableTargetSnapshot)
+ {
+ duration_ = time;
+ enableCurrentSnapshot_ = enableCurrentSnapshot;
+ enableTargetSnapshot_ = enableTargetSnapshot;
+ }
+
+ virtual ~TransitionCallback() = default;
+
+ /* *
+ * @brief Invoked when transition start if enableCurrentSnapshot is true and enableTargetSnapshot is true
+ * @param current Snapshot of current slice
+ * @param target Snapshot of target slice
+ * @param time Elapse milliseconds since start time of the transition
+ * Note that:Both current and target UIImageViews are full screen and have aleady been added into Root View,
+ * and target view is on top of current UIImageView. you can modify it in this function if necessary
+ */
+ virtual void OnTransitionStart(UIImageView* current, UIImageView* target) {};
/* *
- * @brief Switch algorithm when slice switching.
- * @param current Snapshot for current slice.
- * @param target Snapshot for target slice.
- * @param time Time elapse to animator start.
- * @param duration Time duration for animation.
- * @since 1.0
- * @version 1.0
+ * @brief Invoked when transition start if enableCurrentSnapshot is true and enableTargetSnapshot is false
+ * @param current Snapshot of current slice
+ * @param target Container view of target slice
+ * @param time Elapse milliseconds since start time of the transition
+ * Note that: Both current and target views have aleady been added into Root View, current UIImageView is full
+ * screen, and current view is on top of target view. you can modify it in this function if necessary
*/
- virtual void TransitionAlg(UIImageView* current, UIImageView* target, uint32_t time, uint32_t duration) {}
+ virtual void OnTransitionStart(UIImageView* current, UIView* target) {};
+
+ /* *
+ * @brief Invoked when transition start if enableCurrentSnapshot is false and enableTargetSnapshot is true
+ * @param current Container view of current slice
+ * @param target Snapshot of target slice
+ * @param time Elapse milliseconds since start time of the transition
+ * Note that: Both current and target views have aleady been added into Root View, target UIImageView is full
+ * screen, and target view is on top of current view. you can modify it in this function if necessary
+ */
+ virtual void OnTransitionStart(UIView* current, UIImageView* target) {};
+
+ /* *
+ * @brief Invoked when transition start if enableCurrentSnapshot is false and enableTargetSnapshot is false
+ * @param current Container view of current slice
+ * @param target Container view of target slice
+ * Note that: Both current and target views have aleady been added into Root View,
+ * and target view is on top of current view. you can modify it in this function if necessary
+ */
+ virtual void OnTransitionStart(UIView* current, UIView* target) {};
+
+ /* *
+ * @brief Invoked in the transition animator
+ * @param time Elapse milliseconds since start time of the transition
+ */
+ virtual void TransitionAlg(uint32_t time) {};
+ /* *
+ * @brief Invoked when the transition ends
+ */
+ virtual void OnTransitionEnd() {};
+
+ uint32_t duration_ = 0;
+ bool enableCurrentSnapshot_ = true;
+ bool enableTargetSnapshot_ = true;
};
} // namespace OHOS
#endif // SLICE_SWITCH_CALLBACK_H
#ifndef TRANSITION_MANAGER_H
#define TRANSITION_MANAGER_H
+#include "gfx_utils/vector.h"
#include "TransitionCallback.h"
+#include "TransitionType.h"
namespace OHOS {
-typedef enum : uint16_t {
- TRANSITION_INVALID = 0,
- TRANSITION_ZOOM = 1,
- TRANSITION_MAX,
-} TransitionId;
+struct TransitionMap {
+ TransitionType type;
+ TransitionCallback* transition;
+};
class TransitionManager : public HeapBase {
public:
- static TransitionCallback* GetTransition(uint16_t id);
+ static TransitionManager& GetInstance()
+ {
+ static TransitionManager instance;
+ return instance;
+ }
+ TransitionCallback* GetTransition(TransitionType type);
+ void RegisterTransition(TransitionType type, TransitionCallback* transition);
+
+private:
+ TransitionManager() {};
+ ~TransitionManager();
+ TransitionManager(const TransitionManager &) = delete;
+ TransitionManager &operator=(const TransitionManager &) = delete;
+ TransitionManager(TransitionManager &&) = delete;
+ TransitionManager &operator=(TransitionManager &&) = delete;
+ Graphic::Vector<TransitionMap> transitions_;
+};
+
+class TransitionRegister : public HeapBase {
+public:
+ TransitionRegister(TransitionType type, TransitionCallback* transition)
+ {
+ TransitionManager::GetInstance().RegisterTransition(type, transition);
+ }
};
} // namespace OHOS
+
+#define REGIST_TRANSITION(type, func, time, enableCurSnapShot, enableTargetSnapShot) \
+ const static OHOS::TransitionRegister (STATIC_VAR)(type, new func(time, enableCurSnapShot, enableTargetSnapShot))
#endif // TRANSITION_MANAGER_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2024. All rights reserved.
+ * Description: Transition
+ * Author:
+ * Create: 2024-03
+ */
+
+#ifndef TRANSITION_TYPES_H
+#define TRANSITION_TYPES_H
+namespace OHOS {
+enum class TransitionType {
+ TRANSITION_INVALID = 0,
+ TRANSITION_ZOOM,
+ TRANSITION_HEXAGONS,
+ TRANSITION_MAX
+};
+}
+#endif
\ No newline at end of file
#include "Ability.h"
#include "graphic_service.h"
#include "abilityms_slite_client.h"
+#include "common/input_device_manager.h"
namespace OHOS {
void Ability::AddSliceProxy(const uint16_t sliceId, SliceProxy* proxy)
{
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::AddSliceProxy sliceId = %d", sliceId);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::AddSliceProxy sliceId = %d", sliceId);
if (sliceId <= gSliceInvalid || proxy == nullptr) {
return;
}
void Ability::StartSlice(const uint16_t sliceId, const uint16_t priority)
{
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::StartSlice sliceId = %d", sliceId);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::StartSlice sliceId = %d", sliceId);
if (sliceId <= gSliceInvalid) {
return;
}
if (node == nullptr) {
return;
}
-
+ InputDeviceManager::GetInstance()->ClearPressableViews();
Slice* nextSlice = node->value_.proxy->CreateSlice();
if (nextSlice == nullptr) {
return;
}
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::StartSlice Size = %d", allSlices_.size());
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::StartSlice Size = %d", allSlices_.size());
// 记录最多gMaxHistorySlices个页面id
if (allSlices_.size() == gMaxHistorySlices) {
allSlices_.erase(allSlices_.begin());
}
allSlices_.push_back(sliceId);
+ if (curSlice_.slice != nullptr) {
+ prevSlice_.sliceId = curSlice_.sliceId;
+ prevSlice_.slice = curSlice_.slice;
+ }
curSlice_.sliceId = sliceId;
curSlice_.slice = nextSlice;
nextSlice->OnResume();
}
-void Ability::ReleaseCurSlice() {
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::ReleaseCurSlice");
- if (curSlice_.slice != nullptr) {
- curSlice_.sliceId = gSliceInvalid;
- delete curSlice_.slice;
- curSlice_.slice = nullptr;
- }
-
- curSlicePriority_ = gSliceDefaultPriority;
-}
-
ListsNode<Ability::ProxyStruct>* Ability::Find(const uint16_t sliceId)
{
if (sliceId <= gSliceInvalid) {
return nullptr;
}
-void Ability::ChangeSlice(const uint16_t targetSliceId, const uint16_t transitionId, const uint16_t priority)
+void Ability::ChangeSlice(const uint16_t targetSliceId, TransitionType type, const uint16_t priority)
{
- if (sliceTransition_.IsRunning()) {
- return;
+ if (osal_atomic_read(&transitionCount_) <= 0) {
+ osal_atomic_inc(&transitionCount_);
+ GraphicService::GetInstance()->PostGraphicEvent(std::bind(&Ability::PostChangeSlice, this, targetSliceId,
+ type, priority));
}
- // onStop释放当前页面需要和当前页面的事件监听异步执行,否则会出现自己杀掉自己的情况
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&Ability::PostChangeSlice, this, targetSliceId,
- transitionId, priority));
}
-void Ability::PostChangeSlice(const uint16_t targetSliceId, const uint16_t transitionId, const uint16_t priority)
+void Ability::PostChangeSlice(const uint16_t targetSliceId, TransitionType type, const uint16_t priority)
{
- if (curSlice_.slice != nullptr && transitionId > TRANSITION_INVALID && transitionId < TRANSITION_MAX) {
- sliceTransition_.SaveCurrentSnapshot(curSlice_.slice->GetSliceContainer());
+ bool useTransition = sliceTransition_.SetTransitionType(type);
+ bool isCurSnapshotEnabled = sliceTransition_.IsCurrentSnapshotEnabled();
+
+ if (!useTransition) {
+ StopSlice();
+ } else if (isCurSnapshotEnabled) {
+ if (!sliceTransition_.SaveCurrentSnapshot(curSlice_.slice->GetSliceContainer())) {
+ useTransition = false;
+ }
+ StopSlice();
}
// slice页面跳转,先onstop,再onstart.在一个线程同步执行绘制,不会出现闪屏现象
- StopSlice();
#ifdef JS_ENABLE
ElementName *elementName = OHOS::AbilityMsClient::GetInstance().GetTopAbility();
if (strcmp(elementName->bundleName, "com.huawei.launcher") != 0) {
}
#endif
StartSlice(targetSliceId, priority);
- if (transitionId > TRANSITION_INVALID && transitionId < TRANSITION_MAX) {
- sliceTransition_.Transition(curSlice_.slice, TransitionManager::GetTransition(transitionId));
+
+ if (useTransition) {
+ if (isCurSnapshotEnabled) {
+ sliceTransition_.Transition(nullptr, curSlice_.slice->GetSliceContainer());
+ } else {
+ sliceTransition_.Transition(prevSlice_.slice->GetSliceContainer(), curSlice_.slice->GetSliceContainer());
+ }
+ } else {
+ osal_atomic_dec(&transitionCount_);
}
+}
+void Ability::OnTransitionEnd()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::OnTransitionEnd");
+ if (!sliceTransition_.IsCurrentSnapshotEnabled()) {
+ if (prevSlice_.slice != nullptr) {
+ prevSlice_.slice->OnStop();
+ if (prevSlice_.slice != nullptr) {
+ prevSlice_.sliceId = gSliceInvalid;
+ delete prevSlice_.slice;
+ prevSlice_.slice = nullptr;
+ }
+ }
+ }
+ osal_atomic_dec(&transitionCount_);
}
void Ability::ResumeSlice(const uint16_t priority)
void Ability::StopSlice()
{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::StopSlice");
if (curSlice_.slice != nullptr) {
curSlice_.slice->OnStop();
- ReleaseCurSlice();
+ if (curSlice_.slice != nullptr) {
+ curSlice_.sliceId = gSliceInvalid;
+ delete curSlice_.slice;
+ curSlice_.slice = nullptr;
+ }
+
+ curSlicePriority_ = gSliceDefaultPriority;
}
}
-
} // namespace OHOS
#include "draw/clip_img.h"
#include "components/root_view.h"
#include "SliceTransition.h"
+#include "TransitionManager.h"
+#include "NativeAbility.h"
namespace OHOS {
static UILiteSurfaceView* g_surface = nullptr;
void TransitionAnimatorCallback::Callback(UIView* view)
{
- elapseTime_ = HALTick::GetInstance().GetElapseTime(startTime_);
- if (elapseTime_ > info_.duration) {
- elapseTime_ = info_.duration;
- }
- if (transition_->needWaitFirstVideoFrame_) {
- if ((g_surface == nullptr) || ((g_surface != nullptr) && g_surface->IsFirstFrameCame())) {
- transition_->StopAnimator();
+ TransitionCallback* callback = sliceTransition_->transitionCallback_;
+ if (!isStarted_) {
+ if (callback->enableCurrentSnapshot_ && callback->enableTargetSnapshot_) {
+ callback->OnTransitionStart(sliceTransition_->currentSnapshot_, sliceTransition_->targetSnapshot_);
+ } else if (callback->enableCurrentSnapshot_ && !callback->enableTargetSnapshot_) {
+ callback->OnTransitionStart(sliceTransition_->currentSnapshot_, sliceTransition_->targetView_);
+ } else if (!callback->enableCurrentSnapshot_ && callback->enableTargetSnapshot_) {
+ callback->OnTransitionStart(sliceTransition_->currentView_, sliceTransition_->targetSnapshot_);
+ } else {
+ callback->OnTransitionStart(sliceTransition_->currentView_, sliceTransition_->targetView_);
}
- } else {
- info_.transitionCallback->TransitionAlg(info_.current, info_.target, elapseTime_, info_.duration);
+ startTime_ = HALTick::GetInstance().GetTime();
+ isStarted_ = true;
}
-}
-void TransitionAnimatorCallback::OnStop(UIView& view)
-{
- transition_->TransitionEnd();
-}
-
-bool TransitionAnimatorCallback::SetAnimationInfo(TransitionInfo info)
-{
- if (info.current == nullptr || info.target == nullptr) {
- return false;
+ uint32_t elapseTime = HALTick::GetInstance().GetElapseTime(startTime_);
+ if (elapseTime > callback->duration_) {
+ sliceTransition_->StopAnimator();
+ return;
}
-
- info_ = info;
- startTime_ = HALTick::GetInstance().GetTime();
- return true;
+ callback->TransitionAlg(elapseTime);
}
-SliceTransition::SliceTransition()
+void TransitionAnimatorCallback::OnStop(UIView& view)
{
- animatorCallback_ = new TransitionAnimatorCallback(this);
- if (animatorCallback_ == nullptr) {
- return;
- }
- animator_ = new Animator(animatorCallback_, nullptr, 0, false);
- if (animator_ == nullptr) {
- delete animatorCallback_;
- animatorCallback_ = nullptr;
- return;
- }
-
- currentSnapshot_.SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
- targetSnapshot_.SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
- initialized_ = true;
+ isStarted_ = false;
+ sliceTransition_->transitionCallback_->OnTransitionEnd();
}
SliceTransition::~SliceTransition()
delete animatorCallback_;
animatorCallback_ = nullptr;
}
- clearImgs();
+ ClearTransitionResource();
}
-void SliceTransition::clearImgs()
+void SliceTransition::ClearTransitionResource()
{
- if (currentSnapshot_.GetImageInfo() != nullptr && currentSnapshot_.GetImageInfo()->data != nullptr) {
- ImageCacheFree(*const_cast<ImageInfo *>(currentSnapshot_.GetImageInfo()));
+ if (currentSnapshot_->GetImageInfo() != nullptr && currentSnapshot_->GetImageInfo()->data != nullptr) {
+ ImageCacheFree(*const_cast<ImageInfo *>(currentSnapshot_->GetImageInfo()));
+ }
+
+ if (targetSnapshot_->GetImageInfo() != nullptr && targetSnapshot_->GetImageInfo()->data != nullptr) {
+ ImageCacheFree(*const_cast<ImageInfo *>(targetSnapshot_->GetImageInfo()));
}
+ if (currentSnapshot_ != nullptr) {
+ delete currentSnapshot_;
+ currentSnapshot_ = nullptr;
+ }
+ if (targetSnapshot_ != nullptr) {
+ delete targetSnapshot_;
+ targetSnapshot_ = nullptr;
+ }
+ currentView_ = nullptr;
+ targetView_ = nullptr;
+ transitionCallback_ = nullptr;
+}
- if (targetSnapshot_.GetImageInfo() != nullptr && targetSnapshot_.GetImageInfo()->data != nullptr) {
- ImageCacheFree(*const_cast<ImageInfo *>(targetSnapshot_.GetImageInfo()));
+bool SliceTransition::SetTransitionType(TransitionType type)
+{
+ transitionCallback_ = TransitionManager::GetInstance().GetTransition(type);
+ if (transitionCallback_ == nullptr) {
+ return false;
}
+ return true;
+}
+
+bool SliceTransition::IsCurrentSnapshotEnabled()
+{
+ if (transitionCallback_ == nullptr) {
+ return false;
+ }
+ return transitionCallback_->enableCurrentSnapshot_;
}
ImageInfo SliceTransition::RectifySnapshot(ImageInfo& srcInfo)
if (Screen::GetInstance().GetScreenShape() == CIRCLE) {
int16_t radius = Screen::GetInstance().GetWidth() / 2; // 2: half of width/height
ImageInfo dstInfo = {{0}};
- dstInfo = ClipImg::ClipImgByCircle(srcInfo, nullptr, { radius, radius }, radius, ARGB8888);
+ dstInfo = ClipImg::ClipImgByCircle(srcInfo, { radius, radius }, radius, ARGB8888, true);
if (dstInfo.data == nullptr) {
return srcInfo;
} else {
}
}
-bool SliceTransition::IsVideoContained(UIView* view)
-{
- while (view != nullptr) {
- UIView* tempView = view;
- view = view->GetNextSibling();
- if (tempView->GetViewType() == UI_LITE_SURFACE_VIEW) {
- g_surface = dynamic_cast<UILiteSurfaceView*>(tempView);
- return true;
- }
- if (tempView->IsViewGroup()) {
- if (IsVideoContained(static_cast<UIViewGroup*>(tempView)->GetChildrenHead())) {
- return true;
- }
- }
- }
- return false;
-}
-
bool SliceTransition::SaveCurrentSnapshot(UIView* view)
{
- if (!initialized_ || view == nullptr) {
+ if (view == nullptr) {
+ return false;
+ }
+ currentSnapshot_ = new UIImageView();
+ if (currentSnapshot_ == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "currentSnapshot new failed");
return false;
}
ImageInfo info = {{0}};
- if (RootView::GetInstance()->isSystemViewEmpty() && !IsVideoContained(view)) {
+ if (RootView::GetInstance()->isSystemViewEmpty() && !view->IsVideoContained()) {
if (!Screen::GetInstance().GetCurrentScreenBitmap(info)) {
return false;
}
}
}
ImageInfo rectifiedInfo = RectifySnapshot(info);
- currentSnapshot_.SetSrc(&rectifiedInfo);
+ currentSnapshot_->SetSrc(&rectifiedInfo);
return true;
}
-bool SliceTransition::GetTargetSnapshot(UIView* view)
+bool SliceTransition::SaveTargetSnapshot(UIView* view)
{
ImageInfo info = {{0}};
if (!view->GetBitmap(info)) {
return false;
}
ImageInfo rectifiedInfo = RectifySnapshot(info);
- targetSnapshot_.SetSrc(&rectifiedInfo);
+ targetSnapshot_ = new UIImageView();
+ if (targetSnapshot_ == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "targetSnapshot new failed");
+ return false;
+ }
+ targetSnapshot_->SetSrc(&rectifiedInfo);
return true;
}
-void SliceTransition::Transition(Slice* targetSlice, TransitionCallback* transition, uint32_t duration)
+void SliceTransition::Transition(UIView* current, UIView* target)
{
- if (targetSlice == nullptr || targetSlice->GetSliceContainer() == nullptr || transition == nullptr || !initialized_ ||
- (currentSnapshot_.GetImageInfo() != nullptr && currentSnapshot_.GetImageInfo()->data == nullptr)) {
- clearImgs();
+ if (animatorCallback_ == nullptr) {
+ animatorCallback_ = new TransitionAnimatorCallback(this);
+ }
+
+ if (animator_ == nullptr) {
+ animator_ = new Animator(animatorCallback_, nullptr, 0, true);
+ }
+
+ if ((target == nullptr || transitionCallback_ == nullptr) ||
+ (!transitionCallback_->enableCurrentSnapshot_ && (current == nullptr))) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "SliceTransition::Transition curV:%d tarV:%d",
+ current != nullptr, target != nullptr);
+ NativeAbility::GetInstance().OnTransitionEnd();
+ ClearTransitionResource();
return;
}
+ currentView_ = current;
+ targetView_ = target;
- targetContainer_ = targetSlice->GetSliceContainer();
- if (IsVideoContained(targetContainer_)) {
- needWaitFirstVideoFrame_ = true;
- } else {
- if (!GetTargetSnapshot(targetContainer_)) {
- clearImgs();
+ if (transitionCallback_->enableTargetSnapshot_) {
+ if (!SaveTargetSnapshot(target)) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "SliceTransition target snap failed");
+ NativeAbility::GetInstance().OnTransitionEnd();
+ ClearTransitionResource();
return;
}
}
+ animator_->Start();
- TransitionStart(transition, duration);
+ if (transitionCallback_->enableCurrentSnapshot_) {
+ currentSnapshot_->SetPosition(0, 0, Screen::GetInstance().GetWidth(),
+ Screen::GetInstance().GetHeight());
+ RootView::GetInstance()->Add(currentSnapshot_);
+ }
+
+ if (transitionCallback_->enableTargetSnapshot_) {
+ targetView_->SetVisible(false);
+ targetSnapshot_->SetPosition(0, 0, Screen::GetInstance().GetWidth(),
+ Screen::GetInstance().GetHeight());
+ RootView::GetInstance()->Add(targetSnapshot_);
+ }
}
void SliceTransition::StopAnimator()
{
animator_->Stop();
-}
-
-void SliceTransition::TransitionStart(TransitionCallback* transition, uint32_t duration)
-{
- TransitionInfo info;
- info.current = ¤tSnapshot_;
- info.target = &targetSnapshot_;
- info.duration = (duration != 0) ? duration : 800; // 800: default duration
- info.transitionCallback = transition;
- if (animatorCallback_->SetAnimationInfo(info)) {
- animator_->SetTime(info.duration);
- animator_->Start();
- isAnimatorRunning_ = true;
- } else {
- clearImgs();
- return;
+ NativeAbility::GetInstance().OnTransitionEnd();
+ if (transitionCallback_->enableCurrentSnapshot_) {
+ RootView::GetInstance()->Remove(currentSnapshot_);
}
- targetContainer_->SetVisible(false);
- RootView::GetInstance()->Add(¤tSnapshot_);
- if (!needWaitFirstVideoFrame_) {
- RootView::GetInstance()->Add(&targetSnapshot_);
- }
-}
-void SliceTransition::TransitionEnd(void)
-{
- clearImgs();
- isAnimatorRunning_ = false;
- RootView::GetInstance()->Remove(¤tSnapshot_);
- if (!needWaitFirstVideoFrame_) {
- RootView::GetInstance()->Remove(&targetSnapshot_);
- }
- needWaitFirstVideoFrame_ = false;
- g_surface = nullptr;
- targetContainer_->SetVisible(true);
+ if (transitionCallback_->enableTargetSnapshot_) {
+ RootView::GetInstance()->Remove(targetSnapshot_);
+ targetView_->SetVisible(true);
+ }
+ ClearTransitionResource();
}
} // namespace OHOS
#include "TransitionManager.h"
#include "ZoomTransition.h"
+#include "gfx_utils/vector.h"
namespace OHOS {
-struct TransitionMapper {
- uint16_t id;
- TransitionCallback* obj;
-};
-
-static const TransitionMapper TRANSITION_MAPPER[] = {
- {TRANSITION_ZOOM, new ZoomTransition()},
-};
+TransitionManager::~TransitionManager()
+{
+ for(uint16_t i =0; i < transitions_.Size(); i++) {
+ if (transitions_[i].transition != nullptr) {
+ delete transitions_[i].transition;
+ transitions_[i].transition = nullptr;
+ }
+ }
+}
-TransitionCallback* TransitionManager::GetTransition(uint16_t id)
+TransitionCallback* TransitionManager::GetTransition(TransitionType type)
{
- uint16_t size = sizeof(TRANSITION_MAPPER) / sizeof(TRANSITION_MAPPER[0]);
- for (int index = 0; index < size; index++) {
- if ((TRANSITION_MAPPER[index].id == id)) {
- return TRANSITION_MAPPER[index].obj;
+ for(uint16_t i =0; i < transitions_.Size(); i++) {
+ if (transitions_[i].type == type) {
+ return transitions_[i].transition;
}
}
return nullptr;
}
+
+void TransitionManager::RegisterTransition(TransitionType type, TransitionCallback* transition)
+{
+ if (transition == nullptr) {
+ GRAPHIC_LOGE("transition can't be nullptr");
+ return;
+ }
+ for(uint16_t i =0; i < transitions_.Size(); i++) {
+ if (transitions_[i].type == type) {
+ GRAPHIC_LOGE("RegisterTransition failed because type %d already registered", type);
+ return;
+ }
+ }
+ GRAPHIC_LOGI("register transition %d", type);
+ TransitionMap map = {type, transition};
+ transitions_.PushBack(map);
+}
} // namespace OHOS
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2024. All rights reserved.
+ * Description: ZoomTransition
+ * Author:
+ * Create: 2024-04
+ */
+
+#include "HexagonsTransition.h"
+#include "animator/easing_equation.h"
+#include "components/root_view.h"
+#include "TransitionManager.h"
+
+namespace OHOS {
+REGIST_TRANSITION(TransitionType::TRANSITION_HEXAGONS, HexagonsTransition, 800, false, true);
+static constexpr int16_t RANGE = 1000;
+static const float HEXAGONS_SCALE_INIT = 1.0f;
+static const float HEXAGONS_SCALE_END = 2.5f;
+static const float HEXAGONS_OPA_START = 255;
+static const float HEXAGONS_OPA_END = 0;
+
+void HexagonsTransition::OnTransitionStart(UIView* current, UIImageView* target)
+{
+ current_ = dynamic_cast<UICustomHexagonsList*>(current);
+ if (current_ == nullptr) {
+ return;
+ }
+ target_ = target;
+ int8_t index = current_->GetFocusedImgIndex();
+ if (index <= 0) {
+ focusIndex_ = 0;
+ } else {
+ focusIndex_ = static_cast<uint8_t>(index);
+ }
+ focusView_ = dynamic_cast<UIImageView*>(current_->GetViewByIndex(focusIndex_));
+ if (focusView_ == nullptr) {
+ return;
+ }
+ current_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);
+ Vector2<int16_t> delta = Vector2<int16_t>(current_->GetWidth() / 2, current_->GetHeight() / 2) -
+ current_->GetCurrentPosition(focusIndex_);
+ scaleStart_ = current_->GetGlobalScale();
+ opaStart_ = current->GetOpaScale();
+ uint32_t offsetTime = static_cast<uint32_t>((scaleStart_ - HEXAGONS_SCALE_INIT) /
+ (HEXAGONS_SCALE_END - HEXAGONS_SCALE_INIT) * duration_ * 0.5f); // 0.5 half of duration
+ durationBackup_ = duration_;
+ duration_ = duration_ - offsetTime;
+ xDistance_ = delta.x_;
+ yDistance_ = delta.y_;
+ prevX_ = 0;
+ prevY_ = 0;
+
+ // put target image view in the background
+ RootView::GetInstance()->Remove(target);
+ RootView::GetInstance()->Insert(nullptr, target);
+}
+
+void HexagonsTransition::TransitionAlg(uint32_t time)
+{
+ if ((current_ == nullptr) || (target_== nullptr) || (focusView_ == nullptr)) {
+ return;
+ }
+ float timeRatio = time * 1.0f / duration_;
+ if (FloatLessEqual(timeRatio, 0.5f)) { // 0.5f, half of transition
+ float hexagonsRatio = 2 * timeRatio;
+ int16_t curX = static_cast<int16_t>(hexagonsRatio * xDistance_);
+ int16_t curY = static_cast<int16_t>(hexagonsRatio * yDistance_);
+ current_->ScrollBy(curX - prevX_, curY - prevY_);
+ prevX_ = curX;
+ prevY_ = curY;
+
+ float curScale = hexagonsRatio * (HEXAGONS_SCALE_END - scaleStart_) + scaleStart_;
+ uint8_t opa = hexagonsRatio * (HEXAGONS_OPA_END - opaStart_) + opaStart_;
+ focusView_->SetOpaScale(opa);
+ current_->Scale(curScale, focusIndex_);
+ Rect rect = focusView_->GetRect();
+ target_->SetPosition(rect.GetX(), rect.GetY());
+ targetMiddleScale_ = Vector2<float>(rect.GetWidth() * 1.0f / target_->GetWidth(),
+ rect.GetHeight() * 1.0f / target_->GetHeight());
+ target_->Scale(targetMiddleScale_, Vector2<float>(0.0f, 0.0f));
+ } else if (FloatLessEqual(timeRatio, 1.0f)) {
+ current_->SetVisible(false);
+ Vector2<float> targetScale = {2 * (timeRatio - 0.5f) * (1.0f - targetMiddleScale_.x_) + targetMiddleScale_.x_,
+ 2 * (timeRatio - 0.5f) * (1.0f - targetMiddleScale_.y_) + targetMiddleScale_.y_};
+ target_->SetPosition(0, 0);
+ target_->Scale(targetScale, Vector2<float>(target_->GetWidth() / 2.0f, target_->GetHeight() / 2.0f));
+ }
+}
+
+void HexagonsTransition::OnTransitionEnd()
+{
+ duration_ = durationBackup_;
+}
+
+} // namespace OHOS
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2024. All rights reserved.
+ * Description: ZoomTransition
+ * Author:
+ * Create: 2024-04
+ */
+
+#ifndef HEXAGONS_TRASITION_H
+#define HEXAGONS_TRASITION_H
+#include "TransitionCallback.h"
+#include "components/ui_custom_hexagons_list.h"
+
+namespace OHOS {
+class HexagonsTransition : public TransitionCallback {
+public:
+ HexagonsTransition(uint32_t time, bool enableCurrentSnapshot, bool enableTargetSnapshot) :
+ TransitionCallback(time, enableCurrentSnapshot, enableTargetSnapshot) {}
+ ~HexagonsTransition() override {}
+ void OnTransitionStart(UIView* current, UIImageView* target) override;
+ void TransitionAlg(uint32_t time) override;
+ void OnTransitionEnd() override;
+private:
+ uint32_t durationBackup_ = 0;
+ UICustomHexagonsList* current_ = nullptr;
+ UIImageView* target_ = nullptr;
+ UIImageView* focusView_ = nullptr;
+ Vector2<float> targetMiddleScale_ = {0, 0};
+ uint8_t focusIndex_ = 0;
+ float scaleStart_ = 1.0f;
+ uint8_t opaStart_ = 255;
+ int16_t xDistance_ = 0;
+ int16_t yDistance_ = 0;
+ int16_t prevX_ = 0;
+ int16_t prevY_ = 0;
+};
+} // namespace OHOS
+#endif
\ No newline at end of file
* Create: 2023-11
*/
-#include "animator/easing_equation.h"
#include "ZoomTransition.h"
+#include "animator/easing_equation.h"
+#include "TransitionManager.h"
namespace OHOS {
static constexpr int16_t RANGE = 1000;
-void ZoomTransition::TransitionAlg(UIImageView* current, UIImageView* target, uint32_t time, uint32_t duration)
+REGIST_TRANSITION(TransitionType::TRANSITION_ZOOM, ZoomTransition, 800, true, true);
+
+void ZoomTransition::OnTransitionStart(UIImageView* current, UIImageView* target)
+{
+ current_ = current;
+ target_ = target;
+}
+
+void ZoomTransition::TransitionAlg(uint32_t time)
{
+ if ((current_ == nullptr) || (target_ == nullptr)) {
+ return;
+ }
+
float scale;
- uint32_t half = duration / 2; // 2: half of duration
+ uint32_t half = duration_ / 2; // 2: half of duration
if (time < half) {
scale = 1 - EasingEquation::QuadEaseOut(0, RANGE, time, half) / static_cast<float>(RANGE);
} else {
}
uint8_t opa = scale * OPA_OPAQUE;
if (time < half) {
- int16_t centerX = current->GetX() + current->GetWidth() / 2; // 2: half of width
- int16_t centerY = current->GetY() + current->GetHeight() / 2; // 2: half of height
- current->SetVisible(true);
- target->SetVisible(false);
- current->Scale(Vector2<float>{scale, scale}, Vector2<float>{centerX, centerY});
- current->SetOpaScale(opa);
+ int16_t centerX = current_->GetX() + current_->GetWidth() / 2; // 2: half of width
+ int16_t centerY = current_->GetY() + current_->GetHeight() / 2; // 2: half of height
+ current_->SetVisible(true);
+ target_->SetVisible(false);
+ current_->Scale(Vector2<float>{scale, scale}, Vector2<float>{centerX, centerY});
+ current_->SetOpaScale(opa);
} else {
- int16_t centerX = target->GetX() + target->GetWidth() / 2; // 2: half of width
- int16_t centerY = target->GetY() + target->GetHeight() / 2; // 2: half of height
- target->SetVisible(true);
- current->SetVisible(false);
- target->Scale(Vector2<float>{scale, scale}, Vector2<float>{centerX, centerY});
- target->SetOpaScale(opa);
+ int16_t centerX = target_->GetX() + target_->GetWidth() / 2; // 2: half of width
+ int16_t centerY = target_->GetY() + target_->GetHeight() / 2; // 2: half of height
+ target_->SetVisible(true);
+ current_->SetVisible(false);
+ target_->Scale(Vector2<float>{scale, scale}, Vector2<float>{centerX, centerY});
+ target_->SetOpaScale(opa);
}
}
} // namespace OHOS
namespace OHOS {
class ZoomTransition : public TransitionCallback {
public:
- ZoomTransition(void) {}
- virtual ~ZoomTransition() override {}
- void TransitionAlg(UIImageView* current, UIImageView* target, uint32_t time, uint32_t duration) override;
+ ZoomTransition(uint32_t time, bool enableCurrentSnapshot, bool enableTargetSnapshot) :
+ TransitionCallback(time, enableCurrentSnapshot, enableTargetSnapshot) {}
+ ~ZoomTransition() override {}
+ void OnTransitionStart(UIImageView* current, UIImageView* target) override;
+ void TransitionAlg(uint32_t time) override;
+private:
+ UIImageView* current_ = nullptr;
+ UIImageView* target_ = nullptr;
};
} // namespace OHOS
#endif // ZOOM_TRANSITION_H
\ No newline at end of file
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/temperature/include
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/offlinevoice/include
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/settings/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_desktop/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_card/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/add_card/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_dial/include
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/key/include
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/player/include
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/applist/include
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audiomanager/interfaces/kits/audiocommon
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/player/interfaces/kits/
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/utils/include
+ ${ROOT_DIR}/open_source/openharmony/utils/native/lite/include
+ ${ROOT_DIR}/open_source/openharmony/utils/native/lite/kv_store/innerkits
)
set(SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/nativelauncher/src/slices/main/MainPresenter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativelauncher/src/slices/main/MainView.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/MainViewSample.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/MainModel.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/MainPresenterSample.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/ModelListenerSample.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/PresenterTask.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/settings/src/SettingView.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/settings/src/SettingModel.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/settings/src/SettingItemView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_desktop/src/SetDesktopModel.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_desktop/src/SetDesktopPresenter.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_desktop/src/SetDesktopView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_card/src/SetCardAdapter.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_card/src/SetCardItem.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_card/src/SetCardModel.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_card/src/SetCardPresenter.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_card/src/SetCardView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_card/src/SetCardNoCardView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_card/src/SetCardDeleteView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/add_card/src/AddCardAdapter.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/add_card/src/AddCardItem.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/add_card/src/AddCardModel.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/add_card/src/AddCardPresenter.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/add_card/src/AddCardView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_dial/src/SetDialModel.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_dial/src/SetDialPresenter.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/set_dial/src/SetDialView.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/key/src/KeyInputListener.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/compass/src/CompassControlView.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/compass/src/CompassCalibrationView.cpp
${UI_SAMPLE_ROOT}/components/ui_test_cube_rotate/cube_rotate_view.cpp
${UI_SAMPLE_ROOT}/components/ui_test_cube_rotate/ui_test_cube_rotate.cpp
${UI_SAMPLE_ROOT}/components/ui_test_video_play/ui_test_video_play.cpp
+ ${UI_SAMPLE_ROOT}/components/ui_test_hexagons_list/ui_test_hexagons_list.cpp
+ ${UI_SAMPLE_ROOT}/components/ui_test_coverflow/ui_test_coverflow.cpp
+ ${UI_SAMPLE_ROOT}/components/ui_test_kaleidoscope/ui_test_kaleidoscope.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/dial/DialRotateImgView.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/dial/DialOptionImgView.cpp
-nostdlib
-Wno-c++11-narrowing
-Wno-error=unused-function
+ -Wno-missing-field-initializers
)
set(WHOLE_LINK
#ifdef SUPPORT_ALIPAY_SEC
VIEW_MAIN_ALIPAY,
#endif
+ VIEW_SET_DESKTOP,
+ VIEW_SET_CARD,
+ VIEW_ADD_CARD,
+ VIEW_SET_DIAL,
VIEW_MAX_INTER_APP, // 在此之前添加native应用ID.
VIEW_EXTERN_APP = 0xFFFE, // 三方应用
VIEW_INVALIDE_APP = 0xFFFF,
void InitRebootSlice(void);
void InitUISampleSlice(void);
void InitMainAlipaySlice(void);
+ void InitSetDesktopSlice(void);
+ void InitSetCardSlice(void);
+ void InitAddCardSlice(void);
+ void InitSetDialSlice(void);
private:
void InitAllNativeSlices(void);
#include "graphic_config.h"
namespace OHOS {
+ static const int CARD_SETTING_COUNT_MAX = 5;
+ typedef enum {
+ WATCH_FACE = 0, /* 主表盘枚举值不能修改 */
+ HEART_RATE,
+ COMPASS,
+ ACTIVITY,
+ MUSIC_PLAYER,
+ MAX_CARD,
+ } CardId;
+
+ typedef enum {
+ DIAL_CLOCK = 0,
+ DIAL_MAX,
+ } DialId;
+
#ifndef UNUSED
#define UNUSED(x) ((void)(x))
#endif
#define APP_RES_PATH "/user/res"
#define APP_MUSIC_PATH "/user/music"
#define APP_VIDEO_PATH "/user/video"
+ #define APP_DIAL_PATH "/user/dial"
static constexpr const char *CARD_CONFIG_PATH = "/user/cardconfig.bin";
static constexpr const char *PNG_SHUTDOWN_BUTTON_IMAGE = APP_RES_PATH"/SHUTDOWN_BUTTON.bin";
static constexpr const char *PNG_SETTTING_REBOOT_IMAGE = APP_RES_PATH"/SETTTING_REBOOT.bin";
static constexpr const char *PNG_SETTTING_SHUTDOWN_IMAGE = APP_RES_PATH"/SETTTING_SHUTDOWN.bin";
+ static constexpr const char *PNG_SETTTING_DESKTOP_IMAGE = APP_RES_PATH"/SETTTING_DESKTOP.bin";
+ static constexpr const char *PNG_SET_DESKTOP_LIST_IMAGE = APP_RES_PATH"/SET_DESKTOP_LIST.bin";
+ static constexpr const char *PNG_SET_DESKTOP_HEXAGONS_IMAGE = APP_RES_PATH"/SET_DESKTOP_HEXAGONS.bin";
+ static constexpr const char *PNG_SET_DESKTOP_BG_IMAGE = APP_RES_PATH"/SET_DESKTOP_BG.bin";
static constexpr const char *PNG_CONNECT_PHONE_IMAGE = APP_RES_PATH"/CONNECT_PHONE.bin";
static constexpr const char *PNG_BLUETOOTH_STITLE = APP_RES_PATH"/BLUETOOTH_TITLE.bin";
static constexpr const char *PNG_WALK_STEPS_IMAGE = APP_RES_PATH"/STEPS_IMAGE.bin";
static constexpr const char *PNG_APPLIST_UI_SAMPLE_IMAGE = APP_RES_PATH"/APPLIST_UI_SAMPLE.bin"; // Applist图标
+
+ static constexpr const char *PNG_SET_CARD_ADD = APP_RES_PATH"/CARD_ADD.bin";
+ static constexpr const char *PNG_SET_CARD_DEL = APP_RES_PATH"/CARD_DEL.bin";
+ static constexpr const char *PNG_SET_CARD_HEART = APP_RES_PATH"/CARD_HEART.bin";
+ static constexpr const char *PNG_SET_CARD_COMPASS = APP_RES_PATH"/CARD_COMPASS.bin";
+ static constexpr const char *PNG_SET_CARD_ACTIVITY = APP_RES_PATH"/CARD_ACTIVITY.bin";
+ static constexpr const char *PNG_SET_CARD_PLAYER = APP_RES_PATH"/CARD_PLAYER.bin";
+
+ static constexpr const char *PNG_SET_DIAL_CLOCK = APP_RES_PATH"/DIAL_CLOCK.bin";
}
#endif // UI_CONFIG_H
class MainPresenter : public Presenter<MainView> {
public:
MainPresenter();
- virtual ~MainPresenter();
+ ~MainPresenter() override;
void OnStart() override;
void OnPause() override;
class MainView : public View<MainPresenter> {
public:
MainView();
- virtual ~MainView();
+ ~MainView() override;
void OnStart() override;
void OnSetUpView() override;
#include "AlipayMainView.h"
#include "AlipayPresenter.h"
#endif
+#include "SetDesktopView.h"
+#include "SetDesktopPresenter.h"
+#include "SetCardView.h"
+#include "SetCardPresenter.h"
+#include "AddCardView.h"
+#include "AddCardPresenter.h"
+#include "SetDialView.h"
+#include "SetDialPresenter.h"
+#ifdef JS_ENABLE
+#include "product_adapter.h"
+#endif
namespace OHOS {
-struct AppViewMapper
-{
+struct AppViewMapper {
AppViewId id;
void (NativeLauncher::*func)(void);
};
-struct ViewIdToString
-{
+struct ViewIdToString {
AppViewId id;
char idForUikit[256];
};
{VIEW_ALARM_POP_UP, &NativeLauncher::InitAlarmPopUpSlice},
{VIEW_BLOODOXY_SAMPLE, &NativeLauncher::InitMainBloodOxyView},
{VIEW_MAIN_ACTIVITY, &NativeLauncher::InitActivitySlice},
- {VIEW_CALLER_SAMPLE,&NativeLauncher::InitMainCallerLogView},
- {VIEW_MAEKPHONE_SAMPLE,&NativeLauncher::InitMainMakePhoneView},
+ {VIEW_CALLER_SAMPLE, &NativeLauncher::InitMainCallerLogView},
+ {VIEW_MAEKPHONE_SAMPLE, &NativeLauncher::InitMainMakePhoneView},
{VIEW_BLUETOOTH_EARPHONE, &NativeLauncher::InitBluetoothSlice},
{VIEW_COMPASS, &NativeLauncher::InitCompassSlice},
{VIEW_OFFLINEVOICE, &NativeLauncher::InitOfflineVoice},
#ifdef SUPPORT_ALIPAY_SEC
{VIEW_MAIN_ALIPAY, &NativeLauncher::InitMainAlipaySlice},
#endif
+ {VIEW_SET_DESKTOP, &NativeLauncher::InitSetDesktopSlice},
+ {VIEW_SET_CARD, &NativeLauncher::InitSetCardSlice},
+ {VIEW_ADD_CARD, &NativeLauncher::InitAddCardSlice},
+ {VIEW_SET_DIAL, &NativeLauncher::InitSetDialSlice},
};
static const ViewIdToString VIEW_MAPPER[] = {
#ifdef SUPPORT_ALIPAY_SEC
{VIEW_MAIN_ALIPAY, "mianAlipayView"},
#endif
+ {VIEW_SET_DESKTOP, "SetDesktop"},
+ {VIEW_SET_CARD, "SetCard"},
+ {VIEW_ADD_CARD, "AddCard"},
+ {VIEW_SET_DIAL, "SetDial"},
};
NativeLauncher::NativeLauncher() {}
return instance;
}
-void NativeLauncher::InitNativeLauncher() {
- GraphicStartUp::InitFontEngine(MEM_POOL_UI_FONT, MEM_POOL_UI_FONT_SIZE, OHOS::VECTOR_FONT_DIR, DEFAULT_VECTOR_FONT_FILENAME);
+void NativeLauncher::InitNativeLauncher()
+{
+#ifdef JS_ENABLE
+ ACELite::ProductAdapter::SetScreenSize(HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);
+#endif
+ GraphicStartUp::InitFontEngine(MEM_POOL_UI_FONT, MEM_POOL_UI_FONT_SIZE,
+ OHOS::VECTOR_FONT_DIR, DEFAULT_VECTOR_FONT_FILENAME);
WEARABLE_LOGI(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "NativeLauncher::InitNativeLauncher");
// 初始化所有预加载slice
InitBtHeadsetEvent(); // 蓝牙ct和tg适配初始化
CallerLogModel::GetInstance()->InitPhoneService();
PlayersModel::GetInstance()->AudioInit();
ActivityModel::GetInstance()->Init();
- ScreenModels::GetInstance()->InitCardConfig();
+ ScreenModels::GetInstance()->InitKvStorage();
VocassistModel::GetInstance()->Init();
HeartModel::GetInstance()->Init();
BluetoothModel::GetInstance()->Init();
}
NativeAbility::GetInstance().AddSliceProxy(VIEW_UISAMPLE, uisampleView);
}
+
+void NativeLauncher::InitSetDesktopSlice(void)
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NativeLauncher::InitSetDesktopSlice");
+ SliceProxy *setDesktopView = new AbilitySliceProxy<SetDesktopView, SetDesktopPresenter>;
+ if (setDesktopView == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "setDesktopView");
+ return;
+ }
+ NativeAbility::GetInstance().AddSliceProxy(VIEW_SET_DESKTOP, setDesktopView);
+}
+
+void NativeLauncher::InitSetCardSlice(void)
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NativeLauncher::InitSetCardSlice");
+ SliceProxy *setCardView = new AbilitySliceProxy<SetCardView, SetCardPresenter>;
+ if (setCardView == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "setCardView");
+ return;
+ }
+ NativeAbility::GetInstance().AddSliceProxy(VIEW_SET_CARD, setCardView);
+}
+
+void NativeLauncher::InitAddCardSlice(void)
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NativeLauncher::InitAddCardSlice");
+ SliceProxy *addCardView = new AbilitySliceProxy<AddCardView, AddCardPresenter>;
+ if (addCardView == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "addCardView");
+ return;
+ }
+ NativeAbility::GetInstance().AddSliceProxy(VIEW_ADD_CARD, addCardView);
+}
+
+void NativeLauncher::InitSetDialSlice(void)
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NativeLauncher::InitSetDialSlice");
+ SliceProxy *setDialView = new AbilitySliceProxy<SetDialView, SetDialPresenter>;
+ if (setDialView == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "setCardView");
+ return;
+ }
+ NativeAbility::GetInstance().AddSliceProxy(VIEW_SET_DIAL, setDialView);
+}
+
}
#include "wearable_log.h"
namespace OHOS {
-MainView::MainView(){}
+MainView::MainView() {}
-MainView::~MainView(){}
+MainView::~MainView() {}
void MainView::OnStart()
{
\r
#define NUM_7 7\r
\r
-#include <time.h>\r
-#include "stdio.h"\r
+#include <ctime>\r
+#include <cstdio>\r
#include "ohos_types.h"\r
#include "RtcService.h"\r
#include "samgr_lite.h"\r
#define ACTIVITY_PRESENTER_H\r
\r
#include <sys/timerfd.h>\r
-#include <time.h>\r
+#include <ctime>\r
#include "BaseView.h"\r
#include "Presenter.h"\r
#include "MainActivityView.h"\r
void OnResume() override;\r
void OnStop() override;\r
static ActivityPresenter *GetInstance();\r
- virtual bool OnDrag(UIView& view, const DragEvent& event) override;\r
+ bool OnDrag(UIView& view, const DragEvent& event) override;\r
};\r
}\r
#endif
\ No newline at end of file
class ActivityWeekView : public UICardPage {\r
public:\r
ActivityWeekView();\r
- virtual ~ActivityWeekView();\r
+ ~ActivityWeekView() override;\r
static ActivityWeekView *GetInstance(void);\r
int GetDigits(int stepValue);\r
void InitSteps();\r
#include "ActivityWeekView.h"
#include "graphic_service.h"
-using namespace std;
-
#ifdef __cplusplus
extern "C" {
#endif
static void Notify(void *args, const Topic topic, Request* request);
Subscriber subscirber = {
- .identity = NULL,
- .args = NULL,
+ .identity = nullptr,
+ .args = nullptr,
.Notify = Notify,
};
void StepSubscribeTopic(Topic topic)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "StepSubscribeTopic, topic=%u", topic);
- BroadcastApi *broadcastApi = NULL;
+ BroadcastApi *broadcastApi = nullptr;
IUnknown *api = SAMGR_GetInstance()->GetFeatureApi(BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);
- if (api == NULL) {
+ if (api == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "StepSubscribeTopic, GetFeatureApi failed");
return;
}
int result = api->QueryInterface(api, DEFAULT_VERSION, (void **)&broadcastApi);
- if (result != 0 || broadcastApi == NULL) {
+ if (result != 0 || broadcastApi == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "StepSubscribeTopic, QueryInterface failed");
return;
}
void StepUnsubscribeTopic(Topic topic)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "StepUnsubscribeTopic, topic=%u", topic);
- BroadcastApi *broadcastApi = NULL;
+ BroadcastApi *broadcastApi = nullptr;
IUnknown *api = SAMGR_GetInstance()->GetFeatureApi(BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);
- if (api == NULL) {
+ if (api == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "StepUnsubscribeTopic, GetFeatureApi failed");
return;
}
int result = api->QueryInterface(api, DEFAULT_VERSION, (void **)&broadcastApi);
- if (result != 0 || broadcastApi == NULL) {
+ if (result != 0 || broadcastApi == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "StepUnsubscribeTopic, QueryInterface failed");
return;
}
{
MainClockView *mainClockView = OHOS::MainClockView::GetInstance();
if (mainClockView != nullptr) {
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&MainClockView::RefreshStep, mainClockView, value));
+ GraphicService::GetInstance()->PostGraphicEvent(
+ std::bind(&MainClockView::RefreshStep, mainClockView, value));
}
IndoorWalkPresenter *indoorWalkPresenter = OHOS::IndoorWalkPresenter::GetInstance();
if (indoorWalkPresenter != nullptr) {
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&IndoorWalkPresenter::ModifiesSteps,
- indoorWalkPresenter, value));
+ GraphicService::GetInstance()->PostGraphicEvent(
+ std::bind(&IndoorWalkPresenter::ModifiesSteps, indoorWalkPresenter, value));
}
ActivityWeekView *activityWeekView = OHOS::ActivityWeekView::GetInstance();
if (activityWeekView == nullptr) {
return;
}
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&ActivityWeekView::RefreshSteps,
- activityWeekView, value));
+ GraphicService::GetInstance()->PostGraphicEvent(
+ std::bind(&ActivityWeekView::RefreshSteps, activityWeekView, value));
if (msgId == TOPIC_EVENT_STEPDATA_UPDATE) {
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&ActivityWeekView::RefreshTodayView,
- activityWeekView, value));
+ GraphicService::GetInstance()->PostGraphicEvent(
+ std::bind(&ActivityWeekView::RefreshTodayView, activityWeekView, value));
} else if (msgId == TOPIC_EVENT_NEXTDAY_UPDATE) {
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&ActivityWeekView::InitAvgStep,
- activityWeekView));
+ GraphicService::GetInstance()->PostGraphicEvent(
+ std::bind(&ActivityWeekView::InitAvgStep, activityWeekView));
if (OHOS::ActivityModel::GetInstance()->GetWeekToday() == MONDAY_STEP_COUNTER) {
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&ActivityWeekView::InitWeekView,
- activityWeekView));
+ GraphicService::GetInstance()->PostGraphicEvent(
+ std::bind(&ActivityWeekView::InitWeekView, activityWeekView));
}
}
}
{
UNUSED(args);
UNUSED(topic);
- if (request == NULL) {
+ if (request == nullptr) {
return;
}
if (request->msgId == TOPIC_EVENT_STEPDATA_UPDATE) {
- if (request->data == NULL) {
+ if (request->data == nullptr) {
return;
}
// 计步数据累加
counter += *(uint32_t *)request->data;
OHOS::ActivityModel::GetInstance()->ReviseStepCounter(counter);
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&ActivityModel::SetStepData,
- ActivityModel::GetInstance(), counter));
+ GraphicService::GetInstance()->PostGraphicEvent(
+ std::bind(&ActivityModel::SetStepData, ActivityModel::GetInstance(), counter));
RefreshStepControls(counter, TOPIC_EVENT_STEPDATA_UPDATE);
}
static constexpr uint32_t SECONDS_ONEDAY = 86400;
static constexpr uint16_t ONT_MIN_STEP_CONTER = 120;
-osTimerId_t g_saveEveryMinHandle = NULL;
+osTimerId_t g_saveEveryMinHandle = nullptr;
void SaveEveryMinCallback(int data);
ActivityModel::ActivityModel()
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ActivityModel::~ActivityModel");
StepUnsubscribeTopic(TOPIC_EVENT_STEPDATA_UPDATE);
StepUnsubscribeTopic(TOPIC_EVENT_NEXTDAY_UPDATE);
- if (g_saveEveryMinHandle != NULL) {
+ if (g_saveEveryMinHandle != nullptr) {
osStatus_t ret = osTimerDelete(g_saveEveryMinHandle);
if (ret != osOK) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "~ActivityModel osTimerDelete failed, ret = %lx!!", ret);
return;
}
- g_saveEveryMinHandle = NULL;
+ g_saveEveryMinHandle = nullptr;
}
}
uint32 savedValue = ActivityModel::GetInstance()->GetLastSavedValue();
if (savedValue != g_stepData1.weekSteps[today]) {
struct tm curTime;
- time_t second;
- second = time(NULL);
+ time_t second = time(nullptr);
(void)gmtime_r((const time_t *)&second, &curTime);
ActivityModel::GetInstance()->SaveStepToFile(&curTime);
}
{
g_stepData1.weekSteps[weekToday] = value;
// 第一次上报数据后打开定时器
- if (g_saveEveryMinHandle != NULL) {
+ if (g_saveEveryMinHandle != nullptr) {
return;
}
- g_saveEveryMinHandle = osTimerNew((osTimerFunc_t)SaveEveryMinCallback, osTimerPeriodic, NULL, NULL);
- if (g_saveEveryMinHandle == NULL) {
+ g_saveEveryMinHandle = osTimerNew((osTimerFunc_t)SaveEveryMinCallback, osTimerPeriodic, nullptr, nullptr);
+ if (g_saveEveryMinHandle == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ActivityModel::SetStepData osTimerNew failed!!");
return;
}
osStatus_t retTimer = osTimerStart(g_saveEveryMinHandle, tick);
if (retTimer != osOK) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ActivityModel::SetStepData osTimerStart failed, ret = %lx!!", retTimer);
- if (g_saveEveryMinHandle != NULL) {
+ if (g_saveEveryMinHandle != nullptr) {
retTimer = osTimerDelete(g_saveEveryMinHandle);
if (retTimer != osOK) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ActivityModel::SetStepData osTimerDelete ret = %lx!!", retTimer);
return;
}
- g_saveEveryMinHandle = NULL;
+ g_saveEveryMinHandle = nullptr;
}
return;
}
{
g_stepData1.weekSteps[weekToday] = stepCounter;
struct tm historyTime;
- time_t second;
- second = time(NULL) - SECONDS_ONEDAY;
+ time_t second = time(nullptr) - SECONDS_ONEDAY;
(void)gmtime_r((const time_t *)&second, &historyTime);
SaveStepToFile(&historyTime);
stepCounter = 0;
ActivityWeekView::~ActivityWeekView()\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ActivityWeekView::~ActivityWeekView");\r
- if (viewiInitStatus == true) {\r
+ if (viewiInitStatus) {\r
RemoveAll();\r
for (int i = 0; i < DAYS; i++) {\r
delete view[i];\r
\r
UIView *ActivityWeekView::CreateUIView(int16_t x, int16_t y)\r
{\r
- UIView *view = new UIView();\r
- if (view == nullptr) {\r
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ActivityWeekView::InitView view is nullptr");\r
+ UIView *uiView = new UIView();\r
+ if (uiView == nullptr) {\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ActivityWeekView::InitView uiView is nullptr");\r
return nullptr;\r
}\r
- view->SetStyle(STYLE_BACKGROUND_COLOR, Color::GetColorFromRGB(0x00, 165, 230).full);\r
- view->SetStyle(STYLE_BACKGROUND_OPA, 127); // 127 : background opacity\r
- view->SetStyle(STYLE_BORDER_COLOR, Color::Gray().full);\r
- view->SetStyle(STYLE_BORDER_OPA, 127); // 127 : border opacity\r
- view->SetStyle(STYLE_BORDER_WIDTH, 0); // 0 : border width\r
- view->SetStyle(STYLE_PADDING_LEFT, 0);\r
- view->SetStyle(STYLE_PADDING_RIGHT, 0);\r
- view->SetStyle(STYLE_PADDING_TOP, 0);\r
- view->SetStyle(STYLE_PADDING_BOTTOM, 0);\r
- view->SetStyle(STYLE_MARGIN_LEFT, 0);\r
- view->SetStyle(STYLE_MARGIN_RIGHT, 0);\r
- view->SetStyle(STYLE_MARGIN_TOP, 0);\r
- view->SetStyle(STYLE_MARGIN_BOTTOM, 0);\r
- view->SetPosition(x, y);\r
- view->SetStyle(STYLE_BORDER_RADIUS, UIVIEW_WIDTH / 2 + 10); // 2 : half width 10 : offset\r
- return view;\r
+ uiView->SetStyle(STYLE_BACKGROUND_COLOR, Color::GetColorFromRGB(0x00, 165, 230).full);\r
+ uiView->SetStyle(STYLE_BACKGROUND_OPA, 127); // 127 : background opacity\r
+ uiView->SetStyle(STYLE_BORDER_COLOR, Color::Gray().full);\r
+ uiView->SetStyle(STYLE_BORDER_OPA, 127); // 127 : border opacity\r
+ uiView->SetStyle(STYLE_BORDER_WIDTH, 0); // 0 : border width\r
+ uiView->SetStyle(STYLE_PADDING_LEFT, 0);\r
+ uiView->SetStyle(STYLE_PADDING_RIGHT, 0);\r
+ uiView->SetStyle(STYLE_PADDING_TOP, 0);\r
+ uiView->SetStyle(STYLE_PADDING_BOTTOM, 0);\r
+ uiView->SetStyle(STYLE_MARGIN_LEFT, 0);\r
+ uiView->SetStyle(STYLE_MARGIN_RIGHT, 0);\r
+ uiView->SetStyle(STYLE_MARGIN_TOP, 0);\r
+ uiView->SetStyle(STYLE_MARGIN_BOTTOM, 0);\r
+ uiView->SetPosition(x, y);\r
+ uiView->SetStyle(STYLE_BORDER_RADIUS, UIVIEW_WIDTH / 2 + 10); // 2 : half width 10 : offset\r
+ return uiView;\r
}\r
\r
void ActivityWeekView::InitSteps()\r
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: AddCardAdapter.h
+ * Author:
+ * Create: 2021-09-18
+ */
+
+#ifndef ADD_CARD_ADAPTER_H
+#define ADD_CARD_ADAPTER_H
+
+#include <list>
+#include <string>
+#include "components/ui_list.h"
+#include "components/ui_label.h"
+#include "components/ui_view_group.h"
+#include "components/ui_image_view.h"
+#include "components/abstract_adapter.h"
+#include "UiConfig.h"
+#include "wearable_log.h"
+#include "AddCardItem.h"
+
+namespace OHOS {
+class AddCardAdapter : public AbstractAdapter {
+public:
+ explicit AddCardAdapter();
+ ~AddCardAdapter() override;
+
+ uint16 GetCount(void) override;
+
+ UIView *GetView(UIView *inView, int16 index) override;
+
+ void AddListItem(const AddCardInfo &item);
+
+ void SetItemClickListener(UIView::OnClickListener *itemClickListener)
+ {
+ itemClickListener_ = itemClickListener;
+ }
+
+ void ClearItem(void);
+
+private:
+ std::list<AddCardInfo> listData_;
+ UIView::OnClickListener *itemClickListener_;
+};
+}
+#endif
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.\r
+ * Description: AddCardItem.h\r
+ * Author:\r
+ * Create: 2021-11-23\r
+ */\r
+\r
+#ifndef ADD_CARD_ITEM_H\r
+#define ADD_CARD_ITEM_H\r
+\r
+#include <cstdint>\r
+#include <map>\r
+#include "components/ui_view.h"\r
+#include "components/ui_view_group.h"\r
+#include "components/ui_image_view.h"\r
+#include "components/ui_label_button.h"\r
+#include "UiConfig.h"\r
+\r
+namespace OHOS {\r
+typedef struct {\r
+ CardId id;\r
+ bool addFlag;\r
+ const char *cardImg;\r
+} AddCardInfo;\r
+\r
+class AddCardItem : public UIViewGroup {\r
+public:\r
+ AddCardItem();\r
+ ~AddCardItem() override;\r
+ void SetItemInfo(const AddCardInfo &cardInfo);\r
+ void SetOnClickListener(OnClickListener *onClickListener);\r
+ void UpdateItemInfo(bool addFlag);\r
+private:\r
+ void SetUpChild();\r
+ UIImageView cardImg_;\r
+ UILabelButton cardLabel_;\r
+ AddCardInfo cardInfo_;\r
+};\r
+\r
+}\r
+\r
+#endif // ADD_CARD_ITEM_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: AddCardModel.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef ADD_CARD_MODEL_H
+#define ADD_CARD_MODEL_H
+
+#include <cstdint>
+#include <map>
+#include "AppViewIDs.h"
+#include "UiConfig.h"
+#include "AddCardPresenter.h"
+#include "MainModel.h"
+
+namespace OHOS {
+ class AddCardModel {
+ public:
+ static AddCardModel &GetInstance(void);
+ void SetSelectedCardIndex(uint8_t cardIndex);
+ uint8_t GetSelectedCardIndex(void) const;
+ void AddCardSetting(void);
+ private:
+ AddCardModel();
+ AddCardModel(const AddCardModel &);
+ AddCardModel &operator=(const AddCardModel &);
+ virtual ~AddCardModel();
+ uint8_t selectedCardIndex{0};
+ };
+}
+
+#endif // ADD_CARD_MODEL_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: AddCardPresenter.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef ADD_CARD_PRESENTER_H
+#define ADD_CARD_PRESENTER_H
+
+#include "Presenter.h"
+#include "components/ui_list.h"
+#include "components/ui_view.h"
+#include "KeyInputListener.h"
+#include "ModelListenerSample.h"
+
+#define TOAST_KEEP_TIME 1000
+
+namespace OHOS {
+static const char *ADD_CARD_ADD = "addcardadd";
+
+class AddCardView;
+class AddCardModel;
+class AddCardPresenter : public Presenter<AddCardView>, public ModelListenerSample,
+ public UIView::OnClickListener, public UIView::OnDragListener,
+ public ListScrollListener {
+public:
+ AddCardPresenter();
+ ~AddCardPresenter() override;
+
+ void OnStart() override;
+ void OnResume() override;
+ void OnStop() override;
+ void OnTickEvent() override;
+ void Notify() override {}
+ bool OnClick(UIView &view, const ClickEvent &event) override;
+ void OnScrollStart(int16_t index, UIView *view) override;
+ void OnScrollEnd(int16_t index, UIView *view) override;
+ void OnItemSelected(int16_t index, UIView* view) override;
+ bool OnDrag(UIView& view, const DragEvent& event) override;
+private:
+ void ResetTickTimer(void);
+ AddCardModel *model{nullptr};
+ uint64_t startTime{0};
+ bool cardCountEvent{false};
+};
+}
+
+#endif // ADD_CARD_PRESENTER_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: AddCardView.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef ADD_CARD_VIEW_H
+#define ADD_CARD_VIEW_H
+
+#include "View.h"
+#include "components/ui_view_group.h"
+#include "components/ui_label.h"
+#include "components/ui_image_view.h"
+#include "components/ui_toggle_button.h"
+#include "window/window.h"
+#include "BaseView.h"
+#include "ChangeSliceListener.h"
+#include "UiConfig.h"
+#include "AddCardAdapter.h"
+#include "AddCardModel.h"
+
+namespace OHOS {
+class AddCardPresenter;
+
+class AddCardView : public View<AddCardPresenter> {
+public:
+ AddCardView();
+ ~AddCardView() override;
+
+ static AddCardView *GetInstance()
+ {
+ static AddCardView instance;
+ return &instance;
+ }
+
+ void OnStart() override;
+ void OnSetUpView() override;
+ void OnTearDownView() override;
+ void OnStop() override;
+ void RefreshCardList(void);
+ void ExceedsCardCountEvent(bool isVisible);
+private:
+ void SetUpListInfo(void);
+ void SetUpListView(void);
+ void SetUpToast(void);
+ UIList contentList_;
+ UILabel toastLabel_;
+ AddCardAdapter *addCardAdapter_{nullptr};
+};
+}
+#endif // ADD_CARD_VIEW_H
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: AddCardAdapter.cpp
+ * Author:
+ * Create: 2021-09-18
+ */
+
+#include "AddCardAdapter.h"
+
+namespace OHOS {
+AddCardAdapter::AddCardAdapter() {}
+
+AddCardAdapter::~AddCardAdapter()
+{
+ listData_.clear();
+}
+
+uint16 AddCardAdapter::GetCount(void)
+{
+ return listData_.size();
+}
+
+void AddCardAdapter::ClearItem(void)
+{
+ listData_.clear();
+}
+
+UIView *AddCardAdapter::GetView(UIView *inView, int16 index)
+{
+ if (index >= (int16)listData_.size() || index < 0) {
+ return nullptr;
+ }
+
+ std::list<AddCardInfo>::iterator it = listData_.begin();
+ for (int i = 0; i < index; i++) {
+ it++;
+ }
+
+ AddCardItem *item = nullptr;
+ if (inView == nullptr) {
+ item = new AddCardItem();
+ if (item == nullptr) {
+ return nullptr;
+ }
+ } else {
+ item = static_cast<AddCardItem *>(inView);
+ }
+
+ item->SetItemInfo(*it);
+ item->SetViewIndex(index);
+ item->SetOnClickListener(itemClickListener_);
+ return item;
+}
+
+void AddCardAdapter::AddListItem(const AddCardInfo &item)
+{
+ listData_.push_back(item);
+}
+} // namespace OHOS
--- /dev/null
+#include "AddCardItem.h"\r
+#include "AddCardPresenter.h"\r
+#include "wearable_log.h"\r
+\r
+namespace OHOS {\r
+ AddCardItem::AddCardItem()\r
+ {\r
+ SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
+ SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
+ SetUpChild();\r
+ Add(&cardImg_);\r
+ Add(&cardLabel_);\r
+ }\r
+\r
+ AddCardItem::~AddCardItem()\r
+ {\r
+ Remove(&cardImg_);\r
+ Remove(&cardLabel_);\r
+ }\r
+\r
+ void AddCardItem::SetUpChild()\r
+ {\r
+ cardImg_.SetPosition(87, 60);\r
+ cardImg_.Resize(280, 280);\r
+ cardImg_.SetResizeMode(UIImageView::FILL);\r
+ cardImg_.SetStyle(STYLE_IMAGE_OPA, OPA_OPAQUE);\r
+\r
+ cardLabel_.SetPosition(175, 360);\r
+ cardLabel_.Resize(100, 50);\r
+ cardLabel_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 20);\r
+ }\r
+\r
+ void AddCardItem::SetItemInfo(const AddCardInfo &cardInfo)\r
+ {\r
+ cardInfo_ = cardInfo;\r
+ cardImg_.SetSrc(cardInfo.cardImg);\r
+ if (cardInfo.addFlag) {\r
+ cardLabel_.SetText("已添加");\r
+ } else {\r
+ cardLabel_.SetText("添加");\r
+ }\r
+ }\r
+\r
+ void AddCardItem::UpdateItemInfo(bool addFlag)\r
+ {\r
+ if (addFlag) {\r
+ cardLabel_.SetText("已添加");\r
+ cardInfo_.addFlag = addFlag;\r
+ Invalidate();\r
+ }\r
+ }\r
+\r
+ void AddCardItem::SetOnClickListener(OnClickListener *onClickListener)\r
+ {\r
+ cardLabel_.SetOnClickListener(onClickListener);\r
+ }\r
+\r
+};\r
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: AddCardModel.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include "AddCardModel.h"
+#include "kv_store.h"
+#include "securec.h"
+
+namespace OHOS {
+ AddCardModel::AddCardModel() {}
+
+ AddCardModel::~AddCardModel() {}
+
+ AddCardModel &AddCardModel::GetInstance()
+ {
+ static AddCardModel instance;
+ return instance;
+ }
+
+ void AddCardModel::SetSelectedCardIndex(uint8_t cardIndex)
+ {
+ selectedCardIndex = cardIndex;
+ }
+
+ uint8_t AddCardModel::GetSelectedCardIndex(void) const
+ {
+ return selectedCardIndex;
+ }
+
+ void AddCardModel::AddCardSetting(void)
+ {
+ MainModel::GetInstance().AddCardSetting(selectedCardIndex);
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: AddCardPresenter.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include "AddCardView.h"
+#include "AddCardModel.h"
+#include "AddCardPresenter.h"
+
+namespace OHOS {
+ AddCardPresenter::AddCardPresenter()
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardPresenter::AddCardPresenter");
+ model = &AddCardModel::GetInstance();
+ }
+
+ AddCardPresenter::~AddCardPresenter() {
+ }
+
+ void AddCardPresenter::OnStart()
+ {
+ Presenter<AddCardView>::OnStart();
+ }
+
+ void AddCardPresenter::OnResume(void)
+ {
+ }
+
+ void AddCardPresenter::OnStop(void)
+ {
+ }
+
+ bool AddCardPresenter::OnDrag(UIView& view, const DragEvent& event)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardPresenter::OnDrag");
+ UNUSED(view);
+ if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) &&
+ (event.GetDeltaX() > X_DRAG_OFFSET) && (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardPresenter::OnDrag ChangeSlice");
+ NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE);
+ }
+ return false;
+ }
+
+ bool AddCardPresenter::OnClick(UIView &view, const ClickEvent &event)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardPresenter::OnClick");
+ if (MainModel::GetInstance().GetCardSettingCount() >= CARD_SETTING_COUNT_MAX) {
+ cardCountEvent = true;
+ view_->ExceedsCardCountEvent(true);
+ ResetTickTimer();
+ } else {
+ model->AddCardSetting();
+ view_->RefreshCardList();
+ }
+ return true;
+ }
+
+ void AddCardPresenter::OnScrollStart(int16_t index, UIView *view)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardPresenter::OnScrollStart index = %d", index);
+ return;
+ }
+
+ void AddCardPresenter::OnScrollEnd(int16_t index, UIView *view)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardPresenter::OnScrollEnd index = %d", index);
+ if (view == nullptr) {
+ return;
+ }
+ model->SetSelectedCardIndex(index);
+ }
+
+ void AddCardPresenter::OnItemSelected(int16_t index, UIView* view)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardPresenter::OnItemSelected index = %d", index);
+ if (view == nullptr) {
+ return;
+ }
+ }
+
+ void AddCardPresenter::OnTickEvent()
+ {
+ if (cardCountEvent) {
+ uint64_t current_time = osKernelGetTick2ms();
+ if (current_time - startTime > TOAST_KEEP_TIME) {
+ view_->ExceedsCardCountEvent(false);
+ cardCountEvent = false;
+ }
+ }
+ return;
+ }
+
+ void AddCardPresenter::ResetTickTimer(void)
+ {
+ startTime = osKernelGetTick2ms();
+ return;
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: AddCardView.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include <string>
+#include "AddCardView.h"
+#include "AddCardPresenter.h"
+
+namespace OHOS {
+AddCardView::AddCardView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardView::AddCardView");
+}
+
+AddCardView::~AddCardView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardView::~AddCardView");
+ if (addCardAdapter_ != nullptr) {
+ delete addCardAdapter_;
+ addCardAdapter_ = nullptr;
+ }
+}
+
+void AddCardView::OnStart()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardView::OnStart");
+ View<AddCardPresenter>::OnStart();
+ SetContainerView(new UIViewGroup());
+ container_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+ addCardAdapter_ = new AddCardAdapter();
+ addCardAdapter_->SetItemClickListener(presenter_);
+ SetUpListInfo();
+ SetUpListView();
+ SetUpToast();
+}
+
+void AddCardView::OnSetUpView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardView::OnSetUpView");
+ View<AddCardPresenter>::OnSetUpView();
+}
+
+void AddCardView::OnTearDownView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardView::OnTearDownView");
+ View<AddCardPresenter>::OnTearDownView();
+}
+
+void AddCardView::OnStop()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardView::OnStop");
+ View<AddCardPresenter>::OnStop();
+ if (container_ != nullptr) {
+ container_->RemoveAll();
+ delete container_;
+ container_ = nullptr;
+ }
+}
+
+void AddCardView::SetUpListInfo(void)
+{
+ MainModel::GetInstance().InitCardSettings();
+ uint8_t cardCount = MainModel::GetInstance().GetCardSettingCount();
+ CardId *cardSettings = MainModel::GetInstance().GetCardSettings();
+ addCardAdapter_->ClearItem();
+ for (uint8_t i = WATCH_FACE + 1; i < MAX_CARD; i++) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "All:cardId = %d", i);
+ const CardInfo *info = MainModel::GetInstance().GetCardInfo((CardId)i);
+ if (info != nullptr) {
+ AddCardInfo addInfo;
+ addInfo.id = info->id;
+ addInfo.cardImg = info->cardImg;
+ addInfo.addFlag = false;
+ for (uint8_t j = 0; j < cardCount; j++) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Settings:cardId = %d", cardSettings[j]);
+ if (cardSettings[j] == i) {
+ addInfo.addFlag = true;
+ break;
+ }
+ }
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetUpListInfo::%d %s %d",
+ addInfo.id, addInfo.cardImg, addInfo.addFlag);
+ addCardAdapter_->AddListItem(addInfo);
+ }
+ }
+}
+
+void AddCardView::SetUpListView(void)
+{
+ contentList_.SetPosition(0, 0);
+ contentList_.Resize(HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);
+ contentList_.SetScrollBlankSize(VERTICAL_RESOLUTION / 2);
+ contentList_.SetSelectPosition(VERTICAL_RESOLUTION / 2);
+ contentList_.SetDraggable(true);
+ contentList_.SetThrowDrag(true);
+ contentList_.EnableAutoAlign(true);
+ contentList_.SetScrollStateListener(presenter_);
+ contentList_.SetOnDragListener(presenter_);
+ contentList_.SetMaxScrollDistance(1000);
+ contentList_.SetAdapter(addCardAdapter_);
+ contentList_.SetVisible(true);
+ container_->Add(&contentList_);
+}
+
+void AddCardView::SetUpToast(void)
+{
+ toastLabel_.SetPosition(77, 220);
+ toastLabel_.Resize(454, 60);
+ toastLabel_.SetViewId("toast");
+ toastLabel_.SetText("卡片数量已经到达上限");
+ toastLabel_.SetStyle(STYLE_BACKGROUND_COLOR, Color::Gray().full);
+ toastLabel_.SetStyle(STYLE_BACKGROUND_OPA, 255);
+ toastLabel_.SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);
+ toastLabel_.SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+ toastLabel_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+ toastLabel_.SetVisible(false);
+ container_->Add(&toastLabel_);
+}
+
+void AddCardView::RefreshCardList(void)
+{
+ SetUpListInfo();
+ contentList_.RefreshList();
+}
+
+void AddCardView::ExceedsCardCountEvent(bool isVisible)
+{
+ toastLabel_.SetVisible(isVisible);
+ toastLabel_.Invalidate();
+}
+
+}
public UIView::OnDragListener, public ModelListenerSample {\r
public:\r
AlarmPopUpPresenter();\r
- virtual ~AlarmPopUpPresenter();\r
+ ~AlarmPopUpPresenter() override;\r
void OnStart() override;\r
void OnPause() override;\r
void OnResume() override;\r
bool OnClick(UIView &view, const ClickEvent &event) override;\r
bool OnDrag(UIView& view, const DragEvent& event) override;\r
bool OnDragEnd(UIView& view, const DragEvent& event) override;\r
- virtual void Notify() override;\r
+ void Notify() override;\r
void CancelAlarmRing(void);\r
void DelayAlarmRing(void);\r
private:\r
CHANGE_INTERFACE_MAXCLOCK,\r
} InterfacesId;\r
\r
-class AlarmStatusBtnChangeListener : public OHOS::UICheckBox::OnChangeListener {\r
+class AlarmStatusBtnChangeListener : public OHOS::UICheckBox::OnChangeListener\r
+{\r
public:\r
- AlarmStatusBtnChangeListener(UIView *uiView)\r
+ explicit AlarmStatusBtnChangeListener(UIView *uiView)\r
{\r
std::string alarmStatusId = uiView->GetViewId();\r
std::string alarmCmpId;\r
public UITimePicker::SelectedListener, public UIView::OnDragListener {\r
public:\r
AlarmPresenter();\r
- virtual ~AlarmPresenter();\r
+ ~AlarmPresenter() override;\r
void OnStart() override;\r
void OnPause() override;\r
void OnResume() override;\r
UIScrollView *group{nullptr};\r
UILabelButton *weekImage{nullptr};\r
UILabel *labelRespeat{nullptr};\r
- UILabelButton *labelButton{nullptr};\r
UILabelButton *buttonWeek[7]{nullptr}; // 星期一共有7天,因此设置了七个星期的按钮\r
void CreateWeekButton1(void);\r
void CreateWeekButton2(void);\r
class MainAlarmView : public View<AlarmPresenter> {
public:
MainAlarmView();
- virtual ~MainAlarmView();
+ ~MainAlarmView() override;
static MainAlarmView *GetInstance(void);
void OnStart() override;
void OnSetUpView() override;
int32_t AlarmClockModel::GetAlarmGlobalData(uint8 id, AlarmClockInfo *info)
{
int32_t ret;
- if (info == NULL) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetAlarmGlobalData info NULL!!");
+ if (info == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetAlarmGlobalData info nullptr!!");
return -1;
}
if (g_alarmClockData[id].alarmClockId != id) {
int32_t AlarmClockModel::FetchedAlarmClockData(AlarmClockQueueMsg *alarmClockMsg)
{
- if (alarmClockMsg == NULL) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "FetchedAlarmClockData alarmClockMsg NULL!!");
+ if (alarmClockMsg == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "FetchedAlarmClockData alarmClockMsg nullptr!!");
return -1;
}
- if (listAlarmClock.IsEmpty() == true) {
+ if (listAlarmClock.IsEmpty()) {
return -1;
} else {
MUTEX_Lock(g_alarmClockDataMutex);
return true;
}
-bool AlarmClockModel::GetListenClockId(uint8_t *alarmId)
+bool AlarmClockModel::GetListenClockId(uint8_t *alarm)
{
- if (alarmId == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::GetClockStatus alarmId == nullptr error!");
+ if (alarm == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::GetClockStatus alarm == nullptr error!");
}
if (currentAlarm[clockListener] == nullptr) {
return false;
} else if (currentAlarm[clockListener]->alarmType == TYPE_INVALID_ALARM_CLOCK) {
return false;
}
- *alarmId = currentAlarm[clockListener]->alarmClockId;
+ *alarm = currentAlarm[clockListener]->alarmClockId;
return true;
}
return false;
}
uint8 tempAlarmEnable = currentAlarm[num]->alarmClockEnable;
- if (alarmStatus == true) {
+ if (alarmStatus) {
currentAlarm[num]->alarmClockEnable = 1;
- } else if (alarmStatus == false) {
+ } else if (!alarmStatus) {
currentAlarm[num]->alarmClockEnable = 0;
}
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::ButtonStatusRing alarm[%d] status is %u", num,
return true;
}
-void AlarmClockModel::SetDelayAlarm(uint8_t alarmId)
+void AlarmClockModel::SetDelayAlarm(uint8_t alarm)
{
AlarmClockQueueMsg *clockQueueMsg = new AlarmClockQueueMsg();
if (clockQueueMsg == nullptr) {
clockQueueMsg->eventType = EVENT_ALARM_RING_DELAY;
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::ButtonStatusRing clockQueueMsg->eventType is %u",
clockQueueMsg->eventType);
- (clockQueueMsg->data).value = alarmId;
+ (clockQueueMsg->data).value = alarm;
AlmmgrAlarmClockEventProcess(clockQueueMsg);
return;
}
-void AlarmClockModel::SetCancelAlarm(uint8_t alarmId)
+void AlarmClockModel::SetCancelAlarm(uint8_t alarm)
{
AlarmClockQueueMsg *clockQueueMsg = new AlarmClockQueueMsg();
if (clockQueueMsg == nullptr) {
clockQueueMsg->eventType = EVENT_ALARM_RING_CANCEL;
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::ButtonStatusRing clockQueueMsg->eventType is %u",
clockQueueMsg->eventType);
- (clockQueueMsg->data).value = alarmId;
+ (clockQueueMsg->data).value = alarm;
AlmmgrAlarmClockEventProcess(clockQueueMsg);
return;
}
void AlarmClockModel::AlarmGetClockNum()
{
struct tm curTime;
- int32 hour, min;
-
if (AlarmGetCurrentTimeInfo(&curTime) != 0) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmTimerCallback AlarmGetCurrentTimeInfo failed!!");
return;
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::AlarmGetClockNum get num(%d)fail!", num);
return;
}
- hour = currentAlarm[num]->alarmTime >> TWO_BYTES_BITS;
- min = ((currentAlarm[num]->alarmTime & AND_FOR_LOW_TWO_BYTES) + (currentAlarm[num]->delayNum * DELAY_TEM_MIN));
+ int32_t hour = currentAlarm[num]->alarmTime >> TWO_BYTES_BITS;
+ int32_t min = ((currentAlarm[num]->alarmTime & AND_FOR_LOW_TWO_BYTES) + (currentAlarm[num]->delayNum * DELAY_TEM_MIN));
hour = (hour + min / ONE_HOUR_MIN) % TWENTY_FOUR_HOUR;
min = min % ONE_HOUR_MIN;
if (curTime.tm_hour == hour && curTime.tm_min == min) {
}
}
-void AlarmClockModel::GetAlarmCallId(uint8_t *alarmId)
+void AlarmClockModel::GetAlarmCallId(uint8_t *alarm)
{
- if (alarmId == nullptr) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::alarmId is nullptr!");
+ if (alarm == nullptr) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::alarm is nullptr!");
return;
}
struct tm curTime;
- int32 hour, min;
if (AlarmGetCurrentTimeInfo(&curTime) != 0) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmTimerCallback AlarmGetCurrentTimeInfo failed!!");
return;
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::AlarmGetClockNum get num fail!");
return;
}
- hour = currentAlarm[num]->alarmTime >> TWO_BYTES_BITS;
- min = ((currentAlarm[num]->alarmTime & AND_FOR_LOW_TWO_BYTES) + (currentAlarm[num]->delayNum * DELAY_TEM_MIN));
+ int32_t hour = currentAlarm[num]->alarmTime >> TWO_BYTES_BITS;
+ int32_t min = ((currentAlarm[num]->alarmTime & AND_FOR_LOW_TWO_BYTES) + (currentAlarm[num]->delayNum * DELAY_TEM_MIN));
hour = (hour + min / ONE_HOUR_MIN) % TWENTY_FOUR_HOUR;
min = min % ONE_HOUR_MIN;
if (curTime.tm_hour == hour && curTime.tm_min == min) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::AlarmGetClockNum %d:%d!",
currentAlarm[num]->alarmTime >> TWO_BYTES_BITS, currentAlarm[num]->alarmTime & AND_FOR_LOW_TWO_BYTES);
- *alarmId = currentAlarm[num]->alarmClockId;
+ *alarm = currentAlarm[num]->alarmClockId;
return;
}
}
void AlarmClockModel::PopInterCancelMusic()
{
- SendMsgToUIService(SCREEN_TURN_OFF_TO_UI, 0, NULL, 0);
+ SendMsgToUIService(SCREEN_TURN_OFF_TO_UI, 0, nullptr, 0);
GraphicService::GetInstance()->PostGraphicEvent(
std::bind(&AlarmClockModel::AlarmPlayerStop, AlarmClockModel::GetInstance()));
}
std::string strSongName = sliceId;
std::string pureName = strSongName.substr(0, strSongName.rfind(".")); // 播放音乐的路径需要引用.号
- const char *songName = pureName.c_str();
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayerInit, url:%s ", sliceId);
std::string strSrcMusic(APP_MUSIC_PATH);
std::string tempStr("/");
void AlarmClockModel::DeactAudioInter(void)
{
bool alarmStatus;
- uint8_t alarmId = 0;
- alarmStatus = AlarmClockModel::GetInstance()->GetListenClockId(&alarmId);
- if (alarmStatus == false) {
+ uint8_t alarm = 0;
+ alarmStatus = AlarmClockModel::GetInstance()->GetListenClockId(&alarm);
+ if (!alarmStatus) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmPopUpPresenter::CancelAlarmRing get alarm Id false!");
return;
}
AlarmClockModel::GetInstance()->ResetRingClockStatus();
- AlarmClockModel::GetInstance()->SetDelayAlarm(alarmId);
+ AlarmClockModel::GetInstance()->SetDelayAlarm(alarm);
PopInterCancelMusic();
}
{
for (uint8_t num = 0; num < CLOCK_MAX; num++) {
if (currentAlarm[num] == nullptr || currentAlarm[num]->alarmType == TYPE_INVALID_ALARM_CLOCK) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::currentAlarm[%u] is NULL");
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::currentAlarm[%u] is nullptr");
return;
}
currentAlarm[num]->delayNum = 0;
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::AlarmClockNotify");
- if (PlayersModel::GetInstance()->GetAudioInitStatus() == false) {
+ if (!PlayersModel::GetInstance()->GetAudioInitStatus()) {
PlayersModel::GetInstance()->AudioInit();
}
int32_t timeout = -1;
SendMsgToUIService(SCREEN_TURN_ON_TO_UI, 0, &timeout, sizeof(int32_t));
AlarmGetClockNum();
- NativeAbility::GetInstance().ChangeSlice(VIEW_ALARM_POP_UP, TRANSITION_INVALID, PRIORITY_TWO);
+ NativeAbility::GetInstance().ChangeSlice(VIEW_ALARM_POP_UP, TransitionType::TRANSITION_INVALID, PRIORITY_TWO);
return;
}
void AlarmClockModel::PhoneCallAlarm()
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::PhoneCallAlarm");
- uint8_t alarmId = 0;
+ uint8_t alarm = 0;
OHOS::AlarmClockModel::GetInstance()->AlarmGetClockNum();
- OHOS::AlarmClockModel::GetInstance()->GetAlarmCallId(&alarmId);
- OHOS::AlarmClockModel::GetInstance()->SetDelayAlarm(alarmId);
+ OHOS::AlarmClockModel::GetInstance()->GetAlarmCallId(&alarm);
+ OHOS::AlarmClockModel::GetInstance()->SetDelayAlarm(alarm);
}
uint32 AlarmClockModel::GetAlarmData()
bool alarmStatus;
AlarmClockModel::GetInstance()->PopInterCancelMusic();
alarmStatus = AlarmClockModel::GetInstance()->GetListenClockId(&alarmId);
- if (alarmStatus == false) {
+ if (!alarmStatus) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmPlayerListener::CancelAlarmRing get alarm Id false!");
return;
}
namespace OHOS {\r
#define CLOSE "关闭"\r
\r
-osTimerId_t g_stopAlarmCloseHandle = NULL;\r
+osTimerId_t g_stopAlarmCloseHandle = nullptr;\r
static AlarmCloseRingView *g_pAlarmCloseRingView = nullptr;\r
constexpr int16_t MAX_SET_ZERO_LEN = 0;\r
constexpr int16_t MAX_SET_SRC_LEN = 90;\r
\r
void AlarmCloseRingView::CancelCloseHandle(void)\r
{\r
- if (g_stopAlarmCloseHandle != NULL) {\r
+ if (g_stopAlarmCloseHandle != nullptr) {\r
osStatus_t ret = osTimerDelete(g_stopAlarmCloseHandle);\r
if (ret != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CloseTimerCallback osTimerDelete failed, ret = %lx!!", ret);\r
return;\r
}\r
- g_stopAlarmCloseHandle = NULL;\r
+ g_stopAlarmCloseHandle = nullptr;\r
}\r
}\r
\r
\r
void AlarmCloseRingView::AlarmCloseShowTimer(void)\r
{\r
- g_stopAlarmCloseHandle = osTimerNew((osTimerFunc_t)CloseTimerCallback, osTimerPeriodic, NULL, NULL);\r
- if (g_stopAlarmCloseHandle == NULL) {\r
+ g_stopAlarmCloseHandle = osTimerNew((osTimerFunc_t)CloseTimerCallback, osTimerPeriodic, nullptr, nullptr);\r
+ if (g_stopAlarmCloseHandle == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmMaxClock::AlarmCloseShowTimer osTimerNew failed!!");\r
return;\r
}\r
osStatus_t retTimer = osTimerStart(g_stopAlarmCloseHandle, tick);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmMaxClock::AlarmCloseShowTimer osTimerStart failed, ret = %lx!!", retTimer);\r
- if (g_stopAlarmCloseHandle != NULL) {\r
+ if (g_stopAlarmCloseHandle != nullptr) {\r
retTimer = osTimerDelete(g_stopAlarmCloseHandle);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmMaxClock::AlarmCloseShowTimer osTimerDelete failed, ret = %lx!!", retTimer);\r
return;\r
}\r
- g_stopAlarmCloseHandle = NULL;\r
+ g_stopAlarmCloseHandle = nullptr;\r
}\r
return;\r
}\r
UILabel *AlarmConfigView::CreateConfigLabel(const char *buttonText, int16_t labelFont, int16_t x, int16_t y, int16_t width)\r
{\r
if (buttonText == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmConfigView:: buttonText NULL!");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmConfigView:: buttonText nullptr!");\r
return nullptr;\r
}\r
UILabel *label = nullptr;\r
label = new UILabel();\r
if (label == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmConfigView:: CreateConfigLabel return NULL");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmConfigView:: CreateConfigLabel return nullptr");\r
return nullptr;\r
}\r
label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelFont);\r
configScroll->Add(editLabel);\r
UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::AlarmPresenter::GetInstance();\r
if (clickListener == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmConfigView::OnStart clickListener NULL");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmConfigView::OnStart clickListener nullptr");\r
return;\r
}\r
labelTime = new UIDigitalClock();\r
#define MAX_INETERFACES "当前闹钟个数已达上限"\r
#define INTERFACE_ID "maxclock"\r
\r
-osTimerId_t g_stopAlarmMaxHandle = NULL;\r
+osTimerId_t g_stopAlarmMaxHandle = nullptr;\r
static AlarmMaxClock *g_AlarmMaxClock = nullptr;\r
static constexpr uint64_t MS_THREE_SECONDS = 3000;\r
void ScanTimerCallback(int data);\r
return g_AlarmMaxClock;\r
}\r
\r
-UIScrollView * AlarmMaxClock::InitAlarmMax(void)\r
+UIScrollView *AlarmMaxClock::InitAlarmMax(void)\r
{\r
container = new UIScrollView();\r
if (container == nullptr) {\r
container->SetDraggable(true);\r
UIView::OnDragListener *maxClockDragListener = (UIView::OnDragListener *)OHOS::AlarmPresenter::GetInstance();\r
if (maxClockDragListener == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmMaxClock:: maxClockDragListener is NULL");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmMaxClock:: maxClockDragListener is nullptr");\r
return container;\r
}\r
container->SetOnDragListener(maxClockDragListener);\r
\r
void CancelScanHandle(void)\r
{\r
- if (g_stopAlarmMaxHandle != NULL) {\r
+ if (g_stopAlarmMaxHandle != nullptr) {\r
osStatus_t ret = osTimerDelete(g_stopAlarmMaxHandle);\r
if (ret != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScanTimerCallback osTimerDelete failed, ret = %lx!!", ret);\r
return;\r
}\r
- g_stopAlarmMaxHandle = NULL;\r
+ g_stopAlarmMaxHandle = nullptr;\r
}\r
}\r
\r
\r
void AlarmMaxClock::AlarmMaxDelayExit(void)\r
{\r
- g_stopAlarmMaxHandle = osTimerNew((osTimerFunc_t)ScanTimerCallback, osTimerPeriodic, NULL, NULL);\r
- if (g_stopAlarmMaxHandle == NULL) {\r
+ g_stopAlarmMaxHandle = osTimerNew((osTimerFunc_t)ScanTimerCallback, osTimerPeriodic, nullptr, nullptr);\r
+ if (g_stopAlarmMaxHandle == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmMaxClock::AlarmMaxDelayExit osTimerNew failed!!");\r
return;\r
}\r
osStatus_t retTimer = osTimerStart(g_stopAlarmMaxHandle, tick);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmMaxClock::AlarmMaxDelayExit osTimerStart failed, ret = %lx!!", retTimer);\r
- if (g_stopAlarmMaxHandle != NULL) {\r
+ if (g_stopAlarmMaxHandle != nullptr) {\r
retTimer = osTimerDelete(g_stopAlarmMaxHandle);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmMaxClock::AlarmMaxDelayExit osTimerDelete failed, ret = %lx!!", retTimer);\r
return;\r
}\r
- g_stopAlarmMaxHandle = NULL;\r
+ g_stopAlarmMaxHandle = nullptr;\r
}\r
return;\r
}\r
UITimePicker::SelectedListener *selectedListener =\r
(UITimePicker::SelectedListener *)OHOS::AlarmPresenter::GetInstance();\r
if (selectedListener == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateLabelTime:: selectedListener is NULL");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateLabelTime:: selectedListener is nullptr");\r
return;\r
}\r
picker->EnableSecond(false);\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmNewTimeView::RefreshStep");\r
struct tm local_time;\r
- time_t seconds = time(NULL);\r
-\r
- if (localtime_r(&seconds, &local_time) == NULL) {\r
+ time_t seconds = time(nullptr);\r
+ if (localtime_r(&seconds, &local_time) == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::AlarmGetClockNum get localtime error!");\r
return;\r
}\r
- std::ostringstream ostrHour, ostMin;\r
+ std::ostringstream ostrHour;\r
+ std::ostringstream ostMin;\r
ostrHour << local_time.tm_hour;\r
ostMin << local_time.tm_min;\r
std::string weekStr = ostrHour.str() + ":" + ostMin.str();\r
bool alarmStatus;\r
AlarmClockModel::GetInstance()->PopInterCancelMusic();\r
alarmStatus = AlarmClockModel::GetInstance()->GetListenClockId(&alarmId);\r
- if (alarmStatus == false) {\r
+ if (!alarmStatus) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmPopUpPresenter::CancelAlarmRing get alarm Id false!");\r
return;\r
}\r
bool alarmStatus;\r
AlarmClockModel::GetInstance()->PopInterCancelMusic();\r
alarmStatus = AlarmClockModel::GetInstance()->GetListenClockId(&alarmId);\r
- if (alarmStatus == false) {\r
+ if (!alarmStatus) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmPopUpPresenter::DelayAlarmRing get alarm Id false!");\r
return;\r
}\r
return;\r
}\r
struct tm local_time;\r
- time_t seconds = time(NULL);\r
- int16 thisHour, thisMin;\r
+ time_t seconds = time(nullptr);\r
\r
labelPopup->SetPosition(LABEL_X, LABEL_Y, LABEL_WIDTH, LABEL_HEIGHT);\r
labelPopup->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);\r
dClock->SetPosition(CLOCK_X, CLOCK_Y);\r
dClock->Resize(DIGITAL_CLOCK_WIDTH, DIGITAL_CLOCK_HEIGHT);\r
dClock->SetFont(DEFAULT_VECTOR_FONT_FILENAME, CLOCK_FONT);\r
- if (localtime_r(&seconds, &local_time) == NULL) {\r
+ if (localtime_r(&seconds, &local_time) == nullptr) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPopUpView::AlarmCreateLabel get localtime error!");\r
return;\r
}\r
+\r
+ int16_t thisHour;\r
+ int16_t thisMin;\r
AlarmClockModel::GetInstance()->GetPopTimeData(&thisHour, &thisMin);\r
dClock->SetDisplayMode(UIDigitalClock::DISPLAY_24_HOUR_NO_SECONDS);\r
dClock->SetTime24Hour(thisHour, thisMin, 0);\r
}\r
}\r
\r
- }// namespace OHOS\r
+}\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter VIEW_ALARM_SET_TIME");\r
UNUSED(num);\r
uint32_t clockTime;\r
- if ((AlarmClockModel::GetInstance()->GetClockTime(alarmListener, &clockTime)) == false) {\r
+ if (!(AlarmClockModel::GetInstance()->GetClockTime(alarmListener, &clockTime))) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter ClickSetTime error");\r
return;\r
}\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter VIEW_ALARM_SET_WEEK");\r
UNUSED(num);\r
uint8_t clockWeek;\r
- if ((AlarmClockModel::GetInstance()->GetClockWeek(alarmListener, &clockWeek)) == false) {\r
+ if (!(AlarmClockModel::GetInstance()->GetClockWeek(alarmListener, &clockWeek))) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter ClickSetWeek error");\r
return;\r
}\r
MainAlarmView::GetInstance()->RefreshAlarm();\r
clockQty--;\r
for (uint16_t alarmNum = 0; alarmNum < clockQty; alarmNum++) {\r
- if ((AlarmClockModel::GetInstance()->GetClockTime(alarmNum, &clockTime)) == false) {\r
+ if (!(AlarmClockModel::GetInstance()->GetClockTime(alarmNum, &clockTime))) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter ClickJudgeTrue error");\r
return;\r
}\r
AlarmClockModel::GetInstance()->SetAlarmTime(timeHour, timeMin, alarmListener);\r
uint32_t clockTime = ((timeHour << 16) | timeMin); // 闹钟时间小时的存储位需要右移16位\r
uint8_t clockWeek;\r
- if ((AlarmClockModel::GetInstance()->GetClockWeek(alarmListener, &clockWeek)) == false) {\r
+ if (!(AlarmClockModel::GetInstance()->GetClockWeek(alarmListener, &clockWeek))) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter ClickAlarmTimeOk error");\r
return;\r
}\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter alarmListener = %u", alarmListener);\r
uint32_t clockTime;\r
uint8_t clockWeek;\r
- if ((AlarmClockModel::GetInstance()->GetClockTime(alarmListener, &clockTime)) == false) {\r
+ if (!(AlarmClockModel::GetInstance()->GetClockTime(alarmListener, &clockTime))) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter ClickAlarmClock error");\r
return;\r
}\r
- if ((AlarmClockModel::GetInstance()->GetClockWeek(alarmListener, &clockWeek)) == false) {\r
+ if (!(AlarmClockModel::GetInstance()->GetClockWeek(alarmListener, &clockWeek))) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter ClickAlarmClock error");\r
return;\r
}\r
\r
if (setListener == SET_TIME_LISTENER) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ClickAlarmWeekOk set time!");\r
- if ((AlarmClockModel::GetInstance()->GetClockTime(alarmListener, &clockTime)) == false) {\r
+ if (!(AlarmClockModel::GetInstance()->GetClockTime(alarmListener, &clockTime))) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter ClickAlarmWeekOk error");\r
return;\r
}\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "******************ClickAlarmWeekOk alarmListener = %d***************", alarmListener);\r
AlarmClockModel::GetInstance()->SetSerialAdd();\r
AlarmClockModel::GetInstance()->SetAlarmInfo(timeHour, timeMin, clockWeek, alarmListener, setListener);\r
- if ((AlarmClockModel::GetInstance()->GetClockTime(alarmListener, &clockTime)) == false) {\r
+ if (!(AlarmClockModel::GetInstance()->GetClockTime(alarmListener, &clockTime))) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter ClickAlarmWeekOk error");\r
return;\r
}\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmPresenter::OnClick ");\r
bool jug = ClickFuncId(view.GetViewId());\r
- if (jug == false) {\r
+ if (!jug) {\r
ClickFuncView(view);\r
}\r
return true;\r
\r
bool AlarmStatusBtnChangeListener::OnChange(UICheckBox::UICheckBoxState state)\r
{\r
- if (MainAlarmView::GetInstance()->GetRefreshStatus() == true) {\r
+ if (MainAlarmView::GetInstance()->GetRefreshStatus()) {\r
return true;\r
}\r
switch (state) {\r
namespace OHOS {\r
#define RING_AGAIN "响铃将在十分钟后再次响起"\r
\r
-osTimerId_t g_stopAlarmRingHandle = NULL;\r
+osTimerId_t g_stopAlarmRingHandle = nullptr;\r
static AlarmRingView *g_pAlarmRingView = nullptr;\r
constexpr int16_t SET_ZERO = 0;\r
constexpr int16_t SET_SRC = 150;\r
\r
void AlarmRingView::CancelTimerHandle(void)\r
{\r
- if (g_stopAlarmRingHandle != NULL) {\r
+ if (g_stopAlarmRingHandle != nullptr) {\r
osStatus_t ret = osTimerDelete(g_stopAlarmRingHandle);\r
if (ret != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScanTimerCallback osTimerDelete failed, ret = %lx!!", ret);\r
return;\r
}\r
- g_stopAlarmRingHandle = NULL;\r
+ g_stopAlarmRingHandle = nullptr;\r
}\r
}\r
\r
\r
void AlarmRingView::AlarmRingDelayShowtimer(void)\r
{\r
- g_stopAlarmRingHandle = osTimerNew((osTimerFunc_t)RingTimerCallbacks, osTimerPeriodic, NULL, NULL);\r
- if (g_stopAlarmRingHandle == NULL) {\r
+ g_stopAlarmRingHandle = osTimerNew((osTimerFunc_t)RingTimerCallbacks, osTimerPeriodic, nullptr, nullptr);\r
+ if (g_stopAlarmRingHandle == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmMaxClock::AlarmRingDelayShowtimer osTimerNew failed!!");\r
return;\r
}\r
osStatus_t retTimer = osTimerStart(g_stopAlarmRingHandle, tick);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmMaxClock::AlarmRingDelayShowtimer osTimerStart failed, ret = %lx!!", retTimer);\r
- if (g_stopAlarmRingHandle != NULL) {\r
+ if (g_stopAlarmRingHandle != nullptr) {\r
retTimer = osTimerDelete(g_stopAlarmRingHandle);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmMaxClock::AlarmRingDelayShowtimer osTimerDelete failed, ret = %lx!!", retTimer);\r
return;\r
}\r
- g_stopAlarmRingHandle = NULL;\r
+ g_stopAlarmRingHandle = nullptr;\r
}\r
return;\r
}\r
UITimePicker::SelectedListener *selectedListener =\r
(UITimePicker::SelectedListener *)OHOS::AlarmPresenter::GetInstance();\r
if (selectedListener == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmSetTimeView:: selectedListener is NULL");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmSetTimeView:: selectedListener is nullptr");\r
return nullptr;\r
}\r
picker->EnableSecond(false);\r
group->SetDraggable(true);\r
UIView::OnDragListener *setTimeDragListener = (UIView::OnDragListener *)OHOS::AlarmPresenter::GetInstance();\r
if (setTimeDragListener == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmSetTimeView:: setTimeDragListener is NULL");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmSetTimeView:: setTimeDragListener is nullptr");\r
return group;\r
}\r
group->SetOnDragListener(setTimeDragListener);\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmSetTimeView::RefreshStep 35353535!");\r
picker->SetSelected(pickerTime.c_str());\r
- if (picker->SetSelected(pickerTime.c_str()) == false) {\r
+ if (!picker->SetSelected(pickerTime.c_str())) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmSetTimeView::RefreshStep Timepicker error!");\r
return;\r
}\r
group->RemoveAll();\r
delete labelRespeat;\r
labelRespeat = nullptr;\r
- delete labelButton;\r
- labelButton = nullptr;\r
delete weekImage;\r
weekImage = nullptr;\r
for (int16_t alarmNum = 0; alarmNum < 7; alarmNum++) {\r
statusButton[0]->SetPosition(STATUS_BUTTON_X, alarmPositionY, STATUS_BUTTON_W, STATUS_BUTTON_H);
} else {
statusButton[alarmNum]->SetPosition(STATUS_BUTTON_X, statusButton[0]->GetY() + (alarmInterval * alarmNum), STATUS_BUTTON_W, STATUS_BUTTON_H);
-
}
statusButton[alarmNum]->SetStyle(STYLE_BACKGROUND_OPA, alarmNum);
UICheckBox::OnChangeListener *statusListener{nullptr};
int16_t i;
for (i = 0; i < CLOCK_MAX_NUM; i++) {
alarmStatus = AlarmClockModel::GetInstance()->GetClockTime(i, &alarmTime);
- if (alarmStatus == false) {
+ if (!alarmStatus) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainAlarmView:: GetClockTime fail! i = %d", i);
break;
}
alarmStatus = AlarmClockModel::GetInstance()->GetClockWeek(i, &alarmWeek);
- if (alarmStatus == false) {
+ if (!alarmStatus) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainAlarmView:: GetClockWeek fail! i = %d", i);
break;
}
alarmStatus = AlarmClockModel::GetInstance()->GetClockStatus(i, &alarmEnable);
- if (alarmStatus == false) {
+ if (!alarmStatus) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainAlarmView:: GetClockStatus fail! i = %d", i);
break;
}
for (int i = 0; i < funcSize; i++) {
if (interface == ViewMapper[i].viewId) {
bool jug = (this->*(ViewMapper[i].func))(interface);
- if (jug == false) {
+ if (!jug) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainAlarmView:: ChangeInterFace[%d] false", interface);
return false;
}
#ifndef ALARM_CLOCK_MANAGE_H\r
#define ALARM_CLOCK_MANAGE_H\r
\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <time.h>\r
-#include <limits.h>\r
+#include <cstdio>\r
+#include <cstdlib>\r
+#include <ctime>\r
+#include <climits>\r
\r
#include "ohos_types.h"\r
#include "AlarmClockTimerConfig.h"\r
#include <sys/stat.h>
#include <sys/time.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#include <iostream>
#include <fstream>
-#include <limits.h>
+#include <climits>
#include <list>
#include "wearable_log.h"
if (g_alarmClockManagement.smartAlarmCnt > 0) {
/* 该闹钟今天是否使能判断 */
- if (IsAlarmClockValidToday(&g_alarmClockManagement.smartAlarmInfo) == true &&
- g_alarmClockManagement.smartAlarmInfo.alarmClockEnable == true) {
+ if (IsAlarmClockValidToday(&g_alarmClockManagement.smartAlarmInfo) &&
+ g_alarmClockManagement.smartAlarmInfo.alarmClockEnable) {
(void)memset_s(&info, size, 0, size);
info.alarmType = g_alarmClockManagement.smartAlarmInfo.alarmType;
for (i = 0; i < EVENT_ALARM_CLOCK_MAX; i++) {
/* 该闹钟今天是否使能判断 */
- if (IsAlarmClockValidToday(&g_alarmClockManagement.eventAlarmInfo[i]) == true &&
- g_alarmClockManagement.eventAlarmInfo[i].alarmClockEnable == true) {
+ if (IsAlarmClockValidToday(&g_alarmClockManagement.eventAlarmInfo[i]) &&
+ g_alarmClockManagement.eventAlarmInfo[i].alarmClockEnable) {
(void)memset_s(&info, size, 0, size);
info.alarmType = g_alarmClockManagement.eventAlarmInfo[i].alarmType;
uint16 hour;
uint16 min;
- if (alarmInfo == NULL) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmInfoCheck alarmInfo NULL!!");
+ if (alarmInfo == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmInfoCheck alarmInfo nullptr!!");
return STATUS_POINTER_NULL;
}
return ret;
}
/* 将指定闹钟信息加入当天闹钟列表 */
- if (IsAlarmClockValidToday(alarmInfo) == false || alarmInfo->alarmClockEnable == false) {
+ if (!IsAlarmClockValidToday(alarmInfo) || (!alarmInfo->alarmClockEnable)) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddAndUpdataListAlarmToday alarmInfo invalid today!!");
return STATUS_OK;
}
/* 将指定ID的闹钟信息刷新 */
for (node = g_alarmTodayList.begin(); node != g_alarmTodayList.end(); node++) {
if (node->alarmClockId == alarmInfo->alarmClockId) {
- if (IsAlarmClockValidToday(alarmInfo) == true && alarmInfo->alarmClockEnable == true) {
+ if (IsAlarmClockValidToday(alarmInfo) && alarmInfo->alarmClockEnable) {
node->alarmTime = alarmInfo->alarmTime + alarmInfo->delayNum * MINS_EVERY_DELAY;
node->alarmTime = (((node->alarmTime >> TWO_BYTES_BITS) +
(node->alarmTime & AND_FOR_LOW_TWO_BYTES) / MINUTES_PER_HOUR) << TWO_BYTES_BITS) +
static int32 SetFirstAlarmToday(FirstAlarmTodaySetType type)
{
- int32 ret;
struct tm curTime;
FirstAlarmTodaySetType tempType = type;
- std::list< AlarmClockInfoToday>::iterator node, tempNode;
+ std::list< AlarmClockInfoToday>::iterator node;
+ std::list< AlarmClockInfoToday>::iterator tempNode;
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetFirstAlarmToday !!");
if (AlarmGetCurrentTimeInfo(&curTime) != 0) {
void AlmmgrAlarmClockEventProcess(const AlarmClockQueueMsg *alarmClockMsg)
{
- if (alarmClockMsg == NULL) {
+ if (alarmClockMsg == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlmmgrAlarmClockEventProcess alarmClockMsg is invalid!!");
return;
}
int32 ret;
uint32 size = sizeof(AlarmClockManagement);
- if (management == NULL) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlmmgrGetManagement management NULL!!");
+ if (management == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlmmgrGetManagement management nullptr!!");
return STATUS_POINTER_NULL;
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetEventAlarmInfo id invalid!!");
return STATUS_ALARM_ID_INVALID;
}
- if (info == NULL) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetEventAlarmInfo info NULL!!");
+ if (info == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetEventAlarmInfo info nullptr!!");
return STATUS_POINTER_NULL;
}
int32 ret;
uint32 size = sizeof(AlarmClockInfo);
- if (info == NULL) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetSmartAlarmInfo info NULL!!");
+ if (info == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetSmartAlarmInfo info nullptr!!");
return STATUS_POINTER_NULL;
}
struct tm setTime;
struct timeval timeVal;
struct timezone timeZone;
- char *endPtr = NULL;
+ char *endPtr = nullptr;
int32 trans[DATETIME_PARA_NUM];
/* 0, 5, 8, 11, 14, 17 are offset of year, month, day, hour, minute, second */
uint32 offset[DATETIME_PARA_NUM] = {0, 5, 8, 11, 14, 17};
- if (argc != 1 || argv[0] == NULL) {
+ if (argc != 1 || argv[0] == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "set_datetime para invalid!!");
goto help;
}
struct tm curTime;
time_t second;
- second = time(NULL);
+ second = time(nullptr);
(void)gmtime_r((const time_t *)&second, &curTime);
ret = strftime(buff, sizeof(buff), "%A %c", &curTime);
* Create: 2021-09-22\r
*/\r
\r
-#include <time.h>\r
+#include <ctime>\r
#include <sys/time.h>\r
-#include <stdio.h>\r
+#include <cstdio>\r
#include "wearable_log.h"\r
#include "securec.h"\r
#include "broadcast_service.h"\r
\r
static AlarmCtrl g_alarmCtrA;\r
static AlarmCtrl g_alarmCtrB;\r
-static osTimerId_t g_AlarmHandle = NULL;\r
+static osTimerId_t g_AlarmHandle = nullptr;\r
\r
void AlarmTimerEventPublish(uint16 topic, AlarmClockEventData data)\r
{\r
int32 ret;\r
uint32 size = sizeof(AlarmClockEventData);\r
- Request *request = NULL;\r
- BroadcastApi *broadcastApi = NULL;\r
- IUnknown *api = NULL;\r
+ Request *request = nullptr;\r
+ BroadcastApi *broadcastApi = nullptr;\r
+ IUnknown *api = nullptr;\r
\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmTimerEventPublish topic=%u!!", topic);\r
\r
/* alloc request */\r
request = SAMGR_AllocRequestMsg(0, PLATFORM_CORE, BROADCAST_SVR_ID, size);\r
- if (request == NULL) {\r
+ if (request == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SAMGR_AllocRequestMsg failed");\r
return;\r
}\r
\r
/* public request */\r
api = SAMGR_GetInstance()->GetFeatureApi(BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
- if (api == NULL) {\r
+ if (api == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetFeatureApi failed");\r
SAMGR_FreeRequestMsg(request);\r
return;\r
}\r
ret = api->QueryInterface(api, DEFAULT_VERSION, (void **)&broadcastApi);\r
- if (ret != 0 || broadcastApi == NULL) {\r
+ if (ret != 0 || broadcastApi == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "QueryInterface failed");\r
SAMGR_FreeRequestMsg(request);\r
return;\r
}\r
\r
if (g_alarmCtrA.state == ALARM_STATUS_RUNNING) {\r
- if ((g_alarmCtrA.callback != NULL) &&\r
+ if ((g_alarmCtrA.callback != nullptr) &&\r
(g_alarmCtrA.info.hour == curTime.tm_hour) &&\r
(g_alarmCtrA.info.minute == curTime.tm_min)) {\r
g_alarmCtrA.callback();\r
}\r
\r
if (g_alarmCtrB.state == ALARM_STATUS_RUNNING) {\r
- if ((g_alarmCtrB.callback != NULL) &&\r
+ if ((g_alarmCtrB.callback != nullptr) &&\r
(g_alarmCtrB.info.week == curTime.tm_wday) &&\r
(g_alarmCtrB.info.hour == curTime.tm_hour) &&\r
(g_alarmCtrB.info.minute == curTime.tm_min)) {\r
\r
static int32_t AlarmCreate(AlarmCtrl *alarmCtrl, AlarmCallBack callback)\r
{\r
- if (alarmCtrl == NULL) {\r
+ if (alarmCtrl == nullptr) {\r
return ERRCODE_FAIL;\r
}\r
if (alarmCtrl->state == ALARM_STATUS_UNUSED) {\r
\r
g_alarmCtrA.state = ALARM_STATUS_UNUSED;\r
g_alarmCtrB.state = ALARM_STATUS_UNUSED;\r
- g_AlarmHandle = osTimerNew(AlarmScan, osTimerPeriodic, NULL, NULL);\r
- if (g_AlarmHandle == NULL) {\r
+ g_AlarmHandle = osTimerNew(AlarmScan, osTimerPeriodic, nullptr, nullptr);\r
+ if (g_AlarmHandle == nullptr) {\r
return ERRCODE_FAIL;\r
}\r
timerStatus = osTimerStart(g_AlarmHandle, ALARM_INTERVAL_MS);\r
\r
int32_t AlarmGetCurrentTimeInfo(struct tm *timeInfo)\r
{\r
- if (timeInfo == NULL) {\r
+ if (timeInfo == nullptr) {\r
return ERRCODE_FAIL;\r
}\r
- time_t sec = time(NULL);\r
+ time_t sec = time(nullptr);\r
localtime_r(&sec, timeInfo);\r
return ERRCODE_SUCC;\r
}\r
namespace OHOS {\r
class AlipayBarCode : public UIViewGroup {\r
public:\r
- AlipayBarCode(AlipayPresenter *presenter);\r
- virtual ~AlipayBarCode();\r
+ explicit AlipayBarCode(AlipayPresenter *presenter);\r
+ ~AlipayBarCode() override;\r
static AlipayBarCode *GetInstance();\r
bool InitView();\r
void AlipayRefreshBarcode(const char *refreshStr);\r
namespace OHOS {\r
class AlipayBind : public UIViewGroup {\r
public:\r
- AlipayBind(AlipayPresenter *presenter);\r
- virtual ~AlipayBind();\r
+ explicit AlipayBind(AlipayPresenter *presenter);\r
+ ~AlipayBind() override;\r
bool InitView();\r
\r
private:\r
namespace OHOS {\r
class AlipayBindAni : public UIViewGroup {\r
public:\r
- AlipayBindAni(AlipayPresenter *presenter);\r
- virtual ~AlipayBindAni();\r
+ explicit AlipayBindAni(AlipayPresenter *presenter);\r
+ ~AlipayBindAni() override;\r
bool InitView();\r
\r
private:\r
namespace OHOS {\r
class AlipayBindRes : public UIViewGroup {\r
public:\r
- AlipayBindRes(AlipayPresenter *presenter);\r
- virtual ~AlipayBindRes();\r
+ explicit AlipayBindRes(AlipayPresenter *presenter);\r
+ ~AlipayBindRes() override;\r
bool InitView();\r
void AlipayRefreshBindRes(void);\r
\r
namespace OHOS {\r
class AlipayExitBind : public UIViewGroup {\r
public:\r
- AlipayExitBind(AlipayPresenter *presenter);\r
- virtual ~AlipayExitBind();\r
+ explicit AlipayExitBind(AlipayPresenter *presenter);\r
+ ~AlipayExitBind() override;\r
bool InitView();\r
\r
private:\r
namespace OHOS {\r
class AlipayHelp : public UIViewGroup {\r
public:\r
- AlipayHelp(AlipayPresenter *presenter);\r
- virtual ~AlipayHelp();\r
+ explicit AlipayHelp(AlipayPresenter *presenter);\r
+ ~AlipayHelp() override;\r
bool InitView();\r
\r
private:\r
class AlipayListAdapter : public AbstractAdapter {
public:
explicit AlipayListAdapter();
- virtual ~AlipayListAdapter();
+ ~AlipayListAdapter() override;
/* *
* @brief Sets the UIView adapter data, which is a AlipayListItem linked list.
* @since 1.0
* @version 1.0
*/
- virtual uint16_t GetCount(void) override;
+ uint16_t GetCount(void) override;
- virtual UIView *GetView(UIView *inView, int16_t index) override;
+ UIView *GetView(UIView *inView, int16_t index) override;
- virtual void AddListItem(const AlipayListItem &item);
+ void AddListItem(const AlipayListItem &item);
void SetItemClickListener(UIView::OnClickListener *itemclicklistener)
{
class AlipayListItemView : public UIViewGroup {
public:
explicit AlipayListItemView();
- virtual ~AlipayListItemView();
- virtual void SetItemInfo(const AlipayListItem &itemInfo);
- virtual void SetUpChild();
+ ~AlipayListItemView() override;
+ void SetItemInfo(const AlipayListItem &itemInfo);
+ void SetUpChild();
private:
- AlipayListItemView(const AlipayListItemView &);
-
UIImageView sIcon;
UILabel sLabel;
UIImageView sNextImage;
class AlipayListAdapter;
class AlipayList : public UIViewGroup {
public:
- AlipayList(AlipayPresenter *presenter);
- virtual ~AlipayList();
+ explicit AlipayList(AlipayPresenter *presenter);
+ ~AlipayList() override;
bool InitListView();
private:
class AlipayMainView : public View<AlipayPresenter> {\r
public:\r
AlipayMainView();\r
- virtual ~AlipayMainView();\r
+ ~AlipayMainView() override;\r
static AlipayMainView *GetInstance(void);\r
void OnStart() override;\r
void OnSetUpView() override;\r
uint32_t AlipayGetTransCodeLen(void);\r
char* AlipayGetCardTitle(void);\r
private:\r
- osTimerId_t bindTimerId = NULL;\r
- osTimerId_t switchTimerId = NULL;\r
- osTimerId_t transTimerId = NULL;\r
+ osTimerId_t bindTimerId = nullptr;\r
+ osTimerId_t switchTimerId = nullptr;\r
+ osTimerId_t transTimerId = nullptr;\r
int16 alipayInterLis;\r
const alipay_svr_api_t *alipayApi;\r
bool bindFlag_;\r
uint32_t refreshFlag_ = 0;\r
uint32_t cardNum_ = 0;\r
uint32_t cardSum_ = 0;\r
- mc_alipay_trans_card_info_t *cardInfo_ = NULL;\r
- uint8_t* transCode_ = NULL;\r
+ mc_alipay_trans_card_info_t *cardInfo_ = nullptr;\r
+ uint8_t* transCode_ = nullptr;\r
uint32_t transCodeLen_;\r
char cardTitle_[ALIPAY_TRANS_CARD_MEMBER_LEN];\r
};\r
namespace OHOS {\r
class AlipayPayCode : public UIViewGroup {\r
public:\r
- AlipayPayCode(AlipayPresenter *presenter);\r
- virtual ~AlipayPayCode();\r
+ explicit AlipayPayCode(AlipayPresenter *presenter);\r
+ ~AlipayPayCode() override;\r
static AlipayPayCode *GetInstance();\r
bool InitView();\r
void AlipayRefreshQrcode(const char *refreshStr);\r
public UIView::OnDragListener {\r
public:\r
AlipayPresenter();\r
- virtual ~AlipayPresenter();\r
+ ~AlipayPresenter() override;\r
void OnStart() override;\r
void OnPause() override;\r
void OnResume() override;\r
class AlipayRefreshBind : public UIViewGroup {\r
public:\r
AlipayRefreshBind();\r
- virtual ~AlipayRefreshBind();\r
+ ~AlipayRefreshBind() override;\r
bool InitView();\r
\r
private:\r
namespace OHOS {\r
class AlipaySetting : public UIViewGroup {\r
public:\r
- AlipaySetting(AlipayPresenter *presenter);\r
- virtual ~AlipaySetting();\r
+ explicit AlipaySetting(AlipayPresenter *presenter);\r
+ ~AlipaySetting() override;\r
bool InitView();\r
\r
private:\r
namespace OHOS {\r
class AlipayGetTransList : public UIViewGroup {\r
public:\r
- AlipayGetTransList(AlipayPresenter *presenter);\r
- virtual ~AlipayGetTransList();\r
+ explicit AlipayGetTransList(AlipayPresenter *presenter);\r
+ ~AlipayGetTransList() override;\r
bool InitGetView(uint32_t index);\r
private:\r
AlipayPresenter *presenter_;\r
namespace OHOS {\r
class AlipayTransAni : public UIViewGroup {\r
public:\r
- AlipayTransAni(AlipayPresenter *presenter);\r
- virtual ~AlipayTransAni();\r
+ explicit AlipayTransAni(AlipayPresenter *presenter);\r
+ ~AlipayTransAni() override;\r
bool InitView();\r
\r
private:\r
namespace OHOS {\r
class AlipayTransCode : public UIViewGroup {\r
public:\r
- AlipayTransCode(AlipayPresenter *presenter);\r
- virtual ~AlipayTransCode();\r
+ explicit AlipayTransCode(AlipayPresenter *presenter);\r
+ ~AlipayTransCode() override;\r
bool InitView();\r
\r
private:\r
namespace OHOS {\r
class AlipayTransEnable : public UIViewGroup {\r
public:\r
- AlipayTransEnable(AlipayPresenter *presenter);\r
- virtual ~AlipayTransEnable();\r
+ explicit AlipayTransEnable(AlipayPresenter *presenter);\r
+ ~AlipayTransEnable() override;\r
bool InitView();\r
\r
private:\r
class AlipayTransListAdapter : public AbstractAdapter {
public:
explicit AlipayTransListAdapter();
- virtual ~AlipayTransListAdapter();
+ ~AlipayTransListAdapter() override;
/* *
* @brief Sets the UIView adapter data, which is a AlipayTransListItem linked list.
* @since 1.0
* @version 1.0
*/
- virtual uint16_t GetCount(void) override;
+ uint16_t GetCount(void) override;
- virtual UIView *GetView(UIView *inView, int16_t index) override;
+ UIView *GetView(UIView *inView, int16_t index) override;
- virtual void AddListItem(const AlipayTransListItem &item);
+ void AddListItem(const AlipayTransListItem &item);
void SetItemClickListener(UIView::OnClickListener *itemclicklistener)
{
class AlipayTransListItemView : public UIViewGroup {
public:
explicit AlipayTransListItemView();
- virtual ~AlipayTransListItemView();
- virtual void SetItemInfo(const AlipayTransListItem &itemInfo);
- virtual void SetUpChild();
+ ~AlipayTransListItemView() override;
+ void SetItemInfo(const AlipayTransListItem &itemInfo);
+ void SetUpChild();
uint8_t GetAlipayTransListIndex();
private:
- AlipayTransListItemView(const AlipayTransListItemView &);
-
UILabel sLabel;
UIImageView sNextImage;
AlipayTransListItem sItemInfo;
class AlipayTransListAdapter;
class AlipayTransList : public UIViewGroup {
public:
- AlipayTransList(AlipayPresenter *presenter);
- virtual ~AlipayTransList();
+ explicit AlipayTransList(AlipayPresenter *presenter);
+ ~AlipayTransList() override;
bool InitListView();
void AlipayTransListUpdate();
namespace OHOS {\r
class AlipayTransRes : public UIViewGroup {\r
public:\r
- AlipayTransRes(AlipayPresenter *presenter);\r
- virtual ~AlipayTransRes();\r
+ explicit AlipayTransRes(AlipayPresenter *presenter);\r
+ ~AlipayTransRes() override;\r
bool InitResView(uint32_t index);\r
void AlipayTransRefreshRes(void);\r
private:\r
namespace OHOS {\r
class AlipayTransTips : public UIViewGroup {\r
public:\r
- AlipayTransTips(AlipayPresenter *presenter);\r
- virtual ~AlipayTransTips();\r
+ explicit AlipayTransTips(AlipayPresenter *presenter);\r
+ ~AlipayTransTips() override;\r
bool InitTipsView(uint32_t index);\r
void AlipayTransRefreshTips(void);\r
private:\r
namespace OHOS {\r
class AlipayUnbind : public UIViewGroup {\r
public:\r
- AlipayUnbind(AlipayPresenter *presenter);\r
- virtual ~AlipayUnbind();\r
+ explicit AlipayUnbind(AlipayPresenter *presenter);\r
+ ~AlipayUnbind() override;\r
bool InitView();\r
\r
private:\r
namespace OHOS {\r
class AlipayUnbindFinish : public UIViewGroup {\r
public:\r
- AlipayUnbindFinish(AlipayPresenter *presenter);\r
- virtual ~AlipayUnbindFinish();\r
+ explicit AlipayUnbindFinish(AlipayPresenter *presenter);\r
+ ~AlipayUnbindFinish() override;\r
bool InitView();\r
\r
private:\r
SetStyle(STYLE_BACKGROUND_COLOR, 0xff1677ff);\r
SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBarCode::InitView AlipayInitLabel() false");\r
return false;\r
}\r
- if (AlipayInitButton() == false) {\r
+ if (!AlipayInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBarCode::InitView AlipayInitButton() false");\r
return false;\r
}\r
\r
- if (AlipayInitBarcode() == false) {\r
+ if (!AlipayInitBarcode()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBarCode::InitView AlipayInitQrcode() false");\r
return false;\r
}\r
\r
- if (AlipayInitImage() == false) {\r
+ if (!AlipayInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBarCode::InitView AlipayInitImage() false");\r
return false;\r
}\r
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
SetStyle(STYLE_BACKGROUND_COLOR, Color::White().full);\r
\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBind::InitView AlipayInitLabel() false");\r
return false;\r
}\r
\r
- if (AlipayInitImage() == false) {\r
+ if (!AlipayInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBind::InitView AlipayInitImage() false");\r
return false;\r
}\r
SetTouchable(true);\r
SetOnDragListener(presenter_);\r
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindAni::InitView AlipayInitLabel() false");\r
return false;\r
}\r
- if (AlipayInitImageAni() == false) {\r
+ if (!AlipayInitImageAni()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindAni::InitView AlipayInitImageAni() false");\r
return false;\r
}\r
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
\r
const char *resStr = EXIT_LABEL_TEXT_SEC;\r
- if (AlipayInitLabel(resStr) == false) {\r
+ if (!AlipayInitLabel(resStr)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindRes::InitView AlipayInitLabel() false");\r
return false;\r
}\r
- if (AlipayInitImage(PNG_ALIPAY_BIND_SUCCESS) == false) {\r
+ if (!AlipayInitImage(PNG_ALIPAY_BIND_SUCCESS)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindRes::InitView AlipayInitImage() false");\r
return false;\r
}\r
\r
bool AlipayExitBind::AlipayInitButton()\r
{\r
- if (InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y, EXIT_BUTTON_TEXT_FIRST,\r
- ALIPAY_INTER_EXIT) == false) {\r
+ if (!InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y, EXIT_BUTTON_TEXT_FIRST,\r
+ ALIPAY_INTER_EXIT)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,\r
"AlipayExitBind::AlipayInitButton new alipayButton[ALIPAY_SET_ZERO] fail");\r
return false;\r
}\r
- if (InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y, EXIT_BUTTON_TEXT_SECOND,\r
- ALIPAY_BIND_CONTINUE) == false) {\r
+ if (!InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y, EXIT_BUTTON_TEXT_SECOND,\r
+ ALIPAY_BIND_CONTINUE)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,\r
"AlipayExitBind::AlipayInitButton new alipayButton[ALIPAY_SET_ONE] fail");\r
return false;\r
SetOnDragListener(presenter_);\r
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayExitBind::InitView AlipayInitLabel() false");\r
return false;\r
}\r
- if (AlipayInitButton() == false) {\r
+ if (!AlipayInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayExitBind::InitView AlipayInitButton() false");\r
return false;\r
}\r
SetStyle(STYLE_BACKGROUND_COLOR, 0xff1677ff);\r
SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayHelp::InitView AlipayInitImage() false");\r
return false;\r
}\r
\r
- if (AlipayInitImage() == false) {\r
+ if (!AlipayInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayHelp::InitView AlipayInitImage() false");\r
return false;\r
}\r
SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);
SetStyle(STYLE_BACKGROUND_OPA, UN_OPACITY);
- if (AlipayInitList() == false) {
+ if (!AlipayInitList()) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayList::InitView AlipayInitList() false");
return false;
}
group = container[startView];\r
alipayWhichInter = startView;\r
\r
- RootView::GetInstance()->Add(container[startView]);\r
-\r
+ if (group == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::OnSetUpView group null error!");\r
+ return;\r
+ }\r
+ container_ = group;\r
return;\r
}\r
\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayMainView::OnSetUpView");\r
View<AlipayPresenter>::OnSetUpView();\r
-\r
- if (group == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::OnSetUpView group null error!");\r
- return;\r
- }\r
-\r
- RootView::GetInstance()->Add(group);\r
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RootView::GetInstance()->Add");\r
-\r
// show timerView\r
Draw();\r
}\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayMainView::OnStop");\r
View<AlipayPresenter>::OnStop();\r
- if (container_ != nullptr) {\r
- container_->RemoveAll();\r
- delete container_;\r
- container_ = nullptr;\r
- }\r
- group->RemoveAll();\r
RootView::GetInstance()->ClearOnKeyActListener();\r
RootView::GetInstance()->RemoveAll();\r
return;\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangePayView alipayPayCode null error!");\r
return false;\r
}\r
- if (alipayPayCode->InitView() == false) {\r
+ if (!alipayPayCode->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangePayView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeSettingView alipayPayCode null error!");\r
return false;\r
}\r
- if (alipaySetting->InitView() == false) {\r
+ if (!alipaySetting->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeSettingView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeHelpView alipayHelp null error!");\r
return false;\r
}\r
- if (alipayHelp->InitView() == false) {\r
+ if (!alipayHelp->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeHelpView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindAniView alipayBindAni null error!");\r
return false;\r
}\r
- if (alipayBindAni->InitView() == false) {\r
+ if (!alipayBindAni->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindAniView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindExitView alipayExitBind null error!");\r
return false;\r
}\r
- if (alipayExitBind->InitView() == false) {\r
+ if (!alipayExitBind->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindExitView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindResView alipayBindRes null error!");\r
return false;\r
}\r
- if (alipayBindRes->InitView() == false) {\r
+ if (!alipayBindRes->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindResView InitView null error!");\r
return false;\r
}\r
"AlipayMainView::ChangeUnbindView alipayExitBindSetting null error!");\r
return false;\r
}\r
- if (alipayExitBindSetting->InitView() == false) {\r
+ if (!alipayExitBindSetting->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeUnbindView InitView null error!");\r
return false;\r
}\r
"AlipayMainView::ChangeUnbindFinishView alipayUnbindFinish null error!");\r
return false;\r
}\r
- if (alipayUnbindFinish->InitView() == false) {\r
+ if (!alipayUnbindFinish->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeUnbindFinishView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindView alipayBind null error!");\r
return false;\r
}\r
- if (alipayBind->InitView() == false) {\r
+ if (!alipayBind->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBindView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransView alipayTransCode null error!");\r
return false;\r
}\r
- if (alipayTransCode->InitView() == false) {\r
+ if (!alipayTransCode->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransListView alipayTransList null error!");\r
return false;\r
}\r
- if (alipayTransList->InitListView() == false) {\r
+ if (!alipayTransList->InitListView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransListView InitView null error!");\r
return false;\r
}\r
"AlipayMainView::ChangeTransEnableView alipayTransEnable null error!");\r
return false;\r
}\r
- if (alipayTransEnable->InitView() == false) {\r
+ if (!alipayTransEnable->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransEnableView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransTipsView alipayTransTips null error!");\r
return false;\r
}\r
- if (alipayTransTips->InitTipsView(presenter_->AlipayGetSwitchIndex()) == false) {\r
+ if (!alipayTransTips->InitTipsView(presenter_->AlipayGetSwitchIndex())) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransTipsView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransResView alipayTransRes null error!");\r
return false;\r
}\r
- if (alipayTransRes->InitResView(presenter_->AlipayGetSwitchIndex()) == false) {\r
+ if (!alipayTransRes->InitResView(presenter_->AlipayGetSwitchIndex())) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransResView InitView null error!");\r
return false;\r
}\r
"AlipayMainView::ChangeGetTransListView alipayGetTransList null error!");\r
return false;\r
}\r
- if (alipayGetTransList->InitGetView(presenter_->AlipayGetSwitchIndex()) == false) {\r
+ if (!alipayGetTransList->InitGetView(presenter_->AlipayGetSwitchIndex())) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeGetTransListView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransProcessView alipayTransAni null error!");\r
return false;\r
}\r
- if (alipayTransAni->InitView() == false) {\r
+ if (!alipayTransAni->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeTransProcessView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBarView alipayPayCode null error!");\r
return false;\r
}\r
- if (alipayBarCode->InitView() == false) {\r
+ if (!alipayBarCode->InitView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeBarView InitView null error!");\r
return false;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeListView alipayList null error!");\r
return false;\r
}\r
- if (alipayList->InitListView() == false) {\r
+ if (!alipayList->InitListView()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeListView InitView null error!");\r
return false;\r
}\r
for (int i = 0; i < funcSize; i++) {\r
if (interface == ViewMapper[i].viewId) {\r
bool jug = (this->*(ViewMapper[i].func))(interface);\r
- if (jug == false) {\r
+ if (!jug) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainAlarmView:: ChangeInterFace[%d] false", interface);\r
return false;\r
}\r
ALIPAY_GET_TRANS_LIST_VIEW,\r
ALIPAY_TRANS_VIEW,\r
ALIPAY_TRANS_LIST_VIEW,\r
+ ALIPAY_SETTING_VIEW,\r
};\r
\r
void AlipayMainView::DestroyTempView(int16 hideView)\r
} else if (hideView == ALIPAY_TRANS_LIST_VIEW) {\r
delete alipayTransList;\r
alipayTransList = nullptr;\r
+ } else if (hideView == ALIPAY_SETTING_VIEW) {\r
+ delete alipaySetting;\r
+ alipaySetting = nullptr;\r
}\r
}\r
\r
return;\r
}\r
interListen = hideView;\r
- if (ClickFunc(showView) == false) {\r
+ if (!ClickFunc(showView)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayMainView::ChangeView ClickFunc error");\r
return;\r
}\r
\r
bool AlipayModel::AlipayStartBind(void)\r
{\r
- if (bindTimerId == NULL) {\r
- bindTimerId = osTimerNew(AlipayBindTimerCallBack, osTimerPeriodic, (void *)0, NULL);\r
- if (bindTimerId == NULL) {\r
+ if (bindTimerId == nullptr) {\r
+ bindTimerId = osTimerNew(AlipayBindTimerCallBack, osTimerPeriodic, (void *)0, nullptr);\r
+ if (bindTimerId == nullptr) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayStartBind Create timer fail.");\r
return false;\r
}\r
}\r
int16 alipayLis = AlipayModel::GetInstance()->GetAlipayInterLis();\r
int16 bindState = AlipayModel::GetInstance()->AlipayGetBindFlag();\r
- if (alipayLis == ALIPAY_BIND_RES_VIEW && bindState == true) {\r
+ if (alipayLis == ALIPAY_BIND_RES_VIEW && bindState) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ALIPAY_BIND_RES_VIEW bindState true in.");\r
AlipayMainView::GetInstance()->ChangeView(ALIPAY_BIND_RES_VIEW, ALIPAY_LIST_VIEW);\r
- } else if (alipayLis == ALIPAY_BIND_RES_VIEW && bindState == false) {\r
+ } else if (alipayLis == ALIPAY_BIND_RES_VIEW && (!bindState)) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ALIPAY_BIND_RES_VIEW bindState false in.");\r
AlipayMainView::GetInstance()->ChangeView(ALIPAY_BIND_RES_VIEW, ALIPAY_BIND_VIEW);\r
} else if (alipayLis == ALIPAY_PAY_VIEW) {\r
\r
bool AlipayModel::AlipayStartSwitchTimer(uint16_t time)\r
{\r
- if (switchTimerId == NULL) {\r
- switchTimerId = osTimerNew(AlipaySwitchTimerCallBack, osTimerOnce, (void *)0, NULL);\r
- if (switchTimerId == NULL) {\r
+ if (switchTimerId == nullptr) {\r
+ switchTimerId = osTimerNew(AlipaySwitchTimerCallBack, osTimerOnce, (void *)0, nullptr);\r
+ if (switchTimerId == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayStartSwitchTimer Create timer fail.");\r
return false;\r
}\r
void AlipayModel::AlipayStopSwitchTimer()\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayStopSwitchTimer stop timer.");\r
- if (switchTimerId != NULL) {\r
+ if (switchTimerId != nullptr) {\r
osTimerStop(switchTimerId);\r
}\r
return;\r
\r
void AlipayModel::AlipayStopBindTimer(void)\r
{\r
- if (bindTimerId == NULL) {\r
+ if (bindTimerId == nullptr) {\r
return;\r
}\r
int32_t ret = osTimerStop(bindTimerId);\r
int32_t AlipayModel::AlipayGetOnlineTranslist()\r
{\r
cardInfo_ = AlipayTransGetCardList();\r
- mc_alipay_trans_card_info_t *onLineList = NULL;\r
+ mc_alipay_trans_card_info_t *onLineList = nullptr;\r
\r
onLineList = (mc_alipay_trans_card_info_t *)malloc(sizeof(mc_alipay_trans_card_info_t) * ALIPAY_TRANS_CARD_MAX_LENGTH);\r
- if (onLineList == NULL) {\r
+ if (onLineList == nullptr) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayGetOnlineTranslist alloc fail.");\r
return -1;\r
}\r
cardSum_ = onLineNum;\r
}\r
free(onLineList);\r
- onLineList = NULL;\r
+ onLineList = nullptr;\r
return ret;\r
}\r
\r
mc_alipay_tans_card_status_t cardStatus = { 0 };\r
int32_t ret = alipayApi->check_trans_cartstatus(&cardInfo_[index], &cardStatus);\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayCheckTransCard in:%u.", ret);\r
- if (cardStatus.card_exits == true && cardStatus.remain_use_count >= ALIPAY_TRANS_CARD_MIN_VALID_NUM) {\r
+ if (cardStatus.card_exits && cardStatus.remain_use_count >= ALIPAY_TRANS_CARD_MIN_VALID_NUM) {\r
return 0;\r
}\r
return -1;\r
\r
bool AlipayModel::AlipayTransStartGetListsTimer(void)\r
{\r
- if (transTimerId == NULL) {\r
- transTimerId = osTimerNew(AlipayTransGetListsTimerCallBack, osTimerPeriodic, (void *)0, NULL);\r
- if (transTimerId == NULL) {\r
+ if (transTimerId == nullptr) {\r
+ transTimerId = osTimerNew(AlipayTransGetListsTimerCallBack, osTimerPeriodic, (void *)0, nullptr);\r
+ if (transTimerId == nullptr) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayTransStartGetLists Create timer fail.");\r
return false;\r
}\r
}\r
void AlipayModel::AlipayTransStopGetListsTimer(void)\r
{\r
- if (transTimerId == NULL) {\r
+ if (transTimerId == nullptr) {\r
return;\r
}\r
int32_t ret = osTimerStop(transTimerId);\r
bool AlipayModel::AlipayInitModel(void)\r
{\r
transCode_ = (uint8_t *)malloc(ALIPAY_TRANS_CODE_MAX_LEN);\r
- if (transCode_ == NULL) {\r
+ if (transCode_ == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayInitModel transCode_ alloc failure.");\r
return false;\r
}\r
void AlipayModel::AlipayDeinitModel(void)\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayModel::AlipayDeinitModel in.");\r
- if (transCode_ != NULL) {\r
+ if (transCode_ != nullptr) {\r
free(transCode_);\r
- transCode_ = NULL;\r
+ transCode_ = nullptr;\r
}\r
svr_alipay_deinit_trans_context();\r
return;\r
SetStyle(STYLE_BACKGROUND_COLOR, 0xff1677ff);\r
SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPayCode::InitView AlipayInitLabel() false");\r
return false;\r
}\r
- if (AlipayInitImage() == false) {\r
+ if (!AlipayInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPayCode::InitView AlipayInitImage() false");\r
return false;\r
}\r
\r
- if (AlipayInitQrcode() == false) {\r
+ if (!AlipayInitQrcode()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPayCode::InitView AlipayInitQrcode() false");\r
return false;\r
}\r
- if (AlipayInitButton() == false) {\r
+ if (!AlipayInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPayCode::InitView AlipayInitButton() false");\r
return false;\r
}\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayPresenter OnStart");\r
Presenter<AlipayMainView>::OnStart();\r
alipayMode_->AlipayExitLpm();\r
- if (alipayMode_->AlipayInitModel() == false) {\r
+ if (!alipayMode_->AlipayInitModel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPresenter::OnStart AlipayInitModel fail.");\r
NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST);\r
return;\r
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);\r
\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipaySetting::InitView AlipayInitLabel() false");\r
return false;\r
}\r
- if (AlipayInitButton() == false) {\r
+ if (!AlipayInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipaySetting::InitView AlipayInitButton() false");\r
return false;\r
}\r
\r
bool AlipayGetTransList::AlipayInitButton(uint32_t index)\r
{\r
- if (InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y,\r
- g_AlipayTransGetListMapper[index].label_left, g_AlipayTransGetListMapper[index].button_left) == false) {\r
+ if (!InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y,\r
+ g_AlipayTransGetListMapper[index].label_left, g_AlipayTransGetListMapper[index].button_left)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,\r
"AlipayGetTransList::AlipayInitButton new alipayButton[ALIPAY_SET_ZERO] fail");\r
return false;\r
}\r
- if (InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y,\r
- g_AlipayTransGetListMapper[index].label_right, g_AlipayTransGetListMapper[index].button_right) == false) {\r
+ if (!InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y,\r
+ g_AlipayTransGetListMapper[index].label_right, g_AlipayTransGetListMapper[index].button_right)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,\r
"AlipayGetTransList::AlipayInitButton new alipayButton[ALIPAY_SET_ONE] fail");\r
return false;\r
SetOnDragListener(presenter_);\r
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
\r
- if (AlipayInitLabel(index) == false) {\r
+ if (!AlipayInitLabel(index)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayGetTransList::InitView AlipayInitLabel false");\r
return false;\r
}\r
- if (AlipayInitButton(index) == false) {\r
+ if (!AlipayInitButton(index)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayGetTransList::InitView AlipayInitButton false");\r
return false;\r
}\r
SetOnDragListener(presenter_);\r
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransAni::InitView AlipayInitLabel() false");\r
return false;\r
}\r
- if (AlipayInitImageAni() == false) {\r
+ if (!AlipayInitImageAni()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransAni::InitView AlipayInitImageAni() false");\r
return false;\r
}\r
SetStyle(STYLE_BACKGROUND_COLOR, 0xff1677ff);\r
SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransCode::InitView AlipayInitLabel() false");\r
return false;\r
}\r
\r
- if (AlipayInitQrcode() == false) {\r
+ if (!AlipayInitQrcode()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransCode::InitView AlipayInitQrcode() false");\r
return false;\r
}\r
- if (AlipayInitButton() == false) {\r
+ if (!AlipayInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransCode::InitView AlipayInitButton() false");\r
return false;\r
}\r
SetStyle(STYLE_BACKGROUND_COLOR, 0xff1677ff);\r
SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransEnable::InitView AlipayInitLabel() false");\r
return false;\r
}\r
\r
- if (AlipayInitQrcode() == false) {\r
+ if (!AlipayInitQrcode()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransEnable::InitView AlipayInitQrcode() false");\r
return false;\r
}\r
SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);
SetStyle(STYLE_BACKGROUND_OPA, UN_OPACITY);
- if (AlipayInitList() == false) {
+ if (!AlipayInitList()) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransList::InitView AlipayInitList() false");
return false;
}
- if (AlipayInitButton() == false) {
+ if (!AlipayInitButton()) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransList::InitView AlipayInitButton() false");
return false;
}
SetOnDragListener(presenter_);\r
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
\r
- if (AlipayInitLabel(g_AlipayTransResMapper[index].str) == false) {\r
+ if (!AlipayInitLabel(g_AlipayTransResMapper[index].str)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransRes::InitView AlipayInitLabel() false");\r
return false;\r
}\r
- if (AlipayInitImage(PNG_ALIPAY_BIND_FAILURE) == false) {\r
+ if (!AlipayInitImage(PNG_ALIPAY_BIND_FAILURE)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransRes::InitView AlipayInitImage() false");\r
return false;\r
}\r
\r
- if (AlipayInitButton(index) == false) {\r
+ if (!AlipayInitButton(index)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransRes::InitView AlipayInitButton() false");\r
return false;\r
}\r
SetOnDragListener(presenter_);\r
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
\r
- if (AlipayInitLabel(g_AlipayTransTipsMapper[index].str) == false) {\r
+ if (!AlipayInitLabel(g_AlipayTransTipsMapper[index].str)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransTips::InitView AlipayInitLabel() false");\r
return false;\r
}\r
- if (AlipayInitImage(PNG_ALIPAY_BIND_FAILURE) == false) {\r
+ if (!AlipayInitImage(PNG_ALIPAY_BIND_FAILURE)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransTips::InitView AlipayInitImage() false");\r
return false;\r
}\r
\r
- if (AlipayInitButton(index) == false) {\r
+ if (!AlipayInitButton(index)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayTransTips::InitView AlipayInitButton() false");\r
return false;\r
}\r
\r
bool AlipayUnbind::AlipayInitButton()\r
{\r
- if (InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y, UNBIND_BUTTON_TEXT_FIRST,\r
- ALIPAY_SETTING_UNBIND) == false) {\r
+ if (!InitSimilarButton(ALIPAY_SET_ZERO, EXIT_BUTTON_EXIT_X, EXIT_BUTTON_EXIT_Y, UNBIND_BUTTON_TEXT_FIRST,\r
+ ALIPAY_SETTING_UNBIND)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbind::AlipayInitButton new alipayButton[ALIPAY_SET_ZERO] fail");\r
return false;\r
}\r
- if (InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y, UNBIND_BUTTON_TEXT_SECOND,\r
- ALIPAY_SETTING_CANCEL) == false) {\r
+ if (!InitSimilarButton(ALIPAY_SET_ONE, EXIT_BUTTON_BIND_X, EXIT_BUTTON_BIND_Y, UNBIND_BUTTON_TEXT_SECOND,\r
+ ALIPAY_SETTING_CANCEL)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbind::AlipayInitButton new alipayButton[ALIPAY_SET_ONE] fail");\r
return false;\r
}\r
SetOnDragListener(presenter_);\r
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbind::InitView AlipayInitLabel() false");\r
return false;\r
}\r
- if (AlipayInitButton() == false) {\r
+ if (!AlipayInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbind::InitView AlipayInitButton() false");\r
return false;\r
}\r
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);\r
\r
- if (AlipayInitLabel() == false) {\r
+ if (!AlipayInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbindFinish::InitView AlipayInitLabel() false");\r
return false;\r
}\r
- if (AlipayInitButton() == false) {\r
+ if (!AlipayInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbindFinish::InitView AlipayInitButton() false");\r
return false;\r
}\r
class AppItemView : public UIViewGroup {
public:
explicit AppItemView();
- virtual ~AppItemView();
+ ~AppItemView() override;
void SetItemInfo(const AppItem &itemInfo);
AppViewId GetViewId();
const char *GetAppUid();
UILabel label_;
AppItem itemInfo_ = { VIEW_INVALID, nullptr, nullptr, nullptr, nullptr };
};
+
+class HexagonsItemView : public UIImageView {
+public:
+ explicit HexagonsItemView();
+ ~HexagonsItemView();
+ void SetItemInfo(const AppItem &itemInfo);
+ AppViewId GetViewId();
+ const char *GetAppUid();
+private:
+ HexagonsItemView(const HexagonsItemView &);
+ HexagonsItemView &operator = (const HexagonsItemView &);
+ AppItem itemInfo_ = { VIEW_INVALID, nullptr, nullptr, nullptr, nullptr };
+};
+
}
#endif
class ApplistAdapter : public AbstractAdapter {
public:
explicit ApplistAdapter();
- virtual ~ApplistAdapter();
+ ~ApplistAdapter() override;
/* *
* @brief Obtains the <b>data</b> size of the UILabel adapter.
* @since 1.0
* @version 1.0
*/
- virtual uint16 GetCount(void) override;
+ uint16 GetCount(void) override;
- virtual UIView *GetView(UIView *inView, int16 index) override;
+ UIView *GetView(UIView *inView, int16 index) override;
- virtual void AddListItem(const AppItem &item);
+ void AddListItem(const AppItem &item);
void SetItemClickListener(UIView::OnClickListener *itemClickListener)
{
public:
static ApplistModel &GetInstance(void);
- void initApplist();
+ void Init();
const AppItem *GetApplistItems() const;
uint8 GetAppListNum() const;
void ResolvingJSAppItems(void);
int GetHeadItemY(void);
void ApplistUpdate(void);
void SetPresenter(ApplistPresenter *p);
-
+ bool GetIsUseListStyle(void);
private:
ApplistModel();
ApplistModel(const ApplistModel &);
uint16_t startIndex = 0;
int headItemY = 0;
+ bool initFlag{false};
};
}
#include "KeyInputListener.h"
namespace OHOS {
- class ApplistPresenter : public Presenter<ApplistView>, public UIView::OnClickListener {
+ class ApplistPresenter : public Presenter<ApplistView>, public UIView::OnClickListener,
+ public ListScrollListener, public UIView::OnRotateListener {
public:
ApplistPresenter();
- virtual ~ApplistPresenter();
+ ~ApplistPresenter() override;
- virtual void OnStart() override;
- virtual void OnResume() override;
- virtual void OnPause() override;
- virtual void OnStop() override;
+ void OnStart() override;
+ void OnResume() override;
+ void OnPause() override;
+ void OnStop() override;
+ bool OnRotate(UIView& view, const RotateEvent& event) override;
bool OnClick(UIView &view, const ClickEvent &event) override;
+ void OnItemSelected(int16 index, UIView *view) override;
void SetStartIndex(uint16_t index);
uint16_t GetStartIndex(void);
void SetHeadItemY(int y);
int GetHeadItemY(void);
uint8_t GetListItemNum(void);
ApplistView* GetAppListView();
+ bool GetIsUseListStyle(void);
private:
+ AppItemView *itemViewSele{nullptr};
+ AppItemView *preItemViewSele{nullptr};
ApplistModel *model{nullptr};
KeyInputListener *keyActListenr{nullptr};
};
}
-#endif // APPLIST_PRESENTER_H
\ No newline at end of file
+#endif // APPLIST_PRESENTER_H
#include "components/ui_scroll_view.h"
#include "components/ui_label.h"
#include "components/ui_list.h"
+#include "components/ui_custom_hexagons_list.h"
#include "window/window.h"
#include "ohos_types.h"
#include "BaseView.h"
{
continueDrag = false;
}
- virtual ~AppListOnDragListener() {}
- virtual bool OnDragStart(UIView& view, const DragEvent& event)
+ ~AppListOnDragListener() override {}
+ bool OnDragStart(UIView& view, const DragEvent& event) override
{
UNUSED(view);
UNUSED(event);
return false;
}
- virtual bool OnDrag(UIView& view, const DragEvent& event)
+ bool OnDrag(UIView& view, const DragEvent& event) override
{
UNUSED(view);
if (!continueDrag) {
if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) &&
(event.GetDeltaX() > X_DRAG_OFFSET) && (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Applist Ondrag!!");
- NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE, TRANSITION_ZOOM);
+ NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE, TransitionType::TRANSITION_ZOOM);
}
return false;
}
- virtual bool OnDragEnd(UIView& view, const DragEvent& event)
+ bool OnDragEnd(UIView& view, const DragEvent& event) override
{
UNUSED(view);
UNUSED(event);
};
class ApplistPresenter;
-class ApplistView : public View<ApplistPresenter>, public ListScrollListener {
+class ApplistView : public View<ApplistPresenter> {
public:
ApplistView();
- virtual ~ApplistView();
+ ~ApplistView();
- virtual void OnStart() override;
- virtual void OnSetUpView() override;
- virtual void OnTearDownView() override;
- virtual void OnStop() override;
+ void OnStart() override;
+ void OnSetUpView() override;
+ void OnTearDownView() override;
+ void OnStop() override;
void AddAppItemToList(const AppItem &item);
void ClearAppItemToList();
- void OnItemSelected(int16 index, UIView *view) override;
- UIList* GetAppUIList(void);
-
+ void RefreshAppList(void);
private:
+ void HexagonsStyleOnStart();
+ void ListStyleOnStart();
+ void HexagonsStyleOnSetUpView();
+ void ListStyleOnSetUpView();
+ void HexagonsStyleOnStop();
+ void ListStyleOnStop();
+
+ /* for list style */
ApplistAdapter *listAdapter_{nullptr};
UIList *contentList_{nullptr};
UIView::OnDragListener *dragListener{nullptr};
- AppItemView *itemViewSele{nullptr};
- AppItemView *preItemViewSele{nullptr};
+
+ /* for hexagons style */
+ UICustomHexagonsList* hexagonsList_{nullptr};
+ std::list<HexagonsItemView*> listHexagonsView_;
+ uint16_t imgSize_ = 0;
+ uint16_t imgDistance_ = 0;
};
}
#endif // APPLIST_VIEW_H
\ No newline at end of file
icon_.ResetTransParameter();
}
+ HexagonsItemView::HexagonsItemView()
+ {
+ }
+
+ HexagonsItemView::~HexagonsItemView()
+ {
+ }
+ void HexagonsItemView::SetItemInfo(const AppItem &itemInfo)
+ {
+ itemInfo_ = itemInfo;
+ }
+
+ AppViewId HexagonsItemView::GetViewId()
+ {
+ return itemInfo_.id;
+ }
+
+ const char *HexagonsItemView::GetAppUid()
+ {
+ return itemInfo_.uid;
+ }
}
* Create: 2021-09-18
*/
-#include "stdint.h"
+#include <cstdint>
#include "mem_util.h"
#include "bundle_info_utils.h"
#include "securec.h"
#include "UiConfig.h"
#include "ApplistModel.h"
#include "ApplistPresenter.h"
+#include "SetDesktopModel.h"
namespace OHOS {
const AppItem g_nativeAppList[] = {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistModel::~ApplistModel()");
}
- void ApplistModel::initApplist()
+
+ void ApplistModel::Init()
{
- ResolvingJSAppItems();
+ if (!initFlag) {
+ ResolvingJSAppItems();
+ initFlag = true;
+ }
}
void ApplistModel::ResolvingJSAppItems(void)
{
- uint8 i, ret, nativeAppNum;
- int32 len = 0;
#ifdef JS_ENABLE
if (bundleInfos != nullptr) {
- for (i = 0; i < bundleLen; i++) {
+ for (uint8_t i = 0; i < bundleLen; i++) {
ClearBundleInfo(bundleInfos + i);
}
bundleLen = 0;
appLen = 0;
- nativeAppNum = sizeof(g_nativeAppList) / sizeof(AppItem);
+ uint8_t nativeAppNum = sizeof(g_nativeAppList) / sizeof(AppItem);
if (nativeAppNum >= APP_MAX_NUM) {
nativeAppNum = APP_MAX_NUM;
}
- ret = memcpy_s(applist, sizeof(AppItem) * APP_MAX_NUM, g_nativeAppList, sizeof(AppItem) * nativeAppNum);
+ uint8_t ret = memcpy_s(applist, sizeof(AppItem) * APP_MAX_NUM, g_nativeAppList, sizeof(AppItem) * nativeAppNum);
if (ret != EOK) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%s] ret = %d, nativeAppNum = %d", __FUNCTION__, ret, nativeAppNum);
nativeAppNum = 0;
}
appLen = nativeAppNum;
#ifdef JS_ENABLE
+ int32_t len = 0;
ret = BundleMsClient::GetInstance().GetBundleInfos(0, &bundleInfos, &len);
if ((ret == 0) && (len > 0) && (bundleInfos != nullptr)) {
bundleLen = len;
appLen++;
bundleInfos[len].abilityInfo = nullptr;
}
+ } else {
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "ResolvingJSAppItems GetBundleInfos ret = %d \r", ret);
}
#endif
}
void ApplistModel::ApplistUpdate(void)
{
+ ResolvingJSAppItems();
if (presenter != nullptr) {
- ResolvingJSAppItems();
presenter->GetAppListView()->ClearAppItemToList();
const AppItem *itemInfo = GetApplistItems();
for (uint8 i = 0; i < GetAppListNum(); i++) {
presenter->GetAppListView()->AddAppItemToList(itemInfo[i]);
}
- presenter->GetAppListView()->GetAppUIList()->RefreshList();
+ presenter->GetAppListView()->RefreshAppList();
}
}
{
presenter = p;
}
+
+ bool ApplistModel::GetIsUseListStyle(void)
+ {
+ return (SetDesktopModel::GetInstance().GetDesktopStyle() == APPLIST_STYLE);
+ }
}
#include "ApplistPresenter.h"
#include "ability_manager.h"
-
#include "securec.h"
+#include "components/ui_hexagons_list.h"
+#include "TransitionType.h"
namespace OHOS {
ApplistPresenter::ApplistPresenter()
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistPresenter::ApplistPresenter()");
model = &ApplistModel::GetInstance();
+ model->Init();
model->SetPresenter(this);
}
- ApplistPresenter::~ApplistPresenter() {
+ ApplistPresenter::~ApplistPresenter()
+ {
if (keyActListenr != nullptr) {
delete keyActListenr;
keyActListenr = nullptr;
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistPresenter::OnStart()");
Presenter<ApplistView>::OnStart();
- model->initApplist();
-
if (keyActListenr == nullptr) {
keyActListenr = new KeyInputListener();
if (keyActListenr != nullptr) {
for (uint8 i = 0; i < model->GetAppListNum(); i++) {
view_->AddAppItemToList(itemInfo[i]);
}
+ view_->RefreshAppList();
}
void ApplistPresenter::OnPause()
void ApplistPresenter::OnStop(void)
{
Presenter<ApplistView>::OnStop();
- RootView::GetInstance()->ClearOnKeyActListener();
}
- bool ApplistPresenter::OnClick(UIView &view, const ClickEvent &event)
+ bool ApplistPresenter::OnRotate(UIView& view, const RotateEvent& event)
{
- UNUSED(event);
- AppItemView *itemView = static_cast<AppItemView *>(&view);
+ UICustomHexagonsList* hexagonsView = dynamic_cast<UICustomHexagonsList *>(&view);
+ if (hexagonsView == nullptr) {
+ return false;
+ }
+ int8_t index = hexagonsView->GetFocusedImgIndex();
+ uint8_t focusIndex_ = 0;
+ if (index >= 0) {
+ focusIndex_ = static_cast<uint8_t>(index);
+ }
+ HexagonsItemView *itemView = dynamic_cast<HexagonsItemView *>(hexagonsView->GetViewByIndex(focusIndex_));
AppViewId viewId = itemView->GetViewId();
+ if (FloatMore(hexagonsView->GetGlobalScale(), 2.0f)) { // 2.0 threshold for beginning transition
+ hexagonsView->StopRotateAnimator();
+ NativeAbility::GetInstance().ChangeSlice(viewId, TransitionType::TRANSITION_HEXAGONS);
+ hexagonsView->ClearFocus();
+ }
+ return true;
+ }
+ bool ApplistPresenter::OnClick(UIView &view, const ClickEvent &event)
+ {
+ UNUSED(event);
+ AppViewId viewId = VIEW_INVALID;
+ char *uid = nullptr;
+ TransitionType type = TransitionType::TRANSITION_INVALID;
+ if (GetIsUseListStyle()) {
+ AppItemView *itemView = dynamic_cast<AppItemView *>(&view);
+ if (itemView == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "itemView is nullptr", viewId);
+ return false;
+ }
+ viewId = itemView->GetViewId();
+ uid = (char *)itemView->GetAppUid();
+ } else {
+ HexagonsItemView *itemView = dynamic_cast<HexagonsItemView *>(&view);
+ UIHexagonsList* hexagonsView = dynamic_cast<UIHexagonsList *>(itemView->GetParent());
+ if (hexagonsView == nullptr || itemView == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hexagonsView or itemView is nullptr");
+ return false;
+ }
+ viewId = itemView->GetViewId();
+ uid = (char *)itemView->GetAppUid();
+ hexagonsView->SetDraggable(false);
+ hexagonsView->Scale(1.0f, itemView->GetViewIndex()); // switch focus to click view
+ type = TransitionType::TRANSITION_HEXAGONS;
+ }
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistPresenter::OnClick viewid = %d", viewId);
if (viewId < VIEW_MAX_INTER_APP) {
- NativeAbility::GetInstance().ChangeSlice(viewId);
+ NativeAbility::GetInstance().ChangeSlice(viewId, type);
return true;
} else if (viewId == VIEW_EXTERN_APP) {
#ifdef JS_ENABLE
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistPresenter::OnClick bundleName = %s", itemView->GetAppUid());
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistPresenter::OnClick bundleName = %s", uid);
Want *want = new Want();
memset_s(want, sizeof(Want), 0, sizeof(Want));
ElementName startElement = {};
startElement.abilityName = (char *)"default";
- startElement.bundleName = (char *)itemView->GetAppUid();
+ startElement.bundleName = uid;
startElement.deviceId = nullptr;
SetWantElement(want, startElement);
}
return false;
}
+ void ApplistPresenter::OnItemSelected(int16 index, UIView *view)
+ {
+ UNUSED(index);
+ if (view != nullptr) {
+ itemViewSele = static_cast<AppItemView *>(view);
+ itemViewSele->SelectedChange();
+ if (preItemViewSele != nullptr && preItemViewSele != itemViewSele) {
+ preItemViewSele->Reset();
+ }
+ preItemViewSele = itemViewSele;
+ }
+ }
void ApplistPresenter::SetStartIndex(uint16_t index)
{
model->SetStartIndex(index);
return model->GetAppListNum();
}
+ bool ApplistPresenter::GetIsUseListStyle(void)
+ {
+ return model->GetIsUseListStyle();
+ }
+
ApplistView* ApplistPresenter::GetAppListView()
{
return view_;
}
-}
\ No newline at end of file
+}
ApplistView::~ApplistView()
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::~ApplistView ");
- delete listAdapter_;
- listAdapter_ = nullptr;
- delete contentList_;
- contentList_ = nullptr;
- delete dragListener;
- dragListener = nullptr;
+ if (listAdapter_ != nullptr) {
+ delete listAdapter_;
+ listAdapter_ = nullptr;
+ }
+ if (contentList_ != nullptr) {
+ delete contentList_;
+ contentList_ = nullptr;
+ }
+ if (dragListener != nullptr) {
+ delete dragListener;
+ dragListener = nullptr;
+ }
+ if (hexagonsList_ != nullptr) {
+ delete hexagonsList_;
+ hexagonsList_ = nullptr;
+ }
}
void ApplistView::OnStart()
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::OnStart ");
View<ApplistPresenter>::OnStart();
+ if (presenter_->GetIsUseListStyle()) {
+ ListStyleOnStart();
+ } else {
+ HexagonsStyleOnStart();
+ }
+}
+void ApplistView::HexagonsStyleOnStart()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::HexagonsStyleOnStart ");
+ if (hexagonsList_ == nullptr) {
+ hexagonsList_ = new UICustomHexagonsList();
+ }
+ hexagonsList_->SetPosition(0, 0,
+ Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); // 2, two
+ imgDistance_ = hexagonsList_->GetWidth() * 0.25991; // 0.25991, empirical coefficient
+ imgSize_ = hexagonsList_->GetWidth() * 0.23348; // 0.23348, empirical coefficient
+ hexagonsList_->SetImageDistance(imgDistance_);
+ hexagonsList_->SetImageSizeInCenter(imgSize_);
+ int16_t blankSize = hexagonsList_->GetRelativeRect().GetWidth() > hexagonsList_->GetRelativeRect().GetHeight() ?
+ hexagonsList_->GetRelativeRect().GetWidth() / 2 : hexagonsList_->GetRelativeRect().GetHeight() / 2; // 2, half
+ hexagonsList_->SetScrollBlankSize(blankSize);
+ hexagonsList_->SetReboundSize(blankSize);
+ hexagonsList_->SetThrowDrag(true);
+ hexagonsList_->SetOnRotateListener(presenter_);
+ hexagonsList_->RequestFocus();
+ SetContainerView(hexagonsList_);
+}
+
+void ApplistView::ListStyleOnStart()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::ListStyleOnStart");
+ SetContainerView(new UIViewGroup());
+ container_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
listAdapter_ = new ApplistAdapter();
if (listAdapter_ == nullptr) {
return;
contentList_->SetDraggable(true);
contentList_->SetThrowDrag(true);
contentList_->EnableAutoAlign(true);
- contentList_->SetScrollStateListener(this);
+ contentList_->SetScrollStateListener(presenter_);
contentList_->SetMaxScrollDistance(MAX_SCROLL_DIS);
contentList_->SetYScrollBarVisible(true);
- SetContainerView(contentList_);
+ container_->Add(contentList_);
dragListener = new AppListOnDragListener();
if (dragListener == nullptr) {
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::OnSetUpView");
View<ApplistPresenter>::OnSetUpView();
+ if (presenter_->GetIsUseListStyle()) {
+ ListStyleOnSetUpView();
+ } else {
+ HexagonsStyleOnSetUpView();
+ }
+}
+
+void ApplistView::HexagonsStyleOnSetUpView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::HexagonsStyleOnSetUpView ");
+}
+
+void ApplistView::ListStyleOnSetUpView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::ListStyleOnSetUpView");
if (contentList_ == nullptr || listAdapter_ == nullptr) {
return;
contentList_->SetStartIndex(startIndex);
contentList_->SetAdapter(listAdapter_);
contentList_->ScrollBy(headY);
- Draw();
return;
}
void ApplistView::OnStop()
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::OnStop");
- int16_t listHeadY = contentList_->GetChildrenHead()->GetY();
- int16_t listHeadIndex = contentList_->GetChildrenHead()->GetViewIndex();
-
- presenter_->SetHeadItemY(listHeadY);
- presenter_->SetStartIndex(listHeadIndex);
-
+ if (presenter_->GetIsUseListStyle()) {
+ ListStyleOnStop();
+ } else {
+ HexagonsStyleOnStop();
+ }
View<ApplistPresenter>::OnStop();
- container_ = nullptr;
-
+ if (container_ != nullptr) {
+ container_->RemoveAll();
+ delete container_;
+ container_ = nullptr;
+ }
RootView::GetInstance()->ClearOnKeyActListener();
- RootView::GetInstance()->RemoveAll();
+ FocusManager::GetInstance()->ClearFocus();
return;
}
-void ApplistView::AddAppItemToList(const AppItem &item)
+void ApplistView::HexagonsStyleOnStop()
{
- listAdapter_->AddListItem(item);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::HexagonsStyleOnStop");
+ if (hexagonsList_ != nullptr) {
+ hexagonsList_->RemoveAll();
+ }
+ for (auto iter : listHexagonsView_) {
+ delete iter;
+ }
+ listHexagonsView_.clear();
}
-void ApplistView::ClearAppItemToList()
+void ApplistView::ListStyleOnStop()
{
- listAdapter_->ClearItem();
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::ListStyleOnStop");
+ int16_t listHeadY = contentList_->GetChildrenHead()->GetY();
+ int16_t listHeadIndex = contentList_->GetChildrenHead()->GetViewIndex();
+ presenter_->SetHeadItemY(listHeadY);
+ presenter_->SetStartIndex(listHeadIndex);
}
-void ApplistView::OnItemSelected(int16 index, UIView *view)
+void ApplistView::AddAppItemToList(const AppItem &item)
{
- UNUSED(index);
- if (view != nullptr) {
- itemViewSele = static_cast<AppItemView *>(view);
- itemViewSele->SelectedChange();
+ if (presenter_->GetIsUseListStyle()) {
+ listAdapter_->AddListItem(item);
+ } else {
+ HexagonsItemView *itemView = new HexagonsItemView();
+ itemView->SetItemInfo(item);
+ itemView->SetSrc(item.iconSmall);
+ itemView->SetTouchable(true);
+ itemView->SetOnClickListener(presenter_);
+
+ hexagonsList_->Add(itemView);
+ listHexagonsView_.push_back(itemView);
+ }
+}
- if (preItemViewSele != nullptr && preItemViewSele != itemViewSele) {
- preItemViewSele->Reset();
+void ApplistView::ClearAppItemToList()
+{
+ if (presenter_->GetIsUseListStyle()) {
+ listAdapter_->ClearItem();
+ } else {
+ if (hexagonsList_ != nullptr) {
+ hexagonsList_->RemoveAll();
+ }
+ for (auto iter : listHexagonsView_) {
+ delete iter;
}
- preItemViewSele = itemViewSele;
+ listHexagonsView_.clear();
}
}
-UIList* ApplistView::GetAppUIList(void)
+void ApplistView::RefreshAppList(void)
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::GetAppUIList");
- return contentList_;
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::RefreshAppList");
+ if (presenter_->GetIsUseListStyle()) {
+ contentList_->RefreshList();
+ } else {
+ hexagonsList_->LayoutChildren(true);
+ }
}
-
}
#ifndef BLOOD_OXYGEN_MODEL_H\r
#define BLOOD_OXYGEN_MODEL_H\r
\r
-#include "stdio.h"\r
+#include <cstdio>\r
#include "gfx_utils/list.h"\r
#include "los_mux.h"\r
\r
public UIView::OnDragListener {\r
public:\r
BloodOxygenPresenter();\r
- virtual ~BloodOxygenPresenter();\r
+ ~BloodOxygenPresenter() override;\r
\r
void OnStart() override;\r
void OnPause() override;\r
void OnResume() override;\r
void OnStop() override;\r
- virtual void Notify() override;\r
+ void Notify() override;\r
static BloodOxygenPresenter *GetInstance(void);\r
bool OnDrag(UIView& view, const DragEvent& event) override;\r
bool OnClick(UIView& view, const ClickEvent& event) override;\r
class BloodOxygenView : public View<BloodOxygenPresenter> {\r
public:\r
BloodOxygenView();\r
- virtual ~BloodOxygenView();\r
+ ~BloodOxygenView() override;\r
\r
void OnStop() override;\r
void OnSetUpView() override;\r
#include "components/ui_label.h"\r
#include "BloodBandoffView.h"\r
#include "ChangeSliceListener.h"\r
+#include "ui_service.h"\r
\r
namespace OHOS {\r
static BloodOxygenPresenter *g_pMainView = nullptr;\r
void BloodOxygenPresenter::OnStart()\r
{\r
Presenter<BloodOxygenView>::OnStart();\r
+ SendMsgToUIService(UI_ADD_SLEEP_VETO, 0, nullptr, 0);\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BloodOxygenPresenter::On Start ");\r
}\r
\r
\r
void BloodOxygenPresenter::OnResume(void) {}\r
\r
-void BloodOxygenPresenter::OnStop(void) {}\r
+void BloodOxygenPresenter::OnStop(void)\r
+{\r
+ SendMsgToUIService(UI_RM_SLEEP_VETO, 0, nullptr, 0);\r
+}\r
\r
bool BloodOxygenPresenter::CheckPointersValue()\r
{\r
UNUSED(view);\r
UNUSED(event);\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BloodOxygenPresenter::OnClick");\r
- if (CheckPointersValue() == false) {\r
+ if (!CheckPointersValue()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BloodOxygenPresenter::Pointers is empty");\r
return false;\r
}\r
\r
void BloodOxygenPresenter::ProgressNotify(void)\r
{\r
- if (CheckPointersValue() == false) {\r
+ if (!CheckPointersValue()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BloodOxygenPresenter::Pointers is empty");\r
return;\r
}\r
\r
- if (BloodOxygenModel::GetInstance()->GetBloodOxygenViewStatus() == true) {\r
+ if (BloodOxygenModel::GetInstance()->GetBloodOxygenViewStatus()) {\r
count--;\r
BloodOxygenView::GetInstance()->GetCircleProgress()->SetValue(count);\r
if (count == PROGRESS_VALUE_MIN) {\r
\r
void BloodOxygenPresenter::ReturnInterface()\r
{\r
- if (BloodOxygenModel::GetInstance()->GetBloodBandoffViewStatus() == true) {\r
- if (BloodBandoffView::GetInstance()->GetImageAnimator()->GetState() == false) {\r
+ if (BloodOxygenModel::GetInstance()->GetBloodBandoffViewStatus()) {\r
+ if (!BloodBandoffView::GetInstance()->GetImageAnimator()->GetState()) {\r
BloodOxygenModel::GetInstance()->SetBloodBandoffViewStatus(false);\r
BloodOxygenModel::GetInstance()->SetBloodOxygenViewStatus(true);\r
\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BloodOxygenView::OnStart");\r
View<BloodOxygenPresenter>::OnStart();\r
-\r
-\r
group = new UIViewGroup();\r
if (group == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BloodOxygenView::new group fail");\r
group->SetPosition(MATH_ZERO, MATH_ZERO);\r
group->Resize(VERTICAL_RESOLUTION, HORIZONTAL_RESOLUTION);\r
\r
- if (InitImageDisplay() == false) {\r
+ if (!InitImageDisplay()) {\r
return;\r
}\r
\r
- if (SetOnDragListener() == false) {\r
+ if (!SetOnDragListener()) {\r
return;\r
}\r
\r
}\r
group->Add(testButton);\r
\r
- if (OHOS::BloodOxygenModel::GetInstance()->GetBloodOxygenViewStatus() == true) {\r
+ if (OHOS::BloodOxygenModel::GetInstance()->GetBloodOxygenViewStatus()) {\r
testButton->SetTouchable(false);\r
percent->SetText("");\r
}\r
class BluetoothItemView : public UIViewGroup {\r
public:\r
explicit BluetoothItemView();\r
- virtual ~BluetoothItemView();\r
- virtual void SetItemInfo(const BluetoothCaseInfo& itemInfo, bool isCaseList);\r
+ ~BluetoothItemView() override;\r
+ void SetItemInfo(const BluetoothCaseInfo& itemInfo, bool isCaseList);\r
BluetoothCaseInfo *GetItemInfo(void);\r
void SetConnectionstatus(const BluetoothCaseInfo& infoData);\r
- virtual void SetUpChild();\r
+ void SetUpChild();\r
void ConnectAnimatorStart(void);\r
void ConnectAnimatorStop(void);\r
bool IsConnectAnimator(void);\r
#define BLUETOOTH_MODEL_H\r
\r
#include <list>\r
-#include "stdio.h"\r
+#include <cstdio>\r
#include "gfx_utils/list.h"\r
\r
#include "bts_def.h"\r
int16_t temp;\r
} BluetoothCaseInfo;\r
\r
-typedef struct {\r
- void *stream_hdl;\r
- uint8_t loc_volume;\r
- uint8_t play_stat;\r
- uint8_t dir_forward;\r
- uint8_t avrcp_button_flag;\r
- bd_addr_t bd_addr;\r
- uint8_t reg_cap_auto;\r
- uint8_t resrv;\r
- profile_connect_state_t avrcp_srv_conn_stat;\r
-} BtAvrcpTgInftrerface;\r
-\r
class BluetoothItemView;\r
class BluetoothModel {\r
public:\r
class MainBluetoothView : public View<BluetoothPresenter> {\r
public:\r
MainBluetoothView();\r
- virtual ~MainBluetoothView();\r
+ ~MainBluetoothView() override;\r
\r
void OnStart() override;\r
void OnSetUpView() override;\r
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothCaseListAdapter::ClickAnimation");
bool ret = BluetoothModel::GetInstance()->IsTagScanDeviceClicked();
- if (ret == true) {
+ if (ret) {
BluetoothCaseInfo *clickInfo = BluetoothModel::GetInstance()->GetTempMacValue();
if ((clickInfo->addr[0] == itemData.addr[0]) && (clickInfo->addr[1] == itemData.addr[1]) &&
(clickInfo->addr[2] == itemData.addr[2]) && (clickInfo->addr[3] == itemData.addr[3]) &&
List<BluetoothCaseInfo> &bluetoothConnedList = BluetoothModel::GetInstance()->GetConnedDevicesCase();\r
bool ret = bluetoothConnedList.IsEmpty();\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothDeviceListView::RefreshText bluetoothConnedList.IsEmpty ret = %d", ret);\r
- if (ret == true) {\r
+ if (ret) {\r
emptyLabel->SetVisible(true);\r
} else {\r
emptyLabel->SetVisible(false);\r
#define BLUETOOTH_IMAGE_HEIGHT 104\r
#define BLUETOOTH_DELAY 200\r
\r
-osTimerId_t g_stopScanHandle = NULL;\r
+osTimerId_t g_stopScanHandle = nullptr;\r
static constexpr uint64_t MS_SCAN_TIME = 25000;\r
\r
BluetoothEarPhoneView::BluetoothEarPhoneView()\r
\r
void CancelBrScanHandle(void)\r
{\r
- if (g_stopScanHandle != NULL) {\r
+ if (g_stopScanHandle != nullptr) {\r
osStatus_t ret = osTimerDelete(g_stopScanHandle);\r
if (ret != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScanTimerCallback osTimerDelete failed, ret = %lx!!", ret);\r
return;\r
}\r
- g_stopScanHandle = NULL;\r
+ g_stopScanHandle = nullptr;\r
}\r
bool results = gap_br_cancel_discovery();\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CancelBtDiscovery results %d", results);\r
setScanStatus(true); // 开始扫描标记\r
BluetoothModel::GetInstance()->SetCaseListClear(); // 扫描list清空\r
ret = is_bt_discovering(BT_TRANSPORT_BR_EDR);\r
- if (ret == true) {\r
+ if (ret) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothEarPhoneView::BtEnable Bt is Discovering");\r
return;\r
} else {\r
results = gap_br_start_discovery();\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothEarPhoneView::BtEnable StartBtDiscovery results %d", results);\r
}\r
- if (g_stopScanHandle != NULL) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BluetoothEarPhoneView::BtEnable g_stopScanHandle != NULL");\r
+ if (g_stopScanHandle != nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BluetoothEarPhoneView::BtEnable g_stopScanHandle != nullptr");\r
return;\r
}\r
- g_stopScanHandle = osTimerNew((osTimerFunc_t)ScanTimerCallback, osTimerPeriodic, NULL, NULL);\r
- if (g_stopScanHandle == NULL) {\r
+ g_stopScanHandle = osTimerNew((osTimerFunc_t)ScanTimerCallback, osTimerPeriodic, nullptr, nullptr);\r
+ if (g_stopScanHandle == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BluetoothEarPhoneView::BtEnable osTimerNew failed!!");\r
return;\r
}\r
osStatus_t retTimer = osTimerStart(g_stopScanHandle, tick);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BluetoothEarPhoneView::BtEnable osTimerStart failed, ret = %lx!!", retTimer);\r
- if (g_stopScanHandle != NULL) {\r
+ if (g_stopScanHandle != nullptr) {\r
retTimer = osTimerDelete(g_stopScanHandle);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BluetoothEarPhoneView::BtEnable osTimerDelete ret = %lx!!", retTimer);\r
return;\r
}\r
- g_stopScanHandle = NULL;\r
+ g_stopScanHandle = nullptr;\r
}\r
return;\r
}\r
void BluetoothEarPhoneView::StopBtDiscovery(void)\r
{\r
bool ret = is_bt_discovering(BT_TRANSPORT_BR_EDR);\r
- if (ret == false) {\r
+ if (!ret) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Bt is not Discovering");\r
return;\r
}\r
avrcp_ct_callbacks_t g_avrcp_ct_cb;\r
avrcp_tg_callbacks_t g_avrcp_tg_cb;\r
BtAvrcpTgInf g_avrcp_srv_inf;\r
-static profile_connect_state_t g_avrcpTgStat = {};\r
\r
-static profile_connect_state_t BtAvrcpStat()\r
+void BtAvrcpVolumeChangedSyncMedia(uint8_t a2dp_volume)\r
{\r
- return g_avrcpTgStat;\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[BtAvrcpVolumeChangedSyncMedia]::a2dp_volume = 0x%x\r\n", a2dp_volume);\r
+ int32_t audio_volume = a2dp_volume * BT_A2DP_MEDIA_VOL_LEVEL / AVRCP_ABSOLUTE_VOLUME_PERCENTAGE_100;\r
+ AudioManager::GetInstance().SetVolume(AUDIO_STREAM_A2DP_MUSIC, audio_volume); /* 设置增益音量 */\r
+ g_avrcp_tg_local_media_vol = a2dp_volume;\r
+ avrcp_tg_notify_volume_changed(a2dp_volume);\r
}\r
\r
/* tg通知媒体状态 */\r
avrcp_tg_notify_uid_changed(*(td_u16 *)notifyEventStatusParam->event_status);\r
break;\r
case AVRCP_NOTIFY_EVENT_VOLUME_CHANGED:\r
- avrcp_tg_notify_volume_changed(*(td_u8 *)notifyEventStatusParam->event_status);\r
+ BtAvrcpVolumeChangedSyncMedia(notifyEventStatusParam->event_status[0]);\r
break;\r
case AVRCP_NOTIFY_EVENT_RESERVED:\r
+ break;\r
default:\r
break;\r
}\r
\r
void PressButtonStatusCallback(td_u32 keyOperation, td_u32 keyValue)\r
{\r
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PressButtonStatusCallback]::keyValue = %x keyOperation = %x",\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PressButtonStatusCallback]::keyValue = 0x%x keyOperation = 0x%x",\r
keyValue, keyOperation);\r
GraphicService::GetInstance()->PostGraphicEvent(std::bind(UsingPressButtonStatusCallback, keyOperation, keyValue));\r
}\r
void BtAvrcpTgNotifyVolumeChangedProc(uint8_t a2dp_volume)\r
{\r
int32_t audio_volume = a2dp_volume * BT_A2DP_MEDIA_VOL_LEVEL / AVRCP_ABSOLUTE_VOLUME_PERCENTAGE_100;\r
- AudioManager::GetInstance().SetVolume(AUDIO_STREAM_MUSIC, audio_volume);\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "NotifyVolume = %d", audio_volume);\r
+ AudioManager::GetInstance().SetVolume(AUDIO_STREAM_MUSIC, audio_volume); // 耳机连接手表场景调节手表音量\r
}\r
\r
void UsingPressButtonStatusCallback(td_u32 keyOperation, td_u32 keyValue)\r
\r
uint8_t BtAvrcpTgGetLocMediaVolume(void)\r
{\r
- uint32_t audio_volume = AudioManager::GetInstance().GetVolume(AUDIO_STREAM_MUSIC);\r
- uint8_t a2dp_volume = audio_volume * AVRCP_ABSOLUTE_VOLUME_PERCENTAGE_100 / BT_A2DP_MEDIA_VOL_LEVEL;\r
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "get local media volume, a2dp_volume = 0x%x", a2dp_volume);\r
- return a2dp_volume;\r
+ if (g_avrcp_tg_local_media_vol == AVRCP_ABSOLUTE_VOLUME_INVALID) {\r
+ int32_t audio_volume = AudioManager::GetInstance().GetVolume(AUDIO_STREAM_A2DP_MUSIC);\r
+ uint8_t a2dp_volume = (uint8_t)(audio_volume * AVRCP_ABSOLUTE_VOLUME_PERCENTAGE_100 / BT_A2DP_MEDIA_VOL_LEVEL);\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "audio_volume 0x%x, a2dp_volume 0x%x\n", audio_volume, a2dp_volume);\r
+ g_avrcp_tg_local_media_vol = a2dp_volume;\r
+ }\r
+\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "get local media volume, a2dp_volume = 0x%x", g_avrcp_tg_local_media_vol);\r
+ return g_avrcp_tg_local_media_vol;\r
}\r
\r
void MediaStatusCallback(bt_avrcp_tg_evt_status_param *eventStatusParam)\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "bdaddr nullptr");\r
return;\r
}\r
- g_avrcpTgStat = state;\r
+\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ConnCtStateChangedCallback addr: %02x%02x%02x%02x%02x%02x ",\r
bdAddr->addr[5], bdAddr->addr[4], bdAddr->addr[3], /* 5 4 3 idx */\r
bdAddr->addr[2], bdAddr->addr[1], bdAddr->addr[0]); /* 2 1 0 idx */\r
\r
static void BtAvrcpCtPressButtonRspCallback(const bd_addr_t *bd_addr, int32_t key_operation)\r
{\r
- if (bd_addr == NULL) {\r
+ if (bd_addr == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "null pointer\n");\r
return;\r
}\r
\r
static void BtAvrcpCtSupportCompanyCallback(const bd_addr_t *bd_addr, avrcp_ct_support_company_para_t *company)\r
{\r
- if (bd_addr == NULL || company == NULL || company->company_id == NULL) {\r
+ if (bd_addr == nullptr || company == nullptr || company->company_id == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "null pointer\n");\r
return;\r
}\r
\r
static void BtAvrcpCtSupportEventCallback(const bd_addr_t *bd_addr, avrcp_ct_support_event_para_t *event)\r
{\r
- if (bd_addr == NULL || event == NULL || event->event_id == NULL) {\r
+ if (bd_addr == nullptr || event == nullptr || event->event_id == nullptr) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "null pointer\n");\r
return;\r
}\r
\r
static void BtAvrcpCtGetElementAttriCallback(const bd_addr_t *bd_addr, avrcp_ct_element_attr_para_cb_t *attr_cb_para)\r
{\r
- if (bd_addr == NULL || attr_cb_para == NULL || attr_cb_para->attr_value == NULL) {\r
+ if (bd_addr == nullptr || attr_cb_para == nullptr || attr_cb_para->attr_value == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "null pointer\n");\r
return;\r
}\r
}\r
\r
uint8_t *value = (uint8_t *)(void *)malloc(attr_cb_para->attr_value[i].value_len + 1);\r
- if (attr_cb_para->attr_value[i].value_len > 0 && attr_cb_para->attr_value[i].value != NULL) {\r
+ if (attr_cb_para->attr_value[i].value_len > 0 && attr_cb_para->attr_value[i].value != nullptr) {\r
if (memcpy_s(value, attr_cb_para->attr_value[i].value_len,\r
attr_cb_para->attr_value[i].value, attr_cb_para->attr_value[i].value_len) != EOK) {\r
free(value);\r
\r
static void BtAvrcpCtGetPlayStatusCallback(const bd_addr_t *bd_addr, avrcp_ct_play_status_cb_t *status)\r
{\r
- if (bd_addr == NULL || status == NULL) {\r
+ if (bd_addr == nullptr || status == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "null pointer\n");\r
return;\r
}\r
static void BtAvrcpCtNotificationCallback(\r
const bd_addr_t *bd_addr, avrcp_notify_event_t event_id, avrcp_ct_notification_value_cb_t *notification)\r
{\r
- if (bd_addr == NULL || notification == NULL) {\r
+ if (bd_addr == nullptr || notification == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "null pointer\n");\r
return;\r
}\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothItemView::SetItemInfo");\r
itemInfo_ = itemInfo;\r
namelabel.SetText(reinterpret_cast<const char *>(itemInfo_.deviceName));\r
- if (isCaseList == true) {\r
+ if (isCaseList) {\r
bool ret = BluetoothModel::GetInstance()->IsTagScanDeviceClicked();\r
- if ((IsConnectAnimator() == false) && (ret == true)) {\r
+ if ((!IsConnectAnimator()) && (ret)) {\r
namelabel.SetStyle(STYLE_TEXT_COLOR, Color::Gray().full);\r
button.SetTouchable(false);\r
SetTouchable(false);\r
* Author:\r
* Create: 2021-10-13\r
*/\r
-#include "stdint.h"\r
+#include <cstdint>\r
#include "BluetoothModel.h"\r
#include "BluetoothPresenter.h"\r
#include "ConnectPhonePresenter.h"\r
#include "PlayersModel.h"\r
#include "PhoneAudio.h"\r
#include "graphic_service.h"\r
-#include "ui_service.h"\r
-\r
#include "msg_center.h"\r
-\r
#include "bts_def.h"\r
#include "bts_gatt_stru.h"\r
#include "bts_a2dp_source.h"\r
constexpr uint16_t BLUETOOTH_MAX_NUM = 20;\r
\r
#define MEDIA_A2DP_SNK_INTERFACE 1\r
-osal_timer g_a2dp_stream_accept_timer = {NULL, NULL, 0, 0};\r
+osal_timer g_a2dp_stream_accept_timer = {nullptr, nullptr, 0, 0};\r
#define A2DP_STREAM_ACCEPT_TIMER_PERIOD 500\r
AudioFormatConfig g_audio_format_config = {AUDIO_DEFAULT, 0, 0};\r
-BtAvrcpTgInftrerface g_avrcp_srv_infterface;\r
-\r
\r
void BluetoothModel::SetBluetoothCalleridStatus(int16_t value)\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Setup GetPariedDevicesNum ret = %d, num = %d", ret, connedDevicesNum);\r
\r
gap_paired_device_info_t *devInfo = (gap_paired_device_info_t*)malloc(sizeof(gap_paired_device_info_t) *connedDevicesNum);\r
- if (devInfo == NULL) {\r
+ if (devInfo == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DevInfo malloc failed %u", sizeof(gap_paired_device_info_t) *connedDevicesNum);\r
return;\r
}\r
{\r
// 判断是否已退出蓝牙模块(无需跳转)\r
bool tagConnectView = BluetoothModel::GetInstance()->IsTagConnectView();\r
- if (tagConnectView == false) {\r
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GapAclStateChangedCallback tagConnectView == false");\r
+ if (!tagConnectView) {\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GapAclStateChangedCallback tagConnectView fail");\r
return;\r
}\r
// 成功提示\r
bool tagConnectView = BluetoothModel::GetInstance()->IsTagConnectView();\r
// 判断是否无需跳转到失败界面\r
bool tagDisconnectView = BluetoothModel::GetInstance()->IsTagDisconnectView();\r
- if (tagConnectView == false || tagDisconnectView == false) {\r
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GapAclStateChangedCallback tagDisconnectView == false");\r
+ if ((!tagConnectView) || (!tagDisconnectView)) {\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GapAclStateChangedCallback tagDisconnectView fail");\r
return;\r
}\r
// 失败提示页\r
tipsConnFailMessageView->RefreshNameLabel(bdAddr);\r
}\r
\r
-static void DisconnectBluetoothPause()\r
-{\r
- int64_t playerCurrentTime;\r
- int64_t playerMusicDuration;\r
- int64_t playerProgressVlaue;\r
- if (PlayersModel::GetInstance()->GetPlayerCtr() == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AclStateChangedCallback GetPlayerCtr() == nullptr");\r
- return;\r
- }\r
- PlayersModel::GetInstance()->GetPlayerCtr()->Pause();\r
- PlayersModel::GetInstance()->SetPlayButtonState(false);\r
- PlayersModel::GetInstance()->GetPlayerCtr()->GetCurrentTime(playerCurrentTime);\r
- PlayersModel::GetInstance()->GetPlayerCtr()->GetDuration(playerMusicDuration);\r
- if (playerMusicDuration == 0) { // 0:除数保护\r
- playerProgressVlaue = 100; // 100:进度条系数\r
- } else {\r
- playerProgressVlaue = (playerCurrentTime * 100) / playerMusicDuration; // 100:百分比系数\r
- }\r
- PlayersModel::GetInstance()->SetCircleProgress(playerProgressVlaue);\r
- PlayersView *playersView = PlayersView::GetInstance();\r
- if (playersView != nullptr) {\r
- playersView->SetPlayerButtonState(UICheckBox::UICheckBoxState::UNSELECTED);\r
- if (playersView->GetPlaybackProgress() == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AclStateChangedCallback playersView->GetPlaybackProgress() == nullptr");\r
- return;\r
- }\r
- playersView->GetPlaybackProgress()->SetValue(playerProgressVlaue);\r
- }\r
-}\r
-\r
static void DisconnectedHandle()\r
{\r
- DisconnectBluetoothPause();\r
BluetoothModel::GetInstance()->SetTagDisconnectView(false);\r
BluetoothDeviceListView *bluetoothDeviceListView = BluetoothDeviceListView::GetInstance();\r
if (bluetoothDeviceListView == nullptr) {\r
\r
void BluetoothModel::BtGapAclStateChangedHandle(gap_acl_state_t state, unsigned int reason, const bd_addr_t &bdAddr)\r
{\r
- if ((state == GAP_ACL_STATE_CONNECTED) || (state == GAP_ACL_STATE_LE_CONNECTED)) {\r
- SendMsgToUIService(BT_CONNECTED_TO_UI, 0, NULL, 0);\r
- } else {\r
- SendMsgToUIService(BT_DISCONNECTED_TO_UI, 0, NULL, 0);\r
- }\r
-\r
bool tag = BluetoothModel::GetInstance()->IsTagScanDeviceClicked();\r
- if ((reason == 0x13) || (reason == 0x14) || (reason == 0x15) || (reason == 0x3D) || (reason == 0x08 && tag == false)) { // 连接断开\r
+ if ((reason == 0x13) || (reason == 0x14) || (reason == 0x15) || (reason == 0x3D) || (reason == 0x08 && (!tag))) { // 连接断开\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "The peer end is disconnected.");\r
DisconnectedHandle();\r
} else if (reason == 0x16) { // 主动断开连接\r
if ((state == GAP_ACL_STATE_CONNECTED) || (state == GAP_ACL_STATE_LE_CONNECTED)) {\r
SetLastConnedAddr(&bdAddr);\r
// 将数据存入设备列表\r
- bool tag = CheckExistConnedList(*onClickBtCaseInfo);\r
+ tag = CheckExistConnedList(*onClickBtCaseInfo);\r
if (!tag) {\r
AddConnedDevicesCase(*onClickBtCaseInfo);\r
}\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GapAclStateChangedCallback: Mobile Phone Device");\r
return;\r
}\r
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&BluetoothModel::BtGapAclStateChangedHandle,\r
- BluetoothModel::GetInstance(), state, reason, *bdAddr));\r
+ GraphicService::GetInstance()->PostGraphicEvent(\r
+ std::bind(&BluetoothModel::BtGapAclStateChangedHandle, BluetoothModel::GetInstance(), state, reason, *bdAddr));\r
}\r
\r
// 回调:远端设备名称变化\r
static void BtA2dpSnkAcceptTimerStop(void)\r
{\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "stop timer\n");\r
- if (g_a2dp_stream_accept_timer.timer != NULL) {\r
+ if (g_a2dp_stream_accept_timer.timer != nullptr) {\r
(void)osal_timer_stop(&g_a2dp_stream_accept_timer);\r
(void)osal_timer_destroy(&g_a2dp_stream_accept_timer);\r
- g_a2dp_stream_accept_timer.timer = NULL;\r
+ g_a2dp_stream_accept_timer.timer = nullptr;\r
}\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "stop timer success!\n");\r
}\r
static errcode_t BtA2dpSnkStartAcceptTimer(void)\r
{\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "start timer\n");\r
- if (g_a2dp_stream_accept_timer.timer != NULL) {\r
+ if (g_a2dp_stream_accept_timer.timer != nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "timer is running");\r
return ERRCODE_SUCC;\r
}\r
g_btGattsCallbacks.delete_service_cb = BtGattsServiceDeleteCallback;\r
g_btGattsCallbacks.read_request_cb = BtGattsRequestReadCallback;\r
g_btGattsCallbacks.write_request_cb = BtGattsRequestWriteCallback;\r
- g_btGattsCallbacks.mtu_changed_cb = NULL;\r
+ g_btGattsCallbacks.mtu_changed_cb = nullptr;\r
gatts_register_callbacks(&g_btGattsCallbacks);\r
}\r
\r
{\r
int slen = (int)strnlen(str, len);\r
bool new_uuid = false;\r
- if (uuid_out == NULL) {\r
+ if (uuid_out == nullptr) {\r
return ERRCODE_INVALID_PARAM;\r
}\r
\r
{\r
osal_task *task = osal_kthread_create(BtSppServerAcceptTaskBody, (void *)(uintptr_t)server_id,\r
"spp_server_accept_task", BT_SPP_TASK_STACK_SIZE);\r
- if (task == NULL) {\r
+ if (task == nullptr) {\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "create task fail\n");\r
return;\r
}\r
{\r
// 刷新状态和文字\r
BluetoothModel::GetInstance()->SetBtStatus();\r
- if (BluetoothModel::GetInstance()->GetAclConnected() == true) {\r
+ if (BluetoothModel::GetInstance()->GetAclConnected()) {\r
connectStateLabel->SetText("已连接");\r
optionsOneButton->SetText("断开连接");\r
} else {\r
return;\r
}\r
bluetoothMode_->SetBtStatus();\r
- if (bluetoothMode_->GetAclConnected() == true) {\r
+ if (bluetoothMode_->GetAclConnected()) {\r
bluetoothMode_->SetTagConnectNew(false);\r
bluetoothOptionsView->SetBtDisconnect();\r
view_->ChangeView(BLUETOOTHEOPTIONSVIEW, BLUETOOTHDEVICELISTVIEW);\r
BluetoothModel::GetInstance()->SetTagReturnToDeviceListView(false);\r
int16_t unusedValue = BLUETOOTHEVIEW_MAX;\r
bool ret = bluetoothCaseList.IsEmpty();\r
- if (ret != true) {\r
+ if (!ret) {\r
ChangeView(unusedValue, BLUETOOTHDEVICELISTVIEW);\r
} else {\r
ChangeView(unusedValue, BLUETOOTHEARPHONEVIEW);\r
}\r
deviceList->RefreshList();\r
}\r
- BluetoothDeviceListView *bluetoothDeviceListView = BluetoothDeviceListView::GetInstance();\r
- if (bluetoothDeviceListView == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OnClick bluetoothDeviceListView new fail");\r
- return false;\r
- }\r
bluetoothDeviceListView->RefreshText();\r
return true;\r
}\r
container[thisView] = group;\r
RootView::GetInstance()->Add(container[thisView]);\r
}\r
- BluetoothReconnectView *bluetoothReconnectView = BluetoothReconnectView::GetInstance();\r
if (bluetoothReconnectView == nullptr) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GapAclStateChangedCallback bluetoothReconnectView == nullptr");\r
} else {\r
RootView::GetInstance()->Add(container[thisView]);\r
}\r
BluetoothModel::GetInstance()->SetTagDisconnectView(true);\r
- BluetoothReconnectView::GetInstance()->RefreshBluetoothNameLabel();\r
- BluetoothReconnectView::GetInstance()->BtReconnectStart();\r
+ bluetoothReconnectView->RefreshBluetoothNameLabel();\r
+ bluetoothReconnectView->BtReconnectStart();\r
return true;\r
}\r
\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainBluetoothView::DropView bluetoothModel == nullptr");\r
return;\r
}\r
- if (bluetoothModel->GetTagReconnectJump() == true) {\r
+ if (bluetoothModel->GetTagReconnectJump()) {\r
ChangeView(hideView, BLUETOOTHEOPTIONSVIEW);\r
} else {\r
std::list<BluetoothCaseInfo> &bluetoothScanList = BluetoothModel::GetInstance()->GetCase();\r
bool ret = bluetoothScanList.empty();\r
- if (ret != true) {\r
+ if (!ret) {\r
ChangeView(hideView, BLUETOOTHEARLISTVIEW);\r
} else {\r
ChangeView(hideView, BLUETOOTHEARPHONEVIEW);\r
\r
void MainBluetoothView::DropEarPhoneView()\r
{\r
- BluetoothEarPhoneView *bluetoothEarPhoneView = BluetoothEarPhoneView::GetInstance();\r
if (bluetoothEarPhoneView == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainBluetoothView::DropView bluetoothEarPhoneView == nullptr");\r
return;\r
bluetoothEarPhoneView->BtAnimatorStop();\r
bluetoothEarPhoneView->StopBtDiscovery();\r
bool ret = BluetoothModel::GetInstance()->IsTagReturnToDeviceListView();\r
- if (ret == true) {\r
+ if (ret) {\r
ChangeView(BLUETOOTHEARPHONEVIEW, BLUETOOTHDEVICELISTVIEW);\r
} else {\r
ChangeSettingView();\r
errcode_t retVal = gap_disconnect_remote_device((const bd_addr_t *)caseInfo->addr);\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainBluetoothView::DropEarListView gap_disconnect_remote_device retVal = %d", retVal);\r
}\r
- BluetoothEarPhoneView *bluetoothEarPhoneView = BluetoothEarPhoneView::GetInstance();\r
if (bluetoothEarPhoneView == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainBluetoothView::DropView bluetoothEarPhoneView == nullptr");\r
return;\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainBluetoothView::DropView::container[BLUETOOTHRECONNECTVIEW]");\r
CorrespondingJump(BLUETOOTHRECONNECTVIEW);\r
BluetoothModel::GetInstance()->SetTagDisconnectView(false);\r
- BluetoothReconnectView *bluetoothReconnectView = BluetoothReconnectView::GetInstance();\r
bluetoothReconnectView->BtReconnectStop();\r
}\r
}\r
\r
void MainBluetoothView::ResetEarListView(int16_t hideView)\r
{\r
- BluetoothEarListView *bluetoothEarListView = BluetoothEarListView::GetInstance();\r
if (bluetoothEarListView == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainBluetoothView::ResetEarListView bluetoothEarListView == nullptr");\r
return;\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainBluetoothView::ChangeView %d, %d", hideView, showView);\r
\r
- if (CheckViewParam(hideView, showView) == false) {\r
+ if (!CheckViewParam(hideView, showView)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainBluetoothView::CheckViewParam failed.");\r
return;\r
}\r
\r
PreprosssChangeView tmpPreProcessView = preProcessView[showView];\r
\r
- if ((this->*tmpPreProcessView)(hideView, showView) == false) {\r
+ if (!(this->*tmpPreProcessView)(hideView, showView)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainBluetoothView::ChangeView %d %dfailed", showView, hideView);\r
return;\r
}\r
BluetoothCaseInfo caseInfo;\r
(void)memcpy_s(caseInfo.addr, BD_ADDR_LEN, bdAddr.addr, BD_ADDR_LEN);\r
bool ret = BluetoothModel::GetInstance()->FindNameFromList(&caseInfo);\r
- if (ret == false) {\r
+ if (!ret) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TipsConnFailMessageView FindNameFromList fail");\r
return;\r
}\r
BluetoothCaseInfo caseInfo;\r
(void)memcpy_s(caseInfo.addr, BD_ADDR_LEN, bdAddr.addr, BD_ADDR_LEN);\r
bool ret = BluetoothModel::GetInstance()->FindNameFromList(&caseInfo);\r
- if (ret == false) {\r
+ if (!ret) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TipsSuccMessageView FindNameFromList fail");\r
return;\r
}\r
\r
// @param yCoordinates Y轴坐标值\r
explicit CallerItemView(int32 yCoordinates);\r
- virtual ~CallerItemView();\r
+ ~CallerItemView() override;\r
\r
- virtual void SetItemInfo(CallLogInfo *itemInfo, char len);\r
- virtual void SetUpChild();\r
+ void SetItemInfo(CallLogInfo *itemInfo, char len);\r
+ void SetUpChild();\r
private:\r
CallerItemView(const CallerItemView &);\r
CallerItemView &operator = (const CallerItemView &);\r
void InitDateMonTime(time_t seconds);\r
\r
- string infoTel; // 电话号码\r
- string timeDisplay; // 日期显示\r
+ std::string infoTel; // 电话号码\r
+ std::string timeDisplay; // 日期显示\r
UIImageView icon_;\r
UIImageView icons_;\r
UILabel label_;\r
void UsingPhoneErrorCallback(PhoneServiceErrorType type);\r
\r
namespace OHOS {\r
-using namespace std;\r
-\r
class CallerLogModel {\r
public:\r
void InitPhoneService();\r
static CallerLogModel *GetInstance(void);\r
\r
- string GetPhoneNumber(void);\r
+ std::string GetPhoneNumber(void);\r
void SetoperateNumber(const char *number, char number_len);\r
\r
bool GetPhoneStatus();\r
bool GetMulitplePhoneStatus();\r
void SetMulitplePhoneStatus(bool status);\r
\r
- string GetDialingStatus(void);\r
+ std::string GetDialingStatus(void);\r
void SetDialingStatus(const char *text);\r
\r
- string InitDateHourTime();\r
- char *DisplayCallDuration();\r
+ std::string InitDateHourTime();\r
+ std::string& DisplayCallDuration();\r
int CurrCallNum();\r
\r
bool GetNotifyFlag(void);\r
void SetNotifyFlag(bool flag);\r
+ bool IsMulitplePhoneStatus(void);\r
private:\r
CallerLogModel();\r
CallerLogModel(const CallerLogModel &);\r
CallerLogModel &operator=(const CallerLogModel &);\r
virtual ~CallerLogModel();\r
\r
- string dialingStatus; // 拨号状态\r
- string timers; // 时间显示\r
- string callDuration; // 通话时长\r
- string phoneNumber; // 电话号码\r
+ std::string dialingStatus; // 拨号状态\r
+ std::string timers; // 时间显示\r
+ std::string callDuration; // 通话时长\r
+ std::string phoneNumber; // 电话号码\r
bool mulitplePhoneStatus{false}; // 判断是否多路通话界面\r
bool waitingStatus{false}; // 判断是否等待提醒界面\r
bool volumeStatus{false}; // 判断是否音量界面\r
class CallerLogPresenter : public Presenter<CallerLogView>, public UIView::OnClickListener {\r
public:\r
CallerLogPresenter();\r
- virtual ~CallerLogPresenter();\r
+ ~CallerLogPresenter() override;\r
\r
void OnStart() override;\r
void OnPause() override;\r
class CallerListOnDragListener : public UIView::OnDragListener {\r
public:\r
CallerListOnDragListener() {}\r
- virtual ~CallerListOnDragListener() {}\r
+ ~CallerListOnDragListener() override {}\r
\r
- virtual bool OnDrag(UIView& view, const DragEvent& event)\r
+ bool OnDrag(UIView& view, const DragEvent& event) override\r
{\r
UNUSED(view);\r
if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) &&\r
class CallerUIScrollView : public UIScrollView {\r
public:\r
CallerUIScrollView() {}\r
- virtual ~CallerUIScrollView() {}\r
+ ~CallerUIScrollView() {}\r
\r
bool OnDragEvent(const DragEvent& event) override\r
{\r
SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);\r
SetStyle(STYLE_BACKGROUND_OPA, OPA_OPAQUE);\r
SetTouchable(true);\r
-\r
}\r
\r
CallerItemView::~CallerItemView()\r
localtime_r(&seconds, &pTM);\r
timeDisplay.erase();\r
if (pTM.tm_mday < NUM_10) {\r
- string day = "0" + to_string(pTM.tm_mday);\r
- timeDisplay = to_string(pTM.tm_mon) + "/" + day;\r
+ std::string day = "0" + std::to_string(pTM.tm_mday);\r
+ timeDisplay = std::to_string(pTM.tm_mon) + "/" + day;\r
return;\r
}\r
- timeDisplay = to_string(pTM.tm_mon) + "/" + to_string(pTM.tm_mday);\r
+ timeDisplay = std::to_string(pTM.tm_mon) + "/" + std::to_string(pTM.tm_mday);\r
return;\r
}\r
\r
#include "CallerLogModel.h"
#include "CallerLogView.h"
#include "DialingScreenView.h"
-#include "MainCallingView.h"
+#include "CallingView.h"
#include "service_id_define.h"
#include "cmsis_os.h"
#include "samgr_lite.h"
static PhoneCallInfo callInfo{};
static int g_retNum{0}; // 电话个数
static int g_volumeLocal{0}; // 错误码返回
-osTimerId_t g_startCounting = NULL; // 定时器
+osTimerId_t g_startCounting = nullptr; // 定时器
static constexpr uint64_t MS_ONE_SECONDS = 1000;
static PhoneCallInfo callList[MULTI_CALL_MAX_NUME]{};
// 电话优先级标志位
static int g_secondPriority = NO_NUMBER_STATUS;
static int g_thirdPriority = NO_NUMBER_STATUS;
static int g_fourthPriority = NO_NUMBER_STATUS;
+// 是否为手表接听状态
+static bool g_isWatchCallView = false;
static void SetPriorityNumber()
{
/* 关闭定时器 */
static void DisableCallingTimer()
{
- if (g_startCounting != NULL) {
+ if (g_startCounting != nullptr) {
osStatus_t ret = osTimerDelete(g_startCounting);
if (ret != osOK) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScanTimerCallback osTimerDelete failed, ret = %lx!!", ret);
return;
}
- g_startCounting = NULL;
+ g_startCounting = nullptr;
g_callTimes = 0;
}
}
CallerLogModel::GetInstance()->SetWaitingStatus(false);
DisableCallingTimer();
// If the call is handling in the notification, the slice is not switched
- if (CallerLogModel::GetInstance()->GetNotifyFlag() == false) {
+ if (!CallerLogModel::GetInstance()->GetNotifyFlag()) {
NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE);
+ } else {
+ g_isWatchCallView = false;
}
return;
}
g_callTimes++;
if (CallingView::GetInstance() == nullptr) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallTimerCallbackProc] GetInstance is NULL");
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallTimerCallbackProc] GetInstance is nullptr");
return;
}
if (CallingView::GetInstance()->GetCallingDurationLabel() == nullptr) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallTimerCallbackProc] GetInstance()->GetCallingDurationLabel is NULL");
- return;
- }
-
- if (CallerLogModel::GetInstance()->DisplayCallDuration() == nullptr) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallTimerCallbackProc] DisplayCallDuration is NULL");
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallTimerCallbackProc] GetInstance()->GetCallingDurationLabel is nullptr");
return;
}
CallingView::GetInstance()->GetCallingDurationLabel()->
- SetText(CallerLogModel::GetInstance()->DisplayCallDuration());
+ SetText(CallerLogModel::GetInstance()->DisplayCallDuration().c_str());
}
static void CallTimerCallback(int data)
/* 开启定时器 */
static void InitCallingTimer()
{
- if (g_startCounting != NULL) {
+ if (g_startCounting != nullptr) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CallerLogModel::CallerTimer already exists!!");
return;
}
- g_startCounting = osTimerNew((osTimerFunc_t)CallTimerCallback, osTimerPeriodic, NULL, NULL);
- if (g_startCounting == NULL) {
+ g_startCounting = osTimerNew((osTimerFunc_t)CallTimerCallback, osTimerPeriodic, nullptr, nullptr);
+ if (g_startCounting == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerLogModel::CallerTimer osTimerNew failed!!");
return;
}
osStatus_t retTimer = osTimerStart(g_startCounting, tick);
if (retTimer != osOK) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerLogModel::CallerTimer osTimerStart failed, ret = %lx!!", retTimer);
- if (g_startCounting != NULL) {
+ if (g_startCounting != nullptr) {
retTimer = osTimerDelete(g_startCounting);
if (retTimer != osOK) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerLogModel::osTimerDelete failed, ret = %lx!!", retTimer);
return;
}
- g_startCounting = NULL;
+ g_startCounting = nullptr;
}
return;
}
usleep(5000); // 延时等待通话释放媒体资源
std::shared_ptr<PlayerInterruptListener> PlayerIntrptListener =
OHOS::PlayersModel::GetInstance()->GetPlayerIntrptListener();
- if (PlayerIntrptListener != nullptr && PlayerIntrptListener->IsPaused() == true) {
+ if (PlayerIntrptListener != nullptr && PlayerIntrptListener->IsPaused()) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallModelResumePlayer] ResumePlayer ");
PlayerIntrptListener->ResumePlayer();
}
}
CallerLogModel::GetInstance()->SetCallStatus(false);
DisableCallingTimer();
+ if (CallerLogModel::GetInstance()->GetNotifyFlag()) {
+ g_isWatchCallView = false;
+ }
}
static void DialingHandle(void)
// 来电等待界面
static void WaitingOpreate()
{
- if (IsCompleteCallFlow() == false) {
+ if (!IsCompleteCallFlow()) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[UsingPhoneChangeStatusCallback] is not complete call flow");
return;
}
CallerLogModel::GetInstance()->SetCallStatus(false);
CallerLogModel::GetInstance()->SetWaitingStatus(true);
// If the call is handling in the notification, the slice is not switched
- if (CallerLogModel::GetInstance()->GetNotifyFlag() == false) {
- NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TRANSITION_INVALID, PRIORITY_ONE);
+ if (!CallerLogModel::GetInstance()->GetNotifyFlag()) {
+ NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TransitionType::TRANSITION_INVALID,
+ PRIORITY_ONE);
+ } else {
+ g_isWatchCallView = true;
}
}
{
if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAEKPHONE_SAMPLE ||
NativeAbility::GetInstance().GetCurSliceId() == VIEW_OFFLINEVOICE ||
- CallerLogModel::GetInstance()->GetNotifyFlag() == true) {
+ CallerLogModel::GetInstance()->GetNotifyFlag()) {
time_t seconds;
time(&seconds);
g_callTimes = seconds - phoneCall->activeTime;
InitCallingTimer();
CallerLogModel::GetInstance()->SetCallStatus(true);
}
+ if (CallerLogModel::GetInstance()->GetNotifyFlag()) {
+ g_isWatchCallView = true;
+ }
}
static void PhoneActiveHandle(void)
{
if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAEKPHONE_SAMPLE ||
- CallerLogModel::GetInstance()->GetNotifyFlag() == true) {
+ g_isWatchCallView) {
if (GetCurrCallNum() > 1) {
g_phoneStatus = PHONE_MULTI_STATUS;
if (GetScoConnectState() == HFP_SCO_STATE_DISCONNECTED) {
}
TransCallToMobilePhone();
// If the call is handling in the notification, the slice is not switched
- if (CallerLogModel::GetInstance()->GetNotifyFlag() == false) {
+ if (!CallerLogModel::GetInstance()->GetNotifyFlag()) {
NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE); // 退出通话界面,回到主表盘应用
+ } else {
+ g_isWatchCallView = false;
}
CallModelPostGraphicEvent(CallModelResumePlayer);
}
static void OppoActiveHandle(const PhoneCallInfo *phoneCall)
{
if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAEKPHONE_SAMPLE ||
- CallerLogModel::GetInstance()->GetNotifyFlag() == true) {
+ g_isWatchCallView) {
if (GetCurrCallNum() > 1) {
g_phoneStatus = PHONE_MULTI_STATUS;
return;
{
DisableCallingTimer();
if (CallingView::GetInstance() == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[MultiplePhonesViewDisplay] GetInstance is NULL");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[MultiplePhonesViewDisplay] GetInstance is nullptr");
return false;
}
if (CallingView::GetInstance()->GetCallingDurationLabel() == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[MultiplePhonesViewDisplay] GetInstance()->GetCallingDurationLabel is NULL");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[MultiplePhonesViewDisplay] GetInstance()->GetCallingDurationLabel is nullptr");
return false;
}
if (CallingView::GetInstance()->GetCallingDisplayLabel() == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[MultiplePhonesViewDisplay] GetInstance()->GetCallingDurationLabel is NULL");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[MultiplePhonesViewDisplay] GetInstance()->GetCallingDurationLabel is nullptr");
return false;
}
if (MainCallingPresenter::GetInstance() == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[MultiplePhonesViewDisplay] GetInstance()->MainCallingPresenter is NULL");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[MultiplePhonesViewDisplay] GetInstance()->MainCallingPresenter is nullptr");
return false;
}
- if (MainCallingPresenter::GetInstance()->CallingViewDisplay() == false) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[MultiplePhonesViewDisplay] GetInstance()->CallingViewDisplay is NULL");
+ if (!MainCallingPresenter::GetInstance()->CallingViewDisplay()) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[MultiplePhonesViewDisplay] GetInstance()->CallingViewDisplay is nullptr");
return false;
}
DisableCallingTimer();
CallerLogModel::GetInstance()->SetMulitplePhoneStatus(true);
CallerLogModel::GetInstance()->SetCallStatus(true);
- NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TRANSITION_INVALID, PRIORITY_ONE);
+ if (!CallerLogModel::GetInstance()->GetNotifyFlag()) {
+ NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TransitionType::TRANSITION_INVALID,
+ PRIORITY_ONE);
+ } else {
+ g_isWatchCallView = true;
+ }
return true;
}
- if (MulitplePhoneTextReplaces() == false) {
+ if (!MulitplePhoneTextReplaces()) {
return false;
}
return true;
static void NonWatchFinishHandle(int laststatus)
{
if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAEKPHONE_SAMPLE ||
- CallerLogModel::GetInstance()->GetNotifyFlag() == true) {
+ CallerLogModel::GetInstance()->GetNotifyFlag()) {
if (GetCurrCallNum() == 0) {
StatusReset();
CallModelPostGraphicEvent(CallModelResumePlayer);
g_phoneStatus = PHONE_SINGLE_STATUS;
} else if (g_phoneStatus == PHONE_MULTI_STATUS) {
MultiplePhonesViewDisplay();
- } else if (FindCallListInfoAndSetPriorityNumber() == true) {
+ } else if (FindCallListInfoAndSetPriorityNumber()) {
if (laststatus == HFP_HF_CALL_STATE_ACTIVE || laststatus == HFP_HF_CALL_STATE_HELD) {
CallerLogModel::GetInstance()->SetCallStatus(false);
CallerLogModel::GetInstance()->SetWaitingStatus(false);
CallerLogModel::GetInstance()->SetWaitingStatus(false);
}
// If the call is handling in the notification, the slice is not switched
- if (CallerLogModel::GetInstance()->GetNotifyFlag() == false) {
- NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TRANSITION_INVALID, PRIORITY_ONE);
+ if (!CallerLogModel::GetInstance()->GetNotifyFlag()) {
+ NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TransitionType::TRANSITION_INVALID,
+ PRIORITY_ONE);
+ } else {
+ g_isWatchCallView = true;
}
}
- CallerLogModel::GetInstance()->SetNotifyFlag(false);
+ if (GetCurrCallNum() == 0) {
+ CallerLogModel::GetInstance()->SetNotifyFlag(false);
+ }
}
if (GetCurrCallNum() == 0) {
g_phoneStatus = PHONE_SINGLE_STATUS;
static void WatchFinishHandle(void)
{
if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAEKPHONE_SAMPLE ||
- CallerLogModel::GetInstance()->GetNotifyFlag() == true) {
+ CallerLogModel::GetInstance()->GetNotifyFlag()) {
if (GetCurrCallNum() == 0) {
StatusReset();
+ CallerLogModel::GetInstance()->SetNotifyFlag(false);
} else {
StatusReset();
for (int i = GetCurrCallNum(); i > 0; i--) {
FinishCall();
}
}
- CallerLogModel::GetInstance()->SetNotifyFlag(false);
}
g_phoneStatus = PHONE_SINGLE_STATUS;
}
return;
}
}
- if (IsCompleteCallFlow() == false) {
+ if (!IsCompleteCallFlow()) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ChangeStatusScreendisplay] is not complete call flow");
return;
}
- if (MultiplePhonesViewDisplay() == true) {
+ if (MultiplePhonesViewDisplay()) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ChangeStatusScreendisplay] MultiplePhonesViewDisplay");
return;
}
// If the call is handling in the notification, the slice is not switched
- if (g_callOperate != OPERATE_PHONE_ACTIVE && CallerLogModel::GetInstance()->GetNotifyFlag() != true) {
- NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TRANSITION_INVALID, PRIORITY_ONE);
+ if (g_callOperate != OPERATE_PHONE_ACTIVE && (!CallerLogModel::GetInstance()->GetNotifyFlag())) {
+ NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TransitionType::TRANSITION_INVALID,
+ PRIORITY_ONE);
}
}
return;
}
- if (FindCallListInfoAndSetPriorityNumber() == false) {
+ if (!FindCallListInfoAndSetPriorityNumber()) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ScoConnectHandle FindCallListInfoAndSetPriorityNumber false");
return;
}
break;
}
g_isCall = NO_NUMBER_STATUS;
- if (IsCompleteCallFlow() == false) {
+ if (!IsCompleteCallFlow()) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ScoConnectHandle] is not complete call flow");
return;
}
- if (MultiplePhonesViewDisplay() == true) {
+ if (MultiplePhonesViewDisplay()) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ScoConnectHandle] MultiplePhonesViewDisplay");
return;
}
// If the call is handling in the notification, the slice is not switched
- if (CallerLogModel::GetInstance()->GetNotifyFlag() == false) {
- NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TRANSITION_INVALID, PRIORITY_ONE);
+ if (!CallerLogModel::GetInstance()->GetNotifyFlag()) {
+ NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TransitionType::TRANSITION_INVALID,
+ PRIORITY_ONE);
+ } else {
+ g_isWatchCallView = true;
}
}
{
WEARABLE_LOGD(HILOG_MODULE_AAFWK, "UsingPhoneScoStatausCallback SOC state: %d", state);
- if (IsCompleteCallFlow() == false) {
+ if (!IsCompleteCallFlow()) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[UsingPhoneScoStatausCallback] is not complete call flow");
return;
}
}
/* 表盘底部时间显示 */
-string CallerLogModel::InitDateHourTime(void)
+std::string CallerLogModel::InitDateHourTime(void)
{
struct tm pTM;
time_t seconds;
localtime_r(&seconds, &pTM);
timers.erase();
if (pTM.tm_min < NUM_TEN) {
- string min = "0" + to_string(pTM.tm_min);
- timers = to_string(pTM.tm_hour) + ":" + min;
+ std::string min = "0" + std::to_string(pTM.tm_min);
+ timers = std::to_string(pTM.tm_hour) + ":" + min;
return timers;
}
- timers = to_string(pTM.tm_hour) + ":" + to_string(pTM.tm_min);
+ timers = std::to_string(pTM.tm_hour) + ":" + std::to_string(pTM.tm_min);
return timers;
}
/* 表盘通话时间显示 */
-char *CallerLogModel::DisplayCallDuration()
+std::string& CallerLogModel::DisplayCallDuration()
{
callDuration.erase();
- string hours;
- string minute;
- string seconds;
+ std::string hours;
+ std::string minute;
+ std::string seconds;
if (g_callTimes >= NUM_TIME_DAY) {
g_callTimes = 0;
}
int min = (g_callTimes % NUM_TIME_HOUR) / NUM_TIME_MIN;
int sec = (g_callTimes % NUM_TIME_HOUR) % NUM_TIME_MIN;
if (hour >= 0 && hour < NUM_TEN) {
- hours = "0" + to_string(hour);
+ hours = "0" + std::to_string(hour);
} else {
- hours = to_string(hour);
+ hours = std::to_string(hour);
}
if (min >= 0 && min < NUM_TEN) {
- minute = "0" + to_string(min);
+ minute = "0" + std::to_string(min);
} else {
- minute = to_string(min);
+ minute = std::to_string(min);
}
if (sec >= 0 && sec < NUM_TEN) {
- seconds = "0" + to_string(sec);
+ seconds = "0" + std::to_string(sec);
} else {
- seconds = to_string(sec);
+ seconds = std::to_string(sec);
}
if (hour == 0) {
} else {
callDuration = hours + ":" + minute + ":" + seconds;
}
- return (char *)callDuration.c_str();
+ return callDuration;
}
/* 拨号与响铃状态显示 */
dialingStatus.append(reinterpret_cast<const char*>(text));
}
-string CallerLogModel::GetDialingStatus(void)
+std::string CallerLogModel::GetDialingStatus(void)
{
return dialingStatus;
}
return notifyFlag;
}
+// 电话是否为多路状态
+bool CallerLogModel::IsMulitplePhoneStatus(void)
+{
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "IsMulitplePhoneStatus phoneStatus:%d", g_phoneStatus);
+ return g_phoneStatus == PHONE_MULTI_STATUS;
+}
+
/* 是否为多路通话界面 */
void CallerLogModel::SetMulitplePhoneStatus(bool status)
{
phoneNumber.append(reinterpret_cast<const char*>(number), number_len);
}
-string CallerLogModel::GetPhoneNumber(void)
+std::string CallerLogModel::GetPhoneNumber(void)
{
return phoneNumber;
}
\r
void CallerLogPresenter::OnStop(void)\r
{\r
- if (hintsCounting != NULL) {\r
+ if (hintsCounting != nullptr) {\r
if (g_pMainView == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerLogPresenter::CallerLogPresenter g_pMainView nullptr");\r
return;\r
/* 开启定时器 */\r
void CallerLogPresenter::InitBluetoothHints()\r
{\r
- if (hintsCounting != NULL) {\r
+ if (hintsCounting != nullptr) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CallerLogPresenter::BluetoothHints already exists!");\r
return;\r
}\r
- hintsCounting = osTimerNew((osTimerFunc_t)BuletoothHintsCallback, osTimerPeriodic, NULL, NULL);\r
- if (hintsCounting == NULL) {\r
+ hintsCounting = osTimerNew((osTimerFunc_t)BuletoothHintsCallback, osTimerPeriodic, nullptr, nullptr);\r
+ if (hintsCounting == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerLogPresenter::BluetoothHints osTimerNew failed!");\r
return;\r
}\r
osStatus_t retTimer = osTimerStart(hintsCounting, tick);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerLogPresenter::BluetoothHints osTimerStart failed, ret = %lx!", retTimer);\r
- if (hintsCounting != NULL) {\r
+ if (hintsCounting != nullptr) {\r
retTimer = osTimerDelete(hintsCounting);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerLogPresenter::osTimerDelete failed, ret = %lx!", retTimer);\r
return;\r
}\r
- hintsCounting = NULL;\r
+ hintsCounting = nullptr;\r
}\r
return;\r
}\r
/* 关闭定时器 */\r
void CallerLogPresenter::DisableBluetoothHints()\r
{\r
- if (hintsCounting != NULL) {\r
+ if (hintsCounting != nullptr) {\r
osStatus_t ret = osTimerDelete(hintsCounting);\r
if (ret != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScanBuletoothHintsCallback osTimerDelete failed, ret = %lx!!", ret);\r
return;\r
}\r
- hintsCounting = NULL;\r
+ hintsCounting = nullptr;\r
}\r
}\r
\r
}\r
if (0 <= view.GetViewIndex() && view.GetViewIndex() < dataNumber) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "callnumber %s, callnumbernum %d",\r
- (char *)(view_->GetCurrentCallInfo() + dataNumber - view.GetViewIndex() - 1)->tel,\r
- (view_->GetCurrentCallInfo() + dataNumber - view.GetViewIndex() - 1)->telLen);\r
+ (char *)(view_->GetCurrentCallInfo() + dataNumber - view.GetViewIndex() - 1)->tel,\r
+ (view_->GetCurrentCallInfo() + dataNumber - view.GetViewIndex() - 1)->telLen);\r
\r
CallerLogModel::GetInstance()->SetoperateNumber(\r
(char *)(view_->GetCurrentCallInfo() + dataNumber - view.GetViewIndex() - 1)->tel,\r
delete imageView;\r
imageView = nullptr;\r
\r
- if (item.IsEmpty() == false) {\r
+ if (!item.IsEmpty()) {\r
Vector<CallerItemView *>().Swap(item);\r
}\r
\r
View<CallerLogPresenter>::OnStart();\r
\r
BaseView::RootView(Color::Black().full);\r
- if (CreateNoDataCallerLogViewGroup() == false) {\r
+ if (!CreateNoDataCallerLogViewGroup()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerLogView::CreateNoDataCallerLogViewGroup error");\r
return;\r
}\r
RootView::GetInstance()->Add(group);\r
\r
- if (CreateCallerLogViewGroup() == false) {\r
+ if (!CreateCallerLogViewGroup()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerLogView::CreateCallerLogViewGroup error");\r
return;\r
}\r
\r
- if (InitOrBandOnclickEvent() == false) {\r
+ if (!InitOrBandOnclickEvent()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerLogView::InitOrBandOnclickEvent fail");\r
return;\r
}\r
#define MAIN_CLOCK_VIEW_H
#include <string>
-#include <time.h>
+#include <ctime>
#include "View.h"
#include "components/ui_label.h"
#include "components/root_view.h"
#include "UiConfig.h"
#include "components/ui_card_page.h"
#include "animator/animator_manager.h"
-#include "time.h"
+#include <ctime>
#include "sys/time.h"
namespace OHOS {
class MainClockView : public UICardPage {
public:
MainClockView();
- virtual ~MainClockView();
+ ~MainClockView() override;
static MainClockView *GetInstance(void);
bool InitView(void);
void PreLoad(void) override;
#include "wearable_log.h"
#include "ui_resource_image.h"
#include "common/image_cache_manager.h"
-#include <time.h>
+#include <ctime>
namespace OHOS {
static MainClockView *g_pMainClockView = nullptr;
MainClockView::~MainClockView()
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainClockView::~MainClockView");
- mainSweepClock->RemoveAll();
- delete curFace;
- curFace = nullptr;
- delete stepLabel;
- stepLabel = nullptr;
- delete batteryLabel;
- batteryLabel = nullptr;
- delete secondHand;
- secondHand = nullptr;
- delete minuteHand;
- minuteHand = nullptr;
- delete hourHand;
- hourHand = nullptr;
- delete weekLabel;
- weekLabel = nullptr;
- delete heartRateLabel;
- heartRateLabel = nullptr;
- delete heartRate;
- heartRate = nullptr;
- delete hand24Hour;
- hand24Hour = nullptr;
- delete weekDay;
- weekDay = nullptr;
- delete progress;
- progress = nullptr;
- delete bigCircle;
- bigCircle = nullptr;
- delete medCircle;
- medCircle = nullptr;
- delete smallCircle;
- smallCircle = nullptr;
- Remove(mainSweepClock);
- delete mainSweepClock;
- mainSweepClock = nullptr;
- g_pMainClockView = nullptr;
+ if (viewiInitStatus) {
+ mainSweepClock->RemoveAll();
+ delete curFace;
+ curFace = nullptr;
+ delete stepLabel;
+ stepLabel = nullptr;
+ delete batteryLabel;
+ batteryLabel = nullptr;
+ delete secondHand;
+ secondHand = nullptr;
+ delete minuteHand;
+ minuteHand = nullptr;
+ delete hourHand;
+ hourHand = nullptr;
+ delete weekLabel;
+ weekLabel = nullptr;
+ delete heartRateLabel;
+ heartRateLabel = nullptr;
+ delete heartRate;
+ heartRate = nullptr;
+ delete hand24Hour;
+ hand24Hour = nullptr;
+ delete weekDay;
+ weekDay = nullptr;
+ delete progress;
+ progress = nullptr;
+ delete bigCircle;
+ bigCircle = nullptr;
+ delete medCircle;
+ medCircle = nullptr;
+ delete smallCircle;
+ smallCircle = nullptr;
+ Remove(mainSweepClock);
+ delete mainSweepClock;
+ mainSweepClock = nullptr;
+ g_pMainClockView = nullptr;
+ }
}
MainClockView *MainClockView::GetInstance(void)
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "bigCircle new fail");
return false;
}
- if (LoadClockImage(bigCircle, CLOCK_BIGCIRCLE_IMAGE_PATH) == false) {
+ if (!LoadClockImage(bigCircle, CLOCK_BIGCIRCLE_IMAGE_PATH)) {
return false;
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "medCircle new fail");
return false;
}
- if (LoadClockImage(medCircle, CLOCK_MEDCIRCLE_IMAGE_PATH) == false) {
+ if (!LoadClockImage(medCircle, CLOCK_MEDCIRCLE_IMAGE_PATH)) {
return false;
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "smallCircle new fail");
return false;
}
- if (LoadClockImage(smallCircle, CLOCK_CIRCLE_IMAGE_PATH) == false) {
+ if (!LoadClockImage(smallCircle, CLOCK_CIRCLE_IMAGE_PATH)) {
return false;
}
return true;
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "secondHand new fail");
return false;
}
- if (LoadClockImage(secondHand, CLOCK_SECONDHAND) == false) {
+ if (!LoadClockImage(secondHand, CLOCK_SECONDHAND)) {
return false;
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "minuteHand new fail");
return false;
}
- if (LoadClockImage(minuteHand, CLOCK_MINUTEHAND) == false) {
+ if (!LoadClockImage(minuteHand, CLOCK_MINUTEHAND)) {
return false;
}
hourHand = new Image();
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hourHand new fail");
return false;
}
- if (LoadClockImage(hourHand, CLOCK_HOURHAND) == false) {
+ if (!LoadClockImage(hourHand, CLOCK_HOURHAND)) {
return false;
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hand24Hour new fail");
return false;
}
- if (LoadClockImage(hand24Hour, CLOCK_HAND24HOUR_IMAGE_PATH) == false) {
+ if (!LoadClockImage(hand24Hour, CLOCK_HAND24HOUR_IMAGE_PATH)) {
return false;
}
return true;
}
curFace->SetPosition(0, 0);
- if (LoadClockImage(curFace, CLOCK_MAIN_FACE_IMAGE) == false) {
+ if (!LoadClockImage(curFace, CLOCK_MAIN_FACE_IMAGE)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "curFace LoadClockImage CLOCK_MAIN_FACE_IMAGE fail");
return false;
}
- if (InitLabelView() == false) {
+ if (!InitLabelView()) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitLabelView() fail");
return false;
}
- if (InitCenterCircleView() == false) {
+ if (!InitCenterCircleView()) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitCenterCircleView() fail");
return false;
}
return false;
}
heartRate->SetPosition(HEARTRATE_POSITION_X, HEARTRATE_POSITION_Y);
- if (LoadClockImage(heartRate, CLOCK_HEARTRATE_IMAGE_PATH) == false) {
+ if (!LoadClockImage(heartRate, CLOCK_HEARTRATE_IMAGE_PATH)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "heartRate LoadClockImage CLOCK_HEARTRATE_IMAGE_PATH fail");
return false;
}
return false;
}
progress->SetPosition(PROGRESS_POSITION_X, PROGRESS_POSITION_Y);
- if (LoadClockImage(progress, CLOCK_PROGRESS_IMAGE_PATH) == false) {
+ if (!LoadClockImage(progress, CLOCK_PROGRESS_IMAGE_PATH)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "progress LoadClockImage CLOCK_PROGRESS_IMAGE_PATH fail");
return false;
}
return false;
}
weekDay->SetPosition(WEEKDAY_POSITION_X, WEEKDAY_POSITION_Y);
- if (LoadClockImage(weekDay, CLOCK_THURSDAY_IMAGE_PATH) == false) {
+ if (!LoadClockImage(weekDay, CLOCK_THURSDAY_IMAGE_PATH)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "weekDay LoadClockImage CLOCK_THURSDAY_IMAGE_PATH fail");
return false;
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "mainSweepClock new fail");
return false;
}
- if (InitSweepClock() == false) {
+ if (!InitSweepClock()) {
return false;
}
void MainClockView::UpdateTime(void)
{
struct timeval tv;
- gettimeofday(&tv, NULL);
+ gettimeofday(&tv, nullptr);
uint64_t second = tv.tv_sec;
uint64_t uSecond = tv.tv_usec;
uint64_t minute = second / MIN_TO_HOUR;
class CompassCalibrationView : public AppGroupView {\r
public:\r
CompassCalibrationView();\r
- virtual ~CompassCalibrationView();\r
+ ~CompassCalibrationView() override;\r
\r
bool CreateUIViewGroup(void);\r
static CompassCalibrationView *GetInstance(void);\r
class CompassControlView : public UICardPage {\r
public:\r
CompassControlView();\r
- virtual ~CompassControlView();\r
+ ~CompassControlView() override;\r
bool InitView(void);\r
void PreLoad(void) override;\r
void UnLoad(void) override;\r
#ifndef COMPASS_MODEL_H\r
#define COMPASS_MODEL_H\r
\r
-#include "stdint.h"\r
+#include <cstdint>\r
\r
namespace OHOS {\r
class CompassModel {\r
class CompassView : public AppGroupView {\r
public:\r
CompassView();\r
- virtual ~CompassView();\r
+ ~CompassView() override;\r
\r
void DirectionSetText(const char *text, const char *angle);\r
static CompassView *GetInstance(void);\r
public ModelListenerSample, public UIView::OnDragListener {\r
public:\r
MainCompassPresenter();\r
- virtual ~MainCompassPresenter();\r
+ ~MainCompassPresenter() override;\r
\r
- virtual void OnStart() override;\r
- virtual void OnPause() override;\r
- virtual void OnResume() override;\r
- virtual void OnStop() override;\r
+ void OnStart() override;\r
+ void OnPause() override;\r
+ void OnResume() override;\r
+ void OnStop() override;\r
\r
static MainCompassPresenter *GetInstance(void);\r
bool OnDrag(UIView& view, const DragEvent& event) override;\r
- virtual void Notify() override;\r
+ void Notify() override;\r
};\r
}\r
#endif
\ No newline at end of file
class MainCompassView : public View<MainCompassPresenter> {\r
public:\r
MainCompassView();\r
- virtual ~MainCompassView();\r
+ ~MainCompassView() override;\r
\r
void OnStart() override;\r
void OnSetUpView() override;\r
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CompassCalibrationView InitView %p", caller);
bool ret = CreateUIViewGroup();
- if (ret == false) {
+ if (!ret) {
return false;
}
SetDraggable(true);
CompassControlView::~CompassControlView()
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CompassControlView::~CompassControlView()");
- ClearAll();
+ if (viewiInitStatus) {
+ ClearAll();
+ }
}
void CompassControlView::ClearAll(void)
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CompassCalibrationView::new compassCalibrationView fail");
return false;
}
- if (compassCalibrationView->CreateUIViewGroup() == false) {
+ if (!compassCalibrationView->CreateUIViewGroup()) {
return false;
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CompassView::new compassView fail");
return false;
}
- if (compassView->InitPage() == false) {
+ if (!compassView->InitPage()) {
return false;
}
Add(compassView);
#include <sys/time.h>
#include "CompassModel.h"
-#include "time.h"
+#include <ctime>
#ifdef __cplusplus
extern "C" {
time_t CompassModel::GetCurrentTime(void)
{
struct timeval tv;
- gettimeofday(&tv, NULL);
+ gettimeofday(&tv, nullptr);
return tv.tv_sec;
}
return;\r
}\r
bool initState = CompassView::GetInstance()->GetInitViewState();\r
- if (initState == true) {\r
- if (initDisplayStatus == true) {\r
+ if (initState) {\r
+ if (initDisplayStatus) {\r
currentRotateAngle = CompassModel::GetInstance()->GetDisplayAngle();\r
lastRotateAngle = currentRotateAngle;\r
CompassView::GetInstance()->CompassStartRotate(lastRotateAngle);\r
DisplayAngleDir(currentRotateAngle);\r
initDisplayStatus = false;\r
} else {\r
- if (getAngleStatus == false) {\r
+ if (!getAngleStatus) {\r
currentRotateAngle = CompassModel::GetInstance()->GetDisplayAngle();\r
}\r
InScopeRotate();\r
}
backGround->SetPosition(0, 0);
- if (LoadCompassImage(backGround, COMPASS_COMPASS) == false) {
+ if (!LoadCompassImage(backGround, COMPASS_COMPASS)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d], triangulation load fail", __LINE__);
return false;
}
return false;
}
rotateShaft->SetPosition(POINT_CENTER_IMAGE_X, POINT_CENTER_IMAGE_Y);
- if (LoadCompassImage(rotateShaft, COMPASS_ROTATE_CENTER_IMAGE) == false) {
+ if (!LoadCompassImage(rotateShaft, COMPASS_ROTATE_CENTER_IMAGE)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d], rotateShaft load fail", __LINE__);
return false;
}
return false;
}
triangulation->SetPosition(TRIANGULATION_X, TRIANGULATION_Y);
- if (LoadCompassImage(triangulation, COMPASS_CORRESPONDENCE_DEGREE) == false) {
+ if (!LoadCompassImage(triangulation, COMPASS_CORRESPONDENCE_DEGREE)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "triangulation load fail");
return false;
}
bool CompassView::InitPage(void)
{
- if (InitCompassImage() == false) {
+ if (!InitCompassImage()) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitCompassImage fail");
ClearAll();
return false;
bool CompassView::InitView(void *caller)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CompassView InitView %p", caller);
- if (InitPage() == false) {
+ if (!InitPage()) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitPage fail");
return false;
}
\r
private:\r
char watchName[32];\r
-\r
};\r
} // namespace OHOS\r
#endif
\ No newline at end of file
watchNameLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); // 40:font data\r
watchNameLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE);\r
watchNameLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER,\r
- UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);\r
+ UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);\r
group->Add(watchNameLabel);\r
}\r
\r
\r
if (connedDevicesNum != 0) {\r
gap_paired_device_info_t *devInfo = (gap_paired_device_info_t *)malloc(sizeof(gap_paired_device_info_t) * connedDevicesNum);\r
- if (devInfo == NULL) {\r
+ if (devInfo == nullptr) {\r
return;\r
}\r
ret = gap_get_paired_devices_list(devInfo, (int *)&connedDevicesNum);\r
(void)sprintf_s(watchName, sizeof(watchName), "Watch%x", ((uint32_t)uapi_tcxo_get_us() & 0xFFFF));\r
\r
ret = bluetooth_set_local_name((unsigned char*)watchName, strlen((char*)watchName) + 1);\r
- if (ret == false) {\r
+ if (!ret) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ConnectPhonePresenter: bt SetLocalName ret = 0x%x", ret);\r
}\r
\r
ret = gap_br_set_bt_scan_mode(GAP_SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE, 60); // start scan\r
- if (ret == false) {\r
+ if (!ret) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ConnectPhonePresenter bt gap_br_set_bt_scan_mode ret = 0x%x", ret);\r
}\r
#ifndef SUPPORT_ALIPAY_SEC\r
bool ConnectPhonePresenter::OnDrag(UIView& view, const DragEvent& event)\r
{\r
std::string viewId = view.GetViewId();\r
-\r
if ((viewId == CONNECT_SELECT_VIEW) || (viewId == CONNECT_OPEN_VIEW)) {\r
if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ConnectPhonePresenter::OnDrag");\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ConnectPhoneView::ChangeView %d, %d", hideView, showView);\r
\r
- if (CheckViewParam(hideView, showView) == false) {\r
+ if (!CheckViewParam(hideView, showView)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ConnectPhoneView::CheckViewParam failed.");\r
return;\r
}\r
\r
PreprosssChangeView tmpPreProcessView = preProcessView[showView];\r
\r
- if ((this->*tmpPreProcessView)(hideView, showView) == false) {\r
+ if (!(this->*tmpPreProcessView)(hideView, showView)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ConnectPhoneView::ChangeView %d %dfailed", showView, hideView);\r
return;\r
}\r
#ifndef HEART_MODEL_H\r
#define HEART_MODEL_H\r
\r
-#include <time.h>\r
+#include <ctime>\r
#include "broadcast_feature.h"\r
#include "broadcast_service.h"\r
#include "samgr_lite.h"\r
class HeartRateView : public UICardPage {\r
public:\r
HeartRateView();\r
- virtual ~HeartRateView();\r
+ ~HeartRateView() override;\r
static HeartRateView *GetInstance(void);\r
\r
bool InitView(void);\r
static void Notify(void *args, const Topic topic, Request* request);\r
\r
Subscriber heartSubscirber = {\r
- .identity = NULL,\r
- .args = NULL,\r
+ .identity = nullptr,\r
+ .args = nullptr,\r
.Notify = Notify,\r
};\r
\r
void HeartDataSubscribeTopic(Topic topic)\r
{\r
- BroadcastApi *broadcastApi = NULL;\r
+ BroadcastApi *broadcastApi = nullptr;\r
IUnknown *api = SAMGR_GetInstance()->GetFeatureApi(BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
- if (api == NULL) {\r
+ if (api == nullptr) {\r
return;\r
}\r
int result = api->QueryInterface(api, DEFAULT_VERSION, (void **)&broadcastApi);\r
- if (result != 0 || broadcastApi == NULL) {\r
+ if (result != 0 || broadcastApi == nullptr) {\r
return;\r
}\r
int ret = broadcastApi->SubscribeTopic((IUnknown *)broadcastApi, topic, &heartSubscirber);\r
\r
void HearDatatUnsubscribeTopic(Topic topic)\r
{\r
- BroadcastApi *broadcastApi = NULL;\r
+ BroadcastApi *broadcastApi = nullptr;\r
IUnknown *api = SAMGR_GetInstance()->GetFeatureApi(BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
- if (api == NULL) {\r
+ if (api == nullptr) {\r
return;\r
}\r
int result = api->QueryInterface(api, DEFAULT_VERSION, (void **)&broadcastApi);\r
- if (result != 0 || broadcastApi == NULL) {\r
+ if (result != 0 || broadcastApi == nullptr) {\r
return;\r
}\r
broadcastApi->UnsubscribeTopic((IUnknown *)broadcastApi, topic, &heartSubscirber);\r
{\r
UNUSED(args);\r
UNUSED(topic);\r
- if (request == NULL) {\r
+ if (request == nullptr) {\r
return;\r
}\r
if (request->msgId == TOPIC_EVENT_HEARTRATE_UPDATA) {\r
HeartDatas *heartInfo = (HeartDatas*)malloc(sizeof(HeartDatas));\r
- if (heartInfo == NULL) {\r
+ if (heartInfo == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[Notify] malloc fail");\r
}\r
\r
int rets = memcpy_s(heartInfo, sizeof(HeartDatas), (HeartInfo*)request->data, request->len);\r
if (rets != EOK) {\r
free(heartInfo);\r
- heartInfo = NULL;\r
+ heartInfo = nullptr;\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "memcpy_s heartRateData fail! ret = %d", rets);\r
return;\r
}\r
OHOS::HeartModel::GetInstance()->HeartRatePros(heartInfo);\r
\r
free(heartInfo);\r
- heartInfo = NULL;\r
+ heartInfo = nullptr;\r
}\r
if (request->msgId == TOPIC_EVENT_NEXTDAY_UPDATE) {\r
OHOS::HeartModel::GetInstance()->ClearHeartData();\r
}\r
\r
if (MainViewSample::GetInstance() != nullptr && HeartRateView::GetInstance() != nullptr) {\r
- if (MainViewSample::GetInstance()->GetHorCurrentPage() == HEART_RATE) {\r
+ if (MainViewSample::GetInstance()->GetHorCurrentCard() == HEART_RATE) {\r
HeartRateView::GetInstance()->SetHeartRateData(rateData, sizeof(Point) * len);\r
HeartRateView::GetInstance()->RefreshElectrocardiogram();\r
HeartRateView::GetInstance()->RefreshHeartRatePerSec(perSec);\r
HeartRateView::~HeartRateView()\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "HeartRateView::~HeartRateView");\r
- if (viewiInitStatus == true) {\r
+ if (viewiInitStatus) {\r
int32_t i;\r
RemoveAll();\r
delete imageViewCoordinate;\r
\r
int32_t HeartRateView::InitHeartRateData(void) // 初始化心率数据,将存放心率数据的有效字节设置为无效值\r
{\r
- int32_t ret;\r
-\r
heartRateData[0].x = INVALID_HEART_VALUE;\r
heartRateData[0].y = INVALID_HEART_VALUE;\r
\r
- ret = memset_s(heartRateData, sizeof(Point) * HEART_AVE_NUM, INVALID_HEART_VALUE, sizeof(Point) * HEART_AVE_NUM);\r
+ int32_t ret = memset_s(heartRateData, sizeof(Point) * HEART_AVE_NUM, INVALID_HEART_VALUE, sizeof(Point) * HEART_AVE_NUM);\r
if (ret != 0) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartRateView::[InitHeartRateData] memset_s heartRateData fail! ret = %d", ret);\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartRateView::[InitHeartRateData] memset_s heartRateData fail! ret = %d", ret);\r
}\r
return ret;\r
}\r
\r
int32_t HeartRateView::SetHeartRateData(Point *rateData, uint32 rateDataSize)\r
{\r
- int ret;\r
-\r
if (rateData == nullptr) {\r
return OHOS_FAILURE;\r
}\r
rateDataSize = sizeof(Point) * HEART_AVE_NUM;\r
}\r
InitHeartRateData();\r
- ret = memcpy_s(heartRateData, sizeof(Point) * HEART_AVE_NUM, rateData, rateDataSize);\r
+ int32_t ret = memcpy_s(heartRateData, sizeof(Point) * HEART_AVE_NUM, rateData, rateDataSize);\r
if (ret != EOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartRateView::[HeartRateDataProc] memcpy_s heartRateData fail! ret = %d", ret);\r
return OHOS_FAILURE;\r
}\r
-\r
return OHOS_SUCCESS;\r
}\r
\r
\r
int32_t HeartRateView::HeartRateDataProc(void)\r
{\r
- int32_t i, ret;\r
Point datain[HEART_AVE_NUM];\r
-\r
- ret = memcpy_s(datain, sizeof(Point) * HEART_AVE_NUM, heartRateData, sizeof(Point) * HEART_AVE_NUM);\r
+ int32_t ret = memcpy_s(datain, sizeof(Point) * HEART_AVE_NUM, heartRateData, sizeof(Point) * HEART_AVE_NUM);\r
if (ret != EOK) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartRateView::[HeartRateDataProc] memcpy_s rateDataTmp fail! ret = %d", ret);\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartRateView::[HeartRateDataProc] memcpy_s rateDataTmp fail! ret = %d", ret);\r
return OHOS_FAILURE;\r
}\r
\r
ret = memset_s(rateDataTmp, sizeof(Point) * HEART_AVE_NUM, INVALID_HEART_VALUE, sizeof(Point) * HEART_AVE_NUM); // 替换为无效值\r
if (ret != EOK) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartRateView::[HeartRateDataProc] memset_s rateDataTmp fail! ret = %d", ret);\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartRateView::[HeartRateDataProc] memset_s rateDataTmp fail! ret = %d", ret);\r
return OHOS_FAILURE;\r
}\r
\r
dataNume = 0;\r
- for (i = 0; i < HEART_AVE_NUM; i++) {\r
+ for (int32_t i = 0; i < HEART_AVE_NUM; i++) {\r
if (datain[i].x >= 0 && datain[i].x < HEART_AVE_NUM && datain[i].y > 0 &&\r
datain[i].y <= HEART_RATE_LIMIT_UPPER) {\r
rateDataTmp[dataNume].x = datain[i].x + COORDINATE_VALUE;\r
\r
void HeartRateView::UpdataTopAndBottomRate(void)\r
{\r
- uint16_t bottom, top;\r
if (chart == nullptr) {\r
return;\r
}\r
dataTopAndbottom->SetBottomPointStyle(pointStyle);\r
chart->Invalidate();\r
\r
- bottom = dataTopAndbottom->GetValleyData() * ACT_IMAGE_COOR_VALUE / ACT_IMAGE_COOR_PIXELS;\r
+ uint16_t bottom = dataTopAndbottom->GetValleyData() * ACT_IMAGE_COOR_VALUE / ACT_IMAGE_COOR_PIXELS;\r
// 最高心跳\r
dataTopAndbottom->EnableTopPoint(true);\r
pointStyle.fillColor = Color::Red();\r
dataTopAndbottom->SetTopPointStyle(pointStyle);\r
chart->Invalidate();\r
\r
- top = dataTopAndbottom->GetPeakData() * ACT_IMAGE_COOR_VALUE / ACT_IMAGE_COOR_PIXELS;\r
+ uint16_t top = dataTopAndbottom->GetPeakData() * ACT_IMAGE_COOR_VALUE / ACT_IMAGE_COOR_PIXELS;\r
if (top <= HEART_RATE_LIMIT_UPPER) {\r
maxRate = (maxRate >= top) ? maxRate : top;\r
}\r
Point *rateData = HeartModel::GetInstance()->GetAveHeartRate();\r
uint16_t len = HeartModel::GetInstance()->GetAveHeartRateCount();\r
SetHeartRateData(rateData, sizeof(Point) * len);\r
- uint16_t maxRate = HeartModel::GetInstance()->GetHeartRateMax();\r
- uint16_t minRate = HeartModel::GetInstance()->GetHeartRateMin();\r
+ uint16_t maxHeartRate = HeartModel::GetInstance()->GetHeartRateMax();\r
+ uint16_t minHeartRate = HeartModel::GetInstance()->GetHeartRateMin();\r
RefreshElectrocardiogram();\r
- if (maxRate > 0 && maxRate < HEART_RATE_LIMIT_UPPER) {\r
+ if (maxHeartRate > 0 && maxHeartRate < HEART_RATE_LIMIT_UPPER) {\r
RefreshHeartRateMax(HeartModel::GetInstance()->GetHeartRateMax());\r
}\r
- if (minRate > 0 && minRate < HEART_RATE_LIMIT_UPPER) {\r
+ if (minHeartRate > 0 && minHeartRate < HEART_RATE_LIMIT_UPPER) {\r
RefreshHeartRateMin(HeartModel::GetInstance()->GetHeartRateMin());\r
}\r
}\r
// 刷新心率曲线\r
void HeartRateView::RefreshElectrocardiogram(void)\r
{\r
- int32_t ret;\r
- uint16_t tmp, count;\r
- Point *rate = nullptr;\r
- Point modPoint;\r
-\r
- ret = HeartRateDataProc();\r
+ int32_t ret = HeartRateDataProc();\r
if (ret != OHOS_SUCCESS) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartRateView::[RefreshElectrocardiogram()] fail");\r
return;\r
}\r
- rate = rateDataTmp;\r
+ Point *rate = rateDataTmp;\r
\r
if (chart == nullptr) {\r
return;\r
currIndex = HEART_AVE_NUM;\r
}\r
if (dataNume > currIndex) {\r
- tmp = dataNume - currIndex;\r
+ uint16_t tmp = dataNume - currIndex;\r
if (currIndex > 0) {\r
rate += (currIndex - 1);\r
tmp += 1;\r
currIndex = dataNume;\r
} else if (dataNume == currIndex) { // 当前点平均心率刷新\r
if (serialIndex > 0 && serialIndex <= HEART_AVE_NUM && dataSerial[serialIndex - 1] != nullptr) {\r
+ Point modPoint;\r
modPoint.x = rate[currIndex - 1].x;\r
modPoint.y = rate[currIndex - 1].y;\r
\r
- count = dataSerial[serialIndex - 1]->GetDataCount();\r
+ uint16_t count = dataSerial[serialIndex - 1]->GetDataCount();\r
dataSerial[serialIndex - 1]->ModifyPoint(count - 1, modPoint);\r
chart->Invalidate();\r
}\r
class IndoorWalkUIScrollView : public UIScrollView {\r
public:\r
IndoorWalkUIScrollView() {}\r
- virtual ~IndoorWalkUIScrollView() {}\r
+ ~IndoorWalkUIScrollView() override {}\r
\r
bool OnDragEvent(const DragEvent& event) override\r
{\r
#ifndef INDOORWALK_MODEL_H\r
#define INDOORWALK_MODEL_H\r
\r
-#include "stdio.h"\r
+#include <cstdio>\r
#include "string"\r
#include "gfx_utils/list.h"\r
#include "components/ui_label.h"\r
#endif\r
\r
namespace OHOS {\r
-using namespace std;\r
class IndoorWalkModel {\r
public:\r
~IndoorWalkModel();\r
static IndoorWalkModel *GetInstance(void);\r
- string GetConnectionView();\r
+ std::string GetConnectionView();\r
void SetConnectionView(const char* id);\r
void SetTextLableFirstTop(const char *lable, const char *lableUnit);\r
- string GetTextLableFirstTop();\r
- string GetTextLableUnitFirstTop();\r
+ std::string GetTextLableFirstTop();\r
+ std::string GetTextLableUnitFirstTop();\r
void SetTextLableFirstLeft(const char *lable, const char *lableUnit);\r
- string GetTextLableFirstLeft();\r
- string GetTextLableUnitFirstLeft();\r
+ std::string GetTextLableFirstLeft();\r
+ std::string GetTextLableUnitFirstLeft();\r
void SetTextLableFirstRight(const char *lable, const char *lableUnit);\r
- string GetTextLableFirstRight();\r
- string GetTextLableUnitFirstRight();\r
+ std::string GetTextLableFirstRight();\r
+ std::string GetTextLableUnitFirstRight();\r
void SetTextLableFirstBottom(const char *lable, const char *lableUnit);\r
- string GetTextLableFirstBottom();\r
- string GetTextLableUnitFirstBottom();\r
+ std::string GetTextLableFirstBottom();\r
+ std::string GetTextLableUnitFirstBottom();\r
void SetTextLableSecondTop(const char *lable, const char *lableUnit);\r
- string GetTextLableSecondTop();\r
- string GetTextLableUnitSecondTop();\r
+ std::string GetTextLableSecondTop();\r
+ std::string GetTextLableUnitSecondTop();\r
void SetTextLableSecondLeft(const char *lable, const char *lableUnit);\r
- string GetTextLableSecondLeft();\r
- string GetTextLableUnitSecondLeft();\r
+ std::string GetTextLableSecondLeft();\r
+ std::string GetTextLableUnitSecondLeft();\r
void SetTextLableSecondRight(const char *lable, const char *lableUnit);\r
- string GetTextLableSecondRight();\r
- string GetTextLableUnitSecondRight();\r
+ std::string GetTextLableSecondRight();\r
+ std::string GetTextLableUnitSecondRight();\r
void SetTextLableThirdTop(const char *lable, const char *lableUnit);\r
- string GetTextLableThirdTop();\r
- string GetTextLableUnitThirdTop();\r
+ std::string GetTextLableThirdTop();\r
+ std::string GetTextLableUnitThirdTop();\r
void SetTextLableThirdBottom(const char *lable, const char *lableUnit);\r
- string GetTextLableThirdBottom();\r
- string GetTextLableUnitThirdBottom();\r
+ std::string GetTextLableThirdBottom();\r
+ std::string GetTextLableUnitThirdBottom();\r
void SetTextLableFourth(const char *lable, const char *lableUnit);\r
- string GetTextLableFourth();\r
- string GetTextLableUnitFourth();\r
+ std::string GetTextLableFourth();\r
+ std::string GetTextLableUnitFourth();\r
void SetInitialStep(const uint32_t &value);\r
int GetInitialStep();\r
- char *DisplayMotionDuration();\r
+ std::string& DisplayMotionDuration();\r
bool OpenDistancesSensor(void);\r
bool CloseDistancesSensor(void);\r
void SetInitialDistances(const float &value);\r
\r
private:\r
IndoorWalkModel();\r
- string selectPropertiesID;\r
+ std::string selectPropertiesID;\r
uint32_t initialStep;\r
float initialDistances;\r
float currentDistances;\r
- string textLableFirstTop{"00:00:00"};\r
- string textLableUnitFirstTop{"时间"};\r
- string textLableFirstLeft{"00:00:00"};\r
- string textLableUnitFirstLeft{"时间"};\r
- string textLableFirstRight{"00:00:00"};\r
- string textLableUnitFirstRight{"时间"};\r
- string textLableFirstBottom{"00:00:00"};\r
- string textLableUnitFirstBottom{"时间"};\r
- string textLableSecondTop{"00:00:00"};\r
- string textLableUnitSecondTop{"时间"};\r
- string textLableSecondLeft{"00:00:00"};\r
- string textLableUnitSecondLeft{"时间"};\r
- string textLableSecondRight{"00:00:00"};\r
- string textLableUnitSecondRight{"时间"};\r
- string textLableThirdTop{"00:00:00"};\r
- string textLableUnitThirdTop{"时间"};\r
- string textLableThirdBottom{"00:00:00"};\r
- string textLableUnitThirdBottom{"时间"};\r
- string textLableFourth{"00:00:00"};\r
- string textLableUnitFourth{"时间"};\r
+ std::string textLableFirstTop{"00:00:00"};\r
+ std::string textLableUnitFirstTop{"时间"};\r
+ std::string textLableFirstLeft{"00:00:00"};\r
+ std::string textLableUnitFirstLeft{"时间"};\r
+ std::string textLableFirstRight{"00:00:00"};\r
+ std::string textLableUnitFirstRight{"时间"};\r
+ std::string textLableFirstBottom{"00:00:00"};\r
+ std::string textLableUnitFirstBottom{"时间"};\r
+ std::string textLableSecondTop{"00:00:00"};\r
+ std::string textLableUnitSecondTop{"时间"};\r
+ std::string textLableSecondLeft{"00:00:00"};\r
+ std::string textLableUnitSecondLeft{"时间"};\r
+ std::string textLableSecondRight{"00:00:00"};\r
+ std::string textLableUnitSecondRight{"时间"};\r
+ std::string textLableThirdTop{"00:00:00"};\r
+ std::string textLableUnitThirdTop{"时间"};\r
+ std::string textLableThirdBottom{"00:00:00"};\r
+ std::string textLableUnitThirdBottom{"时间"};\r
+ std::string textLableFourth{"00:00:00"};\r
+ std::string textLableUnitFourth{"时间"};\r
\r
- string motionDuration;\r
+ std::string motionDuration;\r
};\r
}\r
\r
MotionPageFifth *motionPageFifth{nullptr};\r
AppGroupView *recordCard[MAX_MOTIONPAGE]{nullptr};\r
bool pageStatus[MAX_MOTIONPAGE]{false};\r
- UISwipeView::OnSwipeListener* motionclickListener{nullptr};\r
- UIView::OnDragListener* motionDragListener{nullptr};\r
- AppGroupView *GreatePage(int32_t MotionPageId);\r
};\r
} // namespace OHOS\r
#endif // INDOORWALK_MOTION_VIEW_H
\ No newline at end of file
public UIView::OnDragListener {\r
public:\r
IndoorWalkPresenter();\r
- virtual ~IndoorWalkPresenter();\r
+ ~IndoorWalkPresenter() override;\r
static IndoorWalkPresenter *GetInstance();\r
void OnStart() override;\r
void OnPause() override;\r
bool OnClick(UIView& view, const ClickEvent& event) override;\r
bool OnDrag(UIView& view, const DragEvent& event) override;\r
bool OnLongPress(UIView& view, const LongPressEvent& event) override;\r
- virtual void OnSwipe(UISwipeView& view) override;\r
+ void OnSwipe(UISwipeView& view) override;\r
void HidePageImageView(void);\r
void ModifiesProperties(const char* id, const char *lable, const char *lableUnit);\r
void ModifiesPageFirstTop(const char *lable, const char *lableUnit);\r
class MotionPageFifth : public AppGroupView {\r
public:\r
MotionPageFifth();\r
- virtual ~MotionPageFifth();\r
+ ~MotionPageFifth() override;\r
static MotionPageFifth *GetInstance(void);\r
bool InitView(void *caller) override;\r
bool InitPageFifthLableView(void);\r
class MotionPageFirst : public AppGroupView {\r
public:\r
MotionPageFirst();\r
- virtual ~MotionPageFirst();\r
+ ~MotionPageFirst() override;\r
static MotionPageFirst *GetInstance(void);\r
bool InitView(void *caller) override;\r
bool InitPageFirstImageView(void);\r
class MotionPageFourth : public AppGroupView {\r
public:\r
MotionPageFourth();\r
- virtual ~MotionPageFourth();\r
+ ~MotionPageFourth() override;\r
static MotionPageFourth *GetInstance(void);\r
bool InitView(void *caller) override;\r
bool InitPageFourthLableView(void);\r
class MotionPageSecond : public AppGroupView {\r
public:\r
MotionPageSecond();\r
- virtual ~MotionPageSecond();\r
+ ~MotionPageSecond() override;\r
static MotionPageSecond *GetInstance(void);\r
bool InitView(void *caller) override;\r
bool InitPageSecondImageView(void);\r
class MotionPageThird : public AppGroupView {\r
public:\r
MotionPageThird();\r
- virtual ~MotionPageThird();\r
+ ~MotionPageThird() override;\r
static MotionPageThird *GetInstance(void);\r
bool InitView(void *caller) override;\r
bool InitPageThirdImageView(void);\r
group->Resize(HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
group->SetHorizontalScrollState(false);\r
\r
- if ((ShowUpTitleLabel() == false) || (InitTimeView() == false) || (InitDistancesView() == false) ||\r
- (InitHeartView() == false) || (InitSpeedView() == false) || (InitStepsView() == false)) {\r
+ if ((!ShowUpTitleLabel()) || (!InitTimeView()) || (!InitDistancesView()) ||\r
+ (!InitHeartView()) || (!InitSpeedView()) || (!InitStepsView())) {\r
return nullptr;\r
}\r
group->Add(lable);\r
group->SetWidth(HORIZONTAL_RESOLUTION);\r
group->SetHeight(VERTICAL_RESOLUTION);\r
ret = ShowUpTitleLabel();\r
- if (ret == false) {\r
+ if (!ret) {\r
return nullptr;\r
}\r
group->Add(titleLabel);\r
ret = CreateUIButton();\r
- if (ret == false) {\r
+ if (!ret) {\r
return nullptr;\r
}\r
group->Add(cancelButton);\r
} fa_treadmill_distance_result;\r
\r
static int g_motionTimes{0};\r
-osTimerId_t g_startCounting = NULL; // 定时器\r
+osTimerId_t g_startCounting = nullptr; // 定时器\r
static constexpr uint64_t MS_ONE_SECONDS = 1000;\r
static constexpr uint16_t NUM_TEN = 10;\r
static constexpr uint16_t NUM_TIME_MIN = 60;\r
selectPropertiesID = id;\r
}\r
\r
-string IndoorWalkModel::GetConnectionView()\r
+std::string IndoorWalkModel::GetConnectionView()\r
{\r
return selectPropertiesID;\r
}\r
textLableUnitFirstTop = lableUnit;\r
}\r
\r
-string IndoorWalkModel::GetTextLableFirstTop()\r
+std::string IndoorWalkModel::GetTextLableFirstTop()\r
{\r
return textLableFirstTop;\r
}\r
\r
-string IndoorWalkModel::GetTextLableUnitFirstTop()\r
+std::string IndoorWalkModel::GetTextLableUnitFirstTop()\r
{\r
return textLableUnitFirstTop;\r
}\r
textLableUnitFirstLeft = lableUnit;\r
}\r
\r
-string IndoorWalkModel::GetTextLableFirstLeft()\r
+std::string IndoorWalkModel::GetTextLableFirstLeft()\r
{\r
return textLableFirstLeft;\r
}\r
\r
-string IndoorWalkModel::GetTextLableUnitFirstLeft()\r
+std::string IndoorWalkModel::GetTextLableUnitFirstLeft()\r
{\r
return textLableUnitFirstLeft;\r
}\r
textLableUnitFirstRight = lableUnit;\r
}\r
\r
-string IndoorWalkModel::GetTextLableFirstRight()\r
+std::string IndoorWalkModel::GetTextLableFirstRight()\r
{\r
return textLableFirstRight;\r
}\r
\r
-string IndoorWalkModel::GetTextLableUnitFirstRight()\r
+std::string IndoorWalkModel::GetTextLableUnitFirstRight()\r
{\r
return textLableUnitFirstRight;\r
}\r
textLableUnitFirstBottom = lableUnit;\r
}\r
\r
-string IndoorWalkModel::GetTextLableFirstBottom()\r
+std::string IndoorWalkModel::GetTextLableFirstBottom()\r
{\r
return textLableFirstBottom;\r
}\r
\r
-string IndoorWalkModel::GetTextLableUnitFirstBottom()\r
+std::string IndoorWalkModel::GetTextLableUnitFirstBottom()\r
{\r
return textLableUnitFirstBottom;\r
}\r
textLableUnitSecondTop = lableUnit;\r
}\r
\r
-string IndoorWalkModel::GetTextLableSecondTop()\r
+std::string IndoorWalkModel::GetTextLableSecondTop()\r
{\r
return textLableSecondTop;\r
}\r
\r
-string IndoorWalkModel::GetTextLableUnitSecondTop()\r
+std::string IndoorWalkModel::GetTextLableUnitSecondTop()\r
{\r
return textLableUnitSecondTop;\r
}\r
textLableUnitSecondLeft = lableUnit;\r
}\r
\r
-string IndoorWalkModel::GetTextLableSecondLeft()\r
+std::string IndoorWalkModel::GetTextLableSecondLeft()\r
{\r
return textLableSecondLeft;\r
}\r
\r
-string IndoorWalkModel::GetTextLableUnitSecondLeft()\r
+std::string IndoorWalkModel::GetTextLableUnitSecondLeft()\r
{\r
return textLableUnitSecondLeft;\r
}\r
textLableUnitSecondRight = lableUnit;\r
}\r
\r
-string IndoorWalkModel::GetTextLableSecondRight()\r
+std::string IndoorWalkModel::GetTextLableSecondRight()\r
{\r
return textLableSecondRight;\r
}\r
\r
-string IndoorWalkModel::GetTextLableUnitSecondRight()\r
+std::string IndoorWalkModel::GetTextLableUnitSecondRight()\r
{\r
return textLableUnitSecondRight;\r
}\r
textLableUnitThirdTop = lableUnit;\r
}\r
\r
-string IndoorWalkModel::GetTextLableThirdTop()\r
+std::string IndoorWalkModel::GetTextLableThirdTop()\r
{\r
return textLableThirdTop;\r
}\r
\r
-string IndoorWalkModel::GetTextLableUnitThirdTop()\r
+std::string IndoorWalkModel::GetTextLableUnitThirdTop()\r
{\r
return textLableUnitThirdTop;\r
}\r
textLableUnitThirdBottom = lableUnit;\r
}\r
\r
-string IndoorWalkModel::GetTextLableThirdBottom()\r
+std::string IndoorWalkModel::GetTextLableThirdBottom()\r
{\r
return textLableThirdBottom;\r
}\r
\r
-string IndoorWalkModel::GetTextLableUnitThirdBottom()\r
+std::string IndoorWalkModel::GetTextLableUnitThirdBottom()\r
{\r
return textLableUnitThirdBottom;\r
}\r
textLableUnitFourth = lableUnit;\r
}\r
\r
-string IndoorWalkModel::GetTextLableFourth()\r
+std::string IndoorWalkModel::GetTextLableFourth()\r
{\r
return textLableFourth;\r
}\r
\r
-string IndoorWalkModel::GetTextLableUnitFourth()\r
+std::string IndoorWalkModel::GetTextLableUnitFourth()\r
{\r
return textLableUnitFourth;\r
}\r
}\r
\r
/* 时间显示 */\r
-char *IndoorWalkModel::DisplayMotionDuration()\r
+std::string& IndoorWalkModel::DisplayMotionDuration()\r
{\r
motionDuration.erase();\r
- string hours;\r
- string minute;\r
- string seconds;\r
+ std::string hours;\r
+ std::string minute;\r
+ std::string seconds;\r
if (g_motionTimes >= NUM_TIME_DAY) {\r
g_motionTimes = 0;\r
}\r
int min = (g_motionTimes % NUM_TIME_HOUR) / NUM_TIME_MIN;\r
int sec = (g_motionTimes % NUM_TIME_HOUR) % NUM_TIME_MIN;\r
if (hour >= 0 && hour < NUM_TEN) {\r
- hours = "0" + to_string(hour);\r
+ hours = "0" + std::to_string(hour);\r
} else {\r
- hours = to_string(hour);\r
+ hours = std::to_string(hour);\r
}\r
if (min >= 0 && min < NUM_TEN) {\r
- minute = "0" + to_string(min);\r
+ minute = "0" + std::to_string(min);\r
} else {\r
- minute = to_string(min);\r
+ minute = std::to_string(min);\r
}\r
if (sec >= 0 && sec < NUM_TEN) {\r
- seconds = "0" + to_string(sec);\r
+ seconds = "0" + std::to_string(sec);\r
} else {\r
- seconds = to_string(sec);\r
+ seconds = std::to_string(sec);\r
}\r
\r
motionDuration = hours + ":" + minute + ":" + seconds;\r
- return (char *)motionDuration.c_str();\r
+ return motionDuration;\r
}\r
\r
#ifdef __cplusplus\r
/* 开启定时器 */\r
void InitIndoorWalkTimer()\r
{\r
- if (g_startCounting != NULL) {\r
+ if (g_startCounting != nullptr) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "IndoorWalkModel::IndoorWalkTimer already exists!!");\r
return;\r
}\r
- g_startCounting = osTimerNew((osTimerFunc_t)IndoorWalkTimerCallback, osTimerPeriodic, NULL, NULL);\r
- if (g_startCounting == NULL) {\r
+ g_startCounting = osTimerNew((osTimerFunc_t)IndoorWalkTimerCallback, osTimerPeriodic, nullptr, nullptr);\r
+ if (g_startCounting == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "IndoorWalkModel::IndoorWalkTimer osTimerNew failed!!");\r
return;\r
}\r
osStatus_t retTimer = osTimerStart(g_startCounting, tick);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "IndoorWalkModel::IndoorWalkTimer osTimerStart failed, ret = %lx!!", retTimer);\r
- if (g_startCounting != NULL) {\r
+ if (g_startCounting != nullptr) {\r
retTimer = osTimerDelete(g_startCounting);\r
if (retTimer != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "IndoorWalkModel::osTimerDelete failed, ret = %lx!!", retTimer);\r
return;\r
}\r
- g_startCounting = NULL;\r
+ g_startCounting = nullptr;\r
}\r
return;\r
}\r
/* 关闭定时器 */\r
void DisableIndoorWalkTimer()\r
{\r
- if (g_startCounting != NULL) {\r
+ if (g_startCounting != nullptr) {\r
osStatus_t ret = osTimerDelete(g_startCounting);\r
if (ret != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScanTimerCallback osTimerDelete failed, ret = %lx!!", ret);\r
return;\r
}\r
- g_startCounting = NULL;\r
+ g_startCounting = nullptr;\r
g_motionTimes = 0;\r
}\r
}\r
walkMotionList->SetAnimatorTime(50); // 50:animator drag time(ms)\r
\r
for (uint16_t i = 0; i < maxPage; i++) {\r
- recordCard[i] = GreatePage(i);\r
+ recordCard[i] = (this->*(g_pageMapper[i].func))();\r
if (recordCard[i] == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "IndoorWalkMotionView:: recordCard %d error", i);\r
return nullptr;\r
IndoorWalkModel::GetInstance()->SetInitialStep(stepValue);\r
}\r
\r
-AppGroupView *IndoorWalkMotionView::GreatePage(int32_t StreamId)\r
-{\r
- uint16_t i;\r
- AppGroupView *view = nullptr;\r
- int32_t MotionPageId = ScreenModels::GetInstance()->GetCardPage(StreamId);\r
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GreatePage MotionPageId:%d", MotionPageId);\r
- for (i = 0; i < sizeof(g_pageMapper) / sizeof(g_pageMapper[0]); i++) {\r
- if (g_pageMapper[i].id == MotionPageId) {\r
- view = (this->*(g_pageMapper[i].func))();\r
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GreatePage view:%p", view);\r
- return view;\r
- }\r
- }\r
- return nullptr;\r
-}\r
-\r
}
\ No newline at end of file
walkButton->SetViewId(WALK_BUTTON);\r
group->Add(walkButton);\r
ret = InitBatteryView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return nullptr;\r
}\r
ret = InitHeartbeatView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return nullptr;\r
}\r
ret = InitLableVIew();\r
- if (ret == false) {\r
+ if (!ret) {\r
return nullptr;\r
}\r
UIView::OnDragListener *indoorWalkDragListener = (UIView::OnDragListener *)OHOS::IndoorWalkPresenter::GetInstance();\r
\r
namespace OHOS {\r
static IndoorWalkPresenter *g_pIndoorWalkPresenter = nullptr;\r
-static string g_distancesChar;\r
+static std::string g_distancesChar;\r
static constexpr uint16_t CENTERED_Y = 192;\r
static constexpr uint32_t CONVERSION_NUM = 100000;\r
static constexpr uint16_t STEP_CHAR_NUM = 255;\r
void IndoorWalkPresenter::TimeViewOnClick(const char* id)\r
{\r
UNUSED(id);\r
- string selectPropertiesid = IndoorWalkModel::GetInstance()->GetConnectionView();\r
- ModifiesProperties(selectPropertiesid.c_str(), IndoorWalkModel::GetInstance()->DisplayMotionDuration(), "时间");\r
+ std::string selectPropertiesid = IndoorWalkModel::GetInstance()->GetConnectionView();\r
+ std::string duration = IndoorWalkModel::GetInstance()->DisplayMotionDuration();\r
+ ModifiesProperties(selectPropertiesid.c_str(), duration.c_str(), "时间");\r
}\r
\r
void IndoorWalkPresenter::DistancesViewOnClick(const char* id)\r
{\r
UNUSED(id);\r
- string selectPropertiesid = IndoorWalkModel::GetInstance()->GetConnectionView();\r
+ std::string selectPropertiesid = IndoorWalkModel::GetInstance()->GetConnectionView();\r
ModifiesProperties(selectPropertiesid.c_str(), "0.00", "距离(km)");\r
}\r
\r
void IndoorWalkPresenter::HeartViewOnClick(const char* id)\r
{\r
UNUSED(id);\r
- string selectPropertiesid = IndoorWalkModel::GetInstance()->GetConnectionView();\r
+ std::string selectPropertiesid = IndoorWalkModel::GetInstance()->GetConnectionView();\r
ModifiesProperties(selectPropertiesid.c_str(), "--", "心率(bpm)");\r
}\r
\r
void IndoorWalkPresenter::SpeedViewOnClick(const char* id)\r
{\r
UNUSED(id);\r
- string selectPropertiesid = IndoorWalkModel::GetInstance()->GetConnectionView();\r
+ std::string selectPropertiesid = IndoorWalkModel::GetInstance()->GetConnectionView();\r
ModifiesProperties(selectPropertiesid.c_str(), "0.00", "速度(km/h)");\r
}\r
\r
void IndoorWalkPresenter::StepsViewOnClick(const char* id)\r
{\r
UNUSED(id);\r
- string selectPropertiesid = IndoorWalkModel::GetInstance()->GetConnectionView();\r
+ std::string selectPropertiesid = IndoorWalkModel::GetInstance()->GetConnectionView();\r
char stepChar[STEP_CHAR_NUM] = {0};\r
InitStepsValue(stepChar);\r
ModifiesProperties(selectPropertiesid.c_str(), stepChar, "步数(steps)");\r
\r
void IndoorWalkPresenter::SetPropertiesPageFirstTop()\r
{\r
- string lableUnit;\r
- lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstTop();\r
+ std::string lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstTop();\r
SetCustomizationState(lableUnit.c_str());\r
}\r
\r
void IndoorWalkPresenter::SetPropertiesPageFirstLeft()\r
{\r
- string lableUnit;\r
- lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstLeft();\r
+ std::string lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstLeft();\r
SetCustomizationState(lableUnit.c_str());\r
}\r
\r
void IndoorWalkPresenter::SetPropertiesPageFirstRight()\r
{\r
- string lableUnit;\r
- lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstRight();\r
+ std::string lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstRight();\r
SetCustomizationState(lableUnit.c_str());\r
}\r
\r
void IndoorWalkPresenter::SetPropertiesPageFirstBottom()\r
{\r
- string lableUnit;\r
- lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstBottom();\r
+ std::string lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstBottom();\r
SetCustomizationState(lableUnit.c_str());\r
}\r
\r
void IndoorWalkPresenter::SetPropertiesPageSecondTop()\r
{\r
- string lableUnit;\r
- lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitSecondTop();\r
+ std::string lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitSecondTop();\r
SetCustomizationState(lableUnit.c_str());\r
}\r
\r
void IndoorWalkPresenter::SetPropertiesPageSecondLeft()\r
{\r
- string lableUnit;\r
- lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitSecondLeft();\r
+ std::string lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitSecondLeft();\r
SetCustomizationState(lableUnit.c_str());\r
}\r
\r
void IndoorWalkPresenter::SetPropertiesPageSecondRight()\r
{\r
- string lableUnit;\r
- lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitSecondRight();\r
+ std::string lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitSecondRight();\r
SetCustomizationState(lableUnit.c_str());\r
}\r
\r
void IndoorWalkPresenter::SetPropertiesPageThirdTop()\r
{\r
- string lableUnit;\r
- lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitThirdTop();\r
+ std::string lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitThirdTop();\r
SetCustomizationState(lableUnit.c_str());\r
}\r
\r
void IndoorWalkPresenter::SetPropertiesPageThirdBottom()\r
{\r
- string lableUnit;\r
- lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitThirdBottom();\r
+ std::string lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitThirdBottom();\r
SetCustomizationState(lableUnit.c_str());\r
}\r
\r
void IndoorWalkPresenter::SetPropertiesPageFourth()\r
{\r
- string lableUnit;\r
- lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFourth();\r
+ std::string lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFourth();\r
SetCustomizationState(lableUnit.c_str());\r
}\r
\r
\r
void IndoorWalkPresenter::ModifiesTime()\r
{\r
- if (IndoorWalkModel::GetInstance()->DisplayMotionDuration() == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "IndoorWalkModel::GetInstance()->DisplayMotionDuration() nullptr");\r
- return;\r
- }\r
+ std::string duration = IndoorWalkModel::GetInstance()->DisplayMotionDuration();\r
if (strcmp(IndoorWalkModel::GetInstance()->GetTextLableUnitFirstTop().c_str(), "时间") == 0) {\r
- ModifiesPageFirstTop(IndoorWalkModel::GetInstance()->DisplayMotionDuration(), "时间");\r
+ ModifiesPageFirstTop(duration.c_str(), "时间");\r
}\r
if (strcmp(IndoorWalkModel::GetInstance()->GetTextLableUnitFirstLeft().c_str(), "时间") == 0) {\r
- ModifiesPageFirstLeft(IndoorWalkModel::GetInstance()->DisplayMotionDuration(), "时间");\r
+ ModifiesPageFirstLeft(duration.c_str(), "时间");\r
}\r
if (strcmp(IndoorWalkModel::GetInstance()->GetTextLableUnitFirstRight().c_str(), "时间") == 0) {\r
- ModifiesPageFirstRight(IndoorWalkModel::GetInstance()->DisplayMotionDuration(), "时间");\r
+ ModifiesPageFirstRight(duration.c_str(), "时间");\r
}\r
if (strcmp(IndoorWalkModel::GetInstance()->GetTextLableUnitFirstBottom().c_str(), "时间") == 0) {\r
- ModifiesPageFirstBottom(IndoorWalkModel::GetInstance()->DisplayMotionDuration(), "时间");\r
+ ModifiesPageFirstBottom(duration.c_str(), "时间");\r
}\r
if (strcmp(IndoorWalkModel::GetInstance()->GetTextLableUnitSecondTop().c_str(), "时间") == 0) {\r
- ModifiesPageSecondTop(IndoorWalkModel::GetInstance()->DisplayMotionDuration(), "时间");\r
+ ModifiesPageSecondTop(duration.c_str(), "时间");\r
}\r
if (strcmp(IndoorWalkModel::GetInstance()->GetTextLableUnitSecondLeft().c_str(), "时间") == 0) {\r
- ModifiesPageSecondLeft(IndoorWalkModel::GetInstance()->DisplayMotionDuration(), "时间");\r
+ ModifiesPageSecondLeft(duration.c_str(), "时间");\r
}\r
if (strcmp(IndoorWalkModel::GetInstance()->GetTextLableUnitSecondRight().c_str(), "时间") == 0) {\r
- ModifiesPageSecondRight(IndoorWalkModel::GetInstance()->DisplayMotionDuration(), "时间");\r
+ ModifiesPageSecondRight(duration.c_str(), "时间");\r
}\r
if (strcmp(IndoorWalkModel::GetInstance()->GetTextLableUnitThirdTop().c_str(), "时间") == 0) {\r
- ModifiesPageThirdTop(IndoorWalkModel::GetInstance()->DisplayMotionDuration(), "时间");\r
+ ModifiesPageThirdTop(duration.c_str(), "时间");\r
}\r
if (strcmp(IndoorWalkModel::GetInstance()->GetTextLableUnitThirdBottom().c_str(), "时间") == 0) {\r
- ModifiesPageThirdBottom(IndoorWalkModel::GetInstance()->DisplayMotionDuration(), "时间");\r
+ ModifiesPageThirdBottom(duration.c_str(), "时间");\r
}\r
if (strcmp(IndoorWalkModel::GetInstance()->GetTextLableUnitFourth().c_str(), "时间") == 0) {\r
- ModifiesPageFourth(IndoorWalkModel::GetInstance()->DisplayMotionDuration(), "时间");\r
+ ModifiesPageFourth(duration.c_str(), "时间");\r
}\r
}\r
\r
g_distancesChar.erase();\r
value -= IndoorWalkModel::GetInstance()->GetInitialDistances();\r
value /= CONVERSION_NUM;\r
- string g_distancesChar = to_string(value).substr(0, to_string(value).find(".") + 3);\r
+ g_distancesChar = std::to_string(value).substr(0, std::to_string(value).find(".") + 3);\r
\r
if (strcmp(IndoorWalkModel::GetInstance()->GetTextLableUnitFirstTop().c_str(), "距离(km)") == 0) {\r
ModifiesPageFirstTop(g_distancesChar.c_str(), "距离(km)");\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "IndoorWalkView::ChangeView %d, %d", hideView, showView);\r
\r
- if (CheckViewParam(hideView, showView) == false) {\r
+ if (!CheckViewParam(hideView, showView)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "IndoorWalkView::CheckViewParam failed.");\r
return;\r
}\r
\r
PreprosssChangeView tmpPreProcessView = preProcessView[showView];\r
\r
- if ((this->*tmpPreProcessView)(hideView, showView) == false) {\r
+ if (!(this->*tmpPreProcessView)(hideView, showView)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "IndoorWalkView::ChangeView %d %dfailed", showView, hideView);\r
return;\r
}\r
bool MotionPageFifth::InitView(void *caller)\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MotionPageFifth InitView %p", caller);\r
- bool ret;\r
- ret = InitPageFifthLableView();\r
- if (ret == false) {\r
+ bool ret = InitPageFifthLableView();\r
+ if (!ret) {\r
return false;\r
}\r
ret = InitPageFifthImageView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
return true;\r
\r
bool MotionPageFirst::InitPageFirstLableTopView()\r
{\r
- string lable;\r
- string lableUnit;\r
+ std::string lable;\r
+ std::string lableUnit;\r
lable = IndoorWalkModel::GetInstance()->GetTextLableFirstTop();\r
lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstTop();\r
if (strcmp(lableUnit.c_str(), "步数(steps)") == 0) {\r
\r
bool MotionPageFirst::InitPageFirstLableLeftView()\r
{\r
- string lable;\r
- string lableUnit;\r
+ std::string lable;\r
+ std::string lableUnit;\r
lable = IndoorWalkModel::GetInstance()->GetTextLableFirstLeft();\r
lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstLeft();\r
if (strcmp(lableUnit.c_str(), "步数(steps)") == 0) {\r
\r
bool MotionPageFirst::InitPageFirstLableRightView()\r
{\r
- string lable;\r
- string lableUnit;\r
+ std::string lable;\r
+ std::string lableUnit;\r
lable = IndoorWalkModel::GetInstance()->GetTextLableFirstRight();\r
lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstRight();\r
if (strcmp(lableUnit.c_str(), "步数(steps)") == 0) {\r
\r
bool MotionPageFirst::InitPageFirstLableBottomView()\r
{\r
- string lable;\r
- string lableUnit;\r
+ std::string lable;\r
+ std::string lableUnit;\r
lable = IndoorWalkModel::GetInstance()->GetTextLableFirstBottom();\r
lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFirstBottom();\r
if (strcmp(lableUnit.c_str(), "步数(steps)") == 0) {\r
backGroundFirst->SetSrc(PNG_WALK_BACK_GROUND);\r
Add(backGroundFirst);\r
ret = InitPageFirstLableTopView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
ret = InitPageFirstLableLeftView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
ret = InitPageFirstLableRightView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
ret = InitPageFirstLableBottomView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
ret = InitPageFirstImageView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
HideInitPageFirstImageView();\r
\r
bool MotionPageFourth::InitPageFourthLableView()\r
{\r
- string lable;\r
- string lableUnit;\r
+ std::string lable;\r
+ std::string lableUnit;\r
lable = IndoorWalkModel::GetInstance()->GetTextLableFourth();\r
lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitFourth();\r
if (strcmp(lableUnit.c_str(), "步数(steps)") == 0) {\r
backGroundFourth->SetSrc(PNG_WALK_BACK_GROUND);\r
Add(backGroundFourth);\r
ret = InitPageFourthLableView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
ret = InitPageFourthImageView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
HideInitPageFourthImageView();\r
SetTouchable(true);\r
return true;\r
-\r
}\r
}
\ No newline at end of file
\r
bool MotionPageSecond::InitPageSecondLableTopView()\r
{\r
- string lable;\r
- string lableUnit;\r
+ std::string lable;\r
+ std::string lableUnit;\r
lable = IndoorWalkModel::GetInstance()->GetTextLableSecondTop();\r
lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitSecondTop();\r
if (strcmp(lableUnit.c_str(), "步数(steps)") == 0) {\r
\r
bool MotionPageSecond::InitPageSecondLableLeftView()\r
{\r
- string lable;\r
- string lableUnit;\r
+ std::string lable;\r
+ std::string lableUnit;\r
lable = IndoorWalkModel::GetInstance()->GetTextLableSecondLeft();\r
lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitSecondLeft();\r
if (strcmp(lableUnit.c_str(), "步数(steps)") == 0) {\r
\r
bool MotionPageSecond::InitPageSecondLableRightView()\r
{\r
- string lable;\r
- string lableUnit;\r
+ std::string lable;\r
+ std::string lableUnit;\r
lable = IndoorWalkModel::GetInstance()->GetTextLableSecondRight();\r
lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitSecondRight();\r
if (strcmp(lableUnit.c_str(), "步数(steps)") == 0) {\r
backGroundSecond->SetSrc(PNG_WALK_BACK_GROUND);\r
Add(backGroundSecond);\r
ret = InitPageSecondLableTopView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
ret = InitPageSecondLableLeftView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
ret = InitPageSecondLableRightView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
ret = InitPageSecondImageView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
HideInitPageSecondImageView();\r
SetTouchable(true);\r
return true;\r
-\r
}\r
}
\ No newline at end of file
\r
bool MotionPageThird::InitPageThirdLableTopView()\r
{\r
- string lable;\r
- string lableUnit;\r
+ std::string lable;\r
+ std::string lableUnit;\r
lable = IndoorWalkModel::GetInstance()->GetTextLableThirdTop();\r
lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitThirdTop();\r
if (strcmp(lableUnit.c_str(), "步数(steps)") == 0) {\r
\r
bool MotionPageThird::InitPageThirdLableBottomView()\r
{\r
- string lable;\r
- string lableUnit;\r
+ std::string lable;\r
+ std::string lableUnit;\r
lable = IndoorWalkModel::GetInstance()->GetTextLableThirdBottom();\r
lableUnit = IndoorWalkModel::GetInstance()->GetTextLableUnitThirdBottom();\r
if (strcmp(lableUnit.c_str(), "步数(steps)") == 0) {\r
backGroundThird->SetSrc(PNG_WALK_BACK_GROUND);\r
Add(backGroundThird);\r
ret = InitPageThirdLableTopView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
ret = InitPageThirdLableBottomView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
ret = InitPageThirdImageView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return false;\r
}\r
HideInitPageThirdImageView();\r
void OnKeyPress(void);\r
void OnKeyLongPress(const KeyEvent& event);\r
void OnKeyRelease(const KeyEvent& event);\r
- void CallVolumeDipSwitchControl(uint8_t status);\r
- void PlayerVolumeDipSwitchControl(uint8_t model);\r
+ void CallVolumeDipSwitchControl(VolumeChangeStatus status);\r
+ void PlayerVolumeDipSwitchControl(VolumeChangeStatus status);\r
private:\r
int32 pressFlag{0};\r
int32 longPressFlag{0};\r
#include "MainCallingPresenter.h"
namespace OHOS {
-static bool IsCallingNotify()
-{
- uint16_t notifyId = NotificationManager::GetInstance()->GetShowingNotifyId();
- if (NotificationManager::GetInstance()->hasNotifyShowing() == true &&
- (notifyId == TOPIC_EVENT_HFP_INCOMMING ||
- notifyId == TOPIC_EVENT_HFP_WATCH_ACTIVE ||
- notifyId == TOPIC_EVENT_HFP_PHONE_TO_WATCH)) {
- return true;
- } else {
- return false;
- }
-}
-
static bool IsNotifyCallStatus()
{
uint16_t notifyId = NotificationManager::GetInstance()->GetShowingNotifyId();
- if (NotificationManager::GetInstance()->hasNotifyShowing() == true &&
+ if (NotificationManager::GetInstance()->HasNotifyShowing() &&
(notifyId == TOPIC_EVENT_HFP_WATCH_ACTIVE ||
notifyId == TOPIC_EVENT_HFP_PHONE_TO_WATCH)) {
return true;
static void PressAlarmNotify()
{
uint16_t notifyId = NotificationManager::GetInstance()->GetShowingNotifyId();
- if (NotificationManager::GetInstance()->hasNotifyShowing() == true && notifyId == TOPIC_EVENT_ALARM_RING) {
+ if (NotificationManager::GetInstance()->HasNotifyShowing() && notifyId == TOPIC_EVENT_ALARM_RING) {
AlarmClockModel::GetInstance()->AlarmGetClockNum();
AlarmPopUpPresenter::GetInstance()->DelayAlarmRing();
NotificationManager::GetInstance()->StopNotify();
return;
}
-void KeyInputListener::CallVolumeDipSwitchControl(uint8_t model)
+void KeyInputListener::CallVolumeDipSwitchControl(VolumeChangeStatus status)
{
if (MainCallingPresenter::GetInstance() != nullptr && CallerLogModel::GetInstance()->GetCallStatus()) {
- if (CallerLogModel::GetInstance()->GetVolumeScreenStatus() == true) {
+ if (CallerLogModel::GetInstance()->GetVolumeScreenStatus()) {
volumeSliderEventListener = VolumeSliderEventListener::GetInstance();
if (volumeSliderEventListener == nullptr) {
return;
}
- volumeSliderEventListener->ChangeVolume(model);
+ volumeSliderEventListener->ChangeVolume(status);
} else {
MainCallingPresenter::GetInstance()->HonrsViewChange();
CallerLogModel::GetInstance()->SetVolumeScreenStatus(true);
}
}
- if (IsNotifyCallStatus() == true) {
- if (NotificationManager::GetInstance()->GetVolumeScreenStatus() == true) {
+ if (IsNotifyCallStatus()) {
+ if (NotificationManager::GetInstance()->GetVolumeScreenStatus()) {
volumeSliderEventListener = VolumeSliderEventListener::GetInstance();
if (volumeSliderEventListener == nullptr) {
return;
}
- volumeSliderEventListener->ChangeVolume(model);
+ volumeSliderEventListener->ChangeVolume(status);
} else {
HonrsViewChange();
NotificationManager::GetInstance()->SetVolumeScreenStatus(true);
uint16 keyID = event.GetKeyId();
if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER)) { // 电源按键
if (longPressFlag == 0 && pressFlag == 1) { // 短按电源键
- if (currentViewId == VIEW_MAEKPHONE_SAMPLE || IsCallingNotify() == true) { // 音量卡片
+ if (currentViewId == VIEW_MAEKPHONE_SAMPLE ||
+ NotificationManager::GetInstance()->GetWatchCallStatus()) { // 音量卡片
// 音量+
- CallVolumeDipSwitchControl(1);
+ CallVolumeDipSwitchControl(VOLUMEUP);
} else if (currentViewId != VIEW_MAIN_SAMPLE) { // 主表盘
PressAlarmNotify(); // 当前为闹钟通知页面时,先处理闹钟再切换页面
- NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE, TRANSITION_ZOOM);
+ NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE, TransitionType::TRANSITION_ZOOM);
} else {
PressAlarmNotify(); // 当前为闹钟通知页面时,先处理闹钟再切换页面
if (!MainViewSample::GetInstance()->IsMainClockPage()) { // 当前页面为主表盘的其他页面时,切换回主表盘页面
MainViewSample::GetInstance()->SwitchToClockPage();
} else {
- NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TRANSITION_ZOOM);
+ NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_ZOOM);
}
}
}
} else if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_FUNC)) { // 功能按键
if (longPressFlag == 0 && pressFlag == 1) { // 短按功能键
- if (currentViewId == VIEW_MAEKPHONE_SAMPLE || IsCallingNotify() == true) { // 音量卡片
+ if (currentViewId == VIEW_MAEKPHONE_SAMPLE ||
+ NotificationManager::GetInstance()->GetWatchCallStatus()) { // 音量卡片
// 音量-
- CallVolumeDipSwitchControl(0);
+ CallVolumeDipSwitchControl(VOLUMEDOWN);
} else {
// 切换到用户配置的快捷卡片
}
{
SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);
}
- virtual ~AppGroupView() {}
+ ~AppGroupView() override {}
virtual bool InitView(void *caller)=0;
bool initViewStatus{false};
};
#include "components/ui_abstract_progress.h"\r
\r
namespace OHOS {\r
-\r
class DialBinParser {\r
public:\r
static DialBinParser* GetInstance(void);\r
bool UpdateDial(const std::string& file, FILE* fp, DialViewGroup* group);\r
+ bool GetDialPreviewInfo(FILE* fp, DialPreviewInfo* info);\r
\r
protected:\r
int32_t ParseDialHeader(FILE* file);\r
int32_t ParserDialArcProgress(FILE* fp);\r
int32_t ParserDialVideo(FILE* fp);\r
int32_t ParserDialClick(FILE* fp);\r
+ int32_t ParserDialKaleidoscope(FILE* fp);\r
\r
private:\r
DialBinParser();\r
void* MallocAndReadBuf(FILE* file, uint32_t readSize);\r
bool SetProgressType(FILE* fp, UIAbstractProgress* view, DialProgressType data);\r
\r
- static constexpr uint8_t DIAL_BIN_PARSER_FUNC_NUM = 11;\r
+ static constexpr uint8_t DIAL_BIN_PARSER_FUNC_NUM = 12; // 12: func max value\r
int32_t (DialBinParser::*funcArray_[DIAL_BIN_PARSER_FUNC_NUM])(FILE*);\r
\r
DialViewGroup* dialGroup_ = nullptr;\r
std::string file_;\r
- uint32_t dirId_ = 0xfef << 20;\r
+ uint32_t dirId_ = 0xfef << 20; // 20: offset\r
uint32_t imageOffset_ = 0;\r
};\r
}\r
-#endif
\ No newline at end of file
+#endif\r
#include "components/ui_canvas_ext.h"\r
\r
namespace OHOS {\r
+static constexpr uint8_t DIAL_NAME_MAX_LEN = 16;\r
+static constexpr uint8_t DIAL_VERSION_MAX_LEN = 16;\r
+static constexpr uint8_t DIAL_DESCRIPTION_MAX_LEN = 128;\r
+static constexpr uint8_t DIAL_DIGITALIMG_IMG_MAX_NUM = 10;\r
+\r
+struct DialPreviewInfo {\r
+ char dialName[DIAL_NAME_MAX_LEN];\r
+ char description[DIAL_DESCRIPTION_MAX_LEN];\r
+ uint32_t imgId;\r
+ uint32_t offset;\r
+};\r
+\r
struct DialRect {\r
int16_t x;\r
int16_t y;\r
};\r
\r
struct DialHeader {\r
- char dialName[16];\r
+ char dialName[DIAL_NAME_MAX_LEN];\r
int16_t width;\r
int16_t height;\r
- char version[16];\r
+ char version[DIAL_VERSION_MAX_LEN];\r
uint16_t previewImgId;\r
- char description[128];\r
+ char description[DIAL_DESCRIPTION_MAX_LEN];\r
uint32_t imageOffset;\r
uint8_t freq;\r
uint8_t dialViewCount;\r
uint8_t count;\r
};\r
\r
-constexpr uint8_t DIGITALIMG_IMG_MAX_NUM = 10;\r
struct DialDigitalImg {\r
uint8_t alignType : 4;\r
uint8_t integerLength : 4;\r
uint8_t decimalPrecision;\r
- uint16_t imgIds[DIGITALIMG_IMG_MAX_NUM];\r
+ uint16_t imgIds[DIAL_DIGITALIMG_IMG_MAX_NUM];\r
int16_t signImgId;\r
int16_t decimalPointImgId;\r
uint16_t space;\r
DialRect rect;\r
uint32_t offset;\r
Color32 colorKey;\r
+ uint32_t imgId;\r
};\r
\r
struct DialClick {\r
char bundleName[64];\r
};\r
};\r
+\r
+struct DialKaleidoscope {\r
+ uint16_t imgId;\r
+ float crownRotateStep;\r
+ float animatorRotateStep;\r
+};\r
}\r
#endif // GRAPHIC_LITE_DIAL_BIN_TYPE_H
\ No newline at end of file
#ifndef HEALTH_MODEL_H\r
#define HEALTH_MODEL_H\r
\r
-#include "stdio.h"\r
+#include <cstdio>\r
#include "gfx_utils/list.h"\r
#include "los_mux.h"\r
#include "UiServersMsg.h"\r
--- /dev/null
+/*\r
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.\r
+ * Description: MainModel.h\r
+ * Author:\r
+ * Create: 2021-11-23\r
+ */\r
+\r
+#ifndef MAIN_MODEL_H\r
+#define MAIN_MODEL_H\r
+\r
+#include <string>\r
+#include "UiConfig.h"\r
+\r
+namespace OHOS {\r
+ typedef struct {\r
+ CardId id;\r
+ const char *cardImg;\r
+ } CardInfo;\r
+\r
+ typedef struct {\r
+ DialId id;\r
+ const char *dialName;\r
+ const char *dialImg;\r
+ uint8_t freq;\r
+ } DialInfo;\r
+\r
+ typedef struct {\r
+ uint8_t dialFlag;\r
+ uint8_t dialId;\r
+ std::string dialFullName;\r
+ } DialSetting;\r
+\r
+ class MainModel {\r
+ public:\r
+ static MainModel &GetInstance(void);\r
+ void InitCardSettings(void);\r
+ uint8_t GetCardSettingCount(void);\r
+ CardId *GetCardSettings(void);\r
+ void DeleteCardSetting(uint8_t index);\r
+ void AddCardSetting(uint8_t index);\r
+ const CardInfo *GetCardInfo(CardId card) const;\r
+ const DialInfo *GetDialInfo(DialId dial) const;\r
+ void AddDialSetting(const DialSetting &setting);\r
+ void InitDialSettings(void);\r
+ DialSetting &GetDialSetting();\r
+ bool IsFromSetCardView(void) const;\r
+ void SetFromSetCardView(bool isFrom);\r
+ void SetFromCardId(uint8_t cardId);\r
+ uint8_t GetFromCardId(void);\r
+ private:\r
+ void InitDialSettingDefault(void);\r
+ MainModel();\r
+ MainModel(const MainModel &);\r
+ MainModel &operator=(const MainModel &);\r
+ virtual ~MainModel();\r
+\r
+ CardId cardSettings[CARD_SETTING_COUNT_MAX] = { MAX_CARD };\r
+ uint8_t cardSettingCount{0};\r
+ DialSetting dialSetting;\r
+ bool isFromSetCardView{false};\r
+ uint8_t fromCardId{MAX_CARD};\r
+ };\r
+}\r
+\r
+#endif
\ No newline at end of file
#include "KeyInputListener.h"
#include "drag_event.h"
#include "MainViewSample.h"
+#include "MainModel.h"
#include "components/ui_swipe_view.h"
#include "components/ui_view.h"
-#include "CompassView.h"
-#include "CompassPresenter.h"
+#include "MainCompassView.h"
+#include "MainCompassPresenter.h"
#include "PlayersView.h"
#include "HeartRateView.h"
#include "swipe_effect/zoom_effect.h"
-using namespace std;
-
namespace OHOS {
static constexpr const char *MAIN_CLICK_WEATHER = "mainclickweather";
static constexpr const char *MAIN_CLICK_ACTIVITY = "mainclickactivity";
class MainViewSample;
class MainPresenterSample : public Presenter<MainViewSample>, public ModelListenerSample,
public UIView::OnClickListener, public UISwipeView::OnSwipeListener,
- public UISwipeView, public CompassPresenter {
+ public UIView::OnLongPressListener, public UISwipeView, public CompassPresenter {
public:
MainPresenterSample();
- virtual ~MainPresenterSample();
+ ~MainPresenterSample() override;
static MainPresenterSample *GetInstance(void);
void OnStart() override;
void OnPause() override;
void OnResume() override;
void OnStop() override;
- virtual void Notify() override;
+ void Notify() override;
bool OnClick(UIView& view, const ClickEvent& event) override;
- virtual void OnSwipe(UISwipeView& view) override;
+ bool OnLongPress(UIView& view, const LongPressEvent& event) override;
+ void OnSwipe(UISwipeView& view) override;
void SetPage(int8_t id);
- void SetTaskPeroid(int page);
+ void SetTaskPeroid(CardId cardId);
void setCallback(ZoomEffect* callback)
{
callback_ = callback;
}
- void SetDialPath(std::string filePath)
- {
- filePath_ = filePath;
- }
-
- std::string GetDialPath()
- {
- return filePath_;
- }
-
+ void InitCardSettings(void);
+ uint8_t GetCardSettingCount(void);
+ CardId *GetCardSettings(void);
+ void InitDialSettings(void);
+ DialSetting& GetDialSetting();
+ bool IsFromSetCardView(void) const;
+ void SetFromSetCardView(bool isFrom);
+ uint8_t GetFromCardId(void);
private:
void ProcessDataNotify(void);
void SetCircleProgress(void);
int64_t playerMusicDuration_{0};
int64_t playerProgressValue_{0};
bool isCompassSensorOpened_{false};
- std::string filePath_;
};
}
#include "ScreenModels.h"
#include "ActivityWeekView.h"
#include "CompassControlView.h"
-#if USE_OFFLINE_DIAL
#include "DialViewGroup.h"
-#else
#include "MainClockView.h"
-#endif
#include "PlayersView.h"
#include "MainPresenterSample.h"
#include "HeartRateView.h"
#include "components/ui_card_page.h"
#include "PullUpDownView.h"
#include "components/ui_cross_view.h"
+#include "SetCardModel.h"
namespace OHOS {
class MainPresenterSample;
class MainViewSample : public View<MainPresenterSample> {
public:
MainViewSample();
- virtual ~MainViewSample();
+ ~MainViewSample() override;
static MainViewSample *GetInstance(void);
void OnStart() override;
void OnSetUpView() override;
UICardPage *InitMusicPlayerPage(void);
void AnimatorStart(int pageIndex);
void AnimatorStop(void);
- uint16_t GetHorCurrentPage() const
- {
- return mainSwipeGroup->GetCurrentPageId(UISwipeView::HORIZONTAL); // 0: horizontal; 1: vertical
- }
-
+ CardId GetHorCurrentCard() const;
UIView* GetMainViewGroup(void) const
{
return mainSwipeGroup;
SetPage(mainClockView->GetViewIndex());
}
}
-
+ void SwitchToCard(uint8_t cardId);
bool IsMainClockPage(void);
void SetDragFg(bool continFg);
bool GetDragFg(void);
PullUpDownView *dropDownView{nullptr};
UICardPage *messageView{nullptr};
UILabel *messageLable{nullptr};
-#if USE_OFFLINE_DIAL
- DialViewGroup *mainClockView{nullptr};
-#else
- MainClockView *mainClockView{nullptr};
-#endif
+ UICardPage *mainClockView{nullptr};
ActivityWeekView *activityWeekView{nullptr};
PlayersView *playersView{nullptr};
CompassControlView *compassControlView{nullptr};
void VerticalViewInit(void);
void VertViewLoad(void);
void HorViewLoad(void);
+ UICardPage *InitWatchOffDial(DialSetting &setting);
+ UICardPage *InitWatchDial(DialSetting &setting);
};
} // namespace OHOS
#endif // MAIN_VIEW_SAMPLE_H
ModelListenerSample();\r
virtual ~ModelListenerSample();\r
virtual void Notify(void) = 0;\r
+ virtual void OnTickEvent(void) {};\r
void Callback();\r
};\r
}\r
\r
#include "graphic_types.h"\r
#include "wearable_log.h"\r
-#include "components/ui_card_page.h"
+#include "components/ui_card_page.h"\r
#include "components/ui_view_group.h"\r
#include "components/ui_image_view.h"\r
#include "components/ui_label.h"\r
class PullUpDownView : public UICardPage {\r
public:\r
PullUpDownView();\r
- virtual ~PullUpDownView();\r
+ ~PullUpDownView() override;\r
static PullUpDownView *GetInstance(void);\r
bool InitView();\r
- void PreLoad(void) override;
+ void PreLoad(void) override;\r
void UpdateBlueToothStatus(int status);\r
private:\r
UIImageView *dnotDisturb{nullptr};\r
UIImageView *battery{nullptr};\r
UILabel *batteryLable{nullptr};\r
UILabel *dateLable{nullptr};\r
- bool viewiInitStatus{false};
+ bool viewiInitStatus{false};\r
\r
void InitSubViewImg(void);\r
void InitViewImg(void);\r
#ifndef UI_SERVERS_MSG_H\r
#define UI_SERVERS_MSG_H\r
\r
-#include <stdint.h>\r
+#include <cstdint>\r
#include "ohos_types.h"\r
#include "message.h"\r
\r
} VolumeFactor;
typedef enum : uint8_t {
- VOLUMELOWERS = 0,
- VOLUMELEVATED = 1,
+ VOLUMEDOWN = 0,
+ VOLUMEUP = 1,
VOLUMEDRAG = 2,
} VolumeChangeStatus;
static VolumeSliderEventListener *GetInstance();
void OnChange(int32_t progress) override;
void OnRelease(int32_t progress) override;
- void ChangeImage(void);
- void ChangeVolume(uint8_t status);
+ void ChangeVolume(VolumeChangeStatus status);
bool OnClick(UIView& view, const ClickEvent& event) override;
bool OnDrag(UIView& view, const DragEvent& event) override;
void SetPlayerCoefficients(int16_t value);
#ifndef DIAL_ARC_LABEL_VIEW_H
#define DIAL_ARC_LABEL_VIEW_H
-#include "stdint.h"
+#include <cstdint>
#include "DialView.h"
#include "components/ui_arc_label.h"
class DialArcLabelView : public UIArcLabel, public DialView {
public:
DialArcLabelView();
- virtual ~DialArcLabelView();
+ ~DialArcLabelView() override;
bool SetText(const char* text);
bool SetTextWithWildcard(const char* text);
class DialArcProgressView : public UICircleProgress, public DialView {
public:
DialArcProgressView();
- virtual ~DialArcProgressView();
+ ~DialArcProgressView() override;
void HandleFloatData(float data) override;
private:
int32_t value_ = -1;
#include "heap_base.h"
#include "OnDialDataUpdateListener.h"
-using namespace std;
namespace OHOS {
class DialBaseModel : public HeapBase {
public:
/* *
* @brief Get dial data of text type
*/
- virtual bool GetDialTextData(DialDataType& type, string*& out, int16_t& strNum)
+ virtual bool GetDialTextData(DialDataType& type, std::string*& out, int16_t& strNum)
{
return false;
}
class DialBoxProgressView : public UIBoxProgress, public DialView {
public:
DialBoxProgressView();
- virtual ~DialBoxProgressView();
+ ~DialBoxProgressView() override;
void HandleFloatData(float data) override;
private:
int32_t value_ = -1;
#ifndef DIAL_DIGITAL_IMG_VIEW_H
#define DIAL_DIGITAL_IMG_VIEW_H
-#include "stdint.h"
+#include <cstdint>
#include "DialView.h"
#include "components/ui_image_view.h"
#include "gfx_utils/graphic_math.h"
class DialDigitalImgView : public UIImageView, public DialView {
public:
DialDigitalImgView();
- virtual ~DialDigitalImgView();
+ ~DialDigitalImgView() override;
void HandleFloatData(float data) override;
--- /dev/null
+/*\r
+ * Copyright (c) @CompanyNameMagicTag. 2024. All rights reserved.\r
+ */\r
+\r
+#ifndef DIAL_KALEIDOSCOPE_VIEW_H\r
+#define DIAL_KALEIDOSCOPE_VIEW_H\r
+#include "components/ui_kaleidoscope_view.h"\r
+namespace OHOS {\r
+using DialKaleidoscopeView = UIKaleidoscopeView;\r
+}\r
+#endif\r
#ifndef DIAL_LABEL_VIEW_H
#define DIAL_LABEL_VIEW_H
-#include "stdint.h"
+#include <cstdint>
#include "DialView.h"
#include "components/ui_label.h"
class DialLabelView : public UILabel, public DialView {
public:
DialLabelView();
- virtual ~DialLabelView();
+ ~DialLabelView() override;
bool SetText(const char* text);
bool SetTextWithWildcard(const char* text);
class DialModelHeartRate : public DialBaseModel {
public:
DialModelHeartRate() {}
- virtual ~DialModelHeartRate() {}
+ ~DialModelHeartRate() override {}
static DialModelHeartRate* GetInstance()
{
static DialModelHeartRate instance;
class DialModelPower : public DialBaseModel {
public:
DialModelPower() {}
- virtual ~DialModelPower() {}
+ ~DialModelPower() override {}
static DialModelPower* GetInstance()
{
static DialModelPower instance;
class DialModelSteps : public DialBaseModel {
public:
DialModelSteps() {}
- virtual ~DialModelSteps() {}
+ ~DialModelSteps() override {}
static DialModelSteps* GetInstance()
{
static DialModelSteps instance;
class DialModelTime : public DialBaseModel {
public:
DialModelTime() {}
- virtual ~DialModelTime() {}
+ ~DialModelTime() override {}
static DialModelTime* GetInstance()
{
static DialModelTime instance;
#ifndef DIAL_OPTION_IMG_VIEW_H
#define DIAL_OPTION_IMG_VIEW_H
-#include "stdint.h"
+#include <cstdint>
#include "DialView.h"
#include "components/ui_image_view.h"
class DialOptionImgView : public UIImageView, public DialView {
public:
DialOptionImgView();
- virtual ~DialOptionImgView();
+ ~DialOptionImgView() override;
void HandleFloatData(float data) override;
#ifndef DIAL_ROTATE_IMG_VIEW_H
#define DIAL_ROTATE_IMG_VIEW_H
-#include "stdint.h"
+#include <cstdint>
#include "DialView.h"
#include "components/ui_image_view.h"
#include "gfx_utils/graphic_math.h"
class DialRotateImgView : public UIImageView, public DialView {
public:
DialRotateImgView();
- virtual ~DialRotateImgView();
+ ~DialRotateImgView() override;
void HandleFloatData(float data) override;
class DialSequenceImgView : public UIImageAnimatorView {
public:
DialSequenceImgView();
- virtual ~DialSequenceImgView();
+ ~DialSequenceImgView() override;
bool SetSequenceRes(const ImageAnimatorInfo* imgSrc, uint8_t imgNum);
class DialStaticImgView : public UIImageView {
public:
DialStaticImgView();
- virtual ~DialStaticImgView();
+ ~DialStaticImgView() override;
};
}
#endif
#ifndef DIAL_VIDEO_VIEW
#define DIAL_VIDEO_VIEW
-#include "stdint.h"
+#include <cstdint>
#include "components/ui_lite_surface_view.h"
#include "video_play_wrapper.h"
class DialVideoView : public UILiteSurfaceView {
public:
DialVideoView();
- virtual ~DialVideoView();
+ ~DialVideoView() override;
bool SetVideoRes(FILE* fp, uint32_t offset);
bool StartPlay();
bool ResumePlay();
#ifndef DIAL_VIEW_H
#define DIAL_VIEW_H
-#include "stdint.h"
+#include <cstdint>
#include <string>
namespace OHOS {
#ifndef DIAL_VIEW_GROUP_H
#define DIAL_VIEW_GROUP_H
-#include "DialDataBase.h"
#include <unordered_map>
+#include "DialDataBase.h"
#include "components/ui_view_group.h"
#include "OnDialDataUpdateListener.h"
#include "components/ui_card_page.h"
+#include "components/ui_kaleidoscope_view.h"
#include "gfx_utils/list.h"
#include "DialView.h"
#include "DialVideoView.h"
class DialViewGroup : public UICardPage, public OnDialDataUpdateListener {
public:
DialViewGroup();
- virtual ~DialViewGroup();
+ ~DialViewGroup() override;
/**
* @brief Set dial resource path.
*/
void CoverEnd(bool isCovered) override;
+ /**
+ * @brief This function is invoked when the function SetHorCurrentPage() is called.
+ */
+ void OnActive(void) override;
+
private:
void ProcessData(DialDataType type, DialView* view);
std::unordered_map<int16_t, DialView*> dataTypeMap_;
std::string filePath_;
FILE* fp_ = nullptr;
DialVideoView* video_ = nullptr;
+ UIKaleidoscopeView* kaleidoscope_ = nullptr;
typedef struct {
Rect area;
bool RegisterDialDataListener(DialDataType type, OnDialDataUpdateListener* listener);
bool UnRegisterDialDataListener(DialDataType type);
- bool GetDialTextData(DialDataType& type, string*& out, int16_t& strNum);
+ bool GetDialTextData(DialDataType& type, std::string*& out, int16_t& strNum);
bool GetDialFloatData(DialDataType& type, float& out);
bool GetDialFloatData(DialDataType& type, float*& out, int16_t& len);
DialBaseModel* GetModuleByType(DialDataType& type);
#include <fstream>
#include "thread_adapter.h"
-using namespace std;
-
namespace OHOS {
HealthAllData g_healthData;
int HealthModel::SaveGlobalHealthToFile(void)
{
- ofstream outHealthFile;
- outHealthFile.open(HEALTH_DATA_PATH, ios::out);
+ std::ofstream outHealthFile;
+ outHealthFile.open(HEALTH_DATA_PATH, std::ios::out);
if (outHealthFile.is_open() == 0) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "open HEALTH_DATA_PATH failure!");
outHealthFile.close();
bool HealthModel::FetchedHealthData(HealthMsg *healthMsg)
{
- if (listHealth.IsEmpty() == true) {
+ if (listHealth.IsEmpty()) {
return false;
} else {
MUTEX_Lock(g_healthDataMutex);
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "HealthModel::InitHealthData start");
(void)memset_s(&g_healthData, sizeof(HealthAllData), 0, sizeof(HealthAllData));
- ifstream inHealthFile;
- inHealthFile.open(HEALTH_DATA_PATH, ios::in);
+ std::ifstream inHealthFile;
+ inHealthFile.open(HEALTH_DATA_PATH, std::ios::in);
if (!inHealthFile.is_open()) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "open HEALTH_DATA_PATH failure!");
inHealthFile.close();
--- /dev/null
+/*\r
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.\r
+ * Description: MainModel.cpp\r
+ * Author:\r
+ * Create: 2021-11-23\r
+ */\r
+\r
+#include "unistd.h"\r
+#include "MainModel.h"\r
+#include "kv_store.h"\r
+#include "securec.h"\r
+#include "wearable_log.h"\r
+\r
+namespace OHOS {\r
+ static const int CARD_SETTING_VALUE_LEN = 32;\r
+ static const int DIAL_SETTING_VALUE_LEN = 64;\r
+ const CardInfo cardInfoMap[] = {\r
+ { HEART_RATE, PNG_SET_CARD_HEART },\r
+ { COMPASS, PNG_SET_CARD_COMPASS },\r
+ { ACTIVITY, PNG_SET_CARD_ACTIVITY },\r
+ { MUSIC_PLAYER, PNG_SET_CARD_PLAYER },\r
+ };\r
+\r
+ const DialInfo dialInfoMap[] = {\r
+ { DIAL_CLOCK, "扫秒表盘", PNG_SET_DIAL_CLOCK, DEFAULT_TASK_PERIOD },\r
+ };\r
+\r
+ MainModel::MainModel() {}\r
+\r
+ MainModel::~MainModel() {}\r
+\r
+ MainModel &MainModel::GetInstance()\r
+ {\r
+ static MainModel instance;\r
+ return instance;\r
+ }\r
+\r
+ const CardInfo *MainModel::GetCardInfo(CardId card) const\r
+ {\r
+ for (uint8_t i = 0; i < (sizeof(cardInfoMap) / sizeof(cardInfoMap[0])); i++) {\r
+ if (card == cardInfoMap[i].id) {\r
+ return &cardInfoMap[i];\r
+ }\r
+ }\r
+ return nullptr;\r
+ }\r
+\r
+ const DialInfo *MainModel::GetDialInfo(DialId dialId) const\r
+ {\r
+ for (uint8_t i = 0; i < (sizeof(dialInfoMap) / sizeof(dialInfoMap[0])); i++) {\r
+ if (dialId == dialInfoMap[i].id) {\r
+ return &dialInfoMap[i];\r
+ }\r
+ }\r
+ return nullptr;\r
+ }\r
+\r
+ void MainModel::InitCardSettings(void)\r
+ {\r
+ char temp[CARD_SETTING_VALUE_LEN] = { 0 };\r
+ int len;\r
+ int index = 0;\r
+\r
+ memset_s(cardSettings, CARD_SETTING_COUNT_MAX, 0, CARD_SETTING_COUNT_MAX);\r
+ len = UtilsGetValue("card_setting", temp, CARD_SETTING_VALUE_LEN);\r
+ if (len >= 0) {\r
+ /* 读取用户card配置 */\r
+ char *setBuffer = nullptr;\r
+ char *setValue = strtok_s(temp, ",", &setBuffer);\r
+ while (setValue != nullptr) {\r
+ if (index >= CARD_SETTING_COUNT_MAX) {\r
+ break;\r
+ }\r
+ cardSettings[index++] = (CardId)atoi(setValue);\r
+ setValue = strtok_s(nullptr, ",", &setBuffer);\r
+ }\r
+ cardSettingCount = index;\r
+ } else {\r
+ /* 使用默认card配置 */\r
+ cardSettings[index++] = WATCH_FACE;\r
+ cardSettings[index++] = HEART_RATE;\r
+ cardSettings[index++] = COMPASS;\r
+ cardSettings[index++] = ACTIVITY;\r
+ cardSettings[index++] = MUSIC_PLAYER;\r
+ cardSettingCount = index;\r
+ }\r
+ }\r
+\r
+ void MainModel::DeleteCardSetting(uint8_t index)\r
+ {\r
+ char temp[CARD_SETTING_VALUE_LEN] = { 0 };\r
+ for (uint8_t i = 0; i < cardSettingCount; i++) {\r
+ if (i == index + 1) {\r
+ uint8_t j = i;\r
+ for (; j < cardSettingCount - 1; j++) {\r
+ cardSettings[j] = cardSettings[j + 1];\r
+ }\r
+ cardSettings[j] = MAX_CARD;\r
+ cardSettingCount--;\r
+ }\r
+ }\r
+\r
+ for (uint8_t i = 0; i < cardSettingCount; i++) {\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "cardSettings[%d] = %d", i, cardSettings[i]);\r
+ (void)sprintf_s(temp + strlen(temp), CARD_SETTING_VALUE_LEN, "%d,", cardSettings[i]);\r
+ }\r
+ (void)UtilsSetValue("card_setting", temp);\r
+ }\r
+\r
+ void MainModel::AddCardSetting(uint8_t index)\r
+ {\r
+ char temp[CARD_SETTING_VALUE_LEN] = { 0 };\r
+ if (cardSettingCount >= CARD_SETTING_COUNT_MAX) {\r
+ return;\r
+ }\r
+ for (int i = 0; i < cardSettingCount; i++) {\r
+ if (cardSettings[i] == cardInfoMap[index].id) {\r
+ return;\r
+ }\r
+ }\r
+ cardSettings[cardSettingCount++] = cardInfoMap[index].id;\r
+ for (uint8_t i = 0; i < cardSettingCount; i++) {\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "cardSettings[%d] = %d", i, cardSettings[i]);\r
+ (void)sprintf_s(temp + strlen(temp), CARD_SETTING_VALUE_LEN, "%d,", cardSettings[i]);\r
+ }\r
+ (void)UtilsSetValue("card_setting", temp);\r
+ }\r
+\r
+ uint8_t MainModel::GetCardSettingCount(void)\r
+ {\r
+ return cardSettingCount;\r
+ }\r
+\r
+ CardId *MainModel::GetCardSettings(void)\r
+ {\r
+ return cardSettings;\r
+ }\r
+\r
+ void MainModel::InitDialSettingDefault(void)\r
+ {\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "InitDialSettingDefault");\r
+ dialSetting.dialFlag = 0;\r
+ dialSetting.dialId = DIAL_CLOCK;\r
+ dialSetting.dialFullName = "";\r
+ }\r
+\r
+ void MainModel::AddDialSetting(const DialSetting &setting)\r
+ {\r
+ std::string tmp;\r
+ tmp += std::to_string(setting.dialFlag);\r
+ tmp += ",";\r
+ tmp += std::to_string(setting.dialId);\r
+ tmp += ",";\r
+ tmp += setting.dialFullName;\r
+ tmp += ",";\r
+ (void)UtilsSetValue("dial_setting", tmp.c_str());\r
+ }\r
+\r
+ void MainModel::InitDialSettings(void)\r
+ {\r
+ char temp[DIAL_SETTING_VALUE_LEN] = { 0 };\r
+ int32_t len = UtilsGetValue("dial_setting", temp, DIAL_SETTING_VALUE_LEN);\r
+ if (len >= 0) {\r
+ char *setBuffer = nullptr;\r
+ char *setValue = strtok_s(temp, ",", &setBuffer);\r
+ if (setValue != nullptr) {\r
+ dialSetting.dialFlag = atoi(setValue);\r
+ } else {\r
+ InitDialSettingDefault();\r
+ return;\r
+ }\r
+\r
+ setValue = strtok_s(nullptr, ",", &setBuffer);\r
+ if (setValue != nullptr) {\r
+ dialSetting.dialId = atoi(setValue);\r
+ } else {\r
+ InitDialSettingDefault();\r
+ return;\r
+ }\r
+\r
+ setValue = strtok_s(nullptr, ",", &setBuffer);\r
+ if (setValue != nullptr) {\r
+ dialSetting.dialFullName = setValue;\r
+ if (!((dialSetting.dialFullName.length() > 0) &&\r
+ (access(dialSetting.dialFullName.c_str(), F_OK) == 0))) {\r
+ InitDialSettingDefault();\r
+ return;\r
+ }\r
+ } else {\r
+ InitDialSettingDefault();\r
+ return;\r
+ }\r
+ } else {\r
+ InitDialSettingDefault();\r
+ }\r
+ }\r
+\r
+ DialSetting& MainModel::GetDialSetting()\r
+ {\r
+ return dialSetting;\r
+ }\r
+\r
+ bool MainModel::IsFromSetCardView(void) const\r
+ {\r
+ return isFromSetCardView;\r
+ }\r
+\r
+ void MainModel::SetFromSetCardView(bool isFrom)\r
+ {\r
+ isFromSetCardView = isFrom;\r
+ }\r
+\r
+ void MainModel::SetFromCardId(uint8_t cardId)\r
+ {\r
+ fromCardId = cardId;\r
+ }\r
+\r
+ uint8_t MainModel::GetFromCardId(void)\r
+ {\r
+ return fromCardId;\r
+ }\r
+}
\ No newline at end of file
#include "HeartRateView.h"
#include "PlayersModel.h"
#include "PlayersPresenter.h"
-#include "CompassPresenter.h"
+#include "MainCompassPresenter.h"
#include "CompassModel.h"
#include "CompassCalibrationView.h"
#include "drag_event.h"
#include "ModelDialDataFactory.h"
#include "PresenterTask.h"
#include "DialModelTime.h"
-#if USE_OFFLINE_DIAL
#include "DialViewGroup.h"
-#endif
#include "ui_service.h"
namespace OHOS {
-map<string, AppViewId> g_jumpView = { { MAIN_CLICK_WEATHER, VIEW_MAIN_SAMPLE }, // 天气界面
- { MAIN_CLICK_ACTIVITY, VIEW_MAIN_ACTIVITY }, // 活动记录界面
- { MAIN_CLICK_MESSAGE, VIEW_MAIN_SAMPLE }, // 消息app
- { MAIN_CLICK_HEARTRATE, VIEW_MAIN_SAMPLE }, // 心率界面
- { DROPDOWN_CLICK_ALARM, VIEW_MAIN_ALARM }, // 闹钟app
- { DROPDOWN_CLICK_SETTING, VIEW_SETTING } }; // 设置界面
+std::map<std::string, AppViewId> g_jumpView = { { MAIN_CLICK_WEATHER, VIEW_MAIN_SAMPLE }, // 天气界面
+ { MAIN_CLICK_ACTIVITY, VIEW_MAIN_ACTIVITY }, // 活动记录界面
+ { MAIN_CLICK_MESSAGE, VIEW_MAIN_SAMPLE }, // 消息app
+ { MAIN_CLICK_HEARTRATE, VIEW_MAIN_SAMPLE }, // 心率界面
+ { DROPDOWN_CLICK_ALARM, VIEW_MAIN_ALARM }, // 闹钟app
+ { DROPDOWN_CLICK_SETTING, VIEW_SETTING } }; // 设置界面
-map<string, int> g_chanColor = { { DROPDOWN_CLICK_FINDMYPHONE, DROPDOWN_DROPDOWN_FIND_PHONE_B },
- { DROPDOWN_CLICK_ALARM, DROPDOWN_DROPDOWN_ALARM_B },
- { DROPDOWN_CLICK_SETTING, DROPDOWN_DROPDOWN_SETTING_B } };
+std::map<std::string, int> g_chanColor = { { DROPDOWN_CLICK_FINDMYPHONE, DROPDOWN_DROPDOWN_FIND_PHONE_B },
+ { DROPDOWN_CLICK_ALARM, DROPDOWN_DROPDOWN_ALARM_B },
+ { DROPDOWN_CLICK_SETTING, DROPDOWN_DROPDOWN_SETTING_B } };
static MainPresenterSample *g_pMainPresenterSample = nullptr;
{
UNUSED(event);
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "StatusButtonClickListener: %s", view.GetViewId());
- string curViewId = view.GetViewId();
+ std::string curViewId = view.GetViewId();
UIImageView *imgView = static_cast<UIImageView *>(&view);
if (HealthModel::GetInstance() == nullptr) {
return true;
}
+bool MainPresenterSample::OnLongPress(UIView& view, const LongPressEvent& event)
+{
+ UNUSED(event);
+ UNUSED(view);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainPresenterSample OnLongPress");
+ uint8_t cardId = view_->GetHorCurrentCard();
+ if (cardId != WATCH_FACE) {
+ SetCardModel::GetInstance().SetSelectedCard(cardId);
+ NativeAbility::GetInstance().ChangeSlice(VIEW_SET_CARD);
+ } else {
+ NativeAbility::GetInstance().ChangeSlice(VIEW_SET_DIAL);
+ }
+ return true;
+}
+
void MainPresenterSample::SetPage(int8_t id)
{
if (view_ != nullptr) {
}
}
-void MainPresenterSample::SetTaskPeroid(int page)
+void MainPresenterSample::SetTaskPeroid(CardId cardId)
{
- if (page == COMPASS) {
+ if (cardId == COMPASS) {
PresenterTask::GetInstance()->SetPeriod(DEFAULT_TASK_PERIOD);
- } else if (page == WATCH_FACE) {
-#if USE_OFFLINE_DIAL
- uint32_t time = dynamic_cast<DialViewGroup*>(view_->GetViewById(WATCH_FACE))->GetPeriod();
-#else
- uint32_t time = DEFAULT_TASK_PERIOD;
-#endif
+ } else if (cardId == WATCH_FACE) {
+ uint32_t time;
+ DialSetting &setting = GetDialSetting();
+ if (setting.dialFlag) {
+ time = dynamic_cast<DialViewGroup*>(view_->GetViewById(WATCH_FACE))->GetPeriod();
+ } else {
+ time = DEFAULT_TASK_PERIOD;
+ }
PresenterTask::GetInstance()->SetPeriod(time);
- } else if (page == MUSIC_PLAYER) {
+ } else if (cardId == MUSIC_PLAYER) {
PresenterTask::GetInstance()->SetPeriod(PLAYER_PERIOD);
} else {
PresenterTask::GetInstance()->SetPeriod(MAX_PERIOD);
void MainPresenterSample::OnSwipe(UISwipeView &view)
{
UNUSED(view);
- int page = view_->GetHorCurrentPage();
+ CardId cardId = view_->GetHorCurrentCard();
callback_->OnSwipe(view);
- SetTaskPeroid(page);
- if (page == COMPASS) {
+ SetTaskPeroid(cardId);
+ if (cardId == COMPASS) {
if (!isCompassSensorOpened_) {
CompassModel::GetInstance()->OpenCompassSensor();
isCompassSensorOpened_ = true;
HealthMsg healthMsg;
uint16_t len;
- while ((HealthModel::GetInstance()->FetchedHealthData(&healthMsg) == true)) {
+ while ((HealthModel::GetInstance()->FetchedHealthData(&healthMsg))) {
switch (healthMsg.type) {
case BATTERY_LIFE:
break;
}
state_ = playersView->GetPlayerButtonState();
if (state_ == UICheckBox::UICheckBoxState::SELECTED) {
+ int32_t playerState;
+ PlayersModel::GetInstance()->GetPlayerCtr()->GetPlayerState(playerState);
+ if (playerState != PLAYER_STARTED) {
+ playersView->SetPlayerButtonState(UICheckBox::UICheckBoxState::UNSELECTED);
+ return;
+ }
PlayersModel::GetInstance()->GetPlayerCtr()->GetCurrentTime(playerCurrentTime_);
PlayersModel::GetInstance()->GetDuration(playerMusicDuration_);
if (playerMusicDuration_ != 0) {
void MainPresenterSample::Notify(void)
{
- if (view_->GetHorCurrentPage() == COMPASS) {
+ CardId cardId = view_->GetHorCurrentCard();
+ if (cardId == COMPASS) {
SetCompassRotate();
- } else if (view_->GetHorCurrentPage() == MUSIC_PLAYER) {
+ } else if (cardId == MUSIC_PLAYER) {
SetCircleProgress();
- } else if (view_->GetHorCurrentPage() == WATCH_FACE) {
-#if USE_OFFLINE_DIAL
- DialModelTime::GetInstance()->UpdateTime();
- dynamic_cast<DialViewGroup*>(view_->GetViewById(WATCH_FACE))->UpdateViewsByPeriodicUpdateData();
-#else
- dynamic_cast<MainClockView*>(view_->GetViewById(WATCH_FACE))->UpdateTime();
-#endif
+ } else if (cardId == WATCH_FACE) {
+ DialSetting &setting = GetDialSetting();
+ if (setting.dialFlag) {
+ DialModelTime::GetInstance()->UpdateTime();
+ dynamic_cast<DialViewGroup*>(view_->GetViewById(WATCH_FACE))->UpdateViewsByPeriodicUpdateData();
+ } else {
+ dynamic_cast<MainClockView*>(view_->GetViewById(WATCH_FACE))->UpdateTime();
+ }
}
}
+void MainPresenterSample::InitCardSettings(void)
+{
+ MainModel::GetInstance().InitCardSettings();
+}
+
+uint8_t MainPresenterSample::GetCardSettingCount(void)
+{
+ return MainModel::GetInstance().GetCardSettingCount();
+}
+
+CardId *MainPresenterSample::GetCardSettings(void)
+{
+ return MainModel::GetInstance().GetCardSettings();
+}
+
+void MainPresenterSample::InitDialSettings(void)
+{
+ return MainModel::GetInstance().InitDialSettings();
+}
+DialSetting& MainPresenterSample::GetDialSetting()
+{
+ return MainModel::GetInstance().GetDialSetting();
+}
+
+bool MainPresenterSample::IsFromSetCardView(void) const
+{
+ return MainModel::GetInstance().IsFromSetCardView();
+}
+
+void MainPresenterSample::SetFromSetCardView(bool isFrom)
+{
+ MainModel::GetInstance().SetFromSetCardView(isFrom);
+}
+
+uint8_t MainPresenterSample::GetFromCardId(void)
+{
+ return MainModel::GetInstance().GetFromCardId();
+}
+
}
UICardPage *(MainViewSample::*func)(void);
};
-static const MainViewMapper PageMapper[] = {
+static const MainViewMapper CardMapper[] = {
{WATCH_FACE, &MainViewSample::InitWatchFacePage},
{HEART_RATE, &MainViewSample::InitHeartRatePage},
{COMPASS, &MainViewSample::InitCompassPage},
compassControlView = nullptr;
}
+ if (callback != nullptr) {
+ delete callback;
+ callback = nullptr;
+ }
+
g_pMainView = nullptr;
}
mainSwipeGroup->SetLoopState(true);
mainSwipeGroup->EnableScreenCap(true);
mainSwipeGroup->RegisterSwipeCallback(callback);
- SwitchToClockPage();
+ if (presenter_->IsFromSetCardView()) {
+ presenter_->SetFromSetCardView(false);
+ SwitchToCard(presenter_->GetFromCardId());
+ } else {
+ SwitchToClockPage();
+ }
SetContainerView(mainSwipeGroup);
}
bool MainViewSample::HorizontalViewInit(void)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::HorizontalViewInit");
- UISwipeView::OnSwipeListener *listener = nullptr;
-
- for (int16_t i = 0; i < MAX_CARD; i++) {
- recordCard[i] = (this->*(PageMapper[i].func))();
- if (recordCard[i] == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainViewSample:: recordCard %d error", i);
- return false;
+ presenter_->InitDialSettings();
+ presenter_->InitCardSettings();
+ uint8_t cardSettingNum = presenter_->GetCardSettingCount();
+ CardId *cardSettings = presenter_->GetCardSettings();
+ uint8_t cardMapNumber = sizeof(CardMapper) / sizeof(CardMapper[0]);
+ for (int16_t i = 0; i < cardSettingNum; i++) {
+ for (uint8_t j = 0; j < cardMapNumber; j++) {
+ if (cardSettings[i] == CardMapper[j].id) {
+ recordCard[j] = (this->*(CardMapper[j].func))();
+ if (recordCard[j] == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
+ "MainViewSample:: recordCard %d error", j);
+ return false;
+ }
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,
+ "MainViewSample:: recordCard[%d]:%p", j, recordCard[j]);
+ break;
+ }
}
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample:: recordCard[%d]:%p", i, recordCard[i]);
}
-
- listener = static_cast<UISwipeView::OnSwipeListener *>(MainPresenterSample::GetInstance());
- if (listener == nullptr) {
- return false;
- }
- MainPresenterSample::GetInstance()->setCallback(callback);
- mainSwipeGroup->SetOnSwipeListener(listener);
+ presenter_->setCallback(callback);
+ mainSwipeGroup->SetOnSwipeListener(presenter_);
+ mainSwipeGroup->SetOnLongPressListener(presenter_);
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::InitPage over");
return true;
}
void MainViewSample::HorViewLoad(void)
{
- for (int16_t i = 0; i < MAX_CARD; i++) {
- mainSwipeGroup->HorAdd(recordCard[i]);
+ uint8_t cardSettingNum = presenter_->GetCardSettingCount();
+ CardId *cardSettings = presenter_->GetCardSettings();
+ for (int16_t i = 0; i < cardSettingNum; i++) {
+ CardId cardId = cardSettings[i];
+ if (recordCard[cardId] != nullptr) {
+ mainSwipeGroup->HorAdd(recordCard[cardId]);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample:: HorViewLoad cardid = %d ViewIndex = %d",
+ cardId, recordCard[cardId]->GetViewIndex());
+ }
}
}
return;
}
+UICardPage *MainViewSample::InitWatchOffDial(DialSetting &setting)
+{
+ DialViewGroup *dial = new DialViewGroup();
+ dial->SetDial(setting.dialFullName);
+ return dial;
+}
+
+UICardPage *MainViewSample::InitWatchDial(DialSetting &setting)
+{
+ switch (setting.dialId) {
+ case DIAL_CLOCK:
+ return new MainClockView();
+ default:
+ return nullptr;
+ }
+}
+
UICardPage *MainViewSample::InitWatchFacePage(void)
{
-#if USE_OFFLINE_DIAL
- mainClockView = new DialViewGroup();
- std::string filePath = dynamic_cast<MainPresenterSample*>(presenter_)->GetDialPath();
- if (filePath.size() == 0) {
- filePath = RES_PATH"dial.bin";
+ DialSetting &setting = presenter_->GetDialSetting();
+ if (setting.dialFlag) {
+ mainClockView = InitWatchOffDial(setting);
+ } else {
+ mainClockView = InitWatchDial(setting);
}
- mainClockView->SetDial(filePath);
-#else
- mainClockView = new MainClockView();
-#endif
if (mainClockView == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainClockView new fail");
}
if (presenter_ != nullptr) {
- presenter_->SetTaskPeroid(page);
+ CardId *cardSettings = presenter_->GetCardSettings();
+ /* page 与CardId 没有对应关系,需要一次转换 */
+ presenter_->SetTaskPeroid(cardSettings[page]);
}
}
bool MainViewSample::IsMainClockPage(void)
{
- if (mainSwipeGroup->GetCurrentPageId(0) == WATCH_FACE &&
+ if (mainSwipeGroup->GetCurrentPageId(0) == mainClockView->GetViewIndex() &&
mainSwipeGroup->GetCurrentPageId(1) == 1) { // 0: horizontal; 1: vertical
return true;
} else {
return false;
}
}
+
+CardId MainViewSample::GetHorCurrentCard() const
+{
+ CardId *cardSettings = presenter_->GetCardSettings();
+ int pageId = mainSwipeGroup->GetCurrentPageId(UISwipeView::HORIZONTAL); // 0: horizontal; 1: vertical
+ /* pageId 与CardId 没有对应关系,需要一次转换 */
+ return cardSettings[pageId];
+}
+
+void MainViewSample::SwitchToCard(uint8_t cardId)
+{
+ if ((cardId < MAX_CARD) && (recordCard[cardId] != nullptr)) {
+ SetPage(recordCard[cardId]->GetViewIndex());
+ } else {
+ SwitchToClockPage();
+ }
+}
+
}
void ModelListenerSample::Callback()
{
Notify();
+ OnTickEvent();
}
}
\r
namespace OHOS {\r
\r
-PresenterTask* PresenterTask::GetInstance() {\r
+PresenterTask* PresenterTask::GetInstance()\r
+{\r
static PresenterTask PresenterTask;\r
return &PresenterTask;\r
}\r
#include "bts_avrcp_controller.h"\r
#include "bts_avrcp_target.h"\r
#include "notification_manager.h"\r
+#include "BluetoothHeadsetEvent.h"\r
+#include "bts_avrcp_controller.h"\r
\r
namespace OHOS {\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
static VolumeSliderEventListener *g_pVolumeSliderEventListener = nullptr;\r
\r
constexpr int16_t SOUND_CHANGE = 10;\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OnClick OnClick");\r
if (strcmp(view.GetViewId(), INCREASE_BUTTON) == 0) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GetIncreaseButton OnClick");\r
- ChangeVolume(VOLUMELEVATED);\r
+ ChangeVolume(VOLUMEUP);\r
} else if (strcmp(view.GetViewId(), DECREASE_BUTTON) == 0) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GetDecreaseButton OnClick");\r
- ChangeVolume(VOLUMELOWERS);\r
+ ChangeVolume(VOLUMEDOWN);\r
} else if (strcmp(view.GetViewId(), VOLUME_PROGRESS) == 0) {\r
- ChangeImage();\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GetDragButton OnClick");\r
ChangeVolume(VOLUMEDRAG);\r
}\r
return true;\r
}\r
\r
-void VolumeSliderEventListener::ChangeImage()\r
-{\r
- ImageInfo *image;\r
- VolumeSettingView *volumeSettingView = VolumeSettingView::GetInstance();\r
- if (volumeSettingView == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ChangeImage:volumeSettingView new fail");\r
- return;\r
- }\r
- UISlider *progress = volumeSettingView->GetProgress();\r
- if (progress == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ChangeImage:progress new fail");\r
- return;\r
- }\r
- UIButton *decrease = volumeSettingView->GetDecreaseButton();\r
- if (decrease == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ChangeImage:decrease new fail");\r
- return;\r
- }\r
-\r
- volumeSettingView->sounding = progress->GetValue();\r
- if (volumeSettingView->sounding == 0) {\r
- image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUTE_BUTTON, PLAYER_IAMGES);\r
- decrease->SetImageSrc(image, image);\r
- // 刷新UI\r
- decrease->Invalidate();\r
- } else {\r
- image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_DECREASE_BUTTON, PLAYER_IAMGES);\r
- decrease->SetImageSrc(image, image);\r
- // 刷新UI\r
- decrease->Invalidate();\r
- }\r
-}\r
-\r
-void VolumeSliderEventListener::ChangeVolume(uint8_t status)\r
+void VolumeSliderEventListener::ChangeVolume(VolumeChangeStatus status)\r
{\r
ImageInfo *image;\r
VolumeSettingView *volumeSettingView = VolumeSettingView::GetInstance();\r
}\r
\r
preSound = volumeSettingView->sounding;\r
- if (status == 1) {\r
- volumeSettingView->sounding = progress->GetValue() + SOUND_CHANGE;\r
+ if (status == VOLUMEUP) {\r
+ volumeSettingView->sounding = progress->GetValue() + SOUND_CHANGE;\r
if (volumeSettingView->sounding > VOLUME_MAX) {\r
volumeSettingView->sounding = VOLUME_MAX;\r
}\r
decrease->SetImageSrc(image, image);\r
// 刷新UI\r
decrease->Invalidate();\r
- } else if (status == 0) {\r
+ progress->SetValue(volumeSettingView->sounding);\r
+ } else if (status == VOLUMEDOWN) {\r
volumeSettingView->sounding = progress->GetValue() - SOUND_CHANGE;\r
if (volumeSettingView->sounding < VOLUME_MIN) {\r
volumeSettingView->sounding = VOLUME_MIN;\r
}\r
+ if (volumeSettingView->sounding == VOLUME_MIN &&\r
+ (playerCoefficients == VOLUMEPHONE || playerCoefficients == VOLUMEPHONENOTIFY)) {\r
+ // 通话场景音量不能设置为0\r
+ volumeSettingView->sounding = SOUND_CHANGE;\r
+ }\r
if ((volumeSettingView->sounding == 0) && (preSound != 0)) {\r
image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUTE_BUTTON, PLAYER_IAMGES);\r
decrease->SetImageSrc(image, image);\r
// 刷新UI\r
decrease->Invalidate();\r
}\r
+ progress->SetValue(volumeSettingView->sounding);\r
+ } else if (status == VOLUMEDRAG) {\r
+ volumeSettingView->sounding = progress->GetValue();\r
+ if (volumeSettingView->sounding == VOLUME_MIN &&\r
+ (playerCoefficients == VOLUMEPHONE || playerCoefficients == VOLUMEPHONENOTIFY)) {\r
+ // 通话场景音量不能设置为0\r
+ volumeSettingView->sounding = SOUND_CHANGE;\r
+ progress->SetValue(volumeSettingView->sounding);\r
+ }\r
+ if (volumeSettingView->sounding == 0) {\r
+ image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUTE_BUTTON, PLAYER_IAMGES);\r
+ decrease->SetImageSrc(image, image);\r
+ // 刷新UI\r
+ decrease->Invalidate();\r
+ } else {\r
+ image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_DECREASE_BUTTON, PLAYER_IAMGES);\r
+ decrease->SetImageSrc(image, image);\r
+ // 刷新UI\r
+ decrease->Invalidate();\r
+ }\r
}\r
- progress->SetValue(volumeSettingView->sounding);\r
+\r
if (playerCoefficients == VOLUMEPLAYERS) {\r
BtAndLocalVolumeSet(volumeSettingView->sounding);\r
}\r
if (playerCoefficients == VOLUMEPHONE || playerCoefficients == VOLUMEPHONENOTIFY) {\r
- unsigned char volumeValue;\r
- volumeValue = (unsigned char) ((double) (volumeSettingView->sounding * CALL_VOLUME_MAX) / (VOLUME_MAX - VOLUME_MIN)); // 音量转换\r
+ unsigned char volumeValue = (unsigned char) ((double) (volumeSettingView->sounding * CALL_VOLUME_MAX) / (VOLUME_MAX - VOLUME_MIN)); // 音量转换\r
SetSpeakerVolume(volumeValue);\r
}\r
}\r
\r
+extern BtAvrcpTgInf g_avrcp_srv_inf;\r
void VolumeSliderEventListener::BtAndLocalVolumeSet(int16_t sounding)\r
{\r
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BtAndLocalVolumeSet %d", sounding);\r
+ if (g_avrcp_srv_inf.avrcp_srv_conn_stat == PROFILE_STATE_CONNECTED) {\r
+ uint8_t volume = sounding * AVRCP_ABSOLUTE_VOLUME_PERCENTAGE_100 / 100; // 100:本地音量最大值\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "avrcp volume = %d", volume);\r
+ (void)avrcp_ct_set_absolute_volume(&(g_avrcp_srv_inf.bd_addr), volume); // 手表音量设置同步远端BT音量\r
+ }\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "audio volume = %d", sounding);\r
AudioManager::GetInstance().SetVolume(AUDIO_STREAM_MUSIC, sounding); // 本地音量设置\r
}\r
\r
void VolumeSliderEventListener::OnRelease(int32_t value)\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OnRelease %d", value);\r
- ChangeImage();\r
ChangeVolume(VOLUMEDRAG);\r
}\r
\r
void VolumeSliderEventListener::OnChange(int32_t value)\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OnChange %d", value);\r
- ChangeImage();\r
ChangeVolume(VOLUMEDRAG);\r
}\r
\r
}\r
return true;\r
}\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
}
\ No newline at end of file
void DialModelSteps::UpdateSteps(int16_t steps)
{
steps_ = static_cast<float>(steps);
- if(onChangeListener_ != nullptr) {
+ if (onChangeListener_ != nullptr) {
onChangeListener_->OnDialFloatDataUpdate(DialDataType::DATA_TYPE_STEPS, steps_);
}
}
void DialModelTime::UpdateTime()
{
struct timeval tv;
- gettimeofday(&tv, NULL);
+ gettimeofday(&tv, nullptr);
tblock_ = localtime(&tv.tv_sec);
int realMS = tblock_->tm_sec * S_MS_US_TRANS + tv.tv_usec / S_MS_US_TRANS;
static constexpr int16_t JPEG_WIDTH_BYTE_ALIGNMENT = 128;
static constexpr int16_t JPEG_HEIGHT_BYTE_ALIGNMENT = 16;
static constexpr int16_t BUFFER_QUEUE_SIZE = 2;
-static constexpr int16_t STRIDE_ALIGNMENT_VALUE = 64;
+static constexpr int16_t STRIDE_ALIGNMENT_VALUE = 128;
#ifdef SUPPORT_AT_OHOSFWK
static MediaVideoPlay *g_videoPlay = nullptr;
deregisterNotifyScreenStatus(ScreenStatusNotify);
#endif
if (videoPlayer_ != nullptr) {
- videoPlayer_->StopVideoPlay();
delete videoPlayer_;
}
}
}
videoPlayer_ = new MediaVideoPlay(surface, fd, offset_, true);
+ videoPlayer_->SetSyncExitMode(true);
#ifdef SUPPORT_AT_OHOSFWK
g_videoPlay = videoPlayer_;
registerNotifyScreenStatus(ScreenStatusNotify);
DialViewGroup::~DialViewGroup(void)
{
+ if (kaleidoscope_ != nullptr) {
+ kaleidoscope_->ClearFocus();
+ kaleidoscope_ = nullptr;
+ }
ClearDial();
}
if (video_ != nullptr) {
video_->StartPlay();
}
+
+ if (kaleidoscope_ != nullptr) {
+ kaleidoscope_->RequestFocus();
+ kaleidoscope_->StartRotateAnimator();
+ }
resPreloaded_ = true;
}
}
dialViews_.PushBack(view);
Add(view);
+ if (view->GetViewType() == UI_KALEIDOSCOPE_VIEW) {
+ kaleidoscope_ = dynamic_cast<UIKaleidoscopeView*>(view);
+ }
+
if (isDialVideoView) {
if (video_ != nullptr) {
GRAPHIC_LOGE("Already added a video view.\n");
void DialViewGroup::ScrollBegin(bool isActive)
{
+ if (kaleidoscope_ != nullptr) {
+ if (isActive) {
+ kaleidoscope_->ClearFocus();
+ kaleidoscope_->StopRotateAnimator();
+ }
+ return;
+ }
+
if (video_ == nullptr) {
return;
}
void DialViewGroup::ScrollEnd(bool isActive)
{
+ if (kaleidoscope_ != nullptr) {
+ if (isActive) {
+ kaleidoscope_->StartRotateAnimator();
+ kaleidoscope_->RequestFocus();
+ }
+ return;
+ }
+
if (video_ == nullptr) {
return;
}
} else if (video_->IsStopped()) {
video_->StartPlay();
}
+ } else {
+ if (video_->IsPaused() || video_->IsPlayed()) {
+ video_->StopPlay();
+ }
+ ClearCache();
}
}
void DialViewGroup::CoverBegin(bool isCovered)
{
+ if (kaleidoscope_ != nullptr) {
+ if (!isCovered) {
+ kaleidoscope_->StopRotateAnimator();
+ kaleidoscope_->ClearFocus();
+ }
+ return;
+ }
+
if (video_ == nullptr) {
return;
}
void DialViewGroup::CoverEnd(bool isCovered)
{
+ if (kaleidoscope_ != nullptr) {
+ if (!isCovered) {
+ kaleidoscope_->RequestFocus();
+ kaleidoscope_->StartRotateAnimator();
+ }
+ return;
+ }
if (video_ == nullptr) {
return;
}
}
}
}
+
+void DialViewGroup::OnActive(void)
+{
+ if (video_ != nullptr) {
+ if (video_->IsPaused()) {
+ video_->ResumePlay();
+ } else if (video_->IsStopped()) {
+ video_->StartPlay();
+ }
+ } else if (kaleidoscope_ != nullptr) {
+ kaleidoscope_->RequestFocus();
+ kaleidoscope_->StartRotateAnimator();
+ }
+}
}
#include "ModelDialDataFactory.h"
namespace OHOS {
-bool ModelDialDataFactory::GetDialTextData(DialDataType& type, string*& out, int16_t& strNum)
+bool ModelDialDataFactory::GetDialTextData(DialDataType& type, std::string*& out, int16_t& strNum)
{
DialBaseModel* model = GetModuleByType(type);
if (model == nullptr) {
#include "DialBoxProgressView.h"\r
#include "DialArcProgressView.h"\r
#include "DialArcLabelView.h"\r
+#include "DialKaleidoscopeView.h"\r
\r
namespace OHOS {\r
DialBinParser::DialBinParser()\r
funcArray_[8] = &DialBinParser::ParserDialArcProgress; // 8: index\r
funcArray_[9] = &DialBinParser::ParserDialVideo; // 9: index\r
funcArray_[10] = &DialBinParser::ParserDialClick; // 10: index\r
+ funcArray_[11] = &DialBinParser::ParserDialKaleidoscope; // 11: index\r
}\r
\r
DialBinParser::~DialBinParser()\r
return &instance;\r
}\r
\r
+bool DialBinParser::GetDialPreviewInfo(FILE* fp, DialPreviewInfo* info)\r
+{\r
+ if (fp == nullptr || info == nullptr) {\r
+ GRAPHIC_LOGE("Get dial preview fail, param error!\n");\r
+ return false;\r
+ }\r
+\r
+ DialHeader* dialHeader = static_cast<DialHeader*>(MallocAndReadBuf(fp, sizeof(DialHeader)));\r
+ if (dialHeader == nullptr) {\r
+ GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+ return false;\r
+ }\r
+\r
+ if (memcpy_s(info->dialName, DIAL_NAME_MAX_LEN, dialHeader->dialName, DIAL_NAME_MAX_LEN) != EOK) {\r
+ GRAPHIC_LOGE("[%s: %d]memcpy_s dial name fail!\n", __FUNCTION__, __LINE__);\r
+ free(dialHeader);\r
+ return false;\r
+ }\r
+\r
+ if (memcpy_s(info->description, DIAL_DESCRIPTION_MAX_LEN,\r
+ dialHeader->description, DIAL_DESCRIPTION_MAX_LEN) != EOK) {\r
+ GRAPHIC_LOGE("[%s: %d]memcpy_s dial description fail!\n", __FUNCTION__, __LINE__);\r
+ free(dialHeader);\r
+ return false;\r
+ }\r
+\r
+ info->imgId = dialHeader->previewImgId | dirId_;\r
+ info->offset = dialHeader->imageOffset;\r
+\r
+ free(dialHeader);\r
+ return true;\r
+}\r
+\r
bool DialBinParser::UpdateDial(const std::string& file, FILE* fp, DialViewGroup* group)\r
{\r
if (fp == nullptr) {\r
fseek(fp, curReadPt, SEEK_SET);\r
}\r
\r
- ImageInfo* numInfoArray[DIGITALIMG_IMG_MAX_NUM] = {};\r
- for (uint16_t i = 0; i < DIGITALIMG_IMG_MAX_NUM; i++) {\r
+ ImageInfo* numInfoArray[DIAL_DIGITALIMG_IMG_MAX_NUM] = {};\r
+ for (uint16_t i = 0; i < DIAL_DIGITALIMG_IMG_MAX_NUM; i++) {\r
resId = data->imgIds[i] | dirId_;\r
curReadPt = ftell(fp);\r
numInfoArray[i] = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId,\r
fseek(fp, curReadPt, SEEK_SET);\r
}\r
view->SetParent(dialGroup_);\r
- view->SetNumRes(const_cast<const ImageInfo**>(numInfoArray), DIGITALIMG_IMG_MAX_NUM);\r
+ view->SetNumRes(const_cast<const ImageInfo**>(numInfoArray), DIAL_DIGITALIMG_IMG_MAX_NUM);\r
dialGroup_->AddView(static_cast<DialDataType>(data->bindData), view, data->isPeriod);\r
\r
UIFree(data);\r
fseek(fp, curReadPt, SEEK_SET);\r
view->SetImage(foregroundInfo, nullptr);\r
} else if (data.type == 1) {\r
- view->SetForegroundStyle(STYLE_BACKGROUND_COLOR, data.color.full);\r
+ if (view->GetViewType() == UI_BOX_PROGRESS) {\r
+ view->SetForegroundStyle(STYLE_BACKGROUND_COLOR, data.color.full);\r
+ } else if (view->GetViewType() == UI_CIRCLE_PROGRESS) {\r
+ view->SetForegroundStyle(STYLE_LINE_COLOR, data.color.full);\r
+ }\r
} else if (data.type == 2) { // 2: gradient\r
ColorStop* stopArray = static_cast<ColorStop*>(MallocAndReadBuf(fp, (sizeof(ColorStop) * data.stopCount)));\r
if (stopArray == nullptr) {\r
view->SetPosition(data->rect.x, data->rect.y, data->rect.w, data->rect.h);\r
view->SetSurfaceColorkey(data->colorKey);\r
view->SetVideoRes(fp, data->offset);\r
+ uint32_t resId = data->imgId | dirId_;\r
+ uint32_t curReadPt = ftell(fp);\r
+ ImageInfo* imgInfo = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId,\r
+ file_, fp, false, imageOffset_);\r
+ if (imgInfo == nullptr) {\r
+ GRAPHIC_LOGE("[%s: %d]load img fail! file: %s resId: %x\n",\r
+ __FUNCTION__, __LINE__, file_.c_str(), resId);\r
+ return false;\r
+ }\r
+ fseek(fp, curReadPt, SEEK_SET);\r
+ view->SetPreview(imgInfo);\r
dialGroup_->AddView(view, true);\r
UIFree(data);\r
return 0;\r
\r
return 0;\r
}\r
-}
\ No newline at end of file
+\r
+int32_t DialBinParser::ParserDialKaleidoscope(FILE* fp)\r
+{\r
+ if (fp == nullptr) {\r
+ GRAPHIC_LOGE("Parser dial option image fail, file is nullptr!\n");\r
+ return -1;\r
+ }\r
+\r
+ DialKaleidoscope* data = static_cast<DialKaleidoscope*>(MallocAndReadBuf(fp, sizeof(DialKaleidoscope)));\r
+ if (data == nullptr) {\r
+ GRAPHIC_LOGE("[%s: %d]malloc or read fail!\n", __FUNCTION__, __LINE__);\r
+ return -1;\r
+ }\r
+\r
+ DialKaleidoscopeView* view = new DialKaleidoscopeView();\r
+ uint32_t resId = data->imgId | dirId_;\r
+ uint32_t curReadPt = ftell(fp);\r
+ ImageInfo* imgInfo = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId,\r
+ file_, fp, false, imageOffset_);\r
+ if (imgInfo == nullptr) {\r
+ GRAPHIC_LOGE("[%s: %d]load img fail! file: %s resId: %x\n",\r
+ __FUNCTION__, __LINE__, file_.c_str(), resId);\r
+ return false;\r
+ }\r
+ fseek(fp, curReadPt, SEEK_SET);\r
+\r
+ view->SetSrc(imgInfo);\r
+ view->SetRotateEventFactor(data->crownRotateStep); // 0.2: rotate event factor\r
+ view->SetRotateAnimatorValue(data->animatorRotateStep); // 0.1: rotate animator value\r
+ dialGroup_->AddView(view);\r
+\r
+ UIFree(data);\r
+ return 0;\r
+}\r
+}\r
class MainCallingPresenter : public Presenter<MainCallingView>, public UIView::OnClickListener {\r
public:\r
MainCallingPresenter();\r
- virtual ~MainCallingPresenter();\r
+ ~MainCallingPresenter() override;\r
\r
void OnStart() override;\r
void OnPause() override;\r
group->SetPosition(MATH_ZERO, MATH_ZERO);\r
group->Resize(VERTICAL_RESOLUTION, HORIZONTAL_RESOLUTION); // 454 : value\r
\r
- if (InitImageViewDisplay() == false) {\r
+ if (!InitImageViewDisplay()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerDisplayView::InitImageViewDisplay error");\r
return nullptr;\r
}\r
\r
- if (InitAddOnclickevent() == false) {\r
+ if (!InitAddOnclickevent()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerDisplayView::InitAddOnclickevent error");\r
return nullptr;\r
}\r
\r
- if (InitUILabelDisplay() == false) {\r
+ if (!InitUILabelDisplay()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerDisplayView::InitUILabelDisplay error");\r
return nullptr;\r
}\r
VIEW_DISTANCE_TO_LEFT_SIDE, TITLE_LABEL_DEFAULT_HEIGHT);\r
callDuration->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
callDuration->SetAlign(TEXT_ALIGNMENT_CENTER);\r
- callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration());\r
+ callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration().c_str());\r
callDuration->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_TIME_FONT_SIZE);\r
callDuration->SetTextColor(Color::White());\r
group->Add(callDuration);\r
group->SetPosition(MATH_ZERO, MATH_ZERO);\r
group->Resize(VERTICAL_RESOLUTION, HORIZONTAL_RESOLUTION); // 454 : value\r
\r
- if (InitImageViewDisplay() == false) {\r
+ if (!InitImageViewDisplay()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitImageViewDisplay error");\r
return nullptr;\r
}\r
\r
- if (InitAddOnclickevent() == false) {\r
+ if (!InitAddOnclickevent()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitAddOnclickevent error");\r
return nullptr;\r
}\r
\r
- if (InitUILabelDisplay() == false) {\r
+ if (!InitUILabelDisplay()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallingView::InitUILabelDisplay error");\r
return nullptr;\r
}\r
group->SetPosition(MATH_ZERO, MATH_ZERO);\r
group->Resize(VERTICAL_RESOLUTION, HORIZONTAL_RESOLUTION); // 454 : value\r
\r
- if (InitUILabelDisplay() == false) {\r
+ if (!InitUILabelDisplay()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DialingScreenView::InitImageViewDisplay error");\r
return nullptr;\r
}\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::volumeSetting nullptr err");\r
return;\r
}\r
- if (volumeSetting->SetUpVolume() == false) {\r
+ if (!volumeSetting->SetUpVolume()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::volumeSetting SetUpVolume fail");\r
return;\r
}\r
\r
volumeSliderEventListener->SetPlayerCoefficients(VOLUMEPHONE); // 进度条系数\r
\r
- if (InitPointerValue() == false) {\r
+ if (!InitPointerValue()) {\r
return;\r
}\r
\r
\r
bool MainCallingPresenter::CallingViewDisplay()\r
{\r
- if (InitPointerValue() == false) {\r
+ if (!InitPointerValue()) {\r
return false;\r
}\r
view_->GetScreenGroup()->SetVisible(false);\r
}\r
CallerLogModel::GetInstance()->SetWaitingStatus(false);\r
CallerLogModel::GetInstance()->SetCallStatus(true);\r
- NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TRANSITION_INVALID, PRIORITY_ONE);\r
+ NativeAbility::GetInstance().ChangeSlice(VIEW_MAEKPHONE_SAMPLE, TransitionType::TRANSITION_INVALID, PRIORITY_ONE);\r
return true;\r
}\r
\r
{\r
UNUSED(event);\r
\r
- if (InitPointerValue() == false) {\r
+ if (!InitPointerValue()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::InitPointerValue error");\r
return false;\r
}\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::honrs show");\r
HonrsViewChange();\r
} else if (strcmp(view.GetViewId(), "hintsHandup") == 0) {\r
- if (HintsHandupClick() == false) {\r
+ if (!HintsHandupClick()) {\r
return false;\r
}\r
} else if (strcmp(view.GetViewId(), "answer") == 0) {\r
View<MainCallingPresenter>::OnStart();\r
BaseView::RootView(Color::Black().full);\r
\r
- if (InitPointerValue() == false) {\r
+ if (!InitPointerValue()) {\r
return;\r
}\r
\r
\r
waitingGroup->SetVisible(false);\r
callingGroup->SetVisible(false);\r
- if (CallerLogModel::GetInstance()->GetCallStatus() == true) {\r
+ if (CallerLogModel::GetInstance()->GetCallStatus()) {\r
displayGroup->SetVisible(false);\r
callingGroup->SetVisible(true);\r
screenGroup->SetVisible(false);\r
- } else if (CallerLogModel::GetInstance()->GetWaitingStatus() == true) {\r
+ } else if (CallerLogModel::GetInstance()->GetWaitingStatus()) {\r
screenGroup->SetVisible(false);\r
displayGroup->SetVisible(false);\r
waitingGroup->SetVisible(true);\r
- } else if (CallerLogModel::GetInstance()->GetPhoneStatus() == true) {\r
+ } else if (CallerLogModel::GetInstance()->GetPhoneStatus()) {\r
displayGroup->SetVisible(false);\r
} else {\r
screenGroup->SetVisible(false);\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainCallingView::~OnSetUpView");\r
View<MainCallingPresenter>::OnSetUpView();\r
- if (CallerLogModel::GetInstance()->GetMulitplePhoneStatus() == true) {\r
+ if (CallerLogModel::GetInstance()->GetMulitplePhoneStatus()) {\r
MulitplePhoneTextReplaces();\r
CallerLogModel::GetInstance()->SetMulitplePhoneStatus(false);\r
}\r
group->SetPosition(MATH_ZERO, MATH_ZERO);\r
group->Resize(VERTICAL_RESOLUTION, HORIZONTAL_RESOLUTION); // 454 : value\r
\r
- if (InitImageViewDisplay() == false) {\r
+ if (!InitImageViewDisplay()) {\r
return nullptr;\r
}\r
- if (InitUILabelDisplay() == false) {\r
+ if (!InitUILabelDisplay()) {\r
return nullptr;\r
}\r
return group;\r
class MainVocassistView : public View<VocassistPresenter> {\r
public:\r
MainVocassistView();\r
- virtual ~MainVocassistView();\r
+ ~MainVocassistView() override;\r
void OnStart() override;\r
void OnSetUpView() override;\r
void OnTearDownView() override;\r
class VoiceAssistance : public AppGroupView {\r
public:\r
VoiceAssistance();\r
- virtual ~VoiceAssistance();\r
+ ~VoiceAssistance() override;\r
static VoiceAssistance *GetInstance();\r
bool InitView(void *caller) override; // 初始化所有控件\r
\r
namespace OHOS {
static void RecognVoiceEvent(const SmartVoiceCmdParam data)
{
- SmartVoiceCmdParam *param = NULL;
+ SmartVoiceCmdParam *param = nullptr;
param = (SmartVoiceCmdParam *)&data;
if (param->cmdId < SMART_VOICE_WAKEUP_CMD || param->cmdId > SMART_VOICE_INVALID_CMD_ID) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Get cmdid failed, funct callback finish!!");
}
} else if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_OFFLINEVOICE) { // 已经进入语音助手
if (VoiceAssistance::GetInstance() == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VoiceAssistance instance is NULL, funct callback finish!!");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VoiceAssistance instance is nullptr, funct callback finish!!");
return;
}
if (VocassistModel::GetInstance()->GetToggleFlag() == ALREADY_OPEN_VOCASSIST_IMAGE &&
- VocassistModel::GetInstance()->GetHasOneCmd() == false) {
+ (!VocassistModel::GetInstance()->GetHasOneCmd())) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CurSliceId equals VIEW_OFFLINEVOICE");
VoiceAssistance::GetInstance()->SetCmdContext(g_voiceWordName[param->cmdId]);
VoiceAssistance::GetInstance()->SwitchMedium(CREATE_CMD_LABEL);
void VoiceFunction(SmartVoiceEventType type, td_void *data, td_s32 size)
{
int dataSize = sizeof(SmartVoiceCmdParam);
- if (data == NULL || dataSize != size) {
+ if (data == nullptr || dataSize != size) {
return;
}
VocassistModel::GetInstance()->SetExitStatus(CONTINUTE_EXIT_MODE1);
VoiceAssistance::GetInstance()->DelayDisplayTime(DELAY_SIX_SECONDS); // 开启定时器,太长时间未操作退出语音助手
-
}
void VocassistPresenter::OnAnimatorStop(UIView& view) // 播放结束监听
{
UNUSED(event);
if (VoiceAssistance::GetInstance() == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VoiceAssistance instance is NULL!!");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VoiceAssistance instance is nullptr!!");
return false;
}
if (strcmp(view.GetViewId(), VOCPHOTO_ID) == 0) {
void VocassistPresenter::OnStop(void)
{
Presenter<MainVocassistView>::OnStop();
- SendMsgToUIService(SCREEN_TURN_OFF_TO_UI, 0, NULL, 0);
-
+ SendMsgToUIService(SCREEN_TURN_OFF_TO_UI, 0, nullptr, 0);
}
}
static constexpr int16_t ERROR_RETVAL = -1;\r
\r
namespace OHOS {\r
-static osTimerId_t g_closeVocassistHandle = NULL;\r
+static osTimerId_t g_closeVocassistHandle = nullptr;\r
static VoiceAssistance *g_pVoiceAssistance = nullptr;\r
\r
enum {\r
RemoveAll();\r
g_pVoiceAssistance = nullptr;\r
// 切换为其它slice时将定时器删除\r
- if (g_closeVocassistHandle != NULL) {\r
+ if (g_closeVocassistHandle != nullptr) {\r
osStatus_t statusRet = osTimerDelete(g_closeVocassistHandle);\r
if (statusRet != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Delete timer failed!!");\r
}\r
- g_closeVocassistHandle = NULL;\r
+ g_closeVocassistHandle = nullptr;\r
}\r
\r
delete voicePhoto;\r
void VoiceAssistance::DetermineCause(const int *eventRet) // 根据能否执行用户指令做出回复\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VoiceAssistView] Enter DetermineCause");\r
- if (eventRet == NULL) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "EventRet is NULL!!");\r
+ if (eventRet == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "EventRet is nullptr!!");\r
return;\r
}\r
if (VoiceAssistance::GetInstance() == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VoiceAssistance instance is NULL!!");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VoiceAssistance instance is nullptr!!");\r
return;\r
}\r
int temp = *eventRet;\r
voicePhoto->SetSizeFixed(true);\r
\r
if (VoiceAssistance::GetInstance() == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VoiceAssistance instance is NULL!!");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VoiceAssistance instance is nullptr!!");\r
return;\r
}\r
VoiceAssistance::GetInstance()->SwitchMedium(WAVE_VIEW);\r
void VoiceAssistance::SwitchMedium(uint16_t targetView)\r
{\r
if (GraphicService::GetInstance() == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GraphicService instance is NULL!!");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GraphicService instance is nullptr!!");\r
return;\r
}\r
GraphicService::GetInstance()->PostGraphicEvent(std::bind(&VoiceAssistance::VocSwitchApp, this, targetView));\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VoiceAssistView] Start Operation!!");\r
if (VoiceAssistance::GetInstance() == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VoiceAssistance instance is NULL!!");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VoiceAssistance instance is nullptr!!");\r
return;\r
}\r
viewFunct func = FindIndex(targetView);\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VoiceAssistView] Enter ChangeViewToPlayer");\r
\r
- if(!PlayersModel::GetInstance()->HasPlayerPlayed()) { // 播放过了就不用再初始化\r
+ if (!PlayersModel::GetInstance()->HasPlayerPlayed()) { // 播放过了就不用再初始化\r
PlayersListGroup::GetInstance()->SetUpListCase();\r
PlayersModel::GetInstance()->PlayerInit();\r
}\r
\r
static void DeleteTimeTick()\r
{\r
- if (g_closeVocassistHandle != NULL) {\r
+ if (g_closeVocassistHandle != nullptr) {\r
osStatus_t ret = osTimerDelete(g_closeVocassistHandle);\r
if (ret != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Delete timer failed!!");\r
return;\r
}\r
- g_closeVocassistHandle = NULL;\r
+ g_closeVocassistHandle = nullptr;\r
}\r
}\r
\r
}\r
int quitStatus = VocassistModel::GetInstance()->GetExitStatus();\r
// 删除定时器,打断退出语音助手的操作\r
- if (g_closeVocassistHandle != NULL && (quitStatus == CONTINUTE_EXIT_MODE1 ||\r
+ if (g_closeVocassistHandle != nullptr && (quitStatus == CONTINUTE_EXIT_MODE1 ||\r
quitStatus == CONTINUTE_EXIT_MODE2)) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Interrupt Timer!!");\r
osStatus_t statusRet = osTimerDelete(g_closeVocassistHandle);\r
if (statusRet != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Delete timer failed!!");\r
}\r
- g_closeVocassistHandle = NULL;\r
+ g_closeVocassistHandle = nullptr;\r
VocassistModel::GetInstance()->SetExitStatus(INTERRUPT_EXIT);\r
}\r
\r
// 创建新的定时器\r
- g_closeVocassistHandle = osTimerNew((osTimerFunc_t)DelayTimeCallback, osTimerOnce, NULL, NULL);\r
- if (g_closeVocassistHandle == NULL) {\r
+ g_closeVocassistHandle = osTimerNew((osTimerFunc_t)DelayTimeCallback, osTimerOnce, nullptr, nullptr);\r
+ if (g_closeVocassistHandle == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "New timer failed !!");\r
return;\r
}\r
osStatus_t statusRet = osTimerStart(g_closeVocassistHandle, tick);\r
if (statusRet != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Start timer failed !!");\r
- if (g_closeVocassistHandle != NULL) {\r
+ if (g_closeVocassistHandle != nullptr) {\r
statusRet = osTimerDelete(g_closeVocassistHandle);\r
if (statusRet != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Delete timer failed !!");\r
return;\r
}\r
- g_closeVocassistHandle = NULL;\r
+ g_closeVocassistHandle = nullptr;\r
}\r
return;\r
}\r
#ifndef PHONE_AUDIO_H
#define PHONE_AUDIO_H
-#include <stdint.h>
-#include "stdbool.h"
+#include <cstdint>
#include "audio_base_type.h"
#include "ohos_types.h"
#ifndef PHONE_SERVICE_H
#define PHONE_SERVICE_H
-#include "stdbool.h"
#include "bts_br_gap.h"
#include "bts_hfp_hf.h"
#include "ohos_types.h"
return true;
}
- if (isMute == true) {
+ if (isMute) {
ret = g_amInstance.Mute(AUDIO_STREAM_VOICE_CALL_BT_SCO);
} else {
ret = g_amInstance.UnMute(AUDIO_STREAM_VOICE_CALL_BT_SCO);
}
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[%s] line:%d success, deviceType = 0x%x connectState = %d",
- __FUNCTION__, __LINE__, deviceType, connectState);
+ __FUNCTION__, __LINE__, deviceType, connectState);
return AUDIO_SUCCESS;
}
#include "PhoneService.h"
#include "PhoneAudio.h"
#include "securec.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include "audio_base_type.h"
#include "audio_manager.h"
-#include "time.h"
+#include <ctime>
#include "wearable_log.h"
#include "unistd.h"
#include "dirent.h"
int32_t timeout = -1;
SendMsgToUIService(SCREEN_TURN_ON_TO_UI, 0, &timeout, sizeof(int32_t));
} else {
- SendMsgToUIService(SCREEN_TURN_OFF_TO_UI, 0, NULL, 0);
+ SendMsgToUIService(SCREEN_TURN_OFF_TO_UI, 0, nullptr, 0);
}
}
int RegisterCallChangedCb(PhoneServiceCb *phoneServiceFun)
{
- if (phoneServiceFun == NULL) {
+ if (phoneServiceFun == nullptr) {
return OHOS_FAILURE;
}
// 初始化媒体
static void AudioInit(void)
{
- int ret;
- ret = PhoneAudioManagerInit();
+ int32_t ret = PhoneAudioManagerInit();
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioInit] [PhoneAudioManagerInit] failed!");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioInit] failed!");
}
}
// 释放音频焦点
static void AudioDeactInterrupt(AudioStreamType type)
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDeactInterrupt] start type: 0x%x, g_audioState: 0x%x",
- type, g_audioState);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDeactInterrupt] start type:0x%x, audioState:0x%x",
+ type, g_audioState);
if ((type == AUDIO_STREAM_VOICE_CALL_BT_SCO && g_audioState >= AUDIO_ACT_INTERRUPT_BT_SCO) ||
(type == AUDIO_STREAM_RING && g_audioState == AUDIO_ACT_INTERRUPT_WATCH_RING)) {
{
int ret = OHOS_SUCCESS;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] start type: 0x%x, g_audioState: 0x%x",
- type, g_audioState);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] start type:0x%x, audioState:0x%x",
+ type, g_audioState);
if (type != AUDIO_STREAM_VOICE_CALL_BT_SCO && type != AUDIO_STREAM_RING) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] failed! type: 0x%x, g_audioState: 0x%x",
- type, g_audioState);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] failed! type:0x%x, audioState:0x%x",
+ type, g_audioState);
return;
}
}
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] failed! type: 0x%x, g_audioState: 0x%x",
- type, g_audioState);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] failed! type:0x%x, audioState:0x%x",
+ type, g_audioState);
}
MUTEX_Unlock(g_audioMutex);
{
int ret;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] start g_scoFlag: 0x%x, g_audioState: 0x%x",
- g_scoFlag, g_audioState);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] start scoFlag:0x%x, audioState:0x%x",
+ g_scoFlag, g_audioState);
if (g_scoFlag != HFP_SCO_STATE_CONNECTED || g_audioState < AUDIO_ACT_INTERRUPT_BT_SCO) {
return;
}
// 配置媒体连接SCO设配状态(下行),只有在SCO连接后才能设置
ret = PhoneAudioManagerSetDeviceConnState(IN_BLUETOOTH_SCO, AUDIO_DEVICE_CONNECTED);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] [PhoneAudioManagerSetDeviceConnState] \
- IN_BLUETOOTH_SCO failed! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] sco in ret:%d", ret);
MUTEX_Unlock(g_audioMutex);
return;
} else {
// 配置媒体连接SCO设配状态(上行),只有在SCO连接后才能设置
ret = PhoneAudioManagerSetDeviceConnState(OUT_BLUETOOTH_SCO, AUDIO_DEVICE_CONNECTED);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] [PhoneAudioManagerSetDeviceConnState] \
- OUT_BLUETOOTH_SCO failed! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] sco out ret:%d", ret);
MUTEX_Unlock(g_audioMutex);
return;
} else {
g_audioState = AUDIO_STREAM_INIT;
}
}
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] end g_audioState: %d, g_hdlUpSco: %d, g_hdlDnSco: %d",
- g_audioState, g_hdlUpSco, g_hdlDnSco);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] end audioState:%d, hdlUpSco:%d, hdlDnSco:%d",
+ g_audioState, g_hdlUpSco, g_hdlDnSco);
MUTEX_Unlock(g_audioMutex);
return;
int ret = OHOS_SUCCESS;
uint32 micShmId = 0;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] start g_scoFlag: %d, g_audioState: %d", g_scoFlag, g_audioState);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] start scoFlag:%d, audioState:%d", g_scoFlag, g_audioState);
if (g_scoFlag != HFP_SCO_STATE_CONNECTED || g_audioState < AUDIO_STREAM_INIT) {
return;
g_hdlUpMic = PhoneAudioStreamInInit(AUDIO_UP_LINK);
}
- if (g_audioState < AUDIO_STREAM_START_SCO) {
+ if (g_audioState < AUDIO_STREAM_START_SCO) {
ret = PhoneAudioStreamInStart(g_hdlDnSco);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] [AudioStreamInStart] [dn_sco] error! ret: %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] dn_sco ret:%d", ret);
}
ret |= PhoneAudioStreamOutStart(g_hdlUpSco);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] [AudioStreamOutStart] [up_sco] error ret: %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] up_sco ret:%d", ret);
}
if (ret == OHOS_SUCCESS) {
g_audioState = AUDIO_STREAM_START_SCO;
ret |= PhoneAudioStreamInStart(g_hdlUpMic);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] [PhoneAudioStreamInStart] [up_mic] error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] up_mic ret:%d", ret);
}
ret |= PhoneAudioStreamInGetChannelId(g_hdlUpMic, &micShmId);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] [AudioStreamInGetChannelId] [up_mic] error ret: %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] up_mic shm ret:%d", ret);
}
ret |= PhoneAudioStreamOutAttachFrontend(g_hdlUpSco, micShmId);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] [AudioStreamOutAttachFrontend] [up_sco] error ret:%d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] up_sco attach ret:%d", ret);
}
if (ret == OHOS_SUCCESS) {
g_audioState = AUDIO_STREAM_START_UP;
}
}
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] end g_audioState:%d, g_hdlUpMic:%d, g_hdlUpSco:%d, micShmId:0x%x",
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] end audioState:%d, hdlUpMic:%d, hdlUpSco:%d, micShmId:0x%x",
g_audioState, g_hdlUpMic, g_hdlUpSco, micShmId);
MUTEX_Unlock(g_audioMutex);
return;
int ret = OHOS_SUCCESS;
uint32 spkShmId = 0;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] start g_scoFlag: %d, g_audioState: %d", g_scoFlag, g_audioState);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] start scoFlag:%d, audioState:%d", g_scoFlag, g_audioState);
if (g_scoFlag != HFP_SCO_STATE_CONNECTED || g_audioState < AUDIO_STREAM_INIT) {
return;
if (g_audioState < AUDIO_STREAM_START_SCO) {
ret = PhoneAudioStreamOutStart(g_hdlUpSco);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] [AudioStreamOutStart] [up_sco] error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] up_sco ret:%d", ret);
}
ret |= PhoneAudioStreamInStart(g_hdlDnSco);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] [AudioStreamInStart] [dn_sco] error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] dn_sco ret:%d", ret);
}
if (ret == OHOS_SUCCESS) {
ret |= PhoneAudioStreamOutStart(g_hdlDnSpk);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] [PhoneAudioStreamOutStart] [dn_spk] error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] dn_spk ret:%d", ret);
}
ret |= PhoneAudioStreamOutGetChannelId(g_hdlDnSpk, &spkShmId);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] [AudioStreamOutGetChannelId] [dn_spk] error ret: %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] dn_spk shm ret:%d", ret);
}
ret |= PhoneAudioStreamInAttachBackend(g_hdlDnSco, spkShmId);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] [AudioStreamInAttachBackend] [dn_sco] error ret: %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] dn_sco attach ret:%d", ret);
}
if (ret == OHOS_SUCCESS) {
g_audioState = AUDIO_STREAM_START_DN;
}
}
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] end g_audioState:%d, g_hdlDnSpk:%d, g_hdlDnSco:%d, spkShmId: 0x%x",
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] end audioState:%d, hdlDnSpk:%d, hdlDnSco:%d, spkShmId:0x%x",
g_audioState, g_hdlDnSpk, g_hdlDnSco, spkShmId);
MUTEX_Unlock(g_audioMutex);
// 蓝牙通话下行
static void AudioDn(void)
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDn] start g_audioState: %d", g_audioState);
-
// 申请蓝牙通话音频焦点
AudioActInterrupt(AUDIO_STREAM_VOICE_CALL_BT_SCO);
AudioDnStart();
if (g_audioState == AUDIO_STREAM_START_DN) {
// 同步音量
- PostGraphicEvent(SyncVolume);
+ SyncVolume();
}
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDn] end g_audioState: %d", g_audioState);
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[AudioDn] audioState:%d", g_audioState);
}
// 蓝牙通话上行
static void AudioUp(void)
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioUp] start g_audioState: %d", g_audioState);
-
// 申请蓝牙通话音频焦点
AudioActInterrupt(AUDIO_STREAM_VOICE_CALL_BT_SCO);
// 建立音频上行通路
AudioUpStart();
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioUp] end g_audioState: %d", g_audioState);
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[AudioUp] audioState:%d", g_audioState);
+}
+
+static void AudioSetup(void)
+{
+ if (g_audioState < AUDIO_STREAM_START_DN) {
+ AudioDn();
+ }
+ if (g_audioState != AUDIO_STREAM_START_UP) {
+ AudioUp();
+ }
}
static void AudioUpRelease(void)
if (g_hdlUpSco != INVALID_PHONE_SERVICE_VALUE) {
ret = PhoneAudioStreamOutStop(g_hdlUpSco);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [OutStop] g_hdlUpSco error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [OutStop] hdlUpSco ret:%d", ret);
}
ret = PhoneAudioStreamOutDeinit(g_hdlUpSco);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [OutDeinit] g_hdlUpSco error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [OutDeinit] hdlUpSco ret:%d", ret);
}
}
if (g_hdlUpMic != INVALID_PHONE_SERVICE_VALUE) {
ret = PhoneAudioStreamInStop(g_hdlUpMic);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] [InStop] g_hdlUpMic error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] [InStop] hdlUpMic ret:%d", ret);
}
ret = PhoneAudioStreamInDeinit(g_hdlUpMic);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] [InDeinit] g_hdlUpMic error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] [InDeinit] hdlUpMic ret:%d", ret);
}
}
if (g_audioState >= AUDIO_CONN_OUT_BT_SCO) {
ret = PhoneAudioManagerSetDeviceConnState(OUT_BLUETOOTH_SCO, AUDIO_DEVICE_DISCONNECTED);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] OUT_BLUETOOTH_SCO error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] sco out ret:%d", ret);
}
}
g_hdlUpSco = INVALID_PHONE_SERVICE_VALUE;
g_hdlUpMic = INVALID_PHONE_SERVICE_VALUE;
-
}
static void AudioDnRelease(void)
if (g_hdlDnSco != INVALID_PHONE_SERVICE_VALUE) {
ret = PhoneAudioStreamInStop(g_hdlDnSco);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [InStop] g_hdlDnSco error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [InStop] hdlDnSco ret:%d", ret);
}
ret = PhoneAudioStreamInDeinit(g_hdlDnSco);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [InDeinit] g_hdlDnSco error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [InDeinit] hdlDnSco ret:%d", ret);
}
}
if (g_hdlDnSpk != INVALID_PHONE_SERVICE_VALUE) {
ret = PhoneAudioStreamOutStop(g_hdlDnSpk);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] [OutStop] g_hdlDnSpk error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] [OutStop] hdlDnSpk ret:%d", ret);
}
ret = PhoneAudioStreamOutDeinit(g_hdlDnSpk);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] [OutDeinit] g_hdlDnSpk error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] [OutDeinit] hdlDnSpk ret:%d", ret);
}
}
if (g_audioState >= AUDIO_CONN_IN_BT_SCO) {
ret = PhoneAudioManagerSetDeviceConnState(IN_BLUETOOTH_SCO, AUDIO_DEVICE_DISCONNECTED);
if (ret != OHOS_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] IN_BLUETOOTH_SCO error! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] sco in ret:%d", ret);
}
}
AudioDeactInterrupt(AUDIO_STREAM_RING); // 适配某些机型不触发SCO
g_audioState = AUDIO_UNKNOW;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioRelease] end g_audioState: %d,", g_audioState);
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[AudioRelease] audioState:%d,", g_audioState);
MUTEX_Unlock(g_audioMutex);
}
PhoneServiceErrorCallback(ERROR_BT, PROFILE_STATE_DISCONNECTED);
CallListInit();
- // 释放媒体资源
- PostGraphicEvent(AudioRelease);
-
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BtDisconnectedPro callState: %d", g_currCallState);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BtDisconnectedPro callState:%d", g_currCallState);
if (g_currCallState == HFP_HF_CALL_STATE_INCOMING) {
/* 处理呼入阶段,取消手表配对 */
hfp_hf_calls_info_t call = {0};
// 蓝牙状态连接
static void ConnStateChanged(const bd_addr_t *bdAddr, profile_connect_state_t state)
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ConnStateChanged] state = 0x%X bdAddr: ", state);
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[ConnStateChanged] state = 0x%X bdAddr: ", state);
CatBdAddr(bdAddr);
- if (state == PROFILE_STATE_CONNECTED) {
- SendMsgToUIService(BT_CONNECTED_TO_UI, 0, NULL, 0);
- } else if (state == PROFILE_STATE_DISCONNECTED) {
- SendMsgToUIService(BT_DISCONNECTED_TO_UI, 0, NULL, 0);
- }
-
switch (state) {
case PROFILE_STATE_CONNECTING: // 蓝牙正在连接
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ConnStateChanged] BT connecting");
case PROFILE_STATE_CONNECTED: // 蓝牙连接成功
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ConnStateChanged] BT connected");
BtConnectedPro(bdAddr);
+ SendMsgToUIService(BT_CONNECTED_TO_UI, 0, nullptr, 0);
break;
case PROFILE_STATE_DISCONNECTING: // 蓝牙连接断连
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ConnStateChanged] BT disconnecting");
case PROFILE_STATE_DISCONNECTED: // 蓝牙断开连接
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ConnStateChanged] BT disconnected");
BtDisconnectedPro();
+ SendMsgToUIService(BT_DISCONNECTED_TO_UI, 0, nullptr, 0);
break;
default:
break;
// SCO连接处理
static void ScoConnectPro(void)
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ScoConnectPro] g_currCallNum = %d, g_scoFlag = %d", g_currCallNum, g_scoFlag);
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[ScoConnectPro] CallNum:%d, ScoFlag:%d", g_currCallNum, g_scoFlag);
// 通知sco建立连接(或通话转移:手机 -> 手表)
ScoStatusCb(HFP_SCO_STATE_CONNECTED);
if (g_currCallState == HFP_HF_CALL_STATE_ACTIVE && g_scoFlag == HFP_SCO_STATE_CONNECTED) {
hfp_hf_calls_info_t call = {0};
HfpIncomingEventPublish(TOPIC_EVENT_HFP_PHONE_TO_WATCH, call);
}
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ScoConnectPro] g_audioState: %d ", g_audioState);
-
- if (g_audioState < AUDIO_STREAM_START_DN) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ScoConnectPro] post AudioDn");
- PostGraphicEvent(AudioDn);
- }
-
- if (g_audioState != AUDIO_STREAM_START_UP) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ScoConnectPro] post AudioUp");
- PostGraphicEvent(AudioUp);
- }
-
+
+ PostGraphicEvent(AudioSetup);
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[ScoConnectPro] audioState:%d", g_audioState);
}
// SCO断连处理
static void ScoDisconnectPro(void)
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ScoDisconnectPro] start g_currCallState = %d", g_currCallState);
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[ScoDisconnectPro] start CallState:%d", g_currCallState);
ScoStatusCb(HFP_SCO_STATE_DISCONNECTED);
if (g_currCallState == HFP_HF_CALL_STATE_ACTIVE && g_scoFlag == HFP_SCO_STATE_DISCONNECTED) {
static void ScoStateChanged(const bd_addr_t *bdAddr, hfp_sco_connect_state_t state)
{
g_scoFlag = state;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ScoStateChanged] state = %d, g_scoFlag = %d, g_currCallNum = %d", state,
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[ScoStateChanged] hfpState:%d, ScoFlag:%d, CallNum:%d", state,
g_scoFlag, g_currCallNum);
switch (state) {
static void CallLogCreatDir(void)
{
- DIR *dir = NULL;
+ DIR *dir = nullptr;
dir = opendir(CALL_LOG_DIR);
- if (dir == NULL) {
+ if (dir == nullptr) {
mkdir(CALL_LOG_DIR, S_IREAD | S_IWRITE);
} else {
closedir(dir);
{
int len = 0;
FILE *fp = fopen(CALL_LOG_PATH, "rb");
- if (fp == NULL) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[GetCallLogFileSize] fopen CALL_LOG_PATH error");
+ if (fp == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[GetCallLogFileSize] fopen %s failed", CALL_LOG_PATH);
return OHOS_FAILURE;
}
fseek(fp, 0, SEEK_SET);
fclose(fp);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[GetCallLogFileSize] len = %d", len);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[GetCallLogFileSize] len:%d", len);
return len;
}
// 添加通话进通话记录文件
static void AddToCallLog(CallLogInfo *info)
{
- FILE *fp = NULL;
+ FILE *fp = nullptr;
size_t ret;
fp = fopen(CALL_LOG_PATH, "ab");
- if (fp == NULL) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLog] fopen failed!");
+ if (fp == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLog] fopen %s failed!", CALL_LOG_PATH);
return;
}
ret = fwrite(info, sizeof(CallLogInfo), 1, fp);
if (ret != 1) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLog] fwrite failed! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLog] fwrite failed! ret:%d", ret);
}
fclose(fp);
static int CopyPhoneLogToTmpLog(void)
{
- FILE *fp = NULL;
- FILE *ftp = NULL;
- CallLogInfo *info = NULL;
+ FILE *fp = nullptr;
+ FILE *ftp = nullptr;
+ CallLogInfo *info = nullptr;
int retLen;
int fileSize = GetCallLogFileSize();
-
if (fileSize == OHOS_FAILURE || fileSize == 0) {
return fileSize;
}
return ClearCallLogFile(); // 只有一条记录,清空通话记录
}
- fp = fopen(CALL_LOG_PATH,"rb");
- if (fp == NULL) {
+ fp = fopen(CALL_LOG_PATH, "rb");
+ if (fp == nullptr) {
return OHOS_FAILURE;
}
ftp = fopen(CALL_TMP_LOG_PATH, "wb+");
- if (ftp == NULL) {
+ if (ftp == nullptr) {
fclose(fp);
return OHOS_FAILURE;
}
info = (CallLogInfo *)malloc(fileSize);
- if (info == NULL) {
+ if (info == nullptr) {
fclose(fp);
fclose(ftp);
return OHOS_FAILURE;
}
(void)memset_s(info, fileSize, 0, fileSize);
- if(fread(info, fileSize, 1, fp) != 1) {
+ if (fread(info, fileSize, 1, fp) != 1) {
retLen = OHOS_FAILURE;
goto END;
}
- if(fwrite((info + 1), retLen, 1, ftp) != 1) {
+ if (fwrite((info + 1), retLen, 1, ftp) != 1) {
retLen = OHOS_FAILURE;
goto END;
}
fclose(fp);
fclose(ftp);
free(info);
- info = NULL;
+ info = nullptr;
return retLen;
}
// 删除第一条通话记录
int RemoveFirstCallLog(void)
{
- FILE *fp = NULL;
- FILE *ftp = NULL;
- CallLogInfo *info = NULL;
+ FILE *fp = nullptr;
+ FILE *ftp = nullptr;
+ CallLogInfo *info = nullptr;
int ret = OHOS_SUCCESS;
int fileSize = CopyPhoneLogToTmpLog();
return fileSize;
}
- fp = fopen(CALL_LOG_PATH,"wb+");
- if (fp == NULL) {
+ fp = fopen(CALL_LOG_PATH, "wb+");
+ if (fp == nullptr) {
return OHOS_FAILURE;
}
ftp = fopen(CALL_TMP_LOG_PATH, "rb");
- if (ftp == NULL) {
+ if (ftp == nullptr) {
fclose(fp);
return OHOS_FAILURE;
}
info = (CallLogInfo *)malloc(fileSize);
- if (info == NULL) {
+ if (info == nullptr) {
fclose(fp);
fclose(ftp);
return OHOS_FAILURE;
}
(void)memset_s(info, fileSize, 0, fileSize);
- if(fread(info, fileSize, 1, ftp) != 1) {
+ if (fread(info, fileSize, 1, ftp) != 1) {
ret = OHOS_FAILURE;
goto END;
}
- if(fwrite(info, fileSize, 1, fp) != 1) {
+ if (fwrite(info, fileSize, 1, fp) != 1) {
ret = OHOS_FAILURE;
goto END;
}
fclose(fp);
fclose(ftp);
free(info);
- info = NULL;
+ info = nullptr;
return ret;
}
// 添加通话记录
static void AddToCallLogPro(PhoneCallInfo *callInfo)
{
- int ret, num, fileSize;
- CallLogInfo info;
-
- if (callInfo == NULL) {
+ if (callInfo == nullptr) {
return;
}
- fileSize = GetCallLogFileSize();
- num = fileSize / sizeof(CallLogInfo);
+ int fileSize = GetCallLogFileSize();
+ int num = fileSize / sizeof(CallLogInfo);
if (num >= CALL_LOG_MAX_NUM) {
- ret = RemoveFirstCallLog();
+ int ret = RemoveFirstCallLog();
if (ret == OHOS_FAILURE) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLogPro] RemoveFirstCallLog error");
return;
}
}
+ CallLogInfo info;
(void)memset_s(info.name, NAME_SIZE, '\0', NAME_SIZE);
(void)memset_s(info.tel, MAX_PHONE_NUM, '\0', MAX_PHONE_NUM);
- ret = memcpy_s(info.name, NAME_SIZE, callInfo->name, callInfo->nameLen);
+ int ret = memcpy_s(info.name, NAME_SIZE, callInfo->name, callInfo->nameLen);
if (ret != EOK) {
info.nameLen = 0;
} else {
info.creationTime = callInfo->creationTime;
if (callInfo->lastStatus == HFP_HF_CALL_STATE_ACTIVE || callInfo->lastStatus == HFP_HF_CALL_STATE_HELD ||
callInfo->lastStatus == HFP_HF_CALL_STATE_RESPONSE_HELD) {
- info.callDurTime = time(NULL) - callInfo->activeTime;
+ info.callDurTime = time(nullptr) - callInfo->activeTime;
} else {
info.callDurTime = 0;
}
// 获取通话记录
int GetCallLog(CallLogInfo **info, int *num)
{
- FILE *fp = NULL;
- int ret, fileSize, number;
- CallLogInfo *callInfo = NULL;
-
- fp = fopen(CALL_LOG_PATH, "rb");
- if (fp == NULL) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLog] fopen CALL_LOG_PATH failed!");
+ FILE *fp = fopen(CALL_LOG_PATH, "rb");
+ if (fp == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLog] fopen %s failed!", CALL_LOG_PATH);
return OHOS_FAILURE;
}
- fileSize = GetCallLogFileSize();
+ int fileSize = GetCallLogFileSize();
if (fileSize == 0) {
- *info = NULL;
+ *info = nullptr;
*num = 0;
fclose(fp);
return OHOS_SUCCESS;
}
- number = fileSize / sizeof(CallLogInfo);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[GetCallLog] fileSize = %d, number = %d", fileSize, number);
- callInfo = (CallLogInfo *)malloc(fileSize);
- if (callInfo == NULL) {
+ int number = fileSize / sizeof(CallLogInfo);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[GetCallLog] fileSize:%d, number:%d", fileSize, number);
+ CallLogInfo *callInfo = (CallLogInfo *)malloc(fileSize);
+ if (callInfo == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[GetCallLog] malloc callInfo fail!");
- *info = NULL;
+ *info = nullptr;
*num = 0;
fclose(fp);
return OHOS_FAILURE;
}
(void)memset_s(callInfo, fileSize, 0, fileSize);
- ret = fread(callInfo, sizeof(CallLogInfo), number, fp);
+ int ret = fread(callInfo, sizeof(CallLogInfo), number, fp);
if (ret != number) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[GetCallLog] fread fp fail ret = %d", ret);
- *info = NULL;
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[GetCallLog] fread fp fail ret:%d", ret);
+ *info = nullptr;
*num = 0;
fclose(fp);
return OHOS_FAILURE;
int ClearCallLogFile(void)
{
FILE *fp = fopen(CALL_LOG_PATH, "wb");
- if (fp == NULL) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[ClearCallLogFile] fopen CALL_LOG_PATH failed!");
+ if (fp == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[ClearCallLogFile] fopen %s failed!", CALL_LOG_PATH);
return OHOS_FAILURE;
}
static PhoneCallInfo *FindCallInfoInCallList(const unsigned char *number, unsigned char numberLen)
{
int i;
- const char *str1 = NULL;
- const char *str2 = NULL;
+ const char *str1 = nullptr;
+ const char *str2 = nullptr;
if (g_currCallNum == 0) {
- return NULL;
+ return nullptr;
}
for (i = 0; i < MULTI_CALL_MAX_NUME; i++) {
}
}
- return NULL;
+ return nullptr;
}
static void CatPhoneNumber(char *number, unsigned char len)
static void AddCurrCallToCallList(const hfp_hf_calls_info_t *call)
{
- PhoneCallInfo *phoneCall = NULL;
- int tmp, ret;
-
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AddCurrCallToCallList] start, call->state = %d", call->state);
- if (call == NULL || g_currCallNum >= MULTI_CALL_MAX_NUME ||
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AddCurrCallToCallList] state:%d", call->state);
+ if (call == nullptr || g_currCallNum >= MULTI_CALL_MAX_NUME ||
(call->state != HFP_HF_CALL_STATE_ACTIVE && call->state != HFP_HF_CALL_STATE_HELD &&
call->state != HFP_HF_CALL_STATE_ALERTING)) {
return;
}
g_currCallNum++;
- tmp = g_currCallNum - 1;
- phoneCall = &g_callList[tmp];
+ int32_t tmp = g_currCallNum - 1;
+ PhoneCallInfo *phoneCall = &g_callList[tmp];
if (call->state == HFP_HF_CALL_STATE_ACTIVE) { // 正在通话
phoneCall->operate = OPERATE_PHONE_ACTIVE;
- phoneCall->activeTime = time(NULL);
+ phoneCall->activeTime = time(nullptr);
} else if (call->state == HFP_HF_CALL_STATE_HELD) { // 挂起
phoneCall->operate = OPERATE_PHONE_HOLD;
- phoneCall->activeTime = time(NULL);
+ phoneCall->activeTime = time(nullptr);
} else if (call->state == HFP_HF_CALL_STATE_ALERTING) { // 呼出,对方响铃
phoneCall->operate = OPERATE_ALERTING;
}
// 使用通讯录接口获取当前电话对应的备注人名(通讯录待开发)
phoneCall->lastStatus = call->state;
- phoneCall->creationTime = time(NULL);
+ phoneCall->creationTime = time(nullptr);
- ret = memcpy_s(phoneCall->tel, MAX_PHONE_NUM, call->number, call->number_len);
+ int32_t ret = memcpy_s(phoneCall->tel, MAX_PHONE_NUM, call->number, call->number_len);
if (ret != EOK) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddCurrCallToCallList] memcpy_s tel fail, ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddCurrCallToCallList] copy tel ret:%d", ret);
CatPhoneNumber(call->number, call->number_len);
}
phoneCall->telLen = call->number_len;
// 通话状态变化--呼出,正在拨号处理
static void CallChangeDialPro(const hfp_hf_calls_info_t *call)
{
- PhoneCallInfo *phoneCall = NULL;
- int tmp, ret;
-
- if (call == NULL) {
+ if (call == nullptr) {
return;
}
- g_currCallNum++;
- tmp = g_currCallNum - 1;
- phoneCall = &g_callList[tmp];
+ g_currCallNum++;
+ int32_t tmp = g_currCallNum - 1;
+ PhoneCallInfo *phoneCall = &g_callList[tmp];
// 使用通讯录接口获取当前电话对应的备注人名(通讯录待开发)
phoneCall->operate = OPERATE_DIALING;
phoneCall->lastStatus = call->state;
- phoneCall->creationTime = time(NULL);
+ phoneCall->creationTime = time(nullptr);
- ret = memcpy_s(phoneCall->tel, MAX_PHONE_NUM, call->number, call->number_len);
+ int32_t ret = memcpy_s(phoneCall->tel, MAX_PHONE_NUM, call->number, call->number_len);
if (ret != EOK) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CallChangeDialPro] memcpy_s tel fail, ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CallChangeDialPro] copy tel ret:%d", ret);
CatPhoneNumber(call->number, call->number_len);
}
phoneCall->telLen = call->number_len;
// 通话状态变化--呼出,对方响铃
static void CallChangeAlertPro(const hfp_hf_calls_info_t *call)
{
- PhoneCallInfo *phoneCall = NULL;
+ PhoneCallInfo *phoneCall = nullptr;
- if (call == NULL) {
+ if (call == nullptr) {
return;
}
phoneCall = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
- if (phoneCall == NULL) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeAlertPro] FindCallInfoInCallList Alert no this call");
+ if (phoneCall == nullptr) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeAlertPro] Alert no this call");
AddCurrCallToCallList(call);
return;
}
{
int32 ret;
uint32 size = sizeof(hfp_hf_calls_info_t);
- Request *request = NULL;
- BroadcastApi *broadcastApi = NULL;
- IUnknown *api = NULL;
+ Request *request = nullptr;
+ BroadcastApi *broadcastApi = nullptr;
+ IUnknown *api = nullptr;
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "HfpIncomingEventPublish topic=%u!!", topic);
/* alloc request */
request = SAMGR_AllocRequestMsg(0, PLATFORM_CORE, BROADCAST_SVR_ID, size);
- if (request == NULL) {
+ if (request == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SAMGR_AllocRequestMsg failed");
return;
}
request->msgId = topic;
ret = memcpy_s(request->data, size, (const void *)&callsInfo, size);
if (ret != EOK) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HfpIncomingEventPublish memcpy_s rateDataTmp fail! ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HfpIncomingEventPublish memcpy_s rateDataTmp fail! ret:%d", ret);
return;
}
request->len = size;
/* public request */
api = SAMGR_GetInstance()->GetFeatureApi(BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);
- if (api == NULL) {
+ if (api == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetFeatureApi failed");
SAMGR_FreeRequestMsg(request);
return;
}
ret = api->QueryInterface(api, DEFAULT_VERSION, (void **)&broadcastApi);
- if (ret != 0 || broadcastApi == NULL) {
+ if (ret != 0 || broadcastApi == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "QueryInterface failed");
SAMGR_FreeRequestMsg(request);
return;
// 通话状态变化--呼入处理
static void CallChangeIncomePro(const hfp_hf_calls_info_t *call)
{
- PhoneCallInfo *phoneCall = NULL;
- int tmp, ret;
-
- if (call == NULL || g_currCallNum >= MULTI_CALL_MAX_NUME ||
+ if (call == nullptr || g_currCallNum >= MULTI_CALL_MAX_NUME ||
(call->state != HFP_HF_CALL_STATE_INCOMING && call->state != HFP_HF_CALL_STATE_WAITING)) {
return;
}
- phoneCall = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
- if (phoneCall != NULL) {
+ PhoneCallInfo *phoneCall = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
+ if (phoneCall != nullptr) {
// 通话状态由呼入等待转换成呼入情况
} else {
g_currCallNum++;
- tmp = g_currCallNum - 1;
+ int32_t tmp = g_currCallNum - 1;
phoneCall = &g_callList[tmp];
}
phoneCall->operate = OPERATE_WAITING;
}
phoneCall->lastStatus = call->state;
- phoneCall->creationTime = time(NULL);
+ phoneCall->creationTime = time(nullptr);
- ret = memcpy_s(phoneCall->tel, MAX_PHONE_NUM, call->number, call->number_len);
+ int32_t ret = memcpy_s(phoneCall->tel, MAX_PHONE_NUM, call->number, call->number_len);
if (ret != EOK) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CallChangeIncomePro] memcpy_s tel fail, ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CallChangeIncomePro] copy tel ret:%d", ret);
CatPhoneNumber(call->number, call->number_len);
}
phoneCall->telLen = call->number_len;
// 通话状态变化--接听流程处理
static void CallChangeActivePro(const hfp_hf_calls_info_t *call)
{
- PhoneCallInfo *phoneCall = NULL;
+ PhoneCallInfo *phoneCall = nullptr;
- if (call == NULL) {
+ if (call == nullptr) {
return;
}
phoneCall = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
- if (phoneCall == NULL) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeActivePro] FindCallInfoInCallList Active no this call");
+ if (phoneCall == nullptr) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeActivePro] Active no this call");
AddCurrCallToCallList(call);
return;
}
- if (phoneCall->lastStatus == HFP_HF_CALL_STATE_HELD && IsCompleteCallFlow() == true) { // 挂起状态切换到接听状态
+ if (phoneCall->lastStatus == HFP_HF_CALL_STATE_HELD && IsCompleteCallFlow()) { // 挂起状态切换到接听状态
phoneCall->operate = OPERATE_WATCH_ACTIVE;
- } else if (phoneCall->lastStatus == HFP_HF_CALL_STATE_HELD && IsCompleteCallFlow() == false) {
+ } else if (phoneCall->lastStatus == HFP_HF_CALL_STATE_HELD && (!IsCompleteCallFlow())) {
phoneCall->operate = OPERATE_PHONE_ACTIVE;
} else if (phoneCall->operate == OPERATE_WATCH_ACTIVE) { // 手表接听
// 不做操作
if (phoneCall->activeTime == 0 &&
(phoneCall->lastStatus == HFP_HF_CALL_STATE_DIALING || phoneCall->lastStatus == HFP_HF_CALL_STATE_ALERTING ||
phoneCall->lastStatus == HFP_HF_CALL_STATE_INCOMING || phoneCall->lastStatus == HFP_HF_CALL_STATE_WAITING)) {
- phoneCall->activeTime = time(NULL);
+ phoneCall->activeTime = time(nullptr);
}
phoneCall->lastStatus = call->state;
if (phoneCall->operate == OPERATE_PHONE_ACTIVE) {
// 发布电话接听事件,手表关闭来电通知
HfpIncomingEventPublish(TOPIC_EVENT_HFP_PHONE_ACTIVE, phoneCall->unitCalls);
- } else if (phoneCall->operate == OPERATE_WATCH_ACTIVE) {
+ } else if (phoneCall->operate == OPERATE_WATCH_ACTIVE && g_scoFlag == HFP_SCO_STATE_CONNECTED) {
// 发布手表接听事件,通知切换接听界面
HfpIncomingEventPublish(TOPIC_EVENT_HFP_WATCH_ACTIVE, phoneCall->unitCalls);
}
// 通话状态变化--拒接/结束流程处理
static void CallChangeFinishPro(const hfp_hf_calls_info_t *call)
{
- PhoneCallInfo *phoneCall = NULL;
+ PhoneCallInfo *phoneCall = nullptr;
PhoneCallInfo tmp;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] start g_scoFlag = %d, g_currCallNum = %d",
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] start scoFlag:%d, CallNum:%d",
g_scoFlag, g_currCallNum);
- if (call == NULL || g_currCallNum == 0) {
+ if (call == nullptr || g_currCallNum == 0) {
return;
}
phoneCall = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
- if (phoneCall == NULL) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] FindCallInfoInCallList Finish no this call");
+ if (phoneCall == nullptr) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] Finish no this call");
return;
}
if (g_finishOperate == OPERATE_WATCH_FINISH) {
// 通知手表通话结束
CallChangedCb(&tmp);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] end g_scoFlag = %d, g_currCallNum = %d",
- g_scoFlag, g_currCallNum);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] end scoFlag:%d, CallNum:%d",
+ g_scoFlag, g_currCallNum);
}
// 通话状态变化--挂起通话(当前只有手机挂起触发(并且手表不需感知),手表不支持挂起触发,对方挂起不感知)
static void CallChangeHeldPro(const hfp_hf_calls_info_t *call)
{
- PhoneCallInfo *phoneCall = NULL;
+ PhoneCallInfo *phoneCall = nullptr;
- if (call == NULL) {
+ if (call == nullptr) {
return;
}
phoneCall = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
- if (phoneCall == NULL) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeHeldPro] FindCallInfoInCallList Held no this call");
+ if (phoneCall == nullptr) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeHeldPro] Held no this call");
AddCurrCallToCallList(call);
return;
}
// 手机挂起通话
phoneCall->operate = OPERATE_PHONE_HOLD;
if (phoneCall->lastStatus == HFP_HF_CALL_STATE_INCOMING || phoneCall->lastStatus == HFP_HF_CALL_STATE_WAITING) {
- phoneCall->activeTime = time(NULL);
+ phoneCall->activeTime = time(nullptr);
}
phoneCall->lastStatus = call->state;
(void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
static void PlayWatchRing(void)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PlayWatchRing] start");
- // 申请手表铃声焦点
- // AudioActInterrupt(AUDIO_STREAM_RING);
- // 播放手表铃声(播放方案待定)
}
static void CallAudioHandle(const hfp_hf_calls_info_t *call)
{
int state = call->state;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallAudioHandle] start g_audioState: %d", g_audioState);
-
if (state == HFP_HF_CALL_STATE_INCOMING || state == HFP_HF_CALL_STATE_DIALING ||
state == HFP_HF_CALL_STATE_ALERTING) { // 电话呼入,支持播放手机铃声
- if (call->in_band_ring == true) {
+ if (call->in_band_ring) {
// 播放手机端铃声
PostGraphicEvent(AudioDn);
} else {
} else if (state == HFP_HF_CALL_STATE_FINISHED) {
return;
} else if (g_scoFlag == HFP_SCO_STATE_CONNECTED) {
- if (g_audioState < AUDIO_STREAM_START_DN) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallAudioHandle] post AudioDn");
- PostGraphicEvent(AudioDn);
- }
- if (g_audioState != AUDIO_STREAM_START_UP) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallAudioHandle] post AudioUp");
- PostGraphicEvent(AudioUp);
- }
+ PostGraphicEvent(AudioSetup);
}
-
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallAudioHandle] end g_audioState: %d", g_audioState);
}
static void CatCallStateChangedInfo(const bd_addr_t *bdAddr, const hfp_hf_calls_info_t *call)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "***************************CallStateChanged***************************");
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "g_scoFlag = %d, g_currCallNum = %d, bdAddr: ", g_scoFlag, g_currCallNum);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "scoFlag:%d, CallNum:%d, bdAddr: ", g_scoFlag, g_currCallNum);
CatBdAddr(bdAddr);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "id = %d, state = %d", call->id, call->state);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "id:%d, state:%d", call->id, call->state);
CatPhoneNumber(call->number, call->number_len);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "multi_party = %d, outgoing = %d, in_band_ring = %d, creation_time = %ld",
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "multi_party:%d, outgoing:%d, in_band_ring:%d, creation_time:%ld",
call->multi_party, call->outgoing, call->in_band_ring, call->creation_time);
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "***********************************************************************");
}
static void CallStateChanged(const bd_addr_t *bdAddr, const hfp_hf_calls_info_t *call)
{
CopyBdAddr(bdAddr);
- if (call == NULL || g_btConnState != PROFILE_STATE_CONNECTED) {
+ if (call == nullptr || g_btConnState != PROFILE_STATE_CONNECTED) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "call is null or BT disconnected connStatus: 0x%X", g_btConnState);
return;
}
CatCallStateChangedInfo(bdAddr, call);
CallAudioHandle(call);
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "CallStateChanged state = %d", call->state);
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "CallStateChanged state:%d", call->state);
switch (call->state) {
case HFP_HF_CALL_STATE_ACTIVE: // 正在通话
CallChangeActivePro(call);
}
if (g_currCallNum == 0) {
- PostGraphicEvent(AudioRelease);
g_completeCallFlag = false;
}
}
-static int g_hfpVolumeType;
-static unsigned char g_hfpVolume;
-
-static void BtHfpVolumeChanged(void)
+static void BtHfpVolumeChanged(int volumeType, unsigned char hfpVolume)
{
- int maxVolume, minVolume, tmp;
- bool ret;
-
// mic
- if (g_hfpVolumeType == HFP_VOLUME_MIC) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[BtHfpVolumeChanged] g_hfpVolumeType = %d, g_hfpVolume = %d ",
- g_hfpVolumeType, g_hfpVolume);
+ if (volumeType == HFP_VOLUME_MIC) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VolumeChanged Type:%d, hfpVolume:%d",
+ volumeType, hfpVolume);
}
// speak
- if (g_hfpVolumeType == HFP_VOLUME_SPEAKER) {
- minVolume = PhoneAudioGetMinVolume();
- maxVolume = PhoneAudioGetMaxVolume();
- tmp = g_hfpVolume * (maxVolume - minVolume) / CALL_VOLUME_MAX; // 转换
-
- ret = PhoneAudioSetVolume(tmp);
- if (ret != true) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[BtHfpVolumeChanged] g_hfpVolumeType: %d, ret: %d", g_hfpVolumeType, ret);
+ if (volumeType == HFP_VOLUME_SPEAKER) {
+ int32_t minVolume = PhoneAudioGetMinVolume();
+ int32_t maxVolume = PhoneAudioGetMaxVolume();
+ int32_t volume = hfpVolume * (maxVolume - minVolume) / CALL_VOLUME_MAX; // 转换
+ volume = (volume == 0) ? ((maxVolume - minVolume) / CALL_VOLUME_MAX) : volume;
+ bool ret = PhoneAudioSetVolume(volume);
+ if (!ret) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VolumeChanged Type:%d, ret:%d",
+ volumeType, ret);
}
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[BtHfpVolumeChanged] g_hfpVolumeType: %d, minVolume: %d, maxVolume: %d tmp: %d\
- ret: %d ", g_hfpVolumeType, minVolume, maxVolume, tmp, ret);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VolumeChanged Type:%d, min:%d, max:%d volume:%d ret:%d",
+ volumeType, minVolume, maxVolume, volume, ret);
}
}
static void VolumeChanged(const bd_addr_t *bdAddr, hfp_volume_type_t type, unsigned char volume)
{
UNUSED(bdAddr);
- g_hfpVolumeType = type;
- g_hfpVolume = volume;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VolumeChanged] type = %d volume = %d", type, volume);
- PostGraphicEvent(BtHfpVolumeChanged); // 解决SdkMsgThread爆栈问题
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VolumeChanged] type:%d volume:%d", type, volume);
+ GraphicService::GetInstance()->PostGraphicEvent(std::bind(BtHfpVolumeChanged, type, volume));
}
// 拨号失败回调
static void DialErrorCode(const bd_addr_t *bdAddr, int code)
{
UNUSED(bdAddr);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[DialErrorCode] code = %d", code);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[DialErrorCode] code:%d", code);
PhoneServiceErrorCallback(ERROR_DIAL, code);
}
{
UNUSED(bdAddr);
UNUSED(batteryLevel);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpBatteryChanged] batteryLevel: %d", batteryLevel);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpBatteryChanged] batteryLevel:%d", batteryLevel);
}
static void HfpSignalStrengthChanged(const bd_addr_t *bdAddr, int signalStrength)
{
UNUSED(bdAddr);
UNUSED(signalStrength);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpSignalStrengthChanged] signalStrength: %d", signalStrength);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpSignalStrengthChanged] signalStrength:%d", signalStrength);
}
static void HfpRegistStatusChanged(const bd_addr_t *bdAddr, int status)
{
UNUSED(bdAddr);
UNUSED(status);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpRegistStatusChanged] status: %d", status);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpRegistStatusChanged] status:%d", status);
}
static void HfpRoamingStatusChanged(const bd_addr_t *bdAddr, int status)
{
UNUSED(bdAddr);
UNUSED(status);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpRoamingStatusChanged] status: %d", status);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpRoamingStatusChanged] status:%d", status);
}
static void HfpOperatorSelection(const bd_addr_t *bdAddr, unsigned char *name, unsigned int len)
UNUSED(bdAddr);
UNUSED(name);
UNUSED(len);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpOperatorSelection] name: %s, len: %d", name, len);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpOperatorSelection] name: %s, len:%d", name, len);
}
static void HfpSubscriberNumber(const bd_addr_t *bdAddr, unsigned char *number, unsigned int len)
UNUSED(bdAddr);
UNUSED(number);
UNUSED(len);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpSubscriberNumber] number: %s, len: %d", number, len);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpSubscriberNumber] number: %s, len:%d", number, len);
}
static void VoiceRecogStatusChanged(const bd_addr_t *bdAddr, int status)
{
UNUSED(bdAddr);
UNUSED(status);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VoiceRecogStatusChanged] status: %d", status);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VoiceRecogStatusChanged] status:%d", status);
}
static void InbandRingtoneChanged(const bd_addr_t *bdAddr, int status)
{
UNUSED(bdAddr);
UNUSED(status);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[InbandRingtoneChanged] status: %d", status);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[InbandRingtoneChanged] status:%d", status);
}
static void CodecChanged(const bd_addr_t *bdAddr, int codec)
} else if (codec == HFP_HF_CODEC_ID_MSBC) {
g_call_codec = mSBC;
}
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CodecChanged] codec: %d, call_codec: %d", codec, g_call_codec);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CodecChanged] codec:%d, call_codec:%d", codec, g_call_codec);
}
ret = hfp_hf_register_callbacks(&callbacks);
if (ret != 0) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[RegisterHfpHfCallbacks] ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[RegisterHfpHfCallbacks] ret:%d", ret);
}
}
int DialCall(unsigned char *number, unsigned char len)
{
int ret;
- unsigned char *tel = NULL;
+ unsigned char *tel = nullptr;
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[DialCall] start");
if (g_btConnState != PROFILE_STATE_CONNECTED) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DialCall] BT connStatus: 0x%X", g_btConnState);
}
// 有通话时,不允许拨出电话
- if (g_currCallNum > 0 || len > MAX_PHONE_NUM || number == NULL) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DialCall] g_currCallNum = %d", g_currCallNum);
+ if (g_currCallNum > 0 || len > MAX_PHONE_NUM || number == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DialCall] g_currCallNum:%d", g_currCallNum);
return OHOS_FAILURE;
}
tel = (unsigned char *)malloc(len + 1);
- if (tel == NULL) {
+ if (tel == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DialCall] malloc tel error");
return OHOS_FAILURE;
}
*(tel + len) = '\0';
ret = hfp_hf_start_dial(&g_bdAddr, tel, len);
if (ret != ERRCODE_BT_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DialCall] hfp_hf_start_dial error ret %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DialCall] hfp_hf_start_dial ret %d", ret);
free(tel);
return OHOS_FAILURE;
}
int AcceptIncomingCall(void)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] start");
- int ret, i;
- PhoneCallInfo *phoneCall = NULL;
+ int32_t ret;
+ PhoneCallInfo *phoneCall = nullptr;
PhoneCallInfo *tmp = g_callList;
if (g_btConnState != PROFILE_STATE_CONNECTED) {
return OHOS_FAILURE;
}
- for (i = 0; i < MULTI_CALL_MAX_NUME; i++) {
+ for (int32_t i = 0; i < MULTI_CALL_MAX_NUME; i++) {
if (tmp->lastStatus == HFP_HF_CALL_STATE_INCOMING || tmp->lastStatus == HFP_HF_CALL_STATE_WAITING) {
phoneCall = tmp;
break;
tmp++;
}
- if (phoneCall == NULL) {
+ if (phoneCall == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] no incoming");
return OHOS_FAILURE;
}
ret = hfp_hf_accept_incoming_call(&g_bdAddr, HFP_HF_ACCEPT_CALL_ACTION_NONE); // 无人通话,有人呼入,接听呼入电话
}
if (ret != ERRCODE_BT_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] hfp_hf_accept_incoming_call error ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] ret:%d", ret);
phoneCall->operate = OPERATE_NO_OPE;
return OHOS_FAILURE;
}
int RejectIncomingCall(void)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[RejectIncomingCall] start");
- int ret, i;
- PhoneCallInfo *phoneCall = NULL;
+ PhoneCallInfo *phoneCall = nullptr;
PhoneCallInfo *tmp = g_callList;
if (g_btConnState != PROFILE_STATE_CONNECTED) {
return OHOS_FAILURE;
}
- for (i = 0; i < MULTI_CALL_MAX_NUME; i++) {
+ for (int32_t i = 0; i < MULTI_CALL_MAX_NUME; i++) {
if (tmp->lastStatus == HFP_HF_CALL_STATE_INCOMING || tmp->lastStatus == HFP_HF_CALL_STATE_WAITING) {
phoneCall = tmp;
}
tmp++;
}
- if (phoneCall == NULL) {
+ if (phoneCall == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] no incoming");
return OHOS_SUCCESS;
}
- ret = hfp_hf_reject_incoming_call(&g_bdAddr);
+ int32_t ret = hfp_hf_reject_incoming_call(&g_bdAddr);
if (ret != ERRCODE_BT_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[RejectIncomingCall] hfp_hf_reject_incoming_call error ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[RejectIncomingCall] ret:%d", ret);
return OHOS_FAILURE;
}
g_finishOperate = OPERATE_WATCH_REJECT;
// 手表结束通话
int FinishCall(void)
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[FinishCall] start");
-
if (g_btConnState != PROFILE_STATE_CONNECTED) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[FinishCall] BT connStatus: 0x%X", g_btConnState);
return OHOS_FAILURE;
}
int ret = hfp_hf_finish_call(&g_bdAddr);
if (ret != ERRCODE_BT_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[FinishCall] hfp_hf_finish_call error ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[FinishCall] ret:%d", ret);
return OHOS_FAILURE;
}
g_finishOperate = OPERATE_WATCH_FINISH;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[FinishCall] success!");
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "FinishCall");
return OHOS_SUCCESS;
}
*/
int GetCallInfoInCallList(PhoneCallInfo callList[], int listNum, int *retNum)
{
- int i, len;
PhoneCallInfo *tmp = g_callList;
PhoneCallInfo *tmp2 = callList;
- if (callList == NULL || listNum < MULTI_CALL_MAX_NUME) {
+ if (callList == nullptr || listNum < MULTI_CALL_MAX_NUME) {
*retNum = 0;
return OHOS_FAILURE;
}
return OHOS_SUCCESS;
}
- len = sizeof(PhoneCallInfo);
- for (i = 0; i < MULTI_CALL_MAX_NUME; i++) {
+ int32_t len = sizeof(PhoneCallInfo);
+ for (int32_t i = 0; i < MULTI_CALL_MAX_NUME; i++) {
if (tmp->lastStatus == HFP_HF_CALL_STATE_FINISHED) {
tmp++;
} else {
return OHOS_SUCCESS;
}
-static unsigned char g_changeSpkVolume;
-
-static void GetCallCurrVolumeEvent(void)
-{
- int volume;
- int minVolume;
- int maxVolume;
- unsigned char tmp;
-
- volume = PhoneAudioGetVolume();
- minVolume = PhoneAudioGetMinVolume();
- maxVolume = PhoneAudioGetMaxVolume();
- tmp = (unsigned char)((volume * CALL_VOLUME_MAX) / (maxVolume - minVolume)); // 转换
-
- if (volume != 0 && tmp == 0) {
- tmp = 1;
- }
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[GetCallCurrVolumeEvent] volume = %d, minVolume = %d, maxVolume = %d, tmp = %d",
- volume, minVolume, maxVolume, tmp);
- g_changeSpkVolume = tmp;
-}
-
// 获取当前通话音量大小 (0 - 15)
+// hfp音量范围 0-15, media 音量范围 0-100
unsigned char GetCallCurrVolume(void)
{
- GetCallCurrVolumeEvent();
- return g_changeSpkVolume;
+ int32_t volume = PhoneAudioGetVolume();
+ int32_t minVolume = PhoneAudioGetMinVolume();
+ int32_t maxVolume = PhoneAudioGetMaxVolume();
+ unsigned char hfpVolume = (unsigned char)((volume * CALL_VOLUME_MAX) / (maxVolume - minVolume)); // 转换
+
+ if (volume != 0 && hfpVolume == 0) {
+ hfpVolume = 1;
+ }
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[GetCallCurrVolume] volume:%d, minVolume:%d, maxVolume:%d, hfpVolume:%d",
+ volume, minVolume, maxVolume, hfpVolume);
+ return hfpVolume;
}
-static void SetSpeakerVolumeEvent(void)
+void SetSpeakerVolume(unsigned char hfpVolume)
{
- int ret, minVolume, maxVolume, tmp;
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] start, hfpVolume:%d", hfpVolume);
+ int32_t minVolume = PhoneAudioGetMinVolume();
+ int32_t maxVolume = PhoneAudioGetMaxVolume();
+ int32_t volume = hfpVolume * (maxVolume - minVolume) / CALL_VOLUME_MAX; // 转换
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] minVolume:%d, maxVolume:%d, volume:%d",
+ minVolume, maxVolume, volume);
- minVolume = PhoneAudioGetMinVolume();
- maxVolume = PhoneAudioGetMaxVolume();
- tmp = g_changeSpkVolume * (maxVolume - minVolume) / CALL_VOLUME_MAX; // 转换
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolumeEvent] minVolume = %d, maxVolume = %d, tmp = %d",
- minVolume, maxVolume, tmp);
-
- ret = PhoneAudioSetVolume(tmp);
- if (ret != true) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolumeEvent] PhoneAudioSetVolume ret = %d", ret);
+ int32_t ret = PhoneAudioSetVolume(volume);
+ if (!ret) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] PhoneAudioSetVolume ret:%d", ret);
return;
}
- ret = hfp_hf_set_volume(&g_bdAddr, HFP_VOLUME_SPEAKER, g_changeSpkVolume);
+ ret = hfp_hf_set_volume(&g_bdAddr, HFP_VOLUME_SPEAKER, hfpVolume);
if (ret != ERRCODE_BT_SUCCESS) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolumeEvent] hfp_hf_set_volume fail ret = %d, g_changeSpkVolume = %d",
- ret, g_changeSpkVolume);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] set_volume ret:%d, hfpVolume:%d",
+ ret, hfpVolume);
return;
}
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolumeEvent] success!");
-}
-
-// 设置手表通话Speaker音量:0 - 15
-void SetSpeakerVolume(unsigned char volume)
-{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] start, volume = %d", volume);
- if (volume > CALL_VOLUME_MAX) {
- g_changeSpkVolume = CALL_VOLUME_MAX;
- } else {
- g_changeSpkVolume = volume;
- }
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] success!");
- SetSpeakerVolumeEvent();
return;
}
} else {
ret = hfp_hf_connect_sco(&g_bdAddr);
if (ret != 0) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToWatch] ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToWatch] ret:%d", ret);
}
return ret;
}
} else {
ret = hfp_hf_disconnect_sco(&g_bdAddr);
if (ret != 0) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToMobilePhone] ret = %d", ret);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToMobilePhone] ret:%d", ret);
}
return ret;
}
#ifndef PLAYERS_MODEL_H
#define PLAYERS_MODEL_H
-#include "stdio.h"
+#include <cstdio>
#include "gfx_utils/list.h"
#include "UiServersMsg.h"
#include "player.h"
void SoundButtonOnClick();
void PlayerModelButtonOnClick();
void OptionsButtonOnClick();
- VolumeSettingView *volumeSetting{nullptr};
- UIViewGroup *volumeSettingView{nullptr};
+ VolumeSettingView *volumeSettingView{nullptr};
};
// 播放器回调
public:
PlayerOnDragListener();
~PlayerOnDragListener();
- virtual bool OnDragEnd(UIView& view, const DragEvent& event) override;
+ bool OnDragEnd(UIView& view, const DragEvent& event) override;
bool OnDrag(UIView& view, const DragEvent& event) override;
static PlayerOnDragListener *GetInstance();
private:
class PlayersView : public UICardPage {\r
public:\r
PlayersView();\r
- virtual ~PlayersView();\r
+ ~PlayersView() override;\r
static PlayersView *GetInstance(void);\r
bool InitView(void);\r
void PreLoad(void) override;\r
JumpView *jumpView{nullptr};\r
PlayersPresenter *playersPresenter{nullptr};\r
PlayerOnDragListener *playerOnDragListener{nullptr};\r
- uint8_t state = UICheckBox::UICheckBoxState::MAX_STATUS_NUM;\r
+ uint8_t state_ = UICheckBox::UICheckBoxState::MAX_STATUS_NUM;\r
UIView::OnClickListener *playerlistener{nullptr};\r
UIView::OnClickListener *soundlistener{nullptr};\r
UIView::OnClickListener *nextlistener{nullptr};\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothView::BluetoothView");\r
g_bluetoothView = this;\r
-\r
}\r
\r
BluetoothView::~BluetoothView()\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothView::~BluetoothView");\r
- group->RemoveAll(); \r
+ group->RemoveAll();\r
UIView::OnClickListener *click = watchButton->GetOnClickListener();\r
if (click != nullptr) {\r
delete click;\r
// Button OnClick\r
class BluetoothOnClickListener : public UIView::OnClickListener {\r
public:\r
- BluetoothOnClickListener(UIView* view) : view_(view){}\r
+ explicit BluetoothOnClickListener(UIView* view) : view_(view) {}\r
~BluetoothOnClickListener() {}\r
\r
bool OnClick(UIView& view, const ClickEvent& event) override\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "uri: %s.", PlayersModel::GetInstance()->GetPlayerUri().c_str());
std::string strSongName = sliceId_;
std::string pureName = strSongName.substr(0, strSongName.rfind("."));
- const char *songName = pureName.c_str();
- playersView->TitleSetText(songName);
+ playersView->TitleSetText(pureName.c_str());
playersView->SetPlayerListGroupStatus(false);
// 刷新UI
RootView::GetInstance()->Invalidate();
\r
bool PlayersModel::FetchedPlayersCallBack(PlayersMsg *playersMsg)\r
{\r
- if (listPlayers.IsEmpty() == true) {\r
+ if (listPlayers.IsEmpty()) {\r
return false;\r
} else {\r
MUTEX_Lock(g_mutex);\r
\r
void PlayersModel::AudioInit(void)\r
{\r
- if (audioInitStatus == true) {\r
+ if (audioInitStatus) {\r
return;\r
}\r
AudioManager& amIntance = AudioManager::GetInstance();\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlaySwitching playerModel1 %d!!!", GetPlayerModel());\r
int32_t ret;\r
PlayersMsg playersMsg;\r
- if (FetchedPlayersCallBack(&playersMsg) == true) {\r
+ if (FetchedPlayersCallBack(&playersMsg)) {\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "FetchedPlayersCallBack true");\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Stop to play");\r
switch (playersMsg.playerModel) {\r
}\r
std::string strSongName = sliceId;\r
std::string pureName = strSongName.substr(0, strSongName.rfind("."));\r
- const char *songName = pureName.c_str();\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayerInit, url: %s ", sliceId);\r
std::string strSrcMusic(APP_MUSIC_PATH);\r
std::string tempStr("/");\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PlayerInit playersPresenter GetInstance fail");\r
return OHOS_FAILURE;\r
}\r
- playersPresenter->SetTitleSetText(songName);\r
+ playersPresenter->SetTitleSetText(pureName.c_str());\r
playersPresenter->SetPlaybackProgress(circleProgress);\r
playersPresenter->SetPlayerState(playButtonState);\r
return 0;\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "uri: %s.", GetPlayerUri().c_str());\r
std::string strSongName = sliceId;\r
std::string pureName = strSongName.substr(0, strSongName.rfind("."));\r
- const char *songName = pureName.c_str();\r
PlayersPresenter *playersPresenter = PlayersPresenter::GetInstance();\r
if (playersPresenter != nullptr) {\r
- playersPresenter->SetTitleSetText(songName);\r
+ playersPresenter->SetTitleSetText(pureName.c_str());\r
playersPresenter->SetPlaybackProgress(0); // 0:进度0%\r
}\r
int32_t ret;\r
{\r
int16_t random;\r
int16_t indexMax;\r
- srand((unsigned)time(NULL));\r
+ srand((unsigned)time(nullptr));\r
List<PlayerCaseInfo> &playersCaseList = PlayersListGroup::GetInstance()->GetCase();\r
indexMax = playersCaseList.Size() - 1;\r
random = (rand() % (indexMax + 1));\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[PlayersModel::ConnBtAndLocalPlay] BTPlayerStat err, ret:%d", ret);\r
}\r
PlayersModel::GetInstance()->SetBTMusicPlay(playNotification);\r
-\r
}\r
} else {\r
if (playerState == PlayerStates::PLAYER_PAUSED) {\r
}\r
}\r
}\r
- \r
}\r
\r
// 蓝牙连接和本地音乐的暂停\r
#include <dirent.h>
#include <iostream>
#include <cstdlib>
-#include <time.h>
+#include <ctime>
#include "PlayersPresenter.h"
#include "wearable_log.h"
#include "common/image_cache_manager.h"
}
deviceList->RefreshList();
}
- BluetoothDeviceListView *bluetoothDeviceListView = BluetoothDeviceListView::GetInstance();
if (bluetoothDeviceListView == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OnClick bluetoothDeviceListView new fail");
return false;
RootView::GetInstance()->Add(container[thisView]);
}
BluetoothModel::GetInstance()->SetTagDisconnectView(true);
- BluetoothReconnectView::GetInstance()->RefreshBluetoothNameLabel();
+ bluetoothReconnectView->RefreshBluetoothNameLabel();
bluetoothReconnectView->BtReconnectStart();
return true;
}
void JumpView::ResetEarListView(int16_t hideView)
{
- BluetoothEarListView *bluetoothEarListView = BluetoothEarListView::GetInstance();
if (bluetoothEarListView == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainBluetoothView::ResetEarListView bluetoothEarListView == nullptr");
return;
container[thisView] = group;
RootView::GetInstance()->Add(container[thisView]);
}
- BluetoothReconnectView *bluetoothReconnectView = BluetoothReconnectView::GetInstance();
if (bluetoothReconnectView == nullptr) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GapAclStateChangedCallback bluetoothReconnectView == nullptr");
} else {
void JumpView::ChangeView(int16_t hideView, int16_t showView)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "JumpView:: ChangeView %d", hideView);
- if (CheckViewParam(hideView, showView) == false) {
+ if (!CheckViewParam(hideView, showView)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "JumpView::ChangeView check param err %d %d.", hideView, showView);
return;
}
PreprosssChangeView tmpPreProcessView = preProcessView[showView];
- if ((this->*tmpPreProcessView)(hideView, showView) == false) {
+ if (!(this->*tmpPreProcessView)(hideView, showView)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "JumpView::ChangeView %d %d failed", showView, hideView);
return;
}
// 打开目录
DIR *dirp = opendir(APP_MUSIC_PATH);
// 遍历文件
- if (dirp != NULL) {
- while ((direntp = readdir(dirp)) != NULL) {
+ if (dirp != nullptr) {
+ while ((direntp = readdir(dirp)) != nullptr) {
ret = memcpy_s(playerCaseInfo.sliceId, DEC_NUM_256, direntp->d_name, DEC_NUM_256);
if (ret != OHOS_SUCCESS) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "memcpy_s err %d.", ret);
return;
}
if (volumeSettingView == nullptr) {
- volumeSetting = new VolumeSettingView();
- if (volumeSetting == nullptr) {
+ volumeSettingView = new VolumeSettingView();
+ if (volumeSettingView == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "volumeSetting nullptr err");
return;
}
- if (volumeSetting->SetUpVolume() == false) {
+ if (!volumeSettingView->SetUpVolume()) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "volumeSetting SetUpVolume fail");
return;
}
- volumeSetting->GetProgress()->SetValue(AudioManager::GetInstance().GetVolume(AUDIO_STREAM_MUSIC));
- if (AudioManager::GetInstance().GetVolume(AUDIO_STREAM_MUSIC) == 0) {
- ImageInfo *image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUTE_BUTTON, PLAYER_IAMGES);
- volumeSetting->GetDecreaseButton()->SetImageSrc(image, image);
- }
- volumeSettingView = volumeSetting;
RootView::GetInstance()->Add(volumeSettingView);
}
+ int32_t volume = AudioManager::GetInstance().GetVolume(AUDIO_STREAM_MUSIC);
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "current volume = %d", volume);
+ volumeSettingView->GetProgress()->SetValue(volume);
+ if (volume == 0) {
+ ImageInfo *image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUTE_BUTTON, PLAYER_IAMGES);
+ volumeSettingView->GetDecreaseButton()->SetImageSrc(image, image);
+ }
VolumeSliderEventListener *volumeSliderEventListener = VolumeSliderEventListener::GetInstance();
if (volumeSliderEventListener == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SoundButtonOnClick volumeSliderEventListener nullptr err");
PlayersView *playersView = PlayersView::GetInstance();
player->GetPlayerState(state);
- if (state == PLAYER_PAUSED && PlayerIntrptListener->IsPaused() == true) {
+ if (state == PLAYER_PAUSED && PlayerIntrptListener->IsPaused()) {
ret = player->Play();
if (ret == 0) {
if (playersView == nullptr) {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PlayerInterruptListener::ResumePlayer] this is in calling");
return; // 通话界面,禁止音乐恢复播放
}
- AudioRelease(); // 适配某些机型不触发SCO
-
PlayerPostGraphicEvent(Resume);
}
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OnDragChangeView=%d showView=%d", hideView, showView);
if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) {
- if (isStopScan == true) {
+ if (isStopScan) {
BluetoothEarPhoneView *bluetoothEarPhoneView = BluetoothEarPhoneView::GetInstance();
if (bluetoothEarPhoneView == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "bluetoothEarPhoneView GetInstance fail");
void PlayerOnDragListener::DropEarPhoneView(const DragEvent& event)
{
bool ret = BluetoothModel::GetInstance()->IsTagReturnToDeviceListView();
- if (ret == true) {
+ if (ret) {
OnDragChangView(event, JumpView::BluetoothJumpViewNum::BLUETOOTHEARPHONEVIEW,
JumpView::BluetoothJumpViewNum::BLUETOOTHDEVICELISTVIEW, true);
} else {
if (ret) {
BluetoothCaseInfo *caseInfo = BluetoothModel::GetInstance()->GetTempMacValue();
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayerOnDragListener::DropEarListView Addr: %02x%02x%02x%02x%02x%02x",
- caseInfo->addr[5], caseInfo->addr[4], caseInfo->addr[3], /* mac下标 0 1 2 3 4 5 */
- caseInfo->addr[2], caseInfo->addr[1], caseInfo->addr[0]); /* mac下标 0 1 2 3 4 5 */
+ caseInfo->addr[5], caseInfo->addr[4], caseInfo->addr[3], /* mac下标 0 1 2 3 4 5 */
+ caseInfo->addr[2], caseInfo->addr[1], caseInfo->addr[0]); /* mac下标 0 1 2 3 4 5 */
errcode_t retVal = gap_disconnect_remote_device((const bd_addr_t *)caseInfo->addr);
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayerOnDragListener::DropEarListView gap_disconnect_remote_device retVal = %d", retVal);
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainBluetoothView::DropView bluetoothModel == nullptr");
return;
}
- if (bluetoothModel->GetTagReconnectJump() == true) {
+ if (bluetoothModel->GetTagReconnectJump()) {
OnDragChangView(event, hideView,
JumpView::BluetoothJumpViewNum::BLUETOOTHEOPTIONSVIEW, false);
} else {
std::list<BluetoothCaseInfo> &bluetoothScanList = BluetoothModel::GetInstance()->GetCase();
bool ret = bluetoothScanList.empty();
- if (ret != true) {
+ if (!ret) {
OnDragChangView(event, hideView,
JumpView::BluetoothJumpViewNum::BLUETOOTHEARLISTVIEW, false);
} else {
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CancelConnedRequestButton OnClick");
BluetoothCaseInfo *caseInfo = BluetoothModel::GetInstance()->GetTempMacValue();
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ClickCancelConnedRequestButton Addr: %02x%02x%02x%02x%02x%02x",
- caseInfo->addr[5], caseInfo->addr[4], caseInfo->addr[3], /* mac下标 0 1 2 3 4 5 */
- caseInfo->addr[2], caseInfo->addr[1], caseInfo->addr[0]); /* mac下标 0 1 2 3 4 5 */
+ caseInfo->addr[5], caseInfo->addr[4], caseInfo->addr[3], /* mac下标 0 1 2 3 4 5 */
+ caseInfo->addr[2], caseInfo->addr[1], caseInfo->addr[0]); /* mac下标 0 1 2 3 4 5 */
errcode_t retVal = gap_disconnect_remote_device((const bd_addr_t *)caseInfo->addr);
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OnClickCancelConnedRequestButton DisconnectRemoteDevice retVal = %d", retVal);
return;
}
BluetoothModel::GetInstance()->SetBtStatus();
- if (BluetoothModel::GetInstance()->GetAclConnected() == true) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayersPresenter::OnClickButtonOptionOne GetAclConnected() == true");
+ if (BluetoothModel::GetInstance()->GetAclConnected()) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayersPresenter::OnClickButtonOptionOne GetAclConnected()");
BluetoothModel::GetInstance()->SetTagConnectNew(false);
bluetoothOptionsView->SetBtDisconnect();
jumpView->ChangeView(JumpView::BluetoothJumpViewNum::BLUETOOTHEOPTIONSVIEW,
JumpView::BluetoothJumpViewNum::BLUETOOTHDEVICELISTVIEW);
} else {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayersPresenter::OnClickButtonOptionOne GetAclConnected() ==false");
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayersPresenter::OnClickButtonOptionOne GetAclConnected() fail");
BluetoothModel::GetInstance()->SetTagReconnectJump(true);
// 重连动画
jumpView->ChangeView(JumpView::BluetoothJumpViewNum::BLUETOOTHEOPTIONSVIEW,
// 判断是否正在连接
bd_addr_t *lastAddr = BluetoothModel::GetInstance()->GetLastConnedAddr();
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothPresenter::ClickOptionsOneButton lastAddr: %02x%02x%02x%02x%02x%02x",
- lastAddr->addr[5], lastAddr->addr[4], lastAddr->addr[3], /* mac下标 0 1 2 3 4 5 */
- lastAddr->addr[2], lastAddr->addr[1], lastAddr->addr[0]); /* mac下标 0 1 2 3 4 5 */
+ lastAddr->addr[5], lastAddr->addr[4], lastAddr->addr[3], /* mac下标 0 1 2 3 4 5 */
+ lastAddr->addr[2], lastAddr->addr[1], lastAddr->addr[0]); /* mac下标 0 1 2 3 4 5 */
if (bt_is_acl_connected(lastAddr)) {
BluetoothModel::GetInstance()->SetTagConnectNew(true);
bluetoothOptionsView->SetBtDisconnect();
// 设备列表
List<BluetoothCaseInfo> &bluetoothCaseList = BluetoothModel::GetInstance()->GetConnedDevicesCase();
bool ret = bluetoothCaseList.IsEmpty();
- if (ret != true) {
+ if (!ret) {
jumpView->ChangeView(JumpView::BluetoothJumpViewNum::BLUETOOTHEVIEW,
JumpView::BluetoothJumpViewNum::BLUETOOTHDEVICELISTVIEW);
} else {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetPlayerState playersView GetInstance fail");
return;
}
- if (value != false) {
+ if (value) {
playersView->SetPlayerButtonState(UICheckBox::UICheckBoxState::SELECTED);
PlayersModel::GetInstance()->SetPlayButtonState(false);
}
* Author:
* Create: 2021-07-26
*/
-#include <stdlib.h>
+#include <cstdlib>
#include <unistd.h>
#include "common/image_cache_manager.h"
#include "ui_resource_image.h"
PlayersView::~PlayersView()
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayersView::~PlayersView");
- if (viewiInitStatus == true) {
- state = GetPlayerButtonState();
- if (state == UICheckBox::UICheckBoxState::SELECTED) {
+ if (viewiInitStatus) {
+ state_ = GetPlayerButtonState();
+ if (state_ == UICheckBox::UICheckBoxState::SELECTED) {
PlayersModel::GetInstance()->SetPlayButtonState(true);
}
RemoveAll();
titleLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
titleLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER,
UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);
-
}
void PlayersView::PlayerModelButtonSetSrc(uint32_t playMode)
void PlayersView::SetPlayerButtonState(UICheckBox::UICheckBoxState state)
{
if (playerButton == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PlayersView::SetPlayerButtonState playerButton NULL");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PlayersView::SetPlayerButtonState playerButton nullptr");
return;
}
return playerButton->SetState(state);
void PlayersView::SetPlayerListGroupStatus(bool status)
{
if (listGroup == nullptr) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayersView listGroup is NULL");
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayersView listGroup is nullptr");
return;
}
UIView *vew = MainViewSample::GetInstance()->GetMainViewGroup();
soundButton->SetTouchable(true);
soundButton->SetPosition(178, 316, 95, 76); // 178:x 316:y 95:width 76:height
soundButton->SetOnClickListener(soundlistener);
- if (LoadPlayerImage(soundButton, PLAYER_SOUND_IMAGE) == false) {
+ if (!LoadPlayerImage(soundButton, PLAYER_SOUND_IMAGE)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "playerModelButton LoadPlayerImage fail");
return false;
}
playerModelButton->SetTouchable(true);
playerModelButton->SetPosition(pointBtn.x, pointBtn.y, 95, 76); // 95:width 76:height
playerModelButton->SetOnClickListener(modellistener);
- if (ShowUpPlayerMode() == false) {
+ if (!ShowUpPlayerMode()) {
return OHOS_FAILURE;
}
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "playerModel %d", PlayersModel::GetInstance()->GetPlayerModel());
bool PlayersView::ShowUpPlayerMode()
{
if (PlayersModel::GetInstance()->GetPlayerModel() == LOOP) {
- if (LoadPlayerImage(playerModelButton, PLAYER_PLAYERSMODEL_LOOP) == false) {
+ if (!LoadPlayerImage(playerModelButton, PLAYER_PLAYERSMODEL_LOOP)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "load PLAYER_PLAYERSMODEL_LOOP fail");
return false;
}
} else if (PlayersModel::GetInstance()->GetPlayerModel() == SEQUENCE) {
- if (LoadPlayerImage(playerModelButton, PLAYER_PLAYERSMODEL_SEQUENCE) == false) {
+ if (!LoadPlayerImage(playerModelButton, PLAYER_PLAYERSMODEL_SEQUENCE)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "load PLAYERSMODEL_SEQUENCE fail");
return false;
}
} else if (PlayersModel::GetInstance()->GetPlayerModel() == REPEATS) {
- if (LoadPlayerImage(playerModelButton, PLAYER_PLAYERSMODEL_REPEATS) == false) {
+ if (!LoadPlayerImage(playerModelButton, PLAYER_PLAYERSMODEL_REPEATS)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "load PLAYERSMODEL_REPEATS fail");
return false;
}
} else if (PlayersModel::GetInstance()->GetPlayerModel() == RANDOM) {
- if (LoadPlayerImage(playerModelButton, PLAYER_PLAYERSMODEL_RANDOM) == false) {
+ if (!LoadPlayerImage(playerModelButton, PLAYER_PLAYERSMODEL_RANDOM)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "load PLAYERSMODEL_RANDOM fail");
return false;
}
int PlayersView::ShowUpButtonView()
{
- int ret;
- ret = ShowUpCheckBoxButton();
+ int32_t ret = ShowUpCheckBoxButton();
if (ret == OHOS_FAILURE) {
return OHOS_FAILURE;
}
}
}
backGround->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);
- if (LoadPlayerImage(backGround, PLAYER_BACK_GROUND) == false) {
+ if (!LoadPlayerImage(backGround, PLAYER_BACK_GROUND)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "backGround LoadPlayerImage fail");
return false;
}
int ret;
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, " PlayersView InitView");
- if (InitBackGround() == false) {
+ if (!InitBackGround()) {
return false;
}
SHUTDOWNDEVICE,\r
};\r
\r
-using namespace std;\r
class RebootModel {\r
public:\r
~RebootModel();\r
group->SetHeight(VERTICAL_RESOLUTION);\r
}\r
ret = ShowUpRebootDeviceView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return nullptr;\r
}\r
group->Add(rebootDeviceLabel);\r
} else if (strcmp(view.GetViewId(), REBOOTDEVICE_BUTTON) == 0) {
// 重启
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "REBOOTDEVICE_BUTTON OnClick");
- //GetPMSDefaultInterface()->RebootDevice(NULL, NULL);
} else if (strcmp(view.GetViewId(), SHUTDOWNDEVICE_BUTTON) == 0) {
// 关机
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SHUTDOWNDEVICE_BUTTON OnClick");
- //GetPMSDefaultInterface()->ShutDownDevice(NULL, NULL);
}
return true;
}
group->SetHeight(VERTICAL_RESOLUTION);
}
ret = ShowUpRebootView();
- if (ret == false) {
+ if (!ret) {
return nullptr;
}
group->Add(rebootLabel);
group->Add(rebootButton);
ret = ShowUpShutdownView();
- if (ret == false) {
+ if (!ret) {
return nullptr;
}
group->Add(shutdownLabel);
{
UNUSED(hideView);
// init view
- UIViewGroup *group = InitShowUpView();
- if (group == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail");
+ UIViewGroup *viewGroup = InitShowUpView();
+ if (viewGroup == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "viewGroup nullptr fail");
return false;
}
- container[thisView] = group;
+ container[thisView] = viewGroup;
RootView::GetInstance()->Add(container[thisView]);
return true;
}
return false;
}
// init view
- UIViewGroup *group = rebootDeviceView->InitShowUpView();
- if (group == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail");
+ UIViewGroup *viewGroup = rebootDeviceView->InitShowUpView();
+ if (viewGroup == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "viewGroup nullptr fail");
return false;
}
- container[thisView] = group;
+ container[thisView] = viewGroup;
RootView::GetInstance()->Add(container[thisView]);
}
return true;
return false;
}
// init view
- UIViewGroup *group = shutdownDeviceView->InitShowUpView();
- if (group == nullptr) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group nullptr fail");
+ UIViewGroup *viewGroup = shutdownDeviceView->InitShowUpView();
+ if (viewGroup == nullptr) {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "viewGroup nullptr fail");
return false;
}
- container[thisView] = group;
+ container[thisView] = viewGroup;
RootView::GetInstance()->Add(container[thisView]);
}
return true;
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::ChangeView %d, %d", hideView, showView);
- if (CheckViewParam(hideView, showView) == false) {
+ if (!CheckViewParam(hideView, showView)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::CheckViewParam failed.");
return;
}
PreprosssChangeView tmpPreProcessView = preProcessView[showView];
- if ((this->*tmpPreProcessView)(hideView, showView) == false) {
+ if (!(this->*tmpPreProcessView)(hideView, showView)) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::ChangeView %d %dfailed", showView, hideView);
return;
}
}\r
\r
ret = ShowUpShutdownDeviceView();\r
- if (ret == false) {\r
+ if (!ret) {\r
return nullptr;\r
}\r
group->Add(shutdownDeviceLabel);\r
* Create: 2021-09-22\r
*/\r
\r
-#include <stdio.h>\r
-#include <time.h>\r
+#include <cstdio>\r
+#include <ctime>\r
#include "memory_adapter.h"\r
#include "ohos_init.h"\r
#include "samgr_lite.h"\r
.MessageHandle = ServiceMessageHandle,\r
.GetTaskConfig = GetServiceTaskConfig,\r
.subscirber = {\r
- .identity = NULL,\r
+ .identity = nullptr,\r
.args = &g_rtcService,\r
.Notify = Notify,\r
},\r
static void SubscribeTopic(Topic topic)\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Rtc Subscribe Topic=%u!!", topic);\r
- BroadcastApi *broadcastApi = NULL;\r
+ BroadcastApi *broadcastApi = nullptr;\r
\r
IUnknown *api = SAMGR_GetInstance()->GetFeatureApi(BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
- if (api == NULL) {\r
+ if (api == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SubscribeTopic GetFeatureApi %s %s failed!!",\r
- BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
+ BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
return;\r
}\r
int result = api->QueryInterface(api, DEFAULT_VERSION, (void **)&broadcastApi);\r
- if (result != 0 || broadcastApi == NULL) {\r
+ if (result != 0 || broadcastApi == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SubscribeTopic QueryInterface %s %s failed!!",\r
- BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
+ BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
return;\r
}\r
\r
void UnsubscribeTopic(Topic topic)\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Rtc Unsubscribe Topic=%u!!", topic);\r
- BroadcastApi *broadcastApi = NULL;\r
+ BroadcastApi *broadcastApi = nullptr;\r
\r
IUnknown *api = SAMGR_GetInstance()->GetFeatureApi(BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
- if (api == NULL) {\r
+ if (api == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UnsubscribeTopic GetFeatureApi %s %s failed!!",\r
- BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
+ BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
return;\r
}\r
int result = api->QueryInterface(api, DEFAULT_VERSION, (void **)&broadcastApi);\r
- if (result != 0 || broadcastApi == NULL) {\r
+ if (result != 0 || broadcastApi == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UnsubscribeTopic QueryInterface %s %s failed!!",\r
- BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
+ BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);\r
return;\r
}\r
\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Rtc Notify:");\r
AlarmClockQueueMsg eventMsg;\r
\r
- if (req == NULL || args == NULL) {\r
+ if (req == nullptr || args == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Notify para invalid!!");\r
return;\r
}\r
eventMsg.eventType = EVENT_ALARM_RING;\r
AlmmgrAlarmClockEventProcess(&eventMsg);\r
} else if (topic == TOPIC_EVENT_NEXTDAY_UPDATE) {\r
- UpdataListAndFirstAlarmToday(); \r
+ UpdataListAndFirstAlarmToday();\r
} else if (topic == TOPIC_EVENT_UTCTIME_UPDATE) {\r
UpdataListAndFirstAlarmToday();\r
} else {\r
#endif
#endif // OHOS_UI_SCREENNOTIFY_H
-
-
-
-
-
-
#include <list>
-#include "stdio.h"
+#include <cstdio>
#include "ability_state.h"
#include "cmsis_os2.h"
#include "common_def.h"
void notify_screen_on_event(void)
{
- for (auto callback : g_callback) {
- callback(SCREEN_STATUS_ON);
- }
- GraphicService::GetInstance()->PostGraphicEvent(ChangeToHomeView);
+ GraphicService::GetInstance()->PostGraphicEvent(
+ [&] {
+ for (auto callback : g_callback) {
+ callback(SCREEN_STATUS_ON);
+ }
+ ChangeToHomeView();
+ });
}
void notify_screen_off_event(void)
{
- for (auto callback : g_callback) {
- callback(SCREEN_STATUS_OFF);
- }
+ GraphicService::GetInstance()->PostGraphicEvent(
+ [&] {
+ for (auto callback : g_callback) {
+ callback(SCREEN_STATUS_OFF);
+ }
+ });
}
void set_back_to_home_interval(uint32_t time_sec)
#include "ui_image_view.h"
namespace OHOS {
-typedef enum {
- WATCH_FACE = 0,
- HEART_RATE,
- COMPASS,
- ACTIVITY,
- MUSIC_PLAYER,
- MAX_CARD,
-} CardId;
-
-
-struct CardInfo {
- int16_t cardId;
-};
-
class ScreenModels {
public:
ScreenModels();
~ScreenModels();
static ScreenModels *GetInstance(void);
- // card funtion
- bool SetUpListCase(void);
- bool SaveCardConfig(void);
- bool InitCardConfig(void);
- void SetCardConfigDefault(void);
- int16_t GetCardPage(uint16_t page);
- bool CardInsertFirst(int32_t card);
- bool CardDelete(int32_t card);
- int16_t GetMaxCard(void);
- int16_t GetLastCardPage(void);
bool LoadAppImages(std::string file, UIImageView *view, uint32_t resId);
void PreLoadAppimages(void);
+ void InitKvStorage(void);
private:
void LoadAppMultiImages(std::string file, uint32_t startId, uint32_t lastId);
- List<CardInfo> *listMainView{nullptr}; // record main view pages
- int16_t maxPage = MAX_CARD;
};
}
#endif
#include "wearable_log.h"
#include "iostream"
#include <fstream>
-#include "stdio.h"
+#include <cstdio>
#include <fcntl.h>
#include <unistd.h>
+#include "kvstore_env.h"
+#include "kv_store.h"
#include "ScreenModels.h"
#include "common/image_cache_manager.h"
#include "UiConfig.h"
return &screenModel;
}
-bool ScreenModels::SetUpListCase(void)
+void ScreenModels::InitKvStorage(void)
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetUpListCase");
- listMainView = new List<CardInfo>();
- if (listMainView == nullptr) {
- return false;
- }
- listMainView->Clear();
- return true;
-}
-
-bool ScreenModels::InitCardConfig(void)
-{
- if (SetUpListCase() == false) {
- return false;
- }
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "InitCardConfig1");
- int32_t fd = open(CARD_CONFIG_PATH, O_RDWR, S_IRWXU);
- ListNode<CardInfo> *node;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "InitCardConfig2");
- struct CardInfo cardInfoData;
- if (fd < 0) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "InitCardConfig open fail");
- fd = open(CARD_CONFIG_PATH, O_RDWR | O_CREAT, S_IRWXU);
- if (fd < 0) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "InitCardConfig open fail 2");
- return false;
- }
- SetCardConfigDefault();
- node = listMainView->Begin();
- for (int32_t i = 0; i < maxPage; i++) {
- cardInfoData = node->data_;
- node = node->next_;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Init write cardInfoData.i:%d ", cardInfoData.cardId);
- if (write(fd, &cardInfoData, sizeof(CardInfo)) != sizeof(CardInfo)) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Init SaveGlobalHealthToFile fail");
- }
- }
- close(fd);
- return true;
- } else {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "InitCardConfig3");
- for (int32_t i = 0; i < maxPage; i++) {
- if (read(fd, &cardInfoData, sizeof(CardInfo)) != sizeof(CardInfo)) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Init Read GlobalHealthToFile fail");
- }
- listMainView->PushBack(cardInfoData);
- }
- close(fd);
- return true;
- }
- return false;
-}
-
-bool ScreenModels::SaveCardConfig(void)
-{
- int32_t fd = open(CARD_CONFIG_PATH, O_RDWR | O_CREAT, S_IRWXU);
- if (fd < 0) {
- close(fd);
- return false;
- } else {
- if (write(fd, &listMainView, listMainView->Size()) != listMainView->Size()) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " SaveGlobalHealthToFile fail");
- }
- close(fd);
- return true;
- }
-}
-
-void ScreenModels::SetCardConfigDefault(void)
-{
- int16_t i;
- struct CardInfo cardInfoData;
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardConfigDefault");
- for (i = 0; i < MAX_CARD; i++) {
- cardInfoData.cardId = i;
- listMainView->PushBack(cardInfoData);
- }
-}
-
-int16_t ScreenModels::GetCardPage(uint16_t page)
-{
- ListNode<CardInfo> *node = listMainView->Begin();
- for (uint8_t i = 0; i < page; i++) {
- if (node->next_ != NULL) {
- node = node->next_;
- } else {
- return -1;
- }
- }
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GetCardPage cardId:%d", node->data_.cardId);
- return node->data_.cardId;
-}
-
-int16_t ScreenModels::GetLastCardPage(void)
-{
- ListNode<CardInfo> *node = listMainView->Begin();
- for (uint8_t i = 0; i < MAX_CARD; i++) {
- if (node->next_ == NULL) {
- node = node->next_;
- }
- }
- return node->data_.cardId;
-}
-
-int16_t ScreenModels::GetMaxCard(void)
-{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GetMaxCard maxPage:%d", maxPage);
- return maxPage;
+ int ret = UtilsSetEnv("/user");
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "UtilsSetEnv /user ret = %d", ret);
}
void ScreenModels::LoadAppMultiImages(std::string file, uint32_t startId, uint32_t lastId)
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetCardAdapter.h
+ * Author:
+ * Create: 2021-09-18
+ */
+
+#ifndef SET_CARD_ADAPTER_H
+#define SET_CARD_ADAPTER_H
+
+#include <list>
+#include <string>
+#include "components/ui_list.h"
+#include "components/ui_label.h"
+#include "components/ui_view_group.h"
+#include "components/ui_image_view.h"
+#include "components/abstract_adapter.h"
+#include "UiConfig.h"
+#include "wearable_log.h"
+#include "SetCardItem.h"
+
+namespace OHOS {
+class SetCardAdapter : public AbstractAdapter {
+public:
+ explicit SetCardAdapter();
+ ~SetCardAdapter() override;
+
+ uint16 GetCount(void) override;
+
+ UIView *GetView(UIView *inView, int16 index) override;
+
+ void AddListItem(const CardInfo &item);
+
+ void SetItemClickListener(UIView::OnClickListener *itemClickListener)
+ {
+ itemClickListener_ = itemClickListener;
+ }
+
+ void ClearItem(void);
+
+private:
+ std::list<CardInfo> listData_;
+ UIView::OnClickListener *itemClickListener_;
+};
+}
+#endif
\ No newline at end of file
--- /dev/null
+/**\r
+ * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.\r
+ * Description:\r
+ * Author:\r
+ * Create:\r
+ */\r
+\r
+#ifndef SET_CARD_DELETE_VIEW_H\r
+#define SET_CARD_DELETE_VIEW_H\r
+\r
+#include "components/ui_label_button.h"\r
+#include "SetCardPresenter.h"\r
+\r
+namespace OHOS {\r
+class SetCardDeleteView : public UIViewGroup {\r
+public:\r
+ SetCardDeleteView(SetCardPresenter *presenter);\r
+ ~SetCardDeleteView() override;\r
+ bool InitView();\r
+private:\r
+ SetCardPresenter *presenter_;\r
+ UILabelButton confirmBtn;\r
+ UILabelButton cancelBtn;\r
+};\r
+}\r
+#endif
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.\r
+ * Description: SetCardItem.h\r
+ * Author:\r
+ * Create: 2021-11-23\r
+ */\r
+\r
+#ifndef SET_CARD_ITEM_H\r
+#define SET_CARD_ITEM_H\r
+\r
+#include <cstdint>\r
+#include <map>\r
+#include "components/ui_view.h"\r
+#include "components/ui_view_group.h"\r
+#include "components/ui_image_view.h"\r
+#include "MainModel.h"\r
+#include "UiConfig.h"\r
+\r
+namespace OHOS {\r
+\r
+class SetCardItem : public UIViewGroup {\r
+public:\r
+ SetCardItem();\r
+ ~SetCardItem() override;\r
+ void SetItemInfo(const CardInfo &cardInfo);\r
+ void SetOnClickListener(OnClickListener *onClickListener);\r
+private:\r
+ void SetUpChild();\r
+ UIImageView cardImg_;\r
+ CardInfo cardInfo_;\r
+};\r
+\r
+}\r
+\r
+#endif // SET_CARD_ITEM_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetCardModel.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef SET_CARD_MODEL_H
+#define SET_CARD_MODEL_H
+
+#include <cstdint>
+#include <map>
+#include "AppViewIDs.h"
+#include "UiConfig.h"
+#include "SetCardPresenter.h"
+#include "SetCardItem.h"
+
+namespace OHOS {
+ class SetCardModel {
+ public:
+ static SetCardModel &GetInstance(void);
+ uint8_t *GetCardShowList(void);
+ uint8_t GetCardShowCount(void) const;
+ void InitCardShowList(void);
+ void SetSelectedCardIndex(uint8_t cardIndex);
+ uint8_t GetSelectedCardIndex(void) const;
+ void DeleteCardSetting(void);
+ void SetSelectedCard(uint8_t cardId);
+ uint8_t GetSelectedCard(void);
+ private:
+ SetCardModel();
+ SetCardModel(const SetCardModel &);
+ SetCardModel &operator=(const SetCardModel &);
+ virtual ~SetCardModel();
+
+ uint8_t cardShowList[CARD_SETTING_COUNT_MAX] = { 0 };
+ uint8_t cardShowCount{0};
+ uint8_t selectedCardIndex{0};
+ uint8_t selectedCardId{MAX_CARD};
+ };
+}
+
+#endif // SET_CARD_MODEL_H
\ No newline at end of file
--- /dev/null
+/**\r
+ * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.\r
+ * Description:\r
+ * Author:\r
+ * Create:\r
+ */\r
+\r
+#ifndef SET_CARD_NO_CARD_VIEW_H\r
+#define SET_CARD_NO_CARD_VIEW_H\r
+\r
+#include "components/ui_image_view.h"\r
+#include "components/ui_label.h"\r
+#include "components/ui_label_button.h"\r
+#include "SetCardPresenter.h"\r
+\r
+namespace OHOS {\r
+class SetCardNoCardView : public UIViewGroup {\r
+public:\r
+ SetCardNoCardView(SetCardPresenter *presenter);\r
+ ~SetCardNoCardView() override;\r
+ bool InitView();\r
+private:\r
+ SetCardPresenter *presenter_;\r
+ UILabelButton addBtn;\r
+};\r
+}\r
+#endif
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetCardPresenter.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef SET_CARD_PRESENTER_H
+#define SET_CARD_PRESENTER_H
+
+#include "Presenter.h"
+#include "components/ui_list.h"
+#include "components/ui_view.h"
+#include "KeyInputListener.h"
+#include "ModelListenerSample.h"
+
+namespace OHOS {
+
+static const char *SET_CARD_ADD = "setcardadd";
+static const char *SET_CARD_DEL = "setcarddel";
+static const char *SET_CARD_DEL_CONFIRM = "setcarddelconfirm";
+static const char *SET_CARD_DEL_CANCEL = "setcarddelcancel";
+static const char *SET_CARD_IMG = "setcardimg";
+
+const uint16_t MISS_SET_CARD_OPERATION_TIME = 3000;
+
+class SetCardView;
+class SetCardModel;
+class SetCardPresenter : public Presenter<SetCardView>,
+ public UIView::OnClickListener, public ModelListenerSample,
+ public ListScrollListener {
+public:
+ SetCardPresenter();
+ ~SetCardPresenter() override;
+
+ void OnStart() override;
+ void OnResume() override;
+ void OnStop() override;
+ bool OnClick(UIView &view, const ClickEvent &event) override;
+ void OnScrollStart(int16_t index, UIView *view) override;
+ void OnScrollEnd(int16_t index, UIView *view) override;
+ void OnItemSelected(int16_t index, UIView* view) override;
+ void OnTickEvent() override;
+ void Notify() override {}
+ void InitCardShowList(void);
+ uint8_t *GetCardShowList(void);
+ uint8_t GetCardShowCount(void) const;
+ void SetSelectedCard(uint8_t cardId);
+ uint8_t GetSelectedCard(void);
+ void SetSelectedCardIndex(uint8_t cardIndex);
+private:
+ void GoToMainView(void);
+ void ResetTickTimer(void);
+ KeyInputListener *keyActListenr{nullptr};
+ SetCardModel *model{nullptr};
+ uint64_t startTime{0};
+};
+}
+
+#endif // SET_CARD_PRESENTER_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetCardView.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef SET_CARD_VIEW_H
+#define SET_CARD_VIEW_H
+
+#include "View.h"
+#include "components/ui_view_group.h"
+#include "components/ui_label.h"
+#include "components/ui_image_view.h"
+#include "components/ui_toggle_button.h"
+#include "window/window.h"
+#include "BaseView.h"
+#include "ChangeSliceListener.h"
+#include "UiConfig.h"
+#include "SetCardAdapter.h"
+#include "SetCardModel.h"
+#include "SetCardDeleteView.h"
+#include "SetCardNoCardView.h"
+
+namespace OHOS {
+class SetCardPresenter;
+
+class SetCardView : public View<SetCardPresenter> {
+public:
+ SetCardView();
+ ~SetCardView() override;
+
+ static SetCardView *GetInstance()
+ {
+ static SetCardView instance;
+ return &instance;
+ }
+
+ void OnStart() override;
+ void OnSetUpView() override;
+ void OnTearDownView() override;
+ void OnStop() override;
+ void ShowDeleteView(bool show);
+ void ShowAddView(bool show);
+ void RefreshCardList(void);
+ void SaveSelectCardIndex(void);
+private:
+ void SetUpListInfo(void);
+ void SetUpListView(void);
+ void SetUpDeleteView(void);
+ void SetUpAddView(void);
+ void ShowCardListView(bool show);
+ UIImageView addImg_;
+ UIList contentList_;
+ UIImageView delImg_;
+
+ SetCardDeleteView *deleteView_{nullptr};
+ SetCardNoCardView *noCardView_{nullptr};
+ SetCardAdapter *setCardAdapter_{nullptr};
+ uint32_t scrollIndex_{0};
+};
+}
+#endif // SET_CARD_VIEW_H
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetCardAdapter.cpp
+ * Author:
+ * Create: 2021-09-18
+ */
+
+#include "SetCardAdapter.h"
+
+namespace OHOS {
+SetCardAdapter::SetCardAdapter() {}
+
+SetCardAdapter::~SetCardAdapter()
+{
+ listData_.clear();
+}
+
+uint16 SetCardAdapter::GetCount(void)
+{
+ return listData_.size();
+}
+
+void SetCardAdapter::ClearItem(void)
+{
+ listData_.clear();
+}
+
+UIView *SetCardAdapter::GetView(UIView *inView, int16 index)
+{
+ if (index >= (int16)listData_.size() || index < 0) {
+ return nullptr;
+ }
+
+ std::list<CardInfo>::iterator it = listData_.begin();
+ for (int i = 0; i < index; i++) {
+ it++;
+ }
+
+ SetCardItem *item = nullptr;
+ if (inView == nullptr) {
+ item = new SetCardItem();
+ if (item == nullptr) {
+ return nullptr;
+ }
+ } else {
+ item = static_cast<SetCardItem *>(inView);
+ }
+
+ item->SetItemInfo(*it);
+ item->SetViewIndex(index);
+ item->SetOnClickListener(itemClickListener_);
+ return item;
+}
+
+void SetCardAdapter::AddListItem(const CardInfo &item)
+{
+ listData_.push_back(item);
+}
+} // namespace OHOS
--- /dev/null
+/**\r
+ * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.\r
+ * Description.\r
+ * Author:\r
+ * Create:\r
+ */\r
+\r
+#include "UiConfig.h"\r
+#include <string>\r
+#include "cmsis_os.h"\r
+#include "SetCardDeleteView.h"\r
+\r
+namespace OHOS {\r
+\r
+SetCardDeleteView::SetCardDeleteView(SetCardPresenter *presenter)\r
+{\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardDeleteView::SetCardDeleteView");\r
+ presenter_ = presenter;\r
+ SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
+ SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
+ InitView();\r
+ Add(&confirmBtn);\r
+ Add(&cancelBtn);\r
+}\r
+\r
+SetCardDeleteView::~SetCardDeleteView()\r
+{\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardDeleteView::~SetCardDeleteView");\r
+ Remove(&confirmBtn);\r
+ Remove(&cancelBtn);\r
+}\r
+\r
+bool SetCardDeleteView::InitView()\r
+{\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardDeleteView::InitView");\r
+ confirmBtn.SetPosition(184, 118);\r
+ confirmBtn.Resize(86, 50);\r
+ confirmBtn.SetViewId(SET_CARD_DEL_CONFIRM);\r
+ confirmBtn.SetText("删除");\r
+ confirmBtn.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
+ confirmBtn.SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+ confirmBtn.SetOnClickListener(presenter_);\r
+\r
+ cancelBtn.SetPosition(186, 231);\r
+ cancelBtn.Resize(82, 50);\r
+ cancelBtn.SetViewId(SET_CARD_DEL_CANCEL);\r
+ cancelBtn.SetText("取消");\r
+ cancelBtn.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
+ cancelBtn.SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+ cancelBtn.SetOnClickListener(presenter_);\r
+ return true;\r
+}\r
+}
\ No newline at end of file
--- /dev/null
+#include "SetCardItem.h"\r
+#include "SetCardPresenter.h"\r
+#include "wearable_log.h"\r
+\r
+namespace OHOS {\r
+ SetCardItem::SetCardItem()\r
+ {\r
+ SetPosition(0, 0, 454, 280);\r
+ SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
+ SetUpChild();\r
+ Add(&cardImg_);\r
+ }\r
+\r
+ SetCardItem::~SetCardItem()\r
+ {\r
+ Remove(&cardImg_);\r
+ }\r
+\r
+ void SetCardItem::SetUpChild()\r
+ {\r
+ cardImg_.SetPosition(87, 0);\r
+ cardImg_.Resize(280, 280);\r
+ cardImg_.SetResizeMode(UIImageView::FILL);\r
+ cardImg_.SetStyle(STYLE_IMAGE_OPA, OPA_OPAQUE);\r
+ }\r
+\r
+ void SetCardItem::SetItemInfo(const CardInfo &cardInfo)\r
+ {\r
+ cardInfo_ = cardInfo;\r
+ cardImg_.SetSrc(cardInfo.cardImg);\r
+ cardImg_.SetViewId(SET_CARD_IMG);\r
+ }\r
+\r
+ void SetCardItem::SetOnClickListener(OnClickListener *onClickListener)\r
+ {\r
+ cardImg_.SetOnClickListener(onClickListener);\r
+ cardImg_.SetTouchable(true);\r
+ }\r
+};\r
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetCardModel.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include "SetCardModel.h"
+#include "MainModel.h"
+#include "kv_store.h"
+#include "securec.h"
+
+namespace OHOS {
+ SetCardModel::SetCardModel() {}
+
+ SetCardModel::~SetCardModel() {}
+
+ SetCardModel &SetCardModel::GetInstance()
+ {
+ static SetCardModel instance;
+ return instance;
+ }
+
+ void SetCardModel::InitCardShowList(void)
+ {
+ MainModel::GetInstance().InitCardSettings();
+ uint8_t cardCount = MainModel::GetInstance().GetCardSettingCount();
+ CardId *cardSettings = MainModel::GetInstance().GetCardSettings();
+ cardShowCount = 0;
+ for (uint8_t i = 0; i < cardCount; i++) {
+ if (cardSettings[i] == WATCH_FACE) {
+ continue;
+ }
+ cardShowList[cardShowCount++] = cardSettings[i];
+ }
+ }
+
+ uint8_t *SetCardModel::GetCardShowList(void)
+ {
+ return cardShowList;
+ }
+
+ uint8_t SetCardModel::GetCardShowCount(void) const
+ {
+ return cardShowCount;
+ }
+
+ void SetCardModel::SetSelectedCardIndex(uint8_t cardIndex)
+ {
+ selectedCardIndex = cardIndex;
+ }
+
+ uint8_t SetCardModel::GetSelectedCardIndex(void) const
+ {
+ return selectedCardIndex;
+ }
+
+ void SetCardModel::DeleteCardSetting(void)
+ {
+ MainModel::GetInstance().DeleteCardSetting(selectedCardIndex);
+ }
+
+ void SetCardModel::SetSelectedCard(uint8_t cardId)
+ {
+ selectedCardId = cardId;
+ }
+
+ uint8_t SetCardModel::GetSelectedCard(void)
+ {
+ return selectedCardId;
+ }
+}
--- /dev/null
+/**\r
+ * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.\r
+ * Description.\r
+ * Author:\r
+ * Create:\r
+ */\r
+\r
+#include "UiConfig.h"\r
+#include <string>\r
+#include "cmsis_os.h"\r
+#include "SetCardNoCardView.h"\r
+\r
+namespace OHOS {\r
+\r
+SetCardNoCardView::SetCardNoCardView(SetCardPresenter *presenter)\r
+{\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardNoCardView::SetCardNoCardView");\r
+ presenter_ = presenter;\r
+ SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
+ SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
+ InitView();\r
+ Add(&addBtn);\r
+}\r
+\r
+SetCardNoCardView::~SetCardNoCardView()\r
+{\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardNoCardView::~SetCardNoCardView");\r
+ Remove(&addBtn);\r
+}\r
+\r
+bool SetCardNoCardView::InitView()\r
+{\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardNoCardView::InitView");\r
+ addBtn.SetPosition(184, 118);\r
+ addBtn.Resize(86, 50);\r
+ addBtn.SetViewId(SET_CARD_ADD);\r
+ addBtn.SetText("添加");\r
+ addBtn.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
+ addBtn.SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+ addBtn.SetOnClickListener(presenter_);\r
+ return true;\r
+}\r
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetCardPresenter.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include "SetCardView.h"
+#include "SetCardModel.h"
+#include "SetCardPresenter.h"
+
+namespace OHOS {
+ SetCardPresenter::SetCardPresenter()
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::SetCardPresenter");
+ model = &SetCardModel::GetInstance();
+ ResetTickTimer();
+ }
+
+ SetCardPresenter::~SetCardPresenter()
+ {
+ if (keyActListenr != nullptr) {
+ delete keyActListenr;
+ keyActListenr = nullptr;
+ }
+ }
+
+ void SetCardPresenter::OnStart()
+ {
+ Presenter<SetCardView>::OnStart();
+ if (keyActListenr == nullptr) {
+ keyActListenr = new KeyInputListener();
+ if (keyActListenr != nullptr) {
+ RootView::GetInstance()->SetOnKeyActListener(keyActListenr);
+ } else {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ApplistPresenter::OnStart: new KeyInputListener fail");
+ }
+ }
+ }
+
+ void SetCardPresenter::OnResume(void)
+ {
+ }
+
+ void SetCardPresenter::OnStop(void)
+ {
+ RootView::GetInstance()->ClearOnKeyActListener();
+ }
+
+ bool SetCardPresenter::OnClick(UIView &view, const ClickEvent &event)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::OnClick");
+ if (strcmp(view.GetViewId(), SET_CARD_ADD) == 0) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::SET_CARD_ADD");
+ NativeAbility::GetInstance().ChangeSlice(VIEW_ADD_CARD);
+ } else if (strcmp(view.GetViewId(), SET_CARD_DEL) == 0) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::SET_CARD_DEL");
+ view_->SaveSelectCardIndex();
+ view_->ShowDeleteView(true);
+ } else if (strcmp(view.GetViewId(), SET_CARD_DEL_CONFIRM) == 0) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::SET_CARD_DEL_CONFIRM");
+ model->DeleteCardSetting();
+ view_->ShowDeleteView(false);
+ view_->RefreshCardList();
+ } else if (strcmp(view.GetViewId(), SET_CARD_DEL_CANCEL) == 0) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::SET_CARD_DEL_CANCEL");
+ view_->ShowDeleteView(false);
+ } else if (strcmp(view.GetViewId(), SET_CARD_IMG) == 0) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::SET_CARD_IMG");
+ GoToMainView();
+ }
+ ResetTickTimer();
+ return true;
+ }
+
+ void SetCardPresenter::OnScrollStart(int16_t index, UIView *view)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::OnScrollStart index = %d", index);
+ return;
+ }
+
+ void SetCardPresenter::OnScrollEnd(int16_t index, UIView *view)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::OnScrollEnd index = %d", index);
+ if (view == nullptr) {
+ return;
+ }
+ SetSelectedCardIndex(index);
+ ResetTickTimer();
+ }
+
+ void SetCardPresenter::OnItemSelected(int16_t index, UIView* view)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::OnItemSelected index = %d", index);
+ if (view == nullptr) {
+ return;
+ }
+ }
+ void SetCardPresenter::InitCardShowList(void)
+ {
+ model->InitCardShowList();
+ }
+
+ uint8_t *SetCardPresenter::GetCardShowList(void)
+ {
+ return model->GetCardShowList();
+ }
+
+ uint8_t SetCardPresenter::GetCardShowCount(void) const
+ {
+ return model->GetCardShowCount();
+ }
+
+ void SetCardPresenter::SetSelectedCard(uint8_t cardId)
+ {
+ model->SetSelectedCard(cardId);
+ }
+
+ uint8_t SetCardPresenter::GetSelectedCard(void)
+ {
+ return model->GetSelectedCard();
+ }
+
+ void SetCardPresenter::SetSelectedCardIndex(uint8_t cardIndex)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::SetSelectedCardIndex %d", cardIndex);
+ model->SetSelectedCardIndex(cardIndex);
+ }
+
+ void SetCardPresenter::GoToMainView(void)
+ {
+ uint8_t *cardSettings = model->GetCardShowList();
+ uint8_t selectIndex = model->GetSelectedCardIndex();
+ if (selectIndex < model->GetCardShowCount()) {
+ const CardInfo *info = MainModel::GetInstance().GetCardInfo(static_cast<CardId>(cardSettings[selectIndex]));
+ if (info != nullptr) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::GoToMainView %d", info->id);
+ MainModel::GetInstance().SetFromSetCardView(true);
+ MainModel::GetInstance().SetFromCardId(info->id);
+ }
+ }
+ NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE);
+ }
+
+ void SetCardPresenter::OnTickEvent()
+ {
+ uint64_t current_time = osKernelGetTick2ms();
+ if ((startTime != 0) && (current_time - startTime > MISS_SET_CARD_OPERATION_TIME)) {
+ GoToMainView();
+ }
+ }
+
+ void SetCardPresenter::ResetTickTimer(void)
+ {
+ startTime = osKernelGetTick2ms();
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetCardView.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include <string>
+#include "SetCardView.h"
+#include "SetCardPresenter.h"
+
+namespace OHOS {
+SetCardView::SetCardView():contentList_(UIList::HORIZONTAL)
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardView::SetCardView");
+}
+
+SetCardView::~SetCardView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardView::~SetCardView");
+ if (deleteView_ != nullptr) {
+ delete deleteView_;
+ deleteView_ = nullptr;
+ }
+
+ if (noCardView_ != nullptr) {
+ delete noCardView_;
+ noCardView_ = nullptr;
+ }
+
+ if (setCardAdapter_ != nullptr) {
+ delete setCardAdapter_;
+ setCardAdapter_ = nullptr;
+ }
+}
+
+void SetCardView::OnStart()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardView::OnStart");
+ View<SetCardPresenter>::OnStart();
+ SetContainerView(new UIViewGroup());
+ container_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+ setCardAdapter_ = new SetCardAdapter();
+ setCardAdapter_->SetItemClickListener(presenter_);
+ SetUpListInfo();
+ SetUpListView();
+ SetUpDeleteView();
+ SetUpAddView();
+}
+
+void SetCardView::OnSetUpView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardView::OnSetUpView");
+ View<SetCardPresenter>::OnSetUpView();
+ ShowDeleteView(false);
+ if (setCardAdapter_->GetCount() == 0) {
+ ShowAddView(true);
+ }
+}
+
+void SetCardView::OnTearDownView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardView::OnTearDownView");
+ View<SetCardPresenter>::OnTearDownView();
+}
+
+void SetCardView::OnStop()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardView::OnStop");
+ View<SetCardPresenter>::OnStop();
+ RootView::GetInstance()->ClearOnKeyActListener();
+ if (container_ != nullptr) {
+ container_->RemoveAll();
+ delete container_;
+ container_ = nullptr;
+ }
+}
+
+void SetCardView::SetUpListInfo(void)
+{
+ presenter_->InitCardShowList();
+ uint8_t num = presenter_->GetCardShowCount();
+ uint8_t *cardSettings = presenter_->GetCardShowList();
+ uint8_t selectCardId = presenter_->GetSelectedCard();
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetUpListInfo::selectCardId = %u", selectCardId);
+ setCardAdapter_->ClearItem();
+ for (uint8_t i = 0; i < num; i++) {
+ const CardInfo *info = MainModel::GetInstance().GetCardInfo(
+ static_cast<CardId>(cardSettings[i]));
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetUpListInfo::%d %s", info->id, info->cardImg);
+ if (selectCardId == info->id) {
+ presenter_->SetSelectedCardIndex(i);
+ scrollIndex_ = i;
+ presenter_->SetSelectedCard(MAX_CARD);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetUpListInfo::scrollIndex_ = %u", scrollIndex_);
+ }
+ setCardAdapter_->AddListItem(*info);
+ }
+}
+
+void SetCardView::SetUpListView(void)
+{
+ addImg_.SetPosition(187, 10);
+ addImg_.Resize(80, 80);
+ addImg_.SetResizeMode(UIImageView::FILL);
+ addImg_.SetStyle(STYLE_IMAGE_OPA, OPA_OPAQUE);
+ addImg_.SetSrc(PNG_SET_CARD_ADD);
+ addImg_.SetViewId(SET_CARD_ADD);
+ addImg_.SetVisible(false);
+
+ contentList_.SetPosition(0, 92);
+ contentList_.Resize(HORIZONTAL_RESOLUTION, 280);
+ contentList_.SetScrollBlankSize(HORIZONTAL_RESOLUTION / 2);
+ contentList_.SetSelectPosition(HORIZONTAL_RESOLUTION / 2);
+ contentList_.SetDraggable(true);
+ contentList_.SetThrowDrag(true);
+ contentList_.EnableAutoAlign(true);
+ contentList_.SetScrollStateListener(presenter_);
+ contentList_.SetMaxScrollDistance(1000);
+ contentList_.SetAdapter(setCardAdapter_);
+ contentList_.SetVisible(false);
+ contentList_.ScrollTo(scrollIndex_);
+
+ delImg_.SetPosition(187, 374);
+ delImg_.Resize(80, 80);
+ delImg_.SetResizeMode(UIImageView::FILL);
+ delImg_.SetStyle(STYLE_IMAGE_OPA, OPA_OPAQUE);
+ delImg_.SetSrc(PNG_SET_CARD_DEL);
+ delImg_.SetViewId(SET_CARD_DEL);
+ delImg_.SetVisible(false);
+
+ addImg_.SetTouchable(true);
+ addImg_.SetOnClickListener(presenter_);
+ delImg_.SetTouchable(true);
+ delImg_.SetOnClickListener(presenter_);
+
+ container_->Add(&addImg_);
+ container_->Add(&contentList_);
+ container_->Add(&delImg_);
+}
+
+void SetCardView::SetUpDeleteView(void)
+{
+ deleteView_ = new SetCardDeleteView(presenter_);
+ if (deleteView_ == nullptr) {
+ return;
+ }
+ deleteView_->SetVisible(false);
+ container_->Add(deleteView_);
+}
+
+void SetCardView::SetUpAddView(void)
+{
+ noCardView_ = new SetCardNoCardView(presenter_);
+ if (noCardView_ == nullptr) {
+ return;
+ }
+ noCardView_->SetVisible(false);
+ container_->Add(noCardView_);
+}
+
+void SetCardView::ShowCardListView(bool show)
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardView::ShowCardListView %u", show);
+ if (show) {
+ addImg_.SetVisible(true);
+ contentList_.SetVisible(true);
+ delImg_.SetVisible(true);
+ } else {
+ addImg_.SetVisible(false);
+ contentList_.SetVisible(false);
+ delImg_.SetVisible(false);
+ }
+}
+
+void SetCardView::ShowDeleteView(bool show)
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardView::ShowDeleteView %u", show);
+ if (show) {
+ ShowCardListView(false);
+ deleteView_->SetVisible(true);
+ } else {
+ ShowCardListView(true);
+ deleteView_->SetVisible(false);
+ }
+}
+
+void SetCardView::ShowAddView(bool show)
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardView::ShowAddView %u", show);
+ if (show) {
+ ShowCardListView(false);
+ noCardView_->SetVisible(true);
+ } else {
+ ShowCardListView(true);
+ noCardView_->SetVisible(false);
+ }
+}
+
+void SetCardView::RefreshCardList(void)
+{
+ contentList_.RemoveAll();
+ SetUpListInfo();
+ contentList_.RefreshList();
+ if (setCardAdapter_->GetCount() == 0) {
+ ShowAddView(true);
+ }
+}
+
+void SetCardView::SaveSelectCardIndex(void)
+{
+ uint8_t cardIdex = contentList_.GetSelectView()->GetViewIndex();
+ presenter_->SetSelectedCardIndex(cardIdex);
+}
+
+}
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetDesktopModel.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef SET_DESKTOP_MODEL_H
+#define SET_DESKTOP_MODEL_H
+
+#include <cstdint>
+#include <map>
+#include "AppViewIDs.h"
+#include "UiConfig.h"
+#include "SetDesktopPresenter.h"
+
+typedef enum {
+ APPLIST_STYLE,
+ HEXAGONS_STYLE,
+} DesktopStyle;
+
+namespace OHOS {
+ class SetDesktopModel {
+ public:
+ static SetDesktopModel &GetInstance(void);
+ DesktopStyle GetDesktopStyle(void);
+ void SetDesktopStyle(DesktopStyle style);
+ private:
+ SetDesktopModel();
+ SetDesktopModel(const SetDesktopModel &);
+ SetDesktopModel &operator=(const SetDesktopModel &);
+ virtual ~SetDesktopModel();
+ };
+}
+
+#endif // SET_DESKTOP_MODEL_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetDesktopPresenter.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef SET_DESKTOP_PRESENTER_H
+#define SET_DESKTOP_PRESENTER_H
+
+#include "Presenter.h"
+#include "components/ui_view.h"
+
+namespace OHOS {
+static const char *SET_DESKTOP_LIST = "setdesktopList";
+static const char *SET_DESKTOP_HEXAGONS = "setdesktopHexagons";
+
+class SetDesktopView;
+class SetDesktopModel;
+class SetDesktopPresenter : public Presenter<SetDesktopView>,
+ public UIView::OnClickListener,
+ public UIView::OnDragListener {
+public:
+ SetDesktopPresenter();
+ ~SetDesktopPresenter() override;
+
+ void OnStart() override;
+ void OnResume() override;
+ void OnStop() override;
+
+ bool OnClick(UIView &view, const ClickEvent &event) override;
+ bool OnDrag(UIView& view, const DragEvent& event) override;
+ bool GetHexagonsStyleState(void);
+private:
+};
+}
+
+#endif // SET_DESKTOP_PRESENTER_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetDesktopView.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef SET_DESKTOP_VIEW_H
+#define SET_DESKTOP_VIEW_H
+
+#include "View.h"
+#include "components/ui_view_group.h"
+#include "components/ui_label.h"
+#include "components/ui_image_view.h"
+#include "components/ui_toggle_button.h"
+#include "window/window.h"
+#include "BaseView.h"
+#include "ChangeSliceListener.h"
+#include "UiConfig.h"
+
+namespace OHOS {
+class SetDesktopPresenter;
+
+class SetDesktopView : public View<SetDesktopPresenter> {
+public:
+ SetDesktopView();
+ ~SetDesktopView() override;
+
+ static SetDesktopView *GetInstance()
+ {
+ static SetDesktopView instance;
+ return &instance;
+ }
+
+ void OnStart() override;
+ void OnSetUpView() override;
+ void OnTearDownView() override;
+ void OnStop() override;
+ void UpdateSelectedStyle(bool hexagonsSelected);
+private:
+ UILabel titleText;
+ UIToggleButton hexagonsBtn;
+ UIToggleButton listBtn;
+ UIImageView hexagonsImage;
+ UIImageView listImage;
+ UILabel listText;
+ UILabel hexagonsText;
+};
+}
+#endif // SET_DESKTOP_VIEW_H
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SettingModel.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include "SetDesktopModel.h"
+#include "kv_store.h"
+#include "securec.h"
+
+namespace OHOS {
+ static const int STYLE_VALUE_LEN = 32;
+ SetDesktopModel::SetDesktopModel() {}
+
+ SetDesktopModel::~SetDesktopModel() {}
+
+ SetDesktopModel &SetDesktopModel::GetInstance()
+ {
+ static SetDesktopModel instance;
+ return instance;
+ }
+
+ DesktopStyle SetDesktopModel::GetDesktopStyle(void)
+ {
+ DesktopStyle style;
+ char temp[STYLE_VALUE_LEN] = { 0 };
+ (void)UtilsGetValue("applist_style", temp, STYLE_VALUE_LEN);
+ if (strcmp(temp, "hexagons") == 0) {
+ style = HEXAGONS_STYLE;
+ } else {
+ style = APPLIST_STYLE;
+ }
+ return style;
+ }
+
+ void SetDesktopModel::SetDesktopStyle(DesktopStyle style)
+ {
+ if (style == APPLIST_STYLE) {
+ (void)UtilsSetValue("applist_style", "list");
+ } else if (style == HEXAGONS_STYLE) {
+ (void)UtilsSetValue("applist_style", "hexagons");
+ }
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SettingPresenter.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include "SetDesktopView.h"
+#include "SetDesktopModel.h"
+#include "SetDesktopPresenter.h"
+
+namespace OHOS {
+ SetDesktopPresenter::SetDesktopPresenter()
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDesktopPresenter::SetDesktopPresenter");
+ }
+
+ SetDesktopPresenter::~SetDesktopPresenter() {}
+
+ void SetDesktopPresenter::OnStart()
+ {
+ Presenter<SetDesktopView>::OnStart();
+ }
+
+ void SetDesktopPresenter::OnResume(void)
+ {
+ }
+
+ void SetDesktopPresenter::OnStop(void)
+ {
+ }
+
+ bool SetDesktopPresenter::OnDrag(UIView& view, const DragEvent& event)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDesktopPresenter::OnDrag");
+ UNUSED(view);
+ if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) &&
+ (event.GetDeltaX() > X_DRAG_OFFSET) && (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SettingPresenter::OnDrag ChangeSlice");
+ uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId();
+ NativeAbility::GetInstance().ChangeSlice(preSlice);
+ }
+ return false;
+ }
+
+ bool SetDesktopPresenter::OnClick(UIView &view, const ClickEvent &event)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDesktopPresenter::OnClick");
+ if (strcmp(view.GetViewId(), SET_DESKTOP_HEXAGONS) == 0) {
+ SetDesktopModel::GetInstance().SetDesktopStyle(HEXAGONS_STYLE);
+ } else if (strcmp(view.GetViewId(), SET_DESKTOP_LIST) == 0) {
+ SetDesktopModel::GetInstance().SetDesktopStyle(APPLIST_STYLE);
+ }
+ uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId();
+ NativeAbility::GetInstance().ChangeSlice(preSlice);
+ return true;
+ }
+
+ bool SetDesktopPresenter::GetHexagonsStyleState(void)
+ {
+ return (SetDesktopModel::GetInstance().GetDesktopStyle() == HEXAGONS_STYLE);
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetDesktopView.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include <string>
+#include "SetDesktopView.h"
+#include "SetDesktopPresenter.h"
+
+namespace OHOS {
+SetDesktopView::SetDesktopView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDesktopView::SetDesktopView");
+}
+
+SetDesktopView::~SetDesktopView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDesktopView::~SetDesktopView");
+}
+
+void SetDesktopView::OnStart()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDesktopView::OnStart");
+ View<SetDesktopPresenter>::OnStart();
+ SetContainerView(new UIViewGroup());
+ container_->SetDraggable(true);
+ container_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+ container_->SetOnDragListener(presenter_);
+ container_->SetTouchable(true);
+}
+
+void SetDesktopView::OnSetUpView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDesktopView::OnSetUpView");
+ View<SetDesktopPresenter>::OnSetUpView();
+
+ titleText.SetPosition(180, 45, 260, 110);
+ titleText.SetText("桌面");
+ titleText.SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);
+ titleText.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40);
+ titleText.SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+ container_->Add(&titleText);
+
+ listImage.SetPosition(25, 135, 190, 190);
+ listImage.SetSrc(PNG_SET_DESKTOP_BG_IMAGE);
+ container_->Add(&listImage);
+
+ listBtn.SetPosition(47, 157, 148, 148);
+ listBtn.SetImages(PNG_SET_DESKTOP_LIST_IMAGE, PNG_SET_DESKTOP_LIST_IMAGE);
+ listBtn.SetViewId(SET_DESKTOP_LIST);
+ container_->Add(&listBtn);
+
+ listText.SetPosition(96, 328, 200, 60);
+ listText.SetText("列表");
+ listText.SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);
+ listText.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+ listText.SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+ container_->Add(&listText);
+
+ hexagonsImage.SetPosition(247, 135, 190, 190);
+ hexagonsImage.SetSrc(PNG_SET_DESKTOP_BG_IMAGE);
+ container_->Add(&hexagonsImage);
+
+ hexagonsBtn.SetPosition(267, 157, 148, 148);
+ hexagonsBtn.SetImages(PNG_SET_DESKTOP_HEXAGONS_IMAGE, PNG_SET_DESKTOP_HEXAGONS_IMAGE);
+ hexagonsBtn.SetViewId(SET_DESKTOP_HEXAGONS);
+ container_->Add(&hexagonsBtn);
+
+ hexagonsText.SetPosition(305, 328, 200, 60);
+ hexagonsText.SetText("蜂窝");
+ hexagonsText.SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);
+ hexagonsText.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+ hexagonsText.SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+ container_->Add(&hexagonsText);
+
+ listBtn.SetOnClickListener(presenter_);
+ hexagonsBtn.SetOnClickListener(presenter_);
+ UpdateSelectedStyle(presenter_->GetHexagonsStyleState());
+}
+
+void SetDesktopView::OnTearDownView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDesktopView::OnTearDownView");
+ View<SetDesktopPresenter>::OnTearDownView();
+}
+
+void SetDesktopView::OnStop()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDesktopView::OnStop");
+ View<SetDesktopPresenter>::OnStop();
+ if (container_ != nullptr) {
+ container_->RemoveAll();
+ delete container_;
+ container_ = nullptr;
+ }
+}
+
+void SetDesktopView::UpdateSelectedStyle(bool hexagonsSelected)
+{
+ listImage.SetVisible(!hexagonsSelected);
+ hexagonsImage.SetVisible(hexagonsSelected);
+ hexagonsBtn.SetState(hexagonsSelected);
+ listBtn.SetState(!hexagonsSelected);
+}
+}
--- /dev/null
+/*\r
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.\r
+ * Description: SetDialInfo.h\r
+ * Author:\r
+ * Create: 2021-11-23\r
+ */\r
+\r
+#ifndef SET_DIAL_INFO_H\r
+#define SET_DIAL_INFO_H\r
+#include <cstdint>\r
+#include <vector>\r
+#include <string>\r
+#include "common/image_cache_manager.h"\r
+namespace OHOS {\r
+ typedef struct {\r
+ uint8_t dialFlag; /* 1:离线表盘 0:预制表盘 */\r
+ uint8_t id; /* 仅预制表盘使用 */\r
+ std::string dialFullName; /* 仅离线表盘使用 */\r
+ std::string imageFullName; /* 仅预制表盘使用 */\r
+ std::string dialName;\r
+ std::string description; /* 仅离线表盘使用 */\r
+ ImageInfo *preImageInfo;\r
+ } SetDialInfo;\r
+}\r
+#endif
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetDialModel.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef SET_DIAL_MODEL_H
+#define SET_DIAL_MODEL_H
+#include "AppViewIDs.h"
+#include "UiConfig.h"
+#include "SetDialInfo.h"
+
+namespace OHOS {
+ class SetDialModel {
+ public:
+ static SetDialModel &GetInstance(void);
+ void LoadAllDial(void);
+ size_t GetDialCount(void);
+ std::vector<SetDialInfo>& GetDialInfo(void);
+ void SaveDialSetting(uint8_t pageIndex);
+ uint8_t GetPageIndex(void);
+ private:
+ void LoadAllDialFromRam(void);
+ void LoadAllDialFromFs(void);
+ SetDialModel();
+ SetDialModel(const SetDialModel &);
+ SetDialModel &operator=(const SetDialModel &);
+ virtual ~SetDialModel();
+ int32_t ParseDialHeader(const std::string &dialFileName, SetDialInfo &dialInfo);
+ std::vector<SetDialInfo> dialInfoList;
+ };
+}
+
+#endif // SET_DIAL_MODEL_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetDialPresenter.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef SET_DIAL_PRESENTER_H
+#define SET_DIAL_PRESENTER_H
+#include "SetDialInfo.h"
+#include "SetDialModel.h"
+#include "Presenter.h"
+#include "components/ui_view.h"
+#include "KeyInputListener.h"
+#include "ModelListenerSample.h"
+
+namespace OHOS {
+
+const uint16_t MISS_DIAL_OPERATION_TIME = 3000;
+
+class SetDialView;
+class SetDialModel;
+class SetDialPresenter : public Presenter<SetDialView>,
+ public UIView::OnClickListener, public ModelListenerSample,
+ public UICoverflowView::OnCoverflowScrollListener {
+public:
+ SetDialPresenter();
+ ~SetDialPresenter() override;
+ size_t GetDialCount(void);
+ std::vector<SetDialInfo>& GetDialInfo(void);
+ uint8_t GetPageIndex(void);
+ void OnStart() override;
+ void OnResume() override;
+ void OnStop() override;
+ void OnTickEvent() override;
+ void Notify() override {}
+ bool OnScroll() override;
+ bool OnClick(UIView &view, const ClickEvent &event) override;
+ void ResetTickTimer(void);
+private:
+ void OnClickAction(void);
+ KeyInputListener *keyActListenr{nullptr};
+ SetDialModel *model{nullptr};
+ uint64_t startTime{0};
+};
+}
+
+#endif // SET_DIAL_PRESENTER_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetDialView.h
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#ifndef SET_DIAL_VIEW_H
+#define SET_DIAL_VIEW_H
+
+#include "View.h"
+#include "components/ui_view_group.h"
+#include "components/ui_coverflow_view.h"
+#include "window/window.h"
+#include "BaseView.h"
+#include "ChangeSliceListener.h"
+#include "UiConfig.h"
+
+namespace OHOS {
+static constexpr uint8_t DIVISOR_TWO = 2;
+class SetDialPresenter;
+
+class SetDialView : public View<SetDialPresenter> {
+public:
+ SetDialView();
+ ~SetDialView() override;
+
+ static SetDialView *GetInstance()
+ {
+ static SetDialView instance;
+ return &instance;
+ }
+
+ void OnStart() override;
+ void OnSetUpView() override;
+ void OnTearDownView() override;
+ void OnStop() override;
+ void CoverflowViewScroll(void);
+ uint8_t GetCoverflowPage(void);
+private:
+ void SetUpCoverflowView(void);
+ UICoverflowView coverflow_;
+ UILabel label_;
+ uint8_t lastIndex_;
+};
+}
+#endif // SET_DIAL_VIEW_H
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetDialModel.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include "MainModel.h"
+#include "SetDialModel.h"
+#include "kv_store.h"
+#include "securec.h"
+#include "dirent.h"
+#include "DialBinParser.h"
+#include "wearable_log.h"
+
+namespace OHOS {
+ SetDialModel::SetDialModel() {}
+
+ SetDialModel::~SetDialModel() {}
+
+ SetDialModel &SetDialModel::GetInstance()
+ {
+ static SetDialModel instance;
+ return instance;
+ }
+ void SetDialModel::LoadAllDial()
+ {
+ dialInfoList.clear();
+ LoadAllDialFromRam();
+ LoadAllDialFromFs();
+ }
+
+ void SetDialModel::LoadAllDialFromRam()
+ {
+ for (uint8_t i = DIAL_CLOCK; i < DIAL_MAX; i++) {
+ const DialInfo *info = MainModel::GetInstance().GetDialInfo((DialId)i);
+ if (info != nullptr) {
+ SetDialInfo dialInfo{0};
+ dialInfo.dialFlag = 0;
+ dialInfo.id = i;
+ dialInfo.dialName = info->dialName;
+ dialInfo.imageFullName = info->dialImg;
+ ImageInfo* imageInfo = ImageCacheManager::GetInstance().LoadSingleRes(info->dialImg, false);
+ if (info == nullptr) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "LoadAllDialFromRam loadimage %s fail",
+ info->dialImg);
+ continue;
+ }
+ dialInfo.preImageInfo = imageInfo;
+ dialInfoList.push_back(dialInfo);
+ }
+ }
+ }
+
+ void SetDialModel::LoadAllDialFromFs()
+ {
+ int ret;
+ struct dirent *direntp;
+
+ // 打开目录
+ DIR *dirp = opendir(APP_DIAL_PATH);
+ // 遍历文件
+ if (dirp != nullptr) {
+ while ((direntp = readdir(dirp)) != nullptr) {
+ SetDialInfo dialInfo{0};
+ int ret = ParseDialHeader(direntp->d_name, dialInfo);
+ if (ret == 0) {
+ dialInfoList.push_back(dialInfo);
+ }
+ }
+ }
+ // 关闭目录
+ closedir(dirp);
+ return;
+ }
+
+ int32_t SetDialModel::ParseDialHeader(const std::string &dialFileName, SetDialInfo &dialInfo)
+ {
+ std::string dialFullName = APP_DIAL_PATH;
+ dialFullName += "/";
+ dialFullName += dialFileName;
+ FILE *fp = fopen(dialFullName.c_str(), "rb");
+ if (fp == nullptr) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader cannot open file: %s",
+ dialFullName.c_str());
+ return -1;
+ }
+ DialPreviewInfo preInfo{0};
+ bool ret = DialBinParser::GetInstance()->GetDialPreviewInfo(fp, &preInfo);
+ if (!ret) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GetDialPreviewInfo %s fail",
+ dialFullName.c_str());
+ return -1;
+ }
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader dialFullName: %s",
+ dialFullName.c_str());
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader dialName: %s",
+ preInfo.dialName);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader description: %s",
+ preInfo.description);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader previewImgId: %u",
+ preInfo.imgId);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader imageOffset: %u",
+ preInfo.offset);
+ ImageInfo *info = ImageCacheManager::GetInstance().LoadOneInMultiRes(
+ preInfo.imgId, dialFullName, fp, false, preInfo.offset);
+ if (info == nullptr) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader loadimage fail");
+ return -1;
+ }
+
+ dialInfo.dialFlag = 1;
+ dialInfo.id = 0;
+ dialInfo.dialFullName = dialFullName;
+ dialInfo.dialName = preInfo.dialName;
+ dialInfo.description = preInfo.description;
+ dialInfo.preImageInfo = info;
+
+ fclose(fp);
+ return 0;
+ }
+
+ void SetDialModel::SaveDialSetting(uint8_t pageIndex)
+ {
+ if (pageIndex >= dialInfoList.size()) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialModel SaveDialSetting [%u %u]",
+ pageIndex, dialInfoList.size());
+ return;
+ }
+ DialSetting diagSetting;
+ SetDialInfo &info = dialInfoList[pageIndex];
+ diagSetting.dialFlag = info.dialFlag;
+ diagSetting.dialId = info.id;
+ diagSetting.dialFullName = info.dialFullName;
+ MainModel::GetInstance().AddDialSetting(diagSetting);
+ }
+
+ size_t SetDialModel::GetDialCount(void)
+ {
+ return dialInfoList.size();
+ }
+
+ std::vector<SetDialInfo>& SetDialModel::GetDialInfo(void)
+ {
+ return dialInfoList;
+ }
+
+ uint8_t SetDialModel::GetPageIndex(void)
+ {
+ uint8_t index = 0;
+ DialSetting dialSetting = MainModel::GetInstance().GetDialSetting();
+ for (auto iter : dialInfoList) {
+ if (dialSetting.dialFlag) {
+ if (strcmp(iter.dialFullName.c_str(), dialSetting.dialFullName.c_str()) == 0) {
+ break;
+ }
+ } else {
+ if (iter.id == dialSetting.dialId ) {
+ break;
+ }
+ }
+ index++;
+ }
+ if (index >= dialInfoList.size()) {
+ return 0;
+ } else {
+ return index;
+ }
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetDialPresenter.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include "SetDialView.h"
+#include "SetDialModel.h"
+#include "SetDialPresenter.h"
+
+namespace OHOS {
+ SetDialPresenter::SetDialPresenter()
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialPresenter::SetDialPresenter");
+ model = &SetDialModel::GetInstance();
+ model->LoadAllDial();
+ ResetTickTimer();
+ }
+
+ SetDialPresenter::~SetDialPresenter()
+ {
+ if (keyActListenr != nullptr) {
+ delete keyActListenr;
+ keyActListenr = nullptr;
+ }
+ }
+
+ void SetDialPresenter::OnStart()
+ {
+ Presenter<SetDialView>::OnStart();
+ if (keyActListenr == nullptr) {
+ keyActListenr = new KeyInputListener();
+ if (keyActListenr != nullptr) {
+ RootView::GetInstance()->SetOnKeyActListener(keyActListenr);
+ } else {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ApplistPresenter::OnStart: new KeyInputListener fail");
+ }
+ }
+ }
+
+ void SetDialPresenter::OnResume(void)
+ {
+ }
+
+ void SetDialPresenter::OnStop(void)
+ {
+ }
+
+ void SetDialPresenter::OnClickAction(void)
+ {
+ uint8_t pageIndex = view_->GetCoverflowPage();
+ model->SaveDialSetting(pageIndex);
+ NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE);
+ }
+
+ bool SetDialPresenter::OnClick(UIView &view, const ClickEvent &event)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialPresenter::OnClick");
+ OnClickAction();
+ return true;
+ }
+
+ bool SetDialPresenter::OnScroll()
+ {
+ view_->CoverflowViewScroll();
+ return true;
+ }
+
+ size_t SetDialPresenter::GetDialCount(void)
+ {
+ return model->GetDialCount();
+ }
+
+ std::vector<SetDialInfo>& SetDialPresenter::GetDialInfo(void)
+ {
+ return model->GetDialInfo();
+ }
+
+ uint8_t SetDialPresenter::GetPageIndex(void)
+ {
+ return model->GetPageIndex();
+ }
+
+ void SetDialPresenter::OnTickEvent()
+ {
+ uint64_t current_time = osKernelGetTick2ms();
+ if ((startTime != 0) && (current_time - startTime > MISS_DIAL_OPERATION_TIME)) {
+ OnClickAction();
+ }
+ }
+
+ void SetDialPresenter::ResetTickTimer(void)
+ {
+ startTime = osKernelGetTick2ms();
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: SetDialView.cpp
+ * Author:
+ * Create: 2021-11-23
+ */
+
+#include <string>
+#include "SetDialView.h"
+#include "SetDialPresenter.h"
+
+namespace OHOS {
+SetDialView::SetDialView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialView::SetDialView");
+}
+
+SetDialView::~SetDialView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialView::~SetDialView");
+}
+
+void SetDialView::OnStart()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialView::OnStart");
+ View<SetDialPresenter>::OnStart();
+ SetContainerView(new UIViewGroup());
+ container_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+ SetUpCoverflowView();
+}
+
+void SetDialView::SetUpCoverflowView(void)
+{
+ coverflow_.SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+ coverflow_.SetIntercept(true);
+ coverflow_.SetOnCoverflowListener(presenter_);
+ coverflow_.SetOnClickListener(presenter_);
+ std::vector<SetDialInfo> &dialInfo = presenter_->GetDialInfo();
+ for (auto iter : dialInfo) {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialView::SetUpCoverflowView %s",
+ iter.dialName.c_str());
+ coverflow_.Add(iter.dialName.c_str(), iter.preImageInfo);
+ }
+ lastIndex_ = presenter_->GetPageIndex();
+ coverflow_.SetCurrentPage(lastIndex_);
+
+ label_.SetPosition(127, 50, 200, 50);
+ label_.SetTextColor(Color::White());
+ label_.SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+ label_.SetText(dialInfo[lastIndex_].dialName.c_str());
+ label_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+
+ container_->Add(&coverflow_);
+ container_->Add(&label_);
+}
+
+void SetDialView::OnSetUpView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialView::OnSetUpView");
+ View<SetDialPresenter>::OnSetUpView();
+}
+
+void SetDialView::OnTearDownView()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialView::OnTearDownView");
+ View<SetDialPresenter>::OnTearDownView();
+}
+
+void SetDialView::OnStop()
+{
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialView::OnStop");
+ View<SetDialPresenter>::OnStop();
+ if (container_ != nullptr) {
+ container_->RemoveAll();
+ delete container_;
+ container_ = nullptr;
+ }
+}
+
+void SetDialView::CoverflowViewScroll(void)
+{
+ int16_t contMidX = static_cast<int16_t>(Screen::GetInstance().GetWidth() / DIVISOR_TWO);
+ int16_t minOffset = contMidX;
+ uint8_t newCenterIndex = lastIndex_;
+ for (uint8_t i = 0; i < coverflow_.GetChildrenNumber(); i++) {
+ Rect rect = coverflow_.GetViewByIndex(i)->GetOrigRect();
+ int16_t x = rect.GetLeft();
+ int16_t x1 = rect.GetRight();
+ int16_t xMid = static_cast<int16_t>(x + (x1 - x + 1) / DIVISOR_TWO);
+ int16_t distance = MATH_ABS(xMid - contMidX);
+ if (distance < minOffset) {
+ newCenterIndex = i;
+ minOffset = distance;
+ }
+ }
+ if (newCenterIndex != lastIndex_) {
+ lastIndex_ = newCenterIndex;
+ std::vector<SetDialInfo> &dialInfo = presenter_->GetDialInfo();
+ label_.SetText(dialInfo[lastIndex_].dialName.c_str());
+ }
+
+ Rect curViewRect = coverflow_.GetViewByIndex(lastIndex_)->GetOrigRect();
+ int16_t centerMid = curViewRect.GetLeft() + curViewRect.GetWidth() / DIVISOR_TWO;
+ int16_t offset = MATH_ABS(contMidX - centerMid);
+ if (offset > curViewRect.GetWidth() / DIVISOR_TWO) {
+ label_.SetStyle(STYLE_TEXT_OPA, 0);
+ } else {
+ uint8_t alpha = (uint8_t)((1.0f - ((float)offset / (curViewRect.GetWidth() / DIVISOR_TWO))) * OPA_OPAQUE);
+ label_.SetStyle(STYLE_TEXT_OPA, alpha);
+ }
+ presenter_->ResetTickTimer();
+}
+
+uint8_t SetDialView::GetCoverflowPage(void)
+{
+ return lastIndex_;
+}
+
+}
class SettingAdapter : public AbstractAdapter {
public:
explicit SettingAdapter();
- virtual ~SettingAdapter();
+ ~SettingAdapter() override;
/* *
* @brief Sets the UIView adapter data, which is a SettingItem linked list.
* @since 1.0
* @version 1.0
*/
- virtual uint16_t GetCount(void) override;
+ uint16_t GetCount(void) override;
- virtual UIView *GetView(UIView *inView, int16_t index) override;
+ UIView *GetView(UIView *inView, int16_t index) override;
- virtual void AddListItem(const SettingItem &item);
+ void AddListItem(const SettingItem &item);
void SetItemClickListener(UIView::OnClickListener *itemclicklistener)
{
#include <cstdint>
namespace OHOS {
-/*
- * setting id.
- */
-typedef enum : uint16_t {
- // setting item index
- SETTING_ITEM_ZERO = 0x0000,
- SETTING_ITEM_ONE,
- SETTING_ITEM_TWO,
- SETTING_ITEM_THREE,
-} SettingIndex;
-
typedef struct {
- SettingIndex index;
+ AppViewId viewId;
const char *icon;
const char *label;
bool hasSecondMenu;
class SettingItemView : public UIViewGroup {
public:
explicit SettingItemView();
- virtual ~SettingItemView();
+ ~SettingItemView() override;
virtual void SetItemInfo(const SettingItem itemInfo);
virtual void SetUpChild();
- SettingIndex GetSettingIndex();
-
+ AppViewId GetViewId();
+ const char* GetIconId();
private:
- SettingItemView(const SettingItemView &);
-
UIImageView sIcon;
UILabel sLabel;
UIImageView sNextImage;
- SettingItem sItemInfo = { SETTING_ITEM_ZERO, nullptr, nullptr, false };
+ SettingItem sItemInfo = { VIEW_INVALID, nullptr, nullptr, false };
};
}
#include "SettingPresenter.h"
namespace OHOS {
+ static const uint16_t SETTING_ITEM_COUNT = 10;
class SettingModel {
public:
static SettingModel &GetInstance(void);
void InitSettingItem();
const SettingItem *GetSettinglistItems() const;
uint8_t GetSettingListNum() const;
- const std::map<SettingIndex, AppViewId> &GetSettingIdToViewId() const;
bool GetBlueToothConnectStatus(void);
void UpdateBlueToothConnectStatus(bool status);
private:
SettingModel(const SettingModel &);
SettingModel &operator=(const SettingModel &);
virtual ~SettingModel();
- static const uint16_t SETTING_ITEM_LEN = 4;
- SettingItem settings[SETTING_ITEM_LEN] = { SETTING_ITEM_ZERO, nullptr, nullptr, false };
- std::map<SettingIndex, AppViewId> settingIdToViewId;
+ SettingItem settings[SETTING_ITEM_COUNT] = { VIEW_INVALID, nullptr, nullptr, false };
+ int usedLen;
bool btConnectStatus{false};
};
}
public UIView::OnDragListener {
public:
SettingPresenter();
- virtual ~SettingPresenter();
+ ~SettingPresenter() override;
- virtual void OnStart() override;
- virtual void OnResume() override;
- virtual void OnStop() override;
+ void OnStart() override;
+ void OnResume() override;
+ void OnStop() override;
bool OnClick(UIView &view, const ClickEvent &event) override;
- virtual bool OnDrag(UIView& view, const DragEvent& event) override;
+ bool OnDrag(UIView& view, const DragEvent& event) override;
private:
SettingModel *settingModel;
};
class SettingView : public View<SettingPresenter> {
public:
SettingView();
- virtual ~SettingView();
+ ~SettingView() override;
- virtual void OnStart() override;
- virtual void OnSetUpView() override;
- virtual void OnTearDownView() override;
- virtual void OnStop() override;
+ void OnStart() override;
+ void OnSetUpView() override;
+ void OnTearDownView() override;
+ void OnStop() override;
void AddSettingItemToList(const SettingItem &item);
private:
sNextImage.SetStyle(STYLE_IMAGE_OPA, OPA_OPAQUE);
}
- SettingIndex SettingItemView::GetSettingIndex()
+ AppViewId SettingItemView::GetViewId()
{
- return sItemInfo.index;
+ return sItemInfo.viewId;
+ }
+
+ const char* SettingItemView::GetIconId()
+ {
+ return sItemInfo.icon;
}
}
\ No newline at end of file
void SettingModel::InitSettingItem()
{
- settings[0] = {SETTING_ITEM_ZERO, PNG_BLUETOOTH_STITLE, "蓝牙耳机", true};
- settings[1] = {SETTING_ITEM_ONE, PNG_CONNECT_PHONE_IMAGE, "连接手机", true};
- settings[2] = {SETTING_ITEM_TWO, PNG_SETTTING_REBOOT_IMAGE, "重启", true};
- settings[3] = {SETTING_ITEM_THREE, PNG_SETTTING_SHUTDOWN_IMAGE, "关机", true};
- settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_ZERO, VIEW_BLUETOOTH_EARPHONE));
- settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_ONE, VIEW_CONNECT_PHONE));
- settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_TWO, VIEW_REBOOT));
- settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_THREE, VIEW_REBOOT));
+ int index = 0;
+ settings[index++] = {VIEW_BLUETOOTH_EARPHONE, PNG_BLUETOOTH_STITLE, "蓝牙耳机", true};
+ settings[index++] = {VIEW_CONNECT_PHONE, PNG_CONNECT_PHONE_IMAGE, "连接手机", true};
+ settings[index++] = {VIEW_REBOOT, PNG_SETTTING_REBOOT_IMAGE, "重启", true};
+ settings[index++] = {VIEW_REBOOT, PNG_SETTTING_SHUTDOWN_IMAGE, "关机", true};
+ settings[index++] = {VIEW_SET_DESKTOP, PNG_SETTTING_DESKTOP_IMAGE, "桌面", true};
+ settings[index++] = {VIEW_SET_DIAL, PNG_SETTTING_DESKTOP_IMAGE, "表盘", true};
+ settings[index++] = {VIEW_SET_CARD, PNG_SETTTING_DESKTOP_IMAGE, "卡片", true};
+ usedLen = index;
}
const SettingItem *SettingModel::GetSettinglistItems() const
uint8_t SettingModel::GetSettingListNum() const
{
- return SETTING_ITEM_LEN;
- }
-
- const std::map<SettingIndex, AppViewId> &SettingModel::GetSettingIdToViewId() const
- {
- return settingIdToViewId;
+ return usedLen;
}
bool SettingModel::GetBlueToothConnectStatus(void)
void SettingModel::UpdateBlueToothConnectStatus(bool status)
{
btConnectStatus = status;
- if (PullUpDownView::GetInstance() != NULL) {
+ if (PullUpDownView::GetInstance() != nullptr) {
PullUpDownView::GetInstance()->UpdateBlueToothStatus(status);
}
}
{
UNUSED(event);
SettingItemView *settingItemView = static_cast<SettingItemView *>(&view);
- SettingIndex index = settingItemView->GetSettingIndex();
- if (index >= SettingModel::GetInstance().GetSettingListNum()) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SettingPresenter::OnClick is no index");
- return false;
- } else {
- if (index == SETTING_ITEM_TWO) {
+ AppViewId viewId = settingItemView->GetViewId();
+ if (viewId == VIEW_REBOOT) {
+ if (strstr(settingItemView->GetIconId(), "REBOOT") != nullptr) {
RebootModel::GetInstance()->SetSelectViewId(REBOOTDEVICE);
RebootModel::GetInstance()->SetExitsView(true);
- } else if (index == SETTING_ITEM_THREE) {
+ } else {
RebootModel::GetInstance()->SetSelectViewId(SHUTDOWNDEVICE);
RebootModel::GetInstance()->SetExitsView(true);
}
- NativeAbility::GetInstance().ChangeSlice(SettingModel::GetInstance().GetSettingIdToViewId().at(index));
- return true;
}
+ NativeAbility::GetInstance().ChangeSlice(viewId);
+ return true;
}
}
SettingView::~SettingView()
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SettingView::~SettingView");
- scrollView->RemoveAll();
- delete title;
- title = nullptr;
+ if (scrollView != nullptr) {
+ scrollView->RemoveAll();
+ delete scrollView;
+ scrollView = nullptr;
+ }
- delete listAdapter;
- listAdapter = nullptr;
+ if (title != nullptr) {
+ delete title;
+ title = nullptr;
+ }
- delete contentList;
- contentList = nullptr;
+ if (listAdapter != nullptr) {
+ delete listAdapter;
+ listAdapter = nullptr;
+ }
- delete scrollView;
- scrollView = nullptr;
+ if (contentList != nullptr) {
+ delete contentList;
+ contentList = nullptr;
+ }
- delete dragListener;
- dragListener = nullptr;
+ if (dragListener != nullptr) {
+ delete dragListener;
+ dragListener = nullptr;
+ }
}
void SettingView::OnStart()
scrollView->Add(contentList);
RootView::GetInstance()->Add(scrollView);
contentList->SetAdapter(listAdapter);
-
- Draw();
+ container_ = scrollView;
return;
}
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SettingView::OnTearDownView");
View<SettingPresenter>::OnTearDownView();
- return;
+ Draw();
}
void SettingView::OnStop()
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SettingView::OnStop");
View<SettingPresenter>::OnStop();
- if (container_ != nullptr) {
- container_->RemoveAll();
- delete container_;
- container_ = nullptr;
- }
RootView::GetInstance()->ClearOnKeyActListener();
RootView::GetInstance()->RemoveAll();
return;
class TempClickMea : public UIScrollView {\r
public:\r
TempClickMea();\r
- virtual ~TempClickMea();\r
+ ~TempClickMea() override;\r
bool InitClickMea();\r
static TempClickMea *GetInstance();\r
void RefreshClickMea(void);\r
class TempContinueWarn : public UIViewGroup {\r
public:\r
TempContinueWarn();\r
- virtual ~TempContinueWarn();\r
+ ~TempContinueWarn() override;\r
bool InitTempContinue();\r
static TempContinueWarn *GetInstance();\r
void RefreshTempContinue(void);\r
class TempExitInter : public AppGroupView {\r
public:\r
TempExitInter();\r
- virtual ~TempExitInter();\r
+ ~TempExitInter() override;\r
static TempExitInter *GetInstance();\r
bool InitView(void *caller) override;\r
private:\r
class TempExitPrompt : public UIScrollView {\r
public:\r
TempExitPrompt();\r
- virtual ~TempExitPrompt();\r
+ ~TempExitPrompt() override;\r
bool InitExitPrompt();\r
static TempExitPrompt *GetInstance();\r
private:\r
class TempInitInter : public AppGroupView {\r
public:\r
TempInitInter();\r
- virtual ~TempInitInter();\r
+ ~TempInitInter() override;\r
static TempInitInter *GetInstance();\r
bool InitView(void *caller) override;\r
private:\r
class TempJoinStudy : public UIScrollView {\r
public:\r
TempJoinStudy();\r
- virtual ~TempJoinStudy();\r
+ ~TempJoinStudy() override;\r
bool InitJoinStudy();\r
static TempJoinStudy *GetInstance();\r
private:\r
class TempLittleTip : public UIScrollView {\r
public:\r
TempLittleTip();\r
- virtual ~TempLittleTip();\r
+ ~TempLittleTip() override;\r
bool InitLittleTip();\r
static TempLittleTip *GetInstance();\r
void RefreshTip(void);\r
class TempMainView : public View<TempPresenter> {\r
public:\r
TempMainView();\r
- virtual ~TempMainView();\r
+ ~TempMainView() override;\r
static TempMainView *GetInstance(void);\r
void OnStart() override;\r
void OnSetUpView() override;\r
class TempMeaProcess : public UIScrollView {\r
public:\r
TempMeaProcess();\r
- virtual ~TempMeaProcess();\r
+ ~TempMeaProcess() override;\r
static TempMeaProcess *GetInstance();\r
bool InitMeaProcess(void);\r
void TempMeaDelayExit(void);\r
class TempMeasure : public AppGroupView {\r
public:\r
TempMeasure();\r
- virtual ~TempMeasure();\r
+ ~TempMeasure() override;\r
static TempMeasure *GetInstance();\r
bool InitView(void *caller) override;\r
private:\r
public ModelListenerSample, public UISwipeView::OnSwipeListener {\r
public:\r
TempPresenter();\r
- virtual ~TempPresenter();\r
+ ~TempPresenter() override;\r
void OnStart() override;\r
void OnPause() override;\r
void OnResume() override;\r
void ProgressNotify(void);\r
void SetTempCountMax(void);\r
void UpdateTempCount(void);\r
- virtual void Notify() override;\r
+ void Notify() override;\r
private:\r
uint8 wearListen{0};\r
int8 tempListen{-1}; // 监测隐藏界面\r
class TempPromptWear : public UIScrollView {\r
public:\r
TempPromptWear();\r
- virtual ~TempPromptWear();\r
+ ~TempPromptWear() override;\r
bool InitPromptWear();\r
static TempPromptWear *GetInstance();\r
private:\r
class TempRemindWear : public UIScrollView {\r
public:\r
TempRemindWear();\r
- virtual ~TempRemindWear();\r
+ ~TempRemindWear() override;\r
bool InitRemindWear();\r
static TempRemindWear *GetInstance();\r
private:\r
class TempReport : public AppGroupView {\r
public:\r
TempReport();\r
- virtual ~TempReport();\r
+ ~TempReport() override;\r
static TempReport *GetInstance();\r
bool InitView(void *caller) override;\r
private:\r
class TempStudyAbout : public UIScrollView {\r
public:\r
TempStudyAbout();\r
- virtual ~TempStudyAbout();\r
+ ~TempStudyAbout() override;\r
bool InitStudyAbout();\r
static TempStudyAbout *GetInstance();\r
void RefreshStudy(void);\r
class TempWarn : public UIScrollView {\r
public:\r
TempWarn();\r
- virtual ~TempWarn();\r
+ ~TempWarn() override;\r
bool InitTempWarn();\r
static TempWarn *GetInstance();\r
void RefreshTempWarn(void);\r
SetDraggable(true);\r
SetTouchable(true);\r
\r
- if (TempInitLabel() == false) {\r
+ if (!TempInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempClickMea::InitClickMea TempInitLabel() false");\r
return false;\r
}\r
- if (TempInitButton() == false) {\r
+ if (!TempInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempClickMea::InitClickMea TempInitButton() false");\r
return false;\r
}\r
SetDraggable(true);\r
SetTouchable(true);\r
\r
- if (TempInitImage() == false) {\r
+ if (!TempInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempContinueWarn::InitTempContinue TempInitImage() error");\r
return false;\r
}\r
- if (TempInitLabel() == false) {\r
+ if (!TempInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempContinueWarn::InitTempContinue TempInitLabel() error");\r
return false;\r
}\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TempExitInter::~TempExitInter");\r
RemoveAll();\r
- int labelNum, ImageNum;\r
- for (labelNum = SET_ZERO; labelNum < SET_TWO; labelNum++) {\r
+ for (int32_t labelNum = SET_ZERO; labelNum < SET_TWO; labelNum++) {\r
if (tempLabel[labelNum] != nullptr) {\r
delete tempLabel[labelNum];\r
tempLabel[labelNum] = nullptr;\r
}\r
}\r
- for (ImageNum = SET_ZERO; ImageNum < SET_FOUR; ImageNum++) {\r
+ for (int32_t ImageNum = SET_ZERO; ImageNum < SET_FOUR; ImageNum++) {\r
if (tempImage[ImageNum] != nullptr) {\r
delete tempImage[ImageNum];\r
tempImage[ImageNum] = nullptr;\r
\r
bool TempExitInter::TempInitImage(void)\r
{\r
- if (InitSimilarImage(SET_ZERO, EXIT_IMAGE_X, EXIT_IMAGE_EXIT_Y, TEMP_EXIT) == false) {\r
+ if (!InitSimilarImage(SET_ZERO, EXIT_IMAGE_X, EXIT_IMAGE_EXIT_Y, TEMP_EXIT)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempExitInter::TempInitImage new tempImage[SET_ZERO] fail");\r
return false;\r
}\r
- if (InitSimilarImage(SET_ONE, EXIT_IMAGE_X, EXIT_IMAGE_STUDY_Y, TEMP_ABOUT_STUDY) == false) {\r
+ if (!InitSimilarImage(SET_ONE, EXIT_IMAGE_X, EXIT_IMAGE_STUDY_Y, TEMP_ABOUT_STUDY)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempExitInter::TempInitImage new tempImage[SET_ONE] fail");\r
return false;\r
}\r
- if (InitSimilarImage(SET_TWO, EXIT_IMAGE_THIS_X, EXIT_THIS_Y_FIRST, PNG_SETTTING_BUTTON_IMAGE) == false) {\r
+ if (!InitSimilarImage(SET_TWO, EXIT_IMAGE_THIS_X, EXIT_THIS_Y_FIRST, PNG_SETTTING_BUTTON_IMAGE)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempExitInter::TempInitImage new tempImage[SET_TWO] fail");\r
return false;\r
}\r
- if (InitSimilarImage(SET_THREE, EXIT_IMAGE_THIS_X, EXIT_THIS_Y_SECOND, PNG_SETTTING_BUTTON_IMAGE) == false) {\r
+ if (!InitSimilarImage(SET_THREE, EXIT_IMAGE_THIS_X, EXIT_THIS_Y_SECOND, PNG_SETTTING_BUTTON_IMAGE)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempExitInter::TempInitImage new tempImage[SET_THREE] fail");\r
return false;\r
}\r
SetDraggable(true);\r
SetTouchable(true);\r
\r
- if (TempInitLabel() == false) {\r
+ if (!TempInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempExitInter::InitView TempInitLabel() false");\r
return false;\r
}\r
- if (TempInitImage() == false) {\r
+ if (!TempInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempExitInter::InitView TempInitImage() false");\r
return false;\r
}\r
SetDraggable(true);\r
SetTouchable(true);\r
\r
- if (TempInitLabel() == false) {\r
+ if (!TempInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempExitPrompt::InitExitPrompt TempInitLabel() false");\r
return false;\r
}\r
- if (TempInitImage() == false) {\r
+ if (!TempInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempExitPrompt::InitExitPrompt TempInitImage() false");\r
return false;\r
}\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TempInitInter::~TempInitInter");\r
RemoveAll();\r
- int8 stNum, ndNum;\r
- for (stNum = SET_ZERO; stNum < SET_THREE; stNum++) {\r
+ for (int8_t stNum = SET_ZERO; stNum < SET_THREE; stNum++) {\r
if (tempImage[stNum] != nullptr) {\r
delete tempImage[stNum];\r
tempImage[stNum] = nullptr;\r
}\r
}\r
- for (ndNum = SET_ZERO; ndNum < TEMP_LABEL_MAX; ndNum++) {\r
+ for (int8_t ndNum = SET_ZERO; ndNum < TEMP_LABEL_MAX; ndNum++) {\r
if (tempLabel[ndNum] != nullptr) {\r
delete tempLabel[ndNum];\r
tempLabel[ndNum] = nullptr;\r
} TempInitItem;\r
\r
static const TempInitItem tempInitItem[] = {\r
- {SET_ZERO, LABEL_ONE_X, TEMP_INIT_LABEL_TEMP_Y, TEMP_INIT_LABEL_WIDTH, TEMP_INIT_LABEL_HEIGHT,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_FONT, TEMP_INIT_TEMP_LABEL},\r
- {SET_ONE, LABEL_TWO_X, TEMP_INIT_LABEL_TEMP_Y, TEMP_INIT_LABEL_WIDTH, TEMP_INIT_LABEL_WIDTH,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_FONT, TEMP_INIT_SKIN_TEMP_LABEL},\r
- {SET_TWO, TEMP_INIT_LABEL_THREE_X, TEMP_INIT_LABEL_SKIN_Y, LABEL_THREE_WIDTH, TITLE_HEIGHT,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_SKIN_FONT, TEMP_INIT_SKIN_SMALL_LABEL},\r
- {SET_THREE, TEMP_INIT_LABEL_FOUR_X, TEMP_INIT_LABEL_THREE_Y, TITLE_WIDTH, TITLE_WIDTH,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_TITLE_FONT, TEMP_INIT_TITLE},\r
- {SET_FOUR, TEMP_INIT_LABEL_TIME_X, TEMP_INIT_LABEL_TIME_Y, TITLE_WIDTH, TITLE_HEIGHT,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_SKIN_FONT, TEMP_INIT_TITLE_TIME},\r
- {SET_FIVE, LABEL_FIVE_X, TEMP_INIT_LABEL_FIVE_Y, LABEL_FIVE_WIDTH, LABEL_FIVE_HEIGHT,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_SKIN_FONT, TEMP_INIT_LABEL_TIP},\r
+ { SET_ZERO, LABEL_ONE_X, TEMP_INIT_LABEL_TEMP_Y, TEMP_INIT_LABEL_WIDTH, TEMP_INIT_LABEL_HEIGHT,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_FONT, TEMP_INIT_TEMP_LABEL },\r
+ { SET_ONE, LABEL_TWO_X, TEMP_INIT_LABEL_TEMP_Y, TEMP_INIT_LABEL_WIDTH, TEMP_INIT_LABEL_WIDTH,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_FONT, TEMP_INIT_SKIN_TEMP_LABEL },\r
+ { SET_TWO, TEMP_INIT_LABEL_THREE_X, TEMP_INIT_LABEL_SKIN_Y, LABEL_THREE_WIDTH, TITLE_HEIGHT,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_SKIN_FONT, TEMP_INIT_SKIN_SMALL_LABEL },\r
+ { SET_THREE, TEMP_INIT_LABEL_FOUR_X, TEMP_INIT_LABEL_THREE_Y, TITLE_WIDTH, TITLE_WIDTH,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_TITLE_FONT, TEMP_INIT_TITLE },\r
+ { SET_FOUR, TEMP_INIT_LABEL_TIME_X, TEMP_INIT_LABEL_TIME_Y, TITLE_WIDTH, TITLE_HEIGHT,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_SKIN_FONT, TEMP_INIT_TITLE_TIME },\r
+ { SET_FIVE, LABEL_FIVE_X, TEMP_INIT_LABEL_FIVE_Y, LABEL_FIVE_WIDTH, LABEL_FIVE_HEIGHT,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_INIT_TEMP_SKIN_FONT, TEMP_INIT_LABEL_TIP },\r
};\r
\r
bool TempInitInter::SetBasicLabel(void)\r
return false;\r
}\r
\r
- if (TempInitImage() == false) {\r
+ if (!TempInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempInitInter::InitView TempInitImage() false");\r
return false;\r
}\r
- if (SetBasicLabel() == false) {\r
+ if (!SetBasicLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempInitInter::InitView TempInitLabel() false");\r
return false;\r
}\r
- if (SetAppendLabel() ==false) {\r
+ if (!SetAppendLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempInitInter::InitView TempLowLabel() false");\r
return false;\r
}\r
- if (TempInitButton() == false) {\r
+ if (!TempInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempInitInter::InitView TempInitButton() false");\r
return false;\r
}\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TempJoinStudy::~TempJoinStudy");\r
RemoveAll();\r
- int numLabel, numButton;\r
if (tempTitle != nullptr) {\r
delete tempTitle;\r
tempTitle = nullptr;\r
}\r
- for (numLabel = SET_ZERO; numLabel < TEMP_LABEL_MAX; numLabel++) {\r
+ for (int32_t numLabel = SET_ZERO; numLabel < TEMP_LABEL_MAX; numLabel++) {\r
if (tempLabel[numLabel] != nullptr) {\r
delete tempLabel[numLabel];\r
tempLabel[numLabel] = nullptr;\r
}\r
}\r
- for (numButton = SET_ZERO; numButton < TEMP_BUTTON_MAX; numButton++) {\r
+ for (int32_t numButton = SET_ZERO; numButton < TEMP_BUTTON_MAX; numButton++) {\r
if (tempButton[numButton] != nullptr) {\r
delete tempButton[numButton];\r
tempButton[numButton] = nullptr;\r
tempTitle->SetText(TEMP_TITLE_TEXT);\r
Add(tempTitle);\r
\r
- if (InitSimilarLabel(SET_ZERO, TEMP_LABEL_FIRST_Y, TEMP_LABEL_ONE) == false) {\r
+ if (!InitSimilarLabel(SET_ZERO, TEMP_LABEL_FIRST_Y, TEMP_LABEL_ONE)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempJoinStudy::TempInitLabel new tempLabel[SET_ZERO] error");\r
return false;\r
}\r
- if (InitSimilarLabel(SET_ONE, TEMP_LABEL_SECOND_Y, TEMP_LABEL_TWO) == false) {\r
+ if (!InitSimilarLabel(SET_ONE, TEMP_LABEL_SECOND_Y, TEMP_LABEL_TWO)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempJoinStudy::TempInitLabel new tempLabel[SET_ONE] error");\r
return false;\r
}\r
- if (InitSimilarLabel(SET_TWO, TEMP_LABEL_THIRD_Y, TEMP_LABEL_THREE) == false) {\r
+ if (!InitSimilarLabel(SET_TWO, TEMP_LABEL_THIRD_Y, TEMP_LABEL_THREE)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempJoinStudy::TempInitLabel new tempLabel[SET_ONE] error");\r
return false;\r
}\r
SetDraggable(true);\r
SetTouchable(true);\r
\r
- if (TempInitLabel() == false) {\r
+ if (!TempInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempJoinStudy::InitJoinStudy TempInitLabel() false");\r
return false;\r
}\r
- if (TempInitButton() == false) {\r
+ if (!TempInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempJoinStudy::InitJoinStudy TempInitButton() false");\r
return false;\r
}\r
} TempTipItem;\r
\r
static const TempTipItem tempTipItem[] = {\r
- {SET_ZERO, TEMP_TIP_LABEL_ONE_X, TEMP_TIP_LABEL_ONE_Y, TEMP_TIP_LABEL_TITLE_WIDTH, TEMP_TIP_LABEL_TITLE_HEIGHT,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TITLE_FONT, TEMP_TIP_LABEL_ONE},\r
- {SET_ONE, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_TWO_Y, TEMP_LABEL_WIDTH, TEMP_LABEL_HEIGHT,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_TWO},\r
- {SET_TWO, TEMP_TIP_LABEL_TITLE_X, TEMP_TIP_LABEL_THREE_Y, TEMP_TIP_LABEL_TITLE_WIDTH,\r
- TEMP_TIP_LABEL_TITLE_HEIGHT, (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TITLE_FONT, TEMP_TIP_LABEL_THREE},\r
- {SET_THREE, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_FOUR_Y, TEMP_LABEL_WIDTH, TEMP_LABEL_HEIGHT,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_FOUR},\r
- {SET_FOUR, TEMP_TIP_LABEL_TITLE_X, TEMP_TIP_LABEL_FIVE_Y, TEMP_TIP_LABEL_TITLE_WIDTH,\r
- TEMP_TIP_LABEL_TITLE_HEIGHT, (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TITLE_FONT, TEMP_TIP_LABEL_FIVE},\r
- {SET_FIVE, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_SIX_Y, TEMP_LABEL_WIDTH, TEMP_TIP_LABEL_SIX_HEIGHT,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_SIX},\r
- {SET_SIX, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_SEVEN_Y, TEMP_LABEL_WIDTH, TEMP_TIP_LABEL_SEVEN_HEIGHT,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_SEVEN},\r
- {SET_SEVEN, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_EIGHT_Y, TEMP_LABEL_WIDTH, TEMP_TIP_LABEL_SIX_HEIGHT,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_EIGHT},\r
- {SET_EIGHT, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_NIGHT_Y, TEMP_LABEL_WIDTH, TEMP_TIP_LABEL_SIX_HEIGHT,\r
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_NINE},\r
+ { SET_ZERO, TEMP_TIP_LABEL_ONE_X, TEMP_TIP_LABEL_ONE_Y, TEMP_TIP_LABEL_TITLE_WIDTH, TEMP_TIP_LABEL_TITLE_HEIGHT,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TITLE_FONT, TEMP_TIP_LABEL_ONE },\r
+ { SET_ONE, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_TWO_Y, TEMP_LABEL_WIDTH, TEMP_LABEL_HEIGHT,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_TWO },\r
+ { SET_TWO, TEMP_TIP_LABEL_TITLE_X, TEMP_TIP_LABEL_THREE_Y, TEMP_TIP_LABEL_TITLE_WIDTH,\r
+ TEMP_TIP_LABEL_TITLE_HEIGHT, (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TITLE_FONT, TEMP_TIP_LABEL_THREE },\r
+ { SET_THREE, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_FOUR_Y, TEMP_LABEL_WIDTH, TEMP_LABEL_HEIGHT,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_FOUR },\r
+ { SET_FOUR, TEMP_TIP_LABEL_TITLE_X, TEMP_TIP_LABEL_FIVE_Y, TEMP_TIP_LABEL_TITLE_WIDTH,\r
+ TEMP_TIP_LABEL_TITLE_HEIGHT, (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TITLE_FONT, TEMP_TIP_LABEL_FIVE },\r
+ { SET_FIVE, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_SIX_Y, TEMP_LABEL_WIDTH, TEMP_TIP_LABEL_SIX_HEIGHT,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_SIX },\r
+ { SET_SIX, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_SEVEN_Y, TEMP_LABEL_WIDTH, TEMP_TIP_LABEL_SEVEN_HEIGHT,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_SEVEN },\r
+ { SET_SEVEN, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_EIGHT_Y, TEMP_LABEL_WIDTH, TEMP_TIP_LABEL_SIX_HEIGHT,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_EIGHT },\r
+ { SET_EIGHT, TEMP_TIP_LABEL_X, TEMP_TIP_LABEL_NIGHT_Y, TEMP_LABEL_WIDTH, TEMP_TIP_LABEL_SIX_HEIGHT,\r
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_TIP_TEXT_FONT, TEMP_TIP_LABEL_NINE },\r
};\r
\r
bool TempLittleTip::SetBasicLabel(void)\r
SetDraggable(true);\r
SetTouchable(true);\r
\r
- if (SetBasicLabel() == false) {\r
+ if (!SetBasicLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempLittleTip::InitLittleTip SetLabel() false");\r
return false;\r
}\r
- if (SetAppendLabel() == false) {\r
+ if (!SetAppendLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempLittleTip::InitLittleTip SetAppendLabel() false");\r
return false;\r
}\r
TempMainView::~TempMainView()\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TempMainView::~TempMainView");\r
- int16 numGroup, numSwipe;\r
- for (numGroup = SET_ZERO; numGroup <= INTERFACES_MAX; numGroup++) {\r
+ for (int16_t numGroup = SET_ZERO; numGroup <= INTERFACES_MAX; numGroup++) {\r
if (container[numGroup] != nullptr) {\r
container[numGroup] = nullptr;\r
}\r
}\r
- for (numSwipe = SET_ZERO; numSwipe < SET_TWO; numSwipe++) {\r
+ for (int16_t numSwipe = SET_ZERO; numSwipe < SET_TWO; numSwipe++) {\r
if (tempSwipeList[numSwipe] != nullptr) {\r
tempSwipeList[numSwipe]->RemoveAll();\r
delete tempSwipeList[numSwipe];\r
group = container[0];\r
} else if (tempInterListen == SECOND_TIME_JOIN) {\r
AppGroupView *view[SET_TWO] = {nullptr};\r
- if (SetSwipeInter(0) == false) {\r
+ if (!SetSwipeInter(0)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::OnStart SetSwipeInter[0] null error!");\r
return;\r
}\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeMeasure");\r
if (container[thisView] == nullptr) {\r
AppGroupView *view[SET_THREE] = {nullptr};\r
- if (SetSwipeInter(SET_ZERO) == false) {\r
+ if (!SetSwipeInter(SET_ZERO)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeMeasure SetSwipeInter[0] null error!");\r
return false;\r
}\r
return false;\r
}\r
view[SET_ZERO] = tempMeasure;\r
- if (view[SET_ZERO]->InitView(this) == false) {\r
+ if (!view[SET_ZERO]->InitView(this)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeMeasure view [0] InitView null error!");\r
return false;\r
}\r
return false;\r
}\r
view[SET_ONE] = tempExitInter;\r
- if (view[SET_ONE]->InitView(this) == false) {\r
+ if (!view[SET_ONE]->InitView(this)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeMeasure view [1] InitView null error!");\r
return false;\r
}\r
return false;\r
}\r
container[thisView] = tempClickMea;\r
- if (tempClickMea->InitClickMea() == false) {\r
+ if (!tempClickMea->InitClickMea()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeClickMea InitClickMea error!");\r
return false;\r
}\r
return false;\r
}\r
container[thisView] = tempRemindWear;\r
- if (tempRemindWear->InitRemindWear() == false) {\r
+ if (!tempRemindWear->InitRemindWear()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeRemindWear InitRemindWear error!");\r
return false;\r
}\r
return false;\r
}\r
container[thisView] = tempMeaProcess;\r
- if (tempMeaProcess->InitMeaProcess() == false) {\r
+ if (!tempMeaProcess->InitMeaProcess()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeMeaProcess InitMeaProcess error!");\r
return false;\r
}\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeTempInit");\r
if (container[thisView] == nullptr) {\r
AppGroupView *view[SET_THREE] = {nullptr};\r
- if (SetSwipeInter(SET_ONE) == false) {\r
+ if (!SetSwipeInter(SET_ONE)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeMeasure SetSwipeInter[1] null error!");\r
return false;\r
}\r
return false;\r
}\r
view[SET_ZERO] = tempInitInter;\r
- if (view[SET_ZERO]->InitView(this) == false) {\r
+ if (!view[SET_ZERO]->InitView(this)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeTempInit view [0] InitView null error!");\r
return false;\r
}\r
return false;\r
}\r
view[SET_ONE] = tempExitInter;\r
- if (view[SET_ONE]->InitView(this) == false) {\r
+ if (!view[SET_ONE]->InitView(this)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeTempInit view [1] InitView null error!");\r
return false;\r
}\r
return false;\r
}\r
view[SET_TWO] = tempReport;\r
- if (view[SET_TWO]->InitView(this) == false) {\r
+ if (!view[SET_TWO]->InitView(this)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeMeasure view [2] InitView null error!");\r
return false;\r
}\r
return false;\r
}\r
container[thisView] = tempWarn;\r
- if (tempWarn->InitTempWarn() == false) {\r
+ if (!tempWarn->InitTempWarn()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::InitTempWarn tempWarn null error!");\r
return false;\r
}\r
return false;\r
}\r
container[thisView] = tempContinue;\r
- if (tempContinue->InitTempContinue() == false) {\r
+ if (!tempContinue->InitTempContinue()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::InitTempWarn tempContinue null error!");\r
return false;\r
}\r
return false;\r
}\r
container[thisView] = tempLittleTip;\r
- if (tempLittleTip->InitLittleTip() == false) {\r
+ if (!tempLittleTip->InitLittleTip()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView:: ChangeTempTip InitLittleTip null error!");\r
return false;\r
}\r
return false;\r
}\r
container[thisView] = tempExitPrompt;\r
- if (tempExitPrompt->InitExitPrompt() == false) {\r
+ if (!tempExitPrompt->InitExitPrompt()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView:: ChangeExitPrompt InitExitPrompt null error!");\r
return false;\r
}\r
return false;\r
}\r
container[thisView] = tempStudyAbout;\r
- if (tempStudyAbout->InitStudyAbout() == false) {\r
+ if (!tempStudyAbout->InitStudyAbout()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView:: ChangeStudyAbout InitStudyAbout null error!");\r
return false;\r
}\r
for (int i = 0; i < funcSize; i++) {\r
if (interface == ViewMapper[i].viewId) {\r
bool jug = (this->*(ViewMapper[i].func))(interface);\r
- if (jug == false) {\r
+ if (!jug) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainAlarmView:: ChangeInterFace[%d] false", interface);\r
return false;\r
}\r
return;\r
}\r
interListen = hideView;\r
- if (ClickFunc(showView) == false) {\r
+ if (!ClickFunc(showView)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMainView::ChangeView ClickFunc error");\r
return;\r
}\r
SetDraggable(true);\r
SetTouchable(true);\r
\r
- if (TempInitImage() == false) {\r
+ if (!TempInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMeaProcess::InitMeaProcess TempInitImage() false");\r
return false;\r
}\r
- if (TempInitLabel() == false) {\r
+ if (!TempInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMeaProcess::InitMeaProcess TempInitLabel() false");\r
return false;\r
}\r
- if (TempCirCleProcess() == false) {\r
+ if (!TempCirCleProcess()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMeaProcess::InitMeaProcess TempCirCleProcess() false");\r
return false;\r
}\r
SetTouchable(true);\r
SetOnDragListener(listener);\r
\r
- if (TempInitLabel() == false) {\r
+ if (!TempInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMeasure::InitView TempInitLabel() false");\r
return false;\r
}\r
- if (TempInitButton() == false) {\r
+ if (!TempInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMeasure::InitView TempInitButton() false");\r
return false;\r
}\r
- if (TempInitImage() == false) {\r
+ if (!TempInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempMeasure::InitView TempInitImage() false");\r
return false;\r
}\r
#include "TempMainView.h"\r
#include "ChangeSliceListener.h"\r
#include "graphic_service.h"\r
+#include "ui_service.h"\r
#include "string"\r
#include "iostream"\r
#include "sstream"\r
\r
-#include "errcode.h"\r
-#include "pm_definition.h"\r
-extern "C" errcode_t uapi_pm_add_sleep_veto(pm_id_t veto_id);\r
-extern "C" errcode_t uapi_pm_remove_sleep_veto(pm_id_t veto_id);\r
-\r
namespace OHOS {\r
static TempPresenter *g_tempPresenter = nullptr;\r
\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TempPresenter OnStart");\r
Presenter<TempMainView>::OnStart();\r
+ SendMsgToUIService(UI_ADD_SLEEP_VETO, 0, nullptr, 0);\r
}\r
\r
void TempPresenter::OnPause(void) {}\r
\r
void TempPresenter::OnResume(void) {}\r
\r
-void TempPresenter::OnStop(void) {}\r
+void TempPresenter::OnStop(void)\r
+{\r
+ SendMsgToUIService(UI_RM_SLEEP_VETO, 0, nullptr, 0);\r
+}\r
\r
bool TempPresenter::OnDrag(UIView& view, const DragEvent& event)\r
{\r
if (TempMeaProcess::GetInstance() == nullptr) {\r
return;\r
}\r
- if (TempMeaProcess::GetInstance()->GetCircleStatus() == true &&\r
+ if (TempMeaProcess::GetInstance()->GetCircleStatus() &&\r
TempMeaProcess::GetInstance()->GetCircleProgress() != nullptr) {\r
if (countTemp > 0) {\r
- if (countTemp == SET_HUNDRED) {\r
- uapi_pm_add_sleep_veto(PM_ID_SCREEN);\r
- }\r
GraphicService::GetInstance()->PostGraphicEvent(std::bind(&TempPresenter::UpdateTempCount, this));\r
} else {\r
TempMeaProcess::GetInstance()->SetCircleStatus(false);\r
TempMainView::GetInstance()->ChangeView(MEASURE_ING, MEASURE_INIT);\r
}\r
SetTempCountMax();\r
- uapi_pm_remove_sleep_veto(PM_ID_SCREEN);\r
}\r
}\r
return;\r
SetDraggable(true);\r
SetTouchable(true);\r
\r
- if (TempInitLabel() == false) {\r
+ if (!TempInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempPromptWear::InitPromptWear TempInitLabel() fail");\r
return false;\r
}\r
- if (TempInitButton() == false) {\r
+ if (!TempInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempPromptWear::InitPromptWear TempInitButton() fail");\r
return false;\r
}\r
- if (TempInitImage() == false) {\r
+ if (!TempInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempPromptWear::InitPromptWear TempInitImage() fail");\r
return false;\r
}\r
SetDraggable(true);\r
SetTouchable(true);\r
\r
- if (TempInitImage() == false) {\r
+ if (!TempInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempRemindWear::InitRemindWear TempInitImage() false");\r
return false;\r
}\r
- if (TempInitLabel() == false) {\r
+ if (!TempInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempRemindWear::InitRemindWear TempInitLabel() false");\r
return false;\r
}\r
TempReport::~TempReport()\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TempReport::~TempReport");\r
- int16 labelNum, imageNum;\r
RemoveAll();\r
- for (labelNum = 0; labelNum < TEMP_SET_SIX; labelNum++) {\r
+ for (int16_t labelNum = 0; labelNum < TEMP_SET_SIX; labelNum++) {\r
if (tempLabel[labelNum] != nullptr) {\r
delete tempLabel[labelNum];\r
tempLabel[labelNum] = nullptr;\r
}\r
}\r
- for (imageNum = 0; imageNum < SET_FIVE; imageNum++) {\r
+ for (int16_t imageNum = 0; imageNum < SET_FIVE; imageNum++) {\r
if (tempImage[imageNum] != nullptr) {\r
delete tempImage[imageNum];\r
tempImage[imageNum] = nullptr;\r
\r
bool TempReport::TempInitImage(void)\r
{\r
- if (InitSimilarImage(SET_ZERO, TEMP_IMAGE_ONE_X, TEMP_IMAGE_ONE_Y, TEMP_LITTLE_MEASURE) == false) {\r
+ if (!InitSimilarImage(SET_ZERO, TEMP_IMAGE_ONE_X, TEMP_IMAGE_ONE_Y, TEMP_LITTLE_MEASURE)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempReport::TempReport InitSimilarImage false");\r
return false;\r
}\r
- if (InitSimilarImage(SET_ONE, TEMP_IMAGE_TWO_X, TEMP_IMAGE_TWO_Y, TEMP_LIT_TIP) == false) {\r
+ if (!InitSimilarImage(SET_ONE, TEMP_IMAGE_TWO_X, TEMP_IMAGE_TWO_Y, TEMP_LIT_TIP)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempReport::TempReport InitSimilarImage false");\r
return false;\r
}\r
- if (InitSimilarImage(SET_TWO, TEMP_IMAGE_THREE_X, TEMP_IMAGE_THREE_Y, TEMP_POINT) == false) {\r
+ if (!InitSimilarImage(SET_TWO, TEMP_IMAGE_THREE_X, TEMP_IMAGE_THREE_Y, TEMP_POINT)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempReport::TempReport InitSimilarImage false");\r
return false;\r
}\r
- if (InitSimilarImage(SET_THREE, TEMP_IMAGE_FOUR_X, TEMP_IMAGE_THREE_Y, TEMP_REV_POINTER) == false) {\r
+ if (!InitSimilarImage(SET_THREE, TEMP_IMAGE_FOUR_X, TEMP_IMAGE_THREE_Y, TEMP_REV_POINTER)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempReport::TempReport InitSimilarImage false");\r
return false;\r
}\r
- if (InitSimilarImage(SET_FOUR, TEMP_FOUR_X, TEMP_IMAGE_FOUR_Y, TEMP_REPORT) == false) {\r
+ if (!InitSimilarImage(SET_FOUR, TEMP_FOUR_X, TEMP_IMAGE_FOUR_Y, TEMP_REPORT)) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempReport::TempReport InitSimilarImage false");\r
return false;\r
}\r
SetDraggable(true);\r
SetTouchable(true);\r
\r
- if (TempInitImage() == false) {\r
+ if (!TempInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempReport::InitView TempInitImage false");\r
return false;\r
}\r
- if (SetBasicLabel() == false) {\r
+ if (!SetBasicLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempReport::InitView SetBasicLabel false");\r
return false;\r
}\r
- if (SetAppendLabel() == false) {\r
+ if (!SetAppendLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempReport::InitView SetAppendLabel false");\r
return false;\r
}\r
} TempStudyItem;
static const TempStudyItem tempStudyItem[] = {
- {SET_ZERO, TEMP_LABEL_ONE_X, TEMP_LABEL_ONE_Y, TEMP_LABEL_ONE_WIDTH, TEMP_LABEL_ONE_HEIGHT,
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_LABEL_FONT, TEMP_STUDY_LABEL_ONE},
- {SET_ONE, TEMP_LABEL_TWO_X, TEMP_LABEL_TWO_Y, TEMP_LABEL_TWO_WIDTH, TEMP_LABEL_TWO_HEIGHT,
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_LABEL_FONT, TEMP_STUDY_LABEL_TWO},
- {SET_TWO, TEMP_LABEL_TWO_X, TEMP_LABEL_THREE_Y, TEMP_LABEL_TWO_WIDTH, TEMP_LABEL_TWO_HEIGHT,
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_LABEL_FONT, TEMP_STUDY_LABEL_THREE},
- {SET_THREE, TEMP_LABEL_TWO_X, TEMP_LABEL_FOUR_Y, TEMP_LABEL_TWO_WIDTH, LABEL_FOUR_HEIGHT,
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_LABEL_FONT, TEMP_STUDY_LABEL_FOUR},
- {SET_FOUR, TEMP_LABEL_TWO_X, TEMP_LABEL_FIVE_Y, TEMP_LABEL_TWO_WIDTH, TEMP_LABEL_TWO_HEIGHT,
- (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_LABEL_TIP_FONT, TEMP_STUDY_LABEL_FIVE},
+ { SET_ZERO, TEMP_LABEL_ONE_X, TEMP_LABEL_ONE_Y, TEMP_LABEL_ONE_WIDTH, TEMP_LABEL_ONE_HEIGHT,
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_LABEL_FONT, TEMP_STUDY_LABEL_ONE },
+ { SET_ONE, TEMP_LABEL_TWO_X, TEMP_LABEL_TWO_Y, TEMP_LABEL_TWO_WIDTH, TEMP_LABEL_TWO_HEIGHT,
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_LABEL_FONT, TEMP_STUDY_LABEL_TWO },
+ { SET_TWO, TEMP_LABEL_TWO_X, TEMP_LABEL_THREE_Y, TEMP_LABEL_TWO_WIDTH, TEMP_LABEL_TWO_HEIGHT,
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_LABEL_FONT, TEMP_STUDY_LABEL_THREE },
+ { SET_THREE, TEMP_LABEL_TWO_X, TEMP_LABEL_FOUR_Y, TEMP_LABEL_TWO_WIDTH, LABEL_FOUR_HEIGHT,
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_LABEL_FONT, TEMP_STUDY_LABEL_FOUR },
+ { SET_FOUR, TEMP_LABEL_TWO_X, TEMP_LABEL_FIVE_Y, TEMP_LABEL_TWO_WIDTH, TEMP_LABEL_TWO_HEIGHT,
+ (char *)DEFAULT_VECTOR_FONT_FILENAME, TEMP_LABEL_TIP_FONT, TEMP_STUDY_LABEL_FIVE },
};
bool TempStudyAbout::SetBasicLabel(void)
SetDraggable(true);
SetTouchable(true);
- if (SetBasicLabel() == false) {
+ if (!SetBasicLabel()) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempStudyAbout::InitStudyAbout SetBasicLabel() false");
return false;
}
- if (SetAppendLabel() == false) {
+ if (!SetAppendLabel()) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempStudyAbout::InitStudyAbout SetAppendLabel() false");
return false;
}
SetDraggable(true);\r
SetTouchable(true);\r
\r
- if (TempInitImage() == false) {\r
+ if (!TempInitImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempWarn::InitTempWarn TempInitImage() false");\r
return false;\r
}\r
- if (TempInitButton() == false) {\r
+ if (!TempInitButton()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempWarn::InitTempWarn TempInitButton() false");\r
return false;\r
}\r
- if (TempInitLabel() == false) {\r
+ if (!TempInitLabel()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TempWarn::InitTempWarn TempInitLabel() false");\r
return false;\r
}\r
UISampleModel(const UISampleModel &);
UISampleModel &operator=(const UISampleModel &);
virtual ~UISampleModel();
-
};
}
public UIView::OnDragListener {
public:
UISamplePresenter();
- virtual ~UISamplePresenter();
+ ~UISamplePresenter() override;
- virtual void OnStart() override;
- virtual void OnResume() override;
- virtual void OnStop() override;
+ void OnStart() override;
+ void OnResume() override;
+ void OnStop() override;
bool OnClick(UIView &view, const ClickEvent &event) override;
- virtual bool OnDrag(UIView& view, const DragEvent& event) override;
+ bool OnDrag(UIView& view, const DragEvent& event) override;
private:
UISampleModel *uisampleModel;
-
};
}
class UISampleOnDragListener : public UIView::OnDragListener {
public:
UISampleOnDragListener() {}
- virtual ~UISampleOnDragListener() {}
+ ~UISampleOnDragListener() override {}
- bool OnDrag(UIView& view, const DragEvent& event)
+ bool OnDrag(UIView& view, const DragEvent& event) override
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "UISampleOnDragListener::OnDrag");
UNUSED(view);
class UISampleView : public View<UISamplePresenter> {
public:
UISampleView();
- virtual ~UISampleView();
+ ~UISampleView();
static UISampleView *GetInstance()
{
return &instance;
}
- virtual void OnStart() override;
- virtual void OnSetUpView() override;
- virtual void OnTearDownView() override;
- virtual void OnStop() override;
+ void OnStart() override;
+ void OnSetUpView() override;
+ void OnTearDownView() override;
+ void OnStop() override;
void InitView();
private:
#include "UISampleView.h"
#include "UISampleModel.h"
#include "UISamplePresenter.h"
+#include "ui_service.h"
namespace OHOS {
UISamplePresenter::UISamplePresenter()
void UISamplePresenter::OnStart()
{
Presenter<UISampleView>::OnStart();
+ SendMsgToUIService(UI_ADD_SLEEP_VETO, 0, nullptr, 0);
}
void UISamplePresenter::OnResume(void)
{
- if (view_ == nullptr) {
- return;
- }
}
void UISamplePresenter::OnStop(void)
{
+ SendMsgToUIService(UI_RM_SLEEP_VETO, 0, nullptr, 0);
return;
}
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "UISamplePresenter::OnDrag");
UNUSED(view);
- UNUSED(event);
+ UNUSED(event);
return false;
}
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "UISamplePresenter::OnDrag");
UNUSED(view);
- UNUSED(event);
- return true;
+ UNUSED(event);
+ return true;
}
}
#include "ui_test_running_ball/ui_test_running_ball.h"
#endif
#include "ui_test_tiger/ui_test_tiger.h"
+#include "ui_test_hexagons_list/ui_test_hexagons_list.h"
#include "ui_test_video_play/ui_test_video_play.h"
+#include "ui_test_coverflow/ui_test_coverflow.h"
+#include "ui_test_kaleidoscope/ui_test_kaleidoscope.h"
namespace OHOS {
void UITestGroup::AddTestCase(TestCaseInfo testCaseInfo)
}
testCaseList_->Clear();
testCaseList_->PushBack(TestCaseInfo{"老虎头", new UITestTiger()});
+ testCaseList_->PushBack(TestCaseInfo{"蜂窝表盘", new UITestHexagonsList()});
testCaseList_->PushBack(TestCaseInfo{"滑动列表", new UITestListFPS()});
testCaseList_->PushBack(TestCaseInfo{"卡片切换", new UITestCardSwitch()});
testCaseList_->PushBack(TestCaseInfo{"立方体旋转", new UITestCubeRotate()});
testCaseList_->PushBack(TestCaseInfo{"消息", new UITestMessage()});
testCaseList_->PushBack(TestCaseInfo{"呼吸效果", new UITestBreath()});
+ testCaseList_->PushBack(TestCaseInfo{"覆盖流", new UITestCoverflow()});
+ testCaseList_->PushBack(TestCaseInfo{"万花筒", new UITestKaleidoscope()});
#if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH
testCaseList_->PushBack(TestCaseInfo{"倒计时", new UITestCountdown()});
SCREEN_TURN_ON_TO_UI,
SCREEN_TURN_OFF_TO_UI,
SCREEN_OFF_ENABLE_TO_UI,
+ UI_ADD_SLEEP_VETO,
+ UI_RM_SLEEP_VETO,
} UiServiceMsgId;
#define BUNDLE_NAME_LEN 128
#include "UiServersMsg.h"
#include "ohos_init.h"
#include "memory_adapter.h"
-#include <stdio.h>
+#include <cstdio>
#include "service_id_define.h"
#include "bundle_install_msg.h"
#include "graphic_service.h"
#include "ui_screennotify.h"
#include "HealthModel.h"
+#include "errcode.h"
+#include "pm_definition.h"
+extern "C" errcode_t uapi_pm_add_sleep_veto(pm_id_t veto_id);
+extern "C" errcode_t uapi_pm_remove_sleep_veto(pm_id_t veto_id);
+
#ifdef __cplusplus
extern "C" {
#endif
DEFAULT_IUNKNOWN_ENTRY_BEGIN,
.SendMsg = SendMsg,
DEFAULT_IUNKNOWN_ENTRY_END,
- .identity = { -1, -1, NULL },
+ .identity = { -1, -1, nullptr },
};
const int DATA_DIST_STACK_SIZE = 0xC00;
case JS_UNINSTALL_SUCESS_TO_UI:
WEARABLE_LOGI(WEARABLE_LOG_MODULE_UI_SERVICE, "bms msg_id = %d bundleName = %s",
request->msgId, ((BundleData *)request->data)->bundleName);
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&OHOS::ApplistModel::ApplistUpdate,
- &OHOS::ApplistModel::GetInstance()));
-
+ GraphicService::GetInstance()->PostGraphicEvent(
+ std::bind(&OHOS::ApplistModel::ApplistUpdate, &OHOS::ApplistModel::GetInstance()));
break;
case BT_CONNECTED_TO_UI:
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&OHOS::SettingModel::UpdateBlueToothConnectStatus,
- &OHOS::SettingModel::GetInstance(), true));
+ GraphicService::GetInstance()->PostGraphicEvent(
+ std::bind(&OHOS::SettingModel::UpdateBlueToothConnectStatus, &OHOS::SettingModel::GetInstance(), true));
break;
case BT_DISCONNECTED_TO_UI:
- GraphicService::GetInstance()->PostGraphicEvent(std::bind(&OHOS::SettingModel::UpdateBlueToothConnectStatus,
- &OHOS::SettingModel::GetInstance(), false));
+ GraphicService::GetInstance()->PostGraphicEvent(
+ std::bind(&OHOS::SettingModel::UpdateBlueToothConnectStatus, &OHOS::SettingModel::GetInstance(), false));
break;
case SCREEN_TURN_ON_TO_UI:
ScreenTurnOn(request);
case SCREEN_OFF_ENABLE_TO_UI:
ScreenOffEnable(request);
break;
-
+ case UI_ADD_SLEEP_VETO:
+ uapi_pm_add_sleep_veto(PM_ID_SCREEN);
+ break;
+ case UI_RM_SLEEP_VETO:
+ uapi_pm_remove_sleep_veto(PM_ID_SCREEN);
+ break;
}
SAMGR_FreeRequestMsg(request);
}
static int32_t SendMsg(int32_t msgId, uint32_t msgValue, void *data, int32_t dataLen)
{
Request *request = SAMGR_AllocRequestMsg(0, PLATFORM_CORE, UI_SVR_ID, dataLen);
- if (request == NULL) {
+ if (request == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "SAMGR_AllocRequestMsg failed");
return FALSE;
}
request->msgId = msgId;
request->msgValue = msgValue;
- if (data != NULL) {
+ if (data != nullptr) {
(void)memcpy_s(request->data, dataLen, data, dataLen);
}
- int32_t ret = SAMGR_SendRequest(IUNKNOWN_GetIdentity(GET_IUNKNOWN(g_uiService)), request, NULL);
+ int32_t ret = SAMGR_SendRequest(IUNKNOWN_GetIdentity(GET_IUNKNOWN(g_uiService)), request, nullptr);
if (ret != 0) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "SendMsg failed ret = %d ", ret);
return FALSE;
void SendMsgToUIService(int32_t msgId, uint32_t msgValue, void *data, int32_t dataLen)
{
- UiServiceFeatureApi *comApi = NULL;
+ UiServiceFeatureApi *comApi = nullptr;
IUnknown *iUnknown = SAMGR_GetInstance()->GetDefaultFeatureApi(UI_SERVICE);
- if (iUnknown == NULL) {
+ if (iUnknown == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "GetDefaultFeatureApi failed");
return;
}
int result = iUnknown->QueryInterface(iUnknown, DEFAULT_VERSION, (void **)&comApi);
- if (result != 0 || comApi == NULL) {
+ if (result != 0 || comApi == nullptr) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "QueryInterface comApi failed");
return;
}
void InitBroadcastFeature(void)
{
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_BROADCASE_SERVICE, "InitBroadcastFeature start!");
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_BROADCASE_SERVICE, "InitBroadcastFeature start!");
BroadcastFeature *feature = &broadcastFeature;
InitTopicSubscriberInfoImpl(&(feature->topicSubscriberInfo));
SAMGR_GetInstance()->RegisterFeature(BROADCAST_SERVICE_NAME, (Feature *)feature);
SAMGR_GetInstance()->RegisterDefaultFeatureApi(BROADCAST_SERVICE_NAME, GET_IUNKNOWN(broadcastFeature));
SAMGR_GetInstance()->RegisterFeatureApi(BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME,
GET_IUNKNOWN(broadcastFeature));
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_BROADCASE_SERVICE, "InitBroadcastFeature end!");
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_BROADCASE_SERVICE, "InitBroadcastFeature end!");
}
static const char *GetFeatureName(Feature *feature)
(void)identity;
BroadcastFeature *f = (BroadcastFeature *)feature;
Identity *id = &(f->id);
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_BROADCASE_SERVICE, "BroadcastFeature featureId=%u, queueId=%u, serviceId=%u",
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_BROADCASE_SERVICE, "BroadcastFeature featureId=%u, queueId=%u, serviceId=%u",
id->featureId, id->queueId, id->serviceId);
}
${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits/gfx_utils
${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits
${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audio_player/interfaces/kits
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audiomanager/interfaces/kits/audiomanager
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audiomanager/interfaces/kits/audiocommon
${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/player/interfaces/kits/
+ ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent
${ROOT_DIR}/middleware/utils/fs/include/fs
${ROOT_DIR}/include/middleware/services/bts/br
${ROOT_DIR}/include/middleware/services/bts/common
${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits/gfx_utils
${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits
${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audio_player/interfaces/kits
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audiomanager/interfaces/kits/audiomanager
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/audiomanager/interfaces/kits/audiocommon
${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
${ROOT_DIR}/open_source/openharmony/foundation/multimedia/player/interfaces/kits/
+ ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent
${ROOT_DIR}/middleware/utils/fs/include/fs
${ROOT_DIR}/include/middleware/services/bts/br
${ROOT_DIR}/include/middleware/services/bts/common
endif()
if("SUPPORT_ALIPAY_SEC" IN_LIST DEFINES)
-set(SOURCES
+set(SOURCES
${SOURCES}
${CMAKE_CURRENT_SOURCE_DIR}/src/vendor_app/alipay/alipay_app.cpp
)
)
build_component()
+
+
+set(COMPONENT_NAME "baidumapsdk")
+set(LIBS ${CMAKE_CURRENT_SOURCE_DIR}/libs/lib${COMPONENT_NAME}.a)
+set(WHOLE_LINK
+ true
+)
+build_component()
\ No newline at end of file
Subscriber subscriber;\r
} MsgCenter;\r
\r
-typedef void (*msg_center_notify_cb)(const Topic topic, Request* req);\r
+typedef void (*MsgCenterNotifyCb)(const Topic topic, Request* req);\r
typedef struct {\r
Topic topic;\r
- msg_center_notify_cb cb;\r
-} msg_center_notify_table_t;\r
+ MsgCenterNotifyCb cb;\r
+} MsgCenterNotifyTable;\r
\r
void DmsLiteSendMsgToJS(const char *msgBody);\r
+void DuerMapInfo(uint8_t cmd_id, uint8_t type, void* data);\r
void InitMsgCenter(OHOS::ACELite::JSIValue exports);\r
\r
struct PriorityMapper {\r
MSGCENTER_TYPE_ID_VECTOR_NAVI_RECV_POI,\r
MSGCENTER_TYPE_ID_VECTOR_NAVI_FINISH_FROM_WATCH,\r
MSGCENTER_TYPE_ID_VECTOR_NAVI_FINISH_FROM_PHONE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_AUTH_LICENSE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEO_LOCATION,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GEO_LOCATION,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_INIT,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_INIT,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_START,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_START,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_SUCC,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_SUCC,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_FAIL,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_FAIL,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_START,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_START,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_DESTROY,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_DESTROY,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_TEXT_UPDATE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROAD_GUIDE_TEXT_UPDATE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_ICON_UPDATE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROAD_GUIDE_ICON_UPDATE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_TIME_UPDATE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_TIME_UPDATE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_DISTANCE_UPDATE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_DISTANCE_UPDATE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_ROUTE_UPDATE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_ROUTE_UPDATE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GPS_STATUS_CHANGE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GPS_STATUS_CHANGE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_FARAWAY,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_FARAWAY,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_YAWING,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_YAWING,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_RE_ROUTE_COMPLETE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_RE_ROUTE_COMPLETE,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ARRIVE_DSTINATION,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ARRIVE_DSTINATION,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI_SUG_SEARCH,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_POI_SUG_SEARCH,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_RIDING_SEARCH,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_RIDING_SEARCH,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_WALKING_SEARCH,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_WALKING_SEARCH,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_TRANSIT_SEARCH,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_TRANSIT_SEARCH,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEOCODE_SEARCH,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GEOCODE_SEARCH,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REGEOCODE_SEARCH,\r
+ MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REGEOCODE_SEARCH,\r
} msg_center_vector_navi_type_id_t;\r
\r
typedef enum msg_center_alipay_type_id {\r
return offset;\r
}\r
\r
+static const char *g_vector_navi_str_tb[] = {\r
+ "req_auth_license",\r
+ "rec_auth_license",\r
+ "req_geo_location",\r
+ "rec_geo_location",\r
+ "req_navi_init",\r
+ "rec_navi_init",\r
+ "req_route_plan_start",\r
+ "rec_route_plan_start",\r
+ "req_route_plan_succ",\r
+ "rec_route_plan_succ",\r
+ "req_route_plan_fail",\r
+ "rec_route_plan_fail",\r
+ "req_navi_start",\r
+ "rec_navi_start",\r
+ "req_navi_destroy",\r
+ "rec_navi_destroy",\r
+ "req_road_guide_text_update",\r
+ "rec_road_guide_text_update",\r
+ "req_road_guide_icon_update",\r
+ "rec_road_guide_icon_update",\r
+ "req_remain_time_update",\r
+ "rec_remain_time_update",\r
+ "req_remain_distance_update",\r
+ "rec_remain_distance_update",\r
+ "req_remain_route_update",\r
+ "rec_remain_route_update",\r
+ "req_gps_status_change",\r
+ "rec_gps_status_change",\r
+ "req_route_faraway",\r
+ "rec_route_faraway",\r
+ "req_route_plan_yawing",\r
+ "rec_route_plan_yawing",\r
+ "req_re_route_complete",\r
+ "rec_re_route_complete",\r
+ "req_arrive_destination",\r
+ "rec_arrive_destination",\r
+ "req_poi_sug_search",\r
+ "rec_poi_sug_search",\r
+ "req_route_riding_search",\r
+ "rec_route_riding_search",\r
+ "req_route_walking_search",\r
+ "rec_route_walking_search",\r
+ "req_route_transit_search",\r
+ "rec_route_transit_search",\r
+ "req_geocode_search",\r
+ "rec_geocode_search",\r
+ "req_regeocode_search",\r
+ "rec_regeocode_search",\r
+};\r
+\r
+static inline const char* vector_navi_get_str(uint8_t type)\r
+{\r
+ return g_vector_navi_str_tb[type - MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE];\r
+}\r
+\r
errcode_t msg_center_pkt_proc(diag_ser_data_t *data);\r
uint8_t msg_center_get_response_cmd(uint8_t cmd_id);\r
diag_ser_data_t *msg_center_encap_diag_info(diag_ser_header_t *header, uint16_t tlv_len, uint8_t cmd_id);\r
#ifndef ALARM_NOTIFICATION_H\r
#define ALARM_NOTIFICATION_H\r
\r
-#define ALARM_IMAGE_DELETE "alarm_delete"\r
-#define ALARM_IMAGE_CLOCK "alarm_clock"\r
-#define ALARM_VIEW_CLOSE "alarm_close"\r
-#define ALARM_VIEW_DELAY "alarm_delay"\r
-#define ALARM_VIEW_POPUP "alarm_popup"\r
+constexpr char* ALARM_IMAGE_DELETE = "alarm_delete";\r
+constexpr char* ALARM_IMAGE_CLOCK = "alarm_clock";\r
+constexpr char* ALARM_VIEW_CLOSE = "alarm_close";\r
+constexpr char* ALARM_VIEW_DELAY = "alarm_delay";\r
+constexpr char* ALARM_VIEW_POPUP = "alarm_popup";\r
\r
-typedef enum {\r
+enum class AlarmTimerType {\r
NOTIFY_ALARM_CLOSE = 0,\r
NOTIFY_ALARM_DELAY = 1,\r
NOTIFY_ALARM_RING = 2,\r
NOTIFY_ALARM_UNKNOWN = 10,\r
-}AlarmTimerType;\r
+};\r
\r
namespace OHOS {\r
UIViewGroup* CreateAlarmView(void);\r
public OHOS::UIView::OnDragListener {\r
public:\r
AlarmViewEventListener();\r
- virtual ~AlarmViewEventListener();\r
- static AlarmViewEventListener *GetInstance(void);\r
+ virtual ~AlarmViewEventListener();\r
+ static AlarmViewEventListener *GetInstance(void);\r
bool OnDrag(UIView& view, const DragEvent& event) override;\r
bool OnDragEnd(OHOS::UIView& view, const OHOS::DragEvent& event) override;\r
bool OnClick(OHOS::UIView& view, const OHOS::ClickEvent& event) override;\r
- virtual bool OnPress(OHOS::UIView& view, const OHOS::PressEvent& event) override\r
+ bool OnPress(OHOS::UIView& view, const OHOS::PressEvent& event) override\r
{\r
return true;\r
}\r
- virtual bool OnLongPress(OHOS::UIView& view, const OHOS::LongPressEvent& event) override\r
+ bool OnLongPress(OHOS::UIView& view, const OHOS::LongPressEvent& event) override\r
{\r
return true;\r
}\r
- virtual bool OnRelease(OHOS::UIView& view, const OHOS::ReleaseEvent& event) override\r
+ bool OnRelease(OHOS::UIView& view, const OHOS::ReleaseEvent& event) override\r
{\r
return true;\r
}\r
\r
- virtual bool OnDragStart(OHOS::UIView& view, const OHOS::DragEvent& event) override\r
+ bool OnDragStart(OHOS::UIView& view, const OHOS::DragEvent& event) override\r
{\r
return true;\r
}\r
#ifndef MAKEPHONE_NOTIFICATION_H\r
#define MAKEPHONE_NOTIFICATION_H\r
\r
-typedef enum {\r
+enum class CallTimerType {\r
NOTIFY_PHONE_CALLING_DISPLAY = 0,\r
NOTIFY_PHONE_CURTIME_DISPLAY = 1,\r
NOTIFY_PHONE_UNKNOWN = 10,\r
-}CallTimerType;\r
+};\r
\r
namespace OHOS {\r
UIViewGroup* CreatePhoneCallView(void);\r
UIViewGroup* CreateCallingView(void);\r
+UIViewGroup* CreateMultiplePhoneView(void);\r
+UIViewGroup* CreateWaitingHintsView(void);\r
void HonrsViewChange(void);\r
void FreeCallingView(void);\r
void FreePhoneCallView(void);\r
+void FreeMultiplePhoneCallView(void);\r
+void FreeWaitingHintsView(void);\r
void RefreshMicrophoneImageSrc(const char* src);\r
void CallTimerCallBackProc(int data);\r
void CallCurTimerCallBack(int data);\r
void StartCallTimer(CallTimerType type, int32_t interval);\r
void DisableCallTimer(CallTimerType type);\r
+void EnableWaitingView(void);\r
+void DisableWatingView(void);\r
\r
class CallViewEventListener : public OHOS::UIView::OnClickListener,\r
public OHOS::UIView::OnLongPressListener,\r
public OHOS::UIView::OnDragListener {\r
public:\r
CallViewEventListener();\r
- virtual ~CallViewEventListener();\r
- static CallViewEventListener *GetInstance(void);\r
+ ~CallViewEventListener() override;\r
+ static CallViewEventListener *GetInstance(void);\r
bool OnClick(OHOS::UIView& view, const OHOS::ClickEvent& event) override;\r
- virtual bool OnDrag(UIView& view, const DragEvent& event) override\r
+ bool OnDrag(UIView& view, const DragEvent& event) override\r
{\r
return true;\r
}\r
- virtual bool OnDragEnd(OHOS::UIView& view, const OHOS::DragEvent& event) override\r
+ bool OnDragEnd(OHOS::UIView& view, const OHOS::DragEvent& event) override\r
{\r
return true;\r
}\r
- virtual bool OnPress(OHOS::UIView& view, const OHOS::PressEvent& event) override\r
+ bool OnPress(OHOS::UIView& view, const OHOS::PressEvent& event) override\r
{\r
return true;\r
}\r
- virtual bool OnLongPress(OHOS::UIView& view, const OHOS::LongPressEvent& event) override\r
+ bool OnLongPress(OHOS::UIView& view, const OHOS::LongPressEvent& event) override\r
{\r
return true;\r
}\r
- virtual bool OnRelease(OHOS::UIView& view, const OHOS::ReleaseEvent& event) override\r
+ bool OnRelease(OHOS::UIView& view, const OHOS::ReleaseEvent& event) override\r
{\r
return true;\r
}\r
\r
- virtual bool OnDragStart(OHOS::UIView& view, const OHOS::DragEvent& event) override\r
+ bool OnDragStart(OHOS::UIView& view, const OHOS::DragEvent& event) override\r
{\r
return true;\r
}\r
#include "alarm_notification.h"
#include "makephone_notification.h"
-#define UN_OPACITY 255
-#define HAlf_SCREEN 2
-#define NOTIFY_PRIORITY_DEFAULT 4
+constexpr uint16_t HALF_SCREEN = 2;
+constexpr int16_t NOTIFY_PRIORITY_DEFAULT = 4;
namespace OHOS {
using NewNotify = std::function<UIViewGroup* ()>;
/**
* @brief notify is or not showing.
*/
- bool hasNotifyShowing();
+ bool HasNotifyShowing();
void StartShowNotify(void);
uint16_t GetNotifyPriority(void);
uint16_t GetShowingNotifyId(void);
void SetNativeUIRunning(bool flag);
bool GetVolumeScreenStatus();
void SetVolumeScreenStatus(bool status);
+ bool GetWatchCallStatus();
+ void SetWatchCallStatus(bool status);
void Callback() override;
UIViewGroup* screenContainer_ = nullptr;
private:
NotificationManager() {}
- ~NotificationManager() {}
+ ~NotificationManager() override {}
void StartRefreshNotifyContent(void);
void StopShowNotify(void);
- void FreeNotifyViews(void);
+ void FreeNotifyViews(void);
NewNotify notify_;
RefreshNotifyContent refreshNotifyContent_;
bool isFullScreen_ = false;
bool isNativeUI = false;
bool volumeScreenStatus = false;
+ bool watchCallStatus = false;
bool stopIsLast_ = false;
bool showIsLast_ = false;
#define BAIDU_APP_H\r
\r
#include "errcode.h"\r
-\r
+#include "cmsis_os2.h"\r
#ifdef __cplusplus\r
#if __cplusplus\r
extern "C" {\r
uint16_t len;\r
} pcm_stream_queue_msg;\r
\r
+osMessageQueueId_t GetPcmMsgQueueId(void);\r
errcode_t pcm_stream_msg_thread(void *data);\r
errcode_t pcm_stream_queue_init(void);\r
errcode_t pcm_stream_create_task(void);\r
errcode_t msg_center_vector_navi_recv_poi(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
errcode_t msg_center_vector_navi_finish_from_watch(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
errcode_t msg_center_vector_navi_finish_from_phone(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_auth_license(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_auth_license(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_geo_location(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_geo_location(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_navi_init(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_navi_init(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_route_plan_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_route_plan_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_route_plan_succ(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_route_plan_succ(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_route_plan_fail(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_route_plan_fail(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_navi_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_navi_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_navi_destroy(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_navi_destroy(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_road_guide_text_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_road_guide_text_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_road_guide_icon_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_road_guide_icon_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_remain_time_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_remain_time_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_remain_distance_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_remain_distance_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_remain_route_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_remain_route_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_gps_status_change(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_gps_status_change(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_route_faraway(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_route_faraway(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_route_plan_yawing(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_route_plan_yawing(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_re_route_complete(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_re_route_complete(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_arrive_destination(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_arrive_destination(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vertor_navi_req_poi_sug_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vertor_navi_rec_poi_sug_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_route_riding_search(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_route_riding_search(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_route_walking_search(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_route_walking_search(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_route_transit_search(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_route_transit_search(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_geocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_geocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_req_regeocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
+errcode_t msg_center_vector_navi_rec_regeocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);\r
\r
#ifdef __cplusplus\r
#if __cplusplus\r
--- /dev/null
+#ifndef BAIDU_MAP_COMPONENT_INTERFACE_H\r
+#define BAIDU_MAP_COMPONENT_INTERFACE_H\r
+\r
+#include "baidumap_msg_center.h"\r
+#include "components/ui_view.h"\r
+\r
+class MapComponentApi\r
+{\r
+public:\r
+\r
+ static MapComponentApi &getInstance();\r
+ MapComponentApi(const MapComponentApi &) = delete;\r
+ MapComponentApi &operator=(const MapComponentApi &) = delete;\r
+\r
+ const OHOS::UIView* get_baidumap_root_view();\r
+ virtual void destroy();\r
+ virtual void set_zoom_event_enabled(bool enabled);\r
+ virtual void zoom_in();\r
+ virtual void zoom_out();\r
+ virtual void zoom_by(int amount);\r
+ virtual void zoom_to(int level);\r
+ virtual void set_map_background_color(char * json_color);\r
+ virtual void set_map_overlayer_enabled(bool enabled);\r
+ virtual void set_map_tiles_enabled(bool enabled);\r
+ virtual void set_scroll_gestures_enabled(bool enabled);\r
+ virtual void scroll_by(int pixel_x, int pixel_y);\r
+ // 导航过程、定位成功\r
+ virtual void new_lat_lng(char * json_lat_lng);\r
+ virtual void new_lat_lng_zoom(char * json_lat_lng, int zoom);\r
+ // 导航结束\r
+ virtual void clear_map_overlayer();\r
+ // 画点\r
+ virtual void draw_circle(char * json_circle);\r
+ // 无\r
+ virtual void draw_polygon(char * json_polygon);\r
+ // 导航路线\r
+ virtual void draw_path(char * json_path);\r
+ // 无\r
+ virtual void draw_text(char * json_text);\r
+ // 定位成功定位点\r
+ virtual void draw_marker(char * json_marker);\r
+ // 导航过程箭头\r
+ virtual void draw_navi_marker(char * json_navi_marker);\r
+ // 定位点\r
+ virtual void overlayer_clear_circle();\r
+ // 定位点\r
+ virtual void overlayer_clear_marker();\r
+ // 导航箭头\r
+ virtual void overlayer_clear_navi_marker();\r
+ // 以下调用使用,不用提供js通路\r
+ void RecvMapSvgInfo(Content *info);\r
+private:\r
+ // MapRootView* container_ = nullptr;\r
+ /**\r
+ * @brief 构造函数\r
+ */\r
+ MapComponentApi();\r
+};\r
+\r
+#endif
\ No newline at end of file
--- /dev/null
+#ifndef BAIDU_MAP_LOCATION_H\r
+#define BAIDU_MAP_LOCATION_H\r
+\r
+struct JSCoordinate {\r
+ double lon;\r
+ double lat;\r
+};\r
+\r
+/**\r
+ * @brief 将 WGS84 坐标转换为 GCJ02 坐标\r
+ *\r
+ * 将给定的 WGS84 坐标转换为 GCJ02 坐标,并返回转换后的 GCJ02 坐标。\r
+ *\r
+ * @param lon WGS84 经度坐标\r
+ * @param lat WGS84 纬度坐标\r
+ *\r
+ * @return GCJ02 坐标点\r
+ */\r
+extern void WGS84ToGCJ02(double lon, double lat, JSCoordinate &output);\r
+\r
+ /**\r
+ * @brief 将 GCJ02 坐标转换为 BD09 坐标\r
+ *\r
+ * 将给定的 GCJ02 坐标转换为 BD09 坐标,并返回转换后的 BD09 坐标。\r
+ *\r
+ * @param lon GCJ02 坐标的经度\r
+ * @param lat GCJ02 坐标的纬度\r
+ *\r
+ * @return 转换后的 BD09 坐标\r
+ */\r
+extern void GCJ02ToBD09(double lon, double lat, JSCoordinate &output);\r
+\r
+/**\r
+ * @brief 将WGS84坐标转换为BD09坐标\r
+ *\r
+ * 将给定的 WGS84 坐标转换为 BD09 坐标,并返回转换后的 BD09 坐标。\r
+ *\r
+ * @param lon WGS84经度坐标\r
+ * @param lat WGS84纬度坐标\r
+ *\r
+ * @return 转换后的BD09坐标点\r
+ */\r
+extern void WGS84ToBD09(double lon, double lat, JSCoordinate &output);\r
+\r
+/**\r
+ * @brief 将 BD09 坐标转换为 GCJ02 坐标\r
+ *\r
+ * 将给定的 BD09 坐标转换为 GCJ02 坐标,并返回转换后的 GCJ02 坐标。\r
+ *\r
+ * @param bd_lon BD09 经度\r
+ * @param bd_lat BD09 纬度\r
+ *\r
+ * @return 转换后的 GCJ02 坐标\r
+ */\r
+extern void BD09ToGCJ02(double bd_lon, double bd_lat, JSCoordinate &output);\r
+#endif
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.\r
+ * Description: broadcast service api\r
+ * Author: CompanyName\r
+ * Create: 2021-11-11\r
+ */\r
+\r
+#ifndef BAIDU_MAP_MSG_CENTER_H\r
+#define BAIDU_MAP_MSG_CENTER_H\r
+\r
+#include <stdint.h>\r
+\r
+#ifdef __cplusplus\r
+#if __cplusplus\r
+extern "C" {\r
+#endif\r
+#endif\r
+\r
+/**\r
+ * 请求接口的 type_id,目前只有svg的请求\r
+ */\r
+typedef enum duer_msg_center_type_id {\r
+ DUER_MSG_TYPE_ID_REQ_SVG = 1,\r
+ DUER_MSG_TYPE_ID_MAX\r
+} duer_msg_center_type_id_t;\r
+\r
+struct Content\r
+{\r
+ int x;\r
+ int y;\r
+ int z;\r
+ void *data;\r
+ char *json;\r
+};\r
+\r
+\r
+/**\r
+ * 接收msg_center返回的数据,填充对应的content\r
+ */\r
+uint8_t duer_msg_center_recv_map_info(uint8_t command_id, uint8_t type, struct Content *content);\r
+\r
+/**\r
+ * 通过【duer_msg_center_type_id】来区分对应请求的是msg_center接口,方便以后扩展\r
+ */\r
+uint8_t duer_msg_center_send_map_info(uint8_t duer_type, void *usr_data, uint16_t usr_len);\r
+\r
+#ifdef __cplusplus\r
+#if __cplusplus\r
+}\r
+#endif\r
+#endif\r
+#endif /* BAIDU_MAP_MSG_CENTER_H */\r
{ MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_RECV_POI, msg_center_vector_navi_recv_poi},
{ MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_FINISH_FROM_WATCH, msg_center_vector_navi_finish_from_watch},
{ MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_FINISH_FROM_PHONE, msg_center_vector_navi_finish_from_phone},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE, msg_center_vector_navi_req_auth_license},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_AUTH_LICENSE, msg_center_vector_navi_rec_auth_license},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEO_LOCATION, msg_center_vector_navi_req_geo_location},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GEO_LOCATION, msg_center_vector_navi_rec_geo_location},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_INIT, msg_center_vector_navi_req_navi_init},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_INIT, msg_center_vector_navi_rec_navi_init},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_START, msg_center_vector_navi_req_route_plan_start},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_START, msg_center_vector_navi_rec_route_plan_start},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_SUCC, msg_center_vector_navi_req_route_plan_succ},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_SUCC, msg_center_vector_navi_rec_route_plan_succ},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_FAIL, msg_center_vector_navi_req_route_plan_fail},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_FAIL, msg_center_vector_navi_rec_route_plan_fail},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_START, msg_center_vector_navi_req_navi_start},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_START, msg_center_vector_navi_rec_navi_start},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_DESTROY, msg_center_vector_navi_req_navi_destroy},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_DESTROY, msg_center_vector_navi_rec_navi_destroy},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_TEXT_UPDATE, msg_center_vector_navi_req_road_guide_text_update},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROAD_GUIDE_TEXT_UPDATE, msg_center_vector_navi_rec_road_guide_text_update},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_ICON_UPDATE, msg_center_vector_navi_req_road_guide_icon_update},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROAD_GUIDE_ICON_UPDATE, msg_center_vector_navi_rec_road_guide_icon_update},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_TIME_UPDATE, msg_center_vector_navi_req_remain_time_update},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_TIME_UPDATE, msg_center_vector_navi_rec_remain_time_update},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_DISTANCE_UPDATE, msg_center_vector_navi_req_remain_distance_update},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_DISTANCE_UPDATE, msg_center_vector_navi_rec_remain_distance_update},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_ROUTE_UPDATE, msg_center_vector_navi_req_remain_route_update},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_ROUTE_UPDATE, msg_center_vector_navi_rec_remain_route_update},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GPS_STATUS_CHANGE, msg_center_vector_navi_req_gps_status_change},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GPS_STATUS_CHANGE, msg_center_vector_navi_rec_gps_status_change},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_FARAWAY, msg_center_vector_navi_req_route_faraway},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_FARAWAY, msg_center_vector_navi_rec_route_faraway},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_YAWING, msg_center_vector_navi_req_route_plan_yawing},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_YAWING, msg_center_vector_navi_rec_route_plan_yawing},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_RE_ROUTE_COMPLETE, msg_center_vector_navi_req_re_route_complete},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_RE_ROUTE_COMPLETE, msg_center_vector_navi_rec_re_route_complete},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ARRIVE_DSTINATION, msg_center_vector_navi_req_arrive_destination},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ARRIVE_DSTINATION, msg_center_vector_navi_rec_arrive_destination},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI_SUG_SEARCH, msg_center_vertor_navi_req_poi_sug_search},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_POI_SUG_SEARCH, msg_center_vertor_navi_rec_poi_sug_search},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_RIDING_SEARCH, msg_center_vector_navi_req_route_riding_search},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_RIDING_SEARCH, msg_center_vector_navi_rec_route_riding_search},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_WALKING_SEARCH, msg_center_vector_navi_req_route_walking_search},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_WALKING_SEARCH, msg_center_vector_navi_rec_route_walking_search},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_TRANSIT_SEARCH, msg_center_vector_navi_req_route_transit_search},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_TRANSIT_SEARCH, msg_center_vector_navi_rec_route_transit_search},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEOCODE_SEARCH, msg_center_vector_navi_req_geocode_search},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GEOCODE_SEARCH, msg_center_vector_navi_rec_geocode_search},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REGEOCODE_SEARCH, msg_center_vector_navi_req_regeocode_search},
+ { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REGEOCODE_SEARCH, msg_center_vector_navi_rec_regeocode_search},
#endif
#ifdef SUPPORT_ALIPAY_SEC
{ MSGCENTER_CMD_ALIPAY, MSGCENTER_TYPE_ID_ALIPAY_NETWORK_STATUS, msg_center_alipay_network_status},
* Create: 2021-11-11
*/
-#include <stdio.h>
+#include <cstdio>
#include "securec.h"
#include "adapter.h"
#include "ohos_init.h"
#endif
/* 订阅事件设定优先级 */
-const PriorityMapper g_pri_mapper[] = {
+const PriorityMapper PRI_MAPPER[] = {
{TOPIC_EVENT_ALARM_RING, PRIORITY_TWO},
{TOPIC_EVENT_NEXTDAY_UPDATE, PRIORITY_TWO},
{TOPIC_EVENT_HFP_INCOMMING, PRIORITY_ONE},
static bool CheckPriority(const Topic topic)
{
- uint16_t mapperSize = sizeof(g_pri_mapper) / sizeof(g_pri_mapper[0]);
+ uint16_t mapperSize = sizeof(PRI_MAPPER) / sizeof(PRI_MAPPER[0]);
for (uint16_t i = 0; i < mapperSize; i++) {
- if (topic == g_pri_mapper[i].topicId) {
- if (g_pri_mapper[i].prId <= OHOS::NativeAbility::GetInstance().GetCurSlicePriority() &&
- g_pri_mapper[i].prId <= OHOS::NotificationManager::GetInstance()->GetNotifyPriority()) {
+ if (topic == PRI_MAPPER[i].topicId) {
+ if (PRI_MAPPER[i].prId <= OHOS::NativeAbility::GetInstance().GetCurSlicePriority() &&
+ PRI_MAPPER[i].prId <= OHOS::NotificationManager::GetInstance()->GetNotifyPriority()) {
return true;
} else {
return false;
MsgCenterSubscribeTopic(TOPIC_EVENT_HFP_WATCH_TO_PHONE);
}
-static OHOS::UIViewGroup* showAlarmNotify(void)
+static OHOS::UIViewGroup* ShowAlarmNotify(void)
{
return OHOS::CreateAlarmView();
}
-static OHOS::UIViewGroup* showPhoneCallNotify(void)
+static OHOS::UIViewGroup* ShowPhoneCallNotify(void)
{
return OHOS::CreatePhoneCallView();
}
-static OHOS::UIViewGroup* showCallingNotify(void)
+static OHOS::UIViewGroup* ShowCallingNotify(void)
{
return OHOS::CreateCallingView();
}
+static OHOS::UIViewGroup* ShowMultiPhoneCallNotify(void)
+{
+ return OHOS::CreateMultiplePhoneView();
+}
+
void MsgCenterNotifyAlarmProc(const Topic topic, Request* req)
{
unused(req);
// The alarm notification is not displayed if the incoming call notification is already being processed
- if (CheckPriority(topic) == true) {
+ if (CheckPriority(topic)) {
AlarmClockModel::GetInstance()->PopInterPlayMusic();
NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO);
- NotificationManager::GetInstance()->ShowNotify(showAlarmNotify, (uint16_t)topic, true);
+ NotificationManager::GetInstance()->ShowNotify(ShowAlarmNotify, static_cast<uint16_t>(topic), true);
} else {
// just delay the alarm
WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "just delay the alarm");
void MsgCenterNotifyHfpIncomingProc(const Topic topic, Request* req)
{
- unused(topic);
- hfp_hf_calls_info_t call_data = {0};
- int32 ret = memcpy_s(&call_data, sizeof(hfp_hf_calls_info_t), req->data, req->len);
+ hfp_hf_calls_info_t callData = {0};
+ int32 ret = memcpy_s(&callData, sizeof(hfp_hf_calls_info_t), req->data, req->len);
if (ret != EOK) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MsgCenterNotify memcpy_s request data fail!");
} else {
// Prevent this from happening:
// When the incoming call view is displayed, the calling number is not set in CallerLogModel.
- CallerLogModel::GetInstance()->SetoperateNumber(call_data.number, call_data.number_len);
+ CallerLogModel::GetInstance()->SetoperateNumber(callData.number, callData.number_len);
}
NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_ONE);
CallerLogModel::GetInstance()->SetNotifyFlag(true);
- NotificationManager::GetInstance()->ShowNotify(showPhoneCallNotify, (uint16_t)topic, true);
+ if (GetCurrCallNum() == 1) {
+ NotificationManager::GetInstance()->ShowNotify(ShowPhoneCallNotify, static_cast<uint16_t>(topic), true);
+ } else {
+ EnableWaitingView();
+ }
+ NotificationManager::GetInstance()->SetWatchCallStatus(true);
}
void MsgCenterNotifyHfpPhoneProc(const Topic topic, Request* req)
{
- unused(topic);
unused(req);
- // just stop the notify
- if (CallerLogModel::GetInstance()->GetNotifyFlag() == true) {
- NotificationManager::GetInstance()->StopNotify();
+ // finish a single-channel call, or switch to phone, stop the notify
+ if (CallerLogModel::GetInstance()->GetNotifyFlag()) {
+ DisableWatingView();
+ if ((topic == TOPIC_EVENT_HFP_FINISHED && GetCurrCallNum() == 0) ||
+ topic == TOPIC_EVENT_HFP_PHONE_ACTIVE || topic == TOPIC_EVENT_HFP_WATCH_TO_PHONE) {
+ NotificationManager::GetInstance()->StopNotify();
+ NotificationManager::GetInstance()->SetWatchCallStatus(false);
+ }
}
}
void MsgCenterNotifyHfpWatchProc(const Topic topic, Request* req)
{
- unused(topic);
unused(req);
- if (CallerLogModel::GetInstance()->GetNotifyFlag() == true) {
+ if (CallerLogModel::GetInstance()->GetNotifyFlag()) {
NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_ONE);
// default not mute
SetMicMute(false);
- NotificationManager::GetInstance()->ShowNotify(showCallingNotify, (uint16_t)topic, true);
+ if (CallerLogModel::GetInstance()->IsMulitplePhoneStatus()) {
+ NotificationManager::GetInstance()->ShowNotify(ShowMultiPhoneCallNotify,
+ static_cast<uint16_t>(topic), true);
+ } else {
+ NotificationManager::GetInstance()->ShowNotify(ShowCallingNotify, static_cast<uint16_t>(topic), true);
+ }
+ NotificationManager::GetInstance()->SetWatchCallStatus(true);
}
}
/* 订阅事件通知逻辑可定制 */
-static msg_center_notify_table_t g_msg_center_notify_table[] = {
+static MsgCenterNotifyTable g_msgCenterNotifyTable[] = {
{TOPIC_EVENT_ALARM_RING, MsgCenterNotifyAlarmProc},
{TOPIC_EVENT_NEXTDAY_UPDATE, MsgCenterNotifyNextDayProc},
{TOPIC_EVENT_HFP_INCOMMING, MsgCenterNotifyHfpIncomingProc},
{TOPIC_EVENT_HFP_PHONE_TO_WATCH, MsgCenterNotifyHfpWatchProc},
};
-static msg_center_notify_table_t *MsgCenterGetNotifyTblCb(uint8_t idx)
+static MsgCenterNotifyTable *MsgCenterGetNotifyTblCb(uint8_t idx)
{
- return &g_msg_center_notify_table[idx];
+ return &g_msgCenterNotifyTable[idx];
}
static uint8_t MsgCenterGetNotifyTblSize(void)
{
- return sizeof(g_msg_center_notify_table) / sizeof(g_msg_center_notify_table[0]);
+ return sizeof(g_msgCenterNotifyTable) / sizeof(g_msgCenterNotifyTable[0]);
}
bool MsgCenterNotifyProc(const Topic topic, Request* req)
{
uint8_t i;
- uint8_t tbl_size = MsgCenterGetNotifyTblSize();
+ uint8_t tblSize = MsgCenterGetNotifyTblSize();
- for (i = 0; i < tbl_size; i++) {
- msg_center_notify_table_t *item = MsgCenterGetNotifyTblCb(i);
- if (item->topic == topic && item->cb != NULL) {
+ for (i = 0; i < tblSize; i++) {
+ MsgCenterNotifyTable *item = MsgCenterGetNotifyTblCb(i);
+ if (item->topic == topic && item->cb != nullptr) {
item->cb(topic, req);
return true;
}
#include "components/ui_image_view.h"\r
#include "components/ui_label.h"\r
\r
-#define RING_AGAIN "响铃将在十分钟后再次响起"\r
-#define NOTIFY_THREE_SECONDS 3000\r
-#define NOTIFY_ONE_SECOND 1000\r
-#define NOTIFY_THIRTY_SECONDS 30000\r
-#define NOTIFY_ONE_MINUTE 60000\r
-#define NOTOFY_NO_OPERATE_TIME 35000\r
-\r
namespace OHOS {\r
-osTimerId_t g_notifyStopHandle = NULL; // timer of close view and alarm ring view\r
-osTimerId_t g_alarmRing = NULL; // timer of alarm view\r
-\r
-UIViewGroup* alarmView = nullptr;\r
-UIViewGroup* closeView = nullptr;\r
-UIViewGroup* ringView = nullptr;\r
-UIImageView* imageClose = nullptr;\r
-UIImageView* imageRing = nullptr;\r
-UIImageView* imageDelete = nullptr;\r
-UIImageView* imageClock = nullptr;\r
-UILabel* closeLable = nullptr;\r
-UILabel* ringLable = nullptr;\r
-UILabel* mainLable = nullptr;\r
-UIDigitalClock *dClock = nullptr;\r
+constexpr char* RING_AGAIN = "响铃将在十分钟后再次响起";\r
+constexpr int32_t NOTIFY_THREE_SECONDS = 3000;\r
+constexpr int32_t NOTIFY_ONE_SECOND = 1000;\r
+constexpr int32_t NOTIFY_THIRTY_SECONDS = 30000;\r
+constexpr int32_t NOTIFY_ONE_MINUTE = 60000;\r
+constexpr int32_t NOTOFY_NO_OPERATE_TIME = 35000;\r
+osTimerId_t g_notifyStopHandle = nullptr; // timer of close view and alarm ring view\r
+osTimerId_t g_alarmRing = nullptr; // timer of alarm view\r
+\r
+UIViewGroup* g_alarmView = nullptr;\r
+UIViewGroup* g_closeView = nullptr;\r
+UIViewGroup* g_ringView = nullptr;\r
+UIImageView* g_imageClose = nullptr;\r
+UIImageView* g_imageRing = nullptr;\r
+UIImageView* g_imageDelete = nullptr;\r
+UIImageView* g_imageClock = nullptr;\r
+UILabel* g_closeLable = nullptr;\r
+UILabel* g_ringLable = nullptr;\r
+UILabel* g_mainLable = nullptr;\r
+UIDigitalClock* g_dClock = nullptr;\r
\r
// alarm close view\r
constexpr int16_t MAX_SET_ZERO_LEN = 0;\r
{\r
uint32_t tick;\r
osStatus_t retTimer;\r
- if (type >= NOTIFY_ALARM_UNKNOWN) {\r
+ if (type >= AlarmTimerType::NOTIFY_ALARM_UNKNOWN) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "StartAlarmTimer type:%d invalid!!", type);\r
return;\r
}\r
switch (type) {\r
- case NOTIFY_ALARM_CLOSE:\r
- case NOTIFY_ALARM_DELAY:\r
- g_notifyStopHandle = osTimerNew((osTimerFunc_t)StopNotifyCallback, osTimerPeriodic, NULL, NULL);\r
+ case AlarmTimerType::NOTIFY_ALARM_CLOSE:\r
+ case AlarmTimerType::NOTIFY_ALARM_DELAY:\r
+ g_notifyStopHandle = osTimerNew((osTimerFunc_t)StopNotifyCallback, osTimerPeriodic, nullptr, nullptr);\r
tick = osMs2Tick(interval);\r
retTimer = osTimerStart(g_notifyStopHandle, tick);\r
- if (retTimer != osOK && g_notifyStopHandle != NULL) {\r
+ if (retTimer != osOK && g_notifyStopHandle != nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,\r
"StartAlarmTimer osTimerStart failed, type= %d ret = %lx!!", type, retTimer);\r
osTimerDelete(g_notifyStopHandle);\r
- g_notifyStopHandle = NULL;\r
+ g_notifyStopHandle = nullptr;\r
return;\r
}\r
break;\r
- case NOTIFY_ALARM_RING:\r
- g_alarmRing = osTimerNew((osTimerFunc_t)NoOperateCallback, osTimerPeriodic, NULL, NULL);\r
+ case AlarmTimerType::NOTIFY_ALARM_RING:\r
+ g_alarmRing = osTimerNew((osTimerFunc_t)NoOperateCallback, osTimerPeriodic, nullptr, nullptr);\r
tick = osMs2Tick(interval);\r
retTimer = osTimerStart(g_alarmRing, tick);\r
- if (retTimer != osOK && g_alarmRing != NULL) {\r
+ if (retTimer != osOK && g_alarmRing != nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,\r
"StartAlarmTimer osTimerStart failed, type= %d ret = %lx!!", type, retTimer);\r
osTimerDelete(g_alarmRing);\r
- g_alarmRing = NULL;\r
+ g_alarmRing = nullptr;\r
return;\r
}\r
break;\r
\r
void DisableAlarmTimer(AlarmTimerType type)\r
{\r
- if (type >= NOTIFY_ALARM_UNKNOWN) {\r
+ if (type >= AlarmTimerType::NOTIFY_ALARM_UNKNOWN) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableAlarmTimer type:%d invalid!!", type);\r
return;\r
}\r
osStatus_t ret;\r
switch (type) {\r
- case NOTIFY_ALARM_CLOSE:\r
- case NOTIFY_ALARM_DELAY:\r
- if (g_notifyStopHandle != NULL) {\r
+ case AlarmTimerType::NOTIFY_ALARM_CLOSE:\r
+ case AlarmTimerType::NOTIFY_ALARM_DELAY:\r
+ if (g_notifyStopHandle != nullptr) {\r
ret = osTimerDelete(g_notifyStopHandle);\r
if (ret != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableAlarmTimer failed, type= %d ret = %lx!", type, ret);\r
return;\r
}\r
- g_notifyStopHandle = NULL;\r
+ g_notifyStopHandle = nullptr;\r
}\r
break;\r
- case NOTIFY_ALARM_RING:\r
- if (g_alarmRing != NULL) {\r
+ case AlarmTimerType::NOTIFY_ALARM_RING:\r
+ if (g_alarmRing != nullptr) {\r
ret = osTimerDelete(g_alarmRing);\r
if (ret != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableAlarmTimer failed, type= %d ret = %lx!", type, ret);\r
return;\r
}\r
- g_alarmRing = NULL;\r
+ g_alarmRing = nullptr;\r
}\r
break;\r
default:\r
\r
UIViewGroup *CreateAlarmCloseView()\r
{\r
- closeView = new UIViewGroup();\r
- if (closeView == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView closeView null!");\r
+ g_closeView = new UIViewGroup();\r
+ if (g_closeView == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView g_closeView null!");\r
return nullptr;\r
}\r
- closeView->SetPosition(MAX_SET_ZERO_LEN, MAX_SET_ZERO_LEN);\r
- closeView->SetWidth(Screen::GetInstance().GetWidth());\r
- closeView->SetHeight(Screen::GetInstance().GetHeight());\r
- imageClose = new UIImageView();\r
- if (imageClose == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView imageClose null!");\r
- delete closeView;\r
- closeView = nullptr;\r
+ g_closeView->SetPosition(MAX_SET_ZERO_LEN, MAX_SET_ZERO_LEN);\r
+ g_closeView->SetWidth(Screen::GetInstance().GetWidth());\r
+ g_closeView->SetHeight(Screen::GetInstance().GetHeight());\r
+ g_imageClose = new UIImageView();\r
+ if (g_imageClose == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView g_imageClose null!");\r
+ delete g_closeView;\r
+ g_closeView = nullptr;\r
return nullptr;\r
}\r
- imageClose->SetPosition(MAX_IMAGE_X_LEN, MAX_IMAGE_Y_LEN);\r
- imageClose->SetWidth(MAX_SET_SRC_LEN);\r
- imageClose->SetHeight(MAX_SET_SRC_LEN);\r
- imageClose->SetSrc(ALARM_CLOCK_CLOSE_ADD_PATH);\r
- imageClose->SetTouchable(true);\r
- closeView->Add(imageClose);\r
-\r
- closeLable = new UILabel();\r
- if (closeLable == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView closeLable null!");\r
- delete closeView;\r
- closeView = nullptr;\r
- delete imageClose;\r
- imageClose = nullptr;\r
+ g_imageClose->SetPosition(MAX_IMAGE_X_LEN, MAX_IMAGE_Y_LEN);\r
+ g_imageClose->SetWidth(MAX_SET_SRC_LEN);\r
+ g_imageClose->SetHeight(MAX_SET_SRC_LEN);\r
+ g_imageClose->SetSrc(ALARM_CLOCK_CLOSE_ADD_PATH);\r
+ g_imageClose->SetTouchable(true);\r
+ g_closeView->Add(g_imageClose);\r
+\r
+ g_closeLable = new UILabel();\r
+ if (g_closeLable == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView g_closeLable null!");\r
+ delete g_closeView;\r
+ g_closeView = nullptr;\r
+ delete g_imageClose;\r
+ g_imageClose = nullptr;\r
return nullptr;\r
}\r
- closeLable->SetPosition(MAX_LABEL_X_LEN, MAX_LABEL_Y_LEN, MAX_LABEL_LENGTH_LEN, MAX_LABEL_HEIGHT_LEN);\r
- closeLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, MAX_LABEL_FONT_LEN);\r
- closeLable->SetText("CLOSE");\r
- closeView->Add(closeLable);\r
- closeView->SetViewId(ALARM_VIEW_CLOSE);\r
- UIView::OnDragListener *listener =static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());\r
- closeView->SetOnDragListener(listener);\r
- closeView->SetDraggable(true);\r
- closeView->SetTouchable(true);\r
- return closeView;\r
+ g_closeLable->SetPosition(MAX_LABEL_X_LEN, MAX_LABEL_Y_LEN, MAX_LABEL_LENGTH_LEN, MAX_LABEL_HEIGHT_LEN);\r
+ g_closeLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, MAX_LABEL_FONT_LEN);\r
+ g_closeLable->SetText("CLOSE");\r
+ g_closeView->Add(g_closeLable);\r
+ g_closeView->SetViewId(ALARM_VIEW_CLOSE);\r
+ UIView::OnDragListener *listener = static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());\r
+ g_closeView->SetOnDragListener(listener);\r
+ g_closeView->SetDraggable(true);\r
+ g_closeView->SetTouchable(true);\r
+ return g_closeView;\r
}\r
\r
void FreeAlarmCloseView(void)\r
{\r
- if (closeView != nullptr) {\r
- DisableAlarmTimer(NOTIFY_ALARM_CLOSE);\r
- closeView->RemoveAll();\r
- delete imageClose;\r
- imageClose = nullptr;\r
- delete closeLable;\r
- closeLable = nullptr;\r
- RootView::GetInstance()->Remove(closeView);\r
- delete closeView;\r
- closeView = nullptr;\r
+ if (g_closeView != nullptr) {\r
+ DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_CLOSE);\r
+ g_closeView->RemoveAll();\r
+ delete g_imageClose;\r
+ g_imageClose = nullptr;\r
+ delete g_closeLable;\r
+ g_closeLable = nullptr;\r
+ RootView::GetInstance()->Remove(g_closeView);\r
+ delete g_closeView;\r
+ g_closeView = nullptr;\r
}\r
}\r
\r
UIViewGroup *CreateAlarmRingView()\r
{\r
- ringView = new UIViewGroup();\r
- if (ringView == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmRingView ringView null!");\r
+ g_ringView = new UIViewGroup();\r
+ if (g_ringView == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmRingView g_ringView null!");\r
return nullptr;\r
}\r
- ringView->SetPosition(SET_ZERO, SET_ZERO);\r
- ringView->SetWidth(Screen::GetInstance().GetWidth());\r
- ringView->SetHeight(Screen::GetInstance().GetHeight());\r
- imageRing = new UIImageView();\r
- if (imageRing == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmRingView imageRing null!");\r
- delete ringView;\r
- ringView = nullptr;\r
+ g_ringView->SetPosition(SET_ZERO, SET_ZERO);\r
+ g_ringView->SetWidth(Screen::GetInstance().GetWidth());\r
+ g_ringView->SetHeight(Screen::GetInstance().GetHeight());\r
+ g_imageRing = new UIImageView();\r
+ if (g_imageRing == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmRingView g_imageRing null!");\r
+ delete g_ringView;\r
+ g_ringView = nullptr;\r
return nullptr;\r
}\r
- imageRing->SetPosition(DELAY_IMAGE_X, DELAY_IMAGE_Y);\r
- imageRing->SetWidth(SET_SRC);\r
- imageRing->SetHeight(SET_SRC);\r
- imageRing->SetSrc(ALARM_CLOCK_POP_ADD_PATH);\r
- ringView->Add(imageRing);\r
- ringLable = new UILabel();\r
- if (ringLable == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmRingView::ringLable null!");\r
- delete ringView;\r
- ringView = nullptr;\r
- delete imageRing;\r
+ g_imageRing->SetPosition(DELAY_IMAGE_X, DELAY_IMAGE_Y);\r
+ g_imageRing->SetWidth(SET_SRC);\r
+ g_imageRing->SetHeight(SET_SRC);\r
+ g_imageRing->SetSrc(ALARM_CLOCK_POP_ADD_PATH);\r
+ g_ringView->Add(g_imageRing);\r
+ g_ringLable = new UILabel();\r
+ if (g_ringLable == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmRingView::g_ringLable null!");\r
+ delete g_ringView;\r
+ g_ringView = nullptr;\r
+ delete g_imageRing;\r
return nullptr;\r
}\r
- ringLable->SetPosition(DELAY_LABEL_X, DELAY_LABEL_Y, DELAY_LABEL_LENGTH, DELAY_LABEL_HEIGHT);\r
- ringLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, DELAY_LABEL_FONT);\r
- ringLable->SetText(RING_AGAIN);\r
- ringView->Add(ringLable);\r
- ringView->SetViewId(ALARM_VIEW_DELAY);\r
- UIView::OnDragListener *listener =static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());\r
- ringView->SetOnDragListener(listener);\r
- ringView->SetDraggable(true);\r
- ringView->SetTouchable(true);\r
- return ringView;\r
+ g_ringLable->SetPosition(DELAY_LABEL_X, DELAY_LABEL_Y, DELAY_LABEL_LENGTH, DELAY_LABEL_HEIGHT);\r
+ g_ringLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, DELAY_LABEL_FONT);\r
+ g_ringLable->SetText(RING_AGAIN);\r
+ g_ringView->Add(g_ringLable);\r
+ g_ringView->SetViewId(ALARM_VIEW_DELAY);\r
+ UIView::OnDragListener *listener = static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());\r
+ g_ringView->SetOnDragListener(listener);\r
+ g_ringView->SetDraggable(true);\r
+ g_ringView->SetTouchable(true);\r
+ return g_ringView;\r
}\r
\r
void FreeAlarmRingView(void)\r
{\r
- if (ringView != nullptr) {\r
- DisableAlarmTimer(NOTIFY_ALARM_DELAY);\r
- ringView->RemoveAll();\r
- delete imageRing;\r
- imageRing = nullptr;\r
- delete ringLable;\r
- ringLable = nullptr;\r
- RootView::GetInstance()->Remove(ringView);\r
- delete ringView;\r
- ringView = nullptr;\r
+ if (g_ringView != nullptr) {\r
+ DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_DELAY);\r
+ g_ringView->RemoveAll();\r
+ delete g_imageRing;\r
+ g_imageRing = nullptr;\r
+ delete g_ringLable;\r
+ g_ringLable = nullptr;\r
+ RootView::GetInstance()->Remove(g_ringView);\r
+ delete g_ringView;\r
+ g_ringView = nullptr;\r
}\r
}\r
\r
static bool CreateAlarmViewImage(void)\r
{\r
- imageDelete = new UIImageView();\r
- if (imageDelete == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showAlarmNotify imageDelete null!");\r
+ g_imageDelete = new UIImageView();\r
+ if (g_imageDelete == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showAlarmNotify g_imageDelete null!");\r
return false;\r
}\r
- imageDelete->SetPosition(IMAGE_DELETE_X, IMAGE_DELETE_Y);\r
- imageDelete->SetWidth(MAX_SET_SRC_LEN);\r
- imageDelete->SetHeight(MAX_SET_SRC_LEN);\r
- imageDelete->SetViewId(ALARM_IMAGE_DELETE);\r
- imageDelete->SetSrc(ALARM_DELETE_ADD_PATH);\r
- imageDelete->SetTouchable(true);\r
- UIView::OnClickListener *closeListener = (UIView::OnClickListener *)AlarmViewEventListener::GetInstance();\r
- imageDelete->SetOnClickListener(closeListener);\r
-\r
- imageClock = new UIImageView();\r
- if (imageClock == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showAlarmNotify imageClock null!");\r
- delete imageDelete;\r
+ g_imageDelete->SetPosition(IMAGE_DELETE_X, IMAGE_DELETE_Y);\r
+ g_imageDelete->SetWidth(MAX_SET_SRC_LEN);\r
+ g_imageDelete->SetHeight(MAX_SET_SRC_LEN);\r
+ g_imageDelete->SetViewId(ALARM_IMAGE_DELETE);\r
+ g_imageDelete->SetSrc(ALARM_DELETE_ADD_PATH);\r
+ g_imageDelete->SetTouchable(true);\r
+ UIView::OnClickListener *closeListener = static_cast<UIView::OnClickListener *>\\r
+ (AlarmViewEventListener::GetInstance());\r
+ g_imageDelete->SetOnClickListener(closeListener);\r
+\r
+ g_imageClock = new UIImageView();\r
+ if (g_imageClock == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showAlarmNotify g_imageClock null!");\r
+ delete g_imageDelete;\r
return false;\r
}\r
- imageClock->SetPosition(IMAGE_CLOCK_X, IMAGE_CLOCK_Y);\r
- imageClock->SetWidth(MAX_SET_SRC_LEN);\r
- imageClock->SetHeight(MAX_SET_SRC_LEN);\r
- imageClock->SetViewId(ALARM_IMAGE_CLOCK);\r
- imageClock->SetSrc(ALARM_CLOCK_ADD_PATH);\r
- imageClock->SetTouchable(true);\r
- imageClock->SetTouchable(true);\r
- UIView::OnClickListener *clockListener = (UIView::OnClickListener *)OHOS::AlarmViewEventListener::GetInstance();\r
- imageClock->SetOnClickListener(clockListener);\r
+ g_imageClock->SetPosition(IMAGE_CLOCK_X, IMAGE_CLOCK_Y);\r
+ g_imageClock->SetWidth(MAX_SET_SRC_LEN);\r
+ g_imageClock->SetHeight(MAX_SET_SRC_LEN);\r
+ g_imageClock->SetViewId(ALARM_IMAGE_CLOCK);\r
+ g_imageClock->SetSrc(ALARM_CLOCK_ADD_PATH);\r
+ g_imageClock->SetTouchable(true);\r
+ g_imageClock->SetTouchable(true);\r
+ UIView::OnClickListener *clockListener = static_cast<UIView::OnClickListener *>\\r
+ (OHOS::AlarmViewEventListener::GetInstance());\r
+ g_imageClock->SetOnClickListener(clockListener);\r
return true;\r
}\r
\r
static void FreeAlarmViewImage(void)\r
{\r
- delete imageDelete;\r
- imageDelete = nullptr;\r
- delete imageClock;\r
- imageClock = nullptr;\r
+ delete g_imageDelete;\r
+ g_imageDelete = nullptr;\r
+ delete g_imageClock;\r
+ g_imageClock = nullptr;\r
}\r
\r
static bool CreateAlarmViewLabel(void)\r
{\r
- struct tm local_time;\r
- time_t seconds;\r
- seconds = time(NULL);\r
- int16 thisHour, thisMin;\r
-\r
- mainLable = new UILabel();\r
- if (mainLable == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmViewLabel mainLable is nullptr");\r
+ struct tm localTime;\r
+ int16 thisHour;\r
+ int16 thisMin;\r
+\r
+ g_mainLable = new UILabel();\r
+ if (g_mainLable == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmViewLabel g_mainLable is nullptr");\r
return false;\r
}\r
- mainLable->SetPosition(LABEL_X, LABEL_Y, LABEL_WIDTH, LABEL_HEIGHT);\r
- mainLable->SetText("闹钟");\r
- mainLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);\r
-\r
- dClock = new UIDigitalClock();\r
- if (dClock == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmViewLabel dClock is nullptr");\r
- delete mainLable;\r
+ g_mainLable->SetPosition(LABEL_X, LABEL_Y, LABEL_WIDTH, LABEL_HEIGHT);\r
+ g_mainLable->SetText("闹钟");\r
+ g_mainLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);\r
+\r
+ g_dClock = new UIDigitalClock();\r
+ if (g_dClock == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmViewLabel g_dClock is nullptr");\r
+ delete g_mainLable;\r
return false;\r
}\r
- dClock->SetPosition(CLOCK_X, CLOCK_Y);\r
- dClock->Resize(DIGITAL_CLOCK_WIDTH, DIGITAL_CLOCK_HEIGHT);\r
- dClock->SetFont(DEFAULT_VECTOR_FONT_FILENAME, CLOCK_FONT);\r
- if (localtime_r(&seconds, &local_time) == NULL) {\r
+ g_dClock->SetPosition(CLOCK_X, CLOCK_Y);\r
+ g_dClock->Resize(DIGITAL_CLOCK_WIDTH, DIGITAL_CLOCK_HEIGHT);\r
+ g_dClock->SetFont(DEFAULT_VECTOR_FONT_FILENAME, CLOCK_FONT);\r
+ time_t seconds = time(nullptr);\r
+ if (localtime_r(&seconds, &localTime) == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmViewLabel get localtime error!");\r
- delete mainLable;\r
- delete dClock;\r
+ delete g_mainLable;\r
+ delete g_dClock;\r
return false;\r
}\r
AlarmClockModel::GetInstance()->GetPopTimeData(&thisHour, &thisMin);\r
- dClock->SetDisplayMode(UIDigitalClock::DISPLAY_24_HOUR_NO_SECONDS);\r
- dClock->SetTime24Hour(thisHour, thisMin, 0);\r
+ g_dClock->SetDisplayMode(UIDigitalClock::DISPLAY_24_HOUR_NO_SECONDS);\r
+ g_dClock->SetTime24Hour(thisHour, thisMin, 0);\r
return true;\r
}\r
\r
static void FreeAlarmViewLabel(void)\r
{\r
- delete mainLable;\r
- mainLable = nullptr;\r
- delete dClock;\r
- dClock = nullptr;\r
+ delete g_mainLable;\r
+ g_mainLable = nullptr;\r
+ delete g_dClock;\r
+ g_dClock = nullptr;\r
}\r
\r
UIViewGroup* CreateAlarmView(void)\r
{\r
AlarmClockModel::GetInstance()->AlarmGetClockNum();\r
- alarmView = new UIViewGroup();\r
- if (alarmView == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmView alarmView null!");\r
+ g_alarmView = new UIViewGroup();\r
+ if (g_alarmView == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmView g_alarmView null!");\r
return nullptr;\r
}\r
- alarmView->SetPosition(CONTAINER_X, CONTAINER_Y,\r
- Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());\r
- alarmView->SetViewId(ALARM_VIEW_POPUP);\r
+ g_alarmView->SetPosition(CONTAINER_X, CONTAINER_Y,\r
+ Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());\r
+ g_alarmView->SetViewId(ALARM_VIEW_POPUP);\r
\r
- if (CreateAlarmViewLabel() == false) {\r
- delete alarmView;\r
- alarmView = nullptr;\r
+ if (!CreateAlarmViewLabel()) {\r
+ delete g_alarmView;\r
+ g_alarmView = nullptr;\r
return nullptr;\r
}\r
\r
- if (CreateAlarmViewImage() == false) {\r
- delete alarmView;\r
- alarmView = nullptr;\r
+ if (!CreateAlarmViewImage()) {\r
+ delete g_alarmView;\r
+ g_alarmView = nullptr;\r
FreeAlarmViewLabel();\r
return nullptr;\r
}\r
- alarmView->Add(mainLable);\r
- alarmView->Add(dClock);\r
- alarmView->Add(imageDelete);\r
- alarmView->Add(imageClock);\r
-\r
- alarmView->SetDraggable(true);\r
- alarmView->SetTouchable(true);\r
- UIView::OnDragListener *listener =static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());\r
- alarmView->SetOnDragListener(listener);\r
- StartAlarmTimer(NOTIFY_ALARM_RING, (int32_t)NOTOFY_NO_OPERATE_TIME);\r
- return alarmView;\r
+ g_alarmView->Add(g_mainLable);\r
+ g_alarmView->Add(g_dClock);\r
+ g_alarmView->Add(g_imageDelete);\r
+ g_alarmView->Add(g_imageClock);\r
+\r
+ g_alarmView->SetDraggable(true);\r
+ g_alarmView->SetTouchable(true);\r
+ UIView::OnDragListener *listener = static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());\r
+ g_alarmView->SetOnDragListener(listener);\r
+ StartAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING, NOTOFY_NO_OPERATE_TIME);\r
+ return g_alarmView;\r
}\r
void FreeAlarmView(void)\r
{\r
- if (alarmView != nullptr) {\r
- DisableAlarmTimer(NOTIFY_ALARM_RING);\r
- alarmView->RemoveAll();\r
+ if (g_alarmView != nullptr) {\r
+ DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING);\r
+ g_alarmView->RemoveAll();\r
FreeAlarmViewLabel();\r
FreeAlarmViewImage();\r
- RootView::GetInstance()->Remove(alarmView);\r
- delete alarmView;\r
- alarmView = nullptr;\r
+ RootView::GetInstance()->Remove(g_alarmView);\r
+ delete g_alarmView;\r
+ g_alarmView = nullptr;\r
}\r
}\r
\r
{\r
if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) {\r
if (strcmp(view.GetViewId(), ALARM_VIEW_POPUP) == 0) {\r
- DisableAlarmTimer(NOTIFY_ALARM_RING);\r
+ DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING);\r
AlarmPopUpPresenter::GetInstance()->DelayAlarmRing();\r
UIViewGroup* alarmRingView = CreateAlarmRingView();\r
NotificationManager::GetInstance()->screenContainer_->SetVisible(false);\r
RootView::GetInstance()->Add(alarmRingView);\r
alarmRingView->SetVisible(true);\r
- StartAlarmTimer(NOTIFY_ALARM_DELAY, (int32_t)NOTIFY_THREE_SECONDS);\r
+ StartAlarmTimer(AlarmTimerType::NOTIFY_ALARM_DELAY, NOTIFY_THREE_SECONDS);\r
} else if (strcmp(view.GetViewId(), ALARM_VIEW_CLOSE) == 0 ||\r
strcmp(view.GetViewId(), ALARM_VIEW_DELAY) == 0) {\r
NotificationManager::GetInstance()->StopNotify();\r
UNUSED(event);\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlamNotify ClickListener %s", view.GetViewId());\r
if (strcmp(view.GetViewId(), ALARM_IMAGE_DELETE) == 0) {\r
- DisableAlarmTimer(NOTIFY_ALARM_RING);\r
+ DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING);\r
AlarmPopUpPresenter::GetInstance()->CancelAlarmRing();\r
UIViewGroup* alarmCloseView = CreateAlarmCloseView();\r
NotificationManager::GetInstance()->screenContainer_->SetVisible(false);\r
RootView::GetInstance()->Add(alarmCloseView);\r
alarmCloseView->SetVisible(true);\r
- StartAlarmTimer(NOTIFY_ALARM_CLOSE, (int32_t)NOTIFY_THREE_SECONDS);\r
+ StartAlarmTimer(AlarmTimerType::NOTIFY_ALARM_CLOSE, NOTIFY_THREE_SECONDS);\r
return true;\r
} else if (strcmp(view.GetViewId(), ALARM_IMAGE_CLOCK) == 0) {\r
- DisableAlarmTimer(NOTIFY_ALARM_RING);\r
+ DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING);\r
AlarmPopUpPresenter::GetInstance()->DelayAlarmRing();\r
UIViewGroup* alarmRingView = CreateAlarmRingView();\r
NotificationManager::GetInstance()->screenContainer_->SetVisible(false);\r
RootView::GetInstance()->Add(alarmRingView);\r
alarmRingView->SetVisible(true);\r
- StartAlarmTimer(NOTIFY_ALARM_DELAY, (int32_t)NOTIFY_THREE_SECONDS);\r
+ StartAlarmTimer(AlarmTimerType::NOTIFY_ALARM_DELAY, NOTIFY_THREE_SECONDS);\r
}\r
return true;\r
}\r
#include "VolumeSettingPresenter.h"\r
#include "ui_resource_image.h"\r
\r
-#define NOTIFY_THREE_SECONDS 3000\r
-#define NOTIFY_ONE_SECOND 1000\r
-#define NOTIFY_THIRTY_SECONDS 30000\r
-#define NOTIFY_ONE_MINUTE 60000\r
-#define NOTOFY_NO_OPERATE_TIME 35000\r
-\r
namespace OHOS {\r
-int changeImage = 0;\r
-osTimerId_t g_callDuration = NULL; // timer of call duration\r
-osTimerId_t g_callCurrentTime = NULL; // timer of current time\r
+constexpr int32_t NOTIFY_THREE_SECONDS = 3000;\r
+constexpr int32_t NOTIFY_ONE_SECOND = 1000;\r
+constexpr int32_t NOTIFY_THIRTY_SECONDS = 30000;\r
+constexpr int32_t NOTIFY_ONE_MINUTE = 60000;\r
+constexpr int32_t NOTOFY_NO_OPERATE_TIME = 35000;\r
+int g_changeImage = 0;\r
+osTimerId_t g_callDurationTimer = nullptr; // timer of call duration\r
+osTimerId_t g_callCurrentTime = nullptr; // timer of current time\r
\r
static constexpr uint16 MATH_ZERO = 0;\r
\r
// 图片坐标\r
static constexpr uint16 LABEL_CALLERD_POSITION_X = 0;\r
static constexpr uint16 LABEL_CALLERD_POSITION_Y = 160;\r
+static constexpr uint16 LABEL_NEWCALLERD_POSITION_X = 0;\r
+static constexpr uint16 LABEL_NEWCALLERD_POSITION_Y = 160;\r
static constexpr uint16 IMAGE_HONRS_POSITION_X = 185;\r
static constexpr uint16 IMAGE_HONRS_POSITION_Y = 10;\r
static constexpr uint16 IMAGE_HANDUP_POSITION_X = 70;\r
static constexpr uint16 IMAGE_DISSGREE_POSITION_X = 80;\r
static constexpr uint16 IMAGE_AGREEING_POSITION_X = 270;\r
static constexpr uint16 IMAGE_ALL_POSITION_Y = 240;\r
+static constexpr uint16 IMAGE_HANDUP2_POSITION_X = 177;\r
+static constexpr uint16 IMAGE_HANDUP2_POSITION_Y = 270;\r
\r
// 字体大小\r
static constexpr uint16 FONT_CURRENT_SIZE = 25;\r
static constexpr uint16 FONT_CALLER_SIZE = 40;\r
-UIViewGroup* phoneView = nullptr;\r
-UIViewGroup* callingView = nullptr;\r
-UIViewGroup* volumeSettingView = nullptr;\r
-VolumeSettingView *volumeSetting = nullptr;\r
-UIImageView* imageAgree = nullptr;\r
-UIImageView* imageDissgree = nullptr;\r
-UIImageView* imageMicrophone = nullptr;\r
-UIImageView* imageHandUp = nullptr;\r
-UIImageView* imageHorns = nullptr;\r
-UILabel* callerNum = nullptr;\r
-UILabel* callerDisplay = nullptr;\r
-UILabel* callDuration = nullptr;\r
-UILabel* currentTimes = nullptr;\r
-UILabel* comingTimes = nullptr;\r
+UIViewGroup* g_phoneView = nullptr;\r
+UIViewGroup* g_multiPhoneView = nullptr;\r
+UIViewGroup* g_callingView = nullptr;\r
+UIViewGroup* g_volumeSettingView = nullptr;\r
+UIViewGroup* g_waitingHintsView = nullptr;\r
+VolumeSettingView *g_volumeSetting = nullptr;\r
+UIImageView* g_imageAgree = nullptr;\r
+UIImageView* g_imageDissgree = nullptr;\r
+UIImageView* g_imageMicrophone = nullptr;\r
+UIImageView* g_imageHandUp = nullptr;\r
+UIImageView* g_imageHorns = nullptr;\r
+UIImageView* g_imageDissgreeNew = nullptr;\r
+UILabel* g_callerNum = nullptr;\r
+UILabel* g_callerDisplay = nullptr;\r
+UILabel* g_callDuration = nullptr;\r
+UILabel* g_currentTimes = nullptr;\r
+UILabel* g_comingTimes = nullptr;\r
+UILabel* g_newCallHints = nullptr;\r
+UILabel* g_newCallNum = nullptr;\r
\r
void CallTimerCallBack(int data)\r
{\r
\r
void CallTimerCallBackProc(int data)\r
{\r
- if (callDuration != nullptr) {\r
- callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration());\r
+ if (g_callDuration != nullptr) {\r
+ g_callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration().c_str());\r
}\r
}\r
\r
void CallCurTimerCallBack(int data)\r
{\r
- if (currentTimes != nullptr) {\r
- currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());\r
+ if (g_currentTimes != nullptr) {\r
+ g_currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());\r
}\r
}\r
\r
{\r
uint32_t tick;\r
osStatus_t retTimer;\r
- if (type >= NOTIFY_PHONE_UNKNOWN) {\r
+ if (type >= CallTimerType::NOTIFY_PHONE_UNKNOWN) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "StartCallTimer type:%d invalid!!", type);\r
return;\r
}\r
switch (type) {\r
- case NOTIFY_PHONE_CALLING_DISPLAY:\r
- g_callDuration = osTimerNew((osTimerFunc_t)CallTimerCallBack, osTimerPeriodic, NULL, NULL);\r
+ case CallTimerType::NOTIFY_PHONE_CALLING_DISPLAY:\r
+ g_callDurationTimer = osTimerNew((osTimerFunc_t)CallTimerCallBack, osTimerPeriodic, nullptr, nullptr);\r
tick = osMs2Tick(interval);\r
- retTimer = osTimerStart(g_callDuration, tick);\r
- if (retTimer != osOK && g_callDuration != NULL) {\r
+ retTimer = osTimerStart(g_callDurationTimer, tick);\r
+ if (retTimer != osOK && g_callDurationTimer != nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,\r
"StartCallTimer osTimerStart failed, type = %d ret = %lx!!", type, retTimer);\r
- osTimerDelete(g_callDuration);\r
- g_callDuration = NULL;\r
+ osTimerDelete(g_callDurationTimer);\r
+ g_callDurationTimer = nullptr;\r
return;\r
}\r
break;\r
- case NOTIFY_PHONE_CURTIME_DISPLAY:\r
- g_callCurrentTime = osTimerNew((osTimerFunc_t)CallCurTimerCallBack, osTimerPeriodic, NULL, NULL);\r
+ case CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY:\r
+ g_callCurrentTime = osTimerNew((osTimerFunc_t)CallCurTimerCallBack, osTimerPeriodic, nullptr, nullptr);\r
tick = osMs2Tick(interval);\r
retTimer = osTimerStart(g_callCurrentTime, tick);\r
- if (retTimer != osOK && g_callCurrentTime != NULL) {\r
+ if (retTimer != osOK && g_callCurrentTime != nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,\r
"StartCallTimer osTimerStart failed, type = %d ret = %lx!!", type, retTimer);\r
osTimerDelete(g_callCurrentTime);\r
- g_callCurrentTime = NULL;\r
+ g_callCurrentTime = nullptr;\r
return;\r
}\r
break;\r
\r
void DisableCallTimer(CallTimerType type)\r
{\r
- if (type >= NOTIFY_PHONE_UNKNOWN) {\r
+ if (type >= CallTimerType::NOTIFY_PHONE_UNKNOWN) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableCallTimer type:%d invalid!!", type);\r
return;\r
}\r
osStatus_t ret;\r
switch (type) {\r
- case NOTIFY_PHONE_CALLING_DISPLAY:\r
- if (g_callDuration != NULL) {\r
- ret = osTimerDelete(g_callDuration);\r
+ case CallTimerType::NOTIFY_PHONE_CALLING_DISPLAY:\r
+ if (g_callDurationTimer != nullptr) {\r
+ ret = osTimerDelete(g_callDurationTimer);\r
if (ret != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableCallTimer failed, type= %d ret = %lx!", type, ret);\r
return;\r
}\r
- g_callDuration = NULL;\r
+ g_callDurationTimer = nullptr;\r
}\r
break;\r
- case NOTIFY_PHONE_CURTIME_DISPLAY:\r
- if (g_callCurrentTime != NULL) {\r
+ case CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY:\r
+ if (g_callCurrentTime != nullptr) {\r
ret = osTimerDelete(g_callCurrentTime);\r
if (ret != osOK) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableCallTimer failed, type= %d ret = %lx!", type, ret);\r
return;\r
}\r
- g_callCurrentTime = NULL;\r
+ g_callCurrentTime = nullptr;\r
}\r
break;\r
default:\r
\r
void HonrsViewChange(void)\r
{\r
- if (volumeSettingView == nullptr) {\r
- volumeSetting = new VolumeSettingView();\r
- if (volumeSetting == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "makephone_notification::volumeSetting nullptr err");\r
+ if (g_volumeSettingView == nullptr) {\r
+ g_volumeSetting = new VolumeSettingView();\r
+ if (g_volumeSetting == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "makephone_notification::g_volumeSetting nullptr err");\r
return;\r
}\r
- if (volumeSetting->SetUpVolume() == false) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "makephone_notification::volumeSetting SetUpVolume fail");\r
+ if (!g_volumeSetting->SetUpVolume()) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "makephone_notification::g_volumeSetting SetUpVolume fail");\r
return;\r
}\r
- volumeSetting->GetProgress()->SetValue(AudioManager::GetInstance().GetVolume(AUDIO_STREAM_VOICE_CALL_BT_SCO));\r
+ g_volumeSetting->GetProgress()->SetValue(\r
+ AudioManager::GetInstance().GetVolume(AUDIO_STREAM_VOICE_CALL_BT_SCO));\r
if (AudioManager::GetInstance().GetVolume(AUDIO_STREAM_VOICE_CALL_BT_SCO) == 0) {\r
ImageInfo *image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUTE_BUTTON, PLAYER_IAMGES);\r
- volumeSetting->GetDecreaseButton()->SetImageSrc(image, image);\r
+ g_volumeSetting->GetDecreaseButton()->SetImageSrc(image, image);\r
}\r
- volumeSettingView = volumeSetting;\r
- NotificationManager::GetInstance()->screenContainer_->Add(volumeSettingView);\r
+ g_volumeSettingView = g_volumeSetting;\r
+ NotificationManager::GetInstance()->screenContainer_->Add(g_volumeSettingView);\r
}\r
VolumeSliderEventListener *volumeSliderEventListener = VolumeSliderEventListener::GetInstance();\r
if (volumeSliderEventListener == nullptr) {\r
}\r
\r
volumeSliderEventListener->SetPlayerCoefficients(VOLUMEPHONENOTIFY); // 进度条系数\r
- volumeSettingView->SetVisible(true);\r
+ g_volumeSettingView->SetVisible(true);\r
// 刷新UI\r
RootView::GetInstance()->Invalidate();\r
}\r
\r
static void FreeCallingViewImage(void)\r
{\r
- if (imageMicrophone != nullptr) {\r
- delete imageMicrophone;\r
- imageMicrophone = nullptr;\r
+ if (g_imageMicrophone != nullptr) {\r
+ delete g_imageMicrophone;\r
+ g_imageMicrophone = nullptr;\r
}\r
- if (imageHandUp != nullptr) {\r
- delete imageHandUp;\r
- imageHandUp = nullptr;\r
+ if (g_imageHandUp != nullptr) {\r
+ delete g_imageHandUp;\r
+ g_imageHandUp = nullptr;\r
}\r
- if (imageHorns != nullptr) {\r
- delete imageHorns;\r
- imageHorns = nullptr;\r
+ if (g_imageHorns != nullptr) {\r
+ delete g_imageHorns;\r
+ g_imageHorns = nullptr;\r
}\r
}\r
\r
static bool DrawCallingViewImage(void)\r
{\r
- imageMicrophone = new UIImageView();\r
- if (imageMicrophone == nullptr) {\r
+ g_imageMicrophone = new UIImageView();\r
+ if (g_imageMicrophone == nullptr) {\r
return false;\r
}\r
- imageMicrophone->SetPosition(IMAGE_MIC_POSITION_X, IMAGE_ALL_POSITION_Y);\r
- imageMicrophone->SetSrc(PNG_MICROPHONE_OPEN_IMAGE_PATH);\r
- imageMicrophone->SetTouchable(true);\r
- imageMicrophone->SetViewId("microphoneChange");\r
+ g_imageMicrophone->SetPosition(IMAGE_MIC_POSITION_X, IMAGE_ALL_POSITION_Y);\r
+ g_imageMicrophone->SetSrc(PNG_MICROPHONE_OPEN_IMAGE_PATH);\r
+ g_imageMicrophone->SetTouchable(true);\r
+ g_imageMicrophone->SetViewId("microphoneChange");\r
\r
- imageHandUp = new UIImageView();\r
- if (imageHandUp == nullptr) {\r
+ g_imageHandUp = new UIImageView();\r
+ if (g_imageHandUp == nullptr) {\r
FreeCallingViewImage();\r
return false;\r
}\r
- imageHandUp->SetPosition(IMAGE_HANDUP_POSITION_X, IMAGE_ALL_POSITION_Y);\r
- imageHandUp->SetSrc(PNG_DISSGREE_IMAGE_PATH);\r
- imageHandUp->SetTouchable(true);\r
- imageHandUp->SetViewId("callingHandUp");\r
+ g_imageHandUp->SetPosition(IMAGE_HANDUP_POSITION_X, IMAGE_ALL_POSITION_Y);\r
+ g_imageHandUp->SetSrc(PNG_DISSGREE_IMAGE_PATH);\r
+ g_imageHandUp->SetTouchable(true);\r
+ g_imageHandUp->SetViewId("callingHandUp");\r
\r
- imageHorns = new UIImageView();\r
- if (imageHorns == nullptr) {\r
+ g_imageHorns = new UIImageView();\r
+ if (g_imageHorns == nullptr) {\r
FreeCallingViewImage();\r
return false;\r
}\r
- imageHorns->SetPosition(IMAGE_HONRS_POSITION_X, IMAGE_HONRS_POSITION_Y);\r
- imageHorns->SetSrc(PNG_SOUNDBUTTON2);\r
- imageHorns->SetTouchable(true);\r
- imageHorns->SetViewId("volumeSwitch");\r
+ g_imageHorns->SetPosition(IMAGE_HONRS_POSITION_X, IMAGE_HONRS_POSITION_Y);\r
+ g_imageHorns->SetSrc(PNG_SOUNDBUTTON2);\r
+ g_imageHorns->SetTouchable(true);\r
+ g_imageHorns->SetViewId("volumeSwitch");\r
\r
return true;\r
}\r
\r
static void FreeCallingViewUILabel(void)\r
{\r
- if (callerDisplay != nullptr) {\r
- delete callerDisplay;\r
- callerDisplay = nullptr;\r
+ if (g_callerDisplay != nullptr) {\r
+ delete g_callerDisplay;\r
+ g_callerDisplay = nullptr;\r
}\r
- if (callDuration != nullptr) {\r
- delete callDuration;\r
- callDuration = nullptr;\r
+ if (g_callDuration != nullptr) {\r
+ delete g_callDuration;\r
+ g_callDuration = nullptr;\r
}\r
- if (currentTimes != nullptr) {\r
- delete currentTimes;\r
- currentTimes = nullptr;\r
+ if (g_currentTimes != nullptr) {\r
+ delete g_currentTimes;\r
+ g_currentTimes = nullptr;\r
}\r
}\r
\r
static bool DrawCallingViewUILabel(void)\r
{\r
- callerDisplay = new UILabel();\r
- if (callerDisplay == nullptr) {\r
+ g_callerDisplay = new UILabel();\r
+ if (g_callerDisplay == nullptr) {\r
return false;\r
}\r
- callerDisplay->SetPosition(LABEL_PERCENT_POSITION_X, LABEL_PERCENT_POSITION_Y,\r
+ g_callerDisplay->SetPosition(LABEL_PERCENT_POSITION_X, LABEL_PERCENT_POSITION_Y,\r
Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);\r
- callerDisplay->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
- callerDisplay->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());\r
- callerDisplay->SetAlign(TEXT_ALIGNMENT_CENTER);\r
- callerDisplay->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);\r
- callerDisplay->SetTextColor(Color::White());\r
-\r
- callDuration = new UILabel();\r
- if (callDuration == nullptr) {\r
+ g_callerDisplay->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
+ g_callerDisplay->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());\r
+ g_callerDisplay->SetAlign(TEXT_ALIGNMENT_CENTER);\r
+ g_callerDisplay->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);\r
+ g_callerDisplay->SetTextColor(Color::White());\r
+\r
+ g_callDuration = new UILabel();\r
+ if (g_callDuration == nullptr) {\r
FreeCallingViewUILabel();\r
return false;\r
}\r
- callDuration->SetPosition(LABEL_CALLERD_POSITION_X, LABEL_CALLERD_POSITION_Y,\r
+ g_callDuration->SetPosition(LABEL_CALLERD_POSITION_X, LABEL_CALLERD_POSITION_Y,\r
Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);\r
- callDuration->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
- callDuration->SetAlign(TEXT_ALIGNMENT_CENTER);\r
- callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration());\r
- callDuration->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);\r
- callDuration->SetTextColor(Color::White());\r
-\r
- currentTimes = new UILabel();\r
- if (currentTimes == nullptr) {\r
+ g_callDuration->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
+ g_callDuration->SetAlign(TEXT_ALIGNMENT_CENTER);\r
+ g_callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration().c_str());\r
+ g_callDuration->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);\r
+ g_callDuration->SetTextColor(Color::White());\r
+\r
+ g_currentTimes = new UILabel();\r
+ if (g_currentTimes == nullptr) {\r
FreeCallingViewUILabel();\r
return false;\r
}\r
- currentTimes->SetPosition(LABEL_CURREMTTIME_POSITION_X, LABEL_CURREMTTIME_POSITION_Y,\r
+ g_currentTimes->SetPosition(LABEL_CURREMTTIME_POSITION_X, LABEL_CURREMTTIME_POSITION_Y,\r
Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);\r
- currentTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
- currentTimes->SetAlign(TEXT_ALIGNMENT_CENTER);\r
- currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());\r
- currentTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);\r
- currentTimes->SetTextColor(Color::White());\r
+ g_currentTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
+ g_currentTimes->SetAlign(TEXT_ALIGNMENT_CENTER);\r
+ g_currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());\r
+ g_currentTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);\r
+ g_currentTimes->SetTextColor(Color::White());\r
+\r
+ return true;\r
+}\r
+\r
+static bool DrawWaitingHintsViewImage(void)\r
+{\r
+ g_imageDissgreeNew = new UIImageView();\r
+ if (g_imageDissgreeNew == nullptr) {\r
+ FreeCallingViewImage();\r
+ return false;\r
+ }\r
+ g_imageDissgreeNew->SetPosition(IMAGE_HANDUP2_POSITION_X, IMAGE_HANDUP2_POSITION_Y);\r
+ g_imageDissgreeNew->SetSrc(PNG_DISSGREE_IMAGE_PATH);\r
+ g_imageDissgreeNew->SetTouchable(true);\r
+ g_imageDissgreeNew->SetViewId("newCallHandUp");\r
+ return true;\r
+}\r
+\r
+static void FreeWaitingHintsViewImage(void)\r
+{\r
+ if (g_imageDissgreeNew != nullptr) {\r
+ delete g_imageDissgreeNew;\r
+ g_imageDissgreeNew = nullptr;\r
+ }\r
+}\r
+\r
+static void FreeWaitingHintsViewLabel(void)\r
+{\r
+ if (g_newCallNum != nullptr) {\r
+ delete g_newCallNum;\r
+ g_newCallNum = nullptr;\r
+ }\r
+ if (g_newCallHints != nullptr) {\r
+ delete g_newCallHints;\r
+ g_newCallHints = nullptr;\r
+ }\r
+}\r
\r
+static bool DrawWaitingHintsViewLabel(void)\r
+{\r
+ g_newCallNum = new UILabel();\r
+ if (g_newCallNum == nullptr) {\r
+ return false;\r
+ }\r
+ g_newCallNum->SetPosition(LABEL_PERCENT_POSITION_X, LABEL_PERCENT_POSITION_Y,\r
+ Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);\r
+ g_newCallNum->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
+ g_newCallNum->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());\r
+ g_newCallNum->SetAlign(TEXT_ALIGNMENT_CENTER);\r
+ g_newCallNum->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);\r
+ g_newCallNum->SetTextColor(Color::White());\r
+\r
+ g_newCallHints = new UILabel();\r
+ if (g_newCallHints == nullptr) {\r
+ FreeWaitingHintsViewLabel();\r
+ return false;\r
+ }\r
+ g_newCallHints->SetPosition(LABEL_NEWCALLERD_POSITION_X, LABEL_NEWCALLERD_POSITION_Y,\r
+ Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);\r
+ g_newCallHints->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
+ g_newCallHints->SetText("新来电");\r
+ g_newCallHints->SetAlign(TEXT_ALIGNMENT_CENTER);\r
+ g_newCallHints->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);\r
+ g_newCallHints->SetTextColor(Color::White());\r
return true;\r
}\r
\r
static void FreePhoneCallViewImage(void)\r
{\r
- if (imageAgree != nullptr) {\r
- delete imageAgree;\r
- imageAgree = nullptr;\r
+ if (g_imageAgree != nullptr) {\r
+ delete g_imageAgree;\r
+ g_imageAgree = nullptr;\r
}\r
- if (imageDissgree != nullptr) {\r
- delete imageDissgree;\r
- imageDissgree = nullptr;\r
+ if (g_imageDissgree != nullptr) {\r
+ delete g_imageDissgree;\r
+ g_imageDissgree = nullptr;\r
}\r
}\r
\r
static bool DrawPhoneCallViewImage(void)\r
{\r
- imageAgree = new UIImageView();\r
- if (imageAgree == nullptr) {\r
+ g_imageAgree = new UIImageView();\r
+ if (g_imageAgree == nullptr) {\r
return false;\r
}\r
- imageAgree->SetPosition(IMAGE_AGREEING_POSITION_X, IMAGE_ALL_POSITION_Y);\r
- imageAgree->SetSrc(PNG_AGREEING_IMAGE_PATH);\r
- imageAgree->SetTouchable(true);\r
- imageAgree->SetViewId("answer");\r
- UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::CallViewEventListener::GetInstance();\r
- imageAgree->SetOnClickListener(clickListener);\r
- imageDissgree = new UIImageView();\r
- if (imageDissgree == nullptr) {\r
+ g_imageAgree->SetPosition(IMAGE_AGREEING_POSITION_X, IMAGE_ALL_POSITION_Y);\r
+ g_imageAgree->SetSrc(PNG_AGREEING_IMAGE_PATH);\r
+ g_imageAgree->SetTouchable(true);\r
+ g_imageAgree->SetViewId("answer");\r
+ UIView::OnClickListener *clickListener = static_cast<UIView::OnClickListener *>\\r
+ (OHOS::CallViewEventListener::GetInstance());\r
+ g_imageAgree->SetOnClickListener(clickListener);\r
+ g_imageDissgree = new UIImageView();\r
+ if (g_imageDissgree == nullptr) {\r
FreePhoneCallViewImage();\r
return false;\r
}\r
- imageDissgree->SetPosition(IMAGE_DISSGREE_POSITION_X, IMAGE_ALL_POSITION_Y);\r
- imageDissgree->SetSrc(PNG_DISSGREE_IMAGE_PATH);\r
- imageDissgree->SetTouchable(true);\r
- imageDissgree->SetViewId("displayHandUp");\r
- imageDissgree->SetOnClickListener(clickListener);\r
+ g_imageDissgree->SetPosition(IMAGE_DISSGREE_POSITION_X, IMAGE_ALL_POSITION_Y);\r
+ g_imageDissgree->SetSrc(PNG_DISSGREE_IMAGE_PATH);\r
+ g_imageDissgree->SetTouchable(true);\r
+ g_imageDissgree->SetViewId("displayHandUp");\r
+ g_imageDissgree->SetOnClickListener(clickListener);\r
return true;\r
}\r
\r
static void FreePhoneCallViewLabel(void)\r
{\r
- if (callerNum != nullptr) {\r
- delete callerNum;\r
- callerNum = nullptr;\r
+ if (g_callerNum != nullptr) {\r
+ delete g_callerNum;\r
+ g_callerNum = nullptr;\r
}\r
- if (comingTimes != nullptr) {\r
- delete comingTimes;\r
- comingTimes = nullptr;\r
+ if (g_comingTimes != nullptr) {\r
+ delete g_comingTimes;\r
+ g_comingTimes = nullptr;\r
}\r
}\r
\r
static bool DrawPhoneCallViewLabel(void)\r
{\r
- callerNum = new UILabel();\r
- if (callerNum == nullptr) {\r
+ g_callerNum = new UILabel();\r
+ if (g_callerNum == nullptr) {\r
return false;\r
}\r
- callerNum->SetPosition(LABEL_COMINGVIEW_POSITION_X, LABEL_COMINGVIEW_POSITION_Y, Screen::GetInstance().GetWidth(),\r
- TITLE_LABEL_DEFAULT_HEIGHT);\r
- callerNum->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
+ g_callerNum->SetPosition(LABEL_COMINGVIEW_POSITION_X, LABEL_COMINGVIEW_POSITION_Y,\r
+ Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);\r
+ g_callerNum->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "CreatePhoneCallView phonenum:%s!",\r
CallerLogModel::GetInstance()->GetPhoneNumber().c_str());\r
- callerNum->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());\r
- callerNum->SetAlign(TEXT_ALIGNMENT_CENTER);\r
- callerNum->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);\r
- callerNum->SetTextColor(Color::White());\r
+ g_callerNum->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());\r
+ g_callerNum->SetAlign(TEXT_ALIGNMENT_CENTER);\r
+ g_callerNum->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);\r
+ g_callerNum->SetTextColor(Color::White());\r
\r
- comingTimes = new UILabel();\r
- if (comingTimes == nullptr) {\r
+ g_comingTimes = new UILabel();\r
+ if (g_comingTimes == nullptr) {\r
FreePhoneCallViewLabel();\r
return false;\r
}\r
- comingTimes->SetPosition(LABEL_COMINGTIME_POSITION_X, LABEL_COMINGTIME_POSITION_Y,\r
+ g_comingTimes->SetPosition(LABEL_COMINGTIME_POSITION_X, LABEL_COMINGTIME_POSITION_Y,\r
Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);\r
- comingTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
- comingTimes->SetAlign(TEXT_ALIGNMENT_CENTER);\r
- comingTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());\r
- comingTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);\r
- comingTimes->SetTextColor(Color::White());\r
+ g_comingTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);\r
+ g_comingTimes->SetAlign(TEXT_ALIGNMENT_CENTER);\r
+ g_comingTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());\r
+ g_comingTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);\r
+ g_comingTimes->SetTextColor(Color::White());\r
return true;\r
}\r
\r
UIViewGroup* CreatePhoneCallView(void)\r
{\r
- phoneView = new UIViewGroup();\r
- if (phoneView == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreatePhoneCallView phoneView null!");\r
+ g_phoneView = new UIViewGroup();\r
+ if (g_phoneView == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreatePhoneCallView g_phoneView null!");\r
return nullptr;\r
}\r
- phoneView->SetPosition(MATH_ZERO, MATH_ZERO);\r
- phoneView->SetWidth(Screen::GetInstance().GetWidth());\r
- phoneView->SetHeight(Screen::GetInstance().GetHeight());\r
- if (DrawPhoneCallViewImage() == false) {\r
- delete phoneView;\r
- phoneView = nullptr;\r
+ g_phoneView->SetPosition(MATH_ZERO, MATH_ZERO);\r
+ g_phoneView->SetWidth(Screen::GetInstance().GetWidth());\r
+ g_phoneView->SetHeight(Screen::GetInstance().GetHeight());\r
+ if (!DrawPhoneCallViewImage()) {\r
+ delete g_phoneView;\r
+ g_phoneView = nullptr;\r
return nullptr;\r
}\r
- if (DrawPhoneCallViewLabel() == false) {\r
+ if (!DrawPhoneCallViewLabel()) {\r
FreePhoneCallViewImage();\r
- delete phoneView;\r
- phoneView = nullptr;\r
+ delete g_phoneView;\r
+ g_phoneView = nullptr;\r
return nullptr;\r
}\r
- phoneView->Add(imageAgree);\r
- phoneView->Add(imageDissgree);\r
- phoneView->Add(callerNum);\r
- phoneView->Add(comingTimes);\r
- phoneView->SetDraggable(true);\r
- phoneView->SetTouchable(true);\r
- return phoneView;\r
+ g_phoneView->Add(g_imageAgree);\r
+ g_phoneView->Add(g_imageDissgree);\r
+ g_phoneView->Add(g_callerNum);\r
+ g_phoneView->Add(g_comingTimes);\r
+ g_phoneView->SetDraggable(true);\r
+ g_phoneView->SetTouchable(true);\r
+ return g_phoneView;\r
}\r
\r
void FreePhoneCallView(void)\r
{\r
- if (phoneView != nullptr) {\r
- phoneView->RemoveAll();\r
+ if (g_phoneView != nullptr) {\r
+ g_phoneView->RemoveAll();\r
FreePhoneCallViewImage();\r
FreePhoneCallViewLabel();\r
- RootView::GetInstance()->Remove(phoneView);\r
- delete phoneView;\r
- phoneView = nullptr;\r
+ RootView::GetInstance()->Remove(g_phoneView);\r
+ delete g_phoneView;\r
+ g_phoneView = nullptr;\r
+ }\r
+}\r
+\r
+UIViewGroup* CreateMultiplePhoneView(void)\r
+{\r
+ g_multiPhoneView = new UIViewGroup();\r
+ if (g_multiPhoneView == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateMultiplePhoneView g_multiPhoneView null!");\r
+ return nullptr;\r
+ }\r
+ g_multiPhoneView->SetPosition(MATH_ZERO, MATH_ZERO);\r
+ g_multiPhoneView->SetWidth(Screen::GetInstance().GetWidth());\r
+ g_multiPhoneView->SetHeight(Screen::GetInstance().GetHeight());\r
+ if (!DrawCallingViewImage()) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateMultiplePhoneView create image error!");\r
+ delete g_multiPhoneView;\r
+ g_multiPhoneView = nullptr;\r
+ return nullptr;\r
+ }\r
+ if (!DrawCallingViewUILabel()) {\r
+ FreeCallingViewImage();\r
+ delete g_multiPhoneView;\r
+ g_multiPhoneView = nullptr;\r
+ return nullptr;\r
+ }\r
+ g_callerDisplay->SetText("正在通话");\r
+ g_callDuration->SetText("");\r
+ g_multiPhoneView->Add(g_imageMicrophone);\r
+ g_multiPhoneView->Add(g_imageHandUp);\r
+ g_multiPhoneView->Add(g_imageHorns);\r
+ g_multiPhoneView->Add(g_callerDisplay);\r
+ g_multiPhoneView->Add(g_callDuration);\r
+ g_multiPhoneView->Add(g_currentTimes);\r
+ g_multiPhoneView->SetDraggable(true);\r
+ g_multiPhoneView->SetTouchable(true);\r
+ UIView::OnClickListener *clickListener = static_cast<UIView::OnClickListener *>\\r
+ (OHOS::CallViewEventListener::GetInstance());\r
+ g_imageMicrophone->SetOnClickListener(clickListener);\r
+ g_imageHandUp->SetOnClickListener(clickListener);\r
+ g_imageHorns->SetOnClickListener(clickListener);\r
+ StartCallTimer(CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY, NOTIFY_THIRTY_SECONDS);\r
+ NotificationManager::GetInstance()->SetVolumeScreenStatus(false);\r
+\r
+ return g_multiPhoneView;\r
+}\r
+\r
+void FreeMultiplePhoneCallView(void)\r
+{\r
+ if (g_multiPhoneView != nullptr) {\r
+ DisableCallTimer(CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY);\r
+ g_multiPhoneView->RemoveAll();\r
+ FreeCallingViewImage();\r
+ FreeCallingViewUILabel();\r
+ RootView::GetInstance()->Remove(g_multiPhoneView);\r
+ delete g_multiPhoneView;\r
+ g_multiPhoneView = nullptr;\r
+ }\r
+ if (g_volumeSettingView != nullptr) {\r
+ delete g_volumeSettingView;\r
+ g_volumeSettingView = nullptr;\r
+ g_volumeSetting = nullptr;\r
}\r
}\r
\r
UIViewGroup* CreateCallingView(void)\r
{\r
- callingView = new UIViewGroup();\r
- if (callingView == nullptr) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateCallingView callingView null!");\r
+ g_callingView = new UIViewGroup();\r
+ if (g_callingView == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateCallingView g_callingView null!");\r
return nullptr;\r
}\r
- callingView->SetPosition(MATH_ZERO, MATH_ZERO);\r
- callingView->SetWidth(Screen::GetInstance().GetWidth());\r
- callingView->SetHeight(Screen::GetInstance().GetHeight());\r
- if (DrawCallingViewImage() == false) {\r
+ g_callingView->SetPosition(MATH_ZERO, MATH_ZERO);\r
+ g_callingView->SetWidth(Screen::GetInstance().GetWidth());\r
+ g_callingView->SetHeight(Screen::GetInstance().GetHeight());\r
+ if (!DrawCallingViewImage()) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateCallingView create image error!");\r
- delete callingView;\r
- callingView = nullptr;\r
+ delete g_callingView;\r
+ g_callingView = nullptr;\r
return nullptr;\r
}\r
- if (DrawCallingViewUILabel() == false) {\r
+ if (!DrawCallingViewUILabel()) {\r
FreeCallingViewImage();\r
- delete callingView;\r
- callingView = nullptr;\r
+ delete g_callingView;\r
+ g_callingView = nullptr;\r
return nullptr;\r
}\r
- callingView->Add(imageMicrophone);\r
- callingView->Add(imageHandUp);\r
- callingView->Add(imageHorns);\r
- callingView->Add(callerDisplay);\r
- callingView->Add(callDuration);\r
- callingView->Add(currentTimes);\r
- callingView->SetDraggable(true);\r
- callingView->SetTouchable(true);\r
- UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::CallViewEventListener::GetInstance();\r
- imageMicrophone->SetOnClickListener(clickListener);\r
- imageHandUp->SetOnClickListener(clickListener);\r
- imageHorns->SetOnClickListener(clickListener);\r
- StartCallTimer(NOTIFY_PHONE_CALLING_DISPLAY, (int32_t)NOTIFY_ONE_SECOND);\r
- StartCallTimer(NOTIFY_PHONE_CURTIME_DISPLAY, (int32_t)NOTIFY_THIRTY_SECONDS);\r
+ g_callingView->Add(g_imageMicrophone);\r
+ g_callingView->Add(g_imageHandUp);\r
+ g_callingView->Add(g_imageHorns);\r
+ g_callingView->Add(g_callerDisplay);\r
+ g_callingView->Add(g_callDuration);\r
+ g_callingView->Add(g_currentTimes);\r
+ g_callingView->SetDraggable(true);\r
+ g_callingView->SetTouchable(true);\r
+ UIView::OnClickListener *clickListener = static_cast<UIView::OnClickListener *>\\r
+ (OHOS::CallViewEventListener::GetInstance());\r
+ g_imageMicrophone->SetOnClickListener(clickListener);\r
+ g_imageHandUp->SetOnClickListener(clickListener);\r
+ g_imageHorns->SetOnClickListener(clickListener);\r
+ StartCallTimer(CallTimerType::NOTIFY_PHONE_CALLING_DISPLAY, NOTIFY_ONE_SECOND);\r
+ StartCallTimer(CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY, NOTIFY_THIRTY_SECONDS);\r
NotificationManager::GetInstance()->SetVolumeScreenStatus(false);\r
- return callingView;\r
+ return g_callingView;\r
}\r
\r
void FreeCallingView(void)\r
{\r
- if (callingView != nullptr) {\r
- DisableCallTimer(NOTIFY_PHONE_CALLING_DISPLAY);\r
- DisableCallTimer(NOTIFY_PHONE_CURTIME_DISPLAY);\r
- callingView->RemoveAll();\r
+ if (g_callingView != nullptr) {\r
+ DisableCallTimer(CallTimerType::NOTIFY_PHONE_CALLING_DISPLAY);\r
+ DisableCallTimer(CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY);\r
+ g_callingView->RemoveAll();\r
FreeCallingViewImage();\r
FreeCallingViewUILabel();\r
- RootView::GetInstance()->Remove(callingView);\r
- delete callingView;\r
- callingView = nullptr;\r
+ RootView::GetInstance()->Remove(g_callingView);\r
+ delete g_callingView;\r
+ g_callingView = nullptr;\r
+ }\r
+ if (g_volumeSettingView != nullptr) {\r
+ delete g_volumeSettingView;\r
+ g_volumeSettingView = nullptr;\r
+ g_volumeSetting = nullptr;\r
+ }\r
+}\r
+\r
+UIViewGroup* CreateWaitingHintsView(void)\r
+{\r
+ g_waitingHintsView = new UIViewGroup();\r
+ if (g_waitingHintsView == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateWaitingHintsView g_waitingHintsView null!");\r
+ return nullptr;\r
+ }\r
+ g_waitingHintsView->SetPosition(MATH_ZERO, MATH_ZERO);\r
+ g_waitingHintsView->SetWidth(Screen::GetInstance().GetWidth());\r
+ g_waitingHintsView->SetHeight(Screen::GetInstance().GetHeight());\r
+ if (!DrawWaitingHintsViewImage()) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateWaitingHintsView create image error!");\r
+ delete g_waitingHintsView;\r
+ g_waitingHintsView = nullptr;\r
+ return nullptr;\r
}\r
- if (volumeSettingView != nullptr) {\r
- delete volumeSettingView;\r
- volumeSettingView = nullptr;\r
- volumeSetting = nullptr;\r
+ if (!DrawWaitingHintsViewLabel()) {\r
+ FreeWaitingHintsViewImage();\r
+ delete g_waitingHintsView;\r
+ g_waitingHintsView = nullptr;\r
+ return nullptr;\r
+ }\r
+ g_waitingHintsView->Add(g_imageDissgreeNew);\r
+ g_waitingHintsView->Add(g_newCallNum);\r
+ g_waitingHintsView->Add(g_newCallHints);\r
+ g_waitingHintsView->SetDraggable(true);\r
+ g_waitingHintsView->SetTouchable(true);\r
+ UIView::OnClickListener *clickListener = static_cast<UIView::OnClickListener *>\\r
+ (OHOS::CallViewEventListener::GetInstance());\r
+ g_imageDissgreeNew->SetOnClickListener(clickListener);\r
+ return g_waitingHintsView;\r
+}\r
+\r
+void FreeWaitingHintsView(void)\r
+{\r
+ if (g_waitingHintsView != nullptr) {\r
+ g_waitingHintsView->RemoveAll();\r
+ FreeWaitingHintsViewImage();\r
+ FreeWaitingHintsViewLabel();\r
+ RootView::GetInstance()->Remove(g_waitingHintsView);\r
+ delete g_waitingHintsView;\r
+ g_waitingHintsView = nullptr;\r
}\r
}\r
\r
void RefreshMicrophoneImageSrc(const char* src)\r
{\r
- imageMicrophone->SetSrc(src);\r
+ g_imageMicrophone->SetSrc(src);\r
+}\r
+\r
+void EnableWaitingView(void)\r
+{\r
+ if (g_waitingHintsView == nullptr) {\r
+ CreateWaitingHintsView();\r
+ }\r
+ if (NotificationManager::GetInstance()->screenContainer_ != nullptr) {\r
+ NotificationManager::GetInstance()->screenContainer_->SetVisible(false);\r
+ }\r
+ RootView::GetInstance()->Add(g_waitingHintsView);\r
+ g_waitingHintsView->SetVisible(true);\r
+ RootView::GetInstance()->Invalidate();\r
+}\r
+\r
+void DisableWatingView(void)\r
+{\r
+ if (g_waitingHintsView != nullptr) {\r
+ g_waitingHintsView->SetVisible(false);\r
+ FreeWaitingHintsView();\r
+ if (NotificationManager::GetInstance()->screenContainer_ != nullptr) {\r
+ NotificationManager::GetInstance()->screenContainer_->SetVisible(true);\r
+ }\r
+ RootView::GetInstance()->Invalidate();\r
+ }\r
+}\r
+\r
+bool HintsHandupClick(void)\r
+{\r
+ if (RejectIncomingCall() != 0) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[HintsHandupClick] RejectIncomingCall error");\r
+ return false;\r
+ }\r
+ CallerLogModel::GetInstance()->SetWaitingStatus(false);\r
+ CallerLogModel::GetInstance()->SetCallStatus(true);\r
+\r
+ return true;\r
}\r
\r
CallViewEventListener::CallViewEventListener()\r
}\r
return true;\r
} else if (strcmp(view.GetViewId(), "microphoneChange") == 0) {\r
- if (changeImage == 0) {\r
- changeImage = 1;\r
+ if (g_changeImage == 0) {\r
+ g_changeImage = 1;\r
RefreshMicrophoneImageSrc(PNG_MICROPHONE_CLOSE_IMAGE_PATH);\r
SetMicMute(true);\r
} else {\r
- changeImage = 0;\r
+ g_changeImage = 0;\r
RefreshMicrophoneImageSrc(PNG_MICROPHONE_OPEN_IMAGE_PATH);\r
SetMicMute(false);\r
}\r
return true;\r
} else if (strcmp(view.GetViewId(), "volumeSwitch") == 0) {\r
HonrsViewChange();\r
+ } else if (strcmp(view.GetViewId(), "newCallHandUp") == 0) {\r
+ if (!HintsHandupClick()) {\r
+ return false;\r
+ }\r
}\r
return true;\r
}\r
FreeAlarmRingView();
FreePhoneCallView();
FreeCallingView();
+ FreeMultiplePhoneCallView();
+ FreeWaitingHintsView();
}
}
* Create: 2021-11-11\r
*/\r
\r
-#include "msg_center.h"\r
#include <stdio.h>\r
+#include "msg_center.h"\r
#include "adapter.h"\r
#include "msg_center_protocol.h"\r
#include "msg_center_cmd.h"\r
#endif\r
#include "common_def.h"\r
#include "player_sample_wrapper.h"\r
-#include "cmsis_os2.h"\r
+#include "baidumap_msg_center.h"\r
+#include "baidumap.h"\r
+#include "soc_osal.h"\r
\r
#ifdef __cplusplus\r
extern "C" {\r
#define TASK_PRIORITY_PCM_STREAM (osPriority_t)(40)\r
#define PCM_STREAM_MSG_STACK_SIZE 0xC00\r
\r
-osMessageQueueId_t g_pcm_stream_msg_queue_id = NULL;\r
+osMessageQueueId_t g_pcm_stream_msg_queue_id = nullptr;\r
\r
errcode_t msg_center_navigation_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
{\r
uint8_t ack = 1; /* 与手机APK侧约定 */\r
\r
char *bundleName = msg_center_get_bundle_name(cmd_id);\r
- if (bundleName == NULL) {\r
+ if (bundleName == nullptr) {\r
return ERRCODE_FAIL;\r
}\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "bundle name = %s\r\n", bundleName);\r
}\r
\r
char *data = (char *)malloc(payload_len + 1);\r
- if (data == NULL) {\r
+ if (data == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "msg_center_navigation_recv: malloc failed.\r\n");\r
return ERRCODE_FAIL;\r
}\r
\r
- memcpy(data, tlv_payload, payload_len);\r
+ (void)memcpy_s(data, payload_len, tlv_payload, payload_len);\r
data[payload_len] = '\0';\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv navigate info--> %s\r\n", tlv_payload);\r
DmsLiteSendMsgToJS(data);\r
- data = NULL;\r
free(data);\r
-\r
+ data = nullptr;\r
return ERRCODE_SUCC;\r
}\r
\r
osMessageQueueAttr_t m_attr = {0};\r
m_attr.name = "PCM_STREAM_MSG";\r
g_pcm_stream_msg_queue_id = osMessageQueueNew(PCM_STREAM_MSG_QUEUE_LEN, sizeof(pcm_stream_queue_msg), &m_attr);\r
- if (g_pcm_stream_msg_queue_id == 0) {\r
+ if (g_pcm_stream_msg_queue_id == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "create msg queue fail\r\n");\r
return ERRCODE_FAIL;\r
}\r
}\r
\r
for (;;) {\r
- osStatus_t ret = osMessageQueueGet(g_pcm_stream_msg_queue_id, &msg, NULL, osWaitForever);\r
+ osStatus_t ret = osMessageQueueGet(g_pcm_stream_msg_queue_id, &msg, nullptr, osWaitForever);\r
if (ret != osOK) {\r
continue;\r
}\r
return ERRCODE_FAIL;\r
}\r
} else if (msg.msg_id == MSGCENTER_TYPE_ID_XIAODU_END_RECORD) {\r
- res = msg_center_xiaodu_send_end_record(MSGCENTER_CMD_XIAODU, MSGCENTER_TYPE_ID_XIAODU_END_RECORD, NULL, 0);\r
+ res = msg_center_xiaodu_send_end_record(MSGCENTER_CMD_XIAODU, MSGCENTER_TYPE_ID_XIAODU_END_RECORD, nullptr,\r
+ 0);\r
if (res != ERRCODE_SUCC) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "send pcm stream failed");\r
return ERRCODE_FAIL;\r
return ERRCODE_SUCC;\r
}\r
\r
+osMessageQueueId_t GetPcmMsgQueueId(void)\r
+{\r
+ return g_pcm_stream_msg_queue_id;\r
+}\r
+\r
errcode_t pcm_stream_create_task(void)\r
{\r
errcode_t ret = ERRCODE_SUCC;\r
return ERRCODE_FAIL;\r
}\r
\r
- osThreadAttr_t attr = {"pcm_stream", 0, NULL, 0, NULL, PCM_STREAM_MSG_STACK_SIZE, TASK_PRIORITY_PCM_STREAM, 0, 0 };\r
- if (osThreadNew((osThreadFunc_t)pcm_stream_task_body, NULL, &attr) == NULL) {\r
+ osThreadAttr_t attr = {"pcm_stream", 0, nullptr, 0, nullptr, PCM_STREAM_MSG_STACK_SIZE, TASK_PRIORITY_PCM_STREAM, 0,\r
+ 0 };\r
+ if (osThreadNew((osThreadFunc_t)pcm_stream_task_body, nullptr, &attr) == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "create pcm_stream task fail!\r\n");\r
return ERRCODE_FAIL;\r
}\r
errcode_t ret = ERRCODE_SUCC;\r
\r
char *bundleName = msg_center_get_bundle_name(cmd_id);\r
- if (bundleName == NULL) {\r
+ if (bundleName == nullptr) {\r
return ERRCODE_FAIL;\r
}\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "bundle name = %s\r\n", bundleName);\r
}\r
\r
char *data = (char *)malloc(payload_len + 1);\r
- if (data == NULL) {\r
+ if (data == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "msg_center_xiaodu_recv_xiaodu_info: malloc failed.\r\n");\r
return ERRCODE_FAIL;\r
}\r
\r
- memcpy(data, tlv_payload, payload_len);\r
+ (void)memcpy_s(data, payload_len, tlv_payload, payload_len);\r
data[payload_len] = '\0';\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv xiaodu info--> %s\r\n", tlv_payload);\r
DmsLiteSendMsgToJS(data);\r
- data = NULL;\r
free(data);\r
-\r
+ data = nullptr;\r
return ERRCODE_SUCC;\r
}\r
\r
}\r
\r
char *data = (char *)malloc(payload_len + 1);\r
- if (data == NULL) {\r
+ if (data == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "msg_center_xiaodu_recv_wenxin_info: malloc failed.\r\n");\r
return ERRCODE_FAIL;\r
}\r
\r
- memcpy(data, tlv_payload, payload_len);\r
+ (void)memcpy_s(data, payload_len, tlv_payload, payload_len);\r
data[payload_len] = '\0';\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv wenxin info--> %s\r\n", tlv_payload);\r
DmsLiteSendMsgToJS(data);\r
- data = NULL;\r
free(data);\r
-\r
+ data = nullptr;\r
return ERRCODE_SUCC;\r
}\r
\r
-static int32_t convert_para_to_player_para(const uint8_t *inParam, uint16_t paramLen, int32_t *outArgc, uint8_t **outArgv)\r
+static int32_t convert_para_to_player_para(const uint8_t *inParam, uint16_t paramLen, int32_t *outArgc,\r
+ uint8_t **outArgv)\r
{\r
int ret;\r
char *pos;\r
uint32_t paramCnt = 0;\r
\r
strTemp = (uint8_t*)osal_kmalloc(paramLen, OSAL_GFP_KERNEL);\r
- if (strTemp == NULL) {\r
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} malloc failed.\r\n", __FUNCTION__, __LINE__);\r
+ if (strTemp == nullptr) {\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} malloc failed.\r\n", __FUNCTION__, __LINE__);\r
return ERRCODE_FAIL;\r
}\r
\r
ret = memset_s(strTemp, paramLen, 0, paramLen);\r
if (ret != EOK) {\r
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} memset_s failed.\r\n", __FUNCTION__, __LINE__);\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} memset_s failed.\r\n", __FUNCTION__, __LINE__);\r
osal_kfree(strTemp);\r
return ERRCODE_FAIL;\r
}\r
\r
ret = memcpy_s(strTemp, paramLen, inParam, paramLen);\r
if (ret != EOK) {\r
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} memcpy_s failed.\r\n", __FUNCTION__, __LINE__);\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} memcpy_s failed.\r\n", __FUNCTION__, __LINE__);\r
osal_kfree(strTemp);\r
return ERRCODE_FAIL;\r
}\r
\r
pos = strtok((char*)strTemp, ",");\r
- for (uint32_t i = 0; pos != NULL; i++) {\r
+ for (uint32_t i = 0; pos != nullptr; i++) {\r
outArgv[i] = (uint8_t*)osal_kmalloc(strlen(pos) + 1, OSAL_GFP_KERNEL);\r
- if (outArgv[i] == NULL) {\r
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} malloc failed.\r\n", __FUNCTION__, __LINE__);\r
+ if (outArgv[i] == nullptr) {\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} malloc failed.\r\n", __FUNCTION__, __LINE__);\r
osal_kfree(strTemp);\r
return ERRCODE_FAIL;\r
}\r
ret = memcpy_s(outArgv[i], strlen(pos) + 1, pos, strlen(pos) + 1);\r
if (ret != EOK) {\r
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} memcpy_s failed.\r\n", __FUNCTION__, __LINE__);\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} memcpy_s failed.\r\n", __FUNCTION__, __LINE__);\r
osal_kfree(strTemp);\r
return ERRCODE_FAIL;\r
}\r
paramCnt++;\r
if (*outArgc >= TTS_MEDIA_MAX_PARAM_CNT) {\r
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} invalid argc: %d(max: 64).\r\n",\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} invalid argc: %d(max: 64).\r\n",\r
__FUNCTION__, __LINE__, *outArgc);\r
osal_kfree(strTemp);\r
return ERRCODE_FAIL;\r
}\r
- pos = strtok(NULL, ",");\r
+ pos = strtok(nullptr, ",");\r
}\r
\r
*outArgc = paramCnt;\r
\r
FREE:\r
for (int32_t i = 0; i < argc; i++) {\r
- if (argv[i] != NULL) {\r
+ if (argv[i] != nullptr) {\r
osal_kfree(argv[i]);\r
- argv[i] = NULL;\r
+ argv[i] = nullptr;\r
}\r
}\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} func out %s.\r\n", __FUNCTION__, __LINE__,\r
\r
/* 播放tts语音 */\r
char *tts_file = (char *)malloc(payload_len + 1);\r
- if (tts_file == NULL) {\r
+ if (tts_file == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "msg_center_xiaodu_recv_tts: malloc failed.\r\n");\r
return ERRCODE_FAIL;\r
}\r
\r
- memcpy(tts_file, tlv_payload, payload_len);\r
+ (void)memcpy_s(tts_file, payload_len, tlv_payload, payload_len);\r
tts_file[payload_len] = '\0';\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv_tts file: %s\r\n", tts_file);\r
\r
char buffer[TTS_AUDIO_PARA_LEN] = {0};\r
- sprintf_s(buffer, TTS_AUDIO_PARA_LEN, "%s,%s,%d,%d", "xx", tts_file, 1, 0);\r
+ (void)sprintf_s(buffer, TTS_AUDIO_PARA_LEN, "%s,%s,%d,%d", "xx", tts_file, 1, 0);\r
msg_center_tts_player_start((const uint8_t *)buffer, strlen(buffer));\r
\r
/* 播放完成后需删除文件 */\r
return ERRCODE_SUCC;\r
}\r
\r
+static void msg_center_transfer_longbuf(char *data, uint8_t type)\r
+{\r
+ FILE *fp = nullptr;\r
+\r
+ fp = fopen(data, "rb");\r
+ if (fp == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "%s: open %s fail.\r\n", vector_navi_get_str(type), data);\r
+ return;\r
+ }\r
+\r
+ fseek(fp, 0L, SEEK_END);\r
+ long file_len = ftell(fp);\r
+ char *file_content = (char *)malloc(sizeof(char) * (file_len + 1));\r
+ if (file_content == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "%s: malloc fail, file_len = %d.\r\n", vector_navi_get_str(type), file_len);\r
+ return;\r
+ }\r
+\r
+ fseek(fp, 0L, SEEK_SET);\r
+ if (fread(file_content, file_len, 1, fp) != 1) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "%s: fread fail, file_len = %d.\r\n", vector_navi_get_str(type), file_len);\r
+ return;\r
+ }\r
+ fclose(fp);\r
+ file_content[file_len] = '\0';\r
+\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "file_len = %d.\r\n", file_len);\r
+ /* send to JSI */\r
+ BaidumapSendMsgToJS(file_content, type);\r
+ free(file_content);\r
+ file_content = nullptr;\r
+}\r
+\r
errcode_t msg_center_vector_navi_pull_up(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
{\r
unused(usr_data);\r
errcode_t ret = ERRCODE_SUCC;\r
\r
char *bundleName = msg_center_get_bundle_name(cmd_id);\r
- if (bundleName == NULL) {\r
+ if (bundleName == nullptr) {\r
return ERRCODE_FAIL;\r
}\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "bundle name = %s\r\n", bundleName);\r
\r
errcode_t msg_center_vector_navi_recv_svg(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
{\r
-#if 0\r
- /* 单包合并方案,效率低且file_name不好控制 */\r
- FILE *fw = NULL;\r
-\r
- if (access(BAIDU_NAVI_BASE_DIR, F_OK) != 0) {\r
- if (mkdir(BAIDU_NAVI_BASE_DIR, S_IREAD | S_IWRITE) != 0) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "mkdir /user/baidu_navi/ fail.\r\n");\r
- return ERRCODE_FAIL;\r
- }\r
- }\r
-\r
- char svg_file_path[BAIDU_NAVI_MAX_FILE_LEN] = { 0 };\r
- if (sprintf_s(svg_file_path, sizeof(svg_file_path), "%s%s", BAIDU_NAVI_BASE_DIR, svg_file_path) < 0) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "svg_file_path is valid.\r\n");\r
- return ERRCODE_FAIL;\r
- }\r
-\r
- fw = fopen(svg_file_path, "wb");\r
- if (!fw) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "open svg_file_path fail.\r\n");\r
- return ERRCODE_FAIL;\r
- }\r
-\r
- if (fwrite(usr_data, usr_len, 1, fw) != 1) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "write svg_file fail.\r\n");\r
- return ERRCODE_FAIL;\r
- }\r
- fclose(fw);\r
-\r
- return ERRCODE_SUCC;\r
-#endif\r
- /* 采用数传方案,svg上传板侧后通知msg_center文件名 */\r
uint8_t tl_len = msg_center_get_tlv_tl_len(usr_data);\r
uint16_t payload_len = usr_len - tl_len;\r
uint8_t *tlv_payload = (uint8_t *)msg_center_get_tlv_payload(usr_data);\r
uint8_t ack = 1;\r
errcode_t ret = ERRCODE_SUCC;\r
+ uint8_t res;\r
\r
/* ack */\r
ret = msg_center_send_data(cmd_id, type, &ack, sizeof(ack));\r
return ERRCODE_FAIL;\r
}\r
\r
- /* svg_file_name */\r
- char *svg_file = (char *)malloc(payload_len + 1);\r
- if (svg_file == NULL) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "recv_svg: malloc failed.\r\n");\r
+ /* svg json */\r
+ char *svg_json = (char *)malloc(payload_len + 1);\r
+ if (svg_json == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "rec_svg_json: malloc failed.\r\n");\r
return ERRCODE_FAIL;\r
}\r
\r
- memcpy(svg_file, tlv_payload, payload_len);\r
- svg_file[payload_len] = '\0';\r
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv_svg file: %s\r\n", svg_file);\r
- /* send svg_file to baiduSDK */\r
+ (void)memcpy_s(svg_json, payload_len, tlv_payload, payload_len);\r
+ svg_json[payload_len] = '\0';\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_MSG_CENTER, "rec_svg_json file: %s\r\n", svg_json);\r
+\r
+#if defined(SUPPORT_POWER_MANAGER)\r
+ const power_display_svr_api_t *display_api = power_display_svr_get_api();\r
+ if (display_api->get_screen_state() != SCREEN_ON) {\r
+ display_api->turn_on_screen();\r
+ }\r
+ display_api->set_screen_set_keepon_timeout(600000); // 600000ms\r
+#endif\r
+\r
+ /* send svg_json to baiduSDK */\r
+ struct Content content = {\r
+ .x = 0,\r
+ .y = 0,\r
+ .z = 0,\r
+ .data = NULL,\r
+ .json = svg_json\r
+ };\r
+\r
+ DuerMapInfo(cmd_id, type, &content);\r
+\r
+ free(svg_json);\r
+ svg_json = NULL;\r
\r
return ERRCODE_SUCC;\r
}\r
if (ret != ERRCODE_SUCC) {\r
return ERRCODE_FAIL;\r
}\r
+\r
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_MSG_CENTER, "usr_data = %s\r\n", usr_data);\r
return ERRCODE_SUCC;\r
}\r
\r
uint8_t ack = 1;\r
errcode_t ret = ERRCODE_SUCC;\r
\r
- /* send to baiduSDK */\r
char *data = (char *)malloc(payload_len + 1);\r
- if (data == NULL) {\r
+ if (data == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "recv dst list: malloc failed.\r\n");\r
return ERRCODE_FAIL;\r
}\r
\r
- memcpy(data, tlv_payload, payload_len);\r
+ (void)memcpy_s(data, payload_len, tlv_payload, payload_len);\r
data[payload_len] = '\0';\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv vector navi info--> %s\r\n", tlv_payload);\r
- // DmsLiteSendMsgToJS(data);\r
- data = NULL;\r
+ /* send to baiduSDK */\r
free(data);\r
-\r
+ data = nullptr;\r
return ERRCODE_SUCC;\r
}\r
\r
\r
/* send to BaiduSDK */\r
char *data = (char *)malloc(payload_len + 1);\r
- if (data == NULL) {\r
+ if (data == nullptr) {\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "recv dst list: malloc failed.\r\n");\r
return ERRCODE_FAIL;\r
}\r
\r
- memcpy(data, tlv_payload, payload_len);\r
+ (void)memcpy_s(data, payload_len, tlv_payload, payload_len);\r
data[payload_len] = '\0';\r
WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv vector navi info--> %s\r\n", tlv_payload);\r
- // DmsLiteSendMsgToJS(data);\r
- data = NULL;\r
+ /* send data to js */\r
free(data);\r
-\r
+ data = nullptr;\r
return ERRCODE_SUCC;\r
}\r
\r
errcode_t ret = ERRCODE_SUCC;\r
ret = msg_center_send_data(cmd_id, type, usr_data, usr_len);\r
if (ret != ERRCODE_SUCC) {\r
+ BaidumapFailSendMsgToJS("send data fail", type + 1); // JSI提供的fail回调只挂接了rec,因此req流程中加一\r
return ERRCODE_FAIL;\r
}\r
+\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "req poi ok.\r\n");\r
return ERRCODE_SUCC;\r
}\r
\r
uint8_t ack = 1;\r
errcode_t ret = ERRCODE_SUCC;\r
\r
- /* send to baiduSDK */\r
+ /* ack */\r
+ ret = msg_center_send_data(cmd_id, type, &ack, sizeof(ack));\r
+ if (ret != ERRCODE_SUCC) {\r
+ return ERRCODE_FAIL;\r
+ }\r
+\r
char *data = (char *)malloc(payload_len + 1);\r
- if (data == NULL) {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "recv dst list: malloc failed.\r\n");\r
+ if (data == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "recv poi: malloc failed.\r\n");\r
+ BaidumapFailSendMsgToJS("rec malloc fail", type);\r
return ERRCODE_FAIL;\r
}\r
\r
- memcpy(data, tlv_payload, payload_len);\r
+ (void)memcpy_s(data, payload_len, tlv_payload, payload_len);\r
data[payload_len] = '\0';\r
- WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv vector navi info--> %s\r\n", tlv_payload);\r
- // DmsLiteSendMsgToJS(data);\r
- data = NULL;\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv poi info -- > %s, usr_len = %d\r\n", tlv_payload, usr_len);\r
+\r
+ msg_center_transfer_longbuf(data, type);\r
free(data);\r
+ data = nullptr;\r
\r
return ERRCODE_SUCC;\r
}\r
return ERRCODE_SUCC;\r
}\r
\r
+static errcode_t msg_center_vector_navi_req_common_proc(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ errcode_t ret = ERRCODE_SUCC;\r
+ ret = msg_center_send_data(cmd_id, type, usr_data, usr_len);\r
+ if (ret != ERRCODE_SUCC) {\r
+ BaidumapFailSendMsgToJS("send data fail", type + 1);\r
+ return ERRCODE_FAIL;\r
+ }\r
+\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "%s, usr_data = %s, usr_len = %d\r\n", vector_navi_get_str(type),\r
+ usr_data, usr_len);\r
+ return ERRCODE_SUCC;\r
+}\r
+\r
+static bool is_vector_navi_longbuf(uint8_t type)\r
+{\r
+ if (type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_POI_SUG_SEARCH ||\r
+ type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REGEOCODE_SEARCH ||\r
+ type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_RIDING_SEARCH ||\r
+ type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_WALKING_SEARCH ||\r
+ type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_TRANSIT_SEARCH) {\r
+ return true;\r
+ } else {\r
+ return false;\r
+ }\r
+}\r
+\r
+static errcode_t msg_center_vector_navi_rec_common_proc(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ uint8_t tl_len = msg_center_get_tlv_tl_len(usr_data);\r
+ uint16_t payload_len = usr_len - tl_len;\r
+ uint8_t *tlv_payload = (uint8_t *)msg_center_get_tlv_payload(usr_data);\r
+ errcode_t ret = ERRCODE_SUCC;\r
+ uint8_t ack = 1;\r
+\r
+ /* ack */\r
+ ret = msg_center_send_data(cmd_id, type, &ack, sizeof(ack));\r
+ if (ret != ERRCODE_SUCC) {\r
+ return ERRCODE_FAIL;\r
+ }\r
+\r
+ char *data = (char *)malloc(payload_len + 1);\r
+ if (data == nullptr) {\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "%s: malloc failed.\r\n", vector_navi_get_str(type));\r
+ BaidumapFailSendMsgToJS("rec malloc fail", type);\r
+ return ERRCODE_FAIL;\r
+ }\r
+\r
+ (void)memcpy_s(data, payload_len, tlv_payload, payload_len);\r
+ data[payload_len] = '\0';\r
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "%s -- > %s\r\n", vector_navi_get_str(type), tlv_payload);\r
+\r
+ if (is_vector_navi_longbuf(type)) {\r
+ msg_center_transfer_longbuf(data, type);\r
+ } else {\r
+ BaidumapSendMsgToJS(data, type);\r
+ }\r
+ free(data);\r
+ data = nullptr;\r
+\r
+ return ERRCODE_SUCC;\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_auth_license(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_auth_license(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_geo_location(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_geo_location(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_navi_init(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_navi_init(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_route_plan_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_route_plan_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_route_plan_succ(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_route_plan_succ(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_route_plan_fail(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_route_plan_fail(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_navi_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_navi_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_navi_destroy(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_navi_destroy(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_road_guide_text_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_road_guide_text_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_road_guide_icon_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_road_guide_icon_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_remain_time_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_remain_time_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_remain_distance_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_remain_distance_update(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_remain_route_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_remain_route_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_gps_status_change(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_gps_status_change(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_route_faraway(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_route_faraway(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_route_plan_yawing(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_route_plan_yawing(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_re_route_complete(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_re_route_complete(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_arrive_destination(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_arrive_destination(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vertor_navi_req_poi_sug_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vertor_navi_rec_poi_sug_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_route_riding_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_route_riding_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_route_walking_search(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_route_walking_search(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_route_transit_search(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_route_transit_search(uint8_t cmd_id, uint8_t type, void *usr_data,\r
+ uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_geocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_geocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_req_regeocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
+errcode_t msg_center_vector_navi_rec_regeocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)\r
+{\r
+ return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);\r
+}\r
+\r
#ifdef __cplusplus\r
}\r
-#endif
\ No newline at end of file
+#endif\r
\r
} timer_event_type_t;\r
\r
-/**\r
- * @brief Touch Panel事件类型枚举值\r
- *\r
- * TP数据上报时需要同时标识当前TP事件类型,比如按下、释放\r
- * 在standby mode上报的TP事件只包含当前事件的类型\r
- *\r
- */\r
-typedef enum touch_event_type {\r
- /* * 手指触摸 */\r
- TP_PRESS = 0,\r
- /* * 手指抬起 */\r
- TP_RELEASE = 1,\r
- /* * 手指触摸后滑动 */\r
- TP_MOVE = 2,\r
- /* * 主表盘盖屏 */\r
- TP_COVER = 3,\r
- /* * 手指单击 */\r
- TP_SHORT_CLICK = 4,\r
- /* * 手指双击 */\r
- TP_DOUBLE_CLICK = 5,\r
- /* * 上滑 */\r
- TP_SLIDE_UP = 6,\r
- /* * 下滑 */\r
- TP_SLIDE_DOWN = 7,\r
- /* * 异常TP事件 */\r
- TP_INVALID,\r
-} touch_event_type_t;\r
-\r
/**\r
* @brief 屏幕管理上下文,记录关键配置信息,传递给过滤器使用\r
*/\r
}\r
last_screen_off_timestamp = get_display_timestamp();\r
caculate_screen_on_time();\r
-#ifdef SUPPORT_AT_OHOSFWK\r
- notify_screen_off_event();\r
-#endif\r
#if defined(ENABLE_UIKIT) || defined(ENABLE_LVGL)\r
NotifyScreenOff(); // Instruct the uikit to close the display operation.\r
#endif\r
+\r
+#ifdef SUPPORT_AT_OHOSFWK\r
+ notify_screen_off_event();\r
+#endif\r
+\r
osDelay(100); // Wait 100ms for the uikit to complete display.\r
touch_screen_suspend(); // close touch\r
ext_errno ret = drv_vau_suspend(NULL);\r
#include "power_display_service.h"\r
#include "display_filter.h"\r
#include "common_def.h"\r
+#include "touch_screen_def.h"\r
\r
static input_action_t filter_gui_execute_product_rule(screen_context_t *current, uint32_t event)\r
{\r
{\r
unused(type);\r
input_action_t ac = KEEP_CURRENT_STATE;\r
- if (event == TP_PRESS) {\r
+ if (event == MC_TP_PRESS) {\r
current->press_state = true;\r
- } else if (event == TP_RELEASE || event == TP_COVER) {\r
+ } else if (event == MC_TP_RELEASE || event == MC_TP_COVER) {\r
current->press_state = false;\r
}\r
\r
- if (event == TP_COVER) {\r
+ if (event == MC_TP_COVER) {\r
ac = TURN_OFF_SCREEN;\r
} else {\r
ac = TURN_ON_SCREEN;\r
#include "input_app.h"\r
#include "touch_screen_def.h"\r
#include "display_state_machine.h"\r
+#include "touch_screen_def.h"\r
\r
#define DISPLAY_AUTO_POWER_OFF_PERIOD_MS 5000\r
#define DISPLAY_DEFAULT_BRIGHTNESS 50\r
unused(event_value);\r
message_type_t mt = GUI_EVENT_CMD;\r
uint32_t event_info = TOUCH;\r
- if (event == INDEV_STATE_PRESS) {\r
- event_info += TP_PRESS;\r
+ if (event == MC_TP_PRESS || event == MC_TP_MOVE) {\r
+ event_info += MC_TP_PRESS;\r
g_power_tp_press_num++;\r
- } else if (event == INDEV_STATE_RELEASE) {\r
- event_info += TP_RELEASE;\r
+ } else if (event == MC_TP_RELEASE) {\r
+ event_info += MC_TP_RELEASE;\r
g_power_tp_press_num = 0;\r
} else {\r
return;\r
#include "abilityms_slite_client.h"
#include "gt_bundle_manager_service.h"
#include "ui_service.h"
+#include "sign_mode.h"
#define ARRAY_COUNT(array) (sizeof(array) / sizeof(array[0]))
#define OHOSFWK_MAX_ARGC 8
char *enable = (char *)argv[0];
if (strcmp(enable, "enable") == 0) {
- OHOS::GtManagerService::GetInstance().SetSignMode(true);
+ OHOS::SignMode::GetInstance().SetSignMode(true);
} else if (strcmp(enable, "disable") == 0) {
- OHOS::GtManagerService::GetInstance().SetSignMode(false);
+ OHOS::SignMode::GetInstance().SetSignMode(false);
} else {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "input failed!");
}
show_reboot_info();
otp_init();
- // Enable the SSB hash check in the ROM program.
- otp_write_bit(OTP_BOOTLOADER_BYTE, (1 << OTP_BOOTLOADER_FSB_EN_SSB_HASH_BIT));
- otp_write_bit(OTP_BOOTLOADER_DOUBLE_BYTE, (1 << OTP_BOOTLOADER_FSB_EN_SSB_HASH_BIT));
irmalloc_init_default();
ssb_hold_flash_pin();
uapi_flash_init(0);
nand_qspi_enable();\r
writel(SER, 0x0);\r
nand_qspi_write_data(qspi_data->instruction);\r
- nand_qspi_write_data(DUMMY_CYCLE_BYTE);\r
- nand_qspi_write_data(qspi_data->data_ptr[0]);\r
- nand_qspi_write_data(qspi_data->data_ptr[1]);\r
+ nand_qspi_write_data(qspi_data->data_ptr[1]); /* 1: bit24~bit16 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[2]); /* 2: bit15~bit8 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[3]); /* 3: bit7~bit0 */\r
writel(SER, SER_SELECT);\r
is_nandflash_working = false;\r
osal_irq_restore(irq_sts);\r
nand_qspi_enable();\r
writel(SER, 0x0);\r
nand_qspi_write_data(qspi_data->instruction);\r
- nand_qspi_write_data(DUMMY_CYCLE_BYTE);\r
- nand_qspi_write_data(qspi_data->data_ptr[0]);\r
- nand_qspi_write_data(qspi_data->data_ptr[1]);\r
+ nand_qspi_write_data(qspi_data->data_ptr[1]); /* 1: bit24~bit16 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[2]); /* 2: bit15~bit8 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[3]); /* 3: bit7~bit0 */\r
writel(SER, SER_SELECT);\r
is_nandflash_working = false;\r
osal_irq_restore(irq_sts);\r
nand_qspi_enable();\r
writel(SER, 0x0);\r
nand_qspi_write_data(qspi_data->instruction);\r
- nand_qspi_write_data(DUMMY_CYCLE_BYTE);\r
- nand_qspi_write_data(qspi_data->data_ptr[0]);\r
- nand_qspi_write_data(qspi_data->data_ptr[1]);\r
+ nand_qspi_write_data(qspi_data->data_ptr[1]); /* 1: bit24~bit16 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[2]); /* 2: bit15~bit8 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[3]); /* 3: bit7~bit0 */\r
writel(SER, SER_SELECT);\r
is_nandflash_working = false;\r
osal_irq_restore(irq_sts);\r
{\r
uapi_watchdog_kick();\r
NFPRINT("mc_flash_read_page nand_page = %d\r\n", nand_page);\r
- uint16_t page_addr;\r
+ uint32_t page_addr;\r
errno_t err_code;\r
uint8_t error_cnt = 0;\r
if (nand_page >= (get_nand_flash()->pages_per_block * get_nand_flash()->total_block)) {\r
return MC_FAILURE;\r
}\r
mc_flash_busy_wait();\r
- page_addr = SWAP_U16(nand_page);\r
- NFPRINT("page addr = %d \r\n", page_addr);\r
+ page_addr = SWAP_U32(nand_page);\r
+ NFPRINT("page addr = %u \r\n", page_addr);\r
qspi_data_type_def qspi_data = {0};\r
qspi_data.data_ptr = (uint8_t *)&page_addr;\r
qspi_data.instruction = 0x13;\r
{\r
uapi_watchdog_kick();\r
uint32_t ret;\r
- uint16_t page_addr;\r
+ uint32_t page_addr;\r
uint8_t status_reg;\r
write_cmd(CMD_FLASH_WREN);\r
qspi_data_type_def p_load_qspi_data = {0};\r
program_load(&p_load_qspi_data, data, data_len, oob, oob_len);\r
qspi_data_type_def e_load_qspi_data = {0};\r
e_load_qspi_data.instruction = CMD_FLASH_PP_EXE;\r
- page_addr = SWAP_U16(nand_page);\r
+ page_addr = SWAP_U32(nand_page);\r
e_load_qspi_data.data_ptr = (uint8_t *)&page_addr;\r
program_execute(&e_load_qspi_data);\r
mc_flash_busy_wait();\r
uapi_watchdog_kick();\r
NFPRINT("mc_flash_erase_block block_no = %d\r\n", block_no);\r
uint32_t ret;\r
- uint16_t page_addr;\r
+ uint32_t page_addr;\r
uint8_t reg_status;\r
- page_addr = SWAP_U16(block_no * get_nand_flash()->pages_per_block);\r
+ page_addr = SWAP_U32(block_no * get_nand_flash()->pages_per_block);\r
write_cmd(CMD_FLASH_WREN);\r
qspi_data_type_def erase_qspi_data = {0};\r
erase_qspi_data.data_ptr = (uint8_t *)&page_addr;\r
qspi_data_type_def mark = {0};\r
mark.instruction = CMD_FLASH_PP_RANDOM;\r
mark.data_ptr = (uint8_t *)&mark_sign;\r
- mark.address = get_nand_flash()->bytes_per_page;\r
+ mark.address = (uint16_t)(get_nand_flash()->bytes_per_page);\r
mark_bad_block(&mark);\r
qspi_data_type_def execute = {0};\r
execute.instruction = CMD_FLASH_PP_EXE;\r
- uint16_t page_addr = SWAP_U16(block_no * get_nand_flash()->pages_per_block);\r
+ uint32_t page_addr = SWAP_U32(block_no * get_nand_flash()->pages_per_block);\r
execute.data_ptr = (uint8_t *)&page_addr;\r
program_execute(&execute);\r
mc_flash_busy_wait();\r
{\r
uapi_watchdog_kick();\r
uint32_t ret = NOT_BAD_BLOCK;\r
- uint16_t page_addr = SWAP_U16(block_no * get_nand_flash()->pages_per_block);\r
+ uint32_t page_addr = SWAP_U32(block_no * get_nand_flash()->pages_per_block);\r
qspi_data_type_def cell_read = {0};\r
cell_read.data_ptr = (uint8_t *)&page_addr;\r
cell_read.instruction = CMD_FLASH_READ_PAGE;\r
random_read.data_ptr = &check_value;\r
random_read.instruction = CMD_FLASH_READ;\r
random_read.data_size = 4; // 4 is data length\r
- random_read.address = get_nand_flash()->bytes_per_page;\r
+ random_read.address = (uint16_t)(get_nand_flash()->bytes_per_page);\r
read_buffer_single_line_width_8(&random_read);\r
/* check the oob fisrt byte 2 and byte 3 bytes, they are badblock bits */\r
check_value = check_value >> 16; // 16 is mark pos need\r
return;\r
}\r
while (((readl(SR)) & 0x8) == 0x8) {\r
- buffer[ul_loop] = ((uint8_t)readl(DR));\r
- ul_loop++;\r
+ if (ul_loop < length) {\r
+ buffer[ul_loop++] = ((uint8_t)readl(DR));\r
+ } else {\r
+ (void)readl(DR);\r
+ }\r
ul_recv_timeout = 0;\r
}\r
ul_recv_timeout++;\r
return;\r
}\r
while (((readl(SR)) & 0x8) == 0x8) {\r
- recvbuf[ul_loop] = ((uint32_t)readl(DR));\r
- ul_loop++;\r
+ if (ul_loop < length) {\r
+ recvbuf[ul_loop++] = ((uint32_t)readl(DR));\r
+ } else {\r
+ (void)readl(DR);\r
+ }\r
ul_recv_timeout = 0;\r
}\r
ul_recv_timeout++;\r
'ulp_aon', 'hal_l2ram',
'x_dpal', 'x_vfs', 'x_disk', 'x_fat', 'drv_mmc', 'fs_yaffs2', 'x_vfs_private',
'pm_service', 'pm_brandy', 'cmn_header', 'at_cmd', 'graphic_at_service', 'app_at_service', 'ohosfwk_at_service',
- "audio_proc", "audio_dump", "audio_probe", "power_manager", "gpu_proc", 'bts_header'],
+ "audio_proc", "audio_dump", "audio_probe", "power_manager", "gpu_proc", 'bts_header', 'baidumapsdk'],
'ram_component_set': ['bgh', 'media', 'gpu', 'graphic_uikit', 'bgh_audio', 'dfx_set', 'ohos_set', 'wearable_set', 'alipay_set'],
'dsp_version': 'max',
'packet': True,
'ulp_aon', 'hal_l2ram',
'x_dpal', 'x_vfs', 'x_disk', 'x_fat', 'drv_mmc', 'fs_yaffs2', 'x_vfs_private',
'pm_service', 'pm_brandy', 'cmn_header', 'at_cmd', 'graphic_at_service', 'app_at_service', 'ohosfwk_at_service',
- "audio_proc", "audio_dump", "audio_probe", "power_manager", "gpu_proc", 'bts_header'],
+ "audio_proc", "audio_dump", "audio_probe", "power_manager", "gpu_proc", 'bts_header', 'baidumapsdk'],
'ram_component_set': ['bgh', 'media', 'gpu', 'graphic_uikit', 'bgh_audio', 'dfx_set', 'ohos_set', 'wearable_set', 'xts_set', 'xts_test_set', 'alipay_set'],
'dsp_version': 'max',
'packet': True,
'efuse_v120': ['efuse', 'hal_efuse_v120', 'efuse_porting'],
'efuse_v100': ['efuse', 'hal_efuse_v100', 'efuse_porting'],
'efuse_v130': ['efuse', 'hal_efuse_v130', 'efuse_port'],
- 'ohos_set' : ['bootstrap', 'samgr', 'ams', 'bms', 'ace', 'ace_adapt', 'permission', 'appverify', 'jerryscript','js_player', 'js_audio_captuer','i18n', 'resmgr', 'syspara'],
+ 'ohos_set' : ['bootstrap', 'samgr', 'ams', 'bms', 'bms_sign_mode', 'ace', 'ace_adapt', 'permission', 'appverify', 'jerryscript','js_player', 'js_audio_captuer', 'baidumapcomponent', 'i18n',
+ 'resmgr', 'syspara', 'utils_kv_store', 'native_file', 'storage_jsapi', 'brightness'],
'wearable_set' : ['nativeabilityfwk', 'nativelauncher', 'ai_voice_service', 'ai_voice_engine_hal', 'ai_voice_audio_stream_wrapper', 'ohos_deps',
'broadcast', 'msg_center', 'msg_center_adapt', 'ohos_startup'],
- 'xts_set' : ["syspara", "utils_kv_store", "native_file", "xts_adapt", "ohos_drv_v3.2",
+ 'xts_set' : ["xts_adapt", "ohos_drv_v3.2",
"hiview_lite", "hievent_lite", "hilog_lite", "huks_sdk"],
'xts_test_set' : ["hctest", "ActsHuksHalFunctionTest", "huks_test_common", "ActsAbilityMgrTest", "ActsBundleMgrTest",
"ActsKvStoreTest", "ActsUtilsFileTest", "ActsHieventLiteTest", "ActsDfxFuncTest", "ActsWifiIotTest",
*driver/dma*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
*driver/ulp_aon*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
*driver/uart*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
+ *driver/touch*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
*drivers/chips/brandy/libchip_brandy.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
*drivers/chips/brandy/libbrandy_clocks.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
*drivers/chips/brandy/libpmu_brandy.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
*drivers/chips/brandy/porting/xip*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
*drivers/chips/brandy/porting/spi*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
*drivers/chips/brandy/porting/uart*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
+ *drivers/chips/brandy/porting/dma*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
+ *drivers/chips/brandy/porting/pinctrl*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
+ *drivers/chips/brandy/porting/systick*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
+ *(.text.__udivdi3);
/* Kernel */
*kernel/osal*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
*kernel/non_os*.a:*.o* (.text .text* .rodata .rodata* .srodata .srodata*)
ULP_RAM地址规划
ULP_RAM有8K大小,范围[0x57038000, 0x57039FFF]
*/
-/* 不下电日历占用ULP_RAM 8字节 */
+/* 不下电日历占用ULP_RAM 24字节,8字节存储时间8字节存储counter8字节存储alarm */
#define ULP_RAM_OFFSET 0x57038000
#define ULP_RAM_CALENDAR ULP_RAM_OFFSET
-#define ULP_RAM_CALENDAR_LENGTH 0x8
+#define ULP_RAM_CALENDAR_LENGTH 0x18
#endif
\r
/* GUI memory pool address NON Cache */\r
#define PSRAM_GUI_MEM_POOL_ADDR (PSRAM_PLT_RESERVE_ADDR + PSRAM_PLT_RESERVE_LENGTH)\r
-#define PSRAM_GUI_MEM_POOL_SIZE psram_align_size(0x780000, POOL_ADDR_ALIGNSIZE)\r
+#define PSRAM_GUI_MEM_POOL_SIZE psram_align_size(0x600000, POOL_ADDR_ALIGNSIZE)\r
\r
/* VAU Linked List Address NON Cache */\r
#define PSRAM_DISP_VAU_NODE_ADDR (PSRAM_GUI_MEM_POOL_ADDR + PSRAM_GUI_MEM_POOL_SIZE)\r
\r
/* reserve */\r
#define PSRAM_RESERVE_ADDR (PSRAM_DISP_VAU_NODE_ADDR + PSRAM_DISP_VAU_NODE_LENGTH)\r
-#define PSRAM_RESERVE_ADDR_LENGTH psram_align_size(0x0, POOL_ADDR_ALIGNSIZE)\r
+#define PSRAM_RESERVE_ADDR_LENGTH psram_align_size(0x180000, POOL_ADDR_ALIGNSIZE)\r
\r
#endif // PSRAM_H\r
#define convert_us_2_count(us) ((us) * HAL_SYSTICK_SPEED / (MS_PER_S * US_PER_MS))
#define convert_count_2_us(count) ((count) * (MS_PER_S * US_PER_MS) / HAL_SYSTICK_SPEED)
+#ifdef SUPPORT_RC_CALIBRATION
+#define OS_SYS_MS_PER_SECOND 1000
+#define OS_SYS_US_PER_MS 1000
+
+typedef enum {
+ SYSTICK_TIME_S = 0,
+ SYSTICK_TIME_MS = 1,
+ SYSTICK_TIME_US = 2,
+
+ SYSTICK_TIME_MAX
+} systick_time_t;
+
+uint64_t uapi_systick_get_time(systick_time_t time_type);
+#endif
+
/**
* @if Eng
* @brief Get the base address of a specified systick.
* 2022-10-20, Create file. \n\r
*/\r
#include "hal_efuse_v100.h"\r
-#include "efuse_porting.h"\r
#include "chip_io.h"\r
+#include "efuse_porting.h"\r
\r
#define FUSE_CTL_RB_BASE 0x57028000\r
#define FUSE_CTL_MCU_RB_BASE 0x52082000\r
return get_efuse_en_switch_val();\r
}\r
\r
-// void efuse_port_set_clk_en(hal_efuse_region_t efuse_region, bool en)\r
-// {\r
- // uint32_t reg_addr[EFUSE_REGION_NUM] = { 0x57000084, 0x52000210, 0x52000210 };\r
- // uint32_t reg_clk_en_value[EFUSE_REGION_NUM] = { 0x7F08, 0xB, 0xD };\r
- // if (en) {\r
- // writew(reg_addr[efuse_region], reg_clk_en_value[efuse_region]);\r
- // }\r
-// }\r
-\r
void efuse_port_set_clk_en(hal_efuse_region_t efuse_region, bool en)\r
{\r
unused(en);\r
- switch(efuse_region) {\r
+ switch (efuse_region) {\r
case HAL_EFUSE_REGION_1:\r
writew(0x52000210, 0xB);\r
break;\r
}\r
}\r
\r
-\r
errcode_t efuse_port_read_buffer_by_reload(uint8_t *buffer, uint32_t byte_number, uint16_t length)\r
{\r
if ((length == 0) || (byte_number >= EFUSE_MAX_BYTES) ||\r
void systick_port_cali_xclk(void)
{
writel(0x5702c028, 1); // XO: 32Khz, XCLK
-}
\ No newline at end of file
+}
+
+#ifdef SUPPORT_RC_CALIBRATION
+volatile uint64_t g_pre_systick_count = 0;
+volatile uint64_t g_pre_systick_msec = 0;
+
+uint64_t uapi_systick_get_time(systick_time_t time_type)
+{
+ volatile uint64_t now_count = 0;
+ volatile uint64_t ret_time = 0;
+ volatile uint64_t cost_msec = 0;
+
+ if (g_pre_systick_count == 0) {
+ g_pre_systick_count = uapi_systick_get_count();
+ g_pre_systick_msec = (g_pre_systick_count * OS_SYS_MS_PER_SECOND) / CLOCK_32K_CALI_FREQ;
+ } else {
+ now_count = uapi_systick_get_count();
+ cost_msec = ((now_count - g_pre_systick_count) * OS_SYS_MS_PER_SECOND) / CLOCK_32K_CALI_FREQ;
+
+ g_pre_systick_count = now_count;
+ g_pre_systick_msec = g_pre_systick_msec + cost_msec;
+ }
+
+ switch (time_type) {
+ case SYSTICK_TIME_S:
+ ret_time = (uint64_t)(g_pre_systick_msec / OS_SYS_MS_PER_SECOND);
+ break;
+ case SYSTICK_TIME_US:
+ ret_time = (uint64_t)(g_pre_systick_msec * OS_SYS_US_PER_MS);
+ break;
+ default:
+ ret_time = (uint64_t)(g_pre_systick_msec);
+ break;
+ }
+
+ return ret_time;
+}
+#endif
\ No newline at end of file
msg_size = (td_u32)(sizeof(*msg_head) + sizeof(msg_data->cmd) + sizeof(msg_data->handle));
msg_size += msg_data->input_data_size + msg_data->output_data_size;
msg_size = msg_pkt_align_up(msg_size);
+ if (msg_size > MSG_FIFO_TAIL_SIZE) {
+ sap_err_log_u32(msg_size);
+ return ERR_SYS_BUF_OVERFLOW;
+ }
if (ring_buf_linear_query_free(msg_inst->shrb_buf.data_buf) < msg_size) {
ring_buf_get_pos(msg_inst->shrb_buf.data_buf, &read_pos, &write_pos);
sap_err_log_u32(read_pos);
#define SEA_LIB_AAI_IND 1\r
#define SEA_RBUF_MAX_NUM 2\r
#define SEA_RBUF_DUR_MS 40\r
-#define SEA_PARAM_SIZE_MAX 1024\r
+#define SEA_PARAM_SIZE_MAX 512\r
#define SEA_FRAME_MIN_PER_SEC AUDIO_5MS_NUM_PER_SECOND\r
#define SEA_FRAME_MAX_PER_SEC AUDIO_20MS_NUM_PER_SECOND\r
\r
static errcode_t i2c_transmit_read_cmd_by_dma(i2c_bus_t bus, hal_i2c_buffer_wrap_t *data_cfg)\r
{\r
uint8_t dma_ch;\r
- uint16_t read_cmd = 0x100;\r
+ static uint16_t read_cmd = 0x100;\r
dma_ch_user_peripheral_config_t user_cfg = {0};\r
\r
i2c_write_by_dma_config(bus, &read_cmd, data_cfg->len, &user_cfg);\r
nand_qspi_enable();\r
writel(SER, 0x0);\r
nand_qspi_write_data(qspi_data->instruction);\r
- nand_qspi_write_data(DUMMY_CYCLE_BYTE);\r
- nand_qspi_write_data(qspi_data->data_ptr[0]);\r
- nand_qspi_write_data(qspi_data->data_ptr[1]);\r
+ nand_qspi_write_data(qspi_data->data_ptr[1]); /* 1: bit24~bit16 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[2]); /* 2: bit15~bit8 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[3]); /* 3: bit7~bit0 */\r
writel(SER, SER_SELECT);\r
is_nandflash_working = false;\r
osal_irq_restore(irq_sts);\r
nand_qspi_enable();\r
writel(SER, 0x0);\r
nand_qspi_write_data(qspi_data->instruction);\r
- nand_qspi_write_data(DUMMY_CYCLE_BYTE);\r
- nand_qspi_write_data(qspi_data->data_ptr[0]);\r
- nand_qspi_write_data(qspi_data->data_ptr[1]);\r
+ nand_qspi_write_data(qspi_data->data_ptr[1]); /* 1: bit24~bit16 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[2]); /* 2: bit15~bit8 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[3]); /* 3: bit7~bit0 */\r
writel(SER, SER_SELECT);\r
is_nandflash_working = false;\r
osal_irq_restore(irq_sts);\r
nand_qspi_enable();\r
writel(SER, 0x0);\r
nand_qspi_write_data(qspi_data->instruction);\r
- nand_qspi_write_data(DUMMY_CYCLE_BYTE);\r
- nand_qspi_write_data(qspi_data->data_ptr[0]);\r
- nand_qspi_write_data(qspi_data->data_ptr[1]);\r
+ nand_qspi_write_data(qspi_data->data_ptr[1]); /* 1: bit24~bit16 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[2]); /* 2: bit15~bit8 */\r
+ nand_qspi_write_data(qspi_data->data_ptr[3]); /* 3: bit7~bit0 */\r
writel(SER, SER_SELECT);\r
is_nandflash_working = false;\r
osal_irq_restore(irq_sts);\r
{\r
uapi_watchdog_kick();\r
NFPRINT("mc_flash_read_page nand_page = %d\r\n", nand_page);\r
- uint16_t page_addr;\r
+ uint32_t page_addr;\r
errno_t err_code;\r
uint8_t error_cnt = 0;\r
if (nand_page >= (get_nand_flash()->pages_per_block * get_nand_flash()->total_block)) {\r
return MC_FAILURE;\r
}\r
mc_flash_busy_wait();\r
- page_addr = SWAP_U16(nand_page);\r
- NFPRINT("page addr = %d \r\n", page_addr);\r
+ page_addr = SWAP_U32(nand_page);\r
+ NFPRINT("page addr = %u \r\n", page_addr);\r
qspi_data_type_def qspi_data = {0};\r
qspi_data.data_ptr = (uint8_t *)&page_addr;\r
qspi_data.instruction = 0x13;\r
{\r
uapi_watchdog_kick();\r
uint32_t ret;\r
- uint16_t page_addr;\r
+ uint32_t page_addr;\r
uint8_t status_reg;\r
write_cmd(CMD_FLASH_WREN);\r
qspi_data_type_def p_load_qspi_data = {0};\r
program_load(&p_load_qspi_data, data, data_len, oob, oob_len);\r
qspi_data_type_def e_load_qspi_data = {0};\r
e_load_qspi_data.instruction = CMD_FLASH_PP_EXE;\r
- page_addr = SWAP_U16(nand_page);\r
+ page_addr = SWAP_U32(nand_page);\r
e_load_qspi_data.data_ptr = (uint8_t *)&page_addr;\r
program_execute(&e_load_qspi_data);\r
mc_flash_busy_wait();\r
uapi_watchdog_kick();\r
NFPRINT("mc_flash_erase_block block_no = %d\r\n", block_no);\r
uint32_t ret;\r
- uint16_t page_addr;\r
+ uint32_t page_addr;\r
uint8_t reg_status;\r
- page_addr = SWAP_U16(block_no * get_nand_flash()->pages_per_block);\r
+ page_addr = SWAP_U32(block_no * get_nand_flash()->pages_per_block);\r
write_cmd(CMD_FLASH_WREN);\r
qspi_data_type_def erase_qspi_data = {0};\r
erase_qspi_data.data_ptr = (uint8_t *)&page_addr;\r
mark_bad_block(&mark);\r
qspi_data_type_def execute = {0};\r
execute.instruction = CMD_FLASH_PP_EXE;\r
- uint16_t page_addr = SWAP_U16(block_no * get_nand_flash()->pages_per_block);\r
+ uint32_t page_addr = SWAP_U32(block_no * get_nand_flash()->pages_per_block);\r
execute.data_ptr = (uint8_t *)&page_addr;\r
program_execute(&execute);\r
mc_flash_busy_wait();\r
{\r
uapi_watchdog_kick();\r
uint32_t ret = NOT_BAD_BLOCK;\r
- uint16_t page_addr = SWAP_U16(block_no * get_nand_flash()->pages_per_block);\r
+ uint32_t page_addr = SWAP_U32(block_no * get_nand_flash()->pages_per_block);\r
qspi_data_type_def cell_read = {0};\r
cell_read.data_ptr = (uint8_t *)&page_addr;\r
cell_read.instruction = CMD_FLASH_READ_PAGE;\r
static const char * const g_volume_names[YF_VOLUMES_NUM] = { YF_NAME_STRS };\r
\r
struct mtd_info nandflash_freertos_info;\r
+bool get_exception_status(void);\r
\r
struct nand_driver_struct *get_nand_flash(void)\r
{\r
return ret;\r
}\r
\r
+/* ʹÓÃÔ¼Êø£ºÖжϺÍÒì³£ÖУ¬½ûÖ¹sync²Ù×÷ */\r
void nandflash_yaffs_sync(void)\r
{\r
- for (uint8_t index = 0; index < YF_VOLUMES_NUM; index++) {\r
- int32_t ret = yaffs_sync(g_volume_names[index]);\r
- if (ret != 0) {\r
- PRINT("[%d] yaffs_sync fail, ret = %d", index, ret);\r
+ if (osal_in_interrupt() != true && get_exception_status() != true) {\r
+ for (uint8_t index = 0; index < YF_VOLUMES_NUM; index++) {\r
+ int32_t ret = yaffs_sync(g_volume_names[index]);\r
+ if (ret != 0) {\r
+ PRINT("[%d] yaffs_sync fail, ret = %d", index, ret);\r
+ }\r
}\r
}\r
}\r
return;\r
}\r
while (((readl(SR)) & 0x8) == 0x8) {\r
- buffer[ul_loop] = ((uint8_t)readl(DR));\r
- ul_loop++;\r
+ if (ul_loop < length) {\r
+ buffer[ul_loop++] = ((uint8_t)readl(DR));\r
+ } else {\r
+ (void)readl(DR);\r
+ }\r
ul_recv_timeout = 0;\r
}\r
ul_recv_timeout++;\r
return;\r
}\r
while (((readl(SR)) & 0x8) == 0x8) {\r
- recvbuf[ul_loop] = ((uint32_t)readl(DR));\r
- ul_loop++;\r
+ if (ul_loop < length) {\r
+ recvbuf[ul_loop++] = ((uint32_t)readl(DR));\r
+ } else {\r
+ (void)readl(DR);\r
+ }\r
ul_recv_timeout = 0;\r
}\r
ul_recv_timeout++;\r
#define S_MGPIO30_PAD_CTRL (S_MGPIO_PAD_CTRL_BASE + 0x278)\r
\r
#define QSPI_BUS_PRI5 (M_CTL_RB_BASE + 0xA14)\r
-#define QSPI_M1_HIGHEST_PRI 0x33\r
+#define QSPI_M1_HIGHEST_PRI 0x22\r
\r
#define QSPI_RESET_LCD_GPIO S_HGPIO0\r
\r
#endif
#endif
+#define RTCS_TRIES_MAX 2000
+#define RTCS_LOAD_WAIT 120
+
typedef enum rtc_flag {
RTC_FLAG_NORMAL,
RTC_FLAG_PERMANENT
unused(cycle_deviation);
#endif
g_hal_rtc_func[index]->config_load(index, cycle_with_mask);
+ /* loadÍêºó£¬ÐèÒªµÈ´ý120us */
+ uapi_tcxo_delay_us(RTCS_LOAD_WAIT);
}
/* Reduces the rtc left for all the rtcs by rtc us amount */
*/
STATIC uint64_t rtc_get_rtc_till_interrupt(rtc_index_t index)
{
- uint64_t current_value = g_hal_rtc_func[index]->get_current_count(index);
+ uint64_t current_value = 0;
+ uint32_t tries = 0;
+ do {
+ current_value = g_hal_rtc_func[index]->get_current_count(index);
+ if (tries > RTCS_TRIES_MAX) {
+ break;
+ }
+ tries++;
+ } while (current_value >= g_rtcs_manager[index].last_rtc_load_cycle &&
+ g_rtcs_manager[index].last_rtc_load_cycle != 0);
if (current_value != 0) {
return current_value;
}
uint64_t uapi_systick_get_s(void)
{
+#ifdef SUPPORT_RC_CALIBRATION
+ return uapi_systick_get_time(SYSTICK_TIME_S);
+#else
return convert_count_2_s(uapi_systick_get_count());
+#endif
}
uint64_t uapi_systick_get_ms(void)
{
+#ifdef SUPPORT_RC_CALIBRATION
+ return uapi_systick_get_time(SYSTICK_TIME_MS);
+#else
return convert_count_2_ms(uapi_systick_get_count());
+#endif
}
uint64_t uapi_systick_get_us(void)
{
+#ifdef SUPPORT_RC_CALIBRATION
+ return uapi_systick_get_time(SYSTICK_TIME_US);
+#else
return convert_count_2_us(uapi_systick_get_count());
+#endif
}
errcode_t uapi_systick_delay_count(uint64_t c_delay)
bool g_host_dev_init_flag = TD_FALSE;\r
tma525b_ctrl_attr g_ctrl_attr;\r
touch_callback g_tma525b_callback = NULL;\r
+static uint8_t g_tp_send_buf[TMA525B_REG_WRITE_LEN] = {0};\r
+static uint8_t g_tp_recv_buf[TMA525B_INPUT_SIZE] = {0};\r
\r
static void tma525b_gpio_isr_handle(pin_t pin, uintptr_t param)\r
{\r
errcode_t ret;\r
uint8_t retry;\r
i2c_data_t data;\r
- uint8_t tp_reg_addr[TMA525B_REG_BYTE_LEN];\r
\r
ret = tp_i2c_rd_wr_param_check(data_buf, data_len);\r
if (ret != EXT_ERR_SUCCESS) {\r
return ret;\r
}\r
\r
- memset_s(data_buf, data_len, 0, data_len);\r
- tp_reg_addr[TMA525B_I2C_SEND_INDEX0] = reg_addr & 0xff;\r
- tp_reg_addr[TMA525B_I2C_SEND_INDEX1] = (reg_addr >> OFFSET_8_BITS) & 0xff;\r
+ if (memset_s(g_tp_recv_buf, data_len, 0, data_len) != EOK) {\r
+ tp_err("tp read buff set fail! ret=0x%x", ret);\r
+ return EXT_ERR_FAILURE;\r
+ }\r
+ g_tp_send_buf[TMA525B_I2C_SEND_INDEX0] = reg_addr & 0xff;\r
+ g_tp_send_buf[TMA525B_I2C_SEND_INDEX1] = (reg_addr >> OFFSET_8_BITS) & 0xff;\r
\r
- data.send_buf = tp_reg_addr;\r
+ data.send_buf = g_tp_send_buf;\r
data.send_len = TMA525B_CMD_SEND_LEN;\r
- data.receive_buf = data_buf;\r
+ data.receive_buf = g_tp_recv_buf;\r
data.receive_len = data_len;\r
-\r
for (retry = 0; retry < TMA525B_I2C_TIME_MAX; retry++) {\r
ret = uapi_i2c_master_read(TMA525B_I2C_BUS, TMA525B_I2C_ADDR, &data);\r
if (ret == ERRCODE_SUCC) {\r
return ret;\r
}\r
\r
+ ret = (uint32_t)memcpy_s(data_buf, data_len, g_tp_recv_buf, data_len);\r
+ if (ret != EOK) {\r
+ tp_err("tp data buf content copy fail! ret=0x%x", ret);\r
+ return ret;\r
+ }\r
+\r
return EXT_ERR_SUCCESS;\r
}\r
\r
errcode_t ret;\r
uint8_t retry;\r
i2c_data_t data;\r
- uint8_t tp_reg_addr[TMA525B_CMD_SEND_LEN];\r
\r
ret = tp_peripheral_init_status_check();\r
if (ret != EXT_ERR_SUCCESS) {\r
tp_err("host peripheral not init! ret=0x%x", ret);\r
return ret;\r
}\r
- tp_reg_addr[TMA525B_I2C_SEND_INDEX0] = cmd & 0xff;\r
- tp_reg_addr[TMA525B_I2C_SEND_INDEX1] = (cmd >> OFFSET_8_BITS) & 0xff;\r
\r
- data.send_buf = tp_reg_addr;\r
+ g_tp_send_buf[TMA525B_I2C_SEND_INDEX0] = cmd & 0xff;\r
+ g_tp_send_buf[TMA525B_I2C_SEND_INDEX1] = (cmd >> OFFSET_8_BITS) & 0xff;\r
+ data.send_buf = g_tp_send_buf;\r
data.send_len = TMA525B_CMD_SEND_LEN;\r
data.receive_buf = NULL;\r
data.receive_len = 0;\r
errcode_t ret;\r
uint8_t retry;\r
i2c_data_t data;\r
- uint8_t tp_reg_addr[TMA525B_REG_WRITE_LEN];\r
\r
ret = tp_peripheral_init_status_check();\r
if (ret != EXT_ERR_SUCCESS) {\r
return ret;\r
}\r
\r
- tp_reg_addr[TMA525B_I2C_SEND_INDEX0] = reg_addr & 0xff;\r
- tp_reg_addr[TMA525B_I2C_SEND_INDEX1] = (reg_addr >> OFFSET_8_BITS) & 0xff;\r
- tp_reg_addr[TMA525B_I2C_SEND_INDEX2] = reg_cfg & 0xff;\r
- tp_reg_addr[TMA525B_I2C_SEND_INDEX3] = (reg_cfg >> OFFSET_8_BITS) & 0xff;\r
-\r
- data.send_buf = tp_reg_addr;\r
+ g_tp_send_buf[TMA525B_I2C_SEND_INDEX0] = reg_addr & 0xff;\r
+ g_tp_send_buf[TMA525B_I2C_SEND_INDEX1] = (reg_addr >> OFFSET_8_BITS) & 0xff;\r
+ g_tp_send_buf[TMA525B_I2C_SEND_INDEX2] = reg_cfg & 0xff;\r
+ g_tp_send_buf[TMA525B_I2C_SEND_INDEX3] = (reg_cfg >> OFFSET_8_BITS) & 0xff;\r
+ data.send_buf = g_tp_send_buf;\r
data.send_len = TMA525B_REG_WRITE_LEN;\r
data.receive_buf = NULL;\r
data.receive_len = 0;\r
ret = (uint32_t)memcpy_s(write_data + sizeof(uint16_t), send_len - sizeof(uint16_t), data_buf, data_len);\r
if (ret != EOK) {\r
tp_err("tp send_buf content copy fail! ret=0x%x", ret);\r
+ osal_kfree(write_data);\r
return ret;\r
}\r
\r
}\r
if (ret != ERRCODE_SUCC) {\r
tp_err("tp data write fail! ret=0x%x", ret);\r
+ osal_kfree(write_data);\r
return ret;\r
}\r
\r
- tp_mem_free(write_data);\r
+ osal_kfree(write_data);\r
return EXT_ERR_SUCCESS;\r
}\r
\r
bool g_host_dev_init_flag = TD_FALSE;\r
ztw523_ctrl_attr g_ctrl_attr;\r
touch_callback g_ztw523_callback = NULL;\r
+static uint8_t g_tp_send_buf[ZTW523_REG_WRITE_LEN] = {0};\r
+static uint8_t g_tp_recv_buf[ZTW523_INPUT_SIZE] = {0};\r
\r
static void ztw523_gpio_isr_handle(pin_t pin, uintptr_t param)\r
{\r
errcode_t ret;\r
uint32_t retry;\r
i2c_data_t data;\r
- uint8_t tp_reg_addr[ZTW523_REG_BYTE_LEN];\r
\r
ret = tp_i2c_rd_wr_param_check(data_buf, data_len);\r
if (ret != 0) {\r
return ret;\r
}\r
\r
- memset_s(data_buf, data_len, 0, data_len);\r
- tp_reg_addr[ZTW523_I2C_SEND_INDEX0] = reg_addr & 0xff;\r
- tp_reg_addr[ZTW523_I2C_SEND_INDEX1] = (reg_addr >> OFFSET_8_BITS) & 0xff;\r
+ if (memset_s(g_tp_recv_buf, data_len, 0, data_len) != EOK) {\r
+ tp_err("tp read buff set fail! ret=0x%x", ret);\r
+ return EXT_ERR_FAILURE;\r
+ }\r
+ g_tp_send_buf[ZTW523_I2C_SEND_INDEX0] = reg_addr & 0xff;\r
+ g_tp_send_buf[ZTW523_I2C_SEND_INDEX1] = (reg_addr >> OFFSET_8_BITS) & 0xff;\r
\r
- data.send_buf = tp_reg_addr;\r
+ data.send_buf = g_tp_send_buf;\r
data.send_len = ZTW523_CMD_SEND_LEN;\r
- data.receive_buf = data_buf;\r
+ data.receive_buf = g_tp_recv_buf;\r
data.receive_len = data_len;\r
-\r
for (retry = 0; retry < ZTW523_I2C_TIME_MAX; retry++) {\r
ret = uapi_i2c_master_writeread(ZTW523_I2C_BUS, ZTW523_I2C_ADDR, &data);\r
if (ret == EXT_ERR_SUCCESS) {\r
return ret;\r
}\r
\r
+ ret = (uint32_t)memcpy_s(data_buf, data_len, g_tp_recv_buf, data_len);\r
+ if (ret != EOK) {\r
+ tp_err("tp data buf content copy fail! ret=0x%x", ret);\r
+ return ret;\r
+ }\r
+\r
return EXT_ERR_SUCCESS;\r
}\r
\r
errcode_t ret;\r
uint32_t retry;\r
i2c_data_t data;\r
- uint8_t tp_reg_addr[ZTW523_CMD_SEND_LEN];\r
\r
ret = tp_peripheral_init_status_check();\r
if (ret != 0) {\r
tp_err("host peripheral not init! ret=0x%x", ret);\r
return ret;\r
}\r
- tp_reg_addr[ZTW523_I2C_SEND_INDEX0] = cmd & 0xff;\r
- tp_reg_addr[ZTW523_I2C_SEND_INDEX1] = (cmd >> OFFSET_8_BITS) & 0xff;\r
+ g_tp_send_buf[ZTW523_I2C_SEND_INDEX0] = cmd & 0xff;\r
+ g_tp_send_buf[ZTW523_I2C_SEND_INDEX1] = (cmd >> OFFSET_8_BITS) & 0xff;\r
\r
- data.send_buf = tp_reg_addr;\r
+ data.send_buf = g_tp_send_buf;\r
data.send_len = ZTW523_CMD_SEND_LEN;\r
data.receive_buf = NULL;\r
data.receive_len = 0;\r
errcode_t ret;\r
uint32_t retry;\r
i2c_data_t data;\r
- uint8_t tp_reg_addr[ZTW523_REG_WRITE_LEN];\r
\r
ret = tp_peripheral_init_status_check();\r
if (ret != 0) {\r
return ret;\r
}\r
\r
- tp_reg_addr[ZTW523_I2C_SEND_INDEX0] = reg_addr & 0xff;\r
- tp_reg_addr[ZTW523_I2C_SEND_INDEX1] = (reg_addr >> OFFSET_8_BITS) & 0xff;\r
- tp_reg_addr[ZTW523_I2C_SEND_INDEX2] = reg_cfg & 0xff;\r
- tp_reg_addr[ZTW523_I2C_SEND_INDEX3] = (reg_cfg >> OFFSET_8_BITS) & 0xff;\r
+ g_tp_send_buf[ZTW523_I2C_SEND_INDEX0] = reg_addr & 0xff;\r
+ g_tp_send_buf[ZTW523_I2C_SEND_INDEX1] = (reg_addr >> OFFSET_8_BITS) & 0xff;\r
+ g_tp_send_buf[ZTW523_I2C_SEND_INDEX2] = reg_cfg & 0xff;\r
+ g_tp_send_buf[ZTW523_I2C_SEND_INDEX3] = (reg_cfg >> OFFSET_8_BITS) & 0xff;\r
\r
- data.send_buf = tp_reg_addr;\r
+ data.send_buf = g_tp_send_buf;\r
data.send_len = ZTW523_REG_WRITE_LEN;\r
data.receive_buf = NULL;\r
data.receive_len = 0;\r
ret = (uint32_t)memcpy_s(write_data + sizeof(uint16_t), send_len - sizeof(uint16_t), data_buf, data_len);\r
if (ret != EOK) {\r
tp_err("tp send_buf content copy fail! ret=0x%x", ret);\r
+ osal_kfree(write_data);\r
return ret;\r
}\r
\r
}\r
if (ret != EXT_ERR_SUCCESS) {\r
tp_err("tp data write fail! ret=0x%x", ret);\r
+ osal_kfree(write_data);\r
return ret;\r
}\r
\r
- tp_mem_free(write_data);\r
+ osal_kfree(write_data);\r
return EXT_ERR_SUCCESS;\r
}\r
\r
#define ZTW523_CMD_SEND_LEN 2\r
#define ZTW523_REG_DATA_LEN 2\r
#define ZTW523_I2C_TIME_MAX 3\r
-\r
+#define ZTW523_INPUT_SIZE 156\r
#define ZTW523_I2C_SEND_INDEX0 0\r
#define ZTW523_I2C_SEND_INDEX1 1\r
#define ZTW523_I2C_SEND_INDEX2 2\r
#define MCPU_SOFT_INT_STS (*(volatile unsigned short *)(0x52000028))
#define MCPU_SOFT_INT_CLR_STS (*(volatile unsigned short *)(0x52000030))
#define M_TO_DSP_INT_OFFSET BIT(2)
+#define M_TO_DSP_INT1_OFFSET BIT(3)
#define M_TO_DSP_1_INT_OFFSET BIT(4)
+#if CHIP_SOCMN1
#define M_TO_ALL_INT (M_TO_BCPU_INT_OFFSET | M_TO_DSP_INT_OFFSET | M_TO_DSP_1_INT_OFFSET)
+#elif CHIP_BRANDY
+#define M_TO_ALL_INT (M_TO_BCPU_INT_OFFSET | M_TO_DSP_INT_OFFSET | M_TO_DSP_INT1_OFFSET)
+#endif
#elif CHIP_LIBRA
#define MCPU_SOFT_INT_EN (*(volatile unsigned short *)(0x52000020))
#define MCPU_SOFT_INT_SET (*(volatile unsigned short *)(0x52000034))
if (hal_efuse_v100_regs_init() != 0) {
return ERRCODE_EFUSE_REG_ADDR_INVALID;
}
-
- for (uint32_t i = HAL_EFUSE_REGION_1; i < HAL_EFUSE_REGION_MAX; i++) {
- if (hal_efuse_v100_refresh_read((hal_efuse_region_t)i) != 0) {
- return ERRCODE_FAIL;
- }
+ if (hal_efuse_v100_refresh_read(HAL_EFUSE_REGION_1) != 0) {
+ return ERRCODE_FAIL;
}
-
#ifdef CONFIG_EFUSE_READ_TO_RAM
- for (uint32_t i = HAL_EFUSE_REGION_1; i < HAL_EFUSE_REGION_MAX; i++) {
- hal_efuse_v100_read_val_to_ram((hal_efuse_region_t)i);
- }
+ hal_efuse_v100_read_val_to_ram(HAL_EFUSE_REGION_1);
#endif
return ERRCODE_SUCC;
}
NATIVEABILITY_CPP,
NATIVELAUNCHER_CPP,
MAINVIEW_CPP,
+ MAINMODEL_CPP,
ACTIVITYMODEL_CPP,
ACTIVITYPRESENTER_CPP,
ACTIVITYWEEKVIEW_CPP,
SMART_VOICE_SERVICE_C,
VOICE_ENGINE_HAL_C,
OHOSFWK_AT_PROCESS_CPP,
+ SETCARDADAPTER_CPP,
+ SETCARDITEM_CPP,
+ SETCARDDELETEVIEW_CPP,
+ SETCARDVIEW_CPP,
+ SETCARDNOCARDVIEW_CPP,
+ SETCARDPRESENTER_CPP,
+ SETCARDMODEL_CPP,
+ ADDCARDPRESENTER_CPP,
+ ADDCARDADAPTER_CPP,
+ ADDCARDVIEW_CPP,
+ ADDCARDMODEL_CPP,
+ ADDCARDITEM_CPP,
+ SETDIALVIEW_CPP,
+ SETDIALMODEL_CPP,
+ SETDIALPRESENTER_CPP,
+ SETDESKTOPMODEL_CPP,
+ SETDESKTOPVIEW_CPP,
+ SETDESKTOPPRESENTER_CPP,
APP_FILE_ID_MAX = 1024,
} log_file_list_enum_app_t;
UI_MENU_ITEM_CPP,
UI_BARCODE_CPP,
SCREENMODEL_CPP,
+ UI_HEXAGONS_LIST_CPP,
+ UI_CUSTOM_HEXAGONS_LIST_CPP,
+ UI_TEST_HEXAGONS_LIST_CPP,
+ UI_KALEIDOSCOPE_VIEW_CPP,
+ KALEIDOSCOPE_UTILS_CPP,
+ UI_COVERFLOW_VIEW_CPP,
+ UI_MAP_VIEW_CPP,
+ MAP_SVG_PARSER_CPP,
+ SLICETRANSITION_CPP,
+ TRANSITIONMANAGER_CPP,
FILE_ID_MAX = 1024,
} log_file_list_enum_gui_t;
#endif
JS_ASYNC_WORK_CPP,
MESSAGE_QUEUE_UTILS_CPP,
ACE_LOG_CPP,
+ BAIDUMAP_CPP,
+ DISPLAY_CPP,
ACE_MEM_BASE_CPP,
ASYNC_TASK_MANAGER_CPP,
// CACHE_MANAGER_CPP,
APP_PROVISION_C,
APP_VERIFY_C,
MBEDTLS_PKCS7_C,
+ BAIDU_MAP_COMPONENT_CPP,
} log_file_list_enum_ohos_e;
#endif /* LOG_DEF_OHOS_H */
#endif
#endif
void reset_deal_with_fs(void);
+bool get_exception_status(void);
/**
* @}
*/
static exc_nmi_stat_t g_exc_nmi_store;\r
// Check whether the exception is repeated\r
#if (CORE == MASTER_BY_ALL) && (CORE != WIFI)\r
-static bool g_is_repeat_exc = false;\r
+bool g_is_repeat_exc = false;\r
#endif\r
#if defined SAVE_EXC_INFO\r
/* ifdef LOSCFG_EXC_SIMPLE_INFO g_xregs_map start from X4(instead of X0) to X31 */\r
#define PM_MCU_SEND_IPC_WKUP_BT_REG 0x52000034\r
#define PM_MCU_SEND_IPC_WKUP_BT_BIT 0x1\r
#endif\r
+\r
+bool get_exception_status(void)\r
+{\r
+ return g_is_repeat_exc;\r
+}\r
+\r
#if ((defined(BUILD_APPLICATION_STANDARD)) && (IS_MAIN_CORE == NO))\r
\r
#include "ipc.h"\r
cpu_utils_set_system_status_by_cause(reset_cause);\r
#endif\r
#endif\r
- disable_watchdog();\r
hal_save_reg_info(exc_buf_addr);\r
deal_with_exception(exc_buf_addr, exc_type, reset_cause);\r
}\r
#ifndef BUILD_APPLICATION_SSB\r
reset_deal_with_fs();\r
#endif\r
+ /* 关狗操作一定要在reset之前 */\r
+ disable_watchdog();\r
#if (CORE == MASTER_BY_ALL) && (CORE != WIFI)\r
cpu_utils_reset_chip_with_log((cores_t)MASTER_BY_ALL, reset_cause);\r
#endif\r
"key_status": "alive",
"structure_type": "audio_vqe_param_t",
"attributions": 1,
- "value": [48, [0, 0, 0, 0, 16843009, 33554689, 16000, 16000,
- 1024, 100, 1985229328, 1985229328, 16843009, 257, 257, 256,
- 16778116, 1280, 4, 0, 458824, 11796580, 327946, 196608005,
- 65576964, 1000, 21499085, 67108874, 327680, 655367, 2126009683,
- 654734439, 1, 0, 0, 0, 0, 0, 10551292, 655336, 4286447619, 64536,
- 500, 16384, 3277, 0, 66049, 0]]
+ "value": [48, [0, 0, 0, 0, 16843009, 33620225, 16000, 16000,
+ 1024, 100, 0, 0, 16842753, 257, 257, 256,
+ 16778116, 16844032, 4, 0, 458824, 11796580, 327946, 1310720005,
+ 65576964, 1000, 21499085, 67108874, 327680, 655367, 2126009683, 654734439,
+ 1, 0, 0, 0, 0, 0, 5308380, 655336,
+ 4286447619, 64536, 500, 16384, 3277, 0, 66049, 0]]
},
"audio_vqe_kws_param":{
"key_id": "0x320D",
PM_ID_STORAGE,
PM_ID_TOUCH,
PM_ID_JPEG,
+ PM_ID_JS,
PM_ID_MAX,
} pm_id_t;
g_frs_sleep_flag = 0;
}
display_suspend_power_off();
+ hal_pmu1_dig_pg_l2m_gmmu_ret1_en(true); // The GMMU memory is set to the retention state.
+ hal_pmu1_dig_pg_l2m_gmmu_pwr_en(false);
#endif
storage_device_suspend();
opi_psram_suspend_tmp();
uapi_dma_open();
storage_device_resume();
#if defined(ENABLE_UIKIT) || defined(ENABLE_LVGL)
+ hal_pmu1_dig_pg_l2m_gmmu_pwr_en(true); // The GMMU memory is set to the normal state.
+ hal_pmu1_dig_pg_l2m_gmmu_ret1_en(false);
if (lcd_get_status() != 0) {
display_resume_tmp();
}
#define PLL_CLK_VALUE 884736000
#define PM_SDIOM_CLK_REG 0x55000628
#define PM_EMMC_DIV_REG 0x52000120
-#define PM_DISPLAY_LOGIC_CRG_RESET 0x570000c0
-#define PM_DISPLAY_PWR_EN_CFG 0x57004034
-#define PM_DISPLAY_PWR_CLOSE_POWER 0x100
static uint32_t g_uart_h0_regs_tmp[UART_SUSPEND_REGS_NUM];
static uint32_t g_uart_h1_regs_tmp[UART_SUSPEND_REGS_NUM];
pmu_ldo_power_on(PMU_LDO_AUXLDO3, TURN_OFF);
hal_pmu_auxldo_enable_high_resistance(HAL_PMU_AUXLDO3, TURN_ON);
#endif
- writew(PM_DISPLAY_LOGIC_CRG_RESET, 0x0); // display logic crg reset
- writew(PM_DISPLAY_PWR_EN_CFG, PM_DISPLAY_PWR_CLOSE_POWER); // display close power
}
void display_resume_tmp(void)
}\r
\r
jpeg_config_dinfo(dinfo, par);\r
- \r
+\r
ret = jpeg_ioctl(par->dev_fd, DRV_JPEG_CMD_CREATE, TD_NULL);\r
if (ret != EXT_SUCCESS) {\r
jpeg_err("call ioctl create failure");\r
\r
jpeg_exif_deinit(par);\r
\r
- mem.vir_buf = (td_char *)dinfo->private_data;\r
- jpeg_mem_free_small(&mem);\r
-\r
- dinfo->private_data = TD_NULL;\r
-\r
td_s32 ret = jpeg_ioctl(par->dev_fd, DRV_JPEG_CMD_DESTROY, TD_NULL);\r
if (ret != EXT_SUCCESS) {\r
jpeg_err("call ioctl destroy failure");\r
- return;\r
}\r
\r
+ mem.vir_buf = (td_char *)dinfo->private_data;\r
+ jpeg_mem_free_small(&mem);\r
+\r
+ dinfo->private_data = TD_NULL;\r
+\r
return;\r
}\r
vau_err("path should start width move to abs, now:%u", path->cmds[0]);
return EXT_ERR_GFX_INVALID_PARAM;
}
+ if (uapi_is_byte_align((td_u32)(uintptr_t)path->datas, 4) != TD_TRUE) { // need 4 byte align
+ vau_err("path data addr align err");
+ return EXT_ERR_GFX_INVALID_ADDR;
+ }
+
td_bool is_internal_buff = vau_mem_is_internal(VAU_MEM_TYPE_PATH_CMD, path->cmds);
if (is_internal_buff == TD_TRUE) {
vau_mem_ref_inc(VAU_MEM_TYPE_PATH_CMD, path->cmds);
#include "dpu_qspi.h"\r
\r
static td_bool g_is_qspi = TD_FALSE;\r
+static td_bool g_dpu_suspend_flag = TD_FALSE;\r
\r
#define DRV_DPU_IOCTL_CMD_NUM 20\r
\r
dpu_dbg("dpu suspend start");\r
dpu_hal_deinit();\r
dpu_layer_suspend();\r
+ g_dpu_suspend_flag = TD_TRUE;\r
dpu_dbg("dpu suspend ok");\r
\r
return EXT_SUCCESS;\r
dpu_hal_init();\r
dpu_layer_resume();\r
dpu_disp_chl_cfg();\r
+ g_dpu_suspend_flag = TD_FALSE;\r
dpu_dbg("dpu resume ok");\r
\r
return EXT_SUCCESS;\r
return EXT_FAILURE;\r
}\r
\r
+ if (g_dpu_suspend_flag == TD_TRUE) {\r
+ dpu_err("dpu is in suspend state!, suspend_flag = %u", g_dpu_suspend_flag);\r
+ return EXT_FAILURE;\r
+ }\r
+\r
if (g_is_qspi == TD_TRUE) {\r
return dpu_qspi_ioctl(ioctl_cmd, para);\r
}\r
run_info->global_alpha = 0xFF;\r
run_info->width = layer_info->width;\r
run_info->height = layer_info->height;\r
- run_info->stride = 0;\r
- run_info->current_addr = 0;\r
run_info->fmt = layer_info->layer_fmt;\r
run_info->premulti_en = 0;\r
run_info->compress_mode = layer_info->compress_mode;\r
yuv_info.uv_stride = layer_dev->canvas_surface.uv_stride;\r
yuv_info.uv_offset = layer_dev->canvas_surface.uv_offset;\r
\r
+ /* soft support yuv crop */\r
+ if (layer_dev->run_info.crop_rect.y != 0) {\r
+ yuv_info.y_addr += (td_u32)layer_dev->run_info.crop_rect.y * yuv_info.uv_stride;\r
+ yuv_info.uv_offset -= (td_u32)layer_dev->run_info.crop_rect.y * yuv_info.uv_stride / 2; /* 2:index */\r
+\r
+ layer_dev->run_info.crop_rect.y = 0;\r
+ dpu_hal_layer_set_crop_rect(layer_dev->layer_id, &layer_dev->run_info.crop_rect);\r
+ }\r
+\r
+ dpu_hal_layer_set_addr(layer_dev->layer_id, yuv_info.y_addr);\r
dpu_hal_layer_set_yuv_base_info(layer_dev->layer_id, &yuv_info);\r
\r
return;\r
td_s32 start_y = (td_s32)screen_height;\r
\r
for (td_u32 layer_id = 0; layer_id <= (td_u32)DRV_DPU_MAX_LAYER_ID; layer_id++) {\r
- if (g_dpu_layer_dev[layer_id] == TD_NULL) {\r
- continue;\r
- }\r
-\r
- if (g_dpu_layer_dev[layer_id]->is_create != TD_TRUE) {\r
+ if ((g_dpu_layer_dev[layer_id] == TD_NULL) || (g_dpu_layer_dev[layer_id]->is_create != TD_TRUE)) {\r
continue;\r
}\r
\r
dpu_layer_run_info *run_info = &g_dpu_layer_dev[layer_id]->run_info;\r
- /* if exists full screen layer, gp_reion is full */\r
- if ((run_info->update_region.width == screen_width) && (run_info->update_region.height == screen_height)) {\r
+ /* if exists full screen layer or g1, gp_reion is full */\r
+ if (((run_info->update_region.width == screen_width) && (run_info->update_region.height == screen_height)) ||\r
+ (layer_id == DRV_DPU_LAYER_ID2)) {\r
gp_region->x = 0;\r
gp_region->y = 0;\r
gp_region->width = screen_width;\r
return EXT_FAILURE;
}
+ if (g_gmmu_suspend_flag == TD_TRUE) {
+ gmmu_err("gmmu is in suspend state!, suspend_flag = %u", g_gmmu_suspend_flag);
+ return EXT_FAILURE;
+ }
+
if ((ioctl_cmd == DRV_GMMU_CMD_CONFIG) && (para != TD_NULL)) {
g_gmmu_suspend_mgr = *(drv_gmmu_mgr *)para;
}
return EXT_SUCCESS;
}
-td_s32 jpeg_suspend(td_void)
+td_void jpeg_suspend(td_void)
{
jpeg_clock_reset();
jpeg_clock_close();
- return EXT_SUCCESS;
}
-td_s32 jpeg_resume(td_void)
+td_void jpeg_resume(td_void)
{
jpeg_clock_open();
jpeg_clock_dereset();
- return EXT_SUCCESS;
}
td_s32 jpeg_dev_open(td_void);
td_s32 jpeg_dev_close(td_void);
-td_s32 jpeg_suspend(td_void);
-td_s32 jpeg_resume(td_void);
+td_void jpeg_suspend(td_void);
+td_void jpeg_resume(td_void);
#ifdef __cplusplus
#if __cplusplus
#define DRV_JPEG_IOCTL_CMD_NUM 5
+static td_bool g_jpeg_suspend_flag = TD_FALSE;
/*-------------------------------- func declares ------------------------------------------*/
static td_s32 drv_jpeg_open(td_void *private_data);
{
uapi_unused(private_data);
- return jpeg_suspend();
+ jpeg_suspend();
+ g_jpeg_suspend_flag = TD_TRUE;
+ return EXT_SUCCESS;
}
td_s32 drv_jpeg_resume(td_void *private_data)
{
uapi_unused(private_data);
- return jpeg_resume();
+ jpeg_resume();
+ g_jpeg_suspend_flag = TD_FALSE;
+ return EXT_SUCCESS;
}
td_s32 jpeg_open(const td_char *path_name, td_s32 flags, td_s32 mode)
return EXT_FAILURE;
}
+ if (g_jpeg_suspend_flag == TD_TRUE) {
+ jpeg_err("jpeg is in suspend state!, suspend_flag = %u", g_jpeg_suspend_flag);
+ return EXT_FAILURE;
+ }
+
return (td_s32)g_jpeg_ioctl_cmd_list[ioctl_cmd].handler((td_u32)ioctl_cmd, para, TD_NULL);
}
\r
#define DRV_VAU_IOCTL_CMD_NUM 20\r
\r
+static td_bool g_vau_suspend_flag = TD_FALSE;\r
+\r
static td_s32 drv_vau_open(td_void *private_data)\r
{\r
uapi_unused(private_data);\r
\r
vau_dbg("vau suspend start");\r
vau_hal_suspend();\r
+ g_vau_suspend_flag = TD_TRUE;\r
vau_dbg("vau suspend ok");\r
\r
return EXT_SUCCESS;\r
#ifdef CONFIG_CLDO1PD_SUPPORT\r
vau_mem_draw_pool_init();\r
#endif\r
+ g_vau_suspend_flag = TD_FALSE;\r
vau_dbg("vau resume ok");\r
\r
return EXT_SUCCESS;\r
return EXT_FAILURE;\r
}\r
\r
+ if (g_vau_suspend_flag == TD_TRUE) {\r
+ vau_err("vau is in suspend state!, suspend_flag = %u", g_vau_suspend_flag);\r
+ return EXT_FAILURE;\r
+ }\r
+\r
return (td_s32)g_vau_ioctl_cmd_list[ioctl_cmd].handler((td_u32)ioctl_cmd, para, TD_NULL);\r
}\r
\r
/**
* @brief Memory pool define.
*/
-#define ALIGN_UP(x, a) ((((x) + ((a)-1)) / (a)) * (a))
+#define ALIGN_UP(x, a) ((((x) + ((a) - 1)) / (a)) * (a))
#ifndef CONFIG_PSRAM_SUPPORT // equal to MEMORY_MINI
#define MEM_POOL_UI_POOL_SIZE 0x13c000 // 1408 - 144 = 1264k
#else
#define MEM_POOL_UI_POOL_SIZE PSRAM_GUI_MEM_POOL_SIZE
#define MEM_POOL_UI_FONT PSRAM_GUI_MEM_POOL_ADDR
-#if PSRAM_DENSITY_MB == 16
#define MEM_POOL_UI_FONT_SIZE 0x100000
-#else
-#define MEM_POOL_UI_FONT_SIZE 0x380000
-#endif
#ifdef SUPPORT_GPU_GMMU // FB(sram) is virtual addr, FB0:0x61240000 FB1:0x61a40000
#define MEM_POOL_UI_OTHER (MEM_POOL_UI_FONT + MEM_POOL_UI_FONT_SIZE)
} else {
const FormatInfo *fmtInfo = GetFormatInfo(info->format);
if (fmtInfo == NULL) {
- DISP_LOGE("%s: can not get format information : %d\n", __func__, buffer->format);
+ DISP_LOGE("%s: can not get format information : %d\n", __func__, info->format);
return DISPLAY_FAILURE;
}
uint8_t *addr = LosAllocMem(pool, (uint32_t)(buffer->size));
if (addr == NULL) {
- DISP_LOGE("LosAllocMem failure\n");
ret = DISPLAY_FAILURE;
goto END;
}
END:
if ((ret != DISPLAY_SUCCESS) && (buffer != NULL)) {
- DISP_LOGE("AllocMem FAILED.\n");
free(buffer);
buffer = NULL;
}
${PROP_UI_SRC}/components_ext/text_ext.cpp\r
${PROP_UI_SRC}/components_ext/ui_label_button_ext.cpp\r
${PROP_UI_SRC}/components_ext/image_cache_manager.cpp\r
+ ${PROP_UI_SRC}/components_ext/ui_hexagons_list.cpp\r
${PROP_UI_SRC}/components_ext/ui_canvas_ext.cpp\r
${PROP_UI_SRC}/components_ext/ui_card_container.cpp\r
${PROP_UI_SRC}/components_ext/ui_cross_view.cpp\r
+ ${PROP_UI_SRC}/components_ext/kaleidoscope_utils.cpp\r
+ ${PROP_UI_SRC}/components_ext/ui_kaleidoscope_view.cpp\r
+ ${PROP_UI_SRC}/components_ext/ui_map_view.cpp\r
+ ${PROP_UI_SRC}/components_ext/map_svg_parser.cpp\r
+ ${PROP_UI_SRC}/components_ext/ui_coverflow_view.cpp\r
)\r
\r
set(SOURCES\r
#include "gfx_utils/image_info.h"
#include "gfx_utils/heap_base.h"
#include "graphic_config.h"
+#include "hals/gralloc_engines.h"
#if ENABLE_IMAGE_PACKER
namespace OHOS {
*/
void UpdateImageInfoIfNecessary(ImageInfo& info);
+ void* FreeAndGetBuf(const AllocInfo& info, GrallocBuffer& buffer);
+
private:
struct ImageNode;
struct MultiImageInfo {
- uint32_t dirId;
- uint32_t count;
- uint32_t loadedCount;
- bool isPath;
- bool isSingle;
+ uint32_t dirId = 0;
+ uint32_t count = 0;
+ uint32_t loadedCount = 0;
+ uint32_t offset = 0;
+ bool isPath = false;
+ bool isSingle = false;
std::string file;
- ImageNode** node;
+ ImageNode** node = nullptr;
};
struct ImageNode {
ImageInfo* LoadSingleImgInfo(FILE* fp, MultiImageInfo& multiImgInfo, uint32_t imgIndex, int offset,
bool isLongTerm);
ImageInfo* LoadOneImgFromBuf(uint8_t* buf, MultiImageInfo& multiImgInfo, uint32_t imgIndex);
- void* GetImgCacheBuffer(ImageInfo& info);
ImageCacheManager::ImageNode* CreateImageNode(MultiImageInfo* multiImgInfo, uint32_t size, bool isLongTerm,
uint32_t imgId);
void DestoryImageNode(ImageNode*& node);
*/\r
void CancelBuffer(SurfaceBuffer* buffer) override;\r
\r
+ void ClearBuffers();\r
+ SurfaceBuffer* GetBackBuf();\r
+\r
protected:\r
void AddBuffer();\r
BufferItem* GetBufferItem(const SurfaceBuffer* buffer);\r
* @version 1.0
*/
virtual void CardSwipeAlg(UIImageView* leftCard, UIImageView* rightCard, int16_t xOffset) {}
+
+ bool isNeedClip_ = false;
};
}
#endif
--- /dev/null
+/*
+ * Copyright (c) @CompanyNameMagicTag. 2024. All rights reserved.
+ */
+
+/**
+ * @file kaleidoscope_utils.h
+ *
+ * @brief Declares a KaleidoscopeUtils.
+ */
+
+#ifndef KALEIDOSCOPE_UTILS_H
+#define KALEIDOSCOPE_UTILS_H
+
+#include "gfx_utils/heap_base.h"
+#include "components/ui_canvas_ext.h"
+#include "gfx_utils/image_info.h"
+
+namespace OHOS {
+
+struct ImageInfoExt {
+ ImageInfo info;
+ uint32_t stride;
+};
+
+class KaleidoscopeUtils : public HeapBase {
+public:
+
+ KaleidoscopeUtils() {};
+
+ virtual ~KaleidoscopeUtils();
+
+ /**
+ * @brief Init KaleidoscopeUtils.
+ * @param [in] src Pointer to a ImageInfo struct, which is the source img for kaleidoscope img.
+ * @param [in] dst Pointer to a ImageInfoExt struct, which will be used to store kaleidoscope data.
+ If it is NULL, it will be created and managed internally.
+ * @return Return true if init successfully; and false otherwise.
+ */
+ bool Init(const ImageInfo* src, const ImageInfoExt* dst);
+
+ /**
+ * @brief Update the kaleidoscope img by a rotate value.
+ * @param [in] rotate Rotate value.
+ * @return Return true if update successfully; and false otherwise.
+ */
+ bool Rotate(float rotate);
+
+ /**
+ * @brief Update the address of kaleidoscope data, when init with an externally managed ImageInfoExt.
+ * @param [in] addr Address of kaleidoscope data.
+ * @return Return true if update successfully; and false otherwise.
+ */
+ bool UpdateKaleidoscopeImgInfo(const ImageInfoExt &imgInfo);
+
+ /**
+ * @brief Obtain kaleidoscope img.
+ * @return Return pointer to ImageInfoExt struct.
+ */
+ ImageInfoExt* GetKaleidoscopeInfo();
+
+private:
+ ImageInfo* imgInfo_ = nullptr;
+ ImageInfoExt* kaleidoscopeInfo_ = nullptr;
+ ImageInfoExt* partialInfo_ = nullptr;
+ Path sectorPath_ = {0};
+ Path imgPath_ = {0};
+ float thetaVal_ = 0.0f;
+ float radius_ = 0.0f;
+ Point point_ = {0, 0};
+ Point startPoint_ = {0, 0};
+ bool isInternalMem_ = false;
+
+ void UpdatePoint(float rotate);
+ bool ConstructPartial();
+ bool ConstructKaleidoscope();
+ Rect GetBoundingArea(const ImageHeader& header);
+ bool InitKaleidoscopeInfo(const ImageInfo* src, const ImageInfoExt* dst);
+ bool InitInnerPath();
+ bool InitPartialInfo();
+ void DeinitKaleidoscopeInfo();
+ void DeInitPartialInfo();
+ void DeinitInnerPath();
+ void DeinitImgInfo();
+ bool ConstructFirstQuadrant(BufferInfo& dstBufInfo);
+ bool ConstructRestQuadrant(BufferInfo& dstBufInfo);
+};
+}
+#endif
+/**
+ * @}
+ */
* @since 3.0
* @version 5.0
*/
- virtual ~UIBarcode();
+ ~UIBarcode() override;
/**
* @brief Sets the bar code information.
void ReMeasure() override;
void RefreshBarcode();
bool FillImageInfo();
- void FillBarCodeColor(ImageInfo& imageInfo, int32_t actualLenght, uint8_t *destData, uint32_t offset);
- void SetBarcodeVal(const char* val, uint32_t length);
+ void FillBarCodeColor(ImageInfo& imageInfo, int32_t actualLength, uint8_t *destData, uint32_t offset);
+ void SetBarcodeVal(const char* barcodeVal, uint32_t length);
ImageInfo imageInfo_;
- int16_t stride_;
+ int16_t stride_ = 0;
bool needDraw_;
ColorType barColor_;
char* barcodeVal_;
* @since 1.0
* @version 1.0
*/
- virtual ~UICardPage() {}
+ ~UICardPage() override {}
+
+ /* *
+ * @brief This function is invoked when the function SetHorCurrentPage() is called.
+ * @since 1.0
+ * @version 1.0
+ */
+ virtual void OnActive(void) {}
+
+ /* *
+ * @brief This function is invoked when the function SetHorCurrentPage() is called.
+ * @since 1.0
+ * @version 1.0
+ */
+ virtual void OnInactive(void) {}
/* *
* @brief Preload resource callback function, it will be called at the end of swipe animator or the function
return UI_CARD_PAGE;
}
+ /* *
+ * @brief Clear the image cache of this page.
+ * @since 1.0
+ * @version 1.0
+ */
+ void ClearCache(void);
+
private:
bool isCoverable_ = false;
};
--- /dev/null
+/*\r
+ * Copyright (c) 2024 CompanyNameMagicTag.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef UI_COVERFLOW_VIEW_H\r
+#define UI_COVERFLOW_VIEW_H\r
+#include <string>\r
+#include <map>\r
+#include "components/ui_image_view.h"\r
+#include "components/ui_label.h"\r
+#include "components/ui_swipe_view.h"\r
+\r
+namespace OHOS {\r
+class UICoverflowView : public UISwipeView {\r
+public:\r
+ explicit UICoverflowView(uint8_t mirrorOpa = 30, bool supportMirror = true); // 30: default mirror opacity\r
+ ~UICoverflowView() override;\r
+\r
+ /**\r
+ * @brief Add a item to coverflow.\r
+ *\r
+ * @param id Indicates the pointer to the view ID.\r
+ * @param src point item show main image imageinfo.\r
+ */\r
+ void Add(const char* id, const ImageInfo* src);\r
+\r
+ /**\r
+ * @brief remove a item from coverflow.\r
+ *\r
+ * @param id Indicates the pointer to the view ID.\r
+ */\r
+ void Remove(const char* id);\r
+\r
+ /**\r
+ * @brief Set image size.\r
+ *\r
+ * @param width setting image width.\r
+ * @param height setting image height.\r
+ */\r
+ void SetImgSize(uint16_t width, uint16_t height);\r
+\r
+ /**\r
+ * @brief Set image direct interval.\r
+ *\r
+ * @param padding setting padding value. The interval between two images is twice the padding.\r
+ */\r
+ void SetImgPadding(uint16_t padding);\r
+\r
+ /**\r
+ * @brief Set rotate angle between the left and right items in static display mode.\r
+ *\r
+ * @param angle setting rotate angle.\r
+ */\r
+ void SetRotateAngle(float angle);\r
+\r
+ /**\r
+ * @brief Represents a listener for swipe of the coverflow view.\r
+ */\r
+ class OnCoverflowScrollListener : public HeapBase {\r
+ public:\r
+ virtual bool OnScroll() = 0;\r
+ virtual ~OnCoverflowScrollListener() {}\r
+ };\r
+\r
+ /**\r
+ * @brief Sets the listener that contains a callback to be invoked upon a swipe event.\r
+ *\r
+ * @param onCoverflowListener Indicates the listener to set.\r
+ * @since 1.0\r
+ * @version 1.0\r
+ */\r
+ void SetOnCoverflowListener(OnCoverflowScrollListener* onCoverflowListener)\r
+ {\r
+ coverflowListener_ = onCoverflowListener;\r
+ }\r
+\r
+ void SetDirection(uint8_t direction) = delete;\r
+ uint8_t GetDirection() const = delete;\r
+protected:\r
+ bool DragXInner(int16_t distance) override;\r
+\r
+private:\r
+ void UpdatePerspectiveMatrix();\r
+ void ReMeasure(void) override;\r
+ void TransformImage(UIImageView* view);\r
+ void DeleteGroup(UIViewGroup* group);\r
+\r
+ using UISwipeView::Add;\r
+ using UISwipeView::Remove;\r
+\r
+ OnCoverflowScrollListener* coverflowListener_;\r
+ std::map<UIView*, Matrix4<float>> map_;\r
+ Matrix4<float> perspectiveMatrix_;\r
+\r
+ uint16_t imgWidth_;\r
+ uint16_t imgHeight_;\r
+ uint16_t padding_;\r
+ float rotateAngle_;\r
+ uint8_t mirrorOpa_;\r
+ bool isShowMirrorImg_;\r
+ UIView* lastView_;\r
+};\r
+} // namespace OHOS\r
+#endif // UI_COVERFLOW_VIEW_H\r
*/
class UICrossView : public UIViewGroup, public UISwipeView::OnSwipeListener {
public:
+ UICrossView(const UICrossView &) = delete;
+ UICrossView &operator=(const UICrossView &) = delete;
+
/* *
* @brief Scale align mode.
*/
* @since 1.0
* @version 1.0
*/
- virtual ~UICrossView() override;
+ ~UICrossView() override;
/* *
* @brief Get the static instance for <b>UICrossView</b>.
void HorAdd(UICardPage* view);
/* *
- * @brief Insert view by horizontal direction.
+ * @brief Insert view by horizontal direction. set as first page if preview is nullptr
* @since 1.0
* @version 1.0
*/
void RegisterSwipeCallback(CardSwipe* callback)
{
horizontal_.RegisterSwipeCallback(callback);
+ if (callback != nullptr) {
+ isNeedClip_ = callback->isNeedClip_;
+ }
}
/* *
}
private:
+ void UpdateCardPageIndex();
+ static constexpr uint16_t INVALID_VIEW_INDEX = 0xff;
bool loop_ = false;
bool enableScreenCap_ = false;
- bool GaussianBlurEnable_ = false;
+ bool gaussianBlurEnable_ = false;
int swipeDirect_ = 0;
int pullIndex_ = 0;
- int16_t hDragStartIndex_ = 0xff;
- int16_t vBlankIndex_ = 0xff;
- UIView* Vertblank_ = nullptr;
+ int16_t hDragStartIndex_ = INVALID_VIEW_INDEX;
+ int16_t vBlankIndex_ = INVALID_VIEW_INDEX;
+ UIView* vBlankView_ = nullptr;
UISwipeView vertical_;
HorSwipeView horizontal_;
+ UIView* tailView_ = nullptr;
UISwipeView::OnSwipeListener *swipeListener_ = nullptr;
+ bool isNeedClip_ = false;
+ void RemoveAllInner(UISwipeView& view);
void ProcessRes(void);
void VertSetGausBlur(uint16_t direct);
void HorHandleCardEvent(int16_t index, uint16_t scrollStage);
--- /dev/null
+/*
+ * Copyright (c) @CompanyNameMagicTag. 2024. All rights reserved.
+ */
+
+#ifndef UI_HEXAGONS_LIST_EXT_H
+#define UI_HEXAGONS_LIST_EXT_H
+#include "components/ui_hexagons_list.h"
+
+namespace OHOS {
+class UICustomHexagonsList : public UIHexagonsList {
+public:
+ UICustomHexagonsList() {}
+ ~UICustomHexagonsList() override;
+ UICustomHexagonsList(const UICustomHexagonsList &) = delete;
+ UICustomHexagonsList &operator=(const UICustomHexagonsList &) = delete;
+
+#if ENABLE_ROTATE_INPUT
+ bool OnRotateStartEvent(const RotateEvent& event) override;
+
+ bool OnRotateEvent(const RotateEvent& event) override;
+
+ bool OnRotateEndEvent(const RotateEvent& event) override;
+#endif
+ void StartRotateAnimator(uint8_t center, int16_t xDistance, int16_t yDistance, float startScale, float endScale);
+ void StopRotateAnimator();
+ float GetScaleInSmallState()
+ {
+ return scaleInSmallState_;
+ }
+
+protected:
+ class RotateAnimatorCallback : public ListAnimatorCallback {
+ public:
+ RotateAnimatorCallback();
+ ~RotateAnimatorCallback() override {}
+ RotateAnimatorCallback(const RotateAnimatorCallback &) = delete;
+ RotateAnimatorCallback &operator=(const RotateAnimatorCallback &) = delete;
+
+ void SetDuration(uint16_t times)
+ {
+ totalTime_ = times;
+ }
+
+ void SetCenterIndex(uint8_t center)
+ {
+ centerIndex_ = center;
+ }
+
+ void SetRotateRange(int16_t xDistance, int16_t yDistance, float startScale, float endScale)
+ {
+ xDistance_ = xDistance;
+ yDistance_ = yDistance;
+ startScale_ = startScale;
+ endScale_ = endScale;
+ }
+
+ void ResetCallback()
+ {
+ curTime_ = 0;
+ totalTime_ = 0;
+ xDistance_ = 0;
+ prevX_ = 0;
+ yDistance_ = 0;
+ prevY_ = 0;
+ startScale_ = 0.0f;
+ endScale_ = 0.0f;
+ centerIndex_ = 0;
+ }
+
+ void Callback(UIView* view) override;
+
+ private:
+ uint16_t curTime_;
+ uint16_t totalTime_;
+ int16_t xDistance_;
+ int16_t yDistance_;
+ int16_t prevX_;
+ int16_t prevY_;
+ float startScale_;
+ float endScale_;
+ uint8_t centerIndex_;
+ };
+private:
+ RotateAnimatorCallback rotateCallback_;
+ Animator* rotateAnimator_ = nullptr;
+ float scaleInSmallState_ = 0.42f;
+ uint8_t rotateCenterIndexInNormal_ = 0;
+};
+}
+#endif // UI_HEXAGONS_LIST_EXT_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) @CompanyNameMagicTag. 2024. All rights reserved.
+ */
+
+#ifndef UI_HEXAGONS_LIST_H
+#define UI_HEXAGONS_LIST_H
+
+#include "components/ui_view.h"
+#include "components/ui_abstract_scroll.h"
+#include "components/ui_scroll_view.h"
+#include "gfx_utils/list.h"
+#include "gfx_utils/vector.h"
+
+namespace OHOS {
+class UIHexagonsList : public UIScrollView {
+public:
+ UIHexagonsList();
+
+ ~UIHexagonsList() override {}
+
+ /**
+ * @brief Set origin image distance between the center of the two adjacent images
+ * imageDistance = oriImgDistance * globalScale
+ * globalScale: refer to function Scale
+ * LayoutChildren(true) must be invoked mannualy after invoking this method.
+ *
+ * @param distance Indicates image distance to set when the image in the center region
+ */
+ void SetImageDistance(uint16_t distance)
+ {
+ oriImgDistance_ = distance;
+ }
+
+ /**
+ * @brief Set image size
+ * LayoutChildren(true) must be invoked mannualy after invoking this method.
+ *
+ * @param size Indicates size to set, when the image in the center
+ */
+ void SetImageSizeInCenter(uint16_t size)
+ {
+ imgSizeInCenter_ = size;
+ }
+
+ /**
+ * @brief Set origin image scale factor, scale strategy will follow the below rules
+ * if globalScale >= 1
+ * scaleFactor = oriScaleFactor
+ * elif globalScale > scaleThreshold
+ * scaleFactor = oriScaleFactor * (globalScale - scaleThreshold) / (1 - scaleThrethold)
+ * else
+ * scaleFactor = 0
+ * img size is inversely proportional to distance * scaleFactor
+ *
+ * oriScaleFactor: refer to function SetScaleFactorByDistance
+ * scaleThreshold: refer to function SetScaleThesholdOfZeroFactor
+ * globalScale: refer to function Scale
+ *
+ * @param factor Indicates scale factor to set, which will decide scale value together with distance
+ */
+ void SetScaleFactorByDistance(float factor)
+ {
+ oriScaleFactor_ = factor;
+ }
+
+ float GetScaleFactorByDistance()
+ {
+ return oriScaleFactor_;
+ }
+
+ /**
+ * @brief Set scale threshold, scale factor will decrese to 0 if global scale equal and less than scaleThreshold,
+ * default value is 0.6, more information can refer to method SetScaleFactorByDistance
+ *
+ * @param threshold Indicates factor to set, the scale factor when the image is not in the center
+ */
+ void SetScaleThesholdOfZeroFactor(float threshold)
+ {
+ scaleThresholdOfZeroFactor_ = threshold;
+ }
+
+ float GetScaleThesholdOfZeroFactor()
+ {
+ return scaleThresholdOfZeroFactor_;
+ }
+
+ /**
+ * @brief Adds a child image view whose resize mode will set to be UIImageView::COVER.
+ * LayoutChildren(true) should be invoked mannualy after invoking this method.
+ * Note: View index was set for children innner in order of addition, so you can
+ * get its index by call method GetViewIndex()
+ *
+ * @param view Indicates the pointer to the child view to add.
+ */
+ void Add(UIView* view) override;
+
+ /**
+ * @brief Inserts a child image view whose resize mode will set to be UIImageView::COVER.
+ * LayoutChildren(true) should be invoked mannualy after invoking this method.
+ * Note: View index was set for children innner in order of addition, so you can
+ * get its index by call method GetViewIndex()
+ *
+ * @param prevView Indicates the pointer to the child image view, previous to the new child image view.
+ * @param view Indicates the pointer to the new child image view to insert.
+ */
+ void Insert(UIView* prevView, UIView* insertView) override;
+
+ bool OnDragEvent(const DragEvent& event) override;
+
+ /**
+ * @brief Lays out all children views according to the hexagons shape, it must be invoked after method:
+ * 1. Add(UIView* view)
+ * 2. Insert(UIView* prevView, UIView* insertView)
+ * 3. void SetImageSizeInCenter(uint16_t size)
+ * 4. void SetImageDistance(uint16_t distance)
+ *
+ * @param needInvalidate Specifies whether to refresh the invalidated area after the layout is complete.
+ * Value <b>true</b> means to refresh the invalidated area after the layout is complete,
+ * and <b>false</b> means the opposite.
+ */
+ void LayoutChildren(bool needInvalidate = false) override;
+
+ /**
+ * @brief Moves all child views.
+ *
+ * @param x Indicates the offset distance by which this view group is moved on the x-axis.
+ * @param y Indicates the offset distance by which this view group is moved on the y-axis.
+ */
+ void MoveChildByOffset(int16_t offsetX, int16_t offsetY) override;
+
+ /**
+ * @brief Set global scale, and image with centerIndex will be focused
+ *
+ * @param scale Indicates global scale value both for x- and y- axes.
+ * @param pivot Indicates index of scaling center.
+ */
+ void Scale(float scale, uint8_t centerIndex);
+
+ float GetGlobalScale()
+ {
+ return globalScale_;
+ }
+
+ /**
+ * @brief Get the Index Of View object in this view group
+ *
+ * @param view, Indicates the view to search
+ * @return Returns the index, -1 if not exsit
+ */
+ UIView* GetViewByIndex(uint8_t index);
+
+ enum class ReboundMode : uint8_t {
+ NEAREST_IMG_ON_SCR_CENTER,
+ CENTER_IMG_ON_SCR_CENTER,
+ NORMAL, // same with UIScrollView
+ };
+
+ void SetReboundMode(ReboundMode mode)
+ {
+ reboundMode = mode;
+ }
+
+ /**
+ * @brief Get index of focused image, default 0, changed by scale and scroll
+ * When scroll animator end, the index of image in the center screen will set to be focus index
+ * When start Scale(scale, index), scale center index will set to be focus index
+ * @return Returns index of focused image, -1 if rebound mode is NORMAL
+ */
+ int8_t GetFocusedImgIndex()
+ {
+ if (reboundMode == ReboundMode::NORMAL) {
+ return -1;
+ } else {
+ return focusImgIndex_;
+ }
+ }
+
+ /**
+ * @brief Get center position of the special(index) image
+ * Note: the position is not actual position, it is position in regular hexagon without futher adjustment
+ * which include adjusting the img zoom and distance in order to improve display experience
+ *
+ * @return Returns postion in regular hexagon
+ */
+ Vector2<int16_t> GetCurrentPosition(uint8_t index);
+
+protected:
+ bool DragXInner(int16_t distance) override;
+ bool DragYInner(int16_t distance) override;
+ void ReMeasure() override;
+ /**
+ * @brief Get center position of the special(index) image when scale and center image index in screen is specified
+ *
+ * @return Returns position
+ */
+ Vector2<int16_t> GetPositionWithCondition(uint8_t index, uint8_t centerIndex, float scale);
+
+ float globalScale_{1.0f};
+ float scaleThresholdOfZeroFactor_{0.75f};
+
+private:
+ void InitParametersAndImgIndex();
+ bool IsCenterInPolygons(const Vector2<int16_t>& offset = {0, 0});
+ Rect GetChildrenRegion();
+ void CalculateAdjustDistanceForRectScreen(Vector2<float>& position, float& imgScaleRatio);
+ void AdjustViewByDistance(UIView& view, const Vector2<int16_t>& position);
+ void CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDistanceY) override;
+ void CalculateReboundDistanceForNormal(int16_t& dragDistanceX, int16_t& dragDistanceY);
+ void CalculateReboundDistanceForNearestOnCenter(int16_t& dragDistanceX, int16_t& dragDistanceY);
+ void CalculateNearestPointFromOutterPoint(const Vector2<int16_t>& outerPoint);
+ void UpdateNearestPointFromFixedPoint(const Vector2<int16_t>& fixedPoint, uint8_t index);
+ void CreatePolygons(uint16_t lap, int16_t angle);
+ Graphic::Vector<Vector2<int16_t>> imgPoints_{64};
+ uint16_t maxLap_ = 0;
+ uint16_t maxAngleInMaxLap_ = 0;
+ Graphic::Vector<uint8_t> polygonPoints_{10};
+ uint16_t imgDistance_{0};
+ uint16_t oriImgDistance_{0};
+ float oriScaleFactor_{0.23f};
+ int16_t imgSizeInCenter_{0};
+ uint32_t minDistancePow_{0xFFFFFFFF};
+ uint8_t nearestIndex_{0};
+ uint8_t focusImgIndex_{0};
+ float oriImgRadius_{0.0f};
+ float imgRadius_{0.0f};
+ int16_t centerX_{0};
+ int16_t centerY_{0};
+ ReboundMode reboundMode{ReboundMode::NEAREST_IMG_ON_SCR_CENTER};
+};
+}
+#endif // UI_HEXAGONS_LIST_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) @CompanyNameMagicTag. 2024. All rights reserved.
+ */
+
+/**
+ * @addtogroup UI_Components
+ * @{
+ *
+ * @brief Defines UI components such as buttons, texts, images, lists, and progress bars.
+ */
+
+/**
+ * @file ui_kaleidoscope_view.h
+ *
+ * @brief Declares a UIKaleidoscopeView.
+ */
+
+#ifndef UI_KALEIDOSCOPE_VIEW_H
+#define UI_KALEIDOSCOPE_VIEW_H
+
+#include "components/ui_view.h"
+#include "gfx_utils/image_info.h"
+#include "components/kaleidoscope_utils.h"
+#include "hals/display_dev.h"
+
+namespace OHOS {
+/**
+ * @brief It provide kaleidoscope view.
+ */
+class UIKaleidoscopeView : public UIView {
+public:
+ UIKaleidoscopeView(const UIKaleidoscopeView &) = delete;
+ UIKaleidoscopeView &operator=(const UIKaleidoscopeView &) = delete;
+
+ /**
+ * @brief A constructor used to create the <b>UIKaleidoscopeView</b> instance.
+ This view will directly modify the buffer, and it is the same size as the screen.
+ */
+ UIKaleidoscopeView();
+
+ /**
+ * @brief A destructor used to delete the <b>UIKaleidoscopeView</b> instance.
+ */
+ ~UIKaleidoscopeView() override;
+
+ /**
+ * @brief Obtains the view type.
+ * @return Returns <b>UI_KALEIDOSCOPE_VIEW</b>, as defined in {@link UIViewType}.
+ */
+ UIViewType GetViewType() const override
+ {
+ return UI_KALEIDOSCOPE_VIEW;
+ }
+
+ /**
+ * @brief Set src img for kaleidoscope.
+ * @param [in] src Pointer to a ImageInfo struct, which is the source img for kaleidoscope img.
+ The size of img must match the size of screen.
+ * @return Return true if set successfully; and false otherwise.
+ */
+ bool SetSrc(const ImageInfo* src);
+
+ /**
+ * @brief Update the kaleidoscope by a rotate value.
+ * @param [in] rotate Rotate value.
+ */
+ void Rotate(float rotate);
+
+#if ENABLE_ROTATE_INPUT
+ /**
+ * @brief Set rotate factor for rotate event.
+ */
+ void SetRotateEventFactor(float factor);
+
+ /**
+ * @brief Handle Rotate Event. Update the kaleidoscope by a rotate event.
+ * @param [in] event Rotate event.
+ */
+ bool OnRotateEvent(const RotateEvent& event) override;
+#endif
+
+ /**
+ * @brief Set rotate value for rotate animator callback.
+ * @param [in] rotate Rotate value.
+ */
+ void SetRotateAnimatorValue(float rotate);
+
+ /**
+ * @brief Start rotate animator
+ */
+ void StartRotateAnimator();
+
+ /**
+ * @brief Stop rotate animator
+ */
+ void StopRotateAnimator();
+
+ void OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) override;
+private:
+ class RotateCallback : public AnimatorCallback {
+ public:
+ RotateCallback() {}
+ ~RotateCallback() override {}
+ void SetRotateValue(float rotate);
+ void Callback(UIView* view) override;
+ private:
+ float rotate_ = 0.0f;
+ };
+
+#if ENABLE_ROTATE_INPUT
+ float factor_ = 1.0f;
+#endif
+ float rotate_ = 0.0f;
+ KaleidoscopeUtils kaleidoscope_;
+ RotateCallback callback_;
+ Animator* animator_ = nullptr;
+};
+}
+#endif
+/**
+ * @}
+ */
#include "common/ihardware_view.h"
#include "common/lite_surface.h"
+#include "common/image.h"
#include "components/ui_view.h"
#include "ibuffer_consumer_listener.h"
#include "graphic_mutex.h"
return isFirstFrameCome_;
}
+ /**
+ * @brief Set preview image info.
+ * @since 1.0
+ * @version 1.0
+ */
+ void SetPreview(ImageInfo* info);
+
private:
UILiteSurfaceView(const UILiteSurfaceView&) = delete;
UILiteSurfaceView &operator=(const UILiteSurfaceView&) = delete;
GraphicMutex lock_;
ColorType colorKey_ = Color::White();
Rect layerRect_;
-
- void PreHandleStatus();
+ Image* preView_ = nullptr;
#ifdef VERSION_IOT
void BlitBitmapToFb(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea, ImageInfo& bitmap);
#endif
+ void AdjustArea(Rect& rect);
};
} // namespace OHOS
#endif // GRAPHIC_LITE_UI_LITE_SURFACE_VIEW_H
--- /dev/null
+/*
+ * Copyright (c) 2024 CompanyNameMagicTag.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @addtogroup UI_Components
+ * @{
+ *
+ * @brief Defines UI components such as buttons, texts, images, lists, and progress bars.
+ *
+ * @since 1.0
+ * @version 1.0
+ */
+
+/**
+ * @file ui_map_view.h
+ *
+ * @brief Defines the class to extend canvas/paint ability.
+ *
+ * @since 1.0
+ * @version 1.0
+ */
+
+#ifndef GRAPHIC_LITE_UI_MAP_VIEW_H
+#define GRAPHIC_LITE_UI_MAP_VIEW_H
+#include "components_ext/map_svg_parser.h"
+#include "components/ui_view_group.h"
+
+namespace OHOS {
+#if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH
+struct POIInfo {
+ ImageDetail* img = nullptr;
+ TextDetail* text[2] = {nullptr, nullptr};
+ uint8_t tag = 0;
+ uint16_t rank = 0;
+ uint16_t id = 0;
+ Rect rect;
+ Point orignPos = {0, 0};
+ bool visible = false;
+};
+
+struct RoadInfo {
+ TextDetail* text = nullptr;
+ Rect rect;
+ Point orignPos = {0, 0};
+ bool visible = false;
+};
+
+class OnPOIClickListener : public HeapBase {
+public:
+ /* *
+ * @brief Called when a POI is clicked.
+ * @since 1.0
+ * @version 1.0
+ */
+ virtual bool OnClick(uint32_t index)
+ {
+ return false;
+ }
+
+ /* *
+ * @brief A destructor used to delete the <b>OnPOIClickListener</b> instance.
+ * @since 1.0
+ * @version 1.0
+ */
+ virtual ~OnPOIClickListener() {}
+};
+
+class UIMapView : public UIViewGroup, public UIView::OnClickListener {
+public:
+ UIMapView(const UIMapView &) = delete;
+ UIMapView &operator=(const UIMapView &) = delete;
+
+ /* *
+ * @brief A constructor used to create an <b>UIMapView</b> instance.
+ *
+ */
+ UIMapView();
+
+ /* *
+ * @brief A destructor used to delete the <b>UIMapView</b> instance.
+ *
+ */
+ ~UIMapView() override;
+
+ /* *
+ * @brief Get current view type.
+ *
+ */
+ UIViewType GetViewType() const override
+ {
+ return UI_MAP_VIEW;
+ }
+
+ /* *
+ * @brief Set SVG src with file path.
+ *
+ */
+ bool SetSVG(const char* path);
+
+ /* *
+ * @brief Set SVG src with file buffer.
+ *
+ */
+ bool SetSVG(uint8_t* data, uint32_t length);
+
+ /* *
+ * @brief Set POI on cick listener.
+ *
+ */
+ void SetOnPOIClickListener(OnPOIClickListener* listener);
+
+ /* *
+ * @brief Enable cache. It will cache this tile immediately when enable is true,
+ * and free cache buffer immediately. We need to enable cache when setting svg,
+ * or after scale map finished, and disable cache before scale map.
+ *
+ */
+ void EnableCache(bool enable);
+
+ /* *
+ * @brief Used to scale map base the target point.
+ *
+ */
+ void ScaleMap(float scale, const Vector2<float>& pivot);
+
+ /* *
+ * @brief Hide the POI by tag.
+ *
+ */
+ void HidePOI(uint16_t tag, bool isHide = true);
+ void SetX(int16_t x) override;
+ void SetY(int16_t x) override;
+
+private:
+ POIInfo* pois_ = nullptr;
+ RoadInfo* roads_ = nullptr;
+ OnPOIClickListener* poiListener_ = nullptr;
+ bool cacheEnable_ = false;
+ bool needUpdate_ = false;
+ ImageInfo cacheInfo_ = {{0}};
+ MapSVGParser parser_;
+ uint8_t* data_ = nullptr;
+ char* filePath_ = nullptr;
+ PathDetail* pathArray_ = nullptr;
+ uint8_t pathCount_ = 0;
+ RoadDetail* roadArray_ = nullptr;
+ uint8_t roadCount_ = 0;
+ POIDetail* poiArray_ = nullptr;
+ uint8_t poiCount_ = 0;
+ char* fontName_ = DEFAULT_VECTOR_FONT_FILENAME;
+ uint8_t fontId_ = 0xff;
+ uint8_t fontSize_ = 0;
+ uint32_t poiMask_ = 0;
+ float scale_ = 1.0f;
+
+ void DrawPath(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea);
+ void DrawText(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea, TextDetail& info, Point offset = {0, 0},
+ bool isPOIText = false);
+ Rect DrawImage(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea, ImageInfo& info, MapRect& rect);
+ void DrawPOIs(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea);
+ void DrawRoads(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea);
+ bool RenderMapToCache(void);
+ void OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) override;
+ bool OnClick(UIView& view, const ClickEvent& event) override;
+ void HandlePOICollision();
+ void HandleRoadCollision();
+ bool InitPOIInfo(int num);
+ bool InitRoadInfo(int num);
+ void ClearSVG();
+};
+#endif
+}
+#endif
+/**
+ * @}
+ */
#endif
/**
- * @brief Set frequence for graphic.
+ * @brief Set frequence for graphic, cannot use PostGraphicEvent() to excute this method.
*/
void SetFrequence(int freq);
+/**
+ * @brief Set frequence for graphic inner.
+ */
+void SetFrequenceInner(int freq);
+
/**
* @brief Notify the Screen is on, for c language.
*/
GraphicService::GetInstance()->UpdateGraphicEvent();
}
-void SetFrequence(int freq)
+void SetFrequenceInner(int freq)
{
if (!g_isScreenOn) {
return;
}
}
+void SetFrequence(int freq)
+{
+ GraphicService::GetInstance()->PostGraphicEvent([=] {
+ SetFrequenceInner(freq);
+ });
+}
+
void NotifyScreenOn(void)
{
if (g_rtcHandle == nullptr) {
}
LiteSurface::~LiteSurface()
+{
+ ClearBuffers();
+}
+
+void LiteSurface::ClearBuffers()
{
lock_.Lock();
freeList_.Clear();
node = node->next_;
}
buffers_.Clear();
+ bufferCount_ = 0;
lock_.Unlock();
}
{
ReleaseBuffer(buffer);
}
+
+SurfaceBuffer* LiteSurface::GetBackBuf()
+{
+ return dirtyList_.Back();
+}
} // namespace OHOS
void LowPowerManager::EnterLowPower()
{
- SetFrequence(1);
+ SetFrequenceInner(1);
}
void LowPowerManager::ExitLowPower()
{
lastExitTime_ = HALTick::GetInstance().GetTime();
- SetFrequence(60); // 60: 60fps
+ SetFrequenceInner(60); // 60: 60fps
}
bool LowPowerManager::IsLiteSurfaceInRootView()
if (period == 0) {
return false;
} else {
- int freq = 1000 / period; // 1000: 1000ms per second
- SetFrequence(freq);
+ int freq = 1000 / static_cast<int>(period); // 1000: 1000ms per second
+ SetFrequenceInner(freq);
return true;
}
}
--- /dev/null
+/*
+ * Copyright (c) @CompanyNameMagicTag. 2024. All rights reserved.
+ */
+
+#include "components/ui_custom_hexagons_list.h"
+#include "animator/easing_equation.h"
+
+namespace OHOS {
+static const float TRASPANRENT_SCALE = 2.5f;
+static const float ROTATE_SCALE_FACTOR = 0.02f;
+static const float SCALE_SMALLEST_VALUE = 0.1f;
+static const float ROTATE_ANIMATION_DURATION = 10;
+
+UICustomHexagonsList::~UICustomHexagonsList()
+{
+ if (rotateAnimator_ != nullptr) {
+ delete rotateAnimator_;
+ rotateAnimator_ = nullptr;
+ }
+}
+
+UICustomHexagonsList::RotateAnimatorCallback::RotateAnimatorCallback()
+ : curTime_(0),
+ totalTime_(0),
+ xDistance_(0),
+ yDistance_(0),
+ prevX_(0),
+ prevY_(0),
+ startScale_(0.0f),
+ endScale_(0.0f),
+ centerIndex_(0)
+{}
+
+void UICustomHexagonsList::RotateAnimatorCallback::Callback(UIView* view)
+{
+ UICustomHexagonsList* hexView = dynamic_cast<UICustomHexagonsList*>(view);
+ if (hexView == nullptr) {
+ return;
+ }
+ curTime_++;
+ if (curTime_ > totalTime_) {
+ hexView->StopRotateAnimator();
+ return;
+ }
+ float timeRatio = curTime_ * 1.0f / totalTime_;
+ if (!FloatEqual(xDistance_, 0)) {
+ if (!FloatEqual(prevX_, xDistance_)) {
+ int16_t curX = static_cast<int16_t>(timeRatio * xDistance_);
+ hexView->DragXInner(curX - prevX_);
+ prevX_ = curX;
+ }
+ }
+ if (!FloatEqual(yDistance_, 0)) {
+ if (!FloatEqual(prevY_, yDistance_)) {
+ int16_t curY = static_cast<int16_t>(timeRatio * yDistance_);
+ hexView->DragYInner(curY - prevY_);
+ prevY_ = curY;
+ }
+ }
+ float curScale = timeRatio * (endScale_ - startScale_) + startScale_;
+ if (FloatMoreEqual(curScale, 1.0f)) {
+ uint8_t opa = static_cast<uint8_t>((1 - (curScale - 1.0f) / (TRASPANRENT_SCALE - 1.0f)) * OPA_OPAQUE);
+ UIView* curview = hexView->GetViewByIndex(centerIndex_);
+ if (curview != nullptr) {
+ curview->SetOpaScale(opa);
+ }
+ }
+ if ((FloatMore(startScale_, endScale_) && (curScale >= endScale_)) ||
+ (FloatLess(startScale_, endScale_) || (curScale <= endScale_))) {
+ hexView->Scale(curScale, centerIndex_);
+ }
+ if (FloatEqual(curScale, endScale_)) {
+ hexView->StopRotateAnimator();
+ }
+}
+
+void UICustomHexagonsList::StartRotateAnimator(uint8_t center, int16_t xDistance, int16_t yDistance,
+ float startScale, float endScale)
+{
+ if (rotateAnimator_ == nullptr) {
+ rotateAnimator_ = new Animator(&rotateCallback_, this, 0, true);
+ }
+ rotateCallback_.ResetCallback();
+ rotateCallback_.SetCenterIndex(center);
+ rotateCallback_.SetDuration(ROTATE_ANIMATION_DURATION);
+ rotateCallback_.SetRotateRange(xDistance, yDistance, startScale, endScale);
+ rotateAnimator_->Start();
+}
+
+void UICustomHexagonsList::StopRotateAnimator()
+{
+ if (rotateAnimator_ != nullptr) {
+ rotateAnimator_->Stop();
+ rotateCallback_.ResetCallback();
+ }
+}
+
+#if ENABLE_ROTATE_INPUT
+bool UICustomHexagonsList::OnRotateStartEvent(const RotateEvent& event)
+{
+ if (scrollAnimator_.GetState() != Animator::STOP) {
+ UIAbstractScroll::StopAnimator();
+ }
+ if ((rotateAnimator_ != nullptr) && (rotateAnimator_->GetState() != Animator::STOP)) {
+ StopRotateAnimator();
+ }
+
+ // Record rotate center index when scale is large than 1.0f
+ if (FloatMoreEqual(GetGlobalScale(), 1.0f)) {
+ int8_t focusIndex = GetFocusedImgIndex();
+ if (focusIndex < 0) {
+ GRAPHIC_LOGE("wrong focus index %d, force to be 0 !!", focusIndex);
+ rotateCenterIndexInNormal_ = 0;
+ } else {
+ rotateCenterIndexInNormal_ = static_cast<uint8_t>(focusIndex);
+ }
+ }
+ return UIView::OnRotateStartEvent(event);
+}
+
+bool UICustomHexagonsList::OnRotateEvent(const RotateEvent& event)
+{
+ float deltaScale = event.GetRotate() * ROTATE_SCALE_FACTOR;
+ float targetScale = globalScale_ + deltaScale;
+ Vector2<int16_t> position = GetCurrentPosition(rotateCenterIndexInNormal_);
+ Vector2<int16_t> deltaDistance;
+ // Current scale > Normal(1.0f), scale and change opaque
+ if (FloatMore(targetScale, 1.0f)) {
+ UIView* view = GetViewByIndex(rotateCenterIndexInNormal_);
+ uint8_t opa = static_cast<uint8_t>((1 - (targetScale - 1.0f) / (TRASPANRENT_SCALE - 1.0f)) * OPA_OPAQUE);
+ if (view != nullptr) {
+ view->SetOpaScale(opa);
+ }
+ Scale(targetScale, rotateCenterIndexInNormal_);
+ // Current scale in [Equal-Threshold, Normal], only scale
+ } else if (FloatMoreEqual(targetScale, scaleThresholdOfZeroFactor_)) {
+ Scale(targetScale, rotateCenterIndexInNormal_);
+ // Current scale in [Small, Equal-Threshold), scale and scroll
+ } else if (FloatMore(targetScale, scaleInSmallState_)) {
+ if (deltaScale < 0) {
+ Vector2<int16_t> targetPos = GetPositionWithCondition(rotateCenterIndexInNormal_, 0, scaleInSmallState_);
+ deltaDistance = targetPos - position;
+ float deltaScaleToSmallState = scaleInSmallState_ - globalScale_;
+ int16_t deltaX = static_cast<int16_t>(deltaDistance.x_ / deltaScaleToSmallState * deltaScale);
+ int16_t deltaY = static_cast<int16_t>(deltaDistance.y_ / deltaScaleToSmallState * deltaScale);
+ ScrollBy(deltaX, deltaY);
+ } else {
+ deltaDistance = Vector2<int16_t>(GetWidth() / 2, GetHeight() / 2) - position; // 2, center
+ float deltaScaleToSmallState = scaleThresholdOfZeroFactor_ - globalScale_;
+ int16_t deltaX = static_cast<int16_t>(deltaDistance.x_ / deltaScaleToSmallState * deltaScale);
+ int16_t deltaY = static_cast<int16_t>(deltaDistance.y_ / deltaScaleToSmallState * deltaScale);
+ ScrollBy(deltaX, deltaY);
+ }
+ Scale(targetScale, rotateCenterIndexInNormal_);
+ // Current scale in [Smallest, Small), only scale
+ } else if (FloatMore(targetScale, SCALE_SMALLEST_VALUE)) {
+ Vector2<int16_t> centerImgPosition = GetCurrentPosition(0);
+ Vector2<int16_t> targetPos(GetWidth() / 2, GetHeight() / 2); // 2, center
+ deltaDistance = targetPos - centerImgPosition;
+ ScrollBy(deltaDistance.x_, deltaDistance.y_);
+ Scale(targetScale, 0);
+ }
+ return UIView::OnRotateEvent(event);
+}
+
+bool UICustomHexagonsList::OnRotateEndEvent(const RotateEvent& event)
+{
+ // Rotate end in (Normal, .), start animator to enter Normal State
+ if (FloatMore(globalScale_, 1.0f)) {
+ StartRotateAnimator(rotateCenterIndexInNormal_, 0, 0, globalScale_, 1.0f);
+ SetReboundMode(ReboundMode::NEAREST_IMG_ON_SCR_CENTER);
+ // Rotate end in (Equal-Threshold, Normal), start animator to enter Normal State
+ } else if (FloatMore(globalScale_, scaleThresholdOfZeroFactor_)) {
+ StartRotateAnimator(rotateCenterIndexInNormal_, 0, 0, globalScale_, 1.0f);
+ SetReboundMode(ReboundMode::NEAREST_IMG_ON_SCR_CENTER);
+ // Rotate end in (Small, Equal-Threshold), start animator to enter Small State
+ } else if (FloatMore(globalScale_, scaleInSmallState_)) {
+ Vector2<int16_t> targetPos = GetPositionWithCondition(rotateCenterIndexInNormal_, 0, scaleInSmallState_);
+ Vector2<int16_t> curPos = GetCurrentPosition(rotateCenterIndexInNormal_);
+ Vector2<int16_t> delta = targetPos - curPos;
+ StartRotateAnimator(rotateCenterIndexInNormal_, delta.x_, delta.y_, globalScale_, scaleInSmallState_);
+ SetReboundMode(ReboundMode::CENTER_IMG_ON_SCR_CENTER);
+ // Rotate end in (., Small), start animator to enter Small State
+ } else {
+ StartRotateAnimator(0, 0, 0, globalScale_, scaleInSmallState_);
+ SetReboundMode(ReboundMode::CENTER_IMG_ON_SCR_CENTER);
+ }
+
+ return UIView::OnRotateEndEvent(event);
+}
+#endif
+}
\ No newline at end of file
return;\r
}\r
surface_->RegisterConsumerListener(*this);\r
- LiteMGfxEngine::GetInstance()->AddHardwareLayer(this);\r
- GraphicService::GetInstance()->EnableAsyncMode(false);\r
LowPowerManager::GetInstance()->PowerLock();\r
}\r
\r
--flushCount_;\r
lock_.Unlock();\r
currentBuffer_ = surface_->AcquireBuffer();\r
- PreHandleStatus();\r
if (currentBuffer_ == nullptr) {\r
- surface_->ReleaseBuffer(lastFlushedBuffer_);\r
- lastFlushedBuffer_ = nullptr;\r
return;\r
}\r
\r
}\r
}\r
\r
-void UILiteSurfaceView::PreHandleStatus()\r
-{\r
- if (currentBuffer_ == nullptr) {\r
- return;\r
- }\r
-\r
- if (currentBuffer_->format == PIXEL_FMT_BUTT) {\r
- DisplayDev::GetInstance()->SetLayerColorKey(LAYER_0, false, 0);\r
- currentBuffer_->format = PIXEL_FMT_YCBCR_420_SP;\r
- surface_->ReleaseBuffer(currentBuffer_);\r
- currentBuffer_ = nullptr;\r
- isStopped_ = true;\r
- isFirstFrameCome_ = false;\r
- } else if (currentBuffer_->format != PIXEL_FMT_BUTT && isStopped_) {\r
- DisplayDev::GetInstance()->SetLayerColorKey(LAYER_0, true, colorKey_.full);\r
- isStopped_ = false;\r
- }\r
-}\r
-\r
void UILiteSurfaceView::PostFlush()\r
{\r
if (currentBuffer_ != nullptr) {\r
#ifdef VERSION_IOT\r
bool UILiteSurfaceView::GetBitmap(ImageInfo& bitmap)\r
{\r
- if (lastFlushedBuffer_ == nullptr) {\r
+ if (!isFirstFrameCome_) {\r
UIView::GetBitmap(bitmap);\r
} else {\r
+ SurfaceBuffer* buff;\r
+ if (lastFlushedBuffer_ != nullptr) {\r
+ buff = lastFlushedBuffer_;\r
+ } else {\r
+ buff = surface_->GetBackBuf();\r
+ }\r
+\r
+ if (buff == nullptr) {\r
+ GRAPHIC_LOGE("buff is null!\n");\r
+ return false;\r
+ }\r
CscYuvBuf yuv = {0};\r
- yuv.yAddr = (uint8_t*)lastFlushedBuffer_->addr;\r
- yuv.uvAddr = (uint8_t*)yuv.yAddr + ALIGN_BYTE(lastFlushedBuffer_->width, YUV_WIDTH_ALIGNMENT) *\r
- lastFlushedBuffer_->height;\r
- yuv.width = lastFlushedBuffer_->width;\r
- yuv.height = lastFlushedBuffer_->height;\r
- yuv.yStride = ALIGN_BYTE(lastFlushedBuffer_->width, YUV_WIDTH_ALIGNMENT);\r
- yuv.uvStride = ALIGN_BYTE(lastFlushedBuffer_->width, YUV_WIDTH_ALIGNMENT);\r
+ yuv.yAddr = reinterpret_cast<uint8_t*>(buff->addr);\r
+ yuv.uvAddr = static_cast<uint8_t*>(yuv.yAddr) + ALIGN_BYTE(buff->width, YUV_WIDTH_ALIGNMENT) * buff->height;\r
+ yuv.width = buff->width;\r
+ yuv.height = buff->height;\r
+ yuv.yStride = ALIGN_BYTE(buff->width, YUV_WIDTH_ALIGNMENT);\r
+ yuv.uvStride = ALIGN_BYTE(buff->width, YUV_WIDTH_ALIGNMENT);\r
\r
CscRgbBuf rgb = {0};\r
- rgb.width = lastFlushedBuffer_->width;\r
- rgb.height = lastFlushedBuffer_->height;\r
+ rgb.width = buff->width;\r
+ rgb.height = buff->height;\r
rgb.stride = ALIGN_BYTE(rgb.width, BYTE_ALIGNMENT) * 3; // 3: 3 bytes for rgb888\r
\r
bitmap.header.colorMode = RGB888;\r
bitmap.header.compressMode = 0;\r
bitmap.header.reserved = 0;\r
rgb.addr = reinterpret_cast<uint8_t*>(ImageCacheMalloc(bitmap));\r
- CscConvertYuvToRgb(&rgb, &yuv);\r
+ if (rgb.addr != nullptr) {\r
+ CscConvertYuvToRgb(&rgb, &yuv);\r
+ } else {\r
+ GRAPHIC_LOGE("UILiteSurfaceView::GetBitmap img alloc failed! size: 0x%x\n", bitmap.dataSize);\r
+ }\r
}\r
return true;
}\r
}\r
#endif\r
\r
+void UILiteSurfaceView::AdjustArea(Rect& rect)\r
+{\r
+ if (rect.GetX() % 2 != 0) { // 2: mod\r
+ if (rect.GetX() < 0) {\r
+ rect.SetX(rect.GetX() + 1);\r
+ } else {\r
+ rect.SetX(rect.GetX() - 1);\r
+ }\r
+ }\r
+\r
+ if (rect.GetY() % 2 != 0) { // 2: mod\r
+ if (rect.GetY() < 0) {\r
+ rect.SetY(rect.GetY() + 1);\r
+ } else {\r
+ rect.SetY(rect.GetY() - 1);\r
+ }\r
+ }\r
+}\r
+\r
void UILiteSurfaceView::OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea)\r
{\r
if (surface_ == nullptr) {\r
return;\r
}\r
\r
+ if (!isFirstFrameCome_ && preView_ != nullptr) {\r
+ const ImageInfo* info = preView_->GetImageInfo();\r
+ Rect coords(GetX(), GetY(), GetX() + info->header.width - 1, GetY() + info->header.height - 1);\r
+ preView_->DrawImage(gfxDstBuffer, coords, invalidatedArea, *style_, opaScale_);\r
+ return;\r
+ }\r
+\r
#ifdef VERSION_IOT\r
- if (lastFlushedBuffer_ != nullptr && RootView::GetInstance()->GetSnapshotFlag()) {\r
+ if (isFirstFrameCome_ && RootView::GetInstance()->GetSnapshotFlag()) {\r
ImageInfo bitmap;\r
GetBitmap(bitmap);\r
BlitBitmapToFb(gfxDstBuffer, invalidatedArea, bitmap);\r
\r
if (!(layerRect_ == GetRect())) {\r
layerRect_ = GetRect();\r
+ AdjustArea(layerRect_);\r
Rect dirtyRect(0, 0, layerRect_.GetWidth() - 1, layerRect_.GetHeight() - 1);\r
DisplayDev::GetInstance()->SetLayerPositon(LAYER_1, layerRect_.GetX(), layerRect_.GetY());\r
DisplayDev::GetInstance()->SetLayerDirtyRegion(LAYER_1, dirtyRect);\r
void UILiteSurfaceView::OnBufferAvailable()\r
{\r
lock_.Lock();\r
- ++flushCount_;\r
- lock_.Unlock();\r
- if (!isFirstFrameCome_) {\r
- isFirstFrameCome_ = true;\r
+ SurfaceBuffer* back = surface_->GetBackBuf();\r
+ bool isLastFrame = (back->format == PIXEL_FMT_BUTT);\r
+ if (isLastFrame) {\r
+ back->format = PIXEL_FMT_YCBCR_420_SP;\r
+ isFirstFrameCome_ = false;\r
+ flushCount_ = 0;\r
+ } else {\r
+ ++flushCount_;\r
}\r
- if (!isLayerInit_) {\r
- InitLayer();\r
+ lock_.Unlock();\r
+\r
+ if (isLastFrame) {\r
+ GraphicService::GetInstance()->PostGraphicEvent(\r
+ [&] {\r
+ if (surface_ != nullptr) {\r
+ isStopped_ = true;\r
+ DisplayDev::GetInstance()->SetLayerColorKey(LAYER_0, false, 0);\r
+ LiteMGfxEngine::GetInstance()->ClearHardwareLayer();\r
+ LiteMGfxEngine::GetInstance()->EnableAsyncMode(true);\r
+ surface_->ClearBuffers();\r
+ currentBuffer_ = nullptr;\r
+ lastFlushedBuffer_ = nullptr;\r
+ }\r
+ });\r
+ } else if (!isFirstFrameCome_) {\r
+ GraphicService::GetInstance()->PostGraphicEvent(\r
+ [&] {\r
+ LiteMGfxEngine::GetInstance()->EnableAsyncMode(false);\r
+ LiteMGfxEngine::GetInstance()->AddHardwareLayer(this);\r
+ DisplayDev::GetInstance()->SetLayerColorKey(LAYER_0, true, colorKey_.full);\r
+ InitLayer();\r
+ isStopped_ = false;\r
+ isFirstFrameCome_ = true;\r
+ });\r
}\r
- OHOS::GraphicEventHandler::GetInstance()->PostGraphicEvent(\r
+\r
+ GraphicService::GetInstance()->PostGraphicEvent(\r
[] {\r
RootView::GetInstance()->Invalidate();\r
- },\r
- false);\r
+ });\r
+}\r
+\r
+void UILiteSurfaceView::SetPreview(ImageInfo* info)\r
+{\r
+ if (preView_ == nullptr) {\r
+ preView_ = new Image();\r
+ }\r
+ if (preView_ != nullptr) {\r
+ preView_->SetSrc(info);\r
+ }\r
}\r
}\r
--- /dev/null
+/*\r
+ * Copyright (c) 2024 CompanyNameMagicTag.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+#ifndef GRAPHIC_LITE_MAP_SVG_PARSER_H\r
+#define GRAPHIC_LITE_MAP_SVG_PARSER_H\r
+#include <cstdint>\r
+#include "gfx_utils/color.h"\r
+\r
+namespace OHOS {\r
+struct MapRect {\r
+ int16_t x;\r
+ int16_t y;\r
+ int16_t width;\r
+ int16_t height;\r
+};\r
+\r
+struct PathStyle {\r
+ uint8_t strokeCap : 4;\r
+ uint8_t strokeJoin : 4;\r
+ Color24 strokeColor;\r
+ Color24 fillColor;\r
+ float strokeWidth;\r
+};\r
+\r
+struct MapPathBase {\r
+ uint8_t type;\r
+ uint8_t pathStyleIndex;\r
+ uint16_t cmdNum;\r
+ uint16_t dataNum;\r
+};\r
+\r
+struct PathDetail {\r
+ MapPathBase base;\r
+ uint8_t* cmd;\r
+ float* data;\r
+};\r
+\r
+struct ImageBase {\r
+ uint8_t id;\r
+ MapRect rect;\r
+};\r
+\r
+struct ImageDetail {\r
+ ImageBase base;\r
+ ImageInfo* info;\r
+};\r
+\r
+struct MapTextBase {\r
+ uint8_t fontSize;\r
+ Color24 fontColor;\r
+ Color24 strokeColor;\r
+ float strokeWidth;\r
+ MapRect rect;\r
+ uint16_t charLen;\r
+};\r
+\r
+struct TextDetail {\r
+ MapTextBase base;\r
+ char* text;\r
+ Point* offset;\r
+};\r
+\r
+struct POIDetail {\r
+ int8_t imgIndex;\r
+ int8_t textIndex[2];\r
+ uint8_t tag;\r
+ uint16_t rank;\r
+ uint16_t id;\r
+};\r
+\r
+struct RoadDetail {\r
+ int8_t textIndex;\r
+};\r
+\r
+class MapSVGParser {\r
+public:\r
+ MapSVGParser(void);\r
+ virtual ~MapSVGParser(void);\r
+\r
+ bool SetSVG(uint8_t* data, uint32_t length);\r
+ Color24 GetBackGroundColor(void);\r
+ uint32_t GetImageOffset(void);\r
+ void GetSize(int16_t& width, int16_t& height);\r
+\r
+ uint8_t GetPaths(PathDetail*& pathList);\r
+ uint8_t GetPOIs(POIDetail*& poiList);\r
+ uint8_t GetRoads(RoadDetail*& roadList);\r
+\r
+ PathStyle* GetPathStyleByIndex(uint8_t index);\r
+ TextDetail* GetTextByIndex(uint8_t index);\r
+ ImageDetail* GetImageByIndex(uint8_t index);\r
+ void ClearSVG();\r
+\r
+private:\r
+ struct MapHeader {\r
+ Color24 bgColor;\r
+ uint8_t nodeNum;\r
+ uint8_t pathStyleNum;\r
+ int16_t width;\r
+ int16_t height;\r
+ uint32_t imgDataOffset;\r
+ };\r
+\r
+ struct MapNode {\r
+ uint8_t type;\r
+ uint8_t count;\r
+ uint32_t offset;\r
+ };\r
+\r
+ static constexpr uint8_t PARSER_TYPE_NUM = 5;\r
+ using MapTypeParserInit = uint32_t (MapSVGParser::*)(\r
+ uint8_t *data, uint32_t length, uint32_t offset, uint8_t count);\r
+ using MapTypeParserDeinit = void (MapSVGParser::*)(uint8_t count);\r
+\r
+ uint32_t ReadMapNode(uint8_t* data, uint32_t length, uint32_t offset);\r
+ uint32_t ReadPathStyle(uint8_t* data, uint32_t length, uint32_t offset);\r
+ uint32_t ReadMapPath(uint8_t* data, uint32_t length, uint32_t offset, uint8_t count);\r
+ uint32_t ReadMapText(uint8_t* data, uint32_t length, uint32_t offset, uint8_t count);\r
+ uint32_t ReadMapImg(uint8_t* data, uint32_t length, uint32_t offset, uint8_t count);\r
+ uint32_t ReadMapRoad(uint8_t* data, uint32_t length, uint32_t offset, uint8_t count);\r
+ uint32_t ReadMapPOI(uint8_t* data, uint32_t length, uint32_t offset, uint8_t count);\r
+ uint32_t ReadImage(uint8_t* data, uint32_t length, uint32_t offset);\r
+\r
+ void ReleaseMapPath(uint8_t count);\r
+ void ReleaseMapText(uint8_t count);\r
+ void ReleaseMapImg(uint8_t count);\r
+ void ReleaseMapRoad(uint8_t count);\r
+ void ReleaseMapPOI(uint8_t count);\r
+ void ReleaseResource(void);\r
+ bool AllocPath(PathDetail& path, uint32_t cmdNum, uint32_t dataNum);\r
+\r
+ MapTypeParserInit parserInitFunc[PARSER_TYPE_NUM] = { &MapSVGParser::ReadMapPath, &MapSVGParser::ReadMapText,\r
+ &MapSVGParser::ReadMapImg, &MapSVGParser::ReadMapRoad,\r
+ &MapSVGParser::ReadMapPOI };\r
+ MapTypeParserDeinit parserDeinitFunc[PARSER_TYPE_NUM] = {\r
+ &MapSVGParser::ReleaseMapPath, &MapSVGParser::ReleaseMapText, &MapSVGParser::ReleaseMapImg,\r
+ &MapSVGParser::ReleaseMapRoad, &MapSVGParser::ReleaseMapPOI\r
+ };\r
+\r
+ MapHeader mapHeader_ = {0};\r
+ MapNode* nodeArray_ = nullptr;\r
+ PathStyle* pathStyleArray_ = nullptr;\r
+ PathDetail* pathArray_ = nullptr;\r
+ uint8_t pathCount_ = 0;\r
+ TextDetail* textArray_ = nullptr;\r
+ uint8_t textCount_ = 0;\r
+ ImageDetail* imageArray_ = nullptr;\r
+ uint8_t imageCount_ = 0;\r
+ RoadDetail* roadArray_ = nullptr;\r
+ uint8_t roadCount_ = 0;\r
+ POIDetail* poiArray_ = nullptr;\r
+ uint8_t poiCount_ = 0;\r
+ uint8_t* data_ = nullptr;\r
+};\r
+}\r
+#endif // GRAPHIC_LITE_MAP_SVG_PARSER_H\r
--- /dev/null
+/*\r
+ * Copyright (c) 2024 CompanyNameMagicTag.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef TRIANGULAR_PLANE_H\r
+#define TRIANGULAR_PLANE_H\r
+\r
+#include "gfx_utils/graphic_math.h"\r
+namespace OHOS {\r
+class TriangularPlane : public HeapBase {\r
+public:\r
+ TriangularPlane() {}\r
+ virtual ~TriangularPlane() {}\r
+\r
+ void SetVertex(Vector3<float>vertex1, Vector3<float>vertex2, Vector3<float>vertex3)\r
+ {\r
+ vertexes_[0] = vertex1;\r
+ vertexes_[1] = vertex2;\r
+ vertexes_[2] = vertex3; // 2:index\r
+ }\r
+\r
+ void SetMatrix(Matrix4<float> matrix)\r
+ {\r
+ matrix_ = matrix;\r
+ }\r
+\r
+ Matrix4<float> GetMatrix()\r
+ {\r
+ return matrix_;\r
+ }\r
+\r
+ const Vector4<float> GetNormal()\r
+ {\r
+ float nx = (vertexes_[1].y_ - vertexes_[0].y_) * (vertexes_[2].z_ - vertexes_[0].z_) - // 2: vertex index\r
+ (vertexes_[1].z_ - vertexes_[0].z_) * (vertexes_[2].y_ - vertexes_[0].y_); // 2: vertex index\r
+ float ny = (vertexes_[1].z_ - vertexes_[0].z_) * (vertexes_[2].x_ - vertexes_[0].x_) - // 2: vertex index\r
+ (vertexes_[1].x_ - vertexes_[0].x_) * (vertexes_[2].z_ - vertexes_[0].z_); // 2: vertex index\r
+ float nz = (vertexes_[1].x_ - vertexes_[0].x_) * (vertexes_[2].y_ - vertexes_[0].y_) - // 2: vertex index\r
+ (vertexes_[1].y_ - vertexes_[0].y_) * (vertexes_[2].x_ - vertexes_[0].x_); // 2: vertex index\r
+ return Vector4<float>(nx, ny, nz, 0);\r
+ }\r
+\r
+ Vector3<float>& operator[](uint8_t index)\r
+ {\r
+ return vertexes_[index];\r
+ }\r
+\r
+ const Vector3<float> operator[](uint8_t index) const\r
+ {\r
+ return vertexes_[index];\r
+ }\r
+\r
+private:\r
+ static constexpr uint8_t MAX_VERTEX_NUM = 3; // 3: triangular vertex number\r
+ Vector3<float> vertexes_[MAX_VERTEX_NUM]; // the vertexes of polygon\r
+ Matrix4<float> matrix_;\r
+};\r
+}\r
+#endif // TRIANGULAR_PLANE_H
\ No newline at end of file
class UICardContainer : public UIViewGroup {
public:
UICardContainer();
- virtual ~UICardContainer() override;
- void SwitchCardToBitmap(bool bitMapFromFB = false);
+ ~UICardContainer() override;
+ UICardContainer(const UICardContainer &) = delete;
+ UICardContainer &operator=(const UICardContainer &) = delete;
+ void SwitchCardToBitmap(bool isNeedClip, bool bitMapFromFB = false);
void SwitchBitmapToCard(void);
void SetCardPage(UICardPage* page)
{
cardPage_ = page;
+ Add(cardPage_);
Resize(page->GetWidth(), page->GetHeight());
}
return cardPage_;
}
- UIImageView* GetCardimg(void)
+ UIImageView* GetCardimg(bool isNeedClip)
{
if (!isBitMapExist_) {
- SwitchCardToBitmap();
+ SwitchCardToBitmap(isNeedClip);
}
return imgView_;
}
bool OnDragStartEvent(const DragEvent& event) override;
bool OnDragEvent(const DragEvent& event) override;
bool OnDragEndEvent(const DragEvent& event) override;
- bool IsVideoContained(UIView* view);
+ bool OnLongPressEvent(const LongPressEvent& event) override;
+ bool OnClickEvent(const ClickEvent& event) override;
+ bool OnPressEvent(const PressEvent& event) override;
+ bool OnReleaseEvent(const ReleaseEvent& event) override;
+ bool OnCancelEvent(const CancelEvent& event) override;
+#if ENABLE_ROTATE_INPUT
+ bool OnRotateEvent(const RotateEvent& event) override;
+#endif
};
}
#endif
uintptr_t handle = LiteMGfxEngine::GetInstance()->InitPath(true);
LiteMGfxEngine::GetInstance()->SetPathData(handle, path->cmdNum, path->cmds, path->dataNum, path->data);
LiteMGfxEngine::GetInstance()->ClipImgByPath(dstInfo, srcInfo, handle, srcImgArea, pathMatrix, imgMatrix);
- LiteMGfxEngine::GetInstance()->SyncHwDraw();
}
-ImageInfo ClipImg::ClipImgByCircle(ImageInfo& srcInfo, Rect* srcImgArea, Point center, int16_t radius,
- ColorMode mode)
+ImageInfo ClipImg::ClipImgByCircle(ImageInfo& srcInfo, Point center, int16_t radius,
+ ColorMode mode, bool immediatelySync)
{
ImageInfo dstInfo = {{0}};
Path path = {0};
}
ClipImgByPath(dstInfo, srcInfo, &path, nullptr, nullptr, nullptr);
+ if (immediatelySync) {
+ LiteMGfxEngine::GetInstance()->SyncHwDraw();
+ }
ClearPath(&path);
return dstInfo;
}
public:
static void ClipImgByPath(ImageInfo& dstInfo, ImageInfo& srcInfo, const Path* path, Rect* srcImgArea,
const Matrix4<float>* pathMatrix, const Matrix4<float>* imgMatrix);
- static ImageInfo ClipImgByCircle(ImageInfo& srcInfo, Rect* srcImgArea, Point center, int16_t radius,
- ColorMode mode = RGB888);
+ static ImageInfo ClipImgByCircle(ImageInfo& srcInfo, Point center, int16_t radius,
+ ColorMode mode = RGB888, bool immediatelySync = false);
static ImageInfo ClipImgByRect(ImageInfo& srcInfo, Rect* srcImgArea, Rect clipArea, ColorMode mode = RGB888);
};
} // namespace OHOS
return bezierSegmentCount;
}
+void HWDrawUtils::Obtain30DegSectorPath(const ArcInfo& arc, uint8_t* cmd, float* data)
+{
+ float startAngle = arc.startAngle;
+ float endAngle = arc.endAngle;
+ float angleExtend = endAngle - startAngle;
+ float neg = (startAngle < endAngle) ? 1 : -1;
+
+ ConvertCircularDegree(startAngle);
+ float startAngleRad = startAngle / RADIAN_TO_ANGLE;
+ float extendRad = static_cast<float>(angleExtend) / RADIAN_TO_ANGLE;
+ float endAngleRad = startAngleRad + extendRad;
+
+ cmd[0] = CMD_MOVE_TO;
+ cmd[1] = CMD_LINE_TO;
+ cmd[2] = CMD_CUBIC_TO; // 2: index
+ cmd[3] = CMD_CLOSE; // 3: index
+
+ float a = startAngleRad + neg * RAD_90_DEG;
+ a = RAD_90_DEG - (a - endAngleRad) * neg;
+
+ data[0] = arc.center.x;
+ data[1] = arc.center.y;
+ data[2] = arc.center.x + arc.radius * cos(startAngleRad); // 2: index
+ data[3] = arc.center.y + arc.radius * sin(startAngleRad); // 3: index
+ data[8] = arc.center.x + arc.radius * cos(endAngleRad); // 8: index
+ data[9] = arc.center.y + arc.radius * sin(endAngleRad); // 9: index
+
+ float magicNum = 4.0f / 3.0f * (1 - cos(a / 2)) / sin(a / 2); // 2: divisor
+ GetArcControlPoint(&data[2], arc.center, magicNum, neg); // 2: index
+}
+
bool HWDrawUtils::ObtainArcPath(const ArcInfo& arc, uint32_t& cmdNum, uint8_t*& cmds, uint32_t& dataNum, float*& data)
{
float startAngle = arc.startAngle;
bool ObtainArcPath(const ArcInfo& arc, uint32_t& cmdNum, uint8_t*& cmds, uint32_t& dataNum, float*& data);
bool ObtainCirclePath(const ArcInfo& arc, uint32_t& cmdNum, uint8_t*& cmds, uint32_t& dataNum, float*& data);
bool AllocBufferForData(uint16_t dataNum, float*& addr);
+ void Obtain30DegSectorPath(const ArcInfo& arc, uint8_t* cmd, float* data);
private:
HWDrawUtils() {}
void RenderPath(BufferInfo& dst, uintptr_t path, const Rect& mask,
VGUStrokeAttr* strokeAttr, VGUFillAttr* fillAttr, VGUMatrix3* matrix);
- void ClipImgByPath(ImageInfo& dstInfo, ImageInfo& srcInfo, uintptr_t path, Rect* srcArea,
+ void ClipImgByPath(ImageInfo& dstInfo, ImageInfo& srcInfo, uintptr_t path, Rect* srcImgArea,
const Matrix4<float>* pathMatrix, const Matrix4<float>* imgMatrix);
bool Convert2VGUFormat(const ColorMode& colorMode, VGUPixelFormat& dstColorFmt) const;
namespace OHOS {
class TurnPageEffect : public CardSwipe, public UISwipeView::OnSwipeListener {
public:
- TurnPageEffect(void) {}
+ TurnPageEffect(void)
+ {
+ isNeedClip_ = true;
+ }
~TurnPageEffect() override {}
void CardSwipeAlg(UICardPage* leftCard, UICardPage* rightCard, int16_t xOffset) override;
void CardSwipeAlg(UIImageView* leftCard, UIImageView* rightCard, int16_t xOffset) override;
}
if (layerFuncs_->Flush != nullptr) {
if (layerId == LAYER_MAX) {
- if (layerFuncs_->Flush(0, 0, NULL) != DISPLAY_SUCCESS) {
+ if (layerFuncs_->Flush(0, 0, nullptr) != DISPLAY_SUCCESS) {
GRAPHIC_LOGE("flush failed.");
}
return;
}
if (layer_[layerId].bufferCount != 0) {
- GRAPHIC_LOGE("layer[%u] is already opened with BufferNo[%u].", layerId, layer_[layerId].bufferCount);
+ GRAPHIC_LOGD("layer[%u] is already opened with bufferCount[%u].", layerId, layer_[layerId].bufferCount);
return false;
}
}
}
-void DisplayDev::SetLayerPositon(uint8_t layerId, uint8_t x, uint8_t y)
+void DisplayDev::SetLayerPositon(uint8_t layerId, int16_t x, int16_t y)
{
if (layerId < LAYER_0 || layerId >= LAYER_MAX) {
GRAPHIC_LOGE("Invalid layerId[%u].", layerId);
* limitations under the License.
*/
-#include "hals/gralloc_engines.h"
#include <unordered_map>
+#ifdef __LITEOS__
+#include "los_memory_pri.h"
+#endif
#include "display_type.h"
#include "gfx_utils/graphic_log.h"
#include "securec.h"
+#include "common/image_cache_manager.h"
+#include "hals/gralloc_engines.h"
namespace OHOS {
static std::unordered_map<uintptr_t, BufferHandle*> g_buffers;
return true;
}
-bool GrallocEngines::AllocBuffer(const AllocInfo& info, GrallocBuffer& buffer)
+bool GrallocEngines::AllocBufferOnce(const AllocInfo& info, GrallocBuffer& buffer)
{
if (grallocFuncs_ == nullptr) {
GRAPHIC_LOGE("GrallocEngines not init!");
return false;
}
BufferHandle* bufferHandle = nullptr;
- if (grallocFuncs_->AllocMem(&info, &bufferHandle) != DISPLAY_SUCCESS) {
+ if (grallocFuncs_->AllocMem(&info, &bufferHandle) != DISPLAY_SUCCESS || bufferHandle == nullptr) {
return false;
}
g_buffers.insert(std::make_pair(reinterpret_cast<uint64_t>(bufferHandle->virAddr), bufferHandle));
return true;
}
+bool GrallocEngines::AllocBuffer(const AllocInfo& info, GrallocBuffer& buffer)
+{
+ if (grallocFuncs_ == nullptr && info.expectedSize == 0) {
+ GRAPHIC_LOGE("alloc failed!!, size: %u", info.expectedSize);
+ return false;
+ }
+
+ if (!AllocBufferOnce(info, buffer)) {
+ GRAPHIC_LOGE("GrallocEngines::AllocBuffer realloc size: %u", info.expectedSize);
+ if (ImageCacheManager::GetInstance().FreeAndGetBuf(info, buffer) == nullptr) {
+ DumpMem();
+#ifdef __LITEOS__
+ OsMemInfoPrint(reinterpret_cast<void*>(MEM_POOL_UI_OTHER));
+#endif
+ return false;
+ }
+ }
+ if ((info.usage & HBM_USE_MEM_YUV) == HBM_USE_MEM_YUV) {
+ yuvBufCnt_++;
+ if (yuvBufCnt_ > 3) { // 3: yuv buf cnt
+ GRAPHIC_LOGW("Count of yuv buffer is %d. It should not be greater than 3.", yuvBufCnt_);
+ }
+ }
+ return true;
+}
+
void GrallocEngines::FreeBuffer(uint8_t* virAddr)
{
if (grallocFuncs_ == nullptr) {
if (iter != g_buffers.end()) {
BufferHandle* handle = iter->second;
if (handle != nullptr) {
+ if ((handle->usage & HBM_USE_MEM_YUV) == HBM_USE_MEM_YUV) {
+ yuvBufCnt_--;
+ }
g_buffers.erase(iter);
grallocFuncs_->FreeMem(handle);
}
/**
* @brief set layer position.
*/
- void SetLayerPositon(uint8_t layerId, uint8_t x, uint8_t y);
+ void SetLayerPositon(uint8_t layerId, int16_t x, int16_t y);
/**
* @brief set layer visible state.
bool Init();
bool AllocBuffer(const AllocInfo& info, GrallocBuffer& buffer);
+ bool AllocBufferOnce(const AllocInfo& info, GrallocBuffer& buffer);
void FreeBuffer(uint8_t* virAddr);
#if ENABLE_MEMORY_CHECK
void DumpMem();
private:
GrallocEngines() : grallocFuncs_(nullptr) {}
~GrallocEngines() {}
+ uint8_t yuvBufCnt_ = 0;
GrallocFuncs* grallocFuncs_;
};
} // end namespace
--- /dev/null
+/*\r
+ * Copyright (c) 2024 CompanyNameMagicTag.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include "ui_test_coverflow.h"\r
+#include "common/screen.h"\r
+#include "font/ui_font.h"\r
+#include "gfx_utils/graphic_math.h"\r
+#include "gfx_utils/rect.h"\r
+#include "common/image_cache_manager.h"\r
+\r
+namespace OHOS {\r
+namespace {\r
+struct FaceInfo {\r
+ const char* name;\r
+ const char* path;\r
+} ;\r
+\r
+static constexpr uint8_t COVERFLOW_MAX_PAGE_NUM = 6;\r
+static FaceInfo g_faceInfo[COVERFLOW_MAX_PAGE_NUM] = {\r
+ {"1 rainbow", RES_PATH"/rainbow.bin"},\r
+ {"2 kaleidoscope", RES_PATH"/kaleidoscope.bin"},\r
+ {"3 planet", RES_PATH"/planet.bin"},\r
+ {"4 rainbow", RES_PATH"/rainbow.bin"},\r
+ {"5 kaleidoscope", RES_PATH"/kaleidoscope.bin"},\r
+ {"6 planet", RES_PATH"/planet.bin"}\r
+};\r
+\r
+static constexpr uint8_t COVERFLOW_PRELOAD_PAGE_NUM = 3;\r
+static constexpr int16_t LABEL_FONT_SIZE = 30;\r
+static constexpr uint8_t DEFAULT_STEP = 10;\r
+static constexpr uint16_t BUTTON_WIDTH = 60;\r
+static constexpr uint16_t BUTTON_HEIGHT = 40;\r
+static constexpr uint16_t BUTTON_GROUP_WIDTH = 300;\r
+static constexpr uint16_t BUTTON_GROUP_HEIGHT = 80;\r
+static constexpr uint8_t DIVISOR_TWO = 2;\r
+} // namespace\r
+\r
+void UITestCoverflow::SetUp()\r
+{\r
+ if (container_ == nullptr) {\r
+ container_ = new UIScrollView();\r
+ container_->SetThrowDrag(true);\r
+ container_->SetHorizontalScrollState(false);\r
+ container_->Resize(Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());\r
+ }\r
+}\r
+\r
+void UITestCoverflow::TearDown()\r
+{\r
+ container_->Remove(coverflow_);\r
+ DeleteChildren(container_);\r
+ if (container_ != nullptr) {\r
+ container_ = nullptr;\r
+ }\r
+ delete coverflow_;\r
+ coverflow_ = nullptr;\r
+\r
+ label_ = nullptr;\r
+ lastIndex_ = 0;\r
+ showBtn_ = nullptr;\r
+ isShowBtnGrp_ = false;\r
+ btnGrp_ = nullptr;\r
+ loadNum_ = 0;\r
+\r
+ addBtn_ = nullptr;\r
+ removeBtn_ = nullptr;\r
+ imgWidthAddBtn_ = nullptr;\r
+ imgWidthSubBtn_ = nullptr;\r
+ imgPaddingAddBtn_ = nullptr;\r
+ imgPaddingSubBtn_ = nullptr;\r
+ maxAngleAddBtn_ = nullptr;\r
+ maxAngleSubBtn_ = nullptr;\r
+ loopBtn_ = nullptr;\r
+\r
+ imgWidth_ = 200; // 200: default value\r
+ imgPadding_ = 50; // 50: default value\r
+ mirrorOpa_ = 30; // 30: default value\r
+ rotateAngle_ = 70.0f; // 70: default value\r
+}\r
+\r
+const UIView* UITestCoverflow::GetTestView()\r
+{\r
+ UITestCoverflowView001();\r
+ return container_;\r
+}\r
+\r
+\r
+void UITestCoverflow::CreateLabelButton(UILabelButton** btn, const char* tile, int16_t x, int16_t y)\r
+{\r
+ UILabelButton* tempBtn = nullptr;\r
+ if (tempBtn == nullptr) {\r
+ tempBtn = new UILabelButton();\r
+ }\r
+ tempBtn->SetPosition(x, y, BUTTON_WIDTH, BUTTON_HEIGHT);\r
+ tempBtn->SetText(tile);\r
+ tempBtn->SetOnClickListener(this);\r
+ btnGrp_->Add(tempBtn);\r
+ *btn = tempBtn;\r
+}\r
+\r
+void UITestCoverflow::InitButtonGroup()\r
+{\r
+ if (showBtn_ == nullptr) {\r
+ showBtn_ = new UIButton();\r
+ showBtn_->SetPosition(202, 10, BUTTON_WIDTH, BUTTON_HEIGHT); // 202: x position 10: y position\r
+ showBtn_->SetStyleForState(STYLE_BACKGROUND_OPA, 0, UIButton::ButtonState::RELEASED);\r
+ showBtn_->SetStyleForState(STYLE_BACKGROUND_OPA, 0, UIButton::ButtonState::PRESSED);\r
+ showBtn_->SetOnClickListener(this);\r
+ container_->Add(showBtn_);\r
+ }\r
+ if (btnGrp_ == nullptr) {\r
+ btnGrp_ = new UIViewGroup();\r
+ btnGrp_->SetPosition(77, 40, BUTTON_GROUP_WIDTH, BUTTON_GROUP_HEIGHT); // 77: x position 40: y position\r
+ btnGrp_->SetStyle(STYLE_BACKGROUND_OPA, 0);\r
+ btnGrp_->SetVisible(false);\r
+ container_->Add(btnGrp_);\r
+ }\r
+ CreateLabelButton(&imgWidthAddBtn_, "wid+", 0, 0);\r
+ CreateLabelButton(&imgWidthSubBtn_, "wid-", 60, 0); // 60: x position\r
+ CreateLabelButton(&maxAngleAddBtn_, "ang+", 120, 0); // 120: x position\r
+ CreateLabelButton(&maxAngleSubBtn_, "ang-", 180, 0); // 180: x position\r
+ CreateLabelButton(&addBtn_, "add", 0, 40); // 40: y position\r
+ CreateLabelButton(&removeBtn_, "sub", 60, 40); // 60: x position 40: y position\r
+ CreateLabelButton(&loopBtn_, "loop", 120, 40); // 120: x position 40: y position\r
+ CreateLabelButton(&imgPaddingAddBtn_, "pad+", 180, 40); // 180: x position 40: y position\r
+ CreateLabelButton(&imgPaddingSubBtn_, "pad-", 240, 40); // 240: x position 40: y position\r
+}\r
+\r
+void UITestCoverflow::UITestCoverflowView001()\r
+{\r
+ if (container_ != nullptr) {\r
+ if (coverflow_ == nullptr) {\r
+ coverflow_ = new UICoverflowView();\r
+ }\r
+ coverflow_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());\r
+ coverflow_->SetIntercept(true);\r
+ for (uint8_t i = 0; i < COVERFLOW_PRELOAD_PAGE_NUM; i++) {\r
+ ImageInfo* src = ImageCacheManager::GetInstance().LoadSingleRes(std::string(g_faceInfo[i].path));\r
+ coverflow_->Add(g_faceInfo[i].name, src);\r
+ loadNum_++;\r
+ }\r
+\r
+ if (label_ == nullptr) {\r
+ label_ = new UILabel();\r
+ }\r
+ label_->SetPosition(127, 50, 200, 50); // 127 50 200 50: label position\r
+ label_->SetTextColor(Color::White());\r
+ label_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+ lastIndex_ = coverflow_->GetCurrentPage();\r
+ label_->SetText(g_faceInfo[lastIndex_].name);\r
+ label_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT_SIZE);\r
+\r
+ coverflow_->SetOnCoverflowListener(this);\r
+ container_->Add(coverflow_);\r
+ container_->Add(label_);\r
+ InitButtonGroup();\r
+ }\r
+}\r
+\r
+bool UITestCoverflow::OnScroll()\r
+{\r
+ int16_t contMidX = static_cast<int16_t>(Screen::GetInstance().GetWidth() / DIVISOR_TWO);\r
+ int16_t minOffset = contMidX;\r
+ uint8_t newCenterIndex = lastIndex_;\r
+ for (uint8_t i = 0; i < coverflow_->GetChildrenNumber(); i++) {\r
+ Rect rect = coverflow_->GetViewByIndex(i)->GetOrigRect();\r
+ int16_t x = rect.GetLeft();\r
+ int16_t x1 = rect.GetRight();\r
+ int16_t xMid = static_cast<int16_t>(x + (x1 - x + 1) / DIVISOR_TWO);\r
+ int16_t distance = MATH_ABS(xMid - contMidX);\r
+ if (distance < minOffset) {\r
+ newCenterIndex = i;\r
+ minOffset = distance;\r
+ }\r
+ }\r
+ if (newCenterIndex != lastIndex_) {\r
+ lastIndex_ = newCenterIndex;\r
+ label_->SetText(coverflow_->GetViewByIndex(lastIndex_)->GetViewId());\r
+ }\r
+\r
+ Rect curViewRect = coverflow_->GetViewByIndex(lastIndex_)->GetOrigRect();\r
+ int16_t centerMid = curViewRect.GetLeft() + curViewRect.GetWidth() / DIVISOR_TWO;\r
+ int16_t offset = MATH_ABS(contMidX - centerMid);\r
+ if (offset > curViewRect.GetWidth() / DIVISOR_TWO) {\r
+ label_->SetStyle(STYLE_TEXT_OPA, 0);\r
+ } else {\r
+ uint8_t alpha = (uint8_t)((1.0f - ((float)offset / (curViewRect.GetWidth() / DIVISOR_TWO))) * OPA_OPAQUE);\r
+ label_->SetStyle(STYLE_TEXT_OPA, alpha);\r
+ }\r
+ return true;\r
+}\r
+\r
+bool UITestCoverflow::OnClick(UIView& view, const ClickEvent& event)\r
+{\r
+ if (&view == showBtn_) {\r
+ btnGrp_->SetVisible(!btnGrp_->IsVisible());\r
+ } else if (&view == loopBtn_) {\r
+ coverflow_->SetLoopState(true);\r
+ loopBtn_->SetStyle(STYLE_BACKGROUND_COLOR, Color::Yellow().full);\r
+ } else if (&view == imgWidthAddBtn_) {\r
+ imgWidth_ += DEFAULT_STEP;\r
+ coverflow_->SetImgSize(imgWidth_, imgWidth_);\r
+ } else if (&view == imgWidthSubBtn_) {\r
+ imgWidth_ -= DEFAULT_STEP;\r
+ coverflow_->SetImgSize(imgWidth_, imgWidth_);\r
+ } else if (&view == imgPaddingAddBtn_) {\r
+ imgPadding_ += DEFAULT_STEP;\r
+ coverflow_->SetImgPadding(imgPadding_);\r
+ } else if (&view == imgPaddingSubBtn_) {\r
+ imgPadding_ -= DEFAULT_STEP;\r
+ coverflow_->SetImgPadding(imgPadding_);\r
+ } else if (&view == addBtn_) {\r
+ if (loadNum_ >= COVERFLOW_MAX_PAGE_NUM) {\r
+ return true;\r
+ }\r
+ ImageInfo* src = ImageCacheManager::GetInstance().LoadSingleRes(std::string(g_faceInfo[loadNum_].path));\r
+ coverflow_->Add(g_faceInfo[loadNum_++].name, src);\r
+ } else if (&view == removeBtn_) {\r
+ if (loadNum_ > 0) {\r
+ coverflow_->Remove(g_faceInfo[--loadNum_].name);\r
+ }\r
+ } else if (&view == maxAngleAddBtn_) {\r
+ rotateAngle_ += 2.0; // 2.0 variables per click\r
+ coverflow_->SetRotateAngle(rotateAngle_);\r
+ } else if (&view == maxAngleSubBtn_) {\r
+ rotateAngle_ -= 2.0; // 2.0 variables per click\r
+ coverflow_->SetRotateAngle(rotateAngle_);\r
+ }\r
+ coverflow_->Invalidate();\r
+ return true;\r
+}\r
+} // namespace OHOS\r
--- /dev/null
+/*\r
+ * Copyright (c) 2024 CompanyNameMagicTag.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef UI_TEST_COVERFLOW_VIEW_H\r
+#define UI_TEST_COVERFLOW_VIEW_H\r
+\r
+#include "components/ui_coverflow_view.h"\r
+#include "components/ui_scroll_view.h"\r
+#include "components/ui_label_button.h"\r
+#include "animator/animator.h"\r
+#include "ui_test.h"\r
+\r
+namespace OHOS {\r
+class UITestCoverflow : public UITest,\r
+ public UICoverflowView::OnCoverflowScrollListener, public UIView::OnClickListener {\r
+public:\r
+ UITestCoverflow() {}\r
+ ~UITestCoverflow() override {}\r
+ void SetUp() override;\r
+ void TearDown() override;\r
+ const UIView* GetTestView() override;\r
+ /**\r
+ * @brief Test display UICoverflow\r
+ */\r
+ void UITestCoverflowView001();\r
+\r
+ bool OnScroll();\r
+\r
+ bool OnClick(UIView& view, const ClickEvent& event);\r
+private:\r
+ void InitButtonGroup();\r
+ void CreateLabelButton(UILabelButton** btn, const char* tile, int16_t x, int16_t y);\r
+\r
+ UIScrollView* container_ = nullptr;\r
+ UICoverflowView* coverflow_ = nullptr;\r
+ UILabel* label_ = nullptr;\r
+ uint16_t lastIndex_ = 0;\r
+ UIButton* showBtn_ = nullptr;\r
+ bool isShowBtnGrp_ = false;\r
+ UIViewGroup* btnGrp_ = nullptr;\r
+ uint8_t loadNum_ = 0;\r
+ UILabelButton* addBtn_ = nullptr;\r
+ UILabelButton* removeBtn_ = nullptr;\r
+ UILabelButton* imgWidthAddBtn_ = nullptr;\r
+ UILabelButton* imgWidthSubBtn_ = nullptr;\r
+ UILabelButton* imgPaddingAddBtn_ = nullptr;\r
+ UILabelButton* imgPaddingSubBtn_ = nullptr;\r
+ UILabelButton* maxAngleAddBtn_ = nullptr;\r
+ UILabelButton* maxAngleSubBtn_ = nullptr;\r
+ UILabelButton* loopBtn_ = nullptr;\r
+ uint16_t imgWidth_ = 200; // 200: default value\r
+ uint16_t imgPadding_ = 50; // 50: default value\r
+ uint8_t mirrorOpa_ = 30; // 30: default value\r
+ float rotateAngle_ = 70.0f; // 70: default value\r
+};\r
+} // namespace OHOS\r
+#endif // UI_TEST_QRCODE_H\r
static constexpr int16_t VIDEO_HEIGHT = 454;
static constexpr int16_t CAMERA_DISTANCE = 600;
static constexpr int16_t EASE_RANGE = 100;
-static constexpr int16_t STRIDE_ALIGNMENT_VALUE = 64;
+static constexpr int16_t STRIDE_ALIGNMENT_VALUE = 128;
static constexpr int16_t BUFFER_QUEUE_SIZE = 2;
static constexpr int16_t JPEG_HEIGHT_DIVISOR = 2;
static constexpr int16_t JPEG_WIDTH_BYTE_ALIGNMENT = 128;
static void GetTime(char* buf, int len)
{
struct timeval tv;
- gettimeofday(&tv, NULL);
- uint32_t second = tv.tv_sec % TIME_CONVERT;
- uint32_t minute = tv.tv_sec / TIME_CONVERT;
- uint32_t hour = (minute / TIME_CONVERT) % 24; // 24: 24 hours per day
- uint32_t realMilliSecond = tv.tv_usec / USEC_TO_MILLI;
+ gettimeofday(&tv, nullptr);
+ int32_t second = tv.tv_sec % TIME_CONVERT;
+ int32_t minute = tv.tv_sec / TIME_CONVERT;
+ int32_t hour = (minute / TIME_CONVERT) % 24; // 24: 24 hours per day
+ int32_t realMilliSecond = tv.tv_usec / USEC_TO_MILLI;
minute = minute % TIME_CONVERT;
sprintf_s(buf, len, "%02d : %02d : %02d : %03d", hour, minute, second, realMilliSecond);
--- /dev/null
+/*
+ * Copyright (c) @CompanyNameMagicTag. 2024. All rights reserved.
+ */
+
+#include "ui_test_hexagons_list/ui_test_hexagons_list.h"
+#include "components/root_view.h"
+#include "components/ui_image_view.h"
+#include "common/image_cache_manager.h"
+#include "common/screen.h"
+#include "ui_test_list_fps/ui_list_fps_res.h"
+#include "dock/focus_manager.h"
+
+namespace OHOS {
+const uint8_t IMG_COUNT = 45;
+const uint8_t IMG_DISTANCE_DELTA = 1;
+const uint8_t IMG_SIZE_DELTA = 1;
+const int16_t BUTTON_SIZE = 60;
+const float IMG_SCALE_FACTOR_DELTA = 0.01f;
+const int16_t MARGIN_DELTA = 1;
+const int16_t BORDER_RADIUS_DELTA = 1;
+const float GLOBAL_SCALE = 1.0f;
+const float GLOBAL_SCALE_DELTA = 0.02f;
+const float CLICK_SCALE_TARGET_IN_NORMAL = 2.0f;
+
+void UITestHexagonsList::ConfigButtonAttr(UIView& view, int16_t x, int16_t y, int16_t width, int16_t height)
+{
+ view.SetOpaScale(OPA_TRANSPARENT);
+ view.SetOnClickListener(this);
+ view.SetOnLongPressListener(this);
+ view.SetPosition(x, y, width, height);
+ container_->Add(&view);
+}
+
+void UITestHexagonsList::SetUpButtons(int16_t xEnd, int16_t yEnd, int16_t xMiddle, int16_t yMiddle)
+{
+ if (modifyImgSizeButton_ == nullptr) {
+ modifyImgSizeButton_ = new UIButton();
+ ConfigButtonAttr(*modifyImgSizeButton_, xMiddle - BUTTON_SIZE, 0, BUTTON_SIZE, BUTTON_SIZE);
+ }
+ if (modifyImgDistanceButton_ == nullptr) {
+ modifyImgDistanceButton_ = new UIButton();
+ ConfigButtonAttr(*modifyImgDistanceButton_, xMiddle, 0, BUTTON_SIZE, BUTTON_SIZE);
+ }
+ if (modifyScaleFatorButton_ == nullptr) {
+ modifyScaleFatorButton_ = new UIButton();
+ ConfigButtonAttr(*modifyScaleFatorButton_, xEnd - BUTTON_SIZE, yMiddle - BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE);
+ }
+ if (modifyGlobalScaleButton_ == nullptr) {
+ modifyGlobalScaleButton_ = new UIButton();
+ ConfigButtonAttr(*modifyGlobalScaleButton_, xEnd - BUTTON_SIZE, yMiddle, BUTTON_SIZE, BUTTON_SIZE);
+ }
+ if (modifyHorMarginButton_ == nullptr) {
+ modifyHorMarginButton_ = new UIButton();
+ ConfigButtonAttr(*modifyHorMarginButton_, xMiddle - BUTTON_SIZE, yEnd - BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE);
+ }
+ if (modifyVerMarginButton_ == nullptr) {
+ modifyVerMarginButton_ = new UIButton();
+ ConfigButtonAttr(*modifyVerMarginButton_, xMiddle, yEnd - BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE);
+ }
+ if (modifyBorderRadiusButton_ == nullptr) {
+ modifyBorderRadiusButton_ = new UIButton();
+ ConfigButtonAttr(*modifyBorderRadiusButton_, xMiddle - BUTTON_SIZE, yMiddle, BUTTON_SIZE, BUTTON_SIZE);
+ }
+}
+
+void UITestHexagonsList::SetUp()
+{
+ if (container_ == nullptr) {
+ container_ = new UIViewGroup();
+ }
+ container_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+ if (hexagonsList_ == nullptr) {
+ hexagonsList_ = new UICustomHexagonsList();
+ }
+ container_->Add(hexagonsList_);
+
+ if (Screen::GetInstance().GetScreenShape() == RECTANGLE) {
+ borderRadius_ = Screen::GetInstance().GetWidth() * 0.336; // 0.336, empirical coefficient
+ hexagonsList_->SetStyle(STYLE_BORDER_RADIUS, borderRadius_);
+ // STYLE_BORDER_WIDTH was used to debug, it should be removed in the actual running content
+ hexagonsList_->SetStyle(STYLE_BORDER_WIDTH, 1);
+ hexagonsList_->SetStyle(STYLE_MARGIN_LEFT, horMargin_);
+ hexagonsList_->SetStyle(STYLE_MARGIN_RIGHT, horMargin_);
+ hexagonsList_->SetStyle(STYLE_MARGIN_TOP, verMargin_);
+ hexagonsList_->SetStyle(STYLE_MARGIN_BOTTOM, verMargin_);
+ hexagonsList_->SetStyle(STYLE_BORDER_COLOR, Color::Red().full);
+ imgDistance_ = container_->GetWidth() * 0.31; // 0.31, empirical coefficient
+ imgSize_ = container_->GetWidth() * 0.27; // 0.27, empirical coefficient
+ } else {
+ imgDistance_ = container_->GetWidth() * 0.25991; // 0.25991, empirical coefficient
+ imgSize_ = container_->GetWidth() * 0.23348; // 0.23348, empirical coefficient
+ }
+ hexagonsList_->SetPosition(0, 0,
+ container_->GetWidth() - 2 * (horMargin_ + 1), container_->GetHeight() - 2 * (verMargin_ + 1)); // 2, two
+
+ ImageInfo* info = ImageCacheManager::GetInstance().LoadSingleRes(RES_PATH"hexagons.bin");
+ for (int16_t i = 0; i < IMG_COUNT; i++) {
+ UIImageView* img = new UIImageView();
+ img->SetSrc(info);
+ img->SetTouchable(true);
+ img->SetOnClickListener(this);
+ hexagonsList_->Add(img);
+ }
+ imgScaleFactor_ = hexagonsList_->GetScaleFactorByDistance();
+ globalScale_ = hexagonsList_->GetGlobalScale();
+ hexagonsList_->SetImageDistance(imgDistance_);
+ hexagonsList_->SetImageSizeInCenter(imgSize_);
+ int16_t blankSize = hexagonsList_->GetRelativeRect().GetWidth() > hexagonsList_->GetRelativeRect().GetHeight() ?
+ hexagonsList_->GetRelativeRect().GetWidth() / 2 : hexagonsList_->GetRelativeRect().GetHeight() / 2; // 2, half
+ hexagonsList_->SetScrollBlankSize(blankSize);
+ hexagonsList_->SetReboundSize(blankSize);
+ hexagonsList_->SetThrowDrag(true);
+ hexagonsList_->LayoutChildren(true);
+ SetUpButtons(container_->GetWidth() - 1, container_->GetHeight() - 1,
+ container_->GetWidth() / 2, container_->GetHeight() / 2); // 2, half size
+ FocusManager::GetInstance()->RequestFocus(hexagonsList_);
+}
+
+void UITestHexagonsList::TearDown()
+{
+ FocusManager::GetInstance()->ClearFocus();
+ DeleteChildren(container_);
+ container_ = nullptr;
+ hexagonsList_ = nullptr;
+ modifyImgSizeButton_ = nullptr;
+ modifyImgDistanceButton_ = nullptr;
+ modifyScaleFatorButton_ = nullptr;
+ modifyGlobalScaleButton_ = nullptr;
+ modifyHorMarginButton_ = nullptr;
+ modifyVerMarginButton_ = nullptr;
+ modifyBorderRadiusButton_ = nullptr;
+}
+
+void UITestHexagonsList::HandleClickEventForRectScreen(const UIView& view)
+{
+ if (modifyHorMarginButton_ == &view) {
+ horMargin_ += isIncreaseHorMargin_ ? MARGIN_DELTA : -MARGIN_DELTA;
+ horMargin_ = horMargin_ < 0 ? 0 : horMargin_;
+ hexagonsList_->SetPosition(horMargin_, verMargin_,
+ container_->GetWidth() - 2 * (horMargin_ + 1), container_->GetHeight() - 2 * (verMargin_ + 1)); // 2, two
+ hexagonsList_->LayoutChildren(true);
+ } else if (modifyVerMarginButton_ == &view) {
+ verMargin_ += isIncreaseVerMargin_ ? MARGIN_DELTA : -MARGIN_DELTA;
+ verMargin_ = verMargin_ < 0 ? 0 : verMargin_;
+ hexagonsList_->SetPosition(horMargin_, verMargin_,
+ container_->GetWidth() - 2 * (horMargin_ + 1), container_->GetHeight() - 2 * (verMargin_ + 1)); // 2, two
+ hexagonsList_->LayoutChildren(true);
+ } else if (modifyBorderRadiusButton_ == &view) {
+ borderRadius_ += isIncreaseBorderRadius_ ? BORDER_RADIUS_DELTA : -BORDER_RADIUS_DELTA;
+ borderRadius_ = borderRadius_ < 0 ? 0 : borderRadius_;
+ int8_t index = hexagonsList_->GetFocusedImgIndex();
+ hexagonsList_->SetStyle(STYLE_BORDER_RADIUS, borderRadius_);
+ }
+ container_->Invalidate();
+}
+
+bool UITestHexagonsList::OnClick(UIView& view, const ClickEvent& event)
+{
+ // Handle content click for image view
+ if (view.GetViewType() == UI_IMAGE_VIEW) {
+ uint8_t index = static_cast<uint8_t>(view.GetViewIndex());
+ float scaleInSmall = hexagonsList_->GetScaleInSmallState();
+ Vector2<int16_t> center(hexagonsList_->GetWidth() / 2, hexagonsList_->GetHeight() / 2); // 2, center
+ Vector2<int16_t> delta = center - hexagonsList_->GetCurrentPosition(index);
+ if (FloatEqual(hexagonsList_->GetGlobalScale(), scaleInSmall)) {
+ hexagonsList_->StartRotateAnimator(index, delta.x_, delta.y_, scaleInSmall, 1.0f);
+ } else if (FloatEqual(hexagonsList_->GetGlobalScale(), 1.0f)) {
+ hexagonsList_->StartRotateAnimator(index, delta.x_, delta.y_, 1.0f, CLICK_SCALE_TARGET_IN_NORMAL);
+ } else if (FloatEqual(hexagonsList_->GetGlobalScale(), CLICK_SCALE_TARGET_IN_NORMAL)) {
+ hexagonsList_->StartRotateAnimator(index, delta.x_, delta.y_, CLICK_SCALE_TARGET_IN_NORMAL, 1.0f);
+ }
+ }
+
+ if (modifyImgSizeButton_ == &view) {
+ imgSize_ += isIncreaseImgSize_ ? IMG_SIZE_DELTA : -IMG_SIZE_DELTA;
+ hexagonsList_->SetImageSizeInCenter(imgSize_);
+ hexagonsList_->LayoutChildren(true);
+ } else if (modifyImgDistanceButton_ == &view) {
+ imgDistance_ += isIncreaseImgDistance_ ? IMG_DISTANCE_DELTA : -IMG_DISTANCE_DELTA;
+ hexagonsList_->SetImageDistance(imgDistance_);
+ hexagonsList_->LayoutChildren(true);
+ } else if (modifyScaleFatorButton_ == &view) {
+ imgScaleFactor_ += isIncreaseScaleFactor_ ? IMG_SCALE_FACTOR_DELTA : -IMG_SCALE_FACTOR_DELTA;
+ hexagonsList_->SetScaleFactorByDistance(imgScaleFactor_);
+ hexagonsList_->LayoutChildren(true);
+ } else if (modifyGlobalScaleButton_ == &view) {
+ globalScale_ += isIncreaseGlobalScale_ ? GLOBAL_SCALE_DELTA : -GLOBAL_SCALE_DELTA;
+ int8_t index = hexagonsList_->GetFocusedImgIndex();
+ if (index >= 0) {
+ hexagonsList_->Scale(globalScale_, static_cast<uint8_t>(index));
+ }
+ }
+ if (FloatLess(globalScale_, hexagonsList_->GetScaleThesholdOfZeroFactor())) {
+ hexagonsList_->SetReboundMode(UIHexagonsList::ReboundMode::CENTER_IMG_ON_SCR_CENTER);
+ } else {
+ hexagonsList_->SetReboundMode(UIHexagonsList::ReboundMode::NEAREST_IMG_ON_SCR_CENTER);
+ }
+
+ if (Screen::GetInstance().GetScreenShape() == RECTANGLE) {
+ HandleClickEventForRectScreen(view);
+ }
+
+ GRAPHIC_LOGE("%d-%d imgDist_=%d imgSize=%d imgScaleFactor=%f globalScale=%f horPad=%d verPad=%d boderRadius=%d",
+ view.GetViewType(), view.GetViewIndex(), imgDistance_, imgSize_, imgScaleFactor_, globalScale_,
+ horMargin_, verMargin_, borderRadius_);
+ return true;
+}
+
+bool UITestHexagonsList::OnLongPress(UIView& view, const LongPressEvent& event)
+{
+ if (modifyImgSizeButton_ == &view) {
+ isIncreaseImgSize_ = !isIncreaseImgSize_;
+ } else if (modifyImgDistanceButton_ == &view) {
+ isIncreaseImgDistance_ = !isIncreaseImgDistance_;
+ } else if (modifyScaleFatorButton_ == &view) {
+ isIncreaseScaleFactor_ = !isIncreaseScaleFactor_;
+ } else if (modifyGlobalScaleButton_ == &view) {
+ isIncreaseGlobalScale_ = !isIncreaseGlobalScale_;
+ } else if (modifyHorMarginButton_ == &view) {
+ isIncreaseHorMargin_ = !isIncreaseHorMargin_;
+ } else if (modifyVerMarginButton_ == &view) {
+ isIncreaseVerMargin_ = !isIncreaseVerMargin_;
+ } else if (modifyBorderRadiusButton_ == &view) {
+ isIncreaseBorderRadius_ = !isIncreaseBorderRadius_;
+ }
+ GRAPHIC_LOGE("incSize=%d incDist=%d incFactor=%d incGloScale=%d incHPadding=%d incVPadding=%d incBRadius=%d",
+ isIncreaseImgSize_, isIncreaseImgDistance_, isIncreaseScaleFactor_, isIncreaseGlobalScale_,
+ isIncreaseHorMargin_, isIncreaseVerMargin_, isIncreaseBorderRadius_);
+ return true;
+}
+
+const UIView* UITestHexagonsList::GetTestView()
+{
+ return container_;
+}
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) @CompanyNameMagicTag. 2024. All rights reserved.
+ */
+
+#ifndef UI_TEST_HEXAGONS_LIST_H
+#define UI_TEST_HEXAGONS_LIST_H
+
+#include "ui_test.h"
+#include "gfx_utils/list.h"
+#include "components/ui_custom_hexagons_list.h"
+#include "components/ui_button.h"
+
+namespace OHOS {
+class UITestHexagonsList : public UITest, public UIView::OnClickListener, public UIView::OnLongPressListener {
+public:
+ UITestHexagonsList() {}
+ ~UITestHexagonsList() override {}
+ void SetUp() override;
+ void TearDown() override;
+ const UIView *GetTestView() override;
+ bool OnClick(UIView& view, const ClickEvent& event) override;
+ bool OnLongPress(UIView& view, const LongPressEvent& event) override;
+
+private:
+ void HandleClickEventForRectScreen(const UIView& view);
+ void ConfigButtonAttr(UIView& view, int16_t x, int16_t y, int16_t width, int16_t height);
+ void SetUpButtons(int16_t xEnd, int16_t yEnd, int16_t xMiddle, int16_t yMiddle);
+ UICustomHexagonsList* hexagonsList_ = nullptr;
+ int16_t horMargin_ = 0;
+ int16_t verMargin_ = 0;
+ int16_t borderRadius_ = 0;
+ UIViewGroup* container_ = nullptr;
+ uint16_t imgSize_ = 0;
+ uint16_t imgDistance_ = 0;
+ float imgScaleFactor_ = 0;
+ float globalScale_ = 0;
+ bool isIncreaseImgSize_ = true;
+ UIButton* modifyImgSizeButton_ = nullptr;
+ bool isIncreaseImgDistance_ = true;
+ UIButton* modifyImgDistanceButton_ = nullptr;
+ bool isIncreaseScaleFactor_ = true;
+ UIButton* modifyScaleFatorButton_ = nullptr;
+ bool isIncreaseGlobalScale_ = true;
+ UIButton* modifyGlobalScaleButton_ = nullptr;
+ bool isIncreaseHorMargin_ = true;
+ UIButton* modifyHorMarginButton_ = nullptr;
+ bool isIncreaseVerMargin_ = true;
+ UIButton* modifyVerMarginButton_ = nullptr;
+ bool isIncreaseBorderRadius_ = true;
+ UIButton* modifyBorderRadiusButton_ = nullptr;
+};
+}
+#endif // UI_TEST_HEXAGONS_LIST_H
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) @CompanyNameMagicTag. 2024. All rights reserved.
+ */
+
+#include "ui_test_kaleidoscope.h"
+#include "common/image_cache_manager.h"
+
+namespace OHOS {
+
+void UITestKaleidoscope::KaleidoscopeAnimator::Callback(UIView* view)
+{
+ if (view == nullptr) {
+ return;
+ }
+
+ kaleidoscopeUtils_->Rotate(0.1f); // 0.1: rotate by 0.1
+ view->Invalidate();
+}
+
+void UITestKaleidoscope::SetUp()
+{
+ container_ = new UIViewGroup();
+ container_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+ container_->SetStyle(STYLE_BACKGROUND_OPA, OPA_OPAQUE);
+ container_->SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);
+
+ imgInfo_ = ImageCacheManager::GetInstance().LoadSingleRes(RES_PATH"rabbit454.bin");
+
+ if ((Screen::GetInstance().GetWidth() == imgInfo_->header.width) &&
+ (Screen::GetInstance().GetHeight() == imgInfo_->header.height)) {
+ kaleidoscope_ = new UIKaleidoscopeView();
+ if (kaleidoscope_->SetSrc(imgInfo_) == false) {
+ return;
+ }
+
+ container_->Add(kaleidoscope_);
+ kaleidoscope_->RequestFocus();
+ kaleidoscope_->SetRotateEventFactor(0.2f); // 0.2: rotate event factor
+ kaleidoscope_->SetRotateAnimatorValue(0.1f); // 0.1: rotate animator value
+ kaleidoscope_->StartRotateAnimator();
+ return;
+ }
+
+ kaleidoscopeUtils_ = new KaleidoscopeUtils();
+ kaleidoscopeUtils_->Init(imgInfo_, nullptr);
+ ImageInfoExt* infoExt = kaleidoscopeUtils_->GetKaleidoscopeInfo();
+
+ img_ = new UIImageView();
+ img_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+ img_->SetAutoEnable(false);
+ img_->SetResizeMode(UIImageView::ImageResizeMode::FILL);
+ img_->SetSrc(&infoExt->info);
+ container_->Add(img_);
+
+ if (utilsAnimator_ == nullptr) {
+ utilsAnimator_ = new KaleidoscopeAnimator(kaleidoscopeUtils_, img_);
+ utilsAnimator_->Start();
+ }
+}
+
+void UITestKaleidoscope::TearDown()
+{
+ if (utilsAnimator_ != nullptr) {
+ utilsAnimator_->Stop();
+ delete utilsAnimator_;
+ utilsAnimator_ = nullptr;
+ }
+
+ if (kaleidoscope_ != nullptr) {
+ kaleidoscope_->StopRotateAnimator();
+ kaleidoscope_->ClearFocus();
+ kaleidoscope_ = nullptr;
+ }
+
+ DeleteChildren(container_);
+ container_ = nullptr;
+ imgInfo_ = nullptr;
+ img_ = nullptr;
+
+ if (kaleidoscopeUtils_ != nullptr) {
+ delete kaleidoscopeUtils_;
+ kaleidoscopeUtils_ = nullptr;
+ }
+ ImageCacheManager::GetInstance().UnloadSingleRes(RES_PATH"rabbit454.bin");
+}
+
+const UIView* UITestKaleidoscope::GetTestView()
+{
+ return container_;
+}
+}
--- /dev/null
+/*
+ * Copyright (c) @CompanyNameMagicTag. 2024. All rights reserved.
+ */
+
+#ifndef UI_TEST_KALEIDOSCOPE_H
+#define UI_TEST_KALEIDOSCOPE_H
+
+#include "ui_test.h"
+#include "components/ui_kaleidoscope_view.h"
+#include "components/kaleidoscope_utils.h"
+#include "animator/animator.h"
+#include "components/ui_image_view.h"
+
+namespace OHOS {
+class UITestKaleidoscope : public UITest {
+public:
+ UITestKaleidoscope() {}
+ ~UITestKaleidoscope() override {}
+ void SetUp() override;
+ void TearDown() override;
+ const UIView* GetTestView() override;
+
+private:
+ class KaleidoscopeAnimator : public Animator, public AnimatorCallback {
+ public:
+ KaleidoscopeAnimator(KaleidoscopeUtils* kaleidoscopeUtils, UIImageView* img)
+ : Animator(this, img, 0, true), kaleidoscopeUtils_(kaleidoscopeUtils) {}
+ virtual ~KaleidoscopeAnimator() {}
+ void Callback(UIView* view) override;
+
+ private:
+ KaleidoscopeUtils* kaleidoscopeUtils_;
+ };
+
+ UIViewGroup* container_ = nullptr;
+ ImageInfo* imgInfo_ = nullptr;
+
+ UIKaleidoscopeView* kaleidoscope_ = nullptr;
+
+ UIImageView* img_ = nullptr;
+ KaleidoscopeUtils* kaleidoscopeUtils_ = nullptr;
+ KaleidoscopeAnimator* utilsAnimator_ = nullptr;
+};
+}
+#endif
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright (c) 2024 CompanyNameMagicTag.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include "ui_test_map.h"\r
+#include "common/screen.h"\r
+#include "components/root_view.h"\r
+\r
+namespace OHOS {\r
+static float g_scale = 1.0;\r
+static const float SCALE_LIMIT = 0.5;\r
+static const float SCALE_STEP = 0.1;\r
+static const Vector2<float> SCALE_CENTER = {228, 178}; // 228, 178: scale center\r
+\r
+void UITestMap::SetUp()\r
+{\r
+ container_ = new UIScrollView();\r
+ container_->Resize(Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());\r
+ container_->SetScrollBlankSize(200); // 200: blank size\r
+\r
+ map_ = new UIMapView();\r
+ map_->SetPosition(100, 50, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); // 100, 50: x, y\r
+ map_->SetSVG(RES_PATH"map.bin");\r
+ container_->Add(map_);\r
+\r
+ scale_ = new UILabelButton();\r
+ scale_->SetPosition(57, 340, 100, 50); // 57: x, 340: y, 100: width, 50: height\r
+ scale_->SetText("scale");\r
+ scale_->SetOnClickListener(this);\r
+ container_->Add(scale_);\r
+\r
+ cache_ = new UILabelButton();\r
+ cache_->SetPosition(177, 340, 100, 50); // 177: x, 340: y, 100: width, 50: height\r
+ cache_->SetText("cache");\r
+ cache_->SetOnClickListener(this);\r
+ container_->Add(cache_);\r
+\r
+ reset_ = new UILabelButton();\r
+ reset_->SetPosition(297, 340, 100, 50); // 297: x, 340: y, 100: width, 50: height\r
+ reset_->SetText("reset");\r
+ reset_->SetOnClickListener(this);\r
+ container_->Add(reset_);\r
+}\r
+\r
+void UITestMap::TearDown()\r
+{\r
+ DeleteChildren(container_);\r
+ container_ = nullptr;\r
+ scale_ = nullptr;\r
+ cache_ = nullptr;\r
+ reset_ = nullptr;\r
+ map_ = nullptr;\r
+}\r
+\r
+const UIView* UITestMap::GetTestView()\r
+{\r
+ return container_;\r
+}\r
+\r
+bool UITestMap::OnClick(UIView& view, const ClickEvent& event)\r
+{\r
+ if (&view == scale_) {\r
+ g_scale -= SCALE_STEP;\r
+ if (g_scale < SCALE_LIMIT) {\r
+ g_scale = SCALE_LIMIT;\r
+ }\r
+ map_->EnableCache(false);\r
+ map_->ScaleMap(g_scale, SCALE_CENTER);\r
+ } else if (&view == cache_) {\r
+ if (!cached_) {\r
+ cache_->SetText("clear cache");\r
+ map_->EnableCache(true);\r
+ cached_ = true;\r
+ } else {\r
+ cache_->SetText("cache");\r
+ map_->EnableCache(false);\r
+ cached_ = false;\r
+ }\r
+ } else if (&view == reset_) {\r
+ g_scale = 1.0;\r
+ map_->EnableCache(false);\r
+ map_->ScaleMap(g_scale, SCALE_CENTER);\r
+ }\r
+ RootView::GetInstance()->Invalidate();\r
+ return true;\r
+}\r
+}\r
--- /dev/null
+/*\r
+ * Copyright (c) 2024 CompanyNameMagicTag.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef UI_TEST_MAP_H\r
+#define UI_TEST_MAP_H\r
+\r
+#include "ui_test.h"\r
+#include "components/ui_label_button.h"\r
+#include "components/ui_map_view.h"\r
+#include "components/ui_scroll_view.h"\r
+\r
+namespace OHOS {\r
+class UITestMap : public UITest, public UIView::OnClickListener {\r
+public:\r
+ UITestMap() {}\r
+ ~UITestMap() override {}\r
+ void SetUp() override;\r
+ void TearDown() override;\r
+ const UIView* GetTestView() override;\r
+ bool OnClick(UIView& view, const ClickEvent& event) override;\r
+\r
+private:\r
+ UIScrollView* container_ = nullptr;\r
+ UILabelButton* scale_ = nullptr;\r
+ UILabelButton* cache_ = nullptr;\r
+ UILabelButton* reset_ = nullptr;\r
+ UIMapView* map_ = nullptr;\r
+ bool cached_ = false;\r
+};\r
+}\r
+#endif\r
namespace OHOS {\r
static constexpr int16_t VIDEO_WIDTH = 454;\r
static constexpr int16_t VIDEO_HEIGHT = 454;\r
-static constexpr int16_t STRIDE_ALIGNMENT_VALUE = 64;\r
+static constexpr int16_t STRIDE_ALIGNMENT_VALUE = 128;\r
static constexpr int16_t BUFFER_QUEUE_SIZE = 3;\r
static constexpr int16_t JPEG_HEIGHT_DIVISOR = 2;\r
static constexpr int16_t JPEG_WIDTH_BYTE_ALIGNMENT = 128;\r
\r
#ifdef SUPPORT_AT_OHOSFWK
static MediaVideoPlay *g_videoPlay = nullptr;\r
-static bool g_lastPlayed_ = false;\r
+static bool g_lastPlayed = false;\r
static void ScreenStatusNotify(ScreenStatus status)\r
{
if (g_videoPlay == nullptr) {\r
if (status == SCREEN_STATUS_OFF && g_videoPlay->isPlayed_) {\r
g_videoPlay->PauseVideoPlay();\r
} else if (status == SCREEN_STATUS_ON) {
- if (g_lastPlayed_ && g_videoPlay->isPause_) {\r
+ if (g_lastPlayed && g_videoPlay->isPause_) {\r
g_videoPlay->ResumeVideoPlay();\r
}
}\r
- g_lastPlayed_ = temp;\r
+ g_lastPlayed = temp;\r
}
#endif
\r
static void GetTime(char* buf, int len)\r
{\r
struct timeval tv;\r
- gettimeofday(&tv, NULL);\r
- uint32_t second = tv.tv_sec % TIME_CONVERT;\r
- uint32_t minute = tv.tv_sec / TIME_CONVERT;\r
- uint32_t hour = (minute / TIME_CONVERT) % 24; // 24: 24 hours per day\r
- uint32_t realMilliSecond = tv.tv_usec / USEC_TO_MILLI;\r
+ gettimeofday(&tv, nullptr);\r
+ int32_t second = tv.tv_sec % TIME_CONVERT;\r
+ int32_t minute = tv.tv_sec / TIME_CONVERT;\r
+ int32_t hour = (minute / TIME_CONVERT) % 24; // 24: 24 hours per day\r
+ int32_t realMilliSecond = tv.tv_usec / USEC_TO_MILLI;\r
minute = minute % TIME_CONVERT;\r
\r
sprintf_s(buf, len, "%02d : %02d : %02d : %03d", hour, minute, second, realMilliSecond);\r
namespace {
const uint16_t TESTCASE_BUTTON_HEIGHT = 100;
const uint16_t STYLE_BORDER_WIDTH_VALUE = 4;
+const uint16_t BACK_BUTTON_SIZE = 50;
} // namespace
uint16_t TestCaseListAdapter::GetCount()
rootView->Add(tempView);
if (backBtn_ == nullptr) {
backBtn_ = new TransparentBackButton();
- backBtn_->SetPosition(0, 202, 50, 50); // 0: x position, 202: y position, 50: width and height
+ backBtn_->SetPosition(0, (Screen::GetInstance().GetHeight() - BACK_BUTTON_SIZE) / 2, // 2, half size
+ BACK_BUTTON_SIZE, BACK_BUTTON_SIZE);
}
backBtn_->SetViewId(view.GetViewId());
rootView->Add(backBtn_);
#include "ui_test_sweepclock/ui_test_sweepclock.h"
#include "ui_test_text_fps/ui_test_text_fps.h"
#include "ui_test_tiger/ui_test_tiger.h"
+#include "ui_test_hexagons_list/ui_test_hexagons_list.h"
#include "ui_test_list_fps/ui_test_list_fps.h"
#include "ui_test_card_switch/ui_test_card_switch.h"
#include "ui_test_message/ui_test_message.h"
#include "ui_test_breath/ui_test_breath.h"
#include "ui_test_cube_rotate/ui_test_cube_rotate.h"
#include "ui_test_cross/ui_test_cross.h"
+#include "ui_test_map/ui_test_map.h"
+#include "ui_test_coverflow/ui_test_coverflow.h"
+#include "ui_test_kaleidoscope/ui_test_kaleidoscope.h"
namespace OHOS {
void UITestGroup::AddTestCase(TestCaseInfo testCaseInfo)
}
testCaseList_->Clear();
testCaseList_->PushBack(TestCaseInfo{"老虎头", new UITestTiger()});
+#ifndef QSPI_DISPLAY
+ testCaseList_->PushBack(TestCaseInfo{"蜂窝表盘", new UITestHexagonsList()});
+#endif
testCaseList_->PushBack(TestCaseInfo{"滑动列表", new UITestListFPS()});
testCaseList_->PushBack(TestCaseInfo{"扫秒", new UITestSweepClock()});
testCaseList_->PushBack(TestCaseInfo{"指南针", new UITestCompass()});
testCaseList_->PushBack(TestCaseInfo{"卡片切换", new UITestCardSwitch()});
testCaseList_->PushBack(TestCaseInfo{"消息", new UITestMessage()});
testCaseList_->PushBack(TestCaseInfo{"呼吸效果", new UITestBreath()});
-#if !defined(_WIN32) && !defined(QSPI_DISPLAY)
+#ifndef QSPI_DISPLAY
+ testCaseList_->PushBack(TestCaseInfo{"地图", new UITestMap()});
+#if !defined(_WIN32)
testCaseList_->PushBack(TestCaseInfo{"视频播放", new UITestVideoPlay()});
#endif
-#if !defined(QSPI_DISPLAY)
testCaseList_->PushBack(TestCaseInfo{"翻转动效", new UITestCross()});
+#if !defined(_WIN32)
+ testCaseList_->PushBack(TestCaseInfo{"万花筒", new UITestKaleidoscope()});
+#endif
+ testCaseList_->PushBack(TestCaseInfo{"覆盖流", new UITestCoverflow()});
#endif
#if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH
testCaseList_->PushBack(TestCaseInfo{"倒计时", new UITestCountdown()});
#include "common/input_device_manager.h"
#include "common/task_manager.h"
#include "gfx_utils/graphic_log.h"
+#include "dock/pointer_input_device.h"
namespace OHOS {
InputDeviceManager* InputDeviceManager::GetInstance()
{
deviceList_.Clear();
}
+
+void InputDeviceManager::ClearPressableViews()
+{
+ ListNode<InputDevice*>* node = deviceList_.Begin();
+ while (node != deviceList_.End()) {
+ PointerInputDevice* device = dynamic_cast<PointerInputDevice*>(node->data_);
+ if (device != nullptr) {
+ device->ClearPressableViews();
+ }
+ node = node->next_;
+ }
+}
} // namespace OHOS
\ No newline at end of file
#if ENABLE_MAP_BUFFER
if ((curView->GetViewType() != UI_IMAGE_VIEW) && (curView->GetViewType() != UI_TEXTURE_MAPPER) &&
(curView->GetViewType() != UI_CANVAS_EXT) && (curView->GetViewType() != UI_MENU_ITEM) &&
- !curView->IsTransInvalid() && !enableAnimator) {
+ (curView->GetViewType() != UI_MAP_VIEW) && !curView->IsTransInvalid() && !enableAnimator) {
origRect = curView->GetOrigRect();
relativeRect = curView->GetRelativeRect();
curView->GetTransformMap().SetInvalid(true);
{
Point yStart = yAxis_.GetStartPoint();
yStart.y = enableReverse_ ? (yStart.y + gradientBottom_) : (yStart.y - gradientBottom_);
- int16_t topY = enableReverse_ ? data->GetValleyData() : data->GetPeakData();
- int16_t bottomY = enableReverse_ ? data->GetPeakData() : data->GetValleyData();
+ int16_t topY = data->GetPeakData();
yAxis_.TranslateToPixel(topY);
- yAxis_.TranslateToPixel(bottomY);
- int16_t startY = enableReverse_ ? topY : yStart.y;
- int16_t endY = enableReverse_ ? yStart.y : topY;
- if ((invalidatedArea.GetBottom() < endY) || (invalidatedArea.GetTop() > startY)) {
+
+ int16_t startY = enableReverse_ ? yStart.y : topY;
+ int16_t endY = enableReverse_ ? topY : yStart.y;
+ if ((invalidatedArea.GetBottom() < startY) || (invalidatedArea.GetTop() > endY)) {
return;
}
ColorType color = data->GetFillColor();
int16_t opaScaleTop = enableReverse_ ? (topY - yStart.y - 1) : (yStart.y - topY - 1);
- if ((opaScaleTop < 0) || (opaScaleTop >= invalidatedArea.GetHeight())) {
+ if (opaScaleTop < 0) {
return;
}
VGUColorStop stops[2] = {{0, Color::ColorTo32(Color::GetColorFromRGBA(
uint16_t timeOfUpdate)
{
ClearImagesCache();
+ if ((imageSrc_ != nullptr) && (imageNum_ != 0)) {
+ ImageAnimatorInfo* imageAnimatorInfo = &(imageSrc_[0]);
+ if (imageAnimatorInfo->imageType == IMG_SRC_IMAGE_INFO) {
+ SetSrc(static_cast<ImageInfo*>(nullptr));
+ }
+ }
imageSrc_ = const_cast<ImageAnimatorInfo*>(imageAnimatorInfoSrc);
imageNum_ = imageNum;
timeOfUpdate_ = timeOfUpdate;
if (integerStep != 0) {
offsetX_ -= integerStep;
} else {
- return;
+ offsetX_ -= 1; // At lest move one pixel
+ decimal_ = 0;
}
offsetX_ = ((offsetX_ - labelX_) % (textX_ + labelX_)) + labelX_;
static_cast<UILabel*>(view)->offsetX_ = offsetX_;
qrcodeVal_ = nullptr;
}
dataBin_.clear();
- for (int i = 0; i < length; i++) {
+ for (uint32_t i = 0; i < length; i++) {
dataBin_.push_back(val[i]);
}
}
{
#if !ENABLE_MAP_BUFFER
UIViewType type = GetViewType();
- if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT)) {
+ if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW) &&
+ (type != UI_MENU_ITEM)) {
GRAPHIC_LOGE("Rotate is not supported for view type %d if ENABLE_MAP_BUFFER is 0", type);
return;
}
{
#if !ENABLE_MAP_BUFFER
UIViewType type = GetViewType();
- if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT)) {
+ if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW) &&
+ (type != UI_MENU_ITEM)) {
GRAPHIC_LOGE("Rotate is not supported for view type %d if ENABLE_MAP_BUFFER is 0", type);
return;
}
transMap_->Rotate(angle, pivotStart, pivotEnd);
if (firstTrans) {
joinRect = transMap_->GetBoxRect();
+ joinRect.Join(joinRect, GetOrigRect());
} else {
joinRect.Join(joinRect, transMap_->GetBoxRect());
}
- joinRect.Join(joinRect, GetOrigRect());
InvalidateRect(joinRect);
}
{
#if !ENABLE_MAP_BUFFER
UIViewType type = GetViewType();
- if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT)) {
+ if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW) &&
+ (type != UI_MENU_ITEM)) {
GRAPHIC_LOGE("Scale is not supported for view type %d if ENABLE_MAP_BUFFER is 0", type);
return;
}
{
#if !ENABLE_MAP_BUFFER
UIViewType type = GetViewType();
- if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT)) {
+ if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW) &&
+ (type != UI_MENU_ITEM)) {
GRAPHIC_LOGE("Scale is not supported for view type %d if ENABLE_MAP_BUFFER is 0", type);
return;
}
transMap_->Scale(scale, pivot);
if (firstTrans) {
joinRect = transMap_->GetBoxRect();
+ joinRect.Join(joinRect, GetOrigRect());
} else {
joinRect.Join(joinRect, transMap_->GetBoxRect());
}
- joinRect.Join(joinRect, GetOrigRect());
InvalidateRect(joinRect);
}
{
#if !ENABLE_MAP_BUFFER
UIViewType type = GetViewType();
- if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT)) {
+ if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW) &&
+ (type != UI_MENU_ITEM)) {
GRAPHIC_LOGE("Shear is not supported for view type %d if ENABLE_MAP_BUFFER is 0", type);
return;
}
transMap_->Shear(shearX, shearY, shearZ);
if (firstTrans) {
joinRect = transMap_->GetBoxRect();
+ joinRect.Join(joinRect, GetOrigRect());
} else {
joinRect.Join(joinRect, transMap_->GetBoxRect());
}
- joinRect.Join(joinRect, GetOrigRect());
InvalidateRect(joinRect);
}
{
#if !ENABLE_MAP_BUFFER
UIViewType type = GetViewType();
- if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT)) {
+ if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW) &&
+ (type != UI_MENU_ITEM)) {
GRAPHIC_LOGE("Translate is not supported for view type %d if ENABLE_MAP_BUFFER is 0", type);
return;
}
{
#if !ENABLE_MAP_BUFFER
UIViewType type = GetViewType();
- if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT)) {
+ if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW) &&
+ (type != UI_MENU_ITEM)) {
GRAPHIC_LOGE("Translate is not supported for view type %d if ENABLE_MAP_BUFFER is 0", type);
return;
}
transMap_->Translate(trans);
if (firstTrans) {
joinRect = transMap_->GetBoxRect();
+ joinRect.Join(joinRect, GetOrigRect());
} else {
joinRect.Join(joinRect, transMap_->GetBoxRect());
}
- joinRect.Join(joinRect, GetOrigRect());
InvalidateRect(joinRect);
}
{
#if !ENABLE_MAP_BUFFER
UIViewType type = GetViewType();
- if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT)) {
+ if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW) &&
+ (type != UI_MENU_ITEM)) {
GRAPHIC_LOGE("SetTransformMap is not supported for view type %d if ENABLE_MAP_BUFFER is 0", type);
return;
}
rect_.SetPosition(tempX, tempY);
return true;
}
+
+bool UIView::IsVideoContained()
+{
+ if (GetViewType() == UI_LITE_SURFACE_VIEW) {
+ return true;
+ }
+ UIViewGroup* group = dynamic_cast<UIViewGroup*>(this);
+ if (group == nullptr) {
+ return false;
+ }
+
+ UIView* view = group->GetChildrenHead();
+ while (view != nullptr) {
+ if (view->IsVideoContained()) {
+ return true;
+ }
+ view = view->GetNextSibling();
+ }
+ return false;
+}
} // namespace OHOS
{}
virtual ~PointerInputDevice() {}
+ void ClearPressableViews()
+ {
+ dragLen_ = { 0, 0 };
+ dragStep_ = { 0, 0 };
+ draggableView_ = nullptr;
+ touchableView_ = nullptr;
+ }
+
protected:
void DispatchEvent(const DeviceData& data) override;
*/
void Clear();
+ /**
+ * Clear pressable views recorded in the pointer input device
+ */
+ void ClearPressableViews();
+
void Callback() override;
/**
bool needScreencap_ = false;
#endif
bool isSnapshot_ = false;
- UIView* blurView_;
+ UIView* blurView_ = nullptr;
UIViewGroup sysView_;
UIViewGroup appView_;
};
bool DragXInner(int16_t distance) override;
bool DragYInner(int16_t distance) override;
bool MoveOffset(int16_t offsetX, int16_t offsetY);
+ void CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDistanceY) override;
private:
void Drag(const DragEvent& event);
- void CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDistanceY) override;
void RefreshScrollBar();
OnScrollListener* scrollListener_;
#if ENABLE_VIBRATOR
UI_CARD_PAGE,
UI_CROSS_VIEW,
UI_BARCODE,
+ UI_MAP_VIEW,
+ UI_KALEIDOSCOPE_VIEW,
UI_NUMBER_MAX
};
* to apply blur effect to the background.
*/
void HandleGaussianBlur(BufferInfo& gfxDstBuffer);
+
+ /**
+ * @brief Check whether this view is lite surface view or it contains lite surface view
+ */
+ bool IsVideoContained();
+
protected:
bool touchable_ : 1;
bool visible_ : 1;
bool Rect::Intersect(const Rect& rect1, const Rect& rect2)
{
+ if (!rect1.IsValid() || !rect2.IsValid()) {
+ return false;
+ }
/* Get the smaller area from 'rect1' and 'rect2' */
left_ = MATH_MAX(rect1.left_, rect2.left_);
top_ = MATH_MAX(rect1.top_, rect2.top_);
#endif
}
+float Acos(float value)
+{
+#if defined(ENABLE_CMATH) && ENABLE_CMATH
+ return acos(value);
+#else
+ float result, l, r;
+ l = 0;
+ r = UI_PI;
+ result = (l + r) / 2;
+ while (MATH_ABS(Sin(QUARTER_IN_DEGREE - result * RADIAN_TO_ANGLE) - value) > UI_FLT_EPSILON) {
+ if (Sin(QUARTER_IN_DEGREE - result * RADIAN_TO_ANGLE) - value > UI_FLT_EPSILON) {
+ l = result;
+ } else {
+ r = result;
+ }
+ result = (l + r) / 2;
+ }
+ return result;
+#endif
+}
+
/* arctan(x) = x - p3 * x^3 + p5 * x^5 - p7 * x^7 */
uint16_t FastAtan2(int16_t x, int16_t y)
{
* @brief use map buffer to support view transformation. if disable it to save memory,
* transformation will not be supported except UIImageView, UITextureMapper and UICanvasExt.
*/
-#define ENABLE_MAP_BUFFER 1
+#define ENABLE_MAP_BUFFER 0
#elif defined _LITEOS
/**
* @brief Font shaping, which is disabled by default on LiteOS.
static constexpr int16_t ORDER_MATRIX_4 = 4;
float Sin(float angle);
+float Acos(float value);
uint16_t FastAtan2(int16_t x, int16_t y);
float Sqrt(float x);
*/
Matrix4<T> Inverse() const;
+ /**
+ * @brief Obtains a rotation matrix.
+ *
+ * @param cosA Indicates the cosine of the angle to rotate.
+ * @param sinA Indicates the sine of the angle to rotate.
+ * @param pivot1 Indicates the rotation pivot.
+ * @param pivot2 Indicates the rotation pivot.
+ * @return Returns the matrix after rotation.
+ * @since 5.0
+ * @version 3.0
+ */
+ static Matrix4<T> Rotate(T cosA, T sinA, const Vector3<T>& pivot1, const Vector3<T>& pivot2);
+
/**
* @brief Obtains a rotation matrix.
*
}
template<typename T>
-Matrix4<T> Matrix4<T>::Rotate(T angle, const Vector3<T>& pivot1, const Vector3<T>& pivot2)
+Matrix4<T> Matrix4<T>::Rotate(T cosA, T sinA, const Vector3<T>& pivot1, const Vector3<T>& pivot2)
{
Matrix4<T> rotateMat4;
T* rData = rotateMat4.data_;
if (length == 0) {
return rotateMat4;
}
- T cosA = static_cast<T>(Sin(angle + QUARTER_IN_DEGREE));
- T sinA = static_cast<T>(Sin(angle));
+
T diff = 1 - cosA;
T ux = (pivot2.x_ - pivot1.x_) / length; // 0
T uy = (pivot2.y_ - pivot1.y_) / length; // 0
T uz = (pivot2.z_ - pivot1.z_) / length; // 1
+
Matrix4<T> transToOrigin = Matrix4<T>::Translate(Vector3<T> { -pivot1.x_, -pivot1.y_, -pivot1.z_ });
rData[0] = ux * ux * diff + cosA; // 0 : index // cosA
return transToPivot * (rotateMat4 * transToOrigin);
}
+template<typename T>
+Matrix4<T> Matrix4<T>::Rotate(T angle, const Vector3<T>& pivot1, const Vector3<T>& pivot2)
+{
+ T cosA = static_cast<T>(Sin(angle + QUARTER_IN_DEGREE));
+ T sinA = static_cast<T>(Sin(angle));
+ return Matrix4<T>::Rotate(cosA, sinA, pivot1, pivot2);
+}
+
template<typename T>
Matrix4<T> Matrix4<T>::Scale(const Vector3<T>& scale, const Vector3<T>& fixed)
{
inline bool FloatEqual(float lhs, float rhs, float precision = 0.00001f)
{
- return (MATH_ABS(lhs - rhs) < precision) ? true : false;
+ return MATH_ABS(lhs - rhs) < precision;
+}
+
+inline bool FloatMore(float lhs, float rhs, float precision = 0.00001f)
+{
+ return lhs - rhs > precision;
+}
+
+inline bool FloatLess(float lhs, float rhs, float precision = 0.00001f)
+{
+ return lhs - rhs < -precision;
+}
+
+inline bool FloatMoreEqual(float lhs, float rhs, float precision = 0.00001f)
+{
+ return lhs - rhs > -precision;
+}
+
+inline bool FloatLessEqual(float lhs, float rhs, float precision = 0.00001f)
+{
+ return lhs - rhs < precision;
}
bool IsIdentity(Matrix3<float>& matrix);
#define LOG_MODULE_NAME "AudioManager"
namespace Audio {
-AudioManager::AudioManager()
+AudioManager::AudioManager() noexcept
: impl_(nullptr)
{
}
\r
static void ResumeInterruptStream(const InterruptElement *interruptEl, List *list, bool isOutPut)\r
{\r
- for (ListIterator it = ListIterBegin(list); it != ListIterEnd(list);) {\r
+ for (ListIterator it = ListIterBegin(list); it != ListIterEnd(list); it = ListIterNext(list, it)) {\r
InterruptElement *curInterruptEl = (InterruptElement *)ListIterData(it);\r
if (curInterruptEl != NULL && curInterruptEl->isInterrupted &&\r
curInterruptEl->interruptedStreamType == interruptEl->streamType) {\r
curInterruptEl->delayedStreamType = AUDIO_STREAM_INVALID;\r
}\r
}\r
- it = ListIterNext(list, it);\r
}\r
}\r
\r
for (int i = 0; i < CONCURRENT_ACTIVE_STREAM_MAX_NUM; i++) {
if (g_streamMgrContext.simpleInfos[i].active) {
uintptr_t handle = g_streamMgrContext.simpleInfos[i].streamHandle;
- if (GetState(handle) == RUNNING) {
+ if (GetState(handle) == RUNNING && GetStreamType(handle) != AUDIO_STREAM_A2DP_MUSIC) {
CHK_FAILED_RETURN(PauseTrack(handle), AUDIO_SUCCESS, AUDIO_ERROR, "pause failed");
}
}
}
int32_t ret = SetTrackVolume(streamHandle, g_streamMgrContext.typeVolume[typeHashId],
mixWeightSet, NOT_SET_STREAM_VOLUME);
- CHK_FAILED_RETURN(ret, AUDIO_SUCCESS, AUDIO_ERROR, "update stream volume fail when new stream create");
+ // 解决多线程竞争,概率出现老流未启动设置混音失败,此时新流也会失败退出,
+ // 老流会在启动的时候设置音量,此处设置失败不应该直接向上返回错误,
+ // 后续要考虑下老流设置音箱的时机,此处是不是只记录音量信息即可
+ if (ret == AUDIO_BAD_STATE) {
+ ALOGW("current state is not right!");
+ return AUDIO_SUCCESS;
+ }
+ if (ret != AUDIO_SUCCESS) {
+ ALOGW("update stream volume fail when new stream create: %d", ret);
+ return AUDIO_ERROR;
+ }
}
}
return AUDIO_SUCCESS;
AudioStreamStrategy *strategy =
GetStrategyFromPolicyManager(&streamInfForDestroy, (uint32_t)streamId, STREAM_OUT_DESTROY);
CHK_NULL_RETURN(strategy, AUDIO_ERROR, "get strategy fail when destroy out stream");
+#ifdef SUPPORT_SET_DSP_CLOCK_FREQ
+ AudioStreamType streamType = GetStreamType(handle);
+ AudioDeviceType deviceType = (AudioDeviceType)GetStreamDeviceId(handle);
+#endif
// hal 销毁
if (DestroyTrackHandle(handle) != AUDIO_SUCCESS) {
return AUDIO_ERROR;
MediaMutexLock(g_mutex);
DeleteOneStream(streamId, true);
#ifdef SUPPORT_SET_DSP_CLOCK_FREQ
- AudioStreamType streamType = GetStreamType(handle);
if (IsAllStreamDestroyed(streamType)) {\r
- SetHifiClockFreqByStreamTypeAndDeviceType(streamType, (AudioDeviceType)GetStreamDeviceId(handle), false);\r
+ SetHifiClockFreqByStreamTypeAndDeviceType(streamType, deviceType, false);\r
}
#endif
if (UpdateTrackMixWeightWhenDestroy(strategy) != AUDIO_SUCCESS) {
{
MediaMutexLock(g_mutex);
int32_t streamId = GetSourceStreamId(handle);
+#ifdef SUPPORT_SET_DSP_CLOCK_FREQ
+ AudioStreamType streamType = GetSourceStreamType(handle);
+ AudioDeviceType deviceType = (AudioDeviceType)GetSourceDeviceId(handle);
+#endif
if (DestroySourceHandle(handle) != AUDIO_SUCCESS) {
MediaMutexUnLock(g_mutex);
return AUDIO_ERROR;
}
DeleteOneStream(streamId, false);
#ifdef SUPPORT_SET_DSP_CLOCK_FREQ
- AudioStreamType streamType = GetSourceStreamType(handle);
if (IsAllStreamDestroyed(streamType)) {\r
- SetHifiClockFreqByStreamTypeAndDeviceType(streamType, (AudioDeviceType)GetSourceDeviceId(handle), false);\r
+ SetHifiClockFreqByStreamTypeAndDeviceType(streamType, deviceType, false);\r
}
#endif
MediaMutexUnLock(g_mutex);
return AUDIO_ERROR;
}
context->render = NULL;
+#ifdef SUPPORT_SET_DSP_CLOCK_FREQ
+ SetHifiClockFreqByStreamTypeAndDeviceType(context->streamInfo.streamType, (AudioDeviceType)validFwDevice, false);
+#endif
return AUDIO_SUCCESS;
}
if (context->state == IDLE) {
context->userAudioOutDevice = (uint32_t)deviceId;
} else if (context->state == RUNNING) {
+ (void)context->callback(context->caller, AUDIO_EVENT_OUTPUT_DEVICE_CHANGED, NULL);
if (ChangeRouteInner(context, deviceId) != AUDIO_SUCCESS) {
goto ERR;
}
static int32_t ResumeTrack(TrackHandleContext *context)
{
bool needChangeRoute = (context->routeChangedDevice != UNKNOWN);
-
+ int32_t ret = UpdateMixWeigthWhenResume(context);
+ CHK_FAILED_RETURN_NO_LOG(ret, AUDIO_SUCCESS, ret);
if (!needChangeRoute) {
- int32_t ret = UpdateMixWeigthWhenResume(context);
- CHK_FAILED_RETURN_NO_LOG(ret, AUDIO_SUCCESS, ret);
if (context->render->control.Resume((AudioHandle)context->render) != AUDIO_SUCCESS) {
return AUDIO_ERROR;
}
AUDIO_EVENT_RENDER_FULL, /**< The render buffer is full. */\r
AUDIO_EVENT_RENDER_EOS, /**< Render to the end of the stream. */\r
AUDIO_EVENT_BUFFER_EMPTY, /**< The underlying buffer data is empty. */\r
+ AUDIO_EVENT_OUTPUT_DEVICE_CHANGED, /**< The output device has been changed. */\r
AUDIO_EVENT_ERROR_OCCUR, /**< An error occurs. */\r
} AudioCallbackEventType;\r
\r
int32_t DumpInfo(AudioManagerDebugInfo &audioManagerInfo);\r
\r
private:\r
- AudioManager();\r
+ AudioManager() noexcept;\r
class AudioManagerImpl;\r
AudioManagerImpl *impl_;\r
};\r
EVNET_ON_JPEG_FRAME_RENDED,
EVNET_FRAME_CONTINUE_LOST,
EVNET_FIRST_AUDIO_REND,
+ EVNET_OUTPUT_DEVICE_CHANGED,
EVNET_BUTT
} EventCbType;
} else if (event == EVNET_AUDIO_BUFFER_EMPTY) {\r
EventCallback(PLAYERCONTROL_BUFFER_EMPTY, nullptr);\r
return HI_SUCCESS;\r
+ } else if (event == EVNET_OUTPUT_DEVICE_CHANGED) {\r
+ PlayerControl *player = static_cast<PlayerControl *>(priv);\r
+ player->RecordLastPosition();\r
+ return HI_SUCCESS;\r
}\r
\r
PalayControlEventItem item;\r
return HI_SUCCESS;\r
}\r
\r
+void PlayerControl::RecordLastPosition()\r
+{\r
+ sinkManager_->RecordLastPosition();\r
+}\r
+\r
// util bigein\r
void PlayerControl::EventCallback(PlayerControlEvent event, const void *data) const\r
{\r
void ClearCachePacket(void);
void NotifyError(PlayerControlError playerError) const;
void EventCallback(PlayerControlEvent event, const void *data) const;
+ void RecordLastPosition();
private:
int32_t InitAttr(const PlayerControlParam &createParam);
bool IsPlayEos(void) const;
rendStartTime_(-1),
lastRendPts_(AV_INVALID_PTS),
#ifdef MINI_MEMORY_SUPPORT
- lastRenderPtsWhenPause_(0),
+ lastRenderPosition_(0),
hasSendEosFrame_(false),
#endif
lastRendSysTimeMs_(-1),
{
lastRendFrameCnt_ = 0;
#ifdef MINI_MEMORY_SUPPORT
- lastRenderPtsWhenPause_ = 0;
+ lastRenderPosition_ = 0;
#endif
lastRendPts_ = AV_INVALID_PTS;
rendStartTime_ = AV_INVALID_PTS;
CHECK_FAILED_RETURN(outStream_->Pause(), 0, -1, "pause() fail");
}
paused_ = true;
-#ifdef MINI_MEMORY_SUPPORT
- lastRenderPtsWhenPause_ = lastRendPts_;
-#endif
+ RecordLastPosition();
return SINK_SUCCESS;
}
position = posNs / NANOS_PER_MILLISECOND;
#ifdef MINI_MEMORY_SUPPORT
- position += lastRenderPtsWhenPause_;
+ position += lastRenderPosition_;
#endif
}
return outStream_->SetOutputDevice(deviceId, renderConfig);
}
+void AudioSink::RecordLastPosition()
+{
+#ifdef MINI_MEMORY_SUPPORT
+ lastRenderPosition_ = lastRendPts_;
+#endif
+}
+
int32_t AudioSink::SetParam(std::string &key, const DataType type, const void *value, int32_t len) const
{
(void)type;
void GetRenderPosition(int64_t &position) const;
bool IsOffloadSupported(const AudioOffloadParam &offloadInfo) const;
int32_t SetOutputDevice(const int32_t deviceId) const;
+ void RecordLastPosition();
private:
void ResetRendStartTime();
void SendAudioEndOfStream();
int64_t rendStartTime_;
int64_t lastRendPts_;
#ifdef MINI_MEMORY_SUPPORT
- int64_t lastRenderPtsWhenPause_;
+ int64_t lastRenderPosition_;
bool hasSendEosFrame_;
#endif
int64_t lastRendSysTimeMs_;
}
return -1;
}
+
+void SinkManager::RecordLastPosition()
+{
+ if (audioSinkInfo_[0].sink != nullptr) {
+ audioSinkInfo_[0].sink->RecordLastPosition();
+ }
+}
}
}
void GetRenderPosition(int64_t &position) const;
bool IsOffloadSupported(const AudioOffloadParam &offloadInfo) const;
int32_t SetOutputDevice(const int32_t deviceId) const;
+ void RecordLastPosition();
private:
float speed_;
float leftVolume_;
bool needStop;
AudioInterrupt interrupt;
MediaThreadIdHandle audioCaptureProcess;
+ MediaMutexHandle mutex;
} TestSample;
struct SampleAudioCapturerInfo {
static TestSample g_sample;
static std::shared_ptr<CaptureInterruptListener> g_captureInterruptListener;
+static void AudioCaptureStop()
+{
+ MediaMutexLock(g_sample.mutex);
+ if (!g_audioCap->Stop()) {
+ MEDIA_ERR_LOG("Stop failed");
+ }
+ if (!g_audioCap->Release()) {
+ MEDIA_ERR_LOG("Release failed");
+ }
+
+ delete g_audioSourceProcessInput.buffer;
+ g_audioSourceProcessInput.buffer = nullptr;
+
+ if (g_amInstance.DeactivateAudioInterrupt(g_sample.interrupt) != 0) {
+ MEDIA_ERR_LOG("deactivate audio interrupt failed");
+ }
+ g_audioCap.reset();
+ g_audioCap = nullptr;
+ g_audioSourceProcessInput.bThreadRun = false;
+ MediaMutexUnLock(g_sample.mutex);
+ (void)MediaMutexDestroy(&g_sample.mutex);
+}
+
static void* AudioCaptureProcess(void* arg)
{
FILE *pfd = (FILE *)arg;
MEDIA_INFO_LOG("audioCap Read readCnt = %d, size = %d", readCnt, ret);
}
fclose(pfd);
-
- if (!g_audioCap->Stop()) {
- MEDIA_ERR_LOG("Stop failed");
- }
- if (!g_audioCap->Release()) {
- MEDIA_ERR_LOG("Release failed");
- }
-
- delete g_audioSourceProcessInput.buffer;
- g_audioSourceProcessInput.buffer = nullptr;
-
- if (g_amInstance.DeactivateAudioInterrupt(g_sample.interrupt) != 0) {
- MEDIA_ERR_LOG("deactivate audio interrupt failed");
- }
- g_audioCap.reset();
- g_audioSourceProcessInput.bThreadRun = false;
+ AudioCaptureStop();
MEDIA_INFO_LOG("AudioCaptureProcess end");
return NULL;
}
}
MEDIA_INFO_LOG("unmute cmd out");
} else if ((strncmp(g_sample.control, "dumpinfo", strlen("dumpinfo")) == 0)) {
+ MediaMutexLock(g_sample.mutex);
if (g_audioCap != nullptr && g_audioCap.get() != nullptr) {
AudioCapturerDebugInfo info;
g_audioCap->DumpInfo(info);
}
+ MediaMutexUnLock(g_sample.mutex);
} else {
MEDIA_ERR_LOG("[AudioCaptureSample]control cmd not supported:%s do nothing", g_sample.control);
return 0;
std::string filePath = "";
g_sample.needStop = false;
g_interruptHintStop = false;
+ g_sample.mutex = MediaMutexCreate(nullptr);
+ if (g_sample.mutex == nullptr) {
+ MEDIA_ERR_LOG("create mutex failed");
+ g_audioSourceProcessInput.bThreadRun = false;
+ return -1;
+ }
SampleAudioCapturerInfo audioCapturerInfo = {};
AudioSession sessionId = AUDIO_SESSION_ID_NONE;
FILE *pfd = nullptr;
const static int32_t WAIT_SURFACE_INIT_SUCCESS_US = 100000;
const static int32_t WAIT_START_CAPTURE_SUCCESS_US = 100000;
const static int32_t WAIT_SURFACE_DEINIT_SUCCESS_US = 100000;
-const static int16_t SURFACE_BYTE_ALIGNMENT = 64;
+const static int16_t SURFACE_BYTE_ALIGNMENT = 128;
const static int16_t JPEG_WIDTH_BYTE_ALIGNMENT = 128;
const static int16_t JPEG_HEIGHT_BYTE_ALIGNMENT = 16;
const static int16_t JPEG_HEIGHT_DIVISOR = 2;
{\r
(void)videoPlay->player_.reset();\r
videoPlay->isExited_ = true;\r
+ videoPlay->isEntered_ = false;\r
(void)MediaThreadCondDestroy(&videoPlay->cond_);\r
(void)MediaMutexDestroy(&videoPlay->mutex_);\r
}\r
\r
static void VideoStopAndExit(MediaVideoPlay *videoPlay)\r
{\r
+ MediaMutexLock(videoPlay->mutex_);\r
int32_t ret = videoPlay->player_->Stop();\r
if (ret != 0) {\r
MEDIA_ERR_LOG("stop failed");\r
if (ret != 0) {\r
MEDIA_ERR_LOG("reset failed");\r
}\r
- MediaMutexLock(videoPlay->mutex_);\r
videoPlay->isPlaybackCompleted_ = false;\r
videoPlay->isPlayed_ = false;\r
videoPlay->isPause_ = false;\r
\r
int32_t MediaVideoPlay::StartVideoPlay(void)\r
{\r
+ if (isEntered_) {\r
+ MEDIA_INFO_LOG("video play is not stop, can not start!");\r
+ return MEDIA_OK;\r
+ }\r
isExited_ = false;\r
isEntered_ = true;\r
MediaThreadattr attr = { "VideoPlayThread", 0x2000, THREAD_SCHED_INVALID, 0, true };\r
+ if (isSyncExitMode_) {\r
+ attr.detached = false;\r
+ }\r
threadHandle_ = MediaThreadCreate(VideoPlayThread, this, &attr);\r
if (threadHandle_ == NULL) {\r
MEDIA_ERR_LOG("create thread failed\n");\r
int32_t MediaVideoPlay::StopVideoPlay(void)\r
{\r
MediaMutexLock(mutex_);\r
- if (isPlaybackStopped_ || isPlaybackCompleted_ || interruptHintStop_) {\r
- MEDIA_ERR_LOG("video play already stopped");\r
+ if (!isPlayed_) {\r
+ MEDIA_INFO_LOG("video play is not start,can not stop!");\r
+ isPlaybackStopped_ = true;\r
MediaMutexUnLock(mutex_);\r
return MEDIA_OK;\r
}\r
-\r
+ if (isPlaybackStopped_ || isPlaybackCompleted_ || interruptHintStop_) {\r
+ if (isLoop_) {\r
+ if (!isPlaybackCompleted_) {\r
+ MEDIA_ERR_LOG("video play already stopped");\r
+ MediaMutexUnLock(mutex_);\r
+ return MEDIA_OK;\r
+ }\r
+ } else {\r
+ MEDIA_ERR_LOG("video play already stopped");\r
+ MediaMutexUnLock(mutex_);\r
+ return MEDIA_OK;\r
+ }\r
+ }\r
isPlaybackStopped_ = true;\r
MediaThreadCondSignal(cond_);\r
- play = nullptr;\r
MediaMutexUnLock(mutex_);\r
+ if (isSyncExitMode_) {\r
+ MediaThreadJoin(&threadHandle_);\r
+ }\r
+ play = nullptr;\r
return MEDIA_OK;\r
}\r
\r
MediaMutexUnLock(mutex_);\r
}\r
\r
+void MediaVideoPlay::SetSyncExitMode(bool isSyncExitMode)\r
+{\r
+ MediaMutexLock(mutex_);\r
+ if (!isEntered_) {\r
+ isSyncExitMode_ = isSyncExitMode;\r
+ }\r
+ MediaMutexUnLock(mutex_);\r
+}\r
+\r
void MediaVideoPlay::DestroyVideoPlaySource(void)\r
{\r
if (!isEntered_) {\r
int32_t ResumeVideoPlay(void);\r
int32_t GetDumpInfo(PlayerDebugInfo *playerInfo);\r
void SetVideoPlayLoop(bool isLoop);\r
+ void SetSyncExitMode(bool isSyncExitMode);\r
bool IsExitCompletely(void);\r
Surface *surface_ = nullptr;\r
AudioInterrupt interrupt_;\r
bool isPureVideo_ = false;\r
static MediaVideoPlay *play;\r
private:\r
+ bool isSyncExitMode_ = false;\r
static void *VideoPlayThread(void *arg);\r
void DestroyVideoPlaySource(void);\r
};\r
const static int32_t WAIT_SURFACE_INIT_SUCCESS_US = 100000;
const static int32_t WAIT_PLAYER_SUCCESS_US = 1000000;
const static int32_t WAIT_SURFACE_DEINIT_SUCCESS_US = 100000;
-const static int16_t SURFACE_BYTE_ALIGNMENT = 64;
+const static int16_t SURFACE_BYTE_ALIGNMENT = 128;
const static int16_t JPEG_WIDTH_BYTE_ALIGNMENT = 128;
const static int16_t JPEG_HEIGHT_BYTE_ALIGNMENT = 16;
const static int16_t JPEG_HEIGHT_DIVISOR = 2;
#include "diag_log.h"
#endif
+#if defined CFG_DRIVERS_NANDFLASH
+#include "nandflash_config.h"
+#endif
+
#if MCU_ONLY
static cpu_utils_reboot_cb g_reboot_mcu_cb = NULL;
#endif
g_reboot_mcu_cb(src);
return true;
}
+#endif
+#ifdef CFG_DRIVERS_NANDFLASH
+ nand_driver_init(SPEED_SLOW);
+ set_trans_type(TRANS_BY_CPU_SINGLE_LINE);
#endif
reset_deal_with_fs();
cpu_utils_reset_chip_with_log(src, (reboot_cause_t)reboot_reason);
}
} else {
#if (SLAVE_BY_LIBRA_BT || SLAVE_BY_LIBRA_GNSS || SLAVE_BY_SOCMN1_ONLY || SLAVE_BY_BS25_ONLY || \
- SLAVE_BY_WS53_ONLY || CHIP_WS63)
+ SLAVE_BY_WS53_ONLY || CHIP_WS63 || CHIP_BRANDY)
g_trigger_tx = true;
#endif
g_missed_messages++;
#endif
}
-static void log_watch_dog_disable(void)
+static void log_watch_dog_reconfigure(void)
{
watchdog_turnon_clk();
uapi_watchdog_disable();
- watchdog_turnoff_clk();
+ /* DUMPÁ÷³ÌºÄʱ¹ý´ó£¬ÐèÒªÖØÐÂÅäÖù·³¬Ê±Ê±¼ä */
+ uapi_watchdog_set_time(CHIP_WDT_TIMEOUT_256S);
+ uapi_watchdog_enable(WDT_MODE_INTERRUPT);
}
void log_oml_memory_dump(void)
{
#if (USE_COMPRESS_LOG_INSTEAD_OF_SDT_LOG == NO)
- log_watch_dog_disable();
+ log_watch_dog_reconfigure();
#if CORE == BT
/* BT core has just one block of ram */
uapi_tcxo_delay_ms(DUMP_DELAY);
#ifdef SUPPORT_IPC
#include "ipc.h"
#endif
-
+#include "exception.h"
#include "uart.h"
#include "watchdog.h"
#include "log_uart_porting.h"
uint32_t wdg_left_time;
uapi_watchdog_get_left_time(&wdg_left_time);
- if (wdg_left_time < LOG_MIN_WATCHDOG_LEFT_TIME) {
+ if (wdg_left_time < LOG_MIN_WATCHDOG_LEFT_TIME && get_exception_status() != true) {
uapi_watchdog_kick();
}
}
add_subdirectory_with_alias_if_exist(base/global/resmgr_lite ${PROJECT_BINARY_DIR}/ohos/resmgr)
add_subdirectory_with_alias_if_exist(utils/native/lite/file ${PROJECT_BINARY_DIR}/ohos/file)
add_subdirectory_with_alias_if_exist(utils/native/lite/kv_store ${PROJECT_BINARY_DIR}/ohos/kv_store)
+add_subdirectory_with_alias_if_exist(utils/native/lite/js/builtin ${PROJECT_BINARY_DIR}/ohos/storage_jsi)
add_subdirectory_with_alias_if_exist(hiviewdfx/hiview/lite ${PROJECT_BINARY_DIR}/ohos/hiview)
add_subdirectory_with_alias_if_exist(hiviewdfx/hievent/lite ${PROJECT_BINARY_DIR}/ohos/hievent)
add_subdirectory_with_alias_if_exist(hiviewdfx/hilog/lite/frameworks/mini ${PROJECT_BINARY_DIR}/ohos/hilog)
${CMAKE_CURRENT_SOURCE_DIR}/interfaces/base
${CMAKE_CURRENT_SOURCE_DIR}/interfaces/jsi
${CMAKE_CURRENT_SOURCE_DIR}/
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/base
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/context
+)
+
+set(PRIVATE_HEADER
+ ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/base
${CMAKE_CURRENT_SOURCE_DIR}/animation
${CMAKE_CURRENT_SOURCE_DIR}/base
${CMAKE_CURRENT_SOURCE_DIR}/base/cache
${CMAKE_CURRENT_SOURCE_DIR}/router
${CMAKE_CURRENT_SOURCE_DIR}/stylemgr
${CMAKE_CURRENT_SOURCE_DIR}/targets
-)
-
-set(PRIVATE_HEADER
- ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/base
${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include
${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include/service
${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits
-
${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/components
${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/animator
${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/innerkits
${ROOT_DIR}/application/wearable/ohos_deps
${ROOT_DIR}/open_source/openharmony/third_party/cJSON
${ROOT_DIR}/open_source/openharmony/third_party/qrcodegen/cpp
+ ${ROOT_DIR}/open_source/openharmony/base/global/i18n_lite/frameworks/i18n/include
+ ${ROOT_DIR}/open_source/openharmony/base/global/i18n_lite/interfaces/kits/i18n/include
+ ${ROOT_DIR}/open_source/openharmony/base/global/resmgr_lite/frameworks/resmgr_lite/include
+ ${ROOT_DIR}/open_source/openharmony/base/global/resmgr_lite/interfaces/innerkits/include
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-core
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-core/api
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-core/ext
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-core/include
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-core/ecma/base
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-core/jmem
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-core/jrt
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-core/lit
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-ext/include
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-ext/include/jerryscript-ext
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-port/default/include
+ ${ROOT_DIR}/open_source/openharmony/third_party/jerryscript/jerry-libm/include
+
)
if("JS_ENABLE" IN_LIST DEFINES)
${CMAKE_CURRENT_SOURCE_DIR}/interfaces/base
${CMAKE_CURRENT_SOURCE_DIR}/interfaces/jsi
${CMAKE_CURRENT_SOURCE_DIR}/
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/base
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/context
+)
+
+set(PRIVATE_HEADER
+ ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/base
${CMAKE_CURRENT_SOURCE_DIR}/animation
${CMAKE_CURRENT_SOURCE_DIR}/base
${CMAKE_CURRENT_SOURCE_DIR}/base/cache
${CMAKE_CURRENT_SOURCE_DIR}/router
${CMAKE_CURRENT_SOURCE_DIR}/stylemgr
${CMAKE_CURRENT_SOURCE_DIR}/targets
-)
-
-set(PRIVATE_HEADER
- ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/base
+ ${ROOT_DIR}/application/wearable/service/msg_center/include/vendor_app
${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include
${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include/service
${ROOT_DIR}/application/wearable/ohos_deps
${ROOT_DIR}/open_source/openharmony/third_party/cJSON
${ROOT_DIR}/open_source/openharmony/third_party/qrcodegen/cpp
+ ${ROOT_DIR}/open_source/openharmony/base/global/i18n_lite/frameworks/i18n/include
+ ${ROOT_DIR}/open_source/openharmony/base/global/i18n_lite/interfaces/kits/i18n/include
+ ${ROOT_DIR}/open_source/openharmony/base/global/resmgr_lite/frameworks/resmgr_lite/include
+ ${ROOT_DIR}/open_source/openharmony/base/global/resmgr_lite/interfaces/innerkits/include
)
if("JS_ENABLE" IN_LIST DEFINES)
${CMAKE_CURRENT_SOURCE_DIR}/components/tab_content_component.cpp
${CMAKE_CURRENT_SOURCE_DIR}/components/tabs_component.cpp
${CMAKE_CURRENT_SOURCE_DIR}/components/text_component.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/components/baidu_map_component.cpp
${CMAKE_CURRENT_SOURCE_DIR}/modules/app_module.cpp
${CMAKE_CURRENT_SOURCE_DIR}/modules/dfx_module.cpp
${CMAKE_CURRENT_SOURCE_DIR}/modules/module_manager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/modules/locale_module.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/presets/app_data_module.cpp
${CMAKE_CURRENT_SOURCE_DIR}/modules/presets/cjson_parser.cpp
${CMAKE_CURRENT_SOURCE_DIR}/modules/presets/console_log_impl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/modules/presets/console_module.cpp
install_sdk_by_sh("${CMAKE_CURRENT_SOURCE_DIR}/include" "*")
build_component()
+
+set(COMPONENT_NAME "baidumapcomponent")
+set(MODULE_NAME "ohos")
+set(AUTO_DEF_FILE_ID TRUE)
+
+set(PUBLIC_HEADER
+ ${CMAKE_CURRENT_SOURCE_DIR}/interfaces
+ ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/async
+ ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/base
+ ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/jsi
+ ${CMAKE_CURRENT_SOURCE_DIR}/
+ ${CMAKE_CURRENT_SOURCE_DIR}/animation
+ ${CMAKE_CURRENT_SOURCE_DIR}/base
+ ${CMAKE_CURRENT_SOURCE_DIR}/base/cache
+ ${CMAKE_CURRENT_SOURCE_DIR}/components
+ ${CMAKE_CURRENT_SOURCE_DIR}/context
+ ${CMAKE_CURRENT_SOURCE_DIR}/directive
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/base
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/context
+ ${CMAKE_CURRENT_SOURCE_DIR}/jsi
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/presets
+ ${CMAKE_CURRENT_SOURCE_DIR}/router
+ ${CMAKE_CURRENT_SOURCE_DIR}/stylemgr
+ ${CMAKE_CURRENT_SOURCE_DIR}/targets
+ ${ROOT_DIR}/application/wearable/service/msg_center/include/vendor_app
+)
+
+set(PRIVATE_HEADER
+ ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/base
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include/service
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/components
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/animator
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/innerkits
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits/gfx_utils
+ ${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/layout
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits/common
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/font
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/dfx
+ ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
+ ${ROOT_DIR}/application/wearable/ohos_deps
+ ${ROOT_DIR}/open_source/openharmony/third_party/cJSON
+ ${ROOT_DIR}/open_source/openharmony/third_party/qrcodegen/cpp
+ ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent
+)
+
+set(SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/baidumapcomponent/baidumap.cpp
+)
+
+set(COMPONENT_PUBLIC_CCFLAGS
+)
+
+set(COMPONENT_CCFLAGS
+ -std=c++11
+ -Wno-error
+ -Wno-unused-parameter
+ -fno-exceptions
+ -fno-unwind-tables
+ -fno-asynchronous-unwind-tables
+ -Wno-undef
+ -Wno-bitwise-op-parentheses
+ -Wno-shift-op-parentheses
+ -nostdlibinc
+ -nostdinc
+ -nostdlib
+ -Wno-c++11-narrowing
+ -Wno-error=unused-function
+)
+
+set(WHOLE_LINK
+ true
+)
+
+set(MAIN_COMPONENT
+ false
+)
+
+set(PUBLIC_DEFINES
+ FEATURE_MODULE_BAIDU
+ FEATURE_COMPONENT_BAIDUMAP
+)
+
+set(PRIVATE_DEFINES
+)
+
+install_sdk_by_sh("${CMAKE_CURRENT_SOURCE_DIR}/interfaces" "*")
+install_sdk_by_sh("${CMAKE_CURRENT_SOURCE_DIR}/include" "*")
+
+build_component()
+
+set(COMPONENT_NAME "brightness")
+set(MODULE_NAME "ohos")
+set(AUTO_DEF_FILE_ID TRUE)
+
+set(PUBLIC_HEADER
+)
+
+set(PRIVATE_HEADER
+ ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/base
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include/service
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/components
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/animator
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/innerkits
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits/gfx_utils
+ ${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/layout
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits/common
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/font
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/dfx
+ ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
+ ${ROOT_DIR}/open_source/openharmony/third_party/cJSON
+ ${ROOT_DIR}/open_source/openharmony/third_party/qrcodegen/cpp
+ ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/modules/display
+)
+
+set(SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/display/display.cpp
+)
+
+set(COMPONENT_PUBLIC_CCFLAGS
+)
+
+set(COMPONENT_CCFLAGS
+ -std=c++11
+ -Wno-error
+ -Wno-unused-parameter
+ -fno-exceptions
+ -fno-unwind-tables
+ -fno-asynchronous-unwind-tables
+ -Wno-undef
+ -Wno-bitwise-op-parentheses
+ -Wno-shift-op-parentheses
+ -nostdlibinc
+ -nostdinc
+ -nostdlib
+ -Wno-c++11-narrowing
+ -Wno-error=unused-function
+)
+
+set(WHOLE_LINK
+ true
+)
+
+set(MAIN_COMPONENT
+ false
+)
+
+set(PUBLIC_DEFINES
+ FEATURE_MODULE_BRIGHTNESS
+)
+
+set(PRIVATE_DEFINES
+)
+
+install_sdk_by_sh("${CMAKE_CURRENT_SOURCE_DIR}/interfaces" "*")
+install_sdk_by_sh("${CMAKE_CURRENT_SOURCE_DIR}/include" "*")
+
+build_component()
/*
- * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2020-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* limitations under the License.
*/
-// AUTO GENERATED, PLEASE DO NOT EDIT DIRECTLY
+#ifndef OHOS_ACELITE_FRAMEWORK_MIN_BC_H
+#define OHOS_ACELITE_FRAMEWORK_MIN_BC_H
+// AUTO GENERATED, PLEASE DO NOT EDIT DIRECTLY
#include <stdint.h>
#ifndef ACELITE_FRAMEWORK_RAW_BUFFER
#define OHOS_ACELITE_FRAMEWORK_MIN_SNAPSHOT_BUFFER
const uint8_t g_frameworkBCBuffer[] =
{
- 0x4a, 0x52, 0x52, 0x59, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0a, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x01, 0x00, 0x03, 0x00,
- 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x28, 0x00, 0x30, 0x28,
- 0x01, 0xc3, 0x4f, 0x08, 0x46, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x21, 0x00, 0x03, 0x02,
+ 0x4a, 0x52, 0x52, 0x59, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x0a, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x41, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x33, 0x2c,
+ 0x01, 0xd4, 0x5d, 0x08, 0x53, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x41, 0x00, 0x03, 0x02,
0x02, 0x06, 0x0c, 0x0c, 0x07, 0x00, 0x00, 0x00, 0xa7, 0x00, 0x00, 0x00, 0x27, 0x01, 0x00, 0x00,
0xa7, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x87, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
- 0x47, 0x03, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, 0x47, 0x04, 0x00, 0x00, 0x28, 0x06, 0x56, 0x02,
- 0x60, 0x21, 0x07, 0x28, 0x07, 0x56, 0x03, 0x63, 0x11, 0x0a, 0x2b, 0x03, 0x08, 0x01, 0xb7, 0xc9,
- 0x01, 0x21, 0x28, 0x09, 0x56, 0x04, 0x60, 0x21, 0x05, 0x36, 0x04, 0x0a, 0x11, 0x08, 0x29, 0x04,
- 0x01, 0xbd, 0x01, 0x0f, 0x28, 0x00, 0x1d, 0x04, 0x28, 0x05, 0xcc, 0x00, 0x28, 0x01, 0xb7, 0xd2,
- 0x0b, 0x04, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00,
+ 0x47, 0x03, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, 0x47, 0x04, 0x00, 0x00, 0x2c, 0x06, 0x64, 0x02,
+ 0x6e, 0x21, 0x07, 0x2c, 0x07, 0x64, 0x03, 0x71, 0x11, 0x0a, 0x2f, 0x03, 0x08, 0x01, 0xc8, 0xda,
+ 0x01, 0x21, 0x2c, 0x09, 0x64, 0x04, 0x6e, 0x21, 0x05, 0x39, 0x04, 0x0a, 0x11, 0x08, 0x2d, 0x04,
+ 0x01, 0xce, 0x01, 0x0f, 0x2c, 0x00, 0x1d, 0x04, 0x2c, 0x05, 0xdd, 0x00, 0x2c, 0x01, 0xc8, 0xe3,
+ 0x0b, 0x04, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00,
0x00, 0x09, 0x27, 0x3b, 0x07, 0x05, 0x00, 0x00, 0x47, 0x05, 0x00, 0x00, 0x87, 0x05, 0x00, 0x00,
0xc7, 0x05, 0x00, 0x00, 0x07, 0x06, 0x00, 0x00, 0x47, 0x06, 0x00, 0x00, 0x87, 0x06, 0x00, 0x00,
0xc7, 0x06, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x87, 0x07, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00,
0xe7, 0x10, 0x00, 0x00, 0x87, 0x11, 0x00, 0x00, 0x07, 0x12, 0x00, 0x00, 0x87, 0x12, 0x00, 0x00,
0xe7, 0x12, 0x00, 0x00, 0x47, 0x13, 0x00, 0x00, 0xc7, 0x13, 0x00, 0x00, 0x47, 0x14, 0x00, 0x00,
0xe7, 0x14, 0x00, 0x00, 0x87, 0x15, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x47, 0x16, 0x00, 0x00,
- 0x88, 0x01, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x00, 0xc8, 0x01, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00,
- 0x10, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x08, 0x05, 0x00, 0x00,
- 0x48, 0x05, 0x00, 0x00, 0xa0, 0x05, 0x00, 0x00, 0xe0, 0x05, 0x00, 0x00, 0x10, 0x06, 0x00, 0x00,
- 0x48, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x50, 0x07, 0x00, 0x00,
- 0x70, 0x07, 0x00, 0x00, 0x98, 0x07, 0x00, 0x00, 0xb0, 0x07, 0x00, 0x00, 0xa8, 0x09, 0x00, 0x00,
- 0x41, 0x04, 0x43, 0x05, 0x07, 0x2c, 0x2d, 0x39, 0x14, 0x1c, 0x18, 0x09, 0x48, 0x27, 0x0a, 0x48,
- 0x28, 0x0b, 0x48, 0x29, 0x0c, 0xcb, 0x00, 0xce, 0x2a, 0x01, 0xce, 0x2b, 0x02, 0x36, 0x05, 0x0d,
- 0x28, 0x2e, 0xd1, 0x0e, 0x36, 0x05, 0x0d, 0x28, 0x2f, 0xd1, 0x0f, 0x36, 0x05, 0x0d, 0x28, 0x30,
- 0xd1, 0x10, 0x36, 0x05, 0x0d, 0x28, 0x31, 0xd1, 0x11, 0x2b, 0x06, 0x12, 0x32, 0xc8, 0x2b, 0x06,
- 0x13, 0x33, 0xc8, 0x36, 0x06, 0x0d, 0x28, 0x34, 0xd1, 0x14, 0x36, 0x06, 0x0d, 0x28, 0x35, 0xd1,
- 0x15, 0x36, 0x06, 0x0d, 0x28, 0x36, 0xd1, 0x16, 0x36, 0x06, 0x0d, 0x28, 0x37, 0xd1, 0x17, 0x14,
- 0x48, 0x0a, 0x18, 0x48, 0x0b, 0x19, 0x48, 0x1b, 0x1a, 0x48, 0x1d, 0x1c, 0x48, 0x1f, 0x1e, 0x48,
- 0x21, 0x20, 0x48, 0x23, 0x22, 0xcb, 0x04, 0x3b, 0x08, 0x24, 0x28, 0x04, 0xc0, 0x3a, 0x25, 0x28,
- 0x38, 0xc0, 0xcb, 0x03, 0x36, 0x07, 0x0d, 0x28, 0x3a, 0xd1, 0x26, 0x47, 0x07, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x01, 0x00, 0x29, 0x00, 0x04, 0x01, 0x01, 0x01, 0x03, 0x03, 0x87, 0x07, 0x00, 0x00,
- 0x07, 0x08, 0x00, 0x00, 0x37, 0x01, 0x3a, 0x02, 0x28, 0x00, 0xbf, 0x46, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x01, 0x00, 0x29, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x02, 0x87, 0x07, 0x00, 0x00,
- 0x67, 0x08, 0x00, 0x00, 0x37, 0x00, 0x3a, 0x01, 0xba, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x05, 0x00, 0x01, 0x00, 0x29, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x87, 0x07, 0x00, 0x00,
- 0xc7, 0x16, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x37, 0x00, 0x37, 0x00, 0x35, 0x01, 0x8b, 0x02,
- 0x34, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x29, 0x00, 0x02, 0x01,
- 0x01, 0x01, 0x02, 0x02, 0x07, 0x02, 0x00, 0x00, 0x28, 0x01, 0x56, 0x00, 0x60, 0x21, 0x05, 0x2f,
- 0x6a, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x29, 0x00, 0x07, 0x03,
- 0x03, 0x04, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0x47, 0x17, 0x00, 0x00, 0x47, 0x18, 0x00, 0x00,
- 0x07, 0x19, 0x00, 0x00, 0x3b, 0x03, 0x04, 0x29, 0x00, 0x01, 0x14, 0x32, 0x00, 0x4f, 0x18, 0x05,
- 0x48, 0x02, 0x06, 0xb3, 0x03, 0x46, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x29, 0x00, 0x03, 0x04,
- 0x04, 0x04, 0x0a, 0x0a, 0x87, 0x19, 0x00, 0x00, 0xe7, 0x19, 0x00, 0x00, 0x87, 0x1a, 0x00, 0x00,
- 0xe7, 0x1a, 0x00, 0x00, 0x67, 0x1b, 0x00, 0x00, 0xe7, 0x09, 0x00, 0x00, 0x28, 0x00, 0xd4, 0x04,
- 0x28, 0x01, 0xd4, 0x05, 0x28, 0x02, 0xd4, 0x06, 0x28, 0x03, 0xd4, 0x07, 0x3c, 0x09, 0xba, 0xd4,
- 0x08, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x01,
- 0x01, 0x05, 0x0a, 0x0c, 0x47, 0x05, 0x00, 0x00, 0x87, 0x05, 0x00, 0x00, 0x27, 0x1c, 0x00, 0x00,
- 0x07, 0x07, 0x00, 0x00, 0xa7, 0x1c, 0x00, 0x00, 0x67, 0x1d, 0x00, 0x00, 0xe7, 0x1d, 0x00, 0x00,
- 0x87, 0x15, 0x00, 0x00, 0x87, 0x1e, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
- 0x42, 0x01, 0x00, 0x31, 0x4f, 0xd4, 0x05, 0x2b, 0x02, 0x01, 0x06, 0x30, 0xb0, 0x03, 0x3b, 0x03,
- 0x07, 0x28, 0x01, 0xc0, 0x21, 0x06, 0x29, 0x0a, 0x01, 0xbd, 0x04, 0x3b, 0x04, 0x08, 0x28, 0x01,
- 0xc0, 0x3a, 0x09, 0x28, 0x0b, 0xbf, 0x46, 0x00, 0x05, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x01,
- 0x01, 0x03, 0x04, 0x05, 0x07, 0x05, 0x00, 0x00, 0xc7, 0x05, 0x00, 0x00, 0x87, 0x1e, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x42, 0x01, 0x00, 0x3b, 0x02, 0x03, 0x28, 0x04, 0xbf, 0x46, 0x00, 0x00,
- 0x07, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x01, 0x01, 0x05, 0x05, 0x06, 0x47, 0x06, 0x00, 0x00,
- 0x47, 0x05, 0x00, 0x00, 0x07, 0x05, 0x00, 0x00, 0x87, 0x05, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
- 0x41, 0x01, 0x42, 0x02, 0x00, 0x36, 0x03, 0x02, 0xcb, 0x01, 0x2b, 0x04, 0x03, 0x02, 0x28, 0x05,
- 0xb0, 0x03, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x19, 0x00, 0x05, 0x00,
- 0x00, 0x0a, 0x16, 0x16, 0x87, 0x05, 0x00, 0x00, 0xc7, 0x05, 0x00, 0x00, 0xc7, 0x06, 0x00, 0x00,
- 0x27, 0x1c, 0x00, 0x00, 0x27, 0x1f, 0x00, 0x00, 0x47, 0x06, 0x00, 0x00, 0x07, 0x06, 0x00, 0x00,
- 0x47, 0x05, 0x00, 0x00, 0x87, 0x06, 0x00, 0x00, 0x07, 0x05, 0x00, 0x00, 0x27, 0x09, 0x00, 0x00,
- 0xe7, 0x1f, 0x00, 0x00, 0x67, 0x20, 0x00, 0x00, 0xc7, 0x20, 0x00, 0x00, 0x87, 0x0f, 0x00, 0x00,
- 0x47, 0x10, 0x00, 0x00, 0x47, 0x13, 0x00, 0x00, 0xc7, 0x16, 0x00, 0x00, 0x87, 0x1e, 0x00, 0x00,
- 0x67, 0x0c, 0x00, 0x00, 0x67, 0x1d, 0x00, 0x00, 0xa7, 0x0e, 0x00, 0x00, 0x41, 0x02, 0x36, 0x03,
- 0x0a, 0x35, 0x0b, 0x3a, 0x0c, 0x28, 0x04, 0xc0, 0xcb, 0x01, 0x3b, 0x05, 0x0d, 0x2a, 0x01, 0xc5,
- 0x36, 0x06, 0x0e, 0x67, 0x07, 0x1d, 0x07, 0x36, 0x06, 0x0f, 0x67, 0x07, 0x11, 0x07, 0xcf, 0x01,
- 0x00, 0x01, 0x11, 0x36, 0x06, 0x10, 0x67, 0x07, 0x21, 0x0a, 0x3b, 0x01, 0x0b, 0x32, 0x01, 0xc0,
- 0xcc, 0x00, 0x04, 0x28, 0x00, 0x21, 0x0e, 0x36, 0x00, 0x11, 0x21, 0x09, 0x3b, 0x00, 0x12, 0x36,
- 0x08, 0x13, 0xc0, 0x04, 0x36, 0x09, 0x14, 0xcb, 0x02, 0x28, 0x02, 0x21, 0x06, 0x3b, 0x02, 0x15,
- 0xba, 0x04, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x29, 0x00, 0x04, 0x01,
- 0x01, 0x02, 0x02, 0x03, 0x47, 0x05, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x2b, 0x02, 0x01, 0x00,
- 0x36, 0x01, 0x00, 0xb1, 0x03, 0x45, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x09, 0x00, 0x07, 0x03,
- 0x03, 0x07, 0x0c, 0x0e, 0x07, 0x06, 0x00, 0x00, 0x87, 0x05, 0x00, 0x00, 0x47, 0x06, 0x00, 0x00,
- 0x07, 0x07, 0x00, 0x00, 0x67, 0x1d, 0x00, 0x00, 0x47, 0x17, 0x00, 0x00, 0x47, 0x18, 0x00, 0x00,
- 0x47, 0x21, 0x00, 0x00, 0xa7, 0x21, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
- 0x41, 0x03, 0x42, 0x04, 0x01, 0x42, 0x05, 0x02, 0x36, 0x00, 0x07, 0xcb, 0x03, 0x3b, 0x06, 0x08,
- 0x29, 0x00, 0x04, 0x14, 0x31, 0x4f, 0x18, 0x09, 0x48, 0x0c, 0x0a, 0x48, 0x0d, 0x0b, 0xb3, 0x03,
- 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x29, 0x00, 0x05, 0x00,
- 0x02, 0x07, 0x0c, 0x0c, 0x07, 0x05, 0x00, 0x00, 0x07, 0x06, 0x00, 0x00, 0x87, 0x05, 0x00, 0x00,
- 0x87, 0x06, 0x00, 0x00, 0x47, 0x06, 0x00, 0x00, 0xc7, 0x08, 0x00, 0x00, 0xc7, 0x0a, 0x00, 0x00,
- 0x67, 0x0c, 0x00, 0x00, 0xa7, 0x0c, 0x00, 0x00, 0xe7, 0x0d, 0x00, 0x00, 0x3b, 0x02, 0x07, 0xba,
- 0xd7, 0x00, 0x28, 0x00, 0x21, 0x09, 0x3b, 0x00, 0x08, 0x29, 0x03, 0x04, 0xc6, 0x04, 0x3b, 0x05,
- 0x09, 0x28, 0x06, 0xc0, 0xd7, 0x01, 0x3b, 0x05, 0x0a, 0x28, 0x01, 0xc0, 0x21, 0x09, 0x3b, 0x01,
- 0x0b, 0x29, 0x03, 0x04, 0xc6, 0x04, 0x47, 0x06, 0x05, 0x00, 0x01, 0x00, 0x29, 0x00, 0x04, 0x01,
- 0x01, 0x04, 0x05, 0x05, 0x47, 0x06, 0x00, 0x00, 0x07, 0x06, 0x00, 0x00, 0x87, 0x05, 0x00, 0x00,
- 0x67, 0x0d, 0x00, 0x00, 0xce, 0x00, 0x01, 0x3b, 0x02, 0x04, 0x28, 0x03, 0xbf, 0x46, 0x00, 0x00,
- 0x08, 0x00, 0x01, 0x00, 0x29, 0x00, 0x06, 0x00, 0x00, 0x01, 0x06, 0x06, 0x07, 0x05, 0x00, 0x00,
- 0x07, 0x08, 0x00, 0x00, 0xe7, 0x19, 0x00, 0x00, 0x67, 0x20, 0x00, 0x00, 0x87, 0x19, 0x00, 0x00,
- 0x67, 0x08, 0x00, 0x00, 0x00, 0x15, 0x10, 0x3b, 0x00, 0x01, 0x30, 0xbf, 0x37, 0x02, 0x3a, 0x03,
- 0x37, 0x04, 0xc0, 0x45, 0x00, 0x1d, 0x08, 0x3b, 0x00, 0x05, 0xb9, 0x10, 0x46, 0x00, 0x00, 0x00,
- 0x0b, 0x00, 0x01, 0x00, 0x29, 0x00, 0x07, 0x00, 0x04, 0x05, 0x0b, 0x0b, 0x47, 0x05, 0x00, 0x00,
- 0x67, 0x1b, 0x00, 0x00, 0xe7, 0x09, 0x00, 0x00, 0x87, 0x19, 0x00, 0x00, 0xe7, 0x1a, 0x00, 0x00,
- 0x87, 0x1a, 0x00, 0x00, 0x67, 0x20, 0x00, 0x00, 0x37, 0x05, 0xd7, 0x00, 0x3c, 0x06, 0xba, 0xd7,
- 0x01, 0x37, 0x07, 0xd7, 0x02, 0x37, 0x08, 0xd7, 0x03, 0x6b, 0x01, 0x00, 0x1d, 0x06, 0x29, 0x04,
- 0x01, 0xbd, 0x21, 0x12, 0x37, 0x09, 0x3a, 0x0a, 0x2b, 0x02, 0x01, 0x00, 0x28, 0x03, 0xb3, 0x04,
- 0x28, 0x01, 0xd5, 0x05, 0x04, 0x46, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x29, 0x00, 0x05, 0x02,
- 0x03, 0x03, 0x07, 0x07, 0xe7, 0x0c, 0x00, 0x00, 0x47, 0x03, 0x00, 0x00, 0x07, 0x22, 0x00, 0x00,
- 0x07, 0x08, 0x00, 0x00, 0x3b, 0x00, 0x03, 0x28, 0x01, 0x30, 0xc6, 0xd7, 0x02, 0x28, 0x04, 0x56,
- 0x02, 0x60, 0x21, 0x11, 0x37, 0x05, 0x1d, 0x05, 0x1c, 0xd5, 0x05, 0x04, 0x37, 0x05, 0x3a, 0x06,
- 0x28, 0x02, 0xc0, 0x04, 0x46, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x29, 0x00, 0x03, 0x00,
- 0x01, 0x01, 0x04, 0x04, 0x07, 0x22, 0x00, 0x00, 0x67, 0x08, 0x00, 0x00, 0xc7, 0x16, 0x00, 0x00,
- 0x37, 0x01, 0xd7, 0x00, 0x28, 0x00, 0x11, 0x0e, 0x01, 0x07, 0x3b, 0x00, 0x02, 0xba, 0xb6, 0x36,
- 0x00, 0x03, 0x0d, 0x08, 0x46, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x00, 0x29, 0x00, 0x02, 0x01,
- 0x01, 0x03, 0x04, 0x04, 0x47, 0x05, 0x00, 0x00, 0x87, 0x06, 0x00, 0x00, 0x67, 0x1d, 0x00, 0x00,
- 0x28, 0x00, 0x21, 0x06, 0x29, 0x01, 0x00, 0xbd, 0x11, 0x12, 0x36, 0x00, 0x03, 0x11, 0x07, 0x36,
- 0x00, 0x03, 0x01, 0x06, 0x29, 0x02, 0x00, 0x3f, 0x01, 0x04, 0x28, 0x00, 0x45, 0x00, 0x00, 0x00,
- 0x03, 0x00, 0x01, 0x00, 0x29, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0xa7, 0x1c, 0x00, 0x00,
- 0x28, 0x00, 0x21, 0x05, 0x36, 0x00, 0x01, 0x45, 0x0e, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x02,
- 0x02, 0x04, 0x08, 0x09, 0x87, 0x05, 0x00, 0x00, 0x47, 0x05, 0x00, 0x00, 0xc7, 0x22, 0x00, 0x00,
- 0x67, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
- 0x41, 0x02, 0x42, 0x03, 0x01, 0x31, 0x53, 0x6a, 0x00, 0x21, 0x04, 0x28, 0x03, 0x11, 0x34, 0x37,
- 0x04, 0x1d, 0x05, 0x14, 0xd5, 0x04, 0x04, 0x37, 0x04, 0x35, 0x00, 0x1d, 0x08, 0x37, 0x04, 0x28,
- 0x00, 0x1c, 0xc9, 0x04, 0x37, 0x04, 0x35, 0x00, 0xcb, 0x02, 0x3b, 0x02, 0x05, 0x28, 0x03, 0xc0,
- 0x6d, 0x06, 0x11, 0x0c, 0x3b, 0x02, 0x07, 0x28, 0x03, 0xbf, 0x28, 0x08, 0x01, 0x04, 0x31, 0x53,
- 0x45, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x29, 0x00, 0x07, 0x00,
- 0x00, 0x02, 0x04, 0x04, 0x87, 0x05, 0x00, 0x00, 0x47, 0x05, 0x00, 0x00, 0xc7, 0x13, 0x00, 0x00,
- 0x67, 0x23, 0x00, 0x00, 0x3b, 0x00, 0x02, 0x3b, 0x00, 0x03, 0x28, 0x01, 0xc0, 0x32, 0x00, 0xc5,
- 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x00, 0x29, 0x00, 0x04, 0x01,
- 0x01, 0x01, 0x03, 0x04, 0xc7, 0x22, 0x00, 0x00, 0x87, 0x1e, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
- 0x31, 0x53, 0x6a, 0x00, 0x21, 0x15, 0x37, 0x01, 0x21, 0x11, 0x37, 0x01, 0x35, 0x00, 0x21, 0x0b,
- 0x37, 0x01, 0x35, 0x00, 0x3a, 0x02, 0x28, 0x03, 0xc0, 0x04, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x03, 0x00, 0x01, 0x00, 0x29, 0x00, 0x03, 0x01, 0x01, 0x01, 0x02, 0x02, 0x47, 0x0a, 0x00, 0x00,
- 0x3b, 0x00, 0x01, 0xba, 0x45, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x29, 0x00, 0x02, 0x02,
- 0x02, 0x02, 0x04, 0x04, 0x07, 0x24, 0x00, 0x00, 0xa7, 0x24, 0x00, 0x00, 0x28, 0x00, 0xd4, 0x02,
- 0x28, 0x01, 0xd4, 0x03, 0x46, 0x00, 0x00, 0x00, 0x05, 0x00, 0x01, 0x00, 0x29, 0x00, 0x04, 0x00,
- 0x00, 0x00, 0x03, 0x03, 0x07, 0x24, 0x00, 0x00, 0x67, 0x0d, 0x00, 0x00, 0xa7, 0x24, 0x00, 0x00,
- 0x37, 0x00, 0x21, 0x09, 0x37, 0x00, 0x3a, 0x01, 0x37, 0x02, 0xc0, 0x04, 0x46, 0x00, 0x00, 0x00,
- 0x03, 0x00, 0x01, 0x00, 0x29, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x07, 0x06, 0x00, 0x00,
- 0x36, 0x01, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x09, 0x00, 0x05, 0x01,
- 0x01, 0x05, 0x0c, 0x0d, 0x47, 0x05, 0x00, 0x00, 0x07, 0x05, 0x00, 0x00, 0xc7, 0x06, 0x00, 0x00,
- 0x07, 0x07, 0x00, 0x00, 0x07, 0x25, 0x00, 0x00, 0x67, 0x25, 0x00, 0x00, 0x27, 0x09, 0x00, 0x00,
- 0x87, 0x26, 0x00, 0x00, 0x67, 0x20, 0x00, 0x00, 0x87, 0x15, 0x00, 0x00, 0x87, 0x1e, 0x00, 0x00,
- 0x70, 0x00, 0x00, 0x00, 0x41, 0x01, 0x42, 0x02, 0x00, 0x2a, 0x03, 0x7b, 0x4f, 0x11, 0x07, 0x29,
- 0x03, 0x02, 0x3f, 0x45, 0x30, 0xd5, 0x05, 0xcb, 0x01, 0x29, 0x06, 0x04, 0x35, 0x07, 0x35, 0x08,
- 0x3a, 0x09, 0x28, 0x02, 0xc0, 0x66, 0x21, 0x0d, 0x3b, 0x04, 0x0a, 0x28, 0x02, 0xc0, 0x3a, 0x0b,
- 0x28, 0x0c, 0xc0, 0x04, 0x46, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x29, 0x00, 0x06, 0x01,
- 0x02, 0x05, 0x0b, 0x0c, 0x07, 0x05, 0x00, 0x00, 0x47, 0x05, 0x00, 0x00, 0x27, 0x27, 0x00, 0x00,
- 0x27, 0x28, 0x00, 0x00, 0xa7, 0x28, 0x00, 0x00, 0x47, 0x29, 0x00, 0x00, 0xa7, 0x29, 0x00, 0x00,
- 0x47, 0x03, 0x00, 0x00, 0x67, 0x2a, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x36, 0x02, 0x00, 0xd7,
- 0x01, 0x68, 0x05, 0x00, 0x11, 0x09, 0x2b, 0x03, 0x06, 0x01, 0xc9, 0x01, 0x2a, 0x68, 0x07, 0x00,
- 0x11, 0x09, 0x2b, 0x0b, 0x03, 0x01, 0xc3, 0x01, 0x1e, 0x68, 0x08, 0x00, 0x11, 0x08, 0x29, 0x04,
- 0x01, 0xbd, 0x01, 0x13, 0x28, 0x09, 0x56, 0x01, 0x60, 0x21, 0x0c, 0x2b, 0x03, 0x00, 0x01, 0x3a,
- 0x0a, 0x28, 0x03, 0xc0, 0xc9, 0x04, 0x46, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x09, 0x00, 0x05, 0x02,
- 0x02, 0x06, 0x0b, 0x0c, 0x07, 0x05, 0x00, 0x00, 0x47, 0x05, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00,
- 0x87, 0x06, 0x00, 0x00, 0x47, 0x03, 0x00, 0x00, 0x67, 0x20, 0x00, 0x00, 0x87, 0x15, 0x00, 0x00,
- 0x87, 0x1e, 0x00, 0x00, 0x67, 0x0c, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x42, 0x02, 0x00, 0x42,
- 0x03, 0x01, 0x28, 0x06, 0x56, 0x03, 0x60, 0x21, 0x0b, 0x3b, 0x03, 0x07, 0x29, 0x02, 0x02, 0xc6,
- 0xcc, 0x03, 0x04, 0x3b, 0x04, 0x08, 0x28, 0x03, 0xc0, 0x3a, 0x09, 0x28, 0x0b, 0xbf, 0x3b, 0x05,
- 0x0a, 0x28, 0x03, 0xbf, 0x46, 0x00, 0x00, 0x00, 0x05, 0x00, 0x01, 0x00, 0x29, 0x00, 0x04, 0x01,
+ 0x98, 0x01, 0x00, 0x00, 0xd8, 0x01, 0x00, 0x00, 0x50, 0x04, 0x00, 0x00, 0x68, 0x06, 0x00, 0x00,
+ 0x88, 0x06, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x00, 0xd0, 0x06, 0x00, 0x00, 0xf0, 0x06, 0x00, 0x00,
+ 0x20, 0x07, 0x00, 0x00, 0x60, 0x07, 0x00, 0x00, 0xb8, 0x07, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00,
+ 0x28, 0x08, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x78, 0x08, 0x00, 0x00, 0x18, 0x09, 0x00, 0x00,
+ 0x68, 0x09, 0x00, 0x00, 0x88, 0x09, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x00, 0xc8, 0x09, 0x00, 0x00,
+ 0x46, 0x00, 0x46, 0x01, 0x46, 0x02, 0x4d, 0x27, 0x03, 0x4d, 0x28, 0x04, 0x46, 0x05, 0x46, 0x06,
+ 0x4d, 0x29, 0x07, 0x14, 0x1c, 0x18, 0x09, 0x55, 0x2a, 0x0a, 0x55, 0x2b, 0x0b, 0x55, 0x2c, 0x0c,
+ 0xdc, 0x00, 0x2c, 0x2d, 0xdc, 0x01, 0x2c, 0x2e, 0xdc, 0x02, 0x39, 0x03, 0x0d, 0x2c, 0x2f, 0xe2,
+ 0x0e, 0x39, 0x03, 0x0d, 0x2c, 0x30, 0xe2, 0x0f, 0x39, 0x03, 0x0d, 0x2c, 0x31, 0xe2, 0x10, 0x39,
+ 0x03, 0x0d, 0x2c, 0x32, 0xe2, 0x11, 0x2f, 0x04, 0x12, 0x33, 0xd9, 0x2f, 0x04, 0x13, 0x34, 0xd9,
+ 0x39, 0x04, 0x0d, 0x2c, 0x35, 0xe2, 0x14, 0x39, 0x04, 0x0d, 0x2c, 0x36, 0xe2, 0x15, 0x39, 0x04,
+ 0x0d, 0x2c, 0x37, 0xe2, 0x16, 0x39, 0x04, 0x0d, 0x2c, 0x38, 0xe2, 0x17, 0x14, 0x55, 0x0a, 0x18,
+ 0x55, 0x0b, 0x19, 0x55, 0x1b, 0x1a, 0x55, 0x1d, 0x1c, 0x55, 0x1f, 0x1e, 0x55, 0x21, 0x20, 0x55,
+ 0x23, 0x22, 0xdc, 0x06, 0x3e, 0x08, 0x24, 0x2c, 0x06, 0xd1, 0x3d, 0x25, 0x2c, 0x39, 0xd1, 0xdc,
+ 0x05, 0x39, 0x07, 0x0d, 0x2c, 0x3a, 0xe2, 0x26, 0x54, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x01, 0x00, 0x49, 0x00, 0x03, 0x04, 0x04, 0x04, 0x0a, 0x0a, 0xc7, 0x16, 0x00, 0x00,
+ 0x27, 0x17, 0x00, 0x00, 0xc7, 0x17, 0x00, 0x00, 0x27, 0x18, 0x00, 0x00, 0xa7, 0x18, 0x00, 0x00,
+ 0xe7, 0x09, 0x00, 0x00, 0x2c, 0x00, 0xe5, 0x04, 0x2c, 0x01, 0xe5, 0x05, 0x2c, 0x02, 0xe5, 0x06,
+ 0x2c, 0x03, 0xe5, 0x07, 0x3f, 0x09, 0xcb, 0xe5, 0x08, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x01, 0x01, 0x05, 0x0a, 0x0c, 0x47, 0x05, 0x00, 0x00,
+ 0x87, 0x05, 0x00, 0x00, 0x67, 0x19, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0xe7, 0x19, 0x00, 0x00,
+ 0xa7, 0x1a, 0x00, 0x00, 0x27, 0x1b, 0x00, 0x00, 0x87, 0x15, 0x00, 0x00, 0xc7, 0x1b, 0x00, 0x00,
+ 0x60, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x4d, 0x00, 0x01, 0x34, 0x5d, 0xe5, 0x05, 0x2f,
+ 0x02, 0x01, 0x06, 0x33, 0xc1, 0x03, 0x3e, 0x03, 0x07, 0x2c, 0x01, 0xd1, 0x21, 0x06, 0x2d, 0x0a,
+ 0x01, 0xce, 0x04, 0x3e, 0x04, 0x08, 0x2c, 0x01, 0xd1, 0x3d, 0x09, 0x2c, 0x0b, 0xd0, 0x53, 0x00,
+ 0x05, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x01, 0x01, 0x03, 0x04, 0x05, 0x07, 0x05, 0x00, 0x00,
+ 0x47, 0x06, 0x00, 0x00, 0xc7, 0x1b, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x01, 0x3e,
+ 0x02, 0x03, 0x2c, 0x04, 0xd0, 0x53, 0x00, 0x00, 0x07, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x01,
+ 0x01, 0x05, 0x05, 0x06, 0x47, 0x05, 0x00, 0x00, 0xc7, 0x05, 0x00, 0x00, 0x07, 0x05, 0x00, 0x00,
+ 0x87, 0x05, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x01, 0x46, 0x02, 0x39, 0x03, 0x01,
+ 0xdc, 0x02, 0x2f, 0x04, 0x03, 0x01, 0x2c, 0x05, 0xc1, 0x03, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x16, 0x00, 0x01, 0x00, 0x29, 0x00, 0x05, 0x00, 0x03, 0x0a, 0x16, 0x16, 0x67, 0x1c, 0x00, 0x00,
+ 0x67, 0x19, 0x00, 0x00, 0xc7, 0x05, 0x00, 0x00, 0x87, 0x06, 0x00, 0x00, 0x47, 0x05, 0x00, 0x00,
+ 0x07, 0x06, 0x00, 0x00, 0x07, 0x05, 0x00, 0x00, 0x27, 0x09, 0x00, 0x00, 0x27, 0x1d, 0x00, 0x00,
+ 0xa7, 0x1d, 0x00, 0x00, 0x07, 0x1e, 0x00, 0x00, 0x87, 0x0f, 0x00, 0x00, 0x47, 0x10, 0x00, 0x00,
+ 0x47, 0x13, 0x00, 0x00, 0x87, 0x1e, 0x00, 0x00, 0xc7, 0x1b, 0x00, 0x00, 0x67, 0x0c, 0x00, 0x00,
+ 0xa7, 0x1a, 0x00, 0x00, 0xa7, 0x0e, 0x00, 0x00, 0x39, 0x04, 0x0a, 0x38, 0x0b, 0x3d, 0x0c, 0x2c,
+ 0x03, 0xd1, 0xe8, 0x01, 0x3e, 0x05, 0x0d, 0x2e, 0x01, 0xd6, 0x39, 0x06, 0x0e, 0x75, 0x07, 0x1d,
+ 0x07, 0x39, 0x06, 0x0f, 0x75, 0x07, 0x11, 0x07, 0xe0, 0x01, 0x00, 0x01, 0x11, 0x39, 0x06, 0x10,
+ 0x75, 0x07, 0x21, 0x0a, 0x3e, 0x01, 0x0b, 0x35, 0x01, 0xd1, 0xdd, 0x00, 0x04, 0x2c, 0x00, 0x21,
+ 0x0e, 0x39, 0x00, 0x11, 0x21, 0x09, 0x3e, 0x00, 0x12, 0x39, 0x08, 0x13, 0xd1, 0x04, 0x39, 0x09,
+ 0x14, 0xe8, 0x02, 0x2c, 0x02, 0x21, 0x06, 0x3e, 0x02, 0x15, 0xcb, 0x04, 0x53, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x01, 0x00, 0x49, 0x00, 0x04, 0x01, 0x01, 0x02, 0x02, 0x03, 0x47, 0x05, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x2f, 0x02, 0x01, 0x00, 0x39, 0x01, 0x00, 0xc2, 0x03, 0x52, 0x00, 0x00,
+ 0x0c, 0x00, 0x01, 0x00, 0x09, 0x00, 0x07, 0x03, 0x03, 0x07, 0x0c, 0x0e, 0x87, 0x05, 0x00, 0x00,
+ 0xc7, 0x05, 0x00, 0x00, 0x87, 0x06, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0xa7, 0x1a, 0x00, 0x00,
+ 0x07, 0x1f, 0x00, 0x00, 0x07, 0x20, 0x00, 0x00, 0xc7, 0x20, 0x00, 0x00, 0x27, 0x21, 0x00, 0x00,
+ 0x60, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x4d, 0x01, 0x03, 0x4d, 0x02, 0x04, 0x46, 0x05,
+ 0x39, 0x00, 0x07, 0xdc, 0x05, 0x3e, 0x06, 0x08, 0x2d, 0x00, 0x03, 0x14, 0x34, 0x5d, 0x18, 0x09,
+ 0x55, 0x0c, 0x0a, 0x55, 0x0d, 0x0b, 0xc4, 0x03, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x01, 0x00, 0x49, 0x00, 0x05, 0x00, 0x02, 0x07, 0x0c, 0x0c, 0x07, 0x05, 0x00, 0x00,
+ 0x87, 0x06, 0x00, 0x00, 0x87, 0x05, 0x00, 0x00, 0x07, 0x06, 0x00, 0x00, 0xc7, 0x05, 0x00, 0x00,
+ 0xc7, 0x08, 0x00, 0x00, 0xc7, 0x0a, 0x00, 0x00, 0x67, 0x0c, 0x00, 0x00, 0xa7, 0x0c, 0x00, 0x00,
+ 0xe7, 0x0d, 0x00, 0x00, 0x3e, 0x02, 0x07, 0xcb, 0xe8, 0x00, 0x2c, 0x00, 0x21, 0x09, 0x3e, 0x00,
+ 0x08, 0x2d, 0x03, 0x04, 0xd7, 0x04, 0x3e, 0x05, 0x09, 0x2c, 0x06, 0xd1, 0xe8, 0x01, 0x3e, 0x05,
+ 0x0a, 0x2c, 0x01, 0xd1, 0x21, 0x09, 0x3e, 0x01, 0x0b, 0x2d, 0x03, 0x04, 0xd7, 0x04, 0x54, 0x06,
+ 0x05, 0x00, 0x01, 0x00, 0x49, 0x00, 0x04, 0x01, 0x01, 0x04, 0x05, 0x05, 0xc7, 0x05, 0x00, 0x00,
+ 0x87, 0x06, 0x00, 0x00, 0x87, 0x05, 0x00, 0x00, 0x67, 0x0d, 0x00, 0x00, 0xdf, 0x00, 0x01, 0x3e,
+ 0x02, 0x04, 0x2c, 0x03, 0xd0, 0x53, 0x00, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x09, 0x00, 0x05, 0x01,
+ 0x01, 0x05, 0x0c, 0x0d, 0x07, 0x05, 0x00, 0x00, 0x47, 0x05, 0x00, 0x00, 0xc7, 0x06, 0x00, 0x00,
+ 0x07, 0x07, 0x00, 0x00, 0x87, 0x21, 0x00, 0x00, 0xe7, 0x21, 0x00, 0x00, 0x27, 0x09, 0x00, 0x00,
+ 0x07, 0x23, 0x00, 0x00, 0xa7, 0x1d, 0x00, 0x00, 0x87, 0x15, 0x00, 0x00, 0xc7, 0x1b, 0x00, 0x00,
+ 0x70, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x01, 0x46, 0x02, 0x2e, 0x03, 0x89, 0x5d, 0x11, 0x07, 0x2d,
+ 0x03, 0x01, 0x42, 0x52, 0x33, 0xe6, 0x05, 0xdc, 0x02, 0x2d, 0x06, 0x04, 0x38, 0x07, 0x38, 0x08,
+ 0x3d, 0x09, 0x2c, 0x01, 0xd1, 0x74, 0x21, 0x0d, 0x3e, 0x04, 0x0a, 0x2c, 0x01, 0xd1, 0x3d, 0x0b,
+ 0x2c, 0x0c, 0xd1, 0x04, 0x53, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x49, 0x00, 0x06, 0x01,
+ 0x02, 0x05, 0x0b, 0x0c, 0x07, 0x05, 0x00, 0x00, 0x47, 0x05, 0x00, 0x00, 0xa7, 0x23, 0x00, 0x00,
+ 0xa7, 0x24, 0x00, 0x00, 0x27, 0x25, 0x00, 0x00, 0xc7, 0x25, 0x00, 0x00, 0x27, 0x26, 0x00, 0x00,
+ 0x47, 0x03, 0x00, 0x00, 0xe7, 0x26, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x39, 0x02, 0x00, 0xe8,
+ 0x01, 0x76, 0x05, 0x00, 0x11, 0x09, 0x2f, 0x03, 0x06, 0x01, 0xda, 0x01, 0x2a, 0x76, 0x07, 0x00,
+ 0x11, 0x09, 0x2f, 0x0b, 0x03, 0x01, 0xd4, 0x01, 0x1e, 0x76, 0x08, 0x00, 0x11, 0x08, 0x2d, 0x04,
+ 0x01, 0xce, 0x01, 0x13, 0x2c, 0x09, 0x64, 0x01, 0x6e, 0x21, 0x0c, 0x2f, 0x03, 0x00, 0x01, 0x3d,
+ 0x0a, 0x2c, 0x03, 0xd1, 0xda, 0x04, 0x53, 0x00, 0x10, 0x00, 0x01, 0x00, 0x09, 0x00, 0x05, 0x02,
+ 0x02, 0x07, 0x0e, 0x0f, 0x07, 0x05, 0x00, 0x00, 0x47, 0x05, 0x00, 0x00, 0x47, 0x27, 0x00, 0x00,
+ 0x07, 0x07, 0x00, 0x00, 0x07, 0x06, 0x00, 0x00, 0x47, 0x03, 0x00, 0x00, 0xa7, 0x1d, 0x00, 0x00,
+ 0x87, 0x02, 0x00, 0x00, 0xc7, 0x25, 0x00, 0x00, 0x87, 0x15, 0x00, 0x00, 0xc7, 0x1b, 0x00, 0x00,
+ 0x67, 0x0c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x02, 0x4d, 0x01, 0x03, 0x2c, 0x07,
+ 0x64, 0x03, 0x6e, 0x21, 0x0b, 0x3e, 0x03, 0x08, 0x2d, 0x02, 0x02, 0xd7, 0xdd, 0x03, 0x04, 0x2c,
+ 0x09, 0x64, 0x04, 0x71, 0x21, 0x04, 0x2c, 0x04, 0x11, 0x09, 0x2f, 0x02, 0x0a, 0x03, 0xda, 0x61,
+ 0x52, 0x3e, 0x05, 0x0b, 0x2c, 0x03, 0xd1, 0x3d, 0x0c, 0x2c, 0x0e, 0xd0, 0x3e, 0x06, 0x0d, 0x2c,
+ 0x03, 0xd0, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x01, 0x00, 0x49, 0x00, 0x04, 0x01,
0x01, 0x03, 0x03, 0x04, 0x07, 0x05, 0x00, 0x00, 0x47, 0x05, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x2b, 0x03, 0x01, 0x02, 0x28, 0x00, 0xb1, 0x03, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x2f, 0x03, 0x01, 0x02, 0x2c, 0x00, 0xc2, 0x03, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0b, 0x00, 0x01, 0x00, 0x09, 0x00, 0x07, 0x03, 0x03, 0x06, 0x0b, 0x0d, 0x47, 0x05, 0x00, 0x00,
- 0x87, 0x05, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x47, 0x17, 0x00, 0x00, 0x47, 0x18, 0x00, 0x00,
- 0xc7, 0x2a, 0x00, 0x00, 0x47, 0x21, 0x00, 0x00, 0xa7, 0x21, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00,
- 0x70, 0x00, 0x00, 0x00, 0x42, 0x03, 0x01, 0x42, 0x04, 0x02, 0x3b, 0x05, 0x06, 0x29, 0x00, 0x04,
- 0x14, 0x32, 0x00, 0x4f, 0x18, 0x07, 0x31, 0x4f, 0x18, 0x08, 0x48, 0x0b, 0x09, 0x48, 0x0c, 0x0a,
- 0xb3, 0x03, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x29, 0x00, 0x01, 0x00,
- 0x00, 0x02, 0x02, 0x02, 0x47, 0x05, 0x00, 0x00, 0x87, 0x05, 0x00, 0x00, 0x36, 0x00, 0x01, 0x45,
- 0x04, 0x00, 0x01, 0x00, 0x29, 0x00, 0x03, 0x01, 0x01, 0x03, 0x03, 0x03, 0x47, 0x05, 0x00, 0x00,
- 0x87, 0x05, 0x00, 0x00, 0x2b, 0x01, 0x02, 0x00, 0xc8, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x01, 0x00, 0x29, 0x00, 0x05, 0x03, 0x03, 0x04, 0x04, 0x04, 0x47, 0x06, 0x00, 0x00,
- 0x28, 0x03, 0x2a, 0x00, 0x29, 0x01, 0x02, 0x3d, 0x04, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x87, 0x05, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x07, 0x1f, 0x00, 0x00, 0x07, 0x20, 0x00, 0x00,
+ 0x27, 0x28, 0x00, 0x00, 0xc7, 0x20, 0x00, 0x00, 0x27, 0x21, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00,
+ 0x70, 0x00, 0x00, 0x00, 0x4d, 0x01, 0x03, 0x4d, 0x02, 0x04, 0x3e, 0x05, 0x06, 0x2d, 0x00, 0x04,
+ 0x14, 0x35, 0x00, 0x5d, 0x18, 0x07, 0x34, 0x5d, 0x18, 0x08, 0x55, 0x0b, 0x09, 0x55, 0x0c, 0x0a,
+ 0xc4, 0x03, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x49, 0x00, 0x01, 0x00,
+ 0x00, 0x02, 0x02, 0x02, 0x47, 0x05, 0x00, 0x00, 0x87, 0x05, 0x00, 0x00, 0x39, 0x00, 0x01, 0x52,
+ 0x04, 0x00, 0x01, 0x00, 0x49, 0x00, 0x03, 0x01, 0x01, 0x03, 0x03, 0x03, 0x47, 0x05, 0x00, 0x00,
+ 0x87, 0x05, 0x00, 0x00, 0x2f, 0x01, 0x02, 0x00, 0xd9, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x01, 0x00, 0x49, 0x00, 0x04, 0x01, 0x01, 0x01, 0x03, 0x03, 0x87, 0x07, 0x00, 0x00,
+ 0x07, 0x08, 0x00, 0x00, 0x3a, 0x01, 0x3d, 0x02, 0x2c, 0x00, 0xd0, 0x53, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x01, 0x00, 0x49, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x02, 0x87, 0x07, 0x00, 0x00,
+ 0x67, 0x08, 0x00, 0x00, 0x3a, 0x00, 0x3d, 0x01, 0xcb, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x01, 0x00, 0x49, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x87, 0x07, 0x00, 0x00,
+ 0x87, 0x1e, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x3a, 0x00, 0x38, 0x01, 0x99, 0x02,
+ 0x37, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x49, 0x00, 0x02, 0x01,
+ 0x01, 0x01, 0x02, 0x02, 0x07, 0x02, 0x00, 0x00, 0x2c, 0x01, 0x64, 0x00, 0x6e, 0x21, 0x05, 0x28,
+ 0x78, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x49, 0x00, 0x07, 0x03,
+ 0x03, 0x04, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0x07, 0x1f, 0x00, 0x00, 0x07, 0x20, 0x00, 0x00,
+ 0x07, 0x29, 0x00, 0x00, 0x3e, 0x03, 0x04, 0x2d, 0x00, 0x01, 0x14, 0x35, 0x00, 0x5d, 0x18, 0x05,
+ 0x55, 0x02, 0x06, 0xc4, 0x03, 0x53, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x49, 0x00, 0x06, 0x00,
+ 0x00, 0x01, 0x06, 0x06, 0x07, 0x05, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x27, 0x17, 0x00, 0x00,
+ 0xa7, 0x1d, 0x00, 0x00, 0xc7, 0x16, 0x00, 0x00, 0x67, 0x08, 0x00, 0x00, 0x00, 0x15, 0x10, 0x3e,
+ 0x00, 0x01, 0x33, 0xd0, 0x3a, 0x02, 0x3d, 0x03, 0x3a, 0x04, 0xd1, 0x52, 0x00, 0x1d, 0x08, 0x3e,
+ 0x00, 0x05, 0xca, 0x10, 0x53, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x01, 0x00, 0x49, 0x00, 0x07, 0x00,
+ 0x04, 0x05, 0x0b, 0x0b, 0x47, 0x05, 0x00, 0x00, 0xa7, 0x18, 0x00, 0x00, 0xe7, 0x09, 0x00, 0x00,
+ 0xc7, 0x16, 0x00, 0x00, 0x27, 0x18, 0x00, 0x00, 0xc7, 0x17, 0x00, 0x00, 0xa7, 0x1d, 0x00, 0x00,
+ 0x3a, 0x05, 0xe8, 0x00, 0x3f, 0x06, 0xcb, 0xe8, 0x01, 0x3a, 0x07, 0xe8, 0x02, 0x3a, 0x08, 0xe8,
+ 0x03, 0x79, 0x01, 0x00, 0x1d, 0x06, 0x2d, 0x04, 0x01, 0xce, 0x21, 0x12, 0x3a, 0x09, 0x3d, 0x0a,
+ 0x2f, 0x02, 0x01, 0x00, 0x2c, 0x03, 0xc4, 0x04, 0x2c, 0x01, 0xe6, 0x05, 0x04, 0x53, 0x00, 0x00,
+ 0x08, 0x00, 0x01, 0x00, 0x49, 0x00, 0x05, 0x02, 0x03, 0x03, 0x07, 0x07, 0xe7, 0x0c, 0x00, 0x00,
+ 0x47, 0x03, 0x00, 0x00, 0x87, 0x29, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x2c,
+ 0x01, 0x33, 0xd7, 0xe8, 0x02, 0x2c, 0x04, 0x64, 0x02, 0x6e, 0x21, 0x11, 0x3a, 0x05, 0x1d, 0x05,
+ 0x1c, 0xe6, 0x05, 0x04, 0x3a, 0x05, 0x3d, 0x06, 0x2c, 0x02, 0xd1, 0x04, 0x53, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x01, 0x00, 0x49, 0x00, 0x03, 0x00, 0x01, 0x01, 0x04, 0x04, 0x87, 0x29, 0x00, 0x00,
+ 0x67, 0x08, 0x00, 0x00, 0x87, 0x1e, 0x00, 0x00, 0x3a, 0x01, 0xe8, 0x00, 0x2c, 0x00, 0x11, 0x0e,
+ 0x01, 0x07, 0x3e, 0x00, 0x02, 0xcb, 0xc7, 0x39, 0x00, 0x03, 0x0d, 0x08, 0x53, 0x00, 0x00, 0x00,
+ 0x07, 0x00, 0x01, 0x00, 0x49, 0x00, 0x02, 0x01, 0x01, 0x03, 0x04, 0x04, 0x47, 0x05, 0x00, 0x00,
+ 0x07, 0x06, 0x00, 0x00, 0xa7, 0x1a, 0x00, 0x00, 0x2c, 0x00, 0x21, 0x06, 0x2d, 0x01, 0x00, 0xce,
+ 0x11, 0x12, 0x39, 0x00, 0x03, 0x11, 0x07, 0x39, 0x00, 0x03, 0x01, 0x06, 0x2d, 0x02, 0x00, 0x42,
+ 0x01, 0x04, 0x2c, 0x00, 0x52, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x49, 0x00, 0x01, 0x01,
+ 0x01, 0x01, 0x02, 0x02, 0xe7, 0x19, 0x00, 0x00, 0x2c, 0x00, 0x21, 0x05, 0x39, 0x00, 0x01, 0x52,
+ 0x0e, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x02, 0x02, 0x04, 0x08, 0x09, 0x47, 0x05, 0x00, 0x00,
+ 0x87, 0x05, 0x00, 0x00, 0x47, 0x2a, 0x00, 0x00, 0xe7, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x07, 0x08, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x4d, 0x01, 0x02, 0x46, 0x03, 0x34, 0x61, 0x78,
+ 0x00, 0x21, 0x04, 0x2c, 0x02, 0x11, 0x34, 0x3a, 0x04, 0x1d, 0x05, 0x14, 0xe6, 0x04, 0x04, 0x3a,
+ 0x04, 0x38, 0x00, 0x1d, 0x08, 0x3a, 0x04, 0x2c, 0x00, 0x1c, 0xda, 0x04, 0x3a, 0x04, 0x38, 0x00,
+ 0xdc, 0x03, 0x3e, 0x03, 0x05, 0x2c, 0x02, 0xd1, 0x7b, 0x06, 0x11, 0x0c, 0x3e, 0x03, 0x07, 0x2c,
+ 0x02, 0xd0, 0x2c, 0x08, 0x01, 0x04, 0x34, 0x61, 0x52, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x01, 0x00, 0x49, 0x00, 0x07, 0x00, 0x00, 0x02, 0x04, 0x04, 0x87, 0x05, 0x00, 0x00,
+ 0x47, 0x05, 0x00, 0x00, 0xc7, 0x13, 0x00, 0x00, 0xe7, 0x2a, 0x00, 0x00, 0x3e, 0x00, 0x02, 0x3e,
+ 0x00, 0x03, 0x2c, 0x01, 0xd1, 0x35, 0x00, 0xd6, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x07, 0x00, 0x01, 0x00, 0x49, 0x00, 0x04, 0x01, 0x01, 0x01, 0x03, 0x04, 0x47, 0x2a, 0x00, 0x00,
+ 0xc7, 0x1b, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x34, 0x61, 0x78, 0x00, 0x21, 0x15, 0x3a, 0x01,
+ 0x21, 0x11, 0x3a, 0x01, 0x38, 0x00, 0x21, 0x0b, 0x3a, 0x01, 0x38, 0x00, 0x3d, 0x02, 0x2c, 0x03,
+ 0xd1, 0x04, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x49, 0x00, 0x03, 0x01,
+ 0x01, 0x01, 0x02, 0x02, 0x47, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x01, 0xcb, 0x52, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x01, 0x00, 0x49, 0x00, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x87, 0x2b, 0x00, 0x00,
+ 0x27, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0xe5, 0x02, 0x2c, 0x01, 0xe5, 0x03, 0x53, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x01, 0x00, 0x49, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x03, 0x87, 0x2b, 0x00, 0x00,
+ 0x67, 0x0d, 0x00, 0x00, 0x27, 0x2c, 0x00, 0x00, 0x3a, 0x00, 0x21, 0x09, 0x3a, 0x00, 0x3d, 0x01,
+ 0x3a, 0x02, 0xd1, 0x04, 0x53, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x49, 0x00, 0x01, 0x01,
+ 0x01, 0x02, 0x02, 0x02, 0x87, 0x06, 0x00, 0x00, 0x39, 0x01, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x01, 0x00, 0x49, 0x00, 0x05, 0x03, 0x03, 0x04, 0x04, 0x04, 0xc7, 0x05, 0x00, 0x00,
+ 0x2c, 0x03, 0x2e, 0x00, 0x2d, 0x01, 0x02, 0x40, 0x04, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0x00, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x00, 0x06, 0x00, 0x6d, 0x6f, 0x64, 0x75,
0x6c, 0x65, 0x06, 0x00, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x04, 0x00, 0x73, 0x65, 0x6c, 0x66,
0x06, 0x00, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x09, 0x00, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69,
0x6e, 0x65, 0x64, 0x00, 0x08, 0x00, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x03, 0x00,
0x61, 0x6d, 0x64, 0x00, 0x09, 0x00, 0x56, 0x69, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x00,
- 0x01, 0x00, 0x74, 0x00, 0x01, 0x00, 0x65, 0x00, 0x01, 0x00, 0x6e, 0x00, 0x01, 0x00, 0x73, 0x00,
- 0x01, 0x00, 0x72, 0x00, 0x01, 0x00, 0x69, 0x00, 0x01, 0x00, 0x6f, 0x00, 0x01, 0x00, 0x63, 0x00,
+ 0x01, 0x00, 0x74, 0x00, 0x01, 0x00, 0x65, 0x00, 0x01, 0x00, 0x6e, 0x00, 0x01, 0x00, 0x69, 0x00,
+ 0x01, 0x00, 0x6f, 0x00, 0x01, 0x00, 0x73, 0x00, 0x01, 0x00, 0x72, 0x00, 0x01, 0x00, 0x63, 0x00,
0x06, 0x00, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x05, 0x00, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x00,
0x04, 0x00, 0x70, 0x75, 0x73, 0x68, 0x03, 0x00, 0x70, 0x6f, 0x70, 0x00, 0x03, 0x00, 0x74, 0x6f,
0x70, 0x00, 0x09, 0x00, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x00, 0x04, 0x00,
0x73, 0x6f, 0x72, 0x74, 0x06, 0x00, 0x53, 0x50, 0x4c, 0x49, 0x43, 0x45, 0x06, 0x00, 0x73, 0x70,
0x6c, 0x69, 0x63, 0x65, 0x07, 0x00, 0x52, 0x45, 0x56, 0x45, 0x52, 0x53, 0x45, 0x00, 0x07, 0x00,
0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x00, 0x04, 0x00, 0x6b, 0x65, 0x79, 0x73, 0x03, 0x00,
- 0x6d, 0x61, 0x70, 0x00, 0x06, 0x00, 0x24, 0x77, 0x61, 0x74, 0x63, 0x68, 0x06, 0x00, 0x6c, 0x65,
- 0x6e, 0x67, 0x74, 0x68, 0x0e, 0x00, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70,
- 0x65, 0x72, 0x74, 0x79, 0x0a, 0x00, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65,
- 0x05, 0x00, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x00, 0x04, 0x00, 0x5f, 0x63, 0x74, 0x78, 0x07, 0x00,
- 0x5f, 0x67, 0x65, 0x74, 0x74, 0x65, 0x72, 0x00, 0x03, 0x00, 0x5f, 0x66, 0x6e, 0x00, 0x05, 0x00,
- 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x00, 0x0a, 0x00, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x05, 0x00, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00, 0x0a, 0x00, 0x5f, 0x68, 0x69, 0x6a,
- 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x06, 0x00, 0x5f, 0x5f, 0x6f, 0x62, 0x5f, 0x5f, 0x07, 0x00,
- 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00, 0x07, 0x00, 0x66, 0x6f, 0x72, 0x45, 0x61, 0x63,
- 0x68, 0x00, 0x09, 0x00, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x00, 0x05, 0x00,
- 0x73, 0x6c, 0x69, 0x63, 0x65, 0x00, 0x04, 0x00, 0x63, 0x61, 0x6c, 0x6c, 0x05, 0x00, 0x61, 0x70,
- 0x70, 0x6c, 0x79, 0x00, 0x03, 0x00, 0x67, 0x65, 0x74, 0x00, 0x03, 0x00, 0x73, 0x65, 0x74, 0x00,
- 0x09, 0x00, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x73, 0x00, 0x07, 0x00, 0x5f, 0x6f,
- 0x62, 0x73, 0x4d, 0x61, 0x70, 0x00, 0x07, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x00,
- 0x07, 0x00, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x00, 0x04, 0x00, 0x5f, 0x6b, 0x65, 0x79,
- 0x03, 0x00, 0x5f, 0x76, 0x6d, 0x00, 0x0f, 0x00, 0x5b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20,
- 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5d, 0x00, 0x08, 0x00, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69,
- 0x6e, 0x67, 0x0e, 0x00, 0x69, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x53, 0x68, 0x65,
- 0x65, 0x74, 0x06, 0x00, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x07, 0x00, 0x24, 0x72, 0x65, 0x6e,
- 0x64, 0x65, 0x72, 0x00, 0x04, 0x00, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x00, 0x73, 0x74, 0x79, 0x6c,
- 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x04, 0x00, 0x62, 0x69, 0x6e, 0x64, 0x0c, 0x00, 0x63, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65
+ 0x6d, 0x61, 0x70, 0x00, 0x06, 0x00, 0x24, 0x77, 0x61, 0x74, 0x63, 0x68, 0x04, 0x00, 0x5f, 0x63,
+ 0x74, 0x78, 0x07, 0x00, 0x5f, 0x67, 0x65, 0x74, 0x74, 0x65, 0x72, 0x00, 0x03, 0x00, 0x5f, 0x66,
+ 0x6e, 0x00, 0x05, 0x00, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x00, 0x0a, 0x00, 0x5f, 0x6c, 0x61, 0x73,
+ 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x05, 0x00, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00, 0x0a, 0x00,
+ 0x5f, 0x68, 0x69, 0x6a, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x06, 0x00, 0x5f, 0x5f, 0x6f, 0x62,
+ 0x5f, 0x5f, 0x07, 0x00, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00, 0x07, 0x00, 0x66, 0x6f,
+ 0x72, 0x45, 0x61, 0x63, 0x68, 0x00, 0x09, 0x00, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74,
+ 0x73, 0x00, 0x05, 0x00, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x00, 0x04, 0x00, 0x63, 0x61, 0x6c, 0x6c,
+ 0x05, 0x00, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x00, 0x06, 0x00, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
+ 0x0e, 0x00, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x0a, 0x00, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x03, 0x00, 0x67, 0x65,
+ 0x74, 0x00, 0x03, 0x00, 0x73, 0x65, 0x74, 0x00, 0x03, 0x00, 0x5f, 0x76, 0x6d, 0x00, 0x0f, 0x00,
+ 0x5b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5d, 0x00,
+ 0x08, 0x00, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x0e, 0x00, 0x69, 0x6e, 0x69, 0x74,
+ 0x53, 0x74, 0x79, 0x6c, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x06, 0x00, 0x72, 0x65, 0x6e, 0x64,
+ 0x65, 0x72, 0x07, 0x00, 0x24, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x00, 0x04, 0x00, 0x64, 0x61,
+ 0x74, 0x61, 0x0a, 0x00, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x04, 0x00,
+ 0x62, 0x69, 0x6e, 0x64, 0x0b, 0x00, 0x5f, 0x5f, 0x61, 0x70, 0x70, 0x56, 0x69, 0x6e, 0x67, 0x5f,
+ 0x5f, 0x00, 0x0c, 0x00, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65,
+ 0x05, 0x00, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x00, 0x09, 0x00, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63,
+ 0x68, 0x65, 0x73, 0x00, 0x07, 0x00, 0x5f, 0x6f, 0x62, 0x73, 0x4d, 0x61, 0x70, 0x00, 0x07, 0x00,
+ 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x00, 0x07, 0x00, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e,
+ 0x74, 0x00, 0x04, 0x00, 0x5f, 0x6b, 0x65, 0x79
};
#endif
+#endif // OHOS_ACELITE_FRAMEWORK_MIN_BC_H
/*
- * Copyright (c) 2020 Huawei Device Co., Ltd.
+ * Copyright (c) 2020-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* limitations under the License.
*/
+#ifndef OHOS_ACELITE_FRAMEWORK_MIN_JS_H
+#define OHOS_ACELITE_FRAMEWORK_MIN_JS_H
+
// AUTO GENERATED, PLEASE DO NOT EDIT DIRECTLY
+#include <stdint.h>
#ifndef ACELITE_FRAMEWORK_RAW_BUFFER
#error THIS FILE CAN ONLY BE INCLUDED BY RAW BUFFER CPP
"'},s=Object.keys(r).map((function(t){return r[t]}));function c(t){if(!(this instanceof c))"
"return new c(t);var e=this._vm=this;'[object Object]'===Object.prototype.toString.call(t)&"
"&Object.keys(t).forEach((function(n){var i=t[n];'render'===n?e.$render=i:'data'===n?functi"
- "on(t,e){'function'==typeof e&&(e=e.call(t,t));Object.keys(e).forEach((function(n){return f"
- "unction(t,e,n){Object.defineProperty(t,n,{enumerable:!1,configurable:!0,get:function(){ret"
- "urn e[n]},set:function(t){e[n]=t}})}(t,e,n)})),o.of(e)}(e,i):'styleSheet'===n?initStyleShe"
- "et(i):'function'==typeof i&&(e[n]=i.bind(e))}))}return c.prototype.$watch=function(t,e,n){"
- "return new i(this,t,e,n)},c}));";
+ "on(t,e){'function'==typeof e&&(e=e.call(t,t));if('undefined'!=typeof __appVing__&&__appVin"
+ "g__)return void(t.data=e);Object.keys(e).forEach((function(n){return function(t,e,n){Objec"
+ "t.defineProperty(t,n,{enumerable:!1,configurable:!0,get:function(){return e[n]},set:functi"
+ "on(t){e[n]=t}})}(t,e,n)})),o.of(e)}(e,i):'styleSheet'===n?initStyleSheet(i):'function'==ty"
+ "peof i&&(e[n]=i.bind(e))}))}return c.prototype.$watch=function(t,e,n){return new i(this,t,"
+ "e,n)},c}));";
#endif
+#endif // OHOS_ACELITE_FRAMEWORK_MIN_JS_H
#ifdef FEATURE_COMPONENT_VIDEO
KEYWORD(VIDEO, video) // video tag name
#endif // FEATURE_COMPONENT_VIDEO
+#ifdef FEATURE_COMPONENT_BAIDUMAP
+ KEYWORD(BAIDUMAP, baidumap) // baidumap tag name
+#endif // FEATURE_COMPONENT_BAIDUMAP
KEYWORD(WIDTH, width) // common attributes
KEYWORD(WRAP, wrap) // flex wrap
#ifdef FEATURE_DATE_FORMAT
--- /dev/null
+/*\r
+ * Copyright (c) 2020-2021 Huawei Device Co., Ltd.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+#include "acelite_config.h"\r
+#ifdef FEATURE_COMPONENT_BAIDUMAP\r
+#include "baidu_map_component.h"\r
+#include "ace_log.h"\r
+#include "key_parser.h"\r
+#include "keys.h"\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+// API-method\r
+const char * const BaiduMapComponent::FUNC_SET_ZOOM_EVENT_ENABLED = "set_zoom_event_enabled";\r
+const char * const BaiduMapComponent::FUNC_ZOOM_IN = "zoom_in";\r
+const char * const BaiduMapComponent::FUNC_ZOOM_OUT = "zoom_out";\r
+const char * const BaiduMapComponent::FUNC_ZOOM_TO = "zoom_to";\r
+const char * const BaiduMapComponent::FUNC_ZOOM_BY = "zoom_by";\r
+const char * const BaiduMapComponent::FUNC_SET_MAP_BACKGROUND_COLOR = "set_map_background_color";\r
+const char * const BaiduMapComponent::FUNC_SET_MAP_OVERLAYER_ENABLED = "set_map_overlayer_enabled";\r
+const char * const BaiduMapComponent::FUNC_SET_MAP_TITLES_ENABLED = "set_map_tiles_enabled";\r
+const char * const BaiduMapComponent::FUNC_SET_SCROLL_GESTURES_ENABLED = "set_scroll_gestures_enabled";\r
+const char * const BaiduMapComponent::FUNC_SCROLL_BY = "scroll_by";\r
+const char * const BaiduMapComponent::FUNC_NEW_LAT_LNG = "new_lat_lng";\r
+const char * const BaiduMapComponent::FUNC_NEW_LAT_LNG_ZOOM = "new_lat_lng_zoom";\r
+const char * const BaiduMapComponent::FUNC_CLEAR_MAP_OVERLAYER = "clear_map_overlayer";\r
+const char * const BaiduMapComponent::FUNC_DRAW_MARKER = "draw_marker";\r
+const char * const BaiduMapComponent::FUNC_DRAW_POLYGON = "draw_polygon";\r
+const char * const BaiduMapComponent::FUNC_DRAW_PATH = "draw_path";\r
+const char * const BaiduMapComponent::FUNC_DRAW_TEXT = "draw_text";\r
+const char * const BaiduMapComponent::FUNC_START_LISTEN_MY_GEO_LOCATION = "start_listen_my_geo_location";\r
+const char * const BaiduMapComponent::FUNC_STOP_LISTEN_MY_GEO_LOCATION = "stop_listen_my_geo_location";\r
+const char * const BaiduMapComponent::FUNC_GET_MY_GEO_STATUS = "get_my_geo_status";\r
+const char * const BaiduMapComponent::FUNC_GET_MY_GEO_LOCATION = "get_my_geo_location";\r
+\r
+const FunctionMap BaiduMapComponent::funcMap[] = {\r
+ {FUNC_SET_ZOOM_EVENT_ENABLED, SetZoomEventEnabled},\r
+ {FUNC_ZOOM_IN, ZoomIn},\r
+ {FUNC_ZOOM_OUT, ZoomOut},\r
+ {FUNC_ZOOM_TO, ZoomTo},\r
+ {FUNC_ZOOM_BY, ZoomBy},\r
+ {FUNC_SET_MAP_BACKGROUND_COLOR, SetMapBackgroundColor},\r
+ {FUNC_SET_MAP_OVERLAYER_ENABLED, SetMapOverlayerEnabled},\r
+ {FUNC_SET_MAP_TITLES_ENABLED, SetMapTilesEnabled},\r
+ {FUNC_SET_SCROLL_GESTURES_ENABLED, SetScrollGesturesEnabled},\r
+ {FUNC_SCROLL_BY, ScrollBy},\r
+ {FUNC_NEW_LAT_LNG, NewLatLng},\r
+ {FUNC_NEW_LAT_LNG_ZOOM, NewLatLngZoom},\r
+ {FUNC_CLEAR_MAP_OVERLAYER, ClearMapOverlayer},\r
+ {FUNC_DRAW_MARKER, DrawMarker},\r
+ {FUNC_DRAW_POLYGON, DrawPolygon},\r
+ {FUNC_DRAW_PATH, DrawPath},\r
+ {FUNC_DRAW_TEXT, DrawText},\r
+ {FUNC_START_LISTEN_MY_GEO_LOCATION, StartListenMyGeoLocation},\r
+ {FUNC_STOP_LISTEN_MY_GEO_LOCATION, StopListenMyGeoLocation},\r
+ {FUNC_GET_MY_GEO_STATUS, GetMyGeoStatus},\r
+ {FUNC_GET_MY_GEO_LOCATION, GetMyGeoLocation}\r
+};\r
+BaiduMapComponent::BaiduMapComponent(jerry_value_t options, jerry_value_t children, AppStyleManager* styleManager)\r
+ : Component(options, children, styleManager)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"BaiduMapComponent");\r
+ SetComponentName(K_BAIDUMAP);\r
+ uint16_t funcMapLength = sizeof(funcMap) / sizeof(funcMap[0]);\r
+ for (uint16_t index = 0; index < funcMapLength; index++) {\r
+ RegisterNamedFunction(funcMap[index].funcName, funcMap[index].handler);\r
+ }\r
+}\r
+\r
+UIView *BaiduMapComponent::GetComponentRootView() const\r
+{\r
+ return const_cast<UIView *>(MapComponentApi::getInstance().get_baidumap_root_view());\r
+}\r
+\r
+JSValue BaiduMapComponent::SetZoomEventEnabled(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"SetZoomEventEnabled");\r
+ bool enabled = BoolOf(args[0]);\r
+ MapComponentApi::getInstance().set_zoom_event_enabled(enabled);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::ZoomIn(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"ZoomIn");\r
+ MapComponentApi::getInstance().zoom_in();\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::ZoomOut(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"ZoomOut");\r
+ MapComponentApi::getInstance().zoom_out();\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::ZoomTo(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"ZoomTo");\r
+ int amount = IntegerOf(args[0]);\r
+ MapComponentApi::getInstance().zoom_to(amount);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::ZoomBy(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"ZoomBy");\r
+ int amount = IntegerOf(args[0]);\r
+ MapComponentApi::getInstance().zoom_by(amount);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::SetMapBackgroundColor(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"SetMapBackgroundColor");\r
+ char *json_color = MallocStringOf(args[0]);\r
+ MapComponentApi::getInstance().set_map_background_color(json_color);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::SetMapOverlayerEnabled(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"SetMapOverlayerEnabled");\r
+ bool enabled = BoolOf(args[0]);\r
+ MapComponentApi::getInstance().set_map_overlayer_enabled(enabled);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::SetMapTilesEnabled(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"SetMapTilesEnabled");\r
+ bool enabled = BoolOf(args[0]);\r
+ MapComponentApi::getInstance().set_map_tiles_enabled(enabled);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::SetScrollGesturesEnabled(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"SetScrollGesturesEnabled");\r
+ bool enabled = BoolOf(args[0]);\r
+ MapComponentApi::getInstance().set_scroll_gestures_enabled(enabled);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::ScrollBy(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"ScrollBy");\r
+ int pixel_x = IntegerOf(args[0]);\r
+ int pixel_y = IntegerOf(args[1]);\r
+ MapComponentApi::getInstance().scroll_by(pixel_x,pixel_y);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::NewLatLng(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"NewLatLng");\r
+ char *json_lat_lng = MallocStringOf(args[0]);\r
+ MapComponentApi::getInstance().new_lat_lng(json_lat_lng);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::NewLatLngZoom(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"NewLatLngZoom");\r
+ char *json_lat_lng = MallocStringOf(args[0]);\r
+ int zoom = IntegerOf(args[1]);\r
+ MapComponentApi::getInstance().new_lat_lng_zoom(json_lat_lng,zoom);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::ClearMapOverlayer(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"ClearMapOverlayer");\r
+ MapComponentApi::getInstance().clear_map_overlayer();\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::DrawMarker(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"DrawMarker");\r
+ char *json_marker = MallocStringOf(args[0]);\r
+ MapComponentApi::getInstance().draw_marker(json_marker);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::DrawPolygon(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"DrawPolygon");\r
+ char *json_polygon = MallocStringOf(args[0]);\r
+ MapComponentApi::getInstance().draw_polygon(json_polygon);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::DrawPath(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"DrawPath");\r
+ char *json_path = MallocStringOf(args[0]);\r
+ MapComponentApi::getInstance().draw_path(json_path);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::DrawText(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"DrawText");\r
+ char *json_text = MallocStringOf(args[0]);\r
+ MapComponentApi::getInstance().draw_text(json_text);\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::StartListenMyGeoLocation(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"StartListenMyGeoLocation");\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::StopListenMyGeoLocation(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"StopListenMyGeoLocation");\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::GetMyGeoStatus(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"GetMyGeoStatus");\r
+ return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::GetMyGeoLocation(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize)\r
+{\r
+ HILOG_INFO(HILOG_MODULE_ACE,"GetMyGeoLocation");\r
+ return UNDEFINED;\r
+}\r
+\r
+} // namespace ACELite\r
+} // namespace OHOS\r
+#endif // FEATURE_COMPONENT_BAIDUMAP
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright (c) 2020-2021 Huawei Device Co., Ltd.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef OHOS_ACELITE_BAIDU_MAP_COMPONENT_H\r
+#define OHOS_ACELITE_BAIDU_MAP_COMPONENT_H\r
+\r
+#include "acelite_config.h"\r
+#ifdef FEATURE_COMPONENT_BAIDUMAP\r
+#include <stdint.h>\r
+#include "jsi.h"\r
+#include "component.h"\r
+#include "baidumap_js_component.h"\r
+\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+struct FunctionMap {\r
+ ACE_DISALLOW_COPY_AND_MOVE(FunctionMap);\r
+ const char *funcName;\r
+ jerry_external_handler_t handler;\r
+};\r
+\r
+class BaiduMapComponent final: public Component {\r
+public:\r
+ ACE_DISALLOW_COPY_AND_MOVE(BaiduMapComponent);\r
+ BaiduMapComponent() = delete;\r
+ BaiduMapComponent(jerry_value_t options, jerry_value_t children, AppStyleManager* styleManager);\r
+ ~BaiduMapComponent() override{}\r
+\r
+ /**\r
+ * SetZoomEventEnabled, enabled Indicates whether to allow scaling events. This function is disabled by default\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue SetZoomEventEnabled(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * ZoomIn ,Map zoomed out one level. Valid only at levels 4 to 18\r
+ */\r
+ static JSValue ZoomIn(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * ZoomOut ,Map zoomed in one level. Valid only at levels 4 to 18\r
+ */\r
+ static JSValue ZoomOut(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * ZoomTo, Zoom the map to the specified level\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue ZoomTo(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * ZoomBy, amount Incremental scaling of a map at a given level\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue ZoomBy(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * SetMapBackgroundColor, Set the placeholder background color before the map is displayed\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue SetMapBackgroundColor(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * SetMapOverlayerEnabled, Indicates whether to enable the overlay layer. This function is disabled by default\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue SetMapOverlayerEnabled(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * SetMapTilesEnabled, Indicates whether to enable the map tile layer. This function is enabled by default\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue SetMapTilesEnabled(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * SetScrollGesturesEnabled, Indicates whether to enable gesture sliding. This function is enabled by default\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue SetScrollGesturesEnabled(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * ScrollBy, Incremental moving map for a given screen pixel. The screen origin is in the upper left corner\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue ScrollBy(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * NewLatLng, Displays the map to the center of the screen based on the longitude and latitude\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue NewLatLng(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * NewLatLngZoom, Displays the map of the specified longitude and latitude at the specified level to the center of the screen\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue NewLatLngZoom(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * ClearMapOverlayer, Clear all overlays on the map\r
+ */\r
+ static JSValue ClearMapOverlayer(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * DrawMarker, Construction point\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue DrawMarker(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * DrawPolygon, Constructing Polygons\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue DrawPolygon(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * DrawPath, structural route\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue DrawPath(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * DrawText, Constructed text\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue DrawText(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * StartListenMyGeoLocation, Initiate location interception\r
+ */\r
+ static JSValue StartListenMyGeoLocation(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * StopListenMyGeoLocation, Stop location interception\r
+ */\r
+ static JSValue StopListenMyGeoLocation(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * GetMyGeoStatus, Obtaining the Location Status\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue GetMyGeoStatus(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ /**\r
+ * GetMyGeoLocation, Obtains the watch location information\r
+ *\r
+ * @param thisVal Indicates function execute context\r
+ * @param args Indicates the function arguments\r
+ * @param argsSize Indicates the size of function arguments\r
+ */\r
+ static JSValue GetMyGeoLocation(const jerry_value_t func, const jerry_value_t context,\r
+ const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+ static const char * const FUNC_SET_ZOOM_EVENT_ENABLED;\r
+ static const char * const FUNC_ZOOM_IN;\r
+ static const char * const FUNC_ZOOM_OUT;\r
+ static const char * const FUNC_ZOOM_TO;\r
+ static const char * const FUNC_ZOOM_BY;\r
+ static const char * const FUNC_SET_MAP_BACKGROUND_COLOR;\r
+ static const char * const FUNC_SET_MAP_OVERLAYER_ENABLED;\r
+ static const char * const FUNC_SET_MAP_TITLES_ENABLED;\r
+ static const char * const FUNC_SET_SCROLL_GESTURES_ENABLED;\r
+ static const char * const FUNC_SCROLL_BY;\r
+ static const char * const FUNC_NEW_LAT_LNG;\r
+ static const char * const FUNC_NEW_LAT_LNG_ZOOM;\r
+ static const char * const FUNC_CLEAR_MAP_OVERLAYER;\r
+ static const char * const FUNC_DRAW_MARKER;\r
+ static const char * const FUNC_DRAW_POLYGON;\r
+ static const char * const FUNC_DRAW_PATH;\r
+ static const char * const FUNC_DRAW_TEXT;\r
+ static const char * const FUNC_START_LISTEN_MY_GEO_LOCATION;\r
+ static const char * const FUNC_STOP_LISTEN_MY_GEO_LOCATION;\r
+ static const char * const FUNC_GET_MY_GEO_STATUS;\r
+ static const char * const FUNC_GET_MY_GEO_LOCATION;\r
+ static const FunctionMap funcMap[];\r
+\r
+protected:\r
+ UIView *GetComponentRootView() const override;\r
+};\r
+} // namespace ACELite\r
+} // namespace OHOS\r
+#endif // FEATURE_COMPONENT_BAIDUMAP\r
+#endif // OHOS_ACELITE_BAIDU_MAP_COMPONENT_H
\ No newline at end of file
#include "tab_content_component.h"
#include "tabs_component.h"
#endif // FEATURE_COMPONENT_TABS
+#ifdef FEATURE_COMPONENT_BAIDUMAP
+#include "baidu_map_component.h"
+#endif // FEATURE_COMPONENT_BAIDUMAP
#include "text_component.h"
#include "video_component.h"
component = new VideoComponent(options, children, styleManager);
break;
#endif // FEATURE_COMPONENT_VIDEO
+#ifdef FEATURE_COMPONENT_BAIDUMAP
+ case K_BAIDUMAP:
+ component = new BaiduMapComponent(options, children, styleManager);
+ break;
+#endif // FEATURE_COMPONENT_BAIDUMAP
default:
component = nullptr;
break;
return router_;
}
+ jerry_value_t GetAppVM() const
+ {
+ return abilityModel_;
+ }
+
private:
void InvokeOnCreate() const;
void InvokeOnDestroy() const;
void InvokeOnBackPressed() const;
void InvokeMethodWithoutParameter(const char * const name) const;
+ void MarkAppViewModelEvaling(bool evaling) const;
JsAppContext* appContext_;
jerry_value_t abilityModel_; // the object evaled from user JS code
--- /dev/null
+/*
+ * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ace_log.h"
+#include "baidumap.h"
+#include "baidumap_js_location.h"
+#include "baidumap_js_component.h"
+#include "baidu_app.h"
+#include "msg_center_protocol.h"
+#include "js_async_work.h"
+#include "adapter.h"
+
+#include "gfx_utils/heap_base.h"
+
+typedef struct : public OHOS::HeapBase {
+ char *msgBody;
+ uint8_t type;
+ bool flag;
+} BaiduMapAsyncMsgParams;
+
+typedef struct : public OHOS::HeapBase {
+ double lon;
+ double lat;
+} BaiduMapJSCoordinate;
+
+constexpr char LON[] = "lon";
+constexpr char LAT[] = "lat";
+
+namespace OHOS {
+namespace ACELite {
+
+static int32_t DmsLiteCpoyStr(char **destStr, const char *srcStr);
+
+static void ExecuteSendMsgToJS(void *data);
+
+static bool CheckIsJsValueFunction(OHOS::ACELite::JSIValue jsValue);
+
+//poi_nearby_search
+OHOS::ACELite::JSIValue poi_successCallback = nullptr;
+OHOS::ACELite::JSIValue poi_failCallback = nullptr;
+OHOS::ACELite::JSIValue poi_callbackContext = nullptr;
+//route_riding_search
+OHOS::ACELite::JSIValue route_riding_successCallback = nullptr;
+OHOS::ACELite::JSIValue route_riding_failCallback = nullptr;
+OHOS::ACELite::JSIValue route_riding_callbackContext = nullptr;
+//route_walking_search
+OHOS::ACELite::JSIValue route_walking_successCallback = nullptr;
+OHOS::ACELite::JSIValue route_walking_failCallback = nullptr;
+OHOS::ACELite::JSIValue route_walking_callbackContext = nullptr;
+//route_transit_search
+OHOS::ACELite::JSIValue route_transit_successCallback = nullptr;
+OHOS::ACELite::JSIValue route_transit_failCallback = nullptr;
+OHOS::ACELite::JSIValue route_transit_callbackContext = nullptr;
+//auth_license
+OHOS::ACELite::JSIValue auth_successCallback = nullptr;
+OHOS::ACELite::JSIValue auth_failCallback = nullptr;
+OHOS::ACELite::JSIValue auth_callbackContext = nullptr;
+//naviInit
+OHOS::ACELite::JSIValue nav_successCallback = nullptr;
+OHOS::ACELite::JSIValue nav_failCallback = nullptr;
+OHOS::ACELite::JSIValue nav_callbackContext = nullptr;
+//getGeolocation
+OHOS::ACELite::JSIValue geo_location_Callback = nullptr;
+OHOS::ACELite::JSIValue geo_location_callbackContext = nullptr;
+//onRoutePlanStart
+OHOS::ACELite::JSIValue route_plan_start_Callback = nullptr;
+OHOS::ACELite::JSIValue route_plan_start_callbackContext = nullptr;
+//onRoutePlanSuccess
+OHOS::ACELite::JSIValue route_plan_success_Callback = nullptr;
+OHOS::ACELite::JSIValue route_plan_success_callbackContext = nullptr;
+//onRoutePlanFail
+OHOS::ACELite::JSIValue route_plan_fail_Callback = nullptr;
+OHOS::ACELite::JSIValue route_plan_fail_callbackContext = nullptr;
+//onNaviStart
+OHOS::ACELite::JSIValue navi_start_Callback = nullptr;
+OHOS::ACELite::JSIValue navi_start_callbackContext = nullptr;
+//onNaviDestroy
+OHOS::ACELite::JSIValue navi_destroy_Callback = nullptr;
+OHOS::ACELite::JSIValue navi_destroy_callbackContext = nullptr;
+//onRoadGuideTextUpdate
+OHOS::ACELite::JSIValue road_guide_text_update_Callback = nullptr;
+OHOS::ACELite::JSIValue road_guide_text_update_callbackContext = nullptr;
+//onRouteGuideIconUpdate
+OHOS::ACELite::JSIValue road_guide_icon_update_Callback = nullptr;
+OHOS::ACELite::JSIValue road_guide_icon_update_callbackContext = nullptr;
+//onRemainTimeUpdate
+OHOS::ACELite::JSIValue remain_time_Callback = nullptr;
+OHOS::ACELite::JSIValue remain_time_callbackContext = nullptr;
+//onRemainDistanceUpdate
+OHOS::ACELite::JSIValue remain_distance_Callback = nullptr;
+OHOS::ACELite::JSIValue remain_distance_callbackContext = nullptr;
+//onRemainRouteUpdate
+OHOS::ACELite::JSIValue remain_route_Callback = nullptr;
+OHOS::ACELite::JSIValue remain_route_callbackContext = nullptr;
+//onGpsStatusChange
+OHOS::ACELite::JSIValue gps_status_Callback = nullptr;
+OHOS::ACELite::JSIValue gps_status_callbackContext = nullptr;
+//onRouteFarAway
+OHOS::ACELite::JSIValue route_far_Callback = nullptr;
+OHOS::ACELite::JSIValue route_far_callbackContext = nullptr;
+//onRoutePlanYawing
+OHOS::ACELite::JSIValue route_plan_yawing_Callback = nullptr;
+OHOS::ACELite::JSIValue route_plan_yawing_callbackContext = nullptr;
+//onReRouteComplete
+OHOS::ACELite::JSIValue reroute_Callback = nullptr;
+OHOS::ACELite::JSIValue reroute_callbackContext = nullptr;
+//onArriveDest
+OHOS::ACELite::JSIValue arrivedest_Callback = nullptr;
+OHOS::ACELite::JSIValue arrivedest_callbackContext = nullptr;
+//poi_sug_search
+OHOS::ACELite::JSIValue poi_sug_successCallback = nullptr;
+OHOS::ACELite::JSIValue poi_sug_failCallback = nullptr;
+OHOS::ACELite::JSIValue poi_sug_callbackContext = nullptr;
+//geocode_search
+OHOS::ACELite::JSIValue geocode_search_successCallback = nullptr;
+OHOS::ACELite::JSIValue geocode_search_failCallback = nullptr;
+OHOS::ACELite::JSIValue geocode_search_callbackContext = nullptr;
+//regeocode_search
+OHOS::ACELite::JSIValue regeocode_search_successCallback = nullptr;
+OHOS::ACELite::JSIValue regeocode_search_failCallback = nullptr;
+OHOS::ACELite::JSIValue regeocode_search_callbackContext = nullptr;
+
+static bool CheckIsJsValueDefined(OHOS::ACELite::JSIValue jsValue)
+{
+ if (jsValue == nullptr) {
+ return false;
+ }
+
+ if (OHOS::ACELite::JSI::ValueIsUndefined(jsValue)) {
+ return false;
+ }
+
+ return true;
+}
+
+
+static int32_t DmsLiteCpoyStr(char **destStr, const char *srcStr)
+{
+ if (destStr == nullptr || srcStr == nullptr) {
+ return -1;
+ }
+
+ uint32_t length = strlen(srcStr) + 1;
+ *destStr = static_cast<char *>(AdapterMalloc(length));
+ if (*destStr == nullptr) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to allocate memory for destination string");
+ return -1;
+ }
+
+ if (memset_s(*destStr, length, 0, length) != EOK) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to set memory for destination string");
+ AdapterFree(*destStr);
+ return -1;
+ }
+ if (memcpy_s(*destStr, length, srcStr, length) != EOK) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to copy source string to destination string");
+ AdapterFree(*destStr);
+ return -1;
+ }
+
+ return 0;
+}
+
+
+
+static void ExecuteSendMsgToJS(void *data)
+{
+ BaiduMapAsyncMsgParams *params = static_cast<BaiduMapAsyncMsgParams *>(data);
+ if (params == nullptr) {
+ return;
+ }
+
+ OHOS::ACELite::JSIValue success = nullptr;
+ OHOS::ACELite::JSIValue fail = nullptr;
+ OHOS::ACELite::JSIValue context = nullptr;
+ uint8_t type = params->type;
+ bool flag = params->flag;
+ switch (type) {
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_RECV_POI:
+ success = poi_successCallback;
+ fail = poi_failCallback;
+ context = poi_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_RIDING_SEARCH:
+ success = route_riding_successCallback;
+ fail = route_riding_failCallback;
+ context = route_riding_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_WALKING_SEARCH:
+ success = route_walking_successCallback;
+ fail = route_walking_failCallback;
+ context = route_walking_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_TRANSIT_SEARCH:
+ success = route_transit_successCallback;
+ fail = route_transit_failCallback;
+ context = route_transit_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_POI_SUG_SEARCH:
+ success = poi_sug_successCallback;
+ fail = poi_sug_failCallback;
+ context = poi_sug_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_AUTH_LICENSE:
+ success = auth_successCallback;
+ fail = auth_failCallback;
+ context = auth_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_INIT:
+ success = nav_successCallback;
+ fail = nav_failCallback;
+ context = nav_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GEO_LOCATION:
+ success = geo_location_Callback;
+ context = geo_location_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_START:
+ success = route_plan_start_Callback;
+ context = route_plan_start_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_SUCC:
+ success = route_plan_success_Callback;
+ context = route_plan_success_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_FAIL:
+ success = route_plan_fail_Callback;
+ context = route_plan_fail_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_START:
+ success = navi_start_Callback;
+ context = navi_start_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_DESTROY:
+ success = navi_destroy_Callback;
+ context = navi_destroy_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROAD_GUIDE_TEXT_UPDATE:
+ success = road_guide_text_update_Callback;
+ context = road_guide_text_update_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROAD_GUIDE_ICON_UPDATE:
+ success = road_guide_icon_update_Callback;
+ context = road_guide_icon_update_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_TIME_UPDATE:
+ success = remain_time_Callback;
+ context = remain_time_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_DISTANCE_UPDATE:
+ success = remain_distance_Callback;
+ context = remain_distance_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_ROUTE_UPDATE:
+ success = remain_route_Callback;
+ context = remain_route_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GPS_STATUS_CHANGE:
+ success = gps_status_Callback;
+ context = gps_status_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_FARAWAY:
+ success = route_far_Callback;
+ context = route_far_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_YAWING:
+ success = route_plan_yawing_Callback;
+ context = route_plan_yawing_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_RE_ROUTE_COMPLETE:
+ success = reroute_Callback;
+ context = reroute_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ARRIVE_DSTINATION:
+ success = arrivedest_Callback;
+ context = arrivedest_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GEOCODE_SEARCH:
+ success = geocode_search_successCallback;
+ fail = geocode_search_failCallback;
+ context = geocode_search_callbackContext;
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REGEOCODE_SEARCH:
+ success = regeocode_search_successCallback;
+ fail = regeocode_search_failCallback;
+ context = regeocode_search_callbackContext;
+ break;
+ default:
+ HILOG_ERROR(HILOG_MODULE_ACE, "Invalid command type");
+ break;
+
+ }
+
+ char *msgBody = params->msgBody;
+ delete params;
+ params = nullptr;
+
+ OHOS::ACELite::JSIValue dataInfo = OHOS::ACELite::JSI::CreateObject();
+ OHOS::ACELite::JSI::SetBooleanProperty(dataInfo, "isFileType", false);
+ OHOS::ACELite::JSI::SetBooleanProperty(dataInfo, "isRegister", false);
+ OHOS::ACELite::JSI::SetStringProperty(dataInfo, "message", msgBody);
+ if (flag) {
+ if ((!CheckIsJsValueFunction(success)) || (!CheckIsJsValueDefined(context))) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Error in ExecuteSendMsgToJS. Invalid params detected!");
+ return;
+ }
+ OHOS::ACELite::JSIValue successArgv[OHOS::ACELite::ARGC_ONE] = { dataInfo };
+ OHOS::ACELite::JSI::CallFunction(success, context, successArgv, OHOS::ACELite::ARGC_ONE);
+ OHOS::ACELite::JSI::ReleaseValue(dataInfo);
+ } else {
+ if ((!CheckIsJsValueDefined(context)) || (!CheckIsJsValueFunction(fail))) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Error in ExecuteSendMsgToJS. Invalid params detected!");
+ return;
+ }
+ OHOS::ACELite::JSIValue failArgv[OHOS::ACELite::ARGC_ONE] = { dataInfo };
+ OHOS::ACELite::JSI::CallFunction(fail, context, failArgv, OHOS::ACELite::ARGC_ONE);
+ OHOS::ACELite::JSI::ReleaseValue(dataInfo);
+ }
+ if (msgBody != nullptr) {
+ AdapterFree(msgBody);
+ msgBody = nullptr;
+ }
+
+ return;
+}
+
+static bool CheckIsJsValueFunction(OHOS::ACELite::JSIValue jsValue)
+{
+ if (!CheckIsJsValueDefined(jsValue)) {
+ return false;
+ }
+
+ return OHOS::ACELite::JSI::ValueIsFunction(jsValue);
+}
+
+static void ReleaseJsValue(OHOS::ACELite::JSIValue &jsValue)
+{
+ if (CheckIsJsValueDefined(jsValue)) {
+ OHOS::ACELite::JSI::ReleaseValue(jsValue);
+ jsValue = OHOS::ACELite::JSI::CreateUndefined();
+ }
+ return;
+}
+
+static void ReleaseMsgJsValue(uint8_t type)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"ReleasePoiMsgJsValue");
+ switch (type) {
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI:
+ ReleaseJsValue(poi_callbackContext);
+ ReleaseJsValue(poi_successCallback);
+ ReleaseJsValue(poi_failCallback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE:
+ ReleaseJsValue(auth_callbackContext);
+ ReleaseJsValue(auth_successCallback);
+ ReleaseJsValue(auth_failCallback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_INIT:
+ ReleaseJsValue(nav_callbackContext);
+ ReleaseJsValue(nav_successCallback);
+ ReleaseJsValue(nav_failCallback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_START:
+ ReleaseJsValue(route_plan_start_callbackContext);
+ ReleaseJsValue(route_plan_start_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI_SUG_SEARCH:
+ ReleaseJsValue(poi_sug_callbackContext);
+ ReleaseJsValue(poi_sug_successCallback);
+ ReleaseJsValue(poi_sug_failCallback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_SUCC:
+ ReleaseJsValue(route_plan_success_callbackContext);
+ ReleaseJsValue(route_plan_success_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEO_LOCATION:
+ ReleaseJsValue(geo_location_callbackContext);
+ ReleaseJsValue(geo_location_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_FAIL:
+ ReleaseJsValue(route_plan_fail_callbackContext);
+ ReleaseJsValue(route_plan_fail_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_START:
+ ReleaseJsValue(navi_start_callbackContext);
+ ReleaseJsValue(navi_start_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_DESTROY:
+ ReleaseJsValue(navi_destroy_callbackContext);
+ ReleaseJsValue(navi_destroy_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_TEXT_UPDATE:
+ ReleaseJsValue(road_guide_text_update_callbackContext);
+ ReleaseJsValue(road_guide_text_update_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_ICON_UPDATE:
+ ReleaseJsValue(road_guide_icon_update_callbackContext);
+ ReleaseJsValue(road_guide_icon_update_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_TIME_UPDATE:
+ ReleaseJsValue(remain_time_callbackContext);
+ ReleaseJsValue(remain_time_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_DISTANCE_UPDATE:
+ ReleaseJsValue(remain_distance_callbackContext);
+ ReleaseJsValue(remain_distance_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_ROUTE_UPDATE:
+ ReleaseJsValue(remain_route_callbackContext);
+ ReleaseJsValue(remain_route_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GPS_STATUS_CHANGE:
+ ReleaseJsValue(gps_status_callbackContext);
+ ReleaseJsValue(gps_status_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_FARAWAY:
+ ReleaseJsValue(route_far_callbackContext);
+ ReleaseJsValue(route_far_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_YAWING:
+ ReleaseJsValue(route_plan_yawing_callbackContext);
+ ReleaseJsValue(route_plan_yawing_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_RE_ROUTE_COMPLETE:
+ ReleaseJsValue(reroute_callbackContext);
+ ReleaseJsValue(reroute_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ARRIVE_DSTINATION:
+ ReleaseJsValue(arrivedest_callbackContext);
+ ReleaseJsValue(arrivedest_Callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEOCODE_SEARCH:
+ ReleaseJsValue(geocode_search_successCallback);
+ ReleaseJsValue(geocode_search_failCallback);
+ ReleaseJsValue(geocode_search_callbackContext);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REGEOCODE_SEARCH:
+ ReleaseJsValue(regeocode_search_successCallback);
+ ReleaseJsValue(regeocode_search_failCallback);
+ ReleaseJsValue(regeocode_search_callbackContext);
+ break;
+ default:
+ HILOG_ERROR(HILOG_MODULE_ACE, "ReleaseMsgJsValue Invalid command type");
+ break;
+ }
+ return;
+}
+
+bool setCallbackFunction(OHOS::ACELite::JSIValue callback,uint8_t type,bool isSuccess)
+{
+ if (!OHOS::ACELite::JSI::ValueIsUndefined(callback)) {
+ if (!OHOS::ACELite::JSI::ValueIsFunction(callback)) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Success callback value is not a function");
+ } else {
+ switch (type) {
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI:
+ if (isSuccess) {
+ poi_successCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ } else {
+ poi_failCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ }
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE:
+ if (isSuccess) {
+ auth_successCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ } else {
+ auth_failCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ }
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_INIT:
+ if (isSuccess) {
+ nav_successCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ } else {
+ nav_failCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ }
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI_SUG_SEARCH:
+ if (isSuccess) {
+ poi_sug_successCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ } else {
+ poi_sug_failCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ }
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEO_LOCATION:
+ geo_location_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_START:
+ route_plan_start_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_SUCC:
+ route_plan_success_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_FAIL:
+ route_plan_fail_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_START:
+ navi_start_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_DESTROY:
+ navi_destroy_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_TEXT_UPDATE:
+ road_guide_text_update_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_ICON_UPDATE:
+ road_guide_icon_update_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_TIME_UPDATE:
+ remain_time_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_DISTANCE_UPDATE:
+ remain_distance_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_ROUTE_UPDATE:
+ remain_route_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GPS_STATUS_CHANGE:
+ gps_status_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_FARAWAY:
+ route_far_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_YAWING:
+ route_plan_yawing_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_RE_ROUTE_COMPLETE:
+ reroute_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ARRIVE_DSTINATION:
+ arrivedest_Callback = OHOS::ACELite::JSI::AcquireValue(callback);
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEOCODE_SEARCH:
+ if (isSuccess) {
+ geocode_search_successCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ } else {
+ geocode_search_failCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ }
+ break;
+ case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REGEOCODE_SEARCH:
+ if (isSuccess) {
+ regeocode_search_successCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ } else {
+ regeocode_search_failCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+ }
+ break;
+ default:
+ HILOG_ERROR(HILOG_MODULE_ACE, "setCallbackFunction Invalid command type");
+ return false;
+ }
+ }
+ } else {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Success callback value is undefined");
+ return false;
+ }
+
+ return true;
+}
+
+/**
+ * MsgCenter interface
+ */
+
+JSIValue BaiduMapComponentModule::poi_nearby_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"poi_nearby_search");
+ char *data = JSI::JsonStringify(args[0]);
+ HILOG_INFO(HILOG_MODULE_ACE,"poi_nearby_search : %s \n",data);
+ //success Callback & failed Callback
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI);
+ poi_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ OHOS::ACELite::JSIValue successCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_SUCCESS);
+ OHOS::ACELite::JSIValue failCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_FAIL);
+ setCallbackFunction(successCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI,true);
+ setCallbackFunction(failCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI,false);
+ msg_center_vector_navi_req_poi(MSGCENTER_CMD_VECTOR_NAVI,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI,data,strlen(data));
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::route_riding_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"route_riding_search");
+ char *data = JSI::JsonStringify(args[0]);
+ HILOG_INFO(HILOG_MODULE_ACE,"route_riding_search : %s \n",data);
+ //success Callback & failed Callback
+ ReleaseJsValue(route_riding_successCallback);
+ ReleaseJsValue(route_riding_failCallback);
+ ReleaseJsValue(route_riding_callbackContext);
+ route_riding_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ OHOS::ACELite::JSIValue successCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_SUCCESS);
+ OHOS::ACELite::JSIValue failCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_FAIL);
+
+ if (!OHOS::ACELite::JSI::ValueIsUndefined(successCallback)) {
+ if (!OHOS::ACELite::JSI::ValueIsFunction(successCallback)) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_riding_search Success callback value is not a function");
+ } else {
+ route_riding_successCallback = OHOS::ACELite::JSI::AcquireValue(successCallback);
+ }
+ } else {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_riding_search Success callback value is undefined");
+ }
+
+ if (!OHOS::ACELite::JSI::ValueIsUndefined(failCallback)) {
+ if (!OHOS::ACELite::JSI::ValueIsFunction(failCallback)) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_riding_search Fail callback value is not a function");
+ } else {
+ route_riding_failCallback = OHOS::ACELite::JSI::AcquireValue(failCallback);
+ }
+ } else {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_riding_search Fail callback value is undefined");
+ }
+
+ msg_center_vector_navi_req_dst_by_text(MSGCENTER_CMD_VECTOR_NAVI,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_DST_BY_TEST,data,strlen(data));
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::route_walking_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"route_walking_search");
+ char *data = JSI::JsonStringify(args[0]);
+ HILOG_INFO(HILOG_MODULE_ACE,"route_walking_search : %s \n",data);
+ //success Callback & failed Callback
+ ReleaseJsValue(route_walking_successCallback);
+ ReleaseJsValue(route_walking_failCallback);
+ ReleaseJsValue(route_walking_callbackContext);
+ route_walking_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ OHOS::ACELite::JSIValue successCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_SUCCESS);
+ OHOS::ACELite::JSIValue failCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_FAIL);
+
+ if (!OHOS::ACELite::JSI::ValueIsUndefined(successCallback)) {
+ if (!OHOS::ACELite::JSI::ValueIsFunction(successCallback)) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_walking_search Success callback value is not a function");
+ } else {
+ route_walking_successCallback = OHOS::ACELite::JSI::AcquireValue(successCallback);
+ }
+ } else {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_walking_search Success callback value is undefined");
+ }
+
+ if (!OHOS::ACELite::JSI::ValueIsUndefined(failCallback)) {
+ if (!OHOS::ACELite::JSI::ValueIsFunction(failCallback)) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_walking_search Fail callback value is not a function");
+ } else {
+ route_walking_failCallback = OHOS::ACELite::JSI::AcquireValue(failCallback);
+ }
+ } else {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_walking_search Fail callback value is undefined");
+ }
+ msg_center_vector_navi_req_dst_by_text(MSGCENTER_CMD_VECTOR_NAVI,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_DST_BY_TEST,data,strlen(data));
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::route_transit_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"route_transit_search");
+ char *data = JSI::JsonStringify(args[0]);
+ HILOG_INFO(HILOG_MODULE_ACE,"route_transit_search : %s \n",data);
+ //success Callback & failed Callback
+ ReleaseJsValue(route_transit_successCallback);
+ ReleaseJsValue(route_transit_failCallback);
+ ReleaseJsValue(route_transit_callbackContext);
+ route_transit_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ OHOS::ACELite::JSIValue successCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_SUCCESS);
+ OHOS::ACELite::JSIValue failCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_FAIL);
+
+ if (!OHOS::ACELite::JSI::ValueIsUndefined(successCallback)) {
+ if (!OHOS::ACELite::JSI::ValueIsFunction(successCallback)) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_transit_search Success callback value is not a function");
+ } else {
+ route_transit_successCallback = OHOS::ACELite::JSI::AcquireValue(successCallback);
+ }
+ } else {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_transit_search Success callback value is undefined");
+ }
+
+ if (!OHOS::ACELite::JSI::ValueIsUndefined(failCallback)) {
+ if (!OHOS::ACELite::JSI::ValueIsFunction(failCallback)) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_transit_search Fail callback value is not a function");
+ } else {
+ route_transit_failCallback = OHOS::ACELite::JSI::AcquireValue(failCallback);
+ }
+ } else {
+ HILOG_ERROR(HILOG_MODULE_ACE, "route_transit_search Fail callback value is undefined");
+ }
+ msg_center_vector_navi_req_dst_by_text(MSGCENTER_CMD_VECTOR_NAVI,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_DST_BY_TEST,data,strlen(data));
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::auth_license(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"auth_license");
+ char *data = JSI::JsonStringify(args[0]);
+ HILOG_INFO(HILOG_MODULE_ACE,"auth_license : %s \n",data);
+ //success Callback & failed Callback
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE);
+ auth_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ OHOS::ACELite::JSIValue successCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_SUCCESS);
+ OHOS::ACELite::JSIValue failCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_FAIL);
+ setCallbackFunction(successCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE,true);
+ setCallbackFunction(failCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE,false);
+ msg_center_vector_navi_req_auth_license(MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE,data,strlen(data));
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::getGeolocation(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"getGeolocation");
+ char *data = JSI::JsonStringify(args[0]);
+ HILOG_INFO(HILOG_MODULE_ACE,"getGeolocation : %s \n",data);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEO_LOCATION);
+ geo_location_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEO_LOCATION,true);
+ msg_center_vector_navi_req_geo_location(MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEO_LOCATION,data,strlen(data));
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::naviInit(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"naviInit");
+ char *data = JSI::JsonStringify(args[0]);
+ HILOG_INFO(HILOG_MODULE_ACE,"naviInit : %s \n",data);
+ //success Callback & failed Callback
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_INIT);
+ nav_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ OHOS::ACELite::JSIValue successCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_SUCCESS);
+ OHOS::ACELite::JSIValue failCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_FAIL);
+ setCallbackFunction(successCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_INIT,true);
+ setCallbackFunction(failCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_INIT,false);
+ msg_center_vector_navi_req_navi_init(MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_INIT,data,strlen(data));
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onRoutePlanStart(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onRoutePlanStart");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_START);
+ route_plan_start_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_START,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onRoutePlanSuccess(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onRoutePlanSuccess");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_SUCC);
+ route_plan_success_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_SUCC,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onRoutePlanFail(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onRoutePlanFail");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_FAIL);
+ route_plan_fail_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_FAIL,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onNaviStart(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onNaviStart");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_START);
+ navi_start_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_START,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onNaviDestroy(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onNaviDestroy");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_DESTROY);
+ navi_destroy_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_DESTROY,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onRoadGuideTextUpdate(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onRoadGuideTextUpdate");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_TEXT_UPDATE);
+ road_guide_text_update_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_TEXT_UPDATE,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onRouteGuideIconUpdate(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onRouteGuideIconUpdate");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_ICON_UPDATE);
+ road_guide_icon_update_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_ICON_UPDATE,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onRemainTimeUpdate(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onRemainTimeUpdate");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_TIME_UPDATE);
+ remain_time_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_TIME_UPDATE,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onRemainDistanceUpdate(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onRemainDistanceUpdate");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_DISTANCE_UPDATE);
+ remain_distance_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_DISTANCE_UPDATE,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onRemainRouteUpdate(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onRemainRouteUpdate");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_ROUTE_UPDATE);
+ remain_route_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_ROUTE_UPDATE,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onGpsStatusChange(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onGpsStatusChange");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GPS_STATUS_CHANGE);
+ gps_status_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GPS_STATUS_CHANGE,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onRouteFarAway(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onRouteFarAway");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_FARAWAY);
+ route_far_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_FARAWAY,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onRoutePlanYawing(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onRoutePlanYawing");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_YAWING);
+ route_plan_yawing_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_YAWING,true);
+ //msg_center_vector_navi_req_route_plan_yawing(MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_YAWING,Callback,1);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onReRouteComplete(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onReRouteComplete");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_RE_ROUTE_COMPLETE);
+ reroute_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_RE_ROUTE_COMPLETE,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::onArriveDest(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"onArriveDest");
+ OHOS::ACELite::JSIValue Callback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_CALLBACK);
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ARRIVE_DSTINATION);
+ arrivedest_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ setCallbackFunction(Callback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ARRIVE_DSTINATION,true);
+ return JSI::CreateBoolean(0);
+}
+
+JSIValue BaiduMapComponentModule::poi_sug_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"poi_sug_search");
+ char *data = JSI::JsonStringify(args[0]);
+ HILOG_INFO(HILOG_MODULE_ACE,"poi_sug_search : %s \n",data);
+
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI_SUG_SEARCH);
+ poi_sug_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ OHOS::ACELite::JSIValue successCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_SUCCESS);
+ OHOS::ACELite::JSIValue failCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_FAIL);
+ setCallbackFunction(successCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI_SUG_SEARCH,true);
+ setCallbackFunction(failCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI_SUG_SEARCH,false);
+ msg_center_vertor_navi_req_poi_sug_search(MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI_SUG_SEARCH,data,strlen(data));
+ return JSI::CreateBoolean(0);
+}
+
+/**
+ * location interface
+ */
+JSIValue BaiduMapComponentModule::Location_WGS84ToGCJ02(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"WGS84ToGCJ02");
+ double lon = OHOS::ACELite::JSI::GetNumberProperty(args[0], LON);
+ double lat = OHOS::ACELite::JSI::GetNumberProperty(args[0], LAT);
+ HILOG_INFO(HILOG_MODULE_ACE,"WGS84ToGCJ02 befor lon: %lf \s",lon);
+ HILOG_INFO(HILOG_MODULE_ACE,"WGS84ToGCJ02 befor lat: %lf \s",lat);
+ JSCoordinate params = {0};
+ WGS84ToGCJ02(lon, lat, params);
+
+ HILOG_INFO(HILOG_MODULE_ACE,"WGS84ToGCJ02 after lon: %lf \s",params.lon);
+ HILOG_INFO(HILOG_MODULE_ACE,"WGS84ToGCJ02 after lat: %lf \s",params.lat);
+ JSIValue result = JSI::CreateObject();
+ JSI::SetNumberProperty(result, "lon", params.lon);
+ JSI::SetNumberProperty(result, "lat", params.lat);
+ return result;
+}
+
+JSIValue BaiduMapComponentModule::Location_GCJ02ToBD09(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"GCJ02ToBD09");
+ double lon = OHOS::ACELite::JSI::GetNumberProperty(args[0], LON);
+ double lat = OHOS::ACELite::JSI::GetNumberProperty(args[0], LAT);
+ HILOG_INFO(HILOG_MODULE_ACE,"GCJ02ToBD09 befor lon: %lf \s",lon);
+ HILOG_INFO(HILOG_MODULE_ACE,"GCJ02ToBD09 befor lat: %lf \s",lat);
+ JSCoordinate params = {0};
+ GCJ02ToBD09(lon, lat, params);
+
+ HILOG_INFO(HILOG_MODULE_ACE,"GCJ02ToBD09 after lon: %lf \s",params.lon);
+ HILOG_INFO(HILOG_MODULE_ACE,"GCJ02ToBD09 after lat: %lf \s",params.lat);
+ JSIValue result = JSI::CreateObject();
+ JSI::SetNumberProperty(result, "lon", params.lon);
+ JSI::SetNumberProperty(result, "lat", params.lat);
+ return result;
+}
+
+JSIValue BaiduMapComponentModule::Location_WGS84ToBD09(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"WGS84ToBD09");
+ double lon = OHOS::ACELite::JSI::GetNumberProperty(args[0], LON);
+ double lat = OHOS::ACELite::JSI::GetNumberProperty(args[0], LAT);
+ HILOG_INFO(HILOG_MODULE_ACE,"WGS84ToBD09 befor lon: %lf \s",lon);
+ HILOG_INFO(HILOG_MODULE_ACE,"WGS84ToBD09 befor lat: %lf \s",lat);
+ JSCoordinate params = {0};
+ WGS84ToBD09(lon, lat, params);
+
+ HILOG_INFO(HILOG_MODULE_ACE,"WGS84ToBD09 after lon: %lf \s",params.lon);
+ HILOG_INFO(HILOG_MODULE_ACE,"WGS84ToBD09 after lat: %lf \s",params.lat);
+ JSIValue result = JSI::CreateObject();
+ JSI::SetNumberProperty(result, "lon", params.lon);
+ JSI::SetNumberProperty(result, "lat", params.lat);
+ return result;
+}
+
+JSIValue BaiduMapComponentModule::Location_BD09ToGCJ02(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"BD09ToGCJ02");
+ double lon = OHOS::ACELite::JSI::GetNumberProperty(args[0], LON);
+ double lat = OHOS::ACELite::JSI::GetNumberProperty(args[0], LAT);
+ HILOG_INFO(HILOG_MODULE_ACE,"BD09ToGCJ02 befor lon: %lf \s",lon);
+ HILOG_INFO(HILOG_MODULE_ACE,"BD09ToGCJ02 befor lat: %lf \s",lat);
+ JSCoordinate params = {0};
+ BD09ToGCJ02(lon, lat, params);
+
+ HILOG_INFO(HILOG_MODULE_ACE,"BD09ToGCJ02 after lon: %lf \s",params.lon);
+ HILOG_INFO(HILOG_MODULE_ACE,"BD09ToGCJ02 after lat: %lf \s",params.lat);
+ JSIValue result = JSI::CreateObject();
+ JSI::SetNumberProperty(result, "lon", params.lon);
+ JSI::SetNumberProperty(result, "lat", params.lat);
+ return result;
+}
+
+/**
+ * geocode interface
+ */
+JSIValue BaiduMapComponentModule::Geocode_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"Geocode_search");
+ char *data = JSI::JsonStringify(args[0]);
+ HILOG_INFO(HILOG_MODULE_ACE,"Geocode_search : %s \n",data);
+ //success Callback & failed Callback
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEOCODE_SEARCH);
+ geocode_search_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ OHOS::ACELite::JSIValue successCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_SUCCESS);
+ OHOS::ACELite::JSIValue failCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_FAIL);
+ setCallbackFunction(successCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEOCODE_SEARCH,true);
+ setCallbackFunction(failCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEOCODE_SEARCH,false);
+ msg_center_vector_navi_req_geocode_search(MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEOCODE_SEARCH,data,strlen(data));
+ return JSI::CreateBoolean(0);
+
+}
+
+JSIValue BaiduMapComponentModule::Regeocode_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"Regeocode_search");
+ char *data = JSI::JsonStringify(args[0]);
+ HILOG_INFO(HILOG_MODULE_ACE,"Regeocode_search : %s \n",data);
+ //success Callback & failed Callback
+ ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REGEOCODE_SEARCH);
+ regeocode_search_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+ OHOS::ACELite::JSIValue successCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_SUCCESS);
+ OHOS::ACELite::JSIValue failCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CB_FAIL);
+ setCallbackFunction(successCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REGEOCODE_SEARCH,true);
+ setCallbackFunction(failCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REGEOCODE_SEARCH,false);
+ msg_center_vector_navi_req_regeocode_search(MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REGEOCODE_SEARCH,data,strlen(data));
+ return JSI::CreateBoolean(0);
+}
+
+void InitBaiduMapComponentModule(JSIValue exports)
+{
+ HILOG_INFO(HILOG_MODULE_ACE,"InitBaiduMapComponentModule");
+ /**
+ * MsgCenter interface
+ */
+ JSI::SetModuleAPI(exports, "poi_nearby_search", BaiduMapComponentModule::poi_nearby_search);
+ JSI::SetModuleAPI(exports, "route_riding_search", BaiduMapComponentModule::route_riding_search);
+ JSI::SetModuleAPI(exports, "route_walking_search", BaiduMapComponentModule::route_walking_search);
+ JSI::SetModuleAPI(exports, "route_transit_search", BaiduMapComponentModule::route_transit_search);
+ JSI::SetModuleAPI(exports, "auth_license", BaiduMapComponentModule::auth_license);
+ JSI::SetModuleAPI(exports, "getGeolocation", BaiduMapComponentModule::getGeolocation);
+ JSI::SetModuleAPI(exports, "naviInit", BaiduMapComponentModule::naviInit);
+ JSI::SetModuleAPI(exports, "onRoutePlanStart", BaiduMapComponentModule::onRoutePlanStart);
+ JSI::SetModuleAPI(exports, "onRoutePlanSuccess", BaiduMapComponentModule::onRoutePlanSuccess);
+ JSI::SetModuleAPI(exports, "onRoutePlanFail", BaiduMapComponentModule::onRoutePlanFail);
+ JSI::SetModuleAPI(exports, "onNaviStart", BaiduMapComponentModule::onNaviStart);
+ JSI::SetModuleAPI(exports, "onNaviDestroy", BaiduMapComponentModule::onNaviDestroy);
+ JSI::SetModuleAPI(exports, "onRoadGuideTextUpdate", BaiduMapComponentModule::onRoadGuideTextUpdate);
+ JSI::SetModuleAPI(exports, "onRouteGuideIconUpdate", BaiduMapComponentModule::onRouteGuideIconUpdate);
+ JSI::SetModuleAPI(exports, "onRemainTimeUpdate", BaiduMapComponentModule::onRemainTimeUpdate);
+ JSI::SetModuleAPI(exports, "onRemainDistanceUpdate", BaiduMapComponentModule::onRemainDistanceUpdate);
+ JSI::SetModuleAPI(exports, "onRemainRouteUpdate", BaiduMapComponentModule::onRemainRouteUpdate);
+ JSI::SetModuleAPI(exports, "onGpsStatusChange", BaiduMapComponentModule::onGpsStatusChange);
+ JSI::SetModuleAPI(exports, "onRouteFarAway", BaiduMapComponentModule::onRouteFarAway);
+ JSI::SetModuleAPI(exports, "onRoutePlanYawing", BaiduMapComponentModule::onRoutePlanYawing);
+ JSI::SetModuleAPI(exports, "onReRouteComplete", BaiduMapComponentModule::onReRouteComplete);
+ JSI::SetModuleAPI(exports, "onArriveDest", BaiduMapComponentModule::onArriveDest);
+ JSI::SetModuleAPI(exports, "poi_sug_search", BaiduMapComponentModule::poi_sug_search);
+
+ /**
+ * location interface
+ */
+ JSI::SetModuleAPI(exports, "WGS84ToGCJ02", BaiduMapComponentModule::Location_WGS84ToGCJ02);
+ JSI::SetModuleAPI(exports, "GCJ02ToBD09", BaiduMapComponentModule::Location_GCJ02ToBD09);
+ JSI::SetModuleAPI(exports, "WGS84ToBD09", BaiduMapComponentModule::Location_WGS84ToBD09);
+ JSI::SetModuleAPI(exports, "BD09ToGCJ02", BaiduMapComponentModule::Location_BD09ToGCJ02);
+
+ /**
+ * geocode interface
+ */
+ JSI::SetModuleAPI(exports, "geocode_search", BaiduMapComponentModule::Geocode_search);
+ JSI::SetModuleAPI(exports, "regeocode_search", BaiduMapComponentModule::Regeocode_search);
+
+}
+
+} // namespace ACELite
+} // namespace OHOS
+
+void BaidumapSendMsgToJS(const char *msgBody,uint8_t type)
+{
+ BaiduMapAsyncMsgParams *params = new BaiduMapAsyncMsgParams();
+ if (params == nullptr) {
+ HILOG_ERROR(HILOG_MODULE_ACE,"Failed to allocate memory for params");
+ return;
+ }
+ params->type = type;
+ params->flag = true;
+ int32_t copyRet = OHOS::ACELite::DmsLiteCpoyStr(¶ms->msgBody, msgBody);
+
+ if (copyRet != 0) {
+ HILOG_ERROR(HILOG_MODULE_ACE,"Failed to copy msgBody");
+ delete params;
+ params = nullptr;
+ return;
+ }
+
+ bool ret = OHOS::ACELite::JsAsyncWork::DispatchAsyncWork(OHOS::ACELite::ExecuteSendMsgToJS,static_cast<void *>(params));
+ if (!ret) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to dispatch async work");
+ delete params;
+ params = nullptr;
+ }
+
+ return;
+}
+
+void BaidumapFailSendMsgToJS(const char *msgBody,uint8_t type)
+{
+ BaiduMapAsyncMsgParams *params = new BaiduMapAsyncMsgParams();
+ if (params == nullptr) {
+ HILOG_ERROR(HILOG_MODULE_ACE,"Failed to allocate memory for params");
+ return;
+ }
+ params->type = type;
+ params->flag = false;
+ int32_t copyRet = OHOS::ACELite::DmsLiteCpoyStr(¶ms->msgBody, msgBody);
+
+ if (copyRet != 0) {
+ HILOG_ERROR(HILOG_MODULE_ACE,"Failed to copy msgBody");
+ delete params;
+ params = nullptr;
+ return;
+ }
+
+ bool ret = OHOS::ACELite::JsAsyncWork::DispatchAsyncWork(OHOS::ACELite::ExecuteSendMsgToJS, static_cast<void *>(params));
+ if (!ret) {
+ HILOG_ERROR(HILOG_MODULE_ACE, "Failed to dispatch async work");
+ delete params;
+ params = nullptr;
+ }
+
+ return;
+}
+
--- /dev/null
+/*
+* Copyright (c) CompanyNameMagicTag. 2021-2021. All rights reserved.
+* Description: audio capture wrapper
+* Author: Media Software Group
+* Create: 2021-09-13
+*/
+
+#ifndef BAIDUMAPCOMPONENT_MODULE_H
+#define BAIDUMAPCOMPONENT_MODULE_H
+
+#include <stdint.h>
+#include "jsi.h"
+
+namespace OHOS {
+namespace ACELite {
+class BaiduMapComponentModule final : public MemoryHeap {
+public:
+ /**
+ * constructor
+ */
+ BaiduMapComponentModule() = default;
+
+ /**
+ * desconstructor
+ */
+ ~BaiduMapComponentModule() = default;
+
+ /**
+ * MsgCenter interface
+ */
+ static JSIValue poi_nearby_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue route_riding_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue route_walking_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue route_transit_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue auth_license(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue getGeolocation(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue naviInit(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onRoutePlanStart(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onRoutePlanSuccess(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onRoutePlanFail(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onNaviStart(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onNaviDestroy(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onRoadGuideTextUpdate(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onRouteGuideIconUpdate(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onRemainTimeUpdate(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onRemainDistanceUpdate(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onRemainRouteUpdate(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onGpsStatusChange(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onRouteFarAway(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onRoutePlanYawing(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onReRouteComplete(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue onArriveDest(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue poi_sug_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ /**
+ * location interface
+ */
+ static JSIValue Location_WGS84ToGCJ02(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue Location_GCJ02ToBD09(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue Location_WGS84ToBD09(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue Location_BD09ToGCJ02(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ /**
+ * geocode interface
+ */
+ static JSIValue Geocode_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+ static JSIValue Regeocode_search(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+};
+
+void InitBaiduMapComponentModule(JSIValue exports);
+}
+}
+void BaidumapSendMsgToJS(const char *msgBody,uint8_t type);
+void BaidumapFailSendMsgToJS(const char *msgBody,uint8_t type);
+#endif
+
--- /dev/null
+/*\r
+ * Copyright (c) 2020-2021 Huawei Device Co., Ltd.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#include "display.h"\r
+#include "ace_log.h"\r
+#include "errcode.h"\r
+#if defined(SUPPORT_POWER_MANAGER)\r
+#include "power_display_service.h"\r
+#endif\r
+\r
+constexpr char KEEPSCREENON[] = "keepScreenOn";\r
+uint32_t g_keepOnTimeout = 5000; // 5000ms\r
+const char * ERR_GENERAL = "display error";\r
+const char * ERR_NOT_SUPPORT = "display set is not support";\r
+const int DISPLAY_SUCCESS = 0; \r
+const int DISPLAY_FAIL = -1;\r
+const int DISPLAY_NOT_SUPPORT = -2;\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+static void FailCallBack(const JSIValue thisVal, const JSIValue args, int ret)\r
+{\r
+ JSIValue errCode = JSI::CreateNumber(ret);\r
+ JSIValue errInfo;\r
+ if (ret == DISPLAY_FAIL) {\r
+ errInfo = JSI::CreateString(ERR_GENERAL);\r
+ } else {\r
+ errInfo = JSI::CreateString(ERR_NOT_SUPPORT);\r
+ }\r
+ JSIValue fail = JSI::GetNamedProperty(args, CB_FAIL);\r
+ JSIValue complete = JSI::GetNamedProperty(args, CB_COMPLETE);\r
+ JSIValue argv[ARGC_TWO] = {errInfo, errCode};\r
+ if (!JSI::ValueIsUndefined(fail)) {\r
+ JSI::CallFunction(fail, thisVal, argv, ARGC_TWO);\r
+ }\r
+ if (!JSI::ValueIsUndefined(complete)) {\r
+ JSI::CallFunction(complete, thisVal, nullptr, 0);\r
+ }\r
+ JSI::ReleaseValueList(fail, complete, errInfo, errCode, ARGS_END);\r
+}\r
+\r
+static void SuccessCallBack(const JSIValue thisVal, const JSIValue args, JSIValue jsiValue)\r
+{\r
+ if (JSI::ValueIsUndefined(args)) {\r
+ return;\r
+ }\r
+ JSIValue success = JSI::GetNamedProperty(args, CB_SUCCESS);\r
+ JSIValue complete = JSI::GetNamedProperty(args, CB_COMPLETE);\r
+ if (!JSI::ValueIsUndefined(success)) {\r
+ if (JSI::ValueIsUndefined(jsiValue)) {\r
+ JSI::CallFunction(success, thisVal, nullptr, 0);\r
+ } else {\r
+ JSI::CallFunction(success, thisVal, &jsiValue, ARGC_ONE);\r
+ }\r
+ }\r
+ if (!JSI::ValueIsUndefined(complete)) {\r
+ JSI::CallFunction(complete, thisVal, nullptr, 0);\r
+ }\r
+ JSI::ReleaseValueList(success, complete, ARGS_END);\r
+}\r
+\r
+JSIValue DisplayModule::SetKeepScreenOn(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)\r
+{\r
+ int ret = DISPLAY_NOT_SUPPORT;\r
+#if defined(SUPPORT_POWER_MANAGER)\r
+ errcode_t result;\r
+ bool keepScreenOn = JSI::GetBooleanProperty(args[0], KEEPSCREENON);\r
+ const power_display_svr_api_t *display_api = power_display_svr_get_api();\r
+ if (keepScreenOn) {\r
+ screen_context_t * curScreenCtx = power_display_get_screen_context();\r
+ g_keepOnTimeout = curScreenCtx->keep_on_timeout;\r
+ if (display_api->get_screen_state() != SCREEN_ON) {\r
+ display_api->turn_on_screen();\r
+ }\r
+ result = display_api->set_screen_set_keepon_timeout(3600000); // 3600000ms\r
+ } else {\r
+ result = display_api->set_screen_set_keepon_timeout(g_keepOnTimeout);\r
+ }\r
+ if (result == ERRCODE_SUCC) {\r
+ ret = DISPLAY_SUCCESS;\r
+ }\r
+ else {\r
+ ret = DISPLAY_FAIL;\r
+ }\r
+#endif\r
+ if (ret == DISPLAY_SUCCESS) {\r
+ SuccessCallBack(thisVal, args[0], JSI::CreateUndefined());\r
+ } else {\r
+ FailCallBack(thisVal, args[0], ret);\r
+ }\r
+ return JSI::CreateUndefined();\r
+}\r
+void InitBrightnessModule(JSIValue exports)\r
+{\r
+ JSI::SetModuleAPI(exports, "setKeepScreenOn", DisplayModule::SetKeepScreenOn);\r
+}\r
+} // namespace ACELite\r
+} // namespace OHOS
\ No newline at end of file
--- /dev/null
+/*\r
+* Copyright (c) CompanyNameMagicTag. 2024-2024. All rights reserved.\r
+* Description: display control interfaces\r
+* Author: Software Group\r
+* Create: 2024-04-03\r
+*/\r
+\r
+#ifndef DISPLAY_MODULE_H\r
+#define DISPLAY_MODULE_H\r
+\r
+#include <stdint.h>\r
+#include "jsi.h"\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+class DisplayModule final : public MemoryHeap {\r
+public:\r
+ /**\r
+ * constructor\r
+ */\r
+ DisplayModule() = default;\r
+\r
+ /**\r
+ * desconstructor\r
+ */\r
+ ~DisplayModule() = default;\r
+\r
+ /**\r
+ * Display interface\r
+ */\r
+ static JSIValue SetKeepScreenOn(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);\r
+\r
+};\r
+\r
+void InitBrightnessModule(JSIValue exports);\r
+} // namespace ACELite\r
+} // namespace OHOS\r
+\r
+#endif // DISPLAY_MODULE_H\r
+\r
#ifdef FEATURE_MODULE_AUDIO
extern void InitAudioModule(JSIValue exports);
extern void InitAudioCaptuerModule(JSIValue exports);
+extern void InitBaiduMapComponentModule(JSIValue exports);
#endif // FEATURE_MODULE_AUDIO
#ifdef FEATURE_ACELITE_DFX_MODULE
extern void InitDfxModule(JSIValue exports);
// extern void InitDialogModule(JSIValue exports);
// #endif // FEATURE_MODULE_DIALOG
-// #ifdef FEATURE_MODULE_STORAGE
-// extern void InitNativeApiFs(JSIValue exports);
-// extern void InitNativeApiKv(JSIValue exports);
-// #endif
+#ifdef FEATURE_MODULE_STORAGE
+extern void InitNativeApiFs(JSIValue exports);
+extern void InitNativeApiKv(JSIValue exports);
+#endif
// #ifdef FEATURE_MODULE_DEVICE
// extern void InitDeviceModule(JSIValue exports);
// extern void InitSensorModule(JSIValue exports);
// #endif
-// #ifdef FEATURE_MODULE_BRIGHTNESS
-// extern void InitBrightnessModule(JSIValue exports);
-// #endif
+#ifdef FEATURE_MODULE_BRIGHTNESS
+extern void InitBrightnessModule(JSIValue exports);
+#endif
// #ifdef FEATURE_MODULE_BATTERY
// extern void InitBatteryModule(JSIValue exports);
#ifdef FEATURE_MODULE_AUDIO
{"audio", InitAudioModule},
{"audiocaptuer", InitAudioCaptuerModule},
+#endif
+#ifdef FEATURE_MODULE_BAIDU
+ {"baidumapcomponent",InitBaiduMapComponentModule},
#endif // FEATURE_MODULE_AUDIO
#ifdef FEATURE_MODULE_MESSAGE_CENTER
{"message", InitMsgCenter},
// {"prompt", InitDialogModule},
// #endif // FEATURE_MODULE_DIALOG
-// #ifdef FEATURE_MODULE_STORAGE
-// {"file", InitNativeApiFs},
-// {"storage", InitNativeApiKv},
-// #endif
+#ifdef FEATURE_MODULE_STORAGE
+ {"file", InitNativeApiFs},
+ {"storage", InitNativeApiKv},
+#endif
// #ifdef FEATURE_MODULE_DEVICE
// {"device", InitDeviceModule},
// #endif
// {"vibrator", InitVibratorModule},
// {"sensor", InitSensorModule},
// #endif
-// #ifdef FEATURE_MODULE_BRIGHTNESS
-// {"brightness", InitBrightnessModule},
-// #endif
+#ifdef FEATURE_MODULE_BRIGHTNESS
+ {"brightness", InitBrightnessModule},
+#endif
// #ifdef FEATURE_MODULE_BATTERY
// {"battery", InitBatteryModule},
// #endif
--- /dev/null
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "app_data_module.h"
+
+#include "ace_log.h"
+#include "js_ability_impl.h"
+#include "js_app_context.h"
+#include "js_fwk_common.h"
+
+namespace OHOS {
+namespace ACELite {
+const char * const AppDataModule::GETAPP_METHOD_NAME = "getApp";
+const char * const AppDataModule::GETAPP_DATA_STR = "data";
+void AppDataModule::Init()
+{
+ CreateNamedFunction(GETAPP_METHOD_NAME, GetApp);
+}
+
+jerry_value_t AppDataModule::GetApp(const jerry_value_t func,
+ const jerry_value_t context,
+ const jerry_value_t args[],
+ const jerry_length_t argsNum)
+{
+ (void)func;
+ (void)context;
+ (void)args;
+
+ if (argsNum != 0) {
+ return UNDEFINED;
+ }
+
+ const JSAbilityImpl *abilityImpl = JsAppContext::GetInstance()->GetTopJSAbilityImpl();
+ if (!abilityImpl) {
+ return UNDEFINED;
+ }
+
+ jerry_value_t abilityVM = abilityImpl->GetAppVM(); // do not release here
+ if (IS_UNDEFINED(abilityVM)) {
+ return UNDEFINED;
+ }
+
+ jerry_value_t dataObj = jerryx_get_property_str(abilityVM, GETAPP_DATA_STR);
+ if (IS_UNDEFINED(dataObj)) {
+ return UNDEFINED;
+ }
+ jerry_release_value(dataObj);
+ return abilityVM;
+}
+} // namespace ACELite
+} // namespace OHOS
--- /dev/null
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef OHOS_ACELITE_APP_DATA_MODULE_H
+#define OHOS_ACELITE_APP_DATA_MODULE_H
+
+#include "acelite_config.h"
+#include "js_config.h"
+#include "non_copyable.h"
+#include "presets/preset_module.h"
+
+namespace OHOS {
+namespace ACELite {
+class AppDataModule final : public PresetModule {
+public:
+ ACE_DISALLOW_COPY_AND_MOVE(AppDataModule);
+
+ /**
+ * @fn AppDataModule::AppDataModule()
+ *
+ * @brief Constructor.
+ */
+ AppDataModule() : PresetModule(nullptr) {}
+
+ /**
+ * @fn AppDataModule::~AppDataModule()
+ *
+ * @brief Constructor.
+ */
+ ~AppDataModule() = default;
+
+ static void Load()
+ {
+ AppDataModule appDataModule;
+ appDataModule.Init();
+ }
+
+ void Init() override;
+
+private:
+ static jerry_value_t GetApp(const jerry_value_t func,
+ const jerry_value_t context,
+ const jerry_value_t args[],
+ const jerry_length_t argsNum);
+ static const char * const GETAPP_METHOD_NAME;
+ static const char * const GETAPP_DATA_STR;
+};
+} // namespace ACELite
+} // namespace OHOS
+#endif // OHOS_ACELITE_APP_DATA_MODULE_H
set(PRIVATE_HEADER
${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/interfaces/base
+ ${ROOT_DIR}/open_source/openharmony/base/global/resmgr_lite/frameworks/resmgr_lite/include
+ ${ROOT_DIR}/open_source/openharmony/base/global/resmgr_lite/interfaces/innerkits/include
${ROOT_DIR}/application/wearable/ohos_deps
${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include
build_component()
+set(COMPONENT_NAME "bms_sign_mode")
+set(MODULE_NAME "ohos")
+set(AUTO_DEF_FILE_ID TRUE)
+
+set(PUBLIC_HEADER
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/appexecfwk/appexecfwk_lite/frameworks/bundle_lite/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/appexecfwk/appexecfwk_lite/interfaces/innerkits/bundlemgr_lite
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/appexecfwk/appexecfwk_lite/interfaces/innerkits/bundlemgr_lite/slite
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/appexecfwk/appexecfwk_lite/interfaces/kits/bundle_lite
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/appexecfwk/appexecfwk_lite/interfaces/kits/bundle_lite/slite
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/appexecfwk/appexecfwk_lite/services/bundlemgr_lite/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/appexecfwk/appexecfwk_lite/utils
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/appexecfwk/appexecfwk_lite/utils/bundle_lite
+ ${CMAKE_CURRENT_SOURCE_DIR}/extcmd/include
+)
+
+set(PRIVATE_HEADER
+ ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/interfaces/base
+ ${ROOT_DIR}/open_source/openharmony/base/global/resmgr_lite/frameworks/resmgr_lite/include
+ ${ROOT_DIR}/open_source/openharmony/base/global/resmgr_lite/interfaces/innerkits/include
+ ${ROOT_DIR}/application/wearable/ohos_deps
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include/service
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits
+ ${ROOT_DIR}/open_source/openharmony/third_party/cJSON
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/innerkits
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits
+)
+
+if("__LITEOS__" IN_LIST DEFINES)
+elseif ("__FREERTOS__" IN_LIST DEFINES)
+ set(PRIVATE_HEADER
+ ${PRIVATE_HEADER}
+ ${ROOT_DIR}/middleware/services/utils/fs/include/freertos_adapt
+ )
+endif()
+
+if("JS_ENABLE" IN_LIST DEFINES)
+set(SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/bundlems/sign_mode.cpp
+)
+endif()
+
+set(COMPONENT_PUBLIC_CCFLAGS
+)
+
+set(COMPONENT_CCFLAGS
+ -std=c++11
+ -Wno-error
+ -Wno-unused-parameter
+ -fno-exceptions
+ -fno-unwind-tables
+ -fno-asynchronous-unwind-tables
+ -Wno-undef
+ -Wno-bitwise-op-parentheses
+ -Wno-shift-op-parentheses
+ -nostdlibinc
+ -nostdinc
+ -nostdlib
+ -Wno-c++11-narrowing
+ -Wno-error=unused-function
+)
+
+
+set(WHOLE_LINK
+ true
+)
+
+set(MAIN_COMPONENT
+ false
+)
+
+set(PUBLIC_DEFINES
+)
+
+set(PRIVATE_DEFINES
+ APP_PLATFORM_WATCHGT
+ OHOS_DEBUG
+ JERRY_FOR_IAR_CONFIG
+)
+
+install_sdk_by_sh("${CMAKE_CURRENT_SOURCE_DIR}/include" "*")
+install_sdk_by_sh("${CMAKE_CURRENT_SOURCE_DIR}/extcmd/include" "*")
+
+build_component()
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2020 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "sign_mode.h"
+
+#include "ability_info_utils.h"
+#include "ability_message_id.h"
+#include "appexecfwk_errors.h"
+#include "bundle_common.h"
+#include "bundle_message_id.h"
+#include "bundle_util.h"
+#include "bundlems_log.h"
+#include "cmsis_os2.h"
+#include "dirent.h"
+#include "fcntl.h"
+#include "gt_bundle_extractor.h"
+#include "gt_bundle_parser.h"
+#include "gt_extractor_util.h"
+
+#include "los_tick.h"
+#include "stdio.h"
+#include "sys/stat.h"
+#include "unistd.h"
+#include "utils.h"
+#include "want.h"
+
+#include "generate-bytecode.h"
+
+namespace OHOS {
+
+#ifdef OHOS_DEBUG
+bool SignMode::isSignMode_ = true;
+
+uint8_t SignMode::SetSignMode(bool enable)
+{
+ isSignMode_ = enable;
+ return ERR_OK;
+}
+
+bool SignMode::IsSignMode()
+{
+ return isSignMode_;
+}
+#endif
+} // namespace OHOS
PreAppList *InitPreAppInfo(void);
void InsertPreAppInfo(const char *filePath, PreAppList *list);
void SetPreAppInfo(PreAppList *list);
-#ifdef OHOS_DEBUG
- uint8_t SetSignMode(bool enable);
- bool IsSignMode() const;
-#endif
private:
GtManagerService();
~GtManagerService();
PreAppList *preAppList_;
bool updateFlag_;
int32_t oldVersionCode_;
-#ifdef OHOS_DEBUG
- bool isSignMode_ { true };
-#endif
};
}
--- /dev/null
+/*
+ * Copyright (c) 2020 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SIGN_MODE_H
+#define SIGN_MODE_H
+
+#include "adapter.h"
+#include "bundle_info.h"
+#include "bundle_map.h"
+#include "cJSON.h"
+#include "gt_bundle_installer.h"
+#include "stdint.h"
+#include "want.h"
+#include "install_param.h"
+#include "bundle_install_msg.h"
+#include "bundle_manager.h"
+#include "los_list.h"
+#include "ohos_types.h"
+
+namespace OHOS {
+
+class SignMode {
+public:
+ static SignMode& GetInstance() {
+ static SignMode instance;
+ return instance;
+ }
+#ifdef OHOS_DEBUG
+ static uint8_t SetSignMode(bool enable);
+ static bool IsSignMode();
+#endif
+
+private:
+ SignMode() = default;
+ ~SignMode() = default;
+ static bool isSignMode_;
+};
+
+} // namespace OHOS
+
+#endif // SIGN_MODE_H
\ No newline at end of file
set(COMPONENT_NAME "jerryscript")
set(PUBLIC_HEADER
- ${CMAKE_CURRENT_SOURCE_DIR}/include/jerrycore
- ${CMAKE_CURRENT_SOURCE_DIR}/include/jerryext
- ${CMAKE_CURRENT_SOURCE_DIR}/include/jerrylibm
- ${CMAKE_CURRENT_SOURCE_DIR}/include/jerryport
- ${CMAKE_CURRENT_SOURCE_DIR}/include/jerryext/jerryscript-ext
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/api
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ext
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/include
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/jmem
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/jrt
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/lit
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/include
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/include/jerryscript-ext
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-port/default/include
+# ${CMAKE_CURRENT_SOURCE_DIR}/jerry-libm/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/jerry-core
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/jerry-core/api
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/jerry-core/ecma/base
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/jerry-core/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/jerry-core/jmem
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/jerry-core/jrt
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/jerry-core/lit
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/jerry-ext/include/jerryscript-ext
)
set(PRIVATE_HEADER
${ROOT_DIR}/application/wearable/ohos_deps
- ${PUBLIC_HEADER}
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/debugger
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/jcontext
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/regexp
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/vm
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/debugger
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/common
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/arg
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/handle-scope
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-port
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/api
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ext
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/jmem
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/jrt
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/lit
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/include/jerryscript-ext
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-port/default/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-libm/include
)
if("JS_ENABLE" IN_LIST DEFINES)
+
set(SOURCES
- ${CMAKE_CURRENT_SOURCE_DIR}/src/arg.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/arg-js-iterator-helper.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/arg-transform-functions.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/byte-code.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/common.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger-common.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger-rp.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger-serial.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger-sha1.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger-tcp.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/debugger-ws.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/default-date.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/default-debugger.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/default-external-context.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/default-fatal.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/default-io.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/default-module.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-alloc.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-arraybuffer-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-array-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-boolean-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-arraybuffer.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-arraybuffer-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-array.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-array-iterator-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-array-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-boolean.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-boolean-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-dataview.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-dataview-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-date.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-date-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-error.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-error-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-evalerror.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-evalerror-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-float32array.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-float32array-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-float64array.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-float64array-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-function.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-function-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-global.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-helpers.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-helpers-date.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-helpers-error.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-helpers-json.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-helpers-sort.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-int16array.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-int16array-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-int32array.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-int32array-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-int8array.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-int8array-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-iterator-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-json.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-map.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-map-iterator-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-map-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-math.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-number.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-number-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-object-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-promise.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-promise-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-rangeerror.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-rangeerror-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-referenceerror.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-referenceerror-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-regexp.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-regexp-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtins.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-set.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-set-iterator-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-set-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-string.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-string-iterator-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-string-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-symbol.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-symbol-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-syntaxerror.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-syntaxerror-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-typedarray.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-typedarray-helpers.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-typedarray-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-typeerror.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-typeerror-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-type-error-thrower.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-uint16array.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-uint16array-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-uint32array.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-uint32array-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-uint8array.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-uint8array-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-uint8clampedarray.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-uint8clampedarray-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-urierror.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-builtin-urierror-prototype.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-comparison.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-container-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-conversion.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-dataview-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-eval.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-exceptions.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-function-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-gc.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-get-put-value.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-helpers.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-helpers-collection.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-helpers-conversion.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-helpers-errol.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-helpers-external-pointers.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-helpers-number.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-helpers-string.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-helpers-value.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-init-finalize.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-iterator-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-jobqueue.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-lcache.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-lex-env.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-literal-storage.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-module.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-number-arithmetic.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-number-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-objects-arguments.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-objects.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-objects-general.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-promise-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-property-hashmap.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-reference.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-regexp-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-string-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-symbol-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/ecma-typedarray-object.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/generate-bytecode.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/handler-assert.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/handler-gc.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/handler-print.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/handler-register.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/handle-scope-allocator.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/handle-scope.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/jcontext.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/jerry.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/jerry-debugger.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/jerry-debugger-transport.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/jerry-snapshot.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/jmem-allocator.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/jmem-heap.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/jmem-poolman.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/jrt-fatals.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/js-lexer.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/js-parser.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/js-parser-expr.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/js-parser-mem.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/js-parser-module.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/js-parser-statm.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/js-parser-util.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/js-scanner.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/js-scanner-util.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/lit-char-helpers.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/lit-magic-strings.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/lit-strings.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/module.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/opcodes.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/opcodes-ecma-arithmetics.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/opcodes-ecma-bitwise.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/opcodes-ecma-relational-equality.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/re-bytecode.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/re-compiler.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/re-parser.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/vm.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/vm-stack.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/vm-utils.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/api/jerry-debugger-transport.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/api/jerry-debugger.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/api/jerry-snapshot.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/api/jerry.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/debugger/debugger.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-alloc.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-gc.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-helpers-collection.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-helpers-conversion.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-helpers-errol.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-helpers-external-pointers.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-helpers-number.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-helpers-string.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-helpers-value.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-helpers.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-init-finalize.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-lcache.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-literal-storage.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-module.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/base/ecma-property-hashmap.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype-unscopables.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-array.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-boolean.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-dataview.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-date.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-error.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-function.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-generator-function.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-generator-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-generator.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-global.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-date.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-error.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-json.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-sort.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-intrinsic.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-iterator-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-json.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-map-iterator-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-map.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-math.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-number.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-promise-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-proxy.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-reflect.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-set-iterator-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-set.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-string-iterator-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-string.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-symbol-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-symbol.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-type-error-thrower.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-urierror-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-urierror.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-weakset-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtin-weakset.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/ecma-builtins.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-helpers.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray-prototype.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-array-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-arraybuffer-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-boolean-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-comparison.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-container-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-conversion.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-dataview-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-eval.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-exceptions.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-function-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-get-put-value.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-iterator-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-jobqueue.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-lex-env.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-number-arithmetic.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-number-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-objects-arguments.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-objects-general.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-objects.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-promise-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-proxy-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-reference.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-regexp-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-string-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-symbol-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ecma/operations/ecma-typedarray-object.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ext/ext-utils.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ext/heapdump.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/ext/tracker.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/jcontext/jcontext.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/jmem/jmem-allocator.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/jmem/jmem-heap.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/jmem/jmem-poolman.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/jrt/jrt-fatals.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/lit/lit-char-helpers.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/lit/lit-magic-strings.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/lit/lit-strings.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/byte-code.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/common.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/js-lexer.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/js-parser-expr.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/js-parser-mem.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/js-parser-module.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/js-parser-statm.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/js-parser-tagged-template-literal.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/js-parser-util.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/js-parser.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/js-scanner-ops.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/js-scanner-util.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/js/js-scanner.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/regexp/re-bytecode.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/regexp/re-compiler.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/parser/regexp/re-parser.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/vm/opcodes-ecma-arithmetics.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/vm/opcodes-ecma-bitwise.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/vm/opcodes-ecma-relational-equality.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/vm/opcodes.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/vm/vm-stack.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/vm/vm-utils.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-core/vm/vm.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/arg/arg-js-iterator-helper.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/arg/arg-transform-functions.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/arg/arg.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/debugger/debugger-common.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/debugger/debugger-rp.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/debugger/debugger-serial.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/debugger/debugger-sha1.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/debugger/debugger-tcp.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/debugger/debugger-ws.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/handle-scope/handle-scope-allocator.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/handle-scope/handle-scope.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/handler/handler-assert.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/handler/handler-gc.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/handler/handler-print.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/handler/handler-register.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/handler/handler-resource-name.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-ext/module/module.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-port/default/default-date.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-port/default/default-debugger.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-port/default/default-external-context.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-port/default/default-fatal.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-port/default/default-io.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/jerry-port/default/default-module.c
)
endif()
)
set(PRIVATE_DEFINES
+ JERRY_GLOBAL_HEAP_SIZE=128
JERRY_ERROR_MESSAGES=1
JERRY_LINE_INFO=1
- JERRY_DEBUGGER=1
- JERRY_STACK_LIMIT=0
- JERRY_FOR_IAR_CONFIG
JERRY_FUNCTION_NAME
JERRY_FUNCTION_BACKTRACE
- JERRY_GC_LIMIT=0
- JERRY_CPOINTER_32_BIT=0
- JERRY_EXTERNAL_CONTEXT=0
- JERRY_PARSER=1
- JERRY_LOGGING=0
- JERRY_MEM_GC_BEFORE_EACH_ALLOC=0
- JERRY_PARSER_DUMP_BYTE_CODE=0
- JERRY_ES2015=0
- JERRY_REGEXP_STRICT_MODE=0
- JERRY_REGEXP_DUMP_BYTE_CODE=0
- JERRY_SNAPSHOT_EXEC=1
- JERRY_SNAPSHOT_SAVE=1
- JERRY_SYSTEM_ALLOCATOR=0
- JERRY_VALGRIND=0
- JERRY_VM_EXEC_STOP=0
- CONFIG_FEATURE_OS_DEBUG=false
- JERRYSCRIPT_MASK_OFF_ACOS
- JERRYSCRIPT_MASK_OFF_ACOSH
- JERRYSCRIPT_MASK_OFF_ASIN
- JERRYSCRIPT_MASK_OFF_ASINH
- JERRYSCRIPT_MASK_OFF_ATAN
- JERRYSCRIPT_MASK_OFF_ATAN2
- JERRYSCRIPT_MASK_OFF_ATANH
- JERRYSCRIPT_MASK_OFF_CBRT
- JERRYSCRIPT_MASK_OFF_CEIL
- JERRYSCRIPT_MASK_OFF_COSH
- JERRYSCRIPT_MASK_OFF_EXP
- JERRYSCRIPT_MASK_OFF_FABS
- JERRYSCRIPT_MASK_OFF_FLOOR
- JERRYSCRIPT_MASK_OFF_FMOD
- JERRYSCRIPT_MASK_OFF_LOG
- JERRYSCRIPT_MASK_OFF_LOG10
- JERRYSCRIPT_MASK_OFF_LOG2
- JERRYSCRIPT_MASK_OFF_POW
- JERRYSCRIPT_MASK_OFF_SCALBN
- JERRYSCRIPT_MASK_OFF_SINH
- JERRYSCRIPT_MASK_OFF_SQRT
- JERRYSCRIPT_MASK_OFF_TANH
- JERRYSCRIPT_MASK_OFF_SIN
- JERRYSCRIPT_MASK_OFF_COS
- JERRYSCRIPT_MASK_OFF_TAN
+ JERRY_STACK_LIMIT=0
)
install_sdk_by_sh("${CMAKE_CURRENT_SOURCE_DIR}/include" "*")
-/*\r
- * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.\r
- * Description: Definition of header file for generating bytecode.\r
- * Create: 2020/09/07\r
- */\r
-\r
-#ifndef GENERATE_BYTECODE_H\r
-#define GENERATE_BYTECODE_H\r
-\r
-#ifdef JERRY_FOR_IAR_CONFIG\r
-\r
-typedef enum {\r
- EXCE_ACE_JERRY_EXEC_OK = 0, // program function OK\r
- EXCE_ACE_JERRY_NULL_PATH, // null path for generateing snapshot\r
- EXEC_ACE_JERRY_MALLOC_ERROR, // error when malloc\r
- EXCE_ACE_JERRY_INPUT_PATH_ERROR, // passed input path is NULL OR open failed\r
- EXCE_ACE_JERRY_INPUT_PATH_NOT_DIR, // passed input path is not a directory\r
- EXCE_ACE_JERRY_OPEN_DIR_FAILED, // open directory failed\r
- EXCE_ACE_JERRY_GENERATE_SNAPSHOT_FAILED, // jerry_generate_snapshot failed\r
- EXCE_ACE_JERRY_OPEN_FILE_FAILED, // open file failed\r
- EXCE_ACE_JERRY_WRITE_SNAPSHOT_FILE_FAILED, // write into snapshot file failed\r
- EXCE_ACE_JERRY_READ_JSFILE_FAILED, // read .js file process failed\r
- EXCE_ACE_JERRY_JSFILE_TOO_LARGE, // bytes of js file out of psRAM\r
- EXCE_ACE_JERRY_SPLICE_PATH_ERROR, // error when splice path\r
- EXCE_ACE_JERRY_SPLICE_OUTPUT_PATH_ERROR, // error when splice output file abs name\r
- EXCE_ACE_JERRY_SPRINTFS_VERSION_ERROR, // error when sprintf_s for jerry_version\r
- EXCE_ACE_JERRY_GET_FILE_STAT_ERROR, // error when getting file stat\r
- EXCE_ACE_JERRY_LINKLIST_ERROR, // error when malloc for list node\r
- EXEC_ACE_JERRY_UNLINKFILE_ERROR, // error when unlink bytecode file\r
-} EXECRES;\r
-\r
-char* get_jerry_version_no();\r
-EXECRES walk_directory(char* filefolder);\r
-EXECRES walk_del_bytecode(char* filefolder);\r
-\r
-#endif // end JERRY_FOR_IAR_CONFIG\r
-\r
-#endif // GENERATE_BYTECODE_H\r
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
+ * Description: Definition of header file for generating bytecode.
+ * Create: 2020/09/07
+ */
+
+#ifndef GENERATE_BYTECODE_H
+#define GENERATE_BYTECODE_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifdef JERRY_FOR_IAR_CONFIG
+
+#include "jerryscript.h"
+#include "jerry-snapshot.h"
+
+typedef enum {
+ EXCE_ACE_JERRY_EXEC_OK = 0, // program function OK
+ EXCE_ACE_JERRY_NULL_PATH, // null path for generateing snapshot
+ EXCE_ACE_JERRY_MALLOC_ERROR, // error when malloc
+ EXCE_ACE_JERRY_INPUT_PATH_ERROR, // passed input path is NULL OR open failed
+ EXCE_ACE_JERRY_INPUT_PATH_NOT_DIR, // passed input path is not a directory
+ EXCE_ACE_JERRY_OPEN_DIR_FAILED, // open directory failed
+ EXCE_ACE_JERRY_GENERATE_SNAPSHOT_FAILED, // jerry_generate_snapshot failed
+ EXCE_ACE_JERRY_OPEN_FILE_FAILED, // open file failed
+ EXCE_ACE_JERRY_WRITE_SNAPSHOT_FILE_FAILED, // write into snapshot file failed
+ EXCE_ACE_JERRY_READ_FILE_FAILED, // read .js file or snapshot file process failed
+ EXCE_ACE_JERRY_FILE_TOO_LARGE, // bytes of js or snapshot file out of psRAM buffer size for them
+ EXCE_ACE_JERRY_SPLICE_PATH_ERROR, // error when splice path
+ EXCE_ACE_JERRY_SPLICE_OUTPUT_PATH_ERROR, // error when splice output file abs name
+ EXCE_ACE_JERRY_SPRINTFS_VERSION_ERROR, // error when sprintf_s for jerry_version
+ EXCE_ACE_JERRY_GET_FILE_STAT_ERROR, // error when getting file stat
+ EXCE_ACE_JERRY_LINKLIST_ERROR, // error when malloc for list node
+ EXCE_ACE_JERRY_UNLINKFILE_ERROR, // error when unlink bytecode file
+ EXCE_ACE_JERRY_SNAPSHOT_VERSION_ERROR, // snapshot file version wrong
+} EXECRES;
+
+typedef struct
+{
+ jerry_context_t *context_p;
+} ContextRecord;
+
+char* get_jerry_version_no();
+EXECRES walk_directory(char* filefolder);
+EXECRES walk_del_bytecode(char* filefolder);
+
+void bms_task_context_init (void);
+void js_task_context_init (void);
+void jerry_port_default_remove_current_context_record ();
+
+void jerry_external_context_init(uint32_t heap_size, jerry_context_alloc_t alloc, void *cb_data_p);
+
+#endif // JERRY_FOR_IAR_CONFIG
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif // GENERATE_BYTECODE_H
*/
#if (!defined(_WIN32) && !defined(_WIN64))
-# define JERRY_BUILTIN_REGEXP 0
+# define JERRY_BUILTIN_REGEXP 1
# define JERRY_ES2015 0
#ifndef JERRY_NDEBUG
# define JERRY_NDEBUG
#ifndef JERRY_FOR_IAR_CONFIG
# define JERRY_MEM_STATS 1
# define JERRY_LOGGING 1
-#endif
+#endif /* JERRY_FOR_IAR_CONFIG */
#ifndef JERRY_GLOBAL_HEAP_SIZE
//Maximum size of heap in kilobytes
-# define JERRY_GLOBAL_HEAP_SIZE (48)
+# define JERRY_GLOBAL_HEAP_SIZE (128)
#endif
#ifndef JERRY_BUILTIN_EVAL_DISABLED
// disable builtin eval() function
# define JERRY_BUILTIN_EVAL_DISABLED 1
#endif
-#endif /* JERRY_FOR_IAR_CONFIG */
+
+#if defined (__linux__)
+#ifndef JERRY_SNAPSHOT_SAVE
+# define JERRY_SNAPSHOT_SAVE 1
+#endif
+#endif /* binary tool compiling in linux platform */
+
+#endif /* !defined(_WIN32) && !defined(_WIN64) */
/*
* Here define the special config for Win simulator build.
# define JERRY_MEM_STATS 1
# define JERRY_SNAPSHOT_EXEC 1
# define JERRY_SNAPSHOT_SAVE 1
-# ifndef JERRY_LOGGING
-# define JERRY_LOGGING 1
-# endif
+#ifndef JERRY_LOGGING
+# define JERRY_LOGGING 1
+#endif
// following config controls temp changes in jerry for debugger function with IDE
# define ACE_DEBUGGER_CUSTOM
# define JERRY_ES2015 1
#endif /* !defined (JERRY_ES2015) */
-#ifndef JERRY_ES2015_BUILTIN
-# define JERRY_ES2015_BUILTIN JERRY_ES2015
-#endif /* !defined (JERRY_ES2015_BUILTIN) */
-
#ifndef JERRY_ES2015_BUILTIN_DATAVIEW
# define JERRY_ES2015_BUILTIN_DATAVIEW JERRY_ES2015
#endif /* !defined (JERRY_ES2015_BUILTIN_DATAVIEW) */
-#ifndef JERRY_ES2015_BUILTIN_ITERATOR
-# define JERRY_ES2015_BUILTIN_ITERATOR JERRY_ES2015
-#endif /* !defined (JERRY_ES2015_BUILTIN_ITERATOR) */
-
#ifndef JERRY_ES2015_BUILTIN_MAP
# define JERRY_ES2015_BUILTIN_MAP JERRY_ES2015
#endif /* !defined (JERRY_ES2015_BUILTIN_MAP) */
# define JERRY_ES2015_BUILTIN_SET JERRY_ES2015
#endif /* !defined (JERRY_ES2015_BUILTIN_SET) */
+#ifndef JERRY_ES2015_BUILTIN_WEAKMAP
+# define JERRY_ES2015_BUILTIN_WEAKMAP JERRY_ES2015
+#endif /* !defined (JERRY_ES2015_BUILTIN_WEAKMAP) */
+
+#ifndef JERRY_ES2015_BUILTIN_WEAKSET
+# define JERRY_ES2015_BUILTIN_WEAKSET JERRY_ES2015
+#endif /* !defined (JERRY_ES2015_BUILTIN_WEAKSET) */
+
#ifndef JERRY_ES2015_BUILTIN_PROMISE
# define JERRY_ES2015_BUILTIN_PROMISE JERRY_ES2015
#endif /* !defined (JERRY_ES2015_BUILTIN_PROMISE) */
-#ifndef JERRY_ES2015_BUILTIN_SYMBOL
-# define JERRY_ES2015_BUILTIN_SYMBOL JERRY_ES2015
-#endif /* !defined (JERRY_ES2015_BUILTIN_SYMBOL) */
+#ifndef JERRY_ES2015_BUILTIN_PROXY
+# define JERRY_ES2015_BUILTIN_PROXY JERRY_ES2015
+#endif /* !defined (JERRY_ES2015_BUILTIN_PROXY) */
+
+#ifndef JERRY_ES2015_BUILTIN_REFLECT
+# define JERRY_ES2015_BUILTIN_REFLECT JERRY_ES2015
+#endif /* !defined (JERRY_ES2015_BUILTIN_REFLECT) */
#ifndef JERRY_ES2015_BUILTIN_TYPEDARRAY
# define JERRY_ES2015_BUILTIN_TYPEDARRAY JERRY_ES2015
#endif /* !defined (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
-#ifndef JERRY_ES2015_ARROW_FUNCTION
-# define JERRY_ES2015_ARROW_FUNCTION JERRY_ES2015
-#endif /* !defined (JERRY_ES2015_ARROW_FUNCTION) */
-
-#ifndef JERRY_ES2015_CLASS
-# define JERRY_ES2015_CLASS JERRY_ES2015
-#endif /* !defined (JERRY_ES2015_CLASS) */
-
-#ifndef JERRY_ES2015_FOR_OF
-# define JERRY_ES2015_FOR_OF JERRY_ES2015
-#endif /* !defined (JERRY_ES2015_FOR_OF) */
-
-#ifndef JERRY_ES2015_FUNCTION_PARAMETER_INITIALIZER
-# define JERRY_ES2015_FUNCTION_PARAMETER_INITIALIZER JERRY_ES2015
-#endif /* !defined (JERRY_ES2015_FUNCTION_PARAMETER_INITIALIZER) */
-
-#ifndef JERRY_ES2015_FUNCTION_REST_PARAMETER
-# define JERRY_ES2015_FUNCTION_REST_PARAMETER JERRY_ES2015
-#endif /* !defined (JERRY_ES2015_FUNCTION_REST_PARAMETER) */
-
-#ifndef JERRY_ES2015_OBJECT_INITIALIZER
-# define JERRY_ES2015_OBJECT_INITIALIZER JERRY_ES2015
-#endif /* !defined (JERRY_ES2015_OBJECT_INITIALIZER) */
-
#ifndef JERRY_ES2015_MODULE_SYSTEM
# define JERRY_ES2015_MODULE_SYSTEM JERRY_ES2015
#endif /* !defined (JERRY_ES2015_MODULE_SYSTEM) */
-#ifndef JERRY_ES2015_TEMPLATE_STRINGS
-# define JERRY_ES2015_TEMPLATE_STRINGS JERRY_ES2015
-#endif /* !defined (JERRY_ES2015_TEMPLATE_STRINGS) */
-
/**
* Engine internal and misc configurations.
*/
# define JERRY_STACK_LIMIT (0)
#endif /* !defined (JERRY_STACK_LIMIT) */
+/**
+ * Maximum depth of recursion during GC mark phase
+ *
+ * Default value: 8
+ */
+#ifndef JERRY_GC_MARK_LIMIT
+# define JERRY_GC_MARK_LIMIT (8)
+#endif /* !defined (JERRY_GC_MARK_LIMIT) */
+
/**
* Enable/Disable property lookup cache.
*
# define JERRY_ATTR_GLOBAL_HEAP
#endif /* !defined (JERRY_ATTR_GLOBAL_HEAP) */
-
/**
* Sanity check for macros to see if the values are 0 or 1
*
|| ((JERRY_ES2015 != 0) && (JERRY_ES2015 != 1))
# error "Invalid value for JERRY_ES2015 macro."
#endif
-#if !defined (JERRY_ES2015_ARROW_FUNCTION) \
-|| ((JERRY_ES2015_ARROW_FUNCTION != 0) && (JERRY_ES2015_ARROW_FUNCTION != 1))
-# error "Invalid value for JERRY_ES2015_ARROW_FUNCTION macro."
-#endif
-#if !defined (JERRY_ES2015_BUILTIN) \
-|| ((JERRY_ES2015_BUILTIN != 0) && (JERRY_ES2015_BUILTIN != 1))
-# error "Invalid value for JERRY_ES2015_BUILTIN macro."
-#endif
-#if !defined (JERRY_ES2015_BUILTIN_ITERATOR) \
-|| ((JERRY_ES2015_BUILTIN_ITERATOR != 0) && (JERRY_ES2015_BUILTIN_ITERATOR != 1))
-# error "Invalid value for JERRY_ES2015_BUILTIN_ITERATOR macro."
-#endif
#if !defined (JERRY_ES2015_BUILTIN_DATAVIEW) \
|| ((JERRY_ES2015_BUILTIN_DATAVIEW != 0) && (JERRY_ES2015_BUILTIN_DATAVIEW != 1))
# error "Invalid value for JERRY_ES2015_BUILTIN_DATAVIEW macro."
|| ((JERRY_ES2015_BUILTIN_MAP != 0) && (JERRY_ES2015_BUILTIN_MAP != 1))
# error "Invalid value for JERRY_ES2015_BUILTIN_MAP macro."
#endif
+#if !defined (JERRY_ES2015_BUILTIN_REFLECT) \
+|| ((JERRY_ES2015_BUILTIN_REFLECT != 0) && (JERRY_ES2015_BUILTIN_REFLECT != 1))
+# error "Invalid value for JERRY_ES2015_BUILTIN_REFLECT macro."
+#endif
#if !defined (JERRY_ES2015_BUILTIN_SET) \
|| ((JERRY_ES2015_BUILTIN_SET != 0) && (JERRY_ES2015_BUILTIN_SET != 1))
# error "Invalid value for JERRY_ES2015_BUILTIN_SET macro."
#endif
+#if !defined (JERRY_ES2015_BUILTIN_WEAKMAP) \
+|| ((JERRY_ES2015_BUILTIN_WEAKMAP != 0) && (JERRY_ES2015_BUILTIN_WEAKMAP != 1))
+# error "Invalid value for JERRY_ES2015_BUILTIN_WEAKMAP macro."
+#endif
+#if !defined (JERRY_ES2015_BUILTIN_WEAKSET) \
+|| ((JERRY_ES2015_BUILTIN_WEAKSET != 0) && (JERRY_ES2015_BUILTIN_WEAKSET != 1))
+# error "Invalid value for JERRY_ES2015_BUILTIN_WEAKSET macro."
+#endif
#if !defined (JERRY_ES2015_BUILTIN_PROMISE) \
|| ((JERRY_ES2015_BUILTIN_PROMISE != 0) && (JERRY_ES2015_BUILTIN_PROMISE != 1))
# error "Invalid value for JERRY_ES2015_BUILTIN_PROMISE macro."
#endif
-#if !defined (JERRY_ES2015_BUILTIN_SYMBOL) \
-|| ((JERRY_ES2015_BUILTIN_SYMBOL != 0) && (JERRY_ES2015_BUILTIN_SYMBOL != 1))
-# error "Invalid value for JERRY_ES2015_BUILTIN_SYMBOL macro."
+#if !defined (JERRY_ES2015_BUILTIN_PROXY) \
+|| ((JERRY_ES2015_BUILTIN_PROXY != 0) && (JERRY_ES2015_BUILTIN_PROXY != 1))
+# error "Invalid value for JERRY_ES2015_BUILTIN_PROXY macro."
#endif
#if !defined (JERRY_ES2015_BUILTIN_TYPEDARRAY) \
|| ((JERRY_ES2015_BUILTIN_TYPEDARRAY != 0) && (JERRY_ES2015_BUILTIN_TYPEDARRAY != 1))
# error "Invalid value for JERRY_ES2015_BUILTIN_TYPEDARRAY macro."
#endif
-#if !defined (JERRY_ES2015_CLASS) \
-|| ((JERRY_ES2015_CLASS != 0) && (JERRY_ES2015_CLASS != 1))
-# error "Invalid value for JERRY_ES2015_CLASS macro."
-#endif
-#if !defined (JERRY_ES2015_FOR_OF) \
-|| ((JERRY_ES2015_FOR_OF != 0) && (JERRY_ES2015_FOR_OF != 1))
-# error "Invalid value for JERRY_ES2015_FOR_OF macro."
-#endif
-#if !defined (JERRY_ES2015_FUNCTION_PARAMETER_INITIALIZER) \
-|| ((JERRY_ES2015_FUNCTION_PARAMETER_INITIALIZER != 0) && (JERRY_ES2015_FUNCTION_PARAMETER_INITIALIZER != 1))
-# error "Invalid value for JERRY_ES2015_FUNCTION_PARAMETER_INITIALIZER macro."
-#endif
-#if !defined (JERRY_ES2015_FUNCTION_REST_PARAMETER) \
-|| ((JERRY_ES2015_FUNCTION_REST_PARAMETER != 0) && (JERRY_ES2015_FUNCTION_REST_PARAMETER != 1))
-# error "Invalid value for JERRY_ES2015_FUNCTION_REST_PARAMETER macro."
-#endif
-#if !defined (JERRY_ES2015_OBJECT_INITIALIZER) \
-|| ((JERRY_ES2015_OBJECT_INITIALIZER != 0) && (JERRY_ES2015_OBJECT_INITIALIZER != 1))
-# error "Invalid value for JERRY_ES2015_OBJECT_INITIALIZER macro."
-#endif
#if !defined (JERRY_ES2015_MODULE_SYSTEM) \
|| ((JERRY_ES2015_MODULE_SYSTEM != 0) && (JERRY_ES2015_MODULE_SYSTEM != 1))
# error "Invalid value for JERRY_ES2015_MODULE_SYSTEM macro."
#endif
-#if !defined (JERRY_ES2015_TEMPLATE_STRINGS) \
-|| ((JERRY_ES2015_TEMPLATE_STRINGS != 0) && (JERRY_ES2015_TEMPLATE_STRINGS != 1))
-# error "Invalid value for JERRY_ES2015_TEMPLATE_STRINGS macro."
-#endif
/**
* Internal options.
#if !defined (JERRY_STACK_LIMIT) || (JERRY_STACK_LIMIT < 0)
# error "Invalid value for 'JERRY_STACK_LIMIT' macro."
#endif
+#if !defined (JERRY_GC_MARK_LIMIT) || (JERRY_GC_MARK_LIMIT < 0)
+# error "Invalid value for 'JERRY_GC_MARK_LIMIT' macro."
+#endif
#if !defined (JERRY_LCACHE) \
|| ((JERRY_LCACHE != 0) && (JERRY_LCACHE != 1))
# error "Invalid value for 'JERRY_LCACHE' macro."
# error "Invalid value for 'JERRY_VM_EXEC_STOP' macro."
#endif
-
#define ENABLED(FEATURE) ((FEATURE) == 1)
#define DISABLED(FEATURE) ((FEATURE) != 1)
# error "Date does not support float32"
#endif
+/**
+ * Wrap container types into a single guard
+ */
+#if ENABLED (JERRY_ES2015_BUILTIN_MAP) || ENABLED (JERRY_ES2015_BUILTIN_SET) \
+|| ENABLED (JERRY_ES2015_BUILTIN_WEAKMAP) || ENABLED (JERRY_ES2015_BUILTIN_WEAKSET)
+# define JERRY_ES2015_BUILTIN_CONTAINER 1
+#else
+# define JERRY_ES2015_BUILTIN_CONTAINER 0
+#endif
+
#endif /* !JERRYSCRIPT_CONFIG_H */
*/
#define ECMA_NULL_POINTER JMEM_CP_NULL
+#if defined (JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY)
+
+/**
+ * JMEM_ALIGNMENT_LOG aligned pointers can be stored directly in ecma_value_t
+ */
+#define ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY
+
+#endif /* JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY */
+
/**
* @}
*/
ECMA_STATUS_HIGH_PRESSURE_GC = (1u << 2), /**< last gc was under high pressure */
#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
ECMA_STATUS_EXCEPTION = (1u << 3), /**< last exception is a normal exception */
+ ECMA_STATUS_ABORT = (1u << 4), /**< last exception is an abort */
} ecma_status_flag_t;
/**
#endif /* ENABLED (JERRY_DEBUGGER) */
/**
- * Option flags for script parsing.
+ * Option flags for parser_parse_script and internal flags for global_status_flags in parser context.
* Note:
- * The enum members must be kept in sync with parser_general_flags_t
- * The last 16 bits are reserved for scope chain index
+ * the last 16 bits is reserved for internal parser flags, because the debugger uses these
+ * 16 bits to encode the scope chain skip index as well (see ECMA_PARSE_CHAIN_INDEX_SHIFT)
*/
typedef enum
{
ECMA_PARSE_NO_OPTS = 0, /**< no options passed */
- ECMA_PARSE_STRICT_MODE = (1u << 0), /**< enable strict mode */
- ECMA_PARSE_DIRECT_EVAL = (1u << 1), /**< eval is called directly (ECMA-262 v5, 15.1.2.1.1) */
- /* These four status flags must be in this order. See PARSER_CLASS_PARSE_OPTS_OFFSET. */
- ECMA_PARSE_CLASS_CONSTRUCTOR = (1u << 2), /**< a class constructor is being parsed (this value must be kept in
- * in sync with PARSER_CLASS_CONSTRUCTOR) */
- ECMA_PARSE_HAS_SUPER = (1u << 3), /**< the current context has super reference */
- ECMA_PARSE_HAS_IMPL_SUPER = (1u << 4), /**< the current context has implicit parent class */
- ECMA_PARSE_HAS_STATIC_SUPER = (1u << 5), /**< the current context is a static class method */
- ECMA_PARSE_EVAL = (1u << 6), /**< eval is called */
+ ECMA_PARSE_STRICT_MODE = (1u << 0), /**< enable strict mode, must be same as PARSER_IS_STRICT */
+ ECMA_PARSE_MODULE = (1u << 1), /**< module is parsed */
+ ECMA_PARSE_EVAL = (1u << 2), /**< eval is called */
+ ECMA_PARSE_DIRECT_EVAL = (1u << 3), /**< eval is called directly (ECMA-262 v5, 15.1.2.1.1) */
+ ECMA_PARSE_CLASS_CONSTRUCTOR = (1u << 4), /**< a class constructor is being parsed */
+
+ /* These four status flags must be in this order. The first three are also parser status flags.
+ * See PARSER_SAVE_STATUS_FLAGS / PARSER_RESTORE_STATUS_FLAGS. */
+ ECMA_PARSE_ALLOW_SUPER = (1u << 5), /**< allow super property access */
+ ECMA_PARSE_ALLOW_SUPER_CALL = (1u << 6), /**< allow super constructor call */
+ ECMA_PARSE_ALLOW_NEW_TARGET = (1u << 7), /**< allow new.target access */
+ ECMA_PARSE_FUNCTION_CONTEXT = (1u << 8), /**< function context is present (ECMA_PARSE_DIRECT_EVAL must be set) */
+
+ ECMA_PARSE_GENERATOR_FUNCTION = (1u << 9), /**< generator function is parsed */
+
+ /* These flags are internally used by the parser. */
+#ifndef JERRY_NDEBUG
+ /**
+ * This flag represents an error in for in/of statements, which cannot be set
+ * if the parsing is completed successfully.
+ */
+ ECMA_PARSE_INTERNAL_FOR_IN_OFF_CONTEXT_ERROR = (1u << 30),
+#endif /* !JERRY_NDEBUG */
} ecma_parse_opts_t;
/**
*/
typedef int32_t ecma_integer_value_t;
-#if UINTPTR_MAX <= UINT32_MAX
-
-/**
- * JMEM_ALIGNMENT_LOG aligned pointers can be stored directly in ecma_value_t
- */
-#define ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY
-
-#endif /* UINTPTR_MAX <= UINT32_MAX */
-
/**
* Mask for ecma types in ecma_value_t
*/
* ecma_op_object_find */
ECMA_VALUE_REGISTER_REF = ECMA_MAKE_VALUE (8), /**< register reference,
* a special "base" value for vm */
- ECMA_VALUE_IMPLICIT_CONSTRUCTOR = ECMA_MAKE_VALUE (9), /**< special value for bound class constructors */
+ ECMA_VALUE_RELEASE_LEX_ENV = ECMA_MAKE_VALUE (9), /**< if this error remains on the stack when an exception occours
+ the top lexical environment of the VM frame should be popped */
+ ECMA_VALUE_UNINITIALIZED = ECMA_MAKE_VALUE (10), /**< a special value for uninitialized let/const declarations */
+ ECMA_VALUE_SPREAD_ELEMENT = ECMA_MAKE_VALUE (11), /**< a special value for spread elements in array initialization
+ * or function call argument list */
};
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
* that are not indices */
ECMA_LIST_ENUMERABLE = (1 << 1), /**< exclude non-enumerable properties */
ECMA_LIST_PROTOTYPE = (1 << 2), /**< list properties from prototype chain */
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
- ECMA_LIST_SYMBOLS = (1 << 3), /**< list symbol properties only */
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
- ECMA_LIST_CONVERT_FAST_ARRAYS = (1 << 4), /**< after listing the properties convert
+#if ENABLED (JERRY_ES2015)
+ ECMA_LIST_SYMBOLS = (1 << 3), /**< list symbol properties */
+ ECMA_LIST_SYMBOLS_ONLY = (1 << 4), /**< list symbol properties only */
+#endif /* ENABLED (JERRY_ES2015) */
+ ECMA_LIST_CONVERT_FAST_ARRAYS = (1 << 5), /**< after listing the properties convert
* the fast access mode array back to normal array */
} ecma_list_properties_options_t;
*/
#define ECMA_PROPERTY_FIXED 0
+/**
+ * Default flag of length property.
+ */
+#if ENABLED (JERRY_ES2015)
+#define ECMA_PROPERTY_FLAG_DEFAULT_LENGTH ECMA_PROPERTY_FLAG_CONFIGURABLE
+#else /* !ENABLED (JERRY_ES2015) */
+#define ECMA_PROPERTY_FLAG_DEFAULT_LENGTH ECMA_PROPERTY_FIXED
+#endif /* ENABLED (JERRY_ES2015) */
+
/**
* Shift for property name part.
*/
ECMA_PROPERTY_GET_NO_OPTIONS = 0, /**< no option flags for ecma_op_object_get_property */
ECMA_PROPERTY_GET_VALUE = 1u << 0, /**< fill virtual_value field for virtual properties */
ECMA_PROPERTY_GET_EXT_REFERENCE = 1u << 1, /**< get extended reference to the property */
+ ECMA_PROPERTY_GET_HAS_OWN_PROP = 1u << 2, /**< internal [[HasOwnProperty]] method */
} ecma_property_get_option_bits_t;
/**
{
ECMA_OBJECT_TYPE_GENERAL = 0, /**< all objects that are not belongs to the sub-types below. */
ECMA_OBJECT_TYPE_CLASS = 1, /**< Objects with class property */
- ECMA_OBJECT_TYPE_FUNCTION = 2, /**< Function objects (15.3), created through 13.2 routine */
- ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION = 3, /**< External (host) function object */
- ECMA_OBJECT_TYPE_ARRAY = 4, /**< Array object (15.4) */
- ECMA_OBJECT_TYPE_BOUND_FUNCTION = 5, /**< Function objects (15.3), created through 15.3.4.5 routine */
- ECMA_OBJECT_TYPE_PSEUDO_ARRAY = 6, /**< Array-like object, such as Arguments object (10.6) */
-#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
- ECMA_OBJECT_TYPE_ARROW_FUNCTION = 7, /**< arrow function objects */
-#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
-
+ ECMA_OBJECT_TYPE_ARRAY = 2, /**< Array object (15.4) */
+ ECMA_OBJECT_TYPE_PSEUDO_ARRAY = 3, /**< Array-like object, such as Arguments object (10.6) */
+ ECMA_OBJECT_TYPE_PROXY = 4, /**< Proxy object ECMAScript v6 26.2 */
+ /* Note: these 4 types must be in this order. See IsCallable operation. */
+ ECMA_OBJECT_TYPE_FUNCTION = 5, /**< Function objects (15.3), created through 13.2 routine */
+ ECMA_OBJECT_TYPE_BOUND_FUNCTION = 6, /**< Function objects (15.3), created through 15.3.4.5 routine */
+ ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION = 7, /**< External (host) function object */
/* Types between 13-15 cannot have a built-in flag. See ecma_lexical_environment_type_t. */
ECMA_OBJECT_TYPE__MAX /**< maximum value */
ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE = 13, /**< declarative lexical environment */
ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND = 14, /**< object-bound lexical environment
* with provideThis flag */
- ECMA_LEXICAL_ENVIRONMENT_SUPER_OBJECT_BOUND = 15, /**< object-bound lexical environment
- * with provided super reference */
+ ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND = 15, /**< object-bound lexical environment
+ * with provided home object reference */
ECMA_LEXICAL_ENVIRONMENT_TYPE_START = ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE, /**< first lexical
* environment type */
- ECMA_LEXICAL_ENVIRONMENT_TYPE__MAX = ECMA_LEXICAL_ENVIRONMENT_SUPER_OBJECT_BOUND /**< maximum value */
+ ECMA_LEXICAL_ENVIRONMENT_TYPE__MAX = ECMA_LEXICAL_ENVIRONMENT_HOME_OBJECT_BOUND /**< maximum value */
} ecma_lexical_environment_type_t;
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
+#if ENABLED (JERRY_ES2015)
+
/**
* Types of array iterators.
*/
ECMA_ITERATOR_KEYS, /**< List only key indices */
ECMA_ITERATOR_VALUES, /**< List only key values */
ECMA_ITERATOR_KEYS_VALUES, /**< List key indices and values */
-} ecma_iterator_type_t;
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
+} ecma_array_iterator_type_t;
+
+#endif /* ENABLED (JERRY_ES2015) */
/**
* Offset for JERRY_CONTEXT (status_flags) top 8 bits.
*/
-#define ECMA_SUPER_EVAL_OPTS_OFFSET (32 - 8)
+#define ECMA_LOCAL_PARSE_OPTS_OFFSET ((sizeof (uint32_t) - sizeof (uint8_t)) * JERRY_BITSINBYTE)
/**
* Set JERRY_CONTEXT (status_flags) top 8 bits to the specified 'opts'.
*/
-#define ECMA_SET_SUPER_EVAL_PARSER_OPTS(opts) \
+#define ECMA_SET_LOCAL_PARSE_OPTS(opts) \
do \
{ \
- JERRY_CONTEXT (status_flags) |= ((uint32_t) opts << ECMA_SUPER_EVAL_OPTS_OFFSET) | ECMA_STATUS_DIRECT_EVAL; \
+ JERRY_CONTEXT (status_flags) |= ((uint32_t) opts << ECMA_LOCAL_PARSE_OPTS_OFFSET) | ECMA_STATUS_DIRECT_EVAL; \
} while (0)
/**
* Get JERRY_CONTEXT (status_flags) top 8 bits.
*/
-#define ECMA_GET_SUPER_EVAL_PARSER_OPTS() (JERRY_CONTEXT (status_flags) >> ECMA_SUPER_EVAL_OPTS_OFFSET)
+#define ECMA_GET_LOCAL_PARSE_OPTS() \
+ (JERRY_CONTEXT (status_flags) >> (ECMA_LOCAL_PARSE_OPTS_OFFSET - JERRY_LOG2 (ECMA_PARSE_ALLOW_SUPER)))
/**
* Clear JERRY_CONTEXT (status_flags) top 8 bits.
*/
-#define ECMA_CLEAR_SUPER_EVAL_PARSER_OPTS() \
+#define ECMA_CLEAR_LOCAL_PARSE_OPTS() \
do \
{ \
- JERRY_CONTEXT (status_flags) &= ((1 << ECMA_SUPER_EVAL_OPTS_OFFSET) - 1); \
+ JERRY_CONTEXT (status_flags) &= ((1 << ECMA_LOCAL_PARSE_OPTS_OFFSET) - 1); \
} while (0)
/**
/**
* Non closure flag for debugger.
*/
-#if ENABLED (JERRY_DEBUGGER)
-#define ECMA_OBJECT_FLAG_NON_CLOSURE 0x20
-#endif /* ENABLED (JERRY_DEBUGGER) */
+#define ECMA_OBJECT_FLAG_BLOCK ECMA_OBJECT_FLAG_EXTENSIBLE
+
+/**
+ * Bitshift index for an ecma-object reference count field
+ */
+#define ECMA_OBJECT_REF_SHIFT 6
+
+/**
+ * Bitmask for an ecma-object reference count field
+ */
+#define ECMA_OBJECT_REF_MASK (((1u << 10) - 1) << ECMA_OBJECT_REF_SHIFT)
/**
* Value for increasing or decreasing the object reference counter.
*/
-#define ECMA_OBJECT_REF_ONE (1u << 6)
+#define ECMA_OBJECT_REF_ONE (1u << ECMA_OBJECT_REF_SHIFT)
/**
- * Maximum value of the object reference counter (1023).
+ * Represents non-visited white object
*/
-#define ECMA_OBJECT_MAX_REF (0x3ffu << 6)
+#define ECMA_OBJECT_NON_VISITED (0x3ffu << ECMA_OBJECT_REF_SHIFT)
+
+/**
+ * Maximum value of the object reference counter (1022).
+ */
+#define ECMA_OBJECT_MAX_REF (ECMA_OBJECT_NON_VISITED - ECMA_OBJECT_REF_ONE)
/**
* Description of ECMA-object or lexical environment
/** type : 4 bit : ecma_object_type_t or ecma_lexical_environment_type_t
depending on ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV
flags : 2 bit : ECMA_OBJECT_FLAG_BUILT_IN_OR_LEXICAL_ENV,
- ECMA_OBJECT_FLAG_EXTENSIBLE or ECMA_OBJECT_FLAG_NON_CLOSURE
- refs : 10 bit (max 1023) */
+ ECMA_OBJECT_FLAG_EXTENSIBLE or ECMA_OBJECT_FLAG_BLOCK
+ refs : 10 bit (max 1022) */
uint16_t type_flags_refs;
/** next in the object chain maintained by the garbage collector */
union
{
jmem_cpointer_t property_list_cp; /**< compressed pointer to object's
- * or declerative lexical environments's property list */
+ * or declerative lexical environments's property list */
jmem_cpointer_t bound_object_cp; /**< compressed pointer to lexical environments's the bound object */
+ jmem_cpointer_t home_object_cp; /**< compressed pointer to lexical environments's the home object */
} u1;
/** object prototype or outer reference */
uint8_t length_and_bitset_size; /**< length for built-in functions and
* bit set size for all built-ins */
uint16_t routine_id; /**< routine id for built-in functions */
- uint32_t instantiated_bitset[1]; /**< bit set for instantiated properties */
+ union
+ {
+ uint32_t instantiated_bitset[1]; /**< bit set for instantiated properties */
+ struct
+ {
+ uint16_t name; /**< name of the built-in functions */
+ uint16_t bitset; /**< bit set for instantiated properties of builtin functions */
+ } builtin_routine;
+ } u;
} ecma_built_in_props_t;
/**
{
ecma_value_t value; /**< value of the object (e.g. boolean, number, string, etc.) */
uint32_t length; /**< length related property (e.g. length of ArrayBuffer) */
+ ecma_value_t target; /**< [[ProxyTarget]] internal property */
} u;
} class_prop;
*/
struct
{
- ecma_value_t scope_cp; /**< function scope */
+ jmem_cpointer_tag_t scope_cp; /**< function scope */
ecma_value_t bytecode_cp; /**< function byte code */
} function;
struct
{
uint32_t length; /**< length property value */
- ecma_property_t length_prop; /**< length property */
- bool is_fast_mode; /**< true - if the array is a fast access mode array
- * false - otherwise */
- uint8_t hole_count; /**< Number of array holes in a fast access mode array */
+ union
+ {
+ ecma_property_t length_prop; /**< length property */
+ uint32_t hole_count; /**< number of array holes in a fast access mode array
+ * multiplied ECMA_FAST_ACCESS_HOLE_ONE */
+ } u;
+
} array;
/**
ecma_value_t lex_env_cp; /**< for arguments: lexical environment */
ecma_value_t arraybuffer; /**< for typedarray: internal arraybuffer */
ecma_value_t iterated_value; /**< for %Iterator%: [[IteratedObject]] property */
+ ecma_value_t spread_value; /**< for spread object: spreaded element */
} u2;
} pseudo_array;
*/
struct
{
- ecma_value_t target_function; /**< target function */
+ jmem_cpointer_tag_t target_function; /**< target function */
ecma_value_t args_len_or_this; /**< length of arguments or this value */
} bound_function;
#define ECMA_FAST_ARRAY_ALIGN_LENGTH(length) \
(uint32_t) ((((length)) + ECMA_FAST_ARRAY_ALIGNMENT - 1) / ECMA_FAST_ARRAY_ALIGNMENT * ECMA_FAST_ARRAY_ALIGNMENT)
-
/**
* Compiled byte code data.
*/
* If regexp, the other flags must be RE_FLAG... */
} ecma_compiled_code_t;
+/**
+ * Description of bound function objects.
+ */
+typedef struct
+{
+ ecma_extended_object_t header; /**< extended object header */
+#if ENABLED (JERRY_ES2015)
+ ecma_integer_value_t target_length; /**< length of target function */
+#endif /* ENABLED (JERRY_ES2015) */
+} ecma_bound_function_t;
+
#if ENABLED (JERRY_SNAPSHOT_EXEC)
/**
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
-#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
+#if ENABLED (JERRY_ES2015)
/**
* Description of arrow function objects.
*/
typedef struct
{
- ecma_object_t object; /**< object header */
+ ecma_extended_object_t header; /**< extended object header */
ecma_value_t this_binding; /**< value of 'this' binding */
- jmem_cpointer_t scope_cp; /**< function scope */
- jmem_cpointer_t bytecode_cp; /**< function byte code */
+ ecma_value_t new_target; /**< value of new.target */
} ecma_arrow_function_t;
#if ENABLED (JERRY_SNAPSHOT_EXEC)
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
-#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
+#endif /* ENABLED (JERRY_ES2015) */
+
+#if ENABLED (JERRY_ES2015_BUILTIN_CONTAINER)
+/**
+ * Flags for container objects
+ */
+typedef enum
+{
+ ECMA_CONTAINER_FLAGS_EMPTY = (0), /** empty flags */
+ ECMA_CONTAINER_FLAGS_WEAK = (1 << 0) /** container object is weak */
+} ecma_container_flags_t;
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP) || ENABLED (JERRY_ES2015_BUILTIN_SET)
/**
- * Description of Map/Set objects.
+ * Description of map collection.
*/
typedef struct
{
- ecma_extended_object_t header; /**< header part */
- uint32_t size; /**< size of the map object */
-} ecma_map_object_t;
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) || ENABLED (JERRY_ES2015_BUILTIN_SET) */
+ ecma_value_t key; /**< key value */
+ ecma_value_t value; /**< value of the key */
+} ecma_container_pair_t;
+
+/**
+ * Size of a single element (in ecma_value_t unit).
+ */
+#define ECMA_CONTAINER_VALUE_SIZE 1
+
+/**
+ * Size of a key - value pair (in ecma_value_t unit).
+ */
+#define ECMA_CONTAINER_PAIR_SIZE 2
+
+/**
+ * Size of the internal buffer.
+ */
+#define ECMA_CONTAINER_GET_SIZE(container_p) \
+ (container_p->buffer_p[0])
+
+/**
+ * Remove the size field of the internal buffer.
+ */
+#define ECMA_CONTAINER_SET_SIZE(container_p, size) \
+ (container_p->buffer_p[0] = (ecma_value_t) (size))
+
+/**
+ * Number of entries of the internal buffer.
+ */
+#define ECMA_CONTAINER_ENTRY_COUNT(collection_p) \
+ (collection_p->item_count - 1)
+
+/**
+ * Pointer to the first entry of the internal buffer.
+ */
+#define ECMA_CONTAINER_START(collection_p) \
+ (collection_p->buffer_p + 1)
+
+#endif /* ENABLED (JERRY_ES2015_BUILTIN_CONTAINER) */
typedef enum
{
* See also: ECMA_262 v5, 15.7.3.2
*/
# define ECMA_NUMBER_MAX_VALUE (FLT_MAX)
+/**
+ * Number.EPSILON
+ *
+ * See also: ECMA_262 v6, 20.1.2.1
+ */
+# define ECMA_NUMBER_EPSILON ((ecma_number_t) 1.1920928955078125e-7)
+
+/**
+ * Number.MAX_SAFE_INTEGER
+ *
+ * See also: ECMA_262 v6, 20.1.2.6
+ */
+# define ECMA_NUMBER_MAX_SAFE_INTEGER ((ecma_number_t) 0xFFFFFF)
+
+/**
+ * Number.MIN_SAFE_INTEGER
+ *
+ * See also: ECMA_262 v6, 20.1.2.8
+ */
+# define ECMA_NUMBER_MIN_SAFE_INTEGER ((ecma_number_t) -0xFFFFFF)
#elif ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
/**
* Number.MAX_VALUE (i.e., the maximum value of ecma-number)
* See also: ECMA_262 v5, 15.7.3.2
*/
# define ECMA_NUMBER_MAX_VALUE ((ecma_number_t) 1.7976931348623157e+308)
+
/**
* Number.MIN_VALUE (i.e., the smallest positive value of ecma-number)
*
* See also: ECMA_262 v5, 15.7.3.3
*/
# define ECMA_NUMBER_MIN_VALUE ((ecma_number_t) 5e-324)
-#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
-#if ENABLED (JERRY_ES2015_BUILTIN)
+
/**
* Number.EPSILON
*
* See also: ECMA_262 v6, 20.1.2.1
*/
# define ECMA_NUMBER_EPSILON ((ecma_number_t) 2.2204460492503130808472633361816e-16)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
-#if ENABLED (JERRY_ES2015_BUILTIN)
+
/**
* Number.MAX_SAFE_INTEGER
*
- * See also: ECMA_262 v6, 20.1.2.1
+ * See also: ECMA_262 v6, 20.1.2.6
*/
# define ECMA_NUMBER_MAX_SAFE_INTEGER ((ecma_number_t) 0x1FFFFFFFFFFFFF)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
+
+/**
+ * Number.MIN_SAFE_INTEGER
+ *
+ * See also: ECMA_262 v6, 20.1.2.8
+ */
+# define ECMA_NUMBER_MIN_SAFE_INTEGER ((ecma_number_t) -0x1FFFFFFFFFFFFF)
+#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
+
/**
* Euler number
*/
ECMA_STRING_CONTAINER_SYMBOL, /**< the ecma-string is a symbol */
- ECMA_STRING_CONTAINER_MAP_KEY, /**< the ecma-string is a map key string */
-
- ECMA_STRING_CONTAINER__MAX = ECMA_STRING_CONTAINER_MAP_KEY /**< maximum value */
+ ECMA_STRING_CONTAINER__MAX = ECMA_STRING_CONTAINER_SYMBOL /**< maximum value */
} ecma_string_container_t;
/**
/**
* Function callback descriptor of a %TypedArray% object getter
*/
-typedef ecma_number_t (*ecma_typedarray_getter_fn_t)(lit_utf8_byte_t *src);
+typedef ecma_number_t (*ecma_typedarray_getter_fn_t) (lit_utf8_byte_t *src);
/**
* Function callback descriptor of a %TypedArray% object setter
*/
-typedef void (*ecma_typedarray_setter_fn_t)(lit_utf8_byte_t *src, ecma_number_t value);
+typedef void (*ecma_typedarray_setter_fn_t) (lit_utf8_byte_t *src, ecma_number_t value);
/**
* Builtin id for the different types of TypedArray's
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+#if ENABLED (JERRY_ES2015)
+
+/**
+ * Executable (e.g. generator, async) object flags.
+ */
+typedef enum
+{
+ ECMA_EXECUTABLE_OBJECT_COMPLETED = (1u << 0), /**< executable object is completed and cannot be resumed */
+ ECMA_EXECUTABLE_OBJECT_RUNNING = (1u << 1), /**< executable object is currently running */
+ /* Generator specific flags. */
+ ECMA_GENERATOR_ITERATE_AND_YIELD = (1u << 2), /**< the generator performs a yield* operation */
+} ecma_executable_object_flags_t;
+
+/**
+ * Checks whether the executable object is waiting for resuming.
+ */
+#define ECMA_EXECUTABLE_OBJECT_IS_SUSPENDED(extra_info) \
+ (!((extra_info) & (ECMA_EXECUTABLE_OBJECT_COMPLETED | ECMA_EXECUTABLE_OBJECT_RUNNING)))
+
+#endif /* ENABLED (JERRY_ES2015) */
+
#if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW)
/**
* Description of DataView objects.
#define ECMA_SYMBOL_HASH_SHIFT 2
#if (JERRY_STACK_LIMIT != 0)
+/**
+ * Set the jerry context stack limit for IAR.
+ */
+#define JERRY_IAR_MEM_STACK_LIMIT (4480) // > 4136b, 3500; < 4.5 * 1024 = 4608
+
+/**
+ * Check the current jerry context stack usage.
+ */
+#define CHECK_JERRY_STACK_USAGE(context_p) \
+do \
+{ \
+ if (ecma_get_current_stack_usage () > JERRY_IAR_MEM_STACK_LIMIT) \
+ { \
+ parser_raise_error (context_p, PARSER_ERR_JERRY_STACK_LIMIT_REACHED); \
+ } \
+} while (0)
+
/**
* Check the current stack usage. If the limit is reached a RangeError is raised.
*/
* If the stack limit is unlimited, this check is an empty macro.
*/
#define ECMA_CHECK_STACK_USAGE()
+#define CHECK_JERRY_STACK_USAGE(context_p)
#endif /* (JERRY_STACK_LIMIT != 0) */
+/**
+ * Invalid object pointer which represents abrupt completion
+ */
+#define ECMA_OBJECT_POINTER_ERROR ((ecma_object_t *) 0x01)
+
+#if ENABLED (JERRY_ES2015_BUILTIN_PROXY)
+/**
+ * Description of Proxy objects.
+ */
+typedef struct
+{
+ ecma_object_t header; /**< header part */
+ ecma_value_t target; /**< [[ProxyTarget]] internal slot */
+ ecma_value_t handler; /**< [[ProxyHandler]] internal slot */
+} ecma_proxy_object_t;
+
+/**
+ * Description of Proxy objects.
+ */
+typedef struct
+{
+ ecma_extended_object_t header; /**< header part */
+ ecma_value_t proxy; /**< [[RevocableProxy]] internal slot */
+} ecma_revocable_proxy_object_t;
+#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROXY) */
+
/**
* @}
* @}
/**
* Minor version of JerryScript API.
*/
-#define JERRY_API_MINOR_VERSION 1
+#define JERRY_API_MINOR_VERSION 3
/**
* Patch version of JerryScript API.
JERRY_FEATURE_LOGGING, /**< logging */
JERRY_FEATURE_SYMBOL, /**< symbol support */
JERRY_FEATURE_DATAVIEW, /**< DataView support */
+ JERRY_FEATURE_PROXY, /**< Proxy support */
+ JERRY_FEATURE_MAP, /**< Map support */
+ JERRY_FEATURE_SET, /**< Set support */
+ JERRY_FEATURE_WEAKMAP, /**< WeakMap support */
+ JERRY_FEATURE_WEAKSET, /**< WeakSet support */
JERRY_FEATURE__COUNT /**< number of features. NOTE: must be at the end of the list */
} jerry_feature_t;
JERRY_BIN_OP_GREATER, /**< greater relation (>) */
JERRY_BIN_OP_GREATER_EQUAL, /**< greater or equal relation (>=)*/
JERRY_BIN_OP_INSTANCEOF, /**< instanceof operation */
+ JERRY_BIN_OP_ADD, /**< addition operator (+) */
+ JERRY_BIN_OP_SUB, /**< subtraction operator (-) */
+ JERRY_BIN_OP_MUL, /**< multiplication operator (*) */
+ JERRY_BIN_OP_DIV, /**< division operator (/) */
+ JERRY_BIN_OP_REM, /**< remainder operator (%) */
} jerry_binary_operation_t;
/**
bool jerry_value_is_null (const jerry_value_t value);
bool jerry_value_is_object (const jerry_value_t value);
bool jerry_value_is_promise (const jerry_value_t value);
+bool jerry_value_is_proxy (const jerry_value_t value);
bool jerry_value_is_string (const jerry_value_t value);
bool jerry_value_is_symbol (const jerry_value_t value);
bool jerry_value_is_undefined (const jerry_value_t value);
jerry_value_t jerry_create_null (void);
jerry_value_t jerry_create_object (void);
jerry_value_t jerry_create_promise (void);
+jerry_value_t jerry_create_proxy (const jerry_value_t target, const jerry_value_t handler);
jerry_value_t jerry_create_regexp (const jerry_char_t *pattern, uint16_t flags);
jerry_value_t jerry_create_regexp_sz (const jerry_char_t *pattern, jerry_size_t pattern_size, uint16_t flags);
jerry_value_t jerry_create_string_from_utf8 (const jerry_char_t *str_p);
*/
jerry_value_t jerry_has_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);
jerry_value_t jerry_has_own_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);
+bool jerry_has_internal_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);
bool jerry_delete_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);
bool jerry_delete_property_by_index (const jerry_value_t obj_val, uint32_t index);
+bool jerry_delete_internal_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);
jerry_value_t jerry_get_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);
jerry_value_t jerry_get_property_by_index (const jerry_value_t obj_val, uint32_t index);
+jerry_value_t jerry_get_internal_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val);
jerry_value_t jerry_set_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val,
const jerry_value_t value_to_set);
jerry_value_t jerry_set_property_by_index (const jerry_value_t obj_val, uint32_t index,
const jerry_value_t value_to_set);
+bool jerry_set_internal_property (const jerry_value_t obj_val, const jerry_value_t prop_name_val,
+ const jerry_value_t value_to_set);
void jerry_init_property_descriptor_fields (jerry_property_descriptor_t *prop_desc_p);
jerry_value_t jerry_define_own_property (const jerry_value_t obj_val,
void *user_data_p);
/**
- * Promise resolve/reject functions.
+ * Promise functions.
*/
jerry_value_t jerry_resolve_or_reject_promise (jerry_value_t promise, jerry_value_t argument, bool is_resolve);
+/**
+ * Enum values representing various Promise states.
+ */
+typedef enum
+{
+ JERRY_PROMISE_STATE_NONE = 0u, /**< Invalid/Unknown state (possibly called on a non-promise object). */
+ JERRY_PROMISE_STATE_PENDING, /**< Promise is in "Pending" state. */
+ JERRY_PROMISE_STATE_FULFILLED, /**< Promise is in "Fulfilled" state. */
+ JERRY_PROMISE_STATE_REJECTED, /**< Promise is in "Rejected" state. */
+} jerry_promise_state_t;
+
+jerry_value_t jerry_get_promise_result (const jerry_value_t promise);
+jerry_promise_state_t jerry_get_promise_state (const jerry_value_t promise);
+
/**
* Symbol functions.
*/
*/
void jerry_set_vm_exec_stop_callback (jerry_vm_exec_stop_callback_t stop_cb, void *user_p, uint32_t frequency);
jerry_value_t jerry_get_backtrace (uint32_t max_depth);
+jerry_value_t jerry_get_resource_name (const jerry_value_t value);
+jerry_value_t jerry_get_new_target (void);
/**
* Array buffer components.
jerry_length_t buf_size);
jerry_length_t jerry_get_arraybuffer_byte_length (const jerry_value_t value);
uint8_t *jerry_get_arraybuffer_pointer (const jerry_value_t value);
+jerry_value_t jerry_is_arraybuffer_detachable (const jerry_value_t value);
+jerry_value_t jerry_detach_arraybuffer (const jerry_value_t value);
/**
* DataView functions.
JERRY_TYPEDARRAY_FLOAT64,
} jerry_typedarray_type_t;
+/**
+ * Container types.
+ */
+typedef enum
+{
+ JERRY_CONTAINER_TYPE_INVALID = 0, /**< Invalid container */
+ JERRY_CONTAINER_TYPE_MAP, /**< Map type */
+ JERRY_CONTAINER_TYPE_SET, /**< Set type */
+ JERRY_CONTAINER_TYPE_WEAKMAP, /**< WeakMap type */
+ JERRY_CONTAINER_TYPE_WEAKSET, /**< WeakSet type */
+} jerry_container_type_t;
bool jerry_value_is_typedarray (jerry_value_t value);
jerry_value_t jerry_create_typedarray (jerry_typedarray_type_t type_name, jerry_length_t length);
jerry_length_t *byte_length);
jerry_value_t jerry_json_parse (const jerry_char_t *string_p, jerry_size_t string_size);
jerry_value_t jerry_json_stringify (const jerry_value_t object_to_stringify);
+jerry_value_t jerry_create_container (jerry_container_type_t container_type,
+ const jerry_value_t *arguments_list_p,
+ jerry_length_t arguments_list_len);
+jerry_container_type_t jerry_get_container_type (const jerry_value_t value);
+
+#if defined(JERRY_HEAPDUMP)
+void JerryHeapdumpRun(const char* filepath);
+#endif
+
+#if defined(JERRY_REF_TRACKER)
+void JerryRefTrackerStart(const char* filepath);
+void JerryRefTrackerStop(void);
+#endif
/**
* @}
ERR_OUT_OF_MEMORY = 10,
ERR_REF_COUNT_LIMIT = 12,
ERR_DISABLED_BYTE_CODE = 13,
+ ERR_UNTERMINATED_GC_LOOPS = 14,
ERR_FAILED_INTERNAL_ASSERTION = 120
} jerry_fatal_code_t;
/**
* Jerry snapshot format version.
*/
-#define JERRY_SNAPSHOT_VERSION (24u)
+#define JERRY_SNAPSHOT_VERSION (49u)
/**
* Flags for jerry_generate_snapshot and jerry_generate_function_snapshot.
#include "jerryscript-debugger.h"
#include "jerryscript-snapshot.h"
+#ifdef JERRY_IAR_JUPITER
+#include "ohos_mem_pool.h"
+#endif // JERRY_IAR_JUPITER
+
#endif /* !JERRYSCRIPT_H */
*/
#define JMEM_ALIGNMENT (1u << JMEM_ALIGNMENT_LOG)
+/**
+ * Pointer value can be directly stored without compression
+ */
+#if UINTPTR_MAX <= UINT32_MAX
+#define JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY
+#endif /* UINTPTR_MAX <= UINT32_MAX */
+
+/**
+ * Mask for tag part in jmem_cpointer_tag_t
+ */
+#define JMEM_TAG_MASK 0x7u
+
+/**
+ * Shift for tag part in jmem_cpointer_tag_t
+ */
+#if defined (JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY) && ENABLED (JERRY_CPOINTER_32_BIT)
+#define JMEM_TAG_SHIFT 0
+#else /* !JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY || !ENABLED (JERRY_CPOINTER_32_BIT) */
+#define JMEM_TAG_SHIFT 3
+#endif /* JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY && ENABLED (JERRY_CPOINTER_32_BIT) */
+
+/**
+ * Bit mask for tag part in jmem_cpointer_tag_t
+ */
+enum
+{
+ JMEM_FIRST_TAG_BIT_MASK = (1u << 0), /**< first tag bit mask **/
+ JMEM_SECOND_TAG_BIT_MASK = (1u << 1), /**< second tag bit mask **/
+ JMEM_THIRD_TAG_BIT_MASK = (1u << 2), /**< third tag bit mask **/
+};
+
/**
* Compressed pointer representations
*
typedef uint16_t jmem_cpointer_t;
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
+/**
+ * Compressed pointer with tag value
+ */
+typedef uint32_t jmem_cpointer_tag_t;
+
/**
* Memory usage pressure for reclaiming unused memory.
*
} \
} while (false);
+/**
+ * Set value of pointer-tag value so that it will correspond
+ * to specified non_compressed_pointer along with tag
+ */
+#define JMEM_CP_SET_NON_NULL_POINTER_TAG(cp_value, pointer, tag) \
+ do \
+ { \
+ JERRY_ASSERT ((uintptr_t) tag < (uintptr_t) (JMEM_ALIGNMENT)); \
+ jmem_cpointer_tag_t compressed_ptr = jmem_compress_pointer (pointer); \
+ (cp_value) = (jmem_cpointer_tag_t) ((compressed_ptr << JMEM_TAG_SHIFT) | tag); \
+ } while (false);
+
+/**
+ * Extract value of pointer from specified pointer-tag value
+ */
+#define JMEM_CP_GET_NON_NULL_POINTER_FROM_POINTER_TAG(type, cp_value) \
+ ((type *) (jmem_decompress_pointer ((cp_value & ~JMEM_TAG_MASK) >> JMEM_TAG_SHIFT)))
+
+/**
+ * Get value of each tag from specified pointer-tag value
+ */
+#define JMEM_CP_GET_FIRST_BIT_FROM_POINTER_TAG(cp_value) \
+ (cp_value & JMEM_FIRST_TAG_BIT_MASK) /**< get first tag bit **/
+#define JMEM_CP_GET_SECOND_BIT_FROM_POINTER_TAG(cp_value) \
+ (cp_value & JMEM_SECOND_TAG_BIT_MASK) /**< get second tag bit **/
+#define JMEM_CP_GET_THIRD_BIT_FROM_POINTER_TAG(cp_value) \
+ (cp_value & JMEM_THIRD_TAG_BIT_MASK) /**< get third tag bit **/
+
+/**
+ * Set value of each tag to specified pointer-tag value
+ */
+#define JMEM_CP_SET_FIRST_BIT_TO_POINTER_TAG(cp_value) \
+ (cp_value) = (cp_value | JMEM_FIRST_TAG_BIT_MASK) /**< set first tag bit **/
+#define JMEM_CP_SET_SECOND_BIT_TO_POINTER_TAG(cp_value) \
+ (cp_value) = (cp_value | JMEM_SECOND_TAG_BIT_MASK) /**< set second tag bit **/
+#define JMEM_CP_SET_THIRD_BIT_TO_POINTER_TAG(cp_value) \
+ (cp_value) = (cp_value | JMEM_THIRD_TAG_BIT_MASK) /**< set third tag bit **/
+
/**
* @}
* \addtogroup poolman Memory pool manager
LIT_INTERNAL_MAGIC_STRING_PROMISE_PROPERTY_RESOLVE, /**< [[Resolve]] property */
LIT_INTERNAL_MAGIC_STRING_PROMISE_PROPERTY_REJECT, /**< [[Reject]] property */
LIT_INTERNAL_MAGIC_STRING_PROMISE_PROPERTY_CAPABILITY, /**< [[Capability]] property */
- LIT_INTERNAL_MAGIC_STRING_PROMISE_PROPERTY_HANDLER, /**< [[Handler]] property */
LIT_INTERNAL_MAGIC_STRING_PROMISE_PROPERTY_ALREADY_CALLED, /**< [[AlreadyCalled]] property */
LIT_INTERNAL_MAGIC_STRING_PROMISE_PROPERTY_INDEX, /**< [[Index]] property */
LIT_INTERNAL_MAGIC_STRING_PROMISE_PROPERTY_VALUE, /**< [[Values]] property */
LIT_INTERNAL_MAGIC_STRING_PROMISE_PROPERTY_REMAINING_ELEMENT, /**< [[RemainingElement]] property */
LIT_INTERNAL_MAGIC_STRING_ITERATOR_NEXT_INDEX, /**< [[%Iterator%NextIndex]] property */
LIT_INTERNAL_MAGIC_STRING_MAP_KEY, /**< Property key used when an object is a key in a map object */
+ LIT_INTERNAL_MAGIC_API_INTERNAL, /**< Property key used to add non-visible JS properties from the public API */
+ LIT_INTERNAL_MAGIC_STRING_ARRAY_PROTOTYPE_VALUES, /**< %ArrayProto_values% intrinsic routine */
+ LIT_INTERNAL_MAGIC_THIS_BINDING_VALUE, /**< FunctionEnvironmentRecord [[ThisBindingValue]] internal slot */
/* List of well known symbols */
LIT_GLOBAL_SYMBOL_HAS_INSTANCE, /**< @@hasInstance well known symbol */
LIT_GLOBAL_SYMBOL_IS_CONCAT_SPREADABLE, /**< @@isConcatSpreadable well known symbol */
LIT_INTERNAL_MAGIC_STRING_NATIVE_POINTER, /**< native pointer info associated with an object */
LIT_FIRST_INTERNAL_MAGIC_STRING = LIT_INTERNAL_MAGIC_STRING_NATIVE_POINTER, /**< first index of internal
* magic strings */
- LIT_INTERNAL_MAGIC_STRING_CLASS_THIS_BINDING, /**< the this binding of the class constructor */
+ LIT_INTERNAL_MAGIC_STRING_WEAK_REFS, /**< Weak references to the current object */
+ LIT_INTERNAL_MAGIC_STRING_INTERNAL_OBJECT, /**< Internal object ID for internal properties */
LIT_MAGIC_STRING__COUNT /**< number of magic strings */
} lit_magic_string_id_t;
/* This file is automatically generated by the gen-magic-strings.py script
* from lit-magic-strings.ini. Do not edit! */
-
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING__EMPTY, "")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SPACE_CHAR, " ")
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RIGHT_PAREN, ")")
-#endif
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASTERIX_CHAR, "*")
#endif
+#if ENABLED (JERRY_BUILTIN_ARRAY) \
+|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COMMA_CHAR, ",")
-LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COLON_CHAR, ":")
+#endif
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_E_U, "E")
#endif
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PI_U, "PI")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
+#if ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS, "is")
+#endif
+#if ENABLED (JERRY_BUILTIN_ARRAY) && ENABLED (JERRY_ES2015) \
+|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_OF, "of")
#endif
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LN2_U, "LN2")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP) \
-|| ENABLED (JERRY_ES2015_BUILTIN_MAP) || ENABLED (JERRY_ES2015_BUILTIN_SET)
+#if ENABLED (JERRY_ES2015_BUILTIN_CONTAINER) \
+|| ENABLED (JERRY_ES2015_BUILTIN_MAP)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MAP_UL, "Map")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NAN, "NaN")
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP) || ENABLED (JERRY_ES2015_BUILTIN_SET) \
+#if ENABLED (JERRY_ES2015_BUILTIN_CONTAINER) \
|| ENABLED (JERRY_ES2015_BUILTIN_SET)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UL, "Set")
#endif
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ABS, "abs")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_SET)
+#if ENABLED (JERRY_ES2015) && ENABLED (JERRY_ES2015_BUILTIN_CONTAINER) \
+|| ENABLED (JERRY_ES2015_BUILTIN_SET) \
+|| ENABLED (JERRY_ES2015_BUILTIN_WEAKSET)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ADD, "add")
#endif
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COS, "cos")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EXP, "exp")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FOR, "for")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET, "get")
#if ENABLED (JERRY_ES2015_BUILTIN_MAP) \
-|| ENABLED (JERRY_ES2015_BUILTIN_SET)
+|| ENABLED (JERRY_ES2015_BUILTIN_PROXY) \
+|| ENABLED (JERRY_ES2015_BUILTIN_REFLECT) \
+|| ENABLED (JERRY_ES2015_BUILTIN_SET) \
+|| ENABLED (JERRY_ES2015_BUILTIN_WEAKMAP) \
+|| ENABLED (JERRY_ES2015_BUILTIN_WEAKSET)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_HAS, "has")
#endif
#if ENABLED (JERRY_BUILTIN_MATH)
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_POW, "pow")
#endif
+#if ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RAW, "raw")
+#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET, "set")
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SIN, "sin")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BIND, "bind")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CALL, "call")
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CBRT, "cbrt")
+#endif
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CEIL, "ceil")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COSH, "cosh")
+#endif
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DONE, "done")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EVAL, "eval")
#if ENABLED (JERRY_BUILTIN_REGEXP)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EXEC, "exec")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FILL, "fill")
-#endif
-#if ENABLED (JERRY_BUILTIN_ARRAY) && ENABLED (JERRY_ES2015_BUILTIN) \
+#if ENABLED (JERRY_ES2015) \
|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FILL, "fill")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FIND, "find")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
+#if ENABLED (JERRY_BUILTIN_ARRAY) && ENABLED (JERRY_ES2015) \
+|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FROM, "from")
#endif
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IMUL, "imul")
+#endif
#if ENABLED (JERRY_BUILTIN_ARRAY) \
|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_JOIN, "join")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_KEYS, "keys")
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOG2, "log2")
+#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NAME, "name")
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) \
+#if ENABLED (JERRY_ES2015) \
|| ENABLED (JERRY_ES2015_BUILTIN_MAP) \
|| ENABLED (JERRY_ES2015_BUILTIN_SET)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NEXT, "next")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RACE, "race")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SEAL, "seal")
-#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015_BUILTIN)
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SIGN, "sign")
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SINH, "sinh")
#endif
#if ENABLED (JERRY_ES2015_BUILTIN_MAP) \
|| ENABLED (JERRY_ES2015_BUILTIN_SET)
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SQRT, "sqrt")
#endif
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TANH, "tanh")
+#endif
#if ENABLED (JERRY_BUILTIN_REGEXP)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TEST, "test")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ERROR_UL, "Error")
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOG2E_U, "LOG2E")
+#endif
+#if ENABLED (JERRY_ES2015_BUILTIN_PROXY)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PROXY_UL, "Proxy")
+#endif
+#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SQRT2_U, "SQRT2")
#endif
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ACOSH, "acosh")
+#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_APPLY, "apply")
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASINH, "asinh")
+#endif
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ATAN2, "atan2")
#endif
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ATANH, "atanh")
+#endif
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CATCH, "catch")
#endif
|| ENABLED (JERRY_ES2015_BUILTIN_SET)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CLEAR, "clear")
#endif
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CLZ32, "clz32")
+#endif
#if ENABLED (JERRY_BUILTIN_ARRAY) \
|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EVERY, "every")
#endif
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EXPM1, "expm1")
+#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FALSE, "false")
#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FLAGS, "flags")
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FLOOR, "floor")
#endif
-#if ENABLED (JERRY_BUILTIN_REGEXP) \
-|| ENABLED (JERRY_BUILTIN_STRING)
-LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INDEX, "index")
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_HYPOT, "hypot")
#endif
#if ENABLED (JERRY_BUILTIN_REGEXP)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INDEX, "index")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INPUT, "input")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_NAN, "isNaN")
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOG10, "log10")
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LOG1P, "log1p")
+#endif
#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_BUILTIN_STRING) \
-|| ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+|| ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MATCH, "match")
#endif
#if ENABLED (JERRY_BUILTIN_DATE) \
|| ENABLED (JERRY_BUILTIN_JSON)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PARSE, "parse")
#endif
+#if ENABLED (JERRY_ES2015_BUILTIN_PROXY)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PROXY, "proxy")
+#endif
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ROUND, "round")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SLICE, "slice")
#endif
#if ENABLED (JERRY_BUILTIN_STRING) \
-|| ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+|| ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SPLIT, "split")
#endif
-#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015_BUILTIN)
+#if ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_THROW, "throw")
+#endif
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TRUNC, "trunc")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_VALUE, "value")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_OBJECT_UL, "Object")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REGEXP_UL, "RegExp")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STRING_UL, "String")
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SYMBOL_UL, "Symbol")
-#endif
-#if ENABLED (JERRY_ES2015_BUILTIN)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ASSIGN, "assign")
#endif
#if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW) \
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CREATE, "create")
#if ENABLED (JERRY_ES2015_BUILTIN_MAP) \
-|| ENABLED (JERRY_ES2015_BUILTIN_SET)
+|| ENABLED (JERRY_ES2015_BUILTIN_SET) \
+|| ENABLED (JERRY_ES2015_BUILTIN_WEAKMAP) \
+|| ENABLED (JERRY_ES2015_BUILTIN_WEAKSET)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DELETE, "delete")
#endif
#if ENABLED (JERRY_BUILTIN_ANNEXB)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FILTER, "filter")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FREEZE, "freeze")
+#if ENABLED (JERRY_BUILTIN_MATH) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FROUND, "fround")
+#endif
#if ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_DAY_UL, "getDay")
#endif
-#if !ENABLED (JERRY_ES2015) && ENABLED (JERRY_BUILTIN_REGEXP) \
-|| ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_BUILTIN_STRING) \
-|| ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ES2015) \
-|| ENABLED (JERRY_BUILTIN_REGEXP) && !( ENABLED (JERRY_ES2015))
+#if ENABLED (JERRY_BUILTIN_REGEXP)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GLOBAL, "global")
#endif
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_VIEW_UL, "isView")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_KEY_FOR, "keyFor")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LENGTH, "length")
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REJECT, "reject")
#endif
-#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ES2015_BUILTIN)
+#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REPEAT, "repeat")
#endif
+#if ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RETURN, "return")
+#endif
+#if ENABLED (JERRY_ES2015_BUILTIN_PROXY)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REVOKE, "revoke")
+#endif
#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_BUILTIN_STRING) \
-|| ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+|| ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SEARCH, "search")
#endif
#if !ENABLED (JERRY_ES2015) && ENABLED (JERRY_BUILTIN_REGEXP) \
#if ENABLED (JERRY_BUILTIN_ARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SPLICE, "splice")
#endif
+#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ES2015) \
+|| ENABLED (JERRY_BUILTIN_REGEXP) && !( !ENABLED (JERRY_ES2015))
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STICKY, "sticky")
+#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STRING, "string")
#if ENABLED (JERRY_BUILTIN_ANNEXB) && ENABLED (JERRY_BUILTIN_STRING)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SUBSTR, "substr")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015) \
+|| ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SYMBOL, "symbol")
#endif
#if ENABLED (JERRY_BUILTIN_DATE) \
|| ENABLED (JERRY_BUILTIN_JSON)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_JSON_UL, "toJSON")
#endif
-#if ENABLED (JERRY_BUILTIN_ARRAY) && ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) \
-|| ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) && ENABLED (JERRY_ES2015_BUILTIN_MAP) \
-|| ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) && ENABLED (JERRY_ES2015_BUILTIN_SET) \
-|| ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) && ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_VALUES, "values")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BOOLEAN_UL, "Boolean")
+#if ENABLED (JERRY_BUILTIN_NUMBER) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EPSILON_U, "EPSILON")
+#endif
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PROMISE_UL, "Promise")
#endif
+#if ENABLED (JERRY_ES2015_BUILTIN_REFLECT)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REFLECT_UL, "Reflect")
+#endif
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SQRT1_2_U, "SQRT1_2")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SYMBOL_LEFT_PAREN_UL, "Symbol(")
-LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SYMBOL_DOT_UL, "Symbol.")
+#if ENABLED (JERRY_ES2015_BUILTIN_CONTAINER) \
+|| ENABLED (JERRY_ES2015_BUILTIN_WEAKMAP)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_WEAKMAP_UL, "WeakMap")
+#endif
+#if ENABLED (JERRY_ES2015_BUILTIN_CONTAINER) \
+|| ENABLED (JERRY_ES2015_BUILTIN_WEAKSET)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_WEAKSET_UL, "WeakSet")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BOOLEAN, "boolean")
#if ENABLED (JERRY_BUILTIN_ANNEXB) && ENABLED (JERRY_BUILTIN_REGEXP)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COMPILE, "compile")
#endif
-#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
+#if ENABLED (JERRY_ES2015) \
+|| ENABLED (JERRY_ES2015_MODULE_SYSTEM)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DEFAULT, "default")
#endif
-#if ENABLED (JERRY_BUILTIN_ARRAY) && ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) \
-|| ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) && ENABLED (JERRY_ES2015_BUILTIN_MAP) \
-|| ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) && ENABLED (JERRY_ES2015_BUILTIN_SET) \
-|| ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) && ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ENTRIES, "entries")
#endif
#if ENABLED (JERRY_BUILTIN_ARRAY) \
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_ARRAY_UL, "isArray")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MESSAGE, "message")
+#if ENABLED (JERRY_ES2015_BUILTIN_PROXY) \
+|| ENABLED (JERRY_ES2015_BUILTIN_REFLECT)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_OWN_KEYS_UL, "ownKeys")
+#endif
#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_BUILTIN_STRING) \
-|| ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+|| ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REPLACE, "replace")
#endif
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
#if ENABLED (JERRY_BUILTIN_ANNEXB) && ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_YEAR_UL, "setYear")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SPECIES, "species")
#endif
#if ENABLED (JERRY_BUILTIN_NUMBER)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_FIXED_UL, "toFixed")
#endif
+#if ENABLED (JERRY_BUILTIN_REGEXP) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNICODE, "unicode")
+#endif
#if ENABLED (JERRY_BUILTIN_ARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNSHIFT, "unshift")
#endif
#if ENABLED (JERRY_BUILTIN_ERRORS)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_URI_ERROR_UL, "URIError")
#endif
-#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ES2015_BUILTIN)
+#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ENDS_WITH, "endsWith")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FUNCTION, "function")
#if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UINT8_UL, "getUint8")
#endif
-#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ES2015_BUILTIN)
+#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INCLUDES, "includes")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_FINITE, "isFinite")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_FROZEN_UL, "isFrozen")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_SEALED_UL, "isSealed")
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) \
-|| ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ITERATOR, "iterator")
#endif
+#if ENABLED (JERRY_ES2015) \
+|| !( ENABLED (JERRY_ES2015))
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PARSE_INT, "parseInt")
+#endif
#if ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_HOURS_UL, "setHours")
#endif
#if ENABLED (JERRY_BUILTIN_ERRORS)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_EVAL_ERROR_UL, "EvalError")
#endif
+#if ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GENERATOR_UL, "Generator")
+#endif
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INT8_ARRAY_UL, "Int8Array")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TYPE_ERROR_UL, "TypeError")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNDEFINED_UL, "Undefined")
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING__PROTO__, "__proto__")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ARGUMENTS, "arguments")
+#if ENABLED (JERRY_ES2015_BUILTIN_PROXY) \
+|| ENABLED (JERRY_ES2015_BUILTIN_REFLECT)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CONSTRUCT, "construct")
+#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DECODE_URI, "decodeURI")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ENCODE_URI, "encodeURI")
-#if ENABLED (JERRY_BUILTIN_ARRAY) && ENABLED (JERRY_ES2015_BUILTIN) \
+#if ENABLED (JERRY_ES2015) \
|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FIND_INDEX, "findIndex")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UINT16_UL, "getUint16")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UINT32_UL, "getUint32")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_INTEGER, "isInteger")
#endif
#if ENABLED (JERRY_BUILTIN_REGEXP)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MULTILINE, "multiline")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PROTOTYPE, "prototype")
+#if ENABLED (JERRY_ES2015_BUILTIN_PROXY)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REVOCABLE, "revocable")
+#endif
#if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UINT16_UL, "setUint16")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UINT32_UL, "setUint32")
#if ENABLED (JERRY_BUILTIN_STRING)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CHAR_CODE_AT_UL, "charCodeAt")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
+#if ENABLED (JERRY_ES2015) \
+|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COPY_WITHIN, "copyWithin")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ENUMERABLE, "enumerable")
|| ENABLED (JERRY_BUILTIN_REGEXP) && !( ENABLED (JERRY_ES2015))
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IGNORECASE_UL, "ignoreCase")
#endif
+#if ENABLED (JERRY_ES2015) \
+|| !( ENABLED (JERRY_ES2015))
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PARSE_FLOAT, "parseFloat")
+#endif
#if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_FLOAT_32_UL, "setFloat32")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_SECONDS_UL, "setSeconds")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UTC_DATE_UL, "setUTCDate")
#endif
-#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ES2015_BUILTIN)
+#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STARTS_WITH, "startsWith")
#endif
-#if ENABLED (JERRY_LINE_INFO) || ENABLED (JERRY_ERROR_MESSAGES) || ENABLED (JERRY_ES2015_MODULE_SYSTEM)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RESOURCE_ANON, "<anonymous>")
-#endif
#if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW) \
|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ARRAY_BUFFER_UL, "ArrayBuffer")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UINT16_ARRAY_UL, "Uint16Array")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UINT32_ARRAY_UL, "Uint32Array")
#endif
+#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CODE_POINT_AT, "codePointAt")
+#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CONSTRUCTOR, "constructor")
#if ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_FULL_YEAR_UL, "getFullYear")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_HOURS_UL, "getUTCHours")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_MONTH_UL, "getUTCMonth")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_HAS_INSTANCE, "hasInstance")
#endif
#if ENABLED (JERRY_BUILTIN_ARRAY) \
#if ENABLED (JERRY_BUILTIN_NUMBER)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_PRECISION_UL, "toPrecision")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_PRIMITIVE, "toPrimitive")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_STRING_TAG, "toStringTag")
#endif
#if ENABLED (JERRY_BUILTIN_STRING)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_UPPER_CASE_UL, "toUpperCase")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UNSCOPABLES, "unscopables")
#endif
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#if ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INVALID_DATE_UL, "Invalid Date")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) \
+#if ENABLED (JERRY_ES2015) \
|| ENABLED (JERRY_ES2015_BUILTIN_MAP)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MAP_ITERATOR_UL, "Map Iterator")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) \
+#if ENABLED (JERRY_ES2015) \
|| ENABLED (JERRY_ES2015_BUILTIN_SET)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_ITERATOR_UL, "Set Iterator")
#endif
#if ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_DATE_STRING_UL, "toDateString")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_TIME_STRING_UL, "toTimeString")
+#endif
+#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FROM_CODE_POINT_UL, "fromCodePoint")
+#endif
+#if ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_MINUTES_UL, "getUTCMinutes")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_SECONDS_UL, "getUTCSeconds")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_PROTOTYPE_OF_UL, "isPrototypeOf")
-#if ENABLED (JERRY_ES2015_BUILTIN)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_SAFE_INTEGER, "isSafeInteger")
#endif
#if ENABLED (JERRY_BUILTIN_STRING)
#if ENABLED (JERRY_BUILTIN_NUMBER)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_EXPONENTIAL_UL, "toExponential")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ARRAY_ITERATOR_UL, "Array Iterator")
#endif
#if ENABLED (JERRY_BUILTIN_ERRORS)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REFERENCE_ERROR_UL, "ReferenceError")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DEFINE_PROPERTY_UL, "defineProperty")
+#if ENABLED (JERRY_ES2015_BUILTIN_PROXY) \
+|| ENABLED (JERRY_ES2015_BUILTIN_REFLECT)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DELETE_PROPERTY_UL, "deleteProperty")
+#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_PROTOTYPE_OF_UL, "getPrototypeOf")
#if ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_FULL_YEAR_UL, "getUTCFullYear")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_HAS_OWN_PROPERTY_UL, "hasOwnProperty")
-#if ENABLED (JERRY_ES2015_BUILTIN)
+#if ENABLED (JERRY_ES2015) \
+|| ENABLED (JERRY_ES2015_BUILTIN_PROXY) \
+|| ENABLED (JERRY_ES2015_BUILTIN_REFLECT)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_PROTOTYPE_OF_UL, "setPrototypeOf")
#endif
#if ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UTC_FULL_YEAR_UL, "setUTCFullYear")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, "toLocaleString")
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_STRING_ITERATOR_UL, "String Iterator")
#endif
#if ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_MILLISECONDS_UL, "getMilliseconds")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_MILLISECONDS_UL, "setMilliseconds")
#endif
+#if ENABLED (JERRY_BUILTIN_NUMBER) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MAX_SAFE_INTEGER_U, "MAX_SAFE_INTEGER")
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MIN_SAFE_INTEGER_U, "MIN_SAFE_INTEGER")
+#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_DEFINE_PROPERTIES_UL, "defineProperties")
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BYTES_PER_ELEMENT_U, "BYTES_PER_ELEMENT")
#endif
+#if ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GENERATOR_FUNCTION_UL, "GeneratorFunction")
+#endif
#if ENABLED (JERRY_BUILTIN_NUMBER)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NEGATIVE_INFINITY_U, "NEGATIVE_INFINITY")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_POSITIVE_INFINITY_U, "POSITIVE_INFINITY")
#if ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_MILLISECONDS_UL, "getUTCMilliseconds")
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_CONCAT_SPREADABLE, "isConcatSpreadable")
#endif
#if ENABLED (JERRY_BUILTIN_DATE)
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_OWN_PROPERTY_NAMES_UL, "getOwnPropertyNames")
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PROPERTY_IS_ENUMERABLE_UL, "propertyIsEnumerable")
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_OWN_PROPERTY_SYMBOLS_UL, "getOwnPropertySymbols")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL, "getOwnPropertyDescriptor")
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (1, LIT_MAGIC_STRING_SPACE_CHAR)
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_PI_U)
-#elif ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
+#elif ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_IS)
+#elif ENABLED (JERRY_BUILTIN_ARRAY) && ENABLED (JERRY_ES2015) \
+|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_OF)
#elif ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_LN2_U)
-#elif ENABLED (JERRY_ES2015_BUILTIN_MAP) \
-|| ENABLED (JERRY_ES2015_BUILTIN_MAP) || ENABLED (JERRY_ES2015_BUILTIN_SET)
+#elif ENABLED (JERRY_ES2015_BUILTIN_CONTAINER) \
+|| ENABLED (JERRY_ES2015_BUILTIN_MAP)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_MAP_UL)
#else
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (2, LIT_MAGIC_STRING_NAN)
#endif
#if ENABLED (JERRY_BUILTIN_MATH)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (3, LIT_MAGIC_STRING_LN2_U)
-#elif ENABLED (JERRY_ES2015_BUILTIN_MAP) \
-|| ENABLED (JERRY_ES2015_BUILTIN_MAP) || ENABLED (JERRY_ES2015_BUILTIN_SET)
+#elif ENABLED (JERRY_ES2015_BUILTIN_CONTAINER) \
+|| ENABLED (JERRY_ES2015_BUILTIN_MAP)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (3, LIT_MAGIC_STRING_MAP_UL)
#else
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (3, LIT_MAGIC_STRING_NAN)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_BYTE_LENGTH_UL)
#elif ENABLED (JERRY_BUILTIN_STRING)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_CHAR_CODE_AT_UL)
-#elif ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
+#elif ENABLED (JERRY_ES2015) \
+|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_COPY_WITHIN)
#else
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_ENUMERABLE)
#endif
-#if ENABLED (JERRY_LINE_INFO) || ENABLED (JERRY_ERROR_MESSAGES) || ENABLED (JERRY_ES2015_MODULE_SYSTEM)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (11, LIT_MAGIC_STRING_RESOURCE_ANON)
-#elif ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW) \
-|| ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (11, LIT_MAGIC_STRING_ARRAY_BUFFER_UL)
-#elif ENABLED (JERRY_BUILTIN_ERRORS)
-LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (11, LIT_MAGIC_STRING_SYNTAX_ERROR_UL)
-#elif ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (11, LIT_MAGIC_STRING_UINT16_ARRAY_UL)
-#else
-LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (11, LIT_MAGIC_STRING_CONSTRUCTOR)
-#endif
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_FLOAT32_ARRAY_UL)
#elif ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) && ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_FLOAT64_ARRAY_UL)
#elif ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_INVALID_DATE_UL)
-#elif ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) \
+#elif ENABLED (JERRY_ES2015) \
|| ENABLED (JERRY_ES2015_BUILTIN_MAP)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_MAP_ITERATOR_UL)
-#elif ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) \
+#elif ENABLED (JERRY_ES2015) \
|| ENABLED (JERRY_ES2015_BUILTIN_SET)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_SET_ITERATOR_UL)
#else
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (12, LIT_MAGIC_STRING_CONFIGURABLE)
#endif
-#if ENABLED (JERRY_BUILTIN_DATE)
+#if ENABLED (JERRY_BUILTIN_STRING) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (13, LIT_MAGIC_STRING_FROM_CODE_POINT_UL)
+#elif ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (13, LIT_MAGIC_STRING_GET_UTC_MINUTES_UL)
#else
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (13, LIT_MAGIC_STRING_IS_PROTOTYPE_OF_UL)
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (14, LIT_MAGIC_STRING_ARRAY_ITERATOR_UL)
#elif ENABLED (JERRY_BUILTIN_ERRORS)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (14, LIT_MAGIC_STRING_REFERENCE_ERROR_UL)
#else
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (14, LIT_MAGIC_STRING_DEFINE_PROPERTY_UL)
#endif
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (15, LIT_MAGIC_STRING_STRING_ITERATOR_UL)
#elif ENABLED (JERRY_BUILTIN_DATE)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (15, LIT_MAGIC_STRING_GET_MILLISECONDS_UL)
+#elif ENABLED (JERRY_BUILTIN_NUMBER) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (15, LIT_MAGIC_STRING_MAX_SAFE_INTEGER_U)
#else
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (15, LIT_MAGIC_STRING_DEFINE_PROPERTIES_UL)
#endif
+#if ENABLED (JERRY_BUILTIN_NUMBER) && ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (16, LIT_MAGIC_STRING_MAX_SAFE_INTEGER_U)
+#else
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (16, LIT_MAGIC_STRING_DEFINE_PROPERTIES_UL)
+#endif
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (17, LIT_MAGIC_STRING_BYTES_PER_ELEMENT_U)
+#elif ENABLED (JERRY_ES2015)
+LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (17, LIT_MAGIC_STRING_GENERATOR_FUNCTION_UL)
#elif ENABLED (JERRY_BUILTIN_NUMBER)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (17, LIT_MAGIC_STRING_NEGATIVE_INFINITY_U)
#elif ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (18, LIT_MAGIC_STRING_DECODE_URI_COMPONENT)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (19, LIT_MAGIC_STRING_GET_OWN_PROPERTY_NAMES_UL)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (20, LIT_MAGIC_STRING_PROPERTY_IS_ENUMERABLE_UL)
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
+#if ENABLED (JERRY_ES2015)
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (21, LIT_MAGIC_STRING_GET_OWN_PROPERTY_SYMBOLS_UL)
#else
LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (21, LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL)
const jerry_value_t args_p[], const jerry_length_t args_cnt);
jerry_value_t jerryx_handler_print (const jerry_value_t func_obj_val, const jerry_value_t this_p,
const jerry_value_t args_p[], const jerry_length_t args_cnt);
+jerry_value_t jerryx_handler_resource_name (const jerry_value_t func_obj_val, const jerry_value_t this_p,
+ const jerry_value_t args_p[], const jerry_length_t args_cnt);
/**
* Struct used by the `jerryx_set_functions` method to
+++ /dev/null
-/* DLib configuration. */\r
-/* Copyright 2003-2017 IAR Systems AB. */\r
-\r
-#ifndef _DLIB_CONFIG_H\r
-#define _DLIB_CONFIG_H\r
-\r
-#ifndef _SYSTEM_BUILD\r
- #pragma system_include\r
-#endif\r
-\r
-/* Turn on locale support. */\r
-#define _DLIB_FULL_LOCALE_SUPPORT 1\r
-\r
-/* Turn on FILE descriptor support. */\r
-#define _DLIB_FILE_DESCRIPTOR 1\r
-\r
-/* Turn on multibyte formatting. */\r
-#define _DLIB_FORMATTED_MULTIBYTE 1\r
-\r
-/* Turn on support for hex-floats in strtod. */\r
-#define _DLIB_STRTOD_HEX_FLOAT 1\r
-\r
-#endif /* _DLIB_CONFIG_H */\r
+++ /dev/null
-/***************************************************\r
- *\r
- * DLib_Defaults.h is the library configuration manager.\r
- *\r
- * Copyright 2003-2017 IAR Systems AB.\r
- *\r
- * This configuration header file performs the following tasks:\r
- *\r
- * 1. Includes the configuration header file, defined by _DLIB_CONFIG_FILE,\r
- * that sets up a particular runtime environment.\r
- *\r
- * 2. Includes the product configuration header file, DLib_Product.h, that\r
- * specifies default values for the product and makes sure that the\r
- * configuration is valid.\r
- *\r
- * 3. Sets up default values for all remaining configuration symbols.\r
- *\r
- * This configuration header file, the one defined by _DLIB_CONFIG_FILE, and\r
- * DLib_Product.h configures how the runtime environment should behave. This\r
- * includes all system headers and the library itself, i.e. all system headers\r
- * includes this configuration header file, and the library has been built\r
- * using this configuration header file.\r
- *\r
- ***************************************************\r
- *\r
- * DO NOT MODIFY THIS FILE!\r
- *\r
- ***************************************************/\r
-\r
-#ifndef _DLIB_DEFAULTS_H\r
-#define _DLIB_DEFAULTS_H\r
-\r
-#ifndef _SYSTEM_BUILD\r
- #pragma system_include\r
-#endif\r
-\r
-/* Include the main configuration header file. */\r
-#if defined(_DLIB_CONFIG_FILE_HEADER_NAME)\r
- #include _DLIB_CONFIG_FILE_HEADER_NAME\r
- /* _DLIB_CONFIG_FILE_STRING is the quoted variant of above */\r
-#elif defined(_DLIB_CONFIG_FILE)\r
- #include _STRINGIFY(_DLIB_CONFIG_FILE)\r
-#else\r
- #pragma message("Library configuration file is not specified. Use\\r
- --dlib_config, please see the compiler reference guide for details.")\r
-#endif\r
-\r
-/* Include the product specific header file. */\r
-#ifndef __NO_DLIB_PRODUCT_FILE\r
- #include <DLib_Product.h>\r
-#endif\r
-\r
-\r
-/*\r
- * The remainder of the file sets up defaults for a number of\r
- * configuration symbols, each corresponds to a feature in the\r
- * libary.\r
- *\r
- * The value of the symbols should either be 1, if the feature should\r
- * be supported, or 0 if it shouldn't. (Except where otherwise\r
- * noted.)\r
- */\r
-\r
-\r
-/*\r
- * File handling\r
- *\r
- * Determines whether FILE descriptors and related functions exists or not.\r
- * When this feature is selected, i.e. set to 1, then FILE descriptors and\r
- * related functions (e.g. fprintf, fopen) exist. All files, even stdin,\r
- * stdout, and stderr will then be handled with a file system mechanism that\r
- * buffers files before accessing the lowlevel I/O interface (__open, __read,\r
- * __write, etc).\r
- *\r
- * If not selected, i.e. set to 0, then FILE descriptors and related functions\r
- * (e.g. fprintf, fopen) does not exist. All functions that normally uses\r
- * stderr will use stdout instead. Functions that uses stdout and stdin (like\r
- * printf and scanf) will access the lowlevel I/O interface directly (__open,\r
- * __read, __write, etc), i.e. there will not be any buffering.\r
- *\r
- * The default is not to have support for FILE descriptors.\r
- */\r
-\r
-#ifndef _DLIB_FILE_DESCRIPTOR\r
- #define _DLIB_FILE_DESCRIPTOR 0\r
-#endif\r
-\r
-\r
-/*\r
- * Use static buffers for stdout\r
- *\r
- * This setting controls whether the stream stdout uses a static 80 bytes\r
- * buffer or uses a one byte buffer allocated in the file descriptor. This\r
- * setting is only applicable if the FILE descriptors are enabled above.\r
- *\r
- * Default is to use a static 80 byte buffer.\r
- */\r
-\r
-#ifndef _DLIB_STDOUT_USES_STATIC_BUFFER\r
- #define _DLIB_STDOUT_USES_STATIC_BUFFER 1\r
-#endif\r
-\r
-\r
-/*\r
- * Support of locale interface\r
- *\r
- * "Locale" is the system in C that support language- and\r
- * contry-specific settings for a number of areas, including currency\r
- * symbols, date and time, and multibyte encodings.\r
- *\r
- * This setting determines whether the locale interface exist or not.\r
- * When this feature is selected, i.e. set to 1, the locale interface exist\r
- * (setlocale, etc). A number of preselected locales can be activated during\r
- * runtime. The preselected locales and encodings are choosen at linkage. The\r
- * application will start with the "C" locale choosen. (Single byte encoding is\r
- * always supported in this mode.)\r
- *\r
- *\r
- * If not selected, i.e. set to 0, the locale interface (setlocale, etc) does\r
- * not exist. The C locale is then preset and cannot be changed.\r
- *\r
- * The default is not to have support for the locale interface with the "C"\r
- * locale and the single byte encoding.\r
- */\r
-\r
-#ifndef _DLIB_FULL_LOCALE_SUPPORT\r
- #define _DLIB_FULL_LOCALE_SUPPORT 0\r
-#endif\r
-\r
-/*\r
- * Define what memory to place the locale table segment (.iar.locale_table)\r
- * in.\r
- */\r
-#ifndef _DLIB_LOCALE_TABLE_MEMORY\r
- #define _DLIB_LOCALE_TABLE_MEMORY\r
-#endif\r
-\r
-/*\r
- * Wide character and multi byte character support in library.\r
- */\r
-\r
-#ifndef _DLIB_WIDE_CHARACTERS\r
- #define _DLIB_WIDE_CHARACTERS 1\r
-#endif\r
-#ifndef _DLIB_CONFIG_AGNOSTIC\r
- #if _DLIB_FILE_DESCRIPTOR && !_DLIB_WIDE_CHARACTERS\r
- #error "_DLIB_FILE_DESCRIPTOR == 0 if wide characters are disabled"\r
- #endif\r
- #if _DLIB_FULL_LOCALE_SUPPORT && !_DLIB_WIDE_CHARACTERS\r
- #error "_DLIB_FULL_LOCALE_SUPPORT == 0 if wide characters are disabled"\r
- #endif\r
-#endif\r
-\r
-/*\r
- * Support of multibytes in printf- and scanf-like functions\r
- *\r
- * This is the default value for _DLIB_PRINTF_MULTIBYTE and\r
- * _DLIB_SCANF_MULTIBYTE. See them for a description.\r
- *\r
- * Default is to not have support for multibytes in printf- and scanf-like\r
- * functions.\r
- */\r
-\r
-#ifndef _DLIB_FORMATTED_MULTIBYTE\r
- #define _DLIB_FORMATTED_MULTIBYTE 0\r
-#endif\r
-#ifndef _DLIB_CONFIG_AGNOSTIC\r
- #if _DLIB_FORMATTED_MULTIBYTE && !_DLIB_WIDE_CHARACTERS\r
- #error "_DLIB_FORMATTED_MULTIBYTE == 0 if wide characters are disabled"\r
- #endif\r
-#endif\r
-\r
-/*\r
- * Hexadecimal floating-point numbers in strtod\r
- *\r
- * If selected, i.e. set to 1, strtod supports C99 hexadecimal floating-point\r
- * numbers. This also enables hexadecimal floating-points in internal functions\r
- * used for converting strings and wide strings to float, double, and long\r
- * double.\r
- *\r
- * If not selected, i.e. set to 0, C99 hexadecimal floating-point numbers\r
- * aren't supported.\r
- *\r
- * Default is not to support hexadecimal floating-point numbers.\r
- */\r
-\r
-#ifndef _DLIB_STRTOD_HEX_FLOAT\r
- #define _DLIB_STRTOD_HEX_FLOAT 0\r
-#endif\r
-\r
-\r
-/*\r
- * Printf configuration symbols.\r
- *\r
- * All the configuration symbols described further on controls the behaviour\r
- * of printf, sprintf, and the other printf variants.\r
- *\r
- * The library proves four formatters for printf: 'tiny', 'small',\r
- * 'large', and 'default'. The setup in this file controls all except\r
- * 'tiny'. Note that both small' and 'large' explicitly removes\r
- * some features.\r
- */\r
-\r
-/*\r
- * Handle multibytes in printf\r
- *\r
- * This setting controls whether multibytes and wchar_ts are supported in\r
- * printf. Set to 1 to support them, otherwise set to 0.\r
- *\r
- * See _DLIB_FORMATTED_MULTIBYTE for the default setting.\r
- */\r
-#ifndef _DLIB_PRINTF_MULTIBYTE\r
- #define _DLIB_PRINTF_MULTIBYTE _DLIB_FORMATTED_MULTIBYTE\r
-#endif\r
-#ifndef _DLIB_CONFIG_AGNOSTIC\r
- #if _DLIB_PRINTF_MULTIBYTE && !_DLIB_FULL_LOCALE_SUPPORT\r
- #error "_DLIB_PRINTF_MULTIBYTE needs full locale"\r
- #endif\r
- #if _DLIB_PRINTF_MULTIBYTE && !_DLIB_WIDE_CHARACTERS\r
- #error "_DLIB_PRINTF_MULTIBYTE == 0 if wide characters are disabled"\r
- #endif\r
-#endif\r
-\r
-/*\r
- * Support of formatting anything larger than int in printf\r
- *\r
- * This setting controls if 'int' should be used internally in printf, rather\r
- * than the largest existing integer type. If 'int' is used, any integer or\r
- * pointer type formatting use 'int' as internal type even though the\r
- * formatted type is larger. Set to 1 to use 'int' as internal type, otherwise\r
- * set to 0.\r
- *\r
- * See also next configuration.\r
- *\r
- * Default is to internally use largest existing internally type.\r
- */\r
-#ifndef _DLIB_PRINTF_INT_TYPE_IS_INT\r
- #define _DLIB_PRINTF_INT_TYPE_IS_INT 0\r
-#endif\r
-\r
-/*\r
- * Support of formatting anything larger than long in printf\r
- *\r
- * This setting controls if 'long' should be used internally in printf, rather\r
- * than the largest existing integer type. If 'long' is used, any integer or\r
- * pointer type formatting use 'long' as internal type even though the\r
- * formatted type is larger. Set to 1 to use 'long' as internal type,\r
- * otherwise set to 0.\r
- *\r
- * See also previous configuration.\r
- *\r
- * Default is to internally use largest existing internally type.\r
- */\r
-#ifndef _DLIB_PRINTF_INT_TYPE_IS_LONG\r
- #define _DLIB_PRINTF_INT_TYPE_IS_LONG 0\r
-#endif\r
-\r
-#if _DLIB_PRINTF_INT_TYPE_IS_INT && _DLIB_PRINTF_INT_TYPE_IS_LONG\r
- #error "At most one of _DLIB_PRINTF_INT_TYPE_IS_INT and _DLIB_PRINTF_INT_TYPE_IS_LONG can be defined."\r
-#endif\r
-\r
-/*\r
- * Emit a char a time in printf\r
- *\r
- * This setting controls internal output handling. If selected, i.e. set to 1,\r
- * then printf emits one character at a time, which requires less code but\r
- * can be slightly slower for some types of output.\r
- *\r
- * If not selected, i.e. set to 0, then printf buffers some outputs.\r
- *\r
- * Note that it is recommended to either use full file support (see\r
- * _DLIB_FILE_DESCRIPTOR) or -- for debug output -- use the linker\r
- * option "-e__write_buffered=__write" to enable buffered I/O rather\r
- * than deselecting this feature.\r
- */\r
-#ifndef _DLIB_PRINTF_CHAR_BY_CHAR\r
- #define _DLIB_PRINTF_CHAR_BY_CHAR 1\r
-#endif\r
-\r
-\r
-/*\r
- * Scanf configuration symbols.\r
- *\r
- * All the configuration symbols described here controls the\r
- * behaviour of scanf, sscanf, and the other scanf variants.\r
- *\r
- * The library proves three formatters for scanf: 'small', 'large',\r
- * and 'default'. The setup in this file controls all, however both\r
- * 'small' and 'large' explicitly removes some features.\r
- */\r
-\r
-/*\r
- * Handle multibytes in scanf\r
- *\r
- * This setting controls whether multibytes and wchar_t:s are supported in\r
- * scanf. Set to 1 to support them, otherwise set to 0.\r
- *\r
- * See _DLIB_FORMATTED_MULTIBYTE for the default.\r
- */\r
-#ifndef _DLIB_SCANF_MULTIBYTE\r
- #define _DLIB_SCANF_MULTIBYTE _DLIB_FORMATTED_MULTIBYTE\r
-#endif\r
-#ifndef _DLIB_CONFIG_AGNOSTIC\r
- #if _DLIB_SCANF_MULTIBYTE && !_DLIB_FULL_LOCALE_SUPPORT\r
- #error "_DLIB_SCANF_MULTIBYTE needs full locale"\r
- #endif\r
- #if _DLIB_SCANF_MULTIBYTE && !_DLIB_WIDE_CHARACTERS\r
- #error "_DLIB_SCANF_MULTIBYTE == 0 if wide characters are disabled"\r
- #endif\r
-#endif\r
-\r
-/*\r
- * Handle multibytes in asctime and strftime.\r
- *\r
- * This setting controls whether multibytes and wchar_ts are\r
- * supported.Set to 1 to support them, otherwise set to 0.\r
- *\r
- * See _DLIB_FORMATTED_MULTIBYTE for the default setting.\r
- */\r
-#ifndef _DLIB_STRFTIME_MULTIBYTE\r
- #define _DLIB_STRFTIME_MULTIBYTE _DLIB_FORMATTED_MULTIBYTE\r
-#endif\r
-#ifndef _DLIB_CONFIG_AGNOSTIC\r
- #if _DLIB_STRFTIME_MULTIBYTE && !_DLIB_FULL_LOCALE_SUPPORT\r
- #error "_DLIB_STRFTIME_MULTIBYTE needs full locale"\r
- #endif\r
- #if _DLIB_STRFTIME_MULTIBYTE && !_DLIB_WIDE_CHARACTERS\r
- #error "_DLIB_STRFTIME_MULTIBYTE == 0 if wide characters are disabled"\r
- #endif\r
-#endif\r
-\r
-/*\r
- * Implement "qsort" using a bubble sort algorithm.\r
- *\r
- * Bubble sort is less efficient than quick sort but requires less RAM\r
- * and ROM resources.\r
- */\r
-\r
-#ifndef _DLIB_QSORT_USE_BUBBLE_SORT\r
- #define _DLIB_QSORT_USE_BUBBLE_SORT 0\r
-#endif\r
-\r
-\r
-/*\r
- * Set Buffert size used in qsort\r
- */\r
-\r
-#ifndef _DLIB_QSORT_BUF_SIZE\r
- #define _DLIB_QSORT_BUF_SIZE 256\r
-#endif\r
-\r
-\r
-/*\r
- * Use a simple rand implementation to reduce memory footprint.\r
- *\r
- * The default "rand" function uses an array of 32 32-bit integers of memory to\r
- * store the current state.\r
- *\r
- * The simple "rand" function uses only a single 32-bit integer. However, the\r
- * quality of the generated psuedo-random numbers are not as good as\r
- * the default implementation.\r
- */\r
-\r
-#ifndef _DLIB_RAND_USE_SIMPLE\r
- #define _DLIB_RAND_USE_SIMPLE 0\r
-#endif\r
-\r
-\r
-/*\r
- * Set attributes for the function used by the C-SPY debug interface to stop at.\r
- */\r
-\r
-#ifndef _DLIB_DEBUG_BREAK_FUNCTION_ATTRIBUTE\r
- #define _DLIB_DEBUG_BREAK_FUNCTION_ATTRIBUTE\r
-#endif\r
-\r
-/*\r
- * Used by products where one runtime library can be used by applications\r
- * with different data models, in order to reduce the total number of\r
- * libraries required. Typically, this is used when the pointer types does\r
- * not change over the data models used, but the placement of data variables\r
- * or/and constant variables do.\r
- *\r
- * If defined, this symbol is typically defined to the memory attribute that\r
- * is used by the runtime library. The actual define must use a\r
- * _Pragma("type_attribute = xxx") construct. In the header files, it is used\r
- * on all statically linked data objects seen by the application.\r
- */\r
-#ifndef _DLIB_DATA_ATTR\r
- #define _DLIB_DATA_ATTR\r
-#endif\r
-\r
-#ifndef _DLIB_CONST_ATTR\r
- #ifdef _DLIB_DATA_ATTR\r
- #define _DLIB_CONST_ATTR _DLIB_DATA_ATTR\r
- #else\r
- #define _DLIB_CONST_ATTR\r
- #endif\r
-#endif\r
-\r
-\r
-/*\r
- * Turn on support for the Target-specific ABI. The ABI is based on the\r
- * ARM AEABI. A target, except ARM, may deviate from it.\r
- */\r
-\r
-#ifndef _DLIB_SUPPORT_FOR_AEABI\r
- #ifdef __EDG_IA64_ABI\r
- #define _DLIB_SUPPORT_FOR_AEABI 1\r
- #else\r
- #define _DLIB_SUPPORT_FOR_AEABI 0\r
- #endif\r
-#endif\r
-\r
-#if _DLIB_SUPPORT_FOR_AEABI == 1\r
- /* Possible AEABI deviations */\r
- #ifndef _DLIB_MBSTATET_IS_UNSIGNED_LONG\r
- #if __INT_SIZE__ != 4\r
- #define _DLIB_MBSTATET_USES_UNSIGNED_LONG 1\r
- #else\r
- #define _DLIB_MBSTATET_USES_UNSIGNED_LONG 0\r
- #endif\r
- #endif\r
-\r
- #ifndef _DLIB_TIME_USES_LONG\r
- #if __INT_SIZE__ != 4\r
- #define _DLIB_TIME_USES_LONG 1\r
- #else\r
- #define _DLIB_TIME_USES_LONG 0\r
- #endif\r
- #endif\r
-\r
- /*\r
- * The "difunc" table contains information about C++ objects that\r
- * should be dynamically initialized, where each entry in the table\r
- * represents an initialization function that should be called. When\r
- * the symbol _DLIB_AEABI_DIFUNC_CONTAINS_OFFSETS is true, each\r
- * entry in the table is encoded as an offset from the entry\r
- * location. When false, the entries contain the actual addresses to\r
- * call.\r
- */\r
- #ifndef _DLIB_AEABI_DIFUNC_CONTAINS_OFFSETS\r
- #define _DLIB_AEABI_DIFUNC_CONTAINS_OFFSETS 1\r
- #endif\r
-#endif /* _DLIB_SUPPORT_FOR_AEABI == 1 */\r
-\r
-/*\r
- * Only use IA64 functions\r
- *\r
- * Remove the C++ __aeabi functions when using the IA64 interface. Used in\r
- * ARM AARCH64 mode.\r
- *\r
- */\r
-#ifndef _DLIB_ONLY_USE_CXA_FUNCTIONS\r
-#if defined(__ICCARM__) && defined(__aarch64__)\r
- #define _DLIB_ONLY_USE_CXA_FUNCTIONS 1\r
- #else\r
- #define _DLIB_ONLY_USE_CXA_FUNCTIONS 0\r
- #endif\r
-#endif\r
-\r
-/*\r
- * Turn on usage of a pragma to tell the linker the number of elements used\r
- * in a setjmp jmp_buf.\r
- */\r
-\r
-#ifndef _DLIB_USE_RTMODEL_JMP_BUF_NUM_ELEMENTS\r
- #define _DLIB_USE_RTMODEL_JMP_BUF_NUM_ELEMENTS 0\r
-#endif\r
-\r
-\r
-/*\r
- * If true, the product supplies a "DLib_Product_string.h" file that\r
- * is included from "string.h".\r
- */\r
-\r
-#ifndef _DLIB_PRODUCT_STRING\r
- #define _DLIB_PRODUCT_STRING 0\r
-#endif\r
-\r
-/*\r
- * Determine whether the math fma routines are fast or not.\r
- */\r
-#ifndef _DLIB_FAST_FMA\r
- #define _DLIB_FAST_FMA 0\r
-#endif\r
-\r
-\r
-/*\r
- * Favor speed versus some size enlargements in floating point functions.\r
- */\r
-#ifndef _DLIB_SPEEDY_FLOATS\r
- #define _DLIB_SPEEDY_FLOATS 0\r
-#endif\r
-\r
-\r
-/*\r
- * Include dlmalloc as an alternative heap manager in the product.\r
- *\r
- * Typically, an application will use a "malloc" heap manager that is\r
- * relatively small but not that efficient. An application can\r
- * optionally use the "dlmalloc" package, which provides a more\r
- * effective "malloc" heap manager, if it is included in the product\r
- * and supported by the settings.\r
- *\r
- * See the product documentation on how to use it, and whether or not\r
- * it is included in the product.\r
- */\r
-\r
-#ifndef _DLIB_INCLUDE_DLMALLOC_ALTERNATIVE\r
- /* size_t/ptrdiff_t must be a 4 bytes unsigned integer. */\r
- #if __SIZE_T_MAX__ < 0xfffffffful\r
- #define _DLIB_INCLUDE_DLMALLOC_ALTERNATIVE 0\r
- #else\r
- #define _DLIB_INCLUDE_DLMALLOC_ALTERNATIVE 1\r
- #endif\r
-#endif\r
-\r
-\r
-/*\r
- * Make sure certain C++ functions use the soft floating point variant.\r
- */\r
-\r
-#ifndef __SOFTFP\r
- #define __SOFTFP\r
-#endif\r
-\r
-\r
-/*\r
- * Allow the 64-bit time_t interface?\r
- *\r
- * Default is yes if long long is 64 bits.\r
- */\r
-\r
-#ifndef _DLIB_TIME_ALLOW_64\r
- #if __LONG_LONG_SIZE__ == 8\r
- #define _DLIB_TIME_ALLOW_64 1\r
- #else\r
- #define _DLIB_TIME_ALLOW_64 0\r
- #endif\r
-#endif\r
-\r
-\r
-/*\r
- * Is time_t 64 or 32 bits?\r
- *\r
- * Default is 32 bits.\r
- */\r
-\r
-#ifndef _DLIB_TIME_USES_64_DEFAULT\r
- #define _DLIB_TIME_USES_64_DEFAULT 0\r
-#endif\r
-\r
-\r
-/*\r
- * Do we include math functions that demands lots of constant bytes?\r
- * (like erf, erfc, expm1, fma, lgamma, tgamma, and *_accurate)\r
- *\r
- */\r
-\r
-#ifndef _DLIB_ALLOW_LARGE_CONSTANT_TABLES_FOR_MATH\r
- #define _DLIB_ALLOW_LARGE_CONSTANT_TABLES_FOR_MATH 1\r
-#endif\r
-\r
-\r
-/*\r
- * Support of weak.\r
- *\r
- * __weak must be supported. Support of weak means that the call to\r
- * a weak declared function that isn't part of the application will be\r
- * executed as a nop instruction.\r
- *\r
- */\r
-\r
-#ifndef __WEAK\r
- #if !defined(__HAS_WEAK__) || !__HAS_WEAK__\r
- #error "Compiler must support __weak"\r
- #endif\r
- #define __WEAK _Pragma("object_attribute = __weak")\r
- #define __WEAK_DEFS 1\r
-#endif\r
-\r
-\r
-/*\r
- * Deleted options\r
- */\r
-#ifdef _DLIB_FLOAT_ENVIRONMENT\r
- #error "Option has been removed"\r
-#endif\r
-\r
-#ifdef _DLIB_SMALL_TARGET\r
- #error "Option has been removed"\r
-#endif\r
-\r
-#ifdef _DLIB_THREAD_SUPPORT\r
- #error "Option has been removed"\r
-#endif\r
-\r
-#endif /* _DLIB_DEFAULTS_H */\r
+++ /dev/null
-/* Copyright 2017 IAR Systems AB. */\r
-\r
-#ifndef _DLIB_PRODUCTS_H_\r
-#define _DLIB_PRODUCTS_H_\r
-\r
-#ifndef _SYSTEM_BUILD\r
- #pragma system_include\r
-#endif\r
-\r
-\r
-/*********************************************************************\r
-*\r
-* Configuration\r
-*\r
-*********************************************************************/\r
-\r
-/* Wide character and multi byte character support in library.\r
- * This is not allowed to vary over configurations, since math-library\r
- * is built with wide character support.\r
- */\r
-#define _DLIB_WIDE_CHARACTERS 1\r
-\r
-/* This ensures that the standard header file "string.h" includes\r
- * the Arm-specific file "DLib_Product_string.h". */\r
-#define _DLIB_PRODUCT_STRING 1\r
-\r
-/* This ensures that the standard header file "fenv.h" includes\r
- * the Arm-specific file "DLib_Product_fenv.h". */\r
-#define _DLIB_PRODUCT_FENV 1\r
-\r
-/* This ensures that the standard header file "stdlib.h" includes\r
- * the Arm-specific file "DLib_Product_stdlib.h". */\r
-#define _DLIB_PRODUCT_STDLIB 1\r
-\r
-/* Max buffer used for swap in qsort */\r
-#if !defined(_DLIB_QSORT_BUF_SIZE)\r
-#define _DLIB_QSORT_BUF_SIZE 128\r
-#endif\r
-\r
-#if defined(__RWPI__)\r
- /* No thread local storage with RWPI */\r
- #define _THREAD_LOCAL\r
-#endif \r
-\r
-/* Enable AEABI support */\r
-#define _DLIB_SUPPORT_FOR_AEABI 1\r
-\r
-/* Enable rtmodel for setjump buffer size */\r
-#define _DLIB_USE_RTMODEL_JMP_BUF_NUM_ELEMENTS 1\r
-\r
-/* Enable parsing of hex floats */\r
-#if !defined(_DLIB_STRTOD_HEX_FLOAT)\r
-#define _DLIB_STRTOD_HEX_FLOAT 1\r
-#elif _DLIB_STRTOD_HEX_FLOAT != 1\r
-#error "_DLIB_STRTOD_HEX_FLOAT must be 1 to match the math-library"\r
-#endif\r
-\r
-/* Special placement for locale structures when building ropi libraries */\r
-#if defined(__ROPI__)\r
-#define _LOCALE_PLACEMENT_ static\r
-#endif\r
-\r
-/* Use atomic if possible */\r
-#ifndef __STDC_NO_ATOMICS__\r
- #define _USE_ATOMIC_OPS 1\r
-#endif \r
-\r
-/* CPP-library uses software floatingpoint interface */\r
-#define __SOFTFP _Pragma( "type_attribute=__softfp" )\r
-\r
-/* functions for setting errno should be __no_scratch */\r
-#define __NO_SCRATCH _Pragma( "type_attribute=__no_scratch" )\r
-\r
-/* Use speedy implementation of floats (simple quad). */\r
-#define _DLIB_SPEEDY_FLOATS 1\r
-\r
-/* Configure generic ELF init routines. */\r
-#define _DLIB_ELF_INIT_STATIC_BASE_DECLARATION __no_init uint32_t __iar_SB @ r9\r
-#define _DLIB_ELF_INIT_STATIC_BASE __iar_SB\r
-#define _DLIB_ELF_INIT_FUNCTION_ATTRIBUTES \\r
- _Pragma("type_attribute=__interwork __thumb")\r
-#define _DLIB_ELF_INIT_TABLE_MEMORY __data\r
-#define _DLIB_ELF_INIT_SOURCE_MEMORY __data\r
-#define _DLIB_ELF_INIT_DESTINATION_MEMORY __data\r
-#define _DLIB_ELF_INIT_USE_RELATIVE_ROM_ADDRESSES 1\r
-#define _DLIB_ELF_INIT_REGION_COUNT_TYPE uint32_t\r
-#ifdef AVOID_ROPI\r
-#define _DLIB_ELF_INIT_MODULE_ATTRIBUTES \\r
- _Pragma("build_attribute vfpcc_compatible") \\r
- _Pragma("build_attribute arm_thumb_compatible") \\r
- _Pragma("build_attribute rwpi_compatible") \\r
- _Pragma("diag_suppress=Pa107") \\r
- _Pragma("rtmodel=\"CppFlavor\",\"*\"") \\r
- _Pragma("diag_default=Pa107")\r
-#else\r
-#define _DLIB_ELF_INIT_MODULE_ATTRIBUTES \\r
- _Pragma("build_attribute vfpcc_compatible") \\r
- _Pragma("build_attribute arm_thumb_compatible") \\r
- _Pragma("build_attribute ropi_compatible") \\r
- _Pragma("build_attribute rwpi_compatible") \\r
- _Pragma("diag_suppress=Pa107") \\r
- _Pragma("rtmodel=\"CppFlavor\",\"*\"") \\r
- _Pragma("diag_default=Pa107")\r
-#endif\r
-#define _DLIB_ELF_INIT_INTERFACE_VERSION 3\r
-\r
-#define _DLIB_USE_RTMODEL_JMP_BUF_NUM_ELEMENTS 1\r
-\r
-#define _XMATHWRAPPERS_DEF xarmmathwrappers.h\r
-\r
-#define _CPPINIT_ATTR _Pragma("no_bounds")\r
-\r
-#endif\r
-\r
+++ /dev/null
-/**************************************************\r
- *\r
- * ARM-specific configuration for stdlib.h in DLib.\r
- *\r
- * Copyright 2017 IAR Systems AB.\r
- *\r
- **************************************************/\r
-\r
-#ifndef _DLIB_PRODUCTS_STDLIB_H_\r
-#define _DLIB_PRODUCTS_STDLIB_H_\r
-\r
-#ifndef _SYSTEM_BUILD\r
- #pragma system_include\r
-#endif\r
-\r
-#ifndef _NO_DEFINITIONS_IN_HEADER_FILES\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif \r
-\r
-#pragma type_attribute=__value_in_regs\r
-div_t __aeabi_idivmod(int n, int d);\r
-\r
-#if !_DLIB_ONLY_C89\r
- #pragma type_attribute=__value_in_regs\r
- lldiv_t __aeabi_ldivmod(long long n, long long d);\r
-#endif \r
-\r
-#pragma inline=forced_no_body\r
-__ATTRIBUTES\r
-div_t div(int a, int b)\r
-{\r
-#if __ARM_FEATURE_IDIV \r
- int q = a / b;\r
- int r = a - (q*b);\r
- div_t d;\r
- d.quot = q;\r
- d.rem = r;\r
- return d;\r
-#else\r
- return __aeabi_idivmod(a, b);\r
-#endif \r
-}\r
-\r
-#pragma inline=forced_no_body\r
-__ATTRIBUTES\r
-ldiv_t ldiv(long a, long b)\r
-{\r
-#if __ARM_FEATURE_IDIV \r
- int q = a / b;\r
- int r = a - (q*b);\r
- ldiv_t ld;\r
- ld.quot = q;\r
- ld.rem = r;\r
-#else\r
- div_t d = __aeabi_idivmod(a, b);\r
- ldiv_t ld;\r
- ld.quot = d.quot;\r
- ld.rem = d.rem;\r
-#endif \r
- return ld;\r
-}\r
-\r
-#if !_DLIB_ONLY_C89\r
- #pragma inline=forced_no_body\r
- __ATTRIBUTES\r
- lldiv_t lldiv(long long a, long long b)\r
- {\r
- return __aeabi_ldivmod(a, b);\r
- }\r
-#endif \r
-\r
-#ifdef __cplusplus\r
-};\r
-#endif \r
-\r
-#endif /* _NO_DEFINITIONS_IN_HEADER_FILES */\r
-\r
-#endif /* _DLIB_PRODUCTS_STDLIB_H_ */\r
+++ /dev/null
-/**************************************************\r
- *\r
- * ARM-specific configuration for string.h in DLib.\r
- *\r
- * Copyright 2006-2017 IAR Systems AB.\r
- *\r
- * $Id: DLib_Product_string.h 126465 2018-03-21 15:15:50Z mats $\r
- *\r
- **************************************************/\r
-\r
-#ifndef _DLIB_PRODUCTS_STRING_H_\r
-#define _DLIB_PRODUCTS_STRING_H_\r
-\r
-#ifndef _SYSTEM_BUILD\r
- #pragma system_include\r
-#endif\r
-\r
-#ifndef _NO_DEFINITIONS_IN_HEADER_FILES\r
-\r
- /*\r
- * The following is pre-declared by the compiler.\r
- *\r
- * __INTRINSIC void __aeabi_memset (void *, size_t, int);\r
- * __INTRINSIC void __aeabi_memcpy (void *, const void *, size_t);\r
- * __INTRINSIC void __aeabi_memmove(void *, const void *, size_t);\r
- */\r
-\r
-\r
- /*\r
- * Inhibit inline definitions for routines with an effective\r
- * ARM-specific implementation.\r
- *\r
- * Not in Cortex-M1 and Cortex-MS1\r
- */\r
-\r
- #if __CORE__ != 11 && __CORE__ != 12\r
-\r
- #define _DLIB_STRING_SKIP_INLINE_MEMCHR\r
- #define _DLIB_STRING_SKIP_INLINE_MEMCMP\r
- #define _DLIB_STRING_SKIP_INLINE_STRCHR\r
- #define _DLIB_STRING_SKIP_INLINE_STRCMP\r
- #define _DLIB_STRING_SKIP_INLINE_STRLEN\r
- #define _DLIB_STRING_SKIP_INLINE_STRNCPY\r
-\r
- #endif\r
-\r
- /*\r
- * Redirect calls to standard functions to the corresponding\r
- * __aeabi_X function.\r
- */\r
-#ifndef __AS_BOUNDS__\r
-_EXTERN_C\r
-\r
- #define _DLIB_STRING_SKIP_INLINE_MEMCPY\r
- #pragma inline=forced_no_body\r
- __EFF_NENR1NW2R1 __ATTRIBUTES void * memcpy(void * _D, const void * _S, size_t _N)\r
- {\r
- __aeabi_memcpy(_D, _S, _N);\r
- return _D;\r
- }\r
-\r
- #define _DLIB_STRING_SKIP_INLINE_MEMMOVE\r
- #pragma inline=forced_no_body\r
- __EFF_NENR1NW2R1 __ATTRIBUTES void * memmove(void * _D, const void * _S, size_t _N)\r
- {\r
- __aeabi_memmove(_D, _S, _N);\r
- return _D;\r
- }\r
-\r
- #define _DLIB_STRING_SKIP_INLINE_MEMSET\r
- #pragma inline=forced_no_body\r
- __EFF_NENR1R1 __ATTRIBUTES void * memset(void * _D, int _C, size_t _N)\r
- {\r
- __aeabi_memset(_D, _N, _C);\r
- return _D;\r
- }\r
-\r
-_EXTERN_C_END\r
-#endif /* __AS_BOUNDS__ */\r
-#endif /* _NO_DEFINITIONS_IN_HEADER_FILES */\r
-\r
-#endif /* _DLIB_PRODUCTS_STRING_H_ */\r
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYX_ARG_INTERNAL_H
-#define JERRYX_ARG_INTERNAL_H
-
-#include "jerryscript.h"
-
-/**
- * The iterator structor for JS arguments.
- */
-struct jerryx_arg_js_iterator_t
-{
- const jerry_value_t *js_arg_p; /**< the JS arguments */
- const jerry_length_t js_arg_cnt; /**< the total num of JS arguments */
- jerry_length_t js_arg_idx; /**< current index of JS argument */
-};
-
-#endif /* !JERRYX_ARG_INTERNAL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYX_ARG_H
-#define JERRYX_ARG_H
-
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include "jerryscript.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-/**
- * The forward declaration of jerryx_arg_t.
- */
-typedef struct jerryx_arg_t jerryx_arg_t;
-
-/**
- * The forward declaration of jerryx_arg_js_iterator_t
- */
-typedef struct jerryx_arg_js_iterator_t jerryx_arg_js_iterator_t;
-
-/**
- * Signature of the transform function.
- */
-typedef jerry_value_t (*jerryx_arg_transform_func_t) (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */
- const jerryx_arg_t *c_arg_p); /**< native arg */
-
-/**
- * The structure used in jerryx_arg_object_properties
- */
-typedef struct
-{
- const jerry_char_t **name_p; /**< property name list of the JS object */
- jerry_length_t name_cnt; /**< count of the name list */
- const jerryx_arg_t *c_arg_p; /**< points to the array of transformation steps */
- jerry_length_t c_arg_cnt; /**< the count of the `c_arg_p` array */
-} jerryx_arg_object_props_t;
-
-/**
- * The structure used in jerryx_arg_array
- */
-typedef struct
-{
- const jerryx_arg_t *c_arg_p; /**< points to the array of transformation steps */
- jerry_length_t c_arg_cnt; /**< the count of the `c_arg_p` array */
-} jerryx_arg_array_items_t;
-
-/**
- * The structure defining a single validation & transformation step.
- */
-struct jerryx_arg_t
-{
- jerryx_arg_transform_func_t func; /**< the transform function */
- void *dest; /**< pointer to destination where func should store the result */
- uintptr_t extra_info; /**< extra information, specific to func */
-};
-
-jerry_value_t jerryx_arg_transform_this_and_args (const jerry_value_t this_val,
- const jerry_value_t *js_arg_p,
- const jerry_length_t js_arg_cnt,
- const jerryx_arg_t *c_arg_p,
- jerry_length_t c_arg_cnt);
-
-jerry_value_t jerryx_arg_transform_args (const jerry_value_t *js_arg_p,
- const jerry_length_t js_arg_cnt,
- const jerryx_arg_t *c_arg_p,
- jerry_length_t c_arg_cnt);
-
-jerry_value_t jerryx_arg_transform_object_properties (const jerry_value_t obj_val,
- const jerry_char_t **name_p,
- const jerry_length_t name_cnt,
- const jerryx_arg_t *c_arg_p,
- jerry_length_t c_arg_cnt);
-jerry_value_t jerryx_arg_transform_array (const jerry_value_t array_val,
- const jerryx_arg_t *c_arg_p,
- jerry_length_t c_arg_cnt);
-
-/**
- * Indicates whether an argument is allowed to be coerced into the expected JS type.
- */
-typedef enum
-{
- JERRYX_ARG_COERCE, /**< the transform inside will invoke toNumber, toBoolean or toString */
- JERRYX_ARG_NO_COERCE /**< the type coercion is not allowed. */
-} jerryx_arg_coerce_t;
-
-/**
- * Indicates whether an argument is optional or required.
- */
-typedef enum
-{
- /**
- * The argument is optional. If the argument is `undefined` the transform is
- * successful and `c_arg_p->dest` remains untouched.
- */
- JERRYX_ARG_OPTIONAL,
- /**
- * The argument is required. If the argument is `undefined` the transform
- * will fail and `c_arg_p->dest` remains untouched.
- */
- JERRYX_ARG_REQUIRED
-} jerryx_arg_optional_t;
-
-/**
- * Indicates the rounding policy which will be chosen to transform an integer.
- */
-typedef enum
-{
- JERRYX_ARG_ROUND, /**< round */
- JERRYX_ARG_FLOOR, /**< floor */
- JERRYX_ARG_CEIL /**< ceil */
-} jerryx_arg_round_t;
-
-/**
- * Indicates the clamping policy which will be chosen to transform an integer.
- * If the policy is NO_CLAMP, and the number is out of range,
- * then the transformer will throw a range error.
- */
-typedef enum
-{
- JERRYX_ARG_CLAMP,/**< clamp the number when it is out of range */
- JERRYX_ARG_NO_CLAMP /**< throw a range error */
-} jerryx_arg_clamp_t;
-
-/* Inline functions for initializing jerryx_arg_t */
-
-#define JERRYX_ARG_INTEGER(type) \
- static inline jerryx_arg_t \
- jerryx_arg_ ## type (type ## _t *dest, \
- jerryx_arg_round_t round_flag, \
- jerryx_arg_clamp_t clamp_flag, \
- jerryx_arg_coerce_t coerce_flag, \
- jerryx_arg_optional_t opt_flag);
-
-JERRYX_ARG_INTEGER (uint8)
-JERRYX_ARG_INTEGER (int8)
-JERRYX_ARG_INTEGER (uint16)
-JERRYX_ARG_INTEGER (int16)
-JERRYX_ARG_INTEGER (uint32)
-JERRYX_ARG_INTEGER (int32)
-
-#undef JERRYX_ARG_INTEGER
-
-static inline jerryx_arg_t
-jerryx_arg_number (double *dest, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_boolean (bool *dest, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_string (char *dest, uint32_t size, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_utf8_string (char *dest, uint32_t size, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_function (jerry_value_t *dest, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_native_pointer (void **dest, const jerry_object_native_info_t *info_p, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_ignore (void);
-static inline jerryx_arg_t
-jerryx_arg_custom (void *dest, uintptr_t extra_info, jerryx_arg_transform_func_t func);
-static inline jerryx_arg_t
-jerryx_arg_object_properties (const jerryx_arg_object_props_t *object_props_p, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_array (const jerryx_arg_array_items_t *array_items_p, jerryx_arg_optional_t opt_flag);
-
-jerry_value_t
-jerryx_arg_transform_optional (jerryx_arg_js_iterator_t *js_arg_iter_p,
- const jerryx_arg_t *c_arg_p,
- jerryx_arg_transform_func_t func);
-
-/* Helper functions for transform functions. */
-jerry_value_t jerryx_arg_js_iterator_pop (jerryx_arg_js_iterator_t *js_arg_iter_p);
-jerry_value_t jerryx_arg_js_iterator_restore (jerryx_arg_js_iterator_t *js_arg_iter_p);
-jerry_value_t jerryx_arg_js_iterator_peek (jerryx_arg_js_iterator_t *js_arg_iter_p);
-jerry_length_t jerryx_arg_js_iterator_index (jerryx_arg_js_iterator_t *js_arg_iter_p);
-
-#include "arg.impl.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* !JERRYX_ARG_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYX_ARG_IMPL_H
-#define JERRYX_ARG_IMPL_H
-
-/* transform functions for each type. */
-
-#define JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL(type) \
- jerry_value_t jerryx_arg_transform_ ## type (jerryx_arg_js_iterator_t *js_arg_iter_p, \
- const jerryx_arg_t *c_arg_p); \
- jerry_value_t jerryx_arg_transform_ ## type ## _optional (jerryx_arg_js_iterator_t *js_arg_iter_p, \
- const jerryx_arg_t *c_arg_p);
-
-#define JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT(type) \
- JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (type) \
- JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (type ## _strict)
-
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (uint8)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (int8)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (uint16)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (int16)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (uint32)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (int32)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (number)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (string)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (utf8_string)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (boolean)
-
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (function)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (native_pointer)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (object_props)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (array_items)
-
-jerry_value_t jerryx_arg_transform_ignore (jerryx_arg_js_iterator_t *js_arg_iter_p,
- const jerryx_arg_t *c_arg_p);
-
-#undef JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL
-#undef JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT
-
-/**
- * The structure indicates the options used to transform integer argument.
- * It will be passed into jerryx_arg_t's extra_info field.
- */
-typedef struct
-{
- uint8_t round; /**< rounding policy */
- uint8_t clamp; /**< clamping policy */
-} jerryx_arg_int_option_t;
-
-/**
- * The macro used to generate jerryx_arg_xxx for int type.
- */
-#define JERRYX_ARG_INT(type) \
- static inline jerryx_arg_t \
- jerryx_arg_ ## type (type ## _t *dest, \
- jerryx_arg_round_t round_flag, \
- jerryx_arg_clamp_t clamp_flag, \
- jerryx_arg_coerce_t coerce_flag, \
- jerryx_arg_optional_t opt_flag) \
- { \
- jerryx_arg_transform_func_t func; \
- if (coerce_flag == JERRYX_ARG_NO_COERCE) \
- { \
- if (opt_flag == JERRYX_ARG_OPTIONAL) \
- { \
- func = jerryx_arg_transform_ ## type ## _strict_optional; \
- } \
- else \
- { \
- func = jerryx_arg_transform_ ## type ## _strict; \
- } \
- } \
- else \
- { \
- if (opt_flag == JERRYX_ARG_OPTIONAL) \
- { \
- func = jerryx_arg_transform_ ## type ## _optional; \
- } \
- else \
- { \
- func = jerryx_arg_transform_ ## type; \
- } \
- } \
- union \
- { \
- jerryx_arg_int_option_t int_option; \
- uintptr_t extra_info; \
- } u = { .int_option = { .round = (uint8_t) round_flag, .clamp = (uint8_t) clamp_flag } }; \
- return (jerryx_arg_t) \
- { \
- .func = func, \
- .dest = (void *) dest, \
- .extra_info = u.extra_info \
- }; \
- }
-
-JERRYX_ARG_INT (uint8)
-JERRYX_ARG_INT (int8)
-JERRYX_ARG_INT (uint16)
-JERRYX_ARG_INT (int16)
-JERRYX_ARG_INT (uint32)
-JERRYX_ARG_INT (int32)
-
-#undef JERRYX_ARG_INT
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `number` JS argument and stores it into a C `double`.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_number (double *dest, /**< pointer to the double where the result should be stored */
- jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (coerce_flag == JERRYX_ARG_NO_COERCE)
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_number_strict_optional;
- }
- else
- {
- func = jerryx_arg_transform_number_strict;
- }
- }
- else
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_number_optional;
- }
- else
- {
- func = jerryx_arg_transform_number;
- }
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest
- };
-} /* jerryx_arg_number */
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `boolean` JS argument and stores it into a C `bool`.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_boolean (bool *dest, /**< points to the native bool */
- jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (coerce_flag == JERRYX_ARG_NO_COERCE)
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_boolean_strict_optional;
- }
- else
- {
- func = jerryx_arg_transform_boolean_strict;
- }
- }
- else
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_boolean_optional;
- }
- else
- {
- func = jerryx_arg_transform_boolean;
- }
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest
- };
-} /* jerryx_arg_boolean */
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `string` JS argument and stores it into a C `char` array.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_string (char *dest, /**< pointer to the native char array where the result should be stored */
- uint32_t size, /**< the size of native char array */
- jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (coerce_flag == JERRYX_ARG_NO_COERCE)
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_string_strict_optional;
- }
- else
- {
- func = jerryx_arg_transform_string_strict;
- }
- }
- else
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_string_optional;
- }
- else
- {
- func = jerryx_arg_transform_string;
- }
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest,
- .extra_info = (uintptr_t) size
- };
-} /* jerryx_arg_string */
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `string` JS argument and stores it into a C utf8 `char` array.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_utf8_string (char *dest, /**< [out] pointer to the native char array where the result should be stored */
- uint32_t size, /**< the size of native char array */
- jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (coerce_flag == JERRYX_ARG_NO_COERCE)
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_utf8_string_strict_optional;
- }
- else
- {
- func = jerryx_arg_transform_utf8_string_strict;
- }
- }
- else
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_utf8_string_optional;
- }
- else
- {
- func = jerryx_arg_transform_utf8_string;
- }
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest,
- .extra_info = (uintptr_t) size
- };
-} /* jerryx_arg_utf8_string */
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `function` JS argument and stores it into a C `jerry_value_t`.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_function (jerry_value_t *dest, /**< pointer to the jerry_value_t where the result should be stored */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_function_optional;
- }
- else
- {
- func = jerryx_arg_transform_function;
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest
- };
-} /* jerryx_arg_function */
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `object` JS argument that is 'backed' with a native pointer with
- * a given type info. In case the native pointer info matches, the transform
- * will succeed and the object's native pointer will be assigned to *dest.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_native_pointer (void **dest, /**< pointer to where the resulting native pointer should be stored */
- const jerry_object_native_info_t *info_p, /**< expected the type info */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_native_pointer_optional;
- }
- else
- {
- func = jerryx_arg_transform_native_pointer;
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest,
- .extra_info = (uintptr_t) info_p
- };
-} /* jerryx_arg_native_pointer */
-
-/**
- * Create a jerryx_arg_t instance for ignored argument.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_ignore (void)
-{
- return (jerryx_arg_t)
- {
- .func = jerryx_arg_transform_ignore
- };
-} /* jerryx_arg_ignore */
-
-/**
- * Create a jerryx_arg_t instance with custom transform.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_custom (void *dest, /**< pointer to the native argument where the result should be stored */
- uintptr_t extra_info, /**< the extra parameter, specific to the transform function */
- jerryx_arg_transform_func_t func) /**< the custom transform function */
-{
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = dest,
- .extra_info = extra_info
- };
-} /* jerryx_arg_custom */
-
-/**
- * Create a jerryx_arg_t instance for object properties.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_object_properties (const jerryx_arg_object_props_t *object_props, /**< pointer to object property mapping */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_object_props_optional;
- }
- else
- {
- func = jerryx_arg_transform_object_props;
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = NULL,
- .extra_info = (uintptr_t) object_props
- };
-} /* jerryx_arg_object_properties */
-
-/**
- * Create a jerryx_arg_t instance for array.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_array (const jerryx_arg_array_items_t *array_items_p, /**< pointer to array items mapping */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_array_items_optional;
- }
- else
- {
- func = jerryx_arg_transform_array_items;
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = NULL,
- .extra_info = (uintptr_t) array_items_p
- };
-} /* jerryx_arg_array */
-
-#endif /* !JERRYX_ARG_IMPL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef BYTE_CODE_H
-#define BYTE_CODE_H
-
-#include "ecma-globals.h"
-
-/** \addtogroup parser Parser
- * @{
- *
- * \addtogroup jsparser JavaScript
- * @{
- *
- * \addtogroup jsparser_bytecode Bytecode
- * @{
- */
-
-/**
- * Compact byte code (CBC) is a byte code representation
- * of EcmaScript which is designed for low memory
- * environments. Most opcodes are only one or sometimes
- * two byte long so the CBC provides a small binary size.
- *
- * The execution engine of CBC is a stack machine, where
- * the maximum stack size is known in advance for each
- * function.
- */
-
-/**
- * Byte code flags. Only the lower 5 bit can be used
- * since the stack change is encoded in the upper
- * three bits for each instruction between -4 and 3
- * (except for call / construct opcodes).
- */
-#define CBC_STACK_ADJUST_BASE 4
-#define CBC_STACK_ADJUST_SHIFT 5
-#define CBC_STACK_ADJUST_VALUE(value) \
- (((value) >> CBC_STACK_ADJUST_SHIFT) - CBC_STACK_ADJUST_BASE)
-
-#define CBC_NO_FLAG 0x00u
-#define CBC_HAS_LITERAL_ARG 0x01u
-#define CBC_HAS_LITERAL_ARG2 0x02u
-#define CBC_HAS_BYTE_ARG 0x04u
-#define CBC_HAS_BRANCH_ARG 0x08u
-
-/* These flags are shared */
-#define CBC_FORWARD_BRANCH_ARG 0x10u
-#define CBC_POP_STACK_BYTE_ARG 0x10u
-
-#define CBC_ARG_TYPES (CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2 | CBC_HAS_BYTE_ARG | CBC_HAS_BRANCH_ARG)
-
-#define CBC_HAS_POP_STACK_BYTE_ARG (CBC_HAS_BYTE_ARG | CBC_POP_STACK_BYTE_ARG)
-
-#if ENABLED (JERRY_ES2015_CLASS)
-/**
- * Checks whether the current opcode is a super constructor call
- */
-#define CBC_SUPER_CALL_OPERATION(opcode) \
- ((opcode) >= PARSER_TO_EXT_OPCODE (CBC_EXT_SUPER_CALL) \
- && (opcode) <= PARSER_TO_EXT_OPCODE (CBC_EXT_SUPER_CALL_BLOCK))
-#else /* !ENABLED (JERRY_ES2015_CLASS) */
-/**
- * Checks whether the current opcode is a super constructor call
- */
-#define CBC_SUPER_CALL_OPERATION(opcode) false
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
-
-/* Debug macro. */
-#define CBC_ARGS_EQ(op, types) \
- ((cbc_flags[op] & CBC_ARG_TYPES) == (types))
-
-/* Debug macro. */
-#define CBC_SAME_ARGS(op1, op2) \
- (CBC_SUPER_CALL_OPERATION (op1) ? ((cbc_ext_flags[PARSER_GET_EXT_OPCODE (op1)] & CBC_ARG_TYPES) \
- == (cbc_ext_flags[PARSER_GET_EXT_OPCODE (op2)] & CBC_ARG_TYPES)) \
- : ((cbc_flags[op1] & CBC_ARG_TYPES) == (cbc_flags[op2] & CBC_ARG_TYPES)))
-
-#define CBC_UNARY_OPERATION(name, group) \
- CBC_OPCODE (name, CBC_NO_FLAG, 0, \
- (VM_OC_ ## group) | VM_OC_GET_STACK | VM_OC_PUT_STACK) \
- CBC_OPCODE (name ## _LITERAL, CBC_HAS_LITERAL_ARG, 1, \
- (VM_OC_ ## group) | VM_OC_GET_LITERAL | VM_OC_PUT_STACK)
-
-#define CBC_BINARY_OPERATION(name, group) \
- CBC_OPCODE (name, CBC_NO_FLAG, -1, \
- (VM_OC_ ## group) | VM_OC_GET_STACK_STACK | VM_OC_PUT_STACK) \
- CBC_OPCODE (name ## _RIGHT_LITERAL, CBC_HAS_LITERAL_ARG, 0, \
- (VM_OC_ ## group) | VM_OC_GET_STACK_LITERAL | VM_OC_PUT_STACK) \
- CBC_OPCODE (name ## _TWO_LITERALS, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 1, \
- (VM_OC_ ## group) | VM_OC_GET_LITERAL_LITERAL | VM_OC_PUT_STACK)
-
-#define CBC_UNARY_LVALUE_OPERATION(name, group) \
- CBC_OPCODE (name, CBC_NO_FLAG, -2, \
- (VM_OC_PROP_ ## group) | VM_OC_GET_STACK_STACK | VM_OC_PUT_REFERENCE) \
- CBC_OPCODE (name ## _PUSH_RESULT, CBC_NO_FLAG, -1, \
- (VM_OC_PROP_ ## group) | VM_OC_GET_STACK_STACK | VM_OC_PUT_REFERENCE | VM_OC_PUT_STACK) \
- CBC_OPCODE (name ## _BLOCK, CBC_NO_FLAG, -2, \
- (VM_OC_PROP_ ## group) | VM_OC_GET_STACK_STACK | VM_OC_PUT_REFERENCE | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (name ## _IDENT, CBC_HAS_LITERAL_ARG, 0, \
- (VM_OC_ ## group) | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT) \
- CBC_OPCODE (name ## _IDENT_PUSH_RESULT, CBC_HAS_LITERAL_ARG, 1, \
- (VM_OC_ ## group) | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT | VM_OC_PUT_STACK) \
- CBC_OPCODE (name ## _IDENT_BLOCK, CBC_HAS_LITERAL_ARG, 0, \
- (VM_OC_ ## group) | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT | VM_OC_PUT_BLOCK)
-
-#define CBC_UNARY_LVALUE_WITH_IDENT 3
-
-#define CBC_BINARY_WITH_LITERAL 1
-#define CBC_BINARY_WITH_TWO_LITERALS 2
-
-/**
- * Several opcodes (mostly call and assignment opcodes) have
- * two forms: one which does not push a return value onto
- * the stack, and another which does. The reason is that
- * the return value of these opcodes are often not used
- * and the first form provides smaller byte code.
- *
- * The following rules must be kept by the code generator:
- * - only the opcode without return value can be emitted
- * by the code generator
- * - the first form can be converted to the second form
- * by adding 1 to the opcode
- * - after the conversion the opcode must be immediately
- * flushed, so no further changes are possible
- *
- * Hence CBC_NO_RESULT_OPERATION (context_p->last_cbc_opcode)
- * cannot be true for an opcode which has a result
- */
-#define CBC_NO_RESULT_OPERATION(opcode) \
- (((opcode) >= CBC_PRE_INCR && (opcode) < CBC_END) || CBC_SUPER_CALL_OPERATION ((opcode)))
-
-/**
- * Branch instructions are organized in group of 8 opcodes.
- * - 1st opcode: unused, can be used for other purpose
- * - 2nd opcode: forward branch with 1 byte offset
- * - 3rd opcode: forward branch with 2 byte offset
- * - 4th opcode: forward branch with 3 byte offset
- * - 5th opcode: unused, can be used for other purpose
- * - 6th opcode: backward branch with 1 byte offset
- * - 7th opcode: backward branch with 2 byte offset
- * - 8th opcode: backward branch with 3 byte offset
- *
- * Reasons:
- * The branch_opcode & 0x3 tells the length in bytes of the offset
- * If branch offset & 0x4 == 0, it is a forward branch. Otherwise
- * it is backward.
- *
- * The offset bytes are encoded in higher to lower order.
- */
-
-#define CBC_FORWARD_BRANCH(name, stack, vm_oc) \
- CBC_OPCODE (name, CBC_HAS_BRANCH_ARG | CBC_FORWARD_BRANCH_ARG, stack, \
- (vm_oc) | VM_OC_GET_BRANCH) \
- CBC_OPCODE (name ## _2, CBC_HAS_BRANCH_ARG | CBC_FORWARD_BRANCH_ARG, stack, \
- (vm_oc) | VM_OC_GET_BRANCH) \
- CBC_OPCODE (name ## _3, CBC_HAS_BRANCH_ARG | CBC_FORWARD_BRANCH_ARG, stack, \
- (vm_oc) | VM_OC_GET_BRANCH)
-
-#define CBC_BACKWARD_BRANCH(name, stack, vm_oc) \
- CBC_OPCODE (name, CBC_HAS_BRANCH_ARG, stack, \
- (vm_oc) | VM_OC_GET_BRANCH | VM_OC_BACKWARD_BRANCH) \
- CBC_OPCODE (name ## _2, CBC_HAS_BRANCH_ARG, stack, \
- (vm_oc) | VM_OC_GET_BRANCH | VM_OC_BACKWARD_BRANCH) \
- CBC_OPCODE (name ## _3, CBC_HAS_BRANCH_ARG, stack, \
- (vm_oc) | VM_OC_GET_BRANCH | VM_OC_BACKWARD_BRANCH)
-
-#define CBC_BRANCH_OFFSET_LENGTH(opcode) \
- ((opcode) & 0x3)
-
-#define CBC_BRANCH_IS_BACKWARD(flags) \
- (!((flags) & CBC_FORWARD_BRANCH_ARG))
-
-#define CBC_BRANCH_IS_FORWARD(flags) \
- ((flags) & CBC_FORWARD_BRANCH_ARG)
-
-/* Stack consumption of opcodes with context. */
-
-/* PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION must be <= 3 */
-#define PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION 3
-/* PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION must be <= 4 */
-#define PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION 4
-/* PARSER_WITH_CONTEXT_STACK_ALLOCATION must be <= 4 */
-#define PARSER_WITH_CONTEXT_STACK_ALLOCATION 1
-/* PARSER_SUPER_CLASS_CONTEXT_STACK_ALLOCATION must be <= 4 */
-#define PARSER_SUPER_CLASS_CONTEXT_STACK_ALLOCATION 1
-/* PARSER_TRY_CONTEXT_STACK_ALLOCATION must be <= 3 */
-#define PARSER_TRY_CONTEXT_STACK_ALLOCATION 2
-
-/**
- * Opcode definitions.
- */
-#define CBC_OPCODE_LIST \
- /* Branch opcodes first. Some other opcodes are mixed. */ \
- CBC_OPCODE (CBC_EXT_OPCODE, CBC_NO_FLAG, 0, \
- VM_OC_NONE) \
- CBC_FORWARD_BRANCH (CBC_JUMP_FORWARD, 0, \
- VM_OC_JUMP) \
- CBC_OPCODE (CBC_POP, CBC_NO_FLAG, -1, \
- VM_OC_POP) \
- CBC_BACKWARD_BRANCH (CBC_JUMP_BACKWARD, 0, \
- VM_OC_JUMP) \
- CBC_OPCODE (CBC_POP_BLOCK, CBC_NO_FLAG, -1, \
- VM_OC_POP_BLOCK | VM_OC_PUT_BLOCK) \
- CBC_FORWARD_BRANCH (CBC_BRANCH_IF_TRUE_FORWARD, -1, \
- VM_OC_BRANCH_IF_TRUE) \
- CBC_OPCODE (CBC_THROW, CBC_NO_FLAG, -1, \
- VM_OC_THROW | VM_OC_GET_STACK) \
- CBC_BACKWARD_BRANCH (CBC_BRANCH_IF_TRUE_BACKWARD, -1, \
- VM_OC_BRANCH_IF_TRUE) \
- CBC_OPCODE (CBC_CONTEXT_END, CBC_NO_FLAG, 0, \
- VM_OC_CONTEXT_END) \
- CBC_FORWARD_BRANCH (CBC_BRANCH_IF_FALSE_FORWARD, -1, \
- VM_OC_BRANCH_IF_FALSE) \
- CBC_OPCODE (CBC_CREATE_OBJECT, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_OBJECT | VM_OC_PUT_STACK) \
- CBC_BACKWARD_BRANCH (CBC_BRANCH_IF_FALSE_BACKWARD, -1, \
- VM_OC_BRANCH_IF_FALSE) \
- CBC_OPCODE (CBC_SET_PROPERTY, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_SET_PROPERTY | VM_OC_NON_STATIC_FLAG | VM_OC_GET_STACK_LITERAL) \
- CBC_FORWARD_BRANCH (CBC_JUMP_FORWARD_EXIT_CONTEXT, 0, \
- VM_OC_JUMP_AND_EXIT_CONTEXT) \
- CBC_OPCODE (CBC_CREATE_ARRAY, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_ARRAY | VM_OC_PUT_STACK) \
- CBC_FORWARD_BRANCH (CBC_BRANCH_IF_LOGICAL_TRUE, -1, \
- VM_OC_BRANCH_IF_LOGICAL_TRUE) \
- CBC_OPCODE (CBC_ARRAY_APPEND, CBC_HAS_POP_STACK_BYTE_ARG, 0, \
- VM_OC_APPEND_ARRAY) \
- CBC_FORWARD_BRANCH (CBC_BRANCH_IF_LOGICAL_FALSE, -1, \
- VM_OC_BRANCH_IF_LOGICAL_FALSE) \
- CBC_OPCODE (CBC_PUSH_ELISION, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_ELISON | VM_OC_PUT_STACK) \
- CBC_FORWARD_BRANCH (CBC_BRANCH_IF_STRICT_EQUAL, -1, \
- VM_OC_BRANCH_IF_STRICT_EQUAL) \
- \
- /* Basic opcodes. Note: These 4 opcodes must me in this order */ \
- CBC_OPCODE (CBC_PUSH_LITERAL, CBC_HAS_LITERAL_ARG, 1, \
- VM_OC_PUSH | VM_OC_GET_LITERAL) \
- CBC_OPCODE (CBC_PUSH_TWO_LITERALS, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 2, \
- VM_OC_PUSH_TWO | VM_OC_GET_LITERAL_LITERAL) \
- CBC_OPCODE (CBC_PUSH_THIS_LITERAL, CBC_HAS_LITERAL_ARG, 2, \
- VM_OC_PUSH_TWO | VM_OC_GET_THIS_LITERAL) \
- CBC_OPCODE (CBC_PUSH_THREE_LITERALS, CBC_HAS_LITERAL_ARG2, 3, \
- VM_OC_PUSH_THREE | VM_OC_GET_LITERAL_LITERAL) \
- CBC_OPCODE (CBC_PUSH_UNDEFINED, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_UNDEFINED | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_TRUE, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_TRUE | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_FALSE, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_FALSE | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_NULL, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_NULL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_THIS, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_THIS | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_NUMBER_0, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_0 | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_NUMBER_POS_BYTE, CBC_HAS_BYTE_ARG, 1, \
- VM_OC_PUSH_POS_BYTE | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_NUMBER_NEG_BYTE, CBC_HAS_BYTE_ARG, 1, \
- VM_OC_PUSH_NEG_BYTE | VM_OC_PUT_STACK) \
- /* Note: These 4 opcodes must me in this order */ \
- CBC_OPCODE (CBC_PUSH_PROP, CBC_NO_FLAG, -1, \
- VM_OC_PROP_GET | VM_OC_GET_STACK_STACK | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_PROP_LITERAL, CBC_HAS_LITERAL_ARG, 0, \
- VM_OC_PROP_GET | VM_OC_GET_STACK_LITERAL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_PROP_LITERAL_LITERAL, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 1, \
- VM_OC_PROP_GET | VM_OC_GET_LITERAL_LITERAL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_PROP_THIS_LITERAL, CBC_HAS_LITERAL_ARG, 1, \
- VM_OC_PROP_GET | VM_OC_GET_THIS_LITERAL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_IDENT_REFERENCE, CBC_HAS_LITERAL_ARG, 3, \
- VM_OC_IDENT_REFERENCE | VM_OC_PUT_STACK) \
- /* Note: These 4 opcodes must me in this order */ \
- CBC_OPCODE (CBC_PUSH_PROP_REFERENCE, CBC_NO_FLAG, 1, \
- VM_OC_PROP_REFERENCE | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_PROP_LITERAL_REFERENCE, CBC_HAS_LITERAL_ARG, 2, \
- VM_OC_PROP_REFERENCE | VM_OC_GET_LITERAL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_PROP_LITERAL_LITERAL_REFERENCE, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 3, \
- VM_OC_PROP_REFERENCE | VM_OC_GET_LITERAL_LITERAL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_PUSH_PROP_THIS_LITERAL_REFERENCE, CBC_HAS_LITERAL_ARG, 3, \
- VM_OC_PROP_REFERENCE | VM_OC_GET_THIS_LITERAL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_NEW, CBC_HAS_POP_STACK_BYTE_ARG, 0, \
- VM_OC_NEW | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_NEW0, CBC_NO_FLAG, 0, \
- VM_OC_NEW | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_NEW1, CBC_NO_FLAG, -1, \
- VM_OC_NEW | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_EVAL, CBC_NO_FLAG, 0, \
- VM_OC_EVAL) \
- CBC_OPCODE (CBC_DEFINE_VARS, CBC_HAS_LITERAL_ARG, 0, \
- VM_OC_NONE) \
- CBC_OPCODE (CBC_INITIALIZE_VAR, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \
- VM_OC_NONE) \
- CBC_OPCODE (CBC_INITIALIZE_VARS, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \
- VM_OC_NONE) \
- CBC_OPCODE (CBC_SET_BYTECODE_PTR, CBC_NO_FLAG, 0, \
- VM_OC_NONE) \
- CBC_OPCODE (CBC_RETURN, CBC_NO_FLAG, -1, \
- VM_OC_RET | VM_OC_GET_STACK) \
- CBC_OPCODE (CBC_RETURN_WITH_BLOCK, CBC_NO_FLAG, 0, \
- VM_OC_RET) \
- CBC_OPCODE (CBC_RETURN_WITH_LITERAL, CBC_HAS_LITERAL_ARG, 0, \
- VM_OC_RET | VM_OC_GET_LITERAL) \
- CBC_OPCODE (CBC_SET_LITERAL_PROPERTY, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \
- VM_OC_SET_PROPERTY | VM_OC_NON_STATIC_FLAG | VM_OC_GET_LITERAL_LITERAL) \
- CBC_OPCODE (CBC_BREAKPOINT_ENABLED, CBC_NO_FLAG, 0, \
- VM_OC_BREAKPOINT_ENABLED) \
- CBC_OPCODE (CBC_BREAKPOINT_DISABLED, CBC_NO_FLAG, 0, \
- VM_OC_BREAKPOINT_DISABLED) \
- \
- /* Unary opcodes. */ \
- CBC_UNARY_OPERATION (CBC_PLUS, \
- PLUS) \
- CBC_UNARY_OPERATION (CBC_NEGATE, \
- MINUS) \
- CBC_UNARY_OPERATION (CBC_LOGICAL_NOT, \
- NOT) \
- CBC_UNARY_OPERATION (CBC_BIT_NOT, \
- BIT_NOT) \
- CBC_UNARY_OPERATION (CBC_VOID, \
- VOID) \
- CBC_OPCODE (CBC_TYPEOF, CBC_NO_FLAG, 0, \
- VM_OC_TYPEOF | VM_OC_GET_STACK | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_TYPEOF_IDENT, CBC_HAS_LITERAL_ARG, 1, \
- VM_OC_TYPEOF_IDENT | VM_OC_PUT_STACK) \
- \
- /* Binary opcodes. */ \
- CBC_BINARY_OPERATION (CBC_BIT_OR, \
- BIT_OR) \
- CBC_BINARY_OPERATION (CBC_BIT_XOR, \
- BIT_XOR) \
- CBC_BINARY_OPERATION (CBC_BIT_AND, \
- BIT_AND) \
- CBC_BINARY_OPERATION (CBC_EQUAL, \
- EQUAL) \
- CBC_BINARY_OPERATION (CBC_NOT_EQUAL, \
- NOT_EQUAL) \
- CBC_BINARY_OPERATION (CBC_STRICT_EQUAL, \
- STRICT_EQUAL) \
- CBC_BINARY_OPERATION (CBC_STRICT_NOT_EQUAL, \
- STRICT_NOT_EQUAL) \
- CBC_BINARY_OPERATION (CBC_LESS, \
- LESS) \
- CBC_BINARY_OPERATION (CBC_GREATER, \
- GREATER) \
- CBC_BINARY_OPERATION (CBC_LESS_EQUAL, \
- LESS_EQUAL) \
- CBC_BINARY_OPERATION (CBC_GREATER_EQUAL, \
- GREATER_EQUAL) \
- CBC_BINARY_OPERATION (CBC_IN, \
- IN) \
- CBC_BINARY_OPERATION (CBC_INSTANCEOF, \
- INSTANCEOF) \
- CBC_BINARY_OPERATION (CBC_LEFT_SHIFT, \
- LEFT_SHIFT) \
- CBC_BINARY_OPERATION (CBC_RIGHT_SHIFT, \
- RIGHT_SHIFT) \
- CBC_BINARY_OPERATION (CBC_UNS_RIGHT_SHIFT, \
- UNS_RIGHT_SHIFT) \
- CBC_BINARY_OPERATION (CBC_ADD, \
- ADD) \
- CBC_BINARY_OPERATION (CBC_SUBTRACT, \
- SUB) \
- CBC_BINARY_OPERATION (CBC_MULTIPLY, \
- MUL) \
- CBC_BINARY_OPERATION (CBC_DIVIDE, \
- DIV) \
- CBC_BINARY_OPERATION (CBC_MODULO, \
- MOD) \
- \
- /* Unary lvalue opcodes. */ \
- CBC_OPCODE (CBC_DELETE_PUSH_RESULT, CBC_NO_FLAG, -1, \
- VM_OC_PROP_DELETE | VM_OC_GET_STACK_STACK | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_DELETE_IDENT_PUSH_RESULT, CBC_HAS_LITERAL_ARG, 1, \
- VM_OC_DELETE | VM_OC_PUT_STACK) \
- CBC_UNARY_LVALUE_OPERATION (CBC_PRE_INCR, \
- PRE_INCR) \
- CBC_UNARY_LVALUE_OPERATION (CBC_PRE_DECR, \
- PRE_DECR) \
- CBC_UNARY_LVALUE_OPERATION (CBC_POST_INCR, \
- POST_INCR) \
- CBC_UNARY_LVALUE_OPERATION (CBC_POST_DECR, \
- POST_DECR) \
- \
- /* Call opcodes. */ \
- CBC_OPCODE (CBC_CALL, CBC_HAS_POP_STACK_BYTE_ARG, -1, \
- VM_OC_CALL) \
- CBC_OPCODE (CBC_CALL_PUSH_RESULT, CBC_HAS_POP_STACK_BYTE_ARG, 0, \
- VM_OC_CALL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_CALL_BLOCK, CBC_HAS_POP_STACK_BYTE_ARG, -1, \
- VM_OC_CALL | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_CALL_PROP, CBC_HAS_POP_STACK_BYTE_ARG, -3, \
- VM_OC_CALL) \
- CBC_OPCODE (CBC_CALL_PROP_PUSH_RESULT, CBC_HAS_POP_STACK_BYTE_ARG, -2, \
- VM_OC_CALL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_CALL_PROP_BLOCK, CBC_HAS_POP_STACK_BYTE_ARG, -3, \
- VM_OC_CALL | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_CALL0, CBC_NO_FLAG, -1, \
- VM_OC_CALL) \
- CBC_OPCODE (CBC_CALL0_PUSH_RESULT, CBC_NO_FLAG, 0, \
- VM_OC_CALL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_CALL0_BLOCK, CBC_NO_FLAG, -1, \
- VM_OC_CALL | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_CALL0_PROP, CBC_NO_FLAG, -3, \
- VM_OC_CALL) \
- CBC_OPCODE (CBC_CALL0_PROP_PUSH_RESULT, CBC_NO_FLAG, -2, \
- VM_OC_CALL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_CALL0_PROP_BLOCK, CBC_NO_FLAG, -3, \
- VM_OC_CALL | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_CALL1, CBC_NO_FLAG, -2, \
- VM_OC_CALL) \
- CBC_OPCODE (CBC_CALL1_PUSH_RESULT, CBC_NO_FLAG, -1, \
- VM_OC_CALL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_CALL1_BLOCK, CBC_NO_FLAG, -2, \
- VM_OC_CALL | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_CALL1_PROP, CBC_NO_FLAG, -4, \
- VM_OC_CALL) \
- CBC_OPCODE (CBC_CALL1_PROP_PUSH_RESULT, CBC_NO_FLAG, -3, \
- VM_OC_CALL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_CALL1_PROP_BLOCK, CBC_NO_FLAG, -4, \
- VM_OC_CALL | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_CALL2, CBC_NO_FLAG, -3, \
- VM_OC_CALL) \
- CBC_OPCODE (CBC_CALL2_PUSH_RESULT, CBC_NO_FLAG, -2, \
- VM_OC_CALL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_CALL2_BLOCK, CBC_NO_FLAG, -3, \
- VM_OC_CALL | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_CALL2_PROP, CBC_NO_FLAG, -4, \
- VM_OC_CALL) \
- CBC_OPCODE (CBC_CALL2_PROP_PUSH_RESULT, CBC_NO_FLAG, -3, \
- VM_OC_CALL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_CALL2_PROP_BLOCK, CBC_NO_FLAG, -4, \
- VM_OC_CALL | VM_OC_PUT_BLOCK) \
- \
- /* Binary assignment opcodes. */ \
- CBC_OPCODE (CBC_ASSIGN, CBC_NO_FLAG, -3, \
- VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_REFERENCE) \
- CBC_OPCODE (CBC_ASSIGN_PUSH_RESULT, CBC_NO_FLAG, -2, \
- VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_REFERENCE | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_ASSIGN_BLOCK, CBC_NO_FLAG, -3, \
- VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_REFERENCE | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_ASSIGN_SET_IDENT, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_IDENT) \
- CBC_OPCODE (CBC_ASSIGN_SET_IDENT_PUSH_RESULT, CBC_HAS_LITERAL_ARG, 0, \
- VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_IDENT | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_ASSIGN_SET_IDENT_BLOCK, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_ASSIGN | VM_OC_GET_STACK | VM_OC_PUT_IDENT | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_ASSIGN_LITERAL_SET_IDENT, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \
- VM_OC_ASSIGN | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT) \
- CBC_OPCODE (CBC_ASSIGN_LITERAL_SET_IDENT_PUSH_RESULT, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 1, \
- VM_OC_ASSIGN | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_ASSIGN_LITERAL_SET_IDENT_BLOCK, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \
- VM_OC_ASSIGN | VM_OC_GET_LITERAL | VM_OC_PUT_IDENT | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_ASSIGN_PROP_LITERAL, CBC_HAS_LITERAL_ARG, -2, \
- VM_OC_ASSIGN_PROP | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE) \
- CBC_OPCODE (CBC_ASSIGN_PROP_LITERAL_PUSH_RESULT, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_ASSIGN_PROP | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_ASSIGN_PROP_LITERAL_BLOCK, CBC_HAS_LITERAL_ARG, -2, \
- VM_OC_ASSIGN_PROP | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_ASSIGN_PROP_THIS_LITERAL, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_ASSIGN_PROP_THIS | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE) \
- CBC_OPCODE (CBC_ASSIGN_PROP_THIS_LITERAL_PUSH_RESULT, CBC_HAS_LITERAL_ARG, 0, \
- VM_OC_ASSIGN_PROP_THIS | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_ASSIGN_PROP_THIS_LITERAL_BLOCK, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_ASSIGN_PROP_THIS | VM_OC_GET_LITERAL | VM_OC_PUT_REFERENCE | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_MOV_IDENT, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_MOV_IDENT | VM_OC_GET_STACK | VM_OC_PUT_IDENT) \
- \
- /* Last opcode (not a real opcode). */ \
- CBC_OPCODE (CBC_END, CBC_NO_FLAG, 0, \
- VM_OC_NONE)
-
-/* All EXT branches are statement block end
- * marks, so they are always forward branches. */
-
-#define CBC_EXT_OPCODE_LIST \
- /* Branch opcodes first. Some other opcodes are mixed. */ \
- CBC_OPCODE (CBC_EXT_NOP, CBC_NO_FLAG, 0, \
- VM_OC_NONE) \
- CBC_FORWARD_BRANCH (CBC_EXT_WITH_CREATE_CONTEXT, \
- -1 + PARSER_WITH_CONTEXT_STACK_ALLOCATION, VM_OC_WITH) \
- CBC_OPCODE (CBC_EXT_FOR_IN_GET_NEXT, CBC_NO_FLAG, 1, \
- VM_OC_FOR_IN_GET_NEXT | VM_OC_PUT_STACK) \
- CBC_FORWARD_BRANCH (CBC_EXT_FOR_IN_CREATE_CONTEXT, \
- -1 + PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION, VM_OC_FOR_IN_CREATE_CONTEXT) \
- CBC_OPCODE (CBC_EXT_SET_GETTER, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \
- VM_OC_SET_GETTER | VM_OC_NON_STATIC_FLAG | VM_OC_GET_LITERAL_LITERAL) \
- CBC_BACKWARD_BRANCH (CBC_EXT_BRANCH_IF_FOR_IN_HAS_NEXT, 0, \
- VM_OC_FOR_IN_HAS_NEXT) \
- CBC_OPCODE (CBC_EXT_FOR_OF_GET_NEXT, CBC_NO_FLAG, 1, \
- VM_OC_FOR_OF_GET_NEXT | VM_OC_PUT_STACK) \
- CBC_FORWARD_BRANCH (CBC_EXT_FOR_OF_CREATE_CONTEXT, \
- -1 + PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION, VM_OC_FOR_OF_CREATE_CONTEXT) \
- CBC_OPCODE (CBC_EXT_PUSH_NAMED_FUNC_EXPRESSION, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 1, \
- VM_OC_PUSH_NAMED_FUNC_EXPR | VM_OC_GET_LITERAL_LITERAL) \
- CBC_BACKWARD_BRANCH (CBC_EXT_BRANCH_IF_FOR_OF_HAS_NEXT, 0, \
- VM_OC_FOR_OF_HAS_NEXT) \
- CBC_OPCODE (CBC_EXT_SET_SETTER, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \
- VM_OC_SET_SETTER | VM_OC_NON_STATIC_FLAG | VM_OC_GET_LITERAL_LITERAL) \
- CBC_FORWARD_BRANCH (CBC_EXT_TRY_CREATE_CONTEXT, PARSER_TRY_CONTEXT_STACK_ALLOCATION, \
- VM_OC_TRY) \
- CBC_OPCODE (CBC_EXT_THROW_REFERENCE_ERROR, CBC_NO_FLAG, 1, \
- VM_OC_THROW_REFERENCE_ERROR) \
- CBC_FORWARD_BRANCH (CBC_EXT_CATCH, 1, \
- VM_OC_CATCH) \
- CBC_OPCODE (CBC_EXT_PUSH_UNDEFINED_BASE, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_UNDEFINED_BASE | VM_OC_PUT_STACK) \
- CBC_FORWARD_BRANCH (CBC_EXT_FINALLY, 0, \
- VM_OC_FINALLY) \
- CBC_OPCODE (CBC_EXT_CLASS_EXPR_CONTEXT_END, CBC_NO_FLAG, 0, \
- VM_OC_CLASS_EXPR_CONTEXT_END) \
- CBC_FORWARD_BRANCH (CBC_EXT_SUPER_CLASS_CREATE_CONTEXT, \
- -1 + PARSER_SUPER_CLASS_CONTEXT_STACK_ALLOCATION, VM_OC_CLASS_HERITAGE) \
- \
- /* Basic opcodes. */ \
- CBC_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_0, CBC_HAS_LITERAL_ARG, 2, \
- VM_OC_PUSH_LIT_0 | VM_OC_GET_LITERAL) \
- CBC_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_POS_BYTE, CBC_HAS_LITERAL_ARG | CBC_HAS_BYTE_ARG, 2, \
- VM_OC_PUSH_LIT_POS_BYTE | VM_OC_GET_LITERAL) \
- CBC_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_NEG_BYTE, CBC_HAS_LITERAL_ARG | CBC_HAS_BYTE_ARG, 2, \
- VM_OC_PUSH_LIT_NEG_BYTE | VM_OC_GET_LITERAL) \
- CBC_OPCODE (CBC_EXT_RESOURCE_NAME, CBC_NO_FLAG, 0, \
- VM_OC_RESOURCE_NAME) \
- CBC_OPCODE (CBC_EXT_LINE, CBC_NO_FLAG, 0, \
- VM_OC_LINE) \
- CBC_OPCODE (CBC_EXT_SET_COMPUTED_PROPERTY, CBC_NO_FLAG, -2, \
- VM_OC_SET_COMPUTED_PROPERTY | VM_OC_NON_STATIC_FLAG | VM_OC_GET_STACK_STACK) \
- CBC_OPCODE (CBC_EXT_SET_COMPUTED_PROPERTY_LITERAL, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_SET_COMPUTED_PROPERTY | VM_OC_NON_STATIC_FLAG | VM_OC_GET_STACK_LITERAL) \
- CBC_OPCODE (CBC_EXT_SET_COMPUTED_GETTER, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_SET_GETTER | VM_OC_NON_STATIC_FLAG | VM_OC_GET_STACK_LITERAL) \
- CBC_OPCODE (CBC_EXT_SET_COMPUTED_SETTER, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_SET_SETTER | VM_OC_NON_STATIC_FLAG | VM_OC_GET_STACK_LITERAL) \
- CBC_OPCODE (CBC_EXT_SET_STATIC_PROPERTY_LITERAL, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \
- VM_OC_SET_PROPERTY | VM_OC_GET_LITERAL_LITERAL) \
- CBC_OPCODE (CBC_EXT_SET_STATIC_COMPUTED_PROPERTY_LITERAL, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_SET_COMPUTED_PROPERTY | VM_OC_GET_STACK_LITERAL) \
- CBC_OPCODE (CBC_EXT_SET_STATIC_GETTER, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \
- VM_OC_SET_GETTER | VM_OC_GET_LITERAL_LITERAL) \
- CBC_OPCODE (CBC_EXT_SET_STATIC_SETTER, CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2, 0, \
- VM_OC_SET_SETTER | VM_OC_GET_LITERAL_LITERAL) \
- CBC_OPCODE (CBC_EXT_SET_STATIC_COMPUTED_GETTER, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_SET_GETTER | VM_OC_GET_STACK_LITERAL) \
- CBC_OPCODE (CBC_EXT_SET_STATIC_COMPUTED_SETTER, CBC_HAS_LITERAL_ARG, -1, \
- VM_OC_SET_SETTER | VM_OC_GET_STACK_LITERAL) \
- CBC_OPCODE (CBC_EXT_RESOLVE_BASE, CBC_NO_FLAG, 0, \
- VM_OC_RESOLVE_BASE_FOR_CALL) \
- \
- /* Class opcodes */ \
- CBC_OPCODE (CBC_EXT_INHERIT_AND_SET_CONSTRUCTOR, CBC_NO_FLAG, 0, \
- VM_OC_CLASS_INHERITANCE) \
- CBC_OPCODE (CBC_EXT_PUSH_CLASS_CONSTRUCTOR_AND_PROTOTYPE, CBC_NO_FLAG, 2, \
- VM_OC_PUSH_CLASS_CONSTRUCTOR_AND_PROTOTYPE | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_EXT_IMPLICIT_CONSTRUCTOR_CALL, CBC_NO_FLAG, 0, \
- VM_OC_PUSH_IMPL_CONSTRUCTOR) \
- CBC_OPCODE (CBC_EXT_SET_CLASS_LITERAL, CBC_HAS_LITERAL_ARG, 0, \
- VM_OC_SET_CLASS_CONSTRUCTOR | VM_OC_GET_LITERAL) \
- CBC_OPCODE (CBC_EXT_CLASS_EVAL, CBC_HAS_BYTE_ARG, 0, \
- VM_OC_CLASS_EVAL) \
- CBC_OPCODE (CBC_EXT_SUPER_CALL, CBC_HAS_POP_STACK_BYTE_ARG, -1, \
- VM_OC_SUPER_CALL) \
- CBC_OPCODE (CBC_EXT_SUPER_CALL_PUSH_RESULT, CBC_HAS_POP_STACK_BYTE_ARG, 0, \
- VM_OC_SUPER_CALL | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_EXT_SUPER_CALL_BLOCK, CBC_HAS_POP_STACK_BYTE_ARG, -1, \
- VM_OC_SUPER_CALL | VM_OC_PUT_BLOCK) \
- CBC_OPCODE (CBC_EXT_PUSH_CONSTRUCTOR_SUPER, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_CONSTRUCTOR_SUPER | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_EXT_PUSH_CONSTRUCTOR_SUPER_PROP, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_CONSTRUCTOR_SUPER | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_EXT_PUSH_SUPER, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_SUPER | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_EXT_PUSH_STATIC_SUPER, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_SUPER | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_EXT_PUSH_CONSTRUCTOR_THIS, CBC_NO_FLAG, 1, \
- VM_OC_PUSH_CONSTRUCTOR_THIS | VM_OC_PUT_STACK) \
- CBC_OPCODE (CBC_EXT_SUPER_PROP_CALL, CBC_NO_FLAG, 0, \
- VM_OC_SUPER_PROP_REFERENCE) \
- CBC_OPCODE (CBC_EXT_SUPER_PROP_ASSIGN, CBC_NO_FLAG, 0, \
- VM_OC_SUPER_PROP_REFERENCE) \
- CBC_OPCODE (CBC_EXT_CONSTRUCTOR_RETURN, CBC_NO_FLAG, -1, \
- VM_OC_CONSTRUCTOR_RET | VM_OC_GET_STACK) \
- CBC_OPCODE (CBC_EXT_ERROR, CBC_NO_FLAG, 0, \
- VM_OC_ERROR) \
- \
- /* Last opcode (not a real opcode). */ \
- CBC_OPCODE (CBC_EXT_END, CBC_NO_FLAG, 0, \
- VM_OC_NONE)
-
-#define CBC_MAXIMUM_BYTE_VALUE 255
-#define CBC_MAXIMUM_SMALL_VALUE 510
-#define CBC_MAXIMUM_FULL_VALUE 32767
-
-#define CBC_PUSH_NUMBER_BYTE_RANGE_END 256
-
-#define CBC_HIGHEST_BIT_MASK 0x80
-#define CBC_LOWER_SEVEN_BIT_MASK 0x7f
-
-/**
- * Literal encoding limit when full literal encoding mode is enabled
- */
-#define CBC_FULL_LITERAL_ENCODING_LIMIT 128
-
-/**
- * Literal encoding delta when full literal encoding mode is enabled
- */
-#define CBC_FULL_LITERAL_ENCODING_DELTA 0x8000
-
-/**
- * Literal encoding limit when full literal encoding mode is disabled
- */
-#define CBC_SMALL_LITERAL_ENCODING_LIMIT 255
-
-/**
- * Literal encoding delta when full literal encoding mode is disabled
- */
-#define CBC_SMALL_LITERAL_ENCODING_DELTA 0xfe01
-
-/**
- * Literal indicies belong to one of the following groups:
- *
- * 0 <= index < argument_end : arguments
- * argument_end <= index < register_end : registers
- * register_end <= index < ident_end : identifiers
- * ident_end <= index < const_literal_end : constant literals
- * const_literal_end <= index < literal_end : template literals
- */
-
-/**
- * Compiled byte code arguments.
- */
-typedef struct
-{
- ecma_compiled_code_t header; /**< compiled code header */
- uint8_t stack_limit; /**< maximum number of values stored on the stack */
- uint8_t argument_end; /**< number of arguments expected by the function */
- uint8_t register_end; /**< end position of the register group */
- uint8_t ident_end; /**< end position of the identifier group */
- uint8_t const_literal_end; /**< end position of the const literal group */
- uint8_t literal_end; /**< end position of the literal group */
-} cbc_uint8_arguments_t;
-
-/**
- * Compiled byte code arguments.
- */
-typedef struct
-{
- ecma_compiled_code_t header; /**< compiled code header */
- uint16_t stack_limit; /**< maximum number of values stored on the stack */
- uint16_t argument_end; /**< number of arguments expected by the function */
- uint16_t register_end; /**< end position of the register group */
- uint16_t ident_end; /**< end position of the identifier group */
- uint16_t const_literal_end; /**< end position of the const literal group */
- uint16_t literal_end; /**< end position of the literal group */
- uint16_t padding; /**< an unused value */
-} cbc_uint16_arguments_t;
-
-/**
- * Compact byte code status flags.
- */
-typedef enum
-{
- CBC_CODE_FLAGS_FUNCTION = (1u << 0), /**< compiled code is JavaScript function */
- CBC_CODE_FLAGS_FULL_LITERAL_ENCODING = (1u << 1), /**< full literal encoding mode is enabled */
- CBC_CODE_FLAGS_UINT16_ARGUMENTS = (1u << 2), /**< compiled code data is cbc_uint16_arguments_t */
- CBC_CODE_FLAGS_STRICT_MODE = (1u << 3), /**< strict mode is enabled */
- CBC_CODE_FLAGS_ARGUMENTS_NEEDED = (1u << 4), /**< arguments object must be constructed */
- CBC_CODE_FLAGS_LEXICAL_ENV_NOT_NEEDED = (1u << 5), /**< no need to create a lexical environment */
- CBC_CODE_FLAGS_ARROW_FUNCTION = (1u << 6), /**< this function is an arrow function */
- CBC_CODE_FLAGS_STATIC_FUNCTION = (1u << 7), /**< this function is a static snapshot function */
- CBC_CODE_FLAGS_DEBUGGER_IGNORE = (1u << 8), /**< this function should be ignored by debugger */
- CBC_CODE_FLAGS_CONSTRUCTOR = (1u << 9), /**< this function is a constructor */
- CBC_CODE_FLAGS_REST_PARAMETER = (1u << 10), /**< this function has rest parameter */
-} cbc_code_flags;
-
-/**
- * Non-strict arguments object must be constructed
- */
-#define CBC_NON_STRICT_ARGUMENTS_NEEDED(compiled_code_p) \
- (((compiled_code_p)->status_flags & CBC_CODE_FLAGS_ARGUMENTS_NEEDED) \
- && !((compiled_code_p)->status_flags & CBC_CODE_FLAGS_STRICT_MODE))
-
-#define CBC_OPCODE(arg1, arg2, arg3, arg4) arg1,
-
-/**
- * Opcode list.
- */
-typedef enum
-{
- CBC_OPCODE_LIST /**< list of opcodes */
-} cbc_opcode_t;
-
-/**
- * Extended opcode list.
- */
-typedef enum
-{
- CBC_EXT_OPCODE_LIST /**< list extended opcodes */
-} cbc_ext_opcode_t;
-
-#undef CBC_OPCODE
-
-/**
- * Opcode flags.
- */
-extern const uint8_t cbc_flags[];
-extern const uint8_t cbc_ext_flags[];
-
-#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)
-
-/**
- * Opcode names for debugging.
- */
-extern const char * const cbc_names[];
-extern const char * const cbc_ext_names[];
-
-#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */
-
-/**
- * @}
- * @}
- * @}
- */
-
-#endif /* !BYTE_CODE_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef COMMON_H
-#define COMMON_H
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-#include <setjmp.h>
-
-/** \addtogroup parser Parser
- * @{
- *
- * \addtogroup jsparser JavaScript
- * @{
- *
- * \addtogroup jsparser_utils Utility
- * @{
- */
-
-#include "config.h"
-#include "ecma-globals.h"
-#include "ecma-regexp-object.h"
-#include "jmem.h"
-
-/* Immediate management. */
-
-/**
- * Literal types.
- *
- * The LEXER_UNUSED_LITERAL type is internal and
- * used for various purposes.
- */
-typedef enum
-{
- /* The LEXER_IS_IDENT_OR_STRING macro must be updated if the order is changed. */
- LEXER_IDENT_LITERAL = 0, /**< identifier literal */
- LEXER_STRING_LITERAL = 1, /**< string literal */
- LEXER_NUMBER_LITERAL = 2, /**< number literal */
- LEXER_FUNCTION_LITERAL = 3, /**< function literal */
- LEXER_REGEXP_LITERAL = 4, /**< regexp literal */
- LEXER_UNUSED_LITERAL = 5, /**< unused literal, can only be
- used by the byte code generator. */
-} lexer_literal_type_t;
-
-/**
- * Checks whether the literal type is identifier or string.
- */
-#define LEXER_IS_IDENT_OR_STRING(literal_type) ((literal_type) <= LEXER_STRING_LITERAL)
-
-/**
- * Flag bits for status_flags member of lexer_literal_t.
- */
-typedef enum
-{
- LEXER_FLAG_VAR = (1 << 0), /**< local identifier (var, function arg) */
- LEXER_FLAG_NO_REG_STORE = (1 << 1), /**< this local identifier cannot be stored in register */
- LEXER_FLAG_INITIALIZED = (1 << 2), /**< this local identifier is initialized with a value */
- LEXER_FLAG_FUNCTION_ARGUMENT = (1 << 3), /**< this local identifier is a function argument */
- LEXER_FLAG_UNUSED_IDENT = (1 << 4), /**< this identifier is referenced by sub-functions,
- * but not referenced by the currently parsed function */
- LEXER_FLAG_SOURCE_PTR = (1 << 5), /**< the literal is directly referenced in the source code
- * (no need to allocate memory) */
- LEXER_FLAG_LATE_INIT = (1 << 6), /**< initialize this variable after the byte code is freed */
-} lexer_literal_status_flags_t;
-
-/**
- * Type of property length.
- */
-#if ENABLED (JERRY_CPOINTER_32_BIT)
-typedef uint32_t prop_length_t;
-#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
-typedef uint16_t prop_length_t;
-#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
-
-/**
- * Literal data.
- */
-typedef struct
-{
- union
- {
- ecma_value_t value; /**< literal value (not processed by the parser) */
- const uint8_t *char_p; /**< character value */
- ecma_compiled_code_t *bytecode_p; /**< compiled function or regexp pointer */
- uint32_t source_data; /**< encoded source literal */
- } u;
-
-#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)
- struct
-#else /* !ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */
- union
-#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */
- {
- prop_length_t length; /**< length of ident / string literal */
- uint16_t index; /**< real index during post processing */
- } prop;
-
- uint8_t type; /**< type of the literal */
- uint8_t status_flags; /**< status flags */
-} lexer_literal_t;
-
-void util_free_literal (lexer_literal_t *literal_p);
-
-#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)
-void util_print_literal (lexer_literal_t *);
-#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */
-
-/* TRY/CATCH block */
-
-#define PARSER_TRY_CONTEXT(context_name) \
- jmp_buf context_name
-
-#define PARSER_THROW(context_name) \
- longjmp (context_name, 1);
-
-#define PARSER_TRY(context_name) \
- { \
- if (!setjmp (context_name)) \
- { \
-
-#define PARSER_CATCH \
- } \
- else \
- {
-
-#define PARSER_TRY_END \
- } \
- }
-
-/**
- * @}
- * @}
- * @}
- */
-
-#endif /* !COMMON_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef DEBUGGER_H
-#define DEBUGGER_H
-
-#include "ecma-globals.h"
-#include "jerryscript-debugger-transport.h"
-
-#if ENABLED (JERRY_DEBUGGER)
-
-/* JerryScript debugger protocol is a simplified version of RFC-6455 (WebSockets). */
-
-/**
- * Frequency of calling jerry_debugger_receive() by the VM.
- */
-#define JERRY_DEBUGGER_MESSAGE_FREQUENCY 5
-
-/**
- * This constant represents that the string to be sent has no subtype.
- */
-#define JERRY_DEBUGGER_NO_SUBTYPE 0
-
-/**
- * Limited resources available for the engine, so it is important to
- * check the maximum buffer size. It needs to be between 64 and 256 bytes.
- */
-#if JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE < 64 || JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE > 256
-#error Please define the MAX_BUFFER_SIZE between 64 and 256 bytes.
-#endif /* JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE < 64 || JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE > 256 */
-
-/**
- * Calculate the maximum number of items for a given type
- * which can be transmitted in one message.
- */
-#define JERRY_DEBUGGER_SEND_MAX(type) \
- ((size_t) ((JERRY_CONTEXT (debugger_max_send_size) - sizeof (jerry_debugger_send_type_t)) / sizeof (type)))
-
-/**
- * Calculate the size of a message when a count number of items transmitted.
- */
-#define JERRY_DEBUGGER_SEND_SIZE(count, type) \
- ((size_t) ((count * sizeof (type)) + sizeof (jerry_debugger_send_type_t)))
-
-/**
- * Debugger operation modes:
- *
- * The debugger has two operation modes: run mode and breakpoint mode.
- *
- * In run mode the debugger server accepts only a limited number of message
- * types from the debugger client (e.g. stop execution, set breakpoint).
- *
- * In breakpoint mode the JavaScript execution is stopped at a breakpoint and
- * more message types are accepted (e.g. get backtrace, evaluate expression).
- *
- * Switching between modes:
- *
- * When the JavaScript execution stops at a breakpoint the server sends a
- * JERRY_DEBUGGER_BREAKPOINT_HIT message to the client. The client can only
- * issue breakpoint mode commands after this message is received.
- *
- * Certain breakpoint mode commands (e.g. continue) resumes the JavaScript
- * execution and the client must not send any breakpoint mode messages
- * until the JERRY_DEBUGGER_BREAKPOINT_HIT is received again.
- *
- * The debugger server starts in run mode but stops at the first available
- * breakpoint.
- */
-
-/**
- * Debugger option flags.
- */
-typedef enum
-{
- JERRY_DEBUGGER_CONNECTED = 1u << 0, /**< debugger is connected */
- JERRY_DEBUGGER_BREAKPOINT_MODE = 1u << 1, /**< debugger waiting at a breakpoint */
- JERRY_DEBUGGER_VM_STOP = 1u << 2, /**< stop at the next breakpoint even if disabled */
- JERRY_DEBUGGER_VM_IGNORE = 1u << 3, /**< ignore all breakpoints */
- JERRY_DEBUGGER_VM_IGNORE_EXCEPTION = 1u << 4, /**< debugger doesn't stop at any exception */
- JERRY_DEBUGGER_VM_EXCEPTION_THROWN = 1u << 5, /**< no need to stop for this exception */
- JERRY_DEBUGGER_PARSER_WAIT = 1u << 6, /**< debugger should wait after parsing is completed */
- JERRY_DEBUGGER_PARSER_WAIT_MODE = 1u << 7, /**< debugger is waiting after parsing is completed */
- JERRY_DEBUGGER_CLIENT_SOURCE_MODE = 1u << 8, /**< debugger waiting for client code */
- JERRY_DEBUGGER_CLIENT_NO_SOURCE = 1u << 9, /**< debugger leaving the client source loop */
- JERRY_DEBUGGER_CONTEXT_RESET_MODE = 1u << 10, /**< debugger and engine reinitialization mode */
-#ifdef ACE_DEBUGGER_CUSTOM
- JERRY_DEBUGGER_TRANSPORT_STARTED = 1u << 11, /**< only can send data to client after this flag set */
-#endif
-} jerry_debugger_flags_t;
-
-/**
- * Set debugger flags.
- */
-#define JERRY_DEBUGGER_SET_FLAGS(flags) \
- JERRY_CONTEXT (debugger_flags) = (JERRY_CONTEXT (debugger_flags) | (uint32_t) (flags))
-
-/**
- * Clear debugger flags.
- */
-#define JERRY_DEBUGGER_CLEAR_FLAGS(flags) \
- JERRY_CONTEXT (debugger_flags) = (JERRY_CONTEXT (debugger_flags) & (uint32_t) ~(flags))
-
-/**
- * Set and clear debugger flags.
- */
-#define JERRY_DEBUGGER_UPDATE_FLAGS(flags_to_set, flags_to_clear) \
- JERRY_CONTEXT (debugger_flags) = ((JERRY_CONTEXT (debugger_flags) | (uint32_t) (flags_to_set)) \
- & (uint32_t) ~(flags_to_clear))
-
-/**
- * Types for the package.
- */
-typedef enum
-{
- /* Messages sent by the server to client. */
- /* This is a handshake message, sent once during initialization. */
- JERRY_DEBUGGER_CONFIGURATION = 1, /**< debugger configuration */
- /* These messages are sent by the parser. */
- JERRY_DEBUGGER_PARSE_ERROR = 2, /**< parse error */
- JERRY_DEBUGGER_BYTE_CODE_CP = 3, /**< byte code compressed pointer */
- JERRY_DEBUGGER_PARSE_FUNCTION = 4, /**< parsing a new function */
- JERRY_DEBUGGER_BREAKPOINT_LIST = 5, /**< list of line offsets */
- JERRY_DEBUGGER_BREAKPOINT_OFFSET_LIST = 6, /**< list of byte code offsets */
- JERRY_DEBUGGER_SOURCE_CODE = 7, /**< source code fragment */
- JERRY_DEBUGGER_SOURCE_CODE_END = 8, /**< source code last fragment */
- JERRY_DEBUGGER_SOURCE_CODE_NAME = 9, /**< source code name fragment */
- JERRY_DEBUGGER_SOURCE_CODE_NAME_END = 10, /**< source code name last fragment */
- JERRY_DEBUGGER_FUNCTION_NAME = 11, /**< function name fragment */
- JERRY_DEBUGGER_FUNCTION_NAME_END = 12, /**< function name last fragment */
- JERRY_DEBUGGER_WAITING_AFTER_PARSE = 13, /**< engine waiting for a parser resume */
- /* These messages are generic messages. */
- JERRY_DEBUGGER_RELEASE_BYTE_CODE_CP = 14, /**< invalidate byte code compressed pointer */
- JERRY_DEBUGGER_MEMSTATS_RECEIVE = 15, /**< memstats sent to the client */
- JERRY_DEBUGGER_BREAKPOINT_HIT = 16, /**< notify breakpoint hit */
- JERRY_DEBUGGER_EXCEPTION_HIT = 17, /**< notify exception hit */
- JERRY_DEBUGGER_EXCEPTION_STR = 18, /**< exception string fragment */
- JERRY_DEBUGGER_EXCEPTION_STR_END = 19, /**< exception string last fragment */
- JERRY_DEBUGGER_BACKTRACE_TOTAL = 20, /**< number of total frames */
- JERRY_DEBUGGER_BACKTRACE = 21, /**< backtrace data */
- JERRY_DEBUGGER_BACKTRACE_END = 22, /**< last backtrace data */
- JERRY_DEBUGGER_EVAL_RESULT = 23, /**< eval result */
- JERRY_DEBUGGER_EVAL_RESULT_END = 24, /**< last part of eval result */
- JERRY_DEBUGGER_WAIT_FOR_SOURCE = 25, /**< engine waiting for source code */
- JERRY_DEBUGGER_OUTPUT_RESULT = 26, /**< output sent by the program to the debugger */
- JERRY_DEBUGGER_OUTPUT_RESULT_END = 27, /**< last output result data */
- JERRY_DEBUGGER_SCOPE_CHAIN = 28, /**< scope chain */
- JERRY_DEBUGGER_SCOPE_CHAIN_END = 29, /**< last output of scope chain */
- JERRY_DEBUGGER_SCOPE_VARIABLES = 30, /**< scope variables */
- JERRY_DEBUGGER_SCOPE_VARIABLES_END = 31, /**< last output of scope variables */
- JERRY_DEBUGGER_CLOSE_CONNECTION = 32, /**< close connection with the client */
- JERRY_DEBUGGER_MESSAGES_OUT_MAX_COUNT, /**< number of different type of output messages by the debugger */
-
- /* Messages sent by the client to server. */
-
- /* The following messages are accepted in both run and breakpoint modes. */
- JERRY_DEBUGGER_FREE_BYTE_CODE_CP = 1, /**< free byte code compressed pointer */
- JERRY_DEBUGGER_UPDATE_BREAKPOINT = 2, /**< update breakpoint status */
- JERRY_DEBUGGER_EXCEPTION_CONFIG = 3, /**< exception handler config */
- JERRY_DEBUGGER_PARSER_CONFIG = 4, /**< parser config */
- JERRY_DEBUGGER_MEMSTATS = 5, /**< list memory statistics */
- JERRY_DEBUGGER_STOP = 6, /**< stop execution */
- /* The following message is only available in waiting after parse mode. */
- JERRY_DEBUGGER_PARSER_RESUME = 7, /**< stop waiting after parse */
- /* The following four messages are only available in client switch mode. */
- JERRY_DEBUGGER_CLIENT_SOURCE = 8, /**< first message of client source */
- JERRY_DEBUGGER_CLIENT_SOURCE_PART = 9, /**< next message of client source */
- JERRY_DEBUGGER_NO_MORE_SOURCES = 10, /**< no more sources notification */
- JERRY_DEBUGGER_CONTEXT_RESET = 11, /**< context reset request */
- /* The following messages are only available in breakpoint
- * mode and they switch the engine to run mode. */
- JERRY_DEBUGGER_CONTINUE = 12, /**< continue execution */
- JERRY_DEBUGGER_STEP = 13, /**< next breakpoint, step into functions */
- JERRY_DEBUGGER_NEXT = 14, /**< next breakpoint in the same context */
- JERRY_DEBUGGER_FINISH = 15, /**< Continue running just after the function in the current stack frame returns */
- /* The following messages are only available in breakpoint
- * mode and this mode is kept after the message is processed. */
- JERRY_DEBUGGER_GET_BACKTRACE = 16, /**< get backtrace */
- JERRY_DEBUGGER_EVAL = 17, /**< first message of evaluating a string */
- JERRY_DEBUGGER_EVAL_PART = 18, /**< next message of evaluating a string */
- JERRY_DEBUGGER_GET_SCOPE_CHAIN = 19, /**< get type names of the scope chain */
- JERRY_DEBUGGER_GET_SCOPE_VARIABLES = 20, /**< get variables of a scope */
- JERRY_DEBUGGER_MESSAGES_IN_MAX_COUNT, /**< number of different type of input messages */
-} jerry_debugger_header_type_t;
-
-/**
- * Debugger option flags.
- */
-typedef enum
-{
- JERRY_DEBUGGER_LITTLE_ENDIAN = 1u << 0, /**< little endian */
-} jerry_debugger_configuration_flags_t;
-
-/**
- * Subtypes of eval.
- */
-typedef enum
-{
- JERRY_DEBUGGER_EVAL_EVAL = 0, /**< evaluate expression */
- JERRY_DEBUGGER_EVAL_THROW = 1, /**< evaluate expression and throw the result */
- JERRY_DEBUGGER_EVAL_ABORT = 2, /**< evaluate expression and abrot with the result */
-} jerry_debugger_eval_type_t;
-
-/**
- * Subtypes of eval_result.
- */
-typedef enum
-{
- JERRY_DEBUGGER_EVAL_OK = 1, /**< eval result, no error */
- JERRY_DEBUGGER_EVAL_ERROR = 2, /**< eval result when an error has occurred */
-} jerry_debugger_eval_result_type_t;
-
-/**
- * Subtypes of output_result.
- *
- * Note:
- * This enum has to be kept in sync with jerry_log_level_t with an offset
- * of +2.
- */
-typedef enum
-{
- JERRY_DEBUGGER_OUTPUT_OK = 1, /**< output result, no error */
- JERRY_DEBUGGER_OUTPUT_ERROR = 2, /**< output result, error */
- JERRY_DEBUGGER_OUTPUT_WARNING = 3, /**< output result, warning */
- JERRY_DEBUGGER_OUTPUT_DEBUG = 4, /**< output result, debug */
- JERRY_DEBUGGER_OUTPUT_TRACE = 5, /**< output result, trace */
-} jerry_debugger_output_subtype_t;
-
-/**
- * Types of scopes.
- */
-typedef enum
-{
- JERRY_DEBUGGER_SCOPE_WITH = 1, /**< with */
- JERRY_DEBUGGER_SCOPE_LOCAL = 2, /**< local */
- JERRY_DEBUGGER_SCOPE_CLOSURE = 3, /**< closure */
- JERRY_DEBUGGER_SCOPE_GLOBAL = 4, /**< global */
- JERRY_DEBUGGER_SCOPE_NON_CLOSURE = 5 /**< non closure */
-} jerry_debugger_scope_chain_type_t;
-
-/**
- * Type of scope variables.
- */
-typedef enum
-{
- JERRY_DEBUGGER_VALUE_NONE = 1,
- JERRY_DEBUGGER_VALUE_UNDEFINED = 2,
- JERRY_DEBUGGER_VALUE_NULL = 3,
- JERRY_DEBUGGER_VALUE_BOOLEAN = 4,
- JERRY_DEBUGGER_VALUE_NUMBER = 5,
- JERRY_DEBUGGER_VALUE_STRING = 6,
- JERRY_DEBUGGER_VALUE_FUNCTION = 7,
- JERRY_DEBUGGER_VALUE_ARRAY = 8,
- JERRY_DEBUGGER_VALUE_OBJECT = 9
-} jerry_debugger_scope_variable_type_t;
-
-/**
- * Byte data for evaluating expressions and receiving client source.
- */
-typedef struct
-{
- uint32_t uint8_size; /**< total size of the client source */
- uint32_t uint8_offset; /**< current offset in the client source */
-} jerry_debugger_uint8_data_t;
-
-/**
- * Delayed free of byte code data.
- */
-typedef struct
-{
- uint16_t size; /**< size of the byte code header divided by JMEM_ALIGNMENT */
- jmem_cpointer_t prev_cp; /**< previous byte code data to be freed */
-} jerry_debugger_byte_code_free_t;
-
-/**
- * Outgoing message: JerryScript configuration.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t configuration; /**< configuration option bits */
- uint8_t version[sizeof (uint32_t)]; /**< debugger version */
- uint8_t max_message_size; /**< maximum incoming message size */
- uint8_t cpointer_size; /**< size of compressed pointers */
-} jerry_debugger_send_configuration_t;
-
-/**
- * Outgoing message: message without arguments.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
-} jerry_debugger_send_type_t;
-
-/**
- * Incoming message: message without arguments.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
-} jerry_debugger_receive_type_t;
-
-/**
- * Outgoing message: string (Source file name or function name).
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t string[]; /**< string data */
-} jerry_debugger_send_string_t;
-
-/**
- * Outgoing message: uint32 value.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t line[sizeof (uint32_t)]; /**< value data */
- uint8_t column[sizeof (uint32_t)]; /**< value data */
-} jerry_debugger_send_parse_function_t;
-
-/**
- * Outgoing message: byte code compressed pointer.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t byte_code_cp[sizeof (jmem_cpointer_t)]; /**< byte code compressed pointer */
-} jerry_debugger_send_byte_code_cp_t;
-
-/**
- * Incoming message: byte code compressed pointer.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t byte_code_cp[sizeof (jmem_cpointer_t)]; /**< byte code compressed pointer */
-} jerry_debugger_receive_byte_code_cp_t;
-
-/**
- * Incoming message: update (enable/disable) breakpoint status.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t is_set_breakpoint; /**< set or clear breakpoint */
- uint8_t byte_code_cp[sizeof (jmem_cpointer_t)]; /**< byte code compressed pointer */
- uint8_t offset[sizeof (uint32_t)]; /**< breakpoint offset */
-} jerry_debugger_receive_update_breakpoint_t;
-
-/**
- * Outgoing message: send memory statistics
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t allocated_bytes[sizeof (uint32_t)]; /**< allocated bytes */
- uint8_t byte_code_bytes[sizeof (uint32_t)]; /**< byte code bytes */
- uint8_t string_bytes[sizeof (uint32_t)]; /**< string bytes */
- uint8_t object_bytes[sizeof (uint32_t)]; /**< object bytes */
- uint8_t property_bytes[sizeof (uint32_t)]; /**< property bytes */
-} jerry_debugger_send_memstats_t;
-
-/**
- * Outgoing message: notify breakpoint hit.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t byte_code_cp[sizeof (jmem_cpointer_t)]; /**< byte code compressed pointer */
- uint8_t offset[sizeof (uint32_t)]; /**< breakpoint offset */
-} jerry_debugger_send_breakpoint_hit_t;
-
-/**
- * Stack frame descriptor for sending backtrace information.
- */
-typedef struct
-{
- uint8_t byte_code_cp[sizeof (jmem_cpointer_t)]; /**< byte code compressed pointer */
- uint8_t offset[sizeof (uint32_t)]; /**< last breakpoint offset */
-} jerry_debugger_frame_t;
-
-/**
- * Outgoing message: backtrace information.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- jerry_debugger_frame_t frames[]; /**< frames */
-} jerry_debugger_send_backtrace_t;
-
-/**
- * Outgoing message: scope chain.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t scope_types[]; /**< scope types */
-} jerry_debugger_send_scope_chain_t;
-
-/**
- * Outgoing message: number of total frames in backtrace.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t frame_count[sizeof (uint32_t)]; /**< total number of frames */
-} jerry_debugger_send_backtrace_total_t;
-
-/**
- * Incoming message: set behaviour when exception occures.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t enable; /**< non-zero: enable stop at exception */
-} jerry_debugger_receive_exception_config_t;
-
-/**
- * Incoming message: set parser configuration.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t enable_wait; /**< non-zero: wait after parsing is completed */
-} jerry_debugger_receive_parser_config_t;
-
-/**
- * Incoming message: get backtrace.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t min_depth[sizeof (uint32_t)]; /**< minimum depth*/
- uint8_t max_depth[sizeof (uint32_t)]; /**< maximum depth (0 - unlimited) */
- uint8_t get_total_frame_count; /**< non-zero: if total frame count is also requested */
-} jerry_debugger_receive_get_backtrace_t;
-
-/**
- * Incoming message: first message of evaluating expression.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t eval_size[sizeof (uint32_t)]; /**< total size of the message */
-} jerry_debugger_receive_eval_first_t;
-
-/**
- * Incoming message: get scope variables
-*/
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t chain_index[sizeof (uint32_t)]; /**< index element of the scope */
-} jerry_debugger_receive_get_scope_variables_t;
-
-/**
- * Incoming message: first message of client source.
- */
-typedef struct
-{
- uint8_t type; /**< type of the message */
- uint8_t code_size[sizeof (uint32_t)]; /**< total size of the message */
-} jerry_debugger_receive_client_source_first_t;
-
-void jerry_debugger_free_unreferenced_byte_code (void);
-
-bool jerry_debugger_receive (jerry_debugger_uint8_data_t **message_data_p);
-
-void jerry_debugger_breakpoint_hit (uint8_t message_type);
-
-void jerry_debugger_send_type (jerry_debugger_header_type_t type);
-bool jerry_debugger_send_configuration (uint8_t max_message_size);
-void jerry_debugger_send_data (jerry_debugger_header_type_t type, const void *data, size_t size);
-bool jerry_debugger_send_string (uint8_t message_type, uint8_t sub_type, const uint8_t *string_p, size_t string_length);
-bool jerry_debugger_send_function_cp (jerry_debugger_header_type_t type, ecma_compiled_code_t *compiled_code_p);
-bool jerry_debugger_send_parse_function (uint32_t line, uint32_t column);
-void jerry_debugger_send_memstats (void);
-bool jerry_debugger_send_exception_string (void);
-
-#endif /* ENABLED (JERRY_DEBUGGER) */
-
-#endif /* !DEBUGGER_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_ALLOC_H
-#define ECMA_ALLOC_H
-
-#include "ecma-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmaalloc Routines for allocation/freeing memory for ECMA data types
- * @{
- */
-
-/**
- * Allocate memory for ecma-object
- *
- * @return pointer to allocated memory
- */
-ecma_object_t *ecma_alloc_object (void);
-
-/**
- * Dealloc memory from an ecma-object
- */
-void ecma_dealloc_object (ecma_object_t *object_p);
-
-/**
- * Allocate memory for extended object
- *
- * @return pointer to allocated memory
- */
-ecma_extended_object_t *ecma_alloc_extended_object (size_t size);
-
-/**
- * Dealloc memory of an extended object
- */
-void ecma_dealloc_extended_object (ecma_object_t *object_p, size_t size);
-
-/**
- * Allocate memory for ecma-number
- *
- * @return pointer to allocated memory
- */
-ecma_number_t *ecma_alloc_number (void);
-
-/**
- * Dealloc memory from an ecma-number
- */
-void ecma_dealloc_number (ecma_number_t *number_p);
-
-/**
- * Allocate memory for ecma-string descriptor
- *
- * @return pointer to allocated memory
- */
-ecma_string_t *ecma_alloc_string (void);
-
-/**
- * Dealloc memory from ecma-string descriptor
- */
-void ecma_dealloc_string (ecma_string_t *string_p);
-
-/**
- * Allocate memory for extended ecma-string descriptor
- *
- * @return pointer to allocated memory
- */
-ecma_extended_string_t *ecma_alloc_extended_string (void);
-
-/**
- * Dealloc memory from extended ecma-string descriptor
- */
-void ecma_dealloc_extended_string (ecma_extended_string_t *string_p);
-
-/**
- * Allocate memory for string with character data
- *
- * @return pointer to allocated memory
- */
-ecma_string_t *ecma_alloc_string_buffer (size_t size);
-
-/**
- * Dealloc memory of a string with character data
- */
-void ecma_dealloc_string_buffer (ecma_string_t *string_p, size_t size);
-
-/**
- * Allocate memory for ecma-property pair
- *
- * @return pointer to allocated memory
- */
-ecma_property_pair_t *ecma_alloc_property_pair (void);
-
-/**
- * Dealloc memory from an ecma-property pair
- */
-void ecma_dealloc_property_pair (ecma_property_pair_t *property_pair_p);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_ALLOC_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_ARRAY_OBJECT_H
-#define ECMA_ARRAY_OBJECT_H
-
-#include "ecma-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmaarrayobject ECMA Array object related routines
- * @{
- */
-
-/**
- * Maximum number of array holes in a fast mode access array.
- * If the number of holes exceeds this limit, the array is converted back
- * to normal property list based array.
- */
-#define ECMA_FAST_ARRAY_MAX_HOLE_COUNT 32
-
-/**
- * Flags for ecma_op_array_object_set_length
- */
-typedef enum
-{
- ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_IS_THROW = 1u << 0, /**< is_throw flag is set */
- ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_REJECT = 1u << 1, /**< reject later because the descriptor flags
- * contains an unallowed combination */
- ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_WRITABLE_DEFINED = 1u << 2, /**< writable flag defined
- * in the property descriptor */
- ECMA_ARRAY_OBJECT_SET_LENGTH_FLAG_WRITABLE = 1u << 3, /**< writable flag enabled
- * in the property descriptor */
-} ecma_array_object_set_length_flags_t;
-
-ecma_object_t *
-ecma_op_new_array_object (ecma_length_t length);
-
-ecma_object_t *
-ecma_op_new_fast_array_object (ecma_length_t length);
-
-ecma_value_t *
-ecma_fast_array_extend (ecma_object_t *object_p, uint32_t new_lengt);
-
-bool
-ecma_fast_array_set_property (ecma_object_t *object_p, ecma_string_t *property_name_p, ecma_value_t value);
-
-void
-ecma_array_object_delete_property (ecma_object_t *object_p, ecma_string_t *property_name_p,
- ecma_property_value_t *prop_value_p);
-
-ecma_collection_t *
-ecma_fast_array_get_property_names (ecma_object_t *object_p, uint32_t opts);
-
-void
-ecma_fast_array_convert_to_normal (ecma_object_t *object_p);
-
-ecma_value_t
-ecma_op_create_array_object (const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len,
- bool is_treat_single_arg_as_length);
-
-#if ENABLED (JERRY_ES2015_CLASS)
-ecma_value_t
-ecma_op_create_array_object_by_constructor (const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len,
- bool is_treat_single_arg_as_length, ecma_object_t *object_p);
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
-
-ecma_value_t
-ecma_op_array_object_set_length (ecma_object_t *object_p, ecma_value_t new_value, uint32_t flags);
-
-ecma_value_t
-ecma_op_array_object_define_own_property (ecma_object_t *object_p, ecma_string_t *property_name_p,
- const ecma_property_descriptor_t *property_desc_p);
-
-void
-ecma_op_array_list_lazy_property_names (ecma_object_t *obj_p, bool separate_enumerable,
- ecma_collection_t *main_collection_p,
- ecma_collection_t *non_enum_collection_p);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_ARRAY_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_ARRAYBUFFER_OBJECT_H
-#define ECMA_ARRAYBUFFER_OBJECT_H
-
-#include "ecma-globals.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmaarraybufferobject ECMA ArrayBuffer object related routines
- * @{
- */
-
-ecma_value_t
-ecma_op_create_arraybuffer_object (const ecma_value_t *, ecma_length_t);
-
-/**
- * Helper functions for arraybuffer.
- */
-ecma_object_t *
-ecma_arraybuffer_new_object (ecma_length_t lengh);
-ecma_object_t *
-ecma_arraybuffer_new_object_external (ecma_length_t length,
- void *buffer_p,
- ecma_object_native_free_callback_t free_cb);
-lit_utf8_byte_t * JERRY_ATTR_PURE
-ecma_arraybuffer_get_buffer (ecma_object_t *obj_p);
-ecma_length_t JERRY_ATTR_PURE
-ecma_arraybuffer_get_length (ecma_object_t *obj_p);
-bool
-ecma_is_arraybuffer (ecma_value_t val);
-
-/**
- * @}
- * @}
- */
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
-#endif /* !ECMA_ARRAYBUFFER_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_BOOLEAN_OBJECT_H
-#define ECMA_BOOLEAN_OBJECT_H
-
-#include "ecma-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmabooleanobject ECMA Boolean object related routines
- * @{
- */
-
-ecma_value_t ecma_op_create_boolean_object (ecma_value_t arg);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_BOOLEAN_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * %ArrayIteratorPrototype% built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
-
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_ARRAY_ITERATOR_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_array_iterator_prototype_object_next, 0, 0)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Array.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ARRAY)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.4.4.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_ARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* Number properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.4.4 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 0,
- ECMA_PROPERTY_FLAG_WRITABLE)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_ARRAY_PROTOTYPE_TO_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, ECMA_ARRAY_PROTOTYPE_TO_LOCALE_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_CONCAT, ECMA_ARRAY_PROTOTYPE_CONCAT, NON_FIXED, 1)
-ROUTINE (LIT_MAGIC_STRING_JOIN, ECMA_ARRAY_PROTOTYPE_JOIN, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_POP, ECMA_ARRAY_PROTOTYPE_POP, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_PUSH, ECMA_ARRAY_PROTOTYPE_PUSH, NON_FIXED, 1)
-ROUTINE (LIT_MAGIC_STRING_REVERSE, ECMA_ARRAY_PROTOTYPE_REVERSE, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_SHIFT, ECMA_ARRAY_PROTOTYPE_SHIFT, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_SLICE, ECMA_ARRAY_PROTOTYPE_SLICE, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_SORT, ECMA_ARRAY_PROTOTYPE_SORT, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_SPLICE, ECMA_ARRAY_PROTOTYPE_SPLICE, NON_FIXED, 2)
-ROUTINE (LIT_MAGIC_STRING_UNSHIFT, ECMA_ARRAY_PROTOTYPE_UNSHIFT, NON_FIXED, 1)
-ROUTINE (LIT_MAGIC_STRING_INDEX_OF_UL, ECMA_ARRAY_PROTOTYPE_INDEX_OF, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_LAST_INDEX_OF_UL, ECMA_ARRAY_PROTOTYPE_LAST_INDEX_OF, NON_FIXED, 1)
-/* Note these 3 routines must be in this order */
-ROUTINE (LIT_MAGIC_STRING_EVERY, ECMA_ARRAY_PROTOTYPE_EVERY, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_SOME, ECMA_ARRAY_PROTOTYPE_SOME, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_FOR_EACH_UL, ECMA_ARRAY_PROTOTYPE_FOR_EACH, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_MAP, ECMA_ARRAY_PROTOTYPE_MAP, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_FILTER, ECMA_ARRAY_PROTOTYPE_FILTER, 2, 1)
-/* Note these 2 routines must be in this order */
-ROUTINE (LIT_MAGIC_STRING_REDUCE, ECMA_ARRAY_PROTOTYPE_REDUCE, NON_FIXED, 1)
-ROUTINE (LIT_MAGIC_STRING_REDUCE_RIGHT_UL, ECMA_ARRAY_PROTOTYPE_REDUCE_RIGHT, NON_FIXED, 1)
-#if ENABLED (JERRY_ES2015_BUILTIN)
-ROUTINE (LIT_MAGIC_STRING_FIND, ECMA_ARRAY_PROTOTYPE_FIND, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_FIND_INDEX, ECMA_ARRAY_PROTOTYPE_FIND_INDEX, 2, 1)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
-ROUTINE (LIT_MAGIC_STRING_ENTRIES, ECMA_ARRAY_PROTOTYPE_ENTRIES, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_VALUES, ECMA_ARRAY_PROTOTYPE_VALUES, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_KEYS, ECMA_ARRAY_PROTOTYPE_KEYS, 0, 0)
-ROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ECMA_ARRAY_PROTOTYPE_SYMBOL_ITERATOR, 0, 0)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
-
-#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Array description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ARRAY)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.4.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_ARRAY_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-/* Number properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.4.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_IS_ARRAY_UL, ecma_builtin_array_object_is_array, 1, 1)
-
-#endif /* !(ENABLED (JERRY_BUILTIN_ARRAY)) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * ArrayBuffer.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_ARRAYBUFFER,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* Readonly accessor properties */
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_LENGTH_UL,
- ecma_builtin_arraybuffer_prototype_bytelength_getter,
- ECMA_PROPERTY_FIXED)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-/* ECMA-262 v6, 24.1.4.4 */
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_ARRAY_BUFFER_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_SLICE, ecma_builtin_arraybuffer_prototype_object_slice, 2, 2)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * ArrayBuffer built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-
-/* ES2015 24.1.3.1 */
-ROUTINE (LIT_MAGIC_STRING_IS_VIEW_UL, ecma_builtin_arraybuffer_object_is_view, 1, 1)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Boolean.prototype description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_BOOLEAN)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.6.4.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_BOOLEAN,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_boolean_prototype_object_to_string, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ecma_builtin_boolean_prototype_object_value_of, 0, 0)
-
-#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Boolean description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_BOOLEAN)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.6.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-/* Number properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.6.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * DataView.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v6, 24.2.3 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_DATAVIEW,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-/* ECMA-262 v6, 23.2.4.21 */
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_DATAVIEW_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_GET_FLOAT_32_UL, ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT32, 2, 1)
-#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
-ROUTINE (LIT_MAGIC_STRING_GET_FLOAT_64_UL, ECMA_DATAVIEW_PROTOTYPE_GET_FLOAT64, 2, 1)
-#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
-ROUTINE (LIT_MAGIC_STRING_GET_INT8_UL, ECMA_DATAVIEW_PROTOTYPE_GET_INT8, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_GET_INT16_UL, ECMA_DATAVIEW_PROTOTYPE_GET_INT16, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_GET_INT32_UL, ECMA_DATAVIEW_PROTOTYPE_GET_INT32, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_GET_UINT8_UL, ECMA_DATAVIEW_PROTOTYPE_GET_UINT8, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_GET_UINT16_UL, ECMA_DATAVIEW_PROTOTYPE_GET_UINT16, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_GET_UINT32_UL, ECMA_DATAVIEW_PROTOTYPE_GET_UINT32, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_SET_FLOAT_32_UL, ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT32, 2, 1)
-#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
-ROUTINE (LIT_MAGIC_STRING_SET_FLOAT_64_UL, ECMA_DATAVIEW_PROTOTYPE_SET_FLOAT64, 2, 1)
-#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
-ROUTINE (LIT_MAGIC_STRING_SET_INT8_UL, ECMA_DATAVIEW_PROTOTYPE_SET_INT8, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_SET_INT16_UL, ECMA_DATAVIEW_PROTOTYPE_SET_INT16, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_SET_INT32_UL, ECMA_DATAVIEW_PROTOTYPE_SET_INT32, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_SET_UINT8_UL, ECMA_DATAVIEW_PROTOTYPE_SET_UINT8, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_SET_UINT16_UL, ECMA_DATAVIEW_PROTOTYPE_SET_UINT16, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_SET_UINT32_UL, ECMA_DATAVIEW_PROTOTYPE_SET_UINT32, 2, 1)
-
-/* ECMA-262 v6, 24.2.4.1 */
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BUFFER,
- ECMA_DATAVIEW_PROTOTYPE_BUFFER_GETTER,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v6, 24.2.4.2 */
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_LENGTH_UL,
- ECMA_DATAVIEW_PROTOTYPE_BYTE_LENGTH_GETTER,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v6, 24.2.4.3 */
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_OFFSET_UL,
- ECMA_DATAVIEW_PROTOTYPE_BYTE_OFFSET_GETTER,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * DataView built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v6, 23.1.2 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 3,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v6, 23.1 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- LIT_MAGIC_STRING_DATAVIEW_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v6, 23.1.2.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_DATAVIEW_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Date.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_DATE)
-
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_DATE,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_DATE_PROTOTYPE_TO_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_DATE_STRING_UL, ECMA_DATE_PROTOTYPE_TO_DATE_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_TIME_STRING_UL, ECMA_DATE_PROTOTYPE_TO_TIME_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, ECMA_DATE_PROTOTYPE_TO_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_DATE_STRING_UL, ECMA_DATE_PROTOTYPE_TO_DATE_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_TIME_STRING_UL, ECMA_DATE_PROTOTYPE_TO_TIME_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ECMA_DATE_PROTOTYPE_GET_TIME, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_TIME_UL, ECMA_DATE_PROTOTYPE_GET_TIME, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_FULL_YEAR_UL, ECMA_DATE_PROTOTYPE_GET_FULL_YEAR, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_UTC_FULL_YEAR_UL, ECMA_DATE_PROTOTYPE_GET_UTC_FULL_YEAR, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_MONTH_UL, ECMA_DATE_PROTOTYPE_GET_MONTH, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_UTC_MONTH_UL, ECMA_DATE_PROTOTYPE_GET_UTC_MONTH, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_DATE_UL, ECMA_DATE_PROTOTYPE_GET_DATE, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_UTC_DATE_UL, ECMA_DATE_PROTOTYPE_GET_UTC_DATE, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_DAY_UL, ECMA_DATE_PROTOTYPE_GET_DAY, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_UTC_DAY_UL, ECMA_DATE_PROTOTYPE_GET_UTC_DAY, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_HOURS_UL, ECMA_DATE_PROTOTYPE_GET_HOURS, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_UTC_HOURS_UL, ECMA_DATE_PROTOTYPE_GET_UTC_HOURS, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_MINUTES_UL, ECMA_DATE_PROTOTYPE_GET_MINUTES, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_UTC_MINUTES_UL, ECMA_DATE_PROTOTYPE_GET_UTC_MINUTES, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_SECONDS_UL, ECMA_DATE_PROTOTYPE_GET_SECONDS, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_UTC_SECONDS_UL, ECMA_DATE_PROTOTYPE_GET_UTC_SECONDS, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_MILLISECONDS_UL, ECMA_DATE_PROTOTYPE_GET_MILLISECONDS, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_UTC_MILLISECONDS_UL, ECMA_DATE_PROTOTYPE_GET_UTC_MILLISECONDS, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_GET_TIMEZONE_OFFSET_UL, ECMA_DATE_PROTOTYPE_GET_UTC_TIMEZONE_OFFSET, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_SET_TIME_UL, ECMA_DATE_PROTOTYPE_SET_TIME, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_SET_MILLISECONDS_UL, ECMA_DATE_PROTOTYPE_SET_MILLISECONDS, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_SET_UTC_MILLISECONDS_UL, ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_SET_SECONDS_UL, ECMA_DATE_PROTOTYPE_SET_SECONDS, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_SET_UTC_SECONDS_UL, ECMA_DATE_PROTOTYPE_SET_UTC_SECONDS, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_SET_MINUTES_UL, ECMA_DATE_PROTOTYPE_SET_MINUTES, NON_FIXED, 3)
-ROUTINE (LIT_MAGIC_STRING_SET_UTC_MINUTES_UL, ECMA_DATE_PROTOTYPE_SET_UTC_MINUTES, NON_FIXED, 3)
-ROUTINE (LIT_MAGIC_STRING_SET_HOURS_UL, ECMA_DATE_PROTOTYPE_SET_HOURS, NON_FIXED, 4)
-ROUTINE (LIT_MAGIC_STRING_SET_UTC_HOURS_UL, ECMA_DATE_PROTOTYPE_SET_UTC_HOURS, NON_FIXED, 4)
-ROUTINE (LIT_MAGIC_STRING_SET_DATE_UL, ECMA_DATE_PROTOTYPE_SET_DATE, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_SET_UTC_DATE_UL, ECMA_DATE_PROTOTYPE_SET_UTC_DATE, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_SET_MONTH_UL, ECMA_DATE_PROTOTYPE_SET_MONTH, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_SET_UTC_MONTH_UL, ECMA_DATE_PROTOTYPE_SET_UTC_MONTH, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_SET_FULL_YEAR_UL, ECMA_DATE_PROTOTYPE_SET_FULL_YEAR, NON_FIXED, 3)
-ROUTINE (LIT_MAGIC_STRING_SET_UTC_FULL_YEAR_UL, ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR, NON_FIXED, 3)
-ROUTINE (LIT_MAGIC_STRING_TO_UTC_STRING_UL, ECMA_DATE_PROTOTYPE_TO_UTC_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_ISO_STRING_UL, ECMA_DATE_PROTOTYPE_TO_ISO_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_JSON_UL, ECMA_DATE_PROTOTYPE_TO_JSON, 1, 1)
-
-#if ENABLED (JERRY_BUILTIN_ANNEXB)
-
-ROUTINE (LIT_MAGIC_STRING_GET_YEAR_UL, ECMA_DATE_PROTOTYPE_GET_YEAR, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_SET_YEAR_UL, ECMA_DATE_PROTOTYPE_SET_YEAR, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_TO_GMT_STRING_UL, ECMA_DATE_PROTOTYPE_TO_UTC_STRING, 0, 0)
-
-#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
-
-#endif /* ENABLED (JERRY_BUILTIN_DATE) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Date built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_DATE)
-
-/* ECMA-262 v5, 15.9.4.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_DATE_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 7,
- ECMA_PROPERTY_FIXED)
-
-ROUTINE (LIT_MAGIC_STRING_PARSE, ecma_builtin_date_parse, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_UTC_U, ecma_builtin_date_utc, NON_FIXED, 7)
-ROUTINE (LIT_MAGIC_STRING_NOW, ecma_builtin_date_now, 0, 0)
-
-#endif /* ENABLED (JERRY_BUILTIN_DATE) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Error.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.4.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.4.2 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- LIT_MAGIC_STRING_ERROR_UL,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.4.3 */
-STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
- LIT_MAGIC_STRING__EMPTY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_error_prototype_object_to_string, 0, 0)
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Error built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.11.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.7.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * EvalError.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.7.8 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_EVAL_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.9 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- LIT_MAGIC_STRING_EVAL_ERROR_UL,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.10 */
-STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
- LIT_MAGIC_STRING__EMPTY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * EvalError built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.11.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Float32Array prototype description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 4
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT32ARRAY
-#include "ecma-builtin-typedarray-prototype-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Float32Array description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 4
-#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_FLOAT32_ARRAY_UL
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE
-#include "ecma-builtin-typedarray-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Float64Array prototype description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 8
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT64ARRAY
-#include "ecma-builtin-typedarray-prototype-template.inc.h"
-
-#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Float64Array description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 8
-#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_FLOAT64_ARRAY_UL
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE
-#include "ecma-builtin-typedarray-template.inc.h"
-
-#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Function.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.3.4.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_FUNCTION,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* Number properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.3.4 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 0,
- ECMA_PROPERTY_FIXED)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_FUNCTION_PROTOTYPE_TO_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_APPLY, ECMA_FUNCTION_PROTOTYPE_APPLY, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_CALL, ECMA_FUNCTION_PROTOTYPE_CALL, NON_FIXED, 1)
-ROUTINE (LIT_MAGIC_STRING_BIND, ECMA_FUNCTION_PROTOTYPE_BIND, NON_FIXED, 1)
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Function built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.3.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-/* Number properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.3.3.2 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Global built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-/* Simple value properties:
- * (property name, simple value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.1.1.3 */
-SIMPLE_VALUE (LIT_MAGIC_STRING_UNDEFINED,
- ECMA_VALUE_UNDEFINED,
- ECMA_PROPERTY_FIXED)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.1.1.1 */
-NUMBER_VALUE (LIT_MAGIC_STRING_NAN,
- ECMA_BUILTIN_NUMBER_NAN,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.1.1.2 */
-NUMBER_VALUE (LIT_MAGIC_STRING_INFINITY_UL,
- ECMA_BUILTIN_NUMBER_POSITIVE_INFINITY,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.1.4.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_OBJECT_UL,
- ECMA_BUILTIN_ID_OBJECT,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.1.4.2 */
-OBJECT_VALUE (LIT_MAGIC_STRING_FUNCTION_UL,
- ECMA_BUILTIN_ID_FUNCTION,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.1.4.3 */
-#if ENABLED (JERRY_BUILTIN_ARRAY)
-OBJECT_VALUE (LIT_MAGIC_STRING_ARRAY_UL,
- ECMA_BUILTIN_ID_ARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
-
-#if ENABLED (JERRY_BUILTIN_STRING)
-/* ECMA-262 v5, 15.1.4.4 */
-OBJECT_VALUE (LIT_MAGIC_STRING_STRING_UL,
- ECMA_BUILTIN_ID_STRING,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_BUILTIN_STRING) */
-
-#if ENABLED (JERRY_BUILTIN_BOOLEAN)
-/* ECMA-262 v5, 15.1.4.5 */
-OBJECT_VALUE (LIT_MAGIC_STRING_BOOLEAN_UL,
- ECMA_BUILTIN_ID_BOOLEAN,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
-
-#if ENABLED (JERRY_BUILTIN_NUMBER)
-/* ECMA-262 v5, 15.1.4.6 */
-OBJECT_VALUE (LIT_MAGIC_STRING_NUMBER_UL,
- ECMA_BUILTIN_ID_NUMBER,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
-
-#if ENABLED (JERRY_BUILTIN_DATE)
-/* ECMA-262 v5, 15.1.4.7 */
-OBJECT_VALUE (LIT_MAGIC_STRING_DATE_UL,
- ECMA_BUILTIN_ID_DATE,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_BUILTIN_DATE) */
-
-#if ENABLED (JERRY_BUILTIN_REGEXP)
-/* ECMA-262 v5, 15.1.4.8 */
-OBJECT_VALUE (LIT_MAGIC_STRING_REGEXP_UL,
- ECMA_BUILTIN_ID_REGEXP,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
-
-/* ECMA-262 v5, 15.1.4.9 */
-OBJECT_VALUE (LIT_MAGIC_STRING_ERROR_UL,
- ECMA_BUILTIN_ID_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* ECMA-262 v5, 15.1.4.10 */
-OBJECT_VALUE (LIT_MAGIC_STRING_EVAL_ERROR_UL,
- ECMA_BUILTIN_ID_EVAL_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.1.4.11 */
-OBJECT_VALUE (LIT_MAGIC_STRING_RANGE_ERROR_UL,
- ECMA_BUILTIN_ID_RANGE_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.1.4.12 */
-OBJECT_VALUE (LIT_MAGIC_STRING_REFERENCE_ERROR_UL,
- ECMA_BUILTIN_ID_REFERENCE_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.1.4.13 */
-OBJECT_VALUE (LIT_MAGIC_STRING_SYNTAX_ERROR_UL,
- ECMA_BUILTIN_ID_SYNTAX_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.1.4.14 */
-OBJECT_VALUE (LIT_MAGIC_STRING_TYPE_ERROR_UL,
- ECMA_BUILTIN_ID_TYPE_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.1.4.15 */
-OBJECT_VALUE (LIT_MAGIC_STRING_URI_ERROR_UL,
- ECMA_BUILTIN_ID_URI_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#if ENABLED (JERRY_BUILTIN_MATH)
-/* ECMA-262 v5, 15.1.5.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_MATH_UL,
- ECMA_BUILTIN_ID_MATH,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_BUILTIN_MATH) */
-
-#if ENABLED (JERRY_BUILTIN_JSON)
-/* ECMA-262 v5, 15.1.5.2 */
-OBJECT_VALUE (LIT_MAGIC_STRING_JSON_U,
- ECMA_BUILTIN_ID_JSON,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_BUILTIN_JSON) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-OBJECT_VALUE (LIT_MAGIC_STRING_ARRAY_BUFFER_UL,
- ECMA_BUILTIN_ID_ARRAYBUFFER,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-OBJECT_VALUE (LIT_MAGIC_STRING_INT8_ARRAY_UL,
- ECMA_BUILTIN_ID_INT8ARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-OBJECT_VALUE (LIT_MAGIC_STRING_UINT8_ARRAY_UL,
- ECMA_BUILTIN_ID_UINT8ARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-OBJECT_VALUE (LIT_MAGIC_STRING_INT16_ARRAY_UL,
- ECMA_BUILTIN_ID_INT16ARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-OBJECT_VALUE (LIT_MAGIC_STRING_UINT16_ARRAY_UL,
- ECMA_BUILTIN_ID_UINT16ARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-OBJECT_VALUE (LIT_MAGIC_STRING_INT32_ARRAY_UL,
- ECMA_BUILTIN_ID_INT32ARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-OBJECT_VALUE (LIT_MAGIC_STRING_UINT32_ARRAY_UL,
- ECMA_BUILTIN_ID_UINT32ARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-OBJECT_VALUE (LIT_MAGIC_STRING_FLOAT32_ARRAY_UL,
- ECMA_BUILTIN_ID_FLOAT32ARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
-OBJECT_VALUE (LIT_MAGIC_STRING_FLOAT64_ARRAY_UL,
- ECMA_BUILTIN_ID_FLOAT64ARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
-
-OBJECT_VALUE (LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL,
- ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
-OBJECT_VALUE (LIT_MAGIC_STRING_PROMISE_UL,
- ECMA_BUILTIN_ID_PROMISE,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
-/* ECMA-262 v6, 23.1.1.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_MAP_UL,
- ECMA_BUILTIN_ID_MAP,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SET)
-/* ECMA-262 v6, 23.1.1.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_SET_UL,
- ECMA_BUILTIN_ID_SET,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SET) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-/* ECMA-262 v6, 19.4.1.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_SYMBOL_UL,
- ECMA_BUILTIN_ID_SYMBOL,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW)
-/* ECMA-262 v6, 23.1.1.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_DATAVIEW_UL,
- ECMA_BUILTIN_ID_DATAVIEW,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW */
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-
-ROUTINE (LIT_MAGIC_STRING_EVAL, ECMA_GLOBAL_EVAL, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_PARSE_FLOAT, ECMA_GLOBAL_PARSE_FLOAT, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_IS_NAN, ECMA_GLOBAL_IS_NAN, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_IS_FINITE, ECMA_GLOBAL_IS_FINITE, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_DECODE_URI, ECMA_GLOBAL_DECODE_URI, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_DECODE_URI_COMPONENT, ECMA_GLOBAL_DECODE_URI_COMPONENT, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_ENCODE_URI, ECMA_GLOBAL_ENCODE_URI, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_ENCODE_URI_COMPONENT, ECMA_GLOBAL_ENCODE_URI_COMPONENT, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_PARSE_INT, ECMA_GLOBAL_PARSE_INT, 2, 2)
-
-#if ENABLED (JERRY_BUILTIN_ANNEXB)
-ROUTINE (LIT_MAGIC_STRING_ESCAPE, ECMA_GLOBAL_ESCAPE, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_UNESCAPE, ECMA_GLOBAL_UNESCAPE, 1, 1)
-#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SIMPLE_VALUE
-#define SIMPLE_VALUE(name, simple_value, prop_attributes)
-#endif /* !SIMPLE_VALUE */
-
-#ifndef NUMBER_VALUE
-#define NUMBER_VALUE(name, number_value, prop_attributes)
-#endif /* !NUMBER_VALUE */
-
-#ifndef STRING_VALUE
-#define STRING_VALUE(name, magic_string_id, prop_attributes)
-#endif /* !STRING_VALUE */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-#ifndef SYMBOL_VALUE
-#define SYMBOL_VALUE(name, desc_string_id)
-#endif /* !SYMBOL_VALUE */
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-#ifndef OBJECT_VALUE
-#define OBJECT_VALUE(name, obj_builtin_id, prop_attributes)
-#endif /* !OBJECT_VALUE */
-
-#ifndef ROUTINE
-#define ROUTINE(name, c_function_name, args_number, length_prop_value)
-#endif /* !ROUTINE */
-
-#ifndef ROUTINE_CONFIGURABLE_ONLY
-#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value)
-#endif /* !ROUTINE_CONFIGURABLE_ONLY */
-
-#ifndef ACCESSOR_READ_WRITE
-#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes)
-#endif /* !ACCESSOR_READ_WRITE */
-
-#ifndef ACCESSOR_READ_ONLY
-#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes)
-#endif /* !ACCESSOR_READ_ONLY */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#undef SIMPLE_VALUE
-#undef NUMBER_VALUE
-#undef STRING_VALUE
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-#undef SYMBOL_VALUE
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-#undef OBJECT_VALUE
-#undef ROUTINE
-#undef ROUTINE_CONFIGURABLE_ONLY
-#undef ACCESSOR_READ_WRITE
-#undef ACCESSOR_READ_ONLY
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_BUILTIN_HELPERS_H
-#define ECMA_BUILTIN_HELPERS_H
-
-#include "ecma-globals.h"
-#include "ecma-exceptions.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmabuiltinhelpers ECMA builtin helper operations
- * @{
- */
-
-/**
- * Mode of string index routine.
- */
-typedef enum
-{
- /** These routines must be in this order */
- ECMA_STRING_INDEX_OF, /**< String.indexOf: ECMA-262 v5, 15.5.4.7 */
- ECMA_STRING_LAST_INDEX_OF, /**< String.lastIndexOf: ECMA-262 v5, 15.5.4.8 */
- ECMA_STRING_STARTS_WITH, /**< String.startsWith: ECMA-262 v6, 21.1.3.18 */
- ECMA_STRING_INCLUDES, /**< String.includes: ECMA-262 v6, 21.1.3.7 */
- ECMA_STRING_ENDS_WITH /**< String.includes: ECMA-262 v6, 21.1.3.6 */
-} ecma_string_index_of_mode_t;
-
-ecma_value_t
-ecma_builtin_helper_object_to_string (const ecma_value_t this_arg);
-ecma_value_t
-ecma_builtin_helper_get_to_locale_string_at_index (ecma_object_t *obj_p, uint32_t index);
-ecma_value_t
-ecma_builtin_helper_object_get_properties (ecma_object_t *obj_p, uint32_t opts);
-ecma_value_t
-ecma_builtin_helper_array_concat_value (ecma_object_t *obj_p, uint32_t *length_p, ecma_value_t value);
-uint32_t
-ecma_builtin_helper_array_index_normalize (ecma_number_t index, uint32_t length, bool last_index_of);
-uint32_t
-ecma_builtin_helper_string_index_normalize (ecma_number_t index, uint32_t length, bool nan_to_zero);
-ecma_value_t
-ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_str_p, ecma_value_t arg1,
- ecma_value_t arg2, ecma_string_index_of_mode_t mode);
-bool
-ecma_builtin_helper_string_find_index (ecma_string_t *original_str_p, ecma_string_t *search_str_p, bool first_index,
- ecma_length_t start_pos, ecma_length_t *ret_index_p);
-ecma_value_t
-ecma_builtin_helper_def_prop (ecma_object_t *obj_p, ecma_string_t *index_p, ecma_value_t value, uint32_t opts);
-
-ecma_value_t
-ecma_builtin_helper_def_prop_by_index (ecma_object_t *obj_p, uint32_t index, ecma_value_t value, uint32_t opts);
-
-#if ENABLED (JERRY_BUILTIN_DATE)
-
-/**
- * Time range defines for helper functions.
- *
- * See also:
- * ECMA-262 v5, 15.9.1.1, 15.9.1.10
- */
-
-/** Hours in a day. */
-#define ECMA_DATE_HOURS_PER_DAY ((ecma_number_t) 24)
-
-/** Minutes in an hour. */
-#define ECMA_DATE_MINUTES_PER_HOUR ((ecma_number_t) 60)
-
-/** Seconds in a minute. */
-#define ECMA_DATE_SECONDS_PER_MINUTE ((ecma_number_t) 60)
-
-/** Milliseconds in a second. */
-#define ECMA_DATE_MS_PER_SECOND ((ecma_number_t) 1000)
-
-/** ECMA_DATE_MS_PER_MINUTE == 60000 */
-#define ECMA_DATE_MS_PER_MINUTE (ECMA_DATE_MS_PER_SECOND * ECMA_DATE_SECONDS_PER_MINUTE)
-
-/** ECMA_DATE_MS_PER_HOUR == 3600000 */
-#define ECMA_DATE_MS_PER_HOUR (ECMA_DATE_MS_PER_MINUTE * ECMA_DATE_MINUTES_PER_HOUR)
-
-/** ECMA_DATE_MS_PER_DAY == 86400000 */
-#define ECMA_DATE_MS_PER_DAY (ECMA_DATE_MS_PER_HOUR * ECMA_DATE_HOURS_PER_DAY)
-
-/**
- * This gives a range of 8,640,000,000,000,000 milliseconds
- * to either side of 01 January, 1970 UTC.
- */
-#define ECMA_DATE_MAX_VALUE 8.64e15
-
-/**
- * Timezone type.
- */
-typedef enum
-{
- ECMA_DATE_UTC, /**< date vaule is in UTC */
- ECMA_DATE_LOCAL /**< date vaule is in local time */
-} ecma_date_timezone_t;
-
-/* ecma-builtin-helpers-date.c */
-ecma_number_t ecma_date_day (ecma_number_t time);
-ecma_number_t ecma_date_time_within_day (ecma_number_t time);
-ecma_number_t ecma_date_year_from_time (ecma_number_t time);
-ecma_number_t ecma_date_month_from_time (ecma_number_t time);
-ecma_number_t ecma_date_date_from_time (ecma_number_t time);
-ecma_number_t ecma_date_week_day (ecma_number_t time);
-ecma_number_t ecma_date_local_time_zone_adjustment (ecma_number_t time);
-ecma_number_t ecma_date_utc (ecma_number_t time);
-ecma_number_t ecma_date_hour_from_time (ecma_number_t time);
-ecma_number_t ecma_date_min_from_time (ecma_number_t time);
-ecma_number_t ecma_date_sec_from_time (ecma_number_t time);
-ecma_number_t ecma_date_ms_from_time (ecma_number_t time);
-ecma_number_t ecma_date_make_time (ecma_number_t hour, ecma_number_t min, ecma_number_t sec, ecma_number_t ms);
-ecma_number_t ecma_date_make_day (ecma_number_t year, ecma_number_t month, ecma_number_t date);
-ecma_number_t ecma_date_make_date (ecma_number_t day, ecma_number_t time);
-ecma_number_t ecma_date_time_clip (ecma_number_t time);
-ecma_number_t ecma_date_timezone_offset (ecma_number_t time);
-
-ecma_value_t ecma_date_value_to_string (ecma_number_t datetime_number);
-ecma_value_t ecma_date_value_to_utc_string (ecma_number_t datetime_number);
-ecma_value_t ecma_date_value_to_iso_string (ecma_number_t datetime_number);
-ecma_value_t ecma_date_value_to_date_string (ecma_number_t datetime_number);
-ecma_value_t ecma_date_value_to_time_string (ecma_number_t datetime_number);
-
-#endif /* ENABLED (JERRY_BUILTIN_DATE) */
-
-#if ENABLED (JERRY_BUILTIN_JSON)
-/* ecma-builtin-helper-json.c */
-
-/**
- * Occurence stack item of JSON.stringify()
- */
-typedef struct struct_ecma_json_occurence_stack_item_t
-{
- struct struct_ecma_json_occurence_stack_item_t *next_p; /**< next stack item */
- ecma_object_t *object_p; /**< current object */
-} ecma_json_occurence_stack_item_t;
-
-/**
- * Context for JSON.stringify()
- */
-typedef struct
-{
- /** Collection for property keys. */
- ecma_collection_t *property_list_p;
-
- /** Collection for traversing objects. */
- ecma_json_occurence_stack_item_t *occurence_stack_last_p;
-
- /** The actual indentation text. */
- ecma_stringbuilder_t indent_builder;
-
- /** The indentation text. */
- ecma_string_t *gap_str_p;
-
- /** The replacer function. */
- ecma_object_t *replacer_function_p;
-
- /** Result string builder. */
- ecma_stringbuilder_t result_builder;
-} ecma_json_stringify_context_t;
-
-ecma_value_t ecma_builtin_json_parse_buffer (const lit_utf8_byte_t * str_start_p,
- lit_utf8_size_t string_size);
-ecma_value_t ecma_builtin_json_string_from_object (const ecma_value_t arg1);
-bool ecma_json_has_object_in_stack (ecma_json_occurence_stack_item_t *stack_p, ecma_object_t *object_p);
-bool ecma_has_string_value_in_collection (ecma_collection_t *collection_p, ecma_string_t *string_p);
-
-ecma_value_t
-ecma_builtin_helper_json_create_non_formatted_json (lit_utf8_byte_t left_bracket, lit_utf8_byte_t right_bracket,
- ecma_collection_t *partial_p);
-#endif /* ENABLED (JERRY_BUILTIN_JSON) */
-
-/* ecma-builtin-helper-error.c */
-
-ecma_value_t
-ecma_builtin_helper_error_dispatch_call (ecma_standard_error_t error_type, const ecma_value_t *arguments_list_p,
- ecma_length_t arguments_list_len);
-
-/* ecma-builtin-helpers-sort.c */
-
-/**
- * Comparison callback function header for sorting helper routines.
- */
-typedef ecma_value_t (*ecma_builtin_helper_sort_compare_fn_t)(ecma_value_t lhs, /**< left value */
- ecma_value_t rhs, /**< right value */
- ecma_value_t compare_func); /**< compare function */
-
-ecma_value_t ecma_builtin_helper_array_heap_sort_helper (ecma_value_t *array_p,
- uint32_t right,
- ecma_value_t compare_func,
- const ecma_builtin_helper_sort_compare_fn_t sort_cb);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_BUILTIN_HELPERS_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Int16Array prototype description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 2
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT16ARRAY
-#include "ecma-builtin-typedarray-prototype-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Int16Array description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 2
-#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_INT16_ARRAY_UL
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE
-#include "ecma-builtin-typedarray-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Int32Array prototype description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 4
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT32ARRAY
-#include "ecma-builtin-typedarray-prototype-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Int32Array description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 4
-#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_INT32_ARRAY_UL
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT32ARRAY_PROTOTYPE
-#include "ecma-builtin-typedarray-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Int8Array prototype description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 1
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT8ARRAY
-#include "ecma-builtin-typedarray-prototype-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Int8Array description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 1
-#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_INT8_ARRAY_UL
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE
-#include "ecma-builtin-typedarray-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef BUILTIN_UNDERSCORED_ID
-# error "Please, define BUILTIN_UNDERSCORED_ID"
-#endif /* !BUILTIN_UNDERSCORED_ID */
-
-#ifndef BUILTIN_INC_HEADER_NAME
-# error "Please, define BUILTIN_INC_HEADER_NAME"
-#endif /* !BUILTIN_INC_HEADER_NAME */
-
-#include "ecma-objects.h"
-
-#define PASTE__(x, y) x ## y
-#define PASTE_(x, y) PASTE__ (x, y)
-#define PASTE(x, y) PASTE_ (x, y)
-
-#define PROPERTY_DESCRIPTOR_LIST_NAME \
- PASTE (PASTE (ecma_builtin_, BUILTIN_UNDERSCORED_ID), _property_descriptor_list)
-#define DISPATCH_ROUTINE_ROUTINE_NAME \
- PASTE (PASTE (ecma_builtin_, BUILTIN_UNDERSCORED_ID), _dispatch_routine)
-
-#ifndef BUILTIN_CUSTOM_DISPATCH
-
-#define ROUTINE_ARG(n) , ecma_value_t arg ## n
-#define ROUTINE_ARG_LIST_0 ecma_value_t this_arg
-#define ROUTINE_ARG_LIST_1 ROUTINE_ARG_LIST_0 ROUTINE_ARG(1)
-#define ROUTINE_ARG_LIST_2 ROUTINE_ARG_LIST_1 ROUTINE_ARG(2)
-#define ROUTINE_ARG_LIST_3 ROUTINE_ARG_LIST_2 ROUTINE_ARG(3)
-#define ROUTINE_ARG_LIST_NON_FIXED ROUTINE_ARG_LIST_0, \
- const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len
-#define ROUTINE(name, c_function_name, args_number, length_prop_value) \
- static ecma_value_t c_function_name (ROUTINE_ARG_LIST_ ## args_number);
-#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \
- static ecma_value_t c_function_name (ROUTINE_ARG_LIST_ ## args_number);
-#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \
- static ecma_value_t c_getter_func_name (ROUTINE_ARG_LIST_0); \
- static ecma_value_t c_setter_func_name (ROUTINE_ARG_LIST_1);
-#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \
- static ecma_value_t c_getter_func_name (ROUTINE_ARG_LIST_0);
-#include BUILTIN_INC_HEADER_NAME
-#undef ROUTINE_ARG_LIST_NON_FIXED
-#undef ROUTINE_ARG_LIST_3
-#undef ROUTINE_ARG_LIST_2
-#undef ROUTINE_ARG_LIST_1
-#undef ROUTINE_ARG_LIST_0
-#undef ROUTINE_ARG
-
-/**
- * List of built-in routine identifiers.
- */
-enum
-{
- PASTE (ECMA_ROUTINE_START_, BUILTIN_UNDERSCORED_ID) = ECMA_BUILTIN_ID__COUNT - 1,
-#define ROUTINE(name, c_function_name, args_number, length_prop_value) \
- ECMA_ROUTINE_ ## name ## c_function_name,
-#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \
- ECMA_ROUTINE_ ## name ## c_function_name,
-#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \
- ECMA_ACCESSOR_ ## name ## c_getter_func_name, \
- ECMA_ACCESSOR_ ## name ## c_setter_func_name,
-#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \
- ECMA_ACCESSOR_ ## name ## c_getter_func_name,
-#include BUILTIN_INC_HEADER_NAME
-};
-
-#endif /* !BUILTIN_CUSTOM_DISPATCH */
-
-/**
- * Built-in property list of the built-in object.
- */
-const ecma_builtin_property_descriptor_t PROPERTY_DESCRIPTOR_LIST_NAME[] =
-{
-#ifndef BUILTIN_CUSTOM_DISPATCH
-#define ROUTINE(name, c_function_name, args_number, length_prop_value) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_ROUTINE, \
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE, \
- ECMA_ROUTINE_VALUE (ECMA_ROUTINE_ ## name ## c_function_name, length_prop_value) \
- },
-#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_ROUTINE, \
- ECMA_PROPERTY_FLAG_CONFIGURABLE, \
- ECMA_ROUTINE_VALUE (ECMA_ROUTINE_ ## name ## c_function_name, length_prop_value) \
- },
-#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_ONLY, \
- prop_attributes, \
- ECMA_ACCESSOR_ ## name ## c_getter_func_name \
- },
-#else /* BUILTIN_CUSTOM_DISPATCH */
-#define ROUTINE(name, c_function_name, args_number, length_prop_value) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_ROUTINE, \
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE, \
- ECMA_ROUTINE_VALUE (c_function_name, length_prop_value) \
- },
-#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_ROUTINE, \
- ECMA_PROPERTY_FLAG_CONFIGURABLE, \
- ECMA_ROUTINE_VALUE (c_function_name, length_prop_value) \
- },
-#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_ONLY, \
- prop_attributes, \
- c_getter_func_name \
- },
-#endif /* !BUILTIN_CUSTOM_DISPATCH */
-#define OBJECT_VALUE(name, obj_builtin_id, prop_attributes) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_OBJECT, \
- prop_attributes, \
- obj_builtin_id \
- },
-#define SIMPLE_VALUE(name, simple_value, prop_attributes) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_SIMPLE, \
- prop_attributes, \
- simple_value \
- },
-#define NUMBER_VALUE(name, number_value, prop_attributes) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_NUMBER, \
- prop_attributes, \
- number_value \
- },
-#define STRING_VALUE(name, magic_string_id, prop_attributes) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_STRING, \
- prop_attributes, \
- magic_string_id \
- },
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-#define SYMBOL_VALUE(name, desc_string_id) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_SYMBOL, \
- ECMA_PROPERTY_FIXED, \
- desc_string_id \
- },
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-#define ACCESSOR_READ_WRITE(name, c_getter_name, c_setter_name, prop_attributes) \
- { \
- name, \
- ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_WRITE, \
- prop_attributes, \
- ECMA_ACCESSOR_READ_WRITE (ECMA_ACCESSOR_ ## name ## c_getter_name, ECMA_ACCESSOR_ ## name ## c_setter_name) \
- },
-#include BUILTIN_INC_HEADER_NAME
- {
- LIT_MAGIC_STRING__COUNT,
- ECMA_BUILTIN_PROPERTY_END,
- 0,
- 0
- }
-};
-
-#ifndef BUILTIN_CUSTOM_DISPATCH
-
-/**
- * Dispatcher of the built-in's routines
- *
- * @return ecma value
- * Returned value must be freed with ecma_free_value.
- */
-ecma_value_t
-DISPATCH_ROUTINE_ROUTINE_NAME (uint16_t builtin_routine_id, /**< built-in wide routine
- identifier */
- ecma_value_t this_arg_value, /**< 'this' argument
- value */
- const ecma_value_t arguments_list[], /**< list of arguments
- passed to routine */
- ecma_length_t arguments_number) /**< length of
- arguments' list */
-{
- /* the arguments may be unused for some built-ins */
- JERRY_UNUSED (this_arg_value);
- JERRY_UNUSED (arguments_list);
- JERRY_UNUSED (arguments_number);
-
- switch (builtin_routine_id)
- {
-#define ROUTINE_ARG(n) (arguments_list[n - 1])
-#define ROUTINE_ARG_LIST_0
-#define ROUTINE_ARG_LIST_1 , ROUTINE_ARG(1)
-#define ROUTINE_ARG_LIST_2 ROUTINE_ARG_LIST_1, ROUTINE_ARG(2)
-#define ROUTINE_ARG_LIST_3 ROUTINE_ARG_LIST_2, ROUTINE_ARG(3)
-#define ROUTINE_ARG_LIST_NON_FIXED , arguments_list, arguments_number
-#define ROUTINE(name, c_function_name, args_number, length_prop_value) \
- case ECMA_ROUTINE_ ## name ## c_function_name: \
- { \
- return c_function_name (this_arg_value ROUTINE_ARG_LIST_ ## args_number); \
- }
-#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \
- case ECMA_ROUTINE_ ## name ## c_function_name: \
- { \
- return c_function_name (this_arg_value ROUTINE_ARG_LIST_ ## args_number); \
- }
-#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \
- case ECMA_ACCESSOR_ ## name ## c_getter_func_name: \
- { \
- return c_getter_func_name(this_arg_value); \
- } \
- case ECMA_ACCESSOR_ ## name ## c_setter_func_name: \
- { \
- return c_setter_func_name(this_arg_value ROUTINE_ARG_LIST_1); \
- }
-#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \
- case ECMA_ACCESSOR_ ## name ## c_getter_func_name: \
- { \
- return c_getter_func_name(this_arg_value); \
- }
-#include BUILTIN_INC_HEADER_NAME
-#undef ROUTINE_ARG
-#undef ROUTINE_ARG_LIST_0
-#undef ROUTINE_ARG_LIST_1
-#undef ROUTINE_ARG_LIST_2
-#undef ROUTINE_ARG_LIST_3
-#undef ROUTINE_ARG_LIST_NON_FIXED
-
- default:
- {
- JERRY_UNREACHABLE ();
- }
- }
-} /* DISPATCH_ROUTINE_ROUTINE_NAME */
-
-#endif /* !BUILTIN_CUSTOM_DISPATCH */
-
-#undef BUILTIN_INC_HEADER_NAME
-#undef BUILTIN_CUSTOM_DISPATCH
-#undef BUILTIN_UNDERSCORED_ID
-#undef DISPATCH_ROUTINE_ROUTINE_NAME
-#undef ECMA_BUILTIN_PROPERTY_NAME_INDEX
-#undef PASTE__
-#undef PASTE_
-#undef PASTE
-#undef PROPERTY_DESCRIPTOR_LIST_NAME
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * %IteratorPrototype% built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ecma_builtin_iterator_prototype_object_iterator, 0, 0)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * JSON built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_JSON)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-/* ECMA-262 v6, 24.3.3 */
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_JSON_U,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_PARSE, ecma_builtin_json_parse, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_STRINGIFY, ecma_builtin_json_stringify, 3, 3)
-
-#endif /* ENABLED (JERRY_BUILTIN_JSON) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * %MapIteratorPrototype% built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
-
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_MAP_ITERATOR_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_map_iterator_prototype_object_next, 0, 0)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Map.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v6, 23.1.3.2 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_MAP,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-/* ECMA-262 v6, 23.1.3.13 */
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_MAP_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_CLEAR, ecma_builtin_map_prototype_object_clear, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_DELETE, ecma_builtin_map_prototype_object_delete, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_FOR_EACH_UL, ecma_builtin_map_prototype_object_foreach, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_GET, ecma_builtin_map_prototype_object_get, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_HAS, ecma_builtin_map_prototype_object_has, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_SET, ecma_builtin_map_prototype_object_set, 2, 2)
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
-ROUTINE (LIT_MAGIC_STRING_ENTRIES, ecma_builtin_map_prototype_object_entries, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_VALUES, ecma_builtin_map_prototype_object_values, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_KEYS, ecma_builtin_map_prototype_object_keys, 0, 0)
-ROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ecma_builtin_map_prototype_object_values, 0, 0)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
-
-/* ECMA-262 v6, 23.1.3.10 */
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_SIZE,
- ecma_builtin_map_prototype_object_size_getter,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Map built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v6, 23.1.2 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 0,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v6, 23.1 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- LIT_MAGIC_STRING_MAP_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v6, 23.1.2.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_MAP_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Math built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_MATH)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.8.1.1 */
-NUMBER_VALUE (LIT_MAGIC_STRING_E_U,
- ECMA_BUILTIN_NUMBER_E,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.8.1.2 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LN10_U,
- ECMA_BUILTIN_NUMBER_LN10,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.8.1.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LN2_U,
- ECMA_BUILTIN_NUMBER_LN2,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.8.1.4 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LOG2E_U,
- ECMA_BUILTIN_NUMBER_LOG2E,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.8.1.5 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LOG10E_U,
- ECMA_BUILTIN_NUMBER_LOG10E,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.8.1.6 */
-NUMBER_VALUE (LIT_MAGIC_STRING_PI_U,
- ECMA_BUILTIN_NUMBER_PI,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.8.1.7 */
-NUMBER_VALUE (LIT_MAGIC_STRING_SQRT1_2_U,
- ECMA_BUILTIN_NUMBER_SQRT_1_2,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.8.1.8 */
-NUMBER_VALUE (LIT_MAGIC_STRING_SQRT2_U,
- ECMA_BUILTIN_NUMBER_SQRT2,
- ECMA_PROPERTY_FIXED)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-/* ECMA-262 v6, 20.2.1.9 */
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_MATH_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_ABS, ECMA_MATH_OBJECT_ABS, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_ACOS, ECMA_MATH_OBJECT_ACOS, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_ASIN, ECMA_MATH_OBJECT_ASIN, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_ATAN, ECMA_MATH_OBJECT_ATAN, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_ATAN2, ECMA_MATH_OBJECT_ATAN2, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_CEIL, ECMA_MATH_OBJECT_CEIL, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_COS, ECMA_MATH_OBJECT_COS, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_EXP, ECMA_MATH_OBJECT_EXP, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_FLOOR, ECMA_MATH_OBJECT_FLOOR, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_LOG, ECMA_MATH_OBJECT_LOG, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_MAX, ECMA_MATH_OBJECT_MAX, NON_FIXED, 2)
-ROUTINE (LIT_MAGIC_STRING_MIN, ECMA_MATH_OBJECT_MIN, NON_FIXED, 2)
-ROUTINE (LIT_MAGIC_STRING_POW, ECMA_MATH_OBJECT_POW, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_RANDOM, ECMA_MATH_OBJECT_RANDOM, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_ROUND, ECMA_MATH_OBJECT_ROUND, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_SIN, ECMA_MATH_OBJECT_SIN, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_SQRT, ECMA_MATH_OBJECT_SQRT, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_TAN, ECMA_MATH_OBJECT_TAN, 1, 1)
-#if ENABLED (JERRY_ES2015_BUILTIN)
-ROUTINE (LIT_MAGIC_STRING_SIGN, ECMA_MATH_OBJECT_SIGN, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_TRUNC, ECMA_MATH_OBJECT_TRUNC, 1, 1)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
-
-#endif /* ENABLED (JERRY_BUILTIN_MATH) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Number.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_NUMBER)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.7.4.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_NUMBER,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_NUMBER_PROTOTYPE_TO_STRING, NON_FIXED, 1)
-ROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ECMA_NUMBER_PROTOTYPE_VALUE_OF, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, ECMA_NUMBER_PROTOTYPE_TO_LOCALE_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_FIXED_UL, ECMA_NUMBER_PROTOTYPE_TO_FIXED, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_TO_EXPONENTIAL_UL, ECMA_NUMBER_PROTOTYPE_TO_EXPONENTIAL, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_TO_PRECISION_UL, ECMA_NUMBER_PROTOTYPE_TO_PRECISION, 1, 1)
-
-#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Number built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_NUMBER)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.7.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.7.3.4 */
-NUMBER_VALUE (LIT_MAGIC_STRING_NAN,
- ECMA_BUILTIN_NUMBER_NAN,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.7.3.2 */
-NUMBER_VALUE (LIT_MAGIC_STRING_MAX_VALUE_U,
- ECMA_BUILTIN_NUMBER_MAX,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.7.3.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_MIN_VALUE_U,
- ECMA_BUILTIN_NUMBER_MIN,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.7.3.5 */
-NUMBER_VALUE (LIT_MAGIC_STRING_POSITIVE_INFINITY_U,
- ECMA_BUILTIN_NUMBER_POSITIVE_INFINITY,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.7.3.6 */
-NUMBER_VALUE (LIT_MAGIC_STRING_NEGATIVE_INFINITY_U,
- ECMA_BUILTIN_NUMBER_NEGATIVE_INFINITY,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.7.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_NUMBER_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-#if ENABLED (JERRY_ES2015_BUILTIN)
-ROUTINE (LIT_MAGIC_STRING_IS_FINITE, ecma_builtin_number_object_is_finite, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_IS_NAN, ecma_builtin_number_object_is_nan, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_IS_INTEGER, ecma_builtin_number_object_is_integer, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_IS_SAFE_INTEGER, ecma_builtin_number_object_is_safe_integer, 1, 1)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Object.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.2.4.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_OBJECT,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_OBJECT_PROTOTYPE_TO_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ECMA_OBJECT_PROTOTYPE_VALUE_OF, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, ECMA_OBJECT_PROTOTYPE_TO_LOCALE_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_HAS_OWN_PROPERTY_UL, ECMA_OBJECT_PROTOTYPE_HAS_OWN_PROPERTY, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_IS_PROTOTYPE_OF_UL, ECMA_OBJECT_PROTOTYPE_IS_PROTOTYPE_OF, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_PROPERTY_IS_ENUMERABLE_UL, ECMA_OBJECT_PROTOTYPE_PROPERTY_IS_ENUMERABLE, 1, 1)
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Object built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.2.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.2.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_GET_PROTOTYPE_OF_UL, ECMA_OBJECT_ROUTINE_GET_PROTOTYPE_OF, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_GET_OWN_PROPERTY_NAMES_UL, ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_NAMES, 1, 1)
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-ROUTINE (LIT_MAGIC_STRING_GET_OWN_PROPERTY_SYMBOLS_UL, ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_SYMBOLS, 1, 1)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-ROUTINE (LIT_MAGIC_STRING_SEAL, ECMA_OBJECT_ROUTINE_SEAL, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_FREEZE, ECMA_OBJECT_ROUTINE_FREEZE, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_PREVENT_EXTENSIONS_UL, ECMA_OBJECT_ROUTINE_PREVENT_EXTENSIONS, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_IS_SEALED_UL, ECMA_OBJECT_ROUTINE_IS_SEALED, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_IS_FROZEN_UL, ECMA_OBJECT_ROUTINE_IS_FROZEN, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_IS_EXTENSIBLE, ECMA_OBJECT_ROUTINE_IS_EXTENSIBLE, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_KEYS, ECMA_OBJECT_ROUTINE_KEYS, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_GET_OWN_PROPERTY_DESCRIPTOR_UL, ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_DESCRIPTOR, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_CREATE, ECMA_OBJECT_ROUTINE_CREATE, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_DEFINE_PROPERTIES_UL, ECMA_OBJECT_ROUTINE_DEFINE_PROPERTIES, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_DEFINE_PROPERTY_UL, ECMA_OBJECT_ROUTINE_DEFINE_PROPERTY, 3, 3)
-
-#if ENABLED (JERRY_ES2015_BUILTIN)
-ROUTINE (LIT_MAGIC_STRING_SET_PROTOTYPE_OF_UL, ECMA_OBJECT_ROUTINE_SET_PROTOTYPE_OF, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_ASSIGN, ECMA_OBJECT_ROUTINE_ASSIGN, NON_FIXED, 2)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_PROMISE,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FLAG_WRITABLE)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-/* ECMA-262 v6, 25.4.5.4 */
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_PROMISE_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-ROUTINE (LIT_MAGIC_STRING_THEN, ecma_builtin_promise_prototype_then, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_CATCH, ecma_builtin_promise_prototype_catch, 1, 1)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Promose built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_PROMISE_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_REJECT, ecma_builtin_promise_reject, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_RESOLVE, ecma_builtin_promise_resolve, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_RACE, ecma_builtin_promise_race, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_ALL, ecma_builtin_promise_all, 1, 1)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * RangeError.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.7.8 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_RANGE_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.9 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- LIT_MAGIC_STRING_RANGE_ERROR_UL,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.10 */
-STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
- LIT_MAGIC_STRING__EMPTY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * RangeError built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.11.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * ReferenceError.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.7.8 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_REFERENCE_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.9 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- LIT_MAGIC_STRING_REFERENCE_ERROR_UL,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.10 */
-STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
- LIT_MAGIC_STRING__EMPTY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * ReferenceError built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.11.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * RegExp.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_REGEXP)
-
-/* ECMA-262 v5, 15.10.6.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_REGEXP,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#if ENABLED (JERRY_ES2015)
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_FLAGS,
- ecma_builtin_regexp_prototype_get_flags,
- ECMA_PROPERTY_FIXED)
-
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_SOURCE,
- ecma_builtin_regexp_prototype_get_source,
- ECMA_PROPERTY_FIXED)
-
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_GLOBAL,
- ecma_builtin_regexp_prototype_get_global,
- ECMA_PROPERTY_FIXED)
-
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_IGNORECASE_UL,
- ecma_builtin_regexp_prototype_get_ignorecase,
- ECMA_PROPERTY_FIXED)
-
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_MULTILINE,
- ecma_builtin_regexp_prototype_get_multiline,
- ECMA_PROPERTY_FIXED)
-#else /* !ENABLED (JERRY_ES2015) */
-/* ECMA-262 v5, 15.10.7.1 */
-STRING_VALUE (LIT_MAGIC_STRING_SOURCE,
- LIT_MAGIC_STRING_EMPTY_NON_CAPTURE_GROUP,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.10.7.2 */
-SIMPLE_VALUE (LIT_MAGIC_STRING_GLOBAL,
- ECMA_VALUE_FALSE,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.10.7.3 */
-SIMPLE_VALUE (LIT_MAGIC_STRING_IGNORECASE_UL,
- ECMA_VALUE_FALSE,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.10.7.4 */
-SIMPLE_VALUE (LIT_MAGIC_STRING_MULTILINE,
- ECMA_VALUE_FALSE,
- ECMA_PROPERTY_FIXED)
-#endif /* ENABLED (JERRY_ES2015) */
-
-/* ECMA-262 v5, 15.10.7.5 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LASTINDEX_UL,
- 0,
- ECMA_PROPERTY_FLAG_WRITABLE)
-
-#if ENABLED (JERRY_BUILTIN_ANNEXB)
-ROUTINE (LIT_MAGIC_STRING_COMPILE, ecma_builtin_regexp_prototype_compile, 2, 1)
-#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
-ROUTINE (LIT_MAGIC_STRING_EXEC, ecma_builtin_regexp_prototype_exec, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_TEST, ecma_builtin_regexp_prototype_test, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_regexp_prototype_to_string, 0, 0)
-
-#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * RegExp built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_REGEXP)
-
-/* ECMA-262 v5, 15.10.5 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 2,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v5, 15.10.5.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_REGEXP_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * %SetIteratorPrototype% built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SET)
-
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_SET_ITERATOR_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_set_iterator_prototype_object_next, 0, 0)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SET) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Set.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SET)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v6, 23.2.3.2 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_SET,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-/* ECMA-262 v6, 23.1.3.13 */
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_SET_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_ADD, ecma_builtin_set_prototype_object_add, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_CLEAR, ecma_builtin_set_prototype_object_clear, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_DELETE, ecma_builtin_set_prototype_object_delete, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_FOR_EACH_UL, ecma_builtin_set_prototype_object_foreach, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_HAS, ecma_builtin_set_prototype_object_has, 1, 1)
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
-ROUTINE (LIT_MAGIC_STRING_ENTRIES, ecma_builtin_set_prototype_object_entries, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_VALUES, ecma_builtin_set_prototype_object_values, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_KEYS, ecma_builtin_set_prototype_object_keys, 0, 0)
-ROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ecma_builtin_set_prototype_object_values, 0, 0)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
-
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_SIZE,
- ecma_builtin_set_prototype_object_size_getter,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SET) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Set built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SET)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v6, 23.2.2 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 0,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v6, 23.1 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- LIT_MAGIC_STRING_SET_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v6, 23.2.2.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_SET_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SET) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * %StringIteratorPrototype% built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
-
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_STRING_ITERATOR_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_string_iterator_prototype_object_next, 0, 0)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * String.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_STRING)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.5.4.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_STRING,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* Number properties:
- * (property name, number value) */
-
-/* ECMA-262 v5, 15.5.4 (String.prototype is itself a String object whose value is an empty String), 15.5.5.1 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 0,
- ECMA_PROPERTY_FIXED)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ECMA_STRING_PROTOTYPE_TO_STRING, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ECMA_STRING_PROTOTYPE_VALUE_OF, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_CONCAT, ECMA_STRING_PROTOTYPE_CONCAT, NON_FIXED, 1)
-ROUTINE (LIT_MAGIC_STRING_SLICE, ECMA_STRING_PROTOTYPE_SLICE, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_INDEX_OF_UL, ECMA_STRING_PROTOTYPE_INDEX_OF, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_LAST_INDEX_OF_UL, ECMA_STRING_PROTOTYPE_LAST_INDEX_OF, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_CHAR_AT_UL, ECMA_STRING_PROTOTYPE_CHAR_AT, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_CHAR_CODE_AT_UL, ECMA_STRING_PROTOTYPE_CHAR_CODE_AT, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_LOCALE_COMPARE_UL, ECMA_STRING_PROTOTYPE_LOCALE_COMPARE, 1, 1)
-
-#if ENABLED (JERRY_BUILTIN_REGEXP)
-ROUTINE (LIT_MAGIC_STRING_MATCH, ECMA_STRING_PROTOTYPE_MATCH, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_REPLACE, ECMA_STRING_PROTOTYPE_REPLACE, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_SEARCH, ECMA_STRING_PROTOTYPE_SEARCH, 1, 1)
-#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
-
-ROUTINE (LIT_MAGIC_STRING_SPLIT, ECMA_STRING_PROTOTYPE_SPLIT, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_SUBSTRING, ECMA_STRING_PROTOTYPE_SUBSTRING, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_TO_LOWER_CASE_UL, ECMA_STRING_PROTOTYPE_TO_LOWER_CASE, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_LOWER_CASE_UL, ECMA_STRING_PROTOTYPE_TO_LOCAL_LOWER_CASE, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_UPPER_CASE_UL, ECMA_STRING_PROTOTYPE_TO_UPPER_CASE, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_UPPER_CASE_UL, ECMA_STRING_PROTOTYPE_TO_LOCAL_UPPER_CASE, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_TRIM, ECMA_STRING_PROTOTYPE_TRIM, 0, 0)
-
-#if ENABLED (JERRY_BUILTIN_ANNEXB)
-ROUTINE (LIT_MAGIC_STRING_SUBSTR, ECMA_STRING_PROTOTYPE_SUBSTR, 2, 2)
-#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN)
-ROUTINE (LIT_MAGIC_STRING_REPEAT, ECMA_STRING_PROTOTYPE_REPEAT, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_STARTS_WITH, ECMA_STRING_PROTOTYPE_STARTS_WITH, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_INCLUDES, ECMA_STRING_PROTOTYPE_INCLUDES, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_ENDS_WITH, ECMA_STRING_PROTOTYPE_ENDS_WITH, 2, 1)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
-ROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ECMA_STRING_PROTOTYPE_ITERATOR, 0, 0)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
-
-#endif /* ENABLED (JERRY_BUILTIN_STRING) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * String built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_STRING)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.5.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.7.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_STRING_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_FROM_CHAR_CODE_UL, ecma_builtin_string_object_from_char_code, NON_FIXED, 1)
-
-#endif /* ENABLED (JERRY_BUILTIN_STRING) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Symbol prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_SYMBOL,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 0,
- ECMA_PROPERTY_FLAG_WRITABLE)
-
-ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_symbol_prototype_object_to_string, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ecma_builtin_symbol_prototype_object_value_of, 0, 0)
-ROUTINE_CONFIGURABLE_ONLY (LIT_GLOBAL_SYMBOL_TO_PRIMITIVE,
- ecma_builtin_symbol_prototype_object_to_primitive,
- 0,
- 0)
-
-/* ECMA-262 v6, 19.4.3.4 */
-STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- LIT_MAGIC_STRING_SYMBOL_UL,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Symbol built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v6, 19.4.2 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 0,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v6, 19.4.2.7 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-/* ECMA-262 v6, 19.4.2.2 */
-SYMBOL_VALUE (LIT_MAGIC_STRING_HAS_INSTANCE,
- LIT_GLOBAL_SYMBOL_HAS_INSTANCE)
-
-/* ECMA-262 v6, 19.4.2.3 */
-SYMBOL_VALUE (LIT_MAGIC_STRING_IS_CONCAT_SPREADABLE,
- LIT_GLOBAL_SYMBOL_IS_CONCAT_SPREADABLE)
-
-/* ECMA-262 v6, 19.4.2.4 */
-SYMBOL_VALUE (LIT_MAGIC_STRING_ITERATOR,
- LIT_GLOBAL_SYMBOL_ITERATOR)
-
-/* ECMA-262 v6, 19.4.2.6 */
-SYMBOL_VALUE (LIT_MAGIC_STRING_MATCH,
- LIT_GLOBAL_SYMBOL_MATCH)
-
-/* ECMA-262 v6, 19.4.2.8 */
-SYMBOL_VALUE (LIT_MAGIC_STRING_REPLACE,
- LIT_GLOBAL_SYMBOL_REPLACE)
-
-/* ECMA-262 v6, 19.4.2.9 */
-SYMBOL_VALUE (LIT_MAGIC_STRING_SEARCH,
- LIT_GLOBAL_SYMBOL_SEARCH)
-
-/* ECMA-262 v6, 19.4.2.10 */
-SYMBOL_VALUE (LIT_MAGIC_STRING_SPECIES,
- LIT_GLOBAL_SYMBOL_SPECIES)
-
-/* ECMA-262 v6, 19.4.2.11 */
-SYMBOL_VALUE (LIT_MAGIC_STRING_SPLIT,
- LIT_GLOBAL_SYMBOL_SPLIT)
-
-/* ECMA-262 v6, 19.4.2.12 */
-SYMBOL_VALUE (LIT_MAGIC_STRING_TO_PRIMITIVE,
- LIT_GLOBAL_SYMBOL_TO_PRIMITIVE)
-
-/* ECMA-262 v6, 19.4.2.13 */
-SYMBOL_VALUE (LIT_MAGIC_STRING_TO_STRING_TAG,
- LIT_GLOBAL_SYMBOL_TO_STRING_TAG)
-
-/* ECMA-262 v6, 19.4.2.14 */
-SYMBOL_VALUE (LIT_MAGIC_STRING_UNSCOPABLES,
- LIT_GLOBAL_SYMBOL_UNSCOPABLES)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_FOR, ecma_builtin_symbol_for, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_KEY_FOR, ecma_builtin_symbol_key_for, 1, 1)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * SyntaxError.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.7.8 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_SYNTAX_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.9 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- LIT_MAGIC_STRING_SYNTAX_ERROR_UL,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.10 */
-STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
- LIT_MAGIC_STRING__EMPTY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * SyntaxError built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.11.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * [[ThrowTypeError]] description
- *
- * See also: ECMA-262 v5, 13.2.3
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 0,
- ECMA_PROPERTY_FIXED)
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_TYPEDARRAY_HELPERS_H
-#define ECMA_TYPEDARRAY_HELPERS_H
-#include "ecma-globals.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmabuiltinhelpers ECMA builtin helper operations
- * @{
- */
-
-ecma_value_t
-ecma_typedarray_helper_dispatch_construct (const ecma_value_t *arguments_list_p,
- ecma_length_t arguments_list_len,
- ecma_typedarray_type_t typedarray_id);
-
-/**
- * @}
- * @}
- */
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
-#endif /* !ECMA_TYPEDARRAY_HELPERS_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#ifndef TYPEDARRAY_BYTES_PER_ELEMENT
-# error "Please define TYPEDARRAY_BYTES_PER_ELEMENT"
-#endif /* !TYPEDARRAY_BYTES_PER_ELEMENT */
-
-#ifndef TYPEDARRAY_BUILTIN_ID
-# error "Please define TYPEDARRAY_BUILTIN_ID"
-#endif /* !TYPEDARRAY_BUILTIN_ID */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-/* ES2015 22.2.3.4 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- TYPEDARRAY_BUILTIN_ID,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ES2015 22.2.6.1 */
-NUMBER_VALUE (LIT_MAGIC_STRING_BYTES_PER_ELEMENT_U,
- TYPEDARRAY_BYTES_PER_ELEMENT,
- ECMA_PROPERTY_FIXED)
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
-
-#undef TYPEDARRAY_BUILTIN_ID
-#undef TYPEDARRAY_BYTES_PER_ELEMENT
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * %TypedArrayPrototype% description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-/* ES2015 22.2.3.4 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_TYPEDARRAY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* Readonly accessor properties */
-/* ES2015 22.2.3.1 */
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BUFFER,
- ecma_builtin_typedarray_prototype_buffer_getter,
- ECMA_PROPERTY_FIXED)
-/* ES2015 22.2.3.2 */
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_LENGTH_UL,
- ecma_builtin_typedarray_prototype_bytelength_getter,
- ECMA_PROPERTY_FIXED)
-/* ES2015 22.2.3.3 */
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_OFFSET_UL,
- ecma_builtin_typedarray_prototype_byteoffset_getter,
- ECMA_PROPERTY_FIXED)
-
-/* ES2015 22.2.3.17 */
-ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_LENGTH,
- ecma_builtin_typedarray_prototype_length_getter,
- ECMA_PROPERTY_FIXED)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-/* ECMA-262 v6, 23.1.3.13 */
-ACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
- ecma_builtin_typedarray_prototype_to_string_tag_getter,
- ECMA_PROPERTY_FLAG_CONFIGURABLE)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_typedarray_prototype_object_to_string, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_JOIN, ecma_builtin_typedarray_prototype_join, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_EVERY, ecma_builtin_typedarray_prototype_every, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_SOME, ecma_builtin_typedarray_prototype_some, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_FOR_EACH_UL, ecma_builtin_typedarray_prototype_for_each, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_MAP, ecma_builtin_typedarray_prototype_map, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_REDUCE, ecma_builtin_typedarray_prototype_reduce, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_REDUCE_RIGHT_UL, ecma_builtin_typedarray_prototype_reduce_right, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_FILTER, ecma_builtin_typedarray_prototype_filter, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_REVERSE, ecma_builtin_typedarray_prototype_reverse, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_SET, ecma_builtin_typedarray_prototype_set, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_SUBARRAY, ecma_builtin_typedarray_prototype_subarray, 2, 2)
-ROUTINE (LIT_MAGIC_STRING_FILL, ecma_builtin_typedarray_prototype_fill, 3, 1)
-ROUTINE (LIT_MAGIC_STRING_SORT, ecma_builtin_typedarray_prototype_sort, 1, 1)
-ROUTINE (LIT_MAGIC_STRING_FIND, ecma_builtin_typedarray_prototype_find, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_FIND_INDEX, ecma_builtin_typedarray_prototype_find_index, 2, 1)
-ROUTINE (LIT_MAGIC_STRING_INDEX_OF_UL, ecma_builtin_typedarray_prototype_index_of, NON_FIXED, 1)
-ROUTINE (LIT_MAGIC_STRING_LAST_INDEX_OF_UL, ecma_builtin_typedarray_prototype_last_index_of, NON_FIXED, 1)
-ROUTINE (LIT_MAGIC_STRING_COPY_WITHIN, ecma_builtin_typedarray_prototype_copy_within, NON_FIXED, 2)
-ROUTINE (LIT_MAGIC_STRING_SLICE, ecma_builtin_typedarray_prototype_slice, NON_FIXED, 2)
-ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_STRING_UL, ecma_builtin_typedarray_prototype_to_locale_string, 0, 0)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
-
-ROUTINE (LIT_MAGIC_STRING_KEYS, ecma_builtin_typedarray_prototype_keys, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_VALUES, ecma_builtin_typedarray_prototype_values, 0, 0)
-ROUTINE (LIT_MAGIC_STRING_ENTRIES, ecma_builtin_typedarray_prototype_entries, 0, 0)
-ROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ecma_builtin_typedarray_prototype_values, 0, 0)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#ifndef TYPEDARRAY_BYTES_PER_ELEMENT
-# error "Please define TYPEDARRAY_BYTES_PER_ELEMENT"
-#endif /* !TYPEDARRAY_BYTES_PER_ELEMENT */
-
-#ifndef TYPEDARRAY_MAGIC_STRING_ID
-# error "Please define TYPEDARRAY_MAGIC_STRING_ID"
-#endif /* !TYPEDARRAY_MAGIC_STRING_ID */
-
-#ifndef TYPEDARRAY_BUILTIN_ID
-# error "Please define TYPEDARRAY_BUILTIN_ID"
-#endif /* !TYPEDARRAY_BUILTIN_ID */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-/* ES2015 22.2.5 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 3,
- ECMA_PROPERTY_FIXED)
-
-/* ES2015 22.2.5.1 */
-NUMBER_VALUE (LIT_MAGIC_STRING_BYTES_PER_ELEMENT_U,
- TYPEDARRAY_BYTES_PER_ELEMENT,
- ECMA_PROPERTY_FIXED)
-
-/* ES2015 22.2.5 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 3,
- ECMA_PROPERTY_FIXED)
-
-/* ES2015 22.2.5 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- TYPEDARRAY_MAGIC_STRING_ID,
- ECMA_PROPERTY_FIXED)
-
-/* ES2015 22.2.5.2 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- TYPEDARRAY_BUILTIN_ID,
- ECMA_PROPERTY_FIXED)
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
-
-#undef TYPEDARRAY_BUILTIN_ID
-#undef TYPEDARRAY_MAGIC_STRING_ID
-#undef TYPEDARRAY_BYTES_PER_ELEMENT
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * %TypedArray% description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-/* ES2015 22.2.2 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 3,
- ECMA_PROPERTY_FIXED)
-
-/* ES2015 22.2.2 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- LIT_MAGIC_STRING_TYPED_ARRAY_UL,
- ECMA_PROPERTY_FIXED)
-
-/* ES2015 22.2.2.3 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-/* Routine properties:
- * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
-
-/* ES2015 22.2.2.1 */
-ROUTINE (LIT_MAGIC_STRING_FROM, ecma_builtin_typedarray_from, NON_FIXED, 1)
-
-/* ES2015 22.2.2.2 */
-ROUTINE (LIT_MAGIC_STRING_OF, ecma_builtin_typedarray_of, NON_FIXED, 0)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * TypeError.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.7.8 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_TYPE_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.9 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- LIT_MAGIC_STRING_TYPE_ERROR_UL,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.10 */
-STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
- LIT_MAGIC_STRING__EMPTY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * TypeError built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.11.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Uint16Array prototype description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 2
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT16ARRAY
-#include "ecma-builtin-typedarray-prototype-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Uint16Array description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 2
-#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_UINT16_ARRAY_UL
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT16ARRAY_PROTOTYPE
-#include "ecma-builtin-typedarray-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Uint32Array prototype description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 4
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT32ARRAY
-#include "ecma-builtin-typedarray-prototype-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Uint32Array description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 4
-#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_UINT32_ARRAY_UL
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE
-#include "ecma-builtin-typedarray-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Uint8Array prototype description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 1
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT8ARRAY
-#include "ecma-builtin-typedarray-prototype-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Uint8Array description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 1
-#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_UINT8_ARRAY_UL
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT8ARRAY_PROTOTYPE
-#include "ecma-builtin-typedarray-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Uint8ClampedArray prototype description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 1
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY
-#include "ecma-builtin-typedarray-prototype-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Uint8ClampedArray description
- */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-#define TYPEDARRAY_BYTES_PER_ELEMENT 1
-#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL
-#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE
-#include "ecma-builtin-typedarray-template.inc.h"
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * UriError.prototype built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.7.8 */
-OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
- ECMA_BUILTIN_ID_URI_ERROR,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.9 */
-STRING_VALUE (LIT_MAGIC_STRING_NAME,
- LIT_MAGIC_STRING_URI_ERROR_UL,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-/* ECMA-262 v5, 15.11.7.10 */
-STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
- LIT_MAGIC_STRING__EMPTY,
- ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * UriError built-in description
- */
-
-#include "ecma-builtin-helpers-macro-defines.inc.h"
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-
-/* Number properties:
- * (property name, number value, writable, enumerable, configurable) */
-
-/* ECMA-262 v5, 15.11.3 */
-NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
- 1,
- ECMA_PROPERTY_FIXED)
-
-/* Object properties:
- * (property name, object pointer getter) */
-
-/* ECMA-262 v5, 15.11.3.1 */
-OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
- ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE,
- ECMA_PROPERTY_FIXED)
-
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-#include "ecma-builtin-helpers-macro-undefs.inc.h"
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_BUILTINS_INTERNAL_H
-#define ECMA_BUILTINS_INTERNAL_H
-
-#ifndef ECMA_BUILTINS_INTERNAL
-# error "!ECMA_BUILTINS_INTERNAL"
-#endif /* !ECMA_BUILTINS_INTERNAL */
-
-#include "ecma-builtins.h"
-#include "ecma-globals.h"
-
-/**
- * Type of built-in properties.
- */
-typedef enum
-{
- ECMA_BUILTIN_PROPERTY_SIMPLE, /**< simple value property */
- ECMA_BUILTIN_PROPERTY_NUMBER, /**< number value property */
- ECMA_BUILTIN_PROPERTY_STRING, /**< string value property */
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
- ECMA_BUILTIN_PROPERTY_SYMBOL, /**< symbol value property */
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
- ECMA_BUILTIN_PROPERTY_OBJECT, /**< builtin object property */
- ECMA_BUILTIN_PROPERTY_ROUTINE, /**< routine property */
- ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_WRITE, /**< full accessor property */
- ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_ONLY, /**< read-only accessor property */
- ECMA_BUILTIN_PROPERTY_END, /**< last property */
-} ecma_builtin_property_type_t;
-
-/**
- * Type of symbolic built-in number types (starting from 256).
- */
-typedef enum
-{
- ECMA_BUILTIN_NUMBER_MAX = 256, /**< value of ECMA_NUMBER_MAX_VALUE */
- ECMA_BUILTIN_NUMBER_MIN, /**< value of ECMA_NUMBER_MIN_VALUE */
-#if ENABLED (JERRY_ES2015_BUILTIN)
- ECMA_BUILTIN_NUMBER_EPSILON, /**< value of ECMA_NUMBER_EPSILON */
- ECMA_BUILTIN_NUMBER_MAX_SAFE_INTEGER, /**< value of ECMA_NUMBER_MAX_SAFE_INTEGER */
-#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
- ECMA_BUILTIN_NUMBER_E, /**< value of ECMA_NUMBER_E */
- ECMA_BUILTIN_NUMBER_PI, /**< value of ECMA_NUMBER_PI */
- ECMA_BUILTIN_NUMBER_LN10, /**< value of ECMA_NUMBER_LN10 */
- ECMA_BUILTIN_NUMBER_LN2, /**< value of ECMA_NUMBER_LN2 */
- ECMA_BUILTIN_NUMBER_LOG2E, /**< value of ECMA_NUMBER_LOG2E */
- ECMA_BUILTIN_NUMBER_LOG10E, /**< value of ECMA_NUMBER_LOG10E */
- ECMA_BUILTIN_NUMBER_SQRT2, /**< value of ECMA_NUMBER_SQRT2 */
- ECMA_BUILTIN_NUMBER_SQRT_1_2, /**< value of ECMA_NUMBER_SQRT_1_2 */
- ECMA_BUILTIN_NUMBER_NAN, /**< result of ecma_number_make_nan () */
- ECMA_BUILTIN_NUMBER_POSITIVE_INFINITY, /**< result of ecma_number_make_infinity (false) */
- ECMA_BUILTIN_NUMBER_NEGATIVE_INFINITY, /**< result of ecma_number_make_infinity (true) */
-} ecma_builtin_number_type_t;
-
-/**
- * Description of built-in properties.
- */
-typedef struct
-{
- uint16_t magic_string_id; /**< name of the property */
- uint8_t type; /**< type of the property */
- uint8_t attributes; /**< attributes of the property */
- uint16_t value; /**< value of the property */
-} ecma_builtin_property_descriptor_t;
-
-#define BUILTIN_ROUTINE(builtin_id, \
- object_type, \
- object_prototype_builtin_id, \
- is_extensible, \
- lowercase_name) \
-extern const ecma_builtin_property_descriptor_t \
-ecma_builtin_ ## lowercase_name ## _property_descriptor_list[]; \
-ecma_value_t \
-ecma_builtin_ ## lowercase_name ## _dispatch_call (const ecma_value_t *, \
- ecma_length_t); \
-ecma_value_t \
-ecma_builtin_ ## lowercase_name ## _dispatch_construct (const ecma_value_t *, \
- ecma_length_t); \
-ecma_value_t \
-ecma_builtin_ ## lowercase_name ## _dispatch_routine (uint16_t builtin_routine_id, \
- ecma_value_t this_arg_value, \
- const ecma_value_t [], \
- ecma_length_t);
-#define BUILTIN(builtin_id, \
- object_type, \
- object_prototype_builtin_id, \
- is_extensible, \
- lowercase_name) \
-extern const ecma_builtin_property_descriptor_t \
-ecma_builtin_ ## lowercase_name ## _property_descriptor_list[]; \
-ecma_value_t \
-ecma_builtin_ ## lowercase_name ## _dispatch_routine (uint16_t builtin_routine_id, \
- ecma_value_t this_arg_value, \
- const ecma_value_t [], \
- ecma_length_t);
-#include "ecma-builtins.inc.h"
-
-#undef BUILTIN_ROUTINE
-#undef BUILTIN
-
-#endif /* !ECMA_BUILTINS_INTERNAL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_BUILTINS_H
-#define ECMA_BUILTINS_H
-
-#include "ecma-globals.h"
-
-/**
- * A built-in object's identifier
- */
-typedef enum
-{
-/** @cond doxygen_suppress */
-#define BUILTIN(a, b, c, d, e)
-#define BUILTIN_ROUTINE(builtin_id, \
- object_type, \
- object_prototype_builtin_id, \
- is_extensible, \
- lowercase_name) \
- builtin_id,
-#include "ecma-builtins.inc.h"
-#undef BUILTIN
-#undef BUILTIN_ROUTINE
-#define BUILTIN_ROUTINE(a, b, c, d, e)
-#define BUILTIN(builtin_id, \
- object_type, \
- object_prototype_builtin_id, \
- is_extensible, \
- lowercase_name) \
- builtin_id,
-#include "ecma-builtins.inc.h"
-#undef BUILTIN
-#undef BUILTIN_ROUTINE
-/** @endcond */
- ECMA_BUILTIN_ID__COUNT /**< number of built-in objects */
-} ecma_builtin_id_t;
-
-/**
- * Construct a routine value
- */
-#define ECMA_ROUTINE_VALUE(id, length) (((id) << 4) | length)
-
-/**
- * Get routine length
- */
-#define ECMA_GET_ROUTINE_LENGTH(value) ((uint8_t) ((value) & 0xf))
-
-/**
- * Get routine ID
- */
-#define ECMA_GET_ROUTINE_ID(value) ((uint16_t) ((value) >> 4))
-
-/**
- * Construct a fully accessor value
- */
-#define ECMA_ACCESSOR_READ_WRITE(getter, setter) (((getter) << 8) | (setter))
-
-/**
- * Get accessor setter ID
- */
-#define ECMA_ACCESSOR_READ_WRITE_GET_SETTER_ID(value) ((uint16_t) ((value) & 0xff))
-
-/**
- * Get accessor getter ID
- */
-#define ECMA_ACCESSOR_READ_WRITE_GET_GETTER_ID(value) ((uint16_t) ((value) >> 8))
-
-/* ecma-builtins.c */
-void ecma_finalize_builtins (void);
-
-ecma_value_t
-ecma_builtin_dispatch_call (ecma_object_t *obj_p, ecma_value_t this_arg_value,
- const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len);
-ecma_value_t
-ecma_builtin_dispatch_construct (ecma_object_t *obj_p,
- const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len);
-ecma_property_t *
-ecma_builtin_try_to_instantiate_property (ecma_object_t *object_p, ecma_string_t *string_p);
-void
-ecma_builtin_list_lazy_property_names (ecma_object_t *object_p,
- bool separate_enumerable,
- ecma_collection_t *main_collection_p,
- ecma_collection_t *non_enum_collection_p);
-bool
-ecma_builtin_is (ecma_object_t *obj_p, ecma_builtin_id_t builtin_id);
-ecma_object_t *
-ecma_builtin_get (ecma_builtin_id_t builtin_id);
-ecma_object_t *
-ecma_builtin_get_global (void);
-bool
-ecma_builtin_function_is_routine (ecma_object_t *func_obj_p);
-
-#endif /* !ECMA_BUILTINS_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* Description of built-in objects
- in format (ECMA_BUILTIN_ID_id, object_type, prototype_id, is_extensible, is_static, underscored_id) */
-
-/* The Object.prototype object (15.2.4) */
-BUILTIN (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID__COUNT /* no prototype */,
- true,
- object_prototype)
-
-/* The Object object (15.2.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_OBJECT,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- object)
-
-#if ENABLED (JERRY_BUILTIN_ARRAY)
-/* The Array.prototype object (15.4.4) */
-BUILTIN (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE,
- ECMA_OBJECT_TYPE_ARRAY,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- array_prototype)
-
-/* The Array object (15.4.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ARRAY,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- array)
-#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
-
-#if ENABLED (JERRY_BUILTIN_STRING)
-/* The String.prototype object (15.5.4) */
-BUILTIN (ECMA_BUILTIN_ID_STRING_PROTOTYPE,
- ECMA_OBJECT_TYPE_CLASS,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- string_prototype)
-
-/* The String object (15.5.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_STRING,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- string)
-#endif /* ENABLED (JERRY_BUILTIN_STRING) */
-
-#if ENABLED (JERRY_BUILTIN_BOOLEAN)
-/* The Boolean.prototype object (15.6.4) */
-BUILTIN (ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE,
- ECMA_OBJECT_TYPE_CLASS,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- boolean_prototype)
-
-/* The Boolean object (15.6.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_BOOLEAN,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- boolean)
-#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
-
-#if ENABLED (JERRY_BUILTIN_NUMBER)
-/* The Number.prototype object (15.7.4) */
-BUILTIN (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE,
- ECMA_OBJECT_TYPE_CLASS,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- number_prototype)
-
-/* The Number object (15.7.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_NUMBER,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- number)
-#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
-
-/* The Function.prototype object (15.3.4) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- function_prototype)
-
-/* The Function object (15.3.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- function)
-
-#if ENABLED (JERRY_BUILTIN_MATH)
-/* The Math object (15.8) */
-BUILTIN (ECMA_BUILTIN_ID_MATH,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- math)
-#endif /* ENABLED (JERRY_BUILTIN_MATH) */
-
-#if ENABLED (JERRY_BUILTIN_JSON)
-/* The JSON object (15.12) */
-BUILTIN (ECMA_BUILTIN_ID_JSON,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- json)
-#endif /* ENABLED (JERRY_BUILTIN_JSON) */
-
-#if ENABLED (JERRY_BUILTIN_DATE)
-/* The Date.prototype object (15.9.4) */
-BUILTIN (ECMA_BUILTIN_ID_DATE_PROTOTYPE,
- ECMA_OBJECT_TYPE_CLASS,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- date_prototype)
-
-/* The Date object (15.9.3) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_DATE,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- date)
-#endif /* ENABLED (JERRY_BUILTIN_DATE) */
-
-#if ENABLED (JERRY_BUILTIN_REGEXP)
-/* The RegExp.prototype object (15.10.6) */
-BUILTIN (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE,
- ECMA_OBJECT_TYPE_CLASS,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- regexp_prototype)
-
-/* The RegExp object (15.10) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_REGEXP,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- regexp)
-#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
-
-/* The Error object (15.11.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ERROR,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- error)
-
-/* The Error.prototype object (15.11.4) */
-BUILTIN (ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- error_prototype)
-
-#if ENABLED (JERRY_BUILTIN_ERRORS)
-/* The EvalError.prototype object (15.11.6.1) */
-BUILTIN (ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
- true,
- eval_error_prototype)
-
-/* The EvalError object (15.11.6.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_EVAL_ERROR,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- eval_error)
-
-/* The RangeError.prototype object (15.11.6.2) */
-BUILTIN (ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
- true,
- range_error_prototype)
-
-/* The RangeError object (15.11.6.2) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_RANGE_ERROR,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- range_error)
-
-/* The ReferenceError.prototype object (15.11.6.3) */
-BUILTIN (ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
- true,
- reference_error_prototype)
-
-/* The ReferenceError object (15.11.6.3) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_REFERENCE_ERROR,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- reference_error)
-
-/* The SyntaxError.prototype object (15.11.6.4) */
-BUILTIN (ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
- true,
- syntax_error_prototype)
-
-/* The SyntaxError object (15.11.6.4) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_SYNTAX_ERROR,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- syntax_error)
-
-/* The TypeError.prototype object (15.11.6.5) */
-BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
- true,
- type_error_prototype)
-
-/* The TypeError object (15.11.6.5) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- type_error)
-
-/* The URIError.prototype object (15.11.6.6) */
-BUILTIN (ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
- true,
- uri_error_prototype)
-
-/* The URIError object (15.11.6.6) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_URI_ERROR,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- uri_error)
-#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
-
-/**< The [[ThrowTypeError]] object (13.2.3) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- false,
- type_error_thrower)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-/* The ArrayBuffer.prototype object (ES2015 24.1.4) */
-BUILTIN (ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- arraybuffer_prototype)
-
-/* The ArrayBuffer object (ES2015 24.1.2) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ARRAYBUFFER,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- arraybuffer)
-
- /* The %TypedArrayPrototype% object (ES2015 24.2.3) */
-BUILTIN (ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- typedarray_prototype)
-
-/* The %TypedArray% intrinsic object (ES2015 22.2.1)
- Note: The routines must be in this order. */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPEDARRAY,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- typedarray)
-
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT8ARRAY,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_TYPEDARRAY,
- true,
- int8array)
-
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT8ARRAY,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_TYPEDARRAY,
- true,
- uint8array)
-
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_TYPEDARRAY,
- true,
- uint8clampedarray)
-
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT16ARRAY,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_TYPEDARRAY,
- true,
- int16array)
-
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT16ARRAY,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_TYPEDARRAY,
- true,
- uint16array)
-
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT32ARRAY,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_TYPEDARRAY,
- true,
- int32array)
-
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT32ARRAY,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_TYPEDARRAY,
- true,
- uint32array)
-
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT32ARRAY,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_TYPEDARRAY,
- true,
- float32array)
-
-#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT64ARRAY,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_TYPEDARRAY,
- true,
- float64array)
-#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
-
-
-BUILTIN (ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
- true,
- int8array_prototype)
-
-BUILTIN (ECMA_BUILTIN_ID_UINT8ARRAY_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
- true,
- uint8array_prototype)
-
-BUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
- true,
- uint8clampedarray_prototype)
-
-BUILTIN (ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
- true,
- int16array_prototype)
-
-BUILTIN (ECMA_BUILTIN_ID_UINT16ARRAY_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
- true,
- uint16array_prototype)
-
-BUILTIN (ECMA_BUILTIN_ID_INT32ARRAY_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
- true,
- int32array_prototype)
-
-BUILTIN (ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
- true,
- uint32array_prototype)
-
-BUILTIN (ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
- true,
- float32array_prototype)
-
-#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
-BUILTIN (ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
- true,
- float64array_prototype)
-#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
-
-BUILTIN (ECMA_BUILTIN_ID_PROMISE_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- promise_prototype)
-
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_PROMISE,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- promise)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
-
-/* The Map prototype object (23.1.3) */
-BUILTIN (ECMA_BUILTIN_ID_MAP_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- map_prototype)
-
-/* The Map routine (ECMA-262 v6, 23.1.1.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_MAP,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- map)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SET)
-
-/* The Set prototype object (23.1.3) */
-BUILTIN (ECMA_BUILTIN_ID_SET_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- set_prototype)
-
-/* The Set routine (ECMA-262 v6, 23.1.1.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_SET,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- set)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SET) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-
-/* The Symbol prototype object (ECMA-262 v6, 19.4.2.7) */
-BUILTIN (ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- symbol_prototype)
-
-/* The Symbol routine (ECMA-262 v6, 19.4.2.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_SYMBOL,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- symbol)
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
-/* The %IteratorPrototype% object (ECMA-262 v6, 25.1.2) */
-BUILTIN (ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- iterator_prototype)
-
-/* The %ArrayIteratorPrototype% object (ECMA-262 v6, 22.1.5.2) */
-BUILTIN (ECMA_BUILTIN_ID_ARRAY_ITERATOR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,
- true,
- array_iterator_prototype)
-
-/* The %StringIteratorPrototype% object (ECMA-262 v6, 22.1.5.2) */
-BUILTIN (ECMA_BUILTIN_ID_STRING_ITERATOR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,
- true,
- string_iterator_prototype)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SET)
-/* The %SetIteratorPrototype% object (ECMA-262 v6, 23.2.5.2) */
-BUILTIN (ECMA_BUILTIN_ID_SET_ITERATOR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,
- true,
- set_iterator_prototype)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SET) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
-/* The %MapIteratorPrototype% object (ECMA-262 v6, 23.1.5.2) */
-BUILTIN (ECMA_BUILTIN_ID_MAP_ITERATOR_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,
- true,
- map_iterator_prototype)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SET) */
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW)
-/* The DataView prototype object (ECMA-262 v6, 24.2.3.1) */
-BUILTIN (ECMA_BUILTIN_ID_DATAVIEW_PROTOTYPE,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
- true,
- dataview_prototype)
-
-/* The DataView routine (ECMA-262 v6, 24.2.2.1) */
-BUILTIN_ROUTINE (ECMA_BUILTIN_ID_DATAVIEW,
- ECMA_OBJECT_TYPE_FUNCTION,
- ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
- true,
- dataview)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW */
-
-/* The Global object (15.1) */
-BUILTIN (ECMA_BUILTIN_ID_GLOBAL,
- ECMA_OBJECT_TYPE_GENERAL,
- ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, /* Implementation-dependent */
- true,
- global)
-
-#undef BUILTIN
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_COMPARISON_H
-#define ECMA_COMPARISON_H
-
-#include "ecma-globals.h"
-#include "ecma-helpers.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmacomparison ECMA comparison
- * @{
- */
-
-ecma_value_t ecma_op_abstract_equality_compare (ecma_value_t x, ecma_value_t y);
-bool ecma_op_strict_equality_compare (ecma_value_t x, ecma_value_t y);
-ecma_value_t ecma_op_abstract_relational_compare (ecma_value_t x, ecma_value_t y, bool left_first);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_COMPARISON_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_CONTAINER_OBJECT_H
-#define ECMA_CONTAINER_OBJECT_H
-
-#include "ecma-globals.h"
-#include "ecma-builtins.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP) || ENABLED (JERRY_ES2015_BUILTIN_SET)
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmamaphelpers ECMA builtin map/set helper functions
- * @{
- */
-
-ecma_value_t ecma_op_container_create (const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len,
- lit_magic_string_id_t lit_id, ecma_builtin_id_t proto_id);
-ecma_value_t ecma_op_container_size (ecma_value_t this_arg, lit_magic_string_id_t lit_id);
-ecma_value_t ecma_op_container_get (ecma_value_t this_arg, ecma_value_t key_arg);
-ecma_value_t ecma_op_container_foreach (ecma_value_t this_arg, ecma_value_t predicate, ecma_value_t predicate_this_arg,
- lit_magic_string_id_t lit_id);
-ecma_value_t ecma_op_container_has (ecma_value_t this_arg, ecma_value_t key_arg, lit_magic_string_id_t lit_id);
-ecma_value_t ecma_op_container_set (ecma_value_t this_arg, ecma_value_t key_arg, ecma_value_t value_arg,
- lit_magic_string_id_t lit_id);
-
-ecma_value_t ecma_op_container_clear (ecma_value_t this_arg, lit_magic_string_id_t lit_id);
-ecma_value_t ecma_op_container_delete (ecma_value_t this_arg, ecma_value_t key_arg, lit_magic_string_id_t lit_id);
-ecma_value_t ecma_op_container_create_iterator (ecma_value_t this_arg, uint8_t type, lit_magic_string_id_t lit_id,
- ecma_builtin_id_t proto_id, ecma_pseudo_array_type_t iterator_type);
-ecma_value_t ecma_op_container_iterator_next (ecma_value_t this_val, ecma_pseudo_array_type_t iterator_type);
-
-/**
- * @}
- * @}
- */
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) || ENABLED (JERRY_ES2015_BUILTIN_SET) */
-
-#endif /* !ECMA_CONTAINER_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_CONVERSION_H
-#define ECMA_CONVERSION_H
-
-#include "ecma-globals.h"
-#include "ecma-helpers.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmaconversion ECMA conversion routines
- * @{
- */
-
-/**
- * Second argument of 'ToPrimitive' operation that is a hint,
- * specifying the preferred type of conversion result.
- */
-typedef enum
-{
- ECMA_PREFERRED_TYPE_NO, /**< no preferred type is specified */
- ECMA_PREFERRED_TYPE_NUMBER, /**< Number */
- ECMA_PREFERRED_TYPE_STRING /**< String */
-} ecma_preferred_type_hint_t;
-
-ecma_value_t ecma_op_check_object_coercible (ecma_value_t value);
-bool ecma_op_same_value (ecma_value_t x, ecma_value_t y);
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
-bool ecma_op_same_value_zero (ecma_value_t x, ecma_value_t y);
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
-ecma_value_t ecma_op_to_primitive (ecma_value_t value, ecma_preferred_type_hint_t preferred_type);
-bool ecma_op_to_boolean (ecma_value_t value);
-ecma_value_t ecma_op_to_number (ecma_value_t value);
-ecma_value_t ecma_get_number (ecma_value_t value, ecma_number_t *number_p);
-ecma_value_t ecma_op_to_string (ecma_value_t value);
-ecma_string_t *ecma_op_to_prop_name (ecma_value_t value);
-ecma_value_t ecma_op_to_object (ecma_value_t value);
-ecma_value_t ecma_op_to_integer (ecma_value_t value, ecma_number_t *number_p);
-ecma_value_t ecma_op_to_length (ecma_value_t value, uint32_t *length);
-
-ecma_object_t *ecma_op_from_property_descriptor (const ecma_property_descriptor_t *src_prop_desc_p);
-ecma_value_t ecma_op_to_property_descriptor (ecma_value_t obj_value, ecma_property_descriptor_t *out_prop_desc_p);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_CONVERSION_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_DATAVIEW_OBJECT_H
-#define ECMA_DATAVIEW_OBJECT_H
-
-#include "ecma-globals.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW)
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmadataviewobject ECMA builtin DataView helper functions
- * @{
- */
-
-ecma_value_t ecma_op_dataview_create (const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len);
-ecma_dataview_object_t *ecma_op_dataview_get_object (ecma_value_t this_arg);
-ecma_value_t ecma_op_dataview_get_set_view_value (ecma_value_t view, ecma_value_t request_index,
- ecma_value_t little_endian, ecma_value_t value_to_set,
- ecma_typedarray_type_t id);
-
-/**
- * @}
- * @}
- */
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW */
-
-#endif /* !ECMA_DATAVIEW_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_EVAL_H
-#define ECMA_EVAL_H
-
-#include "ecma-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup eval eval
- * @{
- */
-
-ecma_value_t
-ecma_op_eval (ecma_string_t *code_p, uint32_t parse_opts);
-
-ecma_value_t
-ecma_op_eval_chars_buffer (const lit_utf8_byte_t *code_p, size_t code_buffer_size, uint32_t parse_opts);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_EVAL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_EXCEPTIONS_H
-#define ECMA_EXCEPTIONS_H
-
-#include "ecma-globals.h"
-#include "jrt.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup exceptions Exceptions
- * @{
- */
-
-#if ENABLED (JERRY_ERROR_MESSAGES)
-#define ECMA_ERR_MSG(msg) msg
-#else /* !ENABLED (JERRY_ERROR_MESSAGES) */
-#define ECMA_ERR_MSG(msg) NULL
-#endif /* ENABLED (JERRY_ERROR_MESSAGES) */
-
-/**
- * Native errors.
- *
- * See also: 15.11.1, 15.11.6
- */
-typedef enum
-{
- ECMA_ERROR_NONE, /**< Not an Error */
-
- ECMA_ERROR_COMMON, /**< Error */
- ECMA_ERROR_EVAL, /**< EvalError */
- ECMA_ERROR_RANGE, /**< RangeError */
- ECMA_ERROR_REFERENCE, /**< ReferenceError */
- ECMA_ERROR_SYNTAX, /**< SyntaxError */
- ECMA_ERROR_TYPE, /**< TypeError */
- ECMA_ERROR_URI /**< URIError */
-} ecma_standard_error_t;
-
-ecma_standard_error_t ecma_get_error_type (ecma_object_t *error_object);
-ecma_object_t *ecma_new_standard_error (ecma_standard_error_t error_type);
-ecma_object_t *ecma_new_standard_error_with_message (ecma_standard_error_t error_type, ecma_string_t *message_string_p);
-#if ENABLED (JERRY_ERROR_MESSAGES)
-ecma_value_t ecma_raise_standard_error_with_format (ecma_standard_error_t error_type, const char *msg_p, ...);
-#endif /* ENABLED (JERRY_ERROR_MESSAGES) */
-ecma_value_t ecma_raise_common_error (const char *msg_p);
-ecma_value_t ecma_raise_range_error (const char *msg_p);
-ecma_value_t ecma_raise_reference_error (const char *msg_p);
-ecma_value_t ecma_raise_syntax_error (const char *msg_p);
-ecma_value_t ecma_raise_type_error (const char *msg_p);
-ecma_value_t ecma_raise_uri_error (const char *msg_p);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_EXCEPTIONS_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_FUNCTION_OBJECT_H
-#define ECMA_FUNCTION_OBJECT_H
-
-#include "ecma-globals.h"
-#include "vm.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmafunctionobject ECMA Function object related routines
- * @{
- */
-
-bool ecma_is_normal_or_arrow_function (ecma_object_type_t type);
-
-bool ecma_op_is_callable (ecma_value_t value);
-bool ecma_is_constructor (ecma_value_t value);
-
-ecma_object_t *
-ecma_op_create_function_object (ecma_object_t *scope_p, const ecma_compiled_code_t *bytecode_data_p);
-
-#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
-ecma_object_t *
-ecma_op_create_arrow_function_object (ecma_object_t *scope_p, const ecma_compiled_code_t *bytecode_data_p,
- ecma_value_t this_binding);
-#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
-
-ecma_object_t *
-ecma_op_create_external_function_object (ecma_external_handler_t handler_cb);
-
-const ecma_compiled_code_t *
-ecma_op_function_get_compiled_code (ecma_extended_object_t *function_p);
-
-#if ENABLED (JERRY_ES2015_CLASS)
-void
-ecma_op_set_super_called (ecma_object_t *lex_env_p);
-
-bool
-ecma_op_is_super_called (ecma_object_t *lex_env_p);
-
-void
-ecma_op_set_class_this_binding (ecma_object_t *lex_env_p, ecma_value_t this_binding);
-
-ecma_value_t
-ecma_op_get_class_this_binding (ecma_object_t *lex_env_p);
-
-ecma_value_t
-ecma_op_function_implicit_constructor_handler_cb (const ecma_value_t function_obj,
- const ecma_value_t this_val,
- const ecma_value_t args_p[],
- const ecma_length_t args_count);
-
-void
-ecma_op_set_class_prototype (ecma_value_t completion_value, ecma_value_t this_arg);
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
-
-#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
-const ecma_compiled_code_t *
-ecma_op_arrow_function_get_compiled_code (ecma_arrow_function_t *arrow_function_p);
-#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
-
-ecma_value_t
-ecma_op_function_has_instance (ecma_object_t *func_obj_p, ecma_value_t value);
-
-ecma_value_t
-ecma_op_function_call (ecma_object_t *func_obj_p, ecma_value_t this_arg_value,
- const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len);
-
-ecma_value_t
-ecma_op_function_construct (ecma_object_t *func_obj_p, ecma_value_t this_arg_value,
- const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len);
-
-ecma_property_t *
-ecma_op_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, ecma_string_t *property_name_p);
-
-ecma_property_t *
-ecma_op_external_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, ecma_string_t *property_name_p);
-
-ecma_property_t *
-ecma_op_bound_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, ecma_string_t *property_name_p);
-
-void
-ecma_op_function_list_lazy_property_names (ecma_object_t *object_p,
- bool separate_enumerable,
- ecma_collection_t *main_collection_p,
- ecma_collection_t *non_enum_collection_p);
-
-void
-ecma_op_external_function_list_lazy_property_names (bool separate_enumerable,
- ecma_collection_t *main_collection_p,
- ecma_collection_t *non_enum_collection_p);
-
-void
-ecma_op_bound_function_list_lazy_property_names (bool separate_enumerable,
- ecma_collection_t *main_collection_p,
- ecma_collection_t *non_enum_collection_p);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_FUNCTION_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_GC_H
-#define ECMA_GC_H
-
-#include "ecma-globals.h"
-#include "jmem.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmagc Garbage collector
- * @{
- */
-
-void ecma_init_gc_info (ecma_object_t *object_p);
-void ecma_ref_object (ecma_object_t *object_p);
-void ecma_deref_object (ecma_object_t *object_p);
-void ecma_gc_run (void);
-void ecma_free_unused_memory (jmem_pressure_t pressure);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_GC_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_HELPERS_H
-#define ECMA_HELPERS_H
-
-#include "ecma-globals.h"
-#include "jmem.h"
-#include "lit-strings.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmahelpers Helpers for operations with ECMA data types
- * @{
- */
-
-/**
- * Get value of pointer from specified non-null compressed pointer.
- */
-#define ECMA_GET_NON_NULL_POINTER(type, field) JMEM_CP_GET_NON_NULL_POINTER (type, field)
-
-/**
- * Get value of pointer from specified compressed pointer.
- */
-#define ECMA_GET_POINTER(type, field) JMEM_CP_GET_POINTER (type, field)
-
-/**
- * Set value of non-null compressed pointer so that it will correspond
- * to specified non_compressed_pointer.
- */
-#define ECMA_SET_NON_NULL_POINTER(field, non_compressed_pointer) JMEM_CP_SET_NON_NULL_POINTER (field, \
- non_compressed_pointer)
-
-/**
- * Set value of compressed pointer so that it will correspond
- * to specified non_compressed_pointer.
- */
-#define ECMA_SET_POINTER(field, non_compressed_pointer) JMEM_CP_SET_POINTER (field, non_compressed_pointer)
-
-/**
- * Status flags for ecma_string_get_chars function
- */
-typedef enum
-{
- ECMA_STRING_FLAG_EMPTY = 0, /**< No options are provided. */
- ECMA_STRING_FLAG_IS_ASCII = (1 << 0), /**< The string contains only ASCII characters. */
- ECMA_STRING_FLAG_REHASH_NEEDED = (1 << 1), /**< The hash of the string must be recalculated.
- * For more details see ecma_append_chars_to_string */
- ECMA_STRING_FLAG_IS_UINT32 = (1 << 2), /**< The string repesents an UINT32 number */
- ECMA_STRING_FLAG_MUST_BE_FREED = (1 << 3), /**< The returned buffer must be freed */
-} ecma_string_flag_t;
-
-/**
- * Convert ecma-string's contents to a cesu-8 string and put it into a buffer.
- */
-#define ECMA_STRING_TO_UTF8_STRING(ecma_str_ptr, /**< ecma string pointer */ \
- utf8_ptr, /**< [out] output buffer pointer */ \
- utf8_str_size) /**< [out] output buffer size */ \
- lit_utf8_size_t utf8_str_size; \
- uint8_t utf8_ptr ## flags = ECMA_STRING_FLAG_EMPTY; \
- const lit_utf8_byte_t *utf8_ptr = ecma_string_get_chars (ecma_str_ptr, \
- &utf8_str_size, \
- NULL, \
- NULL, \
- &utf8_ptr ## flags);
-
-/**
- * Free the cesu-8 string buffer allocated by 'ECMA_STRING_TO_UTF8_STRING'
- */
-#define ECMA_FINALIZE_UTF8_STRING(utf8_ptr, /**< pointer to character buffer */ \
- utf8_str_size) /**< buffer size */ \
- if (utf8_ptr ## flags & ECMA_STRING_FLAG_MUST_BE_FREED) \
- { \
- JERRY_ASSERT (utf8_ptr != NULL); \
- jmem_heap_free_block ((void *) utf8_ptr, utf8_str_size); \
- }
-
-#ifdef ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY
-
-/**
- * Set an internal property value from pointer.
- */
-#define ECMA_SET_INTERNAL_VALUE_POINTER(field, pointer) \
- (field) = ((ecma_value_t) pointer)
-
-/**
- * Set an internal property value from pointer. Pointer can be NULL.
- */
-#define ECMA_SET_INTERNAL_VALUE_ANY_POINTER(field, pointer) \
- (field) = ((ecma_value_t) pointer)
-
-/**
- * Convert an internal property value to pointer.
- */
-#define ECMA_GET_INTERNAL_VALUE_POINTER(type, field) \
- ((type *) field)
-
-/**
- * Convert an internal property value to pointer. Result can be NULL.
- */
-#define ECMA_GET_INTERNAL_VALUE_ANY_POINTER(type, field) \
- ((type *) field)
-
-#else /* !ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */
-
-/**
- * Set an internal property value from pointer.
- */
-#define ECMA_SET_INTERNAL_VALUE_POINTER(field, pointer) \
- ECMA_SET_NON_NULL_POINTER (field, pointer)
-
-/**
- * Set an internal property value from pointer. Pointer can be NULL.
- */
-#define ECMA_SET_INTERNAL_VALUE_ANY_POINTER(field, pointer) \
- ECMA_SET_POINTER (field, pointer)
-
-/**
- * Convert an internal property value to pointer.
- */
-#define ECMA_GET_INTERNAL_VALUE_POINTER(type, field) \
- ECMA_GET_NON_NULL_POINTER (type, field)
-
-/**
- * Convert an internal property value to pointer. Result can be NULL.
- */
-#define ECMA_GET_INTERNAL_VALUE_ANY_POINTER(type, field) \
- ECMA_GET_POINTER (type, field)
-
-#endif /* ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */
-
-/**
- * Convert boolean to bitfield value.
- */
-#define ECMA_BOOL_TO_BITFIELD(x) ((x) ? 1 : 0)
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-/**
- * JERRY_ASSERT compatible macro for checking whether the given ecma-value is symbol
- */
-#define ECMA_ASSERT_VALUE_IS_SYMBOL(value) (ecma_is_value_symbol ((value)))
-#else /* !ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-/**
- * JERRY_ASSERT compatible macro for checking whether the given ecma-value is symbol
- */
-#define ECMA_ASSERT_VALUE_IS_SYMBOL(value) (false)
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-
-/* ecma-helpers-value.c */
-bool JERRY_ATTR_CONST ecma_is_value_direct (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_simple (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_empty (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_undefined (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_null (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_boolean (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_true (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_false (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_found (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_array_hole (ecma_value_t value);
-
-bool JERRY_ATTR_CONST ecma_is_value_integer_number (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_are_values_integer_numbers (ecma_value_t first_value, ecma_value_t second_value);
-bool JERRY_ATTR_CONST ecma_is_value_float_number (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_number (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_string (ecma_value_t value);
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-bool JERRY_ATTR_CONST ecma_is_value_symbol (ecma_value_t value);
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-bool JERRY_ATTR_CONST ecma_is_value_prop_name (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_direct_string (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_non_direct_string (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_object (ecma_value_t value);
-bool JERRY_ATTR_CONST ecma_is_value_error_reference (ecma_value_t value);
-
-void ecma_check_value_type_is_spec_defined (ecma_value_t value);
-
-ecma_value_t JERRY_ATTR_CONST ecma_make_boolean_value (bool boolean_value);
-ecma_value_t JERRY_ATTR_CONST ecma_make_integer_value (ecma_integer_value_t integer_value);
-ecma_value_t ecma_make_nan_value (void);
-ecma_value_t ecma_make_float_value (ecma_number_t *ecma_num_p);
-ecma_value_t ecma_make_number_value (ecma_number_t ecma_number);
-ecma_value_t ecma_make_int32_value (int32_t int32_number);
-ecma_value_t ecma_make_uint32_value (uint32_t uint32_number);
-ecma_value_t JERRY_ATTR_PURE ecma_make_string_value (const ecma_string_t *ecma_string_p);
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-ecma_value_t JERRY_ATTR_PURE ecma_make_symbol_value (const ecma_string_t *ecma_symbol_p);
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-ecma_value_t JERRY_ATTR_PURE ecma_make_prop_name_value (const ecma_string_t *ecma_prop_name_p);
-ecma_value_t JERRY_ATTR_PURE ecma_make_magic_string_value (lit_magic_string_id_t id);
-ecma_value_t JERRY_ATTR_PURE ecma_make_object_value (const ecma_object_t *object_p);
-ecma_value_t JERRY_ATTR_PURE ecma_make_error_reference_value (const ecma_error_reference_t *error_ref_p);
-ecma_integer_value_t JERRY_ATTR_CONST ecma_get_integer_from_value (ecma_value_t value);
-ecma_number_t JERRY_ATTR_PURE ecma_get_float_from_value (ecma_value_t value);
-ecma_number_t * ecma_get_pointer_from_float_value (ecma_value_t value);
-ecma_number_t JERRY_ATTR_PURE ecma_get_number_from_value (ecma_value_t value);
-ecma_string_t JERRY_ATTR_PURE *ecma_get_string_from_value (ecma_value_t value);
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-ecma_string_t JERRY_ATTR_PURE *ecma_get_symbol_from_value (ecma_value_t value);
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-ecma_string_t JERRY_ATTR_PURE *ecma_get_prop_name_from_value (ecma_value_t value);
-ecma_object_t JERRY_ATTR_PURE *ecma_get_object_from_value (ecma_value_t value);
-ecma_error_reference_t JERRY_ATTR_PURE *ecma_get_error_reference_from_value (ecma_value_t value);
-ecma_value_t JERRY_ATTR_CONST ecma_invert_boolean_value (ecma_value_t value);
-ecma_value_t ecma_copy_value (ecma_value_t value);
-ecma_value_t ecma_fast_copy_value (ecma_value_t value);
-ecma_value_t ecma_copy_value_if_not_object (ecma_value_t value);
-ecma_value_t ecma_update_float_number (ecma_value_t float_value, ecma_number_t new_number);
-void ecma_value_assign_value (ecma_value_t *value_p, ecma_value_t ecma_value);
-void ecma_value_assign_number (ecma_value_t *value_p, ecma_number_t ecma_number);
-void ecma_free_value (ecma_value_t value);
-void ecma_fast_free_value (ecma_value_t value);
-void ecma_free_value_if_not_object (ecma_value_t value);
-void ecma_free_number (ecma_value_t value);
-lit_magic_string_id_t ecma_get_typeof_lit_id (ecma_value_t value);
-
-/* ecma-helpers-string.c */
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-ecma_string_t *ecma_new_symbol_from_descriptor_string (ecma_value_t string_desc);
-bool ecma_prop_name_is_symbol (ecma_string_t *string_p);
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-#if ENABLED (JERRY_ES2015_BUILTIN_MAP) || ENABLED (JERRY_ES2015_BUILTIN_SET)
-ecma_string_t *ecma_new_map_key_string (ecma_value_t value);
-bool ecma_prop_name_is_map_key (ecma_string_t *string_p);
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) || ENABLED (JERRY_ES2015_BUILTIN_SET) */
-ecma_string_t *ecma_new_ecma_string_from_utf8 (const lit_utf8_byte_t *string_p, lit_utf8_size_t string_size);
-ecma_string_t *ecma_new_ecma_string_from_utf8_converted_to_cesu8 (const lit_utf8_byte_t *string_p,
- lit_utf8_size_t string_size);
-ecma_string_t *ecma_new_ecma_string_from_code_unit (ecma_char_t code_unit);
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
-ecma_string_t *ecma_new_ecma_string_from_code_units (ecma_char_t first_code_unit, ecma_char_t second_code_unit);
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
-ecma_string_t *ecma_new_ecma_string_from_uint32 (uint32_t uint32_number);
-ecma_string_t *ecma_new_non_direct_string_from_uint32 (uint32_t uint32_number);
-ecma_string_t *ecma_get_ecma_string_from_uint32 (uint32_t uint32_number);
-ecma_string_t *ecma_new_ecma_string_from_number (ecma_number_t num);
-ecma_string_t *ecma_get_magic_string (lit_magic_string_id_t id);
-ecma_string_t *ecma_append_chars_to_string (ecma_string_t *string1_p,
- const lit_utf8_byte_t *cesu8_string2_p,
- lit_utf8_size_t cesu8_string2_size,
- lit_utf8_size_t cesu8_string2_length);
-ecma_string_t *ecma_concat_ecma_strings (ecma_string_t *string1_p, ecma_string_t *string2_p);
-ecma_string_t *ecma_append_magic_string_to_string (ecma_string_t *string1_p, lit_magic_string_id_t string2_id);
-void ecma_ref_ecma_string (ecma_string_t *string_p);
-void ecma_deref_ecma_string (ecma_string_t *string_p);
-void ecma_destroy_ecma_string (ecma_string_t *string_p);
-ecma_number_t ecma_string_to_number (const ecma_string_t *str_p);
-uint32_t ecma_string_get_array_index (const ecma_string_t *str_p);
-
-lit_utf8_size_t JERRY_ATTR_WARN_UNUSED_RESULT
-ecma_string_copy_to_cesu8_buffer (const ecma_string_t *string_desc_p,
- lit_utf8_byte_t *buffer_p,
- lit_utf8_size_t buffer_size);
-lit_utf8_size_t JERRY_ATTR_WARN_UNUSED_RESULT
-ecma_string_copy_to_utf8_buffer (const ecma_string_t *string_desc_p,
- lit_utf8_byte_t *buffer_p,
- lit_utf8_size_t buffer_size);
-lit_utf8_size_t
-ecma_substring_copy_to_cesu8_buffer (const ecma_string_t *string_desc_p,
- ecma_length_t start_pos,
- ecma_length_t end_pos,
- lit_utf8_byte_t *buffer_p,
- lit_utf8_size_t buffer_size);
-lit_utf8_size_t
-ecma_substring_copy_to_utf8_buffer (const ecma_string_t *string_desc_p,
- ecma_length_t start_pos,
- ecma_length_t end_pos,
- lit_utf8_byte_t *buffer_p,
- lit_utf8_size_t buffer_size);
-void ecma_string_to_utf8_bytes (const ecma_string_t *string_desc_p, lit_utf8_byte_t *buffer_p,
- lit_utf8_size_t buffer_size);
-const lit_utf8_byte_t *ecma_string_get_chars (const ecma_string_t *string_p,
- lit_utf8_size_t *size_p,
- lit_utf8_size_t *length_p,
- lit_utf8_byte_t *uint32_buff_p,
- uint8_t *flags_p);
-bool ecma_compare_ecma_string_to_magic_id (const ecma_string_t *string_p, lit_magic_string_id_t id);
-bool ecma_string_is_empty (const ecma_string_t *string_p);
-bool ecma_string_is_length (const ecma_string_t *string_p);
-
-jmem_cpointer_t ecma_string_to_property_name (ecma_string_t *prop_name_p, ecma_property_t *name_type_p);
-ecma_string_t *ecma_string_from_property_name (ecma_property_t property, jmem_cpointer_t prop_name_cp);
-lit_string_hash_t ecma_string_get_property_name_hash (ecma_property_t property, jmem_cpointer_t prop_name_cp);
-uint32_t ecma_string_get_property_index (ecma_property_t property, jmem_cpointer_t prop_name_cp);
-bool ecma_string_compare_to_property_name (ecma_property_t property, jmem_cpointer_t prop_name_cp,
- const ecma_string_t *string_p);
-
-bool ecma_compare_ecma_strings (const ecma_string_t *string1_p, const ecma_string_t *string2_p);
-bool ecma_compare_ecma_non_direct_strings (const ecma_string_t *string1_p, const ecma_string_t *string2_p);
-bool ecma_compare_ecma_strings_relational (const ecma_string_t *string1_p, const ecma_string_t *string2_p);
-ecma_length_t ecma_string_get_length (const ecma_string_t *string_p);
-ecma_length_t ecma_string_get_utf8_length (const ecma_string_t *string_p);
-lit_utf8_size_t ecma_string_get_size (const ecma_string_t *string_p);
-lit_utf8_size_t ecma_string_get_utf8_size (const ecma_string_t *string_p);
-ecma_char_t ecma_string_get_char_at_pos (const ecma_string_t *string_p, ecma_length_t index);
-
-lit_magic_string_id_t ecma_get_string_magic (const ecma_string_t *string_p);
-
-lit_string_hash_t ecma_string_hash (const ecma_string_t *string_p);
-ecma_string_t *ecma_string_substr (const ecma_string_t *string_p, ecma_length_t start_pos, ecma_length_t end_pos);
-void ecma_string_trim_helper (const lit_utf8_byte_t **utf8_str_p,
- lit_utf8_size_t *utf8_str_size);
-ecma_string_t *ecma_string_trim (const ecma_string_t *string_p);
-
-ecma_stringbuilder_t ecma_stringbuilder_create (void);
-ecma_stringbuilder_t ecma_stringbuilder_create_from (ecma_string_t *string_p);
-lit_utf8_size_t ecma_stringbuilder_get_size (ecma_stringbuilder_t *builder_p);
-lit_utf8_byte_t *ecma_stringbuilder_get_data (ecma_stringbuilder_t *builder_p);
-void ecma_stringbuilder_revert (ecma_stringbuilder_t *builder_p, const lit_utf8_size_t size);
-void ecma_stringbuilder_append (ecma_stringbuilder_t *builder_p, const ecma_string_t *string_p);
-void ecma_stringbuilder_append_magic (ecma_stringbuilder_t *builder_p, const lit_magic_string_id_t id);
-void ecma_stringbuilder_append_raw (ecma_stringbuilder_t *builder_p,
- const lit_utf8_byte_t *data_p,
- const lit_utf8_size_t data_size);
-void ecma_stringbuilder_append_char (ecma_stringbuilder_t *builder_p, const ecma_char_t c);
-void ecma_stringbuilder_append_byte (ecma_stringbuilder_t *builder_p, const lit_utf8_byte_t);
-ecma_string_t *ecma_stringbuilder_finalize (ecma_stringbuilder_t *builder_p);
-void ecma_stringbuilder_destroy (ecma_stringbuilder_t *builder_p);
-
-/* ecma-helpers-number.c */
-ecma_number_t ecma_number_make_nan (void);
-ecma_number_t ecma_number_make_infinity (bool sign);
-bool ecma_number_is_nan (ecma_number_t num);
-bool ecma_number_is_negative (ecma_number_t num);
-bool ecma_number_is_zero (ecma_number_t num);
-bool ecma_number_is_infinity (ecma_number_t num);
-ecma_number_t
-ecma_number_make_from_sign_mantissa_and_exponent (bool sign, uint64_t mantissa, int32_t exponent);
-ecma_number_t ecma_number_get_prev (ecma_number_t num);
-ecma_number_t ecma_number_get_next (ecma_number_t num);
-ecma_number_t ecma_number_trunc (ecma_number_t num);
-ecma_number_t ecma_number_calc_remainder (ecma_number_t left_num, ecma_number_t right_num);
-ecma_value_t ecma_integer_multiply (ecma_integer_value_t left_integer, ecma_integer_value_t right_integer);
-lit_utf8_size_t ecma_number_to_decimal (ecma_number_t num, lit_utf8_byte_t *out_digits_p, int32_t *out_decimal_exp_p);
-lit_utf8_size_t ecma_number_to_binary_floating_point_number (ecma_number_t num,
- lit_utf8_byte_t *out_digits_p,
- int32_t *out_decimal_exp_p);
-
-/* ecma-helpers-collection.c */
-ecma_collection_t *ecma_new_collection (void);
-void ecma_collection_push_back (ecma_collection_t *collection_p, ecma_value_t value);
-void ecma_collection_destroy (ecma_collection_t *collection_p);
-void ecma_collection_free (ecma_collection_t *collection_p);
-void ecma_collection_free_if_not_object (ecma_collection_t *collection_p);
-void ecma_collection_free_objects (ecma_collection_t *collection_p);
-
-/* ecma-helpers.c */
-ecma_object_t *ecma_create_object (ecma_object_t *prototype_object_p, size_t ext_object_size, ecma_object_type_t type);
-ecma_object_t *ecma_create_decl_lex_env (ecma_object_t *outer_lexical_environment_p);
-ecma_object_t *ecma_create_object_lex_env (ecma_object_t *outer_lexical_environment_p, ecma_object_t *binding_obj_p,
- ecma_lexical_environment_type_t type);
-bool JERRY_ATTR_PURE ecma_is_lexical_environment (const ecma_object_t *object_p);
-bool JERRY_ATTR_PURE ecma_get_object_extensible (const ecma_object_t *object_p);
-void ecma_set_object_extensible (ecma_object_t *object_p, bool is_extensible);
-ecma_object_type_t JERRY_ATTR_PURE ecma_get_object_type (const ecma_object_t *object_p);
-bool JERRY_ATTR_PURE ecma_get_object_is_builtin (const ecma_object_t *object_p);
-void ecma_set_object_is_builtin (ecma_object_t *object_p);
-uint8_t ecma_get_object_builtin_id (ecma_object_t *object_p);
-ecma_lexical_environment_type_t JERRY_ATTR_PURE ecma_get_lex_env_type (const ecma_object_t *object_p);
-ecma_object_t JERRY_ATTR_PURE *ecma_get_lex_env_outer_reference (const ecma_object_t *object_p);
-ecma_object_t JERRY_ATTR_PURE *ecma_get_lex_env_binding_object (const ecma_object_t *object_p);
-
-ecma_property_value_t *
-ecma_create_named_data_property (ecma_object_t *object_p, ecma_string_t *name_p, uint8_t prop_attributes,
- ecma_property_t **out_prop_p);
-ecma_property_value_t *
-ecma_create_named_accessor_property (ecma_object_t *object_p, ecma_string_t *name_p, ecma_object_t *get_p,
- ecma_object_t *set_p, uint8_t prop_attributes, ecma_property_t **out_prop_p);
-ecma_property_t *
-ecma_find_named_property (ecma_object_t *obj_p, ecma_string_t *name_p);
-ecma_property_value_t *
-ecma_get_named_data_property (ecma_object_t *obj_p, ecma_string_t *name_p);
-
-void ecma_free_property (ecma_object_t *object_p, jmem_cpointer_t name_cp, ecma_property_t *property_p);
-
-void ecma_delete_property (ecma_object_t *object_p, ecma_property_value_t *prop_value_p);
-
-void ecma_named_data_property_assign_value (ecma_object_t *obj_p, ecma_property_value_t *prop_value_p,
- ecma_value_t value);
-
-ecma_getter_setter_pointers_t *
-ecma_get_named_accessor_property (const ecma_property_value_t *prop_value_p);
-void ecma_set_named_accessor_property_getter (ecma_object_t *object_p, ecma_property_value_t *prop_value_p,
- ecma_object_t *getter_p);
-void ecma_set_named_accessor_property_setter (ecma_object_t *object_p, ecma_property_value_t *prop_value_p,
- ecma_object_t *setter_p);
-bool ecma_is_property_writable (ecma_property_t property);
-void ecma_set_property_writable_attr (ecma_property_t *property_p, bool is_writable);
-bool ecma_is_property_enumerable (ecma_property_t property);
-void ecma_set_property_enumerable_attr (ecma_property_t *property_p, bool is_enumerable);
-bool ecma_is_property_configurable (ecma_property_t property);
-void ecma_set_property_configurable_attr (ecma_property_t *property_p, bool is_configurable);
-
-#if ENABLED (JERRY_LCACHE)
-bool ecma_is_property_lcached (ecma_property_t *property_p);
-void ecma_set_property_lcached (ecma_property_t *property_p, bool is_lcached);
-#endif /* ENABLED (JERRY_LCACHE) */
-
-ecma_property_descriptor_t ecma_make_empty_property_descriptor (void);
-void ecma_free_property_descriptor (ecma_property_descriptor_t *prop_desc_p);
-
-ecma_value_t ecma_create_error_reference (ecma_value_t value, bool is_exception);
-ecma_value_t ecma_create_error_reference_from_context (void);
-ecma_value_t ecma_create_error_object_reference (ecma_object_t *object_p);
-void ecma_ref_error_reference (ecma_error_reference_t *error_ref_p);
-void ecma_deref_error_reference (ecma_error_reference_t *error_ref_p);
-ecma_value_t ecma_clear_error_reference (ecma_value_t value, bool set_abort_flag);
-
-void ecma_bytecode_ref (ecma_compiled_code_t *bytecode_p);
-void ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p);
-#if (JERRY_STACK_LIMIT != 0)
-uintptr_t ecma_get_current_stack_usage (void);
-#endif /* (JERRY_STACK_LIMIT != 0) */
-
-/* ecma-helpers-external-pointers.c */
-bool ecma_create_native_pointer_property (ecma_object_t *obj_p, void *native_p, void *info_p);
-ecma_native_pointer_t *ecma_get_native_pointer_value (ecma_object_t *obj_p, void *info_p);
-bool ecma_delete_native_pointer_property (ecma_object_t *obj_p, void *info_p);
-
-/* ecma-helpers-conversion.c */
-ecma_number_t ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, lit_utf8_size_t str_size);
-lit_utf8_size_t ecma_uint32_to_utf8_string (uint32_t value, lit_utf8_byte_t *out_buffer_p, lit_utf8_size_t buffer_size);
-uint32_t ecma_number_to_uint32 (ecma_number_t num);
-int32_t ecma_number_to_int32 (ecma_number_t num);
-lit_utf8_size_t ecma_number_to_utf8_string (ecma_number_t num, lit_utf8_byte_t *buffer_p, lit_utf8_size_t buffer_size);
-
-/* ecma-helpers-errol.c */
-lit_utf8_size_t ecma_errol0_dtoa (double val, lit_utf8_byte_t *buffer_p, int32_t *exp_p);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_HELPERS_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_INIT_FINALIZE_H
-#define ECMA_INIT_FINALIZE_H
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmainitfinalize Initialization and finalization of ECMA components
- * @{
- */
-
-void ecma_init (void);
-void ecma_finalize (void);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_INIT_FINALIZE_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_ITERATOR_OBJECT_H
-#define ECMA_ITERATOR_OBJECT_H
-
-#include "ecma-globals.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmaiteratorobject ECMA iterator object related routines
- * @{
- */
-
-/**
- * Maximum value of [[%Iterator%NextIndex]] until it can be stored
- * in an ecma pseudo array object structure element.
- */
-#define ECMA_ITERATOR_INDEX_LIMIT UINT16_MAX
-
-ecma_value_t
-ecma_op_create_iterator_object (ecma_value_t iterated_value, ecma_object_t *prototype_obj_p,
- uint8_t iterator_type, uint8_t extra_info);
-
-ecma_value_t
-ecma_create_iter_result_object (ecma_value_t value, ecma_value_t done);
-
-ecma_value_t
-ecma_create_array_from_iter_element (ecma_value_t value, ecma_value_t index_value);
-
-ecma_value_t
-ecma_op_get_iterator (ecma_value_t value, ecma_value_t method);
-
-ecma_value_t
-ecma_op_iterator_value (ecma_value_t iter_result);
-
-ecma_value_t
-ecma_op_iterator_step (ecma_value_t iterator);
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_ITERATOR_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_JOB_QUEUE_H
-#define ECMA_JOB_QUEUE_H
-
-#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmajobqueue ECMA Job Queue related routines
- * @{
- */
-
-/**
- * Jerry job handler function type
- */
-typedef ecma_value_t (*ecma_job_handler_t) (void *job_p);
-
-/**
- * Description of the job queue item.
- */
-typedef struct ecma_job_queueitem_t
-{
- struct ecma_job_queueitem_t *next_p; /**< points to next item */
- ecma_job_handler_t handler; /**< the handler for the job*/
- void *job_p; /**< points to the job */
-} ecma_job_queueitem_t;
-
-void ecma_job_queue_init (void);
-
-void ecma_enqueue_promise_reaction_job (ecma_value_t reaction, ecma_value_t argument);
-void ecma_enqueue_promise_resolve_thenable_job (ecma_value_t promise, ecma_value_t thenable, ecma_value_t then);
-void ecma_free_all_enqueued_jobs (void);
-
-ecma_value_t ecma_process_all_enqueued_jobs (void);
-
-/**
- * @}
- * @}
- */
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
-#endif /* !ECMA_JOB_QUEUE_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_LCACHE_H
-#define ECMA_LCACHE_H
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmalcache Property lookup cache
- * @{
- */
-
-#if ENABLED (JERRY_LCACHE)
-void ecma_lcache_insert (const ecma_object_t *object_p, const jmem_cpointer_t name_cp, ecma_property_t *prop_p);
-ecma_property_t *ecma_lcache_lookup (const ecma_object_t *object_p, const ecma_string_t *prop_name_p);
-void ecma_lcache_invalidate (const ecma_object_t *object_p, const jmem_cpointer_t name_cp, ecma_property_t *prop_p);
-
-#endif /* ENABLED (JERRY_LCACHE) */
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_LCACHE_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_LEX_ENV_H
-#define ECMA_LEX_ENV_H
-
-#include "ecma-globals.h"
-#include "ecma-reference.h"
-#include "jrt.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup lexicalenvironment Lexical environment
- * @{
- *
- * \addtogroup globallexicalenvironment Global lexical environment
- * @{
- */
-
-void ecma_init_global_lex_env (void);
-void ecma_finalize_global_lex_env (void);
-ecma_object_t *ecma_get_global_environment (void);
-
-#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
-void ecma_module_add_lex_env (ecma_object_t *lex_env_p);
-void ecma_module_finalize_lex_envs (void);
-#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
-
-/**
- * @}
- */
-
-/* ECMA-262 v5, 8.7.1 and 8.7.2 */
-ecma_value_t ecma_op_get_value_lex_env_base (ecma_object_t *lex_env_p, ecma_object_t **ref_base_lex_env_p,
- ecma_string_t *name_p);
-ecma_value_t ecma_op_get_value_object_base (ecma_value_t base_value, ecma_string_t *property_name_p);
-ecma_value_t ecma_op_put_value_lex_env_base (ecma_object_t *lex_env_p, ecma_string_t *var_name_string_p,
- bool is_strict, ecma_value_t value);
-
-/* ECMA-262 v5, Table 17. Abstract methods of Environment Records */
-bool ecma_op_has_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p);
-ecma_value_t ecma_op_create_mutable_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p, bool is_deletable);
-ecma_value_t ecma_op_set_mutable_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p, ecma_value_t value,
- bool is_strict);
-ecma_value_t ecma_op_get_binding_value (ecma_object_t *lex_env_p, ecma_string_t *name_p, bool is_strict);
-ecma_value_t ecma_op_delete_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p);
-ecma_value_t ecma_op_implicit_this_value (ecma_object_t *lex_env_p);
-
-/* ECMA-262 v5, Table 18. Additional methods of Declarative Environment Records */
-void ecma_op_create_immutable_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p, ecma_value_t value);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_LEX_ENV_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_LIT_STORAGE_H
-#define ECMA_LIT_STORAGE_H
-
-#include "ecma-globals.h"
-#include "jmem.h"
-#include "lit-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmalitstorage Literal storage
- * @{
- */
-
-#if ENABLED (JERRY_SNAPSHOT_SAVE)
-/**
- * Snapshot literal - offset map
- */
-typedef struct
-{
- ecma_value_t literal_id; /**< literal id */
- ecma_value_t literal_offset; /**< literal offset */
-} lit_mem_to_snapshot_id_map_entry_t;
-#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
-
-void ecma_finalize_lit_storage (void);
-
-ecma_value_t ecma_find_or_create_literal_string (const lit_utf8_byte_t *chars_p, lit_utf8_size_t size);
-ecma_value_t ecma_find_or_create_literal_number (ecma_number_t number_arg);
-
-#if ENABLED (JERRY_SNAPSHOT_SAVE)
-void ecma_save_literals_append_value (ecma_value_t value, ecma_collection_t *lit_pool_p);
-void ecma_save_literals_add_compiled_code (const ecma_compiled_code_t *compiled_code_p,
- ecma_collection_t *lit_pool_p);
-bool ecma_save_literals_for_snapshot (ecma_collection_t *lit_pool_p, uint32_t *buffer_p, size_t buffer_size,
- size_t *in_out_buffer_offset_p, lit_mem_to_snapshot_id_map_entry_t **out_map_p,
- uint32_t *out_map_len_p);
-#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
-
-#if ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE)
-ecma_value_t
-ecma_snapshot_get_literal (const uint8_t *literal_base_p, ecma_value_t literal_value);
-#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE) */
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_LIT_STORAGE_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_MODULE_H
-#define ECMA_MODULE_H
-
-#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
-
-#include "common.h"
-#include "ecma-globals.h"
-
-#define ECMA_MODULE_MAX_PATH 255u
-
-/**
- * Imported or exported names, such as "a as b"
- * Note: See https://www.ecma-international.org/ecma-262/6.0/#table-39
- * and https://www.ecma-international.org/ecma-262/6.0/#table-41
- */
-typedef struct ecma_module_names
-{
- struct ecma_module_names *next_p; /**< next linked list node */
- ecma_string_t *imex_name_p; /**< Import/export name of the item */
- ecma_string_t *local_name_p; /**< Local name of the item */
-} ecma_module_names_t;
-
-typedef struct ecma_module ecma_module_t;
-
-/**
- * Module node to store imports / exports.
- */
-typedef struct ecma_module_node
-{
- struct ecma_module_node *next_p; /**< next linked list node */
- ecma_module_names_t *module_names_p; /**< names of the requested import/export node */
- ecma_module_t *module_request_p; /**< module structure of the requested module */
-} ecma_module_node_t;
-
-/**
- * Module context containing all import and export nodes.
- */
-typedef struct ecma_module_context
-{
- struct ecma_module_context *parent_p; /**< parent context */
- ecma_module_node_t *imports_p; /**< import item of the current context */
- ecma_module_node_t *local_exports_p; /**< export item of the current context */
- ecma_module_node_t *indirect_exports_p; /**< export item of the current context */
- ecma_module_node_t *star_exports_p; /**< export item of the current context */
- ecma_module_t *module_p; /**< module request */
-} ecma_module_context_t;
-
-/**
- * An enum identifing the current state of the module
- */
-typedef enum
-{
- ECMA_MODULE_STATE_INIT = 0, /**< module is initialized */
- ECMA_MODULE_STATE_PARSING = 1, /**< module is currently being parsed */
- ECMA_MODULE_STATE_PARSED = 2, /**< module has been parsed */
- ECMA_MODULE_STATE_EVALUATING = 3, /**< module is currently being evaluated */
- ECMA_MODULE_STATE_EVALUATED = 4, /**< module has been evaluated */
- ECMA_MODULE_STATE_NATIVE = 5, /**< module is native */
-} ecma_module_state_t;
-
-/**
- * Module structure storing an instance of a module
- */
-struct ecma_module
-{
- struct ecma_module *next_p; /**< next linked list node */
- ecma_module_state_t state; /**< state of the mode */
- ecma_string_t *path_p; /**< path of the module */
- ecma_module_context_t *context_p; /**< module context of the module */
- ecma_compiled_code_t *compiled_code_p; /**< compiled code of the module */
- ecma_object_t *scope_p; /**< lexica lenvironment of the module */
- ecma_object_t *namespace_object_p; /**< namespace import object of the module */
-};
-
-/**
- * A record that can be used to store {module, identifier} pairs
- */
-typedef struct ecma_module_record
-{
- ecma_module_t *module_p; /**< module */
- ecma_string_t *name_p; /**< identifier name */
-} ecma_module_record_t;
-
-/**
- * A list of module records that can be used to identify circular imports during resolution
- */
-typedef struct ecma_module_resolve_set
-{
- struct ecma_module_resolve_set *next_p; /**< next in linked list */
- ecma_module_record_t record; /**< module record */
-} ecma_module_resolve_set_t;
-
-/**
- * A list that is used like a stack to drive the resolution process, instead of recursion.
- */
-typedef struct ecma_module_resolve_stack
-{
- struct ecma_module_resolve_stack *next_p; /**< next in linked list */
- ecma_module_t *module_p; /**< module request */
- ecma_string_t *export_name_p; /**< export identifier name */
- bool resolving; /**< flag storing wether the current frame started resolving */
-} ecma_module_resolve_stack_t;
-
-bool ecma_module_resolve_set_insert (ecma_module_resolve_set_t **set_p,
- ecma_module_t *const module_p,
- ecma_string_t *const export_name_p);
-void ecma_module_resolve_set_cleanup (ecma_module_resolve_set_t *set_p);
-
-void ecma_module_resolve_stack_push (ecma_module_resolve_stack_t **stack_p,
- ecma_module_t *const module_p,
- ecma_string_t *const export_name_p);
-void ecma_module_resolve_stack_pop (ecma_module_resolve_stack_t **stack_p);
-
-ecma_string_t *ecma_module_create_normalized_path (const uint8_t *char_p,
- prop_length_t size);
-ecma_module_t *ecma_module_find_module (ecma_string_t *const path_p);
-ecma_module_t *ecma_module_create_native_module (ecma_string_t *const path_p,
- ecma_object_t *const namespace_p);
-ecma_module_t *ecma_module_find_or_create_module (ecma_string_t *const path_p);
-
-ecma_value_t ecma_module_connect_imports (void);
-ecma_value_t ecma_module_parse_modules (void);
-ecma_value_t ecma_module_check_indirect_exports (void);
-
-void ecma_module_release_module_nodes (ecma_module_node_t *module_node_p);
-void ecma_module_cleanup (void);
-#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
-
-#endif /* !ECMA_MODULE_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_NUMBER_ARITHMETIC_H
-#define ECMA_NUMBER_ARITHMETIC_H
-
-#include "ecma-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup numberarithmetic ECMA number arithmetic operations
- * @{
- */
-
-ecma_number_t ecma_op_number_remainder (ecma_number_t left_num, ecma_number_t right_num);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_NUMBER_ARITHMETIC_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_NUMBER_OBJECT_H
-#define ECMA_NUMBER_OBJECT_H
-
-#include "ecma-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmanumberobject ECMA Number object related routines
- * @{
- */
-
-ecma_value_t ecma_op_create_number_object (ecma_value_t arg);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_NUMBER_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_OBJECTS_ARGUMENTS_H
-#define ECMA_OBJECTS_ARGUMENTS_H
-
-#include "ecma-globals.h"
-#include "ecma-helpers.h"
-
-void
-ecma_op_create_arguments_object (ecma_object_t *func_obj_p, ecma_object_t *lex_env_p,
- const ecma_value_t *arguments_list_p, ecma_length_t arguments_number,
- const ecma_compiled_code_t *bytecode_data_p);
-
-ecma_value_t
-ecma_op_arguments_object_delete (ecma_object_t *object_p, ecma_string_t *property_name_p, bool is_throw);
-ecma_value_t
-ecma_op_arguments_object_define_own_property (ecma_object_t *object_p, ecma_string_t *property_name_p,
- const ecma_property_descriptor_t *property_desc_p);
-
-#endif /* !ECMA_OBJECTS_ARGUMENTS_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_OBJECTS_GENERAL_H
-#define ECMA_OBJECTS_GENERAL_H
-
-#include "ecma-conversion.h"
-#include "ecma-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmaobjectsinternalops ECMA objects' operations
- * @{
- */
-
-ecma_value_t ecma_reject (bool is_throw);
-ecma_object_t *ecma_op_create_object_object_noarg (void);
-ecma_value_t ecma_op_create_object_object_arg (ecma_value_t value);
-ecma_object_t *ecma_op_create_object_object_noarg_and_set_prototype (ecma_object_t *object_prototype_p);
-
-ecma_value_t ecma_op_general_object_delete (ecma_object_t *obj_p, ecma_string_t *property_name_p, bool is_throw);
-ecma_value_t ecma_op_general_object_default_value (ecma_object_t *obj_p, ecma_preferred_type_hint_t hint);
-ecma_value_t ecma_op_general_object_define_own_property (ecma_object_t *object_p, ecma_string_t *property_name_p,
- const ecma_property_descriptor_t *property_desc_p);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_OBJECTS_GENERAL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_OBJECTS_H
-#define ECMA_OBJECTS_H
-
-#include "ecma-conversion.h"
-#include "ecma-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmaobjectsinternalops ECMA objects' operations
- * @{
- */
-
-ecma_property_t ecma_op_object_get_own_property (ecma_object_t *object_p, ecma_string_t *property_name_p,
- ecma_property_ref_t *property_ref_p, uint32_t options);
-bool ecma_op_object_has_own_property (ecma_object_t *object_p, ecma_string_t *property_name_p);
-bool ecma_op_object_has_property (ecma_object_t *object_p, ecma_string_t *property_name_p);
-ecma_value_t ecma_op_object_find_own (ecma_value_t base_value, ecma_object_t *object_p, ecma_string_t *property_name_p);
-ecma_value_t ecma_op_object_find (ecma_object_t *object_p, ecma_string_t *property_name_p);
-ecma_value_t ecma_op_object_find_by_uint32_index (ecma_object_t *object_p, uint32_t index);
-ecma_value_t ecma_op_object_find_by_number_index (ecma_object_t *object_p, ecma_number_t index);
-ecma_value_t ecma_op_object_get_own_data_prop (ecma_object_t *object_p, ecma_string_t *property_name_p);
-ecma_value_t ecma_op_object_get (ecma_object_t *object_p, ecma_string_t *property_name_p);
-ecma_value_t ecma_op_object_get_by_magic_id (ecma_object_t *object_p, lit_magic_string_id_t property_id);
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-ecma_value_t ecma_op_object_get_by_symbol_id (ecma_object_t *object_p, lit_magic_string_id_t property_id);
-ecma_value_t ecma_op_get_method_by_symbol_id (ecma_value_t value, lit_magic_string_id_t property_id);
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-ecma_value_t ecma_op_object_put (ecma_object_t *object_p, ecma_string_t *property_name_p, ecma_value_t value,
- bool is_throw);
-ecma_value_t ecma_op_object_put_by_uint32_index (ecma_object_t *object_p, uint32_t index,
- ecma_value_t value, bool is_throw);
-ecma_value_t ecma_op_object_put_by_number_index (ecma_object_t *object_p, ecma_number_t index,
- ecma_value_t value, bool is_throw);
-ecma_value_t ecma_op_object_delete (ecma_object_t *obj_p, ecma_string_t *property_name_p, bool is_throw);
-ecma_value_t ecma_op_object_delete_by_uint32_index (ecma_object_t *obj_p, uint32_t index, bool is_throw);
-ecma_value_t ecma_op_object_delete_by_number_index (ecma_object_t *obj_p, ecma_number_t index, bool is_throw);
-ecma_value_t ecma_op_object_default_value (ecma_object_t *obj_p, ecma_preferred_type_hint_t hint);
-ecma_value_t ecma_op_object_define_own_property (ecma_object_t *obj_p, ecma_string_t *property_name_p,
- const ecma_property_descriptor_t *property_desc_p);
-bool ecma_op_object_get_own_property_descriptor (ecma_object_t *object_p, ecma_string_t *property_name_p,
- ecma_property_descriptor_t *prop_desc_p);
-ecma_value_t ecma_op_object_has_instance (ecma_object_t *obj_p, ecma_value_t value);
-bool ecma_op_object_is_prototype_of (ecma_object_t *base_p, ecma_object_t *target_p);
-ecma_collection_t * ecma_op_object_get_property_names (ecma_object_t *obj_p, uint32_t opts);
-
-lit_magic_string_id_t ecma_object_get_class_name (ecma_object_t *obj_p);
-bool ecma_object_class_is (ecma_object_t *object_p, uint32_t class_id);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_OBJECTS_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_PROMISE_OBJECT_H
-#define ECMA_PROMISE_OBJECT_H
-
-#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
-#include "ecma-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmaarraybufferobject ECMA ArrayBuffer object related routines
- * @{
- */
-
-/**
- * The PromiseState of promise object.
- */
-typedef enum
-{
- ECMA_PROMISE_STATE_PENDING, /**< pending state */
- ECMA_PROMISE_STATE_FULFILLED, /**< fulfilled state */
- ECMA_PROMISE_STATE_REJECTED, /** rejected state */
- ECMA_PROMISE_STATE__COUNT /**< number of states */
-} ecma_promise_state_t;
-
-/**
- * Indicates the type of the executor in promise construct.
- */
-typedef enum
-{
- ECMA_PROMISE_EXECUTOR_FUNCTION, /**< the executor is a function, it is for the usual constructor */
- ECMA_PROMISE_EXECUTOR_OBJECT, /**< the executor is an object, it is for the `then` routine */
- ECMA_PROMISE_EXECUTOR_EMPTY /**< the executor is empty, it is for external C API */
-} ecma_promise_executor_type_t;
-
-/**
- * Description of the promise resolving functions.
- */
-typedef struct
-{
- ecma_value_t resolve; /**< the resolve function */
- ecma_value_t reject; /**< the reject function */
-} ecma_promise_resolving_functions_t;
-
-/**
- * Description of the promise object.
- * It need more space than normal object to store builtin properties.
- */
-typedef struct
-{
- ecma_extended_object_t ecma_extended_object_t; /**< extended object part */
- uint8_t state; /**< promise state, see ecma_promise_state_t */
- ecma_collection_t *fulfill_reactions; /**< list of PromiseFullfillReactions */
- ecma_collection_t *reject_reactions; /**< list of PromiseRejectReactions */
-} ecma_promise_object_t;
-
-bool ecma_is_promise (ecma_object_t *obj_p);
-ecma_value_t
-ecma_op_create_promise_object (ecma_value_t executor, ecma_promise_executor_type_t type);
-ecma_value_t ecma_promise_new_capability (void);
-ecma_value_t
-ecma_promise_then (ecma_value_t promise,
- ecma_value_t on_fulfilled,
- ecma_value_t on_rejected);
-ecma_promise_resolving_functions_t *
-ecma_promise_create_resolving_functions (ecma_object_t *object_p);
-void ecma_promise_free_resolving_functions (ecma_promise_resolving_functions_t *funcs);
-
-/**
- * @}
- * @}
- */
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
-#endif /* !ECMA_PROMISE_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_PROPERTY_HASHMAP_H
-#define ECMA_PROPERTY_HASHMAP_H
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmapropertyhashmap Property hashmap
- * @{
- */
-
-/**
- * Recommended minimum number of items in a property cache.
- */
-#define ECMA_PROPERTY_HASMAP_MINIMUM_SIZE 32
-
-/**
- * Property hash.
- */
-typedef struct
-{
- ecma_property_header_t header; /**< header of the property */
- uint32_t max_property_count; /**< maximum property count (power of 2) */
- uint32_t null_count; /**< number of NULLs in the map */
- uint32_t unused_count; /**< number of unused entires in the map */
-
- /*
- * The hash is followed by max_property_count ecma_cpointer_t
- * compressed pointers and (max_property_count + 7) / 8 bytes
- * which stores a flag for each compressed pointer.
- *
- * If the compressed pointer is equal to ECMA_NULL_POINTER
- * - flag is cleared if the entry is NULL
- * - flag is set if the entry is deleted
- *
- * If the compressed pointer is not equal to ECMA_NULL_POINTER
- * - flag is cleared if the first entry of a property pair is referenced
- * - flag is set if the second entry of a property pair is referenced
- */
-} ecma_property_hashmap_t;
-
-#if ENABLED (JERRY_PROPRETY_HASHMAP)
-
-/**
- * Simple ecma values
- */
-typedef enum
-{
- ECMA_PROPERTY_HASHMAP_DELETE_NO_HASHMAP, /**< object has no hashmap */
- ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP, /**< object has hashmap */
- ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP, /**< hashmap should be recreated */
-} ecma_property_hashmap_delete_status;
-
-void ecma_property_hashmap_create (ecma_object_t *object_p);
-void ecma_property_hashmap_free (ecma_object_t *object_p);
-void ecma_property_hashmap_insert (ecma_object_t *object_p, ecma_string_t *name_p,
- ecma_property_pair_t *property_pair_p, int property_index);
-ecma_property_hashmap_delete_status ecma_property_hashmap_delete (ecma_object_t *object_p, jmem_cpointer_t name_cp,
- ecma_property_t *property_p);
-
-
-ecma_property_t *ecma_property_hashmap_find (ecma_property_hashmap_t *hashmap_p, ecma_string_t *name_p,
- jmem_cpointer_t *property_real_name_cp);
-#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_PROPERTY_HASHMAP_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_REFERENCE_H
-#define ECMA_REFERENCE_H
-
-#include "ecma-globals.h"
-#include "jrt.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup references ECMA-Reference
- * @{
- */
-
-ecma_object_t *ecma_op_resolve_reference_base (ecma_object_t *lex_env_p, ecma_string_t *name_p);
-ecma_value_t ecma_op_resolve_reference_value (ecma_object_t *lex_env_p, ecma_string_t *name_p);
-#if ENABLED (JERRY_ES2015_CLASS)
-ecma_object_t *ecma_op_resolve_super_reference_value (ecma_object_t *lex_env_p);
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_REFERENCE_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_REGEXP_OBJECT_H
-#define ECMA_REGEXP_OBJECT_H
-
-#if ENABLED (JERRY_BUILTIN_REGEXP)
-
-#include "ecma-globals.h"
-#include "re-compiler.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmaregexpobject ECMA RegExp object related routines
- * @{
- */
-
-/**
- * RegExp flags
- * Note:
- * This enum has to be kept in sync with jerry_regexp_flags_t.
- */
-typedef enum
-{
- RE_FLAG_EMPTY = 0u, /* Empty RegExp flags */
- RE_FLAG_GLOBAL = (1u << 1), /**< ECMA-262 v5, 15.10.7.2 */
- RE_FLAG_IGNORE_CASE = (1u << 2), /**< ECMA-262 v5, 15.10.7.3 */
- RE_FLAG_MULTILINE = (1u << 3) /**< ECMA-262 v5, 15.10.7.4 */
-} ecma_regexp_flags_t;
-
-/**
- * Structure for storing capturing group results
- */
-typedef struct
-{
- const lit_utf8_byte_t *begin_p; /**< substring start pointer */
- const lit_utf8_byte_t *end_p; /**< substring end pointer */
-} ecma_regexp_capture_t;
-
-/**
- * Structure for storing non-capturing group results
- */
-typedef struct
-{
- const lit_utf8_byte_t *str_p; /**< string pointer */
-} ecma_regexp_non_capture_t;
-
-#if (JERRY_STACK_LIMIT != 0)
-/**
- * Value used ase result when stack limit is reached
- */
-#define ECMA_RE_OUT_OF_STACK ((const lit_utf8_byte_t *) UINTPTR_MAX)
-
-/**
- * Checks if the stack limit has been reached during regexp matching
- */
-#define ECMA_RE_STACK_LIMIT_REACHED(p) (JERRY_UNLIKELY (p == ECMA_RE_OUT_OF_STACK))
-#else /* JERRY_STACK_LIMIT == 0 */
-#define ECMA_RE_STACK_LIMIT_REACHED(p) (false)
-#endif /* JERRY_STACK_LIMIT != 0 */
-
-/**
- * RegExp executor context
- */
-typedef struct
-{
- const lit_utf8_byte_t *input_end_p; /**< end of input string */
- const lit_utf8_byte_t *input_start_p; /**< start of input string */
- uint32_t captures_count; /**< number of capture groups */
- ecma_regexp_capture_t *captures_p; /**< capturing groups */
- uint32_t non_captures_count; /**< number of non-capture groups */
- ecma_regexp_non_capture_t *non_captures_p; /**< non-capturing groups */
- uint32_t *iterations_p; /**< number of iterations */
- uint16_t flags; /**< RegExp flags */
-} ecma_regexp_ctx_t;
-
-ecma_value_t ecma_op_create_regexp_object_from_bytecode (re_compiled_code_t *bytecode_p);
-ecma_value_t ecma_op_create_regexp_object (ecma_string_t *pattern_p, uint16_t flags);
-ecma_value_t ecma_regexp_exec_helper (ecma_value_t regexp_value, ecma_value_t input_string, bool ignore_global);
-ecma_value_t ecma_regexp_read_pattern_str_helper (ecma_value_t pattern_arg, ecma_string_t **pattern_string_p);
-ecma_char_t ecma_regexp_canonicalize (ecma_char_t ch, bool is_ignorecase);
-ecma_char_t ecma_regexp_canonicalize_char (ecma_char_t ch);
-ecma_value_t ecma_regexp_parse_flags (ecma_string_t *flags_str_p, uint16_t *flags_p);
-void ecma_regexp_initialize_props (ecma_object_t *re_obj_p, ecma_string_t *source_p, uint16_t flags);
-
-/**
- * @}
- * @}
- */
-
-#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
-#endif /* !ECMA_REGEXP_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_STRING_OBJECT_H
-#define ECMA_STRING_OBJECT_H
-
-#include "ecma-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmastringobject ECMA String object related routines
- * @{
- */
-
-ecma_value_t
-ecma_op_create_string_object (const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len);
-
-void
-ecma_op_string_list_lazy_property_names (ecma_object_t *obj_p,
- bool separate_enumerable,
- ecma_collection_t *main_collection_p,
- ecma_collection_t *non_enum_collection_p);
-
-
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_STRING_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_SYMBOL_H
-#define ECMA_SYMBOL_H
-
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
-#include "ecma-globals.h"
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmasymbolobject ECMA Symbol object related routines
- * @{
- */
-
-ecma_value_t
-ecma_op_create_symbol (const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len);
-
-ecma_value_t
-ecma_op_create_symbol_object (const ecma_value_t value);
-
-bool
-ecma_prop_name_is_symbol (ecma_string_t *string_p);
-
-ecma_string_t *
-ecma_get_symbol_description (ecma_string_t *symbol_p);
-
-ecma_value_t
-ecma_symbol_to_string_helper (ecma_value_t this_arg, bool is_to_string);
-
-ecma_value_t
-ecma_get_symbol_descriptive_string (ecma_value_t symbol_value);
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
-/**
- * @}
- * @}
- */
-
-#endif /* !ECMA_SYMBOL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_TRY_CATCH_MACRO_H
-#define ECMA_TRY_CATCH_MACRO_H
-
-#include "ecma-helpers.h"
-
-/**
- * The macro defines try-block that initializes variable 'var' with 'op'
- * and checks for exceptions that might be thrown during initialization.
- *
- * If no exception was thrown, then code after the try-block is executed.
- * Otherwise, throw-completion value is just copied to return_value.
- *
- * Note:
- * Each ECMA_TRY_CATCH should have it's own corresponding ECMA_FINALIZE
- * statement with same argument as corresponding ECMA_TRY_CATCH's first argument.
- */
-#define ECMA_TRY_CATCH(var, op, return_value) \
- JERRY_ASSERT (return_value == ECMA_VALUE_EMPTY); \
- ecma_value_t var ## _completion = op; \
- if (ECMA_IS_VALUE_ERROR (var ## _completion)) \
- { \
- return_value = var ## _completion; \
- } \
- else \
- { \
- ecma_value_t var = var ## _completion; \
- JERRY_UNUSED (var);
-
-/**
- * The macro marks end of code block that is defined by corresponding
- * ECMA_TRY_CATCH and frees variable, initialized by the ECMA_TRY_CATCH.
- *
- * Note:
- * Each ECMA_TRY_CATCH should be followed by ECMA_FINALIZE with same argument
- * as corresponding ECMA_TRY_CATCH's first argument.
- */
-#define ECMA_FINALIZE(var) \
- ecma_free_value (var ## _completion); \
- }
-
-/**
- * The macro defines try-block that tries to perform ToNumber operation on given value
- * and checks for exceptions that might be thrown during the operation.
- *
- * If no exception was thrown, then code after the try-block is executed.
- * Otherwise, throw-completion value is just copied to return_value.
- *
- * Note:
- * Each ECMA_OP_TO_NUMBER_TRY_CATCH should have it's own corresponding ECMA_OP_TO_NUMBER_FINALIZE
- * statement with same argument as corresponding ECMA_OP_TO_NUMBER_TRY_CATCH's first argument.
- */
-#define ECMA_OP_TO_NUMBER_TRY_CATCH(num_var, value, return_value) \
- JERRY_ASSERT (return_value == ECMA_VALUE_EMPTY); \
- ecma_number_t num_var; \
- return_value = ecma_get_number (value, &num_var); \
- \
- if (JERRY_LIKELY (ecma_is_value_empty (return_value))) \
- {
-
-/**
- * The macro marks end of code block that is defined by corresponding ECMA_OP_TO_NUMBER_TRY_CATCH.
- *
- * Note:
- * Each ECMA_OP_TO_NUMBER_TRY_CATCH should be followed by ECMA_OP_TO_NUMBER_FINALIZE
- * with same argument as corresponding ECMA_OP_TO_NUMBER_TRY_CATCH's first argument.
- */
-#define ECMA_OP_TO_NUMBER_FINALIZE(num_var) }
-
-#endif /* !ECMA_TRY_CATCH_MACRO_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ECMA_TYPEDARRAY_OBJECT_H
-#define ECMA_TYPEDARRAY_OBJECT_H
-
-#include "ecma-globals.h"
-#include "ecma-builtins.h"
-
-#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
-
-/** \addtogroup ecma ECMA
- * @{
- *
- * \addtogroup ecmatypedarrayobject ECMA TypedArray object related routines
- * @{
- */
-
-uint8_t ecma_typedarray_helper_get_shift_size (ecma_typedarray_type_t typedarray_id);
-ecma_typedarray_getter_fn_t ecma_get_typedarray_getter_fn (ecma_typedarray_type_t typedarray_id);
-ecma_typedarray_setter_fn_t ecma_get_typedarray_setter_fn (ecma_typedarray_type_t typedarray_id);
-ecma_number_t ecma_get_typedarray_element (lit_utf8_byte_t *src_p,
- ecma_typedarray_type_t typedarray_id);
-void ecma_set_typedarray_element (lit_utf8_byte_t *dst_p,
- ecma_number_t value,
- ecma_typedarray_type_t typedarray_id);
-bool ecma_typedarray_helper_is_typedarray (ecma_builtin_id_t builtin_id);
-ecma_typedarray_type_t ecma_get_typedarray_id (ecma_object_t *obj_p);
-ecma_builtin_id_t ecma_typedarray_helper_get_prototype_id (ecma_typedarray_type_t typedarray_id);
-ecma_typedarray_type_t ecma_typedarray_helper_builtin_to_typedarray_id (ecma_builtin_id_t builtin_id);
-
-ecma_value_t ecma_op_typedarray_from (ecma_value_t items_val,
- ecma_value_t map_fn_val,
- ecma_value_t this_val,
- ecma_object_t *proto_p,
- uint8_t element_size_shift,
- ecma_typedarray_type_t typedarray_id);
-ecma_length_t ecma_typedarray_get_length (ecma_object_t *typedarray_p);
-ecma_length_t ecma_typedarray_get_offset (ecma_object_t *typedarray_p);
-lit_utf8_byte_t *ecma_typedarray_get_buffer (ecma_object_t *typedarray_p);
-uint8_t ecma_typedarray_get_element_size_shift (ecma_object_t *typedarray_p);
-ecma_object_t *ecma_typedarray_get_arraybuffer (ecma_object_t *typedarray_p);
-ecma_value_t ecma_op_create_typedarray (const ecma_value_t *arguments_list_p,
- ecma_length_t arguments_list_len,
- ecma_object_t *proto_p,
- uint8_t element_size_shift,
- ecma_typedarray_type_t typedarray_id);
-bool ecma_is_typedarray (ecma_value_t target);
-void ecma_op_typedarray_list_lazy_property_names (ecma_object_t *obj_p,
- ecma_collection_t *main_collection_p);
-bool ecma_op_typedarray_define_index_prop (ecma_object_t *obj_p,
- uint32_t index,
- const ecma_property_descriptor_t *property_desc_p);
-ecma_value_t ecma_op_create_typedarray_with_type_and_length (ecma_object_t *obj_p,
- ecma_length_t array_length);
-ecma_typedarray_info_t ecma_typedarray_get_info (ecma_object_t *typedarray_p);
-ecma_value_t ecma_typedarray_create_object_with_length (ecma_length_t array_length,
- ecma_object_t *proto_p,
- uint8_t element_size_shift,
- ecma_typedarray_type_t typedarray_id);
-
-/**
- * @}
- * @}
- */
-
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
-#endif /* !ECMA_TYPEDARRAY_OBJECT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Engine context for JerryScript
- */
-#ifndef JCONTEXT_H
-#define JCONTEXT_H
-
-#include "debugger.h"
-#include "ecma-builtins.h"
-#include "ecma-jobqueue.h"
-#include "jerryscript-port.h"
-#include "jmem.h"
-#include "re-bytecode.h"
-#include "vm-defines.h"
-#include "jerryscript.h"
-#include "jerryscript-debugger-transport.h"
-#include "js-parser-internal.h"
-
-/** \addtogroup context Context
- * @{
- */
-
-/**
- * Advanced allocator configurations.
- */
-/**
- * Maximum global heap size in bytes
- */
-#define CONFIG_MEM_HEAP_SIZE (JERRY_GLOBAL_HEAP_SIZE * 1024)
-
-/**
- * Maximum stack usage size in bytes
- */
-#define CONFIG_MEM_STACK_LIMIT (JERRY_STACK_LIMIT * 1024)
-
-/**
- * Max heap usage limit
- */
-#define CONFIG_MAX_GC_LIMIT 8192
-
-/**
- * Allowed heap usage limit until next garbage collection
- *
- * Whenever the total allocated memory size reaches the current heap limit, garbage collection will be triggered
- * to try and reduce clutter from unreachable objects. If the allocated memory can't be reduced below the limit,
- * then the current limit will be incremented by CONFIG_MEM_HEAP_LIMIT.
- */
-#if defined (JERRY_GC_LIMIT) && (JERRY_GC_LIMIT != 0)
-#define CONFIG_GC_LIMIT JERRY_GC_LIMIT
-#else
-#define CONFIG_GC_LIMIT (JERRY_MIN (CONFIG_MEM_HEAP_SIZE / 32, CONFIG_MAX_GC_LIMIT))
-#endif
-
-/**
- * Amount of newly allocated objects since the last GC run, represented as a fraction of all allocated objects,
- * which when reached will trigger garbage collection to run with a low pressure setting.
- *
- * The fraction is calculated as:
- * 1.0 / CONFIG_ECMA_GC_NEW_OBJECTS_FRACTION
- */
-#define CONFIG_ECMA_GC_NEW_OBJECTS_FRACTION (16)
-
-#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)
-/**
- * Heap structure
- *
- * Memory blocks returned by the allocator must not start from the
- * beginning of the heap area because offset 0 is reserved for
- * JMEM_CP_NULL. This special constant is used in several places,
- * e.g. it marks the end of the property chain list, so it cannot
- * be eliminated from the project. Although the allocator cannot
- * use the first 8 bytes of the heap, nothing prevents to use it
- * for other purposes. Currently the free region start is stored
- * there.
- */
-typedef struct jmem_heap_t jmem_heap_t;
-#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */
-
-/**
- * User context item
- */
-typedef struct jerry_context_data_header
-{
- struct jerry_context_data_header *next_p; /**< pointer to next context item */
- const jerry_context_data_manager_t *manager_p; /**< manager responsible for deleting this item */
-} jerry_context_data_header_t;
-
-#define JERRY_CONTEXT_DATA_HEADER_USER_DATA(item_p) \
- ((uint8_t *) (item_p + 1))
-
-/**
- * First non-external member of the jerry context
- */
-#define JERRY_CONTEXT_FIRST_MEMBER ecma_builtin_objects
-
-/**
- * JerryScript context
- *
- * The purpose of this header is storing
- * all global variables for Jerry
- */
-struct jerry_context_t
-{
- /* The value of external context members must be preserved across initializations and cleanups. */
-#if ENABLED (JERRY_EXTERNAL_CONTEXT)
-#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)
- jmem_heap_t *heap_p; /**< point to the heap aligned to JMEM_ALIGNMENT. */
- uint32_t heap_size; /**< size of the heap */
-#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */
-#endif /* ENABLED (JERRY_EXTERNAL_CONTEXT) */
-
- /* Update JERRY_CONTEXT_FIRST_MEMBER if the first non-external member changes */
- jmem_cpointer_t ecma_builtin_objects[ECMA_BUILTIN_ID__COUNT]; /**< pointer to instances of built-in objects */
-#if ENABLED (JERRY_BUILTIN_REGEXP)
- const re_compiled_code_t *re_cache[RE_CACHE_SIZE]; /**< regex cache */
-#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
- jmem_cpointer_t ecma_gc_objects_cp; /**< List of currently alive objects. */
- jmem_heap_free_t *jmem_heap_list_skip_p; /**< This is used to speed up deallocation. */
- jmem_pools_chunk_t *jmem_free_8_byte_chunk_p; /**< list of free eight byte pool chunks */
-#if ENABLED (JERRY_CPOINTER_32_BIT)
- jmem_pools_chunk_t *jmem_free_16_byte_chunk_p; /**< list of free sixteen byte pool chunks */
-#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
- const lit_utf8_byte_t * const *lit_magic_string_ex_array; /**< array of external magic strings */
- const lit_utf8_size_t *lit_magic_string_ex_sizes; /**< external magic string lengths */
- jmem_cpointer_t string_list_first_cp; /**< first item of the literal string list */
-#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
- jmem_cpointer_t symbol_list_first_cp; /**< first item of the global symbol list */
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
- jmem_cpointer_t number_list_first_cp; /**< first item of the literal number list */
- jmem_cpointer_t ecma_global_lex_env_cp; /**< global lexical environment */
-
-#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
- ecma_module_t *ecma_modules_p; /**< list of referenced modules */
- ecma_module_context_t *module_top_context_p; /**< top (current) module parser context */
-#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
-
- vm_frame_ctx_t *vm_top_context_p; /**< top (current) interpreter context */
- jerry_context_data_header_t *context_data_p; /**< linked list of user-provided context-specific pointers */
- size_t ecma_gc_objects_number; /**< number of currently allocated objects */
- size_t ecma_gc_new_objects; /**< number of newly allocated objects since last GC session */
- size_t jmem_heap_allocated_size; /**< size of allocated regions */
- size_t jmem_heap_limit; /**< current limit of heap usage, that is upon being reached,
- * causes call of "try give memory back" callbacks */
- ecma_value_t error_value; /**< currently thrown error value */
- uint32_t lit_magic_string_ex_count; /**< external magic strings count */
- uint32_t jerry_init_flags; /**< run-time configuration flags */
- uint32_t status_flags; /**< run-time flags (the top 8 bits are used for passing class parsing options) */
-
-#if ENABLED (JERRY_PROPRETY_HASHMAP)
- uint8_t ecma_prop_hashmap_alloc_state; /**< property hashmap allocation state: 0-4,
- * if !0 property hashmap allocation is disabled */
-#endif /* ENABLED (JERRY_PROPRETY_HASHMAP) */
-
-#if ENABLED (JERRY_BUILTIN_REGEXP)
- uint8_t re_cache_idx; /**< evicted item index when regex cache is full (round-robin) */
-#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
-
-#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
- ecma_job_queueitem_t *job_queue_head_p; /**< points to the head item of the jobqueue */
- ecma_job_queueitem_t *job_queue_tail_p; /**< points to the tail item of the jobqueue*/
-#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
-
-#if ENABLED (JERRY_VM_EXEC_STOP)
- uint32_t vm_exec_stop_frequency; /**< reset value for vm_exec_stop_counter */
- uint32_t vm_exec_stop_counter; /**< down counter for reducing the calls of vm_exec_stop_cb */
- void *vm_exec_stop_user_p; /**< user pointer for vm_exec_stop_cb */
- ecma_vm_exec_stop_callback_t vm_exec_stop_cb; /**< user function which returns whether the
- * ECMAScript execution should be stopped */
-#endif /* ENABLED (JERRY_VM_EXEC_STOP) */
-
-#if (JERRY_STACK_LIMIT != 0)
- uintptr_t stack_base; /**< stack base marker */
-#endif /* (JERRY_STACK_LIMIT != 0) */
-
-#if ENABLED (JERRY_DEBUGGER)
- uint8_t debugger_send_buffer[JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE]; /**< buffer for sending messages */
- uint8_t debugger_receive_buffer[JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE]; /**< buffer for receiving messages */
- jerry_debugger_transport_header_t *debugger_transport_header_p; /**< head of transport protocol chain */
- uint8_t *debugger_send_buffer_payload_p; /**< start where the outgoing message can be written */
- vm_frame_ctx_t *debugger_stop_context; /**< stop only if the current context is equal to this context */
- uint8_t *debugger_exception_byte_code_p; /**< Location of the currently executed byte code if an
- * error occours while the vm_loop is suspended */
- jmem_cpointer_t debugger_byte_code_free_head; /**< head of byte code free linked list */
- jmem_cpointer_t debugger_byte_code_free_tail; /**< tail of byte code free linked list */
- uint32_t debugger_flags; /**< debugger flags */
- uint16_t debugger_received_length; /**< length of currently received bytes */
- uint8_t debugger_message_delay; /**< call receive message when reaches zero */
- uint8_t debugger_max_send_size; /**< maximum amount of data that can be sent */
- uint8_t debugger_max_receive_size; /**< maximum amount of data that can be received */
-#endif /* ENABLED (JERRY_DEBUGGER) */
-
-#if ENABLED (JERRY_LINE_INFO) || ENABLED (JERRY_ERROR_MESSAGES) || ENABLED (JERRY_ES2015_MODULE_SYSTEM)
- ecma_value_t resource_name; /**< resource name (usually a file name) */
-#endif /* ENABLED (JERRY_LINE_INFO) || ENABLED (JERRY_ERROR_MESSAGES) || ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
-
-#if ENABLED (JERRY_MEM_STATS)
- jmem_heap_stats_t jmem_heap_stats; /**< heap's memory usage statistics */
-#endif /* ENABLED (JERRY_MEM_STATS) */
-
- /* This must be at the end of the context for performance reasons */
-#if ENABLED (JERRY_LCACHE)
- /** hash table for caching the last access of properties */
- ecma_lcache_hash_entry_t lcache[ECMA_LCACHE_HASH_ROWS_COUNT][ECMA_LCACHE_HASH_ROW_LENGTH];
-#endif /* ENABLED (JERRY_LCACHE) */
-};
-
-
-#if ENABLED (JERRY_EXTERNAL_CONTEXT)
-
-/*
- * This part is for JerryScript which uses external context.
- */
-
-#define JERRY_CONTEXT(field) (jerry_port_get_current_context ()->field)
-
-#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)
-
-#define JMEM_HEAP_SIZE (JERRY_CONTEXT (heap_size))
-
-#define JMEM_HEAP_AREA_SIZE (JMEM_HEAP_SIZE - JMEM_ALIGNMENT)
-
-struct jmem_heap_t
-{
- jmem_heap_free_t first; /**< first node in free region list */
- uint8_t area[]; /**< heap area */
-};
-
-#define JERRY_HEAP_CONTEXT(field) (JERRY_CONTEXT (heap_p)->field)
-
-#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */
-
-#else /* !ENABLED (JERRY_EXTERNAL_CONTEXT) */
-
-/*
- * This part is for JerryScript which uses default context.
- */
-
-/**
- * Global context.
- */
-extern jerry_context_t jerry_global_context;
-
-/**
- * Provides a reference to a field in the current context.
- */
-#define JERRY_CONTEXT(field) (jerry_global_context.field)
-
-#if !ENABLED (JERRY_SYSTEM_ALLOCATOR)
-
-/**
-* Size of heap
-*/
-#define JMEM_HEAP_SIZE ((size_t) (CONFIG_MEM_HEAP_SIZE))
-
-/**
- * Calculate heap area size, leaving space for a pointer to the free list
- */
-#define JMEM_HEAP_AREA_SIZE (JMEM_HEAP_SIZE - JMEM_ALIGNMENT)
-
-struct jmem_heap_t
-{
- jmem_heap_free_t first; /**< first node in free region list */
- uint8_t area[JMEM_HEAP_AREA_SIZE]; /**< heap area */
-}__attribute__((aligned(8)));
-
-/**
- * Global heap.
- */
-extern jmem_heap_t jerry_global_heap;
-
-/**
- * Provides a reference to a field of the heap.
- */
-#define JERRY_HEAP_CONTEXT(field) (jerry_global_heap.field)
-
-#endif /* !ENABLED (JERRY_SYSTEM_ALLOCATOR) */
-
-#endif /* ENABLED (JERRY_EXTERNAL_CONTEXT) */
-
-/**
- * @}
- */
-
-#endif /* !JCONTEXT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYSCRIPT_DEBUGGER_TRANSPORT_H
-#define JERRYSCRIPT_DEBUGGER_TRANSPORT_H
-
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-/** \addtogroup jerry-debugger-transport Jerry engine debugger interface - transport control
- * @{
- */
-
-/**
- * Maximum number of bytes transmitted or received.
- */
-#define JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE 128
-
-/**
- * Receive message context.
- */
-typedef struct
-{
- uint8_t *buffer_p; /**< buffer for storing the received data */
- size_t received_length; /**< number of currently received bytes */
- uint8_t *message_p; /**< start of the received message */
- size_t message_length; /**< length of the received message */
- size_t message_total_length; /**< total length for datagram protocols,
- * 0 for stream protocols */
-} jerry_debugger_transport_receive_context_t;
-
-/**
- * Forward definition of jerry_debugger_transport_header_t.
- */
-struct jerry_debugger_transport_interface_t;
-
-/**
- * Close connection callback.
- */
-typedef void (*jerry_debugger_transport_close_t) (struct jerry_debugger_transport_interface_t *header_p);
-
-/**
- * Send data callback.
- */
-typedef bool (*jerry_debugger_transport_send_t) (struct jerry_debugger_transport_interface_t *header_p,
- uint8_t *message_p, size_t message_length);
-
-/**
- * Receive data callback.
- */
-typedef bool (*jerry_debugger_transport_receive_t) (struct jerry_debugger_transport_interface_t *header_p,
- jerry_debugger_transport_receive_context_t *context_p);
-
-/**
- * Transport layer header.
- */
-typedef struct jerry_debugger_transport_interface_t
-{
- /* The following fields must be filled before calling jerry_debugger_transport_add(). */
- jerry_debugger_transport_close_t close; /**< close connection callback */
- jerry_debugger_transport_send_t send; /**< send data callback */
- jerry_debugger_transport_receive_t receive; /**< receive data callback */
-
- /* The following fields are filled by jerry_debugger_transport_add(). */
- struct jerry_debugger_transport_interface_t *next_p; /**< next transport layer */
-} jerry_debugger_transport_header_t;
-
-void jerry_debugger_transport_add (jerry_debugger_transport_header_t *header_p,
- size_t send_message_header_size, size_t max_send_message_size,
- size_t receive_message_header_size, size_t max_receive_message_size);
-void jerry_debugger_transport_start (void);
-
-bool jerry_debugger_transport_is_connected (void);
-void jerry_debugger_transport_close (void);
-
-bool jerry_debugger_transport_send (const uint8_t *message_p, size_t message_length);
-bool jerry_debugger_transport_receive (jerry_debugger_transport_receive_context_t *context_p);
-void jerry_debugger_transport_receive_completed (jerry_debugger_transport_receive_context_t *context_p);
-
-void jerry_debugger_transport_sleep (void);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* !JERRYSCRIPT_DEBUGGER_TRANSPORT_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JMEM_ALLOCATOR_INTERNAL_H
-#define JMEM_ALLOCATOR_INTERNAL_H
-
-#ifndef JMEM_ALLOCATOR_INTERNAL
-# error "The header is for internal routines of memory allocator component. Please, don't use the routines directly."
-#endif /* !JMEM_ALLOCATOR_INTERNAL */
-
-/** \addtogroup mem Memory allocation
- * @{
- */
-
-/**
- * @{
- * Valgrind-related options and headers
- */
-#if ENABLED (JERRY_VALGRIND)
-# include "memcheck.h"
-
-# define JMEM_VALGRIND_NOACCESS_SPACE(p, s) VALGRIND_MAKE_MEM_NOACCESS((p), (s))
-# define JMEM_VALGRIND_UNDEFINED_SPACE(p, s) VALGRIND_MAKE_MEM_UNDEFINED((p), (s))
-# define JMEM_VALGRIND_DEFINED_SPACE(p, s) VALGRIND_MAKE_MEM_DEFINED((p), (s))
-# define JMEM_VALGRIND_MALLOCLIKE_SPACE(p, s) VALGRIND_MALLOCLIKE_BLOCK((p), (s), 0, 0)
-# define JMEM_VALGRIND_RESIZE_SPACE(p, o, n) VALGRIND_RESIZEINPLACE_BLOCK((p), (o), (n), 0)
-# define JMEM_VALGRIND_FREELIKE_SPACE(p) VALGRIND_FREELIKE_BLOCK((p), 0)
-#else /* !ENABLED (JERRY_VALGRIND) */
-# define JMEM_VALGRIND_NOACCESS_SPACE(p, s)
-# define JMEM_VALGRIND_UNDEFINED_SPACE(p, s)
-# define JMEM_VALGRIND_DEFINED_SPACE(p, s)
-# define JMEM_VALGRIND_MALLOCLIKE_SPACE(p, s)
-# define JMEM_VALGRIND_RESIZE_SPACE(p, o, n)
-# define JMEM_VALGRIND_FREELIKE_SPACE(p)
-#endif /* ENABLED (JERRY_VALGRIND) */
-/** @} */
-
-void jmem_heap_init (void);
-void jmem_heap_finalize (void);
-bool jmem_is_heap_pointer (const void *pointer);
-void *jmem_heap_alloc_block_internal (const size_t size);
-void jmem_heap_free_block_internal (void *ptr, const size_t size);
-
-/**
- * \addtogroup poolman Memory pool manager
- * @{
- */
-
-void jmem_pools_finalize (void);
-
-/**
- * @}
- * @}
- */
-
-/**
- * @{
- * Jerry mem-stat definitions
- */
-#if ENABLED (JERRY_MEM_STATS)
-void jmem_heap_stat_init (void);
-void jmem_heap_stat_alloc (size_t num);
-void jmem_heap_stat_free (size_t num);
-
-#define JMEM_HEAP_STAT_INIT() jmem_heap_stat_init ()
-#define JMEM_HEAP_STAT_ALLOC(v1) jmem_heap_stat_alloc (v1)
-#define JMEM_HEAP_STAT_FREE(v1) jmem_heap_stat_free (v1)
-#else /* !ENABLED (JERRY_MEM_STATS) */
-#define JMEM_HEAP_STAT_INIT()
-#define JMEM_HEAP_STAT_ALLOC(v1) JERRY_UNUSED (v1)
-#define JMEM_HEAP_STAT_FREE(v1) JERRY_UNUSED (v1)
-#endif /* ENABLED (JERRY_MEM_STATS) */
-
-/** @} */
-
-#endif /* !JMEM_ALLOCATOR_INTERNAL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JRT_BIT_FIELDS_H
-#define JRT_BIT_FIELDS_H
-
-/**
- * Extract a bit-field.
- *
- * @param type type of container
- * @param container container to extract bit-field from
- * @param lsb least significant bit of the value to be extracted
- * @param width width of the bit-field to be extracted
- * @return bit-field's value
- */
-#define JRT_EXTRACT_BIT_FIELD(type, container, lsb, width) \
- (((container) >> lsb) & ((((type) 1) << (width)) - 1))
-
-/**
- * Set a bit-field.
- *
- * @param type type of container
- * @param container container to insert bit-field to
- * @param new_bit_field_value value of bit-field to insert
- * @param lsb least significant bit of the value to be inserted
- * @param width width of the bit-field to be inserted
- * @return bit-field's value
- */
-#define JRT_SET_BIT_FIELD_VALUE(type, container, new_bit_field_value, lsb, width) \
- (((container) & ~(((((type) 1) << (width)) - 1) << (lsb))) | (((type) new_bit_field_value) << (lsb)))
-
-#endif /* !JRT_BIT_FIELDS_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JRT_LIBC_INCLUDES_H
-#define JRT_LIBC_INCLUDES_H
-
-#include <ctype.h>
-#include <setjmp.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#endif /* !JRT_LIBC_INCLUDES_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JS_LEXER_H
-#define JS_LEXER_H
-
-/** \addtogroup parser Parser
- * @{
- *
- * \addtogroup jsparser JavaScript
- * @{
- *
- * \addtogroup jsparser_lexer Lexer
- * @{
- */
-
-/**
- * Lexer token types.
- */
-typedef enum
-{
- LEXER_EOS, /**< end of source */
-
- /* Primary expressions */
- LEXER_LITERAL, /**< literal token */
- LEXER_KEYW_THIS, /**< this */
- LEXER_LIT_TRUE, /**< true (not a keyword!) */
- LEXER_LIT_FALSE, /**< false (not a keyword!) */
- LEXER_LIT_NULL, /**< null (not a keyword!) */
-#if ENABLED (JERRY_ES2015_TEMPLATE_STRINGS)
- LEXER_TEMPLATE_LITERAL, /**< multi segment template literal */
-#endif /* ENABLED (JERRY_ES2015_TEMPLATE_STRINGS) */
-#if ENABLED (JERRY_ES2015_FUNCTION_REST_PARAMETER)
- LEXER_THREE_DOTS, /**< ... (rest or spread operator) */
-#endif /* ENABLED (JERRY_ES2015_FUNCTION_REST_PARAMETER) */
-
- /* Unary operators
- * IMPORTANT: update CBC_UNARY_OP_TOKEN_TO_OPCODE and
- * CBC_UNARY_LVALUE_OP_TOKEN_TO_OPCODE after changes. */
-#define LEXER_IS_UNARY_OP_TOKEN(token_type) \
- ((token_type) >= LEXER_PLUS && (token_type) <= LEXER_DECREASE)
-#define LEXER_IS_UNARY_LVALUE_OP_TOKEN(token_type) \
- ((token_type) >= LEXER_KEYW_DELETE && (token_type) <= LEXER_DECREASE)
-
- LEXER_PLUS, /**< "+" */
- LEXER_NEGATE, /**< "-" */
- LEXER_LOGICAL_NOT, /**< "!" */
- LEXER_BIT_NOT, /**< "~" */
- LEXER_KEYW_VOID, /**< void */
- LEXER_KEYW_TYPEOF, /**< typeof */
- LEXER_KEYW_DELETE, /**< delete */
- LEXER_INCREASE, /**< "++" */
- LEXER_DECREASE, /**< "--" */
-
- /* Binary operators
- * IMPORTANT: update CBC_BINARY_OP_TOKEN_TO_OPCODE,
- * CBC_BINARY_LVALUE_OP_TOKEN_TO_OPCODE and
- * parser_binary_precedence_table after changes. */
-#define LEXER_IS_BINARY_OP_TOKEN(token_type) \
- ((token_type) >= LEXER_ASSIGN && (token_type) <= LEXER_MODULO)
-#define LEXER_IS_BINARY_LVALUE_TOKEN(token_type) \
- ((token_type) >= LEXER_ASSIGN && (token_type) <= LEXER_ASSIGN_BIT_XOR)
-#define LEXER_FIRST_BINARY_OP LEXER_ASSIGN
-
- LEXER_ASSIGN, /**< "=" (prec: 3) */
- LEXER_ASSIGN_ADD, /**< "+=" (prec: 3) */
- LEXER_ASSIGN_SUBTRACT, /**< "-=" (prec: 3) */
- LEXER_ASSIGN_MULTIPLY, /**< "*=" (prec: 3) */
- LEXER_ASSIGN_DIVIDE, /**< "/=" (prec: 3) */
- LEXER_ASSIGN_MODULO, /**< "%=" (prec: 3) */
- LEXER_ASSIGN_LEFT_SHIFT, /**< "<<=" (prec: 3) */
- LEXER_ASSIGN_RIGHT_SHIFT, /**< ">>=" (prec: 3) */
- LEXER_ASSIGN_UNS_RIGHT_SHIFT, /**< ">>>=" (prec: 3) */
- LEXER_ASSIGN_BIT_AND, /**< "&=" (prec: 3) */
- LEXER_ASSIGN_BIT_OR, /**< "|=" (prec: 3) */
- LEXER_ASSIGN_BIT_XOR, /**< "^=" (prec: 3) */
- LEXER_QUESTION_MARK, /**< "?" (prec: 4) */
- LEXER_LOGICAL_OR, /**< "||" (prec: 5) */
- LEXER_LOGICAL_AND, /**< "&&" (prec: 6) */
- LEXER_BIT_OR, /**< "|" (prec: 7) */
- LEXER_BIT_XOR, /**< "^" (prec: 8) */
- LEXER_BIT_AND, /**< "&" (prec: 9) */
- LEXER_EQUAL, /**< "==" (prec: 10) */
- LEXER_NOT_EQUAL, /**< "!=" (prec: 10) */
- LEXER_STRICT_EQUAL, /**< "===" (prec: 10) */
- LEXER_STRICT_NOT_EQUAL, /**< "!==" (prec: 10) */
- LEXER_LESS, /**< "<" (prec: 11) */
- LEXER_GREATER, /**< ">" (prec: 11) */
- LEXER_LESS_EQUAL, /**< "<=" (prec: 11) */
- LEXER_GREATER_EQUAL, /**< ">=" (prec: 11) */
- LEXER_KEYW_IN, /**< in (prec: 11) */
- LEXER_KEYW_INSTANCEOF, /**< instanceof (prec: 11) */
- LEXER_LEFT_SHIFT, /**< "<<" (prec: 12) */
- LEXER_RIGHT_SHIFT, /**< ">>" (prec: 12) */
- LEXER_UNS_RIGHT_SHIFT, /**< ">>>" (prec: 12) */
- LEXER_ADD, /**< "+" (prec: 13) */
- LEXER_SUBTRACT, /**< "-" (prec: 13) */
- LEXER_MULTIPLY, /**< "*" (prec: 14) */
- LEXER_DIVIDE, /**< "/" (prec: 14) */
- LEXER_MODULO, /**< "%" (prec: 14) */
-
- LEXER_LEFT_BRACE, /**< "{" */
- LEXER_LEFT_PAREN, /**< "(" */
- LEXER_LEFT_SQUARE, /**< "[" */
- LEXER_RIGHT_BRACE, /**< "}" */
- LEXER_RIGHT_PAREN, /**< ")" */
- LEXER_RIGHT_SQUARE, /**< "]" */
- LEXER_DOT, /**< "." */
- LEXER_SEMICOLON, /**< ";" */
- LEXER_COLON, /**< ":" */
- LEXER_COMMA, /**< "," */
-#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
- LEXER_ARROW, /**< "=>" */
-#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
-
- LEXER_KEYW_BREAK, /**< break */
- LEXER_KEYW_DO, /**< do */
- LEXER_KEYW_CASE, /**< case */
- LEXER_KEYW_ELSE, /**< else */
- LEXER_KEYW_NEW, /**< new */
- LEXER_KEYW_VAR, /**< var */
- LEXER_KEYW_CATCH, /**< catch */
- LEXER_KEYW_FINALLY, /**< finally */
- LEXER_KEYW_RETURN, /**< return */
- LEXER_KEYW_CONTINUE, /**< continue */
- LEXER_KEYW_FOR, /**< for */
- LEXER_KEYW_SWITCH, /**< switch */
- LEXER_KEYW_WHILE, /**< while */
- LEXER_KEYW_DEBUGGER, /**< debugger */
- LEXER_KEYW_FUNCTION, /**< function */
- LEXER_KEYW_WITH, /**< with */
- LEXER_KEYW_DEFAULT, /**< default */
- LEXER_KEYW_IF, /**< if */
- LEXER_KEYW_THROW, /**< throw */
- LEXER_KEYW_TRY, /**< try */
-
- /* These are virtual tokens. */
- LEXER_EXPRESSION_START, /**< expression start */
- LEXER_PROPERTY_GETTER, /**< property getter function */
- LEXER_PROPERTY_SETTER, /**< property setter function */
- LEXER_COMMA_SEP_LIST, /**< comma separated bracketed expression list */
- LEXER_SCAN_SWITCH, /**< special value for switch pre-scan */
- LEXER_CLASS_CONSTRUCTOR, /**< special value for class constructor method */
-#if ENABLED (JERRY_ES2015_FOR_OF)
- LEXER_FOR_IN_OF, /**< special value during for in/of statmenet scanning */
- LEXER_LITERAL_OF, /**< 'of' literal */
-#endif /* ENABLED (JERRY_ES2015_FOR_OF) */
-
-#if !ENABLED (JERRY_ES2015)
- /* Future reserved words: these keywords
- * must form a group after all other keywords. */
-#define LEXER_FIRST_FUTURE_RESERVED_WORD LEXER_KEYW_CLASS
-#endif /* !ENABLED (JERRY_ES2015) */
- LEXER_KEYW_CLASS, /**< class */
- LEXER_KEYW_EXTENDS, /**< extends */
- LEXER_KEYW_SUPER, /**< super */
- LEXER_KEYW_CONST, /**< const */
- LEXER_KEYW_EXPORT, /**< export */
- LEXER_KEYW_IMPORT, /**< import */
-#if ENABLED (JERRY_ES2015)
- /* Future reserved words: these keywords
- * must form a group after all other keywords.
- * Note:
- * Tokens from LEXER_KEYW_CLASS to LEXER_KEYW_IMPORT
- * are no longer future reserved words in ES2015. */
-#define LEXER_FIRST_FUTURE_RESERVED_WORD LEXER_KEYW_ENUM
-#endif /* ENABLED (JERRY_ES2015) */
- LEXER_KEYW_ENUM, /**< enum */
-#if ENABLED (JERRY_ES2015)
- LEXER_KEYW_AWAIT, /**< await */
-#endif /* ENABLED (JERRY_ES2015) */
-
- /* Future strict reserved words: these keywords
- * must form a group after future reserved words. */
-#define LEXER_FIRST_FUTURE_STRICT_RESERVED_WORD LEXER_KEYW_IMPLEMENTS
- LEXER_KEYW_IMPLEMENTS, /**< implements */
- LEXER_KEYW_PRIVATE, /**< private */
- LEXER_KEYW_PUBLIC, /**< public */
- LEXER_KEYW_INTERFACE, /**< interface */
- LEXER_KEYW_PACKAGE, /**< package */
- LEXER_KEYW_PROTECTED, /**< protected */
-
-#if ENABLED (JERRY_ES2015)
- /* Context dependent strict reserved words:
- * See also: ECMA-262 v6, 11.6.2.1 */
-#define LEXER_FIRST_CONTEXT_DEPENDENT_RESERVED_WORD LEXER_KEYW_STATIC
- LEXER_KEYW_STATIC, /**< static */
-#else /* !ENABLED (JERRY_ES2015) */
- /* Context dependent strict reserved words:
- * See also: ECMA-262 v6, 11.6.2.1 */
-#define LEXER_FIRST_CONTEXT_DEPENDENT_RESERVED_WORD
-#endif /* ENABLED (JERRY_ES2015) */
-
- /* Context dependent future strict reserved words:
- * See also: ECMA-262 v6, 11.6.2.1 */
-#define LEXER_FIRST_CONTEXT_DEPENDENT_FUTURE_RESERVED_WORD LEXER_KEYW_LET
- LEXER_KEYW_LET, /**< let */
- LEXER_KEYW_YIELD, /**< yield */
-#if !ENABLED (JERRY_ES2015)
- LEXER_KEYW_STATIC, /**< static */
-#endif /* !ENABLED (JERRY_ES2015) */
-} lexer_token_type_t;
-
-#define LEXER_NEWLINE_LS_PS_BYTE_1 0xe2
-#define LEXER_NEWLINE_LS_PS_BYTE_23(source) \
- ((source)[1] == LIT_UTF8_2_BYTE_CODE_POINT_MIN && ((source)[2] | 0x1) == 0xa9)
-#define LEXER_UTF8_4BYTE_START 0xf0
-
-#define LEXER_IS_LEFT_BRACKET(type) \
- ((type) == LEXER_LEFT_BRACE || (type) == LEXER_LEFT_PAREN || (type) == LEXER_LEFT_SQUARE)
-
-#define LEXER_IS_RIGHT_BRACKET(type) \
- ((type) == LEXER_RIGHT_BRACE || (type) == LEXER_RIGHT_PAREN || (type) == LEXER_RIGHT_SQUARE)
-
-#define LEXER_UNARY_OP_TOKEN_TO_OPCODE(token_type) \
- ((((token_type) - LEXER_PLUS) * 2) + CBC_PLUS)
-
-#define LEXER_UNARY_LVALUE_OP_TOKEN_TO_OPCODE(token_type) \
- ((((token_type) - LEXER_INCREASE) * 6) + CBC_PRE_INCR)
-
-#define LEXER_BINARY_OP_TOKEN_TO_OPCODE(token_type) \
- ((cbc_opcode_t) ((((token_type) - LEXER_BIT_OR) * 3) + CBC_BIT_OR))
-
-#define LEXER_BINARY_LVALUE_OP_TOKEN_TO_OPCODE(token_type) \
- ((cbc_opcode_t) ((((token_type) - LEXER_ASSIGN_ADD) * 2) + CBC_ASSIGN_ADD))
-
-/**
- * Lexer newline flags.
- */
-typedef enum
-{
- LEXER_WAS_NEWLINE = (1u << 0), /**< newline was seen */
- LEXER_NO_SKIP_SPACES = (1u << 1) /**< ignore skip spaces */
-} lexer_newline_flags_t;
-
-/**
- * Lexer object identifier parse options.
- */
-typedef enum
-{
- LEXER_OBJ_IDENT_NO_OPTS = (1u << 0), /**< no options */
- LEXER_OBJ_IDENT_ONLY_IDENTIFIERS = (1u << 1), /**< only identifiers are accepted */
- LEXER_OBJ_IDENT_CLASS_METHOD = (1u << 2), /**< expect identifier inside a class body */
-} lexer_obj_ident_opts_t;
-
-/**
- * Lexer scan identifier parse options.
- */
-typedef enum
-{
- LEXER_SCAN_IDENT_NO_OPTS = (1u << 0), /**< no options */
- LEXER_SCAN_IDENT_PROPERTY = (1u << 1), /**< scan valid property names */
- LEXER_SCAN_IDENT_NO_KEYW = (1u << 2), /**< don't scan keywords (e.g. get/set) */
-#if ENABLED (JERRY_ES2015_CLASS)
- LEXER_SCAN_CLASS_PROPERTY = (1u << 3), /**< scan valid class property names */
- LEXER_SCAN_CLASS_LEFT_PAREN = (1u << 4), /**< also parse left parenthesis */
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
-} lexer_scan_ident_opts_t;
-
-/**
- * Lexer literal object types.
- */
-typedef enum
-{
- LEXER_LITERAL_OBJECT_ANY, /**< unspecified object type */
- LEXER_LITERAL_OBJECT_EVAL, /**< reference is equal to eval */
- LEXER_LITERAL_OBJECT_ARGUMENTS, /**< reference is equal to arguments */
-} lexer_literal_object_type_t;
-
-/**
- * Lexer number types.
- */
-typedef enum
-{
- LEXER_NUMBER_DECIMAL, /**< decimal number */
- LEXER_NUMBER_HEXADECIMAL, /**< hexadecimal number */
- LEXER_NUMBER_OCTAL, /**< octal number */
-} lexer_number_type_t;
-
-/**
- * Lexer character (string / identifier) literal data.
- */
-typedef struct
-{
- const uint8_t *char_p; /**< start of identifier or string token */
- prop_length_t length; /**< length or index of a literal */
- uint8_t type; /**< type of the current literal */
- uint8_t has_escape; /**< has escape sequences */
-} lexer_lit_location_t;
-
-/**
- * Lexer token.
- */
-typedef struct
-{
- uint8_t type; /**< token type */
- uint8_t literal_is_reserved; /**< future reserved keyword
- * (when char_literal.type is LEXER_IDENT_LITERAL) */
- uint8_t extra_value; /**< helper value for different purposes */
- uint8_t flags; /**< flag bits for the current token */
- parser_line_counter_t line; /**< token start line */
- parser_line_counter_t column; /**< token start column */
- lexer_lit_location_t lit_location; /**< extra data for character literals */
-} lexer_token_t;
-
-/**
- * Literal data set by lexer_construct_literal_object.
- */
-typedef struct
-{
- lexer_literal_t *literal_p; /**< pointer to the literal object */
- uint16_t index; /**< literal index */
- uint8_t type; /**< literal object type */
-} lexer_lit_object_t;
-
-/**
- * @}
- * @}
- * @}
- */
-
-#endif /* !JS_LEXER_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JS_PARSER_INTERNAL_H
-#define JS_PARSER_INTERNAL_H
-
-#include "common.h"
-
-#include "byte-code.h"
-#include "debugger.h"
-#include "js-parser.h"
-#include "js-parser-limits.h"
-#include "js-lexer.h"
-#include "js-scanner.h"
-
-#include "ecma-module.h"
-
-/** \addtogroup parser Parser
- * @{
- *
- * \addtogroup jsparser JavaScript
- * @{
- *
- * \addtogroup jsparser_internals Internals
- * @{
- */
-
-/**
- * General parser flags.
- */
-typedef enum
-{
- PARSER_IS_STRICT = (1u << 0), /**< strict mode code */
- PARSER_IS_FUNCTION = (1u << 1), /**< function body is parsed */
- PARSER_IS_CLOSURE = (1u << 2), /**< function body is encapsulated in {} block */
- PARSER_IS_FUNC_EXPRESSION = (1u << 3), /**< a function expression is parsed */
- PARSER_IS_PROPERTY_GETTER = (1u << 4), /**< a property getter function is parsed */
- PARSER_IS_PROPERTY_SETTER = (1u << 5), /**< a property setter function is parsed */
-#if ENABLED (JERRY_ES2015_FUNCTION_REST_PARAMETER)
- PARSER_FUNCTION_HAS_REST_PARAM = (1u << 6), /**< function has rest parameter */
-#endif /* ENABLED (JERRY_ES2015_FUNCTION_REST_PARAMETER) */
- PARSER_HAS_NON_STRICT_ARG = (1u << 7), /**< the function has arguments which
- * are not supported in strict mode */
- PARSER_ARGUMENTS_NEEDED = (1u << 8), /**< arguments object must be created */
- PARSER_ARGUMENTS_NOT_NEEDED = (1u << 9), /**< arguments object must NOT be created */
- PARSER_LEXICAL_ENV_NEEDED = (1u << 10), /**< lexical environment object must be created */
- PARSER_NO_REG_STORE = (1u << 11), /**< all local variables must be stored
- * in the lexical environment object */
- PARSER_INSIDE_WITH = (1u << 12), /**< code block is inside a with statement */
- PARSER_RESOLVE_BASE_FOR_CALLS = (1u << 13), /**< the this object must be resolved when
- * a function without a base object is called */
- PARSER_HAS_INITIALIZED_VARS = (1u << 14), /**< a CBC_INITIALIZE_VARS instruction must be emitted */
- PARSER_HAS_LATE_LIT_INIT = (1u << 15), /**< allocate memory for this string after
- * the local parser data is freed */
- PARSER_NO_END_LABEL = (1u << 16), /**< return instruction must be inserted
- * after the last byte code */
- PARSER_DEBUGGER_BREAKPOINT_APPENDED = (1u << 17), /**< pending (unsent) breakpoint
- * info is available */
-#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
- PARSER_IS_ARROW_FUNCTION = (1u << 18), /**< an arrow function is parsed */
- PARSER_ARROW_PARSE_ARGS = (1u << 19), /**< parse the argument list of an arrow function */
-#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
-#if ENABLED (JERRY_ES2015_CLASS)
- /* These four status flags must be in this order. See PARSER_CLASS_PARSE_OPTS_OFFSET. */
- PARSER_CLASS_CONSTRUCTOR = (1u << 20), /**< a class constructor is parsed (this value must be kept in
- * in sync with ECMA_PARSE_CLASS_CONSTRUCTOR) */
- PARSER_CLASS_HAS_SUPER = (1u << 21), /**< class has super reference */
- PARSER_CLASS_IMPLICIT_SUPER = (1u << 22), /**< class has implicit parent class */
- PARSER_CLASS_STATIC_FUNCTION = (1u << 23), /**< this function is a static class method */
- PARSER_CLASS_SUPER_PROP_REFERENCE = (1u << 24), /**< super property call or assignment */
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
-#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
- PARSER_MODULE_DEFAULT_CLASS_OR_FUNC = (1u << 25), /**< parsing a function or class default export */
- PARSER_MODULE_STORE_IDENT = (1u << 26), /**< store identifier of the current export statement */
- PARSER_IS_EVAL = (1u << 27), /**< eval code */
-#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
-#ifndef JERRY_NDEBUG
- PARSER_SCANNING_SUCCESSFUL = (1u << 30), /**< scanning process was successful */
-#endif /* !JERRY_NDEBUG */
-} parser_general_flags_t;
-
-/**
- * Expression parsing flags.
- */
-typedef enum
-{
- PARSE_EXPR = 0, /**< parse an expression without any special flags */
- PARSE_EXPR_NO_PUSH_RESULT = (1u << 0), /**< do not push the result of the expression onto the stack */
- PARSE_EXPR_NO_COMMA = (1u << 1), /**< do not parse comma operator */
- PARSE_EXPR_HAS_LITERAL = (1u << 2), /**< a primary literal is provided by a
- * CBC_PUSH_LITERAL instruction */
-} parser_expression_flags_t;
-
-/**
- * Mask for strict mode code
- */
-#define PARSER_STRICT_MODE_MASK 0x1
-
-#if ENABLED (JERRY_ES2015_CLASS)
-/**
- * Offset between PARSER_CLASS_CONSTRUCTOR and ECMA_PARSE_CLASS_CONSTRUCTOR
- */
-#define PARSER_CLASS_PARSE_OPTS_OFFSET \
- (JERRY_LOG2 (PARSER_CLASS_CONSTRUCTOR) - JERRY_LOG2 (ECMA_PARSE_CLASS_CONSTRUCTOR))
-
-/**
- * Count of ecma_parse_opts_t class parsing options related bits
- */
-#define PARSER_CLASS_PARSE_OPTS_COUNT \
- (JERRY_LOG2 (ECMA_PARSE_HAS_STATIC_SUPER) - JERRY_LOG2 (ECMA_PARSE_CLASS_CONSTRUCTOR))
-
-/**
- * Mask for get class option bits from ecma_parse_opts_t
- */
-#define PARSER_CLASS_ECMA_PARSE_OPTS_TO_PARSER_OPTS_MASK \
- (((1 << PARSER_CLASS_PARSE_OPTS_COUNT) - 1) << JERRY_LOG2 (ECMA_PARSE_CLASS_CONSTRUCTOR))
-
-/**
- * Get class option bits from ecma_parse_opts_t
- */
-#define PARSER_GET_CLASS_PARSER_OPTS(opts) \
- (((opts) & PARSER_CLASS_ECMA_PARSE_OPTS_TO_PARSER_OPTS_MASK) << PARSER_CLASS_PARSE_OPTS_OFFSET)
-
-/**
- * Get class option bits from parser_general_flags_t
- */
-#define PARSER_GET_CLASS_ECMA_PARSE_OPTS(opts) \
- ((uint16_t) (((opts) >> PARSER_CLASS_PARSE_OPTS_OFFSET) & PARSER_CLASS_ECMA_PARSE_OPTS_TO_PARSER_OPTS_MASK))
-
-/**
- * Class constructor with heritage context representing bits
- */
-#define PARSER_CLASS_CONSTRUCTOR_SUPER (PARSER_CLASS_CONSTRUCTOR | PARSER_CLASS_HAS_SUPER)
-
-/**
- * Check the scope is a class constructor with heritage context
- */
-#define PARSER_IS_CLASS_CONSTRUCTOR_SUPER(flag) \
- (((flag) & PARSER_CLASS_CONSTRUCTOR_SUPER) == PARSER_CLASS_CONSTRUCTOR_SUPER)
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
-
-/* The maximum of PARSER_CBC_STREAM_PAGE_SIZE is 127. */
-#define PARSER_CBC_STREAM_PAGE_SIZE \
- ((uint32_t) (64 - sizeof (void *)))
-
-#define PARSER_STACK_PAGE_SIZE \
- ((uint32_t) (((sizeof (void *) > 4) ? 128 : 64) - sizeof (void *)))
-
-/* Avoid compiler warnings for += operations. */
-#define PARSER_PLUS_EQUAL_U16(base, value) (base) = (uint16_t) ((base) + (value))
-#define PARSER_MINUS_EQUAL_U16(base, value) (base) = (uint16_t) ((base) - (value))
-#define PARSER_PLUS_EQUAL_LC(base, value) (base) = (parser_line_counter_t) ((base) + (value))
-
-/**
- * Argument for a compact-byte code.
- */
-typedef struct
-{
- uint16_t literal_index; /**< literal index argument */
- uint16_t value; /**< other argument (second literal or byte). */
- uint16_t third_literal_index; /**< literal index argument */
- uint8_t literal_type; /**< last literal type */
- uint8_t literal_object_type; /**< last literal object type */
-} cbc_argument_t;
-
-/* Useful parser macros. */
-
-#define PARSER_CBC_UNAVAILABLE CBC_EXT_OPCODE
-
-#define PARSER_TO_EXT_OPCODE(opcode) ((uint16_t) ((opcode) + 256))
-#define PARSER_GET_EXT_OPCODE(opcode) ((opcode) - 256)
-#define PARSER_IS_BASIC_OPCODE(opcode) ((opcode) < 256)
-#define PARSER_IS_PUSH_LITERAL(opcode) \
- ((opcode) == CBC_PUSH_LITERAL \
- || (opcode) == CBC_PUSH_TWO_LITERALS \
- || (opcode) == CBC_PUSH_THREE_LITERALS)
-#define PARSER_IS_PUSH_NUMBER(opcode) \
- ((opcode) == CBC_PUSH_NUMBER_0 \
- || (opcode) == CBC_PUSH_NUMBER_POS_BYTE \
- || (opcode) == CBC_PUSH_NUMBER_NEG_BYTE \
- || (opcode) == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_0) \
- || (opcode) == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_POS_BYTE) \
- || (opcode) == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_NEG_BYTE))
-
-#define PARSER_IS_MUTABLE_PUSH_LITERAL(opcode) \
- ((opcode) >= CBC_PUSH_LITERAL && (opcode) <= CBC_PUSH_THIS_LITERAL)
-
-#define PARSER_IS_PUSH_LITERALS_WITH_THIS(opcode) \
- ((opcode) >= CBC_PUSH_LITERAL && (opcode) <= CBC_PUSH_THREE_LITERALS)
-
-#define PARSER_IS_PUSH_PROP(opcode) \
- ((opcode) >= CBC_PUSH_PROP && (opcode) <= CBC_PUSH_PROP_THIS_LITERAL)
-
-#define PARSER_IS_PUSH_PROP_LITERAL(opcode) \
- ((opcode) >= CBC_PUSH_PROP_LITERAL && (opcode) <= CBC_PUSH_PROP_THIS_LITERAL)
-
-#define PARSER_PUSH_LITERAL_TO_PUSH_PROP_LITERAL(opcode) \
- (uint16_t) ((opcode) + (CBC_PUSH_PROP_LITERAL - CBC_PUSH_LITERAL))
-
-#define PARSER_PUSH_PROP_LITERAL_TO_PUSH_LITERAL(opcode) \
- (uint16_t) ((opcode) - (CBC_PUSH_PROP_LITERAL - CBC_PUSH_LITERAL))
-
-#define PARSER_PUSH_PROP_TO_PUSH_PROP_REFERENCE(opcode) \
- (uint16_t) ((opcode) + (CBC_PUSH_PROP_REFERENCE - CBC_PUSH_PROP))
-
-#define PARSER_PUSH_PROP_REFERENCE_TO_PUSH_PROP(opcode) \
- (uint16_t) ((opcode) - (CBC_PUSH_PROP_REFERENCE - CBC_PUSH_PROP))
-
-#define PARSER_GET_LITERAL(literal_index) \
- ((lexer_literal_t *) parser_list_get (&context_p->literal_pool, (literal_index)))
-
-#define PARSER_TO_BINARY_OPERATION_WITH_RESULT(opcode) \
- (PARSER_TO_EXT_OPCODE(opcode) - CBC_ASSIGN_ADD + CBC_EXT_ASSIGN_ADD_PUSH_RESULT)
-
-#define PARSER_TO_BINARY_OPERATION_WITH_BLOCK(opcode) \
- ((uint16_t) (PARSER_TO_EXT_OPCODE(opcode) - CBC_ASSIGN_ADD + CBC_EXT_ASSIGN_ADD_BLOCK))
-
-#define PARSER_GET_FLAGS(op) \
- (PARSER_IS_BASIC_OPCODE (op) ? cbc_flags[(op)] : cbc_ext_flags[PARSER_GET_EXT_OPCODE (op)])
-
-#define PARSER_OPCODE_IS_RETURN(op) \
- ((op) == CBC_RETURN || (op) == CBC_RETURN_WITH_BLOCK || (op) == CBC_RETURN_WITH_LITERAL)
-
-#define PARSER_ARGS_EQ(op, types) \
- ((PARSER_GET_FLAGS (op) & CBC_ARG_TYPES) == (types))
-
-/**
- * All data allocated by the parser is
- * stored in parser_data_pages in the memory.
- */
-typedef struct parser_mem_page_t
-{
- struct parser_mem_page_t *next_p; /**< next page */
- uint8_t bytes[1]; /**< memory bytes */
-} parser_mem_page_t;
-
-/**
- * Structure for managing parser memory.
- */
-typedef struct
-{
- parser_mem_page_t *first_p; /**< first allocated page */
- parser_mem_page_t *last_p; /**< last allocated page */
- uint32_t last_position; /**< position of the last allocated byte */
-} parser_mem_data_t;
-
-/**
- * Parser memory list.
- */
-typedef struct
-{
- parser_mem_data_t data; /**< storage space */
- uint32_t page_size; /**< size of each page */
- uint32_t item_size; /**< size of each item */
- uint32_t item_count; /**< number of items on each page */
-} parser_list_t;
-
-/**
- * Iterator for parser memory list.
- */
-typedef struct
-{
- parser_list_t *list_p; /**< parser list */
- parser_mem_page_t *current_p; /**< currently processed page */
- size_t current_position; /**< current position on the page */
-} parser_list_iterator_t;
-
-/**
- * Parser memory stack.
- */
-typedef struct
-{
- parser_mem_data_t data; /**< storage space */
- parser_mem_page_t *free_page_p; /**< space for fast allocation */
-} parser_stack_t;
-
-/**
- * Iterator for parser memory stack.
- */
-typedef struct
-{
- parser_mem_page_t *current_p; /**< currently processed page */
- size_t current_position; /**< current position on the page */
-} parser_stack_iterator_t;
-
-/**
- * Branch type.
- */
-typedef struct
-{
- parser_mem_page_t *page_p; /**< branch location page */
- uint32_t offset; /**< branch location offset */
-} parser_branch_t;
-
-/**
- * Branch chain type.
- */
-typedef struct parser_branch_node_t
-{
- struct parser_branch_node_t *next_p; /**< next linked list node */
- parser_branch_t branch; /**< branch */
-} parser_branch_node_t;
-
-#if ENABLED (JERRY_DEBUGGER)
-/**
- * Extra information for each breakpoint.
- */
-typedef struct
-{
- uint32_t value; /**< line or offset of the breakpoint */
-} parser_breakpoint_info_t;
-
-/**
- * Maximum number of breakpoint info.
- */
-#define PARSER_MAX_BREAKPOINT_INFO_COUNT \
- (JERRY_DEBUGGER_TRANSPORT_MAX_BUFFER_SIZE / sizeof (parser_breakpoint_info_t))
-
-#endif /* ENABLED (JERRY_DEBUGGER) */
-
-/**
- * Those members of a context which needs
- * to be saved when a sub-function is parsed.
- */
-typedef struct parser_saved_context_t
-{
- /* Parser members. */
- uint32_t status_flags; /**< parsing options */
- uint16_t stack_depth; /**< current stack depth */
- uint16_t stack_limit; /**< maximum stack depth */
- struct parser_saved_context_t *prev_context_p; /**< last saved context */
- parser_stack_iterator_t last_statement; /**< last statement position */
-
- /* Literal types */
- uint16_t argument_count; /**< number of function arguments */
- uint16_t register_count; /**< number of registers */
- uint16_t literal_count; /**< number of literals */
-
- /* Memory storage members. */
- parser_mem_data_t byte_code; /**< byte code buffer */
- uint32_t byte_code_size; /**< byte code size for branches */
- parser_mem_data_t literal_pool_data; /**< literal list */
-
-#ifndef JERRY_NDEBUG
- uint16_t context_stack_depth; /**< current context stack depth */
-#endif /* !JERRY_NDEBUG */
-} parser_saved_context_t;
-
-/**
- * Shared parser context.
- */
-typedef struct
-{
- PARSER_TRY_CONTEXT (try_buffer); /**< try_buffer */
- parser_error_t error; /**< error code */
- void *allocated_buffer_p; /**< dinamically allocated buffer
- * which needs to be freed on error */
- uint32_t allocated_buffer_size; /**< size of the dinamically allocated buffer */
-
- /* Parser members. */
- uint32_t status_flags; /**< status flags */
- uint16_t stack_depth; /**< current stack depth */
- uint16_t stack_limit; /**< maximum stack depth */
- parser_saved_context_t *last_context_p; /**< last saved context */
- parser_stack_iterator_t last_statement; /**< last statement position */
-
-#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
- ecma_module_node_t *module_current_node_p; /**< import / export node that is being processed */
- lexer_literal_t *module_identifier_lit_p; /**< the literal for the identifier of the current element */
-#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
-
- /* Lexer members. */
- lexer_token_t token; /**< current token */
- lexer_lit_object_t lit_object; /**< current literal object */
- const uint8_t *source_p; /**< next source byte */
- const uint8_t *source_end_p; /**< last source byte */
- parser_line_counter_t line; /**< current line */
- parser_line_counter_t column; /**< current column */
-
- /* Scanner members. */
- scanner_info_t *next_scanner_info_p; /**< next scanner info block */
- scanner_info_t *active_scanner_info_p; /**< currently active scanner info block */
- scanner_info_t *skipped_scanner_info_p; /**< next scanner info block */
- scanner_info_t *skipped_scanner_info_end_p; /**< currently active scanner info block */
-
- /* Compact byte code members. */
- cbc_argument_t last_cbc; /**< argument of the last cbc */
- uint16_t last_cbc_opcode; /**< opcode of the last cbc */
-
- /* Literal types */
- uint16_t argument_count; /**< number of function arguments */
- uint16_t register_count; /**< number of registers */
- uint16_t literal_count; /**< number of literals */
-
- /* Memory storage members. */
- parser_mem_data_t byte_code; /**< byte code buffer */
- uint32_t byte_code_size; /**< current byte code size for branches */
- parser_list_t literal_pool; /**< literal list */
- parser_mem_data_t stack; /**< storage space */
- parser_mem_page_t *free_page_p; /**< space for fast allocation */
- uint8_t stack_top_uint8; /**< top byte stored on the stack */
-
-#ifndef JERRY_NDEBUG
- /* Variables for debugging / logging. */
- uint16_t context_stack_depth; /**< current context stack depth */
-#endif /* !JERRY_NDEBUG */
-
-#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)
- int is_show_opcodes; /**< show opcodes */
- uint32_t total_byte_code_size; /**< total byte code size */
-#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */
-
-#if ENABLED (JERRY_DEBUGGER)
- parser_breakpoint_info_t breakpoint_info[PARSER_MAX_BREAKPOINT_INFO_COUNT]; /**< breakpoint info list */
- uint16_t breakpoint_info_count; /**< current breakpoint index */
- parser_line_counter_t last_breakpoint_line; /**< last line where breakpoint has been inserted */
-#endif /* ENABLED (JERRY_DEBUGGER) */
-
-#if ENABLED (JERRY_LINE_INFO)
- parser_line_counter_t last_line_info_line; /**< last line where line info has been inserted */
-#endif /* ENABLED (JERRY_LINE_INFO) */
-} parser_context_t;
-
-/**
- * @}
- * @}
- * @}
- *
- * \addtogroup mem Memory allocation
- * @{
- *
- * \addtogroup mem_parser Parser memory manager
- * @{
- */
-
-/* Memory management.
- * Note: throws an error if unsuccessful. */
-void *parser_malloc (parser_context_t *context_p, size_t size);
-void parser_free (void *ptr, size_t size);
-void *parser_malloc_local (parser_context_t *context_p, size_t size);
-void parser_free_local (void *ptr, size_t size);
-
-/* Parser byte stream. */
-
-void parser_cbc_stream_init (parser_mem_data_t *data_p);
-void parser_cbc_stream_free (parser_mem_data_t *data_p);
-void parser_cbc_stream_alloc_page (parser_context_t *context_p, parser_mem_data_t *data_p);
-
-/* Parser list. Ensures pointer alignment. */
-
-void parser_list_init (parser_list_t *list_p, uint32_t item_size, uint32_t item_count);
-void parser_list_free (parser_list_t *list_p);
-void parser_list_reset (parser_list_t *list_p);
-void *parser_list_append (parser_context_t *context_p, parser_list_t *list_p);
-void *parser_list_get (parser_list_t *list_p, size_t index);
-void parser_list_iterator_init (parser_list_t *list_p, parser_list_iterator_t *iterator_p);
-void *parser_list_iterator_next (parser_list_iterator_t *iterator_p);
-
-/* Parser stack. Optimized for pushing bytes.
- * Pop functions never throws error. */
-
-void parser_stack_init (parser_context_t *context_p);
-void parser_stack_free (parser_context_t *context_p);
-void parser_stack_push_uint8 (parser_context_t *context_p, uint8_t uint8_value);
-void parser_stack_pop_uint8 (parser_context_t *context_p);
-void parser_stack_push_uint16 (parser_context_t *context_p, uint16_t uint16_value);
-uint16_t parser_stack_pop_uint16 (parser_context_t *context_p);
-void parser_stack_push (parser_context_t *context_p, const void *data_p, uint32_t length);
-void parser_stack_pop (parser_context_t *context_p, void *data_p, uint32_t length);
-void parser_stack_iterator_skip (parser_stack_iterator_t *iterator, size_t length);
-void parser_stack_iterator_read (parser_stack_iterator_t *iterator, void *data_p, size_t length);
-void parser_stack_iterator_write (parser_stack_iterator_t *iterator, const void *data_p, size_t length);
-
-/**
- * @}
- * @}
- *
- * \addtogroup parser Parser
- * @{
- *
- * \addtogroup jsparser JavaScript
- * @{
- *
- * \addtogroup jsparser_utils Utility
- * @{
- */
-
-/* Compact byte code emitting functions. */
-
-void parser_flush_cbc (parser_context_t *context_p);
-void parser_emit_cbc (parser_context_t *context_p, uint16_t opcode);
-void parser_emit_cbc_literal (parser_context_t *context_p, uint16_t opcode, uint16_t literal_index);
-void parser_emit_cbc_literal_from_token (parser_context_t *context_p, uint16_t opcode);
-void parser_emit_cbc_call (parser_context_t *context_p, uint16_t opcode, size_t call_arguments);
-void parser_emit_cbc_push_number (parser_context_t *context_p, bool is_negative_number);
-void parser_emit_cbc_forward_branch (parser_context_t *context_p, uint16_t opcode, parser_branch_t *branch_p);
-parser_branch_node_t *parser_emit_cbc_forward_branch_item (parser_context_t *context_p, uint16_t opcode,
- parser_branch_node_t *next_p);
-void parser_emit_cbc_backward_branch (parser_context_t *context_p, uint16_t opcode, uint32_t offset);
-void parser_set_branch_to_current_position (parser_context_t *context_p, parser_branch_t *branch_p);
-void parser_set_breaks_to_current_position (parser_context_t *context_p, parser_branch_node_t *current_p);
-void parser_set_continues_to_current_position (parser_context_t *context_p, parser_branch_node_t *current_p);
-
-/* Convenience macros. */
-#define parser_emit_cbc_ext(context_p, opcode) \
- parser_emit_cbc ((context_p), PARSER_TO_EXT_OPCODE (opcode))
-#define parser_emit_cbc_ext_literal(context_p, opcode, literal_index) \
- parser_emit_cbc_literal ((context_p), PARSER_TO_EXT_OPCODE (opcode), (literal_index))
-#define parser_emit_cbc_ext_call(context_p, opcode, call_arguments) \
- parser_emit_cbc_call ((context_p), PARSER_TO_EXT_OPCODE (opcode), (call_arguments))
-#define parser_emit_cbc_ext_forward_branch(context_p, opcode, branch_p) \
- parser_emit_cbc_forward_branch ((context_p), PARSER_TO_EXT_OPCODE (opcode), (branch_p))
-#define parser_emit_cbc_ext_backward_branch(context_p, opcode, offset) \
- parser_emit_cbc_backward_branch ((context_p), PARSER_TO_EXT_OPCODE (opcode), (offset))
-
-/**
- * @}
- *
- * \addtogroup jsparser_lexer Lexer
- * @{
- */
-
-/* Lexer functions */
-
-void lexer_next_token (parser_context_t *context_p);
-bool lexer_check_next_character (parser_context_t *context_p, lit_utf8_byte_t character);
-#if ENABLED (JERRY_ES2015_CLASS)
-void lexer_skip_empty_statements (parser_context_t *context_p);
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
-#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
-bool lexer_check_arrow (parser_context_t *context_p);
-#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
-void lexer_parse_string (parser_context_t *context_p);
-void lexer_expect_identifier (parser_context_t *context_p, uint8_t literal_type);
-void lexer_scan_identifier (parser_context_t *context_p, uint32_t ident_opts);
-ecma_char_t lexer_hex_to_character (parser_context_t *context_p, const uint8_t *source_p, int length);
-void lexer_expect_object_literal_id (parser_context_t *context_p, uint32_t ident_opts);
-void lexer_construct_literal_object (parser_context_t *context_p, lexer_lit_location_t *literal_p,
- uint8_t literal_type);
-bool lexer_construct_number_object (parser_context_t *context_p, bool is_expr, bool is_negative_number);
-void lexer_convert_push_number_to_push_literal (parser_context_t *context_p);
-uint16_t lexer_construct_function_object (parser_context_t *context_p, uint32_t extra_status_flags);
-void lexer_construct_regexp_object (parser_context_t *context_p, bool parse_only);
-bool lexer_compare_identifier_to_current (parser_context_t *context_p, const lexer_lit_location_t *right_ident_p);
-bool lexer_compare_literal_to_identifier (parser_context_t *context_p, const char *identifier_p,
- size_t identifier_length);
-bool lexer_compare_literal_to_string (parser_context_t *context_p, const char *string_p, size_t string_length);
-uint8_t lexer_convert_binary_lvalue_token_to_binary (uint8_t token);
-
-/**
- * @}
- *
- * \addtogroup jsparser_expr Expression parser
- * @{
- */
-
-/* Parser functions. */
-
-void parser_parse_block_expression (parser_context_t *context_p, int options);
-void parser_parse_expression_statement (parser_context_t *context_p, int options);
-void parser_parse_expression (parser_context_t *context_p, int options);
-#if ENABLED (JERRY_ES2015_CLASS)
-void parser_parse_class (parser_context_t *context_p, bool is_statement);
-void parser_parse_super_class_context_start (parser_context_t *context_p);
-void parser_parse_super_class_context_end (parser_context_t *context_p, bool is_statement);
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
-
-/**
- * @}
- *
- * \addtogroup jsparser_scanner Scanner
- * @{
- */
-
-void scanner_raise_error (parser_context_t *context_p);
-void *scanner_malloc (parser_context_t *context_p, size_t size);
-void scanner_free (void *ptr, size_t size);
-
-scanner_info_t *scanner_insert_info (parser_context_t *context_p, const uint8_t *source_p, size_t size);
-void scanner_release_next (parser_context_t *context_p, size_t size);
-void scanner_set_active (parser_context_t *context_p);
-void scanner_release_active (parser_context_t *context_p, size_t size);
-void scanner_release_switch_cases (scanner_case_info_t *case_p);
-void scanner_seek (parser_context_t *context_p);
-void scanner_reverse_info_list (parser_context_t *context_p);
-void scanner_cleanup (parser_context_t *context_p);
-
-void scanner_get_location (scanner_location_t *location_p, parser_context_t *context_p);
-void scanner_set_location (parser_context_t *context_p, scanner_location_t *location_p);
-
-void scanner_scan_all (parser_context_t *context_p, const uint8_t *arg_list_p, const uint8_t *arg_list_end_p,
- const uint8_t *source_p, const uint8_t *source_end_p);
-
-/**
- * @}
- *
- * \addtogroup jsparser_stmt Statement parser
- * @{
- */
-
-void parser_parse_statements (parser_context_t *context_p);
-void parser_free_jumps (parser_stack_iterator_t iterator);
-
-#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
-/**
- * @}
- *
- * \addtogroup jsparser_stmt Module statement parser
- * @{
- */
-
-extern const lexer_lit_location_t lexer_default_literal;
-void parser_module_add_export_node_to_context (parser_context_t *context_p);
-void parser_module_add_import_node_to_context (parser_context_t *context_p);
-void parser_module_check_request_place (parser_context_t *context_p);
-void parser_module_context_init (void);
-void parser_module_handle_module_specifier (parser_context_t *context_p);
-void parser_module_handle_requests (parser_context_t *context_p);
-void parser_module_parse_export_clause (parser_context_t *context_p);
-void parser_module_parse_import_clause (parser_context_t *context_p);
-void parser_module_set_default (parser_context_t *context_p);
-ecma_module_node_t *parser_module_create_module_node (parser_context_t *context_p);
-bool parser_module_check_duplicate_import (parser_context_t *context_p, ecma_string_t *local_name_p);
-bool parser_module_check_duplicate_export (parser_context_t *context_p, ecma_string_t *export_name_p);
-void parser_module_add_names_to_node (parser_context_t *context_p,
- ecma_string_t *imex_name_p,
- ecma_string_t *local_name_p);
-
-#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
-
-/**
- * @}
- *
- * \addtogroup jsparser_parser Parser
- * @{
- */
-
-ecma_compiled_code_t *parser_parse_function (parser_context_t *context_p, uint32_t status_flags);
-#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
-ecma_compiled_code_t *parser_parse_arrow_function (parser_context_t *context_p, uint32_t status_flags);
-#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
-
-/* Error management. */
-
-void parser_raise_error (parser_context_t *context_p, parser_error_t error);
-
-/* Debug functions. */
-
-#if ENABLED (JERRY_DEBUGGER)
-
-void parser_append_breakpoint_info (parser_context_t *context_p, jerry_debugger_header_type_t type, uint32_t value);
-
-#endif /* ENABLED (JERRY_DEBUGGER) */
-
-#if ENABLED (JERRY_LINE_INFO)
-
-void parser_emit_line_info (parser_context_t *context_p, uint32_t line, bool flush_cbc);
-
-#endif /* ENABLED (JERRY_LINE_INFO) */
-
-/**
- * @}
- * @}
- * @}
- */
-
-#endif /* !JS_PARSER_INTERNAL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JS_PARSER_LIMITS_H
-#define JS_PARSER_LIMITS_H
-
-/** \addtogroup parser Parser
- * @{
- *
- * \addtogroup jsparser JavaScript
- * @{
- *
- * \addtogroup jsparser_internals Internals
- * @{
- */
-
-/**
- * Maximum identifier length accepted by the parser.
- * Limit: LEXER_MAX_STRING_LENGTH.
- */
-#ifndef PARSER_MAXIMUM_IDENT_LENGTH
-#define PARSER_MAXIMUM_IDENT_LENGTH 255
-#endif /* !PARSER_MAXIMUM_IDENT_LENGTH */
-
-/**
- * Maximum string limit.
- * Limit: 2147483647 / 65535.
- */
-#if ENABLED (JERRY_CPOINTER_32_BIT)
-#define PARSER_MAXIMUM_STRING_LIMIT 2147483647
-#else /* !ENABLED (JERRY_CPOINTER_32_BIT) */
-#define PARSER_MAXIMUM_STRING_LIMIT 65535
-#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
-
-/**
- * Maximum string length.
- * Limit: PARSER_MAXIMUM_STRING_LIMIT.
- */
-#ifndef PARSER_MAXIMUM_STRING_LENGTH
-#define PARSER_MAXIMUM_STRING_LENGTH PARSER_MAXIMUM_STRING_LIMIT
-#endif /* !PARSER_MAXIMUM_STRING_LENGTH */
-
-/**
- * Maximum number of literals.
- * Limit: 32767. Recommended: 510, 32767
- */
-#ifndef PARSER_MAXIMUM_NUMBER_OF_LITERALS
-#define PARSER_MAXIMUM_NUMBER_OF_LITERALS 32767
-#endif /* !PARSER_MAXIMUM_NUMBER_OF_LITERALS */
-
-/**
- * Maximum number of registers.
- * Limit: PARSER_MAXIMUM_NUMBER_OF_LITERALS
- */
-#ifndef PARSER_MAXIMUM_NUMBER_OF_REGISTERS
-#define PARSER_MAXIMUM_NUMBER_OF_REGISTERS 256
-#endif /* !PARSER_MAXIMUM_NUMBER_OF_REGISTERS */
-
-/**
- * Maximum code size.
- * Limit: 16777215. Recommended: 65535, 16777215.
- */
-#ifndef PARSER_MAXIMUM_CODE_SIZE
-#define PARSER_MAXIMUM_CODE_SIZE (65535 << (JMEM_ALIGNMENT_LOG))
-#endif /* !PARSER_MAXIMUM_CODE_SIZE */
-
-/**
- * Maximum number of values pushed onto the stack by a function.
- * Limit: 65500. Recommended: 1024.
- */
-#ifndef PARSER_MAXIMUM_STACK_LIMIT
-#define PARSER_MAXIMUM_STACK_LIMIT 1024
-
-#endif /* !PARSER_MAXIMUM_STACK_LIMIT */
-
-/* Checks. */
-
-#if (PARSER_MAXIMUM_STRING_LENGTH < 1) || (PARSER_MAXIMUM_STRING_LENGTH > PARSER_MAXIMUM_STRING_LIMIT)
-#error "Maximum string length is not within range."
-#endif /* (PARSER_MAXIMUM_STRING_LENGTH < 1) || (PARSER_MAXIMUM_STRING_LENGTH > PARSER_MAXIMUM_STRING_LIMIT) */
-
-#if (PARSER_MAXIMUM_IDENT_LENGTH < 1) || (PARSER_MAXIMUM_IDENT_LENGTH > PARSER_MAXIMUM_STRING_LENGTH)
-#error "Maximum identifier length is not within range."
-#endif /* (PARSER_MAXIMUM_IDENT_LENGTH < 1) || (PARSER_MAXIMUM_IDENT_LENGTH > PARSER_MAXIMUM_STRING_LENGTH) */
-
-#if (PARSER_MAXIMUM_NUMBER_OF_LITERALS < 1) || (PARSER_MAXIMUM_NUMBER_OF_LITERALS > 32767)
-#error "Maximum number of literals is not within range."
-#endif /* (PARSER_MAXIMUM_NUMBER_OF_LITERALS < 1) || (PARSER_MAXIMUM_NUMBER_OF_LITERALS > 32767) */
-
-#if (PARSER_MAXIMUM_NUMBER_OF_REGISTERS > PARSER_MAXIMUM_NUMBER_OF_LITERALS)
-#error "Maximum number of registers is not within range."
-#endif /* (PARSER_MAXIMUM_NUMBER_OF_REGISTERS > PARSER_MAXIMUM_NUMBER_OF_LITERALS) */
-
-#if (PARSER_MAXIMUM_CODE_SIZE < 4096) || (PARSER_MAXIMUM_CODE_SIZE > 16777215)
-#error "Maximum code size is not within range."
-#endif /* (PARSER_MAXIMUM_CODE_SIZE < 4096) || (PARSER_MAXIMUM_CODE_SIZE > 16777215) */
-
-#if (PARSER_MAXIMUM_STACK_LIMIT < 16) || (PARSER_MAXIMUM_STACK_LIMIT > 65500)
-#error "Maximum function stack usage is not within range."
-#endif /* (PARSER_MAXIMUM_STACK_LIMIT < 16) || (PARSER_MAXIMUM_STACK_LIMIT > 65500) */
-
-/**
- * @}
- * @}
- * @}
- */
-
-#endif /* !JS_PARSER_LIMITS_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JS_PARSER_H
-#define JS_PARSER_H
-
-#include "ecma-globals.h"
-
-/** \addtogroup parser Parser
- * @{
- *
- * \addtogroup jsparser JavaScript
- * @{
- *
- * \addtogroup jsparser_parser Parser
- * @{
- */
-
-/**
- * Error codes.
- */
-typedef enum
-{
- PARSER_ERR_NO_ERROR, /**< no error */
-
- PARSER_ERR_OUT_OF_MEMORY, /**< out of memory */
- PARSER_ERR_LITERAL_LIMIT_REACHED, /**< maximum number of literals reached */
- PARSER_ERR_ARGUMENT_LIMIT_REACHED, /**< maximum number of function arguments reached */
- PARSER_ERR_STACK_LIMIT_REACHED, /**< maximum function stack size reached */
- PARSER_ERR_REGISTER_LIMIT_REACHED, /**< maximum register size reached */
-
- PARSER_ERR_INVALID_CHARACTER, /**< unexpected character */
- PARSER_ERR_INVALID_HEX_DIGIT, /**< invalid hexadecimal digit */
- PARSER_ERR_INVALID_ESCAPE_SEQUENCE, /**< invalid escape sequence */
- PARSER_ERR_INVALID_UNICODE_ESCAPE_SEQUENCE, /**< invalid unicode escape sequence */
- PARSER_ERR_INVALID_IDENTIFIER_START, /**< character cannot be start of an identifier */
- PARSER_ERR_INVALID_IDENTIFIER_PART, /**< character cannot be part of an identifier */
-
- PARSER_ERR_INVALID_NUMBER, /**< invalid number literal */
- PARSER_ERR_MISSING_EXPONENT, /**< missing exponent */
- PARSER_ERR_IDENTIFIER_AFTER_NUMBER, /**< identifier start after number */
-
- PARSER_ERR_INVALID_REGEXP, /**< invalid regular expression */
- PARSER_ERR_UNKNOWN_REGEXP_FLAG, /**< unknown regexp flag */
- PARSER_ERR_DUPLICATED_REGEXP_FLAG, /**< duplicated regexp flag */
- PARSER_ERR_UNSUPPORTED_REGEXP, /**< regular expression is not supported */
-
- PARSER_ERR_IDENTIFIER_TOO_LONG, /**< too long identifier */
- PARSER_ERR_STRING_TOO_LONG, /**< too long string literal */
- PARSER_ERR_NUMBER_TOO_LONG, /**< too long number literal */
- PARSER_ERR_REGEXP_TOO_LONG, /**< too long regexp literal */
-
- PARSER_ERR_UNTERMINATED_MULTILINE_COMMENT, /**< unterminated multiline comment */
- PARSER_ERR_UNTERMINATED_STRING, /**< unterminated string literal */
- PARSER_ERR_UNTERMINATED_REGEXP, /**< unterminated regexp literal */
-
- PARSER_ERR_NEWLINE_NOT_ALLOWED, /**< newline is not allowed */
- PARSER_ERR_OCTAL_NUMBER_NOT_ALLOWED, /**< octal numbers are not allowed in strict mode */
- PARSER_ERR_OCTAL_ESCAPE_NOT_ALLOWED, /**< octal escape sequences are not allowed in strict mode */
- PARSER_ERR_STRICT_IDENT_NOT_ALLOWED, /**< identifier name is reserved in strict mode */
- PARSER_ERR_EVAL_NOT_ALLOWED, /**< eval is not allowed here in strict mode */
- PARSER_ERR_ARGUMENTS_NOT_ALLOWED, /**< arguments is not allowed here in strict mode */
- PARSER_ERR_DELETE_IDENT_NOT_ALLOWED, /**< identifier delete is not allowed in strict mode */
- PARSER_ERR_EVAL_CANNOT_ASSIGNED, /**< eval cannot be assigned in strict mode */
- PARSER_ERR_ARGUMENTS_CANNOT_ASSIGNED, /**< arguments cannot be assigned in strict mode */
- PARSER_ERR_WITH_NOT_ALLOWED, /**< with statement is not allowed in strict mode */
- PARSER_ERR_MULTIPLE_DEFAULTS_NOT_ALLOWED, /**< multiple default cases are not allowed */
- PARSER_ERR_DEFAULT_NOT_IN_SWITCH, /**< default statement is not in switch block */
- PARSER_ERR_CASE_NOT_IN_SWITCH, /**< case statement is not in switch block */
-#if ENABLED (JERRY_ES2015_CLASS)
- PARSER_ERR_MULTIPLE_CLASS_CONSTRUCTORS, /**< multiple class constructor */
- PARSER_ERR_CLASS_CONSTRUCTOR_AS_ACCESSOR, /**< class constructor cannot be an accessor */
- PARSER_ERR_CLASS_STATIC_PROTOTYPE, /**< static method name 'prototype' is not allowed */
- PARSER_ERR_UNEXPECTED_SUPER_REFERENCE, /**< unexpected super keyword */
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
-
- PARSER_ERR_LEFT_PAREN_EXPECTED, /**< left paren expected */
- PARSER_ERR_LEFT_BRACE_EXPECTED, /**< left brace expected */
- PARSER_ERR_RIGHT_PAREN_EXPECTED, /**< right paren expected */
- PARSER_ERR_RIGHT_SQUARE_EXPECTED, /**< right square expected */
-
-#if ENABLED (JERRY_ES2015_TEMPLATE_STRINGS)
- PARSER_ERR_RIGHT_BRACE_EXPECTED, /**< right brace expected */
-#endif /* ENABLED (JERRY_ES2015_TEMPLATE_STRINGS) */
- PARSER_ERR_COLON_EXPECTED, /**< colon expected */
- PARSER_ERR_COLON_FOR_CONDITIONAL_EXPECTED, /**< colon expected for conditional expression */
- PARSER_ERR_SEMICOLON_EXPECTED, /**< semicolon expected */
- PARSER_ERR_IN_EXPECTED, /**< in keyword expected */
-#if ENABLED (JERRY_ES2015_FOR_OF)
- PARSER_ERR_OF_EXPECTED, /**< of keyword expected */
-#endif /* ENABLED (JERRY_ES2015_FOR_OF) */
- PARSER_ERR_WHILE_EXPECTED, /**< while expected for do-while loop */
- PARSER_ERR_CATCH_FINALLY_EXPECTED, /**< catch or finally expected */
- PARSER_ERR_ARRAY_ITEM_SEPARATOR_EXPECTED, /**< array item separator expected */
- PARSER_ERR_OBJECT_ITEM_SEPARATOR_EXPECTED, /**< object item separator expected */
- PARSER_ERR_IDENTIFIER_EXPECTED, /**< identifier expected */
- PARSER_ERR_EXPRESSION_EXPECTED, /**< expression expected */
- PARSER_ERR_PRIMARY_EXP_EXPECTED, /**< primary expression expected */
- PARSER_ERR_STATEMENT_EXPECTED, /**< statement expected */
- PARSER_ERR_PROPERTY_IDENTIFIER_EXPECTED, /**< property identifier expected */
- PARSER_ERR_ARGUMENT_LIST_EXPECTED, /**< argument list expected */
- PARSER_ERR_NO_ARGUMENTS_EXPECTED, /**< property getters must have no arguments */
- PARSER_ERR_ONE_ARGUMENT_EXPECTED, /**< property setters must have one argument */
-
- PARSER_ERR_INVALID_EXPRESSION, /**< invalid expression */
- PARSER_ERR_INVALID_SWITCH, /**< invalid switch body */
- PARSER_ERR_INVALID_BREAK, /**< break must be inside a loop or switch */
- PARSER_ERR_INVALID_BREAK_LABEL, /**< break target not found */
- PARSER_ERR_INVALID_CONTINUE, /**< continue must be inside a loop */
- PARSER_ERR_INVALID_CONTINUE_LABEL, /**< continue target not found */
- PARSER_ERR_INVALID_RETURN, /**< return must be inside a function */
- PARSER_ERR_INVALID_RIGHT_SQUARE, /**< right square must terminate a block */
- PARSER_ERR_DUPLICATED_LABEL, /**< duplicated label */
-#if ENABLED (JERRY_ES2015_FUNCTION_PARAMETER_INITIALIZER) || ENABLED (JERRY_ES2015_FUNCTION_REST_PARAMETER)
- PARSER_ERR_DUPLICATED_ARGUMENT_NAMES, /**< duplicated argument names */
-#endif /* ENABLED (JERRY_ES2015_FUNCTION_PARAMETER_INITIALIZER) || ENABLED (JERRY_ES2015_FUNCTION_REST_PARAMETER) */
-#if ENABLED (JERRY_ES2015_FUNCTION_REST_PARAMETER)
- PARSER_ERR_FORMAL_PARAM_AFTER_REST_PARAMETER, /**< formal parameter after rest parameter */
- PARSER_ERR_REST_PARAMETER_DEFAULT_INITIALIZER, /**< rest parameter default initializer */
-#endif /* ENABLED (JERRY_ES2015_FUNCTION_REST_PARAMETER) */
- PARSER_ERR_OBJECT_PROPERTY_REDEFINED, /**< property of object literal redefined */
-
-#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
- PARSER_ERR_FILE_NOT_FOUND, /**< file not found*/
- PARSER_ERR_FROM_EXPECTED, /**< from expected */
- PARSER_ERR_FROM_COMMA_EXPECTED, /**< from or comma expected */
- PARSER_ERR_AS_EXPECTED, /**< as expected */
- PARSER_ERR_STRING_EXPECTED, /**< string literal expected */
- PARSER_ERR_MODULE_UNEXPECTED, /**< unexpected import or export statement */
- PARSER_ERR_LEFT_BRACE_MULTIPLY_LITERAL_EXPECTED, /**< left brace or multiply or literal expected */
- PARSER_ERR_LEFT_BRACE_MULTIPLY_EXPECTED, /**< left brace or multiply expected */
- PARSER_ERR_RIGHT_BRACE_COMMA_EXPECTED, /**< right brace or comma expected */
- PARSER_ERR_DUPLICATED_EXPORT_IDENTIFIER, /**< duplicated export identifier name */
- PARSER_ERR_DUPLICATED_IMPORT_BINDING, /**< duplicated import binding name */
-#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
-
- PARSER_ERR_NON_STRICT_ARG_DEFINITION /**< non-strict argument definition */
-} parser_error_t;
-
-/**
- * Source code line counter type.
- */
-typedef uint32_t parser_line_counter_t;
-
-/**
- * Error code location.
- */
-typedef struct
-{
- parser_error_t error; /**< error code */
- parser_line_counter_t line; /**< line where the error occured */
- parser_line_counter_t column; /**< column where the error occured */
-} parser_error_location_t;
-
-/* Note: source must be a valid UTF-8 string */
-ecma_value_t parser_parse_script (const uint8_t *arg_list_p, size_t arg_list_size,
- const uint8_t *source_p, size_t source_size,
- uint32_t parse_opts, ecma_compiled_code_t **bytecode_data_p);
-
-#if ENABLED (JERRY_ERROR_MESSAGES)
-const char *parser_error_to_string (parser_error_t);
-#endif /* ENABLED (JERRY_ERROR_MESSAGES) */
-
-/**
- * @}
- * @}
- * @}
- */
-
-#endif /* !JS_PARSER_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JS_SCANNER_INTERNAL_H
-#define JS_SCANNER_INTERNAL_H
-
-/** \addtogroup parser Parser
- * @{
- *
- * \addtogroup jsparser JavaScript
- * @{
- *
- * \addtogroup jsparser_scanner Scanner
- * @{
- */
-
-/**
- * Generic descriptor which stores only the start position.
- */
-typedef struct
-{
- const uint8_t *source_p; /**< start source byte */
-} scanner_source_start_t;
-
-/**
- * For statement descriptor.
- */
-typedef struct
-{
- /** shared fields of for statements */
- union
- {
- const uint8_t *source_p; /**< start source byte */
- scanner_for_info_t *for_info_p; /**< for info */
- } u;
-} scanner_for_statement_t;
-
-/**
- * Switch statement descriptor.
- */
-typedef struct
-{
- scanner_case_info_t **last_case_p; /**< last case info */
-} scanner_switch_statement_t;
-
-/**
- * Scanner context.
- */
-typedef struct
-{
- uint8_t mode; /**< scanner mode */
- scanner_switch_statement_t active_switch_statement; /**< currently active switch statement */
-} scanner_context_t;
-
-/**
- * @}
- * @}
- * @}
- */
-
-#endif /* !JS_SCANNER_INTERNAL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JS_SCANNER_H
-#define JS_SCANNER_H
-
-/** \addtogroup parser Parser
- * @{
- *
- * \addtogroup jsparser JavaScript
- * @{
- *
- * \addtogroup jsparser_scanner Scanner
- * @{
- */
-
-/**
- * Allowed types for scanner_info_t structures.
- */
-typedef enum
-{
- SCANNER_TYPE_END, /**< mark the last info block */
- SCANNER_TYPE_END_ARGUMENTS, /**< mark the end of function arguments
- * (only present if a function script is parsed) */
- SCANNER_TYPE_WHILE, /**< while statement */
- SCANNER_TYPE_FOR, /**< for statement */
- SCANNER_TYPE_FOR_IN, /**< for-in statement */
-#if ENABLED (JERRY_ES2015_FOR_OF)
- SCANNER_TYPE_FOR_OF, /**< for-of statement */
-#endif /* ENABLED (JERRY_ES2015_FOR_OF) */
- SCANNER_TYPE_SWITCH, /**< switch statement */
- SCANNER_TYPE_CASE, /**< case statement */
-#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
- SCANNER_TYPE_ARROW, /**< arrow function */
-#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
-} scanner_info_type_t;
-
-/**
- * Source code location which can be used to change the position of parsing.
- */
-typedef struct
-{
- const uint8_t *source_p; /**< next source byte */
- parser_line_counter_t line; /**< token start line */
- parser_line_counter_t column; /**< token start column */
-} scanner_location_t;
-
-/**
- * Scanner info blocks which provides information for the parser.
- */
-typedef struct scanner_info_t
-{
- struct scanner_info_t *next_p; /**< next info structure */
- const uint8_t *source_p; /**< triggering position of this scanner info */
- uint8_t type; /**< type of the scanner info */
-} scanner_info_t;
-
-/**
- * Scanner info extended with a location.
- */
-typedef struct
-{
- scanner_info_t info; /**< header */
- scanner_location_t location; /**< location */
-} scanner_location_info_t;
-
-/**
- * Scanner info for "for" statements.
- */
-typedef struct
-{
- scanner_info_t info; /**< header */
- scanner_location_t expression_location; /**< location of expression start */
- scanner_location_t end_location; /**< location of expression end */
-} scanner_for_info_t;
-
-/**
- * Case statement list for scanner_switch_info_t structure.
- */
-typedef struct scanner_case_info_t
-{
- struct scanner_case_info_t *next_p; /**< next case statement info */
- scanner_location_t location; /**< location of case statement */
-} scanner_case_info_t;
-
-/**
- * Scanner info for "switch" statements.
- */
-typedef struct
-{
- scanner_info_t info; /**< header */
- scanner_case_info_t *case_p; /**< list of switch cases */
-} scanner_switch_info_t;
-
-/**
- * @}
- * @}
- * @}
- */
-
-#endif /* !JS_SCANNER_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef LIT_CHAR_HELPERS_H
-#define LIT_CHAR_HELPERS_H
-
-#include "lit-globals.h"
-
-#define LIT_CHAR_UNDEF ((ecma_char_t) 0xFFFF) /* undefined character */
-
-/*
- * Format control characters (ECMA-262 v5, Table 1)
- */
-#define LIT_CHAR_ZWNJ ((ecma_char_t) 0x200C) /* zero width non-joiner */
-#define LIT_CHAR_ZWJ ((ecma_char_t) 0x200D) /* zero width joiner */
-#define LIT_CHAR_BOM ((ecma_char_t) 0xFEFF) /* byte order mark */
-
-/*
- * Whitespace characters (ECMA-262 v5, Table 2)
- */
-#define LIT_CHAR_TAB ((ecma_char_t) 0x0009) /* tab */
-#define LIT_CHAR_VTAB ((ecma_char_t) 0x000B) /* vertical tab */
-#define LIT_CHAR_FF ((ecma_char_t) 0x000C) /* form feed */
-#define LIT_CHAR_SP ((ecma_char_t) 0x0020) /* space */
-#define LIT_CHAR_NBSP ((ecma_char_t) 0x00A0) /* no-break space */
-/* LIT_CHAR_BOM is defined above */
-
-bool lit_char_is_white_space (ecma_char_t c);
-
-/*
- * Line terminator characters (ECMA-262 v5, Table 3)
- */
-#define LIT_CHAR_LF ((ecma_char_t) 0x000A) /* line feed */
-#define LIT_CHAR_CR ((ecma_char_t) 0x000D) /* carriage return */
-#define LIT_CHAR_LS ((ecma_char_t) 0x2028) /* line separator */
-#define LIT_CHAR_PS ((ecma_char_t) 0x2029) /* paragraph separator */
-
-bool lit_char_is_line_terminator (ecma_char_t c);
-
-/*
- * String Single Character Escape Sequences (ECMA-262 v5, Table 4)
- */
-#define LIT_CHAR_BS ((ecma_char_t) 0x0008) /* backspace */
-/* LIT_CHAR_TAB is defined above */
-/* LIT_CHAR_LF is defined above */
-/* LIT_CHAR_VTAB is defined above */
-/* LIT_CHAR_FF is defined above */
-/* LIT_CHAR_CR is defined above */
-#define LIT_CHAR_DOUBLE_QUOTE ((ecma_char_t) '"') /* double quote */
-#define LIT_CHAR_SINGLE_QUOTE ((ecma_char_t) '\'') /* single quote */
-#define LIT_CHAR_BACKSLASH ((ecma_char_t) '\\') /* reverse solidus (backslash) */
-
-/*
- * Comment characters (ECMA-262 v5, 7.4)
- */
-#define LIT_CHAR_SLASH ((ecma_char_t) '/') /* solidus */
-#define LIT_CHAR_ASTERISK ((ecma_char_t) '*') /* asterisk */
-
-/*
- * Identifier name characters (ECMA-262 v5, 7.6)
- */
-#define LIT_CHAR_DOLLAR_SIGN ((ecma_char_t) '$') /* dollar sign */
-#define LIT_CHAR_UNDERSCORE ((ecma_char_t) '_') /* low line (underscore) */
-/* LIT_CHAR_BACKSLASH defined above */
-
-bool lit_char_is_identifier_start (const uint8_t *src_p);
-bool lit_char_is_identifier_part (const uint8_t *src_p);
-bool lit_char_is_identifier_start_character (ecma_char_t chr);
-bool lit_char_is_identifier_part_character (ecma_char_t chr);
-
-/*
- * Punctuator characters (ECMA-262 v5, 7.7)
- */
-#define LIT_CHAR_LEFT_BRACE ((ecma_char_t) '{') /* left curly bracket */
-#define LIT_CHAR_RIGHT_BRACE ((ecma_char_t) '}') /* right curly bracket */
-#define LIT_CHAR_LEFT_PAREN ((ecma_char_t) '(') /* left parenthesis */
-#define LIT_CHAR_RIGHT_PAREN ((ecma_char_t) ')') /* right parenthesis */
-#define LIT_CHAR_LEFT_SQUARE ((ecma_char_t) '[') /* left square bracket */
-#define LIT_CHAR_RIGHT_SQUARE ((ecma_char_t) ']') /* right square bracket */
-#define LIT_CHAR_DOT ((ecma_char_t) '.') /* dot */
-#define LIT_CHAR_SEMICOLON ((ecma_char_t) ';') /* semicolon */
-#define LIT_CHAR_COMMA ((ecma_char_t) ',') /* comma */
-#define LIT_CHAR_LESS_THAN ((ecma_char_t) '<') /* less-than sign */
-#define LIT_CHAR_GREATER_THAN ((ecma_char_t) '>') /* greater-than sign */
-#define LIT_CHAR_EQUALS ((ecma_char_t) '=') /* equals sign */
-#define LIT_CHAR_PLUS ((ecma_char_t) '+') /* plus sign */
-#define LIT_CHAR_MINUS ((ecma_char_t) '-') /* hyphen-minus */
-/* LIT_CHAR_ASTERISK is defined above */
-#define LIT_CHAR_PERCENT ((ecma_char_t) '%') /* percent sign */
-#define LIT_CHAR_AMPERSAND ((ecma_char_t) '&') /* ampersand */
-#define LIT_CHAR_VLINE ((ecma_char_t) '|') /* vertical line */
-#define LIT_CHAR_CIRCUMFLEX ((ecma_char_t) '^') /* circumflex accent */
-#define LIT_CHAR_EXCLAMATION ((ecma_char_t) '!') /* exclamation mark */
-#define LIT_CHAR_TILDE ((ecma_char_t) '~') /* tilde */
-#define LIT_CHAR_QUESTION ((ecma_char_t) '?') /* question mark */
-#define LIT_CHAR_COLON ((ecma_char_t) ':') /* colon */
-
-/*
- * Special characters for String.prototype.replace.
- */
-#define LIT_CHAR_GRAVE_ACCENT ((ecma_char_t) '`') /* grave accent */
-
-/**
- * Uppercase ASCII letters
- */
-#define LIT_CHAR_UPPERCASE_A ((ecma_char_t) 'A')
-#define LIT_CHAR_UPPERCASE_B ((ecma_char_t) 'B')
-#define LIT_CHAR_UPPERCASE_C ((ecma_char_t) 'C')
-#define LIT_CHAR_UPPERCASE_D ((ecma_char_t) 'D')
-#define LIT_CHAR_UPPERCASE_E ((ecma_char_t) 'E')
-#define LIT_CHAR_UPPERCASE_F ((ecma_char_t) 'F')
-#define LIT_CHAR_UPPERCASE_G ((ecma_char_t) 'G')
-#define LIT_CHAR_UPPERCASE_H ((ecma_char_t) 'H')
-#define LIT_CHAR_UPPERCASE_I ((ecma_char_t) 'I')
-#define LIT_CHAR_UPPERCASE_J ((ecma_char_t) 'J')
-#define LIT_CHAR_UPPERCASE_K ((ecma_char_t) 'K')
-#define LIT_CHAR_UPPERCASE_L ((ecma_char_t) 'L')
-#define LIT_CHAR_UPPERCASE_M ((ecma_char_t) 'M')
-#define LIT_CHAR_UPPERCASE_N ((ecma_char_t) 'N')
-#define LIT_CHAR_UPPERCASE_O ((ecma_char_t) 'O')
-#define LIT_CHAR_UPPERCASE_P ((ecma_char_t) 'P')
-#define LIT_CHAR_UPPERCASE_Q ((ecma_char_t) 'Q')
-#define LIT_CHAR_UPPERCASE_R ((ecma_char_t) 'R')
-#define LIT_CHAR_UPPERCASE_S ((ecma_char_t) 'S')
-#define LIT_CHAR_UPPERCASE_T ((ecma_char_t) 'T')
-#define LIT_CHAR_UPPERCASE_U ((ecma_char_t) 'U')
-#define LIT_CHAR_UPPERCASE_V ((ecma_char_t) 'V')
-#define LIT_CHAR_UPPERCASE_W ((ecma_char_t) 'W')
-#define LIT_CHAR_UPPERCASE_X ((ecma_char_t) 'X')
-#define LIT_CHAR_UPPERCASE_Y ((ecma_char_t) 'Y')
-#define LIT_CHAR_UPPERCASE_Z ((ecma_char_t) 'Z')
-
-/**
- * Lowercase ASCII letters
- */
-#define LIT_CHAR_LOWERCASE_A ((ecma_char_t) 'a')
-#define LIT_CHAR_LOWERCASE_B ((ecma_char_t) 'b')
-#define LIT_CHAR_LOWERCASE_C ((ecma_char_t) 'c')
-#define LIT_CHAR_LOWERCASE_D ((ecma_char_t) 'd')
-#define LIT_CHAR_LOWERCASE_E ((ecma_char_t) 'e')
-#define LIT_CHAR_LOWERCASE_F ((ecma_char_t) 'f')
-#define LIT_CHAR_LOWERCASE_G ((ecma_char_t) 'g')
-#define LIT_CHAR_LOWERCASE_H ((ecma_char_t) 'h')
-#define LIT_CHAR_LOWERCASE_I ((ecma_char_t) 'i')
-#define LIT_CHAR_LOWERCASE_J ((ecma_char_t) 'j')
-#define LIT_CHAR_LOWERCASE_K ((ecma_char_t) 'k')
-#define LIT_CHAR_LOWERCASE_L ((ecma_char_t) 'l')
-#define LIT_CHAR_LOWERCASE_M ((ecma_char_t) 'm')
-#define LIT_CHAR_LOWERCASE_N ((ecma_char_t) 'n')
-#define LIT_CHAR_LOWERCASE_O ((ecma_char_t) 'o')
-#define LIT_CHAR_LOWERCASE_P ((ecma_char_t) 'p')
-#define LIT_CHAR_LOWERCASE_Q ((ecma_char_t) 'q')
-#define LIT_CHAR_LOWERCASE_R ((ecma_char_t) 'r')
-#define LIT_CHAR_LOWERCASE_S ((ecma_char_t) 's')
-#define LIT_CHAR_LOWERCASE_T ((ecma_char_t) 't')
-#define LIT_CHAR_LOWERCASE_U ((ecma_char_t) 'u')
-#define LIT_CHAR_LOWERCASE_V ((ecma_char_t) 'v')
-#define LIT_CHAR_LOWERCASE_W ((ecma_char_t) 'w')
-#define LIT_CHAR_LOWERCASE_X ((ecma_char_t) 'x')
-#define LIT_CHAR_LOWERCASE_Y ((ecma_char_t) 'y')
-#define LIT_CHAR_LOWERCASE_Z ((ecma_char_t) 'z')
-
-/**
- * ASCII decimal digits
- */
-#define LIT_CHAR_0 ((ecma_char_t) '0')
-#define LIT_CHAR_1 ((ecma_char_t) '1')
-#define LIT_CHAR_2 ((ecma_char_t) '2')
-#define LIT_CHAR_3 ((ecma_char_t) '3')
-#define LIT_CHAR_4 ((ecma_char_t) '4')
-#define LIT_CHAR_5 ((ecma_char_t) '5')
-#define LIT_CHAR_6 ((ecma_char_t) '6')
-#define LIT_CHAR_7 ((ecma_char_t) '7')
-#define LIT_CHAR_8 ((ecma_char_t) '8')
-#define LIT_CHAR_9 ((ecma_char_t) '9')
-
-/**
- * ASCII character ranges
- */
-#define LIT_CHAR_ASCII_UPPERCASE_LETTERS_BEGIN LIT_CHAR_UPPERCASE_A /* uppercase letters range */
-#define LIT_CHAR_ASCII_UPPERCASE_LETTERS_END LIT_CHAR_UPPERCASE_Z
-
-#define LIT_CHAR_ASCII_LOWERCASE_LETTERS_BEGIN LIT_CHAR_LOWERCASE_A /* lowercase letters range */
-#define LIT_CHAR_ASCII_LOWERCASE_LETTERS_END LIT_CHAR_LOWERCASE_Z
-
-#define LIT_CHAR_ASCII_UPPERCASE_LETTERS_HEX_BEGIN LIT_CHAR_UPPERCASE_A /* uppercase letters for
- * hexadecimal digits range */
-#define LIT_CHAR_ASCII_UPPERCASE_LETTERS_HEX_END LIT_CHAR_UPPERCASE_F
-
-#define LIT_CHAR_ASCII_LOWERCASE_LETTERS_HEX_BEGIN LIT_CHAR_LOWERCASE_A /* lowercase letters for
- * hexadecimal digits range */
-#define LIT_CHAR_ASCII_LOWERCASE_LETTERS_HEX_END LIT_CHAR_LOWERCASE_F
-
-#define LIT_CHAR_ASCII_OCTAL_DIGITS_BEGIN LIT_CHAR_0 /* octal digits range */
-#define LIT_CHAR_ASCII_OCTAL_DIGITS_END LIT_CHAR_7
-
-#define LIT_CHAR_ASCII_DIGITS_BEGIN LIT_CHAR_0 /* decimal digits range */
-#define LIT_CHAR_ASCII_DIGITS_END LIT_CHAR_9
-
-#define LEXER_TO_ASCII_LOWERCASE(character) ((character) | LIT_CHAR_SP)
-
-bool lit_char_is_octal_digit (ecma_char_t c);
-bool lit_char_is_decimal_digit (ecma_char_t c);
-bool lit_char_is_hex_digit (ecma_char_t c);
-uint32_t lit_char_hex_to_int (ecma_char_t c);
-size_t lit_char_to_utf8_bytes (uint8_t *dst_p, ecma_char_t chr);
-size_t lit_char_get_utf8_length (ecma_char_t chr);
-
-/* read a hex encoded code point from a zero terminated buffer */
-bool lit_read_code_unit_from_hex (const lit_utf8_byte_t *buf_p, lit_utf8_size_t number_of_characters,
- ecma_char_t *out_code_unit_p);
-
-/**
- * Null character
- */
-#define LIT_CHAR_NULL ((ecma_char_t) '\0')
-
-/*
- * Part of IsWordChar abstract operation (ECMA-262 v5, 15.10.2.6, step 3)
- */
-bool lit_char_is_word_char (ecma_char_t c);
-
-/*
- * Utility functions for uppercasing / lowercasing
- */
-
-/**
- * Minimum buffer size for lit_char_to_lower_case / lit_char_to_upper_case functions.
- */
-#define LIT_MAXIMUM_OTHER_CASE_LENGTH (3)
-
-ecma_length_t lit_char_to_lower_case (ecma_char_t character, ecma_char_t *output_buffer_p, ecma_length_t buffer_size);
-ecma_length_t lit_char_to_upper_case (ecma_char_t character, ecma_char_t *output_buffer_p, ecma_length_t buffer_size);
-
-#endif /* !LIT_CHAR_HELPERS_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef LIT_STRINGS_H
-#define LIT_STRINGS_H
-
-#include "jrt.h"
-#include "lit-globals.h"
-
-/**
- * Null character (used in few cases as utf-8 string end marker)
- */
-#define LIT_BYTE_NULL (0)
-
-/**
- * For the formal definition of Unicode transformation formats (UTF) see Section 3.9, Unicode Encoding Forms in The
- * Unicode Standard (http://www.unicode.org/versions/Unicode3.0.0/ch03.pdf#G7404).
- */
-#define LIT_UNICODE_CODE_POINT_NULL (0x0)
-#define LIT_UNICODE_CODE_POINT_MAX (0x10FFFF)
-
-#define LIT_UTF16_CODE_UNIT_MAX (0xFFFF)
-#define LIT_UTF16_FIRST_SURROGATE_CODE_POINT (0x10000)
-#define LIT_UTF16_LOW_SURROGATE_MARKER (0xDC00)
-#define LIT_UTF16_HIGH_SURROGATE_MARKER (0xD800)
-#define LIT_UTF16_HIGH_SURROGATE_MIN (0xD800)
-#define LIT_UTF16_HIGH_SURROGATE_MAX (0xDBFF)
-#define LIT_UTF16_LOW_SURROGATE_MIN (0xDC00)
-#define LIT_UTF16_LOW_SURROGATE_MAX (0xDFFF)
-#define LIT_UTF16_BITS_IN_SURROGATE (10)
-#define LIT_UTF16_LAST_10_BITS_MASK (0x3FF)
-
-#define LIT_UTF8_1_BYTE_MARKER (0x00)
-#define LIT_UTF8_2_BYTE_MARKER (0xC0)
-#define LIT_UTF8_3_BYTE_MARKER (0xE0)
-#define LIT_UTF8_4_BYTE_MARKER (0xF0)
-#define LIT_UTF8_5_BYTE_MARKER (0xF8)
-#define LIT_UTF8_EXTRA_BYTE_MARKER (0x80)
-
-#define LIT_UTF8_1_BYTE_MASK (0x80)
-#define LIT_UTF8_2_BYTE_MASK (0xE0)
-#define LIT_UTF8_3_BYTE_MASK (0xF0)
-#define LIT_UTF8_4_BYTE_MASK (0xF8)
-#define LIT_UTF8_EXTRA_BYTE_MASK (0xC0)
-
-#define LIT_UTF8_LAST_7_BITS_MASK (0x7F)
-#define LIT_UTF8_LAST_6_BITS_MASK (0x3F)
-#define LIT_UTF8_LAST_5_BITS_MASK (0x1F)
-#define LIT_UTF8_LAST_4_BITS_MASK (0x0F)
-#define LIT_UTF8_LAST_3_BITS_MASK (0x07)
-#define LIT_UTF8_LAST_2_BITS_MASK (0x03)
-#define LIT_UTF8_LAST_1_BIT_MASK (0x01)
-
-#define LIT_UTF8_BITS_IN_EXTRA_BYTES (6)
-
-#define LIT_UTF8_1_BYTE_CODE_POINT_MAX (0x7F)
-#define LIT_UTF8_2_BYTE_CODE_POINT_MIN (0x80)
-#define LIT_UTF8_2_BYTE_CODE_POINT_MAX (0x7FF)
-#define LIT_UTF8_3_BYTE_CODE_POINT_MIN (0x800)
-#define LIT_UTF8_3_BYTE_CODE_POINT_MAX (LIT_UTF16_CODE_UNIT_MAX)
-#define LIT_UTF8_4_BYTE_CODE_POINT_MIN (0x10000)
-#define LIT_UTF8_4_BYTE_CODE_POINT_MAX (LIT_UNICODE_CODE_POINT_MAX)
-
-/**
- * Differnce between byte count needed to represent code point greater than 0xFFFF
- * in common UTF-8 (4 bytes required) and CESU-8 (6 bytes required)
- */
-#define LIT_UTF8_CESU8_SURROGATE_SIZE_DIF (2 * LIT_UTF8_MAX_BYTES_IN_CODE_UNIT - LIT_UTF8_MAX_BYTES_IN_CODE_POINT)
-
-/**
- * Byte values >= LIT_UTF8_FIRST_BYTE_MAX are not allowed in internal strings
- */
-#define LIT_UTF8_FIRST_BYTE_MAX LIT_UTF8_5_BYTE_MARKER
-
-/* validation */
-bool lit_is_valid_utf8_string (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t buf_size);
-bool lit_is_valid_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p, lit_utf8_size_t buf_size);
-
-/* checks */
-bool lit_is_code_point_utf16_low_surrogate (lit_code_point_t code_point);
-bool lit_is_code_point_utf16_high_surrogate (lit_code_point_t code_point);
-
-/* size */
-lit_utf8_size_t lit_zt_utf8_string_size (const lit_utf8_byte_t *utf8_str_p);
-lit_utf8_size_t lit_get_utf8_size_of_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p, lit_utf8_size_t cesu8_buf_size);
-
-/* length */
-ecma_length_t lit_utf8_string_length (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t utf8_buf_size);
-ecma_length_t lit_get_utf8_length_of_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p, lit_utf8_size_t cesu8_buf_size);
-
-/* hash */
-lit_string_hash_t lit_utf8_string_calc_hash (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t utf8_buf_size);
-lit_string_hash_t lit_utf8_string_hash_combine (lit_string_hash_t hash_basis, const lit_utf8_byte_t *utf8_buf_p,
- lit_utf8_size_t utf8_buf_size);
-
-/* code unit access */
-ecma_char_t lit_utf8_string_code_unit_at (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t utf8_buf_size,
- ecma_length_t code_unit_offset);
-lit_utf8_size_t lit_get_unicode_char_size_by_utf8_first_byte (const lit_utf8_byte_t first_byte);
-
-/* conversion */
-lit_utf8_size_t lit_code_unit_to_utf8 (ecma_char_t code_unit, lit_utf8_byte_t *buf_p);
-lit_utf8_size_t lit_code_point_to_utf8 (lit_code_point_t code_point, lit_utf8_byte_t *buf);
-lit_utf8_size_t lit_code_point_to_cesu8 (lit_code_point_t code_point, lit_utf8_byte_t *buf);
-lit_utf8_size_t lit_convert_cesu8_string_to_utf8_string (const lit_utf8_byte_t *cesu8_string,
- lit_utf8_size_t cesu8_size,
- lit_utf8_byte_t *utf8_string,
- lit_utf8_size_t utf8_size);
-lit_code_point_t lit_convert_surrogate_pair_to_code_point (ecma_char_t high_surrogate, ecma_char_t low_surrogate);
-
-bool lit_compare_utf8_strings_relational (const lit_utf8_byte_t *string1_p, lit_utf8_size_t string1_size,
- const lit_utf8_byte_t *string2_p, lit_utf8_size_t string2_size);
-
-/* read code point from buffer */
-lit_utf8_size_t lit_read_code_point_from_utf8 (const lit_utf8_byte_t *buf_p, lit_utf8_size_t buf_size,
- lit_code_point_t *code_point);
-
-lit_utf8_size_t lit_read_code_unit_from_utf8 (const lit_utf8_byte_t *buf_p,
- ecma_char_t *code_point);
-
-lit_utf8_size_t lit_read_prev_code_unit_from_utf8 (const lit_utf8_byte_t *buf_p,
- ecma_char_t *code_point);
-
-ecma_char_t lit_utf8_read_next (const lit_utf8_byte_t **buf_p);
-ecma_char_t lit_utf8_read_prev (const lit_utf8_byte_t **buf_p);
-ecma_char_t lit_utf8_peek_next (const lit_utf8_byte_t *buf_p);
-ecma_char_t lit_utf8_peek_prev (const lit_utf8_byte_t *buf_p);
-void lit_utf8_incr (const lit_utf8_byte_t **buf_p);
-void lit_utf8_decr (const lit_utf8_byte_t **buf_p);
-
-#endif /* !LIT_STRINGS_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* This file is automatically generated by the gen-unicode.py script
- * from UnicodeData-9.0.0.txt and SpecialCasing-9.0.0.txt files. Do not edit! */
-
-/* Contains start points of character case ranges (these are bidirectional conversions). */
-static const uint16_t lit_character_case_ranges[] JERRY_ATTR_CONST_DATA =
-{
- 0x00c0, 0x00e0, 0x00d8, 0x00f8, 0x0189, 0x0256, 0x01b1, 0x028a, 0x0388, 0x03ad,
- 0x038e, 0x03cd, 0x0391, 0x03b1, 0x03a3, 0x03c3, 0x03fd, 0x037b, 0x0400, 0x0450,
- 0x0410, 0x0430, 0x0531, 0x0561, 0x10a0, 0x2d00, 0x13a0, 0xab70, 0x13f0, 0x13f8,
- 0x1f08, 0x1f00, 0x1f18, 0x1f10, 0x1f28, 0x1f20, 0x1f38, 0x1f30, 0x1f48, 0x1f40,
- 0x1f68, 0x1f60, 0x1fb8, 0x1fb0, 0x1fba, 0x1f70, 0x1fc8, 0x1f72, 0x1fd8, 0x1fd0,
- 0x1fda, 0x1f76, 0x1fe8, 0x1fe0, 0x1fea, 0x1f7a, 0x1ff8, 0x1f78, 0x1ffa, 0x1f7c,
- 0x2160, 0x2170, 0x24b6, 0x24d0, 0x2c00, 0x2c30, 0x2c7e, 0x023f, 0xff21, 0xff41
-};
-
-/* Interval lengths of start points in `character_case_ranges` table. */
-static const uint8_t lit_character_case_range_lengths[] JERRY_ATTR_CONST_DATA =
-{
- 0x0017, 0x0007, 0x0002, 0x0002, 0x0003, 0x0002, 0x0011, 0x0009, 0x0003, 0x0010,
- 0x0020, 0x0026, 0x0026, 0x0050, 0x0006, 0x0008, 0x0006, 0x0008, 0x0008, 0x0006,
- 0x0008, 0x0002, 0x0002, 0x0004, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002,
- 0x0010, 0x001a, 0x002f, 0x0002, 0x001a
-};
-
-/* Contains the start points of bidirectional conversion ranges. */
-static const uint16_t lit_character_pair_ranges[] JERRY_ATTR_CONST_DATA =
-{
- 0x0100, 0x0132, 0x0139, 0x014a, 0x0179, 0x0182, 0x0187, 0x018b, 0x0191, 0x0198,
- 0x01a0, 0x01a7, 0x01ac, 0x01af, 0x01b3, 0x01b8, 0x01bc, 0x01cd, 0x01de, 0x01f4,
- 0x01f8, 0x0222, 0x023b, 0x0241, 0x0246, 0x0370, 0x0376, 0x03d8, 0x03f7, 0x03fa,
- 0x0460, 0x048a, 0x04c1, 0x04d0, 0x1e00, 0x1ea0, 0x2183, 0x2c60, 0x2c67, 0x2c72,
- 0x2c75, 0x2c80, 0x2ceb, 0x2cf2, 0xa640, 0xa680, 0xa722, 0xa732, 0xa779, 0xa77e,
- 0xa78b, 0xa790, 0xa796, 0xa7b4
-};
-
-/* Interval lengths of start points in `character_pair_ranges` table. */
-static const uint8_t lit_character_pair_range_lengths[] JERRY_ATTR_CONST_DATA =
-{
- 0x0030, 0x0006, 0x0010, 0x002e, 0x0006, 0x0004, 0x0002, 0x0002, 0x0002, 0x0002,
- 0x0006, 0x0002, 0x0002, 0x0002, 0x0004, 0x0002, 0x0002, 0x0010, 0x0012, 0x0002,
- 0x0028, 0x0012, 0x0002, 0x0002, 0x000a, 0x0004, 0x0002, 0x0018, 0x0002, 0x0002,
- 0x0022, 0x0036, 0x000e, 0x0060, 0x0096, 0x0060, 0x0002, 0x0002, 0x0006, 0x0002,
- 0x0002, 0x0064, 0x0004, 0x0002, 0x002e, 0x001c, 0x000e, 0x003e, 0x0004, 0x000a,
- 0x0002, 0x0004, 0x0014, 0x0004
-};
-
-/* Contains lower/upper case bidirectional conversion pairs. */
-static const uint16_t lit_character_pairs[] JERRY_ATTR_CONST_DATA =
-{
- 0x0178, 0x00ff, 0x0181, 0x0253, 0x0186, 0x0254, 0x018e, 0x01dd, 0x018f, 0x0259,
- 0x0190, 0x025b, 0x0193, 0x0260, 0x0194, 0x0263, 0x0196, 0x0269, 0x0197, 0x0268,
- 0x019c, 0x026f, 0x019d, 0x0272, 0x019f, 0x0275, 0x01a6, 0x0280, 0x01a9, 0x0283,
- 0x01ae, 0x0288, 0x01b7, 0x0292, 0x01c4, 0x01c6, 0x01c7, 0x01c9, 0x01ca, 0x01cc,
- 0x01f1, 0x01f3, 0x01f6, 0x0195, 0x01f7, 0x01bf, 0x0220, 0x019e, 0x023a, 0x2c65,
- 0x023d, 0x019a, 0x023e, 0x2c66, 0x0243, 0x0180, 0x0244, 0x0289, 0x0245, 0x028c,
- 0x037f, 0x03f3, 0x0386, 0x03ac, 0x038c, 0x03cc, 0x03cf, 0x03d7, 0x03f9, 0x03f2,
- 0x04c0, 0x04cf, 0x10c7, 0x2d27, 0x10cd, 0x2d2d, 0x1f59, 0x1f51, 0x1f5b, 0x1f53,
- 0x1f5d, 0x1f55, 0x1f5f, 0x1f57, 0x1fec, 0x1fe5, 0x2132, 0x214e, 0x2c62, 0x026b,
- 0x2c63, 0x1d7d, 0x2c64, 0x027d, 0x2c6d, 0x0251, 0x2c6e, 0x0271, 0x2c6f, 0x0250,
- 0x2c70, 0x0252, 0xa77d, 0x1d79, 0xa78d, 0x0265, 0xa7aa, 0x0266, 0xa7ab, 0x025c,
- 0xa7ac, 0x0261, 0xa7ad, 0x026c, 0xa7ae, 0x026a, 0xa7b0, 0x029e, 0xa7b1, 0x0287,
- 0xa7b2, 0x029d, 0xa7b3, 0xab53
-};
-
-/* Contains start points of one-to-two uppercase ranges where the second character
- * is always the same.
- */
-static const uint16_t lit_upper_case_special_ranges[] JERRY_ATTR_CONST_DATA =
-{
- 0x1f80, 0x1f08, 0x0399, 0x1f88, 0x1f08, 0x0399, 0x1f90, 0x1f28, 0x0399, 0x1f98,
- 0x1f28, 0x0399, 0x1fa0, 0x1f68, 0x0399, 0x1fa8, 0x1f68, 0x0399
-};
-
-/* Interval lengths for start points in `upper_case_special_ranges` table. */
-static const uint8_t lit_upper_case_special_range_lengths[] JERRY_ATTR_CONST_DATA =
-{
- 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007
-};
-
-/* Contains start points of lowercase ranges. */
-static const uint16_t lit_lower_case_ranges[] JERRY_ATTR_CONST_DATA =
-{
- 0x1e96, 0x1e96, 0x1f80, 0x1f80, 0x1f88, 0x1f80, 0x1f90, 0x1f90, 0x1f98, 0x1f90,
- 0x1fa0, 0x1fa0, 0x1fa8, 0x1fa0, 0x1fb2, 0x1fb2, 0x1fb6, 0x1fb6, 0x1fc2, 0x1fc2,
- 0x1fc6, 0x1fc6, 0x1fd2, 0x1fd2, 0x1fd6, 0x1fd6, 0x1fe2, 0x1fe2, 0x1fe6, 0x1fe6,
- 0x1ff2, 0x1ff2, 0x1ff6, 0x1ff6, 0xfb00, 0xfb00, 0xfb13, 0xfb13
-};
-
-/* Interval lengths for start points in `lower_case_ranges` table. */
-static const uint8_t lit_lower_case_range_lengths[] JERRY_ATTR_CONST_DATA =
-{
- 0x0005, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0003, 0x0002, 0x0003,
- 0x0002, 0x0002, 0x0002, 0x0003, 0x0002, 0x0003, 0x0002, 0x0007, 0x0005
-};
-
-/* The remaining lowercase conversions. The lowercase variant can be one-to-three character long. */
-static const uint16_t lit_lower_case_conversions[] JERRY_ATTR_CONST_DATA =
-{
- 0x00df, 0x00df, 0x0149, 0x0149, 0x01c5, 0x01c6, 0x01c8, 0x01c9, 0x01cb, 0x01cc,
- 0x01f0, 0x01f0, 0x01f2, 0x01f3, 0x0390, 0x0390, 0x03b0, 0x03b0, 0x03f4, 0x03b8,
- 0x0587, 0x0587, 0x1e9e, 0x00df, 0x1f50, 0x1f50, 0x1f52, 0x1f52, 0x1f54, 0x1f54,
- 0x1f56, 0x1f56, 0x1fbc, 0x1fb3, 0x1fcc, 0x1fc3, 0x1ffc, 0x1ff3, 0x2126, 0x03c9,
- 0x212a, 0x006b, 0x212b, 0x00e5, 0x0130, 0x0069, 0x0307
-};
-
-/* Number of one-to-one, one-to-two, and one-to-three lowercase conversions. */
-static const uint8_t lit_lower_case_conversion_counters[] JERRY_ATTR_CONST_DATA =
-{
- 0x0016, 0x0001, 0x0000
-};
-
-/* The remaining uppercase conversions. The uppercase variant can be one-to-three character long. */
-static const uint16_t lit_upper_case_conversions[] JERRY_ATTR_CONST_DATA =
-{
- 0x00b5, 0x039c, 0x0130, 0x0130, 0x0131, 0x0049, 0x017f, 0x0053, 0x01c5, 0x01c4,
- 0x01c8, 0x01c7, 0x01cb, 0x01ca, 0x01f2, 0x01f1, 0x0345, 0x0399, 0x03c2, 0x03a3,
- 0x03d0, 0x0392, 0x03d1, 0x0398, 0x03d5, 0x03a6, 0x03d6, 0x03a0, 0x03f0, 0x039a,
- 0x03f1, 0x03a1, 0x03f5, 0x0395, 0x1c80, 0x0412, 0x1c81, 0x0414, 0x1c82, 0x041e,
- 0x1c83, 0x0421, 0x1c84, 0x0422, 0x1c85, 0x0422, 0x1c86, 0x042a, 0x1c87, 0x0462,
- 0x1c88, 0xa64a, 0x1e9b, 0x1e60, 0x1fbe, 0x0399, 0x00df, 0x0053, 0x0053, 0x0149,
- 0x02bc, 0x004e, 0x01f0, 0x004a, 0x030c, 0x0587, 0x0535, 0x0552, 0x1e96, 0x0048,
- 0x0331, 0x1e97, 0x0054, 0x0308, 0x1e98, 0x0057, 0x030a, 0x1e99, 0x0059, 0x030a,
- 0x1e9a, 0x0041, 0x02be, 0x1f50, 0x03a5, 0x0313, 0x1f87, 0x1f0f, 0x0399, 0x1f8f,
- 0x1f0f, 0x0399, 0x1f97, 0x1f2f, 0x0399, 0x1f9f, 0x1f2f, 0x0399, 0x1fa7, 0x1f6f,
- 0x0399, 0x1faf, 0x1f6f, 0x0399, 0x1fb2, 0x1fba, 0x0399, 0x1fb3, 0x0391, 0x0399,
- 0x1fb4, 0x0386, 0x0399, 0x1fb6, 0x0391, 0x0342, 0x1fbc, 0x0391, 0x0399, 0x1fc2,
- 0x1fca, 0x0399, 0x1fc3, 0x0397, 0x0399, 0x1fc4, 0x0389, 0x0399, 0x1fc6, 0x0397,
- 0x0342, 0x1fcc, 0x0397, 0x0399, 0x1fd6, 0x0399, 0x0342, 0x1fe4, 0x03a1, 0x0313,
- 0x1fe6, 0x03a5, 0x0342, 0x1ff2, 0x1ffa, 0x0399, 0x1ff3, 0x03a9, 0x0399, 0x1ff4,
- 0x038f, 0x0399, 0x1ff6, 0x03a9, 0x0342, 0x1ffc, 0x03a9, 0x0399, 0xfb00, 0x0046,
- 0x0046, 0xfb01, 0x0046, 0x0049, 0xfb02, 0x0046, 0x004c, 0xfb05, 0x0053, 0x0054,
- 0xfb06, 0x0053, 0x0054, 0xfb13, 0x0544, 0x0546, 0xfb14, 0x0544, 0x0535, 0xfb15,
- 0x0544, 0x053b, 0xfb16, 0x054e, 0x0546, 0xfb17, 0x0544, 0x053d, 0x0390, 0x0399,
- 0x0308, 0x0301, 0x03b0, 0x03a5, 0x0308, 0x0301, 0x1f52, 0x03a5, 0x0313, 0x0300,
- 0x1f54, 0x03a5, 0x0313, 0x0301, 0x1f56, 0x03a5, 0x0313, 0x0342, 0x1fb7, 0x0391,
- 0x0342, 0x0399, 0x1fc7, 0x0397, 0x0342, 0x0399, 0x1fd2, 0x0399, 0x0308, 0x0300,
- 0x1fd3, 0x0399, 0x0308, 0x0301, 0x1fd7, 0x0399, 0x0308, 0x0342, 0x1fe2, 0x03a5,
- 0x0308, 0x0300, 0x1fe3, 0x03a5, 0x0308, 0x0301, 0x1fe7, 0x03a5, 0x0308, 0x0342,
- 0x1ff7, 0x03a9, 0x0342, 0x0399, 0xfb03, 0x0046, 0x0046, 0x0049, 0xfb04, 0x0046,
- 0x0046, 0x004c
-};
-
-/* Number of one-to-one, one-to-two, and one-to-three uppercase conversions. */
-static const uint8_t lit_upper_case_conversion_counters[] JERRY_ATTR_CONST_DATA =
-{
- 0x001c, 0x002c, 0x0010
-};
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* This file is automatically generated by the gen-unicode.py script
- * from UnicodeData-9.0.0.txt. Do not edit! */
-
-/**
- * Character interval starting points for the unicode letters.
- *
- * The characters covered by these intervals are from
- * the following Unicode categories: Lu, Ll, Lt, Lm, Lo, Nl
- */
-static const uint16_t lit_unicode_letter_interval_sps[] JERRY_ATTR_CONST_DATA =
-{
- 0x00c0, 0x00d8, 0x00f8, 0x01f8, 0x02c6, 0x02e0, 0x0370, 0x0376, 0x037a, 0x0388,
- 0x038e, 0x03a3, 0x03f7, 0x048a, 0x0531, 0x0561, 0x05d0, 0x05f0, 0x0620, 0x066e,
- 0x0671, 0x06e5, 0x06ee, 0x06fa, 0x0712, 0x074d, 0x07ca, 0x07f4, 0x0800, 0x0840,
- 0x08a0, 0x08b6, 0x0904, 0x0958, 0x0971, 0x0985, 0x098f, 0x0993, 0x09aa, 0x09b6,
- 0x09dc, 0x09df, 0x09f0, 0x0a05, 0x0a0f, 0x0a13, 0x0a2a, 0x0a32, 0x0a35, 0x0a38,
- 0x0a59, 0x0a72, 0x0a85, 0x0a8f, 0x0a93, 0x0aaa, 0x0ab2, 0x0ab5, 0x0ae0, 0x0b05,
- 0x0b0f, 0x0b13, 0x0b2a, 0x0b32, 0x0b35, 0x0b5c, 0x0b5f, 0x0b85, 0x0b8e, 0x0b92,
- 0x0b99, 0x0b9e, 0x0ba3, 0x0ba8, 0x0bae, 0x0c05, 0x0c0e, 0x0c12, 0x0c2a, 0x0c58,
- 0x0c60, 0x0c85, 0x0c8e, 0x0c92, 0x0caa, 0x0cb5, 0x0ce0, 0x0cf1, 0x0d05, 0x0d0e,
- 0x0d12, 0x0d54, 0x0d5f, 0x0d7a, 0x0d85, 0x0d9a, 0x0db3, 0x0dc0, 0x0e01, 0x0e32,
- 0x0e40, 0x0e81, 0x0e87, 0x0e94, 0x0e99, 0x0ea1, 0x0eaa, 0x0ead, 0x0eb2, 0x0ec0,
- 0x0edc, 0x0f40, 0x0f49, 0x0f88, 0x1000, 0x1050, 0x105a, 0x1065, 0x106e, 0x1075,
- 0x10a0, 0x10d0, 0x10fc, 0x11fc, 0x124a, 0x1250, 0x125a, 0x1260, 0x128a, 0x1290,
- 0x12b2, 0x12b8, 0x12c2, 0x12c8, 0x12d8, 0x1312, 0x1318, 0x1380, 0x13a0, 0x13f8,
- 0x1401, 0x1501, 0x1601, 0x166f, 0x1681, 0x16a0, 0x16ee, 0x1700, 0x170e, 0x1720,
- 0x1740, 0x1760, 0x176e, 0x1780, 0x1820, 0x1880, 0x1887, 0x18b0, 0x1900, 0x1950,
- 0x1970, 0x1980, 0x19b0, 0x1a00, 0x1a20, 0x1b05, 0x1b45, 0x1b83, 0x1bae, 0x1bba,
- 0x1c00, 0x1c4d, 0x1c5a, 0x1c80, 0x1ce9, 0x1cee, 0x1cf5, 0x1d00, 0x1e00, 0x1f00,
- 0x1f18, 0x1f20, 0x1f48, 0x1f50, 0x1f5f, 0x1f80, 0x1fb6, 0x1fc2, 0x1fc6, 0x1fd0,
- 0x1fd6, 0x1fe0, 0x1ff2, 0x1ff6, 0x2090, 0x210a, 0x2119, 0x212a, 0x212f, 0x213c,
- 0x2145, 0x2160, 0x2c00, 0x2c30, 0x2c60, 0x2ceb, 0x2cf2, 0x2d00, 0x2d30, 0x2d80,
- 0x2da0, 0x2da8, 0x2db0, 0x2db8, 0x2dc0, 0x2dc8, 0x2dd0, 0x2dd8, 0x3005, 0x3021,
- 0x3031, 0x3038, 0x3041, 0x309d, 0x30a1, 0x30fc, 0x3105, 0x3131, 0x31a0, 0x31f0,
- 0x3400, 0x3500, 0x3600, 0x3700, 0x3800, 0x3900, 0x3a00, 0x3b00, 0x3c00, 0x3d00,
- 0x3e00, 0x3f00, 0x4000, 0x4100, 0x4200, 0x4300, 0x4400, 0x4500, 0x4600, 0x4700,
- 0x4800, 0x4900, 0x4a00, 0x4b00, 0x4c00, 0x4d00, 0x4e00, 0x4f00, 0x5000, 0x5100,
- 0x5200, 0x5300, 0x5400, 0x5500, 0x5600, 0x5700, 0x5800, 0x5900, 0x5a00, 0x5b00,
- 0x5c00, 0x5d00, 0x5e00, 0x5f00, 0x6000, 0x6100, 0x6200, 0x6300, 0x6400, 0x6500,
- 0x6600, 0x6700, 0x6800, 0x6900, 0x6a00, 0x6b00, 0x6c00, 0x6d00, 0x6e00, 0x6f00,
- 0x7000, 0x7100, 0x7200, 0x7300, 0x7400, 0x7500, 0x7600, 0x7700, 0x7800, 0x7900,
- 0x7a00, 0x7b00, 0x7c00, 0x7d00, 0x7e00, 0x7f00, 0x8000, 0x8100, 0x8200, 0x8300,
- 0x8400, 0x8500, 0x8600, 0x8700, 0x8800, 0x8900, 0x8a00, 0x8b00, 0x8c00, 0x8d00,
- 0x8e00, 0x8f00, 0x9000, 0x9100, 0x9200, 0x9300, 0x9400, 0x9500, 0x9600, 0x9700,
- 0x9800, 0x9900, 0x9a00, 0x9b00, 0x9c00, 0x9d00, 0x9e00, 0x9f00, 0xa000, 0xa100,
- 0xa200, 0xa300, 0xa400, 0xa4d0, 0xa500, 0xa600, 0xa610, 0xa62a, 0xa640, 0xa67f,
- 0xa6a0, 0xa717, 0xa722, 0xa78b, 0xa7b0, 0xa7f7, 0xa803, 0xa807, 0xa80c, 0xa840,
- 0xa882, 0xa8f2, 0xa90a, 0xa930, 0xa960, 0xa984, 0xa9e0, 0xa9e6, 0xa9fa, 0xaa00,
- 0xaa40, 0xaa44, 0xaa60, 0xaa7e, 0xaab5, 0xaab9, 0xaadb, 0xaae0, 0xaaf2, 0xab01,
- 0xab09, 0xab11, 0xab20, 0xab28, 0xab30, 0xab5c, 0xab70, 0xac00, 0xad00, 0xae00,
- 0xaf00, 0xb000, 0xb100, 0xb200, 0xb300, 0xb400, 0xb500, 0xb600, 0xb700, 0xb800,
- 0xb900, 0xba00, 0xbb00, 0xbc00, 0xbd00, 0xbe00, 0xbf00, 0xc000, 0xc100, 0xc200,
- 0xc300, 0xc400, 0xc500, 0xc600, 0xc700, 0xc800, 0xc900, 0xca00, 0xcb00, 0xcc00,
- 0xcd00, 0xce00, 0xcf00, 0xd000, 0xd100, 0xd200, 0xd300, 0xd400, 0xd500, 0xd600,
- 0xd700, 0xd7b0, 0xd7cb, 0xf900, 0xfa00, 0xfa70, 0xfb00, 0xfb13, 0xfb1f, 0xfb2a,
- 0xfb38, 0xfb40, 0xfb43, 0xfb46, 0xfbd3, 0xfcd3, 0xfd50, 0xfd92, 0xfdf0, 0xfe70,
- 0xfe76, 0xff21, 0xff41, 0xff66, 0xffc2, 0xffca, 0xffd2, 0xffda
-};
-
-/**
- * Character lengths for the unicode letters.
- *
- * The characters covered by these intervals are from
- * the following Unicode categories: Lu, Ll, Lt, Lm, Lo, Nl
- */
-static const uint8_t lit_unicode_letter_interval_lengths[] JERRY_ATTR_CONST_DATA =
-{
- 0x0016, 0x001e, 0x00ff, 0x00c9, 0x000b, 0x0004, 0x0004, 0x0001, 0x0003, 0x0002,
- 0x0013, 0x0052, 0x008a, 0x00a5, 0x0025, 0x0026, 0x001a, 0x0002, 0x002a, 0x0001,
- 0x0062, 0x0001, 0x0001, 0x0002, 0x001d, 0x0058, 0x0020, 0x0001, 0x0015, 0x0018,
- 0x0014, 0x0007, 0x0035, 0x0009, 0x000f, 0x0007, 0x0001, 0x0015, 0x0006, 0x0003,
- 0x0001, 0x0002, 0x0001, 0x0005, 0x0001, 0x0015, 0x0006, 0x0001, 0x0001, 0x0001,
- 0x0003, 0x0002, 0x0008, 0x0002, 0x0015, 0x0006, 0x0001, 0x0004, 0x0001, 0x0007,
- 0x0001, 0x0015, 0x0006, 0x0001, 0x0004, 0x0001, 0x0002, 0x0005, 0x0002, 0x0003,
- 0x0001, 0x0001, 0x0001, 0x0002, 0x000b, 0x0007, 0x0002, 0x0016, 0x000f, 0x0002,
- 0x0001, 0x0007, 0x0002, 0x0016, 0x0009, 0x0004, 0x0001, 0x0001, 0x0007, 0x0002,
- 0x0028, 0x0002, 0x0002, 0x0005, 0x0011, 0x0017, 0x0008, 0x0006, 0x002f, 0x0001,
- 0x0006, 0x0001, 0x0001, 0x0003, 0x0006, 0x0002, 0x0001, 0x0003, 0x0001, 0x0004,
- 0x0003, 0x0007, 0x0023, 0x0004, 0x002a, 0x0005, 0x0003, 0x0001, 0x0002, 0x000c,
- 0x0025, 0x002a, 0x00ff, 0x004c, 0x0003, 0x0006, 0x0003, 0x0028, 0x0003, 0x0020,
- 0x0003, 0x0006, 0x0003, 0x000e, 0x0038, 0x0003, 0x0042, 0x000f, 0x0055, 0x0005,
- 0x00ff, 0x00ff, 0x006b, 0x0010, 0x0019, 0x004a, 0x000a, 0x000c, 0x0003, 0x0011,
- 0x0011, 0x000c, 0x0002, 0x0033, 0x0057, 0x0004, 0x0021, 0x0045, 0x001e, 0x001d,
- 0x0004, 0x002b, 0x0019, 0x0016, 0x0034, 0x002e, 0x0006, 0x001d, 0x0001, 0x002b,
- 0x0023, 0x0002, 0x0023, 0x0008, 0x0003, 0x0003, 0x0001, 0x00bf, 0x00ff, 0x0015,
- 0x0005, 0x0025, 0x0005, 0x0007, 0x001e, 0x0034, 0x0006, 0x0002, 0x0006, 0x0003,
- 0x0005, 0x000c, 0x0002, 0x0006, 0x000c, 0x0009, 0x0004, 0x0003, 0x000a, 0x0003,
- 0x0004, 0x0028, 0x002e, 0x002e, 0x0084, 0x0003, 0x0001, 0x0025, 0x0037, 0x0016,
- 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0002, 0x0008,
- 0x0004, 0x0004, 0x0055, 0x0002, 0x0059, 0x0003, 0x0028, 0x005d, 0x001a, 0x000f,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00b5, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00d5, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x008c, 0x002d, 0x00ff, 0x000c, 0x000f, 0x0001, 0x002e, 0x001e,
- 0x004f, 0x0008, 0x0066, 0x0023, 0x0007, 0x000a, 0x0002, 0x0003, 0x0016, 0x0033,
- 0x0031, 0x0005, 0x001b, 0x0016, 0x001c, 0x002e, 0x0004, 0x0009, 0x0004, 0x0028,
- 0x0002, 0x0007, 0x0016, 0x0031, 0x0001, 0x0004, 0x0002, 0x000a, 0x0002, 0x0005,
- 0x0005, 0x0005, 0x0006, 0x0006, 0x002a, 0x0009, 0x0072, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x00ff,
- 0x00a3, 0x0016, 0x0030, 0x00ff, 0x006d, 0x0069, 0x0006, 0x0004, 0x0009, 0x000c,
- 0x0004, 0x0001, 0x0001, 0x006b, 0x00ff, 0x006a, 0x003f, 0x0035, 0x000b, 0x0004,
- 0x0086, 0x0019, 0x0019, 0x0058, 0x0005, 0x0005, 0x0005, 0x0002
-};
-
-/**
- * Those unicode letter characters that are not inside any of
- * the intervals specified in lit_unicode_letter_interval_sps array.
- *
- * The characters are from the following Unicode categories:
- * Lu, Ll, Lt, Lm, Lo, Nl
- */
-static const uint16_t lit_unicode_letter_chars[] JERRY_ATTR_CONST_DATA =
-{
- 0x00aa, 0x00b5, 0x00ba, 0x02ec, 0x02ee, 0x037f, 0x0386, 0x038c, 0x0559, 0x06d5,
- 0x06ff, 0x0710, 0x07b1, 0x07fa, 0x081a, 0x0824, 0x0828, 0x093d, 0x0950, 0x09b2,
- 0x09bd, 0x09ce, 0x0a5e, 0x0abd, 0x0ad0, 0x0af9, 0x0b3d, 0x0b71, 0x0b83, 0x0b9c,
- 0x0bd0, 0x0c3d, 0x0c80, 0x0cbd, 0x0cde, 0x0d3d, 0x0d4e, 0x0dbd, 0x0e84, 0x0e8a,
- 0x0e8d, 0x0ea5, 0x0ea7, 0x0ebd, 0x0ec6, 0x0f00, 0x103f, 0x1061, 0x108e, 0x10c7,
- 0x10cd, 0x1258, 0x12c0, 0x17d7, 0x17dc, 0x18aa, 0x1aa7, 0x1f59, 0x1f5b, 0x1f5d,
- 0x1fbe, 0x2071, 0x207f, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214e,
- 0x2d27, 0x2d2d, 0x2d6f, 0x2e2f, 0x3400, 0x4e00, 0xa8fb, 0xa8fd, 0xa9cf, 0xaa7a,
- 0xaab1, 0xaac0, 0xaac2, 0xac00, 0xfb1d, 0xfb3e
-};
-
-/**
- * Character interval starting points for non-letter character
- * that can be used as a non-first character of an identifier.
- *
- * The characters covered by these intervals are from
- * the following Unicode categories: Nd, Mn, Mc, Pc
- */
-static const uint16_t lit_unicode_non_letter_ident_part_interval_sps[] JERRY_ATTR_CONST_DATA =
-{
- 0x0300, 0x0483, 0x0591, 0x05c1, 0x05c4, 0x0610, 0x064b, 0x06d6, 0x06df, 0x06e7,
- 0x06ea, 0x06f0, 0x0730, 0x07a6, 0x07c0, 0x07eb, 0x0816, 0x081b, 0x0825, 0x0829,
- 0x0859, 0x08d4, 0x08e3, 0x093a, 0x093e, 0x0951, 0x0962, 0x0966, 0x0981, 0x09be,
- 0x09c7, 0x09cb, 0x09e2, 0x09e6, 0x0a01, 0x0a3e, 0x0a47, 0x0a4b, 0x0a66, 0x0a81,
- 0x0abe, 0x0ac7, 0x0acb, 0x0ae2, 0x0ae6, 0x0b01, 0x0b3e, 0x0b47, 0x0b4b, 0x0b56,
- 0x0b62, 0x0b66, 0x0bbe, 0x0bc6, 0x0bca, 0x0be6, 0x0c00, 0x0c3e, 0x0c46, 0x0c4a,
- 0x0c55, 0x0c62, 0x0c66, 0x0c81, 0x0cbe, 0x0cc6, 0x0cca, 0x0cd5, 0x0ce2, 0x0ce6,
- 0x0d01, 0x0d3e, 0x0d46, 0x0d4a, 0x0d62, 0x0d66, 0x0d82, 0x0dcf, 0x0dd8, 0x0de6,
- 0x0df2, 0x0e34, 0x0e47, 0x0e50, 0x0eb4, 0x0ebb, 0x0ec8, 0x0ed0, 0x0f18, 0x0f20,
- 0x0f3e, 0x0f71, 0x0f86, 0x0f8d, 0x0f99, 0x102b, 0x1040, 0x1056, 0x105e, 0x1062,
- 0x1067, 0x1071, 0x1082, 0x108f, 0x135d, 0x1712, 0x1732, 0x1752, 0x1772, 0x17b4,
- 0x17e0, 0x180b, 0x1810, 0x1885, 0x1920, 0x1930, 0x1946, 0x19d0, 0x1a17, 0x1a55,
- 0x1a60, 0x1a7f, 0x1a90, 0x1ab0, 0x1b00, 0x1b34, 0x1b50, 0x1b6b, 0x1b80, 0x1ba1,
- 0x1bb0, 0x1be6, 0x1c24, 0x1c40, 0x1c50, 0x1cd0, 0x1cd4, 0x1cf2, 0x1cf8, 0x1dc0,
- 0x1dfb, 0x203f, 0x20d0, 0x20e5, 0x2cef, 0x2de0, 0x302a, 0x3099, 0xa620, 0xa674,
- 0xa69e, 0xa6f0, 0xa823, 0xa880, 0xa8b4, 0xa8d0, 0xa8e0, 0xa900, 0xa926, 0xa947,
- 0xa980, 0xa9b3, 0xa9d0, 0xa9f0, 0xaa29, 0xaa4c, 0xaa50, 0xaa7b, 0xaab2, 0xaab7,
- 0xaabe, 0xaaeb, 0xaaf5, 0xabe3, 0xabec, 0xabf0, 0xfe00, 0xfe20, 0xfe33, 0xfe4d,
- 0xff10
-};
-
-/**
- * Character interval lengths for non-letter character
- * that can be used as a non-first character of an identifier.
- *
- * The characters covered by these intervals are from
- * the following Unicode categories: Nd, Mn, Mc, Pc
- */
-static const uint8_t lit_unicode_non_letter_ident_part_interval_lengths[] JERRY_ATTR_CONST_DATA =
-{
- 0x006f, 0x0004, 0x002c, 0x0001, 0x0001, 0x000a, 0x001e, 0x0006, 0x0005, 0x0001,
- 0x0003, 0x0009, 0x001a, 0x000a, 0x0009, 0x0008, 0x0003, 0x0008, 0x0002, 0x0004,
- 0x0002, 0x000d, 0x0020, 0x0002, 0x0011, 0x0006, 0x0001, 0x0009, 0x0002, 0x0006,
- 0x0001, 0x0002, 0x0001, 0x0009, 0x0002, 0x0004, 0x0001, 0x0002, 0x000b, 0x0002,
- 0x0007, 0x0002, 0x0002, 0x0001, 0x0009, 0x0002, 0x0006, 0x0001, 0x0002, 0x0001,
- 0x0001, 0x0009, 0x0004, 0x0002, 0x0003, 0x0009, 0x0003, 0x0006, 0x0002, 0x0003,
- 0x0001, 0x0001, 0x0009, 0x0002, 0x0006, 0x0002, 0x0003, 0x0001, 0x0001, 0x0009,
- 0x0002, 0x0006, 0x0002, 0x0003, 0x0001, 0x0009, 0x0001, 0x0005, 0x0007, 0x0009,
- 0x0001, 0x0006, 0x0007, 0x0009, 0x0005, 0x0001, 0x0005, 0x0009, 0x0001, 0x0009,
- 0x0001, 0x0013, 0x0001, 0x000a, 0x0023, 0x0013, 0x0009, 0x0003, 0x0002, 0x0002,
- 0x0006, 0x0003, 0x000b, 0x000e, 0x0002, 0x0002, 0x0002, 0x0001, 0x0001, 0x001f,
- 0x0009, 0x0002, 0x0009, 0x0001, 0x000b, 0x000b, 0x0009, 0x0009, 0x0004, 0x0009,
- 0x001c, 0x000a, 0x0009, 0x000d, 0x0004, 0x0010, 0x0009, 0x0008, 0x0002, 0x000c,
- 0x0009, 0x000d, 0x0013, 0x0009, 0x0009, 0x0002, 0x0014, 0x0002, 0x0001, 0x0035,
- 0x0004, 0x0001, 0x000c, 0x000b, 0x0002, 0x001f, 0x0005, 0x0001, 0x0009, 0x0009,
- 0x0001, 0x0001, 0x0004, 0x0001, 0x0011, 0x0009, 0x0011, 0x0009, 0x0007, 0x000c,
- 0x0003, 0x000d, 0x0009, 0x0009, 0x000d, 0x0001, 0x0009, 0x0002, 0x0002, 0x0001,
- 0x0001, 0x0004, 0x0001, 0x0007, 0x0001, 0x0009, 0x000f, 0x000f, 0x0001, 0x0002,
- 0x0009
-};
-
-/**
- * Those non-letter characters that can be used as a non-first
- * character of an identifier and not included in any of the intervals
- * specified in lit_unicode_non_letter_ident_part_interval_sps array.
- *
- * The characters are from the following Unicode categories:
- * Nd, Mn, Mc, Pc
- */
-static const uint16_t lit_unicode_non_letter_ident_part_chars[] JERRY_ATTR_CONST_DATA =
-{
- 0x05bf, 0x05c7, 0x0670, 0x0711, 0x09bc, 0x09d7, 0x0a3c, 0x0a51, 0x0a75, 0x0abc,
- 0x0b3c, 0x0b82, 0x0bd7, 0x0cbc, 0x0d57, 0x0dca, 0x0dd6, 0x0e31, 0x0eb1, 0x0f35,
- 0x0f37, 0x0f39, 0x0fc6, 0x17dd, 0x18a9, 0x1ced, 0x2054, 0x20e1, 0x2d7f, 0xa66f,
- 0xa802, 0xa806, 0xa80b, 0xa9e5, 0xaa43, 0xaab0, 0xaac1, 0xfb1e, 0xff3f
-};
-
-/**
- * Unicode separator character interval starting points from Unicode category: Zs
- */
-static const uint16_t lit_unicode_separator_char_interval_sps[] JERRY_ATTR_CONST_DATA =
-{
- 0x2000
-};
-
-/**
- * Unicode separator character interval lengths from Unicode category: Zs
- */
-static const uint8_t lit_unicode_separator_char_interval_lengths[] JERRY_ATTR_CONST_DATA =
-{
- 0x000b
-};
-
-/**
- * Unicode separator characters that are not in the
- * lit_unicode_separator_char_intervals array.
- *
- * Unicode category: Zs
- */
-static const uint16_t lit_unicode_separator_chars[] JERRY_ATTR_CONST_DATA =
-{
- 0x1680, 0x180e, 0x202f, 0x205f, 0x3000
-};
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef OPCODES_H
-#define OPCODES_H
-
-#include "ecma-globals.h"
-#include "vm-defines.h"
-
-/** \addtogroup vm Virtual machine
- * @{
- *
- * \addtogroup vm_opcodes Opcodes
- * @{
- */
-
-/**
- * Number arithmetic operations.
- */
-typedef enum
-{
- NUMBER_ARITHMETIC_SUBSTRACTION, /**< substraction */
- NUMBER_ARITHMETIC_MULTIPLICATION, /**< multiplication */
- NUMBER_ARITHMETIC_DIVISION, /**< division */
- NUMBER_ARITHMETIC_REMAINDER, /**< remainder calculation */
-} number_arithmetic_op;
-
-/**
- * Number bitwise logic operations.
- */
-typedef enum
-{
- NUMBER_BITWISE_LOGIC_AND, /**< bitwise AND calculation */
- NUMBER_BITWISE_LOGIC_OR, /**< bitwise OR calculation */
- NUMBER_BITWISE_LOGIC_XOR, /**< bitwise XOR calculation */
- NUMBER_BITWISE_SHIFT_LEFT, /**< bitwise LEFT SHIFT calculation */
- NUMBER_BITWISE_SHIFT_RIGHT, /**< bitwise RIGHT_SHIFT calculation */
- NUMBER_BITWISE_SHIFT_URIGHT, /**< bitwise UNSIGNED RIGHT SHIFT calculation */
- NUMBER_BITWISE_NOT, /**< bitwise NOT calculation */
-} number_bitwise_logic_op;
-
-ecma_value_t
-vm_var_decl (vm_frame_ctx_t *frame_ctx_p, ecma_string_t *var_name_str_p);
-
-ecma_value_t
-opfunc_equality (ecma_value_t left_value, ecma_value_t right_value);
-
-ecma_value_t
-do_number_arithmetic (number_arithmetic_op op, ecma_value_t left_value, ecma_value_t right_value);
-
-ecma_value_t
-opfunc_unary_operation (ecma_value_t left_value, bool is_plus);
-
-ecma_value_t
-do_number_bitwise_logic (number_bitwise_logic_op op, ecma_value_t left_value, ecma_value_t right_value);
-
-ecma_value_t
-opfunc_addition (ecma_value_t left_value, ecma_value_t right_value);
-
-ecma_value_t
-opfunc_relation (ecma_value_t left_value, ecma_value_t right_value, bool left_first, bool is_invert);
-
-ecma_value_t
-opfunc_in (ecma_value_t left_value, ecma_value_t right_value);
-
-ecma_value_t
-opfunc_instanceof (ecma_value_t left_value, ecma_value_t right_value);
-
-ecma_value_t
-opfunc_typeof (ecma_value_t left_value);
-
-void
-opfunc_set_accessor (bool is_getter, ecma_value_t object, ecma_string_t *accessor_name_p, ecma_value_t accessor);
-
-ecma_value_t
-vm_op_delete_prop (ecma_value_t object, ecma_value_t property, bool is_strict);
-
-ecma_value_t
-vm_op_delete_var (ecma_value_t name_literal, ecma_object_t *lex_env_p);
-
-ecma_collection_t *
-opfunc_for_in (ecma_value_t left_value, ecma_value_t *result_obj_p);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !OPCODES_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef RE_BYTECODE_H
-#define RE_BYTECODE_H
-
-#if ENABLED (JERRY_BUILTIN_REGEXP)
-
-#include "ecma-globals.h"
-
-/** \addtogroup parser Parser
- * @{
- *
- * \addtogroup regexparser Regular expression
- * @{
- *
- * \addtogroup regexparser_bytecode Bytecode
- * @{
- */
-
-/**
- * Size of the RegExp bytecode cache
- */
-#define RE_CACHE_SIZE 8u
-
-/**
- * RegExp flags mask (first 10 bits are for reference count and the rest for the actual RegExp flags)
- */
-#define RE_FLAGS_MASK 0x3F
-
-/**
- * RegExp opcodes
- */
-typedef enum
-{
- RE_OP_EOF,
- /* Group opcode order is important, because RE_IS_CAPTURE_GROUP is based on it.
- * Change it carefully. Capture opcodes should be at first.
- */
- RE_OP_CAPTURE_GROUP_START, /**< group start */
- RE_OP_CAPTURE_GREEDY_ZERO_GROUP_START, /**< greedy zero group start */
- RE_OP_CAPTURE_NON_GREEDY_ZERO_GROUP_START, /**< non-greedy zero group start */
- RE_OP_CAPTURE_GREEDY_GROUP_END, /**< greedy group end */
- RE_OP_CAPTURE_NON_GREEDY_GROUP_END, /**< non-greedy group end */
- RE_OP_NON_CAPTURE_GROUP_START, /**< non-capture group start */
- RE_OP_NON_CAPTURE_GREEDY_ZERO_GROUP_START, /**< non-capture greedy zero group start */
- RE_OP_NON_CAPTURE_NON_GREEDY_ZERO_GROUP_START, /**< non-capture non-greedy zero group start */
- RE_OP_NON_CAPTURE_GREEDY_GROUP_END, /**< non-capture greedy group end */
- RE_OP_NON_CAPTURE_NON_GREEDY_GROUP_END, /**< non-capture non-greedy group end */
-
- RE_OP_MATCH, /**< match */
- RE_OP_CHAR, /**< any character */
- RE_OP_SAVE_AT_START, /**< save at start */
- RE_OP_SAVE_AND_MATCH, /**< save and match */
- RE_OP_PERIOD, /**< "." */
- RE_OP_ALTERNATIVE, /**< "|" */
- RE_OP_GREEDY_ITERATOR, /**< greedy iterator */
- RE_OP_NON_GREEDY_ITERATOR, /**< non-greedy iterator */
- RE_OP_ASSERT_START, /**< "^" */
- RE_OP_ASSERT_END, /**< "$" */
- RE_OP_ASSERT_WORD_BOUNDARY, /**< "\b" */
- RE_OP_ASSERT_NOT_WORD_BOUNDARY, /**< "\B" */
- RE_OP_LOOKAHEAD_POS, /**< lookahead pos */
- RE_OP_LOOKAHEAD_NEG, /**< lookahead neg */
- RE_OP_BACKREFERENCE, /**< "\[0..9]" */
- RE_OP_CHAR_CLASS, /**< "[ ]" */
- RE_OP_INV_CHAR_CLASS /**< "[^ ]" */
-} re_opcode_t;
-
-/**
- * Compiled byte code data.
- */
-typedef struct
-{
- ecma_compiled_code_t header; /**< compiled code header */
- ecma_value_t source; /**< original RegExp pattern */
- uint32_t captures_count; /**< number of capturing brackets */
- uint32_t non_captures_count; /**< number of non capturing brackets */
-} re_compiled_code_t;
-
-/**
- * Context of RegExp bytecode container
- */
-typedef struct
-{
- uint8_t *block_start_p; /**< start of bytecode block */
- uint8_t *block_end_p; /**< end of bytecode block */
- uint8_t *current_p; /**< current position in bytecode */
-} re_bytecode_ctx_t;
-
-re_opcode_t re_get_opcode (const uint8_t **bc_p);
-ecma_char_t re_get_char (const uint8_t **bc_p);
-uint32_t re_get_value (const uint8_t **bc_p);
-uint32_t JERRY_ATTR_PURE re_get_bytecode_length (re_bytecode_ctx_t *bc_ctx_p);
-
-void re_initialize_regexp_bytecode (re_bytecode_ctx_t *bc_ctx_p);
-
-void re_append_opcode (re_bytecode_ctx_t *bc_ctx_p, const re_opcode_t opcode);
-void re_append_u32 (re_bytecode_ctx_t *bc_ctx_p, const uint32_t value);
-void re_append_char (re_bytecode_ctx_t *bc_ctx_p, const ecma_char_t input_char);
-void re_append_jump_offset (re_bytecode_ctx_t *bc_ctx_p, uint32_t value);
-
-void re_insert_opcode (re_bytecode_ctx_t *bc_ctx_p, const uint32_t offset, const re_opcode_t opcode);
-void re_insert_u32 (re_bytecode_ctx_t *bc_ctx_p, const uint32_t offset, const uint32_t value);
-void re_bytecode_list_insert (re_bytecode_ctx_t *bc_ctx_p,
- const size_t offset,
- const uint8_t *bytecode_p,
- const size_t length);
-
-#if ENABLED (JERRY_REGEXP_DUMP_BYTE_CODE)
-void re_dump_bytecode (re_bytecode_ctx_t *bc_ctx);
-#endif /* ENABLED (JERRY_REGEXP_DUMP_BYTE_CODE) */
-
-/**
- * @}
- * @}
- * @}
- */
-
-#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
-#endif /* !RE_BYTECODE_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef RE_COMPILER_H
-#define RE_COMPILER_H
-
-#if ENABLED (JERRY_BUILTIN_REGEXP)
-
-#include "ecma-globals.h"
-#include "re-bytecode.h"
-#include "re-parser.h"
-
-/** \addtogroup parser Parser
- * @{
- *
- * \addtogroup regexparser Regular expression
- * @{
- *
- * \addtogroup regexparser_compiler Compiler
- * @{
- */
-
-/**
- * Context of RegExp compiler
- */
-typedef struct
-{
- uint16_t flags; /**< RegExp flags */
- uint32_t captures_count; /**< number of capture groups */
- uint32_t non_captures_count; /**< number of non-capture groups */
- uint32_t highest_backref; /**< highest backreference */
- re_bytecode_ctx_t *bytecode_ctx_p; /**< pointer of RegExp bytecode context */
- re_token_t current_token; /**< current token */
- re_parser_ctx_t *parser_ctx_p; /**< pointer of RegExp parser context */
-} re_compiler_ctx_t;
-
-ecma_value_t
-re_compile_bytecode (const re_compiled_code_t **out_bytecode_p, ecma_string_t *pattern_str_p, uint16_t flags);
-
-void re_cache_gc_run (void);
-
-/**
- * @}
- * @}
- * @}
- */
-
-#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
-#endif /* !RE_COMPILER_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef RE_PARSER_H
-#define RE_PARSER_H
-
-#if ENABLED (JERRY_BUILTIN_REGEXP)
-
-/** \addtogroup parser Parser
- * @{
- *
- * \addtogroup regexparser Regular expression
- * @{
- *
- * \addtogroup regexparser_bytecode Bytecode
- * @{
- */
-
-/**
- * RegExp token type definitions
- */
-typedef enum
-{
- RE_TOK_EOF, /**< EOF */
- RE_TOK_BACKREFERENCE, /**< "\[0..9]" */
- RE_TOK_CHAR, /**< any character */
- RE_TOK_ALTERNATIVE, /**< "|" */
- RE_TOK_ASSERT_START, /**< "^" */
- RE_TOK_ASSERT_END, /**< "$" */
- RE_TOK_PERIOD, /**< "." */
- RE_TOK_START_CAPTURE_GROUP, /**< "(" */
- RE_TOK_START_NON_CAPTURE_GROUP, /**< "(?:" */
- RE_TOK_END_GROUP, /**< ")" */
- RE_TOK_ASSERT_START_POS_LOOKAHEAD, /**< "(?=" */
- RE_TOK_ASSERT_START_NEG_LOOKAHEAD, /**< "(?!" */
- RE_TOK_ASSERT_WORD_BOUNDARY, /**< "\b" */
- RE_TOK_ASSERT_NOT_WORD_BOUNDARY, /**< "\B" */
- RE_TOK_DIGIT, /**< "\d" */
- RE_TOK_NOT_DIGIT, /**< "\D" */
- RE_TOK_WHITE, /**< "\s" */
- RE_TOK_NOT_WHITE, /**< "\S" */
- RE_TOK_WORD_CHAR, /**< "\w" */
- RE_TOK_NOT_WORD_CHAR, /**< "\W" */
- RE_TOK_START_CHAR_CLASS, /**< "[ ]" */
- RE_TOK_START_INV_CHAR_CLASS, /**< "[^ ]" */
-} re_token_type_t;
-
-/**
- * @}
- *
- * \addtogroup regexparser_parser Parser
- * @{
- */
-
-/**
- * RegExp constant of infinite
- */
-#define RE_ITERATOR_INFINITE ((uint32_t) - 1)
-
-/**
- * Maximum number of decimal escape digits
- */
-#define RE_MAX_RE_DECESC_DIGITS 9
-
-/**
- * RegExp token type
- */
-typedef struct
-{
- re_token_type_t type; /**< type of the token */
- uint32_t value; /**< value of the token */
- uint32_t qmin; /**< minimum number of token iterations */
- uint32_t qmax; /**< maximum number of token iterations */
- bool greedy; /**< type of iteration */
-} re_token_t;
-
-/**
- * RegExp parser context
- */
-typedef struct
-{
- const lit_utf8_byte_t *input_start_p; /**< start of input pattern */
- const lit_utf8_byte_t *input_curr_p; /**< current position in input pattern */
- const lit_utf8_byte_t *input_end_p; /**< end of input pattern */
- int groups_count; /**< number of groups */
- uint32_t classes_count; /**< number of character classes */
-} re_parser_ctx_t;
-
-bool re_hex_lookup (re_parser_ctx_t *parser_ctx_p, uint32_t lookup);
-uint32_t re_parse_octal (re_parser_ctx_t *parser_ctx_p);
-ecma_value_t re_parse_iterator (re_parser_ctx_t *parser_ctx_p, re_token_t *re_token_p);
-ecma_value_t re_parse_next_token (re_parser_ctx_t *parser_ctx_p, re_token_t *out_token_p);
-
-/**
- * @}
- * @}
- * @}
- */
-
-#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
-#endif /* !RE_PARSER_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef VM_DEFINES_H
-#define VM_DEFINES_H
-
-#include "byte-code.h"
-#include "ecma-globals.h"
-
-/** \addtogroup vm Virtual machine
- * @{
- *
- * \addtogroup vm_executor Executor
- * @{
- */
-
-/**
- * Helper for += on uint16_t values.
- */
-#define VM_PLUS_EQUAL_U16(base, value) (base) = (uint16_t) ((base) + (value))
-
-/**
- * Helper for -= on uint16_t values.
- */
-#define VM_MINUS_EQUAL_U16(base, value) (base) = (uint16_t) ((base) - (value))
-
-/**
- * Context of interpreter, related to a JS stack frame
- */
-typedef struct vm_frame_ctx_t
-{
- const ecma_compiled_code_t *bytecode_header_p; /**< currently executed byte-code data */
- uint8_t *byte_code_p; /**< current byte code pointer */
- uint8_t *byte_code_start_p; /**< byte code start pointer */
- ecma_value_t *registers_p; /**< register start pointer */
- ecma_value_t *stack_top_p; /**< stack top pointer */
- ecma_value_t *literal_start_p; /**< literal list start pointer */
- ecma_object_t *lex_env_p; /**< current lexical environment */
-#if defined (JERRY_DEBUGGER) || ENABLED (JERRY_LINE_INFO)
- struct vm_frame_ctx_t *prev_context_p; /**< previous context */
-#endif /* defined (JERRY_DEBUGGER) || ENABLED (JERRY_LINE_INFO) */
- ecma_value_t this_binding; /**< this binding */
- ecma_value_t block_result; /**< block result */
-#if ENABLED (JERRY_LINE_INFO)
- ecma_value_t resource_name; /**< current resource name (usually a file name) */
- uint32_t current_line; /**< currently executed line */
-#endif /* ENABLED (JERRY_LINE_INFO) */
- uint16_t context_depth; /**< current context depth */
- uint8_t is_eval_code; /**< eval mode flag */
- uint8_t call_operation; /**< perform a call or construct operation */
-} vm_frame_ctx_t;
-
-/**
- * @}
- * @}
- */
-
-#endif /* !VM_DEFINES_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef VM_STACK_H
-#define VM_STACK_H
-
-#include "ecma-globals.h"
-
-/** \addtogroup vm Virtual machine
- * @{
- *
- * \addtogroup stack VM stack
- * @{
- */
-
-#define VM_CREATE_CONTEXT(type, end_offset) ((ecma_value_t) ((type) | (end_offset) << 4))
-#define VM_GET_CONTEXT_TYPE(value) ((vm_stack_context_type_t) ((value) & 0xf))
-#define VM_GET_CONTEXT_END(value) ((value) >> 4)
-
-/**
- * Context types for the vm stack.
- */
-typedef enum
-{
- VM_CONTEXT_FINALLY_JUMP, /**< finally context with a jump */
- VM_CONTEXT_FINALLY_THROW, /**< finally context with a throw */
- VM_CONTEXT_FINALLY_RETURN, /**< finally context with a return */
- VM_CONTEXT_TRY, /**< try context */
- VM_CONTEXT_CATCH, /**< catch context */
- VM_CONTEXT_WITH, /**< with context */
-#if ENABLED (JERRY_ES2015_CLASS)
- VM_CONTEXT_SUPER_CLASS, /**< super class context */
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
- VM_CONTEXT_FOR_IN, /**< for-in context */
-#if ENABLED (JERRY_ES2015_FOR_OF)
- VM_CONTEXT_FOR_OF, /**< for-of context */
-#endif /* ENABLED (JERRY_ES2015_FOR_OF) */
-} vm_stack_context_type_t;
-
-ecma_value_t *vm_stack_context_abort (vm_frame_ctx_t *frame_ctx_p, ecma_value_t *vm_stack_top_p);
-bool vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, ecma_value_t **vm_stack_top_ref_p,
- vm_stack_context_type_t finally_type, uint32_t search_limit);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !VM_STACK_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef VM_H
-#define VM_H
-
-#include "ecma-globals.h"
-#include "jrt.h"
-#include "vm-defines.h"
-
-/** \addtogroup vm Virtual machine
- * @{
- *
- * \addtogroup vm_executor Executor
- * @{
- */
-
-/**
- * Each CBC opcode is transformed to three vm opcodes:
- *
- * - first opcode is a "get arguments" opcode which specifies
- * the type (register, literal, stack, etc.) and number
- * (from 0 to 2) of input arguments
- * - second opcode is a "group" opcode which specifies
- * the actual operation (add, increment, call, etc.)
- * - third opcode is a "put result" opcode which specifies
- * the destination where the result is stored (register,
- * stack, etc.)
- */
-
-/**
- * If VM_OC_GET_ARGS_INDEX(opcode) == VM_OC_GET_BRANCH,
- * this flag signals that the branch is a backward branch.
- */
-#define VM_OC_BACKWARD_BRANCH 0x4000
-
-/**
- * Position of "get arguments" opcode.
- */
-#define VM_OC_GET_ARGS_SHIFT 7
-
-/**
- * Mask of "get arguments" opcode.
- */
-#define VM_OC_GET_ARGS_MASK 0x7
-
-/**
- * Generate the binary representation of a "get arguments" opcode.
- */
-#define VM_OC_GET_ARGS_CREATE_INDEX(V) (((V) & VM_OC_GET_ARGS_MASK) << VM_OC_GET_ARGS_SHIFT)
-
-/**
- * Extract the "get arguments" opcode.
- */
-#define VM_OC_GET_ARGS_INDEX(O) ((O) & (VM_OC_GET_ARGS_MASK << VM_OC_GET_ARGS_SHIFT))
-
-/**
- * Checks whether the result is stored somewhere.
- */
-#define VM_OC_HAS_GET_ARGS(V) ((V) & (VM_OC_GET_ARGS_MASK << VM_OC_GET_ARGS_SHIFT))
-
-/**
- * Argument getters that are part of the opcodes.
- */
-typedef enum
-{
- VM_OC_GET_NONE = VM_OC_GET_ARGS_CREATE_INDEX (0), /**< do nothing */
- VM_OC_GET_BRANCH = VM_OC_GET_ARGS_CREATE_INDEX (1), /**< branch argument */
- VM_OC_GET_STACK = VM_OC_GET_ARGS_CREATE_INDEX (2), /**< pop one element from the stack */
- VM_OC_GET_STACK_STACK = VM_OC_GET_ARGS_CREATE_INDEX (3), /**< pop two elements from the stack */
-
- VM_OC_GET_LITERAL = VM_OC_GET_ARGS_CREATE_INDEX (4), /**< resolve literal */
- VM_OC_GET_LITERAL_LITERAL = VM_OC_GET_ARGS_CREATE_INDEX (5), /**< resolve two literals */
- VM_OC_GET_STACK_LITERAL = VM_OC_GET_ARGS_CREATE_INDEX (6), /**< pop one element from the stack
- * and resolve a literal */
- VM_OC_GET_THIS_LITERAL = VM_OC_GET_ARGS_CREATE_INDEX (7), /**< get this and resolve a literal */
-} vm_oc_get_types;
-
-/**
- * Mask of "group" opcode.
- */
-#define VM_OC_GROUP_MASK 0x7f
-
-/**
- * Extract the "group" opcode.
- */
-#define VM_OC_GROUP_GET_INDEX(O) ((O) & VM_OC_GROUP_MASK)
-
-/**
- * Opcodes.
- */
-typedef enum
-{
- VM_OC_POP, /**< pop from stack */
- VM_OC_POP_BLOCK, /**< pop block */
- VM_OC_PUSH, /**< push one literal */
- VM_OC_PUSH_TWO, /**< push two literals */
- VM_OC_PUSH_THREE, /**< push three literals */
- VM_OC_PUSH_UNDEFINED, /**< push undefined value */
- VM_OC_PUSH_TRUE, /**< push true value */
- VM_OC_PUSH_FALSE, /**< push false value */
- VM_OC_PUSH_NULL, /**< push null value */
- VM_OC_PUSH_THIS, /**< push this */
- VM_OC_PUSH_0, /**< push number zero */
- VM_OC_PUSH_POS_BYTE, /**< push number between 1 and 256 */
- VM_OC_PUSH_NEG_BYTE, /**< push number between -1 and -256 */
- VM_OC_PUSH_LIT_0, /**< push literal and number zero */
- VM_OC_PUSH_LIT_POS_BYTE, /**< push literal and number between 1 and 256 */
- VM_OC_PUSH_LIT_NEG_BYTE, /**< push literal and number between -1 and -256 */
- VM_OC_PUSH_OBJECT, /**< push object */
- VM_OC_PUSH_NAMED_FUNC_EXPR, /**< push named function expression */
- VM_OC_SET_PROPERTY, /**< set property */
-#if ENABLED (JERRY_ES2015_OBJECT_INITIALIZER)
- VM_OC_SET_COMPUTED_PROPERTY, /**< set computed property */
-#endif /* ENABLED (JERRY_ES2015_OBJECT_INITIALIZER) */
- VM_OC_SET_GETTER, /**< set getter */
- VM_OC_SET_SETTER, /**< set setter */
- VM_OC_PUSH_UNDEFINED_BASE, /**< push undefined base */
- VM_OC_PUSH_ARRAY, /**< push array */
- VM_OC_PUSH_ELISON, /**< push elison */
- VM_OC_APPEND_ARRAY, /**< append array */
- VM_OC_IDENT_REFERENCE, /**< ident reference */
- VM_OC_PROP_REFERENCE, /**< prop reference */
- VM_OC_PROP_GET, /**< prop get */
-
- /* These eight opcodes must be in this order. */
- VM_OC_PROP_PRE_INCR, /**< prefix increment of a property */
- VM_OC_PROP_PRE_DECR, /**< prop prefix decrement of a property */
- VM_OC_PROP_POST_INCR, /**< prop postfix increment of a property */
- VM_OC_PROP_POST_DECR, /**< prop postfix decrement of a property */
- VM_OC_PRE_INCR, /**< prefix increment */
- VM_OC_PRE_DECR, /**< prefix decrement */
- VM_OC_POST_INCR, /**< postfix increment */
- VM_OC_POST_DECR, /**< postfix decrement */
-
- VM_OC_PROP_DELETE, /**< delete property */
- VM_OC_DELETE, /**< delete */
-
- VM_OC_MOV_IDENT, /**< move identifier register reference */
- VM_OC_ASSIGN, /**< assign */
- VM_OC_ASSIGN_PROP, /**< assign property */
- VM_OC_ASSIGN_PROP_THIS, /**< assign prop this */
-
- VM_OC_RET, /**< return */
- VM_OC_THROW, /**< throw */
- VM_OC_THROW_REFERENCE_ERROR, /**< throw reference error */
-
- VM_OC_EVAL, /**< eval */
- VM_OC_CALL, /**< call */
- VM_OC_NEW, /**< new */
- VM_OC_RESOLVE_BASE_FOR_CALL, /**< resolve base value before call */
- VM_OC_ERROR, /**< error while the vm_loop is suspended */
-
- VM_OC_JUMP, /**< jump */
- VM_OC_BRANCH_IF_STRICT_EQUAL, /**< branch if stric equal */
-
- /* These four opcodes must be in this order. */
- VM_OC_BRANCH_IF_TRUE, /**< branch if true */
- VM_OC_BRANCH_IF_FALSE, /**< branch if false */
- VM_OC_BRANCH_IF_LOGICAL_TRUE, /**< branch if logical true */
- VM_OC_BRANCH_IF_LOGICAL_FALSE, /**< branch if logical false */
-
- VM_OC_PLUS, /**< unary plus */
- VM_OC_MINUS, /**< unary minus */
- VM_OC_NOT, /**< not */
- VM_OC_BIT_NOT, /**< bitwise not */
- VM_OC_VOID, /**< void */
- VM_OC_TYPEOF_IDENT, /**< typeof identifier */
- VM_OC_TYPEOF, /**< typeof */
-
- VM_OC_ADD, /**< binary add */
- VM_OC_SUB, /**< binary sub */
- VM_OC_MUL, /**< mul */
- VM_OC_DIV, /**< div */
- VM_OC_MOD, /**< mod */
-
- VM_OC_EQUAL, /**< equal */
- VM_OC_NOT_EQUAL, /**< not equal */
- VM_OC_STRICT_EQUAL, /**< strict equal */
- VM_OC_STRICT_NOT_EQUAL, /**< strict not equal */
- VM_OC_LESS, /**< less */
- VM_OC_GREATER, /**< greater */
- VM_OC_LESS_EQUAL, /**< less equal */
- VM_OC_GREATER_EQUAL, /**< greater equal */
- VM_OC_IN, /**< in */
- VM_OC_INSTANCEOF, /**< instanceof */
-
- VM_OC_BIT_OR, /**< bitwise or */
- VM_OC_BIT_XOR, /**< bitwise xor */
- VM_OC_BIT_AND, /**< bitwise and */
- VM_OC_LEFT_SHIFT, /**< left shift */
- VM_OC_RIGHT_SHIFT, /**< right shift */
- VM_OC_UNS_RIGHT_SHIFT, /**< unsigned right shift */
-
- VM_OC_WITH, /**< with */
- VM_OC_FOR_IN_CREATE_CONTEXT, /**< for in create context */
- VM_OC_FOR_IN_GET_NEXT, /**< get next */
- VM_OC_FOR_IN_HAS_NEXT, /**< has next */
-#if ENABLED (JERRY_ES2015_FOR_OF)
- VM_OC_FOR_OF_CREATE_CONTEXT, /**< for of create context */
- VM_OC_FOR_OF_GET_NEXT, /**< get next */
- VM_OC_FOR_OF_HAS_NEXT, /**< has next */
-#endif /* ENABLED (JERRY_ES2015_FOR_OF) */
- VM_OC_TRY, /**< try */
- VM_OC_CATCH, /**< catch */
- VM_OC_FINALLY, /**< finally */
- VM_OC_CONTEXT_END, /**< context end */
- VM_OC_JUMP_AND_EXIT_CONTEXT, /**< jump and exit context */
-#if ENABLED (JERRY_ES2015_CLASS)
- VM_OC_CLASS_HERITAGE, /**< create a super class context */
- VM_OC_CLASS_INHERITANCE, /**< inherit properties from the 'super' class */
- VM_OC_PUSH_CLASS_CONSTRUCTOR_AND_PROTOTYPE, /**< push class constructor */
- VM_OC_SET_CLASS_CONSTRUCTOR, /**< set class constructor to the given function literal */
- VM_OC_PUSH_IMPL_CONSTRUCTOR, /**< create implicit class constructor */
- VM_OC_CLASS_EXPR_CONTEXT_END, /**< class expression heritage context end */
- VM_OC_CLASS_EVAL, /**< eval inside a class */
- VM_OC_SUPER_CALL, /**< call the 'super' constructor */
- VM_OC_SUPER_PROP_REFERENCE, /**< resolve super property reference */
- VM_OC_PUSH_SUPER, /**< push resolvable super reference */
- VM_OC_PUSH_CONSTRUCTOR_SUPER, /**< push 'super' inside a class constructor */
- VM_OC_PUSH_CONSTRUCTOR_THIS, /**< push 'this' inside a class constructor */
- VM_OC_CONSTRUCTOR_RET, /**< explicit return from a class constructor */
-#endif /* ENABLED (JERRY_ES2015_CLASS) */
-#if ENABLED (JERRY_DEBUGGER)
- VM_OC_BREAKPOINT_ENABLED, /**< enabled breakpoint for debugger */
- VM_OC_BREAKPOINT_DISABLED, /**< disabled breakpoint for debugger */
-#endif /* ENABLED (JERRY_DEBUGGER) */
-#if ENABLED (JERRY_LINE_INFO)
- VM_OC_RESOURCE_NAME, /**< resource name of the current function */
- VM_OC_LINE, /**< line number of the next statement */
-#endif /* ENABLED (JERRY_LINE_INFO) */
- VM_OC_NONE, /**< a special opcode for unsupported byte codes */
-} vm_oc_types;
-
-/**
- * Unused opcodes, but required by byte-code types.
- */
-typedef enum
-{
-#if !ENABLED (JERRY_ES2015_OBJECT_INITIALIZER)
- VM_OC_SET_COMPUTED_PROPERTY = VM_OC_NONE, /**< set computed property is unused */
-#endif /* !ENABLED (JERRY_ES2015_OBJECT_INITIALIZER) */
-#if !ENABLED (JERRY_DEBUGGER)
- VM_OC_BREAKPOINT_ENABLED = VM_OC_NONE, /**< enabled breakpoint for debugger is unused */
- VM_OC_BREAKPOINT_DISABLED = VM_OC_NONE, /**< disabled breakpoint for debugger is unused */
-#endif /* !ENABLED (JERRY_DEBUGGER) */
-#if !ENABLED (JERRY_LINE_INFO)
- VM_OC_RESOURCE_NAME = VM_OC_NONE, /**< resource name of the current function is unused */
- VM_OC_LINE = VM_OC_NONE, /**< line number of the next statement is unused */
-#endif /* !ENABLED (JERRY_LINE_INFO) */
-#if !ENABLED (JERRY_ES2015_CLASS)
- VM_OC_CLASS_HERITAGE = VM_OC_NONE, /**< create a super class context */
- VM_OC_CLASS_INHERITANCE = VM_OC_NONE, /**< inherit properties from the 'super' class */
- VM_OC_PUSH_CLASS_CONSTRUCTOR_AND_PROTOTYPE = VM_OC_NONE, /**< push class constructor */
- VM_OC_SET_CLASS_CONSTRUCTOR = VM_OC_NONE, /**< set class constructor to the given function literal */
- VM_OC_PUSH_IMPL_CONSTRUCTOR = VM_OC_NONE, /**< create implicit class constructor */
- VM_OC_CLASS_EXPR_CONTEXT_END = VM_OC_NONE, /**< class expression heritage context end */
- VM_OC_CLASS_EVAL = VM_OC_NONE, /**< eval inside a class */
- VM_OC_SUPER_CALL = VM_OC_NONE, /**< call the 'super' constructor */
- VM_OC_SUPER_PROP_REFERENCE = VM_OC_NONE, /**< resolve super property reference */
- VM_OC_PUSH_SUPER = VM_OC_NONE, /**< push resolvable super reference */
- VM_OC_PUSH_CONSTRUCTOR_SUPER = VM_OC_NONE, /**< push 'super' inside a class constructor */
- VM_OC_PUSH_CONSTRUCTOR_THIS = VM_OC_NONE, /**< push 'this' inside a class constructor */
- VM_OC_CONSTRUCTOR_RET = VM_OC_NONE, /**< explicit return from a class constructor */
-#endif /* !ENABLED (JERRY_ES2015_CLASS) */
-#if !ENABLED (JERRY_ES2015_FOR_OF)
- VM_OC_FOR_OF_CREATE_CONTEXT = VM_OC_NONE, /**< for of create context */
- VM_OC_FOR_OF_GET_NEXT = VM_OC_NONE, /**< get next */
- VM_OC_FOR_OF_HAS_NEXT = VM_OC_NONE, /**< has next */
-#endif /* !ENABLED (JERRY_ES2015_FOR_OF) */
- VM_OC_UNUSED = VM_OC_NONE /**< placeholder if the list is empty */
-} vm_oc_unused_types;
-
-/**
- * Decrement operator.
- */
-#define VM_OC_DECREMENT_OPERATOR_FLAG 0x1
-
-/**
- * Postfix increment/decrement operator.
- */
-#define VM_OC_POST_INCR_DECR_OPERATOR_FLAG 0x2
-
-/**
- * An named variable is updated by the increment/decrement operator.
- */
-#define VM_OC_IDENT_INCR_DECR_OPERATOR_FLAG 0x4
-
-/**
- * Jump to target offset if input value is logical false.
- */
-#define VM_OC_BRANCH_IF_FALSE_FLAG 0x1
-
-/**
- * Branch optimized for logical and/or opcodes.
- */
-#define VM_OC_LOGICAL_BRANCH_FLAG 0x2
-
-/**
- * Bit index shift for non-static property initializers.
- */
-#define VM_OC_NON_STATIC_SHIFT 14
-
-/**
- * This flag is set for static property initializers.
- */
-#define VM_OC_NON_STATIC_FLAG (0x1 << VM_OC_NON_STATIC_SHIFT)
-
-/**
- * Position of "put result" opcode.
- */
-#define VM_OC_PUT_RESULT_SHIFT 10
-
-/**
- * Mask of "put result" opcode.
- */
-#define VM_OC_PUT_RESULT_MASK 0xf
-
-/**
- * Generate a "put result" opcode flag bit.
- */
-#define VM_OC_PUT_RESULT_CREATE_FLAG(V) (((V) & VM_OC_PUT_RESULT_MASK) << VM_OC_PUT_RESULT_SHIFT)
-
-/**
- * Checks whether the result is stored somewhere.
- */
-#define VM_OC_HAS_PUT_RESULT(V) ((V) & (VM_OC_PUT_RESULT_MASK << VM_OC_PUT_RESULT_SHIFT))
-
-/**
- * Specify where the result is stored
- */
-typedef enum
-{
- VM_OC_PUT_IDENT = VM_OC_PUT_RESULT_CREATE_FLAG (0x1),
- VM_OC_PUT_REFERENCE = VM_OC_PUT_RESULT_CREATE_FLAG (0x2),
- VM_OC_PUT_STACK = VM_OC_PUT_RESULT_CREATE_FLAG (0x4),
- VM_OC_PUT_BLOCK = VM_OC_PUT_RESULT_CREATE_FLAG (0x8),
-} vm_oc_put_types;
-
-/**
- * Non-recursive vm_loop: the vm_loop can be suspended
- * to execute a call /construct operation. These return
- * types of the vm_loop tells whether a call operation
- * is in progress or the vm_loop is finished.
- */
-typedef enum
-{
- VM_NO_EXEC_OP, /**< do nothing */
- VM_EXEC_CALL, /**< invoke a function */
- VM_EXEC_SUPER_CALL, /**< invoke a function through 'super' keyword */
- VM_EXEC_CONSTRUCT, /**< construct a new object */
-} vm_call_operation;
-
-ecma_value_t vm_run_global (const ecma_compiled_code_t *bytecode_p);
-ecma_value_t vm_run_eval (ecma_compiled_code_t *bytecode_data_p, uint32_t parse_opts);
-
-#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
-ecma_value_t vm_run_module (const ecma_compiled_code_t *bytecode_p, ecma_object_t *lex_env_p);
-#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
-
-ecma_value_t vm_run (const ecma_compiled_code_t *bytecode_header_p, ecma_value_t this_binding_value,
- ecma_object_t *lex_env_p, uint32_t parse_opts, const ecma_value_t *arg_list_p,
- ecma_length_t arg_list_len);
-
-bool vm_is_strict_mode (void);
-bool vm_is_direct_eval_form_call (void);
-
-ecma_value_t vm_get_backtrace (uint32_t max_depth);
-
-/**
- * @}
- * @}
- */
-
-#endif /* !VM_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYX_ARG_INTERNAL_H
-#define JERRYX_ARG_INTERNAL_H
-
-#include "jerryscript.h"
-
-/**
- * The iterator structor for JS arguments.
- */
-struct jerryx_arg_js_iterator_t
-{
- const jerry_value_t *js_arg_p; /**< the JS arguments */
- const jerry_length_t js_arg_cnt; /**< the total num of JS arguments */
- jerry_length_t js_arg_idx; /**< current index of JS argument */
-};
-
-#endif /* !JERRYX_ARG_INTERNAL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef DEBUGGER_SHA1_H
-#define DEBUGGER_SHA1_H
-
-#include "jerryscript-debugger-transport.h"
-
-#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)
-
-/* JerryScript debugger protocol is a simplified version of RFC-6455 (WebSockets). */
-
-void jerryx_debugger_compute_sha1 (const uint8_t *input1, size_t input1_len,
- const uint8_t *input2, size_t input2_len,
- uint8_t output[20]);
-
-#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */
-
-#endif /* !DEBUGGER_SHA1_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYX_HANDLE_SCOPE_INTERNAL_H
-#define JERRYX_HANDLE_SCOPE_INTERNAL_H
-
-#include "jerryscript.h"
-#include "jerryscript-port.h"
-#include "jerryscript-ext/handle-scope.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#define JERRYX_HANDLE_SCOPE_ASSERT(x) \
- do \
- { \
- if (!(x)) \
- { \
- jerry_port_log (JERRY_LOG_LEVEL_ERROR, \
- "JerryXHandleScope: Assertion '%s' failed at %s(%s):%lu.\n", \
- #x, \
- __FILE__, \
- __func__, \
- (unsigned long) __LINE__); \
- jerry_port_fatal (ERR_FAILED_INTERNAL_ASSERTION); \
- } \
- } while (0)
-
-/** MARK: - handle-scope-allocator.c */
-typedef struct jerryx_handle_scope_pool_s jerryx_handle_scope_pool_t;
-/**
- * A linear allocating memory pool for type jerryx_handle_scope_t,
- * in which allocated item shall be released in reversed order of allocation
- */
-struct jerryx_handle_scope_pool_s
-{
- jerryx_handle_scope_t prelist[JERRYX_SCOPE_PRELIST_SIZE]; /**< inlined handle scopes in the pool */
- size_t count; /**< number of handle scopes in the pool */
- jerryx_handle_scope_dynamic_t *start; /**< start address of dynamically allocated handle scope list */
-};
-
-jerryx_handle_scope_t *
-jerryx_handle_scope_get_parent (jerryx_handle_scope_t *scope);
-
-jerryx_handle_scope_t *
-jerryx_handle_scope_get_child (jerryx_handle_scope_t *scope);
-
-jerryx_handle_scope_t *
-jerryx_handle_scope_alloc (void);
-
-void
-jerryx_handle_scope_free (jerryx_handle_scope_t *scope);
-/** MARK: - END handle-scope-allocator.c */
-
-/** MARK: - handle-scope.c */
-void
-jerryx_handle_scope_release_handles (jerryx_handle_scope scope);
-
-jerry_value_t
-jerryx_hand_scope_escape_handle_from_prelist (jerryx_handle_scope scope, size_t idx);
-
-jerry_value_t
-jerryx_handle_scope_add_handle_to (jerryx_handle_t *handle, jerryx_handle_scope scope);
-
-jerryx_handle_scope_status
-jerryx_escape_handle_internal (jerryx_escapable_handle_scope scope,
- jerry_value_t escapee,
- jerry_value_t *result,
- bool should_promote);
-/** MARK: - END handle-scope.c */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* !JERRYX_HANDLE_SCOPE_INTERNAL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYX_ARG_H
-#define JERRYX_ARG_H
-
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include "jerryscript.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-/**
- * The forward declaration of jerryx_arg_t.
- */
-typedef struct jerryx_arg_t jerryx_arg_t;
-
-/**
- * The forward declaration of jerryx_arg_js_iterator_t
- */
-typedef struct jerryx_arg_js_iterator_t jerryx_arg_js_iterator_t;
-
-/**
- * Signature of the transform function.
- */
-typedef jerry_value_t (*jerryx_arg_transform_func_t) (jerryx_arg_js_iterator_t *js_arg_iter_p, /**< available JS args */
- const jerryx_arg_t *c_arg_p); /**< native arg */
-
-/**
- * The structure used in jerryx_arg_object_properties
- */
-typedef struct
-{
- const jerry_char_t **name_p; /**< property name list of the JS object */
- jerry_length_t name_cnt; /**< count of the name list */
- const jerryx_arg_t *c_arg_p; /**< points to the array of transformation steps */
- jerry_length_t c_arg_cnt; /**< the count of the `c_arg_p` array */
-} jerryx_arg_object_props_t;
-
-/**
- * The structure used in jerryx_arg_array
- */
-typedef struct
-{
- const jerryx_arg_t *c_arg_p; /**< points to the array of transformation steps */
- jerry_length_t c_arg_cnt; /**< the count of the `c_arg_p` array */
-} jerryx_arg_array_items_t;
-
-/**
- * The structure defining a single validation & transformation step.
- */
-struct jerryx_arg_t
-{
- jerryx_arg_transform_func_t func; /**< the transform function */
- void *dest; /**< pointer to destination where func should store the result */
- uintptr_t extra_info; /**< extra information, specific to func */
-};
-
-jerry_value_t jerryx_arg_transform_this_and_args (const jerry_value_t this_val,
- const jerry_value_t *js_arg_p,
- const jerry_length_t js_arg_cnt,
- const jerryx_arg_t *c_arg_p,
- jerry_length_t c_arg_cnt);
-
-jerry_value_t jerryx_arg_transform_args (const jerry_value_t *js_arg_p,
- const jerry_length_t js_arg_cnt,
- const jerryx_arg_t *c_arg_p,
- jerry_length_t c_arg_cnt);
-
-jerry_value_t jerryx_arg_transform_object_properties (const jerry_value_t obj_val,
- const jerry_char_t **name_p,
- const jerry_length_t name_cnt,
- const jerryx_arg_t *c_arg_p,
- jerry_length_t c_arg_cnt);
-jerry_value_t jerryx_arg_transform_array (const jerry_value_t array_val,
- const jerryx_arg_t *c_arg_p,
- jerry_length_t c_arg_cnt);
-
-/**
- * Indicates whether an argument is allowed to be coerced into the expected JS type.
- */
-typedef enum
-{
- JERRYX_ARG_COERCE, /**< the transform inside will invoke toNumber, toBoolean or toString */
- JERRYX_ARG_NO_COERCE /**< the type coercion is not allowed. */
-} jerryx_arg_coerce_t;
-
-/**
- * Indicates whether an argument is optional or required.
- */
-typedef enum
-{
- /**
- * The argument is optional. If the argument is `undefined` the transform is
- * successful and `c_arg_p->dest` remains untouched.
- */
- JERRYX_ARG_OPTIONAL,
- /**
- * The argument is required. If the argument is `undefined` the transform
- * will fail and `c_arg_p->dest` remains untouched.
- */
- JERRYX_ARG_REQUIRED
-} jerryx_arg_optional_t;
-
-/**
- * Indicates the rounding policy which will be chosen to transform an integer.
- */
-typedef enum
-{
- JERRYX_ARG_ROUND, /**< round */
- JERRYX_ARG_FLOOR, /**< floor */
- JERRYX_ARG_CEIL /**< ceil */
-} jerryx_arg_round_t;
-
-/**
- * Indicates the clamping policy which will be chosen to transform an integer.
- * If the policy is NO_CLAMP, and the number is out of range,
- * then the transformer will throw a range error.
- */
-typedef enum
-{
- JERRYX_ARG_CLAMP,/**< clamp the number when it is out of range */
- JERRYX_ARG_NO_CLAMP /**< throw a range error */
-} jerryx_arg_clamp_t;
-
-/* Inline functions for initializing jerryx_arg_t */
-
-#define JERRYX_ARG_INTEGER(type) \
- static inline jerryx_arg_t \
- jerryx_arg_ ## type (type ## _t *dest, \
- jerryx_arg_round_t round_flag, \
- jerryx_arg_clamp_t clamp_flag, \
- jerryx_arg_coerce_t coerce_flag, \
- jerryx_arg_optional_t opt_flag);
-
-JERRYX_ARG_INTEGER (uint8)
-JERRYX_ARG_INTEGER (int8)
-JERRYX_ARG_INTEGER (uint16)
-JERRYX_ARG_INTEGER (int16)
-JERRYX_ARG_INTEGER (uint32)
-JERRYX_ARG_INTEGER (int32)
-
-#undef JERRYX_ARG_INTEGER
-
-static inline jerryx_arg_t
-jerryx_arg_number (double *dest, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_boolean (bool *dest, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_string (char *dest, uint32_t size, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_utf8_string (char *dest, uint32_t size, jerryx_arg_coerce_t coerce_flag, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_function (jerry_value_t *dest, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_native_pointer (void **dest, const jerry_object_native_info_t *info_p, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_ignore (void);
-static inline jerryx_arg_t
-jerryx_arg_custom (void *dest, uintptr_t extra_info, jerryx_arg_transform_func_t func);
-static inline jerryx_arg_t
-jerryx_arg_object_properties (const jerryx_arg_object_props_t *object_props_p, jerryx_arg_optional_t opt_flag);
-static inline jerryx_arg_t
-jerryx_arg_array (const jerryx_arg_array_items_t *array_items_p, jerryx_arg_optional_t opt_flag);
-
-jerry_value_t
-jerryx_arg_transform_optional (jerryx_arg_js_iterator_t *js_arg_iter_p,
- const jerryx_arg_t *c_arg_p,
- jerryx_arg_transform_func_t func);
-
-/* Helper functions for transform functions. */
-jerry_value_t jerryx_arg_js_iterator_pop (jerryx_arg_js_iterator_t *js_arg_iter_p);
-jerry_value_t jerryx_arg_js_iterator_restore (jerryx_arg_js_iterator_t *js_arg_iter_p);
-jerry_value_t jerryx_arg_js_iterator_peek (jerryx_arg_js_iterator_t *js_arg_iter_p);
-jerry_length_t jerryx_arg_js_iterator_index (jerryx_arg_js_iterator_t *js_arg_iter_p);
-
-#include "arg.impl.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* !JERRYX_ARG_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYX_ARG_IMPL_H
-#define JERRYX_ARG_IMPL_H
-
-/* transform functions for each type. */
-
-#define JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL(type) \
- jerry_value_t jerryx_arg_transform_ ## type (jerryx_arg_js_iterator_t *js_arg_iter_p, \
- const jerryx_arg_t *c_arg_p); \
- jerry_value_t jerryx_arg_transform_ ## type ## _optional (jerryx_arg_js_iterator_t *js_arg_iter_p, \
- const jerryx_arg_t *c_arg_p);
-
-#define JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT(type) \
- JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (type) \
- JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (type ## _strict)
-
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (uint8)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (int8)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (uint16)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (int16)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (uint32)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (int32)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (number)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (string)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (utf8_string)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT (boolean)
-
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (function)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (native_pointer)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (object_props)
-JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL (array_items)
-
-jerry_value_t jerryx_arg_transform_ignore (jerryx_arg_js_iterator_t *js_arg_iter_p,
- const jerryx_arg_t *c_arg_p);
-
-#undef JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL
-#undef JERRYX_ARG_TRANSFORM_FUNC_WITH_OPTIONAL_AND_STRICT
-
-/**
- * The structure indicates the options used to transform integer argument.
- * It will be passed into jerryx_arg_t's extra_info field.
- */
-typedef struct
-{
- uint8_t round; /**< rounding policy */
- uint8_t clamp; /**< clamping policy */
-} jerryx_arg_int_option_t;
-
-/**
- * The macro used to generate jerryx_arg_xxx for int type.
- */
-#define JERRYX_ARG_INT(type) \
- static inline jerryx_arg_t \
- jerryx_arg_ ## type (type ## _t *dest, \
- jerryx_arg_round_t round_flag, \
- jerryx_arg_clamp_t clamp_flag, \
- jerryx_arg_coerce_t coerce_flag, \
- jerryx_arg_optional_t opt_flag) \
- { \
- jerryx_arg_transform_func_t func; \
- if (coerce_flag == JERRYX_ARG_NO_COERCE) \
- { \
- if (opt_flag == JERRYX_ARG_OPTIONAL) \
- { \
- func = jerryx_arg_transform_ ## type ## _strict_optional; \
- } \
- else \
- { \
- func = jerryx_arg_transform_ ## type ## _strict; \
- } \
- } \
- else \
- { \
- if (opt_flag == JERRYX_ARG_OPTIONAL) \
- { \
- func = jerryx_arg_transform_ ## type ## _optional; \
- } \
- else \
- { \
- func = jerryx_arg_transform_ ## type; \
- } \
- } \
- union \
- { \
- jerryx_arg_int_option_t int_option; \
- uintptr_t extra_info; \
- } u = { .int_option = { .round = (uint8_t) round_flag, .clamp = (uint8_t) clamp_flag } }; \
- return (jerryx_arg_t) \
- { \
- .func = func, \
- .dest = (void *) dest, \
- .extra_info = u.extra_info \
- }; \
- }
-
-JERRYX_ARG_INT (uint8)
-JERRYX_ARG_INT (int8)
-JERRYX_ARG_INT (uint16)
-JERRYX_ARG_INT (int16)
-JERRYX_ARG_INT (uint32)
-JERRYX_ARG_INT (int32)
-
-#undef JERRYX_ARG_INT
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `number` JS argument and stores it into a C `double`.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_number (double *dest, /**< pointer to the double where the result should be stored */
- jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (coerce_flag == JERRYX_ARG_NO_COERCE)
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_number_strict_optional;
- }
- else
- {
- func = jerryx_arg_transform_number_strict;
- }
- }
- else
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_number_optional;
- }
- else
- {
- func = jerryx_arg_transform_number;
- }
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest
- };
-} /* jerryx_arg_number */
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `boolean` JS argument and stores it into a C `bool`.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_boolean (bool *dest, /**< points to the native bool */
- jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (coerce_flag == JERRYX_ARG_NO_COERCE)
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_boolean_strict_optional;
- }
- else
- {
- func = jerryx_arg_transform_boolean_strict;
- }
- }
- else
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_boolean_optional;
- }
- else
- {
- func = jerryx_arg_transform_boolean;
- }
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest
- };
-} /* jerryx_arg_boolean */
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `string` JS argument and stores it into a C `char` array.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_string (char *dest, /**< pointer to the native char array where the result should be stored */
- uint32_t size, /**< the size of native char array */
- jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (coerce_flag == JERRYX_ARG_NO_COERCE)
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_string_strict_optional;
- }
- else
- {
- func = jerryx_arg_transform_string_strict;
- }
- }
- else
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_string_optional;
- }
- else
- {
- func = jerryx_arg_transform_string;
- }
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest,
- .extra_info = (uintptr_t) size
- };
-} /* jerryx_arg_string */
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `string` JS argument and stores it into a C utf8 `char` array.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_utf8_string (char *dest, /**< [out] pointer to the native char array where the result should be stored */
- uint32_t size, /**< the size of native char array */
- jerryx_arg_coerce_t coerce_flag, /**< whether type coercion is allowed */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (coerce_flag == JERRYX_ARG_NO_COERCE)
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_utf8_string_strict_optional;
- }
- else
- {
- func = jerryx_arg_transform_utf8_string_strict;
- }
- }
- else
- {
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_utf8_string_optional;
- }
- else
- {
- func = jerryx_arg_transform_utf8_string;
- }
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest,
- .extra_info = (uintptr_t) size
- };
-} /* jerryx_arg_utf8_string */
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `function` JS argument and stores it into a C `jerry_value_t`.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_function (jerry_value_t *dest, /**< pointer to the jerry_value_t where the result should be stored */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_function_optional;
- }
- else
- {
- func = jerryx_arg_transform_function;
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest
- };
-} /* jerryx_arg_function */
-
-/**
- * Create a validation/transformation step (`jerryx_arg_t`) that expects to
- * consume one `object` JS argument that is 'backed' with a native pointer with
- * a given type info. In case the native pointer info matches, the transform
- * will succeed and the object's native pointer will be assigned to *dest.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_native_pointer (void **dest, /**< pointer to where the resulting native pointer should be stored */
- const jerry_object_native_info_t *info_p, /**< expected the type info */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_native_pointer_optional;
- }
- else
- {
- func = jerryx_arg_transform_native_pointer;
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = (void *) dest,
- .extra_info = (uintptr_t) info_p
- };
-} /* jerryx_arg_native_pointer */
-
-/**
- * Create a jerryx_arg_t instance for ignored argument.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_ignore (void)
-{
- return (jerryx_arg_t)
- {
- .func = jerryx_arg_transform_ignore
- };
-} /* jerryx_arg_ignore */
-
-/**
- * Create a jerryx_arg_t instance with custom transform.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_custom (void *dest, /**< pointer to the native argument where the result should be stored */
- uintptr_t extra_info, /**< the extra parameter, specific to the transform function */
- jerryx_arg_transform_func_t func) /**< the custom transform function */
-{
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = dest,
- .extra_info = extra_info
- };
-} /* jerryx_arg_custom */
-
-/**
- * Create a jerryx_arg_t instance for object properties.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_object_properties (const jerryx_arg_object_props_t *object_props, /**< pointer to object property mapping */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_object_props_optional;
- }
- else
- {
- func = jerryx_arg_transform_object_props;
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = NULL,
- .extra_info = (uintptr_t) object_props
- };
-} /* jerryx_arg_object_properties */
-
-/**
- * Create a jerryx_arg_t instance for array.
- *
- * @return a jerryx_arg_t instance.
- */
-static inline jerryx_arg_t
-jerryx_arg_array (const jerryx_arg_array_items_t *array_items_p, /**< pointer to array items mapping */
- jerryx_arg_optional_t opt_flag) /**< whether the argument is optional */
-{
- jerryx_arg_transform_func_t func;
-
- if (opt_flag == JERRYX_ARG_OPTIONAL)
- {
- func = jerryx_arg_transform_array_items_optional;
- }
- else
- {
- func = jerryx_arg_transform_array_items;
- }
-
- return (jerryx_arg_t)
- {
- .func = func,
- .dest = NULL,
- .extra_info = (uintptr_t) array_items_p
- };
-} /* jerryx_arg_array */
-
-#endif /* !JERRYX_ARG_IMPL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYX_AUTORELEASE_H
-#define JERRYX_AUTORELEASE_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "autorelease.impl.h"
-
-/*
- * Macro for `const jerry_value_t` for which jerry_release_value () is
- * automatically called when the variable goes out of scope.
- *
- * Example usage:
- * static void foo (bool enable)
- * {
- * JERRYX_AR_VALUE_T bar = jerry_create_string (...);
- *
- * if (enable) {
- * JERRYX_AR_VALUE_T baz = jerry_get_global_object ();
- *
- * // ...
- *
- * // jerry_release_value (baz) and jerry_release_value (bar) is called automatically before
- * // returning, because `baz` and `bar` go out of scope.
- * return;
- * }
- *
- * // jerry_release_value (bar) is called automatically when the function returns,
- * // because `bar` goes out of scope.
- * }
- */
-#define JERRYX_AR_VALUE_T __JERRYX_AR_VALUE_T_IMPL
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* !JERRYX_AUTORELEASE_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYX_AUTORELEASE_IMPL_H
-#define JERRYX_AUTORELEASE_IMPL_H
-
-#include "jerryscript.h"
-
-#ifdef __GNUC__
-/*
- * Calls jerry_release_value (*value).
- * The GCC __cleanup__ function must take a pointer to the variable to clean up.
- *
- * @return void
- */
-static inline void
-jerryx_autorelease_cleanup (const jerry_value_t *value) /**< jerry value */
-{
- jerry_release_value (*value);
-} /* jerryx_autorelease_cleanup */
-
-#define __JERRYX_AR_VALUE_T_IMPL const jerry_value_t __attribute__ ((__cleanup__(jerryx_autorelease_cleanup)))
-#else /* !__GNUC__ */
-/* TODO: for other compilers */
-#error "No autorelease implementation for your compiler!"
-#endif /* __GNUC__ */
-
-#endif /* !JERRYX_AUTORELEASE_IMPL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYX_HANDLE_SCOPE_H
-#define JERRYX_HANDLE_SCOPE_H
-
-#include "jerryscript.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#ifndef JERRYX_HANDLE_PRELIST_SIZE
-#define JERRYX_HANDLE_PRELIST_SIZE 20
-#endif
-
-#ifndef JERRYX_SCOPE_PRELIST_SIZE
-#define JERRYX_SCOPE_PRELIST_SIZE 20
-#endif
-
-#define STATIC_ASSERT(COND,MSG) typedef char static_assertion_##MSG[(COND)?1:-1]
-
-STATIC_ASSERT (JERRYX_SCOPE_PRELIST_SIZE < 32, JERRYX_SCOPE_PRELIST_SIZE_must_be_less_than_size_of_uint8_t);
-
-#undef STATIC_ASSERT
-
-typedef struct jerryx_handle_t jerryx_handle_t;
-/**
- * Dynamically allocated handle in the scopes.
- * Scopes has it's own size-limited linear storage of handles. Still there
- * might be not enough space left for new handles, dynamically allocated
- * `jerryx_handle_t` could ease the pre-allocated linear memory burden.
- */
-struct jerryx_handle_t
-{
- jerry_value_t jval; /**< jerry value of the handle bound to */
- jerryx_handle_t *sibling; /**< next sibling the the handle */
-};
-
-#define JERRYX_HANDLE_SCOPE_FIELDS \
- jerry_value_t handle_prelist[JERRYX_HANDLE_PRELIST_SIZE]; \
- uint8_t prelist_handle_count; \
- bool escaped; \
- jerryx_handle_t *handle_ptr
-
-typedef struct jerryx_handle_scope_s jerryx_handle_scope_t;
-typedef jerryx_handle_scope_t *jerryx_handle_scope;
-typedef jerryx_handle_scope_t *jerryx_escapable_handle_scope;
-/**
- * Inlined simple handle scope type.
- */
-struct jerryx_handle_scope_s
-{
- JERRYX_HANDLE_SCOPE_FIELDS; /**< common handle scope fields */
-};
-
-
-typedef struct jerryx_handle_scope_dynamic_s jerryx_handle_scope_dynamic_t;
-/**
- * Dynamically allocated handle scope type.
- */
-struct jerryx_handle_scope_dynamic_s
-{
- JERRYX_HANDLE_SCOPE_FIELDS; /**< common handle scope fields */
- jerryx_handle_scope_dynamic_t *child; /**< child dynamically allocated handle scope */
- jerryx_handle_scope_dynamic_t *parent; /**< parent dynamically allocated handle scope */
-};
-
-#undef JERRYX_HANDLE_SCOPE_FIELDS
-
-typedef enum
-{
- jerryx_handle_scope_ok = 0,
-
- jerryx_escape_called_twice,
- jerryx_handle_scope_mismatch,
-} jerryx_handle_scope_status;
-
-jerryx_handle_scope_status
-jerryx_open_handle_scope (jerryx_handle_scope *result);
-
-jerryx_handle_scope_status
-jerryx_close_handle_scope (jerryx_handle_scope scope);
-
-jerryx_handle_scope_status
-jerryx_open_escapable_handle_scope (jerryx_handle_scope *result);
-
-jerryx_handle_scope_status
-jerryx_close_escapable_handle_scope (jerryx_handle_scope scope);
-
-jerryx_handle_scope_status
-jerryx_escape_handle (jerryx_escapable_handle_scope scope,
- jerry_value_t escapee,
- jerry_value_t *result);
-
-/**
- * Completely escape a handle from handle scope,
- * leave life time management totally up to user.
- */
-jerryx_handle_scope_status
-jerryx_remove_handle (jerryx_escapable_handle_scope scope,
- jerry_value_t escapee,
- jerry_value_t *result);
-
-jerry_value_t
-jerryx_create_handle (jerry_value_t jval);
-
-jerry_value_t
-jerryx_create_handle_in_scope (jerry_value_t jval, jerryx_handle_scope scope);
-
-/** MARK: - handle-scope-allocator.c */
-jerryx_handle_scope_t *
-jerryx_handle_scope_get_current (void);
-
-jerryx_handle_scope_t *
-jerryx_handle_scope_get_root (void);
-/** MARK: - END handle-scope-allocator.c */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* !JERRYX_HANDLE_SCOPE_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYX_MODULE_H
-#define JERRYX_MODULE_H
-
-#include "jerryscript.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-/**
- * Declare the signature for the module initialization function.
- */
-typedef jerry_value_t (*jerryx_native_module_on_resolve_t) (void);
-
-/**
- * Declare the structure used to define a module. One should only make use of this structure via the
- * JERRYX_NATIVE_MODULE macro declared below.
- */
-typedef struct jerryx_native_module_t
-{
- const jerry_char_t *name_p; /**< name of the module */
- const jerryx_native_module_on_resolve_t on_resolve_p; /**< function that returns a new instance of the module */
- struct jerryx_native_module_t *next_p; /**< pointer to next module in the list */
-} jerryx_native_module_t;
-
-/**
- * Declare the constructor and destructor attributes. These evaluate to nothing if this extension is built without
- * library constructor/destructor support.
- */
-#ifdef ENABLE_INIT_FINI
-#ifdef _MSC_VER
-#error "`FEATURE_INIT_FINI` build flag isn't supported on Windows, because Microsoft Visual C/C++ Compiler \
-doesn't support library constructors and destructors."
-#endif
-#define JERRYX_MODULE_CONSTRUCTOR_ATTRIBUTE __attribute__((constructor))
-#define JERRYX_MODULE_DESTRUCTOR_ATTRIBUTE __attribute__((destructor))
-#define JERRYX_MODULE_REGISTRATION_QUALIFIER static
-#else /* !ENABLE_INIT_FINI */
-#define JERRYX_MODULE_CONSTRUCTOR_ATTRIBUTE
-#define JERRYX_MODULE_DESTRUCTOR_ATTRIBUTE
-#define JERRYX_MODULE_REGISTRATION_QUALIFIER
-#endif /* ENABLE_INIT_FINI */
-
-/**
- * Having two levels of macros allows strings to be used unquoted.
- */
-#define JERRYX_NATIVE_MODULE(module_name, on_resolve_cb) \
- JERRYX_NATIVE_MODULE_IMPLEM(module_name, on_resolve_cb)
-
-#define JERRYX_NATIVE_MODULE_IMPLEM(module_name, on_resolve_cb) \
- static jerryx_native_module_t _ ## module_name ## _definition = \
- { \
- .name_p = (jerry_char_t *) #module_name, \
- .on_resolve_p = (on_resolve_cb), \
- .next_p = NULL \
- }; \
- \
- JERRYX_MODULE_REGISTRATION_QUALIFIER void \
- module_name ## _register (void) JERRYX_MODULE_CONSTRUCTOR_ATTRIBUTE; \
- JERRYX_MODULE_REGISTRATION_QUALIFIER void \
- module_name ## _register (void) \
- { \
- jerryx_native_module_register(&_##module_name##_definition); \
- } \
- \
- JERRYX_MODULE_REGISTRATION_QUALIFIER void \
- module_name ## _unregister (void) \
- JERRYX_MODULE_DESTRUCTOR_ATTRIBUTE; \
- JERRYX_MODULE_REGISTRATION_QUALIFIER void \
- module_name ## _unregister (void) \
- { \
- jerryx_native_module_unregister(&_##module_name##_definition); \
- }
-
-/**
- * Register a native module. This makes it available for loading via jerryx_module_resolve, when
- * jerryx_module_native_resolver is passed in as a possible resolver.
- */
-void jerryx_native_module_register (jerryx_native_module_t *module_p);
-
-/**
- * Unregister a native module. This removes the module from the list of available native modules, meaning that
- * subsequent calls to jerryx_module_resolve with jerryx_module_native_resolver will not be able to find it.
- */
-void jerryx_native_module_unregister (jerryx_native_module_t *module_p);
-
-/**
- * Declare the function pointer type for canonical name resolution.
- */
-typedef jerry_value_t (*jerryx_module_get_canonical_name_t) (const jerry_value_t name); /**< The name for which to
- * compute the canonical
- * name */
-
-/**
- * Declare the function pointer type for module resolution.
- */
-typedef bool (*jerryx_module_resolve_t) (const jerry_value_t canonical_name, /**< The module's canonical name */
- jerry_value_t *result); /**< The resulting module, if the function returns
- * true */
-
-/**
- * Declare the structure for module resolvers.
- */
-typedef struct
-{
- jerryx_module_get_canonical_name_t get_canonical_name_p; /**< function pointer to establish the canonical name of a
- * module */
- jerryx_module_resolve_t resolve_p; /**< function pointer to resolve a module */
-} jerryx_module_resolver_t;
-
-/**
- * Declare the JerryScript module resolver so that it may be added to an array of jerryx_module_resolver_t items and
- * thus passed to jerryx_module_resolve.
- */
-extern jerryx_module_resolver_t jerryx_module_native_resolver;
-
-/**
- * Load a copy of a module into the current context using the provided module resolvers, or return one that was already
- * loaded if it is found.
- */
-jerry_value_t jerryx_module_resolve (const jerry_value_t name,
- const jerryx_module_resolver_t **resolvers,
- size_t count);
-
-/**
- * Delete a module from the cache or, if name has the JavaScript value of undefined, clear the entire cache.
- */
-void jerryx_module_clear_cache (const jerry_value_t name,
- const jerryx_module_resolver_t **resolvers,
- size_t count);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* !JERRYX_MODULE_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JEXT_COMMON_H
-#define JEXT_COMMON_H
-
-#include <stdio.h>
-#include <string.h>
-
-#include "jerryscript.h"
-#include "jerryscript-port.h"
-
-/*
- * Make sure unused parameters, variables, or expressions trigger no compiler warning.
- */
-#define JERRYX_UNUSED(x) ((void) (x))
-
-/*
- * Asserts
- *
- * Warning:
- * Don't use JERRY_STATIC_ASSERT in headers, because
- * __LINE__ may be the same for asserts in a header
- * and in an implementation file.
- */
-#define JERRYX_STATIC_ASSERT_GLUE_(a, b, c) a ## b ## _ ## c
-#define JERRYX_STATIC_ASSERT_GLUE(a, b, c) JERRYX_STATIC_ASSERT_GLUE_ (a, b, c)
-#define JERRYX_STATIC_ASSERT(x, msg) \
- enum { JERRYX_STATIC_ASSERT_GLUE (static_assertion_failed_, __LINE__, msg) = 1 / (!!(x)) }
-
-#ifndef JERRY_NDEBUG
-void JERRY_ATTR_NORETURN
-jerry_assert_fail (const char *assertion, const char *file, const char *function, const uint32_t line);
-void JERRY_ATTR_NORETURN
-jerry_unreachable (const char *file, const char *function, const uint32_t line);
-
-#define JERRYX_ASSERT(x) \
- do \
- { \
- if (JERRY_UNLIKELY (!(x))) \
- { \
- jerry_assert_fail (#x, __FILE__, __func__, __LINE__); \
- } \
- } while (0)
-
-#define JERRYX_UNREACHABLE() \
- do \
- { \
- jerry_unreachable (__FILE__, __func__, __LINE__); \
- } while (0)
-#else /* JERRY_NDEBUG */
-#define JERRYX_ASSERT(x) \
- do \
- { \
- if (false) \
- { \
- JERRYX_UNUSED (x); \
- } \
- } while (0)
-
-#ifdef __GNUC__
-#define JERRYX_UNREACHABLE() __builtin_unreachable ()
-#endif /* __GNUC__ */
-
-#ifdef _MSC_VER
-#define JERRYX_UNREACHABLE() _assume (0)
-#endif /* _MSC_VER */
-
-#ifndef JERRYX_UNREACHABLE
-#define JERRYX_UNREACHABLE()
-#endif /* !JERRYX_UNREACHABLE */
-
-#endif /* !JERRY_NDEBUG */
-
-/*
- * Logging
- */
-#define JERRYX_ERROR_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_ERROR, __VA_ARGS__)
-#define JERRYX_WARNING_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_WARNING, __VA_ARGS__)
-#define JERRYX_DEBUG_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_DEBUG, __VA_ARGS__)
-#define JERRYX_TRACE_MSG(...) jerry_port_log (JERRY_LOG_LEVEL_TRACE, __VA_ARGS__)
-
-#endif /* !JEXT_COMMON_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This file is based on work under the following copyright and permission
- * notice:
- *
- * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- *
- * @(#)fdlibm.h 1.5 04/04/22
- */
-
-#ifndef JERRY_LIBM_INTERNAL_H
-#define JERRY_LIBM_INTERNAL_H
-
-/* Sometimes it's necessary to define __LITTLE_ENDIAN explicitly
- but these catch some common cases. */
-
-
-#ifndef __LITTLE_ENDIAN
-/* Check if compiler has byte order macro. Some older versions do not.
- * If byte order is supported and set to little or target is among common
- * cases checked define __LITTLE_ENDIAN.
- */
-#if (defined (i386) || defined (__i386) || defined (__i386__) || \
- defined (i486) || defined (__i486) || defined (__i486__) || \
- defined (intel) || defined (x86) || defined (i86pc) || \
- defined (__alpha) || defined (__osf__) || \
- defined (__x86_64__) || defined (__arm__) || defined (__aarch64__) || \
- defined (__xtensa__) || defined (__MIPSEL)) || \
-(defined (__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
-#define __LITTLE_ENDIAN
-#endif
-#endif /* !__LITTLE_ENDIAN */
-
-#ifdef __LITTLE_ENDIAN
-#define __HI(x) *(1 + (const int *) &x)
-#define __LO(x) *(const int *) &x
-typedef union
-{
- double dbl;
- struct
- {
- int lo;
- int hi;
- } as_int;
-} double_accessor;
-#else /* !__LITTLE_ENDIAN */
-#define __HI(x) *(const int *) &x
-#define __LO(x) *(1 + (const int *) &x)
-
-typedef union
-{
- double dbl;
- struct
- {
- int hi;
- int lo;
- } as_int;
-} double_accessor;
-#endif /* __LITTLE_ENDIAN */
-
-#ifndef NAN
-#define NAN (0.0/0.0)
-#endif
-
-/*
- * ANSI/POSIX
- */
-double acos (double x);
-double asin (double x);
-double atan (double x);
-double atan2 (double y, double x);
-double cos (double x);
-double sin (double x);
-double tan (double x);
-
-double exp (double x);
-double log (double x);
-
-double pow (double x, double y);
-double sqrt (double x);
-
-double ceil (double x);
-double fabs (double x);
-double floor (double x);
-double fmod (double x, double y);
-
-int isnan (double x);
-int finite (double x);
-
-double nextafter (double x, double y);
-
-/*
- * Functions callable from C, intended to support IEEE arithmetic.
- */
-double copysign (double x, double y);
-double scalbn (double x, int n);
-
-#endif /* !JERRY_LIBM_INTERNAL_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRY_LIBM_MATH_H
-#define JERRY_LIBM_MATH_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-/* General Constants. */
-#define INFINITY (1.0/0.0)
-#define NAN (0.0/0.0)
-#define HUGE_VAL INFINITY
-
-#define isnan(x) ((x) != (x))
-#define isinf(x) (((x) == INFINITY) || ((x) == -INFINITY))
-#define isfinite(x) (!(isinf(x)) && (x != NAN))
-
-/* Exponential and Logarithmic constants. */
-#define M_E 2.7182818284590452353602874713526625
-#define M_SQRT2 1.4142135623730950488016887242096981
-#define M_SQRT1_2 0.7071067811865475244008443621048490
-#define M_LOG2E 1.4426950408889634073599246810018921
-#define M_LOG10E 0.4342944819032518276511289189166051
-#define M_LN2 0.6931471805599453094172321214581765
-#define M_LN10 2.3025850929940456840179914546843642
-
-/* Trigonometric Constants. */
-#define M_PI 3.1415926535897932384626433832795029
-#define M_PI_2 1.5707963267948966192313216916397514
-#define M_PI_4 0.7853981633974483096156608458198757
-#define M_1_PI 0.3183098861837906715377675267450287
-#define M_2_PI 0.6366197723675813430755350534900574
-#define M_2_SQRTPI 1.1283791670955125738961589031215452
-
-/* Trigonometric functions. */
-double cos (double);
-double sin (double);
-double tan (double);
-double acos (double);
-double asin (double);
-double atan (double);
-double atan2 (double, double);
-
-/* Exponential and logarithmic functions. */
-double exp (double);
-double log (double);
-
-/* Power functions. */
-double pow (double, double);
-double sqrt (double);
-
-/* Rounding and remainder functions. */
-double ceil (double);
-double floor (double);
-
-/* Other functions. */
-double fabs (double);
-double fmod (double, double);
-
-double nextafter (double, double);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* !JERRY_LIBM_MATH_H */
+++ /dev/null
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JERRYSCRIPT_PORT_DEFAULT_H
-#define JERRYSCRIPT_PORT_DEFAULT_H
-
-#include <stdbool.h>
-
-#include "jerryscript.h"
-#include "jerryscript-port.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-/** \addtogroup jerry_port_default Default Jerry engine port API
- * These functions are only available if the default port of Jerry is used.
- * @{
- */
-
-jerry_log_level_t jerry_port_default_get_log_level (void);
-void jerry_port_default_set_log_level (jerry_log_level_t level);
-
-void jerry_port_default_set_current_context (jerry_context_t *context_p);
-
-typedef void (* fatal_handler_t)(int code);
-
-void jerry_port_default_set_fatal_handler (fatal_handler_t handler);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* !JERRYSCRIPT_PORT_DEFAULT_H */
--- /dev/null
+#===============================================================================
+# @brief cmake file
+# Copyright (c) CompanyNameMagicTag 2022-2023. All rights reserved.
+#===============================================================================
+set(COMPONENT_NAME "storage_jsapi")
+
+set(SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/kvstorekit/src/nativeapi_kv_impl.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/kvstorekit/src/nativeapi_kv.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/filekit/src/nativeapi_fs_impl.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/filekit/src/nativeapi_fs.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/common/src/nativeapi_common.cpp
+)
+
+set(PUBLIC_HEADER
+)
+
+set(PRIVATE_HEADER
+ ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/jsi
+ ${ROOT_DIR}/open_source/openharmony/foundation/ace/ace_engine_lite/interfaces/base
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/innerkits
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits/
+ ${CMAKE_CURRENT_SOURCE_DIR}/common/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/kvstorekit/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/filekit/include
+)
+
+set(PRIVATE_DEFINES
+)
+
+set(PUBLIC_DEFINES
+ FEATURE_MODULE_STORAGE
+)
+
+# use this when you want to add ccflags like -include xxx
+set(COMPONENT_PUBLIC_CCFLAGS
+)
+set(COMPONENT_CCFLAGS
+ -std=c++11
+ -Wno-error
+ -Wno-unused-parameter
+ -fno-exceptions
+ -fno-unwind-tables
+ -fno-asynchronous-unwind-tables
+ -Wno-undef
+ -Wno-bitwise-op-parentheses
+ -Wno-shift-op-parentheses
+ -nostdlibinc
+ -nostdinc
+ -nostdlib
+ -Wno-c++11-narrowing
+ -Wno-error=unused-function
+)
+
+set(WHOLE_LINK
+ true
+)
+
+set(MAIN_COMPONENT
+ false
+)
+
+build_component()
--- /dev/null
+/*
+ * Copyright (c) 2020 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef JS_NATIVE_API_COMMON_H
+#define JS_NATIVE_API_COMMON_H
+
+#include "jsi/jsi.h"
+
+namespace OHOS {
+namespace ACELite {
+struct FuncParams {
+ JSIValue args = JSI::CreateUndefined();
+ JSIValue thisVal = JSI::CreateUndefined();
+ bool flag = false;
+};
+
+class NativeapiCommon {
+public:
+ static void FailCallBack(const JSIValue thisVal, const JSIValue args, int ret);
+ static void SuccessCallBack(const JSIValue thisVal, const JSIValue args, JSIValue jsiValue);
+ static bool IsValidJSIValue(const JSIValue* args, uint8_t argsNum);
+private:
+ NativeapiCommon() = default;
+ ~NativeapiCommon() = default;
+};
+}
+}
+
+#endif /* JS_NATIVE_API_CALLBACK_H */
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2020 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef JS_NATIVE_API_CONFIG_H
+#define JS_NATIVE_API_CONFIG_H
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif /* __cplusplus */
+
+#define FILE_NAME_MAX_LEN 300
+#define URI_NAME_MAX_LEN 128
+#define TEXT_MAX_READ_LEN 4096
+#define DIR_LEVEL 5
+#define ERROR_CODE "code"
+#define TEXT "text"
+#define FILE_URI "uri"
+#define FILE_SOURCE_URI "srcUri"
+#define FILE_DESTINATION_URI "dstUri"
+#define FILE_LENGTH "length"
+#define FILE_LAST_MODIFIED_TIME "lastModifiedTime"
+#define FILE_TYPE "type"
+#define FILE_POSITION "position"
+#define FILE_APPEND "append"
+#define FILE_BUFFER "buffer"
+#define KV_KEY "key"
+#define KV_VALUE "value"
+#define DEFAULT "default"
+#define FILE_PREFIX "internal://app"
+#define DEFAULT_FOLDER_PATH "kvstore"
+#define TYPE_FILE "file"
+#define TYPE_DIR "dir"
+#define FILE_LIST "fileList"
+#define RECURSIVE "recursive"
+#define SUB_FILES "subFiles"
+#define ERR_NO_FILE "File or directory not exist"
+#define ERR_IO_EXCEPTION "I/O error"
+#define ERR_ILLEGAL_PARAM "Invalid parameter"
+#define ERR_GENERAL "System error"
+#define ERR_READ_TOO_LONG "The content of the file to be read exceeds 4KB"
+
+#define NATIVE_FEATURE_ON 1
+#define NATIVE_FEATURE_OFF 0
+
+enum ErrorCode {
+ NATIVE_SUCCESS = 0,
+ ERROR_FR_NO_FILE = -2,
+ ERROR_DIR_NOT_EMPTY = -39,
+ ERROR_CODE_GENERAL = -200,
+ ERROR_CODE_PARAM = -202,
+ ERROR_CODE_IO = -300,
+ ERROR_CODE_NO_FILE = -301,
+ ERROR_CODE_READ_TOO_LONG = -302
+};
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif /* __cplusplus */
+
+#endif /* JS_NATIVE_API_COMMON_H */
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright (c) 2020 Huawei Device Co., Ltd.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include "nativeapi_common.h"\r
+#include "jsi/jsi_types.h"\r
+#include "nativeapi_config.h"\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+void NativeapiCommon::FailCallBack(const JSIValue thisVal, const JSIValue args, int ret)\r
+{\r
+ if (JSI::ValueIsUndefined(args)) {\r
+ return;\r
+ }\r
+ JSIValue errInfo;\r
+ if (ret == ERROR_CODE_IO) {\r
+ errInfo = JSI::CreateString(ERR_IO_EXCEPTION);\r
+ ret = (-ERROR_CODE_IO);\r
+ } else if ((ret == ERROR_CODE_PARAM) || (ret == ERROR_DIR_NOT_EMPTY)) {\r
+ errInfo = JSI::CreateString(ERR_ILLEGAL_PARAM);\r
+ ret = (-ERROR_CODE_PARAM);\r
+ } else if (ret == ERROR_FR_NO_FILE) {\r
+ errInfo = JSI::CreateString(ERR_NO_FILE);\r
+ ret = (-ERROR_CODE_NO_FILE);\r
+ } else if (ret == ERROR_CODE_READ_TOO_LONG) {\r
+ errInfo = JSI::CreateString(ERR_READ_TOO_LONG);\r
+ ret = (-ERROR_CODE_READ_TOO_LONG);\r
+ } else {\r
+ errInfo = JSI::CreateString(ERR_GENERAL);\r
+ ret = (-ERROR_CODE_GENERAL);\r
+ }\r
+ JSIValue errCode = JSI::CreateNumber(ret);\r
+ JSIValue fail = JSI::GetNamedProperty(args, CB_FAIL);\r
+ JSIValue complete = JSI::GetNamedProperty(args, CB_COMPLETE);\r
+ JSIValue argv[ARGC_TWO] = {errInfo, errCode};\r
+ if (!JSI::ValueIsUndefined(fail)) {\r
+ JSI::CallFunction(fail, thisVal, argv, ARGC_TWO);\r
+ }\r
+ if (!JSI::ValueIsUndefined(complete)) {\r
+ JSI::CallFunction(complete, thisVal, nullptr, 0);\r
+ }\r
+ JSI::ReleaseValueList(fail, complete, errInfo, errCode, ARGS_END);\r
+}\r
+\r
+void NativeapiCommon::SuccessCallBack(const JSIValue thisVal, const JSIValue args, JSIValue jsiValue)\r
+{\r
+ if (JSI::ValueIsUndefined(args)) {\r
+ return;\r
+ }\r
+ JSIValue success = JSI::GetNamedProperty(args, CB_SUCCESS);\r
+ JSIValue complete = JSI::GetNamedProperty(args, CB_COMPLETE);\r
+ if (!JSI::ValueIsUndefined(success)) {\r
+ if (JSI::ValueIsUndefined(jsiValue)) {\r
+ JSI::CallFunction(success, thisVal, nullptr, 0);\r
+ } else {\r
+ JSI::CallFunction(success, thisVal, &jsiValue, ARGC_ONE);\r
+ }\r
+ }\r
+ if (!JSI::ValueIsUndefined(complete)) {\r
+ JSI::CallFunction(complete, thisVal, nullptr, 0);\r
+ }\r
+ JSI::ReleaseValueList(success, complete, ARGS_END);\r
+}\r
+\r
+bool NativeapiCommon::IsValidJSIValue(const JSIValue* args, uint8_t argsNum)\r
+{\r
+ if ((args == nullptr) || (argsNum == 0) || JSI::ValueIsUndefined(args[0])) {\r
+ return false;\r
+ }\r
+ return true;\r
+}\r
+}\r
+}\r
--- /dev/null
+/*
+ * Copyright (c) 2020 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef JS_NATIVE_API_FS_H
+#define JS_NATIVE_API_FS_H
+
+#include "jsi/jsi.h"
+#include "nativeapi_config.h"
+
+namespace OHOS {
+namespace ACELite {
+class NativeapiFs {
+public:
+ NativeapiFs() = default;
+ ~NativeapiFs() = default;
+
+ static JSIValue MoveFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue CopyFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue DeleteFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue GetFileList(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue GetFileInfo(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue WriteTextFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue ReadTextFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue Access(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue CreateDir(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue RemoveDir(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+
+#if (JS_FWK_TYPEDARRAY == NATIVE_FEATURE_ON)
+ static JSIValue ReadArrayFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue WriteArrayFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+#endif /* JS_FWK_TYPEDARRAY */
+};
+void InitNativeApiFs(JSIValue exports);
+} // ACELite
+} // OHOS
+
+#endif /* JS_NATIVE_API_FS_H */
--- /dev/null
+/*
+ * Copyright (c) 2020 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef JS_NATIVE_API_FS_IMPL_H
+#define JS_NATIVE_API_FS_IMPL_H
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include "nativeapi_config.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif
+#endif /* __cplusplus */
+
+typedef struct {
+ char fileName[FILE_NAME_MAX_LEN + 1];
+ off_t fileSize;
+ time_t fileMtime;
+ mode_t fileMode;
+} FileMetaInfo;
+
+int StatImpl(const char* path, struct stat* buf);
+int DeleteFileImpl(const char* src);
+int CopyFileImpl(const char* src, const char* dest);
+int WriteTextFile(const char* fileName, const void* buf, size_t len, bool append);
+int WriteArrayFile(const char* fileName, const void* buf, size_t len, unsigned int position, bool append);
+int ReadFileImpl(const char* fileName, void* text, size_t len, unsigned int position, size_t* actualLen);
+int GetFileListImpl(const char* dirName, FileMetaInfo* fileList, unsigned int listNum);
+int GetFileNum(const char* dirName);
+int AccessImpl(const char* fileName);
+int CreateDirImpl(const char* fileName, bool recursive);
+int RemoveDirImpl(const char* fileName, bool recursive);
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif /* __cplusplus */
+
+#endif /* JS_NATIVE_API_FS_IMPL_H */
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright (c) 2020 Huawei Device Co., Ltd.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include "nativeapi_fs.h"\r
+#include <securec.h>\r
+#include "ace_log.h"\r
+#include <new>\r
+#include "ability_env.h"\r
+#include "js_async_work.h"\r
+#include "nativeapi_common.h"\r
+#include "nativeapi_fs_impl.h"\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+namespace {\r
+char g_uriFullPath[FILE_NAME_MAX_LEN + 1] = {0};\r
+const unsigned int PREFIX_LEN = strlen(FILE_PREFIX);\r
+\r
+bool IsValidPath(const char* path)\r
+{\r
+ if (path == nullptr) {\r
+ return false;\r
+ }\r
+\r
+ size_t pathLen = strnlen(path, URI_NAME_MAX_LEN + 1);\r
+ if (pathLen > URI_NAME_MAX_LEN) {\r
+ return false;\r
+ }\r
+ if ((pathLen < PREFIX_LEN) || (strncmp(path, FILE_PREFIX, PREFIX_LEN) != 0)) {\r
+ return false;\r
+ }\r
+ if ((strstr(path, "/./") != nullptr) || (strstr(path, "/../") != nullptr)) {\r
+ return false;\r
+ }\r
+ if (strpbrk(path + PREFIX_LEN, "\"*+,:;<=>\?[]|\x7F")) {\r
+ return false;\r
+ }\r
+ return true;\r
+}\r
+\r
+int GetFullPath(const char* uri, char* fullPath, int len)\r
+{\r
+ if (!IsValidPath(uri) || (fullPath == nullptr)) {\r
+ return ERROR_CODE_PARAM;\r
+ }\r
+ const char* dataPath = GetDataPath();\r
+ if (dataPath == nullptr) {\r
+ return ERROR_CODE_PARAM;\r
+ }\r
+ if (memset_s(fullPath, len, 0x0, len) != EOK) {\r
+ return ERROR_CODE_GENERAL;\r
+ }\r
+ if (sprintf_s(fullPath, len, "%s%s", dataPath, uri + PREFIX_LEN) < 0) {\r
+ return ERROR_CODE_GENERAL;\r
+ }\r
+ return NATIVE_SUCCESS;\r
+}\r
+\r
+JSIValue ExecuteAsyncWork(const JSIValue thisVal, const JSIValue* args,\r
+ uint8_t argsNum, AsyncWorkHandler ExecuteFunc, bool flag = false)\r
+{\r
+ JSIValue undefValue = JSI::CreateUndefined();\r
+ if (!NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
+ return undefValue;\r
+ }\r
+ FuncParams* params = new(std::nothrow) FuncParams();\r
+ if (params == nullptr) {\r
+ return undefValue;\r
+ }\r
+ params->thisVal = JSI::AcquireValue(thisVal);\r
+ params->args = JSI::AcquireValue(args[0]);\r
+ params->flag = flag;\r
+ JsAsyncWork::DispatchAsyncWork(ExecuteFunc, reinterpret_cast<void *>(params));\r
+ return undefValue;\r
+}\r
+\r
+void ExecuteCopyFile(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ char* src = JSI::GetStringProperty(args, FILE_SOURCE_URI);\r
+ char* dest = JSI::GetStringProperty(args, FILE_DESTINATION_URI);\r
+ char* destFullPath = nullptr;\r
+ JSIValue result = JSI::CreateUndefined();\r
+ int ret = GetFullPath(src, g_uriFullPath, sizeof(g_uriFullPath));\r
+ JSI::ReleaseString(src);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ destFullPath = reinterpret_cast<char *>(malloc(FILE_NAME_MAX_LEN + 1));\r
+ if (destFullPath == nullptr) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ERROR_CODE_GENERAL);\r
+ goto EXIT;\r
+ }\r
+ ret = GetFullPath(dest, destFullPath, FILE_NAME_MAX_LEN + 1);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ ret = CopyFileImpl(g_uriFullPath, destFullPath);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ if (params->flag) {\r
+ ret = DeleteFileImpl(g_uriFullPath);\r
+ }\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ result = JSI::CreateString(dest);\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, result);\r
+EXIT:\r
+ JSI::ReleaseString(dest);\r
+ free(destFullPath);\r
+ JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
+ delete params;\r
+}\r
+\r
+void ExecuteDeleteAccess(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ char* src = JSI::GetStringProperty(args, FILE_URI);\r
+ int ret = GetFullPath(src, g_uriFullPath, sizeof(g_uriFullPath));\r
+ JSI::ReleaseString(src);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ if (params->flag) {\r
+ ret = DeleteFileImpl(g_uriFullPath);\r
+ } else {\r
+ ret = AccessImpl(g_uriFullPath);\r
+ }\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, JSI::CreateUndefined());\r
+EXIT:\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+}\r
+\r
+int GetFileListInner(const char* path, const char* key, JSIValue& result)\r
+{\r
+ int fileNum = GetFileNum(g_uriFullPath);\r
+ if (fileNum <= 0) {\r
+ return fileNum;\r
+ }\r
+ FileMetaInfo* fileList = reinterpret_cast<FileMetaInfo *>(malloc(fileNum * sizeof(FileMetaInfo)));\r
+ if (fileList == nullptr) {\r
+ return ERROR_CODE_GENERAL;\r
+ }\r
+ if (memset_s(fileList, fileNum * sizeof(FileMetaInfo), 0x0, fileNum * sizeof(FileMetaInfo)) != EOK) {\r
+ free(fileList);\r
+ return ERROR_CODE_GENERAL;\r
+ }\r
+ int ret = GetFileListImpl(g_uriFullPath, fileList, fileNum);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ free(fileList);\r
+ return ret;\r
+ }\r
+ JSIValue arrayValue = JSI::CreateArray(fileNum);\r
+ for (int i = 0; i < fileNum; i++) {\r
+ JSIValue tmp = JSI::CreateObject();\r
+ JSI::SetStringProperty(tmp, FILE_URI, fileList[i].fileName);\r
+ JSI::SetNumberProperty(tmp, FILE_LENGTH, fileList[i].fileSize);\r
+ JSI::SetNumberProperty(tmp, FILE_LAST_MODIFIED_TIME, fileList[i].fileMtime);\r
+ JSI::SetStringProperty(tmp, FILE_TYPE, TYPE_FILE);\r
+ if (S_ISDIR(fileList[i].fileMode)) {\r
+ JSI::SetStringProperty(tmp, FILE_TYPE, TYPE_DIR);\r
+ }\r
+ JSI::SetPropertyByIndex(arrayValue, i, tmp);\r
+ JSI::ReleaseValue(tmp);\r
+ }\r
+ free(fileList);\r
+ JSI::SetNamedProperty(result, key, arrayValue);\r
+ JSI::ReleaseValue(arrayValue);\r
+ return NATIVE_SUCCESS;\r
+}\r
+\r
+void ExecuteGetFileList(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ char* uri = JSI::GetStringProperty(args, FILE_URI);\r
+ JSIValue result = JSI::CreateObject();\r
+ int ret = GetFullPath(uri, g_uriFullPath, sizeof(g_uriFullPath));\r
+ JSI::ReleaseString(uri);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ if (params->flag) {\r
+ ret = GetFileListInner(g_uriFullPath, FILE_LIST, result);\r
+ } else {\r
+ ret = GetFileListInner(g_uriFullPath, SUB_FILES, result);\r
+ }\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, result);\r
+EXIT:\r
+ JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
+ delete params;\r
+}\r
+\r
+void ExecuteGetFileInfo(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ char* src = JSI::GetStringProperty(args, FILE_URI);\r
+ bool recursive = JSI::GetBooleanProperty(args, RECURSIVE);\r
+ struct stat info = {0};\r
+ JSIValue result = JSI::CreateObject();\r
+ int ret = GetFullPath(src, g_uriFullPath, sizeof(g_uriFullPath));\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ ret = StatImpl(g_uriFullPath, &info);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ if (recursive && (S_ISDIR(info.st_mode))) {\r
+ JSI::ReleaseString(src);\r
+ ExecuteGetFileList(data);\r
+ return;\r
+ }\r
+ JSI::SetStringProperty(result, FILE_URI, src);\r
+ JSI::SetNumberProperty(result, FILE_LENGTH, info.st_size);\r
+ JSI::SetNumberProperty(result, FILE_LAST_MODIFIED_TIME, info.st_mtime);\r
+ JSI::SetStringProperty(result, FILE_TYPE, TYPE_FILE);\r
+ if (S_ISDIR(info.st_mode)) {\r
+ JSI::SetStringProperty(result, FILE_TYPE, TYPE_DIR);\r
+ }\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, result);\r
+EXIT:\r
+ JSI::ReleaseString(src);\r
+ JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
+ delete params;\r
+}\r
+\r
+void ExecuteWriteTextFile(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ char* src = JSI::GetStringProperty(args, FILE_URI);\r
+ char* text = JSI::GetStringProperty(args, TEXT);\r
+ bool append = JSI::GetBooleanProperty(args, FILE_APPEND);\r
+ int ret = GetFullPath(src, g_uriFullPath, sizeof(g_uriFullPath));\r
+ JSI::ReleaseString(src);\r
+ if ((text == nullptr) || (ret != NATIVE_SUCCESS)) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ERROR_CODE_PARAM);\r
+ goto EXIT;\r
+ }\r
+ ret = WriteTextFile(g_uriFullPath, text, strlen(text), append);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, JSI::CreateUndefined());\r
+EXIT:\r
+ JSI::ReleaseString(text);\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+}\r
+\r
+int ReadTextInner(const char* src, int position, int length, JSIValue& result)\r
+{\r
+ if ((position < 0) || (length < 0)) {\r
+ return ERROR_CODE_PARAM;\r
+ }\r
+ if (length == 0) {\r
+ length = TEXT_MAX_READ_LEN;\r
+ }\r
+ int ret = GetFullPath(src, g_uriFullPath, sizeof(g_uriFullPath));\r
+ if (ret != NATIVE_SUCCESS) {\r
+ return ret;\r
+ }\r
+ struct stat info = {0};\r
+ ret = StatImpl(g_uriFullPath, &info);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ return ret;\r
+ }\r
+ size_t readLen = (info.st_size > length) ? length : info.st_size;\r
+ if (readLen > TEXT_MAX_READ_LEN) {\r
+ return ERROR_CODE_READ_TOO_LONG;\r
+ }\r
+ char* text = reinterpret_cast<char *>(malloc(readLen + 1));\r
+ if (text == nullptr) {\r
+ return ERROR_CODE_GENERAL;\r
+ }\r
+ size_t actualLen = 0;\r
+ ret = ReadFileImpl(g_uriFullPath, text, readLen, position, &actualLen);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ free(text);\r
+ return ret;\r
+ }\r
+ text[actualLen] = '\0';\r
+ JSI::SetStringProperty(result, TEXT, text);\r
+ free(text);\r
+ return NATIVE_SUCCESS;\r
+}\r
+\r
+void ExecuteReadTextFile(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ char* src = JSI::GetStringProperty(args, FILE_URI);\r
+ double position = JSI::GetNumberProperty(args, FILE_POSITION);\r
+ double length = JSI::GetNumberProperty(args, FILE_LENGTH);\r
+ JSIValue result = JSI::CreateObject();\r
+ int ret = ReadTextInner(src, static_cast<int>(position), static_cast<int>(length), result);\r
+ JSI::ReleaseString(src);\r
+ if (ret == NATIVE_SUCCESS) {\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, result);\r
+ } else {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ }\r
+ JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
+ delete params;\r
+}\r
+\r
+void ExecuteDirFunc(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ char* src = JSI::GetStringProperty(args, FILE_URI);\r
+ int ret = GetFullPath(src, g_uriFullPath, sizeof(g_uriFullPath));\r
+ JSI::ReleaseString(src);\r
+ bool recursive = JSI::GetBooleanProperty(args, RECURSIVE);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ if (params->flag) {\r
+ ret = CreateDirImpl(g_uriFullPath, recursive);\r
+ } else {\r
+ ret = RemoveDirImpl(g_uriFullPath, recursive);\r
+ }\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, JSI::CreateUndefined());\r
+EXIT:\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+}\r
+#if (JS_FWK_TYPEDARRAY == NATIVE_FEATURE_ON)\r
+int ReadArrayFileInner(const char* path, size_t len, unsigned int position, JSIValue& result)\r
+{\r
+ struct stat info = {0};\r
+ int ret = StatImpl(path, &info);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ return ret;\r
+ }\r
+ void* text = malloc(info.st_size + 1);\r
+ if (text == nullptr) {\r
+ return ERROR_CODE_GENERAL;\r
+ }\r
+ size_t actualLen = 0;\r
+ ret = ReadFileImpl(path, text, len, static_cast<int>(position), &actualLen);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ free(text);\r
+ return ret;\r
+ }\r
+ uint8_t* ptr = nullptr;\r
+ JSIValue arrayBuffer = JSI::CreateArrayBuffer(actualLen, ptr);\r
+ if (ptr == nullptr) {\r
+ free(text);\r
+ JSI::ReleaseValue(arrayBuffer);\r
+ return ERROR_CODE_GENERAL;\r
+ }\r
+ ret = memcpy_s(ptr, actualLen, text, actualLen);\r
+ free(text);\r
+ if (ret != EOK) {\r
+ JSI::ReleaseValue(arrayBuffer);\r
+ return ERROR_CODE_GENERAL;\r
+ }\r
+ JSIValue typedArray = JSI::CreateTypedArray(TypedArrayType::JSI_UINT8_ARRAY, actualLen, arrayBuffer, 0);\r
+ JSI::SetNamedProperty(result, FILE_BUFFER, typedArray);\r
+ JSI::ReleaseValueList(typedArray, arrayBuffer, ARGS_END);\r
+ return NATIVE_SUCCESS;\r
+}\r
+\r
+void ExecuteReadArrayFile(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ char* src = JSI::GetStringProperty(args, FILE_URI);\r
+ double position = JSI::GetNumberProperty(args, FILE_POSITION);\r
+ double length = JSI::GetNumberProperty(args, FILE_LENGTH);\r
+ JSIValue result = JSI::CreateObject();\r
+ int ret = ERROR_CODE_PARAM;\r
+ if ((position < 0) || (length < 0)) {\r
+ JSI::ReleaseString(src);\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ ret = GetFullPath(src, g_uriFullPath, sizeof(g_uriFullPath));\r
+ JSI::ReleaseString(src);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ ret = ReadArrayFileInner(g_uriFullPath, static_cast<int>(length), static_cast<int>(position), result);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, result);\r
+EXIT:\r
+ JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
+ delete params;\r
+}\r
+\r
+void ExecuteWriteArrayFile(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ char* src = JSI::GetStringProperty(args, FILE_URI);\r
+ int ret = GetFullPath(src, g_uriFullPath, sizeof(g_uriFullPath));\r
+ JSI::ReleaseString(src);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+ return;\r
+ }\r
+ JSIValue buffer = JSI::GetNamedProperty(args, FILE_BUFFER);\r
+ double position = JSI::GetNumberProperty(args, FILE_POSITION);\r
+ bool append = JSI::GetBooleanProperty(args, FILE_APPEND);\r
+ TypedArrayType type = TypedArrayType::JSI_INVALID_ARRAY;\r
+ size_t length = 0;\r
+ JSIValue arrayBuffer = JSI::CreateUndefined();\r
+ size_t byteOffset = 0;\r
+ uint8_t* arrayPtr = JSI::GetTypedArrayInfo(buffer, type, length, arrayBuffer, byteOffset);\r
+ ret = ERROR_CODE_PARAM;\r
+ if ((position < 0) || (arrayPtr == nullptr) || (type != TypedArrayType::JSI_UINT8_ARRAY)) {\r
+ JSI::ReleaseValueList(buffer, arrayBuffer, ARGS_END);\r
+ NativeapiCommon::FailCallBack(thisVal, args, ERROR_CODE_PARAM);\r
+ goto EXIT;\r
+ }\r
+ ret = WriteArrayFile(g_uriFullPath, arrayPtr, length, static_cast<int>(position), append);\r
+ JSI::ReleaseValueList(buffer, arrayBuffer, ARGS_END);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, JSI::CreateUndefined());\r
+EXIT:\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+}\r
+#endif\r
+}\r
+\r
+void InitNativeApiFs(JSIValue exports)\r
+{\r
+ JSI::SetModuleAPI(exports, "move", NativeapiFs::MoveFile);\r
+ JSI::SetModuleAPI(exports, "copy", NativeapiFs::CopyFile);\r
+ JSI::SetModuleAPI(exports, "delete", NativeapiFs::DeleteFile);\r
+ JSI::SetModuleAPI(exports, "list", NativeapiFs::GetFileList);\r
+ JSI::SetModuleAPI(exports, "get", NativeapiFs::GetFileInfo);\r
+ JSI::SetModuleAPI(exports, "readText", NativeapiFs::ReadTextFile);\r
+ JSI::SetModuleAPI(exports, "writeText", NativeapiFs::WriteTextFile);\r
+ JSI::SetModuleAPI(exports, "access", NativeapiFs::Access);\r
+ JSI::SetModuleAPI(exports, "mkdir", NativeapiFs::CreateDir);\r
+ JSI::SetModuleAPI(exports, "rmdir", NativeapiFs::RemoveDir);\r
+\r
+#if (JS_FWK_TYPEDARRAY == NATIVE_FEATURE_ON)\r
+ JSI::SetModuleAPI(exports, "readArrayBuffer", NativeapiFs::ReadArrayFile);\r
+ JSI::SetModuleAPI(exports, "writeArrayBuffer", NativeapiFs::WriteArrayFile);\r
+#endif\r
+}\r
+\r
+JSIValue NativeapiFs::MoveFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteCopyFile, true);\r
+}\r
+\r
+JSIValue NativeapiFs::CopyFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteCopyFile);\r
+}\r
+\r
+JSIValue NativeapiFs::DeleteFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteDeleteAccess, true);\r
+}\r
+\r
+JSIValue NativeapiFs::GetFileList(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteGetFileList, true);\r
+}\r
+\r
+JSIValue NativeapiFs::GetFileInfo(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteGetFileInfo);\r
+}\r
+\r
+JSIValue NativeapiFs::WriteTextFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteWriteTextFile);\r
+}\r
+\r
+JSIValue NativeapiFs::ReadTextFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteReadTextFile);\r
+}\r
+\r
+JSIValue NativeapiFs::Access(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteDeleteAccess);\r
+}\r
+\r
+JSIValue NativeapiFs::CreateDir(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteDirFunc, true);\r
+}\r
+\r
+JSIValue NativeapiFs::RemoveDir(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteDirFunc);\r
+}\r
+\r
+#if (JS_FWK_TYPEDARRAY == NATIVE_FEATURE_ON)\r
+JSIValue NativeapiFs::ReadArrayFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteReadArrayFile);\r
+}\r
+\r
+JSIValue NativeapiFs::WriteArrayFile(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteWriteArrayFile);\r
+}\r
+#endif\r
+} // ACELite\r
+} // OHOS\r
--- /dev/null
+/*
+ * Copyright (c) 2020 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "nativeapi_fs_impl.h"
+#include <ctype.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <securec.h>
+#include <stdbool.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include "nativeapi_config.h"
+#if (defined _WIN32 || defined _WIN64)
+#include "shlwapi.h"
+#endif
+
+#define BUFFER_SIZE 512
+
+static bool IsValidPath(const char* path)
+{
+ if (path == NULL) {
+ return false;
+ }
+ size_t pathLen = strnlen(path, FILE_NAME_MAX_LEN + 1);
+ if ((pathLen == 0) || (pathLen > FILE_NAME_MAX_LEN)) {
+ return false;
+ }
+ return true;
+}
+
+static int GetRealPath(const char* originPath, char* trustPath, size_t tPathLen)
+{
+#if (defined _WIN32 || defined _WIN64)
+ if (PathCanonicalize(trustPath, originPath)) {
+ return NATIVE_SUCCESS;
+ }
+#else
+ if (realpath(originPath, trustPath) != NULL) {
+ return NATIVE_SUCCESS;
+ }
+#endif
+
+ if (errno == ENOENT) {
+ if (strncpy_s(trustPath, tPathLen, originPath, strlen(originPath)) == EOK) {
+ return NATIVE_SUCCESS;
+ }
+ }
+ return ERROR_CODE_GENERAL;
+}
+
+static int RmdirRecursive(const char* fileName)
+{
+ if (!IsValidPath(fileName)) {
+ return ERROR_CODE_PARAM;
+ }
+ int ret = ERROR_CODE_GENERAL;
+ DIR* fileDir = opendir(fileName);
+ if (fileDir == NULL) {
+ return ret;
+ }
+ struct dirent* dir = readdir(fileDir);
+ struct stat info = { 0 };
+ char* fullPath = (char *)malloc(FILE_NAME_MAX_LEN + 1);
+ if (fullPath == NULL) {
+ goto MALLOC_ERROR;
+ }
+ while (dir != NULL) {
+ if (strcmp(dir->d_name, ".") == 0 || strcmp(dir->d_name, "..") == 0) {
+ dir = readdir(fileDir);
+ continue;
+ }
+ if (memset_s(fullPath, FILE_NAME_MAX_LEN + 1, 0x0, FILE_NAME_MAX_LEN + 1) != EOK) {
+ goto EXIT;
+ }
+ if (sprintf_s(fullPath, FILE_NAME_MAX_LEN + 1, "%s/%s", fileName, dir->d_name) < 0) {
+ goto EXIT;
+ }
+ if (stat(fullPath, &info) != 0) {
+ goto EXIT;
+ }
+ if (S_ISDIR(info.st_mode)) {
+ ret = RmdirRecursive(fullPath);
+ } else {
+ ret = unlink(fullPath);
+ }
+ if (ret != NATIVE_SUCCESS) {
+ goto EXIT;
+ }
+ dir = readdir(fileDir);
+ }
+ ret = rmdir(fileName);
+
+EXIT:
+ free(fullPath);
+MALLOC_ERROR:
+ closedir(fileDir);
+ return ret;
+}
+
+static int MakeParent(const char* path, char* firstPath, size_t fPathLen, int* dirNum)
+{
+ size_t pathLen = strlen(path) + 1;
+ char* fullPath = (char *)malloc(pathLen);
+ if (fullPath == NULL) {
+ return ERROR_CODE_GENERAL;
+ }
+ if (strcpy_s(fullPath, pathLen, path) != EOK) {
+ free(fullPath);
+ return ERROR_CODE_GENERAL;
+ }
+ int ret = NATIVE_SUCCESS;
+ if (AccessImpl(fullPath) != NATIVE_SUCCESS) {
+ char* sep = strrchr(fullPath, '/');
+ if (sep != NULL) {
+ *sep = 0;
+ MakeParent(fullPath, firstPath, fPathLen, dirNum);
+ *sep = '/';
+ }
+ (*dirNum)++;
+ if (*dirNum > DIR_LEVEL) {
+ free(fullPath);
+ return ERROR_CODE_PARAM;
+ }
+#if (defined _WIN32 || defined _WIN64)
+ ret = mkdir(fullPath);
+#else
+ ret = mkdir(fullPath, S_IRUSR | S_IWUSR | S_IXUSR);
+#endif
+ if ((ret == NATIVE_SUCCESS) && (*dirNum == 1)) {
+ if ((strcpy_s(firstPath, fPathLen, fullPath) != EOK)) {
+ free(fullPath);
+ return ERROR_CODE_GENERAL;
+ }
+ }
+ }
+ free(fullPath);
+ return ret;
+}
+
+static int MkdirRecursive(const char* path)
+{
+ char* firstPath = (char *)malloc(FILE_NAME_MAX_LEN + 1);
+ if (firstPath == NULL) {
+ return ERROR_CODE_GENERAL;
+ }
+ if (memset_s(firstPath, FILE_NAME_MAX_LEN + 1, 0x0, FILE_NAME_MAX_LEN + 1) != EOK) {
+ free(firstPath);
+ return ERROR_CODE_GENERAL;
+ }
+ int dirNum = 0;
+ int ret = MakeParent(path, firstPath, FILE_NAME_MAX_LEN + 1, &dirNum);
+ if (ret != NATIVE_SUCCESS) {
+ RmdirRecursive(firstPath);
+ }
+ free(firstPath);
+ return ret;
+}
+
+static int DoCopyFile(int fdSrc, int fdDest)
+{
+ char* dataBuf = (char *)malloc(BUFFER_SIZE);
+ if (dataBuf == NULL) {
+ return ERROR_CODE_GENERAL;
+ }
+ int nLen = read(fdSrc, dataBuf, BUFFER_SIZE);
+ while (nLen > 0) {
+ if (write(fdDest, dataBuf, nLen) != nLen) {
+ free(dataBuf);
+ return ERROR_CODE_IO;
+ }
+ nLen = read(fdSrc, dataBuf, BUFFER_SIZE);
+ }
+ free(dataBuf);
+ return (nLen < 0) ? ERROR_CODE_IO : NATIVE_SUCCESS;
+}
+
+int StatImpl(const char* path, struct stat* buf)
+{
+ if (!IsValidPath(path) || (buf == NULL)) {
+ return ERROR_CODE_PARAM;
+ }
+
+ if (stat(path, buf) != NATIVE_SUCCESS) {
+ return (-errno);
+ }
+ return NATIVE_SUCCESS;
+}
+
+int DeleteFileImpl(const char* src)
+{
+ if (!IsValidPath(src)) {
+ return ERROR_CODE_PARAM;
+ }
+
+ if (unlink(src) != NATIVE_SUCCESS) {
+ return (-errno);
+ }
+ return NATIVE_SUCCESS;
+}
+
+int CopyFileImpl(const char* src, const char* dest)
+{
+ if (!IsValidPath(src) || !IsValidPath(dest)) {
+ return ERROR_CODE_PARAM;
+ }
+ char* realSrc = (char *)malloc(PATH_MAX);
+ if (realSrc == NULL) {
+ return ERROR_CODE_GENERAL;
+ }
+ if (GetRealPath(src, realSrc, PATH_MAX) != NATIVE_SUCCESS) {
+ free(realSrc);
+ return ERROR_CODE_GENERAL;
+ }
+ int fdSrc = open(realSrc, O_RDONLY, S_IRUSR);
+ free(realSrc);
+ realSrc = NULL;
+ if (fdSrc < 0) {
+ return (-errno);
+ }
+ char* realDest = (char *)malloc(PATH_MAX);
+ if (realDest == NULL) {
+ close(fdSrc);
+ return ERROR_CODE_GENERAL;
+ }
+ if (GetRealPath(dest, realDest, PATH_MAX) != NATIVE_SUCCESS) {
+ close(fdSrc);
+ free(realDest);
+ return ERROR_CODE_GENERAL;
+ }
+ int fdDest = open(realDest, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
+ free(realDest);
+ realDest = NULL;
+ if (fdDest < 0) {
+ close(fdSrc);
+ return (-errno);
+ }
+ int ret = DoCopyFile(fdSrc, fdDest);
+ close(fdSrc);
+ close(fdDest);
+ if (ret != NATIVE_SUCCESS) {
+ unlink(dest);
+ }
+ return ret;
+}
+
+int WriteTextFile(const char* fileName, const void* buf, size_t len, bool append)
+{
+ if (!IsValidPath(fileName) || (buf == NULL)) {
+ return ERROR_CODE_PARAM;
+ }
+ char* resolvePath = (char *)malloc(PATH_MAX);
+ if (resolvePath == NULL) {
+ return ERROR_CODE_GENERAL;
+ }
+ if (GetRealPath(fileName, resolvePath, PATH_MAX) != NATIVE_SUCCESS) {
+ free(resolvePath);
+ return ERROR_CODE_GENERAL;
+ }
+ int fileHandle = -1;
+ if (append) {
+ fileHandle = open(resolvePath, O_RDWR | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
+ } else {
+ fileHandle = open(resolvePath, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
+ }
+ free(resolvePath);
+ if (fileHandle < 0) {
+ return (-errno);
+ }
+ int writeLen = write(fileHandle, buf, len);
+ close(fileHandle);
+ return (writeLen != len) ? ERROR_CODE_IO : NATIVE_SUCCESS;
+}
+
+int WriteArrayFile(const char* fileName, const void* buf, size_t len, unsigned int position, bool append)
+{
+ if (!IsValidPath(fileName) || (buf == NULL)) {
+ return ERROR_CODE_PARAM;
+ }
+ char* resolvePath = (char *)malloc(PATH_MAX);
+ if (resolvePath == NULL) {
+ return ERROR_CODE_GENERAL;
+ }
+ if (GetRealPath(fileName, resolvePath, PATH_MAX) != NATIVE_SUCCESS) {
+ free(resolvePath);
+ return ERROR_CODE_GENERAL;
+ }
+ int fileHandle = -1;
+ if (append) {
+ fileHandle = open(resolvePath, O_RDWR | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
+ free(resolvePath);
+ resolvePath = NULL;
+ if (fileHandle < 0) {
+ return (-errno);
+ }
+ } else {
+ fileHandle = open(resolvePath, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+ free(resolvePath);
+ resolvePath = NULL;
+ if (fileHandle < 0) {
+ return (-errno);
+ }
+ if (lseek(fileHandle, position, SEEK_SET) != position) {
+ close(fileHandle);
+ return ERROR_CODE_IO;
+ }
+ }
+ int writeLen = write(fileHandle, buf, len);
+ close(fileHandle);
+ return (writeLen != len) ? ERROR_CODE_IO : NATIVE_SUCCESS;
+}
+
+int ReadFileImpl(const char* fileName, void* text, size_t len, unsigned int position, size_t* actualLen)
+{
+ if (!IsValidPath(fileName) || (text == NULL)) {
+ return ERROR_CODE_PARAM;
+ }
+ char* resolvePath = (char *)malloc(PATH_MAX);
+ if (resolvePath == NULL) {
+ return ERROR_CODE_GENERAL;
+ }
+ if (GetRealPath(fileName, resolvePath, PATH_MAX) != NATIVE_SUCCESS) {
+ free(resolvePath);
+ return ERROR_CODE_GENERAL;
+ }
+ int fileHandle = open(resolvePath, O_RDONLY, S_IRUSR);
+ free(resolvePath);
+ resolvePath = NULL;
+ if (fileHandle < 0) {
+ return (-errno);
+ }
+ struct stat info = { 0 };
+ if (fstat(fileHandle, &info) != 0) {
+ close(fileHandle);
+ return ERROR_CODE_IO;
+ }
+ if (position >= info.st_size) {
+ close(fileHandle);
+ return ERROR_CODE_PARAM;
+ }
+ if (len == 0) {
+ len = info.st_size - position;
+ }
+ if (lseek(fileHandle, position, SEEK_SET) != position) {
+ close(fileHandle);
+ return ERROR_CODE_IO;
+ }
+ int readLen = read(fileHandle, text, len);
+ close(fileHandle);
+ *actualLen = readLen;
+ return (readLen < 0) ? ERROR_CODE_IO : NATIVE_SUCCESS;
+}
+
+int GetFileListImpl(const char* dirName, FileMetaInfo* fileList, unsigned int listNum)
+{
+ if (!IsValidPath(dirName) || (fileList == NULL)) {
+ return ERROR_CODE_PARAM;
+ }
+ int ret = ERROR_CODE_GENERAL;
+ DIR* fileDir = opendir(dirName);
+ if (fileDir == NULL) {
+ return ret;
+ }
+ int fileIndex = 0;
+ struct dirent* dir = readdir(fileDir);
+ struct stat fileStat = { 0 };
+ char* fullFileName = (char *)malloc(FILE_NAME_MAX_LEN + 1);
+ if (fullFileName == NULL) {
+ goto EXIT;
+ }
+ while ((dir != NULL) && (fileIndex < listNum)) {
+ if (strcmp(dir->d_name, ".") == 0 || strcmp(dir->d_name, "..") == 0) {
+ dir = readdir(fileDir);
+ continue;
+ }
+ if (memset_s(fullFileName, FILE_NAME_MAX_LEN + 1, 0x0, FILE_NAME_MAX_LEN + 1) != EOK) {
+ goto EXIT;
+ }
+ if (sprintf_s(fullFileName, FILE_NAME_MAX_LEN + 1, "%s/%s", dirName, dir->d_name) < 0) {
+ goto EXIT;
+ }
+ if (stat(fullFileName, &fileStat) != 0) {
+ goto EXIT;
+ }
+ if (strcpy_s(fileList[fileIndex].fileName, FILE_NAME_MAX_LEN + 1, fullFileName) != EOK) {
+ goto EXIT;
+ }
+ fileList[fileIndex].fileSize = fileStat.st_size;
+ fileList[fileIndex].fileMtime = fileStat.st_mtime;
+ fileList[fileIndex].fileMode = fileStat.st_mode;
+ fileIndex++;
+ dir = readdir(fileDir);
+ }
+ ret = NATIVE_SUCCESS;
+EXIT:
+ free(fullFileName);
+ closedir(fileDir);
+ return ret;
+}
+
+int GetFileNum(const char* dirName)
+{
+ int ret = AccessImpl(dirName);
+ if (ret != NATIVE_SUCCESS) {
+ return ret;
+ }
+ DIR* fileDir = opendir(dirName);
+ if (fileDir == NULL) {
+ return ERROR_CODE_PARAM;
+ }
+ struct dirent* dir = readdir(fileDir);
+ int sum = 0;
+ while (dir != NULL) {
+ if (strcmp(dir->d_name, ".") == 0 || strcmp(dir->d_name, "..") == 0) {
+ dir = readdir(fileDir);
+ continue;
+ }
+ sum++;
+ dir = readdir(fileDir);
+ }
+ closedir(fileDir);
+ return (sum == 0) ? ERROR_CODE_IO : sum;
+}
+
+int AccessImpl(const char* fileName)
+{
+ if (!IsValidPath(fileName)) {
+ return ERROR_CODE_PARAM;
+ }
+ if (access(fileName, F_OK) == F_OK) {
+ return NATIVE_SUCCESS;
+ }
+ return (-errno);
+}
+
+int CreateDirImpl(const char* fileName, bool recursive)
+{
+ if (!IsValidPath(fileName)) {
+ return ERROR_CODE_PARAM;
+ }
+ if (AccessImpl(fileName) == NATIVE_SUCCESS) {
+ return NATIVE_SUCCESS;
+ }
+ if (recursive) {
+ return MkdirRecursive(fileName);
+ }
+#if (defined _WIN32 || defined _WIN64)
+ int ret = mkdir(fileName);
+#else
+ int ret = mkdir(fileName, S_IRUSR | S_IWUSR | S_IXUSR);
+#endif
+ if (ret != NATIVE_SUCCESS) {
+ return (-errno);
+ }
+ return NATIVE_SUCCESS;
+}
+
+int RemoveDirImpl(const char* fileName, bool recursive)
+{
+ int ret = AccessImpl(fileName);
+ if (ret != NATIVE_SUCCESS) {
+ return ret;
+ }
+ if (recursive) {
+ return RmdirRecursive(fileName);
+ }
+ if (rmdir(fileName) != NATIVE_SUCCESS) {
+ return (-errno);
+ }
+ return NATIVE_SUCCESS;
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2020 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef JS_NATIVE_API_KV_H
+#define JS_NATIVE_API_KV_H
+
+#include "jsi/jsi.h"
+
+namespace OHOS {
+namespace ACELite {
+class NativeapiKv {
+public:
+ NativeapiKv() = default;
+ ~NativeapiKv() = default;
+
+ static JSIValue Get(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue Set(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue Delete(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+ static JSIValue Clear(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum);
+};
+} // ACELite
+} // OHOS
+#endif // JS_NATIVE_API_KV_H
\ No newline at end of file
-/* Copyright JS Foundation and other contributors, http://js.foundation
- *
+/*
+ * Copyright (c) 2020 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS
+ * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef JERRYX_DEBUGGER_H
-#define JERRYX_DEBUGGER_H
-
-#include "jerryscript.h"
-#include "jerryscript-debugger-transport.h"
+#ifndef JS_FS_KV_API_H
+#define JS_FS_KV_API_H
#ifdef __cplusplus
-extern "C"
-{
+#if __cplusplus
+extern "C" {
+#endif
#endif /* __cplusplus */
-void jerryx_debugger_after_connect (bool success);
+#define KEY_MAX_LEN 32
+#define VALUE_MAX_LEN 128
-/*
- * Message transmission interfaces.
- */
-bool jerryx_debugger_tcp_create (uint16_t port);
-bool jerryx_debugger_serial_create (const char *config);
-
-/*
- * Message encoding interfaces.
- */
-bool jerryx_debugger_ws_create (void);
-bool jerryx_debugger_rp_create (void);
+int InitKv(const char* dataPath);
+int GetValue(const char* key, char* value);
+int SetValue(const char* key, const char* value);
+int DeleteValue(const char* key);
+int ClearKVStore(const char* dataPath);
#ifdef __cplusplus
+#if __cplusplus
}
+#endif
#endif /* __cplusplus */
-#endif /* !JERRYX_HANDLER_H */
+
+#endif /* JS_FS_KV_API_H */
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright (c) 2020 Huawei Device Co., Ltd.\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include "nativeapi_kv.h"\r
+#include <securec.h>\r
+#include <new>\r
+#include "ace_log.h"\r
+#include "ability_env.h"\r
+#include "js_async_work.h"\r
+#include "nativeapi_common.h"\r
+#include "nativeapi_config.h"\r
+#include "nativeapi_kv_impl.h"\r
+\r
+namespace OHOS {\r
+namespace ACELite {\r
+namespace {\r
+char g_kvFullPath[FILE_NAME_MAX_LEN + 1] = {0};\r
+\r
+bool IsValidKey(const char* key)\r
+{\r
+ if (key == nullptr) {\r
+ return false;\r
+ }\r
+ size_t keyLen = strnlen(key, KEY_MAX_LEN + 1);\r
+ if ((keyLen == 0) || (keyLen > KEY_MAX_LEN)) {\r
+ return false;\r
+ }\r
+ if (strpbrk(key, "/\\\"*+,:;<=>\?[]|\x7F")) {\r
+ return false;\r
+ }\r
+ return true;\r
+}\r
+\r
+int GetFullPath(const char* dataPath, const char* key)\r
+{\r
+ if (!IsValidKey(key) || (dataPath == nullptr)) {\r
+ return ERROR_CODE_PARAM;\r
+ }\r
+ if (memset_s(g_kvFullPath, sizeof(g_kvFullPath), 0x0, sizeof(g_kvFullPath)) != EOK) {\r
+ return ERROR_CODE_GENERAL;\r
+ }\r
+ if (sprintf_s(g_kvFullPath, sizeof(g_kvFullPath), "%s/%s/%s", dataPath, DEFAULT_FOLDER_PATH, key) < 0) {\r
+ return ERROR_CODE_GENERAL;\r
+ }\r
+ return NATIVE_SUCCESS;\r
+}\r
+\r
+void GetDefault(const JSIValue thisVal, const JSIValue args)\r
+{\r
+ char* defaultValue = JSI::GetStringProperty(args, DEFAULT);\r
+ JSIValue result;\r
+ if (defaultValue == nullptr) {\r
+ result = JSI::CreateString("");\r
+ } else {\r
+ result = JSI::CreateString(defaultValue);\r
+ }\r
+ JSI::ReleaseString(defaultValue);\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, result);\r
+ JSI::ReleaseValue(result);\r
+}\r
+\r
+int GetValueInner(const char* dataPath, const char* key, char* value)\r
+{\r
+ int ret = GetFullPath(dataPath, key);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ return ret;\r
+ }\r
+ return GetValue(g_kvFullPath, value);\r
+}\r
+\r
+int SetValueInner(const char* dataPath, const char* key, const char* value)\r
+{\r
+ int ret = GetFullPath(dataPath, key);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ return ret;\r
+ }\r
+ return SetValue(g_kvFullPath, value);\r
+}\r
+\r
+int DeleteValueInner(const char* dataPath, const char* key)\r
+{\r
+ int ret = GetFullPath(dataPath, key);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ return ret;\r
+ }\r
+ return DeleteValue(g_kvFullPath);\r
+}\r
+\r
+JSIValue ExecuteAsyncWork(const JSIValue thisVal, const JSIValue* args,\r
+ uint8_t argsNum, AsyncWorkHandler ExecuteFunc, bool flag)\r
+{\r
+ JSIValue undefValue = JSI::CreateUndefined();\r
+ if (!NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
+ return undefValue;\r
+ }\r
+ FuncParams* params = new(std::nothrow) FuncParams();\r
+ if (params == nullptr) {\r
+ return undefValue;\r
+ }\r
+ params->thisVal = JSI::AcquireValue(thisVal);\r
+ params->args = JSI::AcquireValue(args[0]);\r
+ params->flag = flag;\r
+ JsAsyncWork::DispatchAsyncWork(ExecuteFunc, reinterpret_cast<void *>(params));\r
+ return undefValue;\r
+}\r
+\r
+void ExecuteGet(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ char* key = JSI::GetStringProperty(args, KV_KEY);\r
+ const char* dataPath = GetDataPath();\r
+ JSIValue result = JSI::CreateUndefined();\r
+ int ret = ERROR_CODE_GENERAL;\r
+ char* value = reinterpret_cast<char *>(malloc(VALUE_MAX_LEN + 1));\r
+ if (value == nullptr) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ ret = InitKv(dataPath);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ ret = GetValueInner(dataPath, key, value);\r
+ if (ret == ERROR_FR_NO_FILE) {\r
+ GetDefault(thisVal, args);\r
+ goto EXIT;\r
+ }\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ result = JSI::CreateString(value);\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, result);\r
+EXIT:\r
+ free(value);\r
+ JSI::ReleaseString(key);\r
+ JSI::ReleaseValueList(args, thisVal, result, ARGS_END);\r
+ delete params;\r
+}\r
+\r
+void ExecuteSet(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ char* key = JSI::GetStringProperty(args, KV_KEY);\r
+ char* value = JSI::GetStringProperty(args, KV_VALUE);\r
+ const char* dataPath = GetDataPath();\r
+ int ret = InitKv(dataPath);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ if ((key == nullptr) || !strlen(key)) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ERROR_CODE_PARAM);\r
+ goto EXIT;\r
+ }\r
+ if ((value == nullptr) || !strlen(value)) {\r
+ DeleteValueInner(dataPath, key);\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, JSI::CreateUndefined());\r
+ goto EXIT;\r
+ }\r
+ ret = SetValueInner(dataPath, key, value);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ goto EXIT;\r
+ }\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, JSI::CreateUndefined());\r
+EXIT:\r
+ JSI::ReleaseString(key);\r
+ JSI::ReleaseString(value);\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+}\r
+\r
+void ExecuteDelete(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ const char* dataPath = GetDataPath();\r
+ int ret = InitKv(dataPath);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+ return;\r
+ }\r
+ char* key = JSI::GetStringProperty(args, KV_KEY);\r
+ ret = DeleteValueInner(dataPath, key);\r
+ JSI::ReleaseString(key);\r
+ if ((ret < 0) && (ret != ERROR_FR_NO_FILE)) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+ return;\r
+ }\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, JSI::CreateUndefined());\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+}\r
+\r
+void ExecuteClear(void* data)\r
+{\r
+ FuncParams* params = reinterpret_cast<FuncParams *>(data);\r
+ if (params == nullptr) {\r
+ return;\r
+ }\r
+ JSIValue args = params->args;\r
+ JSIValue thisVal = params->thisVal;\r
+ const char* dataPath = GetDataPath();\r
+ int ret = InitKv(dataPath);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+ return;\r
+ }\r
+ ret = ClearKVStore(dataPath);\r
+ if (ret != NATIVE_SUCCESS) {\r
+ NativeapiCommon::FailCallBack(thisVal, args, ret);\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+ return;\r
+ }\r
+ NativeapiCommon::SuccessCallBack(thisVal, args, JSI::CreateUndefined());\r
+ JSI::ReleaseValueList(args, thisVal, ARGS_END);\r
+ delete params;\r
+}\r
+}\r
+\r
+void InitNativeApiKv(JSIValue exports)\r
+{\r
+ JSI::SetModuleAPI(exports, "get", NativeapiKv::Get);\r
+ JSI::SetModuleAPI(exports, "set", NativeapiKv::Set);\r
+ JSI::SetModuleAPI(exports, "delete", NativeapiKv::Delete);\r
+ JSI::SetModuleAPI(exports, "clear", NativeapiKv::Clear);\r
+}\r
+\r
+JSIValue NativeapiKv::Get(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteGet, false);\r
+}\r
+\r
+JSIValue NativeapiKv::Set(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteSet, false);\r
+}\r
+\r
+JSIValue NativeapiKv::Delete(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ return ExecuteAsyncWork(thisVal, args, argsNum, ExecuteDelete, false);\r
+}\r
+\r
+JSIValue NativeapiKv::Clear(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)\r
+{\r
+ JSIValue undefValue = JSI::CreateUndefined();\r
+ FuncParams* params = new(std::nothrow) FuncParams();\r
+ if (params == nullptr) {\r
+ return undefValue;\r
+ }\r
+ params->thisVal = JSI::AcquireValue(thisVal);\r
+ if (NativeapiCommon::IsValidJSIValue(args, argsNum)) {\r
+ params->args = JSI::AcquireValue(args[0]);\r
+ }\r
+ JsAsyncWork::DispatchAsyncWork(reinterpret_cast<AsyncWorkHandler>(ExecuteClear), reinterpret_cast<void *>(params));\r
+ return undefValue;\r
+}\r
+} // ACELite\r
+} // OHOS\r
--- /dev/null
+/*
+ * Copyright (c) 2020 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "nativeapi_kv_impl.h"
+#include <ctype.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <securec.h>
+#include <stdbool.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include "nativeapi_config.h"
+#if (defined _WIN32 || defined _WIN64)
+#include "shlwapi.h"
+#endif
+
+static char g_kvFolder[FILE_NAME_MAX_LEN + 1] = {0};
+
+static bool IsValidValue(const char* value)
+{
+ if (value == NULL) {
+ return false;
+ }
+ size_t valueLen = strnlen(value, VALUE_MAX_LEN + 1);
+ if ((valueLen == 0) || (valueLen > VALUE_MAX_LEN)) {
+ return false;
+ }
+ return true;
+}
+
+static int GetKvFolder(const char* dataPath)
+{
+ if (dataPath == NULL) {
+ return ERROR_CODE_PARAM;
+ }
+ if (memset_s(g_kvFolder, sizeof(g_kvFolder), 0x0, sizeof(g_kvFolder)) != EOK) {
+ return ERROR_CODE_GENERAL;
+ }
+ if (sprintf_s(g_kvFolder, sizeof(g_kvFolder), "%s/%s", dataPath, DEFAULT_FOLDER_PATH) < 0) {
+ return ERROR_CODE_GENERAL;
+ }
+ return NATIVE_SUCCESS;
+}
+
+static int GetRealPath(const char* originPath, char* trustPath, size_t tPathLen)
+{
+#if (defined _WIN32 || defined _WIN64)
+ if (PathCanonicalize(trustPath, originPath)) {
+ return NATIVE_SUCCESS;
+ }
+#else
+ if (realpath(originPath, trustPath) != NULL) {
+ return NATIVE_SUCCESS;
+ }
+#endif
+
+ if (errno == ENOENT) {
+ if (strncpy_s(trustPath, tPathLen, originPath, strlen(originPath)) == EOK) {
+ return NATIVE_SUCCESS;
+ }
+ }
+ return ERROR_CODE_GENERAL;
+}
+
+int InitKv(const char* dataPath)
+{
+ int ret = GetKvFolder(dataPath);
+ if (ret != NATIVE_SUCCESS) {
+ return ret;
+ }
+ if (access(g_kvFolder, F_OK) == F_OK) {
+ return NATIVE_SUCCESS;
+ }
+#if (defined _WIN32 || defined _WIN64)
+ if (mkdir(g_kvFolder) != 0) {
+ return ERROR_CODE_GENERAL;
+ }
+#else
+ if (mkdir(g_kvFolder, S_IRUSR | S_IWUSR | S_IXUSR) != 0) {
+ return ERROR_CODE_GENERAL;
+ }
+#endif
+ return NATIVE_SUCCESS;
+}
+
+int GetValue(const char* key, char* value)
+{
+ if ((key == NULL) || (value == NULL)) {
+ return ERROR_CODE_PARAM;
+ }
+ char* resolvePath = (char *)malloc(PATH_MAX);
+ if (resolvePath == NULL) {
+ return ERROR_CODE_GENERAL;
+ }
+ if (GetRealPath(key, resolvePath, PATH_MAX) != NATIVE_SUCCESS) {
+ free(resolvePath);
+ return ERROR_CODE_GENERAL;
+ }
+ int fileHandle = open(resolvePath, O_RDONLY, S_IRUSR);
+ free(resolvePath);
+ resolvePath = NULL;
+ if (fileHandle < 0) {
+ return (-errno);
+ }
+ int readLen = read(fileHandle, value, VALUE_MAX_LEN);
+ close(fileHandle);
+ fileHandle = -1;
+ if (readLen < 0) {
+ return ERROR_CODE_IO;
+ }
+ value[readLen] = '\0';
+ return NATIVE_SUCCESS;
+}
+
+int SetValue(const char* key, const char* value)
+{
+ if ((key == NULL) || (!IsValidValue(value))) {
+ return ERROR_CODE_PARAM;
+ }
+ char* resolvePath = (char *)malloc(PATH_MAX);
+ if (resolvePath == NULL) {
+ return ERROR_CODE_GENERAL;
+ }
+ if (GetRealPath(key, resolvePath, PATH_MAX) != NATIVE_SUCCESS) {
+ free(resolvePath);
+ return ERROR_CODE_GENERAL;
+ }
+ int fd = open(resolvePath, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
+ free(resolvePath);
+ resolvePath = NULL;
+ if (fd < 0) {
+ return (-errno);
+ }
+ int ret = write(fd, value, strlen(value));
+ close(fd);
+ return (ret < 0) ? ERROR_CODE_IO : NATIVE_SUCCESS;
+}
+
+int DeleteValue(const char* key)
+{
+ if (key == NULL) {
+ return ERROR_CODE_PARAM;
+ }
+ if (unlink(key) != NATIVE_SUCCESS) {
+ return (-errno);
+ }
+ return NATIVE_SUCCESS;
+}
+
+int ClearKVStore(const char* dataPath)
+{
+ int ret = GetKvFolder(dataPath);
+ if (ret != NATIVE_SUCCESS) {
+ return ret;
+ }
+ ret = ERROR_CODE_GENERAL;
+ DIR* fileDir = opendir(g_kvFolder);
+ if (fileDir == NULL) {
+ return ret;
+ }
+ struct dirent* dir = readdir(fileDir);
+ char* fullPath = (char *)malloc(FILE_NAME_MAX_LEN + 1);
+ if (fullPath == NULL) {
+ goto EXIT;
+ }
+ while (dir != NULL) {
+ if (strcmp(dir->d_name, ".") == 0 || strcmp(dir->d_name, "..") == 0) {
+ dir = readdir(fileDir);
+ continue;
+ }
+ if (memset_s(fullPath, FILE_NAME_MAX_LEN + 1, 0x0, FILE_NAME_MAX_LEN + 1) != EOK) {
+ goto EXIT;
+ }
+ if (sprintf_s(fullPath, FILE_NAME_MAX_LEN + 1, "%s/%s", g_kvFolder, dir->d_name) < 0) {
+ goto EXIT;
+ }
+ if (unlink(fullPath) != 0) {
+ goto EXIT;
+ }
+ dir = readdir(fileDir);
+ }
+ ret = NATIVE_SUCCESS;
+EXIT:
+ free(fullPath);
+ closedir(fileDir);
+ return ret;
+}
\ No newline at end of file
--- /dev/null
+usage: main.py [-h] [-file FILE] [-dir DIR] [-output OUTPUT]\r
+\r
+options:\r
+ -h, --help show this help message and exit\r
+ -file FILE, -f FILE The svg file need to be converted.\r
+ -dir DIR, -d DIR The directory needs to be converted.\r
+ -output OUTPUT output dir\r
+\r
+example:\r
+windows: python .\main.py -dir .\instance\analogue_dial\r
+windows: python .\main.py -dir .\instance\kaleidoscope_dial
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from enum import Enum\r
+from ctypes import *\r
+\r
+class Point(Structure):\r
+ _fields_ = [\r
+ ('x', c_short),\r
+ ('y', c_short),\r
+ ]\r
+\r
+class Rect(Structure):\r
+ _fields_ = [\r
+ ('x', c_short),\r
+ ('y', c_short),\r
+ ('w', c_ushort),\r
+ ('h', c_ushort)\r
+ ]\r
+\r
+class ColorStop(Structure):\r
+ _fields_ = [\r
+ ('stop', c_float),\r
+ ('color', c_uint),\r
+ ]
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import os\r
+import re\r
+import struct\r
+import ctypes\r
+from ctypes import *\r
+import xml.sax\r
+from enum import Enum\r
+import img_convert\r
+import video_convert\r
+from dial_static_img import DialStaticImg\r
+from dial_sequence_img import DialSequenceImg\r
+from dial_rotate_img import DialRotateImg\r
+from dial_option_img import DialOptionImg\r
+from dial_digital_img import DialDigitalImg\r
+from dial_label import DialLabel\r
+from dial_arc_label import DialArcLabel\r
+from dial_box_progress import DialBoxProgress\r
+from dial_arc_progress import DialArcProgress\r
+from dial_video import DialVideo\r
+from dial_click import DialClick\r
+from dial_kaleidoscope import DialKaleidoscope\r
+\r
+class DialHeader(Structure):\r
+ _fields_ = [\r
+ ('dialName', c_char * 16),\r
+ ('width', c_short),\r
+ ('height', c_short),\r
+ ('version', c_char * 16),\r
+ ('previewImgId', c_ushort),\r
+ ('description', c_char * 128),\r
+ ('imgoffset', c_uint),\r
+ ('period', c_ubyte),\r
+ ('dialViewCount', c_ubyte),\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.imgoffset = 0\r
+ self.dialViewCount = 0\r
+ self.period = 0\r
+ self.viewType = []\r
+ self.viewPt = []\r
+\r
+ def parse_attributes(self, attributes):\r
+ title = attributes["title"]\r
+ self.dialName = bytes(title, encoding = "utf8")\r
+\r
+ description = attributes["description"]\r
+ self.description = bytes(description, encoding = "utf8")\r
+\r
+ size = attributes["size"]\r
+ width,height = size.split(' ')\r
+ self.width = int(width)\r
+ self.height = int(height)\r
+\r
+ version = attributes["version"]\r
+ self.version = bytes(version, encoding = "utf8")\r
+\r
+ previewStr = attributes["preview_img"]\r
+ self.previewImgId = img_convert.instance.convert_img(previewStr)\r
+\r
+ for attr in attributes.getNames():\r
+ if attr == "tile_width":\r
+ tile_width = int(attributes["tile_width"])\r
+ img_conver.instance.set_tile_width(tile_width)\r
+\r
+ def add_view(self, viewObj, viewType):\r
+ self.viewPt.append(viewObj)\r
+ self.viewType.append(viewType)\r
+ self.dialViewCount += 1\r
+\r
+ def get_bytes(self):\r
+ ret = bytes(self)\r
+ for index in range(self.dialViewCount):\r
+ ret += struct.pack('@b', self.viewType[index])\r
+ return ret\r
+\r
+ def get_size(self):\r
+ return sizeof(self) + sizeof(c_ubyte) * self.dialViewCount\r
+\r
+class DialConvertTool(xml.sax.ContentHandler):\r
+ parser = xml.sax.make_parser()\r
+ DIAL_STATIC_IMG_TYPE = 0\r
+ DIAL_SEQUENCE_IMG_TYPE = 1\r
+ DIAL_ROTATE_IMG_TYPE = 2\r
+ DIAL_OPTION_IMG_TYPE = 3\r
+ DIAL_DIGITAL_IMG_TYPE = 4\r
+ DIAL_LABEL_TYPE = 5\r
+ DIAL_ARC_LABEL_TYPE = 6\r
+ DIAL_BOX_PROGRESS_TYPE = 7\r
+ DIAL_ARC_PROGRESS_TYPE = 8\r
+ DIAL_VIDEO_TYPE = 9\r
+ DIAL_CLICK_TYPE = 10\r
+ DIAL_KALEIDOSCCOPE_TYPE = 11\r
+\r
+ def __init__(self):\r
+ self.inFile = ""\r
+ self.outPath = ""\r
+ self.header = DialHeader()\r
+ self.parser.setFeature(xml.sax.handler.feature_namespaces, 0)\r
+ self.parser.setContentHandler(self)\r
+\r
+ def startElement(self, tag, attributes):\r
+ viewTypeArray = []\r
+ if tag == "dial":\r
+ self.header.parse_attributes(attributes)\r
+ elif tag == "static_img":\r
+ view = DialStaticImg()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_STATIC_IMG_TYPE)\r
+ elif tag == "sequence_img":\r
+ view = DialSequenceImg()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_SEQUENCE_IMG_TYPE)\r
+ elif tag == "rotate_img":\r
+ view = DialRotateImg()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_ROTATE_IMG_TYPE)\r
+ elif tag == "option_img":\r
+ view = DialOptionImg()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_OPTION_IMG_TYPE)\r
+ elif tag == "digital_img":\r
+ view = DialDigitalImg()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_DIGITAL_IMG_TYPE)\r
+ elif tag == "label":\r
+ view = DialLabel()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_LABEL_TYPE)\r
+ elif tag == "arc_label":\r
+ view = DialArcLabel()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_ARC_LABEL_TYPE)\r
+ elif tag == "box_progress":\r
+ view = DialBoxProgress()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_BOX_PROGRESS_TYPE)\r
+ elif tag == "arc_progress":\r
+ view = DialArcProgress()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_ARC_PROGRESS_TYPE)\r
+ elif tag == "video":\r
+ view = DialVideo()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_VIDEO_TYPE)\r
+ elif tag == "click":\r
+ view = DialClick()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_CLICK_TYPE)\r
+ elif tag == "kaleidoscope":\r
+ view = DialKaleidoscope()\r
+ view.parse_attributes(attributes)\r
+ self.header.add_view(view, self.DIAL_KALEIDOSCCOPE_TYPE)\r
+\r
+ def endElement(self, tag):\r
+ if tag == "dial":\r
+ # create & open dstfile\r
+ outputfile = self.outPath + "/" + os.path.basename(self.inFile)[:-3] + "bin"\r
+ fb = open(outputfile, 'wb')\r
+ os.chmod(outputfile, 0o0755)\r
+ self._write_data_to_bin(fb)\r
+ fb.close()\r
+\r
+ def convert_xml_to_output(self, inFile, outPath):\r
+ self.inFile = inFile\r
+ self.outPath = outPath\r
+ self.parser.parse(inFile)\r
+\r
+ def _write_data_to_bin(self, fb):\r
+ self.header.imgoffset += self.header.get_size()\r
+ for view in self.header.viewPt:\r
+ if self.header.period < view.period:\r
+ self.header.period = view.period\r
+ self.header.imgoffset += view.get_size()\r
+\r
+ fb.write(self.header.get_bytes())\r
+ for view in self.header.viewPt:\r
+ if isinstance(view, DialVideo):\r
+ view.offset += self.header.imgoffset + img_convert.instance.get_size()\r
+ fb.write(view.get_bytes())\r
+ img_convert.instance.write_data_to_bin(fb)\r
+ video_convert.instance.write_data_to_bin(fb)\r
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+from common_types import Point\r
+\r
+class DialArcLabel(Structure):\r
+ _fields_ = [\r
+ ('align', c_ubyte),\r
+ ('fontSize', c_ubyte),\r
+ ('center', Point),\r
+ ('radius', c_ushort),\r
+ ('rotateStart', c_short),\r
+ ('rotaeteEnd', c_short),\r
+ ('color', c_uint),\r
+ ('fontName', c_char * 64),\r
+ ('text', c_char * 64),\r
+ ('bindData', c_short),\r
+ ('isPeriod', c_bool)\r
+ ]\r
+ def __init__(self):\r
+ self.period = 0\r
+ self.isPeriod = False\r
+\r
+ def parse_attributes(self, attributes):\r
+ alignStr = attributes["align"]\r
+ if alignStr == "bottom":\r
+ self.align = 4\r
+ elif alignStr == "top":\r
+ self.align = 3\r
+ elif alignStr == "center":\r
+ self.align = 2\r
+ elif alignStr == "right":\r
+ self.align = 1\r
+ else:\r
+ self.align = 0\r
+\r
+ self.fontSize = int(attributes["font_size"])\r
+\r
+ x,y = attributes["center"].split(" ")\r
+ self.center.x = int(x)\r
+ self.center.y = int(y)\r
+\r
+ self.radius = int(attributes["radius"])\r
+ self.rotateStart = int(attributes["start_angle"])\r
+ self.rotaeteEnd = int(attributes["end_angle"])\r
+ self.color = int(attributes["color"], 16)\r
+ self.fontName = bytes(attributes["font"], encoding = "utf8")\r
+ self.text = bytes(attributes["text"], encoding = "utf8")\r
+ for attr in attributes.getNames():\r
+ if attr == "bind_data":\r
+ self.bindData = int(attributes["bind_data"])\r
+ elif attr == "period":\r
+ self.period = int(attributes["period"])\r
+ if self.period != 0:\r
+ self.isPeriod = True\r
+ if self.isPeriod != 0 and self.bindData == 0:\r
+ print("[ERROR]:[bind_data] is not set, [period] cannot be set")\r
+ sys.exit(1)\r
+\r
+ def get_bytes(self):\r
+ return bytes(self)\r
+\r
+ def get_size(self):\r
+ return sizeof(self)
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+from common_types import Rect\r
+from common_types import ColorStop\r
+import img_convert\r
+\r
+class ProgressUnion(Union):\r
+ _fields_ = [\r
+ ('stopCount', c_ubyte),\r
+ ('imgId', c_ushort),\r
+ ('color', c_uint),\r
+ ]\r
+\r
+class DialArcProgress(Structure):\r
+ _fields_ = [\r
+ ('cap', c_ubyte),\r
+ ('isPeriod', c_bool),\r
+ ('radius', c_ushort),\r
+ ('startAngle', c_ushort),\r
+ ('endAngle', c_ushort),\r
+ ('lineWidth', c_ushort),\r
+ ('bindData', c_short),\r
+ ('bgColor', c_uint),\r
+ ('type', c_ubyte),\r
+ ('rect', Rect),\r
+ ('unionValue', ProgressUnion)\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.stop = []\r
+ self.period = 0\r
+ self.isPeriod = False\r
+\r
+ def parse_attributes(self, attributes):\r
+ x,y,w,h = attributes["rect"].split(" ")\r
+ self.rect.x = int(x)\r
+ self.rect.y = int(y)\r
+ self.rect.w = int(w)\r
+ self.rect.h = int(h)\r
+\r
+ cap = attributes["cap_type"]\r
+ if cap == "round":\r
+ self.cap = 1\r
+ else:\r
+ self.cap = 0\r
+\r
+ self.radius = int(attributes["radius"])\r
+ self.startAngle = int(attributes["start_angle"])\r
+ self.endAngle = int(attributes["end_angle"])\r
+ self.lineWidth = int(attributes["line_width"])\r
+ self.bindData = int(attributes["bind_data"])\r
+\r
+ attrList = attributes.getNames()\r
+ for attr in attrList:\r
+ if attr == "img_name":\r
+ self.unionValue.imgId = img_convert.instance.convert_img(attributes["img_name"])\r
+ self.type = 0\r
+ break\r
+ elif attr == "color":\r
+ self.unionValue.color = int(attributes["color"], 16)\r
+ self.type = 1\r
+ break\r
+ elif attr == "gradient_colors":\r
+ self.type = 2\r
+ stopList = attributes["gradient_stops"].split(" ")\r
+ colorList = attributes["gradient_colors"].split(" ")\r
+ if len(stopList) != len(colorList):\r
+ print("[ERROR]:[gradient_stops] attr not equal [colorList] attr")\r
+ self.unionValue.stopCount = min(len(colorList), len(stopList))\r
+ for index in range(self.unionValue.stopCount):\r
+ colorStop = ColorStop()\r
+ colorStop.stop = float(stopList[index])\r
+ colorStop.color = int(colorList[index], 16)\r
+ self.stop.append(colorStop)\r
+ break\r
+\r
+ if "period" in attrList:\r
+ self.period = int(attributes["period"])\r
+ if (self.period != 0):\r
+ self.isPeriod = True\r
+\r
+ if "background_color" in attrList:\r
+ self.bgColor = int(attributes["background_color"], 16)\r
+\r
+ def get_bytes(self):\r
+ ret = bytes(self)\r
+ if self.type == 2:\r
+ for stop in self.stop:\r
+ ret += bytes(stop)\r
+ return ret\r
+\r
+ def get_size(self):\r
+ ret = sizeof(self)\r
+ if self.type == 2:\r
+ for stop in self.stop:\r
+ ret += sizeof(stop)\r
+ return ret
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+from common_types import Rect\r
+from common_types import ColorStop\r
+import img_convert\r
+\r
+class ProgressUnion(Union):\r
+ _fields_ = [\r
+ ('stopCount', c_ubyte),\r
+ ('imgId', c_ushort),\r
+ ('color', c_uint),\r
+ ]\r
+\r
+class DialBoxProgress(Structure):\r
+ _fields_ = [\r
+ ('cap', c_ubyte),\r
+ ('direction', c_ubyte),\r
+ ('isPeriod', c_bool),\r
+ ('bindData', c_short),\r
+ ('bgColor', c_uint),\r
+ ('type', c_ubyte),\r
+ ('rect', Rect),\r
+ ('unionValue', ProgressUnion)\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.stop = []\r
+ self.isPeriod = False\r
+ self.period = 0\r
+\r
+ def parse_attributes(self, attributes):\r
+ x,y,w,h = attributes["rect"].split(" ")\r
+ self.rect.x = int(x)\r
+ self.rect.y = int(y)\r
+ self.rect.w = int(w)\r
+ self.rect.h = int(h)\r
+\r
+ cap = attributes["cap_type"]\r
+ if cap == "round":\r
+ self.cap = 1\r
+ else:\r
+ self.cap = 0\r
+\r
+ direction = attributes["direction"]\r
+ if direction == "left_to_right":\r
+ self.direction = 0\r
+ elif direction == "right_to_left":\r
+ self.direction = 1\r
+ elif direction == "top_to_bottom":\r
+ self.direction = 2\r
+ elif direction == "bottom_to_top":\r
+ self.direction = 3\r
+\r
+ self.bindData = int(attributes["bind_data"])\r
+\r
+ attrList = attributes.getNames()\r
+ for attr in attrList:\r
+ if attr == "img_name":\r
+ self.unionValue.imgId = img_convert.instance.convert_img(attributes["img_name"])\r
+ self.type = 0\r
+ break\r
+ elif attr == "color":\r
+ self.unionValue.color = int(attributes["color"], 16)\r
+ self.type = 1\r
+ break\r
+ elif attr == "gradient_colors":\r
+ stopList = attributes["gradient_stops"].split(" ")\r
+ colorList = attributes["gradient_colors"].split(" ")\r
+ if len(stopList) != len(colorList):\r
+ print("[ERROR]:[gradient_stops] attr not equal [colorList] attr")\r
+ self.unionValue.stopCount = min(len(colorList), len(stopList))\r
+ for index in range(self.unionValue.stopCount):\r
+ colorStop = ColorStop()\r
+ colorStop.stop = float(stopList[index])\r
+ colorStop.color = int(colorList[index], 16)\r
+ self.stop.append(colorStop)\r
+ self.type = 2\r
+ break\r
+\r
+ if "period" in attrList:\r
+ self.period = int(attributes["period"])\r
+ if (self.period != 0) :\r
+ self.isPeriod = True\r
+ if "background_color" in attrList:\r
+ self.bgColor = int(attributes["background_color"], 16)\r
+\r
+ def get_bytes(self):\r
+ ret = bytes(self)\r
+ if self.type == 2:\r
+ for stop in self.stop:\r
+ ret += bytes(stop)\r
+ return ret\r
+\r
+ def get_size(self):\r
+ ret = sizeof(self)\r
+ if self.type == 2:\r
+ for stop in self.stop:\r
+ ret += sizeof(stop)\r
+ return ret
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+from common_types import Rect\r
+\r
+class ClickTypeUnion(Union):\r
+ _fields_ = [\r
+ ('sliceId', c_uint),\r
+ ('bundleName', c_char * 64)\r
+ ]\r
+\r
+class DialClick(Structure):\r
+ _fields_ = [\r
+ ('type', c_ubyte),\r
+ ('rect', Rect),\r
+ ('unionType', ClickTypeUnion),\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.period = 0\r
+\r
+ def parse_attributes(self, attributes):\r
+ x,y,w,h = attributes["rect"].split(" ")\r
+ self.rect.x = int(x)\r
+ self.rect.y = int(y)\r
+ self.rect.w = int(w)\r
+ self.rect.h = int(h)\r
+\r
+ for attr in attributes.getNames():\r
+ if attr == "action_slice":\r
+ self.unionType.sliceId = int(attributes["action_slice"])\r
+ self.type = 0\r
+ break\r
+ elif attr == "action_bundle":\r
+ self.unionType.bundleName = bytes(attributes["action_bundle"], encoding = "utf8")\r
+ self.type = 1\r
+ break\r
+\r
+ def get_bytes(self):\r
+ return bytes(self)\r
+\r
+ def get_size(self):\r
+ return sizeof(self)
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+from common_types import Point\r
+import img_convert\r
+\r
+class DialDigitalImg(Structure):\r
+ _fields_ = [\r
+ ('alignType', c_ubyte, 4),\r
+ ('integerLength', c_ubyte, 4),\r
+ ('decimalPrecision', c_ubyte),\r
+ ('imgIds', c_ushort * 10),\r
+ ('signImgId', c_ushort),\r
+ ('decimalPointImgId', c_ushort),\r
+ ('space', c_ushort),\r
+ ('alignPosition', Point),\r
+ ('bindData', c_short),\r
+ ('isPeriod', c_bool)\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.period = 0\r
+ self.isPeriod = False\r
+\r
+ def parse_attributes(self, attributes):\r
+ imgNames = attributes["img_names"].split(",")\r
+ length = len(imgNames)\r
+ if length < 10:\r
+ print("[ERR]:tag:[digital_img] attr[img_names] less than 10!")\r
+ sys.exit(1)\r
+ else:\r
+ for index in range(10):\r
+ self.imgIds[index] = img_convert.instance.convert_img(imgNames[index])\r
+\r
+ self.space = int(attributes["space"])\r
+ alignStr = attributes["align"]\r
+ if alignStr == "right":\r
+ self.alignType = 2\r
+ elif alignStr == "center":\r
+ self.alignType = 1\r
+ else:\r
+ self.alignType = 0\r
+ x,y = attributes["align_pos"].split(" ")\r
+ self.alignPosition.x = int(x)\r
+ self.alignPosition.y = int(y)\r
+ self.bindData = int(attributes["bind_data"])\r
+\r
+ for attr in attributes.getNames():\r
+ if attr == "sign_img_name":\r
+ signImgName = attributes["sign_img_name"]\r
+ self.signImgId = img_convert.instance.convert_img(signImgName)\r
+ elif attr == "integer_length":\r
+ self.integerLength = int(attributes["integer_length"])\r
+ elif attr == "img_decimal_point":\r
+ decimalPointImgName = attributes["img_decimal_point"]\r
+ self.decimalPointImgId = img_convert.instance.convert_img(decimalPointImgName)\r
+ elif attr == "decimal_precision":\r
+ self.decimalPrecision = int(attributes["decimal_precision"])\r
+ elif attr == "period":\r
+ self.period = int(attributes["period"])\r
+ if self.period != 0:\r
+ self.isPeriod = True\r
+\r
+ def get_bytes(self):\r
+ return bytes(self)\r
+\r
+ def get_size(self):\r
+ return sizeof(self)
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+import img_convert\r
+\r
+class DialKaleidoscope(Structure):\r
+ _fields_ = [\r
+ ('imgId', c_ushort),\r
+ ('rotateEventFactor', c_float),\r
+ ('rotateAnimatorValue', c_float)\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.imgId = 0\r
+ self.rotateEventFactor = 1.0\r
+ self.rotateAnimatorValue = 0.0\r
+ self.period = 0\r
+\r
+ def parse_attributes(self, attributes):\r
+ self.imgId = img_convert.instance.convert_img(attributes["img_name"])\r
+ for attr in attributes.getNames():\r
+ if attr == "crown_rotate_step":\r
+ self.rotateEventFactor = float(attributes["crown_rotate_step"])\r
+ elif attr == "animator_rotate_step":\r
+ self.rotateAnimatorValue = float(attributes["animator_rotate_step"])\r
+\r
+ def get_bytes(self):\r
+ return bytes(self)\r
+\r
+ def get_size(self):\r
+ return sizeof(self)\r
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+from common_types import Rect\r
+\r
+class DialLabel(Structure):\r
+ _fields_ = [\r
+ ('breakMode', c_ubyte),\r
+ ('align', c_ubyte),\r
+ ('fontSize', c_ubyte),\r
+ ('isPeriod', c_bool),\r
+ ('rect', Rect),\r
+ ('color', c_uint),\r
+ ('fontName', c_char * 64),\r
+ ('text', c_char * 64),\r
+ ('bindData', c_short)\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.period = 0\r
+ self.isPeriod = False\r
+\r
+ def parse_attributes(self, attributes):\r
+ x,y,w,h = attributes["rect"].split(" ")\r
+ self.rect.x = int(x)\r
+ self.rect.y = int(y)\r
+ self.rect.w = int(w)\r
+ self.rect.h = int(h)\r
+\r
+ mode = attributes["break_mode"]\r
+ if mode == "adapt":\r
+ self.breakMode = 0\r
+ elif mode == "stretch":\r
+ self.breakMode = 1\r
+ elif mode == "wrap":\r
+ self.breakMode = 2\r
+ elif mode == "ellipsis":\r
+ self.breakMode = 3\r
+ elif mode == "marquee":\r
+ self.breakMode = 4\r
+ elif mode == "clip":\r
+ self.breakMode = 5\r
+ else:\r
+ self.breakMode = 3\r
+ print("[WARING][label:break_mode]Incorrect input:", mode)\r
+\r
+ alignStr = attributes["align"]\r
+ if alignStr == "bottom":\r
+ self.align = 4\r
+ elif alignStr == "top":\r
+ self.align = 3\r
+ elif alignStr == "center":\r
+ self.align = 2\r
+ elif alignStr == "right":\r
+ self.align = 1\r
+ elif alignStr == "left":\r
+ self.align = 0\r
+ else:\r
+ self.align = 0\r
+ print("[WARING][label:align]Incorrect input:", alignStr)\r
+\r
+ self.fontSize = int(attributes["font_size"])\r
+ self.color = int(attributes["color"], 16)\r
+ self.fontName = bytes(attributes["font"], encoding = "utf8")\r
+ self.text = bytes(attributes["text"], encoding = "utf8")\r
+\r
+ for attr in attributes.getNames():\r
+ if attr == "bind_data":\r
+ self.bindData = int(attributes["bind_data"])\r
+ elif attr == "period":\r
+ self.period = int(attributes["period"])\r
+ if self.period != 0:\r
+ self.isPeriod = True\r
+ if self.isPeriod != 0 and self.bindData == 0:\r
+ print("[ERROR]:[bind_data] is not set, [period] cannot be set")\r
+ sys.exit(1)\r
+\r
+ def get_bytes(self):\r
+ return bytes(self)\r
+\r
+ def get_size(self):\r
+ return sizeof(self)
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+from common_types import Point\r
+import img_convert\r
+\r
+class DialOptionImg(Structure):\r
+ _fields_ = [\r
+ ('pos', Point),\r
+ ('bindData', c_short),\r
+ ('isPeriod', c_bool),\r
+ ('count', c_ubyte),\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.imgId = []\r
+ self.period = 0\r
+ self.isPeriod = False\r
+\r
+ def parse_attributes(self, attributes):\r
+ x,y = attributes["position"].split(" ")\r
+ self.pos.x = int(x)\r
+ self.pos.y = int(y)\r
+\r
+ self.bindData = int(attributes["bind_data"])\r
+\r
+ imgNames = attributes["img_names"].split(",")\r
+ self.count = len(imgNames)\r
+ for img in imgNames:\r
+ imgId = img_convert.instance.convert_img(img)\r
+ self.imgId.append(imgId)\r
+\r
+ if "period" in attributes.getNames():\r
+ self.period = int(attributes["period"])\r
+ if self.period != 0:\r
+ self.isPeriod = True\r
+\r
+ def get_bytes(self):\r
+ ret = bytes(self)\r
+ for index in range(self.count):\r
+ ret += struct.pack('@H', self.imgId[index])\r
+ return ret\r
+\r
+ def get_size(self):\r
+ return sizeof(self) + sizeof(c_ushort) * self.count
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+from common_types import Point\r
+import img_convert\r
+\r
+class DialRotateImg(Structure):\r
+ _fields_ = [\r
+ ('pos', Point),\r
+ ('center', Point),\r
+ ('rotateStart', c_short),\r
+ ('rotaeteEnd', c_short),\r
+ ('imgId', c_ushort),\r
+ ('bindData', c_short),\r
+ ('isPeriod', c_bool)\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.period = 0\r
+ self.isPeriod = False\r
+\r
+ def parse_attributes(self, attributes):\r
+ x,y = attributes["position"].split(" ")\r
+ self.pos.x = int(x)\r
+ self.pos.y = int(y)\r
+\r
+ x,y = attributes["rotate_center"].split(" ")\r
+ self.center.x = round(float(x))\r
+ self.center.y = round(float(y))\r
+\r
+ self.rotateStart = int(attributes["rotate_start"])\r
+ self.rotaeteEnd = int(attributes["rotate_end"])\r
+\r
+ self.bindData = int(attributes["bind_data"])\r
+\r
+ self.imgId = img_convert.instance.convert_img(attributes["img_name"])\r
+ if "period" in attributes.getNames():\r
+ self.period = int(attributes["period"])\r
+ if self.period != 0:\r
+ self.isPeriod = True\r
+\r
+ def get_bytes(self):\r
+ return bytes(self)\r
+\r
+ def get_size(self):\r
+ return sizeof(self)
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+from common_types import Point\r
+import img_convert\r
+\r
+class DialSequenceImg(Structure):\r
+ _fields_ = [\r
+ ('pos', Point),\r
+ ('interval', c_ushort),\r
+ ('repeat', c_bool),\r
+ ('imgNum', c_ubyte),\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.imgId = []\r
+ self.period = 0\r
+\r
+ def parse_attributes(self, attributes):\r
+ x,y = attributes["position"].split(" ")\r
+ self.pos.x = int(x)\r
+ self.pos.y = int(y)\r
+\r
+ if attributes["repeat"].lower() == "true":\r
+ self.repeat = True\r
+ elif attributes["repeat"].lower() == "false":\r
+ self.repeat = False\r
+\r
+ interval = int(attributes["interval"])\r
+ if interval < 0:\r
+ print("[ERROR]: [interval] attr less than 0")\r
+ sys.exit(1)\r
+ else:\r
+ self.interval = interval\r
+\r
+ imgNames = attributes["img_names"].split(",")\r
+ self.imgNum = len(imgNames)\r
+ for img in imgNames:\r
+ imgId = img_convert.instance.convert_img(img)\r
+ self.imgId.append(imgId)\r
+\r
+ def get_bytes(self):\r
+ ret = bytes(self)\r
+ for index in range(self.imgNum):\r
+ ret += struct.pack('@H', self.imgId[index])\r
+ return ret\r
+\r
+ def get_size(self):\r
+ return sizeof(self) + sizeof(c_ushort) * self.imgNum
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+from common_types import Point\r
+import img_convert\r
+\r
+class DialStaticImg(Structure):\r
+ _fields_ = [\r
+ ('pos', Point),\r
+ ('center', Point),\r
+ ('rotate', c_float),\r
+ ('imgId', c_ushort)\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.imgId = 0\r
+ self.pos.x = 0\r
+ self.pos.y = 0\r
+ self.center.x = 0\r
+ self.center.y = 0\r
+ self.rotate = 0.0\r
+ self.period = 0\r
+\r
+ def parse_attributes(self, attributes):\r
+ x,y = attributes["position"].split(" ")\r
+ self.pos.x = int(x)\r
+ self.pos.y = int(y)\r
+\r
+ self.imgId = img_convert.instance.convert_img(attributes["img_name"])\r
+\r
+ for attr in attributes.getNames():\r
+ if attr == "center":\r
+ x,y = attributes["center"].split(" ")\r
+ self.center.x = int(x)\r
+ self.center.y = int(y)\r
+ elif attr == "rotate":\r
+ self.rotate = float(attributes["rotate"])\r
+\r
+ def get_bytes(self):\r
+ return bytes(self)\r
+\r
+ def get_size(self):\r
+ return sizeof(self)\r
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+from xml.dom.minidom import parse\r
+from ctypes import *\r
+from common_types import Rect\r
+import video_convert\r
+import img_convert\r
+\r
+class DialVideo(Structure):\r
+ _fields_ = [\r
+ ('rect', Rect),\r
+ ('offset', c_uint),\r
+ ('colorKey', c_uint),\r
+ ('imgId', c_uint),\r
+ ]\r
+\r
+ def __init__(self):\r
+ self.period = 0\r
+\r
+ def parse_attributes(self, attributes):\r
+ x,y,w,h = attributes["rect"].split(" ")\r
+ self.rect.x = int(x)\r
+ self.rect.y = int(y)\r
+ self.rect.w = int(w)\r
+ self.rect.h = int(h)\r
+\r
+ self.colorKey = int(attributes["color_key"], 16)\r
+\r
+ self.offset = video_convert.instance.convert_video(attributes["source"])\r
+\r
+ self.imgId = img_convert.instance.convert_img(attributes["preview_frame"])\r
+\r
+ def get_bytes(self):\r
+ return bytes(self)\r
+\r
+ def get_size(self):\r
+ return sizeof(self)
\ No newline at end of file
--- /dev/null
+import base64\r
+from PIL import Image\r
+from io import BytesIO\r
+import cv2\r
+import ctypes\r
+from ctypes import *\r
+from PIL import Image\r
+\r
+import os\r
+import sys\r
+import struct\r
+import time\r
+import platform\r
+import numpy as np\r
+import pickle as p\r
+import requests\r
+import matplotlib.pyplot as pyplot\r
+\r
+global dll\r
+if platform.system().lower() == 'windows':\r
+ dll = ctypes.CDLL(r".\dll\x64\release_cs\ICE_V5R1_BLOCK_HTC.dll")\r
+elif platform.system().lower() == 'linux':\r
+ dll = ctypes.CDLL(sys.path[0] + r"/dll/linux_cs/libcodec.so")\r
+\r
+class Header(ctypes.Structure):\r
+ _fields_ = [\r
+ ("width", c_uint),\r
+ ("height", c_uint),\r
+ ("stride", c_uint),\r
+ ("pixel_format", c_uint),\r
+ ("tile_width", c_uint),\r
+ ("mode_alpha", c_uint),\r
+ ("mode_rgb", c_uint)\r
+ ]\r
+\r
+class BsData(ctypes.Structure):\r
+ _fields_ = [\r
+ ("bs_data", POINTER(c_ubyte)),\r
+ ("data_size", c_uint),\r
+ ("cmp_ratio", c_uint),\r
+ ("is_valid", c_uint),\r
+ ("subjective_review", c_uint),\r
+ ("para", Header)\r
+ ]\r
+\r
+class AutoCmpOutput(ctypes.Structure):\r
+ _fields_ = [\r
+ ("cmp_bs0", POINTER(BsData)),\r
+ ("cmp_bs1", POINTER(BsData)),\r
+ ("cmp_bs2", POINTER(BsData)),\r
+ ("cmp_bs3", POINTER(BsData)),\r
+ ("auto_cmp_mode", c_uint),\r
+ ("valid_bs_num", c_uint)\r
+ ]\r
+\r
+class CmpInput(ctypes.Structure):\r
+ _fields_ = [\r
+ ("width", c_uint),\r
+ ("height", c_uint),\r
+ ("stride", c_uint),\r
+ ("pixel_format", c_uint),\r
+ ("tile_width", c_uint),\r
+ ("mode_alpha", c_uint),\r
+ ("mode_rgb", c_uint),\r
+ ("red_channel", POINTER(c_ubyte)),\r
+ ("green_channel", POINTER(c_ubyte)),\r
+ ("blue_channel", POINTER(c_ubyte)),\r
+ ("alpha_channel", POINTER(c_ubyte))\r
+ ]\r
+\r
+class AutoCmpInput(ctypes.Structure):\r
+ _fields_ =[\r
+ ("auto_cmp_mode", c_uint),\r
+ ("high_quality_mode", c_uint),\r
+ ("high_cmp_ratio_mode", c_uint),\r
+ ("cmp_in", POINTER(CmpInput))\r
+ ]\r
+\r
+class BinHeader(ctypes.Structure):\r
+ _fields_ = [\r
+ ("dirId", c_uint),\r
+ ("count", c_uint)\r
+ ]\r
+\r
+class SeekInfo(ctypes.Structure):\r
+ _fields_ = [\r
+ ("offset", c_uint),\r
+ ("size", c_uint)\r
+ ]\r
+\r
+class ImageHeader(ctypes.Structure):\r
+ _fields_ = [\r
+ ("colorMode", c_uint, 8),\r
+ ("version", c_uint, 4),\r
+ ("compressMode", c_uint, 4),\r
+ ("reserved", c_uint, 16),\r
+ ("width", c_ushort),\r
+ ("height", c_ushort)\r
+ ]\r
+\r
+class ImageConverTool():\r
+ binHeader = BinHeader()\r
+ binHeader.dirId = 0xfef\r
+ seekInfo = []\r
+ imageHeader = []\r
+ imageData = []\r
+ imageNum = 0\r
+ isConvertedFile = []\r
+\r
+ def __init__(self):\r
+ self.markCurOffset = 0\r
+ self.width = 0\r
+ self.height = 0\r
+ self.file_alpha = False\r
+ self.cmp_mode = "HFBC"\r
+ self.color_fmt = ' '\r
+ self.align = 1\r
+ self.tile_width = 6\r
+ self.mode_alpha = 1\r
+ self.mode_rgb = 1\r
+ self.auto_cmp_mode = 0\r
+ self.high_quality_mode = 0\r
+ self.high_cmp_ratio_mode = 0\r
+ self.version = 1\r
+\r
+ def set_tile_width(self, tile_width):\r
+ if tile_width not in self.tile_width_support:\r
+ print("[ERROR]:The tile_width value is not supported.")\r
+ sys.exit(1)\r
+\r
+ self.tile_width = tile_width\r
+\r
+ def _convert(self):\r
+ width, height = self.image.size\r
+ self.width = width\r
+ self.height = height\r
+ self.stride_pixel = (self.width + self.align - 1) // self.align * self.align\r
+ if len(self.image.split()) > 3:\r
+ self.file_alpha = True\r
+ else:\r
+ self.file_alpha = False\r
+\r
+ # initialize CmpInput\r
+ cmp_input = CmpInput()\r
+ self._get_cmp_input(cmp_input)\r
+ auto_cmp_input = AutoCmpInput()\r
+ self._get_auto_cmp_input(auto_cmp_input, cmp_input)\r
+\r
+ # call GetBufferSize to get buffer size\r
+ # initialize CmpOutput\r
+ auto_cmp_output = AutoCmpOutput()\r
+\r
+ cmp_bs0 = BsData()\r
+ buf_size0 = dll.ice_v5r1_block_get_buffer_size(byref(cmp_input)) # 压缩后输出数据的大小\r
+ cmp_bs0.bs_data = (c_ubyte * buf_size0)()\r
+ auto_cmp_output.cmp_bs0 = ctypes.cast(pointer(cmp_bs0), POINTER(BsData))\r
+ ret = dll.ice_v5r1_block_htc_auto_cmp(byref(auto_cmp_input), byref(auto_cmp_output)) # 对输入数据进行压缩返回值是函数正常运行标志位\r
+\r
+ # add imageinfo to list\r
+ self.binHeader.count += 1\r
+\r
+ imageInfo = ImageHeader()\r
+ imageInfo.width = self.width\r
+ imageInfo.height = self.height\r
+ imageInfo.colorMode = self._get_color_mode()\r
+ imageInfo.version = 1\r
+ imageInfo.compressMode = 4\r
+ imageInfo.reserved = 0\r
+ seekInfo = SeekInfo()\r
+ seekInfo.offset = self.markCurOffset\r
+ seekInfo.size = sizeof(imageInfo) + cmp_bs0.data_size\r
+ self.markCurOffset += seekInfo.size\r
+ self.seekInfo.append(seekInfo)\r
+ self.imageHeader.append(imageInfo)\r
+ self.imageData.append(cmp_bs0)\r
+ self.imageNum += 1\r
+ return self.imageNum\r
+\r
+ def _check_path(self, path):\r
+ if not os.path.exists(path):\r
+ print("[ERROR]:", path, "is not exist")\r
+ return False\r
+ else:\r
+ if (not path[-3:].lower() == "png") and (not path[-3:].lower() == "jpg"):\r
+ print("[ERROR]:", path, "is not jpg or png format image")\r
+ return False\r
+ return True\r
+\r
+ def convert_img(self, path):\r
+ if path in self.isConvertedFile:\r
+ return self.isConvertedFile.index(path) + 1\r
+\r
+ if not self._check_path(path):\r
+ sys.exit(1)\r
+\r
+ self.image = Image.open(path)\r
+ if self.image.mode == 'RGBA':\r
+ self.color_fmt = 'ARGB8888'\r
+ elif self.image.mode == 'RGB':\r
+ self.color_fmt = 'RGB888'\r
+ self.isConvertedFile.append(path)\r
+ return self._convert()\r
+\r
+ def _get_cmp_px_format(self):\r
+ if self.color_fmt == 'RGB565':\r
+ return 2\r
+ elif self.color_fmt == 'RGB888':\r
+ return 0\r
+ elif self.color_fmt == 'ARGB8888':\r
+ return 1\r
+\r
+ def _get_color_mode(self):\r
+ if self.color_fmt == 'RGB565':\r
+ return 2\r
+ elif self.color_fmt == 'RGB888':\r
+ return 1\r
+ elif self.color_fmt == 'ARGB8888':\r
+ return 0\r
+\r
+ def _get_auto_cmp_input(self, auto_cmp_input, cmp_input):\r
+ auto_cmp_input.auto_cmp_mode = self.auto_cmp_mode\r
+ auto_cmp_input.high_quality_mode = self.high_quality_mode\r
+ auto_cmp_input.high_cmp_ratio_mode = self.high_cmp_ratio_mode\r
+ auto_cmp_input.cmp_in = ctypes.cast(pointer(cmp_input), POINTER(CmpInput))\r
+\r
+ def _get_cmp_input(self, cmp_input):\r
+ cmp_input.width = self.width\r
+ cmp_input.height = self.height\r
+ cmp_input.stride = self.width\r
+ cmp_input.tile_width = self.tile_width\r
+ cmp_input.mode_alpha = self.mode_alpha\r
+ cmp_input.mode_rgb = self.mode_rgb\r
+ cmp_input.pixel_format = self._get_cmp_px_format()\r
+ size = self.width * self.height\r
+ red = (c_ubyte * size)()\r
+ green = (c_ubyte * size)()\r
+ blue = (c_ubyte * size)()\r
+ alpha = (c_ubyte * size)()\r
+\r
+ for row in range(self.height):\r
+ for col in range(self.width):\r
+ position = row * self.width + col\r
+ red[position] = self.image.getdata()[position][0]\r
+ green[position] = self.image.getdata()[position][1]\r
+ blue[position] = self.image.getdata()[position][2]\r
+ if self.file_alpha == False:\r
+ alpha[position] = 0xFF\r
+ else:\r
+ alpha[position] = self.image.getdata()[position][3]\r
+ cmp_input.red_channel = red\r
+ cmp_input.green_channel = green\r
+ cmp_input.blue_channel = blue\r
+ cmp_input.alpha_channel = alpha\r
+\r
+ def write_data_to_bin(self, fb):\r
+ fb.write(bytes(self.binHeader))\r
+ for seek in self.seekInfo:\r
+ fb.write(bytes(seek))\r
+\r
+ for index in range(0, self.imageNum):\r
+ bt = bytearray()\r
+ color_fmt = self.imageHeader[index].colorMode\r
+ header = color_fmt + (self.imageHeader[index].width << 32) + \\r
+ (self.imageHeader[index].height << 48) + (self.imageHeader[index].version << 8)\r
+ header_bin = struct.pack("<Q", header)\r
+\r
+ if (self.cmp_mode == "HFBC"):\r
+ header = header + (4 << 12)\r
+ elif (self.cmp_mode == "HFBC_ABYPASS"):\r
+ header = header + (5 << 12)\r
+\r
+ header_bin = struct.pack("<Q", header)\r
+ bt += header_bin\r
+ for i in range(self.imageData[index].data_size):\r
+ bt += struct.pack("B", self.imageData[index].bs_data[i])\r
+ fb.writelines([bt])\r
+\r
+ def get_size(self):\r
+ ret = sizeof(self.binHeader)\r
+ ret += len(self.seekInfo) * sizeof(SeekInfo)\r
+ for index in range(0, self.imageNum):\r
+ bt = bytearray()\r
+ color_fmt = self._get_cmp_px_format()\r
+ header = color_fmt + (self.imageHeader[index].width << 32) + \\r
+ (self.imageHeader[index].height << 48) + (self.imageHeader[index].version << 8)\r
+ header_bin = struct.pack("<Q", header)\r
+\r
+ if (self.cmp_mode == "HFBC"):\r
+ header = header + (4 << 12)\r
+ elif (self.cmp_mode == "HFBC_ABYPASS"):\r
+ header = header + (5 << 12)\r
+\r
+ header_bin = struct.pack("<Q", header)\r
+ bt += header_bin\r
+ for i in range(self.imageData[index].data_size):\r
+ bt += struct.pack("B", self.imageData[index].bs_data[i])\r
+ ret += len(bt)\r
+ return ret\r
+\r
+instance = ImageConverTool()\r
--- /dev/null
+<dial title="clock" description="main clock" size="454 454" version="1.0" preview_img="./instance/analogue_dial/preview_img.JPG">\r
+ <static_img id="back_ground" position="0 0" img_name="./instance/analogue_dial/MAIN_FACE_IMAGE.png"></static_img>\r
+ <option_img position="207 127" img_names="./instance/analogue_dial/week/MONDAY_IMAGE_PATH.png,./instance/analogue_dial/week/TUESDAY_IMAGE_PATH.png,./instance/analogue_dial/week/WEDNESDAY_IMAGE_PATH.png,./instance/analogue_dial/week/THURSDAY_IMAGE_PATH.png,./instance/analogue_dial/week/FIRDAY_IMAGE_PATH.png,./instance/analogue_dial/week/SATURDAY_IMAGE_PATH.png,./instance/analogue_dial/week/SUNDAY_IMAGE_PATH.png" bind_data="17" period="10"></option_img>\r
+ <label id="step_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="100 230 75 35" text="%5.0f" font_size="25" align="center" bind_data="1" period="10"></label>\r
+ <static_img id="heart_rate" position="156 260" img_name="./instance/analogue_dial/HEARTRATE_IMAGE_PATH.png"></static_img>\r
+ <label id="heart_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="198 330 60 35" text="%3.0f" font_size="25" align="center" bind_data="2" period="10"></label>\r
+ <static_img id="progress" position="53 54" img_name="./instance/analogue_dial/PROGRESS_IMAGE_PATH.png"></static_img>\r
+ <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="315 230 60 35" text="%2.0f%%" font_size="25" align="center" bind_data="8" period="10"></label>\r
+ <rotate_img id="hour" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/analogue_dial/HOURHAND.png" bind_data="9" period="10"></rotate_img>\r
+ <static_img id="hour_circle" position="202 202" img_name="./instance/analogue_dial/BIGCIRCLE_IMAGE_PATH.png"></static_img>\r
+ <rotate_img id="minute" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/analogue_dial/MINUTEHAND.png" bind_data="10" period="10"></rotate_img>\r
+ <static_img id="minute_circle" position="202 202" img_name="./instance/analogue_dial/MEDCIRCLE_IMAGE_PATH.png"></static_img>\r
+ <rotate_img id="second" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/analogue_dial/SECONDHAND.png" bind_data="12" period="60"></rotate_img>\r
+ <static_img id="second_circle" position="215 213" img_name="./instance/analogue_dial/SMALLCIRCLE_IMAGE_PATH.png"></static_img>\r
+</dial>
\ No newline at end of file
--- /dev/null
+<dial title="kaleidoscope" description="kaleidoscope dial" size="454 454" version="1.0" preview_img="./instance/kaleidoscope_dial/preview_img.PNG">\r
+ <kaleidoscope id="kale" img_name="./instance/kaleidoscope_dial/rabbit454.png" crown_rotate_step="0.2" animator_rotate_step="0.1"></kaleidoscope>\r
+ <rotate_img id="hour" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/kaleidoscope_dial/HOURHAND.png" bind_data="9" period="10"></rotate_img>\r
+ <static_img id="hour_circle" position="202 202" img_name="./instance/kaleidoscope_dial/BIGCIRCLE_IMAGE_PATH.png"></static_img>\r
+ <rotate_img id="minute" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/kaleidoscope_dial/MINUTEHAND.png" bind_data="10" period="10"></rotate_img>\r
+ <static_img id="minute_circle" position="202 202" img_name="./instance/kaleidoscope_dial/MEDCIRCLE_IMAGE_PATH.png"></static_img>\r
+ <rotate_img id="second" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/kaleidoscope_dial/SECONDHAND.png" bind_data="12" period="60"></rotate_img>\r
+ <static_img id="second_circle" position="215 213" img_name="./instance/kaleidoscope_dial/SMALLCIRCLE_IMAGE_PATH.png"></static_img>\r
+</dial>
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+# 1\ 解析命令 python main.py -d [DIR] -o [OUT_DIR]\r
+# 2\ 循环执行svg解析写入\r
+import sys\r
+import os\r
+import argparse\r
+from converter import DialConvertTool\r
+\r
+def GetParameters():\r
+ parser = argparse.ArgumentParser()\r
+\r
+ parser.add_argument('-file', '-f', type=str, default='', required=False,\r
+ help='The svg file need to be converted.')\r
+\r
+ parser.add_argument('-dir', '-d', type=str, default='', required=False,\r
+ help='The directory needs to be converted.')\r
+\r
+ parser.add_argument('-output', type=str, default=os.getcwd() + "/out", required=False,\r
+ help='output dir')\r
+\r
+ config = parser.parse_args()\r
+ return config\r
+\r
+if __name__ == "__main__":\r
+ userInput = GetParameters()\r
+ outputPath = userInput.output\r
+ inputFile = userInput.file\r
+ inputDir = userInput.dir\r
+ # Create an output folder.\r
+ print("output dir : " + outputPath)\r
+ if not os.path.exists(outputPath):\r
+ os.mkdir(outputPath)\r
+\r
+ if not os.path.isdir(inputFile) and inputFile[-3:].lower() == "xml":\r
+ print("input file : " + inputFile)\r
+ converter = DialConvertTool()\r
+ converter.convert_xml_to_output(inputFile, outputPath)\r
+\r
+ files = os.listdir(inputDir)\r
+ print("input dir : " + inputDir)\r
+ for file in files:\r
+ if not os.path.isdir(file) and file[-3:].lower() == "xml":\r
+ converter = DialConvertTool()\r
+ converter.convert_xml_to_output(inputDir + "/" + file, outputPath)
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+import sys\r
+import struct\r
+import ctypes\r
+from ctypes import *\r
+\r
+class VideoConvertTool:\r
+ def __init__(self):\r
+ self.videoNum = 0\r
+ self.videoName = []\r
+ self.videoIndex = []\r
+ self.videoData = bytearray()\r
+\r
+ def convert_video(self, path):\r
+ if path in self.videoName:\r
+ index = self.videoName.index(path)\r
+ return self.videoIndex[index]\r
+ fp = open(path, 'rb')\r
+ data = fp.read()\r
+ fp.close()\r
+ self.videoName.append(path)\r
+ self.videoNum += 1\r
+ ret = len(self.videoData)\r
+ self.videoIndex.append(ret)\r
+ self.videoData += data\r
+ return ret\r
+\r
+ def write_data_to_bin(self, fb):\r
+ fb.write(self.videoData)\r
+\r
+instance = VideoConvertTool()\r
--- /dev/null
+新增video的预览帧功能。video标签新增属性 preview_frame。\r
+1、历史表盘有视频表盘需要重新用新工具生成。\r
+2、使用video标签实例如下\r
+<video id="video" rect="0 0 454 454" source="./instance/video_dial/demo.mp4" color_key="0xff212324" preview_frame="./instance/video_dial/video_frame.png"></video>
\ No newline at end of file