更新SDK到 patch_602_base_to_0521 ,只验证了nativeapp,fd230app 还未升级验证 189/target/1
authorSnickerSun <snickersun@163.com>
Tue, 28 May 2024 07:11:12 +0000 (15:11 +0800)
committerSnickerSun <snickersun@163.com>
Tue, 28 May 2024 07:11:12 +0000 (15:11 +0800)
1023 files changed:
SDK_1.1.10.522.txt [deleted file]
SDK_1.1.10.602.txt [new file with mode: 0644]
code/sdk/application/audio/vendor/CMakeLists.txt
code/sdk/application/audio/vendor/aw88166/config/aw88166/mono/16bit/aw883xx_acf.bin [new file with mode: 0644]
code/sdk/application/audio/vendor/aw88166/config/aw88166/mono/32bit/aw883xx_acf.bin [new file with mode: 0644]
code/sdk/application/audio/vendor/aw88166/config/aw88166/stereo/16bit/aw883xx_acf.bin [new file with mode: 0644]
code/sdk/application/audio/vendor/aw88166/config/aw88166/stereo/32bit/aw883xx_acf.bin [new file with mode: 0644]
code/sdk/application/brandy/brandy_recovery/main.c
code/sdk/application/brandy/brandy_standard/chip_init.c
code/sdk/application/brandy/brandy_standard/input_app.c
code/sdk/application/brandy/brandy_standard/thread_init.c
code/sdk/application/brandy/brandy_standard/thread_pri_init.c
code/sdk/application/wearable/CustomUIComponentTool/uicomponents/UIComponents.cpp
code/sdk/application/wearable/CustomUIComponentTool/uicomponents/UIComponents.h
code/sdk/application/wearable/alipay/service/CMakeLists.txt
code/sdk/application/wearable/alipay/service/alipay_bluetooth.c
code/sdk/application/wearable/alipay/service/alipay_feature.h
code/sdk/application/wearable/fd230app/CMakeLists.txt
code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/traing/Training_UiConfig.h
code/sdk/application/wearable/nativeabilityfwk/CMakeLists.txt
code/sdk/application/wearable/nativeabilityfwk/include/Ability.h
code/sdk/application/wearable/nativeabilityfwk/include/NativeAbility.h
code/sdk/application/wearable/nativeabilityfwk/include/SliceTransition.h
code/sdk/application/wearable/nativeabilityfwk/include/TransitionCallback.h
code/sdk/application/wearable/nativeabilityfwk/include/TransitionManager.h
code/sdk/application/wearable/nativeabilityfwk/include/TransitionType.h [new file with mode: 0644]
code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp
code/sdk/application/wearable/nativeabilityfwk/src/SliceTransition.cpp
code/sdk/application/wearable/nativeabilityfwk/src/TransitionManager.cpp
code/sdk/application/wearable/nativeabilityfwk/src/transition/BackToHexagonsTransition.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeabilityfwk/src/transition/BackToHexagonsTransition.h [new file with mode: 0644]
code/sdk/application/wearable/nativeabilityfwk/src/transition/HexagonsTransition.cpp [new file with mode: 0644]
code/sdk/application/wearable/nativeabilityfwk/src/transition/HexagonsTransition.h [new file with mode: 0644]
code/sdk/application/wearable/nativeabilityfwk/src/transition/ZoomTransition.cpp
code/sdk/application/wearable/nativeabilityfwk/src/transition/ZoomTransition.h
code/sdk/application/wearable/nativeapp/CMakeLists.txt
code/sdk/application/wearable/nativeapp/nativelauncher/include/slices/main/MainPresenter.h
code/sdk/application/wearable/nativeapp/nativelauncher/include/slices/main/MainView.h
code/sdk/application/wearable/nativeapp/nativelauncher/src/NativeLauncher.cpp
code/sdk/application/wearable/nativeapp/nativelauncher/src/slices/main/MainView.cpp
code/sdk/application/wearable/nativeapp/nativeui/activity/include/ActivityModel.h
code/sdk/application/wearable/nativeapp/nativeui/activity/include/ActivityPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/activity/include/ActivityWeekView.h
code/sdk/application/wearable/nativeapp/nativeui/activity/src/ActivityModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/activity/src/ActivityWeekView.cpp
code/sdk/application/wearable/nativeapp/nativeui/add_card/include/AddCardAdapter.h
code/sdk/application/wearable/nativeapp/nativeui/add_card/include/AddCardItem.h
code/sdk/application/wearable/nativeapp/nativeui/add_card/include/AddCardModel.h
code/sdk/application/wearable/nativeapp/nativeui/add_card/include/AddCardPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/add_card/include/AddCardView.h
code/sdk/application/wearable/nativeapp/nativeui/add_card/src/AddCardPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/add_card/src/AddCardView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/include/AlarmPopUpPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/alarm/include/AlarmPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/alarm/include/AlarmSetWeekView.h
code/sdk/application/wearable/nativeapp/nativeui/alarm/include/MainAlarmView.h
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmClockModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmCloseRingView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmConfigView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmMaxClock.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmNewTimeView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmPopUpPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmPopUpView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmRingView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmSetTimeView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/AlarmSetWeekView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarm/src/MainAlarmView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarmclockmanage/include/AlarmClockManage.h
code/sdk/application/wearable/nativeapp/nativeui/alarmclockmanage/src/AlarmClockManage.cpp
code/sdk/application/wearable/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBarCode.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBind.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBindAni.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBindRes.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayExitBind.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayHelp.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayList/AlipayListAdapter.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayList/AlipayListItemView.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayList/AlipayListView.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayMainView.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayModel.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayPayCode.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayRefreshBindCode.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipaySetting.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayGetTransList.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransAni.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransCode.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransEnable.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransListAdapter.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransListItemView.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransListView.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransRes.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayTrans/AlipayTransTips.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayUnbind.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayUnbindFinish.h
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayBarCode.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayBind.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayBindAni.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayBindRes.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayExitBind.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayHelp.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayList/AlipayListView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayMainView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayPayCode.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipaySetting.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayGetTransList.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransAni.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransCode.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransEnable.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransListView.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransRes.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayTrans/AlipayTransTips.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayUnbind.cpp
code/sdk/application/wearable/nativeapp/nativeui/alipay/src/AlipayUnbindFinish.cpp
code/sdk/application/wearable/nativeapp/nativeui/applist/include/AppItemView.h
code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistAdapter.h
code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistView.h
code/sdk/application/wearable/nativeapp/nativeui/applist/src/ApplistModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/applist/src/ApplistPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/applist/src/ApplistView.cpp
code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/include/BloodOxygenModel.h
code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/include/BloodOxygenPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/include/BloodOxygenView.h
code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/src/BloodOxygenPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/bloodoxygen/src/BloodOxygenView.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/include/BluetoothItemView.h
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/include/BluetoothModel.h
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/include/MainBluetoothView.h
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothCaseListAdapter.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothDeviceListView.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothEarPhoneView.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothHeadsetEvent.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothItemView.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothOptionsView.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/BluetoothPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/MainBluetoothView.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/TipsConnFailMessageView.cpp
code/sdk/application/wearable/nativeapp/nativeui/bluetooth/src/TipsSuccMessageView.cpp
code/sdk/application/wearable/nativeapp/nativeui/callerlog/include/CallerItemView.h
code/sdk/application/wearable/nativeapp/nativeui/callerlog/include/CallerLogModel.h
code/sdk/application/wearable/nativeapp/nativeui/callerlog/include/CallerLogPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/callerlog/include/CallerLogView.h
code/sdk/application/wearable/nativeapp/nativeui/callerlog/src/CallerItemView.cpp
code/sdk/application/wearable/nativeapp/nativeui/callerlog/src/CallerLogModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/callerlog/src/CallerLogPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/callerlog/src/CallerLogView.cpp
code/sdk/application/wearable/nativeapp/nativeui/clock/include/MainClockView.h
code/sdk/application/wearable/nativeapp/nativeui/clock/src/MainClockView.cpp
code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassCalibrationView.h
code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassControlView.h
code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassModel.h
code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassView.h
code/sdk/application/wearable/nativeapp/nativeui/compass/include/MainCompassPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/compass/include/MainCompassView.h
code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassCalibrationView.cpp
code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassControlView.cpp
code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassView.cpp
code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/include/ConnectPhonePresenter.h
code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectOpenView.cpp
code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectPhonePresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/connectnewphone/src/ConnectPhoneView.cpp
code/sdk/application/wearable/nativeapp/nativeui/heartrate/include/HeartModel.h
code/sdk/application/wearable/nativeapp/nativeui/heartrate/include/HeartRateView.h
code/sdk/application/wearable/nativeapp/nativeui/heartrate/src/HeartModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/heartrate/src/HeartRateView.cpp
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/CustomizationView.h
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/IndoorWalkModel.h
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/IndoorWalkMotionView.h
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/IndoorWalkPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/MotionPageFifth.h
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/MotionPageFirst.h
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/MotionPageFourth.h
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/MotionPageSecond.h
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/include/MotionPageThird.h
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/CustomizationView.cpp
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkEndView.cpp
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkPreparedView.cpp
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/IndoorWalkView.cpp
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/MotionPageFifth.cpp
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/MotionPageFirst.cpp
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/MotionPageFourth.cpp
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/MotionPageSecond.cpp
code/sdk/application/wearable/nativeapp/nativeui/indoorwalk/src/MotionPageThird.cpp
code/sdk/application/wearable/nativeapp/nativeui/key/src/KeyInputListener.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/include/AppGroupView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/DialBinTypes.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/HealthModel.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/MainModel.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/MainPresenterSample.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/MainViewSample.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/ModelListenerSample.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/PullUpDownView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/UiServersMsg.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/VolumeSettingPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/VolumeSettingView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialArcLabelView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialArcProgressView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialBaseModel.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialBoxProgressView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialDigitalImgView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialKaleidoscopeView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialLabelView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialModelHeartRate.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialModelPower.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialModelSteps.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialModelTime.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialOptionImgView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialRotateImgView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialSequenceImgView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialStaticImgView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialVideoView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialView.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/DialViewGroup.h
code/sdk/application/wearable/nativeapp/nativeui/main/include/dial/ModelDialDataFactory.h
code/sdk/application/wearable/nativeapp/nativeui/main/src/HealthModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/MainModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/MainPresenterSample.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/MainViewSample.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/ModelListenerSample.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/PresenterTask.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/VolumeSettingPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/VolumeSettingView.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialModelSteps.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialModelTime.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialVideoView.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/DialViewGroup.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/ModelDialDataFactory.cpp
code/sdk/application/wearable/nativeapp/nativeui/main/src/dial/parser/DialBinParser.cpp
code/sdk/application/wearable/nativeapp/nativeui/makephone/include/MainCallingPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/makephone/src/CallerDisplayView.cpp
code/sdk/application/wearable/nativeapp/nativeui/makephone/src/CallingView.cpp
code/sdk/application/wearable/nativeapp/nativeui/makephone/src/DialingScreenView.cpp
code/sdk/application/wearable/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/makephone/src/MainCallingView.cpp
code/sdk/application/wearable/nativeapp/nativeui/makephone/src/WaitingHintsView.cpp
code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/MainVocassistView.h
code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/include/VocassistView.h
code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/offlinevoice/src/VocassistView.cpp
code/sdk/application/wearable/nativeapp/nativeui/phoneservice/include/PhoneAudio.h
code/sdk/application/wearable/nativeapp/nativeui/phoneservice/include/PhoneService.h
code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneAudio.cpp
code/sdk/application/wearable/nativeapp/nativeui/phoneservice/src/PhoneService.cpp
code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersModel.h
code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersView.h
code/sdk/application/wearable/nativeapp/nativeui/player/src/BluetoothView.cpp
code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersCaseListAdapter.cpp
code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/player/src/PlayersView.cpp
code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/include/RebootModel.h
code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/RebootDeviceView.cpp
code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/RebootView.cpp
code/sdk/application/wearable/nativeapp/nativeui/rebootdevice/src/ShutdownDeviceView.cpp
code/sdk/application/wearable/nativeapp/nativeui/rtcservice/src/RtcService.cpp
code/sdk/application/wearable/nativeapp/nativeui/screennotify/include/ui_screennotify.h
code/sdk/application/wearable/nativeapp/nativeui/screennotify/src/ui_screennotify.cpp
code/sdk/application/wearable/nativeapp/nativeui/screensetting/src/ScreenModels.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_card/include/SetCardAdapter.h
code/sdk/application/wearable/nativeapp/nativeui/set_card/include/SetCardDeleteView.h
code/sdk/application/wearable/nativeapp/nativeui/set_card/include/SetCardItem.h
code/sdk/application/wearable/nativeapp/nativeui/set_card/include/SetCardNoCardView.h
code/sdk/application/wearable/nativeapp/nativeui/set_card/include/SetCardPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/set_card/include/SetCardView.h
code/sdk/application/wearable/nativeapp/nativeui/set_card/src/SetCardAdapter.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_card/src/SetCardItem.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_card/src/SetCardPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_card/src/SetCardView.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_desktop/include/SetDesktopModel.h
code/sdk/application/wearable/nativeapp/nativeui/set_desktop/include/SetDesktopPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/set_desktop/include/SetDesktopView.h
code/sdk/application/wearable/nativeapp/nativeui/set_desktop/src/SetDesktopModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_desktop/src/SetDesktopPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_dial/include/SetDialInfo.h
code/sdk/application/wearable/nativeapp/nativeui/set_dial/include/SetDialModel.h
code/sdk/application/wearable/nativeapp/nativeui/set_dial/include/SetDialPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/set_dial/include/SetDialView.h
code/sdk/application/wearable/nativeapp/nativeui/set_dial/src/SetDialModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_dial/src/SetDialPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/set_dial/src/SetDialView.cpp
code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingAdapter.h
code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingItemView.h
code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/settings/include/SettingView.h
code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingModel.cpp
code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/settings/src/SettingView.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempClickMea.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempContinueWarn.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempExitInter.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempExitPrompt.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempInitInter.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempJoinStudy.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempLittleTip.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempMainView.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempMeaProcess.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempMeasure.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempPresenter.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempPromptWear.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempRemindWear.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempReport.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempStudyAbout.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/include/TempWarn.h
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempClickMea.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempContinueWarn.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempExitInter.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempExitPrompt.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempInitInter.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempJoinStudy.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempLittleTip.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempMainView.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempMeaProcess.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempMeasure.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempPresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempPromptWear.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempRemindWear.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempReport.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempStudyAbout.cpp
code/sdk/application/wearable/nativeapp/nativeui/temperature/src/TempWarn.cpp
code/sdk/application/wearable/nativeapp/nativeui/uisample/include/UISampleModel.h
code/sdk/application/wearable/nativeapp/nativeui/uisample/include/UISamplePresenter.h
code/sdk/application/wearable/nativeapp/nativeui/uisample/include/UISampleView.h
code/sdk/application/wearable/nativeapp/nativeui/uisample/src/UISamplePresenter.cpp
code/sdk/application/wearable/nativeapp/nativeui/uisample/uitest/framework/src/ui_test_group.cpp
code/sdk/application/wearable/nativeapp/nativeui/uiservice/include/ui_service.h
code/sdk/application/wearable/nativeapp/nativeui/uiservice/src/ui_service.cpp
code/sdk/application/wearable/ohos_deps/wearable_log.h
code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp
code/sdk/application/wearable/service/broadcast/src/broadcast_feature.c
code/sdk/application/wearable/service/msg_center/CMakeLists.txt
code/sdk/application/wearable/service/msg_center/brandy-native-js/libmsg_center.a
code/sdk/application/wearable/service/msg_center/brandy-xts/libmsg_center.a
code/sdk/application/wearable/service/msg_center/include/msg_center.h
code/sdk/application/wearable/service/msg_center/include/msg_center_msg.h [new file with mode: 0644]
code/sdk/application/wearable/service/msg_center/include/msg_center_protocol.h
code/sdk/application/wearable/service/msg_center/include/notify/alarm_notification.h
code/sdk/application/wearable/service/msg_center/include/notify/makephone_notification.h
code/sdk/application/wearable/service/msg_center/include/notify/notification_manager.h
code/sdk/application/wearable/service/msg_center/include/vendor_app/baidu_app.h
code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_js_component.h [new file with mode: 0644]
code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_js_location.h [new file with mode: 0644]
code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_msg_center.h [new file with mode: 0644]
code/sdk/application/wearable/service/msg_center/libs/libbaidumapsdk.a [new file with mode: 0644]
code/sdk/application/wearable/service/msg_center/src/msg_center_cmd.cpp
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp
code/sdk/application/wearable/service/msg_center/src/notify/alarm_notification.cpp
code/sdk/application/wearable/service/msg_center/src/notify/drinkReminder_notification.cpp
code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp
code/sdk/application/wearable/service/msg_center/src/notify/notification_manager_customer.cpp
code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp
code/sdk/application/wearable/service/msg_center/src/notify/sedentaryReminder_notification.cpp
code/sdk/application/wearable/service/msg_center/src/vendor_app/baidu/baidu_app.cpp
code/sdk/application/wearable/service/power_manager/CMakeLists.txt
code/sdk/application/wearable/service/power_manager/include/power_display_service.h
code/sdk/application/wearable/service/power_manager/src/actions/display_action.c
code/sdk/application/wearable/service/power_manager/src/filters/gui_event_filter.c
code/sdk/application/wearable/service/power_manager/src/power_display_service.c
code/sdk/application/wstp/at_service/app/app_at_process.c
code/sdk/application/wstp/at_service/ohosfwk/ohosfwk_at_process.cpp
code/sdk/bootloader/flashboot/brandy/main.c
code/sdk/bootloader/flashboot/brandy/nandflash/hal_nandflash.c
code/sdk/bootloader/flashboot/brandy/nandflash/nandflash.c
code/sdk/bootloader/flashboot/brandy/nandflash/nandflash_qspi.c
code/sdk/build/cmake/build_component.cmake
code/sdk/build/config/target_config/brandy/config.py
code/sdk/build/config/target_config/brandy/nv_bin_cfg/mk_nv_bin_cfg_eng.json [moved from code/sdk/build/config/target_config/brandy/nv_bin_cfg/mk_nv_bin_cfg.json with 94% similarity, mode: 0644]
code/sdk/build/config/target_config/brandy/nv_bin_cfg/mk_nv_bin_cfg_user.json [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/target_config.py
code/sdk/build/config/target_config/common_config.py
code/sdk/build/script/cmake_builder.py
code/sdk/build/script/parse_tool/parse_elf.py
code/sdk/build/script/sdk_generator/sdk_generator.py
code/sdk/build/script/utils/build_utils.py
code/sdk/drivers/boards/brandy_evb/linker/standard/acore.prelds
code/sdk/drivers/boards/brandy_evb/memory_config/include/memory_config.h
code/sdk/drivers/chips/brandy/config/otp_map.h
code/sdk/drivers/chips/brandy/porting/button/CMakeLists.txt
code/sdk/drivers/chips/brandy/porting/include/efuse_porting.h
code/sdk/drivers/chips/brandy/porting/include/systick_porting.h
code/sdk/drivers/chips/brandy/porting/rtc_unified/CMakeLists.txt
code/sdk/drivers/chips/brandy/porting/security/efuse/CMakeLists.txt
code/sdk/drivers/chips/brandy/porting/security/efuse/efuse_porting.c
code/sdk/drivers/chips/brandy/porting/systick/systick_porting.c
code/sdk/drivers/drivers/driver/adc/CMakeLists.txt
code/sdk/drivers/drivers/driver/audio/source/core/common/share_mem/core_msg.c
code/sdk/drivers/drivers/driver/audio/source/include/sea_struct.h
code/sdk/drivers/drivers/driver/calendar/CMakeLists.txt
code/sdk/drivers/drivers/driver/efuse/CMakeLists.txt
code/sdk/drivers/drivers/driver/i2c/i2c.c
code/sdk/drivers/drivers/driver/nand_flash/nand/hal_nandflash.c
code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash.c
code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c
code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_qspi.c
code/sdk/drivers/drivers/driver/qspi_display/qspi_display.c
code/sdk/drivers/drivers/driver/rtc_unified/CMakeLists.txt
code/sdk/drivers/drivers/driver/rtc_unified/rtc.c
code/sdk/drivers/drivers/driver/systick/systick.c
code/sdk/drivers/drivers/hal/ipc/hal_ipc_old/hal_ipc.c
code/sdk/drivers/drivers/hal/ipc/hal_ipc_old/hal_ipc.h
code/sdk/drivers/drivers/hal/reboot/hal_reboot.c
code/sdk/drivers/drivers/hal/reboot/hal_reboot.h
code/sdk/drivers/drivers/hal/security/efuse/v100/hal_efuse_v100.c
code/sdk/drivers/peripheral/CMakeLists.txt
code/sdk/drivers/peripheral/config/CMakeLists.txt [new file with mode: 0644]
code/sdk/drivers/peripheral/config/ConfigModel.json [moved from code/sdk/application/wearable/fd230app/nativeui/config/ConfigModel.json with 100% similarity]
code/sdk/drivers/peripheral/config/include/ConfigModel.h [moved from code/sdk/application/wearable/fd230app/nativeui/config/include/ConfigModel.h with 99% similarity]
code/sdk/drivers/peripheral/config/include/ConfigModelC.h [moved from code/sdk/application/wearable/fd230app/nativeui/config/include/ConfigModelC.h with 100% similarity]
code/sdk/drivers/peripheral/config/src/ConfigModel.cpp [moved from code/sdk/application/wearable/fd230app/nativeui/config/src/ConfigModel.cpp with 99% similarity]
code/sdk/drivers/peripheral/slip/cat1Service/cat1_at_cmd.cpp
code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp
code/sdk/drivers/peripheral/slip/cat1Service/cat1_server_hal.cpp
code/sdk/drivers/peripheral/touch/ft6x46_touch/ft6x46_ctrl.c
code/sdk/drivers/peripheral/touch/tma525b_touch/tma525b_ctrl.c
code/sdk/drivers/peripheral/touch/ztw523_touch/ztw523_ctrl.c
code/sdk/drivers/peripheral/touch/ztw523_touch/ztw523_ctrl.h
code/sdk/drivers/peripheral/utils/custom_utils.c
code/sdk/include/middleware/services/bts/br/bts_br_gap.h
code/sdk/include/middleware/services/bts/common/bts_feature.h [new file with mode: 0644]
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/app_style.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/app_style_item.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/app_style_manager.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/appsys_bms_cmd.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/async_task_manager.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/btsrv_gatt_client.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/btsrv_gatt_server.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/btsv_l2cap_chan.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/connection_manager.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/descriptor_utils.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/dft_impl.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/dfx_assist.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/event_util.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/fatal_handler.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/gt_bundle_installer.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/gt_bundle_manager_service.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/image_cache_manager.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/js_ability.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/js_ability_impl.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/js_app_context.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/js_app_environment.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/js_debugger_config.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/js_fwk_common.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/js_page_state.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/js_page_state_machine.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/js_profiler.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/js_router.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/jsi.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/kaleidoscope_utils.cpp.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/lazy_load_manager.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/lite_m_gfx_engine.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/local_device_manager.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/locale_util.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/map_svg_parser.cpp.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/mem_util.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/number_parser.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/platform_adapter.cpp.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/remote_device_manager.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/sdk_general_gatt.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/stack_gap_if.c.xml
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_coverflow_view.cpp.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_hexagons_list.cpp.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_icosahedron_view.cpp.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_kaleidoscope_view.cpp.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_map_view.cpp.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_roller_view.cpp.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/audio/build_hso_cfg/hso_database/xml/base/dsp_core/core_msg.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hdb/hdbcfg/mss_prim_db.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/att_gatt.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/ble_core.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/ble_general.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/ble_general_gatt.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/bt_ahi_gap.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/bt_main.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/bt_mpc_adpt_gatt.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/bt_sleep.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/bt_tran_task.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/fsm.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/gap_hlp_comm.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/gap_hlp_le.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hci_core_ram.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hci_data_proc.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hci_ev_le.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hci_hlp_ram.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hci_link_br.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hci_link_le.c.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/ipc_irq.c.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/llc_bis_hci_ram.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/lld_per_ram.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/log_oml_exception.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/osdep.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_btdfx.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_bth.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_ea.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_ld_acl.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_llc.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_llc_bis_util.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_llc_llcp.c.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_lld_bis.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_lld_bis_evt.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_lld_bis_pdu.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_lld_evt.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_lld_pdu.c.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_llm_util.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/sdk_gap_conn_management.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/sdk_gatt.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/sdk_gatt_hlp.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/sdk_hfp.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/sdk_hlp.c.xml
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/smp_ui.c.xml [new file with mode: 0644]
code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/tladapter.c.xml
code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_audio_manager_wrapper.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_brandy_service.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_sdk.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_brandy_service.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_sdk.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_brandy_service.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_sdk.a
code/sdk/middleware/chips/brandy/dfx/CMakeLists.txt
code/sdk/middleware/chips/brandy/dfx/dfx_system_init.c
code/sdk/middleware/chips/brandy/dfx/include/dfx_adapt_layer.h
code/sdk/middleware/chips/brandy/dfx/include/log_def_app.h
code/sdk/middleware/chips/brandy/dfx/include/log_def_bth.h
code/sdk/middleware/chips/brandy/dfx/include/log_def_gui.h
code/sdk/middleware/chips/brandy/dfx/include/log_def_ohos.h
code/sdk/middleware/chips/brandy/dfx/include/log_def_pf.h
code/sdk/middleware/chips/brandy/dfx/include/zdiag_config.h
code/sdk/middleware/chips/brandy/dfx/mon_log_output.c [new file with mode: 0644]
code/sdk/middleware/chips/brandy/dfx/mon_log_output.h [new file with mode: 0644]
code/sdk/middleware/chips/brandy/dfx/zdiag_adapt_sdt.c
code/sdk/middleware/chips/brandy/exception/CMakeLists.txt
code/sdk/middleware/chips/brandy/exception/chip_exception_utils.c [new file with mode: 0644]
code/sdk/middleware/chips/brandy/exception/chip_exception_utils.h [new file with mode: 0644]
code/sdk/middleware/chips/brandy/exception/chip_system_time.c [new file with mode: 0644]
code/sdk/middleware/chips/brandy/exception/chip_system_time.h [new file with mode: 0644]
code/sdk/middleware/chips/brandy/exception/exception.h
code/sdk/middleware/chips/brandy/exception/exception_dump.c [new file with mode: 0644]
code/sdk/middleware/chips/brandy/exception/exception_dump.h [new file with mode: 0644]
code/sdk/middleware/chips/brandy/exception/exception_riscv.c
code/sdk/middleware/chips/brandy/nv/nv_config/cfg/eng/acore/app.json [moved from code/sdk/middleware/chips/brandy/nv/nv_config/cfg/acore/app.json with 86% similarity, mode: 0644]
code/sdk/middleware/chips/brandy/nv/nv_config/cfg/user/acore/app.json [new file with mode: 0644]
code/sdk/middleware/chips/brandy/pm/include/pm_definition.h
code/sdk/middleware/chips/brandy/pm/pm_adapt/pm_core.c
code/sdk/middleware/chips/brandy/pm/pm_adapt/pm_lp_stub.c
code/sdk/middleware/chips/brandy/pm/service/pm_sleep.c
code/sdk/middleware/chips/brandy/update/common/upg_common_porting.c
code/sdk/middleware/services/gpu/api/jpeg/src/soc_jpeg_api.c
code/sdk/middleware/services/gpu/api/vau/draw/vau_draw.c
code/sdk/middleware/services/gpu/drv/dpu/hal/dpu_hal.c
code/sdk/middleware/services/gpu/drv/dpu/intf/drv_dpu_intf.c
code/sdk/middleware/services/gpu/drv/dpu/isr/dpu_isr.c
code/sdk/middleware/services/gpu/drv/dpu/isr/dpu_isr.h
code/sdk/middleware/services/gpu/drv/dpu/layer/dpu_layer.c
code/sdk/middleware/services/gpu/drv/gmmu/intf/drv_gmmu_intf.c
code/sdk/middleware/services/gpu/drv/jpeg/dev/jpeg_dev.c
code/sdk/middleware/services/gpu/drv/jpeg/dev/jpeg_dev.h
code/sdk/middleware/services/gpu/drv/jpeg/dfx/jpeg_dfx.h
code/sdk/middleware/services/gpu/drv/jpeg/intf/drv_jpeg_intf.c
code/sdk/middleware/services/gpu/drv/jpeg/ioctl/jpeg_ioctl.c
code/sdk/middleware/services/gpu/drv/jpeg/isr/jpeg_isr.c
code/sdk/middleware/services/gpu/drv/jpeg/isr/jpeg_isr.h
code/sdk/middleware/services/gpu/drv/vau/dfx/vau_dfx.c
code/sdk/middleware/services/gpu/drv/vau/hal/vau_hal_apb.c
code/sdk/middleware/services/gpu/drv/vau/intf/drv_vau_intf.c
code/sdk/middleware/services/gpu/drv/vau/list/vau_list.c
code/sdk/middleware/services/gui/hal/display/CMakeLists.txt
code/sdk/middleware/services/gui/hal/display/brandy-native-js/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-target1/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-target3/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-target5/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-xts/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/src/display_gralloc.c
code/sdk/middleware/services/gui/hal/input/CMakeLists.txt
code/sdk/middleware/services/gui/uikit/CMakeLists.txt
code/sdk/middleware/services/gui/uikit/brandy-native-js/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/brandy-target3/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/brandy-xts/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/proprietary/include/common/graphic_utils.h [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/proprietary/include/common/image_cache_manager.h
code/sdk/middleware/services/gui/uikit/proprietary/include/common/lite_surface.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/card_swipe.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/kaleidoscope_utils.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_barcode.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_card_page.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_coverflow_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_cross_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_hexagons_list.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_icosahedron_view.h [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_kaleidoscope_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_list_ext.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_lite_surface_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_map_view.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_menu_item.h
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_roller_view.h [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_sweep_clock.h
code/sdk/middleware/services/gui/uikit/proprietary/include/service/graphic_service.h
code/sdk/middleware/services/gui/uikit/proprietary/include/service/graphic_service_wrapper.h
code/sdk/middleware/services/gui/uikit/proprietary/src/service/src/graphic_service_wrapper.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/common/lite_surface.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/common/low_power_manager.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/common/ui_barcode.cpp
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/ui_input_method.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_keyboard_button.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_lite_surface_view.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_menu_item.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_pinyin_candidate.cpp [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_soft_keyboard.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_sweep_clock.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_text_preview_box.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 [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext/ui_card_container.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/core/input_method_manager.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/dfx/dfx_cmd.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/dfx/dfx_record.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/engines/gfx/lite_m_gfx_engine.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/cube_effect.cpp [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/cube_effect.h [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/turn_page_effect.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/innerkits/input_method/ui_input_method.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/innerkits/input_method/ui_keyboard_codetable.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/innerkits/input_method/ui_pinyin_candidate.h [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/innerkits/input_method/ui_soft_keyboard.h
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/innerkits/input_method/ui_text_preview_box.h
code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/display_dev.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/gralloc_engines.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/mem_custom.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/utils/innerkits/hals/display_dev.h
code/sdk/middleware/services/gui/uikit/proprietary/src/utils/innerkits/hals/gralloc_engines.h
code/sdk/middleware/services/gui/uikit/res/panda_first.bin [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/res/pymb.bin [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/res/regular_hexagon.bin [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/res/regular_hexagon_inverse.bin [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/sample/CMakeLists.txt
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_clock_dial/ui_test_clock_dial.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_clock_dial/ui_test_clock_dial.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ui_test_coverflow.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_coverflow/ui_test_coverflow.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_cross/ui_test_cross.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_cube_rotate/cube_rotate_view.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_svg/ui_test_svg.h
code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_video_play/ui_test_video_play.cpp
code/sdk/middleware/services/gui/uikit/sample/uitest/framework/src/ui_test_group.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/common/input_device_manager.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_chart.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_image_animator.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_image_view.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_label.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_qrcode.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_swipe_view.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/components/ui_view.cpp
code/sdk/middleware/services/gui/uikit/ui/frameworks/dock/pointer_input_device.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/common/input_device_manager.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/root_view.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_image_view.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_swipe_view.h
code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/components/ui_view.h
code/sdk/middleware/services/gui/uikit/utils/interfaces/innerkits/graphic_config.h
code/sdk/middleware/services/gui/uikit/utils/interfaces/kits/gfx_utils/graphic_math.h
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audiomanager/cpp/audio_manager.cpp
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/policymanager/src/interrupt_manager.c
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/stream_manager.c
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audioservice/src/streammanager/src/track_handle.c
code/sdk/middleware/services/media/foundation/audiomanager/interfaces/kits/audiocommon/audio_base_type.h
code/sdk/middleware/services/media/foundation/audiomanager/interfaces/kits/audiomanager/cpp/audio_manager.h
code/sdk/middleware/services/media/foundation/player/frameworks/player_control/include/player_define.h
code/sdk/middleware/services/media/foundation/player/frameworks/player_control/player/liteplayer.cpp
code/sdk/middleware/services/media/foundation/player/frameworks/player_control/player/liteplayer.h
code/sdk/middleware/services/media/foundation/player/frameworks/player_control/sink/player_audio_sink.cpp
code/sdk/middleware/services/media/foundation/player/frameworks/player_control/sink/player_audio_sink.h
code/sdk/middleware/services/media/foundation/player/frameworks/player_control/sink/player_sink_manager.cpp
code/sdk/middleware/services/media/foundation/player/frameworks/player_control/sink/player_sink_manager.h
code/sdk/middleware/services/media/foundation/player/frameworks/player_impl.cpp
code/sdk/middleware/services/media/foundation/player/interfaces/kits/player_lite/js/builtin/include/audio_module.h
code/sdk/middleware/services/media/foundation/player/interfaces/kits/player_lite/js/builtin/include/audio_player.h
code/sdk/middleware/services/media/foundation/player/interfaces/kits/player_lite/js/builtin/src/audio_module.cpp
code/sdk/middleware/services/media/foundation/player/interfaces/kits/player_lite/js/builtin/src/audio_player.cpp
code/sdk/middleware/services/media/foundation/sample/wrapper/audio_capture_wrapper.cpp
code/sdk/middleware/services/media/foundation/sample/wrapper/camera_preview_sample_wrapper.cpp
code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.cpp
code/sdk/middleware/services/media/foundation/sample/wrapper/video_play_wrapper.h
code/sdk/middleware/services/media/foundation/sample/wrapper/video_player_sample_wrapper.cpp
code/sdk/middleware/services/media/hal/format/plugins/raw_demuxer/raw_format.c
code/sdk/middleware/services/media/hal/format/plugins/raw_demuxer/sbc_demuxer.c
code/sdk/middleware/services/media/hal/format/plugins/raw_demuxer/silk_demuxer.c
code/sdk/middleware/utils/dfx/CMakeLists.txt
code/sdk/middleware/utils/dfx/dfx_reboot/cpu_utils/private/cpu_utils.c
code/sdk/middleware/utils/dfx/dfx_reboot/reboot/shared/non_os_reboot.h
code/sdk/middleware/utils/dfx/diag/diag_cmd_router/diag_ind_src.c
code/sdk/middleware/utils/dfx/diag/include/diag_msg.h
code/sdk/middleware/utils/dfx/diag_dfx_cmd/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_audio_dump/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_audio_dump/zdiag_audio_dump.c
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_audio_probe/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_audio_proc/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_gpu_proc/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_nv/CMakeLists.txt
code/sdk/middleware/utils/dfx/diag_dfx_cmd/diag_update/CMakeLists.txt
code/sdk/middleware/utils/dfx/log/log.c
code/sdk/middleware/utils/dfx/log/log_oml_exception.c
code/sdk/middleware/utils/dfx/log_reader/private/log_uart.c
code/sdk/middleware/utils/dfx/preserve/private/preserve.c
code/sdk/middleware/utils/dfx/preserve/public/preserve.h
code/sdk/open_source/openharmony/CMakeLists.txt
code/sdk/open_source/openharmony/base/global/i18n_lite/CMakeLists.txt
code/sdk/open_source/openharmony/base/global/resmgr_lite/CMakeLists.txt
code/sdk/open_source/openharmony/base/security/permission/CMakeLists.txt
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/CMakeLists.txt
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/base/framework_min_bc.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/base/framework_min_js.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/base/keys.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js/libace.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-xts/libace.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/baidu_map_component.cpp [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/baidu_map_component.h [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/component_factory.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/text_component.cpp
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/text_component.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/context/js_ability_impl.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.h [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/display/display.cpp [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/display/display.h [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/ohos_module_config.h
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/app_data_module.cpp [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/app_data_module.h [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/CMakeLists.txt
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js/libbms.a
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-xts/libbms.a
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/bundlems/sign_mode.cpp [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/include/appexecfwk/appexecfwk_lite/services/bundlemgr_lite/include/gt_bundle_manager_service.h
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/include/appexecfwk/appexecfwk_lite/services/bundlemgr_lite/include/sign_mode.h [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/distributedschedule/samgr_lite/CMakeLists.txt
code/sdk/open_source/openharmony/foundation/multimedia/player/interfaces/kits/player_lite/js/builtin/include/audio_module.h
code/sdk/open_source/openharmony/foundation/multimedia/player/interfaces/kits/player_lite/js/builtin/include/audio_player.h
code/sdk/open_source/openharmony/third_party/jerryscript/CMakeLists.txt
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js/libjerryscript.a
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-xts/libjerryscript.a
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/api/generate-bytecode.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/generate-bytecode.h with 61% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/api/jerry-snapshot.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerry-snapshot.h with 100% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/config.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/config.h with 85% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/ecma/base/ecma-globals.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-globals.h with 82% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/include/jerryscript-compiler.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-compiler.h with 100% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/include/jerryscript-core.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-core.h with 89% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/include/jerryscript-debugger.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-debugger.h with 100% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/include/jerryscript-port.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-port.h with 99% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/include/jerryscript-snapshot.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-snapshot.h with 98% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/include/jerryscript.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript.h with 90% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/jmem/jmem.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jmem.h with 73% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/jrt/jrt-types.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt-types.h with 100% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/jrt/jrt.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt.h with 99% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/lit/lit-globals.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-globals.h with 100% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/lit/lit-magic-strings.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-magic-strings.h with 92% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-core/lit/lit-magic-strings.inc.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-magic-strings.inc.h with 81% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerry-ext/include/jerryscript-ext/handler.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/handler.h with 95% similarity, mode: 0644]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Config_Full.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Defaults.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product_stdlib.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product_string.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg-internal.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg.impl.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/byte-code.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/common.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/debugger.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-alloc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-array-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-arraybuffer-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-boolean-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array-iterator-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-arraybuffer-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-arraybuffer.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-boolean-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-boolean.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-dataview-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-dataview.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-date-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-date.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-error-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-error.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-evalerror-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-evalerror.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float32array-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float32array.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float64array-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float64array.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-function-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-function.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-global.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers-macro-defines.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers-macro-undefs.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int16array-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int16array.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int32array-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int32array.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int8array-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int8array.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-internal-routines-template.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-iterator-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-json.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map-iterator-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-math.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-number-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-number.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-object-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-object.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-promise-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-promise.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-rangeerror-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-rangeerror.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-referenceerror-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-referenceerror.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-regexp-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-regexp.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set-iterator-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string-iterator-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-symbol-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-symbol.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-syntaxerror-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-syntaxerror.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-type-error-thrower.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-helpers.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-prototype-template.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-template.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typeerror-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typeerror.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint16array-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint16array.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint32array-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint32array.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8array-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8array.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8clampedarray-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8clampedarray.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-urierror-prototype.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-urierror.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins-internal.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-comparison.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-container-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-conversion.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-dataview-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-eval.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-exceptions.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-function-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-gc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-helpers.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-init-finalize.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-iterator-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-jobqueue.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-lcache.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-lex-env.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-literal-storage.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-module.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-number-arithmetic.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-number-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects-arguments.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects-general.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-promise-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-property-hashmap.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-reference.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-regexp-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-string-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-symbol-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-try-catch-macro.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-typedarray-object.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jcontext.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-debugger-transport.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jmem-allocator-internal.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt-bit-fields.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt-libc-includes.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-lexer.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser-internal.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser-limits.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-scanner-internal.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-scanner.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-char-helpers.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-strings.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-unicode-conversions.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-unicode-ranges.inc.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/opcodes.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-bytecode.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-compiler.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-parser.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm-defines.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm-stack.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/arg-internal.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/debugger-sha1.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/handle-scope-internal.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/arg.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/arg.impl.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/autorelease.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/autorelease.impl.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/handle-scope.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/module.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jext-common.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrylibm/jerry-libm-internal.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrylibm/math.h [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryport/jerryscript-port-default.h [deleted file]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/CMakeLists.txt [new file with mode: 0644]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/common/include/nativeapi_common.h [new file with mode: 0644]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/common/include/nativeapi_config.h [new file with mode: 0644]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/common/src/nativeapi_common.cpp [new file with mode: 0644]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/include/nativeapi_fs.h [new file with mode: 0644]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/include/nativeapi_fs_impl.h [new file with mode: 0644]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs.cpp [new file with mode: 0644]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs_impl.cpp [new file with mode: 0644]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/kvstorekit/include/nativeapi_kv.h [new file with mode: 0644]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/kvstorekit/include/nativeapi_kv_impl.h [moved from code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/debugger.h with 53% similarity, mode: 0644]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/kvstorekit/src/nativeapi_kv.cpp [new file with mode: 0644]
code/sdk/open_source/openharmony/utils/native/lite/js/builtin/kvstorekit/src/nativeapi_kv_impl.cpp [new file with mode: 0644]
code/sdk/protocol/bt/host/bt/bts/brandy_service/service/src/base/local_device_manager.h
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/include/sample_ble_ams.h [new file with mode: 0644]
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/include/sample_ble_ancs.h [new file with mode: 0644]
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/src/CMakeLists.txt
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/src/sample_ble_ams.c [new file with mode: 0644]
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/src/sample_ble_ancs.c [new file with mode: 0644]
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/include/ble_ams_client.h [new file with mode: 0644]
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/include/ble_ancs_client.h [new file with mode: 0644]
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/include/ble_gatts_callbacks.h
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/CMakeLists.txt
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/ble_ams_client.c [new file with mode: 0644]
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/ble_ancs_client.c [new file with mode: 0644]
code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/ble_gatts_callbacks.c
code/sdk/protocol/bt/host/bt/bts/bt_sample/bt_core/sample_bts_gap.c
code/sdk/protocol/bt/host/bt/bts/bt_sample/bt_core/sample_bts_gatt.c
code/sdk/protocol/bt/host/bt/bts/bt_sample/bt_srv_shell.c
code/sdk/protocol/bt/host/bt/bts/sdk/inc/stack_api/stack_gap_if.h
code/sdk/tools/bin/ohos_tools/ace-loader/jerry-snapshot.exe [new file with mode: 0644]
code/sdk/tools/bin/ohos_tools/ace-loader/jerry.exe [new file with mode: 0644]
code/sdk/tools/pkg/bin/brandy/bt.bin
code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_main.bin
code/sdk/tools/pkg/bin/brandy/dsp/max/dsp_overlay.bin
code/sdk/tools/pkg/bin/brandy/dsp/mini/dsp_main.bin
code/sdk/tools/pkg/bin/brandy/dsp/mini/dsp_overlay.bin
code/sdk/tools/pkg/bin/brandy/dsp/normal/dsp_main.bin
code/sdk/tools/pkg/bin/brandy/dsp/normal/dsp_overlay.bin
code/sdk/tools/pkg/bin/brandy/ssb.bin
code/sdk/tools/pkg/chip_packet/brandy/packet.py
patch_602_base_to_0521.txt [new file with mode: 0644]
tools/ace-loader/jerry-snapshot.exe [new file with mode: 0644]
tools/ace-loader/jerry.exe [new file with mode: 0644]
tools/dial_converter_tool/README.txt [new file with mode: 0644]
tools/dial_converter_tool/common_types.py [new file with mode: 0644]
tools/dial_converter_tool/converter.py [new file with mode: 0644]
tools/dial_converter_tool/dial_arc_label.py [new file with mode: 0644]
tools/dial_converter_tool/dial_arc_progress.py [new file with mode: 0644]
tools/dial_converter_tool/dial_box_progress.py [new file with mode: 0644]
tools/dial_converter_tool/dial_click.py [new file with mode: 0644]
tools/dial_converter_tool/dial_digital_img.py [new file with mode: 0644]
tools/dial_converter_tool/dial_kaleidoscope.py [new file with mode: 0644]
tools/dial_converter_tool/dial_label.py [new file with mode: 0644]
tools/dial_converter_tool/dial_option_img.py [new file with mode: 0644]
tools/dial_converter_tool/dial_rotate_img.py [new file with mode: 0644]
tools/dial_converter_tool/dial_sequence_img.py [new file with mode: 0644]
tools/dial_converter_tool/dial_static_img.py [new file with mode: 0644]
tools/dial_converter_tool/dial_video.py [new file with mode: 0644]
tools/dial_converter_tool/dll/linux_cs/libcodec.so [new file with mode: 0644]
tools/dial_converter_tool/dll/linux_es/libcodec.so [new file with mode: 0644]
tools/dial_converter_tool/dll/x64/release_cs/ICE_V5R1_BLOCK_HTC.dll [new file with mode: 0644]
tools/dial_converter_tool/dll/x64/release_cs/ICE_V5R1_BLOCK_HTC.lib [new file with mode: 0644]
tools/dial_converter_tool/dll/x64/release_es/ICE_V5R1_BLOCK_HTC.dll [new file with mode: 0644]
tools/dial_converter_tool/dll/x64/release_es/ICE_V5R1_BLOCK_HTC.lib [new file with mode: 0644]
tools/dial_converter_tool/img_convert.py [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/BIGCIRCLE_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/HEARTRATE_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/HOURHAND.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/MAIN_FACE_IMAGE.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/MEDCIRCLE_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/MINUTEHAND.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/PROGRESS_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/SECONDHAND.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/SMALLCIRCLE_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/analogue_dial.xml [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/preview_img.JPG [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/week/FIRDAY_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/week/MONDAY_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/week/SATURDAY_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/week/SUNDAY_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/week/THURSDAY_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/week/TUESDAY_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/analogue_dial/week/WEDNESDAY_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/kaleidoscope_dial/BIGCIRCLE_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/kaleidoscope_dial/HOURHAND.png [new file with mode: 0644]
tools/dial_converter_tool/instance/kaleidoscope_dial/MEDCIRCLE_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/kaleidoscope_dial/MINUTEHAND.png [new file with mode: 0644]
tools/dial_converter_tool/instance/kaleidoscope_dial/SECONDHAND.png [new file with mode: 0644]
tools/dial_converter_tool/instance/kaleidoscope_dial/SMALLCIRCLE_IMAGE_PATH.png [new file with mode: 0644]
tools/dial_converter_tool/instance/kaleidoscope_dial/kaleidoscope_dial.xml [new file with mode: 0644]
tools/dial_converter_tool/instance/kaleidoscope_dial/preview_img.PNG [new file with mode: 0644]
tools/dial_converter_tool/instance/kaleidoscope_dial/rabbit454.png [new file with mode: 0644]
tools/dial_converter_tool/main.py [new file with mode: 0644]
tools/dial_converter_tool/video_convert.py [new file with mode: 0644]
tools/dial_converter_tool/视频表盘制作变更.txt [new file with mode: 0644]

diff --git a/SDK_1.1.10.522.txt b/SDK_1.1.10.522.txt
deleted file mode 100644 (file)
index 8b589cb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-SDK version:
-1.1.10.522
\ No newline at end of file
diff --git a/SDK_1.1.10.602.txt b/SDK_1.1.10.602.txt
new file mode 100644 (file)
index 0000000..a28a1c3
--- /dev/null
@@ -0,0 +1,3 @@
+SDK version:1.1.10.602
+
+
index c219547..f957679 100755 (executable)
@@ -69,3 +69,4 @@ set(COMPONENT_DEF
 )
 #===================================================================================
 include(${SAP_TOP_DIR}/build/cmake/audio_common.cmake)
+install_sdk(${CMAKE_CURRENT_SOURCE_DIR}/aw88166 "*")
diff --git a/code/sdk/application/audio/vendor/aw88166/config/aw88166/mono/16bit/aw883xx_acf.bin b/code/sdk/application/audio/vendor/aw88166/config/aw88166/mono/16bit/aw883xx_acf.bin
new file mode 100644 (file)
index 0000000..64b893a
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:06e21c25050a4d3a2ec8fefaca895819c29069419d6cbaaeec80be65ed44449c
+size 12960
diff --git a/code/sdk/application/audio/vendor/aw88166/config/aw88166/mono/32bit/aw883xx_acf.bin b/code/sdk/application/audio/vendor/aw88166/config/aw88166/mono/32bit/aw883xx_acf.bin
new file mode 100644 (file)
index 0000000..c35c186
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8c1322983afa5fa8e0eaea9b81440dd699e9ed3f9692669b4020e4b9a12e1f5e
+size 12960
diff --git a/code/sdk/application/audio/vendor/aw88166/config/aw88166/stereo/16bit/aw883xx_acf.bin b/code/sdk/application/audio/vendor/aw88166/config/aw88166/stereo/16bit/aw883xx_acf.bin
new file mode 100644 (file)
index 0000000..02fa3df
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8295817c2a752a835a6310d6e6b9da9987985e40bc8a147f6f3acc2de005594e
+size 25840
diff --git a/code/sdk/application/audio/vendor/aw88166/config/aw88166/stereo/32bit/aw883xx_acf.bin b/code/sdk/application/audio/vendor/aw88166/config/aw88166/stereo/32bit/aw883xx_acf.bin
new file mode 100644 (file)
index 0000000..4d6ea48
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:14090a51dd7eea5862b101ee8d01cfe6dcbf88d32b436b2e094de47a769aafe5
+size 25840
index c9a2b2b..3f761f3 100755 (executable)
@@ -279,7 +279,6 @@ static void chip_init(void)
 
     cpu_trace_enable_mcpu_repeat();
 
-    otp_init();
     uapi_pm_control(PM_SDIO_POWER_UP_AND_RUN);
 }
 
index 8de3e7b..bf42362 100755 (executable)
@@ -12,7 +12,6 @@
 #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
@@ -182,7 +181,6 @@ void chip_init(void)
 \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
index 49db40e..5fbbcdc 100755 (executable)
@@ -166,29 +166,23 @@ uint32_t button_close(void)
     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);
     }
 }
-void button_report_funckey_event_to_gui(int state)
-{
-    input_dev_data_t data;
 
-    if (g_button_event_cb != NULL) {
-        data.type = INDEV_TYPE_KEY;
-        data.keyId = INDEV_KEY_FUNC;
-        data.state = state; // 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;
 
@@ -201,18 +195,19 @@ static void button_report_event(event_button_t event)
             }
             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;
-                    
         case BUTTON1_PRESS:
-            button_report_funckey_event_to_gui(1);
+             button_report_event_to_gui(id, 1); // 1:press
             break;
         case BUTTON1_CLICKUP:
-            button_report_funckey_event_to_gui(0);
-            
+             button_report_event_to_gui(id, 0); // 0:release
         default:
             break;
     }
@@ -300,7 +295,7 @@ static void button_send_event_to_ui(button_id_t id, button_report_state_t state)
     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]();
index 5aecd9e..d3868bd 100755 (executable)
 #include "pm_sleep.h"
 #include "pm_lpc.h"
 #include "pm_control.h"
-#include "upg.h"
-#include "upg_definitions.h"
-#include "nv.h"
 #include "dfx_system_init.h"
 #include "cpu_load.h"
-#include "nv_upg.h"
 
 #ifdef SUPPORT_AT_CMD
 #include "at_cmd_api.h"
 #ifdef SUPPORT_MEDIA_AUDIO_MANAGER
 #include "audio_manager_c_wrapper.h"
 #endif
-
-#ifdef CONFIG_OTA_UPDATE_SUPPORT
-#include "graphic_service_wrapper.h"
-#endif
 #include "clocks_config.h"
 #include "sys/time.h"
 #include "time.h"
+#include "log_panic.h"
+#include "nandflash_config.h"
 
 #define EMMC_BASE_ADDR              0x52062000
 
@@ -92,6 +86,7 @@
 #define TASK_PRIORITY_SDK           (osPriority_t)(31)
 #define TASK_PRIORITY_DFX_MSG       (osPriority_t)(18)
 #define TASK_PRIORITY_TRANSMIT      (osPriority_t)(20)
+#define TASK_PRIORITY_SAVE_FILE     (osPriority_t)(36)
 
 #define BTH_SDK_STACK_SIZE          0xC00
 #define AT_GRAPHIC_STACK_SIZE       0xC00
 #define PM_DISPLAY_MSG_STACK_SIZE   0xc00
 #define AT_OHOSFWK_STACK_SIZE       0xC00
 #define APP_MAIN_STACK_SIZE         0xC00
-
-#define UPG_HEAD_MAGIC              0x55AA55AA
-#define UPG_END_MAGIC               0xAA55AA55
-#define UPG_FLAG_MAGIC              0xFFFFFFFF
+#define SAVE_FILE_STACK_SIZE        0xC00
 
 #define TIME_MAX                64
 #define USEC_TO_MILLI           1000
@@ -124,6 +116,8 @@ void system_time_cali(void);
 #ifdef SUPPORT_32K_MEAS
 void uapi_32k_systick_measurements(void);
 #endif
+osSemaphoreId_t g_semaphore_save = NULL;
+void save_file_main(void);
 
 static uint32_t g_app_delay_ms = TASK_COMMON_APP_DELAY_MS;
 app_task_definition_t g_app_tasks[] = {
@@ -180,8 +174,41 @@ app_task_definition_t g_app_tasks[] = {
       (osThreadFunc_t)power_display_msg_thread, NULL,
       (CreateQueueFunction_t)power_display_task_init, USE_DTCM_MEM },
 #endif
+    { { "save_file", 0, NULL, 0, NULL, SAVE_FILE_STACK_SIZE, TASK_PRIORITY_SAVE_FILE, 0, 0 },
+      (osThreadFunc_t)save_file_main, NULL, NULL, USE_EXTEND_MEM },
 };
 
+osSemaphoreId_t get_save_file_semaphore(void)
+{
+    return g_semaphore_save;
+}
+
+void save_file_main(void)
+{
+    g_semaphore_save = osSemaphoreNew(1, 0, NULL);
+    if (!g_semaphore_save) {
+        panic(PANIC_LOG, LOG_PANIC_MUTEX_NOT_READY);
+        return;
+    }
+    for (;;) {
+        // If there has been log indicator get run again
+        if (osKernelGetState() == osKernelRunning) {
+            if (osSemaphoreAcquire(g_semaphore_save, osWaitForever) != osOK) {
+                panic(PANIC_LOG, LOG_PANIC_MUTEX_NOT_READY);
+            }
+            nand_driver_init(SPEED_SLOW);
+            set_trans_type(TRANS_BY_CPU_SINGLE_LINE);
+#if defined SAVE_EXC_INFO
+            save_preserve_file_to_nand();
+            save_btram_file_to_nand();
+            save_btrace_file_to_nand();
+#endif
+            hal_reboot_chip();
+        }
+        osDelay(1000);
+    }
+}
+
 void set_app_delay_time(uint32_t time)
 {
     g_app_delay_ms = time;
@@ -246,51 +273,6 @@ static void print_system_sleep_info(void)
 #endif
 }
 
-#ifdef CONFIG_OTA_UPDATE_SUPPORT
-
-bool upg_check_upgrade_need_upgrade(void)
-{
-
-    uint32_t fota_address = 0;
-    errcode_t ret_val = (errcode_t)upg_get_upgrade_flag_flash_start_addr(&fota_address);
-    if (ret_val != ERRCODE_SUCC) {
-        return false;
-    }
-
-    fota_upgrade_flag_area_t upg_flag_info;
-    ret_val = (errcode_t)upg_flash_read(fota_address, sizeof(fota_upgrade_flag_area_t), (uint8_t *)(&upg_flag_info));
-    if (ret_val != ERRCODE_SUCC) {
-        return false;
-    }
-
-    if (!(upg_flag_info.head_magic == UPG_HEAD_MAGIC &&
-          upg_flag_info.head_end_magic == UPG_END_MAGIC &&
-          upg_flag_info.complete_flag == UPG_FLAG_MAGIC)) {
-        /* 不需要升级直接返回 */
-        PRINT("No need to upgrade...\r\n");
-        return false;
-    }
-    return true;
-}
-static void upg_check_upgrade(void)
-{
-    
-    errcode_t ret_val ;
-    if (upg_check_upgrade_need_upgrade() == false)
-    {
-        return ;
-    }    
-    PRINT("upgrading.......\r\n");
-    ret_val = uapi_upg_start();
-    if (ret_val != ERRCODE_SUCC) {
-        PRINT("upgrade failed, ret = 0x%x\r\n", ret_val);
-    } else {
-        PRINT("upgrade success\r\n");
-    }
-    upg_reboot();
-}
-#endif
-
 #ifdef SUPPORT_32K_MEAS
 /* 使用32M tcxo 测量 systick的32K频率值 */
 void uapi_32k_systick_measurements(void)
@@ -327,12 +309,7 @@ void system_time_cali(void)
 static void app_main(const void *unused)
 {
     unused(unused);
-#ifdef CONFIG_OTA_UPDATE_SUPPORT
-    upg_check_upgrade();
-#endif
     dfx_set_log_enable();
-    /* nv init and file system init must be before nv_upg_upgrade_task_process */
-    (void)nv_upg_upgrade_task_process();
 #ifdef SUPPORT_MEDIA_AUDIO_MANAGER
     bool success = AudioManagerInit();
     PRINT("audio manager init %s\r\n", success ? "ok" : "error");
index 7826e08..ea69e47 100755 (executable)
 #ifdef SUPPORT_AT_OHOSFWK\r
 #include "ohosfwk_startup.h"\r
 #endif\r
+\r
+#ifdef CONFIG_OTA_UPDATE_SUPPORT\r
+#include "graphic_service_wrapper.h"\r
+#include "upg_definitions.h"\r
+#endif\r
+\r
 #ifdef SUPPORT_AT_VIBRATOR\r
 #include "vibrator_service.h"\r
 #endif\r
 #define TASK_PRIORITY_APP           (osPriority_t)(17)\r
 #define TICK_TEN_MS                 (10U)\r
 #define WAIT_BT_BOOTUP_TIME         200U\r
+#define UPG_HEAD_MAGIC              0x55AA55AA\r
+#define UPG_END_MAGIC               0xAA55AA55\r
+#define UPG_FLAG_MAGIC              0xFFFFFFFF\r
 \r
 static void thread_main(const void *unused);\r
 void bt_acore_btc_ipc_receive_init(void);\r
@@ -286,6 +295,51 @@ static void force_to_sleep(void)
     }\r
 }\r
 \r
+#ifdef CONFIG_OTA_UPDATE_SUPPORT\r
+\r
+\r
+bool upg_check_upgrade_need_upgrade(void)\r
+{\r
+       uint32_t fota_address = 0;\r
+    errcode_t ret_val = (errcode_t)upg_get_upgrade_flag_flash_start_addr(&fota_address);\r
+    if (ret_val != ERRCODE_SUCC) {\r
+        return false;\r
+    }\r
+\r
+    fota_upgrade_flag_area_t upg_flag_info;\r
+    ret_val = (errcode_t)upg_flash_read(fota_address, sizeof(fota_upgrade_flag_area_t), (uint8_t *)(&upg_flag_info));\r
+    if (ret_val != ERRCODE_SUCC) {\r
+        return false;\r
+    }\r
+\r
+    if (!(upg_flag_info.head_magic == UPG_HEAD_MAGIC &&\r
+          upg_flag_info.head_end_magic == UPG_END_MAGIC &&\r
+          upg_flag_info.complete_flag == UPG_FLAG_MAGIC)) {\r
+        /* 不需要升级直接返回 */\r
+        PRINT("No need to upgrade...\r\n");\r
+        return false;\r
+    }\r
+       return true;\r
+}\r
+static void upg_check_upgrade(void)\r
+{\r
+    errcode_t ret_val ;\r
+    if (upg_check_upgrade_need_upgrade() == false)\r
+    {\r
+        return ;\r
+    }    \r
+\r
+    PRINT("upgrading.......\r\n");\r
+    ret_val = uapi_upg_start();\r
+    if (ret_val != ERRCODE_SUCC) {\r
+        PRINT("upgrade failed, ret = 0x%x\r\n", ret_val);\r
+    } else {\r
+        PRINT("upgrade success\r\n");\r
+    }\r
+    upg_reboot();\r
+}\r
+#endif\r
+\r
 static void thread_main(const void *unused)\r
 {\r
     PRINT("thread_main start "NEWLINE);\r
@@ -337,6 +391,11 @@ static void thread_main(const void *unused)
     init_btaddr_btname();\r
     board_version_class_print();\r
     uapi_watchdog_kick();\r
+#ifdef CONFIG_OTA_UPDATE_SUPPORT\r
+    upg_check_upgrade();\r
+#endif\r
+    /* nv init and file system init must be before nv_upg_upgrade_task_process */\r
+    (void)nv_upg_upgrade_task_process();\r
     thread_init();\r
     button_app_init();\r
     uapi_calendar_init();\r
index 0c0d6f8..0f5ea04 100644 (file)
@@ -9,6 +9,11 @@
 #include <vector>
 namespace OHOS
 {
+
+    // 定义按键颜色宏
+#define DEFAULT_BACKGROUND_COLOR 0xff191919
+#define PRESSED_BACKGROUND_COLOR 0xff249115
+#define PRESSED_BORDER_COLOR 0xff0b1928
     /***
      * @description: 初始化标签
      * @param {UILabel} *
@@ -52,7 +57,7 @@ namespace OHOS
         // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitLabelExt is succeed");
         return true;
     }
-
+#ifdef FD230
     /***
      * @description:
      * @param {UILabelExt} *
@@ -97,38 +102,8 @@ namespace OHOS
         // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitLabelExt is succeed");
         return true;
     }
-    /***
-     * @description:
-     * @param {UIButton} *
-     * @param {int} left
-     * @param {int} top
-     * @param {int} width
-     * @param {int} height
-     * @param {char} *viewId
-     * @return
-     * @brief 初始化按钮
-     */
-    bool InitButton(UIButton *&button, int left, int top, int width, int height, const char *viewId)
-    {
-        // 创建新按钮(如果当前按钮为空)
-        if (button == nullptr)
-        {
-            button = new UIButton();
-        }
-        if (button == nullptr)
-        {
-            return false; // 内存分配失败,返回false
-        }
-        button->SetPosition(left, top);
-        button->Resize(width, height);
-        button->SetViewId(viewId);
-        button->SetStyle(STYLE_BACKGROUND_COLOR, DEFAULT_BACKGROUND_COLOR);
-        button->SetStyleForState(STYLE_BACKGROUND_COLOR, DEFAULT_BACKGROUND_COLOR, UIButton::PRESSED);
-        button->SetStyleForState(STYLE_BORDER_COLOR, PRESSED_BORDER_COLOR, UIButton::PRESSED);
-        button->SetVisible(true);
-        // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitButton is succeed");
-        return true;
-    }
+
+    
     /***
      * @description:
      * @param {UILabelButtonExt} *
@@ -168,43 +143,7 @@ namespace OHOS
         // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitButton is succeed");
         return true;
     }
-    /***
-     * @description:
-     * @param {UIImageView} *
-     * @param {int} left
-     * @param {int} top
-     * @param {int} width
-     * @param {int} height
-     * @param {char} *viewId
-     * @param {char} *imagePath
-     * @return {*}
-     * @brief 初始化图片
-     */
-    bool InitImageView(UIImageView *&imageView, int left, int top, int width, int height, const char *viewId, const char *imagePath)
-    {
-        if (imageView == nullptr)
-        {
-            imageView = new UIImageView();
-        }
-        if (imageView == nullptr)
-        {
-            return false; // 内存分配失败,返回false
-        }
-        imageView->SetPosition(left, top);
-        imageView->SetAutoEnable(true);
-        // imageView->Resize(width, height);
-        imageView->SetViewId(viewId);
-        imageView->SetSrc(imagePath);
-        // imageView->SetVisible(true);
-        // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitImageView is succeed");
-        return true;
-    }
-    /*带默认参数的初始化label*/
-    void InitLabelDefault(UILabelExt *&label, int x, int y, int width, int height, const char *viewId, const char *text, int fontSize, const char *fontName)
-    {
-        InitLabel(label, x, y, width, height, viewId, text, fontName, fontSize);
-    }
-    /* -------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------------- */
     /*替换字符串中的变量*/
     std::string UpdateLabelText(UILabelExt *&label, const std::string &newText, UIResourceTextId id)
     {
@@ -282,6 +221,77 @@ namespace OHOS
 
         delete labelext;
     }
+#endif
+    /***
+     * @description:
+     * @param {UIButton} *
+     * @param {int} left
+     * @param {int} top
+     * @param {int} width
+     * @param {int} height
+     * @param {char} *viewId
+     * @return
+     * @brief 初始化按钮
+     */
+    bool InitButton(UIButton *&button, int left, int top, int width, int height, const char *viewId)
+    {
+        // 创建新按钮(如果当前按钮为空)
+        if (button == nullptr)
+        {
+            button = new UIButton();
+        }
+        if (button == nullptr)
+        {
+            return false; // 内存分配失败,返回false
+        }
+        button->SetPosition(left, top);
+        button->Resize(width, height);
+        button->SetViewId(viewId);
+        button->SetStyle(STYLE_BACKGROUND_COLOR, DEFAULT_BACKGROUND_COLOR);
+        button->SetStyleForState(STYLE_BACKGROUND_COLOR, DEFAULT_BACKGROUND_COLOR, UIButton::PRESSED);
+        button->SetStyleForState(STYLE_BORDER_COLOR, PRESSED_BORDER_COLOR, UIButton::PRESSED);
+        button->SetVisible(true);
+        // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitButton is succeed");
+        return true;
+    }
+    
+    /***
+     * @description:
+     * @param {UIImageView} *
+     * @param {int} left
+     * @param {int} top
+     * @param {int} width
+     * @param {int} height
+     * @param {char} *viewId
+     * @param {char} *imagePath
+     * @return {*}
+     * @brief 初始化图片
+     */
+    bool InitImageView(UIImageView *&imageView, int left, int top, int width, int height, const char *viewId, const char *imagePath)
+    {
+        if (imageView == nullptr)
+        {
+            imageView = new UIImageView();
+        }
+        if (imageView == nullptr)
+        {
+            return false; // 内存分配失败,返回false
+        }
+        imageView->SetPosition(left, top);
+        imageView->SetAutoEnable(true);
+        // imageView->Resize(width, height);
+        imageView->SetViewId(viewId);
+        imageView->SetSrc(imagePath);
+        // imageView->SetVisible(true);
+        // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitImageView is succeed");
+        return true;
+    }
+    /*带默认参数的初始化label*/
+    void InitLabelDefault(UILabelExt *&label, int x, int y, int width, int height, const char *viewId, const char *text, int fontSize, const char *fontName)
+    {
+        InitLabel(label, x, y, width, height, viewId, text, fontName, fontSize);
+    }
+    
     /* -------------------------------------------------------------------------- */
     /**
      * 创建包含图片文件路径的数组
index 4602c36..869e038 100644 (file)
 #include "wearable_log.h"
 #include "ohos_types.h"
 #include "components/ui_card_page.h"
+#ifdef FD230
 #include "traing/include/TraingModel.h"
 #include "language/font/ui_resource_string.h"
+#endif
 #include "common/image_cache_manager.h"
 
 namespace OHOS
 {
     /*初始化label[可使用text]*/
     bool InitLabel(UILabelExt *&label, int left, int top, int width, int height, const char *viewId, const char *text, const char *fontName, int fontSize);
-    /*初始化labelExt*/
-    bool InitLabelExt(UILabelExt *&label, int left, int top, int width, int height, const char *viewId, UIResourceTextId id, const char *fontName, int fontSize);
+
     /*初始化button*/
     bool InitButton(UIButton *&button, int left, int top, int width, int height, const char *viewId);
     /*初始化buttonExt*/
-    bool InitButtonExt(UILabelButtonExt *&button, int left, int top, int width, int height, const char *viewId, UIResourceTextId id, int fontSize);
     /*初始化image*/
     bool InitImageView(UIImageView *&imageView, int left, int top, int width, int height, const char *viewId, const char *imagePath);
     /*生成动画资源数组*/
@@ -47,7 +47,10 @@ namespace OHOS
     void InitImageAnimatorSource(UIImageAnimatorView *&imageAnimator, const char **imagePaths, int numFrames, int left, int top, int width, int height, const char *viewId, int time);
     /*InitLabel[默认参数]*/
     void InitLabelDefault(UILabelExt *&label, int x, int y, int width, int height, const char *viewId, const char *text, int fontSize = 30, const char *fontName = DEFAULT_VECTOR_FONT_FILENAME);
-
+#ifdef FD230
+    /*初始化labelExt*/
+    bool InitLabelExt(UILabelExt *&label, int left, int top, int width, int height, const char *viewId, UIResourceTextId id, const char *fontName, int fontSize);
+    bool InitButtonExt(UILabelButtonExt *&button, int left, int top, int width, int height, const char *viewId, UIResourceTextId id, int fontSize);
     /*通用替换*/
     std::string UpdateLabelText(UILabelExt *&label, const std::string &newText, UIResourceTextId id);
     /*更新label的数字*/
@@ -56,6 +59,7 @@ namespace OHOS
     std::string UpdateLabel(UILabelExt *&label, const std::string &updatestr, UIResourceTextId id);
     /*通过labelext获取Id设置label*/
     void SetLabelId(UILabel *&label, UIResourceTextId id);
+#endif
     /*解析动画资源数组 imageche*/
     std::vector<ImageInfo *> AnalysisArray(const char *filename, uint32_t startId, uint32_t lastId);
 }
index 7bf23a6..f6a8a07 100755 (executable)
@@ -1,4 +1,6 @@
 set(COMPONENT_NAME "alipay_service")
+set(MODULE_NAME "app")
+set(AUTO_DEF_FILE_ID TRUE)
 
 set(PUBLIC_HEADER
     ${CMAKE_CURRENT_SOURCE_DIR}
index 4656be5..0d0072a 100644 (file)
@@ -14,7 +14,9 @@
 #include "osal_task.h"\r
 #include "alipay_feature.h"\r
 #include "securec.h"\r
-\r
+#ifdef JS_ENABLE\r
+#include "msg_center_msg.h"\r
+#endif\r
 #include "wearable_log.h"\r
 #ifdef SUPPORT_ALIPAY_SEC\r
 #include "bleService.h"\r
@@ -182,11 +184,18 @@ static void svr_alipay_ble_connstate_change_cb(unsigned short conn_id, bd_addr_t
         conn_state, pair_state);\r
     g_alipay_conn_id = conn_id;\r
     if (GAP_BLE_STATE_DISCONNECTED == conn_state) { // restart ble adv when disconnected\r
+        #ifdef JS_ENABLE\r
+        /* 通知msg_center,ble状态仍用bt状态,此处不区分 */\r
+        SendMsgToMsgCenterService(BT_DISCONNECTED_TO_MSGCENTER, 0, NULL, 0);\r
+        #endif\r
         // svr_alipay_ble_adv_start();\r
         // svr_alipay_reset_init();\r
         gap_ble_start_adv(ALIPAY_BLE_ADV_ID);\r
     } else {\r
         svr_alipay_set_adv_start_state(false);\r
+        #ifdef JS_ENABLE\r
+        SendMsgToMsgCenterService(BT_CONNECTED_TO_MSGCENTER, 0, NULL, 0);\r
+        #endif\r
     }\r
 }\r
 \r
index e933c02..a2f0147 100755 (executable)
@@ -18,16 +18,26 @@ extern "C" {
 #include <stdio.h>
 #include "stdbool.h"
 #include "errcode.h"
+#if !defined(SW_UART_DEBUG) && !defined(SW_RTT_DEBUG)
+#include "soc_diag_util.h"
+#include "log_oam_logger.h"
+#include "log_def.h"
+#else
 #include "debug_print.h"
+#endif
 
 #define APP_SUCCESS 0
 #define APP_FAILURE (-1)
 
-#ifdef ALIPAY_HSO_DEBUG_LOG
-#define ALIPAY_PRINT_ERR(log_num, fmt, args...) uapi_diag_error_log(0, fmt, ##arg)
-#define ALIPAY_PRINT_WARN(log_num, fmt, args...) uapi_diag_warning_log(0, fmt, ##arg)
-#define ALIPAY_PRINT_INFO(log_num, fmt, args...) uapi_diag_info_log(0, fmt, ##arg)
-#define ALIPAY_PRINT_DEBUG(log_num, fmt, args...)
+#if !defined(SW_UART_DEBUG) && !defined(SW_RTT_DEBUG)
+#define ALIPAY_PRINT_ERR(log_num, fmt, arg...) uapi_diag_error_log(0, fmt, ##arg)
+#define ALIPAY_PRINT_WARN(log_num, fmt, arg...) uapi_diag_warning_log(0, fmt, ##arg)
+#define ALIPAY_PRINT_INFO(log_num, fmt, arg...) uapi_diag_info_log(0, fmt, ##arg)
+#ifdef WEARABLE_LOG_DEBUG
+#define ALIPAY_PRINT_DEBUG(log_num, fmt, arg...) uapi_diag_debug_log(0, fmt, ##arg)
+#else
+#define ALIPAY_PRINT_DEBUG(log_num, fmt, arg...)
+#endif
 #else
 #define ALIPAY_PRINT_ERR(log_num, fmt, arg...) PRINT("[ALIPAY SVR E/] %s: " fmt "\r\n", __FUNCTION__, ##arg)
 #define ALIPAY_PRINT_WARN(log_num, fmt, arg...) PRINT("[ALIPAY SVR W/] %s: " fmt "\r\n", __FUNCTION__, ##arg)
@@ -52,7 +62,6 @@ extern "C" {
 #define ALIPAY_TRANS_CARD_MAX_LENGTH 20
 #define ALIPAY_TRANS_CARD_MIN_VALID_NUM 3
 
-
 typedef enum {
     PAYMENT_UNSUPPORTED = 1,  /* NOT support payment */
     PAYMENT_UNBIND,           /* support but not bind */
@@ -392,7 +401,6 @@ mc_alipay_trans_context_t * svr_alipay_get_trans_context(void);
  */
 uint32_t svr_alipay_register_cb(alipay_msgf_event_callback_func callback);
 
-
 #ifdef __cplusplus
 #if __cplusplus
 }
index 0703faa..58bf3bf 100644 (file)
@@ -331,7 +331,6 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/motionrecognition/src/MotionRecognitionView.cpp
 
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/language/LanguageInit.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/config/src/ConfigModel.cpp
 
     #查找手机
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/findphone/src/FindPhonePresenter.cpp
index 8b72fe4..8553ced 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-04-23 09:59:32
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-24 14:27:03
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-05-28 15:07:45
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp
  */
 #include "AppViewIDs.h"
@@ -166,20 +166,8 @@ extern "C"
 #endif /* __cplusplus */
 #endif /* __cplusplus */
 
-    uint32_t uapi_cat1_power_on(uint32_t pwron);
-    uint32_t uapi_cat1_reset(uint32_t pwron);
+    
 
-    void power_on_cat1(void)
-    {
-        uapi_cat1_power_on(1);
-        uapi_cat1_reset(0);
-    }
-
-    void power_off_cat1(void)
-    {
-        uapi_cat1_reset(1);
-        uapi_cat1_power_on(0);
-    }
 #ifdef __cplusplus
 #if __cplusplus
 }
index 190cb4b..228b8da 100644 (file)
@@ -8,10 +8,7 @@
 
 namespace OHOS
 {
-// 定义按键颜色宏
-#define DEFAULT_BACKGROUND_COLOR 0xff191919
-#define PRESSED_BACKGROUND_COLOR 0xff249115
-#define PRESSED_BORDER_COLOR 0xff0b1928
+
 
 // Paths for different icons in the Training folder
 #define ICON36 "/user/res/Training/icon_36x36"
index ae350bc..93f05aa 100755 (executable)
@@ -19,6 +19,7 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits
     ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits
     ${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks
+    ${ROOT_DIR}/application/wearable/nativeapp/nativeui/applist/include/
     ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
 )
 
@@ -30,6 +31,8 @@ set(SOURCES
     ${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
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/transition/BackToHexagonsTransition.cpp
 )
 
 set(COMPONENT_PUBLIC_CCFLAGS
index 0b0d62e..069aed3 100755 (executable)
 #include "Slice.h"
 
 #include "wearable_log.h"
-#include "TransitionManager.h"
+#include "TransitionType.h"
 #include "SliceTransition.h"
+#include "soc_osal.h"
 #include "stack"
-#include <AppViewIDs.h>
 namespace OHOS {
 const static uint16_t gSliceInvalid = 0;         
 const static uint16_t gSliceDefaultPriority = 4;  // 页面默认是最低优先级
@@ -34,16 +34,14 @@ const static uint16_t gMaxHistorySlices = 10;  // 默认最多保存三个历史
 
 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()) {
@@ -70,7 +68,7 @@ public:
     }
 
     // 当从一个Slice进入另一个Slice时调用
-    void EnterSlice(uint16_t sliceId,const uint16_t transitionId = TRANSITION_INVALID,
+    void EnterSlice(uint16_t sliceId,const TransitionType transitionId = TransitionType::TRANSITION_INVALID,
         const uint16_t priority = gSliceDefaultPriority) {
         // 获取当前SliceID
         uint16_t curSliceId = GetCurSliceId();
@@ -81,7 +79,7 @@ public:
     }
 
     // 处理后退操作
-     bool Back(const uint16_t transitionId = TRANSITION_INVALID,
+     bool Back(const TransitionType transitionId = TransitionType::TRANSITION_INVALID,
         const uint16_t priority = gSliceDefaultPriority) { 
         /*
         if (backStack_.empty()) {
@@ -102,6 +100,8 @@ public:
         }
     }
 protected:
+    Ability() = default;
+    virtual ~Ability() = default;
     struct ProxyStruct {
         uint16_t sliceId;
         SliceProxy* proxy;
@@ -120,17 +120,18 @@ protected:
     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);
 private:
index e846865..f03c2da 100755 (executable)
@@ -58,7 +58,7 @@ public:
     int GetNativeAbilityState() const;
 private:
     NativeAbility() {}
-    ~NativeAbility() {}
+    ~NativeAbility() override {}
     int nativeAbilityState_ = 0;
 };
 }
index cb5ebf1..e7b25f5 100755 (executable)
@@ -9,60 +9,46 @@
 #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
index 8e0d2f3..3c5adce 100755 (executable)
 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
index 18006d5..1ac1636 100755 (executable)
@@ -8,18 +8,45 @@
 #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
diff --git a/code/sdk/application/wearable/nativeabilityfwk/include/TransitionType.h b/code/sdk/application/wearable/nativeabilityfwk/include/TransitionType.h
new file mode 100644 (file)
index 0000000..092c452
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * 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_BACK_TO_HEXAGONS,
+    TRANSITION_MAX
+};
+}
+#endif
\ No newline at end of file
index 77c32d2..75376b1 100755 (executable)
@@ -16,6 +16,7 @@
 #include "Ability.h"
 #include "graphic_service.h"
 #include "abilityms_slite_client.h"
+#include "common/input_device_manager.h"
 
 namespace OHOS {
 /*
@@ -55,7 +56,7 @@ void Ability::StartSlice(const uint16_t sliceId, const uint16_t priority)
     if (node == nullptr) {
         return;
     }
-
+    InputDeviceManager::GetInstance()->ClearPressableViews();
     Slice* nextSlice = node->value_.proxy->CreateSlice();
     if (nextSlice == nullptr) {
         return;
@@ -68,6 +69,10 @@ void Ability::StartSlice(const uint16_t sliceId, const uint16_t priority)
     }
     /* -------------- 4.设置当前Slice的相关信息,并调用Slice的OnStart和OnResume方法。 ------------- */
     allSlices_.push_back(sliceId);
+    if (curSlice_.slice != nullptr) {
+        prevSlice_.sliceId = curSlice_.sliceId;
+        prevSlice_.slice = curSlice_.slice;
+    }
 
     curSlice_.sliceId = sliceId;
     curSlice_.slice = nextSlice;
@@ -77,20 +82,6 @@ void Ability::StartSlice(const uint16_t sliceId, const uint16_t priority)
     nextSlice->OnResume();
 }
 
-/*
- * @brief 释放当前的Slice,将当前Slice对象设置为nullptr,并重置当前Slice ID和优先级 
- */
-void Ability::ReleaseCurSlice()
-{
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::ReleaseCurSlice");
-    if (curSlice_.slice != nullptr) {
-        curSlice_.sliceId = gSliceInvalid;
-        delete curSlice_.slice;
-        curSlice_.slice = nullptr;
-    }
-
-    curSlicePriority_ = gSliceDefaultPriority;
-}
 
 /*
  * @brief 在allSlicesProxy_列表中寻找与给定sliceId相符合的ProxyStruct节点。如果找到则返回该节点,否则返回nullptr。 
@@ -123,33 +114,42 @@ ListsNode<Ability::ProxyStruct>* Ability::Find(const uint16_t sliceId)
  * @param {uint16_t} priority
  * @return {*}
  */
-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_);
     // onStop释放当前页面需要和当前页面的事件监听异步执行,否则会出现自己杀掉自己的情况
     //使用图形服务的PostGraphicEvent方法异步执行PostChangeSlice,以避免在页面事件监听时出现当前页面自我销毁的情况。
-    GraphicService::GetInstance()->PostGraphicEvent(std::bind(&Ability::PostChangeSlice, this, targetSliceId,
-        transitionId, priority));
+        GraphicService::GetInstance()->PostGraphicEvent(std::bind(&Ability::PostChangeSlice, this, targetSliceId,
+            type, 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)
 {
     /*
         1.首先检查当前Slice是否存在,并验证transitionId的有效性。
         如果当前存在一个有效的Slice,并且transitionId合法,则调用sliceTransition_的SaveCurrentSnapshot方法保存当前Slice的快照,
         主要是为了后续可能使用的页面转场效果。
     */
-    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;
+        }
 
     // slice页面跳转,先onstop,再onstart.在一个线程同步执行绘制,不会出现闪屏现象
     /*
         2.调用StopSlice函数停止当前Slice的运行。在StopSlice中,会调用当前Slice的OnStop方法,并释放当前Slice占用的资源。
     */
-    StopSlice();
+        StopSlice();
+    }
+
+    // slice页面跳转,先onstop,再onstart.在一个线程同步执行绘制,不会出现闪屏现象
 #ifdef JS_ENABLE
     ElementName *elementName = OHOS::AbilityMsClient::GetInstance().GetTopAbility();
     if (strcmp(elementName->bundleName, "com.huawei.launcher") != 0) {
@@ -162,12 +162,33 @@ void Ability::PostChangeSlice(const uint16_t targetSliceId, const uint16_t trans
         记录Slice ID到历史记录中,并调用该Slice的OnStart和OnResume方法开始运行新的Slice。
     */
     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_);
+}
 /*
  * @brief 重新启动当前或默认Slice。根据当前记录的切片历史来决定重启哪个Slice。 
  */
@@ -188,10 +209,16 @@ 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
index 540c39f..20226e6 100755 (executable)
 #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()
@@ -73,18 +57,48 @@ 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_ != nullptr && currentSnapshot_->GetImageInfo() != nullptr &&
+        currentSnapshot_->GetImageInfo()->data != nullptr) {
+        ImageCacheFree(*const_cast<ImageInfo *>(currentSnapshot_->GetImageInfo()));
+    }
+
+    if (targetSnapshot_ != nullptr && 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)
@@ -104,32 +118,19 @@ ImageInfo SliceTransition::RectifySnapshot(ImageInfo& srcInfo)
     }
 }
 
-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;
         }
@@ -139,79 +140,83 @@ bool SliceTransition::SaveCurrentSnapshot(UIView* view)
         }
     }
     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 = &currentSnapshot_;
-    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(&currentSnapshot_);
-    if (!needWaitFirstVideoFrame_) {
-        RootView::GetInstance()->Add(&targetSnapshot_);
-    }
-}
 
-void SliceTransition::TransitionEnd(void)
-{
-    clearImgs();
-    isAnimatorRunning_ = false;
-    RootView::GetInstance()->Remove(&currentSnapshot_);
-    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
index 7390134..06a30ed 100755 (executable)
@@ -7,25 +7,43 @@
 
 #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
diff --git a/code/sdk/application/wearable/nativeabilityfwk/src/transition/BackToHexagonsTransition.cpp b/code/sdk/application/wearable/nativeabilityfwk/src/transition/BackToHexagonsTransition.cpp
new file mode 100644 (file)
index 0000000..fd7b9ba
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024. All rights reserved.
+ * Description: ZoomTransition
+ * Author:
+ * Create: 2024-04
+ */
+
+#include "BackToHexagonsTransition.h"
+#include "TransitionManager.h"
+#include "NativeAbility.h"
+#include "components/root_view.h"
+#include "AppItemView.h"
+#include "hal_tick.h"
+#include "wearable_log.h"
+
+namespace OHOS {
+REGIST_TRANSITION(TransitionType::TRANSITION_BACK_TO_HEXAGONS, BackToHexagonsTransition, 300, true, false);
+static const float CURRENT_SCALE_START = 1.0f;
+static const float TARGET_SCALE_END = 1.0f;
+
+void BackToHexagonsTransition::OnTransitionStart(UIImageView* current, UIView* target)
+{
+    current_ = current;
+    target_ = dynamic_cast<UICustomHexagonsList*>(target);
+    if ((target_ == nullptr) || (current_ == nullptr)) {
+        return;
+    }
+
+    uint16_t sliceId = NativeAbility::GetInstance().GetPreSliceId();
+    UIView* childView = target_->GetChildrenHead();
+    while (childView != nullptr) {
+        HexagonsItemView* itemView = dynamic_cast<HexagonsItemView*>(childView);
+        if ((itemView != nullptr) && (itemView->GetViewId() == sliceId)) {
+            focusIndex_ = itemView->GetViewIndex();
+            focusView_ = itemView;
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "BackToHexagonsTransition focus %d", focusIndex_);
+            break;
+        }
+        childView = childView->GetNextSibling();
+    }
+
+    if (focusView_ == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "BackToHexagonsTransition no focus view, use default\n");
+        focusView_ = target_->GetViewByIndex(0);
+    }
+    target_->Scale(1.0f, focusIndex_);
+    Vector2<int16_t> pos = target_->GetCurrentPosition(focusIndex_);
+    int16_t deltaX = MATH_ROUND(target_->GetWidth() / 2.0f - pos.x_);
+    int16_t deltaY = MATH_ROUND(target_->GetHeight() / 2.0f - pos.y_);
+    target_->ScrollBy(deltaX, deltaY);
+    target_->ReMeasure();
+    Rect rect = focusView_->GetRect();
+    float xScale = current->GetWidth() * 1.0f / rect.GetWidth();
+    float yScale = current->GetHeight() * 1.0f / rect.GetHeight();
+    tarScaleStart_ = FloatLessEqual(xScale, yScale) ? xScale : yScale;
+    curScaleEnd_ = 1.0f / tarScaleStart_;
+}
+
+void BackToHexagonsTransition::TransitionAlg(uint32_t time)
+{
+    if ((current_ == nullptr) || (target_== nullptr) || (focusView_ == nullptr)) {
+        return;
+    }
+    float timeRatio = time * 1.0f / duration_;
+
+    float curScale = timeRatio * (curScaleEnd_ - CURRENT_SCALE_START) + CURRENT_SCALE_START;
+    current_->Scale(Vector2<float>(curScale, curScale), Vector2<float>(current_->GetWidth() / 2.0f,
+        current_->GetHeight() / 2.0f));
+    uint8_t opa = OPA_OPAQUE + timeRatio * (OPA_TRANSPARENT - OPA_OPAQUE);
+    current_->SetOpaScale(opa);
+
+    float targetScale = tarScaleStart_ + timeRatio * (TARGET_SCALE_END - tarScaleStart_);
+    target_->Scale(targetScale, focusIndex_);
+    focusView_->SetOpaScale(OPA_OPAQUE - opa);
+}
+} // namespace OHOS
diff --git a/code/sdk/application/wearable/nativeabilityfwk/src/transition/BackToHexagonsTransition.h b/code/sdk/application/wearable/nativeabilityfwk/src/transition/BackToHexagonsTransition.h
new file mode 100644 (file)
index 0000000..2e261b2
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * 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 BackToHexagonsTransition : public TransitionCallback {
+public:
+    BackToHexagonsTransition(uint32_t time, bool enableCurrentSnapshot, bool enableTargetSnapshot) :
+        TransitionCallback(time, enableCurrentSnapshot, enableTargetSnapshot) {}
+    ~BackToHexagonsTransition() override {}
+    void OnTransitionStart(UIImageView* current, UIView* target) override;
+    void TransitionAlg(uint32_t time) override;
+private:
+    UIImageView* current_ = nullptr;
+    UICustomHexagonsList* target_ = nullptr;
+    UIView* focusView_ = nullptr;
+    uint8_t focusIndex_ = 0;
+    float curScaleEnd_ = 1.0f;
+    float tarScaleStart_ = 1.0f;
+};
+} // namespace OHOS
+#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeabilityfwk/src/transition/HexagonsTransition.cpp b/code/sdk/application/wearable/nativeabilityfwk/src/transition/HexagonsTransition.cpp
new file mode 100644 (file)
index 0000000..8095361
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * 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"
+#include "wearable_log.h"
+
+namespace OHOS {
+REGIST_TRANSITION(TransitionType::TRANSITION_HEXAGONS, HexagonsTransition, 300, false, true);
+static constexpr int16_t RANGE = 1000;
+static const float HEXAGONS_SCALE_INIT = 1.0f;
+static const float HEXAGONS_SCALE_TRANSPARENT = 2.5f;
+static const float TARGET_SCALE_END = 1.0f;
+
+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) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "HexagonsTransition no focus view\n");
+        return;
+    }
+    current_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);
+    Vector2<int16_t> delta = Vector2<int16_t>(current_->GetWidth() / 2, current_->GetHeight() / 2) -
+        current_->GetCurrentPosition(focusIndex_);
+    opaStart_ =  current->GetOpaScale();
+    scaleStart_ = current_->GetGlobalScale();
+    Rect rect = focusView_->GetRect();
+    float xScale = target_->GetWidth() * 1.0f / rect.GetWidth();
+    float yScale = target_->GetHeight() * 1.0f / rect.GetHeight();
+    scaleEnd_ = FloatLessEqual(xScale, yScale) ? xScale : yScale;
+
+    targetXStart_ = rect.GetX();
+    targetYStart_ = rect.GetY();
+    targetScaleStart_ = 1.0f / scaleEnd_;
+
+    uint32_t offsetTime = static_cast<uint32_t>((scaleStart_ - HEXAGONS_SCALE_INIT) /
+        (scaleEnd_ - HEXAGONS_SCALE_INIT) * duration_);
+    durationBackup_ = duration_;
+    duration_ = duration_ - offsetTime;
+    thresholdTime_ = static_cast<uint32_t>((HEXAGONS_SCALE_TRANSPARENT - scaleStart_) / (scaleEnd_ - scaleStart_)
+        * duration_);
+    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_;
+    float opaRatio = time * 1.0f / thresholdTime_;
+    opaRatio = FloatMore(opaRatio, 1.0f) ? 1.0f : opaRatio;
+    int16_t curX = static_cast<int16_t>(timeRatio * xDistance_);
+    int16_t curY = static_cast<int16_t>(timeRatio * yDistance_);
+    current_->ScrollBy(curX - prevX_, curY - prevY_);
+    prevX_ = curX;
+    prevY_ = curY;
+
+    float curScale = timeRatio * (scaleEnd_ - scaleStart_) + scaleStart_;
+    uint8_t opa = opaRatio * (OPA_TRANSPARENT - opaStart_) + opaStart_;
+    focusView_->SetOpaScale(opa);
+    current_->Scale(curScale, focusIndex_);
+
+    int16_t targetXPos = static_cast<int16_t>((1.0f - timeRatio) * targetXStart_);
+    int16_t targetYPos = static_cast<int16_t>((1.0f - timeRatio) * targetYStart_);
+    target_->SetPosition(targetXPos, targetYPos);
+    float targetScale = targetScaleStart_ + timeRatio * (1.0f - targetScaleStart_);
+    target_->Scale(Vector2<float>(targetScale, targetScale), Vector2<float>(0.0f, 0.0f));
+    uint8_t targetOpa = timeRatio * (OPA_OPAQUE - OPA_TRANSPARENT) + OPA_TRANSPARENT;
+    target_->SetOpaScale(targetOpa);
+}
+
+void HexagonsTransition::OnTransitionEnd()
+{
+    duration_ = durationBackup_;
+}
+} // namespace OHOS
\ No newline at end of file
diff --git a/code/sdk/application/wearable/nativeabilityfwk/src/transition/HexagonsTransition.h b/code/sdk/application/wearable/nativeabilityfwk/src/transition/HexagonsTransition.h
new file mode 100644 (file)
index 0000000..46dd72e
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * 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;
+    uint8_t focusIndex_ = 0;
+    float scaleStart_ = 1.0f;
+    float scaleEnd_ = 1.0f;
+    uint8_t opaStart_ = 255;
+    int16_t xDistance_ = 0;
+    int16_t yDistance_ = 0;
+    int16_t prevX_ = 0;
+    int16_t prevY_ = 0;
+    float thresholdTime_ = 0.0f;
+    int16_t targetXStart_ = 0;
+    int16_t targetYStart_ = 0;
+    float targetScaleStart_ = 1.0f;
+};
+} // namespace OHOS
+#endif
\ No newline at end of file
index 993c0b2..a653145 100755 (executable)
@@ -5,15 +5,28 @@
  * 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 {
@@ -21,19 +34,19 @@ void ZoomTransition::TransitionAlg(UIImageView* current, UIImageView* target, ui
     }
     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
index a5e3fbb..419f2c0 100755 (executable)
 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
index 38ebe73..0e72a0e 100755 (executable)
@@ -57,8 +57,8 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/ui/frameworks
     ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/ui/innerkits
 
-c
-
+    ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits/events
+    ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/kits
     ${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/utils/interfaces/innerkits
@@ -111,7 +111,6 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/dial/DialModelHeartRate.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/dial/DialModelSteps.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/dial/DialModelPower.cpp
-    
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/bloodoxygen/src/BloodOxygenView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/bloodoxygen/src/BloodBandoffView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/bloodoxygen/src/BloodOxygenPresenter.cpp
@@ -266,6 +265,7 @@ set(SOURCES
     ${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_keyboard/ui_test_keyboard.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
@@ -336,6 +336,8 @@ set(COMPONENT_CCFLAGS
     -nostdlib
     -Wno-c++11-narrowing
     -Wno-error=unused-function
+    -Wno-missing-field-initializers
+    -Werror=return-type
 )
 
 set(WHOLE_LINK
index 7e25bbd..6aa7d46 100644 (file)
@@ -23,7 +23,7 @@ class MainView;
 class MainPresenter : public Presenter<MainView> {
 public:
     MainPresenter();
-    virtual ~MainPresenter();
+    ~MainPresenter() override;
 
     void OnStart() override;
     void OnPause() override;
index 6a13cae..818dd68 100644 (file)
@@ -42,7 +42,7 @@ class MainPresenter;
 class MainView : public View<MainPresenter> {
 public:
     MainView();
-    virtual ~MainView();
+    ~MainView() override;
 
     void OnStart() override;
     void OnSetUpView() override;
index 0d578df..a1e55d1 100755 (executable)
 #endif
 
 namespace OHOS {
-struct AppViewMapper
-{
+struct AppViewMapper {
     AppViewId id;
     void (NativeLauncher::*func)(void);
 };
 
-struct ViewIdToString
-{
+struct ViewIdToString {
     AppViewId id;
     char idForUikit[256];
 };
@@ -100,8 +98,8 @@ static const AppViewMapper SLICE_MAPPER[] = {
     {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},
@@ -161,7 +159,8 @@ 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);
+    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适配初始化
index 3e79969..4f492bb 100644 (file)
 
 #include "MainView.h"
 #include "AppViewIDs.h"
-#include "components/ui_label_ext.h"
 
 #include "wearable_log.h"
 
 namespace OHOS {
-MainView::MainView(){}
+MainView::MainView() {}
 
-MainView::~MainView(){}
+MainView::~MainView() {}
 
 void MainView::OnStart()
 {
index 7bf138e..7c694f9 100755 (executable)
@@ -10,8 +10,8 @@
 \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
index a65060d..1842d3b 100755 (executable)
@@ -9,7 +9,7 @@
 #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
@@ -27,7 +27,7 @@ public:
     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
index 5ecbb1b..5377a90 100755 (executable)
@@ -26,7 +26,7 @@ namespace OHOS {
 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
index fa6e6ed..61cc52b 100755 (executable)
@@ -21,8 +21,6 @@
 #include "ActivityWeekView.h"
 #include "graphic_service.h"
 
-using namespace std;
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -32,22 +30,22 @@ using namespace OHOS;
 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;
     }
@@ -58,14 +56,14 @@ void StepSubscribeTopic(Topic topic)
 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;
     }
@@ -77,31 +75,32 @@ static void RefreshStepControls(const uint32_t &value, const uint16 &msgId)
 {
     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));
         }
     }
 }
@@ -110,12 +109,12 @@ static void Notify(void *args, const Topic topic, Request* request)
 {
     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;
         }
         // 计步数据累加
@@ -123,8 +122,8 @@ static void Notify(void *args, const Topic topic, Request* request)
         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);
     }
 
@@ -146,7 +145,7 @@ static constexpr const char *STEP_DATA_PATH = "/user/data/step_";
 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()
@@ -159,13 +158,13 @@ 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;
     }
 }
 
@@ -209,8 +208,7 @@ static void SaveEveryMinCallbackProc(int data)
     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);
     }
@@ -225,11 +223,11 @@ void ActivityModel::SetStepData(uint32_t &value)
 {
     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;
     }
@@ -237,13 +235,13 @@ void ActivityModel::SetStepData(uint32_t &value)
     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;
     }
@@ -272,8 +270,7 @@ uint32_t ActivityModel::ZeroHourStepHandle(void)
 {
     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;
index 3eb986e..3e880d4 100755 (executable)
@@ -69,7 +69,7 @@ ActivityWeekView::ActivityWeekView()
 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
@@ -110,27 +110,27 @@ ActivityWeekView *ActivityWeekView::GetInstance(void)
 \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
index 34882c9..8f18d42 100644 (file)
@@ -23,13 +23,13 @@ namespace OHOS {
 class AddCardAdapter : public AbstractAdapter {
 public:
     explicit AddCardAdapter();
-    virtual ~AddCardAdapter();
+    ~AddCardAdapter() override;
 
-    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 AddCardInfo &item);
+    void AddListItem(const AddCardInfo &item);
 
     void SetItemClickListener(UIView::OnClickListener *itemClickListener)
     {
index 5ce44d5..5325f4e 100644 (file)
@@ -23,10 +23,10 @@ typedef struct {
     const char *cardImg;\r
 } AddCardInfo;\r
 \r
-class AddCardItem :public UIViewGroup {\r
+class AddCardItem : public UIViewGroup {\r
 public:\r
     AddCardItem();\r
-    virtual ~AddCardItem();\r
+    ~AddCardItem() override;\r
     void SetItemInfo(const AddCardInfo &cardInfo);\r
     void SetOnClickListener(OnClickListener *onClickListener);\r
     void UpdateItemInfo(bool addFlag);\r
index ae17e1a..9bdf0e4 100644 (file)
@@ -28,7 +28,6 @@ namespace OHOS {
         AddCardModel &operator=(const AddCardModel &);
         virtual ~AddCardModel();
         uint8_t selectedCardIndex{0};
-
     };
 }
 
index f8e6f88..ffaebdf 100644 (file)
 #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>,
+class AddCardPresenter : public Presenter<AddCardView>, public ModelListenerSample,
                          public UIView::OnClickListener, public UIView::OnDragListener,
                          public ListScrollListener  {
 public:
     AddCardPresenter();
-    virtual ~AddCardPresenter();
-
-    virtual void OnStart() override;
-    virtual void OnResume() override;
-    virtual void OnStop() override;
+    ~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;
-    virtual void OnScrollStart(int16_t index, UIView *view) override;
-    virtual void OnScrollEnd(int16_t index, UIView *view) override;
-    virtual void OnItemSelected(int16_t index, UIView* view) override;
-    virtual bool OnDrag(UIView& view, const DragEvent& 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:
-    KeyInputListener *keyActListenr{nullptr};
+    void ResetTickTimer(void);
     AddCardModel *model{nullptr};
-
+    uint64_t startTime{0};
+    bool cardCountEvent{false};
 };
 }
 
index 63d51bb..6f7e9c3 100644 (file)
@@ -26,7 +26,7 @@ class AddCardPresenter;
 class AddCardView : public View<AddCardPresenter> {
 public:
     AddCardView();
-    virtual ~AddCardView();
+    ~AddCardView() override;
 
     static AddCardView *GetInstance()
     {
@@ -34,15 +34,18 @@ public:
         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 RefreshCardList(void);
+    void ExceedsCardCountEvent(bool isVisible);
 private:
     void SetUpListInfo(void);
     void SetUpListView(void);
+    void SetUpToast(void);
     UIList contentList_;
+    UILabel toastLabel_;
     AddCardAdapter *addCardAdapter_{nullptr};
 };
 }
index 73044d5..1581579 100644 (file)
@@ -47,9 +47,15 @@ namespace OHOS {
     bool AddCardPresenter::OnClick(UIView &view, const ClickEvent &event)
     {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AddCardPresenter::OnClick");
-        model->AddCardSetting();
-        view_->RefreshCardList();
-               return true;
+        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)
@@ -67,12 +73,30 @@ namespace OHOS {
         model->SetSelectedCardIndex(index);
     }
 
-    void AddCardPresenter::OnItemSelected(int16_t index, UIView* view) 
+    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;
     }
 
 }
index a696032..6e87bde 100644 (file)
@@ -34,6 +34,7 @@ void AddCardView::OnStart()
     addCardAdapter_->SetItemClickListener(presenter_);
     SetUpListInfo();
     SetUpListView();
+    SetUpToast();
 }
 
 void AddCardView::OnSetUpView()
@@ -104,10 +105,31 @@ void AddCardView::SetUpListView(void)
     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();
+}
+
 }
index b842fb4..27e6bc7 100755 (executable)
@@ -54,7 +54,7 @@ class AlarmPopUpPresenter : public Presenter<AlarmPopUpView>, public UIView::OnC
     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
@@ -63,7 +63,7 @@ public:
     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
index 0c92d5e..51730af 100755 (executable)
@@ -92,9 +92,10 @@ typedef enum {
     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
@@ -117,7 +118,7 @@ class AlarmPresenter : public Presenter<MainAlarmView>, public UIView::OnClickLi
  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
index abf2f37..1e79d4f 100755 (executable)
@@ -34,7 +34,6 @@ private:
     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
index 0c67315..9140a47 100755 (executable)
@@ -39,7 +39,7 @@ class AlarmPresenter;
 class MainAlarmView : public View<AlarmPresenter> {
 public:
     MainAlarmView();
-    virtual ~MainAlarmView();
+    ~MainAlarmView() override;
     static MainAlarmView *GetInstance(void);
     void OnStart() override;
     void OnSetUpView() override;
index 3981bf1..1941e60 100755 (executable)
@@ -90,8 +90,8 @@ int32_t AlarmClockModel::SaveGlobalAlarmToFile(void)
 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) {
@@ -120,11 +120,11 @@ void AlarmClockModel::PushAlarmClockData(AlarmClockQueueMsg alarmClockMsg)
 
 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);
@@ -299,17 +299,17 @@ bool AlarmClockModel::GetClockListenerTime(uint32_t &alarmGetTime)
     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;
 }
 
@@ -434,9 +434,9 @@ bool AlarmClockModel::ButtonStatusRing(int16_t num, bool alarmStatus)
         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,
@@ -449,7 +449,7 @@ bool AlarmClockModel::ButtonStatusRing(int16_t num, bool alarmStatus)
     return true;
 }
 
-void AlarmClockModel::SetDelayAlarm(uint8_t alarmId)
+void AlarmClockModel::SetDelayAlarm(uint8_t alarm)
 {
     AlarmClockQueueMsg *clockQueueMsg = new AlarmClockQueueMsg();
     if (clockQueueMsg == nullptr) {
@@ -460,12 +460,12 @@ void AlarmClockModel::SetDelayAlarm(uint8_t alarmId)
     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) {
@@ -475,7 +475,7 @@ void AlarmClockModel::SetCancelAlarm(uint8_t alarmId)
     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;
 }
@@ -620,8 +620,6 @@ void AlarmClockModel::GetPopTimeData(int16 *hour, int16 *min)
 void AlarmClockModel::AlarmGetClockNum()
 {
     struct tm curTime;
-    int32 hour, min;
-
     if (AlarmGetCurrentTimeInfo(&curTime) != 0) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmTimerCallback AlarmGetCurrentTimeInfo failed!!");
         return;
@@ -634,8 +632,8 @@ void AlarmClockModel::AlarmGetClockNum()
             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) {
@@ -650,15 +648,14 @@ void AlarmClockModel::AlarmGetClockNum()
     }
 }
 
-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;
@@ -670,14 +667,14 @@ void AlarmClockModel::GetAlarmCallId(uint8_t *alarmId)
             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;
         }
     }
@@ -685,7 +682,7 @@ void AlarmClockModel::GetAlarmCallId(uint8_t *alarmId)
 
 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()));
 }
@@ -762,7 +759,6 @@ int AlarmClockModel::AlarmPlayerInit(void)
 
     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("/");
@@ -837,14 +833,14 @@ uint16_t AlarmClockModel::JudgePreSlice(void)
 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();
 }
 
@@ -870,7 +866,7 @@ void AlarmClockModel::AlarmNextDayNotify()
 {
     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;
@@ -883,23 +879,23 @@ void AlarmClockModel::AlarmClockNotify()
 {
     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()
@@ -948,7 +944,7 @@ static void Stop(void)
     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;
     }
index ccf0f64..a2ef8af 100755 (executable)
@@ -17,7 +17,7 @@
 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
@@ -99,13 +99,13 @@ UIViewGroup *AlarmCloseRingView::InitCloseRingView(void)
 \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
@@ -134,8 +134,8 @@ void CloseTimerCallback(int data)
 \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
@@ -143,13 +143,13 @@ void AlarmCloseRingView::AlarmCloseShowTimer(void)
     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
index b5d4e8f..171caef 100755 (executable)
@@ -112,13 +112,13 @@ AlarmConfigView *AlarmConfigView::GetInstance(void)
 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
@@ -175,7 +175,7 @@ void AlarmConfigView::CreateConfigButton(void)
     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
index 85028b1..823ff67 100755 (executable)
@@ -16,7 +16,7 @@ namespace OHOS {
 #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
@@ -59,7 +59,7 @@ AlarmMaxClock *AlarmMaxClock::GetInstance(void)
     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
@@ -83,7 +83,7 @@ UIScrollView * AlarmMaxClock::InitAlarmMax(void)
     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
@@ -94,13 +94,13 @@ UIScrollView * AlarmMaxClock::InitAlarmMax(void)
 \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
@@ -124,8 +124,8 @@ void ScanTimerCallback(int data)
 \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
@@ -133,13 +133,13 @@ void AlarmMaxClock::AlarmMaxDelayExit(void)
     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
index dda985d..93a205b 100755 (executable)
@@ -104,7 +104,7 @@ void AlarmNewTimeView::CreateLabelTime(void)
     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
@@ -167,13 +167,13 @@ void AlarmNewTimeView::RefreshNewTime(void)
 {\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
index 04327b6..6b1f76b 100755 (executable)
@@ -56,7 +56,7 @@ void AlarmPopUpPresenter::CancelAlarmRing()
     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
@@ -70,7 +70,7 @@ void AlarmPopUpPresenter::DelayAlarmRing()
     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
index 3960179..da6b88b 100755 (executable)
@@ -78,8 +78,7 @@ void AlarmPopUpView::AlarmCreateLabel(void)
         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
@@ -94,10 +93,13 @@ void AlarmPopUpView::AlarmCreateLabel(void)
     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
@@ -243,4 +245,4 @@ void AlarmPopUpView::ChangeView(int16_t hideView, int16_t showView)
     }\r
 }\r
 \r
- }// namespace OHOS\r
+}\r
index 976a269..1936801 100755 (executable)
@@ -109,7 +109,7 @@ void AlarmPresenter::ClickSetTime(uint16_t num)
     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
@@ -130,7 +130,7 @@ void AlarmPresenter::ClickSetWeek(uint16_t num)
     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
@@ -184,7 +184,7 @@ void AlarmPresenter::ClickJudgeTrue(uint16_t num)
     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
@@ -201,7 +201,7 @@ void AlarmPresenter::ClickAlarmTimeOk(uint16_t num)
     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
@@ -232,11 +232,11 @@ void AlarmPresenter::ClickAlarmClock(uint16_t num)
     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
@@ -263,7 +263,7 @@ void AlarmPresenter::ClickAlarmWeekOk(uint16_t num)
     \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
@@ -285,7 +285,7 @@ void AlarmPresenter::ClickAlarmWeekOk(uint16_t num)
         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
@@ -433,7 +433,7 @@ bool AlarmPresenter::OnClick(UIView &view, const ClickEvent &event)
 {\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
@@ -441,7 +441,7 @@ bool AlarmPresenter::OnClick(UIView &view, const ClickEvent &event)
 \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
index 1c063fb..726a587 100755 (executable)
@@ -17,7 +17,7 @@
 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
@@ -97,13 +97,13 @@ UIViewGroup *AlarmRingView::InitRingView(void)
 \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
@@ -123,8 +123,8 @@ void RingTimerCallbacks(int data)
 \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
@@ -132,13 +132,13 @@ void AlarmRingView::AlarmRingDelayShowtimer(void)
     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
index b462b75..6d04e32 100755 (executable)
@@ -132,7 +132,7 @@ UIScrollView *AlarmSetTimeView::InitSetTimeView(void)
     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
@@ -152,7 +152,7 @@ UIScrollView *AlarmSetTimeView::InitSetTimeView(void)
     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
@@ -172,7 +172,7 @@ void AlarmSetTimeView::RefreshSetTime(uint32_t time)
     }\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
index df9e819..397430b 100755 (executable)
@@ -77,8 +77,6 @@ AlarmSetWeekView::~AlarmSetWeekView()
     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
index 45532fe..f6da821 100755 (executable)
@@ -164,7 +164,6 @@ void MainAlarmView::NewClockCtl(int16_t alarmNum)
         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};
@@ -301,17 +300,17 @@ void MainAlarmView::RefreshAlarm(void)
     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;
         }
@@ -509,7 +508,7 @@ bool MainAlarmView::ClickFunc(int16_t interface)
     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;
             }
index c233658..869857e 100755 (executable)
@@ -7,10 +7,10 @@
 #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
index 8c99e8e..5ce9f86 100755 (executable)
@@ -6,11 +6,11 @@
 
 #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"
@@ -137,8 +137,8 @@ static int32 CreateListAlarmTodaySmart(void)
 
     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;
@@ -168,8 +168,8 @@ static int32 CreateListAlarmTodayEvent(void)
 
     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;
@@ -221,8 +221,8 @@ static int32 AlarmInfoCheck(const AlarmClockInfo *alarmInfo)
     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;
     }
 
@@ -256,7 +256,7 @@ static int32 AddAndUpdataListAlarmToday(const AlarmClockInfo *alarmInfo)
         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;
     }
@@ -293,7 +293,7 @@ static int32 UpdataListAlarmToday(const AlarmClockInfo *alarmInfo)
     /* 将指定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) +
@@ -367,10 +367,10 @@ static void EventAlarmRingProcess(void)
 
 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) {
@@ -498,7 +498,7 @@ void AlmmgrInitManagement(void)
 
 void AlmmgrAlarmClockEventProcess(const AlarmClockQueueMsg *alarmClockMsg)
 {
-    if (alarmClockMsg == NULL) {
+    if (alarmClockMsg == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlmmgrAlarmClockEventProcess alarmClockMsg is invalid!!");
         return;
     }
@@ -683,8 +683,8 @@ int32 AlmmgrGetManagement(AlarmClockManagement *management)
     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;
     }
 
@@ -715,8 +715,8 @@ int32 GetEventAlarmInfo(uint8 id, AlarmClockInfo *info)
         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;
     }
 
@@ -733,8 +733,8 @@ int32 GetSmartAlarmInfo(AlarmClockInfo *info)
     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;
     }
 
@@ -785,12 +785,12 @@ int32 SetDatetime(int32 argc, char *argv[])
     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;
     }
@@ -850,7 +850,7 @@ int32 DispDatetime(void)
     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);
index 2e55775..56ba901 100755 (executable)
@@ -4,9 +4,9 @@
  * 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
@@ -24,21 +24,21 @@ extern "C" {
 \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
@@ -53,13 +53,13 @@ void AlarmTimerEventPublish(uint16 topic, AlarmClockEventData data)
 \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
@@ -97,7 +97,7 @@ void AlarmScan(void *arg)
     }\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
@@ -106,7 +106,7 @@ void AlarmScan(void *arg)
     }\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
@@ -118,7 +118,7 @@ void AlarmScan(void *arg)
 \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
@@ -135,8 +135,8 @@ int32_t AlarmTimerInit(void)
 \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
@@ -185,10 +185,10 @@ int32_t SetZeroAlarm(void)
 \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
index 67cacbb..12426d6 100644 (file)
@@ -17,8 +17,8 @@
 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
index 9adcaee..bfe2153 100644 (file)
@@ -17,8 +17,8 @@
 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
index 959709d..ea2cc58 100644 (file)
@@ -19,8 +19,8 @@
 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
index 9d45859..5b7f9a6 100644 (file)
@@ -16,8 +16,8 @@
 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
index 48233ff..4b9321a 100644 (file)
@@ -16,8 +16,8 @@
 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
index a1802fd..350da21 100644 (file)
@@ -17,8 +17,8 @@
 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
index 8a62350..c28ddc4 100644 (file)
@@ -23,7 +23,7 @@ namespace OHOS {
 class AlipayListAdapter : public AbstractAdapter {
 public:
     explicit AlipayListAdapter();
-    virtual ~AlipayListAdapter();
+    ~AlipayListAdapter() override;
 
     /* *
      * @brief Sets the UIView adapter data, which is a AlipayListItem linked list.
@@ -41,11 +41,11 @@ public:
      * @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)
     {
index 8e66752..7426222 100644 (file)
@@ -20,13 +20,11 @@ namespace OHOS {
 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;
index 1f7958c..ef9dd02 100644 (file)
@@ -18,7 +18,6 @@
 #include "components/icon_adapter.h"
 #include "AlipayPresenter.h"
 #include "AppViewIDs.h"
-#include "components/ui_label_ext.h"
 #include "UiConfig.h"
 #include "AlipayListAdapter.h"
 #include "AlipayListItem.h"
@@ -27,8 +26,8 @@ namespace OHOS {
 class AlipayListAdapter;
 class AlipayList : public UIViewGroup {
 public:
-    AlipayList(AlipayPresenter *presenter);
-    virtual ~AlipayList();
+    explicit AlipayList(AlipayPresenter *presenter);
+    ~AlipayList() override;
     bool InitListView();
 
 private:
index 6d68a39..f88514a 100644 (file)
@@ -41,7 +41,7 @@ class AlipayMainView;
 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
index a0cf813..4f0d4bb 100644 (file)
@@ -89,9 +89,9 @@ public:
     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
@@ -99,8 +99,8 @@ private:
     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
index 55b2ffb..6ef24cb 100644 (file)
@@ -17,8 +17,8 @@
 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
index 7037034..7a4fc62 100644 (file)
@@ -105,7 +105,7 @@ class AlipayPresenter : public Presenter<AlipayMainView>,
     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
index 800000b..fe03e30 100644 (file)
@@ -18,7 +18,7 @@ namespace OHOS {
 class AlipayRefreshBind : public UIViewGroup {\r
 public:\r
     AlipayRefreshBind();\r
-    virtual ~AlipayRefreshBind();\r
+    ~AlipayRefreshBind() override;\r
     bool InitView();\r
 \r
 private:\r
index 3f65212..deb5a2d 100644 (file)
@@ -17,8 +17,8 @@
 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
index 6a7c235..a5c6714 100644 (file)
@@ -16,8 +16,8 @@
 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
index 14f2a36..fc577b8 100644 (file)
@@ -19,8 +19,8 @@
 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
index 884ef27..d4ba750 100644 (file)
@@ -17,8 +17,8 @@
 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
index 432a9c9..e2af18b 100644 (file)
@@ -17,8 +17,8 @@
 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
index 0b24a7e..2331930 100644 (file)
@@ -23,7 +23,7 @@ namespace OHOS {
 class AlipayTransListAdapter : public AbstractAdapter {
 public:
     explicit AlipayTransListAdapter();
-    virtual ~AlipayTransListAdapter();
+    ~AlipayTransListAdapter() override;
 
     /* *
      * @brief Sets the UIView adapter data, which is a AlipayTransListItem linked list.
@@ -41,11 +41,11 @@ public:
      * @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)
     {
index 1967fa9..6a12a6a 100644 (file)
@@ -20,14 +20,12 @@ namespace OHOS {
 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;
index 61f50ca..23cb4fe 100644 (file)
@@ -19,7 +19,6 @@
 #include "components/icon_adapter.h"
 #include "AlipayPresenter.h"
 #include "AppViewIDs.h"
-#include "components/ui_label_ext.h"
 #include "UiConfig.h"
 #include "AlipayTransListAdapter.h"
 #include "AlipayTransListItem.h"
@@ -32,8 +31,8 @@ static const uint8_t ALIPAY_TRANS_LIST_ITEM_LEN = 20;
 class AlipayTransListAdapter;
 class AlipayTransList : public UIViewGroup {
 public:
-    AlipayTransList(AlipayPresenter *presenter);
-    virtual ~AlipayTransList();
+    explicit AlipayTransList(AlipayPresenter *presenter);
+    ~AlipayTransList() override;
     bool InitListView();
     void AlipayTransListUpdate();
 
index e42fd3a..57a93a1 100644 (file)
@@ -16,8 +16,8 @@
 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
index f6ef45f..0254ab8 100644 (file)
@@ -16,8 +16,8 @@
 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
index 434f151..183b806 100644 (file)
@@ -16,8 +16,8 @@
 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
index 8ac78d6..9221d78 100644 (file)
@@ -17,8 +17,8 @@
 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
index c5740ed..5e8723d 100644 (file)
@@ -231,21 +231,21 @@ bool AlipayBarCode::InitView()
     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
index 6b1e558..7809495 100644 (file)
@@ -101,12 +101,12 @@ bool AlipayBind::InitView()
     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
index c3f7390..4574cb9 100644 (file)
@@ -116,11 +116,11 @@ bool AlipayBindAni::InitView()
     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
index 9a6bd4c..0a33198 100644 (file)
@@ -118,11 +118,11 @@ bool AlipayBindRes::InitView()
     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
index 08944b8..edf88e3 100644 (file)
@@ -131,14 +131,14 @@ bool AlipayExitBind::InitSimilarButton(int16 num, int16 alipayX, int16 alipayY,
 \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
@@ -154,11 +154,11 @@ bool AlipayExitBind::InitView()
     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
index 9f29ded..a772a5c 100644 (file)
@@ -101,12 +101,12 @@ bool AlipayHelp::InitView()
     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
index 3c44c3a..e96e470 100644 (file)
@@ -86,7 +86,7 @@ bool AlipayList::InitListView()
     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;
     }
index 9aca06a..888dff2 100644 (file)
@@ -78,8 +78,11 @@ void AlipayMainView::OnStart()
     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
@@ -87,15 +90,6 @@ void AlipayMainView::OnSetUpView()
 {\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
@@ -112,12 +106,6 @@ void AlipayMainView::OnStop()
 {\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
@@ -278,7 +266,7 @@ bool AlipayMainView::ChangePayView(int16 thisView)
             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
@@ -305,7 +293,7 @@ bool AlipayMainView::ChangeSettingView(int16 thisView)
             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
@@ -328,7 +316,7 @@ bool AlipayMainView::ChangeHelpView(int16 thisView)
             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
@@ -351,7 +339,7 @@ bool AlipayMainView::ChangeBindAniView(int16 thisView)
             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
@@ -374,7 +362,7 @@ bool AlipayMainView::ChangeBindExitView(int16 thisView)
             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
@@ -397,7 +385,7 @@ bool AlipayMainView::ChangeBindResView(int16 thisView)
             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
@@ -427,7 +415,7 @@ bool AlipayMainView::ChangeUnbindView(int16 thisView)
                 "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
@@ -452,7 +440,7 @@ bool AlipayMainView::ChangeUnbindFinishView(int16 thisView)
                 "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
@@ -476,7 +464,7 @@ bool AlipayMainView::ChangeBindView(int16 thisView)
             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
@@ -499,7 +487,7 @@ bool AlipayMainView::ChangeTransView(int16 thisView)
             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
@@ -522,7 +510,7 @@ bool AlipayMainView::ChangeTransListView(int16 thisView)
             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
@@ -546,7 +534,7 @@ bool AlipayMainView::ChangeTransEnableView(int16 thisView)
                 "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
@@ -569,7 +557,7 @@ bool AlipayMainView::ChangeTransTipsView(int16 thisView)
             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
@@ -592,7 +580,7 @@ bool AlipayMainView::ChangeTransResView(int16 thisView)
             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
@@ -616,7 +604,7 @@ bool AlipayMainView::ChangeGetTransListView(int16 thisView)
                 "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
@@ -639,7 +627,7 @@ bool AlipayMainView::ChangeTransAniView(int16 thisView)
             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
@@ -663,7 +651,7 @@ bool AlipayMainView::ChangeBarCodeView(int16 thisView)
             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
@@ -690,7 +678,7 @@ bool AlipayMainView::ChangeListView(int16 thisView)
             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
@@ -737,7 +725,7 @@ bool AlipayMainView::ClickFunc(int16 interface)
     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
@@ -801,7 +789,7 @@ void AlipayMainView::ChangeView(int16 hideView, int16 showView)
         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
index 4c468ea..353c788 100644 (file)
@@ -81,9 +81,9 @@ void AlipayBindTimerCallBack(void *argument)
 \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
@@ -110,10 +110,10 @@ void AlipaySwitchTimerCallBackProc(void *argument)
     }\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
@@ -145,9 +145,9 @@ void AlipaySwitchTimerCallBack(void *argument)
 \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
@@ -166,7 +166,7 @@ bool AlipayModel::AlipayStartSwitchTimer(uint16_t time)
 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
@@ -227,7 +227,7 @@ void AlipayModel::AlipayUnbind(void)
 \r
 void AlipayModel::AlipayStopBindTimer(void)\r
 {\r
-    if (bindTimerId == NULL) {\r
+    if (bindTimerId == nullptr) {\r
         return;\r
     }\r
     int32_t ret = osTimerStop(bindTimerId);\r
@@ -272,10 +272,10 @@ int32_t AlipayModel::AlipayGetLocalTranslist()
 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
@@ -294,7 +294,7 @@ int32_t AlipayModel::AlipayGetOnlineTranslist()
         cardSum_ = onLineNum;\r
     }\r
     free(onLineList);\r
-    onLineList = NULL;\r
+    onLineList = nullptr;\r
     return ret;\r
 }\r
 \r
@@ -310,7 +310,7 @@ int32_t AlipayModel::AlipayCheckTransCard(uint32_t index)
     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
@@ -361,9 +361,9 @@ void AlipayTransGetListsTimerCallBack(void *argument)
 \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
@@ -378,7 +378,7 @@ bool AlipayModel::AlipayTransStartGetListsTimer(void)
 }\r
 void AlipayModel::AlipayTransStopGetListsTimer(void)\r
 {\r
-    if (transTimerId == NULL) {\r
+    if (transTimerId == nullptr) {\r
         return;\r
     }\r
     int32_t ret = osTimerStop(transTimerId);\r
@@ -481,7 +481,7 @@ int32_t AlipayModel::AlipayTransGetCardNum(void)
 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
@@ -498,9 +498,9 @@ bool AlipayModel::AlipayInitModel(void)
 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
index ad73a51..79e738f 100644 (file)
@@ -206,20 +206,20 @@ bool AlipayPayCode::InitView()
     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
index d260f9d..ef16fe9 100644 (file)
@@ -50,7 +50,7 @@ void AlipayPresenter::OnStart()
     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
index 4b2527b..c889eff 100644 (file)
@@ -154,11 +154,11 @@ bool AlipaySetting::InitView()
     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
index 5776b78..0bdadd0 100644 (file)
@@ -129,14 +129,14 @@ bool AlipayGetTransList::InitSimilarButton(int16 num, int16 alipayX, int16 alipa
 \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
@@ -153,11 +153,11 @@ bool AlipayGetTransList::InitGetView(uint32_t index)
     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
index cb34a59..37adb66 100644 (file)
@@ -122,11 +122,11 @@ bool AlipayTransAni::InitView()
     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
index 784472d..2f04595 100644 (file)
@@ -121,16 +121,16 @@ bool AlipayTransCode::InitView()
     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
index 967d616..8b42995 100644 (file)
@@ -111,12 +111,12 @@ bool AlipayTransEnable::InitView()
     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
index bab3370..b777521 100644 (file)
@@ -126,12 +126,12 @@ bool AlipayTransList::InitListView()
     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;
     }
index e0fed12..c7b5558 100644 (file)
@@ -178,16 +178,16 @@ bool AlipayTransRes::InitResView(uint32_t index)
     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
index 2f92fed..1170666 100644 (file)
@@ -154,16 +154,16 @@ bool AlipayTransTips::InitTipsView(uint32_t index)
     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
index 5c6d185..2c081ca 100644 (file)
@@ -130,13 +130,13 @@ bool AlipayUnbind::InitSimilarButton(int16 num, int16 alipayX, int16 alipayY, co
 \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
@@ -152,11 +152,11 @@ bool AlipayUnbind::InitView()
     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
index b7f4940..817d90b 100644 (file)
@@ -126,11 +126,11 @@ bool AlipayUnbindFinish::InitView()
     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
index b6f9568..31eae8f 100755 (executable)
@@ -18,7 +18,7 @@ namespace OHOS {
 class AppItemView : public UIViewGroup {
 public:
     explicit AppItemView();
-    virtual ~AppItemView();
+    ~AppItemView() override;
     void SetItemInfo(const AppItem &itemInfo);
     AppViewId GetViewId();
     const char *GetAppUid();
@@ -37,7 +37,7 @@ private:
 class HexagonsItemView : public UIImageView {
 public:
     explicit HexagonsItemView();
-    virtual ~HexagonsItemView();
+    ~HexagonsItemView();
     void SetItemInfo(const AppItem &itemInfo);
     AppViewId GetViewId();
     const char *GetAppUid();
index c4dc50b..5302fbc 100755 (executable)
@@ -24,7 +24,7 @@ namespace OHOS {
 class ApplistAdapter : public AbstractAdapter {
 public:
     explicit ApplistAdapter();
-    virtual ~ApplistAdapter();
+    ~ApplistAdapter() override;
 
     /* *
      * @brief Obtains the <b>data</b> size of the UILabel adapter.
@@ -33,11 +33,11 @@ public:
      * @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)
     {
index c0d53a2..bcb6ec7 100755 (executable)
 
 namespace OHOS {
     class ApplistPresenter : public Presenter<ApplistView>, public UIView::OnClickListener,
-                             public ListScrollListener {
+                             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);
@@ -46,4 +47,4 @@ namespace OHOS {
     };
 }
 
-#endif // APPLIST_PRESENTER_H
\ No newline at end of file
+#endif // APPLIST_PRESENTER_H
index 6689efb..a1c5e91 100755 (executable)
@@ -30,8 +30,8 @@ public:
     {
         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);
@@ -40,7 +40,7 @@ public:
         return false;
     }
 
-    virtual bool OnDrag(UIView& view, const DragEvent& event)
+    bool OnDrag(UIView& view, const DragEvent& event) override
     {
         UNUSED(view);
         if (!continueDrag) {
@@ -50,13 +50,13 @@ public:
         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);
@@ -70,12 +70,12 @@ class ApplistPresenter;
 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();
@@ -96,11 +96,8 @@ private:
     /* for hexagons style */
     UICustomHexagonsList* hexagonsList_{nullptr};
     std::list<HexagonsItemView*> listHexagonsView_;
-    int16_t horMargin_ = 0;
-    int16_t verMargin_ = 0;
     uint16_t imgSize_ = 0;
     uint16_t imgDistance_ = 0;
-
 };
 }
 #endif // APPLIST_VIEW_H
\ No newline at end of file
index f6a21be..c7fd860 100755 (executable)
@@ -5,7 +5,7 @@
  * Create: 2021-09-18
  */
 
-#include "stdint.h"
+#include <cstdint>
 #include "mem_util.h"
 #include "bundle_info_utils.h"
 #include "securec.h"
@@ -62,11 +62,9 @@ namespace OHOS {
 
     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);
             }
 
@@ -79,18 +77,19 @@ namespace OHOS {
         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;
@@ -149,8 +148,8 @@ namespace OHOS {
 
     void ApplistModel::ApplistUpdate(void)
     {
+        ResolvingJSAppItems();
         if (presenter != nullptr) {
-            ResolvingJSAppItems();
             presenter->GetAppListView()->ClearAppItemToList();
             const AppItem *itemInfo = GetApplistItems();
             for (uint8 i = 0; i < GetAppListNum(); i++) {
index 49e02f8..cf68b21 100755 (executable)
@@ -8,6 +8,8 @@
 #include "ApplistPresenter.h"
 #include "ability_manager.h"
 #include "securec.h"
+#include "components/ui_hexagons_list.h"
+#include "TransitionType.h"
 
 namespace OHOS {
     ApplistPresenter::ApplistPresenter()
@@ -18,7 +20,8 @@ namespace OHOS {
         model->SetPresenter(this);
     }
 
-    ApplistPresenter::~ApplistPresenter() {
+    ApplistPresenter::~ApplistPresenter()
+    {
         if (keyActListenr != nullptr) {
             delete keyActListenr;
             keyActListenr = nullptr;
@@ -64,23 +67,57 @@ namespace OHOS {
         Presenter<ApplistView>::OnStop();
     }
 
+    bool ApplistPresenter::OnRotate(UIView& view, const RotateEvent& event)
+    {
+        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;
-        if (GetIsUseListStyle() == true) {
-            AppItemView *itemView = static_cast<AppItemView *>(&view);
+        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 = static_cast<HexagonsItemView *>(&view);
+            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
@@ -151,4 +188,4 @@ namespace OHOS {
         return view_;
     }
 
-}
\ No newline at end of file
+}
index 07b7ef0..0f3d9bb 100755 (executable)
@@ -33,7 +33,7 @@ ApplistView::~ApplistView()
     if (dragListener != nullptr) {
         delete dragListener;
         dragListener = nullptr;
-    }  
+    }
     if (hexagonsList_ != nullptr) {
         delete hexagonsList_;
         hexagonsList_ = nullptr;
@@ -44,9 +44,7 @@ void ApplistView::OnStart()
 {
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::OnStart ");
     View<ApplistPresenter>::OnStart();
-    SetContainerView(new UIViewGroup());
-    container_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
-    if (presenter_->GetIsUseListStyle() == true) {
+    if (presenter_->GetIsUseListStyle()) {
         ListStyleOnStart();
     } else {
         HexagonsStyleOnStart();
@@ -59,11 +57,10 @@ void ApplistView::HexagonsStyleOnStart()
     if (hexagonsList_ == nullptr) {
         hexagonsList_ = new UICustomHexagonsList();
     }
-    container_->Add(hexagonsList_);
     hexagonsList_->SetPosition(0, 0,
-        container_->GetWidth() - 2 * (horMargin_ + 1), container_->GetHeight() - 2 * (verMargin_ + 1)); // 2, two
-    imgDistance_ = container_->GetWidth() * 0.25991; // 0.25991, empirical coefficient
-    imgSize_ = container_->GetWidth() * 0.23348; // 0.23348, empirical coefficient
+        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() ?
@@ -71,11 +68,16 @@ void ApplistView::HexagonsStyleOnStart()
     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;
@@ -109,7 +111,7 @@ void ApplistView::OnSetUpView()
 {
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::OnSetUpView");
     View<ApplistPresenter>::OnSetUpView();
-    if (presenter_->GetIsUseListStyle() == true) {
+    if (presenter_->GetIsUseListStyle()) {
         ListStyleOnSetUpView();
     } else {
         HexagonsStyleOnSetUpView();
@@ -157,16 +159,19 @@ void ApplistView::OnTearDownView()
 void ApplistView::OnStop()
 {
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::OnStop");
-    if (presenter_->GetIsUseListStyle() == true) {
+    if (presenter_->GetIsUseListStyle()) {
         ListStyleOnStop();
     } else {
         HexagonsStyleOnStop();
     }
+    View<ApplistPresenter>::OnStop();
     if (container_ != nullptr) {
         container_->RemoveAll();
+        delete container_;
+        container_ = nullptr;
     }
-    View<ApplistPresenter>::OnStop();
     RootView::GetInstance()->ClearOnKeyActListener();
+    FocusManager::GetInstance()->ClearFocus();
     return;
 }
 
@@ -193,7 +198,7 @@ void ApplistView::ListStyleOnStop()
 
 void ApplistView::AddAppItemToList(const AppItem &item)
 {
-    if (presenter_->GetIsUseListStyle() == true) {
+    if (presenter_->GetIsUseListStyle()) {
         listAdapter_->AddListItem(item);
     } else {
         HexagonsItemView *itemView = new HexagonsItemView();
@@ -209,7 +214,7 @@ void ApplistView::AddAppItemToList(const AppItem &item)
 
 void ApplistView::ClearAppItemToList()
 {
-    if (presenter_->GetIsUseListStyle() == true) {
+    if (presenter_->GetIsUseListStyle()) {
         listAdapter_->ClearItem();
     } else {
         if (hexagonsList_ != nullptr) {
@@ -225,11 +230,10 @@ void ApplistView::ClearAppItemToList()
 void ApplistView::RefreshAppList(void)
 {
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApplistView::RefreshAppList");
-    if (presenter_->GetIsUseListStyle() == true) {
+    if (presenter_->GetIsUseListStyle()) {
         contentList_->RefreshList();
     } else {
         hexagonsList_->LayoutChildren(true);
     }
 }
-
 }
index 8c13dfe..b09e679 100755 (executable)
@@ -21,13 +21,13 @@ class BloodOxygenPresenter : public Presenter<BloodOxygenView>,
                             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
index 5a1b12c..fceeb78 100755 (executable)
@@ -25,7 +25,7 @@ namespace OHOS {
 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
index c940ac8..a217175 100755 (executable)
@@ -39,7 +39,7 @@ BloodOxygenPresenter* BloodOxygenPresenter::GetInstance()
 void BloodOxygenPresenter::OnStart()\r
 {\r
     Presenter<BloodOxygenView>::OnStart();\r
-    SendMsgToUIService(UI_ADD_SLEEP_VETO, 0, NULL, 0);\r
+    SendMsgToUIService(UI_ADD_SLEEP_VETO, 0, nullptr, 0);\r
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BloodOxygenPresenter::On Start ");\r
 }\r
 \r
@@ -47,8 +47,9 @@ void BloodOxygenPresenter::OnPause(void) {}
 \r
 void BloodOxygenPresenter::OnResume(void) {}\r
 \r
-void BloodOxygenPresenter::OnStop(void) {\r
-    SendMsgToUIService(UI_RM_SLEEP_VETO, 0, NULL, 0);\r
+void BloodOxygenPresenter::OnStop(void)\r
+{\r
+    SendMsgToUIService(UI_RM_SLEEP_VETO, 0, nullptr, 0);\r
 }\r
 \r
 bool BloodOxygenPresenter::CheckPointersValue()\r
@@ -85,7 +86,7 @@ bool BloodOxygenPresenter::OnClick(UIView& view, const ClickEvent& event)
     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
@@ -102,12 +103,12 @@ bool BloodOxygenPresenter::OnClick(UIView& view, const ClickEvent& event)
 \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
@@ -122,8 +123,8 @@ void BloodOxygenPresenter::ProgressNotify(void)
 \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
index 553387f..d9c88c0 100755 (executable)
@@ -313,8 +313,6 @@ void BloodOxygenView::OnStart()
 {\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
@@ -323,11 +321,11 @@ void BloodOxygenView::OnStart()
     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
@@ -358,7 +356,7 @@ void BloodOxygenView::OnStart()
     }\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
index 3e9d617..563fe82 100755 (executable)
@@ -22,11 +22,11 @@ namespace OHOS {
 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
index a8703af..a3fd9af 100755 (executable)
@@ -32,7 +32,7 @@ class MainBluetoothView;
 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
index ac24bf1..9bd3eac 100755 (executable)
@@ -106,7 +106,7 @@ void BluetoothCaseListAdapter::ClickAnimation(BluetoothCaseInfo &itemData, Bluet
 {
     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]) &&
index 8e0c806..94ef720 100755 (executable)
@@ -185,7 +185,7 @@ void BluetoothDeviceListView::RefreshText(void)
     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
index e7f807c..c26c7f5 100755 (executable)
@@ -23,7 +23,7 @@ static BluetoothEarPhoneView *g_pBluetoothEarPhoneView{nullptr};
 #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
@@ -143,13 +143,13 @@ UIViewGroup *BluetoothEarPhoneView::InitShowUpView()
 \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
@@ -224,19 +224,19 @@ void BluetoothEarPhoneView::BtEnable()
     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
@@ -244,13 +244,13 @@ void BluetoothEarPhoneView::BtEnable()
     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
@@ -260,7 +260,7 @@ void BluetoothEarPhoneView::BtEnable()
 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
index 94994ca..00057bc 100755 (executable)
@@ -26,12 +26,6 @@ bt_avrcp_tg_bts_cbk g_avrcp_tg_audio_cb;
 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
-{\r
-    return g_avrcpTgStat;\r
-}\r
 \r
 void BtAvrcpVolumeChangedSyncMedia(uint8_t a2dp_volume)\r
 {\r
@@ -102,6 +96,7 @@ void PressButtonStatusCallback(td_u32 keyOperation, td_u32 keyValue)
 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
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "NotifyVolume = %d", audio_volume);\r
     AudioManager::GetInstance().SetVolume(AUDIO_STREAM_MUSIC, audio_volume); // 耳机连接手表场景调节手表音量\r
 }\r
 \r
@@ -236,7 +231,7 @@ void ConnectTgStateChangedCallback(const bd_addr_t *bdAddr, profile_connect_stat
         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
@@ -251,7 +246,7 @@ void ConnectTgStateChangedCallback(const bd_addr_t *bdAddr, profile_connect_stat
 \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
@@ -314,7 +309,7 @@ static void BtAvrcpCtReleaseButtonRspCallback(const bd_addr_t *bd_addr, int32_t
 \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
@@ -326,7 +321,7 @@ static void BtAvrcpCtSupportCompanyCallback(const bd_addr_t *bd_addr, avrcp_ct_s
 \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
@@ -344,7 +339,7 @@ static void BtAvrcpCtSupportEventCallback(const bd_addr_t *bd_addr, avrcp_ct_sup
 \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
@@ -382,7 +377,7 @@ static void BtAvrcpCtGetElementAttriCallback(const bd_addr_t *bd_addr, avrcp_ct_
         }\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
@@ -398,7 +393,7 @@ static void BtAvrcpCtGetElementAttriCallback(const bd_addr_t *bd_addr, avrcp_ct_
 \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
@@ -415,7 +410,7 @@ static void BtAvrcpCtHdlNotifyVolumeRspCbk(avrcp_ct_notification_value_cb_t *not
 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
index 5f668e7..676c018 100755 (executable)
@@ -76,9 +76,9 @@ void BluetoothItemView::SetItemInfo(const BluetoothCaseInfo& itemInfo, bool isCa
     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
index e58b3f6..c8cd31c 100755 (executable)
@@ -4,7 +4,7 @@
  * 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
@@ -31,6 +28,7 @@
 #include "bt_audio_hal_interface.h"\r
 #include "audio_manager_c_wrapper.h"\r
 #include "bts_avrcp_target.h"\r
+#include "msg_center_msg.h"\r
 \r
 namespace OHOS {\r
 \r
@@ -41,7 +39,7 @@ namespace OHOS {
 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
 \r
@@ -190,7 +188,7 @@ void BluetoothModel::SetUpConnedDevicesList()
         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
@@ -647,8 +645,8 @@ static void ACLConnectionSuss(const bd_addr_t &bdAddr)
 {\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
@@ -684,8 +682,8 @@ static void ACLConnectionFail(const bd_addr_t &bdAddr)
     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
@@ -715,36 +713,6 @@ static void ACLConnectionFail(const bd_addr_t &bdAddr)
     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
     BluetoothModel::GetInstance()->SetTagDisconnectView(false);\r
@@ -769,14 +737,8 @@ static void DisconnectedHandle()
 \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
@@ -796,19 +758,21 @@ void BluetoothModel::BtGapAclStateChangedHandle(gap_acl_state_t state, unsigned
     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
-        ACLConnectionSuss(bdAddr);\r
     } else {\r
         ACLConnectionFail(bdAddr);\r
     }\r
 \r
     if ((state == GAP_ACL_STATE_CONNECTED) || (state == GAP_ACL_STATE_LE_CONNECTED)) {\r
         if (BluetoothModel::GetInstance()->ConnectRemoteCheck(&bdAddr)) {\r
-            bool retA2dp = a2dp_src_connect(&bdAddr);\r
-            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "a2dp_src_connect result %d", retA2dp);\r
+            int32_t retA2dp = a2dp_src_connect(&bdAddr);\r
+            if (retA2dp) {\r
+                ACLConnectionFail(bdAddr);\r
+            }\r
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "a2dp_src_connect result 0x%x", retA2dp);\r
         } else {\r
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ingore a2dp_src_connect");\r
         }\r
@@ -826,8 +790,8 @@ void GapAclStateChangedCallback(const bd_addr_t *bdAddr, gap_acl_state_t state,
         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
@@ -875,10 +839,12 @@ static void A2dpSrcConnectstateChanged(bd_addr_t *bdAddr, int connState)
     if (connState == PROFILE_STATE_CONNECTED) {\r
         avrcp_ct_connect(bdAddr);\r
         PhoneAudioManagerSetDeviceConnState(OUT_BLUETOOTH_A2DP, AUDIO_DEVICE_CONNECTED);\r
+        GraphicService::GetInstance()->PostGraphicEvent(std::bind(ACLConnectionSuss, *bdAddr));\r
     }\r
 \r
     if (connState == PROFILE_STATE_DISCONNECTED) {\r
         PhoneAudioManagerSetDeviceConnState(OUT_BLUETOOTH_A2DP, AUDIO_DEVICE_DISCONNECTED);\r
+        GraphicService::GetInstance()->PostGraphicEvent(std::bind(ACLConnectionFail, *bdAddr));\r
     }\r
 }\r
 \r
@@ -906,9 +872,12 @@ static void BleConnStateChangeCallback(unsigned short connId, bd_addr_t *addr, g
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "BleConnStateChangeCallback connId 0x%x, connState 0x%x, pairState 0x%x",\r
                   connId, connState, pairState);\r
     if (GAP_BLE_STATE_DISCONNECTED == connState) { // restart ble adv when disconnected\r
+        /* 通知msg_center,ble状态仍用bt状态,此处不区分 */\r
+        SendMsgToMsgCenterService(BT_DISCONNECTED_TO_MSGCENTER, 0, nullptr, 0);\r
         BleAdvStart();\r
     } else {\r
         BluetoothModel::GetInstance()->SetAdvStartState(false);\r
+        SendMsgToMsgCenterService(BT_CONNECTED_TO_MSGCENTER, 0, nullptr, 0);\r
     }\r
 }\r
 \r
@@ -992,10 +961,10 @@ static void BtGattsRequestWriteCallback(uint8_t serverId, uint16_t connId, gatts
 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
@@ -1011,7 +980,7 @@ static void BtA2dpSnStartAcceptHandler(unsigned long data)
 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
@@ -1172,7 +1141,7 @@ void BtInitCallBacksEx()
     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
@@ -1212,7 +1181,7 @@ static uint32_t GenerateUuidFromString(const char *str, uint8_t len, bt_uuid_t *
 {\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
@@ -1269,7 +1238,7 @@ void BtSppServerAccept(uint8_t server_id)
 {\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
index 86ea73e..a2c3671 100755 (executable)
@@ -46,7 +46,7 @@ void BluetoothOptionsView::RefreshText(void)
 {\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
index 89aa78d..4935ffb 100755 (executable)
@@ -143,7 +143,7 @@ void BluetoothPresenter::ClickOptionsOneButton(void)
         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
index 7fbbc72..e55170d 100755 (executable)
@@ -71,7 +71,7 @@ void MainBluetoothView::OnStart()
     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
@@ -135,11 +135,6 @@ bool MainBluetoothView::ChangeBluetoothDeviceListView(int16_t hideView, int16_t
         }\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
@@ -185,7 +180,6 @@ bool MainBluetoothView::ChangeTipsConnFailMessageView(int16_t hideView, int16_t
         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
@@ -312,8 +306,8 @@ bool MainBluetoothView::ChangeBluetoothReconnectView(int16_t hideView, int16_t t
         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
@@ -324,12 +318,12 @@ void MainBluetoothView::CorrespondingJump(int16_t hideView)
             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
@@ -348,7 +342,6 @@ void MainBluetoothView::ChangeSettingView()
 \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
@@ -356,7 +349,7 @@ void MainBluetoothView::DropEarPhoneView()
     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
@@ -374,7 +367,6 @@ void MainBluetoothView::DropEarListView()
         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
@@ -417,14 +409,12 @@ void MainBluetoothView::DropView(UIView& view)
         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
@@ -463,14 +453,14 @@ void MainBluetoothView::ChangeView(int16_t hideView, int16_t showView)
 {\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
index ffaf77d..552f968 100755 (executable)
@@ -189,7 +189,7 @@ void TipsConnFailMessageView::RefreshNameLabel(const bd_addr_t &bdAddr)
     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
index 3dd80a7..9bab50f 100755 (executable)
@@ -149,7 +149,7 @@ void TipsSuccMessageView::RefreshNameLabel(const bd_addr_t &bdAddr)
     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
index a4c09c2..4a5a697 100755 (executable)
@@ -24,17 +24,17 @@ public:
 \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
index 4bd2900..43bd534 100755 (executable)
@@ -11,7 +11,6 @@
 #include "string"\r
 #include "PhoneService.h"\r
 #include "AppViewIDs.h"\r
-#include "components/ui_label_ext.h"\r
 #include "message.h"\r
 #include "msg_center.h"\r
 \r
@@ -42,18 +41,16 @@ void UsingPhoneChangeStatusCallback(const PhoneCallInfo *phoneCall);
 void UsingPhoneErrorCallback(PhoneServiceErrorType type);\r
 \r
 namespace OHOS {\r
-using namespace std;\r
-\r
 class CallerLogModel {\r
 public:\r
-    typedef enum {\r
+typedef enum {\r
         CallSourcePhone,\r
         CallSourceCat1,\r
     } CallSource;\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
@@ -71,17 +68,17 @@ public:
     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
-    CallSource GetCallSource(void)\r
+CallSource GetCallSource(void)\r
     {\r
         return callsrc;\r
     }\r
@@ -95,10 +92,10 @@ private:
     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
index e66e4fb..23a86fd 100755 (executable)
@@ -19,7 +19,7 @@ class CallerLogView;
 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
index adc309c..935314b 100755 (executable)
@@ -28,9 +28,9 @@ using namespace Graphic;
 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
@@ -45,7 +45,7 @@ public:
 class CallerUIScrollView : public UIScrollView {\r
 public:\r
     CallerUIScrollView() {}\r
-    virtual ~CallerUIScrollView() {}\r
+    ~CallerUIScrollView() {}\r
 \r
     bool OnDragEvent(const DragEvent& event) override\r
     {\r
index c0acd54..c63f185 100755 (executable)
@@ -34,7 +34,6 @@ CallerItemView::CallerItemView(int32 yCoordinates)
     SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);\r
     SetStyle(STYLE_BACKGROUND_OPA, OPA_OPAQUE);\r
     SetTouchable(true);\r
-\r
 }\r
 \r
 CallerItemView::~CallerItemView()\r
@@ -78,11 +77,11 @@ void CallerItemView::InitDateMonTime(time_t seconds)
     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
index facd7fc..68aeab8 100755 (executable)
@@ -7,7 +7,7 @@
 #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"
@@ -29,7 +29,7 @@ static int g_isCall{NO_NUMBER_STATUS}; // 电话状态
 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]{};
 // 电话优先级标志位
@@ -39,15 +39,6 @@ static int g_thirdPriority = NO_NUMBER_STATUS;
 static int g_fourthPriority = NO_NUMBER_STATUS;
 // 是否为手表接听状态
 static bool g_isWatchCallView = false;
-void g_callTimesclean()
-{
-    g_callTimes=0;
-}
-
-void g_callTimesadd()
-{
-    g_callTimes++;
-}
 
 static void SetPriorityNumber()
 {
@@ -76,13 +67,13 @@ 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;
     }
 }
@@ -94,7 +85,7 @@ static void StatusReset()
     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;
@@ -108,22 +99,17 @@ static void CallTimerCallbackProc(int data)
     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)
@@ -134,12 +120,12 @@ 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;
     }
@@ -147,13 +133,13 @@ static void InitCallingTimer()
     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;
     }
@@ -217,7 +203,7 @@ static void CallModelResumePlayer(void)
     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();
     }
@@ -244,7 +230,7 @@ static void ExitMakePhoneSlice(void)
     }
     CallerLogModel::GetInstance()->SetCallStatus(false);
     DisableCallingTimer();
-    if (CallerLogModel::GetInstance()->GetNotifyFlag() == true) {
+    if (CallerLogModel::GetInstance()->GetNotifyFlag()) {
         g_isWatchCallView = false;
     }
 }
@@ -269,7 +255,7 @@ static void IncomingHandle(void)
 // 来电等待界面
 static void WaitingOpreate()
 {
-    if (IsCompleteCallFlow() == false) {
+    if (!IsCompleteCallFlow()) {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[UsingPhoneChangeStatusCallback] is not complete call flow");
         return;
     }
@@ -277,8 +263,9 @@ static void WaitingOpreate()
     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;
     }
@@ -288,7 +275,7 @@ static void WatchActiveHandle(const PhoneCallInfo *phoneCall)
 {
     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;
@@ -296,7 +283,7 @@ static void WatchActiveHandle(const PhoneCallInfo *phoneCall)
         InitCallingTimer();
         CallerLogModel::GetInstance()->SetCallStatus(true);
     }
-    if (CallerLogModel::GetInstance()->GetNotifyFlag() == true) {
+    if (CallerLogModel::GetInstance()->GetNotifyFlag()) {
         g_isWatchCallView = true;
     }
 }
@@ -304,7 +291,7 @@ static void WatchActiveHandle(const PhoneCallInfo *phoneCall)
 static void PhoneActiveHandle(void)
 {
     if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAEKPHONE_SAMPLE ||
-        g_isWatchCallView == true) {
+        g_isWatchCallView) {
         if (GetCurrCallNum() > 1) {
             g_phoneStatus = PHONE_MULTI_STATUS;
             if (GetScoConnectState() == HFP_SCO_STATE_DISCONNECTED) {
@@ -313,7 +300,7 @@ static void PhoneActiveHandle(void)
         }
         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;
@@ -327,7 +314,7 @@ static void PhoneActiveHandle(void)
 static void OppoActiveHandle(const PhoneCallInfo *phoneCall)
 {
     if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAEKPHONE_SAMPLE ||
-        g_isWatchCallView == true) {
+        g_isWatchCallView) {
         if (GetCurrCallNum() > 1) {
             g_phoneStatus = PHONE_MULTI_STATUS;
             return;
@@ -345,27 +332,27 @@ bool MulitplePhoneTextReplaces()
 {
     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;
     }
 
@@ -383,14 +370,15 @@ static bool MultiplePhonesViewDisplay()
             DisableCallingTimer();
             CallerLogModel::GetInstance()->SetMulitplePhoneStatus(true);
             CallerLogModel::GetInstance()->SetCallStatus(true);
-            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;
             }
             return true;
         }
-        if (MulitplePhoneTextReplaces() == false) {
+        if (!MulitplePhoneTextReplaces()) {
             return false;
         }
         return true;
@@ -402,14 +390,14 @@ static bool MultiplePhonesViewDisplay()
 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);
@@ -418,8 +406,9 @@ static void NonWatchFinishHandle(int laststatus)
                 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;
             }
@@ -436,7 +425,7 @@ static void NonWatchFinishHandle(int laststatus)
 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);
@@ -453,28 +442,33 @@ static void WatchFinishHandle(void)
 static void ChangeStatusScreendisplay(int lastStatus)
 {
     if (GetScoConnectState() != HFP_SCO_STATE_CONNECTED) {
-        if (lastStatus == OPERATE_INCOMING) {
-            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ChangeStatusScreendisplay] lastStatus OPERATE_INCOMING");
-        } else if (GetCurrCallNum() == 1 && (lastStatus == OPERATE_DIALING ||
-            lastStatus == OPERATE_ALERTING)) {
-            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ChangeStatusScreendisplay] lastStatus OPERATE_ALERTING");
+        if (lastStatus == HFP_HF_CALL_STATE_ACTIVE) {
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ChangeStatusScreendisplay] STATE_ACTIVE");
+            StatusReset();
+            return;
+        } else if (lastStatus == HFP_HF_CALL_STATE_INCOMING) {
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ChangeStatusScreendisplay] STATE_INCOMING");
+        } else if (GetCurrCallNum() == 1 && (lastStatus == HFP_HF_CALL_STATE_DIALING ||
+            lastStatus == HFP_HF_CALL_STATE_ALERTING)) {
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ChangeStatusScreendisplay] STATE_ALERTING");
         } else if (GetCurrCallNum() > 1) {
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ChangeStatusScreendisplay] GetCurrCallNum MULITE");
             DisableCallingTimer();
             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);
     }
 }
 
@@ -553,7 +547,7 @@ static void ScoConnectHandle(void)
         return;
     }
 
-    if (FindCallListInfoAndSetPriorityNumber() == false) {
+    if (!FindCallListInfoAndSetPriorityNumber()) {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ScoConnectHandle FindCallListInfoAndSetPriorityNumber false");
         return;
     }
@@ -587,17 +581,18 @@ static void ScoConnectHandle(void)
             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;
     }
@@ -613,7 +608,7 @@ void UsingPhoneScoStatausCallback(hfp_sco_connect_state_t state)
 {
     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;
     }
@@ -673,7 +668,7 @@ void CallerLogModel::InitPhoneService()
 }
 
 /* 表盘底部时间显示 */
-string CallerLogModel::InitDateHourTime(void)
+std::string CallerLogModel::InitDateHourTime(void)
 {
     struct tm pTM;
     time_t seconds;
@@ -681,21 +676,21 @@ string CallerLogModel::InitDateHourTime(void)
     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;
     }
@@ -703,19 +698,19 @@ char *CallerLogModel::DisplayCallDuration()
     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) {
@@ -723,7 +718,7 @@ char *CallerLogModel::DisplayCallDuration()
     } else {
         callDuration = hours + ":" + minute + ":" + seconds;
     }
-    return (char *)callDuration.c_str();
+    return callDuration;
 }
 
 /* 拨号与响铃状态显示 */
@@ -733,7 +728,7 @@ void CallerLogModel::SetDialingStatus(const char *text)
     dialingStatus.append(reinterpret_cast<const char*>(text));
 }
 
-string CallerLogModel::GetDialingStatus(void)
+std::string CallerLogModel::GetDialingStatus(void)
 {
     return dialingStatus;
 }
@@ -805,7 +800,7 @@ void CallerLogModel::SetoperateNumber(const char *number, char number_len)
     phoneNumber.append(reinterpret_cast<const char*>(number), number_len);
 }
 
-string CallerLogModel::GetPhoneNumber(void)
+std::string CallerLogModel::GetPhoneNumber(void)
 {
     return phoneNumber;
 }
index 63d74d9..6311f7b 100755 (executable)
@@ -46,7 +46,7 @@ void CallerLogPresenter::OnPause(void) {}
 \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
@@ -65,12 +65,12 @@ void BuletoothHintsCallback(int data)
 /* 开启定时器 */\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
@@ -78,13 +78,13 @@ void CallerLogPresenter::InitBluetoothHints()
     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
@@ -107,13 +107,13 @@ void CallerLogPresenter::BuletoothHintsCallbackProc(int data)
 /* 关闭定时器 */\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
@@ -147,8 +147,8 @@ bool CallerLogPresenter::OnClick(UIView &view, const ClickEvent &event)
         }\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
index ac65dc7..8d44525 100755 (executable)
@@ -41,7 +41,7 @@ CallerLogView::~CallerLogView()
     delete imageView;\r
     imageView = nullptr;\r
 \r
-    if (item.IsEmpty() == false) {\r
+    if (!item.IsEmpty()) {\r
         Vector<CallerItemView *>().Swap(item);\r
     }\r
 \r
@@ -206,18 +206,18 @@ void CallerLogView::OnStart()
     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
index 9f67b81..861d2de 100755 (executable)
@@ -9,7 +9,7 @@
 #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;
index 0b446b9..6fb226b 100755 (executable)
@@ -11,7 +11,7 @@
 #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;
@@ -64,41 +64,43 @@ MainClockView::MainClockView()
 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)
@@ -185,7 +187,7 @@ bool MainClockView::InitCenterCircleView(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;
     }
 
@@ -194,7 +196,7 @@ bool MainClockView::InitCenterCircleView(void)
         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;
     }
 
@@ -203,7 +205,7 @@ bool MainClockView::InitCenterCircleView(void)
         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;
@@ -216,7 +218,7 @@ bool MainClockView::InitHandView(void)
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "secondHand new fail");
         return false;
     }
-    if (LoadClockImage(secondHand, CLOCK_SECONDHAND) == false) {
+    if (!LoadClockImage(secondHand, CLOCK_SECONDHAND)) {
         return false;
     }
 
@@ -225,7 +227,7 @@ bool MainClockView::InitHandView(void)
         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();
@@ -233,7 +235,7 @@ bool MainClockView::InitHandView(void)
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hourHand new fail");
         return false;
     }
-    if (LoadClockImage(hourHand, CLOCK_HOURHAND) == false) {
+    if (!LoadClockImage(hourHand, CLOCK_HOURHAND)) {
         return false;
     }
 
@@ -242,7 +244,7 @@ bool MainClockView::InitHandView(void)
         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;
@@ -281,16 +283,16 @@ bool MainClockView::InitSweepClock(void)
     }
     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;
     }
@@ -300,7 +302,7 @@ bool MainClockView::InitSweepClock(void)
         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;
     }
@@ -311,7 +313,7 @@ bool MainClockView::InitSweepClock(void)
         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;
     }
@@ -323,7 +325,7 @@ bool MainClockView::InitSweepClock(void)
         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;
     }
@@ -352,7 +354,7 @@ bool MainClockView::InitView(void)
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "mainSweepClock new fail");
         return false;
     }
-    if (InitSweepClock() == false) {
+    if (!InitSweepClock()) {
         return false;
     }
 
@@ -422,7 +424,7 @@ void MainClockView::InitDateTime(void)
 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;
index 084a630..704e60d 100755 (executable)
@@ -18,7 +18,7 @@ namespace OHOS {
 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
index 1e20fe6..3dc43f2 100755 (executable)
@@ -19,7 +19,7 @@ namespace OHOS {
 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
index 0913d97..d15e900 100755 (executable)
@@ -8,7 +8,7 @@
 #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
index 72597b5..97cd957 100755 (executable)
@@ -23,7 +23,7 @@ static constexpr float VIEW_CENTERS = 227;
 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
index 00c389a..f3f8357 100755 (executable)
@@ -12,7 +12,6 @@
 #include "ohos_types.h"\r
 #include "UiConfig.h"\r
 #include "AppViewIDs.h"\r
-#include "components/ui_label_ext.h"\r
 #include "CompassView.h"\r
 #include "CompassPresenter.h"\r
 #include "CompassModel.h"\r
@@ -24,16 +23,16 @@ class MainCompassPresenter : public Presenter<CompassView>, public CompassPresen
     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
index fe78abe..b3bacb9 100755 (executable)
@@ -28,7 +28,7 @@ class CompassView;
 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
index 568a655..390c0ae 100755 (executable)
@@ -113,7 +113,7 @@ bool CompassCalibrationView::InitView(void *caller)
 {
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CompassCalibrationView InitView %p", caller);
     bool ret = CreateUIViewGroup();
-    if (ret == false) {
+    if (!ret) {
         return false;
     }
     SetDraggable(true);
index da7f8f4..546dd33 100755 (executable)
@@ -17,7 +17,9 @@ CompassControlView::CompassControlView()
 CompassControlView::~CompassControlView()
 {
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CompassControlView::~CompassControlView()");
-    ClearAll();
+    if (viewiInitStatus) {
+        ClearAll();
+    }
 }
 
 void CompassControlView::ClearAll(void)
@@ -41,7 +43,7 @@ bool CompassControlView::InitView(void)
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CompassCalibrationView::new compassCalibrationView fail");
         return false;
     }
-    if (compassCalibrationView->CreateUIViewGroup() == false) {
+    if (!compassCalibrationView->CreateUIViewGroup()) {
         return false;
     }
 
@@ -50,7 +52,7 @@ bool CompassControlView::InitView(void)
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CompassView::new compassView fail");
         return false;
     }
-    if (compassView->InitPage() == false) {
+    if (!compassView->InitPage()) {
         return false;
     }
     Add(compassView);
index 1675aa8..e9ff3f5 100755 (executable)
@@ -7,7 +7,7 @@
 
 #include <sys/time.h>
 #include "CompassModel.h"
-#include "time.h"
+#include <ctime>
 
 #ifdef __cplusplus
 extern "C" {
@@ -62,7 +62,7 @@ time_t CompassModel::GetLastTime(void)
 time_t CompassModel::GetCurrentTime(void)
 {
     struct timeval tv;
-    gettimeofday(&tv, NULL);
+    gettimeofday(&tv, nullptr);
     return tv.tv_sec;
 }
 
index 48aa8bc..4a48b54 100755 (executable)
@@ -145,15 +145,15 @@ void CompassPresenter::DetermineToRotate(void)
         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
index 5f4b901..5b3bbc2 100755 (executable)
@@ -94,7 +94,7 @@ bool CompassView::InitCompassImage(void)
     }
     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;
     }
@@ -105,7 +105,7 @@ bool CompassView::InitCompassImage(void)
         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;
     }
@@ -116,7 +116,7 @@ bool CompassView::InitCompassImage(void)
         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;
     }
@@ -125,7 +125,7 @@ bool CompassView::InitCompassImage(void)
 
 bool CompassView::InitPage(void)
 {
-    if (InitCompassImage() == false) {
+    if (!InitCompassImage()) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitCompassImage fail");
         ClearAll();
         return false;
@@ -176,7 +176,7 @@ bool CompassView::InitPage(void)
 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;
     }
index b68888a..47ad06a 100755 (executable)
@@ -49,7 +49,7 @@ void ConnectOpenView::ShowUpBackView()
         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
index 6701405..06a0bce 100755 (executable)
@@ -81,7 +81,7 @@ void ConnectPhonePresenter::RemovePair()
 \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
@@ -105,12 +105,12 @@ void ConnectPhonePresenter::ConfirmOnClick()
     (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
@@ -121,7 +121,6 @@ void ConnectPhonePresenter::ConfirmOnClick()
 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
index 0738e4b..3ad8e66 100755 (executable)
@@ -132,14 +132,14 @@ void ConnectPhoneView::ChangeView(int16_t hideView, int16_t showView)
 {\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
index 1a97e8e..3891ec7 100755 (executable)
@@ -1,7 +1,7 @@
 #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
@@ -31,14 +31,14 @@ typedef struct {
 } HeartPoint;\r
 \r
 typedef struct {\r
-    uint16_t perSec;  //每秒心率\r
-    uint16_t rest;  //静息心率\r
-    uint16_t minX;  //最小坐标(实际上是时间)\r
-    uint16_t minValue;  //最小值?\r
-    uint16_t maxX; //最大值时X坐标,相当于第几个测量值\r
-    uint16_t maxValue; //最大值 心率测量值\r
-    uint16_t index;  //value 有效值个数\r
-    Point value[HEART_ALL_POINTS]; //\r
+    uint16_t perSec;\r
+    uint16_t rest;\r
+    uint16_t minX;\r
+    uint16_t minValue;\r
+    uint16_t maxX;\r
+    uint16_t maxValue;\r
+    uint16_t index;\r
+    Point value[HEART_ALL_POINTS];\r
 } HeartInfo;\r
 \r
 #pragma pack(4)\r
index 37615cb..11d02cc 100755 (executable)
@@ -35,7 +35,7 @@ namespace OHOS {
 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
index 54098cc..852053b 100755 (executable)
@@ -24,20 +24,20 @@ using namespace OHOS;
 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
@@ -47,13 +47,13 @@ void HeartDataSubscribeTopic(Topic topic)
 \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
@@ -64,19 +64,19 @@ static void Notify(void *args, const Topic topic, Request* request)
 {\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
@@ -84,7 +84,7 @@ static void Notify(void *args, const Topic topic, Request* request)
         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
index 5ece7d2..8c96435 100755 (executable)
@@ -161,7 +161,7 @@ HeartRateView::HeartRateView()
 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
@@ -208,22 +208,18 @@ HeartRateView *HeartRateView::GetInstance(void)
 \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
@@ -232,35 +228,32 @@ int32_t HeartRateView::SetHeartRateData(Point *rateData, uint32 rateDataSize)
         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
@@ -390,7 +383,6 @@ void HeartRateView::InsertTopAndBottomRateImage(void)
 \r
 void HeartRateView::UpdataTopAndBottomRate(void)\r
 {\r
-    uint16_t bottom, top;\r
     if (chart == nullptr) {\r
         return;\r
     }\r
@@ -427,7 +419,7 @@ void HeartRateView::UpdataTopAndBottomRate(void)
     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
@@ -437,7 +429,7 @@ void HeartRateView::UpdataTopAndBottomRate(void)
     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
@@ -615,13 +607,13 @@ void HeartRateView::InitRefreshInterface(void)
     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
@@ -629,17 +621,12 @@ void HeartRateView::InitRefreshInterface(void)
 // 刷新心率曲线\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
@@ -649,7 +636,7 @@ void HeartRateView::RefreshElectrocardiogram(void)
         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
@@ -658,10 +645,11 @@ void HeartRateView::RefreshElectrocardiogram(void)
         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
index 557cde5..6ad618f 100755 (executable)
@@ -20,7 +20,7 @@ namespace OHOS {
 class IndoorWalkUIScrollView : public UIScrollView {\r
 public:\r
     IndoorWalkUIScrollView() {}\r
-    virtual ~IndoorWalkUIScrollView() {}\r
+    ~IndoorWalkUIScrollView() override {}\r
 \r
     bool OnDragEvent(const DragEvent& event) override\r
     {\r
index 679802a..2afd4ef 100755 (executable)
@@ -7,7 +7,7 @@
 #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
@@ -24,46 +24,45 @@ void DisableIndoorWalkTimer();
 #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
@@ -73,32 +72,32 @@ public:
 \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
index 303045f..40e0e45 100755 (executable)
@@ -48,8 +48,6 @@ private:
     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
 };\r
 } // namespace OHOS\r
 #endif // INDOORWALK_MOTION_VIEW_H
\ No newline at end of file
index b3f4c7d..20755a1 100755 (executable)
@@ -66,7 +66,7 @@ class IndoorWalkPresenter : public Presenter<IndoorWalkView>, public UISwipeView
                                  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
@@ -75,7 +75,7 @@ public:
     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
index 745f0fc..61f676d 100755 (executable)
@@ -19,7 +19,7 @@ namespace OHOS {
 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
index 8b0c1d1..78259fe 100755 (executable)
@@ -19,7 +19,7 @@ namespace OHOS {
 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
index f141257..34dc316 100755 (executable)
@@ -19,7 +19,7 @@ namespace OHOS {
 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
index 005178a..2297aa6 100755 (executable)
@@ -19,7 +19,7 @@ namespace OHOS {
 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
index de2e517..e26fcc3 100755 (executable)
@@ -19,7 +19,7 @@ namespace OHOS {
 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
index 1762a8b..4e3e637 100755 (executable)
@@ -353,8 +353,8 @@ UIViewGroup *CustomizationView::InitPropertiesView()
     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
index ae39724..bcaa1e7 100755 (executable)
@@ -104,12 +104,12 @@ UIViewGroup *IndoorWalkEndView::InitShowUpView()
     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
index ebfb885..a89626e 100755 (executable)
@@ -17,7 +17,7 @@ typedef struct {
 } 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
@@ -40,7 +40,7 @@ void IndoorWalkModel::SetConnectionView(const char* id)
     selectPropertiesID = id;\r
 }\r
 \r
-string IndoorWalkModel::GetConnectionView()\r
+std::string IndoorWalkModel::GetConnectionView()\r
 {\r
     return selectPropertiesID;\r
 }\r
@@ -51,12 +51,12 @@ void IndoorWalkModel::SetTextLableFirstTop(const char *lable, const char *lableU
     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
@@ -67,12 +67,12 @@ void IndoorWalkModel::SetTextLableFirstLeft(const char *lable, const char *lable
     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
@@ -83,12 +83,12 @@ void IndoorWalkModel::SetTextLableFirstRight(const char *lable, const char *labl
     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
@@ -99,12 +99,12 @@ void IndoorWalkModel::SetTextLableFirstBottom(const char *lable, const char *lab
     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
@@ -115,12 +115,12 @@ void IndoorWalkModel::SetTextLableSecondTop(const char *lable, const char *lable
     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
@@ -131,12 +131,12 @@ void IndoorWalkModel::SetTextLableSecondLeft(const char *lable, const char *labl
     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
@@ -147,12 +147,12 @@ void IndoorWalkModel::SetTextLableSecondRight(const char *lable, const char *lab
     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
@@ -163,12 +163,12 @@ void IndoorWalkModel::SetTextLableThirdTop(const char *lable, const char *lableU
     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
@@ -179,12 +179,12 @@ void IndoorWalkModel::SetTextLableThirdBottom(const char *lable, const char *lab
     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
@@ -195,12 +195,12 @@ void IndoorWalkModel::SetTextLableFourth(const char *lable, const char *lableUni
     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
@@ -236,12 +236,12 @@ float IndoorWalkModel::GetCurrentDistances()
 }\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
@@ -249,23 +249,23 @@ char *IndoorWalkModel::DisplayMotionDuration()
     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
@@ -287,12 +287,12 @@ void IndoorWalkTimerCallback()
 /* 开启定时器 */\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
@@ -300,13 +300,13 @@ void InitIndoorWalkTimer()
     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
@@ -314,13 +314,13 @@ void InitIndoorWalkTimer()
 /* 关闭定时器 */\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
index c0d8cf3..6f3efcd 100755 (executable)
@@ -247,15 +247,15 @@ UIViewGroup *IndoorWalkPreparedView::InitShowUpView()
     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
index 6e33f8f..6f817f0 100755 (executable)
@@ -15,7 +15,7 @@
 \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
@@ -78,35 +78,36 @@ void IndoorWalkPresenter::WalkButtonOnClick(const char* id)
 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
@@ -419,71 +420,61 @@ static const IndoorWalkPropertiesMapper g_pWalkPropertiesMapper[] = {
 \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
@@ -550,39 +541,36 @@ void IndoorWalkPresenter::SetCustomizationState(const char *lableUnit)
 \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
@@ -591,7 +579,7 @@ void IndoorWalkPresenter::ModifiesDistances(float value)
     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
index 23bd608..9c7e85f 100755 (executable)
@@ -183,14 +183,14 @@ void IndoorWalkView::ChangeView(int16_t hideView, int16_t showView)
 {\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
index 8a5be9c..a3da2bb 100755 (executable)
@@ -83,13 +83,12 @@ bool MotionPageFifth::InitPageFifthImageView()
 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
index 02dbf59..c16b941 100755 (executable)
@@ -107,8 +107,8 @@ void MotionPageFirst::SetUnitLableTemplate(UILabel *label)
 \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
@@ -139,8 +139,8 @@ bool MotionPageFirst::InitPageFirstLableTopView()
 \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
@@ -172,8 +172,8 @@ bool MotionPageFirst::InitPageFirstLableLeftView()
 \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
@@ -204,8 +204,8 @@ bool MotionPageFirst::InitPageFirstLableRightView()
 \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
@@ -357,23 +357,23 @@ bool MotionPageFirst::InitView(void *caller)
     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
index 4c72740..a43ab8f 100755 (executable)
@@ -44,8 +44,8 @@ MotionPageFourth *MotionPageFourth::GetInstance()
 \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
@@ -153,16 +153,15 @@ bool MotionPageFourth::InitView(void *caller)
     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
index 545fb69..34e136d 100755 (executable)
@@ -81,8 +81,8 @@ void MotionPageSecond::SetLableTemplate(UILabel *label)
 \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
@@ -114,8 +114,8 @@ bool MotionPageSecond::InitPageSecondLableTopView()
 \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
@@ -147,8 +147,8 @@ bool MotionPageSecond::InitPageSecondLableLeftView()
 \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
@@ -292,24 +292,23 @@ bool MotionPageSecond::InitView(void *caller)
     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
index a0898ba..668d78c 100755 (executable)
@@ -71,8 +71,8 @@ void MotionPageThird::SetLableTemplate(UILabel *label)
 \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
@@ -115,8 +115,8 @@ void MotionPageThird::SetUnitLableTemplate(UILabel *label)
 \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
@@ -227,15 +227,15 @@ bool MotionPageThird::InitView(void *caller)
     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
index 877ad1b..1d34972 100755 (executable)
 #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;
@@ -47,7 +34,7 @@ static bool IsNotifyCallStatus()
 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();
@@ -77,8 +64,12 @@ void KeyInputListener::OnKeyLongPress(const KeyEvent& event)
 void KeyInputListener::CallVolumeDipSwitchControl(VolumeChangeStatus status)
 {
     if (MainCallingPresenter::GetInstance() != nullptr && CallerLogModel::GetInstance()->GetCallStatus()) {
-        if (CallerLogModel::GetInstance()->GetVolumeScreenStatus() == true) {
-            volumeSliderEventListener = VolumeSliderEventListener::GetInstance();
+        if (CallerLogModel::GetInstance()->GetVolumeScreenStatus()) {
+            VolumeSettingView *settingView = MainCallingPresenter::GetInstance()->GetvolumeSetting();
+            if (settingView == nullptr) {
+                return;
+            }
+            volumeSliderEventListener = settingView->GetVolumeEventListener();
             if (volumeSliderEventListener == nullptr) {
                 return;
             }
@@ -88,9 +79,13 @@ void KeyInputListener::CallVolumeDipSwitchControl(VolumeChangeStatus status)
             CallerLogModel::GetInstance()->SetVolumeScreenStatus(true);
         }
     }
-    if (IsNotifyCallStatus() == true) {
-        if (NotificationManager::GetInstance()->GetVolumeScreenStatus() == true) {
-            volumeSliderEventListener = VolumeSliderEventListener::GetInstance();
+    if (IsNotifyCallStatus()) {
+        if (NotificationManager::GetInstance()->GetVolumeScreenStatus()) {
+            VolumeSettingView *settingView = GetvolumeSetting();
+            if (settingView == nullptr) {
+                return;
+            }
+            volumeSliderEventListener = settingView->GetVolumeEventListener();
             if (volumeSliderEventListener == nullptr) {
                 return;
             }
@@ -108,24 +103,26 @@ void KeyInputListener::OnKeyRelease(const KeyEvent& event)
     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(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(VOLUMEDOWN);
             } else {
index 88e8381..08529bd 100755 (executable)
@@ -20,7 +20,7 @@ public:
     {
         SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);
     }
-    virtual ~AppGroupView() {}
+    ~AppGroupView() override {}
     virtual bool InitView(void *caller)=0;
     bool initViewStatus{false};
 };
index 1f8f493..366c1be 100644 (file)
@@ -155,6 +155,7 @@ struct DialVideo {
     DialRect rect;\r
     uint32_t offset;\r
     Color32 colorKey;\r
+    uint32_t imgId;\r
 };\r
 \r
 struct DialClick {\r
index e23ad46..dac9ce9 100755 (executable)
@@ -16,7 +16,7 @@
 #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
index 6bc09a0..1d82fac 100644 (file)
@@ -25,9 +25,9 @@ namespace OHOS {
     } DialInfo;\r
 \r
     typedef struct {\r
-      uint8_t dialFlag;\r
-      uint8_t dialId;\r
-      std::string dialFullName;\r
+        uint8_t dialFlag;\r
+        uint8_t dialId;\r
+        std::string dialFullName;\r
     } DialSetting;\r
 \r
     class MainModel {\r
@@ -43,6 +43,10 @@ namespace OHOS {
         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
@@ -53,6 +57,8 @@ namespace OHOS {
         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
index 08fc301..ba48602 100755 (executable)
 #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";
@@ -45,17 +43,17 @@ class MainPresenterSample : public Presenter<MainViewSample>, public ModelListen
                             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;
     bool OnLongPress(UIView& view, const LongPressEvent& event) override;
-    virtual void OnSwipe(UISwipeView& view) override;
+    void OnSwipe(UISwipeView& view) override;
     void SetPage(int8_t id);
     void SetTaskPeroid(CardId cardId);
     void setCallback(ZoomEffect* callback)
@@ -68,6 +66,9 @@ public:
     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);
index 243a5db..f09fd13 100755 (executable)
@@ -36,7 +36,7 @@ class MainPresenterSample;
 class MainViewSample : public View<MainPresenterSample> {
 public:
     MainViewSample();
-    virtual ~MainViewSample();
+    ~MainViewSample() override;
     static MainViewSample *GetInstance(void);
     void OnStart() override;
     void OnSetUpView() override;
@@ -66,7 +66,7 @@ public:
             SetPage(mainClockView->GetViewIndex());
         }
     }
-
+    void SwitchToCard(uint8_t cardId);
     bool IsMainClockPage(void);
     void SetDragFg(bool continFg);
     bool GetDragFg(void);
@@ -90,8 +90,8 @@ private:
     void VerticalViewInit(void);
     void VertViewLoad(void);
     void HorViewLoad(void);
-    UICardPage *InitWathOffDial(DialSetting &setting);
-    UICardPage *InitWathDial(DialSetting &setting);
+    UICardPage *InitWatchOffDial(DialSetting &setting);
+    UICardPage *InitWatchDial(DialSetting &setting);
 };
 } // namespace OHOS
 #endif // MAIN_VIEW_SAMPLE_H
index 8463604..6444c4f 100755 (executable)
@@ -24,6 +24,7 @@ public:
     ModelListenerSample();\r
     virtual ~ModelListenerSample();\r
     virtual void Notify(void) = 0;\r
+    virtual void OnTickEvent(void) {};\r
     void Callback();\r
 };\r
 }\r
index 147a03a..e511ecc 100755 (executable)
@@ -10,7 +10,7 @@
 \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
@@ -20,10 +20,10 @@ namespace OHOS {
 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
@@ -40,7 +40,7 @@ private:
     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
index b8a8b89..0a17cf5 100755 (executable)
@@ -8,7 +8,7 @@
 #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
index f18dac4..07a4156 100755 (executable)
@@ -33,11 +33,12 @@ typedef enum : uint8_t {
     VOLUMEDRAG = 2,
 } VolumeChangeStatus;
 
+class VolumeSettingView;
 class VolumeSliderEventListener : public UISlider::UISliderEventListener,
                                   public UIView::OnClickListener,
                                   public UIView::OnDragListener {
 public:
-    VolumeSliderEventListener();
+    VolumeSliderEventListener(VolumeSettingView *volumeSetting);
     ~VolumeSliderEventListener();
     static VolumeSliderEventListener *GetInstance();
     void OnChange(int32_t progress) override;
@@ -50,6 +51,7 @@ public:
 private:
     int16_t preSound{0};
     int16_t playerCoefficients{0};
+    VolumeSettingView *volumeSettingView{nullptr};
 };
 } // namespace OHOS
 #endif
index 9765a69..63a201e 100755 (executable)
@@ -24,17 +24,13 @@ class VolumeSettingView : public UIViewGroup {
 public:\r
     VolumeSettingView();\r
     ~VolumeSettingView();\r
-    static VolumeSettingView *GetInstance(void);\r
     int16_t sounding{0};\r
 \r
     UISlider *GetProgress(void);\r
     bool SetUpVolume(void);\r
     UIButton *GetIncreaseButton(void);\r
     UIButton *GetDecreaseButton(void);\r
-    int get_progress_vlaue()\r
-    {\r
-        return progress->GetValue();\r
-    }\r
+    VolumeSliderEventListener *GetVolumeEventListener(void);\r
 private:\r
     VolumeSliderEventListener *listener{nullptr};\r
     UISlider *progress{nullptr};\r
index ded3418..d3ad91e 100644 (file)
@@ -5,7 +5,7 @@
 #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"
 
@@ -13,7 +13,7 @@ namespace OHOS {
 class DialArcLabelView : public UIArcLabel, public DialView {
 public:
     DialArcLabelView();
-    virtual ~DialArcLabelView();
+    ~DialArcLabelView() override;
 
     bool SetText(const char* text);
     bool SetTextWithWildcard(const char* text);
index eab0298..2967522 100644 (file)
@@ -12,7 +12,7 @@ namespace OHOS {
 class DialArcProgressView : public UICircleProgress, public DialView {
 public:
     DialArcProgressView();
-    virtual ~DialArcProgressView();
+    ~DialArcProgressView() override;
     void HandleFloatData(float data) override;
 private:
     int32_t value_ = -1;
index 1154955..ef71b9b 100644 (file)
@@ -12,7 +12,6 @@
 #include "heap_base.h"
 #include "OnDialDataUpdateListener.h"
 
-using namespace std;
 namespace OHOS {
 class DialBaseModel : public HeapBase {
 public:
@@ -38,7 +37,7 @@ 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;
     }
index b5ea601..cc45b4d 100644 (file)
@@ -12,7 +12,7 @@ namespace OHOS {
 class DialBoxProgressView : public UIBoxProgress, public DialView {
 public:
     DialBoxProgressView();
-    virtual ~DialBoxProgressView();
+    ~DialBoxProgressView() override;
     void HandleFloatData(float data) override;
 private:
     int32_t value_ = -1;
index 7a67038..443c325 100644 (file)
@@ -5,7 +5,7 @@
 #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"
@@ -22,7 +22,7 @@ enum class ImgAlign {
 class DialDigitalImgView : public UIImageView, public DialView {
 public:
     DialDigitalImgView();
-    virtual ~DialDigitalImgView();
+    ~DialDigitalImgView() override;
 
     void HandleFloatData(float data) override;
 
index f73c2b8..3125ab0 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef DIAL_KALEIDOSCOPE_VIEW_H\r
 #define DIAL_KALEIDOSCOPE_VIEW_H\r
 #include "components/ui_kaleidoscope_view.h"\r
-namespace OHOS{\r
+namespace OHOS {\r
 using DialKaleidoscopeView = UIKaleidoscopeView;\r
 }\r
 #endif\r
index 133ae6b..c551313 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef DIAL_LABEL_VIEW_H
 #define DIAL_LABEL_VIEW_H
 
-#include "stdint.h"
+#include <cstdint>
 #include "DialView.h"
 #include "components/ui_label.h"
 
@@ -13,7 +13,7 @@ namespace OHOS {
 class DialLabelView : public UILabel, public DialView {
 public:
     DialLabelView();
-    virtual ~DialLabelView();
+    ~DialLabelView() override;
 
     bool SetText(const char* text);
     bool SetTextWithWildcard(const char* text);
index 9fd0909..481f394 100644 (file)
@@ -14,7 +14,7 @@ namespace OHOS {
 class DialModelHeartRate : public DialBaseModel {
 public:
     DialModelHeartRate() {}
-    virtual ~DialModelHeartRate() {}
+    ~DialModelHeartRate() override {}
     static DialModelHeartRate* GetInstance()
     {
         static DialModelHeartRate instance;
index c09fbc8..cb6a97c 100644 (file)
@@ -14,7 +14,7 @@ namespace OHOS {
 class DialModelPower : public DialBaseModel {
 public:
     DialModelPower() {}
-    virtual ~DialModelPower() {}
+    ~DialModelPower() override {}
     static DialModelPower* GetInstance()
     {
         static DialModelPower instance;
index 412007d..e1e9930 100644 (file)
@@ -14,7 +14,7 @@ namespace OHOS {
 class DialModelSteps : public DialBaseModel {
 public:
     DialModelSteps() {}
-    virtual ~DialModelSteps() {}
+    ~DialModelSteps() override {}
     static DialModelSteps* GetInstance()
     {
         static DialModelSteps instance;
index d813c65..7da252b 100644 (file)
@@ -14,7 +14,7 @@ namespace OHOS {
 class DialModelTime : public DialBaseModel {
 public:
     DialModelTime() {}
-    virtual ~DialModelTime() {}
+    ~DialModelTime() override {}
     static DialModelTime* GetInstance()
     {
         static DialModelTime instance;
index 837b244..4fa2fbd 100644 (file)
@@ -5,7 +5,7 @@
 #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"
 
@@ -14,7 +14,7 @@ namespace OHOS {
 class DialOptionImgView : public UIImageView, public DialView {
 public:
     DialOptionImgView();
-    virtual ~DialOptionImgView();
+    ~DialOptionImgView() override;
 
     void HandleFloatData(float data) override;
 
index 23d49eb..e1fff0e 100644 (file)
@@ -5,7 +5,7 @@
 #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"
@@ -15,7 +15,7 @@ namespace OHOS {
 class DialRotateImgView : public UIImageView, public DialView {
 public:
     DialRotateImgView();
-    virtual ~DialRotateImgView();
+    ~DialRotateImgView() override;
 
     void HandleFloatData(float data) override;
 
index ef885b6..4800b71 100644 (file)
@@ -12,7 +12,7 @@ namespace OHOS {
 class DialSequenceImgView : public UIImageAnimatorView {
 public:
     DialSequenceImgView();
-    virtual ~DialSequenceImgView();
+    ~DialSequenceImgView() override;
 
     bool SetSequenceRes(const ImageAnimatorInfo* imgSrc, uint8_t imgNum);
 
index a405bd8..e1b48a0 100644 (file)
@@ -11,7 +11,7 @@ namespace OHOS {
 class DialStaticImgView : public UIImageView {
 public:
     DialStaticImgView();
-    virtual ~DialStaticImgView();
+    ~DialStaticImgView() override;
 };
 }
 #endif
index eca3227..7d4c140 100644 (file)
@@ -5,7 +5,7 @@
 #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"
 
@@ -13,7 +13,7 @@ namespace OHOS {
 class DialVideoView : public UILiteSurfaceView {
 public:
     DialVideoView();
-    virtual ~DialVideoView();
+    ~DialVideoView() override;
     bool SetVideoRes(FILE* fp, uint32_t offset);
     bool StartPlay();
     bool ResumePlay();
index 91c68a8..f682261 100644 (file)
@@ -5,11 +5,12 @@
 #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"
@@ -18,7 +19,7 @@ namespace OHOS {
 class DialViewGroup : public UICardPage, public OnDialDataUpdateListener {
 public:
     DialViewGroup();
-    virtual ~DialViewGroup();
+    ~DialViewGroup() override;
 
     /**
     * @brief  Set dial resource path.
@@ -105,6 +106,11 @@ public:
     */
     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_;
@@ -116,6 +122,7 @@ private:
     std::string filePath_;
     FILE* fp_ = nullptr;
     DialVideoView* video_ = nullptr;
+    UIKaleidoscopeView* kaleidoscope_ = nullptr;
 
     typedef struct {
         Rect area;
index 602586a..33bedbe 100644 (file)
@@ -32,7 +32,7 @@ public:
 
     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);
index 50bbd9c..ad7fb06 100755 (executable)
@@ -24,8 +24,6 @@
 #include <fstream>
 #include "thread_adapter.h"
 
-using namespace std;
-
 namespace OHOS {
 HealthAllData g_healthData;
 
@@ -52,8 +50,8 @@ HealthModel *HealthModel::GetInstance(void)
 
 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();
@@ -107,7 +105,7 @@ void HealthModel::PushHealthData(HealthMsg healthMsg)
 
 bool HealthModel::FetchedHealthData(HealthMsg *healthMsg)
 {
-    if (listHealth.IsEmpty() == true) {
+    if (listHealth.IsEmpty()) {
         return false;
     } else {
         MUTEX_Lock(g_healthDataMutex);
@@ -123,8 +121,8 @@ bool HealthModel::InitHealthData(void)
 {
     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();
index 53a0dd3..7cd3c93 100644 (file)
@@ -159,8 +159,7 @@ namespace OHOS {
     void MainModel::InitDialSettings(void)\r
     {\r
         char temp[DIAL_SETTING_VALUE_LEN] = { 0 };\r
-        int len;\r
-        len = UtilsGetValue("dial_setting", temp, DIAL_SETTING_VALUE_LEN);\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
@@ -200,4 +199,24 @@ namespace OHOS {
     {\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
index 0cef9ed..8c9f3c2 100755 (executable)
@@ -10,7 +10,7 @@
 #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"
 
 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;
 
@@ -95,7 +95,7 @@ bool MainPresenterSample::OnClick(UIView &view, const ClickEvent &event)
 {
     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) {
@@ -137,9 +137,9 @@ bool MainPresenterSample::OnLongPress(UIView& view, const LongPressEvent& event)
     UNUSED(view);
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainPresenterSample OnLongPress");
     uint8_t cardId = view_->GetHorCurrentCard();
-    if (cardId != WATCH_FACE ) {
+    if (cardId != WATCH_FACE) {
         SetCardModel::GetInstance().SetSelectedCard(cardId);
-        NativeAbility::GetInstance().ChangeSlice(VIEW_SET_CARD);        
+        NativeAbility::GetInstance().ChangeSlice(VIEW_SET_CARD);
     } else {
         NativeAbility::GetInstance().ChangeSlice(VIEW_SET_DIAL);
     }
@@ -198,7 +198,7 @@ void MainPresenterSample::ProcessDataNotify(void)
     HealthMsg healthMsg;
     uint16_t len;
 
-    while ((HealthModel::GetInstance()->FetchedHealthData(&healthMsg) == true)) {
+    while ((HealthModel::GetInstance()->FetchedHealthData(&healthMsg))) {
         switch (healthMsg.type) {
             case BATTERY_LIFE:
                 break;
@@ -290,4 +290,19 @@ 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();
+}
+
 }
index 899a834..54747cd 100755 (executable)
 #include "MainViewSample.h"
 #include "graphic_service.h"
 
-namespace OHOS
+namespace OHOS {
+static MainViewSample *g_pMainView = nullptr;
+static constexpr uint16_t MESLABLE_X_TMP = 177;
+static constexpr uint16_t MESLABLE_Y_TMP = 212;
+static constexpr uint16_t MESLABLE_WIDTH_TMP = 100;
+static constexpr uint16_t MESLABLE_HEIGHT_TMP = 30;
+static constexpr uint8_t FONT_SIZE_TMP = 24;
+static constexpr uint8_t PULL_MIDDLE_VIEW_OPA = 0;
+
+struct MainViewMapper {
+    CardId id;
+    UICardPage *(MainViewSample::*func)(void);
+};
+
+static const MainViewMapper CardMapper[] = {
+    {WATCH_FACE, &MainViewSample::InitWatchFacePage},
+    {HEART_RATE, &MainViewSample::InitHeartRatePage},
+    {COMPASS, &MainViewSample::InitCompassPage},
+    {ACTIVITY, &MainViewSample::InitActivityPage},
+    {MUSIC_PLAYER, &MainViewSample::InitMusicPlayerPage},
+};
+
+MainViewSample::MainViewSample()
 {
-    static MainViewSample *g_pMainView = nullptr;
-    static constexpr uint16_t MESLABLE_X_TMP = 177;
-    static constexpr uint16_t MESLABLE_Y_TMP = 212;
-    static constexpr uint16_t MESLABLE_WIDTH_TMP = 100;
-    static constexpr uint16_t MESLABLE_HEIGHT_TMP = 30;
-    static constexpr uint8_t FONT_SIZE_TMP = 24;
-    static constexpr uint8_t PULL_MIDDLE_VIEW_OPA = 0;
-
-    struct MainViewMapper
-    {
-        CardId id;
-        UICardPage *(MainViewSample::*func)(void);
-    };
-
-    static const MainViewMapper CardMapper[] = {
-        {WATCH_FACE, &MainViewSample::InitWatchFacePage},
-        {HEART_RATE, &MainViewSample::InitHeartRatePage},
-        {COMPASS, &MainViewSample::InitCompassPage},
-        {ACTIVITY, &MainViewSample::InitActivityPage},
-        {MUSIC_PLAYER, &MainViewSample::InitMusicPlayerPage},
-    };
-
-    MainViewSample::MainViewSample()
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::MainViewSample");
-        g_pMainView = this;
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::MainViewSample");
+    g_pMainView = this;
+}
+
+MainViewSample::~MainViewSample()
+{
+    dropDownView->ClearBackgroundBlur();
+    messageView->ClearBackgroundBlur();
+
+    for (int32_t i = 0; i < MAX_CARD; i++) {
+        recordCard[i] = nullptr;
+        pageStatus[i] = false;
     }
 
-    MainViewSample::~MainViewSample()
-    {
-        dropDownView->ClearBackgroundBlur();
-        messageView->ClearBackgroundBlur();
+    if (mainSwipeGroup != nullptr) {
+        delete mainSwipeGroup;
+        mainSwipeGroup = nullptr;
+    }
 
-        for (int32_t i = 0; i < MAX_CARD; i++)
-        {
-            recordCard[i] = nullptr;
-            pageStatus[i] = false;
-        }
+    if (mainClockView != nullptr) {
+        delete mainClockView;
+        mainClockView = nullptr;
+    }
 
-        if (mainSwipeGroup != nullptr)
-        {
-            delete mainSwipeGroup;
-            mainSwipeGroup = nullptr;
-        }
+    if (activityWeekView != nullptr) {
+        delete activityWeekView;
+        activityWeekView = nullptr;
+    }
 
-        if (mainClockView != nullptr)
-        {
-            delete mainClockView;
-            mainClockView = nullptr;
-        }
+    if (playersView != nullptr) {
+        delete playersView;
+        playersView = nullptr;
+    }
 
-        if (activityWeekView != nullptr)
-        {
-            delete activityWeekView;
-            activityWeekView = nullptr;
-        }
+    if (heartRateView != nullptr) {
+        delete heartRateView;
+        heartRateView = nullptr;
+    }
 
-        if (playersView != nullptr)
-        {
-            delete playersView;
-            playersView = nullptr;
-        }
+    if (dropDownView != nullptr) {
+        delete dropDownView;
+        dropDownView = nullptr;
+    }
 
-        if (heartRateView != nullptr)
-        {
-            delete heartRateView;
-            heartRateView = nullptr;
-        }
+    if (messageView != nullptr) {
+        messageView->RemoveAll();
+        delete messageView;
+        messageView = nullptr;
+    }
 
-        if (dropDownView != nullptr)
-        {
-            delete dropDownView;
-            dropDownView = nullptr;
-        }
+    if (messageLable != nullptr) {
+        delete messageLable;
+        messageLable = nullptr;
+    }
 
-        if (messageView != nullptr)
-        {
-            messageView->RemoveAll();
-            delete messageView;
-            messageView = nullptr;
-        }
+    if (compassControlView != nullptr) {
+        delete compassControlView;
+        compassControlView = nullptr;
+    }
 
-        if (messageLable != nullptr)
-        {
-            delete messageLable;
-            messageLable = nullptr;
-        }
+    if (callback != nullptr) {
+        delete callback;
+        callback = nullptr;
+    }
 
-        if (compassControlView != nullptr)
-        {
-            delete compassControlView;
-            compassControlView = nullptr;
-        }
+    g_pMainView = nullptr;
+}
 
-        if (callback != nullptr)
-        {
-            delete callback;
-            callback = nullptr;
-        }
+MainViewSample *MainViewSample::GetInstance(void)
+{
+    return g_pMainView;
+}
 
-        g_pMainView = nullptr;
-    }
+void MainViewSample::OnStart()
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::OnStart");
+    View<MainPresenterSample>::OnStart();
+    BaseView::RootView(Color::Black().full);
 
-    MainViewSample *MainViewSample::GetInstance(void)
-    {
-        return g_pMainView;
+    mainSwipeGroup = new UICrossView();
+    if (mainSwipeGroup == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "mainSwipeGroup new fail");
+        return;
     }
 
-    void MainViewSample::OnStart()
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::OnStart");
-        View<MainPresenterSample>::OnStart();
-        BaseView::RootView(Color::Black().full);
-
-        mainSwipeGroup = new UICrossView();
-        if (mainSwipeGroup == nullptr)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "mainSwipeGroup new fail");
+    if (callback == nullptr) {
+        callback = new ZoomEffect();
+        if (callback == nullptr) {
+            delete mainSwipeGroup;
+            mainSwipeGroup = nullptr;
+            GRAPHIC_LOGE("SwipeCallback new fail\n");
             return;
         }
+    }
 
-        if (callback == nullptr)
-        {
-            callback = new ZoomEffect();
-            if (callback == nullptr)
-            {
-                delete mainSwipeGroup;
-                mainSwipeGroup = nullptr;
-                GRAPHIC_LOGE("SwipeCallback new fail\n");
-                return;
-            }
-        }
-
-        HorizontalViewInit();
-        HorViewLoad();
-        VerticalViewInit();
-        VertViewLoad();
-        mainSwipeGroup->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
-        mainSwipeGroup->SetAnimatorTime(50); // 50: animator drag time(ms);
-        mainSwipeGroup->SetLoopState(true);
-        mainSwipeGroup->EnableScreenCap(true);
-        mainSwipeGroup->RegisterSwipeCallback(callback);
+    HorizontalViewInit();
+    HorViewLoad();
+    VerticalViewInit();
+    VertViewLoad();
+    mainSwipeGroup->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+    mainSwipeGroup->SetAnimatorTime(50); // 50: animator drag time(ms);
+    mainSwipeGroup->SetLoopState(true);
+    mainSwipeGroup->EnableScreenCap(true);
+    mainSwipeGroup->RegisterSwipeCallback(callback);
+    if (presenter_->IsFromSetCardView()) {
+        presenter_->SetFromSetCardView(false);
+        SwitchToCard(presenter_->GetFromCardId());
+    } else {
         SwitchToClockPage();
-        SetContainerView(mainSwipeGroup);
     }
+    SetContainerView(mainSwipeGroup);
+}
 
-    bool MainViewSample::HorizontalViewInit(void)
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::HorizontalViewInit");
-        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;
+bool MainViewSample::HorizontalViewInit(void)
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::HorizontalViewInit");
+    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;
             }
         }
-        presenter_->setCallback(callback);
-        mainSwipeGroup->SetOnSwipeListener(presenter_);
-        mainSwipeGroup->SetOnLongPressListener(presenter_);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::InitPage over");
-        return true;
     }
+    presenter_->setCallback(callback);
+    mainSwipeGroup->SetOnSwipeListener(presenter_);
+    mainSwipeGroup->SetOnLongPressListener(presenter_);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::InitPage over");
+    return true;
+}
 
-    void MainViewSample::HorViewLoad(void)
-    {
-        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());
-            }
+void MainViewSample::HorViewLoad(void)
+{
+    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());
         }
     }
+}
 
-    void MainViewSample::VerticalViewInit(void)
-    {
-        dropDownView = new PullUpDownView();
-        if (dropDownView == nullptr)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "dropDownView new fail");
-            return;
-        }
-        dropDownView->PreLoad();
-        dropDownView->SetViewId("dropDownView");
-        dropDownView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
-        dropDownView->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);
-
-        messageView = new UICardPage();
-        if (messageView == nullptr)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "messageView new fail");
-            return;
-        }
-        messageView->SetPosition(0, 0);
-        messageView->SetWidth(Screen::GetInstance().GetWidth());
-        messageView->SetHeight(Screen::GetInstance().GetHeight());
-        messageView->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);
-        messageView->SetViewId("messageView");
-        messageView->SetTouchable(true);
-        messageView->SetIntercept(true);
-        messageLable = new UILabel();
-        if (messageLable == nullptr)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "messageLable new fail");
-            return;
-        }
-        messageLable->SetPosition(MESLABLE_X_TMP, MESLABLE_Y_TMP, MESLABLE_WIDTH_TMP, MESLABLE_HEIGHT_TMP);
-        messageLable->SetText("无消息");
-        messageLable->SetAlign(TEXT_ALIGNMENT_CENTER);
-        messageLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_SIZE_TMP);
-        messageLable->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
-        messageView->Add(messageLable);
+void MainViewSample::VerticalViewInit(void)
+{
+    dropDownView = new PullUpDownView();
+    if (dropDownView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "dropDownView new fail");
+        return;
     }
-
-    void MainViewSample::VertViewLoad(void)
-    {
-        mainSwipeGroup->VerAdd(dropDownView, UICrossView::VPage::UP_PAGE);
-        mainSwipeGroup->VerAdd(messageView, UICrossView::VPage::DOWN_PAGE);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::PullViewLoad::Pull View Load complete");
+    dropDownView->PreLoad();
+    dropDownView->SetViewId("dropDownView");
+    dropDownView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+    dropDownView->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);
+
+    messageView = new UICardPage();
+    if (messageView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "messageView new fail");
+        return;
     }
+    messageView->SetPosition(0, 0);
+    messageView->SetWidth(Screen::GetInstance().GetWidth());
+    messageView->SetHeight(Screen::GetInstance().GetHeight());
+    messageView->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);
+    messageView->SetViewId("messageView");
+    messageView->SetTouchable(true);
+    messageView->SetIntercept(true);
+    messageLable = new UILabel();
+    if (messageLable == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "messageLable new fail");
+        return;
+    }
+    messageLable->SetPosition(MESLABLE_X_TMP, MESLABLE_Y_TMP, MESLABLE_WIDTH_TMP, MESLABLE_HEIGHT_TMP);
+    messageLable->SetText("无消息");
+    messageLable->SetAlign(TEXT_ALIGNMENT_CENTER);
+    messageLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_SIZE_TMP);
+    messageLable->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
+    messageView->Add(messageLable);
+}
 
-    void MainViewSample::OnSetUpView()
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::OnSetUpView");
-        View<MainPresenterSample>::OnSetUpView();
+void MainViewSample::VertViewLoad(void)
+{
+    mainSwipeGroup->VerAdd(dropDownView, UICrossView::VPage::UP_PAGE);
+    mainSwipeGroup->VerAdd(messageView, UICrossView::VPage::DOWN_PAGE);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::PullViewLoad::Pull View Load complete");
+}
 
-        // show timerView
-        Draw();
-    }
+void MainViewSample::OnSetUpView()
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::OnSetUpView");
+    View<MainPresenterSample>::OnSetUpView();
 
-    void MainViewSample::OnTearDownView()
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::OnTearDownView");
-        View<MainPresenterSample>::OnTearDownView();
-        return;
-    }
+    // show timerView
+    Draw();
+}
 
-    void MainViewSample::OnStop()
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::OnStop");
-        View<MainPresenterSample>::OnStop();
-        container_ = nullptr;
 
-        messageView->RemoveAll();
-        RootView::GetInstance()->ClearOnKeyActListener();
-        RootView::GetInstance()->RemoveAll();
-        return;
-    }
+void MainViewSample::OnTearDownView()
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::OnTearDownView");
+    View<MainPresenterSample>::OnTearDownView();
+    return;
+}
 
-    UICardPage *MainViewSample::InitWathOffDial(DialSetting &setting)
-    {
-        DialViewGroup *dial = new DialViewGroup();
-        dial->SetDial(setting.dialFullName);
-        return dial;
-    }
+void MainViewSample::OnStop()
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::OnStop");
+    View<MainPresenterSample>::OnStop();
+    container_ = nullptr;
+
+    messageView->RemoveAll();
+    RootView::GetInstance()->ClearOnKeyActListener();
+    RootView::GetInstance()->RemoveAll();
+    return;
+}
 
-    UICardPage *MainViewSample::InitWathDial(DialSetting &setting)
-    {
-        switch (setting.dialId)
-        {
+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)
-    {
-        DialSetting &setting = presenter_->GetDialSetting();
-        if (setting.dialFlag)
-        {
-            mainClockView = InitWathOffDial(setting);
-        }
-        else
-        {
-            mainClockView = InitWathDial(setting);
-        }
+UICardPage *MainViewSample::InitWatchFacePage(void)
+{
+    DialSetting &setting = presenter_->GetDialSetting();
+    if (setting.dialFlag) {
+        mainClockView = InitWatchOffDial(setting);
+    } else {
+        mainClockView = InitWatchDial(setting);
+    }
 
-        if (mainClockView == nullptr)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainClockView new fail");
-            return nullptr;
-        }
-        return mainClockView;
+    if (mainClockView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainClockView new fail");
+        return nullptr;
     }
+    return mainClockView;
+}
 
-    UICardPage *MainViewSample::InitHeartRatePage(void)
-    {
-        heartRateView = new HeartRateView();
-        if (heartRateView == nullptr)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "heartRateView new fail");
-            return nullptr;
-        }
-        return heartRateView;
+UICardPage *MainViewSample::InitHeartRatePage(void)
+{
+    heartRateView = new HeartRateView();
+    if (heartRateView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "heartRateView new fail");
+        return nullptr;
     }
+    return heartRateView;
+}
 
-    UICardPage *MainViewSample::InitActivityPage(void)
-    {
-        activityWeekView = new ActivityWeekView();
-        if (activityWeekView == nullptr)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "activityWeekView new fail");
-            return nullptr;
-        }
-        return activityWeekView;
+UICardPage *MainViewSample::InitActivityPage(void)
+{
+    activityWeekView = new ActivityWeekView();
+    if (activityWeekView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "activityWeekView new fail");
+        return nullptr;
     }
+    return activityWeekView;
+}
 
-    UICardPage *MainViewSample::InitCompassPage(void)
-    {
-        compassControlView = new CompassControlView();
-        if (compassControlView == nullptr)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "compassControlView new fail");
-            return nullptr;
-        }
-        return compassControlView;
+UICardPage *MainViewSample::InitCompassPage(void)
+{
+    compassControlView = new CompassControlView();
+    if (compassControlView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "compassControlView new fail");
+        return nullptr;
     }
+    return compassControlView;
+}
 
-    UICardPage *MainViewSample::InitMusicPlayerPage(void)
-    {
-        playersView = new PlayersView();
-        if (playersView == nullptr)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "playersView new fail");
-            return nullptr;
-        }
-        return playersView;
+UICardPage *MainViewSample::InitMusicPlayerPage(void)
+{
+    playersView = new PlayersView();
+    if (playersView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "playersView new fail");
+        return nullptr;
     }
+    return playersView;
+}
 
-    void MainViewSample::SetPage(int16_t page)
-    {
-        if (mainSwipeGroup != nullptr)
-        {
-            mainSwipeGroup->SetHorCurrentPage(page);
-        }
+void MainViewSample::SetPage(int16_t page)
+{
+    if (mainSwipeGroup != nullptr) {
+        mainSwipeGroup->SetHorCurrentPage(page);
+    }
 
-        if (presenter_ != nullptr)
-        {
-            CardId *cardSettings = presenter_->GetCardSettings();
-            /* page 与CardId 没有对应关系,需要一次转换 */
-            presenter_->SetTaskPeroid(cardSettings[page]);
-        }
+    if (presenter_ != nullptr) {
+        CardId *cardSettings = presenter_->GetCardSettings();
+        /* page 与CardId 没有对应关系,需要一次转换 */
+        presenter_->SetTaskPeroid(cardSettings[page]);
     }
+}
 
-    bool MainViewSample::IsMainClockPage(void)
-    {
-        if (mainSwipeGroup->GetCurrentPageId(0) == mainClockView->GetViewIndex() &&
-            mainSwipeGroup->GetCurrentPageId(1) == 1)
-        { // 0: horizontal; 1: vertical
-            return true;
-        }
-        else
-        {
-            return false;
-        }
+bool MainViewSample::IsMainClockPage(void)
+{
+    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];
+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();
     }
+}
 
 }
index 587a35d..1b1c619 100755 (executable)
@@ -4,7 +4,8 @@
 \r
 namespace OHOS {\r
 \r
-PresenterTask* PresenterTask::GetInstance() {\r
+PresenterTask* PresenterTask::GetInstance()\r
+{\r
     static PresenterTask PresenterTask;\r
     return &PresenterTask;\r
 }\r
index ca79d10..7ca2d4c 100755 (executable)
@@ -25,26 +25,16 @@ namespace OHOS {
 extern "C" {\r
 #endif\r
 \r
-static VolumeSliderEventListener *g_pVolumeSliderEventListener = nullptr;\r
-\r
 constexpr int16_t SOUND_CHANGE = 10;\r
 \r
-VolumeSliderEventListener::VolumeSliderEventListener()\r
+VolumeSliderEventListener::VolumeSliderEventListener(VolumeSettingView *volumeSetting) : volumeSettingView(volumeSetting)\r
 {\r
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VolumeSliderEventListener new");\r
-    g_pVolumeSliderEventListener = this;\r
 }\r
 \r
 VolumeSliderEventListener::~VolumeSliderEventListener()\r
 {\r
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VolumeSliderEventListener::~VolumeSliderEventListener");\r
-    g_pVolumeSliderEventListener = nullptr;\r
-}\r
-\r
-VolumeSliderEventListener *VolumeSliderEventListener::GetInstance()\r
-{\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VolumeSliderEventListener GetInstance");\r
-    return g_pVolumeSliderEventListener;\r
 }\r
 \r
 bool VolumeSliderEventListener::OnClick(UIView& view, const ClickEvent& event)\r
@@ -67,11 +57,6 @@ bool VolumeSliderEventListener::OnClick(UIView& view, const ClickEvent& event)
 void VolumeSliderEventListener::ChangeVolume(VolumeChangeStatus status)\r
 {\r
     ImageInfo *image;\r
-    VolumeSettingView *volumeSettingView = VolumeSettingView::GetInstance();\r
-    if (volumeSettingView == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OnClick:volumeSettingView new fail");\r
-        return;\r
-    }\r
     UISlider *progress = volumeSettingView->GetProgress();\r
     if (progress == nullptr) {\r
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OnClick:progress new fail");\r
@@ -85,7 +70,7 @@ void VolumeSliderEventListener::ChangeVolume(VolumeChangeStatus status)
 \r
     preSound = volumeSettingView->sounding;\r
     if (status == VOLUMEUP) {\r
-        volumeSettingView->sounding  = progress->GetValue() + SOUND_CHANGE;\r
+        volumeSettingView->sounding = progress->GetValue() + SOUND_CHANGE;\r
         if (volumeSettingView->sounding > VOLUME_MAX) {\r
             volumeSettingView->sounding = VOLUME_MAX;\r
         }\r
@@ -136,8 +121,7 @@ void VolumeSliderEventListener::ChangeVolume(VolumeChangeStatus status)
         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
@@ -145,14 +129,13 @@ void VolumeSliderEventListener::ChangeVolume(VolumeChangeStatus status)
 extern BtAvrcpTgInf g_avrcp_srv_inf;\r
 void VolumeSliderEventListener::BtAndLocalVolumeSet(int16_t sounding)\r
 {\r
-    WEARABLE_LOGI(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_LOGD(WEARABLE_LOG_MODULE_APP, "volume 0x%x", volume);\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
-    } else {\r
-        AudioManager::GetInstance().SetVolume(AUDIO_STREAM_MUSIC, sounding); // 本地音量设置\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
@@ -174,11 +157,6 @@ void VolumeSliderEventListener::OnChange(int32_t value)
 \r
 bool VolumeSliderEventListener::OnDrag(UIView& view, const DragEvent& event)\r
 {\r
-    VolumeSettingView *volumeSettingView = VolumeSettingView::GetInstance();\r
-    if (volumeSettingView == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OnDrag::volumeSettingView new fail");\r
-        return false;\r
-    }\r
     if (strcmp(view.GetViewId(), VOLUME_VIEW) == 0) {\r
         if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) {\r
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VolumeSliderEventListener::OnDrag");\r
index c4d3bad..e8eeb4d 100755 (executable)
@@ -10,7 +10,6 @@
 #include "ui_resource_image.h"\r
 \r
 namespace OHOS {\r
-static VolumeSettingView *g_pVolumeSettingView{nullptr};\r
 static constexpr uint16_t BUTTON_X = 182;\r
 static constexpr uint16_t BUTTON_Y = 0;\r
 static constexpr uint16_t BUTTON_Y2 = 363;\r
@@ -27,18 +26,15 @@ constexpr int16_t VOLUME_ERROR = (-1);
 VolumeSettingView::VolumeSettingView()\r
 {\r
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VolumeSettingView::VolumeSettingView");\r
-    g_pVolumeSettingView = this;\r
 }\r
 \r
 VolumeSettingView::~VolumeSettingView()\r
 {\r
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VolumeSettingView::~VolumeSettingView");\r
     RemoveAll();\r
-\r
-    UIView::OnClickListener *click = increaseButton->GetOnClickListener();\r
-    if (click != nullptr) {\r
-        delete click;\r
-        click = nullptr;\r
+    if (listener != nullptr) {\r
+        delete listener;\r
+        listener = nullptr;\r
     }\r
     delete increaseButton;\r
     increaseButton = nullptr;\r
@@ -48,13 +44,6 @@ VolumeSettingView::~VolumeSettingView()
 \r
     delete progress;\r
     progress = nullptr;\r
-\r
-    g_pVolumeSettingView = nullptr;\r
-}\r
-\r
-VolumeSettingView *VolumeSettingView::GetInstance(void)\r
-{\r
-    return g_pVolumeSettingView;\r
 }\r
 \r
 bool VolumeSettingView::SetUpVolume(void)\r
@@ -78,7 +67,7 @@ bool VolumeSettingView::SetUpVolume(void)
     progress->SetRange(VOLUME_MAX, VOLUME_MIN);\r
 \r
     if (listener == nullptr) {\r
-        listener = new VolumeSliderEventListener();\r
+        listener = new VolumeSliderEventListener(this);\r
         if (listener == nullptr) {\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "listener new fail");\r
             return false;\r
@@ -88,9 +77,8 @@ bool VolumeSettingView::SetUpVolume(void)
     progress->SetOnClickListener(listener);\r
     progress->SetOnDragListener(listener);\r
     progress->SetKnobStyle(StyleDefault::GetSliderKnobStyle());\r
-    UIView::OnDragListener *volDragListener = (UIView::OnDragListener *)OHOS::VolumeSliderEventListener::GetInstance();\r
     SetViewId(VOLUME_VIEW);\r
-    SetOnDragListener(volDragListener);\r
+    SetOnDragListener(listener);\r
     SetDraggable(true);\r
     SetTouchable(true);\r
     Add(progress);\r
@@ -117,7 +105,6 @@ UIButton *VolumeSettingView::GetDecreaseButton(void)
 int VolumeSettingView::ShowVolume(void)\r
 {\r
     ImageInfo *image;\r
-    UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::VolumeSliderEventListener::GetInstance();\r
     if (increaseButton == nullptr) {\r
         increaseButton = new UIButton();\r
         if (increaseButton == nullptr) {\r
@@ -129,7 +116,7 @@ int VolumeSettingView::ShowVolume(void)
     increaseButton->SetViewId(INCREASE_BUTTON);\r
     image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_INCREASE_BUTTON, PLAYER_IAMGES);\r
     increaseButton->SetImageSrc(image, image);\r
-    increaseButton->SetOnClickListener(clickListener);\r
+    increaseButton->SetOnClickListener(listener);\r
     Add(increaseButton);\r
 \r
     if (decreaseButton == nullptr) {\r
@@ -143,9 +130,15 @@ int VolumeSettingView::ShowVolume(void)
     decreaseButton->SetViewId(DECREASE_BUTTON);\r
     image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_DECREASE_BUTTON, PLAYER_IAMGES);\r
     decreaseButton->SetImageSrc(image, image);\r
-    decreaseButton->SetOnClickListener(clickListener);\r
+    decreaseButton->SetOnClickListener(listener);\r
     Add(decreaseButton);\r
 \r
     return VOLUME_OK;\r
 }\r
+\r
+VolumeSliderEventListener *VolumeSettingView::GetVolumeEventListener(void)\r
+{\r
+    return listener;\r
+}\r
+\r
 }\r
index b21f8cc..0a9e7ff 100644 (file)
@@ -21,7 +21,7 @@ bool DialModelSteps::GetDialFloatData(DialDataType& type, float& out)
 void DialModelSteps::UpdateSteps(int16_t steps)
 {
     steps_ = static_cast<float>(steps);
-    if(onChangeListener_ != nullptr) {
+    if (onChangeListener_ != nullptr) {
         onChangeListener_->OnDialFloatDataUpdate(DialDataType::DATA_TYPE_STEPS, steps_);
     }
 }
index dbc4eff..2af8cd2 100644 (file)
@@ -71,7 +71,7 @@ static float ConvertHandSecondValueToAngle(int32_t handValue, uint16_t range)
 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;
 
@@ -101,10 +101,10 @@ bool DialModelTime::GetDialFloatData(DialDataType& type, float& out)
             out = static_cast<float>(angleMS_);
             break;
         case DialDataType::DATA_TYPE_TIME_YEAR:
-            out = static_cast<float>((tblock_->tm_year) + 1900);
+            out = static_cast<float>(tblock_->tm_year);
             break;
         case DialDataType::DATA_TYPE_TIME_MONTH:
-            out = static_cast<float>((tblock_->tm_mon) + 1);
+            out = static_cast<float>(tblock_->tm_mon);
             break;
         case DialDataType::DATA_TYPE_TIME_WEEK:
             out = static_cast<float>(tblock_->tm_wday);
index 7770f16..c3cbafb 100644 (file)
@@ -12,7 +12,7 @@ static constexpr int16_t JPEG_HEIGHT_DIVISOR = 2;
 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;
@@ -50,7 +50,6 @@ DialVideoView::~DialVideoView()
     deregisterNotifyScreenStatus(ScreenStatusNotify);
 #endif
     if (videoPlayer_ != nullptr) {
-        videoPlayer_->StopVideoPlay();
         delete videoPlayer_;
     }
 }
@@ -87,6 +86,7 @@ bool DialVideoView::SetVideoRes(FILE* fp, uint32_t offset)
     }
 
     videoPlayer_ = new MediaVideoPlay(surface, fd, offset_, true);
+    videoPlayer_->SetSyncExitMode(true);
 #ifdef SUPPORT_AT_OHOSFWK
     g_videoPlay = videoPlayer_;
     registerNotifyScreenStatus(ScreenStatusNotify);
index 1b022d7..2eea946 100644 (file)
@@ -18,6 +18,10 @@ DialViewGroup::DialViewGroup(void)
 
 DialViewGroup::~DialViewGroup(void)
 {
+    if (kaleidoscope_ != nullptr) {
+        kaleidoscope_->ClearFocus();
+        kaleidoscope_ = nullptr;
+    }
     ClearDial();
 }
 
@@ -82,6 +86,11 @@ void DialViewGroup::PreLoad(void)
         if (video_ != nullptr) {
             video_->StartPlay();
         }
+
+        if (kaleidoscope_ != nullptr) {
+            kaleidoscope_->RequestFocus();
+            kaleidoscope_->StartRotateAnimator();
+        }
         resPreloaded_ = true;
     }
 }
@@ -115,6 +124,10 @@ void DialViewGroup::AddView(UIView* view, bool isDialVideoView)
     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");
@@ -253,6 +266,14 @@ bool DialViewGroup::OnClickEvent(const ClickEvent& event)
 
 void DialViewGroup::ScrollBegin(bool isActive)
 {
+    if (kaleidoscope_ != nullptr) {
+        if (isActive) {
+            kaleidoscope_->ClearFocus();
+            kaleidoscope_->StopRotateAnimator();
+        }
+        return;
+    }
+
     if (video_ == nullptr) {
         return;
     }
@@ -263,6 +284,14 @@ void DialViewGroup::ScrollBegin(bool isActive)
 
 void DialViewGroup::ScrollEnd(bool isActive)
 {
+    if (kaleidoscope_ != nullptr) {
+        if (isActive) {
+            kaleidoscope_->StartRotateAnimator();
+            kaleidoscope_->RequestFocus();
+        }
+        return;
+    }
+
     if (video_ == nullptr) {
         return;
     }
@@ -273,11 +302,24 @@ void DialViewGroup::ScrollEnd(bool isActive)
         } 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;
     }
@@ -289,6 +331,13 @@ void DialViewGroup::CoverBegin(bool isCovered)
 
 void DialViewGroup::CoverEnd(bool isCovered)
 {
+    if (kaleidoscope_ != nullptr) {
+        if (!isCovered) {
+            kaleidoscope_->RequestFocus();
+            kaleidoscope_->StartRotateAnimator();
+        }
+        return;
+    }
     if (video_ == nullptr) {
         return;
     }
@@ -300,4 +349,18 @@ void DialViewGroup::CoverEnd(bool isCovered)
         }
     }
 }
+
+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();
+    }
+}
 }
index 9d02e69..d17de5b 100644 (file)
@@ -7,7 +7,7 @@
 
 #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) {
index 6e54b0a..b2978d1 100644 (file)
@@ -578,6 +578,17 @@ int32_t DialBinParser::ParserDialVideo(FILE* fp)
     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
@@ -633,10 +644,8 @@ int32_t DialBinParser::ParserDialKaleidoscope(FILE* fp)
     fseek(fp, curReadPt, SEEK_SET);\r
 \r
     view->SetSrc(imgInfo);\r
-    view->RequestFocus();\r
     view->SetRotateEventFactor(data->crownRotateStep); // 0.2: rotate event factor\r
     view->SetRotateAnimatorValue(data->animatorRotateStep); // 0.1: rotate animator value\r
-    view->StartRotateAnimator();\r
     dialGroup_->AddView(view);\r
 \r
     UIFree(data);\r
index 761f232..dd1ef4e 100755 (executable)
@@ -19,7 +19,7 @@ class MainCallingView;
 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
@@ -31,12 +31,12 @@ public:
     bool CallingViewDisplay();\r
     bool InitPointerValue();\r
     bool OnClick(UIView& view, const ClickEvent& event) override;\r
+    VolumeSettingView *GetvolumeSetting();\r
 private:\r
     int changeImage{0};\r
     bool HintsHandupClick();\r
     KeyInputListener *keyActListenr{nullptr};\r
     VolumeSettingView *volumeSetting{nullptr};\r
-    UIViewGroup *volumeSettingView{nullptr};\r
 };\r
 }\r
 \r
index 5de273b..2426ea2 100755 (executable)
@@ -139,17 +139,17 @@ UIViewGroup *CallerDisplayView::CreateUIViewGroup()
     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
index eb85ee0..2c19d75 100755 (executable)
@@ -164,7 +164,7 @@ bool CallingView::InitUILabelDisplay()
         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
@@ -195,17 +195,17 @@ UIViewGroup *CallingView::CreateUIViewGroup()
     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
index 7efc14e..99808b2 100755 (executable)
@@ -124,7 +124,7 @@ UIViewGroup *DialingScreenView::CreateUIViewGroup()
     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
index 7b80e99..544d775 100755 (executable)
@@ -30,9 +30,8 @@ MainCallingPresenter::~MainCallingPresenter()
 {\r
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::~MainCallingPresenter");\r
     RootView::GetInstance()->RemoveAll();\r
-    if (volumeSettingView != nullptr) {\r
-        delete volumeSettingView;\r
-        volumeSettingView = nullptr;\r
+    if (volumeSetting != nullptr) {\r
+        delete volumeSetting;\r
         volumeSetting = nullptr;\r
     }\r
     g_pMainView = nullptr;\r
@@ -70,13 +69,13 @@ void MainCallingPresenter::OnStop(void)
 \r
 void MainCallingPresenter::HonrsViewChange()\r
 {\r
-    if (volumeSettingView == nullptr) {\r
+    if (volumeSetting == nullptr) {\r
         volumeSetting = new VolumeSettingView();\r
         if (volumeSetting == nullptr) {\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
@@ -85,10 +84,9 @@ void MainCallingPresenter::HonrsViewChange()
             ImageInfo *image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUTE_BUTTON, PLAYER_IAMGES);\r
             volumeSetting->GetDecreaseButton()->SetImageSrc(image, image);\r
         }\r
-        volumeSettingView = volumeSetting;\r
-        RootView::GetInstance()->Add(volumeSettingView);\r
+        RootView::GetInstance()->Add(volumeSetting);\r
     }\r
-    VolumeSliderEventListener *volumeSliderEventListener = VolumeSliderEventListener::GetInstance();\r
+    VolumeSliderEventListener *volumeSliderEventListener = volumeSetting->GetVolumeEventListener();\r
     if (volumeSliderEventListener == nullptr) {\r
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter::volumeSliderEventListener nullptr err");\r
         return;\r
@@ -96,7 +94,7 @@ void MainCallingPresenter::HonrsViewChange()
 \r
     volumeSliderEventListener->SetPlayerCoefficients(VOLUMEPHONE); // 进度条系数\r
 \r
-    if (InitPointerValue() == false) {\r
+    if (!InitPointerValue()) {\r
         return;\r
     }\r
 \r
@@ -105,14 +103,14 @@ void MainCallingPresenter::HonrsViewChange()
     view_->GetCallingGroup()->SetVisible(false);\r
     view_->GetWaitingGroup()->SetVisible(false);\r
 \r
-    volumeSettingView->SetVisible(true);\r
+    volumeSetting->SetVisible(true);\r
     // 刷新UI\r
     RootView::GetInstance()->Invalidate();\r
 }\r
 \r
 bool MainCallingPresenter::CallingViewDisplay()\r
 {\r
-    if (InitPointerValue() == false) {\r
+    if (!InitPointerValue()) {\r
         return false;\r
     }\r
     view_->GetScreenGroup()->SetVisible(false);\r
@@ -174,7 +172,7 @@ bool MainCallingPresenter::HintsHandupClick()
     }\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
@@ -182,7 +180,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event)
 {\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
@@ -216,7 +214,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event)
         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
@@ -232,4 +230,9 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event)
     }\r
     return true;\r
 }\r
+\r
+VolumeSettingView *MainCallingPresenter::GetvolumeSetting()\r
+{\r
+    return volumeSetting;\r
+}\r
 }
\ No newline at end of file
index 3e2497d..df06f84 100755 (executable)
@@ -121,7 +121,7 @@ void MainCallingView::OnStart()
     View<MainCallingPresenter>::OnStart();\r
     BaseView::RootView(Color::Black().full);\r
 \r
-    if (InitPointerValue() == false) {\r
+    if (!InitPointerValue()) {\r
         return;\r
     }\r
 \r
@@ -132,15 +132,15 @@ void MainCallingView::OnStart()
 \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
@@ -153,7 +153,7 @@ void MainCallingView::OnSetUpView()
 {\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
index 5b1e446..e27e55d 100755 (executable)
@@ -50,10 +50,10 @@ UIViewGroup *WaitingHintsView::CreateUIViewGroup()
     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
index 194e59a..74b1945 100755 (executable)
@@ -17,7 +17,7 @@ class VocassistPresenter;
 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
index e22acc3..8ec9621 100755 (executable)
@@ -106,7 +106,7 @@ namespace OHOS {
     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
index c4c704a..00ffa93 100755 (executable)
@@ -9,7 +9,6 @@
 #include "VocassistView.h"
 #include "VocassistModel.h"
 #include "AppViewIDs.h"
-#include "components/ui_label_ext.h"
 
 #include "NativeAbility.h"
 #include "graphic_service.h"
@@ -36,7 +35,7 @@ static const char g_voiceWordName[SMART_VOICE_INVALID_CMD_ID + 1][CMD_LENGTH] =
 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!!");
@@ -55,11 +54,11 @@ static void RecognVoiceEvent(const SmartVoiceCmdParam data)
         }
     } 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);
@@ -74,7 +73,7 @@ static void RecognVoiceEvent(const SmartVoiceCmdParam data)
 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;
     }
 
index a158f95..5cd75bf 100755 (executable)
@@ -5,7 +5,6 @@
  * Create: 2022-01-18
  */
 #include "AppViewIDs.h"
-#include "components/ui_label_ext.h"
 #include "VocassistPresenter.h"
 #include "PlayersModel.h"
 #include "ui_service.h"
@@ -62,7 +61,6 @@ void VocassistPresenter::VocAssistDeal(int flag)
     
     VocassistModel::GetInstance()->SetExitStatus(CONTINUTE_EXIT_MODE1);
     VoiceAssistance::GetInstance()->DelayDisplayTime(DELAY_SIX_SECONDS);        // 开启定时器,太长时间未操作退出语音助手
-
 }
 
 void VocassistPresenter::OnAnimatorStop(UIView& view) // 播放结束监听
@@ -90,7 +88,7 @@ bool VocassistPresenter::OnClick(UIView& view, const ClickEvent& event) // 语
 {
     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) {
@@ -138,7 +136,6 @@ void VocassistPresenter::OnResume(void) {}
 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);
 }
 }
index ff56910..98705f6 100755 (executable)
@@ -8,7 +8,6 @@
 #include <limits>\r
 #include "cmsis_os.h"\r
 #include "AppViewIDs.h"\r
-#include "components/ui_label_ext.h"\r
 #include "PlayersModel.h"\r
 #include "CallerLogModel.h"\r
 #include "VocassistModel.h"\r
@@ -37,7 +36,7 @@ static constexpr uint16_t WORD_LENGTH = 60;
 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
@@ -99,12 +98,12 @@ VoiceAssistance::~VoiceAssistance()
     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
@@ -145,12 +144,12 @@ void VoiceAssistance::InitImageAnimatorSource(void)
 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
@@ -172,7 +171,7 @@ void VoiceAssistance::InitVocassist(void)
     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
@@ -192,7 +191,7 @@ void VoiceAssistance::InitVocassist(void)
 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
@@ -212,7 +211,7 @@ void VoiceAssistance::VocSwitchApp(uint16_t targetView)
 {\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
@@ -233,7 +232,7 @@ int VoiceAssistance::ChangeViewToPlayer()           // 播放音乐
 {\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
@@ -579,13 +578,13 @@ void VoiceAssistance::CloseVocassist()
 \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
@@ -654,20 +653,20 @@ void VoiceAssistance::DelayDisplayTime(int32_t waitSec)
     }\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
@@ -675,13 +674,13 @@ void VoiceAssistance::DelayDisplayTime(int32_t waitSec)
     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
index 1666ee0..fd0b6c9 100755 (executable)
@@ -7,8 +7,7 @@
 #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"
 
index 98b032a..1e3f0fa 100755 (executable)
 #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"
 #include "PhoneAudio.h"
 
 #ifdef __cplusplus
-extern "C"
-{
+extern "C" {
 #endif
 
 #define MULTI_CALL_MAX_NUME 5 // 最大多路通话路数
-#define CALL_LOG_MAX_NUM 30   // 最多记录30条通话记录,超出后删除最老的记录
+#define CALL_LOG_MAX_NUM 30 // 最多记录30条通话记录,超出后删除最老的记录
 #define NAME_SIZE 20
 #define MAX_PHONE_NUM 20
 #define CALL_VOLUME_MAX 15
 
-    typedef struct
-    {
-        int operate;
-        int lastStatus;
-        char name[NAME_SIZE];
-        unsigned char nameLen;
-        unsigned char tel[MAX_PHONE_NUM];
-        unsigned char telLen;
-        uint32 activeTime;   // 首次电话接通时间点
-        uint32 creationTime; // 通话创建时间(不是接通时间)
-        hfp_hf_calls_info_t unitCalls;
-    } PhoneCallInfo;
-
-    enum OperateType
-    {
-        OPERATE_NO_OPE = 0,       // 无操作
-        OPERATE_DIALING,          // 呼出,正在拨号中
-        OPERATE_ALERTING,         // 呼出,对方响铃
-        OPERATE_INCOMING,         // 来电呼入
-        OPERATE_WAITING,          // 来电呼入(等待)
-        OPERATE_WATCH_ACTIVE,     // 对方呼入,手表接听
-        OPERATE_PHONE_ACTIVE,     // 对方呼入,手机接听  (手表接收到此操作,调用DisconnectSco接口断开SCO连接)
-        OPERATE_PEER_ACTIVE,      // 呼出,对方接听
-        OPERATE_PHONE_HOLD,       // 手机挂起通话
-        OPERATE_WATCH_REJECT,     // 手表拒接来电
-        OPERATE_WATCH_FINISH,     // 手表发起通话结束(挂断通话)
-        OPERATE_NON_WATCH_FINISH, // 非手表发起通话结束(手机挂断+拒接来电)
-    };
-
-    // 通话失败类型
-    typedef enum
-    {
-        ERROR_BT = 0, // 蓝牙
-        ERROR_DIAL,   // 拨号
-    } PhoneServiceErrorType;
-
-    // 通话结束类型
-    typedef enum
-    {
-        CALL_OUTGOING = 0, // 呼出电话
-        CALL_INCOMING,     // 呼入电话
-        CALL_MISSED,       // 未接来电
-    } CallFinishStatus;
-
-    typedef struct
-    {
-        char name[NAME_SIZE];
-        unsigned char nameLen;
-        unsigned char tel[MAX_PHONE_NUM];
-        unsigned char telLen;
-        CallFinishStatus status;
-        uint32 creationTime; // 通话创建时间(不是接通时间)
-        uint32 callDurTime;  // 通话持续时间
-    } CallLogInfo;
-
-    // 通话状态改变回调函数
-    typedef void (*PhoneServiceCallChangedCb)(const PhoneCallInfo *phoneCall);
-    // 电话服务失败回调函数
-    typedef void (*PhoneServiceErrorCb)(PhoneServiceErrorType type, int volume);
-    // sco连接回调函数(状态只有断开和连接两种状态) 通话转移会导致sco连接和断连
-    typedef void (*PhoneServiceScoStatusCb)(hfp_sco_connect_state_t state);
-
-    typedef struct
-    {
-        PhoneServiceCallChangedCb callChanged;
-        PhoneServiceErrorCb phoneServiceErrorCb;
-        PhoneServiceScoStatusCb scoStatusCb;
-    } PhoneServiceCb;
-
-    void AddToCallLog(CallLogInfo *info);
-    /**
-     * @brief 注册电话服务回调函数
-     *
-     * @param phoneServiceFun 注册函数
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    int RegisterCallChangedCb(PhoneServiceCb *phoneServiceFun);
-
-    /**
-     * @brief 电话服务初始化
-     */
-    void PhoneServiceInit(void);
-
-    /**
-     * @brief 手表呼出电话
-     *
-     * @param number 呼出号码
-     * @param len 号码长度,只包括号码数字部分,不包括结尾'\0'
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    int DialCall(unsigned char *number, unsigned char len);
-
-    /**
-     * @brief 手表接听呼入来电
-     *
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    int AcceptIncomingCall(void);
-
-    /**
-     * @brief 手表拒接呼入来电
-     *
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    int RejectIncomingCall(void);
-
-    /**
-     * @brief 手表结束通话
-     *
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    int FinishCall(void);
-
-    /**
-     * @brief 获取当前通话的最新变化状态
-     *
-     * @return 返回值 通话变化状态
-     */
-    int GetCurrCallState(void);
-
-    /**
-     * @brief 判断此次通话是否是完整通话流程
-     *
-     * @return 返回值 true:是;false:不是
-     */
-    bool IsCompleteCallFlow(void);
-
-    /**
-     * @brief 获取当前正在通话路数
-     *
-     * @return 返回值 返回当前正在通话路数
-     */
-    int GetCurrCallNum(void);
-
-    /**
-     * @brief 获取当前通话路数和对应的通话信息
-     *
-     * @param callList 用来接收通话信息,需调用者分配空间,大小为MULTI_CALL_MAX_NUME * sizeof(PhoneCallInfo)
-     * @param listNum callList中PhoneCallInfo个数,大小为MULTI_CALL_MAX_NUME
-     * @param retNum 接收当前正在进行的通话路数
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    int GetCallInfoInCallList(PhoneCallInfo callList[], int listNum, int *retNum);
-
-    /**
-     * @brief 获取当前通话音量大小(0 -15)
-     *
-     * @param volume
-     *
-     * @return 返回值 当前通话音量大小
-     */
-    unsigned char GetCallCurrVolume(void);
-
-    /**
-     * @brief 设置手表通话Speaker音量
-     *
-     * @param volume
-     *
-     * @return 返回值 void
-     */
-    void SetSpeakerVolume(unsigned char volume);
-
-    /**
-     * @brief 设置通话Speaker静音/取消静音
-     *
-     * @param isMute true:设置通话Speaker静音;false:设置通话Speaker取消静音
-     * @return 返回值 成功返回ture,失败返回false
-     */
-    bool SetSpeakerMute(bool isMute);
-
-    /**
-     * @brief 设置通话mic静音/取消静音
-     *
-     * @param isMute true:设置通话mic静音;false:设置通话mic取消静音
-     * @return 返回值 成功返回ture,失败返回false
-     */
-    bool SetMicMute(bool isMute);
-
-    /**
-     * @brief 获取SCO的连接状态
-     *
-     * @return 返回值 返回SCO的连接状态
-     */
-    int GetScoConnectState(void);
-
-    /**
-     * @brief 通话转移到手表
-     *
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    int TransCallToWatch(void);
-
-    /**
-     * @brief 通话转移到手机
-     *
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    int TransCallToMobilePhone(void);
-
-    /**
-     * @brief 获取通话记录
-     *
-     * @param info 接收获取的通话记录,由调用者释放free
-     * @param num 接收通话记录条数
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    int GetCallLog(CallLogInfo **info, int *num);
-
-    /**
-     * @brief 删除第一条通话记录
-     *
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    int RemoveFirstCallLog(void);
-
-    /**
-     * @brief 清空通话记录
-     *
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    int ClearCallLogFile(void);
-
-    /**
-     * @brief 获取蓝牙状态
-     *
-     * @return 返回值 蓝牙连接状态
-     */
-    uint32 GetBtConnectStatus(void);
-
-    /**
-     * @brief 释放蓝牙通话媒体资源
-     *
-     * @return 返回值 无
-     */
-    void AudioRelease(void);
-
-    uint32 GetCallCodec(void);
+typedef struct {
+    int operate;
+    int lastStatus;
+    char name[NAME_SIZE];
+    unsigned char nameLen;
+    unsigned char tel[MAX_PHONE_NUM];
+    unsigned char telLen;
+    uint64 activeTime; // 首次电话接通时间点
+    uint64 creationTime; // 通话创建时间(不是接通时间)
+    hfp_hf_calls_info_t unitCalls;
+} PhoneCallInfo;
+
+enum OperateType {
+    OPERATE_NO_OPE = 0, // 无操作
+    OPERATE_DIALING, // 呼出,正在拨号中
+    OPERATE_ALERTING, // 呼出,对方响铃
+    OPERATE_INCOMING, // 来电呼入
+    OPERATE_WAITING, // 来电呼入(等待)
+    OPERATE_WATCH_ACTIVE, // 对方呼入,手表接听
+    OPERATE_PHONE_ACTIVE, // 对方呼入,手机接听  (手表接收到此操作,调用DisconnectSco接口断开SCO连接)
+    OPERATE_PEER_ACTIVE, // 呼出,对方接听
+    OPERATE_PHONE_HOLD, // 手机挂起通话
+    OPERATE_WATCH_REJECT, // 手表拒接来电
+    OPERATE_WATCH_FINISH, // 手表发起通话结束(挂断通话)
+    OPERATE_NON_WATCH_FINISH, // 非手表发起通话结束(手机挂断+拒接来电)
+};
+
+// 通话失败类型
+typedef enum {
+    ERROR_BT = 0, // 蓝牙
+    ERROR_DIAL, // 拨号
+} PhoneServiceErrorType;
+
+// 通话结束类型
+typedef enum {
+    CALL_OUTGOING = 0, // 呼出电话
+    CALL_INCOMING, // 呼入电话
+    CALL_MISSED, // 未接来电
+} CallFinishStatus;
+
+typedef struct {
+    char name[NAME_SIZE];
+    unsigned char nameLen;
+    unsigned char tel[MAX_PHONE_NUM];
+    unsigned char telLen;
+    CallFinishStatus status;
+    uint32 creationTime; // 通话创建时间(不是接通时间)
+    uint64 callDurTime; // 通话持续时间
+} CallLogInfo;
+
+// 通话状态改变回调函数
+typedef void (*PhoneServiceCallChangedCb)(const PhoneCallInfo *phoneCall);
+// 电话服务失败回调函数
+typedef void (*PhoneServiceErrorCb)(PhoneServiceErrorType type, int volume);
+// sco连接回调函数(状态只有断开和连接两种状态) 通话转移会导致sco连接和断连
+typedef void (*PhoneServiceScoStatusCb)(hfp_sco_connect_state_t state);
+
+typedef struct {
+    PhoneServiceCallChangedCb callChanged;
+    PhoneServiceErrorCb phoneServiceErrorCb;
+    PhoneServiceScoStatusCb scoStatusCb;
+} PhoneServiceCb;
+
+/**
+ * @brief 注册电话服务回调函数
+ *
+ * @param phoneServiceFun 注册函数
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int RegisterCallChangedCb(PhoneServiceCb *phoneServiceFun);
+
+/**
+ * @brief 电话服务初始化
+ */
+void PhoneServiceInit(void);
+
+/**
+ * @brief 手表呼出电话
+ *
+ * @param number 呼出号码
+ * @param len 号码长度,只包括号码数字部分,不包括结尾'\0'
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int DialCall(unsigned char *number, unsigned char len);
+
+/**
+ * @brief 手表接听呼入来电
+ *
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int AcceptIncomingCall(void);
+
+/**
+ * @brief 手表拒接呼入来电
+ *
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int RejectIncomingCall(void);
+
+/**
+ * @brief 手表结束通话
+ *
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int FinishCall(void);
+
+/**
+ * @brief 获取当前通话的最新变化状态
+ *
+ * @return 返回值 通话变化状态
+ */
+int GetCurrCallState(void);
+
+/**
+ * @brief 判断此次通话是否是完整通话流程
+ *
+ * @return 返回值 true:是;false:不是
+ */
+bool IsCompleteCallFlow(void);
+
+/**
+ * @brief 获取当前正在通话路数
+ *
+ * @return 返回值 返回当前正在通话路数
+ */
+int GetCurrCallNum(void);
+
+/**
+ * @brief 获取当前通话路数和对应的通话信息
+ *
+ * @param callList 用来接收通话信息,需调用者分配空间,大小为MULTI_CALL_MAX_NUME * sizeof(PhoneCallInfo)
+ * @param listNum callList中PhoneCallInfo个数,大小为MULTI_CALL_MAX_NUME
+ * @param retNum 接收当前正在进行的通话路数
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int GetCallInfoInCallList(PhoneCallInfo callList[], int listNum, int *retNum);
+
+/**
+ * @brief 获取当前通话音量大小(0 -15)
+ *
+ * @param volume
+ *
+ * @return 返回值 当前通话音量大小
+ */
+unsigned char GetCallCurrVolume(void);
+
+/**
+ * @brief 设置手表通话Speaker音量
+ *
+ * @param volume
+ *
+ * @return 返回值 void
+ */
+void SetSpeakerVolume(unsigned char volume);
+
+/**
+ * @brief 设置通话Speaker静音/取消静音
+ *
+ * @param isMute true:设置通话Speaker静音;false:设置通话Speaker取消静音
+ * @return 返回值 成功返回ture,失败返回false
+ */
+bool SetSpeakerMute(bool isMute);
+
+/**
+ * @brief 设置通话mic静音/取消静音
+ *
+ * @param isMute true:设置通话mic静音;false:设置通话mic取消静音
+ * @return 返回值 成功返回ture,失败返回false
+ */
+bool SetMicMute(bool isMute);
+
+/**
+ * @brief 获取SCO的连接状态
+ *
+ * @return 返回值 返回SCO的连接状态
+ */
+int GetScoConnectState(void);
+
+/**
+ * @brief 通话转移到手表
+ *
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int TransCallToWatch(void);
+
+/**
+ * @brief 通话转移到手机
+ *
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int TransCallToMobilePhone(void);
+
+/**
+ * @brief 获取通话记录
+ *
+ * @param info 接收获取的通话记录,由调用者释放free
+ * @param num 接收通话记录条数
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int GetCallLog(CallLogInfo **info, int *num);
+
+/**
+ * @brief 删除第一条通话记录
+ *
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int RemoveFirstCallLog(void);
+
+/**
+ * @brief 清空通话记录
+ *
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int ClearCallLogFile(void);
+
+/**
+ * @brief 获取蓝牙状态
+ *
+ * @return 返回值 蓝牙连接状态
+ */
+uint32 GetBtConnectStatus(void);
+
+/**
+ * @brief 释放蓝牙通话媒体资源
+ *
+ * @return 返回值 无
+ */
+void AudioRelease(void);
+
+uint32 GetCallCodec(void);
+
+// 添加通话进通话记录文件
+void AddToCallLog(CallLogInfo *info);
 
 #ifdef __cplusplus
 }
index 2d32b2b..8b695c8 100755 (executable)
@@ -85,7 +85,7 @@ bool PhoneAudioSetSpeakerMute(bool isMute)
         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);
@@ -166,7 +166,7 @@ int32 PhoneAudioManagerSetDeviceConnState(AudioDeviceType deviceType, AudioDevic
     }
 
     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;
 }
 
index c781f1f..e90405d 100755 (executable)
@@ -7,12 +7,12 @@
 #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"
 #include "service_id_define.h"
 #include "samgr_lite.h"
 #include "ui_service.h"
+#include "msg_center_msg.h"
+
 #ifdef __cplusplus
-extern "C"
-{
+extern "C" {
 #endif
 
 #define CALL_LOG_PATH "/user/data/calllog.bin"
@@ -39,643 +40,565 @@ extern "C"
 
 #define INVALID_PHONE_SERVICE_VALUE (-1)
 
-    typedef enum
-    {
-        AUDIO_UNKNOW = 0,
-        AUDIO_ACT_INTERRUPT_WATCH_RING, // 手表铃声焦点
-        AUDIO_ACT_INTERRUPT_BT_SCO,     // 蓝牙通话焦点
-        AUDIO_CONN_IN_BT_SCO,
-        AUDIO_CONN_OUT_BT_SCO,
-        AUDIO_STREAM_INIT,
-        AUDIO_STREAM_START_SCO,
-        AUDIO_STREAM_START_DN,
-        AUDIO_STREAM_START_UP,
-    } AudioState;
-
-    static PhoneCallInfo g_callList[MULTI_CALL_MAX_NUME];
-    static uint32 g_currCallNum = 0;
-    static uint32 g_finishOperate = OPERATE_NON_WATCH_FINISH;
-    static uint32 g_scoFlag = HFP_SCO_STATE_DISCONNECTED;     // sco连接状态,同时也表示通话在手表还是在手机
-    static uint32 g_btConnState = PROFILE_STATE_DISCONNECTED; // 蓝牙连接状态
-    static bd_addr_t g_bdAddr;                                // 设备的蓝牙地址
-    static uint32 g_currCallState = HFP_HF_CALL_STATE_FINISHED;
-    static bool g_completeCallFlag = false; // 完整通话流程:从incoming、dialing或alerting开始才算完整
-    static uint32 g_audioState = AUDIO_UNKNOW;
-    static MutexId g_audioMutex;
-    static uint32 g_call_codec = mSBC;
-
-    static int g_hdlUpMic = INVALID_PHONE_SERVICE_VALUE;
-    static int g_hdlUpSco = INVALID_PHONE_SERVICE_VALUE;
-    static int g_hdlDnSpk = INVALID_PHONE_SERVICE_VALUE;
-    static int g_hdlDnSco = INVALID_PHONE_SERVICE_VALUE;
-
-    PhoneServiceCb g_callChanged;
-    void HfpIncomingEventPublish(uint16 topic, hfp_hf_calls_info_t callsInfo);
-
-    static void PhoneServiceScreenCtr(bool turnOnFlag)
-    {
-        if (turnOnFlag)
-        {
-            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);
-        }
+typedef enum {
+    AUDIO_UNKNOW = 0,
+    AUDIO_ACT_INTERRUPT_WATCH_RING, // 手表铃声焦点
+    AUDIO_ACT_INTERRUPT_BT_SCO, // 蓝牙通话焦点
+    AUDIO_CONN_IN_BT_SCO,
+    AUDIO_CONN_OUT_BT_SCO,
+    AUDIO_STREAM_INIT,
+    AUDIO_STREAM_START_SCO,
+    AUDIO_STREAM_START_DN,
+    AUDIO_STREAM_START_UP,
+} AudioState;
+
+static PhoneCallInfo g_callList[MULTI_CALL_MAX_NUME];
+static uint32 g_currCallNum = 0;
+static uint32 g_finishOperate = OPERATE_NON_WATCH_FINISH;
+static uint32 g_scoFlag = HFP_SCO_STATE_DISCONNECTED; // sco连接状态,同时也表示通话在手表还是在手机
+static uint32 g_btConnState = PROFILE_STATE_DISCONNECTED; // 蓝牙连接状态
+static bd_addr_t g_bdAddr; // 设备的蓝牙地址
+static uint32 g_currCallState = HFP_HF_CALL_STATE_FINISHED;
+static bool g_completeCallFlag = false; // 完整通话流程:从incoming、dialing或alerting开始才算完整
+static uint32 g_audioState = AUDIO_UNKNOW;
+static MutexId g_audioMutex;
+static uint32 g_call_codec = mSBC;
+
+static int g_hdlUpMic = INVALID_PHONE_SERVICE_VALUE;
+static int g_hdlUpSco = INVALID_PHONE_SERVICE_VALUE;
+static int g_hdlDnSpk = INVALID_PHONE_SERVICE_VALUE;
+static int g_hdlDnSco = INVALID_PHONE_SERVICE_VALUE;
+
+PhoneServiceCb g_callChanged;
+void HfpIncomingEventPublish(uint16 topic, hfp_hf_calls_info_t callsInfo);
+
+static void PhoneServiceScreenCtr(bool turnOnFlag)
+{
+    if (turnOnFlag) {
+        int32_t timeout = -1;
+        SendMsgToUIService(SCREEN_TURN_ON_TO_UI, 0, &timeout, sizeof(int32_t));
+    } else {
+        SendMsgToUIService(SCREEN_TURN_OFF_TO_UI, 0, nullptr, 0);
     }
+}
 
-    static void InitMutex(void)
-    {
-        g_audioMutex = MUTEX_InitValue();
-    }
+static void InitMutex(void)
+{
+    g_audioMutex = MUTEX_InitValue();
+}
+
+uint32 GetCallCodec(void)
+{
+    return g_call_codec;
+}
 
-    uint32 GetCallCodec(void)
-    {
-        return g_call_codec;
+int RegisterCallChangedCb(PhoneServiceCb *phoneServiceFun)
+{
+    if (phoneServiceFun == nullptr) {
+        return OHOS_FAILURE;
     }
 
-    int RegisterCallChangedCb(PhoneServiceCb *phoneServiceFun)
-    {
-        if (phoneServiceFun == NULL)
-        {
-            return OHOS_FAILURE;
-        }
+    (void)memcpy_s(&g_callChanged, sizeof(g_callChanged), phoneServiceFun, sizeof(g_callChanged));
 
-        (void)memcpy_s(&g_callChanged, sizeof(g_callChanged), phoneServiceFun, sizeof(g_callChanged));
+    return OHOS_SUCCESS;
+}
 
-        return OHOS_SUCCESS;
-    }
+static void CallChangedCb(const PhoneCallInfo *phoneCall)
+{
+    g_callChanged.callChanged(phoneCall);
+}
 
-    static void CallChangedCb(const PhoneCallInfo *phoneCall)
-    {
-        g_callChanged.callChanged(phoneCall);
-    }
+static void PhoneServiceErrorCallback(PhoneServiceErrorType type, int volume)
+{
+    g_callChanged.phoneServiceErrorCb(type, volume);
+}
 
-    static void PhoneServiceErrorCallback(PhoneServiceErrorType type, int volume)
-    {
-        g_callChanged.phoneServiceErrorCb(type, volume);
-    }
+static void ScoStatusCb(hfp_sco_connect_state_t state)
+{
+    g_callChanged.scoStatusCb(state);
+}
 
-    static void ScoStatusCb(hfp_sco_connect_state_t state)
-    {
-        g_callChanged.scoStatusCb(state);
-    }
+int GetCurrCallState(void)
+{
+    return g_currCallState;
+}
 
-    int GetCurrCallState(void)
-    {
-        return g_currCallState;
+// 初始化媒体
+static void AudioInit(void)
+{
+    int32_t ret = PhoneAudioManagerInit();
+    if (ret != OHOS_SUCCESS) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioInit] failed!");
     }
+}
 
-    // 初始化媒体
-    static void AudioInit(void)
-    {
-        int ret;
-        ret = PhoneAudioManagerInit();
-        if (ret != OHOS_SUCCESS)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioInit] [PhoneAudioManagerInit] failed!");
-        }
+// 释放音频焦点
+static void AudioDeactInterrupt(AudioStreamType type)
+{
+    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)) {
+        (void)PhoneAudioManagerDeactInterrupt();
     }
+}
+
+// 申请音频焦点
+static void AudioActInterrupt(AudioStreamType type)
+{
+    int ret = OHOS_SUCCESS;
 
-    // 释放音频焦点
-    static void AudioDeactInterrupt(AudioStreamType type)
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDeactInterrupt] start type: 0x%x, g_audioState: 0x%x",
+    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, audioState:0x%x",
                       type, g_audioState);
+        return;
+    }
 
-        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))
-        {
-            (void)PhoneAudioManagerDeactInterrupt();
+    MUTEX_Lock(g_audioMutex);
+    // 申请蓝牙通话焦点
+    if (type == AUDIO_STREAM_VOICE_CALL_BT_SCO && g_audioState < AUDIO_ACT_INTERRUPT_BT_SCO) {
+        if (g_audioState == AUDIO_ACT_INTERRUPT_WATCH_RING) {
+            AudioDeactInterrupt(AUDIO_STREAM_RING);
         }
-    }
 
-    // 申请音频焦点
-    static void AudioActInterrupt(AudioStreamType type)
-    {
-        int ret = OHOS_SUCCESS;
+        ret = PhoneAudioManagerActInterrupt(type);
+        if (ret == OHOS_SUCCESS) {
+            g_audioState = AUDIO_ACT_INTERRUPT_BT_SCO;
+        }
+    } else if (type == AUDIO_STREAM_RING && g_audioState < AUDIO_ACT_INTERRUPT_WATCH_RING) {
+        ret = PhoneAudioManagerActInterrupt(type);
+        if (ret == OHOS_SUCCESS) {
+            g_audioState = AUDIO_ACT_INTERRUPT_WATCH_RING;
+        }
+    }
 
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] start type: 0x%x, g_audioState: 0x%x",
+    if (ret != OHOS_SUCCESS) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] failed! 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);
-            return;
-        }
+    MUTEX_Unlock(g_audioMutex);
+}
 
-        MUTEX_Lock(g_audioMutex);
-        // 申请蓝牙通话焦点
-        if (type == AUDIO_STREAM_VOICE_CALL_BT_SCO && g_audioState < AUDIO_ACT_INTERRUPT_BT_SCO)
-        {
-            if (g_audioState == AUDIO_ACT_INTERRUPT_WATCH_RING)
-            {
-                AudioDeactInterrupt(AUDIO_STREAM_RING);
-            }
+// 媒体连接SCO设备
+static void AudioConnectScoDevInit(void)
+{
+    int ret;
+
+    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;
+    }
 
-            ret = PhoneAudioManagerActInterrupt(type);
-            if (ret == OHOS_SUCCESS)
-            {
-                g_audioState = AUDIO_ACT_INTERRUPT_BT_SCO;
+    MUTEX_Lock(g_audioMutex);
+    if (g_audioState < AUDIO_STREAM_INIT) {
+        if (g_audioState < AUDIO_CONN_IN_BT_SCO) {
+            // 配置媒体连接SCO设配状态(下行),只有在SCO连接后才能设置
+            ret = PhoneAudioManagerSetDeviceConnState(IN_BLUETOOTH_SCO, AUDIO_DEVICE_CONNECTED);
+            if (ret != OHOS_SUCCESS) {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] sco in ret:%d", ret);
+                MUTEX_Unlock(g_audioMutex);
+                return;
+            } else {
+                g_audioState = AUDIO_CONN_IN_BT_SCO;
             }
         }
-        else if (type == AUDIO_STREAM_RING && g_audioState < AUDIO_ACT_INTERRUPT_WATCH_RING)
-        {
-            ret = PhoneAudioManagerActInterrupt(type);
-            if (ret == OHOS_SUCCESS)
-            {
-                g_audioState = AUDIO_ACT_INTERRUPT_WATCH_RING;
+
+        if (g_audioState < AUDIO_CONN_OUT_BT_SCO) {
+            // 配置媒体连接SCO设配状态(上行),只有在SCO连接后才能设置
+            ret = PhoneAudioManagerSetDeviceConnState(OUT_BLUETOOTH_SCO, AUDIO_DEVICE_CONNECTED);
+            if (ret != OHOS_SUCCESS) {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] sco out ret:%d", ret);
+                MUTEX_Unlock(g_audioMutex);
+                return;
+            } else {
+                g_audioState = AUDIO_CONN_OUT_BT_SCO;
             }
         }
 
-        if (ret != OHOS_SUCCESS)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] failed! type: 0x%x, g_audioState: 0x%x",
-                          type, g_audioState);
+        if (g_hdlUpSco == INVALID_PHONE_SERVICE_VALUE) {
+            g_hdlUpSco = PhoneAudioStreamOutInit(AUDIO_UP_LINK);
         }
 
-        MUTEX_Unlock(g_audioMutex);
-    }
-
-    // 媒体连接SCO设备
-    static void AudioConnectScoDevInit(void)
-    {
-        int ret;
-
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] start g_scoFlag: 0x%x, g_audioState: 0x%x",
-                      g_scoFlag, g_audioState);
-        if (g_scoFlag != HFP_SCO_STATE_CONNECTED || g_audioState < AUDIO_ACT_INTERRUPT_BT_SCO)
-        {
-            return;
+        if (g_hdlDnSco == INVALID_PHONE_SERVICE_VALUE) {
+            g_hdlDnSco = PhoneAudioStreamInInit(AUDIO_DOWN_LINK);
         }
 
-        MUTEX_Lock(g_audioMutex);
-        if (g_audioState < AUDIO_STREAM_INIT)
-        {
-            if (g_audioState < AUDIO_CONN_IN_BT_SCO)
-            {
-                // 配置媒体连接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);
-                    MUTEX_Unlock(g_audioMutex);
-                    return;
-                }
-                else
-                {
-                    g_audioState = AUDIO_CONN_IN_BT_SCO;
-                }
-            }
-
-            if (g_audioState < AUDIO_CONN_OUT_BT_SCO)
-            {
-                // 配置媒体连接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);
-                    MUTEX_Unlock(g_audioMutex);
-                    return;
-                }
-                else
-                {
-                    g_audioState = AUDIO_CONN_OUT_BT_SCO;
-                }
-            }
+        if (g_hdlUpSco != INVALID_PHONE_SERVICE_VALUE && g_hdlDnSco != INVALID_PHONE_SERVICE_VALUE) {
+            g_audioState = AUDIO_STREAM_INIT;
+        }
+    }
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioConnectScoDevInit] end audioState:%d, hdlUpSco:%d, hdlDnSco:%d",
+                  g_audioState, g_hdlUpSco, g_hdlDnSco);
+    MUTEX_Unlock(g_audioMutex);
 
-            if (g_hdlUpSco == INVALID_PHONE_SERVICE_VALUE)
-            {
-                g_hdlUpSco = PhoneAudioStreamOutInit(AUDIO_UP_LINK);
-            }
+    return;
+}
 
-            if (g_hdlDnSco == INVALID_PHONE_SERVICE_VALUE)
-            {
-                g_hdlDnSco = PhoneAudioStreamInInit(AUDIO_DOWN_LINK);
-            }
+// 建立上行通路
+static void AudioUpStart(void)
+{
+    int ret = OHOS_SUCCESS;
+    uint32 micShmId = 0;
 
-            if (g_hdlUpSco != INVALID_PHONE_SERVICE_VALUE && g_hdlDnSco != INVALID_PHONE_SERVICE_VALUE)
-            {
-                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);
-        MUTEX_Unlock(g_audioMutex);
+    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;
     }
 
-    // 建立上行通路
-    static void AudioUpStart(void)
-    {
-        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);
-
-        if (g_scoFlag != HFP_SCO_STATE_CONNECTED || g_audioState < AUDIO_STREAM_INIT)
-        {
-            return;
+    MUTEX_Lock(g_audioMutex);
+    if (g_audioState < AUDIO_STREAM_START_UP) {
+        if (g_hdlUpMic == INVALID_PHONE_SERVICE_VALUE) {
+            g_hdlUpMic = PhoneAudioStreamInInit(AUDIO_UP_LINK);
         }
 
-        MUTEX_Lock(g_audioMutex);
-        if (g_audioState < AUDIO_STREAM_START_UP)
-        {
-            if (g_hdlUpMic == INVALID_PHONE_SERVICE_VALUE)
-            {
-                g_hdlUpMic = PhoneAudioStreamInInit(AUDIO_UP_LINK);
+        if (g_audioState < AUDIO_STREAM_START_SCO) {
+            ret = PhoneAudioStreamInStart(g_hdlDnSco);
+            if (ret != OHOS_SUCCESS) {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] dn_sco ret:%d", ret);
             }
 
-            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);
-                }
-
-                ret |= PhoneAudioStreamOutStart(g_hdlUpSco);
-                if (ret != OHOS_SUCCESS)
-                {
-                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] [AudioStreamOutStart] [up_sco] error ret: %d", ret);
-                }
-                if (ret == OHOS_SUCCESS)
-                {
-                    g_audioState = AUDIO_STREAM_START_SCO;
-                }
+            ret |= PhoneAudioStreamOutStart(g_hdlUpSco);
+            if (ret != OHOS_SUCCESS) {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] up_sco ret:%d", ret);
             }
-
-            ret |= PhoneAudioStreamInStart(g_hdlUpMic);
-            if (ret != OHOS_SUCCESS)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] [PhoneAudioStreamInStart] [up_mic] error! ret = %d", ret);
+            if (ret == OHOS_SUCCESS) {
+                g_audioState = AUDIO_STREAM_START_SCO;
             }
+        }
 
-            ret |= PhoneAudioStreamInGetChannelId(g_hdlUpMic, &micShmId);
-            if (ret != OHOS_SUCCESS)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] [AudioStreamInGetChannelId] [up_mic] error ret: %d", ret);
-            }
+        ret |= PhoneAudioStreamInStart(g_hdlUpMic);
+        if (ret != OHOS_SUCCESS) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] up_mic 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);
-            }
+        ret |= PhoneAudioStreamInGetChannelId(g_hdlUpMic, &micShmId);
+        if (ret != OHOS_SUCCESS) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpStart] up_mic shm ret:%d", ret);
+        }
 
-            if (ret == OHOS_SUCCESS)
-            {
-                g_audioState = AUDIO_STREAM_START_UP;
-            }
+        ret |= PhoneAudioStreamOutAttachFrontend(g_hdlUpSco, micShmId);
+        if (ret != OHOS_SUCCESS) {
+            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",
-                      g_audioState, g_hdlUpMic, g_hdlUpSco, micShmId);
-        MUTEX_Unlock(g_audioMutex);
-        return;
     }
+    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;
+}
 
-    // 建立下行通路
-    static void AudioDnStart(void)
-    {
-        int ret = OHOS_SUCCESS;
-        uint32 spkShmId = 0;
+// 建立下行通路
+static void AudioDnStart(void)
+{
+    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_scoFlag != HFP_SCO_STATE_CONNECTED || g_audioState < AUDIO_STREAM_INIT) {
+        return;
+    }
+
+    MUTEX_Lock(g_audioMutex);
+    if (g_audioState < AUDIO_STREAM_START_DN) {
+        if (g_hdlDnSpk == INVALID_PHONE_SERVICE_VALUE) {
+            g_hdlDnSpk = PhoneAudioStreamOutInit(AUDIO_DOWN_LINK);
         }
 
-        MUTEX_Lock(g_audioMutex);
-        if (g_audioState < AUDIO_STREAM_START_DN)
-        {
-            if (g_hdlDnSpk == INVALID_PHONE_SERVICE_VALUE)
-            {
-                g_hdlDnSpk = PhoneAudioStreamOutInit(AUDIO_DOWN_LINK);
+        if (g_audioState < AUDIO_STREAM_START_SCO) {
+            ret = PhoneAudioStreamOutStart(g_hdlUpSco);
+            if (ret != OHOS_SUCCESS) {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] up_sco ret:%d", ret);
             }
 
-            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);
-                }
-
-                ret |= PhoneAudioStreamInStart(g_hdlDnSco);
-                if (ret != OHOS_SUCCESS)
-                {
-                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] [AudioStreamInStart] [dn_sco] error! ret = %d", ret);
-                }
-
-                if (ret == OHOS_SUCCESS)
-                {
-                    g_audioState = AUDIO_STREAM_START_SCO;
-                }
+            ret |= PhoneAudioStreamInStart(g_hdlDnSco);
+            if (ret != OHOS_SUCCESS) {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] dn_sco ret:%d", ret);
             }
 
-            ret |= PhoneAudioStreamOutStart(g_hdlDnSpk);
-            if (ret != OHOS_SUCCESS)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] [PhoneAudioStreamOutStart] [dn_spk] error! ret = %d", ret);
+            if (ret == OHOS_SUCCESS) {
+                g_audioState = AUDIO_STREAM_START_SCO;
             }
+        }
 
-            ret |= PhoneAudioStreamOutGetChannelId(g_hdlDnSpk, &spkShmId);
-            if (ret != OHOS_SUCCESS)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] [AudioStreamOutGetChannelId] [dn_spk] error ret: %d", ret);
-            }
+        ret |= PhoneAudioStreamOutStart(g_hdlDnSpk);
+        if (ret != OHOS_SUCCESS) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] dn_spk 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);
-            }
+        ret |= PhoneAudioStreamOutGetChannelId(g_hdlDnSpk, &spkShmId);
+        if (ret != OHOS_SUCCESS) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] dn_spk shm ret:%d", ret);
+        }
 
-            if (ret == OHOS_SUCCESS)
-            {
-                g_audioState = AUDIO_STREAM_START_DN;
-            }
+        ret |= PhoneAudioStreamInAttachBackend(g_hdlDnSco, spkShmId);
+        if (ret != OHOS_SUCCESS) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] dn_sco attach ret:%d", ret);
         }
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDnStart] end g_audioState:%d, g_hdlDnSpk:%d, g_hdlDnSco:%d, spkShmId: 0x%x",
-                      g_audioState, g_hdlDnSpk, g_hdlDnSco, spkShmId);
-        MUTEX_Unlock(g_audioMutex);
 
-        return;
+        if (ret == OHOS_SUCCESS) {
+            g_audioState = AUDIO_STREAM_START_DN;
+        }
     }
+    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 SyncVolume(void)
-    {
-        unsigned char volume;
+    return;
+}
 
-        volume = GetCallCurrVolume();
-        SetSpeakerVolume(volume);
-    }
+// 同步音量
+static void SyncVolume(void)
+{
+    unsigned char volume;
+
+    volume = GetCallCurrVolume();
+    SetSpeakerVolume(volume);
+}
 
 #ifdef __cplusplus
-    extern "C"
-    {
+extern "C" {
 #endif
 
-        static void PostGraphicEvent(void (*fun)(void))
-        {
-            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PostGraphicEvent] start");
-            GraphicService::GetInstance()->PostGraphicEvent(*fun);
-        }
+static void PostGraphicEvent(void (*fun)(void))
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PostGraphicEvent] start");
+    GraphicService::GetInstance()->PostGraphicEvent(*fun);
+}
 
 #ifdef __cplusplus
-    }
+}
 #endif
 
-    // 蓝牙通话下行
-    static void AudioDn(void)
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDn] start g_audioState: %d", g_audioState);
-
-        // 申请蓝牙通话音频焦点
-        AudioActInterrupt(AUDIO_STREAM_VOICE_CALL_BT_SCO);
+// 蓝牙通话下行
+static void AudioDn(void)
+{
+    // 申请蓝牙通话音频焦点
+    AudioActInterrupt(AUDIO_STREAM_VOICE_CALL_BT_SCO);
 
-        // 媒体连接SCO设备
-        AudioConnectScoDevInit();
+    // 媒体连接SCO设备
+    AudioConnectScoDevInit();
 
-        // 建立音频下行通路
-        AudioDnStart();
-        if (g_audioState == AUDIO_STREAM_START_DN)
-        {
-            // 同步音量
-            PostGraphicEvent(SyncVolume);
-        }
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioDn] end g_audioState: %d", g_audioState);
+    // 建立音频下行通路
+    AudioDnStart();
+    if (g_audioState == AUDIO_STREAM_START_DN) {
+        // 同步音量
+        SyncVolume();
     }
+    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);
+// 蓝牙通话上行
+static void AudioUp(void)
+{
+    // 申请蓝牙通话音频焦点
+    AudioActInterrupt(AUDIO_STREAM_VOICE_CALL_BT_SCO);
 
-        // 申请蓝牙通话音频焦点
-        AudioActInterrupt(AUDIO_STREAM_VOICE_CALL_BT_SCO);
+    // 媒体连接SCO设备
+    AudioConnectScoDevInit();
 
-        // 媒体连接SCO设备
-        AudioConnectScoDevInit();
+    // 建立音频上行通路
+    AudioUpStart();
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[AudioUp] audioState:%d", g_audioState);
+}
 
-        // 建立音频上行通路
-        AudioUpStart();
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioUp] end g_audioState: %d", g_audioState);
+static void AudioSetup(void)
+{
+    if (g_audioState < AUDIO_STREAM_START_DN) {
+        AudioDn();
     }
 
-    static void AudioUpRelease(void)
-    {
-        int ret;
+    if (g_audioState != AUDIO_STREAM_START_UP) {
+        AudioUp();
+    }
+}
 
-        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);
-            }
-            ret = PhoneAudioStreamOutDeinit(g_hdlUpSco);
-            if (ret != OHOS_SUCCESS)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [OutDeinit] g_hdlUpSco error! ret = %d", ret);
-            }
-        }
+static void AudioUpRelease(void)
+{
+    int 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);
-            }
-            ret = PhoneAudioStreamInDeinit(g_hdlUpMic);
-            if (ret != OHOS_SUCCESS)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] [InDeinit] g_hdlUpMic error! ret = %d", ret);
-            }
+    if (g_hdlUpSco != INVALID_PHONE_SERVICE_VALUE) {
+        ret = PhoneAudioStreamOutStop(g_hdlUpSco);
+        if (ret != OHOS_SUCCESS) {
+            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] hdlUpSco 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);
-            }
+    if (g_hdlUpMic != INVALID_PHONE_SERVICE_VALUE) {
+        ret = PhoneAudioStreamInStop(g_hdlUpMic);
+        if (ret != OHOS_SUCCESS) {
+            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] hdlUpMic ret:%d", ret);
         }
+    }
 
-        g_hdlUpSco = INVALID_PHONE_SERVICE_VALUE;
-        g_hdlUpMic = INVALID_PHONE_SERVICE_VALUE;
+    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] sco out ret:%d", ret);
+        }
     }
 
-    static void AudioDnRelease(void)
-    {
-        int ret;
+    g_hdlUpSco = INVALID_PHONE_SERVICE_VALUE;
+    g_hdlUpMic = INVALID_PHONE_SERVICE_VALUE;
+}
 
-        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);
-            }
-            ret = PhoneAudioStreamInDeinit(g_hdlDnSco);
-            if (ret != OHOS_SUCCESS)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [InDeinit] g_hdlDnSco error! ret = %d", ret);
-            }
-        }
+static void AudioDnRelease(void)
+{
+    int 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);
-            }
-            ret = PhoneAudioStreamOutDeinit(g_hdlDnSpk);
-            if (ret != OHOS_SUCCESS)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioDnRelease] [OutDeinit] g_hdlDnSpk error! ret = %d", ret);
-            }
+    if (g_hdlDnSco != INVALID_PHONE_SERVICE_VALUE) {
+        ret = PhoneAudioStreamInStop(g_hdlDnSco);
+        if (ret != OHOS_SUCCESS) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [InStop] hdlDnSco 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);
-            }
+        ret = PhoneAudioStreamInDeinit(g_hdlDnSco);
+        if (ret != OHOS_SUCCESS) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioUpRelease] [InDeinit] hdlDnSco ret:%d", ret);
         }
+    }
 
-        g_hdlDnSco = INVALID_PHONE_SERVICE_VALUE;
-        g_hdlDnSpk = INVALID_PHONE_SERVICE_VALUE;
+    if (g_hdlDnSpk != INVALID_PHONE_SERVICE_VALUE) {
+        ret = PhoneAudioStreamOutStop(g_hdlDnSpk);
+        if (ret != OHOS_SUCCESS) {
+            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] hdlDnSpk ret:%d", ret);
+        }
     }
 
-    /* 销毁上下行通路 释放音频焦点 */
-    void AudioRelease(void)
-    {
-        if (g_audioState == AUDIO_UNKNOW)
-        {
-            return;
+    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] sco in ret:%d", ret);
         }
+    }
 
-        MUTEX_Lock(g_audioMutex);
-        AudioUpRelease();
-        AudioDnRelease();
+    g_hdlDnSco = INVALID_PHONE_SERVICE_VALUE;
+    g_hdlDnSpk = INVALID_PHONE_SERVICE_VALUE;
+}
 
-        /* 释放音频焦点 */
-        AudioDeactInterrupt(AUDIO_STREAM_VOICE_CALL_BT_SCO);
-        AudioDeactInterrupt(AUDIO_STREAM_RING); // 适配某些机型不触发SCO
-        g_audioState = AUDIO_UNKNOW;
 
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioRelease] end g_audioState: %d,", g_audioState);
-        MUTEX_Unlock(g_audioMutex);
+/* 销毁上下行通路 释放音频焦点 */
+void AudioRelease(void)
+{
+    if (g_audioState == AUDIO_UNKNOW) {
+        return;
     }
 
-    static void CallListInit(void)
-    {
-        int i;
+    MUTEX_Lock(g_audioMutex);
+    AudioUpRelease();
+    AudioDnRelease();
 
-        g_currCallNum = 0;
+    /* 释放音频焦点 */
+    AudioDeactInterrupt(AUDIO_STREAM_VOICE_CALL_BT_SCO);
+    AudioDeactInterrupt(AUDIO_STREAM_RING); // 适配某些机型不触发SCO
+    g_audioState = AUDIO_UNKNOW;
 
-        (void)memset_s(g_callList, sizeof(g_callList), 0, sizeof(g_callList));
-        for (i = 0; i < MULTI_CALL_MAX_NUME; i++)
-        {
-            (void)memset_s(g_callList[i].name, NAME_SIZE, '\0', NAME_SIZE);
-            (void)memset_s(g_callList[i].tel, MAX_PHONE_NUM, '\0', MAX_PHONE_NUM);
-            g_callList[i].lastStatus = HFP_HF_CALL_STATE_FINISHED;
-        }
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[AudioRelease] audioState:%d,", g_audioState);
+    MUTEX_Unlock(g_audioMutex);
+}
+
+static void CallListInit(void)
+{
+    int i;
+
+    g_currCallNum = 0;
+
+    (void)memset_s(g_callList, sizeof(g_callList), 0, sizeof(g_callList));
+    for (i = 0; i < MULTI_CALL_MAX_NUME; i++) {
+        (void)memset_s(g_callList[i].name, NAME_SIZE, '\0', NAME_SIZE);
+        (void)memset_s(g_callList[i].tel, MAX_PHONE_NUM, '\0', MAX_PHONE_NUM);
+        g_callList[i].lastStatus = HFP_HF_CALL_STATE_FINISHED;
     }
+}
 
-    static void CopyBdAddr(const bd_addr_t *bdAddr)
-    {
-        unsigned char addr[BD_ADDR_LEN] = {0};
-        if (strncmp((const char *)g_bdAddr.addr, (const char *)addr, BD_ADDR_LEN) == 0)
-        {
-            (void)memcpy_s(g_bdAddr.addr, BD_ADDR_LEN, bdAddr->addr, BD_ADDR_LEN);
-        }
+static void CopyBdAddr(const bd_addr_t *bdAddr)
+{
+    unsigned char addr[BD_ADDR_LEN] = {0};
+    if (strncmp((const char*)g_bdAddr.addr, (const char*)addr, BD_ADDR_LEN) == 0) {
+        (void)memcpy_s(g_bdAddr.addr, BD_ADDR_LEN, bdAddr->addr, BD_ADDR_LEN);
     }
+}
 
-    static void CatBdAddr(const bd_addr_t *bdAddr)
-    {
+static void CatBdAddr(const bd_addr_t *bdAddr)
+{
 #if WEARABLEOG_DEBUG_ENABLE
-        for (unsigned char i = 0; i < BD_ADDR_LEN; i++)
-        {
-            printf("%X", bdAddr->addr[i]);
-        }
-        printf("");
+    for (unsigned char i = 0; i < BD_ADDR_LEN; i++) {
+        printf("%X", bdAddr->addr[i]);
+    }
+    printf("");
 #else
     UNUSED(bdAddr);
 #endif
-    }
-
-    static void BtConnectedPro(const bd_addr_t *bdAddr)
-    {
-        g_btConnState = PROFILE_STATE_CONNECTED;
-        CopyBdAddr(bdAddr);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[BtConnectedPro] g_bdAddr: ");
-        CatBdAddr(&g_bdAddr);
-    }
+}
 
-    static void BtDisconnectedPro(void)
-    {
-        g_btConnState = PROFILE_STATE_DISCONNECTED;
-        (void)memset_s(g_bdAddr.addr, BD_ADDR_LEN, 0, BD_ADDR_LEN);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[BtDisconnectedPro] g_bdAddr: ");
-        CatBdAddr(&g_bdAddr);
+static void BtConnectedPro(const bd_addr_t *bdAddr)
+{
+    g_btConnState = PROFILE_STATE_CONNECTED;
+    CopyBdAddr(bdAddr);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[BtConnectedPro] g_bdAddr: ");
+    CatBdAddr(&g_bdAddr);
+}
 
-        // 通知APP蓝牙断开连接
-        PhoneServiceErrorCallback(ERROR_BT, PROFILE_STATE_DISCONNECTED);
-        CallListInit();
+static void BtDisconnectedPro(void)
+{
+    g_btConnState = PROFILE_STATE_DISCONNECTED;
+    (void)memset_s(g_bdAddr.addr, BD_ADDR_LEN, 0, BD_ADDR_LEN);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[BtDisconnectedPro] g_bdAddr: ");
+    CatBdAddr(&g_bdAddr);
 
-        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};
-            HfpIncomingEventPublish(TOPIC_EVENT_HFP_FINISHED, call);
-        }
+    // 通知APP蓝牙断开连接
+    PhoneServiceErrorCallback(ERROR_BT, PROFILE_STATE_DISCONNECTED);
+    CallListInit();
 
-        g_currCallState = HFP_HF_CALL_STATE_FINISHED;
-        g_scoFlag = HFP_SCO_STATE_DISCONNECTED;
-        g_completeCallFlag = false;
+    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};
+        HfpIncomingEventPublish(TOPIC_EVENT_HFP_FINISHED, call);
     }
 
-    // 蓝牙状态连接
-    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);
-        CatBdAddr(bdAddr);
+    g_currCallState = HFP_HF_CALL_STATE_FINISHED;
+    g_scoFlag = HFP_SCO_STATE_DISCONNECTED;
+    g_completeCallFlag = false;
+}
 
-        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);
-        }
+// 蓝牙状态连接
+static void ConnStateChanged(const bd_addr_t *bdAddr, profile_connect_state_t state)
+{
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[ConnStateChanged] state = 0x%X bdAddr: ", state);
+    CatBdAddr(bdAddr);
 
-        switch (state)
-        {
+    switch (state) {
         case PROFILE_STATE_CONNECTING: // 蓝牙正在连接
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ConnStateChanged] BT connecting");
             break;
         case PROFILE_STATE_CONNECTED: // 蓝牙连接成功
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ConnStateChanged] BT connected");
             BtConnectedPro(bdAddr);
+            SendMsgToUIService(BT_CONNECTED_TO_UI, 0, nullptr, 0);
+            SendMsgToMsgCenterService(BT_CONNECTED_TO_MSGCENTER, 0, nullptr, 0);
             break;
         case PROFILE_STATE_DISCONNECTING: // 蓝牙连接断连
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ConnStateChanged] BT disconnecting");
@@ -683,75 +606,63 @@ extern "C"
         case PROFILE_STATE_DISCONNECTED: // 蓝牙断开连接
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ConnStateChanged] BT disconnected");
             BtDisconnectedPro();
+            SendMsgToUIService(BT_DISCONNECTED_TO_UI, 0, nullptr, 0);
+            SendMsgToMsgCenterService(BT_DISCONNECTED_TO_MSGCENTER, 0, nullptr, 0);
             break;
         default:
             break;
-        }
     }
+}
 
-    // 获取蓝牙状态
-    uint32 GetBtConnectStatus(void)
-    {
-        g_btConnState = (uint32)hfp_hf_get_device_connect_state(&g_bdAddr);
-        return g_btConnState;
-    }
-
-    // SCO连接处理
-    static void ScoConnectPro(void)
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ScoConnectPro] g_currCallNum = %d, g_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)
-        {
-            // The call is transferred from the phone to the watch. Need to show the call notification view.
-            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);
-        }
+// 获取蓝牙状态
+uint32 GetBtConnectStatus(void)
+{
+    g_btConnState = (uint32)hfp_hf_get_device_connect_state(&g_bdAddr);
+    return g_btConnState;
+}
 
-        if (g_audioState != AUDIO_STREAM_START_UP)
-        {
-            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ScoConnectPro] post AudioUp");
-            PostGraphicEvent(AudioUp);
-        }
+// SCO连接处理
+static void ScoConnectPro(void)
+{
+    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) {
+        // The call is transferred from the phone to the watch. Need to show the call notification view.
+        hfp_hf_calls_info_t call = {0};
+        HfpIncomingEventPublish(TOPIC_EVENT_HFP_PHONE_TO_WATCH, call);
     }
 
-    // SCO断连处理
-    static void ScoDisconnectPro(void)
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[ScoDisconnectPro] start  g_currCallState = %d", g_currCallState);
+    PostGraphicEvent(AudioSetup);
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[ScoConnectPro] audioState:%d", g_audioState);
+}
+
+// SCO断连处理
+static void ScoDisconnectPro(void)
+{
+    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)
-        {
-            // The call is transferred from the watch to the phone. Need to close the call notification view.
-            hfp_hf_calls_info_t call = {0};
-            HfpIncomingEventPublish(TOPIC_EVENT_HFP_WATCH_TO_PHONE, call);
-        }
-        AudioRelease(); // 为了保持时序,此处采取同步调用
-        usleep(5000);   // 增加延时确保SCO断开AUDIO通路释放成功
+    ScoStatusCb(HFP_SCO_STATE_DISCONNECTED);
+    if (g_currCallState == HFP_HF_CALL_STATE_ACTIVE && g_scoFlag == HFP_SCO_STATE_DISCONNECTED) {
+        // The call is transferred from the watch to the phone. Need to close the call notification view.
+        hfp_hf_calls_info_t call = {0};
+        HfpIncomingEventPublish(TOPIC_EVENT_HFP_WATCH_TO_PHONE, call);
     }
+    AudioRelease(); // 为了保持时序,此处采取同步调用
+    usleep(5000); // 增加延时确保SCO断开AUDIO通路释放成功
+}
 
-    // Sco连接状态变化回调函数,音频连接状态
-    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,
-                      g_scoFlag, g_currCallNum);
+// Sco连接状态变化回调函数,音频连接状态
+static void ScoStateChanged(const bd_addr_t *bdAddr, hfp_sco_connect_state_t state)
+{
+    g_scoFlag = state;
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[ScoStateChanged] hfpState:%d, ScoFlag:%d, CallNum:%d", state,
+        g_scoFlag, g_currCallNum);
 
-        switch (state)
-        {
+    switch (state) {
         case HFP_SCO_STATE_CONNECTING:
             PhoneServiceScreenCtr(1);
-            if (g_scoFlag != HFP_SCO_STATE_CONNECTED)
-            {
+            if (g_scoFlag != HFP_SCO_STATE_CONNECTED) {
                 g_scoFlag = HFP_SCO_STATE_CONNECTED;
                 CopyBdAddr(bdAddr);
                 ScoConnectPro();
@@ -776,837 +687,693 @@ extern "C"
 
         default:
             break;
-        }
-    }
-
-    static void CallLogCreatDir(void)
-    {
-        DIR *dir = NULL;
-        dir = opendir(CALL_LOG_DIR);
-        if (dir == NULL)
-        {
-            mkdir(CALL_LOG_DIR, S_IREAD | S_IWRITE);
-        }
-        else
-        {
-            closedir(dir);
-        }
-        return;
     }
+}
 
-    // 获取通话记录文件长度
-    static int GetCallLogFileSize(void)
-    {
-        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");
-            return OHOS_FAILURE;
-        }
-
-        fseek(fp, 0, SEEK_END);
-        len = ftell(fp);
-        fseek(fp, 0, SEEK_SET);
-        fclose(fp);
+static void CallLogCreatDir(void)
+{
+    DIR *dir = nullptr;
+    dir = opendir(CALL_LOG_DIR);
+    if (dir == nullptr) {
+        mkdir(CALL_LOG_DIR, S_IREAD | S_IWRITE);
+    } else {
+        closedir(dir);
+    }
+    return;
+}
 
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[GetCallLogFileSize] len = %d", len);
-        return len;
+// 获取通话记录文件长度
+static int GetCallLogFileSize(void)
+{
+    int len = 0;
+    FILE *fp = fopen(CALL_LOG_PATH, "rb");
+    if (fp == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[GetCallLogFileSize] fopen %s failed", CALL_LOG_PATH);
+        return OHOS_FAILURE;
     }
 
-    // 添加通话进通话记录文件
-    void AddToCallLog(CallLogInfo *info)
-    {
-        FILE *fp = NULL;
-        size_t ret;
+    fseek(fp, 0, SEEK_END);
+    len = ftell(fp);
+    fseek(fp, 0, SEEK_SET);
+    fclose(fp);
 
-        fp = fopen(CALL_LOG_PATH, "ab");
-        if (fp == NULL)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLog] fopen failed!");
-            return;
-        }
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[GetCallLogFileSize] len:%d", len);
+    return len;
+}
 
-        ret = fwrite(info, sizeof(CallLogInfo), 1, fp);
-        if (ret != 1)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLog] fwrite failed! ret = %d", ret);
-        }
+// 添加通话进通话记录文件
+void AddToCallLog(CallLogInfo *info)
+{
+    FILE *fp = nullptr;
+    size_t ret;
 
-        fclose(fp);
+    fp = fopen(CALL_LOG_PATH, "ab");
+    if (fp == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLog] fopen %s failed!", CALL_LOG_PATH);
         return;
     }
 
-    static int CopyPhoneLogToTmpLog(void)
-    {
-        FILE *fp = NULL;
-        FILE *ftp = NULL;
-        CallLogInfo *info = NULL;
-
-        int retLen;
-        int fileSize = GetCallLogFileSize();
-
-        if (fileSize == OHOS_FAILURE || fileSize == 0)
-        {
-            return fileSize;
-        }
+    ret = fwrite(info, sizeof(CallLogInfo), 1, fp);
+    if (ret != 1) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLog] fwrite failed! ret:%d", ret);
+    }
 
-        retLen = fileSize - sizeof(CallLogInfo);
-        if (retLen == 0)
-        {
-            return ClearCallLogFile(); // 只有一条记录,清空通话记录
-        }
+    fclose(fp);
+    return;
+}
 
-        fp = fopen(CALL_LOG_PATH, "rb");
-        if (fp == NULL)
-        {
-            return OHOS_FAILURE;
-        }
-        ftp = fopen(CALL_TMP_LOG_PATH, "wb+");
-        if (ftp == NULL)
-        {
-            fclose(fp);
-            return OHOS_FAILURE;
-        }
+static int CopyPhoneLogToTmpLog(void)
+{
+    FILE *fp = nullptr;
+    FILE *ftp = nullptr;
+    CallLogInfo *info = nullptr;
 
-        info = (CallLogInfo *)malloc(fileSize);
-        if (info == NULL)
-        {
-            fclose(fp);
-            fclose(ftp);
-            return OHOS_FAILURE;
-        }
+    int retLen;
+    int fileSize = GetCallLogFileSize();
+    if (fileSize == OHOS_FAILURE || fileSize == 0) {
+        return fileSize;
+    }
 
-        (void)memset_s(info, fileSize, 0, fileSize);
-        if (fread(info, fileSize, 1, fp) != 1)
-        {
-            retLen = OHOS_FAILURE;
-            goto END;
-        }
+    retLen = fileSize - sizeof(CallLogInfo);
+    if (retLen == 0) {
+        return ClearCallLogFile(); // 只有一条记录,清空通话记录
+    }
 
-        if (fwrite((info + 1), retLen, 1, ftp) != 1)
-        {
-            retLen = OHOS_FAILURE;
-            goto END;
-        }
+    fp = fopen(CALL_LOG_PATH, "rb");
+    if (fp == nullptr) {
+        return OHOS_FAILURE;
+    }
+    ftp = fopen(CALL_TMP_LOG_PATH, "wb+");
+    if (ftp == nullptr) {
+        fclose(fp);
+        return OHOS_FAILURE;
+    }
 
-    END:
+    info = (CallLogInfo *)malloc(fileSize);
+    if (info == nullptr) {
         fclose(fp);
         fclose(ftp);
-        free(info);
-        info = NULL;
-        return retLen;
-    }
-
-    // 删除第一条通话记录
-    int RemoveFirstCallLog(void)
-    {
-        FILE *fp = NULL;
-        FILE *ftp = NULL;
-        CallLogInfo *info = NULL;
-
-        int ret = OHOS_SUCCESS;
-        int fileSize = CopyPhoneLogToTmpLog();
-        if (fileSize == OHOS_FAILURE || fileSize == 0)
-        {
-            return fileSize;
-        }
+        return OHOS_FAILURE;
+    }
 
-        fp = fopen(CALL_LOG_PATH, "wb+");
-        if (fp == NULL)
-        {
-            return OHOS_FAILURE;
-        }
-        ftp = fopen(CALL_TMP_LOG_PATH, "rb");
-        if (ftp == NULL)
-        {
-            fclose(fp);
-            return OHOS_FAILURE;
-        }
+    (void)memset_s(info, fileSize, 0, fileSize);
+    if (fread(info, fileSize, 1, fp) != 1) {
+        retLen = OHOS_FAILURE;
+        goto END;
+    }
 
-        info = (CallLogInfo *)malloc(fileSize);
-        if (info == NULL)
-        {
-            fclose(fp);
-            fclose(ftp);
-            return OHOS_FAILURE;
-        }
-        (void)memset_s(info, fileSize, 0, fileSize);
-        if (fread(info, fileSize, 1, ftp) != 1)
-        {
-            ret = OHOS_FAILURE;
-            goto END;
-        }
+    if (fwrite((info + 1), retLen, 1, ftp) != 1) {
+        retLen = OHOS_FAILURE;
+        goto END;
+    }
 
-        if (fwrite(info, fileSize, 1, fp) != 1)
-        {
-            ret = OHOS_FAILURE;
-            goto END;
-        }
+END:
+    fclose(fp);
+    fclose(ftp);
+    free(info);
+    info = nullptr;
+    return retLen;
+}
+
+// 删除第一条通话记录
+int RemoveFirstCallLog(void)
+{
+    FILE *fp = nullptr;
+    FILE *ftp = nullptr;
+    CallLogInfo *info = nullptr;
+
+    int ret = OHOS_SUCCESS;
+    int fileSize = CopyPhoneLogToTmpLog();
+    if (fileSize == OHOS_FAILURE || fileSize == 0) {
+        return fileSize;
+    }
+
+    fp = fopen(CALL_LOG_PATH, "wb+");
+    if (fp == nullptr) {
+        return OHOS_FAILURE;
+    }
+    ftp = fopen(CALL_TMP_LOG_PATH, "rb");
+    if (ftp == nullptr) {
+        fclose(fp);
+        return OHOS_FAILURE;
+    }
 
-    END:
+    info = (CallLogInfo *)malloc(fileSize);
+    if (info == nullptr) {
         fclose(fp);
         fclose(ftp);
-        free(info);
-        info = NULL;
-        return ret;
+        return OHOS_FAILURE;
+    }
+    (void)memset_s(info, fileSize, 0, fileSize);
+    if (fread(info, fileSize, 1, ftp) != 1) {
+        ret = OHOS_FAILURE;
+        goto END;
     }
 
-    // 添加通话记录
-    static void AddToCallLogPro(PhoneCallInfo *callInfo)
-    {
-        int ret, num, fileSize;
-        CallLogInfo info;
+    if (fwrite(info, fileSize, 1, fp) != 1) {
+        ret = OHOS_FAILURE;
+        goto END;
+    }
+
+END:
+    fclose(fp);
+    fclose(ftp);
+    free(info);
+    info = nullptr;
+    return ret;
+}
+
+// 添加通话记录
+static void AddToCallLogPro(PhoneCallInfo *callInfo)
+{
+    if (callInfo == nullptr) {
+        return;
+    }
 
-        if (callInfo == NULL)
-        {
+    int fileSize = GetCallLogFileSize();
+    int num = fileSize / sizeof(CallLogInfo);
+    if (num >= CALL_LOG_MAX_NUM) {
+        int ret = RemoveFirstCallLog();
+        if (ret == OHOS_FAILURE) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLogPro] RemoveFirstCallLog error");
             return;
         }
+    }
 
-        fileSize = GetCallLogFileSize();
-        num = fileSize / sizeof(CallLogInfo);
-        if (num >= CALL_LOG_MAX_NUM)
-        {
-            ret = RemoveFirstCallLog();
-            if (ret == OHOS_FAILURE)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLogPro] RemoveFirstCallLog error");
-                return;
-            }
-        }
-
-        (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);
-        if (ret != EOK)
-        {
-            info.nameLen = 0;
-        }
-        else
-        {
-            info.nameLen = callInfo->nameLen;
-        }
-
-        ret = memcpy_s(info.tel, MAX_PHONE_NUM, callInfo->unitCalls.number, callInfo->unitCalls.number_len);
-        if (ret != EOK)
-        {
-            info.telLen = 0;
-        }
-        else
-        {
-            info.telLen = callInfo->unitCalls.number_len;
-        }
-
-        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;
-        }
-        else
-        {
-            info.callDurTime = 0;
-        }
-
-        if (callInfo->lastStatus == HFP_HF_CALL_STATE_INCOMING || callInfo->lastStatus == HFP_HF_CALL_STATE_WAITING)
-        {
-            info.status = CALL_MISSED;
-        }
-        else if (callInfo->unitCalls.outgoing == 1)
-        {
-            info.status = CALL_OUTGOING;
-        }
-        else
-        {
-            info.status = CALL_INCOMING;
-        }
+    CallLogInfo info;
+    (void)memset_s(info.name, NAME_SIZE, '\0', NAME_SIZE);
+    (void)memset_s(info.tel, MAX_PHONE_NUM, '\0', MAX_PHONE_NUM);
+    int ret = memcpy_s(info.name, NAME_SIZE, callInfo->name, callInfo->nameLen);
+    if (ret != EOK) {
+        info.nameLen = 0;
+    } else {
+        info.nameLen = callInfo->nameLen;
+    }
 
-        AddToCallLog(&info);
+    ret = memcpy_s(info.tel, MAX_PHONE_NUM, callInfo->unitCalls.number, callInfo->unitCalls.number_len);
+    if (ret != EOK) {
+        info.telLen = 0;
+    } else {
+        info.telLen = callInfo->unitCalls.number_len;
     }
 
-    // 获取通话记录
-    int GetCallLog(CallLogInfo **info, int *num)
-    {
-        FILE *fp = NULL;
-        int ret, fileSize, number;
-        CallLogInfo *callInfo = NULL;
+    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(nullptr) - callInfo->activeTime;
+    } else {
+        info.callDurTime = 0;
+    }
 
-        fp = fopen(CALL_LOG_PATH, "rb");
-        if (fp == NULL)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AddToCallLog] fopen CALL_LOG_PATH failed!");
-            return OHOS_FAILURE;
-        }
+    if (callInfo->lastStatus == HFP_HF_CALL_STATE_INCOMING || callInfo->lastStatus == HFP_HF_CALL_STATE_WAITING) {
+        info.status = CALL_MISSED;
+    } else if (callInfo->unitCalls.outgoing == 1) {
+        info.status = CALL_OUTGOING;
+    } else {
+        info.status = CALL_INCOMING;
+    }
 
-        fileSize = GetCallLogFileSize();
-        if (fileSize == 0)
-        {
-            *info = NULL;
-            *num = 0;
-            fclose(fp);
-            return OHOS_FAILURE;//文件为空,返回失败
-        }
+    AddToCallLog(&info);
+}
 
-        number = fileSize / sizeof(CallLogInfo);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[GetCallLog] fileSize = %d, number = %d", fileSize, number);
-        callInfo = (CallLogInfo *)malloc(fileSize);
-        if (callInfo == NULL)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[GetCallLog] malloc callInfo fail!");
-            *info = NULL;
-            *num = 0;
-            fclose(fp);
-            return OHOS_FAILURE;
-        }
-        (void)memset_s(callInfo, fileSize, 0, fileSize);
-
-        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;
-            *num = 0;
-            fclose(fp);
-            return OHOS_FAILURE;
-        }
+// 获取通话记录
+int GetCallLog(CallLogInfo **info, int *num)
+{
+    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;
+    }
 
-        *info = callInfo;
-        *num = number;
+    int fileSize = GetCallLogFileSize();
+    if (fileSize == 0) {
+        *info = nullptr;
+        *num = 0;
         fclose(fp);
         return OHOS_SUCCESS;
     }
 
-    // 清空通话记录
-    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!");
-            return OHOS_FAILURE;
-        }
+    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 = nullptr;
+        *num = 0;
+        fclose(fp);
+        return OHOS_FAILURE;
+    }
+    (void)memset_s(callInfo, fileSize, 0, fileSize);
 
+    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 = nullptr;
+        *num = 0;
         fclose(fp);
-        return OHOS_SUCCESS;
+        return OHOS_FAILURE;
     }
 
-    // 查找号码对应的电话信息在list中的位置
-    static PhoneCallInfo *FindCallInfoInCallList(const unsigned char *number, unsigned char numberLen)
-    {
-        int i;
-        const char *str1 = NULL;
-        const char *str2 = NULL;
+    *info = callInfo;
+    *num = number;
+    fclose(fp);
+    return OHOS_SUCCESS;
+}
+
+// 清空通话记录
+int ClearCallLogFile(void)
+{
+    FILE *fp = fopen(CALL_LOG_PATH, "wb");
+    if (fp == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[ClearCallLogFile] fopen %s failed!", CALL_LOG_PATH);
+        return OHOS_FAILURE;
+    }
 
-        if (g_currCallNum == 0)
-        {
-            return NULL;
-        }
+    fclose(fp);
+    return OHOS_SUCCESS;
+}
 
-        for (i = 0; i < MULTI_CALL_MAX_NUME; i++)
-        {
-            if (numberLen != g_callList[i].telLen)
-            {
-                continue;
-            }
-            else
-            {
-                str1 = (const char *)number;
-                str2 = (const char *)g_callList[i].tel;
-
-                if (strncmp(str1, str2, numberLen) == 0)
-                {
-                    return &g_callList[i];
-                }
+// 查找号码对应的电话信息在list中的位置
+static PhoneCallInfo *FindCallInfoInCallList(const unsigned char *number, unsigned char numberLen)
+{
+    int i;
+    const char *str1 = nullptr;
+    const char *str2 = nullptr;
+
+    if (g_currCallNum == 0) {
+        return nullptr;
+    }
+
+    for (i = 0; i < MULTI_CALL_MAX_NUME; i++) {
+        if (numberLen != g_callList[i].telLen) {
+            continue;
+        } else {
+            str1 = (const char*)number;
+            str2 = (const char*)g_callList[i].tel;
+
+            if (strncmp(str1, str2, numberLen) == 0) {
+                return &g_callList[i];
             }
         }
-
-        return NULL;
     }
 
-    static void CatPhoneNumber(char *number, unsigned char len)
-    {
+    return nullptr;
+}
+
+static void CatPhoneNumber(char *number, unsigned char len)
+{
 #if WEARABLEOG_DEBUG_ENABLE
-        for (unsigned char i = 0; i < len; i++)
-        {
-            printf("%c", *(number + i));
-        }
-        printf("");
+    for (unsigned char i = 0; i < len; i++) {
+        printf("%c", *(number + i));
+    }
+    printf("");
 #else
     UNUSED(number);
     UNUSED(len);
 #endif
-    }
-
-    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 ||
-            (call->state != HFP_HF_CALL_STATE_ACTIVE && call->state != HFP_HF_CALL_STATE_HELD &&
-             call->state != HFP_HF_CALL_STATE_ALERTING))
-        {
-            return;
-        }
+static void AddCurrCallToCallList(const hfp_hf_calls_info_t *call)
+{
+    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];
+    g_currCallNum++;
+    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);
-        }
-        else if (call->state == HFP_HF_CALL_STATE_HELD)
-        { // 挂起
-            phoneCall->operate = OPERATE_PHONE_HOLD;
-            phoneCall->activeTime = time(NULL);
-        }
-        else if (call->state == HFP_HF_CALL_STATE_ALERTING)
-        { // 呼出,对方响铃
-            phoneCall->operate = OPERATE_ALERTING;
-        }
+    if (call->state == HFP_HF_CALL_STATE_ACTIVE) { // 正在通话
+        phoneCall->operate = OPERATE_PHONE_ACTIVE;
+        phoneCall->activeTime = time(nullptr);
+    } else if (call->state == HFP_HF_CALL_STATE_HELD) { // 挂起
+        phoneCall->operate = OPERATE_PHONE_HOLD;
+        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->lastStatus = call->state;
+    phoneCall->creationTime = time(nullptr);
 
-        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);
-            CatPhoneNumber(call->number, call->number_len);
-        }
-        phoneCall->telLen = call->number_len;
-        (void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AddCurrCallToCallList] end");
-
-        // 通知手表电话呼入
-        CallChangedCb(phoneCall);
+    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] copy tel ret:%d", ret);
+        CatPhoneNumber(call->number, call->number_len);
     }
+    phoneCall->telLen = call->number_len;
+    (void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AddCurrCallToCallList] end");
 
-    // 通话状态变化--呼出,正在拨号处理
-    static void CallChangeDialPro(const hfp_hf_calls_info_t *call)
-    {
-        PhoneCallInfo *phoneCall = NULL;
-        int tmp, ret;
-
-        if (call == NULL)
-        {
-            return;
-        }
-        g_currCallNum++;
-        tmp = g_currCallNum - 1;
-
-        phoneCall = &g_callList[tmp];
+    // 通知手表电话呼入
+    CallChangedCb(phoneCall);
+}
 
-        // 使用通讯录接口获取当前电话对应的备注人名(通讯录待开发)
+// 通话状态变化--呼出,正在拨号处理
+static void CallChangeDialPro(const hfp_hf_calls_info_t *call)
+{
+    if (call == nullptr) {
+        return;
+    }
 
-        phoneCall->operate = OPERATE_DIALING;
-        phoneCall->lastStatus = call->state;
-        phoneCall->creationTime = time(NULL);
+    g_currCallNum++;
+    int32_t tmp = g_currCallNum - 1;
+    PhoneCallInfo *phoneCall = &g_callList[tmp];
 
-        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);
-            CatPhoneNumber(call->number, call->number_len);
-        }
-        phoneCall->telLen = call->number_len;
+    // 使用通讯录接口获取当前电话对应的备注人名(通讯录待开发)
 
-        (void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
+    phoneCall->operate = OPERATE_DIALING;
+    phoneCall->lastStatus = call->state;
+    phoneCall->creationTime = time(nullptr);
 
-        // 通知手表正在拨号
-        CallChangedCb(phoneCall);
+    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] 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;
-
-        if (call == NULL)
-        {
-            return;
-        }
+    (void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
 
-        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");
-            AddCurrCallToCallList(call);
-            return;
-        }
-        phoneCall->operate = OPERATE_ALERTING;
-        phoneCall->lastStatus = call->state;
+    // 通知手表正在拨号
+    CallChangedCb(phoneCall);
+}
 
-        (void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
+// 通话状态变化--呼出,对方响铃
+static void CallChangeAlertPro(const hfp_hf_calls_info_t *call)
+{
+    PhoneCallInfo *phoneCall = nullptr;
 
-        // 通知手表正对方响铃
-        CallChangedCb(phoneCall);
+    if (call == nullptr) {
+        return;
     }
 
-    void HfpIncomingEventPublish(uint16 topic, hfp_hf_calls_info_t callsInfo)
-    {
-        int32 ret;
-        uint32 size = sizeof(hfp_hf_calls_info_t);
-        Request *request = NULL;
-        BroadcastApi *broadcastApi = NULL;
-        IUnknown *api = NULL;
+    phoneCall = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
+    if (phoneCall == nullptr) {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeAlertPro] Alert no this call");
+        AddCurrCallToCallList(call);
+        return;
+    }
+    phoneCall->operate = OPERATE_ALERTING;
+    phoneCall->lastStatus = call->state;
 
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "HfpIncomingEventPublish topic=%u!!", topic);
+    (void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
 
-        /* alloc request */
-        request = SAMGR_AllocRequestMsg(0, PLATFORM_CORE, BROADCAST_SVR_ID, size);
-        if (request == NULL)
-        {
-            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);
-            return;
-        }
-        request->len = size;
-        request->msgValue = 0;
-
-        /* public request */
-        api = SAMGR_GetInstance()->GetFeatureApi(BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);
-        if (api == NULL)
-        {
-            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)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "QueryInterface failed");
-            SAMGR_FreeRequestMsg(request);
-            return;
-        }
-        broadcastApi->PublishTopic((IUnknown *)broadcastApi, request);
-        broadcastApi->Release((IUnknown *)broadcastApi);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "HfpIncomingEventPublish end!!");
+    // 通知手表正对方响铃
+    CallChangedCb(phoneCall);
+}
 
+void HfpIncomingEventPublish(uint16 topic, hfp_hf_calls_info_t callsInfo)
+{
+    int32 ret;
+    uint32 size = sizeof(hfp_hf_calls_info_t);
+    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 == 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);
         return;
     }
+    request->len = size;
+    request->msgValue = 0;
 
-    // 通话状态变化--呼入处理
-    static void CallChangeIncomePro(const hfp_hf_calls_info_t *call)
-    {
-        PhoneCallInfo *phoneCall = NULL;
-        int tmp, ret;
+    /* public request */
+    api = SAMGR_GetInstance()->GetFeatureApi(BROADCAST_SERVICE_NAME, BROADCAST_FEATURE_NAME);
+    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 == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "QueryInterface failed");
+        SAMGR_FreeRequestMsg(request);
+        return;
+    }
+    broadcastApi->PublishTopic((IUnknown *)broadcastApi, request);
+    broadcastApi->Release((IUnknown *)broadcastApi);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "HfpIncomingEventPublish end!!");
 
-        if (call == NULL || g_currCallNum >= MULTI_CALL_MAX_NUME ||
-            (call->state != HFP_HF_CALL_STATE_INCOMING && call->state != HFP_HF_CALL_STATE_WAITING))
-        {
-            return;
-        }
+    return;
+}
 
-        phoneCall = FindCallInfoInCallList((const unsigned char *)call->number, call->number_len);
-        if (phoneCall != NULL)
-        {
-            // 通话状态由呼入等待转换成呼入情况
-        }
-        else
-        {
-            g_currCallNum++;
-            tmp = g_currCallNum - 1;
-            phoneCall = &g_callList[tmp];
-        }
+// 通话状态变化--呼入处理
+static void CallChangeIncomePro(const hfp_hf_calls_info_t *call)
+{
+    if (call == nullptr || g_currCallNum >= MULTI_CALL_MAX_NUME ||
+        (call->state != HFP_HF_CALL_STATE_INCOMING && call->state != HFP_HF_CALL_STATE_WAITING)) {
+        return;
+    }
 
-        // 使用通讯录接口获取当前电话对应的备注人名(通讯录待开发)
+    PhoneCallInfo *phoneCall = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
+    if (phoneCall != nullptr) {
+        // 通话状态由呼入等待转换成呼入情况
+    } else {
+        g_currCallNum++;
+        int32_t tmp = g_currCallNum - 1;
+        phoneCall = &g_callList[tmp];
+    }
 
-        if (call->state == HFP_HF_CALL_STATE_INCOMING)
-        {
-            phoneCall->operate = OPERATE_INCOMING;
-        }
-        else
-        {
-            phoneCall->operate = OPERATE_WAITING;
-        }
-        phoneCall->lastStatus = call->state;
-        phoneCall->creationTime = time(NULL);
-
-        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);
-            CatPhoneNumber(call->number, call->number_len);
-        }
-        phoneCall->telLen = call->number_len;
+    // 使用通讯录接口获取当前电话对应的备注人名(通讯录待开发)
 
-        (void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
+    if (call->state == HFP_HF_CALL_STATE_INCOMING) {
+        phoneCall->operate = OPERATE_INCOMING;
+    } else {
+        phoneCall->operate = OPERATE_WAITING;
+    }
+    phoneCall->lastStatus = call->state;
+    phoneCall->creationTime = time(nullptr);
 
-        // 发布电话呼入事件
-        HfpIncomingEventPublish(TOPIC_EVENT_HFP_INCOMMING, phoneCall->unitCalls);
-        // 通知手表电话呼入
-        CallChangedCb(phoneCall);
+    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] 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;
+    (void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
 
-        if (call == NULL)
-        {
-            return;
-        }
+    // 发布电话呼入事件
+    HfpIncomingEventPublish(TOPIC_EVENT_HFP_INCOMMING, phoneCall->unitCalls);
+    // 通知手表电话呼入
+    CallChangedCb(phoneCall);
+}
 
-        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");
-            AddCurrCallToCallList(call);
-            return;
-        }
+// 通话状态变化--接听流程处理
+static void CallChangeActivePro(const hfp_hf_calls_info_t *call)
+{
+    PhoneCallInfo *phoneCall = nullptr;
 
-        if (phoneCall->lastStatus == HFP_HF_CALL_STATE_HELD && IsCompleteCallFlow() == true)
-        { // 挂起状态切换到接听状态
-            phoneCall->operate = OPERATE_WATCH_ACTIVE;
-        }
-        else if (phoneCall->lastStatus == HFP_HF_CALL_STATE_HELD && IsCompleteCallFlow() == false)
-        {
-            phoneCall->operate = OPERATE_PHONE_ACTIVE;
-        }
-        else if (phoneCall->operate == OPERATE_WATCH_ACTIVE)
-        { // 手表接听
-            // 不做操作
-        }
-        else
-        {
-            if (phoneCall->unitCalls.outgoing == 1 &&
-                (phoneCall->lastStatus == HFP_HF_CALL_STATE_DIALING || phoneCall->lastStatus == HFP_HF_CALL_STATE_ALERTING))
-            {
-                phoneCall->operate = OPERATE_PEER_ACTIVE; // 对方接听
-            }
-            else
-            {
-                // 手机接听
-                phoneCall->operate = OPERATE_PHONE_ACTIVE;
-                WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeActivePro] phone active!");
-            }
-        }
+    if (call == nullptr) {
+        return;
+    }
 
-        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 = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
+    if (phoneCall == nullptr) {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeActivePro] Active no this call");
+        AddCurrCallToCallList(call);
+        TransCallToMobilePhone();
+        return;
+    }
 
-        phoneCall->lastStatus = call->state;
-        (void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
-        if (phoneCall->operate == OPERATE_PHONE_ACTIVE)
-        {
-            // 发布电话接听事件,手表关闭来电通知
-            HfpIncomingEventPublish(TOPIC_EVENT_HFP_PHONE_ACTIVE, phoneCall->unitCalls);
-        }
-        else if (phoneCall->operate == OPERATE_WATCH_ACTIVE && g_scoFlag == HFP_SCO_STATE_CONNECTED)
-        {
-            // 发布手表接听事件,通知切换接听界面
-            HfpIncomingEventPublish(TOPIC_EVENT_HFP_WATCH_ACTIVE, phoneCall->unitCalls);
+    if (phoneCall->lastStatus == HFP_HF_CALL_STATE_HELD && IsCompleteCallFlow()) { // 挂起状态切换到接听状态
+        phoneCall->operate = OPERATE_WATCH_ACTIVE;
+    } else if (phoneCall->lastStatus == HFP_HF_CALL_STATE_HELD && (!IsCompleteCallFlow())) {
+        phoneCall->operate = OPERATE_PHONE_ACTIVE;
+    } else if (phoneCall->operate == OPERATE_WATCH_ACTIVE) { // 手表接听
+        // 不做操作
+    } else {
+        if (phoneCall->unitCalls.outgoing == 1 &&
+            (phoneCall->lastStatus == HFP_HF_CALL_STATE_DIALING || phoneCall->lastStatus == HFP_HF_CALL_STATE_ALERTING)) {
+            phoneCall->operate = OPERATE_PEER_ACTIVE; // 对方接听
+        } else {
+            // 手机接听
+            phoneCall->operate = OPERATE_PHONE_ACTIVE;
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeActivePro] phone active!");
         }
-        // 通知手表触发接听
-        CallChangedCb(phoneCall);
     }
 
-    // 通话状态变化--拒接/结束流程处理
-    static void CallChangeFinishPro(const hfp_hf_calls_info_t *call)
-    {
-        PhoneCallInfo *phoneCall = NULL;
-        PhoneCallInfo tmp;
+    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(nullptr);
+    }
 
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] start g_scoFlag = %d, g_currCallNum = %d",
-                      g_scoFlag, g_currCallNum);
-        if (call == NULL || g_currCallNum == 0)
-        {
-            return;
-        }
+    phoneCall->lastStatus = call->state;
+    (void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
+    if (phoneCall->operate == OPERATE_PHONE_ACTIVE) {
+        // 发布电话接听事件,手表关闭来电通知
+        HfpIncomingEventPublish(TOPIC_EVENT_HFP_PHONE_ACTIVE, phoneCall->unitCalls);
+    } else if (phoneCall->operate == OPERATE_WATCH_ACTIVE && g_scoFlag == HFP_SCO_STATE_CONNECTED) {
+        // 发布手表接听事件,通知切换接听界面
+        HfpIncomingEventPublish(TOPIC_EVENT_HFP_WATCH_ACTIVE, phoneCall->unitCalls);
+    }
+    // 通知手表触发接听
+    CallChangedCb(phoneCall);
+}
 
-        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");
-            return;
-        }
-        if (g_finishOperate == OPERATE_WATCH_FINISH)
-        {
-            phoneCall->operate = OPERATE_WATCH_FINISH;
-        }
-        else if (g_finishOperate == OPERATE_WATCH_REJECT)
-        {
-            phoneCall->operate = OPERATE_WATCH_REJECT;
-        }
-        else
-        {
-            phoneCall->operate = OPERATE_NON_WATCH_FINISH;
-        }
-        g_finishOperate = OPERATE_NON_WATCH_FINISH;
-        g_currCallNum--;
+// 通话状态变化--拒接/结束流程处理
+static void CallChangeFinishPro(const hfp_hf_calls_info_t *call)
+{
+    PhoneCallInfo *phoneCall = nullptr;
+    PhoneCallInfo tmp;
 
-        (void)memcpy_s(&tmp, sizeof(PhoneCallInfo), phoneCall, sizeof(PhoneCallInfo));
-        (void)memcpy_s(&tmp.unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
-        (void)memset_s(phoneCall, sizeof(PhoneCallInfo), 0, sizeof(PhoneCallInfo));
-        (void)memset_s(phoneCall->name, NAME_SIZE, '\0', NAME_SIZE);
-        (void)memset_s(phoneCall->tel, MAX_PHONE_NUM, '\0', MAX_PHONE_NUM);
-        phoneCall->lastStatus = HFP_HF_CALL_STATE_FINISHED;
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] start scoFlag:%d, CallNum:%d",
+        g_scoFlag, g_currCallNum);
+    if (call == nullptr || g_currCallNum == 0) {
+        return;
+    }
 
-        // 添加通话记录
-        AddToCallLogPro(&tmp);
+    phoneCall = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
+    if (phoneCall == nullptr) {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] Finish no this call");
+        return;
+    }
+    if (g_finishOperate == OPERATE_WATCH_FINISH) {
+        phoneCall->operate = OPERATE_WATCH_FINISH;
+    } else if (g_finishOperate == OPERATE_WATCH_REJECT) {
+        phoneCall->operate = OPERATE_WATCH_REJECT;
+    } else {
+        phoneCall->operate = OPERATE_NON_WATCH_FINISH;
+    }
+    g_finishOperate = OPERATE_NON_WATCH_FINISH;
+    g_currCallNum--;
 
-        // 发布电话结束事件
-        HfpIncomingEventPublish(TOPIC_EVENT_HFP_FINISHED, phoneCall->unitCalls);
-        // 通知手表通话结束
-        CallChangedCb(&tmp);
+    (void)memcpy_s(&tmp, sizeof(PhoneCallInfo), phoneCall, sizeof(PhoneCallInfo));
+    (void)memcpy_s(&tmp.unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
+    (void)memset_s(phoneCall, sizeof(PhoneCallInfo), 0, sizeof(PhoneCallInfo));
+    (void)memset_s(phoneCall->name, NAME_SIZE, '\0', NAME_SIZE);
+    (void)memset_s(phoneCall->tel, MAX_PHONE_NUM, '\0', MAX_PHONE_NUM);
+    phoneCall->lastStatus = HFP_HF_CALL_STATE_FINISHED;
 
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] end  g_scoFlag = %d, g_currCallNum = %d",
-                      g_scoFlag, g_currCallNum);
-    }
+    // 添加通话记录
+    AddToCallLogPro(&tmp);
 
-    // 通话状态变化--挂起通话(当前只有手机挂起触发(并且手表不需感知),手表不支持挂起触发,对方挂起不感知)
-    static void CallChangeHeldPro(const hfp_hf_calls_info_t *call)
-    {
-        PhoneCallInfo *phoneCall = NULL;
+    // 发布电话结束事件
+    HfpIncomingEventPublish(TOPIC_EVENT_HFP_FINISHED, phoneCall->unitCalls);
+    // 通知手表通话结束
+    CallChangedCb(&tmp);
 
-        if (call == NULL)
-        {
-            return;
-        }
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeFinishPro] end  scoFlag:%d, CallNum:%d",
+                  g_scoFlag, g_currCallNum);
+}
 
-        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");
-            AddCurrCallToCallList(call);
-            return;
-        }
+// 通话状态变化--挂起通话(当前只有手机挂起触发(并且手表不需感知),手表不支持挂起触发,对方挂起不感知)
+static void CallChangeHeldPro(const hfp_hf_calls_info_t *call)
+{
+    PhoneCallInfo *phoneCall = nullptr;
 
-        // 手机挂起通话
-        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->lastStatus = call->state;
-        (void)memcpy_s(&phoneCall->unitCalls, sizeof(hfp_hf_calls_info_t), call, sizeof(hfp_hf_calls_info_t));
+    if (call == nullptr) {
+        return;
+    }
 
-        // 通知手表触发挂起
-        CallChangedCb(phoneCall);
+    phoneCall = FindCallInfoInCallList((const unsigned char*)call->number, call->number_len);
+    if (phoneCall == nullptr) {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallChangeHeldPro] Held no this call");
+        AddCurrCallToCallList(call);
+        return;
     }
 
-    static void PlayWatchRing(void)
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PlayWatchRing] start");
-        // 申请手表铃声焦点
-        // AudioActInterrupt(AUDIO_STREAM_RING);
-        // 播放手表铃声(播放方案待定)
+    // 手机挂起通话
+    phoneCall->operate = OPERATE_PHONE_HOLD;
+    if (phoneCall->lastStatus == HFP_HF_CALL_STATE_INCOMING || phoneCall->lastStatus == HFP_HF_CALL_STATE_WAITING) {
+        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 CallAudioHandle(const hfp_hf_calls_info_t *call)
-    {
-        int state = call->state;
+    // 通知手表触发挂起
+    CallChangedCb(phoneCall);
+}
 
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallAudioHandle] start g_audioState: %d", g_audioState);
+static void PlayWatchRing(void)
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PlayWatchRing] start");
+}
 
-        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)
-            {
-                // 播放手机端铃声
-                PostGraphicEvent(AudioDn);
-            }
-            else
-            {
-                if (g_scoFlag != HFP_SCO_STATE_CONNECTED)
-                {
-                    // 播放手表铃声
-                    PostGraphicEvent(PlayWatchRing);
-                }
-            }
-        }
-        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);
+static void CallAudioHandle(const hfp_hf_calls_info_t *call)
+{
+    int state = call->state;
+
+    if (state == HFP_HF_CALL_STATE_INCOMING || state == HFP_HF_CALL_STATE_DIALING ||
+        state == HFP_HF_CALL_STATE_ALERTING) { // 电话呼入,支持播放手机铃声
+        if (call->in_band_ring) {
+            // 播放手机端铃声
+            PostGraphicEvent(AudioDn);
+        } else {
+            if (g_scoFlag != HFP_SCO_STATE_CONNECTED) {
+                // 播放手表铃声
+                PostGraphicEvent(PlayWatchRing);
             }
         }
-
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[CallAudioHandle] end g_audioState: %d", g_audioState);
+    } else if (state == HFP_HF_CALL_STATE_FINISHED) {
+        return;
+    } else if (g_scoFlag == HFP_SCO_STATE_CONNECTED) {
+        PostGraphicEvent(AudioSetup);
     }
+}
 
-    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);
-        CatBdAddr(bdAddr);
-        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",
-                      call->multi_party, call->outgoing, call->in_band_ring, call->creation_time);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "***********************************************************************");
-    }
+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, "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);
+    CatPhoneNumber(call->number, call->number_len);
+    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 SetCompleteCallFlag(const hfp_hf_calls_info_t *call)
-    {
-        if (call->state == HFP_HF_CALL_STATE_INCOMING)
-        {
-            g_completeCallFlag = true;
-        }
-        else if ((call->state == HFP_HF_CALL_STATE_DIALING || call->state == HFP_HF_CALL_STATE_ALERTING) &&
-                 (g_currCallNum == 1 || g_currCallNum == 0))
-        {
-            g_completeCallFlag = true;
-        }
-        else if (call->state == HFP_HF_CALL_STATE_ACTIVE)
-        {
-            g_completeCallFlag = true;
-        }
+// 设置完整通话标志
+static void SetCompleteCallFlag(const hfp_hf_calls_info_t *call)
+{
+    if (call->state == HFP_HF_CALL_STATE_INCOMING) {
+        g_completeCallFlag = true;
+    } else if ((call->state == HFP_HF_CALL_STATE_DIALING || call->state == HFP_HF_CALL_STATE_ALERTING) &&
+        (g_currCallNum == 1 || g_currCallNum == 0)) {
+        g_completeCallFlag = true;
+    } else if (call->state == HFP_HF_CALL_STATE_ACTIVE) {
+        g_completeCallFlag = true;
     }
+}
 
-    bool IsCompleteCallFlow(void)
-    {
-        return g_completeCallFlag;
-    }
+bool IsCompleteCallFlow(void)
+{
+    return g_completeCallFlag;
+}
 
-    // 通话状态变化上报回调
-    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)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "call is null or BT disconnected connStatus: 0x%X", g_btConnState);
-            return;
-        }
+// 通话状态变化上报回调
+static void CallStateChanged(const bd_addr_t *bdAddr, const hfp_hf_calls_info_t *call)
+{
+    CopyBdAddr(bdAddr);
+    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;
+    }
 
-        SetCompleteCallFlag(call);
-        CatCallStateChangedInfo(bdAddr, call);
-        CallAudioHandle(call);
+    SetCompleteCallFlag(call);
+    CatCallStateChangedInfo(bdAddr, call);
+    CallAudioHandle(call);
 
-        WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "CallStateChanged state = %d", call->state);
-        switch (call->state)
-        {
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "CallStateChanged state:%d", call->state);
+    switch (call->state) {
         case HFP_HF_CALL_STATE_ACTIVE: // 正在通话
             CallChangeActivePro(call);
             break;
@@ -1635,517 +1402,453 @@ extern "C"
             break;
         default:
             break;
-        }
+    }
 
-        // 规避某些型号手机在电话呼入时重复断开和连接SCO
-        if (call->state == HFP_HF_CALL_STATE_FINISHED)
-        {
-            if (g_currCallNum == 0)
-            {
-                g_currCallState = HFP_HF_CALL_STATE_FINISHED;
-            }
-        }
-        else
-        {
-            g_currCallState = call->state;
+    // 规避某些型号手机在电话呼入时重复断开和连接SCO
+    if (call->state == HFP_HF_CALL_STATE_FINISHED) {
+        if (g_currCallNum == 0) {
+            g_currCallState = HFP_HF_CALL_STATE_FINISHED;
         }
+    } else {
+        g_currCallState = call->state;
+    }
 
-        if (g_currCallNum == 0)
-        {
-            g_completeCallFlag = false;
-        }
+    if (g_currCallNum == 0) {
+        g_completeCallFlag = false;
     }
+}
 
-    static void BtHfpVolumeChanged(int volumeType, unsigned char hfpVolume)
-    {
-        int maxVolume, minVolume, volume;
-        bool ret;
+static void BtHfpVolumeChanged(int volumeType, unsigned char hfpVolume)
+{
+    // mic
+    if (volumeType == HFP_VOLUME_MIC) {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VolumeChanged Type:%d, hfpVolume:%d",
+            volumeType, hfpVolume);
+    }
+
+    // speak
+    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, "VolumeChanged Type:%d, min:%d, max:%d volume:%d ret:%d",
+                      volumeType, minVolume, maxVolume, volume, ret);
+    }
+}
 
-        // mic
-        if (volumeType == HFP_VOLUME_MIC)
-        {
-            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VolumeChanged Type = %d, hfpVolume = %d",
-                          volumeType, hfpVolume);
-        }
+// 音量调节回调
+static void VolumeChanged(const bd_addr_t *bdAddr, hfp_volume_type_t type, unsigned char volume)
+{
+    UNUSED(bdAddr);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VolumeChanged] type:%d volume:%d", type, volume);
+    GraphicService::GetInstance()->PostGraphicEvent(std::bind(BtHfpVolumeChanged, type, volume));
+}
 
-        // speak
-        if (volumeType == HFP_VOLUME_SPEAKER)
-        {
-            minVolume = PhoneAudioGetMinVolume();
-            maxVolume = PhoneAudioGetMaxVolume();
-            volume = hfpVolume * (maxVolume - minVolume) / CALL_VOLUME_MAX; // 转换
-            volume = (volume == 0) ? ((maxVolume - minVolume) / CALL_VOLUME_MAX) : volume;
-            ret = PhoneAudioSetVolume(volume);
-            if (ret != true)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VolumeChanged Type: %d, ret: %d",
-                              volumeType, 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 DialErrorCode(const bd_addr_t *bdAddr, int code)
+{
+    UNUSED(bdAddr);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[DialErrorCode] code:%d", code);
+    PhoneServiceErrorCallback(ERROR_DIAL, code);
+}
 
-    // 音量调节回调
-    static void VolumeChanged(const bd_addr_t *bdAddr, hfp_volume_type_t type, unsigned char volume)
-    {
-        UNUSED(bdAddr);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VolumeChanged] type = %d volume = %d", type, volume);
-        GraphicService::GetInstance()->PostGraphicEvent(std::bind(BtHfpVolumeChanged, type, volume));
-    }
+static void HfpBatteryChanged(const bd_addr_t *bdAddr, int batteryLevel)
+{
+    UNUSED(bdAddr);
+    UNUSED(batteryLevel);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpBatteryChanged] batteryLevel:%d", batteryLevel);
+}
 
-    // 拨号失败回调
-    static void DialErrorCode(const bd_addr_t *bdAddr, int code)
-    {
-        UNUSED(bdAddr);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[DialErrorCode] code = %d", code);
-        PhoneServiceErrorCallback(ERROR_DIAL, code);
-    }
+static void HfpSignalStrengthChanged(const bd_addr_t *bdAddr, int signalStrength)
+{
+    UNUSED(bdAddr);
+    UNUSED(signalStrength);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpSignalStrengthChanged] signalStrength:%d", signalStrength);
+}
 
-    static void HfpBatteryChanged(const bd_addr_t *bdAddr, int batteryLevel)
-    {
-        UNUSED(bdAddr);
-        UNUSED(batteryLevel);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpBatteryChanged] batteryLevel: %d", batteryLevel);
-    }
+static void HfpRegistStatusChanged(const bd_addr_t *bdAddr, int status)
+{
+    UNUSED(bdAddr);
+    UNUSED(status);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpRegistStatusChanged] status:%d", status);
+}
 
-    static void HfpSignalStrengthChanged(const bd_addr_t *bdAddr, int signalStrength)
-    {
-        UNUSED(bdAddr);
-        UNUSED(signalStrength);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpSignalStrengthChanged] signalStrength: %d", signalStrength);
-    }
+static void HfpRoamingStatusChanged(const bd_addr_t *bdAddr, int status)
+{
+    UNUSED(bdAddr);
+    UNUSED(status);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpRoamingStatusChanged] status:%d", status);
+}
 
-    static void HfpRegistStatusChanged(const bd_addr_t *bdAddr, int status)
-    {
-        UNUSED(bdAddr);
-        UNUSED(status);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpRegistStatusChanged] 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);
+}
 
-    static void HfpRoamingStatusChanged(const bd_addr_t *bdAddr, int status)
-    {
-        UNUSED(bdAddr);
-        UNUSED(status);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[HfpRoamingStatusChanged] status: %d", status);
-    }
+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);
+}
 
-    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);
-    }
+static void VoiceRecogStatusChanged(const bd_addr_t *bdAddr, int status)
+{
+    UNUSED(bdAddr);
+    UNUSED(status);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VoiceRecogStatusChanged] status:%d", status);
+}
 
-    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);
-    }
+static void InbandRingtoneChanged(const bd_addr_t *bdAddr, int status)
+{
+    UNUSED(bdAddr);
+    UNUSED(status);
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[InbandRingtoneChanged] status:%d", status);
+}
 
-    static void VoiceRecogStatusChanged(const bd_addr_t *bdAddr, int status)
-    {
-        UNUSED(bdAddr);
-        UNUSED(status);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[VoiceRecogStatusChanged] status: %d", status);
+static void CodecChanged(const bd_addr_t *bdAddr, int codec)
+{
+    UNUSED(bdAddr);
+    if (codec == HFP_HF_CODEC_ID_CVSD) {
+        g_call_codec = PCM;
+    } 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);
+}
 
-    static void InbandRingtoneChanged(const bd_addr_t *bdAddr, int status)
-    {
-        UNUSED(bdAddr);
-        UNUSED(status);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[InbandRingtoneChanged] status: %d", status);
-    }
 
-    static void CodecChanged(const bd_addr_t *bdAddr, int codec)
-    {
-        UNUSED(bdAddr);
-        if (codec == HFP_HF_CODEC_ID_CVSD)
-        {
-            g_call_codec = PCM;
-        }
-        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);
-    }
-
-    static void RegisterHfpHfCallbacks(void)
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[RegisterHfpHfCallbacks] start");
-        int ret;
-        hfp_hf_callbacks_t callbacks = {
-            ConnStateChanged,
-            ScoStateChanged,
-            HfpBatteryChanged,
-            HfpSignalStrengthChanged,
-            HfpRegistStatusChanged,
-            HfpRoamingStatusChanged,
-            HfpOperatorSelection,
-            HfpSubscriberNumber,
-            VoiceRecogStatusChanged,
-            InbandRingtoneChanged,
-            VolumeChanged,
-            CallStateChanged,
-            DialErrorCode,
-            CodecChanged,
-        };
-
-        ret = hfp_hf_register_callbacks(&callbacks);
-        if (ret != 0)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[RegisterHfpHfCallbacks] ret = %d", ret);
-        }
+static void RegisterHfpHfCallbacks(void)
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[RegisterHfpHfCallbacks] start");
+    int ret;
+    hfp_hf_callbacks_t callbacks = {
+        ConnStateChanged,
+        ScoStateChanged,
+        HfpBatteryChanged,
+        HfpSignalStrengthChanged,
+        HfpRegistStatusChanged,
+        HfpRoamingStatusChanged,
+        HfpOperatorSelection,
+        HfpSubscriberNumber,
+        VoiceRecogStatusChanged,
+        InbandRingtoneChanged,
+        VolumeChanged,
+        CallStateChanged,
+        DialErrorCode,
+        CodecChanged,
+    };
+
+    ret = hfp_hf_register_callbacks(&callbacks);
+    if (ret != 0) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[RegisterHfpHfCallbacks] ret:%d", ret);
     }
+}
 
-    void PhoneServiceInit(void)
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PhoneServiceInit] start");
-        g_scoFlag = HFP_SCO_STATE_DISCONNECTED;
-        AudioInit();
-        InitMutex();
-        CallLogCreatDir();
-        if (GetCallLogFileSize() == OHOS_FAILURE)
-        { // 如果不存在文件,创建新文件
-            (void)ClearCallLogFile();
-        }
-        (void)memset_s(g_bdAddr.addr, BD_ADDR_LEN, 0, BD_ADDR_LEN);
-        CallListInit();
-        RegisterHfpHfCallbacks();
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PhoneServiceInit] end");
-    }
-
-    // 手表主动拨打电话
-    int DialCall(unsigned char *number, unsigned char len)
-    {
-        int ret;
-        unsigned char *tel = NULL;
-        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);
-            return OHOS_FAILURE;
-        }
-
-        // 有通话时,不允许拨出电话
-        if (g_currCallNum > 0 || len > MAX_PHONE_NUM || number == NULL)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DialCall] g_currCallNum = %d", g_currCallNum);
-            return OHOS_FAILURE;
-        }
+void PhoneServiceInit(void)
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PhoneServiceInit] start");
+    g_scoFlag = HFP_SCO_STATE_DISCONNECTED;
+    AudioInit();
+    InitMutex();
+    CallLogCreatDir();
+    if (GetCallLogFileSize() == OHOS_FAILURE) {  // 如果不存在文件,创建新文件
+        (void)ClearCallLogFile();
+    }
+    (void)memset_s(g_bdAddr.addr, BD_ADDR_LEN, 0, BD_ADDR_LEN);
+    CallListInit();
+    RegisterHfpHfCallbacks();
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[PhoneServiceInit] end");
+}
 
-        tel = (unsigned char *)malloc(len + 1);
-        if (tel == NULL)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DialCall] malloc tel error");
-            return OHOS_FAILURE;
-        }
-        (void)memcpy_s(tel, len, number, len);
-        *(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);
-            free(tel);
-            return OHOS_FAILURE;
-        }
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[DialCall] success!");
+// 手表主动拨打电话
+int DialCall(unsigned char *number, unsigned char len)
+{
+    int ret;
+    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);
+        return OHOS_FAILURE;
+    }
+
+    // 有通话时,不允许拨出电话
+    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 == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DialCall] malloc tel error");
+        return OHOS_FAILURE;
+    }
+    (void)memcpy_s(tel, len, number, len);
+    *(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 ret %d", ret);
         free(tel);
-        return OHOS_SUCCESS;
+        return OHOS_FAILURE;
     }
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[DialCall] success!");
+    free(tel);
+    return OHOS_SUCCESS;
+}
 
-    // 手表主动接听
-    int AcceptIncomingCall(void)
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] start");
-        int ret, i;
-        PhoneCallInfo *phoneCall = NULL;
-        PhoneCallInfo *tmp = g_callList;
+// 手表主动接听
+int AcceptIncomingCall(void)
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] start");
+    int32_t ret;
+    PhoneCallInfo *phoneCall = nullptr;
+    PhoneCallInfo *tmp = g_callList;
 
-        if (g_btConnState != PROFILE_STATE_CONNECTED)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] BT connStatus: 0x%X", g_btConnState);
-            return OHOS_FAILURE;
-        }
+    if (g_btConnState != PROFILE_STATE_CONNECTED) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] BT connStatus: 0x%X", g_btConnState);
+        return OHOS_FAILURE;
+    }
 
-        for (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++;
+    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)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] no incoming");
-            return OHOS_FAILURE;
-        }
+    if (phoneCall == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] no incoming");
+        return OHOS_FAILURE;
+    }
 
-        phoneCall->operate = OPERATE_WATCH_ACTIVE;
+    phoneCall->operate = OPERATE_WATCH_ACTIVE;
 
-        if (g_currCallNum > 1)
-        {
-            ret = hfp_hf_accept_incoming_call(&g_bdAddr, HFP_HF_ACCEPT_CALL_ACTION_HOLD); // 正在通话,有人呼入,接听呼入电话,挂起当前通话
-        }
-        else
-        {
-            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);
-            phoneCall->operate = OPERATE_NO_OPE;
-            return OHOS_FAILURE;
-        }
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] success!");
-        return OHOS_SUCCESS;
+    if (g_currCallNum > 1) {
+        ret = hfp_hf_accept_incoming_call(&g_bdAddr, HFP_HF_ACCEPT_CALL_ACTION_HOLD); // 正在通话,有人呼入,接听呼入电话,挂起当前通话
+    } else {
+        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] ret:%d", ret);
+        phoneCall->operate = OPERATE_NO_OPE;
+        return OHOS_FAILURE;
+    }
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] success!");
+    return OHOS_SUCCESS;
+}
 
-    // 手表拒接呼入来电,成功:0,失败:错误码
-    int RejectIncomingCall(void)
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[RejectIncomingCall] start");
-        int ret, i;
-        PhoneCallInfo *phoneCall = NULL;
-        PhoneCallInfo *tmp = g_callList;
-
-        if (g_btConnState != PROFILE_STATE_CONNECTED)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[RejectIncomingCall] BT connStatus: 0x%X", g_btConnState);
-            return OHOS_FAILURE;
-        }
+// 手表拒接呼入来电,成功:0,失败:错误码
+int RejectIncomingCall(void)
+{
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[RejectIncomingCall] start");
+    PhoneCallInfo *phoneCall = nullptr;
+    PhoneCallInfo *tmp = g_callList;
 
-        for (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 (g_btConnState != PROFILE_STATE_CONNECTED) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[RejectIncomingCall] BT connStatus: 0x%X", g_btConnState);
+        return OHOS_FAILURE;
+    }
 
-        if (phoneCall == NULL)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] no incoming");
-            return OHOS_SUCCESS;
+    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++;
+    }
 
-        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);
-            return OHOS_FAILURE;
-        }
-        g_finishOperate = OPERATE_WATCH_REJECT;
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[RejectIncomingCall] success!");
+    if (phoneCall == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] no incoming");
         return OHOS_SUCCESS;
     }
 
-    // 手表结束通话
-    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);
-            return OHOS_FAILURE;
-        }
-        g_finishOperate = OPERATE_WATCH_FINISH;
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[FinishCall] success!");
-        return OHOS_SUCCESS;
+    int32_t ret = hfp_hf_reject_incoming_call(&g_bdAddr);
+    if (ret != ERRCODE_BT_SUCCESS) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[RejectIncomingCall] ret:%d", ret);
+        return OHOS_FAILURE;
     }
+    g_finishOperate = OPERATE_WATCH_REJECT;
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[RejectIncomingCall] success!");
+    return OHOS_SUCCESS;
+}
 
-    // 获取当前正在通话路数
-    int GetCurrCallNum(void)
-    {
-        return g_currCallNum;
-    }
-
-    /**
-     * @brief 获取当前通话路数和对应的通话信息
-     *
-     * @param callList 用来接收通话信息,需调用者分配空间,大小为MULTI_CALL_MAX_NUME * sizeof(PhoneCallInfo)
-     * @param listNum callList中PhoneCallInfo个数,大小为MULTI_CALL_MAX_NUME
-     * @param retNum 接收当前正在进行的通话路数
-     * @return 返回值 成功返回0,失败返回错误码
-     */
-    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)
-        {
-            *retNum = 0;
-            return OHOS_FAILURE;
-        }
+// 手表结束通话
+int FinishCall(void)
+{
+    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] ret:%d", ret);
+        return OHOS_FAILURE;
+    }
+    g_finishOperate = OPERATE_WATCH_FINISH;
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "FinishCall");
+    return OHOS_SUCCESS;
+}
 
-        if (g_currCallNum == 0)
-        {
-            *retNum = 0;
-            return OHOS_SUCCESS;
-        }
+// 获取当前正在通话路数
+int GetCurrCallNum(void)
+{
+    return g_currCallNum;
+}
 
-        len = sizeof(PhoneCallInfo);
-        for (i = 0; i < MULTI_CALL_MAX_NUME; i++)
-        {
-            if (tmp->lastStatus == HFP_HF_CALL_STATE_FINISHED)
-            {
-                tmp++;
-            }
-            else
-            {
-                (void)memcpy_s(tmp2, len, tmp, len);
-                tmp++;
-                tmp2++;
-            }
-        }
+/**
+ * @brief 获取当前通话路数和对应的通话信息
+ *
+ * @param callList 用来接收通话信息,需调用者分配空间,大小为MULTI_CALL_MAX_NUME * sizeof(PhoneCallInfo)
+ * @param listNum callList中PhoneCallInfo个数,大小为MULTI_CALL_MAX_NUME
+ * @param retNum 接收当前正在进行的通话路数
+ * @return 返回值 成功返回0,失败返回错误码
+ */
+int GetCallInfoInCallList(PhoneCallInfo callList[], int listNum, int *retNum)
+{
+    PhoneCallInfo *tmp = g_callList;
+    PhoneCallInfo *tmp2 = callList;
+
+    if (callList == nullptr || listNum < MULTI_CALL_MAX_NUME) {
+        *retNum = 0;
+        return OHOS_FAILURE;
+    }
 
-        *retNum = g_currCallNum;
+    if (g_currCallNum == 0) {
+        *retNum = 0;
         return OHOS_SUCCESS;
     }
 
-    // 获取当前通话音量大小 (0 - 15)
-    // hfp音量范围 0-15, media 音量范围 0-100
-    unsigned char GetCallCurrVolume(void)
-    {
-        int volume;
-        int minVolume;
-        int maxVolume;
-        unsigned char hfpVolume;
+    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 {
+            (void)memcpy_s(tmp2, len, tmp, len);
+            tmp++;
+            tmp2++;
+        }
+    }
 
-        volume = PhoneAudioGetVolume();
-        minVolume = PhoneAudioGetMinVolume();
-        maxVolume = PhoneAudioGetMaxVolume();
-        hfpVolume = (unsigned char)((volume * CALL_VOLUME_MAX) / (maxVolume - minVolume)); // 转换
+    *retNum = g_currCallNum;
+    return OHOS_SUCCESS;
+}
 
-        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;
-    }
-
-    void SetSpeakerVolume(unsigned char hfpVolume)
-    {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] start, hfpVolume = %d", hfpVolume);
-        int ret, minVolume, maxVolume, volume;
-
-        minVolume = PhoneAudioGetMinVolume();
-        maxVolume = PhoneAudioGetMaxVolume();
-        volume = hfpVolume * (maxVolume - minVolume) / CALL_VOLUME_MAX; // 转换
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] minVolume = %d, maxVolume = %d, volume = %d",
-                      minVolume, maxVolume, volume);
-
-        ret = PhoneAudioSetVolume(volume);
-        if (ret != true)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] PhoneAudioSetVolume ret = %d", ret);
-            return;
-        }
+// 获取当前通话音量大小 (0 - 15)
+// hfp音量范围 0-15, media 音量范围 0-100
+unsigned char GetCallCurrVolume(void)
+{
+    int32_t volume = PhoneAudioGetVolume();
+    int32_t minVolume = PhoneAudioGetMinVolume();
+    int32_t maxVolume = PhoneAudioGetMaxVolume();
+    unsigned char hfpVolume = (unsigned char)((volume * CALL_VOLUME_MAX) / (maxVolume - minVolume)); // 转换
 
-        ret = hfp_hf_set_volume(&g_bdAddr, HFP_VOLUME_SPEAKER, hfpVolume);
-        if (ret != ERRCODE_BT_SUCCESS)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] set_volume fail ret = %d, hfpVolume = %d",
-                          ret, hfpVolume);
-            return;
-        }
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] success!");
+    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;
+}
 
+void SetSpeakerVolume(unsigned char hfpVolume)
+{
+    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);
+
+    int32_t ret = PhoneAudioSetVolume(volume);
+    if (!ret) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] PhoneAudioSetVolume ret:%d", ret);
         return;
     }
 
-    // 设置通话speaker静音
-    bool SetSpeakerMute(bool isMute)
-    {
-        return PhoneAudioSetSpeakerMute(isMute);
+    ret = hfp_hf_set_volume(&g_bdAddr, HFP_VOLUME_SPEAKER, hfpVolume);
+    if (ret != ERRCODE_BT_SUCCESS) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] set_volume ret:%d, hfpVolume:%d",
+            ret, hfpVolume);
+        return;
     }
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[SetSpeakerVolume] success!");
 
-    // 设置通话mic静音/取消静音
-    bool SetMicMute(bool isMute)
-    {
-        return PhoneAudioSetMicMute(isMute);
-    }
+    return;
+}
 
-    // 获取SCO的连接状态
-    int GetScoConnectState(void)
-    {
-        return g_scoFlag;
-    }
+// 设置通话speaker静音
+bool SetSpeakerMute(bool isMute)
+{
+    return PhoneAudioSetSpeakerMute(isMute);
+}
 
-    // 通话转移到手表
-    int TransCallToWatch(void)
-    {
-        int ret;
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[TransCallToWatch] start");
+// 设置通话mic静音/取消静音
+bool SetMicMute(bool isMute)
+{
+    return PhoneAudioSetMicMute(isMute);
+}
 
-        if (g_btConnState != PROFILE_STATE_CONNECTED)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToWatch] BT connStatus: 0x%X", g_btConnState);
-            return OHOS_FAILURE;
-        }
+// 获取SCO的连接状态
+int GetScoConnectState(void)
+{
+    return g_scoFlag;
+}
 
-        ret = GetScoConnectState();
-        if (ret == HFP_SCO_STATE_CONNECTED || ret == HFP_SCO_STATE_CONNECTING)
-        {
-            return OHOS_SUCCESS;
-        }
-        else
-        {
-            ret = hfp_hf_connect_sco(&g_bdAddr);
-            if (ret != 0)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToWatch] ret = %d", ret);
-            }
-            return ret;
+// 通话转移到手表
+int TransCallToWatch(void)
+{
+    int ret;
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[TransCallToWatch] start");
+
+    if (g_btConnState != PROFILE_STATE_CONNECTED) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToWatch] BT connStatus: 0x%X", g_btConnState);
+        return OHOS_FAILURE;
+    }
+
+    ret = GetScoConnectState();
+    if (ret == HFP_SCO_STATE_CONNECTED || ret == HFP_SCO_STATE_CONNECTING) {
+        return OHOS_SUCCESS;
+    } else {
+        ret = hfp_hf_connect_sco(&g_bdAddr);
+        if (ret != 0) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToWatch] ret:%d", ret);
         }
+        return ret;
     }
+}
 
-    // 通话转移到手机
-    int TransCallToMobilePhone(void)
-    {
-        int ret;
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[TransCallToMobilePhone] start");
+// 通话转移到手机
+int TransCallToMobilePhone(void)
+{
+    int ret;
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[TransCallToMobilePhone] start");
 
-        if (g_btConnState != PROFILE_STATE_CONNECTED)
-        {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToMobilePhone] BT connStatus: 0x%X", g_btConnState);
-            return OHOS_FAILURE;
-        }
+    if (g_btConnState != PROFILE_STATE_CONNECTED) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToMobilePhone] BT connStatus: 0x%X", g_btConnState);
+        return OHOS_FAILURE;
+    }
 
-        ret = GetScoConnectState();
-        if (ret == HFP_SCO_STATE_DISCONNECTED || ret == HFP_SCO_STATE_DISCONNECTING)
-        {
-            return OHOS_SUCCESS;
-        }
-        else
-        {
-            ret = hfp_hf_disconnect_sco(&g_bdAddr);
-            if (ret != 0)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToMobilePhone] ret = %d", ret);
-            }
-            return ret;
+    ret = GetScoConnectState();
+    if (ret == HFP_SCO_STATE_DISCONNECTED || ret == HFP_SCO_STATE_DISCONNECTING) {
+        return OHOS_SUCCESS;
+    } else {
+        ret = hfp_hf_disconnect_sco(&g_bdAddr);
+        if (ret != 0) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TransCallToMobilePhone] ret:%d", ret);
         }
+        return ret;
     }
+}
 
 #ifdef __cplusplus
 }
index 724c739..61e9094 100755 (executable)
@@ -8,7 +8,7 @@
 #ifndef PLAYERS_MODEL_H
 #define PLAYERS_MODEL_H
 
-#include "stdio.h"
+#include <cstdio>
 #include "gfx_utils/list.h"
 #include "UiServersMsg.h"
 #include "player.h"
index 7446839..f955b71 100755 (executable)
@@ -108,8 +108,7 @@ private:
     void SoundButtonOnClick();
     void PlayerModelButtonOnClick();
     void OptionsButtonOnClick();
-    VolumeSettingView *volumeSetting{nullptr};
-    UIViewGroup *volumeSettingView{nullptr};
+    VolumeSettingView *volumeSettingView{nullptr};
 };
 
 // 播放器回调
@@ -159,7 +158,7 @@ class PlayerOnDragListener : public UIView::OnDragListener {
 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:
index 6be9d5a..5ad0ba1 100755 (executable)
@@ -35,7 +35,7 @@ class PlayersCaseListAdapter;
 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
@@ -101,7 +101,7 @@ private:
     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
index b653490..dfae528 100755 (executable)
@@ -43,13 +43,12 @@ BluetoothView::BluetoothView()
 {\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
@@ -116,7 +115,7 @@ UIRadioButton *BluetoothView::GetPhoneButton(void)
 // 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
index a6547ef..b9e5502 100755 (executable)
@@ -65,8 +65,7 @@ bool BtnOnClickListListener::OnClick(UIView& view, const ClickEvent& event)
     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();
index fbcd64f..4e44628 100755 (executable)
@@ -33,7 +33,7 @@ PlayersModel::~PlayersModel()
 \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
@@ -140,7 +140,7 @@ bool PlayersModel::GetAudioInitStatus(void)
 \r
 void PlayersModel::AudioInit(void)\r
 {\r
-    if (audioInitStatus == true) {\r
+    if (audioInitStatus) {\r
         return;\r
     }\r
     AudioManager& amIntance = AudioManager::GetInstance();\r
@@ -195,7 +195,7 @@ void PlayersModel::PlaySwitching(void)
     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
@@ -239,7 +239,6 @@ int PlayersModel::PlayerInit(void)
     }\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
@@ -251,7 +250,7 @@ int PlayersModel::PlayerInit(void)
         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
@@ -274,10 +273,9 @@ void PlayersModel::NextSong(int16_t index)
     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
@@ -358,7 +356,7 @@ void PlayersModel::RandomPlayout()
 {\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
@@ -687,7 +685,6 @@ void PlayersModel::ConnectBtAndLocalPlay(int32_t connCtState, int32_t connTgStat
                     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
@@ -700,7 +697,6 @@ void PlayersModel::ConnectBtAndLocalPlay(int32_t connCtState, int32_t connTgStat
                 }\r
         }\r
     }\r
-     \r
 }\r
 \r
 // 蓝牙连接和本地音乐的暂停\r
index 3a22d8c..98510eb 100755 (executable)
@@ -8,7 +8,7 @@
 #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"
@@ -219,7 +219,6 @@ bool JumpView::ChangeBluetoothDeviceListView(int16_t hideView, int16_t thisView)
         }
         deviceList->RefreshList();
     }
-    BluetoothDeviceListView *bluetoothDeviceListView = BluetoothDeviceListView::GetInstance();
     if (bluetoothDeviceListView == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OnClick bluetoothDeviceListView new fail");
         return false;
@@ -249,14 +248,13 @@ bool JumpView::ChangeBluetoothReconnectView(int16_t hideView, int16_t thisView)
         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;
@@ -313,7 +311,6 @@ bool JumpView::ChangeTipsConnFailMessageView(int16_t hideView, int16_t thisView)
         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 {
@@ -374,14 +371,14 @@ bool JumpView::CheckViewParam(int16_t hideView, int16_t showView)
 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;
     }
@@ -456,8 +453,8 @@ int PlayersListGroup::GetAllFiles(List<PlayerCaseInfo> *playersCaseList)
     // 打开目录
     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);
@@ -536,24 +533,25 @@ void ButtonOnClickListener::SoundButtonOnClick()
         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);
     }
-    VolumeSliderEventListener *volumeSliderEventListener = VolumeSliderEventListener::GetInstance();
+    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 = volumeSettingView->GetVolumeEventListener();
     if (volumeSliderEventListener == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SoundButtonOnClick volumeSliderEventListener nullptr err");
         return;
@@ -822,7 +820,7 @@ static void Resume(void)
     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) {
@@ -906,7 +904,7 @@ void PlayerOnDragListener::OnDragChangView(const DragEvent& event, int16_t hideV
 {
     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");
@@ -950,7 +948,7 @@ void PlayerOnDragListener::OnDragChangBluetoothView(const DragEvent& event)
 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 {
@@ -965,8 +963,8 @@ void PlayerOnDragListener::DropEarListView(const DragEvent& event)
     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);
     }
@@ -1026,13 +1024,13 @@ void PlayerOnDragListener::CorrespondingJump(const DragEvent& event, int16_t hid
             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 {
@@ -1091,8 +1089,8 @@ void PlayersPresenter::OnClickCancelConnedRequestButton(void)
     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);
 
@@ -1174,14 +1172,14 @@ void PlayersPresenter::OnClickButtonOptionOne(void)
         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,
@@ -1189,8 +1187,8 @@ void PlayersPresenter::OnClickButtonOptionOne(void)
         // 判断是否正在连接
         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();
@@ -1222,7 +1220,7 @@ void PlayersPresenter::OnClickSetting(void)
     // 设备列表
     List<BluetoothCaseInfo> &bluetoothCaseList = BluetoothModel::GetInstance()->GetConnedDevicesCase();
     bool ret = bluetoothCaseList.IsEmpty();
-    if (ret != true) {
+    if (!ret) {
         jumpView->ChangeView(JumpView::BluetoothJumpViewNum::BLUETOOTHEVIEW,
                              JumpView::BluetoothJumpViewNum::BLUETOOTHDEVICELISTVIEW);
     } else {
@@ -1345,7 +1343,7 @@ void PlayersPresenter::SetPlayerState(bool value)
         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);
     }
index e64666b..c5bbc47 100755 (executable)
@@ -4,7 +4,7 @@
  * Author:
  * Create: 2021-07-26
  */
-#include <stdlib.h>
+#include <cstdlib>
 #include <unistd.h>
 #include "common/image_cache_manager.h"
 #include "ui_resource_image.h"
@@ -32,9 +32,9 @@ PlayersView::PlayersView()
 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();
@@ -80,7 +80,6 @@ void PlayersView::TitleSetText(const char *text)
     titleLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
     titleLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER,
                          UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);
-
 }
 
 void PlayersView::PlayerModelButtonSetSrc(uint32_t playMode)
@@ -157,7 +156,7 @@ UICheckBox::UICheckBoxState PlayersView::GetPlayerButtonState(void)
 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);
@@ -171,7 +170,7 @@ UIList *PlayersView::GetPlayerList(void)
 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();
@@ -301,7 +300,7 @@ int PlayersView::ShowUpCheckBoxButton()
     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;
     }
@@ -344,7 +343,7 @@ int PlayersView::ShowUpButton()
     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());
@@ -356,22 +355,22 @@ int PlayersView::ShowUpButton()
 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;
         }
@@ -381,8 +380,7 @@ bool PlayersView::ShowUpPlayerMode()
 
 int PlayersView::ShowUpButtonView()
 {
-    int ret;
-    ret = ShowUpCheckBoxButton();
+    int32_t ret = ShowUpCheckBoxButton();
     if (ret == OHOS_FAILURE) {
         return OHOS_FAILURE;
     }
@@ -510,7 +508,7 @@ bool PlayersView::InitBackGround(void)
         }
     }
     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;
     }
@@ -563,7 +561,7 @@ bool PlayersView::InitView(void)
     int ret;
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, " PlayersView InitView");
 
-    if (InitBackGround() == false) {
+    if (!InitBackGround()) {
         return false;
     }
 
index a98af03..dba1ce0 100755 (executable)
@@ -87,7 +87,7 @@ UIViewGroup *RebootDeviceView::InitShowUpView(void)
         group->SetHeight(VERTICAL_RESOLUTION);\r
     }\r
     ret = ShowUpRebootDeviceView();\r
-    if (ret == false) {\r
+    if (!ret) {\r
         return nullptr;\r
     }\r
     group->Add(rebootDeviceLabel);\r
index 1718954..b8462fe 100755 (executable)
@@ -176,14 +176,14 @@ UIViewGroup *RebootView::InitShowUpView(void)
         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);
@@ -204,12 +204,12 @@ bool RebootView::ChangeRebootView(int16_t hideView, int16_t thisView)
 {
     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;
 }
@@ -225,12 +225,12 @@ bool RebootView::ChangeRebootDeviceView(int16_t hideView, int16_t thisView)
             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;
@@ -247,12 +247,12 @@ bool RebootView::ChangeShutdownDeviceView(int16_t hideView, int16_t thisView)
             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;
@@ -277,14 +277,14 @@ void RebootView::ChangeView(int16_t hideView, int16_t showView)
 {
     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;
     }
index 74ce3a6..e3d74ec 100755 (executable)
@@ -88,7 +88,7 @@ UIViewGroup *ShutdownDeviceView::InitShowUpView(void)
     }\r
 \r
     ret = ShowUpShutdownDeviceView();\r
-    if (ret == false) {\r
+    if (!ret) {\r
         return nullptr;\r
     }\r
     group->Add(shutdownDeviceLabel);\r
index 4178ba7..8e13b59 100755 (executable)
@@ -4,8 +4,8 @@
  * 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
@@ -37,7 +37,7 @@ static RtcService g_rtcService = {
     .MessageHandle = ServiceMessageHandle,\r
     .GetTaskConfig = GetServiceTaskConfig,\r
     .subscirber = {\r
-        .identity = NULL,\r
+        .identity = nullptr,\r
         .args = &g_rtcService,\r
         .Notify = Notify,\r
     },\r
@@ -96,18 +96,18 @@ static TaskConfig GetServiceTaskConfig(Service *service)
 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
@@ -119,18 +119,18 @@ static void SubscribeTopic(Topic topic)
 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
@@ -144,7 +144,7 @@ static void Notify(void *args, const Topic topic, Request* req)
     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
@@ -155,7 +155,7 @@ static void Notify(void *args, const Topic topic, Request* req)
         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
index 07627da..d9658eb 100644 (file)
@@ -1,5 +1,5 @@
 #include <list>
-#include "stdio.h"
+#include <cstdio>
 #include "ability_state.h"
 #include "cmsis_os2.h"
 #include "common_def.h"
@@ -9,7 +9,6 @@
 #include "power_display_service.h"
 #include "NativeAbility.h"
 #include "AppViewIDs.h"
-#include "components/ui_label_ext.h"
 #include "MainViewSample.h"
 #include "ui_screennotify.h"
 
@@ -59,17 +58,23 @@ static void ChangeToHomeView(void)
 
 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)
index 5eebb98..6f37eb8 100755 (executable)
@@ -8,7 +8,7 @@
 #include "wearable_log.h"
 #include "iostream"
 #include <fstream>
-#include "stdio.h"
+#include <cstdio>
 #include <fcntl.h>
 #include <unistd.h>
 #include "kvstore_env.h"
index 417891c..75b9ba8 100644 (file)
@@ -23,18 +23,24 @@ namespace OHOS {
 class SetCardAdapter : public AbstractAdapter {
 public:
     explicit SetCardAdapter();
-    virtual ~SetCardAdapter();
+    ~SetCardAdapter() override;
 
-    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 CardInfo &item);
+    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
index 99b0c8c..6abfe4e 100644 (file)
@@ -15,7 +15,7 @@ namespace OHOS {
 class SetCardDeleteView : public UIViewGroup {\r
 public:\r
     SetCardDeleteView(SetCardPresenter *presenter);\r
-    virtual ~SetCardDeleteView();\r
+    ~SetCardDeleteView() override;\r
     bool InitView();\r
 private:\r
     SetCardPresenter *presenter_;\r
index 646f24f..3926d93 100644 (file)
 \r
 namespace OHOS {\r
 \r
-class SetCardItem :public UIViewGroup {\r
+class SetCardItem : public UIViewGroup {\r
 public:\r
     SetCardItem();\r
-    virtual ~SetCardItem();\r
+    ~SetCardItem() override;\r
     void SetItemInfo(const CardInfo &cardInfo);\r
+    void SetOnClickListener(OnClickListener *onClickListener);\r
 private:\r
     void SetUpChild();\r
     UIImageView cardImg_;\r
index 16264fa..dc8ee12 100644 (file)
@@ -17,7 +17,7 @@ namespace OHOS {
 class SetCardNoCardView : public UIViewGroup {\r
 public:\r
     SetCardNoCardView(SetCardPresenter *presenter);\r
-    virtual ~SetCardNoCardView();\r
+    ~SetCardNoCardView() override;\r
     bool InitView();\r
 private:\r
     SetCardPresenter *presenter_;\r
index 5c9b4e0..c4080fa 100644 (file)
@@ -12,6 +12,7 @@
 #include "components/ui_list.h"
 #include "components/ui_view.h"
 #include "KeyInputListener.h"
+#include "ModelListenerSample.h"
 
 namespace OHOS {
 
@@ -19,32 +20,40 @@ 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 UIView::OnClickListener, public ModelListenerSample,
                          public ListScrollListener  {
 public:
     SetCardPresenter();
-    virtual ~SetCardPresenter();
+    ~SetCardPresenter() 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 void OnScrollStart(int16_t index, UIView *view) override;
-    virtual void OnScrollEnd(int16_t index, UIView *view) override;
-    virtual void OnItemSelected(int16_t index, UIView* view) 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};
 };
 }
 
index 9c18e0d..52f87c8 100644 (file)
@@ -28,7 +28,7 @@ class SetCardPresenter;
 class SetCardView : public View<SetCardPresenter> {
 public:
     SetCardView();
-    virtual ~SetCardView();
+    ~SetCardView() override;
 
     static SetCardView *GetInstance()
     {
@@ -36,13 +36,14 @@ public:
         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 ShowDeleteView(bool show);
     void ShowAddView(bool show);
     void RefreshCardList(void);
+    void SaveSelectCardIndex(void);
 private:
     void SetUpListInfo(void);
     void SetUpListView(void);
index 4bce9db..badbc10 100644 (file)
@@ -48,6 +48,7 @@ UIView *SetCardAdapter::GetView(UIView *inView, int16 index)
 
     item->SetItemInfo(*it);
     item->SetViewIndex(index);
+    item->SetOnClickListener(itemClickListener_);
     return item;
 }
 
index 61b9c49..4bdd7ba 100644 (file)
@@ -28,5 +28,12 @@ namespace OHOS {
     {\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
index f32df85..cefddd0 100644 (file)
@@ -14,9 +14,11 @@ namespace OHOS {
     {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardPresenter::SetCardPresenter");
         model = &SetCardModel::GetInstance();
+        ResetTickTimer();
     }
 
-    SetCardPresenter::~SetCardPresenter() {
+    SetCardPresenter::~SetCardPresenter()
+    {
         if (keyActListenr != nullptr) {
             delete keyActListenr;
             keyActListenr = nullptr;
@@ -50,9 +52,10 @@ namespace OHOS {
         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); 
+            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");
@@ -62,8 +65,12 @@ namespace OHOS {
         } 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();
         }
-               return true;
+        ResetTickTimer();
+        return true;
     }
 
     void SetCardPresenter::OnScrollStart(int16_t index, UIView *view)
@@ -78,15 +85,16 @@ namespace OHOS {
         if (view == nullptr) {
             return;
         }
-        model->SetSelectedCardIndex(index);
+        SetSelectedCardIndex(index);
+        ResetTickTimer();
     }
 
-    void SetCardPresenter::OnItemSelected(int16_t index, UIView* view) 
+    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)
     {
@@ -113,4 +121,37 @@ namespace OHOS {
         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();
+    }
 }
index f18a1c8..0efb39e 100644 (file)
@@ -41,6 +41,7 @@ void SetCardView::OnStart()
     SetContainerView(new UIViewGroup());
     container_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
     setCardAdapter_ = new SetCardAdapter();
+    setCardAdapter_->SetItemClickListener(presenter_);
     SetUpListInfo();
     SetUpListView();
     SetUpDeleteView();
@@ -88,6 +89,7 @@ void SetCardView::SetUpListInfo(void)
             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_);
@@ -163,12 +165,12 @@ void SetCardView::ShowCardListView(bool show)
     if (show) {
         addImg_.SetVisible(true);
         contentList_.SetVisible(true);
-        delImg_.SetVisible(true);        
+        delImg_.SetVisible(true);
     } else {
         addImg_.SetVisible(false);
         contentList_.SetVisible(false);
         delImg_.SetVisible(false);
-    }  
+    }
 }
 
 void SetCardView::ShowDeleteView(bool show)
@@ -179,7 +181,7 @@ void SetCardView::ShowDeleteView(bool show)
         deleteView_->SetVisible(true);
     } else {
         ShowCardListView(true);
-        deleteView_->SetVisible(false);        
+        deleteView_->SetVisible(false);
     }
 }
 
@@ -191,7 +193,7 @@ void SetCardView::ShowAddView(bool show)
         noCardView_->SetVisible(true);
     } else {
         ShowCardListView(true);
-        noCardView_->SetVisible(false);        
+        noCardView_->SetVisible(false);
     }
 }
 
@@ -205,4 +207,10 @@ void SetCardView::RefreshCardList(void)
     }
 }
 
+void SetCardView::SaveSelectCardIndex(void)
+{
+    uint8_t cardIdex = contentList_.GetSelectView()->GetViewIndex();
+    presenter_->SetSelectedCardIndex(cardIdex);
+}
+
 }
index 5c5a926..2ef2793 100644 (file)
@@ -30,7 +30,6 @@ namespace OHOS {
         SetDesktopModel(const SetDesktopModel &);
         SetDesktopModel &operator=(const SetDesktopModel &);
         virtual ~SetDesktopModel();
-
     };
 }
 
index 1e8d0c1..d757dbe 100644 (file)
@@ -22,17 +22,16 @@ class SetDesktopPresenter : public Presenter<SetDesktopView>,
                          public UIView::OnDragListener {
 public:
     SetDesktopPresenter();
-    virtual ~SetDesktopPresenter();
+    ~SetDesktopPresenter() 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;
     bool GetHexagonsStyleState(void);
 private:
-
 };
 }
 
index 4c99274..d1827c7 100644 (file)
@@ -24,7 +24,7 @@ class SetDesktopPresenter;
 class SetDesktopView : public View<SetDesktopPresenter> {
 public:
     SetDesktopView();
-    virtual ~SetDesktopView();
+    ~SetDesktopView() override;
 
     static SetDesktopView *GetInstance()
     {
@@ -32,10 +32,10 @@ public:
         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 UpdateSelectedStyle(bool hexagonsSelected);
 private:
     UILabel titleText;
index d5f64f3..43c523e 100644 (file)
@@ -31,7 +31,7 @@ namespace OHOS {
         } else {
             style = APPLIST_STYLE;
         }
-        return style;     
+        return style;
     }
 
     void SetDesktopModel::SetDesktopStyle(DesktopStyle style)
index 0c361bc..e535895 100644 (file)
@@ -53,8 +53,9 @@ namespace OHOS {
         }
         uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId();
         NativeAbility::GetInstance().ChangeSlice(preSlice);
-               return true; 
+        return true;
     }
+
     bool SetDesktopPresenter::GetHexagonsStyleState(void)
     {
         return (SetDesktopModel::GetInstance().GetDesktopStyle() == HEXAGONS_STYLE);
index 7ccb798..2de65cf 100644 (file)
@@ -19,7 +19,6 @@ namespace OHOS {
         std::string imageFullName; /* 仅预制表盘使用 */\r
         std::string dialName;\r
         std::string description;   /* 仅离线表盘使用 */\r
-        uint8_t freq;\r
         ImageInfo *preImageInfo;\r
     } SetDialInfo;\r
 }\r
index 695c5be..6125415 100644 (file)
@@ -29,7 +29,6 @@ namespace OHOS {
         virtual ~SetDialModel();
         int32_t ParseDialHeader(const std::string &dialFileName, SetDialInfo &dialInfo);
         std::vector<SetDialInfo> dialInfoList;
-        uint8_t pageIndex_{0};
     };
 }
 
index 65b4a74..1af1cc9 100644 (file)
 #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 UIView::OnClickListener, public ModelListenerSample,
                          public UICoverflowView::OnCoverflowScrollListener {
 public:
     SetDialPresenter();
-    virtual ~SetDialPresenter();
+    ~SetDialPresenter() override;
     size_t GetDialCount(void);
     std::vector<SetDialInfo>& GetDialInfo(void);
     uint8_t GetPageIndex(void);
-    virtual void OnStart() override;
-    virtual void OnResume() override;
-    virtual void OnStop() override;
+    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};
 };
 }
 
index 85ee938..0a7f564 100644 (file)
@@ -23,7 +23,7 @@ class SetDialPresenter;
 class SetDialView : public View<SetDialPresenter> {
 public:
     SetDialView();
-    virtual ~SetDialView();
+    ~SetDialView() override;
 
     static SetDialView *GetInstance()
     {
@@ -31,10 +31,10 @@ public:
         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 CoverflowViewScroll(void);
     uint8_t GetCoverflowPage(void);
 private:
index 122c0ad..93f3e83 100644 (file)
@@ -4,13 +4,13 @@
  * Author:
  * Create: 2021-11-23
  */
-
+#include <algorithm>
 #include "MainModel.h"
 #include "SetDialModel.h"
 #include "kv_store.h"
 #include "securec.h"
 #include "dirent.h"
-#include "DialBinTypes.h"
+#include "DialBinParser.h"
 #include "wearable_log.h"
 
 namespace OHOS {
@@ -27,7 +27,12 @@ namespace OHOS {
     {
         dialInfoList.clear();
         LoadAllDialFromRam();
+        size_t dialSize = dialInfoList.size();
         LoadAllDialFromFs();
+        /* 只排序离线表盘 */
+        std::sort(dialInfoList.begin() + dialSize, dialInfoList.end(), [](const SetDialInfo& f, const SetDialInfo& n) {
+                    return f.dialName < n.dialName;
+                });
     }
 
     void SetDialModel::LoadAllDialFromRam()
@@ -35,12 +40,11 @@ namespace OHOS {
         for (uint8_t i = DIAL_CLOCK; i < DIAL_MAX; i++) {
             const DialInfo *info = MainModel::GetInstance().GetDialInfo((DialId)i);
             if (info != nullptr) {
-                SetDialInfo dialInfo;
+                SetDialInfo dialInfo{0};
                 dialInfo.dialFlag = 0;
                 dialInfo.id = i;
                 dialInfo.dialName = info->dialName;
                 dialInfo.imageFullName = info->dialImg;
-                dialInfo.freq = info->freq;
                 ImageInfo* imageInfo = ImageCacheManager::GetInstance().LoadSingleRes(info->dialImg, false);
                 if (info == nullptr) {
                     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "LoadAllDialFromRam loadimage %s fail",
@@ -61,9 +65,9 @@ namespace OHOS {
         // 打开目录
         DIR *dirp = opendir(APP_DIAL_PATH);
         // 遍历文件
-        if (dirp != NULL) {
-            while ((direntp = readdir(dirp)) != NULL) {
-                SetDialInfo dialInfo;
+        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);
@@ -77,35 +81,34 @@ namespace OHOS {
 
     int32_t SetDialModel::ParseDialHeader(const std::string &dialFileName, SetDialInfo &dialInfo)
     {
-        DialHeader dialHeader{0};
         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());
+                          dialFullName.c_str());
             return -1;
         }
-        if (fread(&dialHeader, 1, sizeof(dialHeader), fp) != sizeof(dialHeader)) {
-            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader fread %s fail",
-                        dialFullName.c_str());
+        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",
-                      dialHeader.dialName);
+                      preInfo.dialName);
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader description: %s",
-                      dialHeader.description);
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader freq: %u",
-                      dialHeader.freq);
+                      preInfo.description);
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader previewImgId: %u",
-                      dialHeader.previewImgId);
+                      preInfo.imgId);
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader imageOffset: %u",
-                      dialHeader.imageOffset);
+                      preInfo.offset);
         ImageInfo *info = ImageCacheManager::GetInstance().LoadOneInMultiRes(
-            dialHeader.previewImgId | (0xfef << 20), dialFullName, fp, false, dialHeader.imageOffset);
+            preInfo.imgId, dialFullName, fp, false, preInfo.offset);
         if (info == nullptr) {
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ParseDialHeader loadimage fail");
             return -1;
@@ -114,9 +117,8 @@ namespace OHOS {
         dialInfo.dialFlag = 1;
         dialInfo.id = 0;
         dialInfo.dialFullName = dialFullName;
-        dialInfo.dialName = dialHeader.dialName;
-        dialInfo.description = dialHeader.description;
-        dialInfo.freq = dialHeader.freq;
+        dialInfo.dialName = preInfo.dialName;
+        dialInfo.description = preInfo.description;
         dialInfo.preImageInfo = info;
 
         fclose(fp);
@@ -136,7 +138,6 @@ namespace OHOS {
         diagSetting.dialId = info.id;
         diagSetting.dialFullName = info.dialFullName;
         MainModel::GetInstance().AddDialSetting(diagSetting);
-        pageIndex_ = pageIndex;
     }
 
     size_t SetDialModel::GetDialCount(void)
@@ -151,11 +152,21 @@ namespace OHOS {
 
     uint8_t SetDialModel::GetPageIndex(void)
     {
-        if (pageIndex_ >= dialInfoList.size()) {
-            return 0;
-        } else {
-            return pageIndex_;
+        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) {
+                    return index;
+                }
+            } else {
+                if ((!iter.dialFlag) && (iter.id == dialSetting.dialId)) {
+                    return index;
+                }
+            }
+            index++;
         }
+        return 0;
     }
 
 }
index 5aa0bb2..2c3ae78 100644 (file)
@@ -15,6 +15,7 @@ namespace OHOS {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialPresenter::SetDialPresenter");
         model = &SetDialModel::GetInstance();
         model->LoadAllDial();
+        ResetTickTimer();
     }
 
     SetDialPresenter::~SetDialPresenter()
@@ -46,14 +47,18 @@ namespace OHOS {
     {
     }
 
-    bool SetDialPresenter::OnClick(UIView &view, const ClickEvent &event)
+    void SetDialPresenter::OnClickAction(void)
     {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialPresenter::OnClick");
         uint8_t pageIndex = view_->GetCoverflowPage();
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialPresenter select pageIndex = %u", pageIndex);
         model->SaveDialSetting(pageIndex);
         NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE);
-               return true; 
+    }
+
+    bool SetDialPresenter::OnClick(UIView &view, const ClickEvent &event)
+    {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetDialPresenter::OnClick");
+        OnClickAction();
+        return true;
     }
 
     bool SetDialPresenter::OnScroll()
@@ -76,4 +81,17 @@ namespace OHOS {
     {
         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();
+    }
 }
index b683a86..daa69cd 100644 (file)
@@ -77,7 +77,7 @@ void SetDialView::OnStop()
     }
 }
 
-void SetDialView::CoverflowViewScroll(void) 
+void SetDialView::CoverflowViewScroll(void)
 {
     int16_t contMidX = static_cast<int16_t>(Screen::GetInstance().GetWidth() / DIVISOR_TWO);
     int16_t minOffset = contMidX;
@@ -107,7 +107,8 @@ void SetDialView::CoverflowViewScroll(void)
     } 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)
index 80cd05e..d89fe3e 100755 (executable)
@@ -24,7 +24,7 @@ namespace OHOS {
 class SettingAdapter : public AbstractAdapter {
 public:
     explicit SettingAdapter();
-    virtual ~SettingAdapter();
+    ~SettingAdapter() override;
 
     /* *
     * @brief Sets the UIView adapter data, which is a SettingItem linked list.
@@ -42,11 +42,11 @@ public:
     * @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)
     {
index aa5de7a..934e816 100755 (executable)
@@ -19,14 +19,12 @@ namespace OHOS {
 class SettingItemView : public UIViewGroup {
 public:
     explicit SettingItemView();
-    virtual ~SettingItemView();
+    ~SettingItemView() override;
     virtual void SetItemInfo(const SettingItem itemInfo);
     virtual void SetUpChild();
     AppViewId GetViewId();
     const char* GetIconId();
 private:
-    SettingItemView(const SettingItemView &);
-
     UIImageView sIcon;
     UILabel sLabel;
     UIImageView sNextImage;
index 08ca8d5..827ad6f 100755 (executable)
@@ -19,14 +19,14 @@ class SettingPresenter : public Presenter<SettingView>,
                          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;
 };
index a016243..94ab510 100755 (executable)
@@ -23,12 +23,12 @@ class SettingPresenter;
 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:
index 47c9c91..71fed04 100755 (executable)
@@ -50,7 +50,7 @@ namespace OHOS {
     void SettingModel::UpdateBlueToothConnectStatus(bool status)
     {
         btConnectStatus = status;
-        if (PullUpDownView::GetInstance() != NULL) {
+        if (PullUpDownView::GetInstance() != nullptr) {
             PullUpDownView::GetInstance()->UpdateBlueToothStatus(status);
         }
     }
index 368d367..63a84c7 100755 (executable)
@@ -47,7 +47,7 @@ namespace OHOS {
         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(VIEW_APPLIST)");
-            NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST);
+            NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_BACK_TO_HEXAGONS);
         }
         return false;
     }
@@ -58,7 +58,7 @@ namespace OHOS {
         SettingItemView *settingItemView = static_cast<SettingItemView *>(&view);
         AppViewId viewId = settingItemView->GetViewId();
         if (viewId == VIEW_REBOOT) {
-            if (strstr(settingItemView->GetIconId(), "REBOOT") != nullptr){
+            if (strstr(settingItemView->GetIconId(), "REBOOT") != nullptr) {
                 RebootModel::GetInstance()->SetSelectViewId(REBOOTDEVICE);
                 RebootModel::GetInstance()->SetExitsView(true);
             } else {
index b38f9a6..868feb1 100755 (executable)
@@ -31,21 +31,31 @@ SettingView::SettingView()
 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()
@@ -122,6 +132,7 @@ void SettingView::OnSetUpView()
     scrollView->Add(contentList);
     RootView::GetInstance()->Add(scrollView);
     contentList->SetAdapter(listAdapter);
+    container_ = scrollView;
     return;
 }
 
@@ -129,18 +140,13 @@ void SettingView::OnTearDownView()
 {
     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;
index c732070..7756ff7 100755 (executable)
@@ -17,7 +17,7 @@ namespace OHOS {
 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
index d827b22..c6aca9e 100755 (executable)
@@ -17,7 +17,7 @@ namespace OHOS {
 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
index 27207e5..81df814 100755 (executable)
@@ -17,7 +17,7 @@ namespace OHOS {
 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
index cd02beb..6354377 100755 (executable)
@@ -17,7 +17,7 @@ namespace OHOS {
 class TempExitPrompt : public UIScrollView {\r
 public:\r
     TempExitPrompt();\r
-    virtual ~TempExitPrompt();\r
+    ~TempExitPrompt() override;\r
     bool InitExitPrompt();\r
     static TempExitPrompt *GetInstance();\r
 private:\r
index 69b4997..6de7982 100755 (executable)
@@ -18,7 +18,7 @@ namespace OHOS {
 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
index 20e1759..6aec60c 100755 (executable)
@@ -17,7 +17,7 @@ namespace OHOS {
 class TempJoinStudy : public UIScrollView {\r
 public:\r
     TempJoinStudy();\r
-    virtual ~TempJoinStudy();\r
+    ~TempJoinStudy() override;\r
     bool InitJoinStudy();\r
     static TempJoinStudy *GetInstance();\r
 private:\r
index ffec9b4..49320fc 100755 (executable)
@@ -16,7 +16,7 @@ namespace OHOS {
 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
index 2a9dc46..9fe86b1 100755 (executable)
@@ -36,7 +36,7 @@ class TempMainView;
 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
index 94b8f79..ebd0ee4 100755 (executable)
@@ -18,7 +18,7 @@ namespace OHOS {
 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
index 433941f..de6aa31 100755 (executable)
@@ -18,7 +18,7 @@ namespace OHOS {
 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
index d5e5771..06c0346 100755 (executable)
@@ -69,7 +69,7 @@ class TempPresenter : public Presenter<TempMainView>, public UIView::OnClickList
  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
@@ -98,7 +98,7 @@ public:
     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
index b1cf423..5f590e0 100755 (executable)
@@ -18,7 +18,7 @@ namespace OHOS {
 class TempPromptWear : public UIScrollView {\r
 public:\r
     TempPromptWear();\r
-    virtual ~TempPromptWear();\r
+    ~TempPromptWear() override;\r
     bool InitPromptWear();\r
     static TempPromptWear *GetInstance();\r
 private:\r
index 4bde638..24f10ed 100755 (executable)
@@ -17,7 +17,7 @@ namespace OHOS {
 class TempRemindWear : public UIScrollView {\r
 public:\r
     TempRemindWear();\r
-    virtual ~TempRemindWear();\r
+    ~TempRemindWear() override;\r
     bool InitRemindWear();\r
     static TempRemindWear *GetInstance();\r
 private:\r
index 12df52c..3faadd5 100755 (executable)
@@ -17,7 +17,7 @@ namespace OHOS {
 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
index b20be95..3d0deee 100755 (executable)
@@ -16,7 +16,7 @@ namespace OHOS {
 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
index c87af94..821b4a4 100755 (executable)
@@ -18,7 +18,7 @@ namespace OHOS {
 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
index 478501d..28c402b 100755 (executable)
@@ -125,11 +125,11 @@ bool TempClickMea::InitClickMea(void)
     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
index 8fe2db4..3a7799b 100755 (executable)
@@ -130,11 +130,11 @@ bool TempContinueWarn::InitTempContinue(void)
     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
index 09128a8..16ab19d 100755 (executable)
@@ -45,14 +45,13 @@ TempExitInter::~TempExitInter()
 {\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
@@ -118,19 +117,19 @@ bool TempExitInter::InitSimilarImage(int16 num, int16 tempX, int16 tempY, const
 \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
@@ -153,11 +152,11 @@ bool TempExitInter::InitView(void *caller)
     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
index 61512e3..1246218 100755 (executable)
@@ -114,11 +114,11 @@ bool TempExitPrompt::InitExitPrompt(void)
     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
index 134053f..f82267b 100755 (executable)
@@ -67,14 +67,13 @@ TempInitInter::~TempInitInter()
 {\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
@@ -142,18 +141,18 @@ typedef struct {
 } 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
@@ -216,19 +215,19 @@ bool TempInitInter::InitView(void *caller)
         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
index 77d36a8..90eb0ed 100755 (executable)
@@ -49,18 +49,17 @@ TempJoinStudy::~TempJoinStudy()
 {\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
@@ -102,15 +101,15 @@ bool TempJoinStudy::TempInitLabel(void)
     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
@@ -174,11 +173,11 @@ bool TempJoinStudy::InitJoinStudy(void)
     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
index abf0694..0ce6668 100755 (executable)
@@ -85,24 +85,24 @@ typedef struct {
 } 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
@@ -155,11 +155,11 @@ bool TempLittleTip::InitLittleTip(void)
     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
index 2b111d5..5f0952f 100755 (executable)
@@ -31,13 +31,12 @@ TempMainView::TempMainView()
 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
@@ -74,7 +73,7 @@ void TempMainView::OnStart()
         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
@@ -297,7 +296,7 @@ bool TempMainView::ChangeMeasure(int16 thisView)
     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
@@ -307,7 +306,7 @@ bool TempMainView::ChangeMeasure(int16 thisView)
             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
@@ -318,7 +317,7 @@ bool TempMainView::ChangeMeasure(int16 thisView)
             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
@@ -344,7 +343,7 @@ bool TempMainView::ChangeClickMea(int16 thisView)
             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
@@ -369,7 +368,7 @@ bool TempMainView::ChangeRemindWear(int16 thisView)
             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
@@ -389,7 +388,7 @@ bool TempMainView::ChangeMeaProcess(int16 thisView)
             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
@@ -409,7 +408,7 @@ bool TempMainView::ChangeTempInit(int16 thisView)
     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
@@ -419,7 +418,7 @@ bool TempMainView::ChangeTempInit(int16 thisView)
             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
@@ -430,7 +429,7 @@ bool TempMainView::ChangeTempInit(int16 thisView)
             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
@@ -441,7 +440,7 @@ bool TempMainView::ChangeTempInit(int16 thisView)
             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
@@ -467,7 +466,7 @@ bool TempMainView::ChangeTempWarn(int16 thisView)
             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
@@ -492,7 +491,7 @@ bool TempMainView::ChangeContinue(int16 thisView)
             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
@@ -516,7 +515,7 @@ bool TempMainView::ChangeTempTip(int16 thisView)
             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
@@ -541,7 +540,7 @@ bool TempMainView::ChangeExitPrompt(int16 thisView)
             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
@@ -561,7 +560,7 @@ bool TempMainView::ChangeStudyAbout(int16 thisView)
             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
@@ -600,7 +599,7 @@ bool TempMainView::ClickFunc(int16 interface)
     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
@@ -618,7 +617,7 @@ void TempMainView::ChangeView(int16 hideView, int16 showView)
         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
index b281671..462541c 100755 (executable)
@@ -160,15 +160,15 @@ bool TempMeaProcess::InitMeaProcess(void)
     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
index 28e9e24..f06aeaf 100755 (executable)
@@ -166,15 +166,15 @@ bool TempMeasure::InitView(void *caller)
     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
index 5f44a54..d65187a 100755 (executable)
@@ -43,15 +43,16 @@ void TempPresenter::OnStart()
 {\r
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TempPresenter OnStart");\r
     Presenter<TempMainView>::OnStart();\r
-    SendMsgToUIService(UI_ADD_SLEEP_VETO, 0, NULL, 0);\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
-    SendMsgToUIService(UI_RM_SLEEP_VETO, 0, NULL, 0);\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
@@ -71,7 +72,7 @@ void TempPresenter::ProgressNotify(void)
     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
             GraphicService::GetInstance()->PostGraphicEvent(std::bind(&TempPresenter::UpdateTempCount, this));\r
index db3d2ae..ab8ac12 100755 (executable)
@@ -119,15 +119,15 @@ bool TempPromptWear::InitPromptWear(void)
     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
index afa948f..20c1e8e 100755 (executable)
@@ -108,11 +108,11 @@ bool TempRemindWear::InitRemindWear(void)
     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
index 09e3133..b4a0f6e 100755 (executable)
@@ -63,15 +63,14 @@ TempReport::TempReport()
 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
@@ -159,23 +158,23 @@ bool TempReport::InitSimilarImage(int16 num, int16 tempX, int16 tempY, const cha
 \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
@@ -197,15 +196,15 @@ bool TempReport::InitView(void *caller)
     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
index 362ca5c..7153c76 100755 (executable)
@@ -70,16 +70,16 @@ typedef struct {
 } 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)
@@ -129,11 +129,11 @@ bool TempStudyAbout::InitStudyAbout(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;
     }
index cbd1503..6ef18b5 100755 (executable)
@@ -122,15 +122,15 @@ bool TempWarn::InitTempWarn(void)
     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
index 0570ca0..45028ca 100755 (executable)
@@ -11,7 +11,6 @@
 #include <cstdint>
 #include <map>
 #include "AppViewIDs.h"
-#include "components/ui_label_ext.h"
 #include "UiConfig.h"
 #include "UISamplePresenter.h"
 
@@ -25,7 +24,6 @@ namespace OHOS {
         UISampleModel(const UISampleModel &);
         UISampleModel &operator=(const UISampleModel &);
         virtual ~UISampleModel();
-
     };
 }
 
index 2272d09..821544b 100755 (executable)
@@ -19,18 +19,17 @@ class UISamplePresenter : public Presenter<UISampleView>,
                          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;
-
 };
 }
 
index e7e902c..6009abb 100755 (executable)
@@ -26,9 +26,9 @@ class UISamplePresenter;
 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);
@@ -44,7 +44,7 @@ public:
 class UISampleView : public View<UISamplePresenter> {
 public:
     UISampleView();
-    virtual ~UISampleView();
+    ~UISampleView();
 
     static UISampleView *GetInstance()
     {
@@ -52,10 +52,10 @@ public:
         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:
index 59fe703..7037c35 100755 (executable)
@@ -22,7 +22,7 @@ namespace OHOS {
     void UISamplePresenter::OnStart()
     {
         Presenter<UISampleView>::OnStart();
-        SendMsgToUIService(UI_ADD_SLEEP_VETO, 0, NULL, 0);
+        SendMsgToUIService(UI_ADD_SLEEP_VETO, 0, nullptr, 0);
     }
 
     void UISamplePresenter::OnResume(void)
@@ -31,7 +31,7 @@ namespace OHOS {
 
     void UISamplePresenter::OnStop(void)
     {
-        SendMsgToUIService(UI_RM_SLEEP_VETO, 0, NULL, 0);
+        SendMsgToUIService(UI_RM_SLEEP_VETO, 0, nullptr, 0);
         return;
     }
 
@@ -39,7 +39,7 @@ namespace OHOS {
     {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "UISamplePresenter::OnDrag");
         UNUSED(view);
-               UNUSED(event);
+        UNUSED(event);
         return false;
     }
 
@@ -47,7 +47,7 @@ namespace OHOS {
     {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "UISamplePresenter::OnDrag");
         UNUSED(view);
-               UNUSED(event);
-               return true; 
+        UNUSED(event);
+        return true;
     }
 }
index a6307df..3e4da3c 100755 (executable)
@@ -24,6 +24,9 @@
 #include "ui_test_countdown/ui_test_countdown.h"
 #include "ui_test_running_ball/ui_test_running_ball.h"
 #endif
+#if ENABLE_SOFT_KEYBOARD
+#include "ui_test_keyboard/ui_test_keyboard.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"
@@ -59,6 +62,9 @@ void UITestGroup::SetUpTestCase()
 #if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH
     testCaseList_->PushBack(TestCaseInfo{"倒计时", new UITestCountdown()});
     testCaseList_->PushBack(TestCaseInfo{"动画曲线", new UITestRunningBall()});
+#endif
+#if ENABLE_SOFT_KEYBOARD
+    testCaseList_->PushBack(TestCaseInfo{"软键盘", new UITestKeyboard()});
 #endif
     testCaseList_->PushBack(TestCaseInfo{"视频播放", new UITestVideoPlay()});
 }
index 4792e4f..823ad18 100755 (executable)
@@ -49,7 +49,6 @@ typedef enum {
     SCREEN_OFF_ENABLE_TO_UI,
     UI_ADD_SLEEP_VETO,
     UI_RM_SLEEP_VETO,
-
 } UiServiceMsgId;
 
 #define BUNDLE_NAME_LEN 128
index 3ede659..ed8408e 100755 (executable)
@@ -20,7 +20,7 @@
 #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"
@@ -55,7 +55,7 @@ static UiService g_uiService = {
     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;
@@ -142,17 +142,16 @@ void ServiceMsgProcess(Request *request)
         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);
@@ -194,17 +193,17 @@ TaskConfig GetServiceTaskConfig(Service *service)
 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;
@@ -215,14 +214,14 @@ static int32_t SendMsg(int32_t msgId, uint32_t msgValue, void *data, int32_t dat
 
 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;
     }
index 1311b1f..62557e0 100755 (executable)
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.
  * Description: Wearable log header file.
@@ -14,7 +13,7 @@ extern "C" {
 #endif
 #endif
 // #define WEARABLE_LOG_DEBUG
-#ifdef USE_DIAG_LOG
+#if !defined(SW_UART_DEBUG) && !defined(SW_RTT_DEBUG)
 #include "soc_diag_util.h"
 #include "log_oam_logger.h"
 #include "log_def.h"
@@ -49,12 +48,16 @@ typedef enum {
     WEARABLE_LOG_MODULE_MAX
 } WearableLogModuleType;
 
-#ifdef USE_DIAG_LOG
+#if !defined(SW_UART_DEBUG) && !defined(SW_RTT_DEBUG)
 #define WEARABLE_LOGE(mod, fmt, arg...) uapi_diag_error_log(0, fmt, ##arg)
 #define WEARABLE_LOGW(mod, fmt, arg...) uapi_diag_warning_log(0, fmt, ##arg)
 #define WEARABLE_LOGI(mod, fmt, arg...) uapi_diag_info_log(0, fmt, ##arg)
+#ifdef WEARABLE_LOG_DEBUG
 #define WEARABLE_LOGD(mod, fmt, arg...) uapi_diag_debug_log(0, fmt, ##arg)
 #else
+#define WEARABLE_LOGD(mod, fmt, arg...)
+#endif
+#else
 #define WEARABLE_LOGE(mod, fmt, arg...) PRINT("[WEARABLE E/] %s: " fmt "\n", __FUNCTION__, ##arg)
 #define WEARABLE_LOGW(mod, fmt, arg...) PRINT("[WEARABLE W/] %s: " fmt "\n", __FUNCTION__, ##arg)
 #define WEARABLE_LOGI(mod, fmt, arg...) PRINT("[WEARABLE I/] %s: " fmt "\n", __FUNCTION__, ##arg)
index a3b376c..4b17bdf 100644 (file)
 #include "samgr_lite.h"
 #include "thread_adapter.h"
 #include "graphic_service.h"
-#include "WeatherModel.h"
 #include "health_service.h"
 #include "phoneaddressmodel.h"
 #include "LanguageInit.h"
 #include "ConfigModel.h" 
 // #include "TraingCardPresenter.h"
+
+#ifdef FD230
 #include "TraingModel.h"
+#include "WeatherModel.h"
+#endif
 
 #include "AlmmgrAlarmClockManage.h"
 #include "AlarmClockManage.h"
@@ -291,7 +294,7 @@ char * struct_to_json_buf_malloc_Alarm(void)
 
 char *  struct_to_json_buf_malloc_(void)
 {
-   
+#ifdef FD230
     cJSON *dataJSON = cJSON_CreateObject();
     cJSON* data_arryJSON = cJSON_CreateArray();
     struct Trainingdata * data=NULL;
@@ -335,6 +338,9 @@ char *  struct_to_json_buf_malloc_(void)
     int pSize = cJSON_GetArraySize(dataJSON);
     printf("训练历史数据:%s\r\n",json_format);
     return json_format;
+#else
+    return "";
+#endif
 }
 
 void add_addressbookToRead(char *data) 
@@ -364,15 +370,17 @@ void add_addressbookToRead(char *data)
     }
 
     PRINT("phone : %s \r\n", phone);
-
+#ifdef FD230
     OHOS::add_addressbook_by_AT(name, phone);
-
+#endif
     return;
 }
 
 void set_languaage(uint32_t id)
 {//OHOS:: language language;
+#ifdef FD230
     OHOS::language::GetInstance()->ChangeLanguage(id);
+#endif
 }
 
 char *addressbook(void)//获取通讯录保存文件地址路径
@@ -382,11 +390,13 @@ char *addressbook(void)//获取通讯录保存文件地址路径
 
 void addressbookToRead(char *buf)//转化用于·c文件
 {
+    #ifdef FD230
     if(buf!=NULL)
     OHOS::read_addressbook_to_struct(buf);
     else
     OHOS::read_addressbook_bin_file();
     return;
+    #endif
 }
 
 void addressbookTowrite(void)//转化用于·c文件
@@ -648,6 +658,7 @@ static char* JSON_F_buf=NULL;
 #define PATH_MAX_LEN 124
 const char *get_health_data_path(void)
 {
+    #ifdef FD230
     time_t now = time(0);
     tm *ltm = localtime(&now);
     char day[20];
@@ -669,17 +680,23 @@ const char *get_health_data_path(void)
         strcpy(JSON_F_buf,buf);
     }
     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s",JSON_F_buf);
+   #endif
    return JSON_F_buf;
+
 }
 
 void set_weather_now_data(int humidity, char* windScale, char* textNight,int uvIndex,int temp,int iconNight)
 {
+    #ifdef FD230
     return OHOS::UI_set_weather_now_data(humidity, windScale, textNight,uvIndex,temp,iconNight);
+    #endif
 }
 
 void set_weather_address_data(int lat, char* atm, char* city,char* subLocality,int lon)
 {
+    #ifdef FD230
     return OHOS::UI_set_weather_address_data(lat, atm, city,subLocality,lon);
+    #endif
 }
 // struct ONE_DAY_DATA
 // {
@@ -689,7 +706,7 @@ void set_weather_address_data(int lat, char* atm, char* city,char* subLocality,i
 //     char textDay[16];
 //     int tempMax;
 // };
-
+#ifdef FD230
 static OHOS::ONE_DAY_DATA data_t[7];
 void set_weather_one_data(int tempMin, int iconDay,int fxDate, int tempMax, char *textDay,int x) 
 {
@@ -703,6 +720,12 @@ void set_weather_one_data(int tempMin, int iconDay,int fxDate, int tempMax, char
     if(x==6)
     return UI_set_weather_seven_day_data(data_t);
 }
+#else
+void set_weather_one_data(int tempMin, int iconDay,int fxDate, int tempMax, char *textDay,int x) 
+{
+
+}
+#endif
 message_infor_t message_infor_s;
 void read_message_data(void)
 {
index 5b14264..be86bb8 100755 (executable)
@@ -51,14 +51,14 @@ void BroadcastFeatureLog(IUnknown *broadcastApi)
 
 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)
index 35ea3b8..78a32aa 100755 (executable)
@@ -32,11 +32,13 @@ set(PRIVATE_HEADER
     ${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
@@ -134,11 +136,13 @@ set(PRIVATE_HEADER
     ${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
@@ -152,7 +156,6 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/charge_notification.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/makephone_notification.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/notification_manager_customer.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/src/vendor_app/baidu/baidu_app.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/pairing_notification.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/findwatch_notification.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/src/notify/drinkReminder_notification.cpp
@@ -173,6 +176,13 @@ set(SOURCES
 )
 endif()
 
+if("SUPPORT_BAIDU_MAP" IN_LIST DEFINES)
+set(SOURCES   
+    ${SOURCES}
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/vendor_app/baidu/baidu_app.cpp
+)
+endif()
+
 if("SUPPORT_ALIPAY_SEC" IN_LIST DEFINES)
 set(SOURCES   
     ${SOURCES}
@@ -218,3 +228,11 @@ set(PRIVATE_DEFINES
 )
 
 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
index 056841f..914878b 100755 (executable)
Binary files a/code/sdk/application/wearable/service/msg_center/brandy-native-js/libmsg_center.a and b/code/sdk/application/wearable/service/msg_center/brandy-native-js/libmsg_center.a differ
index 9d10dc5..8c53ae5 100755 (executable)
Binary files a/code/sdk/application/wearable/service/msg_center/brandy-xts/libmsg_center.a and b/code/sdk/application/wearable/service/msg_center/brandy-xts/libmsg_center.a differ
index 645dd32..af06d11 100755 (executable)
  * limitations under the License.
  */
 
-#ifndef OHOS_MAIN_SERVICE_H
-#define OHOS_MAIN_SERVICE_H
+#ifndef MSG_CENTER_H
+#define MSG_CENTER_H
 
 #include <cstdint>
-
 #include "service.h"
 #include "iunknown.h"
 #include "broadcast_feature.h"
@@ -38,6 +37,7 @@ typedef enum {
 
 typedef struct MsgCenterFeatureApi {
     INHERIT_IUNKNOWN;
+    int32_t (*SendMsg)(int32_t msgId, uint32_t msgValue, void *data, int32_t dataLen);
 } MsgCenterFeatureApi;
 
 typedef struct MsgCenter {
@@ -47,13 +47,14 @@ typedef struct MsgCenter {
     Subscriber subscriber;
 } MsgCenter;
 
-typedef void (*msg_center_notify_cb)(const Topic topic, Request* req);
+typedef void (*MsgCenterNotifyCb)(const Topic topic, Request* req);
 typedef struct {
     Topic topic;
-    msg_center_notify_cb cb;
-} msg_center_notify_table_t;
+    MsgCenterNotifyCb cb;
+} MsgCenterNotifyTable;
 
 void DmsLiteSendMsgToJS(const char *msgBody);
+void DuerMapInfo(uint8_t cmd_id, uint8_t type, void* data);
 void InitMsgCenter(OHOS::ACELite::JSIValue exports);
 
 struct PriorityMapper {
diff --git a/code/sdk/application/wearable/service/msg_center/include/msg_center_msg.h b/code/sdk/application/wearable/service/msg_center/include/msg_center_msg.h
new file mode 100644 (file)
index 0000000..f32c9b7
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
+ * Description: broadcast service api
+ * Author: CompanyName
+ * Create: 2021-11-11
+ */
+
+#ifndef MSG_CENTER_MSG_H
+#define MSG_CENTER_MSG_H
+
+#include "stdint.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+    BT_DISCONNECTED_TO_MSGCENTER,
+    BT_CONNECTED_TO_MSGCENTER,
+    MSGCENTER_ADD_SLEEP_VETO,
+    MSGCENTER_RM_SLEEP_VETO,
+} MsgCenterServiceMsgId;
+
+void SendMsgToMsgCenterService(int32_t msgId, uint32_t msgValue, void *data, int32_t dataLen);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
\ No newline at end of file
index 8b47221..8739b33 100755 (executable)
@@ -40,6 +40,13 @@ extern "C" {
 #define FILE_SPILT_MAX_SIZE 970 /* SPP包不能超过990字节 */
 #define FILE_NAME_MAX_LEN 100
 
+typedef enum msg_center_pcm_end_flag {
+    PCM_END_FLAG_AI_CHAT,     /* AI对话 */
+    PCM_END_FLAG_WATCH_FACE,  /* 表盘 */
+    PCM_END_FLAG_VECTOR_NAVI, /* 矢量地图 */
+} msg_center_pcm_end_flag_t;
+
+
 typedef enum msg_center_xiaodu_type_id {
     MSGCENTER_TYPE_ID_XIAODU_START = 0x1,
     MSGCENTER_TYPE_ID_XIAODU_RECV_XIAODU_INFO,
@@ -49,7 +56,7 @@ typedef enum msg_center_xiaodu_type_id {
     MSGCENTER_TYPE_ID_XIAODU_SEND_PCM_STREAM,
     MSGCENTER_TYPE_ID_XIAODU_END_RECORD,
 } msg_center_xiaodu_type_id_t;
-
+#ifdef SUPPORT_BAIDU_MAP
 typedef enum msg_center_navigation_type_id {
     MSGCENTER_TYPE_ID_NAVIGATION_START = 0x1,
     MSGCENTER_TYPE_ID_NAVIGATION_RECV,
@@ -69,8 +76,121 @@ typedef enum msg_center_vector_navi_type_id {
     MSGCENTER_TYPE_ID_VECTOR_NAVI_RECV_POI,
     MSGCENTER_TYPE_ID_VECTOR_NAVI_FINISH_FROM_WATCH,
     MSGCENTER_TYPE_ID_VECTOR_NAVI_FINISH_FROM_PHONE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_AUTH_LICENSE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEO_LOCATION,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GEO_LOCATION,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_INIT,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_INIT,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_START,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_START,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_SUCC,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_SUCC,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_FAIL,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_FAIL,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_START,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_START,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_NAVI_DESTROY,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_DESTROY,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_TEXT_UPDATE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROAD_GUIDE_TEXT_UPDATE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROAD_GUIDE_ICON_UPDATE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROAD_GUIDE_ICON_UPDATE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_TIME_UPDATE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_TIME_UPDATE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_DISTANCE_UPDATE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_DISTANCE_UPDATE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REMAIN_ROUTE_UPDATE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_ROUTE_UPDATE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GPS_STATUS_CHANGE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GPS_STATUS_CHANGE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_FARAWAY,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_FARAWAY,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_PLAN_YAWING,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_PLAN_YAWING,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_RE_ROUTE_COMPLETE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_RE_ROUTE_COMPLETE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ARRIVE_DSTINATION,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ARRIVE_DSTINATION,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_POI_SUG_SEARCH,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_POI_SUG_SEARCH,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_RIDING_SEARCH,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_RIDING_SEARCH,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_WALKING_SEARCH,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_WALKING_SEARCH,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_TRANSIT_SEARCH,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_TRANSIT_SEARCH,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_GEOCODE_SEARCH,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GEOCODE_SEARCH,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_REGEOCODE_SEARCH,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REGEOCODE_SEARCH,
+    /* 地图私有协议 */
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_DESTROY_PAGE,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_DISCONNECTED,
+    MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_CONNECTED,
 } msg_center_vector_navi_type_id_t;
 
+
+
+
+static const char *g_vector_navi_str_tb[] = {
+    "req_auth_license",
+    "rec_auth_license",
+    "req_geo_location",
+    "rec_geo_location",
+    "req_navi_init",
+    "rec_navi_init",
+    "req_route_plan_start",
+    "rec_route_plan_start",
+    "req_route_plan_succ",
+    "rec_route_plan_succ",
+    "req_route_plan_fail",
+    "rec_route_plan_fail",
+    "req_navi_start",
+    "rec_navi_start",
+    "req_navi_destroy",
+    "rec_navi_destroy",
+    "req_road_guide_text_update",
+    "rec_road_guide_text_update",
+    "req_road_guide_icon_update",
+    "rec_road_guide_icon_update",
+    "req_remain_time_update",
+    "rec_remain_time_update",
+    "req_remain_distance_update",
+    "rec_remain_distance_update",
+    "req_remain_route_update",
+    "rec_remain_route_update",
+    "req_gps_status_change",
+    "rec_gps_status_change",
+    "req_route_faraway",
+    "rec_route_faraway",
+    "req_route_plan_yawing",
+    "rec_route_plan_yawing",
+    "req_re_route_complete",
+    "rec_re_route_complete",
+    "req_arrive_destination",
+    "rec_arrive_destination",
+    "req_poi_sug_search",
+    "rec_poi_sug_search",
+    "req_route_riding_search",
+    "rec_route_riding_search",
+    "req_route_walking_search",
+    "rec_route_walking_search",
+    "req_route_transit_search",
+    "rec_route_transit_search",
+    "req_geocode_search",
+    "rec_geocode_search",
+    "req_regeocode_search",
+    "rec_regeocode_search",
+    "req_destroy_page",
+};
+
+static inline const char* vector_navi_get_str(uint8_t type)
+{
+    return g_vector_navi_str_tb[type - MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_AUTH_LICENSE];
+}
+
+#endif
 typedef enum msg_center_alipay_type_id {
     MSGCENTER_TYPE_ID_ALIPAY_NETWORK_STATUS = 0x1,
     MSGCENTER_TYPE_ID_ALIPAY_HOST_INFO,
@@ -184,6 +304,7 @@ static inline uint8_t msg_center_get_tlv_tl_len(void *usr_data)
     return offset;
 }
 
+
 errcode_t msg_center_pkt_proc(diag_ser_data_t *data);
 uint8_t msg_center_get_response_cmd(uint8_t cmd_id);
 diag_ser_data_t *msg_center_encap_diag_info(diag_ser_header_t *header, uint16_t tlv_len, uint8_t cmd_id);
@@ -191,6 +312,8 @@ int32_t msg_center_fill_tlv(msg_center_pkt_tlv_t *tlv, uint8_t type, uint8_t *va
 errcode_t msg_center_send_data(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
 void msg_center_split_file(char *origin_file, int size, char *flist);
 void msg_center_combine_file(char *flist, char *target_file_name);
+diag_frame_fid_t msg_center_get_trans_channel();
+void msg_center_set_trans_channel(diag_frame_fid_t select);
 
 #ifdef __cplusplus
 #if __cplusplus
index 67735a7..ef3a483 100755 (executable)
@@ -8,18 +8,18 @@
 #ifndef ALARM_NOTIFICATION_H
 #define ALARM_NOTIFICATION_H
 
-#define ALARM_IMAGE_DELETE "alarm_delete"
-#define ALARM_IMAGE_CLOCK "alarm_clock"
-#define ALARM_VIEW_CLOSE "alarm_close"
-#define ALARM_VIEW_DELAY "alarm_delay"
-#define ALARM_VIEW_POPUP "alarm_popup"
+constexpr char* ALARM_IMAGE_DELETE = "alarm_delete";
+constexpr char* ALARM_IMAGE_CLOCK = "alarm_clock";
+constexpr char* ALARM_VIEW_CLOSE = "alarm_close";
+constexpr char* ALARM_VIEW_DELAY = "alarm_delay";
+constexpr char* ALARM_VIEW_POPUP = "alarm_popup";
 
-typedef enum {
+enum class AlarmTimerType {
     NOTIFY_ALARM_CLOSE = 0,
     NOTIFY_ALARM_DELAY = 1,
     NOTIFY_ALARM_RING = 2,
     NOTIFY_ALARM_UNKNOWN = 10,
-}AlarmTimerType;
+};
 
 namespace OHOS {
 UIViewGroup* CreateAlarmView(void);
@@ -37,25 +37,25 @@ class AlarmViewEventListener : public OHOS::UIView::OnClickListener,
                                public OHOS::UIView::OnDragListener {
 public:
     AlarmViewEventListener();
-       virtual ~AlarmViewEventListener();
-       static AlarmViewEventListener *GetInstance(void);
+    virtual ~AlarmViewEventListener();
+    static AlarmViewEventListener *GetInstance(void);
     bool OnDrag(UIView& view, const DragEvent& event) override;
     bool OnDragEnd(OHOS::UIView& view, const OHOS::DragEvent& event) override;
     bool OnClick(OHOS::UIView& view, const OHOS::ClickEvent& event) override;
-    virtual bool OnPress(OHOS::UIView& view, const OHOS::PressEvent& event) override
+    bool OnPress(OHOS::UIView& view, const OHOS::PressEvent& event) override
     {
         return true;
     }
-    virtual bool OnLongPress(OHOS::UIView& view, const OHOS::LongPressEvent& event) override
+    bool OnLongPress(OHOS::UIView& view, const OHOS::LongPressEvent& event) override
     {
         return true;
     }
-    virtual bool OnRelease(OHOS::UIView& view, const OHOS::ReleaseEvent& event) override
+    bool OnRelease(OHOS::UIView& view, const OHOS::ReleaseEvent& event) override
     {
         return true;
     }
 
-    virtual bool OnDragStart(OHOS::UIView& view, const OHOS::DragEvent& event) override
+    bool OnDragStart(OHOS::UIView& view, const OHOS::DragEvent& event) override
     {
         return true;
     }
index 31c2a5c..5339ce3 100755 (executable)
@@ -8,27 +8,32 @@
 #ifndef MAKEPHONE_NOTIFICATION_H
 #define MAKEPHONE_NOTIFICATION_H
 
-typedef enum {
+enum class CallTimerType {
     NOTIFY_PHONE_CALLING_DISPLAY = 0,
     NOTIFY_PHONE_CURTIME_DISPLAY = 1,
     NOTIFY_PHONE_DIAL_DISPLAY = 3,
     NOTIFY_PHONE_UNKNOWN = 10,
-}CallTimerType;
+};
 
 namespace OHOS {
+class VolumeSettingView;
 UIViewGroup* CreatePhoneCallView(void);
 UIViewGroup* CreateCallingView(void);
-UIViewGroup* CreateCalldialView(void);
-void FreeCalldialView(void);
+UIViewGroup* CreateMultiplePhoneView(void);
+UIViewGroup* CreateWaitingHintsView(void);
 void HonrsViewChange(void);
+VolumeSettingView *GetvolumeSetting(void);
 void FreeCallingView(void);
 void FreePhoneCallView(void);
-
+void FreeMultiplePhoneCallView(void);
+void FreeWaitingHintsView(void);
 void RefreshMicrophoneImageSrc(const char* src);
 void CallTimerCallBackProc(int data);
 void CallCurTimerCallBack(int data);
 void StartCallTimer(CallTimerType type, int32_t interval);
 void DisableCallTimer(CallTimerType type);
+void EnableWaitingView(void);
+void DisableWatingView(void);
 
 class CallViewEventListener : public OHOS::UIView::OnClickListener,
                               public OHOS::UIView::OnLongPressListener,
@@ -36,26 +41,25 @@ class CallViewEventListener : public OHOS::UIView::OnClickListener,
                               public OHOS::UIView::OnDragListener {
 public:
     CallViewEventListener();
-       virtual ~CallViewEventListener();
-       static CallViewEventListener *GetInstance(void);
+    ~CallViewEventListener() override;
+    static CallViewEventListener *GetInstance(void);
     bool OnClick(OHOS::UIView& view, const OHOS::ClickEvent& event) override;
     bool OnDrag(UIView& view, const DragEvent& event) override;
-    
     bool OnDragEnd(OHOS::UIView& view, const OHOS::DragEvent& event) override;
-    virtual bool OnPress(OHOS::UIView& view, const OHOS::PressEvent& event) override
+    bool OnPress(OHOS::UIView& view, const OHOS::PressEvent& event) override
     {
         return true;
     }
-    virtual bool OnLongPress(OHOS::UIView& view, const OHOS::LongPressEvent& event) override
+    bool OnLongPress(OHOS::UIView& view, const OHOS::LongPressEvent& event) override
     {
         return true;
     }
-    virtual bool OnRelease(OHOS::UIView& view, const OHOS::ReleaseEvent& event) override
+    bool OnRelease(OHOS::UIView& view, const OHOS::ReleaseEvent& event) override
     {
         return true;
     }
 
-    virtual bool OnDragStart(OHOS::UIView& view, const OHOS::DragEvent& event) override
+    bool OnDragStart(OHOS::UIView& view, const OHOS::DragEvent& event) override
     {
         return true;
     }
index fc7f116..d4a7728 100755 (executable)
@@ -29,9 +29,8 @@
 #include "drinkReminder_notification.h"
 #include "sedentaryReminder_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* ()>;
@@ -67,7 +66,7 @@ public:
     /**
     * @brief notify is or not showing.
     */
-    bool hasNotifyShowing();
+    bool HasNotifyShowing();
     void StartShowNotify(void);
     uint16_t GetNotifyPriority(void);
     uint16_t GetShowingNotifyId(void);
@@ -75,17 +74,19 @@ public:
     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_;
@@ -94,6 +95,7 @@ private:
     bool isFullScreen_ = false;
     bool isNativeUI = false;
     bool volumeScreenStatus = false;
+    bool watchCallStatus = false;
 
     bool stopIsLast_ = false;
     bool showIsLast_ = false;
index 6451f4e..ce9346b 100755 (executable)
@@ -9,7 +9,7 @@
 #define BAIDU_APP_H
 
 #include "errcode.h"
-
+#include "cmsis_os2.h"
 #ifdef __cplusplus
 #if __cplusplus
 extern "C" {
@@ -26,12 +26,11 @@ typedef struct {
     uint16_t len;
 } pcm_stream_queue_msg;
 
+osMessageQueueId_t GetPcmMsgQueueId(void);
 errcode_t pcm_stream_msg_thread(void *data);
 errcode_t pcm_stream_queue_init(void);
 errcode_t pcm_stream_create_task(void);
 
-errcode_t msg_center_navigation_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
-errcode_t msg_center_navigation_recv(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
 errcode_t msg_center_xiaodu_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
 errcode_t msg_center_xiaodu_recv_xiaodu_info(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
 errcode_t msg_center_xiaodu_recv_xiaodu_info(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
@@ -40,6 +39,9 @@ errcode_t msg_center_xiaodu_start_record(uint8_t cmd_id, uint8_t type, void *usr
 errcode_t msg_center_xiaodu_send_pcm_stream(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
 errcode_t msg_center_xiaodu_send_end_record(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
 errcode_t msg_center_xiaodu_recv_tts(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+#ifdef SUPPORT_BAIDU_MAP
+errcode_t msg_center_navigation_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_navigation_recv(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
 errcode_t msg_center_vector_navi_pull_up(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
 errcode_t msg_center_vector_navi_recv_svg(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
 errcode_t msg_center_vector_navi_req_svg(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
@@ -53,7 +55,70 @@ errcode_t msg_center_vector_navi_req_poi(uint8_t cmd_id, uint8_t type, void *usr
 errcode_t msg_center_vector_navi_recv_poi(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
 errcode_t msg_center_vector_navi_finish_from_watch(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
 errcode_t msg_center_vector_navi_finish_from_phone(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
-
+errcode_t msg_center_vector_navi_req_auth_license(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_auth_license(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_geo_location(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_geo_location(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_navi_init(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_navi_init(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_route_plan_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_route_plan_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_route_plan_succ(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_route_plan_succ(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_route_plan_fail(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_route_plan_fail(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_navi_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_navi_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_navi_destroy(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_navi_destroy(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_road_guide_text_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_road_guide_text_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_road_guide_icon_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_road_guide_icon_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_remain_time_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_remain_time_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_remain_distance_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_remain_distance_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_remain_route_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_remain_route_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_gps_status_change(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_gps_status_change(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_route_faraway(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_route_faraway(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_route_plan_yawing(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_route_plan_yawing(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_re_route_complete(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_re_route_complete(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_arrive_destination(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_arrive_destination(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vertor_navi_req_poi_sug_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vertor_navi_rec_poi_sug_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_route_riding_search(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                         uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_route_riding_search(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                         uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_route_walking_search(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                          uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_route_walking_search(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                          uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_route_transit_search(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                          uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_route_transit_search(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                          uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_geocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_geocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_regeocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_rec_regeocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+errcode_t msg_center_vector_navi_req_destroy_page(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len);
+#endif
 #ifdef __cplusplus
 #if __cplusplus
 }
diff --git a/code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_js_component.h b/code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_js_component.h
new file mode 100644 (file)
index 0000000..8d9e4b8
--- /dev/null
@@ -0,0 +1,60 @@
+#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
diff --git a/code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_js_location.h b/code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_js_location.h
new file mode 100644 (file)
index 0000000..324a808
--- /dev/null
@@ -0,0 +1,56 @@
+#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
diff --git a/code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_msg_center.h b/code/sdk/application/wearable/service/msg_center/include/vendor_app/baidumap_msg_center.h
new file mode 100644 (file)
index 0000000..e20f08a
--- /dev/null
@@ -0,0 +1,52 @@
+/*\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
diff --git a/code/sdk/application/wearable/service/msg_center/libs/libbaidumapsdk.a b/code/sdk/application/wearable/service/msg_center/libs/libbaidumapsdk.a
new file mode 100644 (file)
index 0000000..906a03f
Binary files /dev/null and b/code/sdk/application/wearable/service/msg_center/libs/libbaidumapsdk.a differ
index 6300431..1487139 100755 (executable)
@@ -17,7 +17,7 @@ extern "C" {
 #endif
 
 msg_center_cmd_map_t g_msg_center_type_tbl[] = {
-#ifdef JS_ENABLE
+#if defined(JS_ENABLE)  
     { MSGCENTER_CMD_XIAODU,      MSGCENTER_TYPE_ID_XIAODU_START,                     msg_center_xiaodu_start},
     { MSGCENTER_CMD_XIAODU,      MSGCENTER_TYPE_ID_XIAODU_RECV_XIAODU_INFO,          msg_center_xiaodu_recv_xiaodu_info},
     { MSGCENTER_CMD_XIAODU,      MSGCENTER_TYPE_ID_XIAODU_RECV_WENXIN_INFO,          msg_center_xiaodu_recv_wenxin_info},
@@ -25,6 +25,7 @@ msg_center_cmd_map_t g_msg_center_type_tbl[] = {
     { MSGCENTER_CMD_XIAODU,      MSGCENTER_TYPE_ID_XIAODU_START_RECORD,              msg_center_xiaodu_start_record},
     { MSGCENTER_CMD_XIAODU,      MSGCENTER_TYPE_ID_XIAODU_SEND_PCM_STREAM,           msg_center_xiaodu_send_pcm_stream},
     { MSGCENTER_CMD_XIAODU,      MSGCENTER_TYPE_ID_XIAODU_END_RECORD,                msg_center_xiaodu_send_end_record},
+#if defined(SUPPORT_BAIDU_MAP)
     { MSGCENTER_CMD_NAVIGATION,  MSGCENTER_TYPE_ID_NAVIGATION_START,                 msg_center_navigation_start},
     { MSGCENTER_CMD_NAVIGATION,  MSGCENTER_TYPE_ID_NAVIGATION_RECV,                  msg_center_navigation_recv},
     { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_PULL_UP,              msg_center_vector_navi_pull_up},
@@ -40,6 +41,59 @@ msg_center_cmd_map_t g_msg_center_type_tbl[] = {
     { 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},
+    /* µØÍ¼Ë½ÓÐЭÒé */
+    { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_DESTROY_PAGE,           msg_center_vector_navi_req_destroy_page},
+    { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_DISCONNECTED,              NULL},
+    { MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_CONNECTED,                 NULL},
+#endif
 #endif
 #ifdef SUPPORT_ALIPAY_SEC
     { MSGCENTER_CMD_ALIPAY,      MSGCENTER_TYPE_ID_ALIPAY_NETWORK_STATUS,            msg_center_alipay_network_status},
index c068f7a..2d7e15f 100644 (file)
@@ -5,7 +5,7 @@
  * Create: 2021-11-11
  */
 
-#include <stdio.h>
+#include <cstdio>
 #include "securec.h"
 #include "adapter.h"
 #include "ohos_init.h"
 #include "broadcast_service.h"
 #include "AlarmClockModel.h"
 #include "AlarmPopUpPresenter.h"
-#include "DialModelCharge.h"
-#include "DialModelHeartRate.h"
-#include "DialModelSPO2.h"
-#include "BloodOxygenModel.h"
-#include "HeartModel.h"
-#include "SaveEleModel.h"
 #include "ppg_service.h"
 #include "CallerLogModel.h"
 #include "notification_manager.h"
 #include "bletest.h"
 //#include "TraingCardPresenter.h"
 #include "custom_runtime.h"
+#ifdef FD230
+#include "DialModelCharge.h"
+#include "DialModelHeartRate.h"
+#include "DialModelSPO2.h"
+#include "BloodOxygenModel.h"
+#include "HeartModel.h"
+#include "SaveEleModel.h"
 #include "producttest/include/testcat1.h"
+#endif
 #include <cywee_hal.h>
 //#include "Systemupgrade.h"
 namespace OHOS {
@@ -53,7 +55,7 @@ extern "C" {
 #endif
 
 /* 订阅事件设定优先级 */
-const PriorityMapper g_pri_mapper[] = {
+const PriorityMapper PRI_MAPPER[] = {
     {TOPIC_EVENT_ALARM_RING, PRIORITY_TWO},
     {TOPIC_EVENT_NEXTDAY_UPDATE, PRIORITY_TWO},
     {TOPIC_EVENT_ACTIVITY_UPDATE,PRIORITY_TWO},
@@ -102,11 +104,11 @@ const PriorityMapper g_pri_mapper[] = {
 
 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;
@@ -168,21 +170,26 @@ void MsgCenterSubscribe()
     MsgCenterSubscribeTopic(TOPIC_EVENT_DRINKREMINDER);
 }
 
-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();
+}
 
+extern UIViewGroup* CreateCalldialView(void);
 static OHOS::UIViewGroup* CalldialNotify(void)
 {
     return OHOS::CreateCalldialView();
@@ -233,10 +240,10 @@ 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");
@@ -348,45 +355,57 @@ void MsgCenterNotifyNextDayProc(const Topic topic, Request* req)
 
 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()->SetCallSource(CallerLogModel::CallSource::CallSourcePhone);
+    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);
     }
 }
 
+
 #ifdef SUPPORT_SPO2_NOTIFICATION_TEST
 uint32_t md = PPG_SERVICE_CMD_TYPE_DO_PPG_TEST;
 //灰卡测试
@@ -414,13 +433,13 @@ void MsgCenterNotifyCardProc(const Topic topic, Request* req)
     ir=atoi(tokbuf);
 
     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%d,%d,%d",green,red,ir);
-
+#ifdef FD230
     testhrsenson1View * t= testhrsenson1View::GetInstance();
     if(t!=NULL)
     {
         t->setgrayvalue(green,red,ir);
     }
-
+#endif
 }
 //漏光测试
 void MsgCenterNotifyleaklightProc(const Topic topic, Request* req)
@@ -449,7 +468,7 @@ void MsgCenterNotifyleaklightProc(const Topic topic, Request* req)
     ir=atoi(tokbuf);
     
     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%d,%d,%d",green,red,ir);
-
+#ifdef FD230
     testhrsenson1View * t= testhrsenson1View::GetInstance();
     if(t!=NULL)
     {
@@ -461,6 +480,7 @@ void MsgCenterNotifyleaklightProc(const Topic topic, Request* req)
     {
         t_1->setlightvalue(green,red,ir);
     }
+#endif
 }
 
 //穿戴状态
@@ -471,8 +491,10 @@ void MsgCenterNotifyWearStateProc(const Topic topic, Request* req)
     if ( topic == TOPIC_EVENT_WEARSTATE_UPDATE)
     {
         int32_t wear = *((int32_t*)(req->data)); // 进行类型转换
+        #ifdef FD230
         BloodOxygenModel::GetInstance()->SetWearStatus(wear);
         HeartModel::GetInstance()->SetWearStatus(wear);
+        #endif
     }
 }
 //血氧
@@ -483,8 +505,10 @@ void MsgCenterNotifySPO2hProc(const Topic topic, Request* req)
     if (topic == TOPIC_EVENT_SPO2_UPDATE && req != nullptr && req->data != nullptr)
     {
         uint8_t spo2 = *((uint8_t*)(req->data)); // 进行类型转换
+        #ifdef FD230
         DialModelSPO2::GetInstance()->UpdateSPO2(spo2);
         BloodOxygenModel::GetInstance()->UpSPO2data(spo2);
+        #endif
     }
 }
 //心率
@@ -496,8 +520,10 @@ void MsgCenterNotifyHeartRateProc(const Topic topic, Request* req)
     {
         u_int8_t heart = *((u_int8_t*)(req->data)); // 进行类型转换
         //通知对应信息进行更新
+        #ifdef FD230
         DialModelHeartRate::GetInstance()->UpdateHeartRate(heart);
         HeartModel::GetInstance()->UpHeartdata(heart);
+        #endif
     }
 }
 //开始检测心率
@@ -579,7 +605,7 @@ void MsgCenterNotifyCatIncomingCallProc(const Topic topic, Request* req)
 
     NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_ONE);
     CallerLogModel::GetInstance()->SetNotifyFlag(true);
-    NotificationManager::GetInstance()->ShowNotify(showPhoneCallNotify, (uint16_t)topic, true);
+    NotificationManager::GetInstance()->ShowNotify(ShowPhoneCallNotify, (uint16_t)topic, true);
 }
 void MsgCenterNotifyCat1CallConnectedProc(const Topic topic, Request* req)
 {
@@ -625,7 +651,9 @@ void MsgCenterNotifyCat1dialProc(const Topic topic, Request* req)
 
     NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_ONE);
     CallerLogModel::GetInstance()->SetNotifyFlag(true);
+    #ifdef FD230
     NotificationManager::GetInstance()->ShowNotify(CalldialNotify, (uint16_t)topic, true);
+    #endif
 
 
 }
@@ -743,7 +771,7 @@ void MsgCenterNotifyDeviceBindProc(const Topic topic, Request* req)
             case SHUTDOWN:
                 WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, " SHUTDOWN");
                 set_lowpower_falg(3);
-                if (NotificationManager::GetInstance()->hasNotifyShowing())
+                if (NotificationManager::GetInstance()->HasNotifyShowing())
                 NotificationManager::GetInstance()->StopNotify();
 
                 NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO);
@@ -753,7 +781,7 @@ void MsgCenterNotifyDeviceBindProc(const Topic topic, Request* req)
                 break;
             case REBOOT:
                 set_lowpower_falg(4);
-                if (NotificationManager::GetInstance()->hasNotifyShowing())
+                if (NotificationManager::GetInstance()->HasNotifyShowing())
                 NotificationManager::GetInstance()->StopNotify();
 
                 NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO);
@@ -907,7 +935,7 @@ void MsgCenterNotifybleAPPtraining(const Topic topic, Request* req)
 
 }
 /* 订阅事件通知逻辑可定制 */
-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},
@@ -921,11 +949,13 @@ static msg_center_notify_table_t g_msg_center_notify_table[] = {
     {TOPIC_EVENT_INACTIVITY_UPDATE,       MsgCenterNotifyInactivityProc},
     {TOPIC_EVENT_BLE_TRAINING,       MsgCenterNotifybleAPPtraining},
 #endif  
+#ifdef FD230
 #ifdef SUPPORT_CHARGER_PLUG_DETECTION_NOTIFICATION
     {TOPIC_EVENT_CHARGE_PLUG,        MsgCenterNotifyChargePlugProc},
     {TOPIC_EVENT_CHARGE_UNPLUG,      MsgCenterNotifyChargeUnPlugProc},
     {TOPIC_EVENT_LOWPOWER_ALARM,      MsgCenterNotifyLowPowerAlarmProc},
 #endif
+#endif
 #ifdef SUPPORT_SPO2_NOTIFICATION_TEST
     {TOPIC_EVENT_SPO2_UPDATE,           MsgCenterNotifySPO2hProc},
     {TOPIC_EVENT_WEARSTATE_UPDATE,      MsgCenterNotifyWearStateProc},
@@ -956,24 +986,24 @@ static msg_center_notify_table_t g_msg_center_notify_table[] = {
     {TOPIC_EVENT_DRINKREMINDER,MsgCenterNotifyDrinkReminderProc},
 };
 
-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;
         }
index 92935ba..d0acad5 100755 (executable)
 #include "components/ui_image_view.h"
 #include "components/ui_label.h"
 
-#define RING_AGAIN "响铃将在十分钟后再次响起"
-#define NOTIFY_THREE_SECONDS 3000
-#define NOTIFY_ONE_SECOND 1000
-#define NOTIFY_THIRTY_SECONDS 30000
-#define NOTIFY_ONE_MINUTE 60000
-#define NOTOFY_NO_OPERATE_TIME 35000
-
 namespace OHOS {
-osTimerId_t g_notifyStopHandle = NULL; // timer of close view and alarm ring view
-osTimerId_t g_alarmRing = NULL; // timer of alarm view
-
-UIViewGroup* alarmView = nullptr;
-UIViewGroup* closeView = nullptr;
-UIViewGroup* ringView = nullptr;
-UIImageView* imageClose = nullptr;
-UIImageView* imageRing = nullptr;
-UIImageView* imageDelete = nullptr;
-UIImageView* imageClock = nullptr;
-UILabel* closeLable = nullptr;
-UILabel* ringLable = nullptr;
-UILabel* mainLable = nullptr;
-UIDigitalClock *dClock = nullptr;
+constexpr char* RING_AGAIN = "响铃将在十分钟后再次响起";
+constexpr int32_t NOTIFY_THREE_SECONDS = 3000;
+constexpr int32_t NOTIFY_ONE_SECOND = 1000;
+constexpr int32_t NOTIFY_THIRTY_SECONDS = 30000;
+constexpr int32_t NOTIFY_ONE_MINUTE = 60000;
+constexpr int32_t NOTOFY_NO_OPERATE_TIME = 35000;
+osTimerId_t g_notifyStopHandle = nullptr; // timer of close view and alarm ring view
+osTimerId_t g_alarmRing = nullptr; // timer of alarm view
+
+UIViewGroup* g_alarmView = nullptr;
+UIViewGroup* g_closeView = nullptr;
+UIViewGroup* g_ringView = nullptr;
+UIImageView* g_imageClose = nullptr;
+UIImageView* g_imageRing = nullptr;
+UIImageView* g_imageDelete = nullptr;
+UIImageView* g_imageClock = nullptr;
+UILabel* g_closeLable = nullptr;
+UILabel* g_ringLable = nullptr;
+UILabel* g_mainLable = nullptr;
+UIDigitalClock* g_dClock = nullptr;
 
 // alarm close view
 constexpr int16_t MAX_SET_ZERO_LEN = 0;
@@ -89,33 +88,33 @@ void StartAlarmTimer(AlarmTimerType type, int32_t interval)
 {
     uint32_t tick;
     osStatus_t retTimer;
-    if (type >= NOTIFY_ALARM_UNKNOWN) {
+    if (type >= AlarmTimerType::NOTIFY_ALARM_UNKNOWN) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "StartAlarmTimer type:%d invalid!!", type);
         return;
     }
     switch (type) {
-        case NOTIFY_ALARM_CLOSE:
-        case NOTIFY_ALARM_DELAY:
-            g_notifyStopHandle = osTimerNew((osTimerFunc_t)StopNotifyCallback, osTimerPeriodic, NULL, NULL);
+        case AlarmTimerType::NOTIFY_ALARM_CLOSE:
+        case AlarmTimerType::NOTIFY_ALARM_DELAY:
+            g_notifyStopHandle = osTimerNew((osTimerFunc_t)StopNotifyCallback, osTimerPeriodic, nullptr, nullptr);
             tick = osMs2Tick(interval);
             retTimer = osTimerStart(g_notifyStopHandle, tick);
-            if (retTimer != osOK && g_notifyStopHandle != NULL) {
+            if (retTimer != osOK && g_notifyStopHandle != nullptr) {
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
                     "StartAlarmTimer osTimerStart failed, type= %d ret = %lx!!", type, retTimer);
                 osTimerDelete(g_notifyStopHandle);
-                g_notifyStopHandle = NULL;
+                g_notifyStopHandle = nullptr;
                 return;
             }
             break;
-        case NOTIFY_ALARM_RING:
-            g_alarmRing = osTimerNew((osTimerFunc_t)NoOperateCallback, osTimerPeriodic, NULL, NULL);
+        case AlarmTimerType::NOTIFY_ALARM_RING:
+            g_alarmRing = osTimerNew((osTimerFunc_t)NoOperateCallback, osTimerPeriodic, nullptr, nullptr);
             tick = osMs2Tick(interval);
             retTimer = osTimerStart(g_alarmRing, tick);
-            if (retTimer != osOK && g_alarmRing != NULL) {
+            if (retTimer != osOK && g_alarmRing != nullptr) {
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
                     "StartAlarmTimer osTimerStart failed, type= %d ret = %lx!!", type, retTimer);
                 osTimerDelete(g_alarmRing);
-                g_alarmRing = NULL;
+                g_alarmRing = nullptr;
                 return;
             }
             break;
@@ -126,31 +125,31 @@ void StartAlarmTimer(AlarmTimerType type, int32_t interval)
 
 void DisableAlarmTimer(AlarmTimerType type)
 {
-    if (type >= NOTIFY_ALARM_UNKNOWN) {
+    if (type >= AlarmTimerType::NOTIFY_ALARM_UNKNOWN) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableAlarmTimer type:%d invalid!!", type);
         return;
     }
     osStatus_t ret;
     switch (type) {
-        case NOTIFY_ALARM_CLOSE:
-        case NOTIFY_ALARM_DELAY:
-            if (g_notifyStopHandle != NULL) {
+        case AlarmTimerType::NOTIFY_ALARM_CLOSE:
+        case AlarmTimerType::NOTIFY_ALARM_DELAY:
+            if (g_notifyStopHandle != nullptr) {
                 ret = osTimerDelete(g_notifyStopHandle);
                 if (ret != osOK) {
                     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableAlarmTimer failed, type= %d ret = %lx!", type, ret);
                     return;
                 }
-                g_notifyStopHandle = NULL;
+                g_notifyStopHandle = nullptr;
             }
             break;
-        case NOTIFY_ALARM_RING:
-            if (g_alarmRing != NULL) {
+        case AlarmTimerType::NOTIFY_ALARM_RING:
+            if (g_alarmRing != nullptr) {
                 ret = osTimerDelete(g_alarmRing);
                 if (ret != osOK) {
                     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableAlarmTimer failed, type= %d ret = %lx!", type, ret);
                     return;
                 }
-                g_alarmRing = NULL;
+                g_alarmRing = nullptr;
             }
             break;
         default:
@@ -160,254 +159,256 @@ void DisableAlarmTimer(AlarmTimerType type)
 
 UIViewGroup *CreateAlarmCloseView()
 {
-    closeView = new UIViewGroup();
-    if (closeView == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView closeView null!");
+    g_closeView = new UIViewGroup();
+    if (g_closeView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView g_closeView null!");
         return nullptr;
     }
-    closeView->SetPosition(MAX_SET_ZERO_LEN, MAX_SET_ZERO_LEN);
-    closeView->SetWidth(Screen::GetInstance().GetWidth());
-    closeView->SetHeight(Screen::GetInstance().GetHeight());
-    imageClose = new UIImageView();
-    if (imageClose == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView imageClose null!");
-        delete closeView;
-        closeView = nullptr;
+    g_closeView->SetPosition(MAX_SET_ZERO_LEN, MAX_SET_ZERO_LEN);
+    g_closeView->SetWidth(Screen::GetInstance().GetWidth());
+    g_closeView->SetHeight(Screen::GetInstance().GetHeight());
+    g_imageClose = new UIImageView();
+    if (g_imageClose == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView g_imageClose null!");
+        delete g_closeView;
+        g_closeView = nullptr;
         return nullptr;
     }
-    imageClose->SetPosition(MAX_IMAGE_X_LEN, MAX_IMAGE_Y_LEN);
-    imageClose->SetWidth(MAX_SET_SRC_LEN);
-    imageClose->SetHeight(MAX_SET_SRC_LEN);
-    imageClose->SetSrc(ALARM_CLOCK_CLOSE_ADD_PATH);
-    imageClose->SetTouchable(true);
-    closeView->Add(imageClose);
-
-    closeLable = new UILabel();
-    if (closeLable == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView closeLable null!");
-        delete closeView;
-        closeView = nullptr;
-        delete imageClose;
-        imageClose = nullptr;
+    g_imageClose->SetPosition(MAX_IMAGE_X_LEN, MAX_IMAGE_Y_LEN);
+    g_imageClose->SetWidth(MAX_SET_SRC_LEN);
+    g_imageClose->SetHeight(MAX_SET_SRC_LEN);
+    g_imageClose->SetSrc(ALARM_CLOCK_CLOSE_ADD_PATH);
+    g_imageClose->SetTouchable(true);
+    g_closeView->Add(g_imageClose);
+
+    g_closeLable = new UILabel();
+    if (g_closeLable == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmCloseView g_closeLable null!");
+        delete g_closeView;
+        g_closeView = nullptr;
+        delete g_imageClose;
+        g_imageClose = nullptr;
         return nullptr;
     }
-    closeLable->SetPosition(MAX_LABEL_X_LEN, MAX_LABEL_Y_LEN, MAX_LABEL_LENGTH_LEN, MAX_LABEL_HEIGHT_LEN);
-    closeLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, MAX_LABEL_FONT_LEN);
-    closeLable->SetText("CLOSE");
-    closeView->Add(closeLable);
-    closeView->SetViewId(ALARM_VIEW_CLOSE);
-    UIView::OnDragListener *listener =static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());
-    closeView->SetOnDragListener(listener);
-    closeView->SetDraggable(true);
-    closeView->SetTouchable(true);
-    return closeView;
+    g_closeLable->SetPosition(MAX_LABEL_X_LEN, MAX_LABEL_Y_LEN, MAX_LABEL_LENGTH_LEN, MAX_LABEL_HEIGHT_LEN);
+    g_closeLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, MAX_LABEL_FONT_LEN);
+    g_closeLable->SetText("CLOSE");
+    g_closeView->Add(g_closeLable);
+    g_closeView->SetViewId(ALARM_VIEW_CLOSE);
+    UIView::OnDragListener *listener = static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());
+    g_closeView->SetOnDragListener(listener);
+    g_closeView->SetDraggable(true);
+    g_closeView->SetTouchable(true);
+    return g_closeView;
 }
 
 void FreeAlarmCloseView(void)
 {
-    if (closeView != nullptr) {
-        DisableAlarmTimer(NOTIFY_ALARM_CLOSE);
-        closeView->RemoveAll();
-        delete imageClose;
-        imageClose = nullptr;
-        delete closeLable;
-        closeLable = nullptr;
-        RootView::GetInstance()->Remove(closeView);
-        delete closeView;
-        closeView = nullptr;
+    if (g_closeView != nullptr) {
+        DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_CLOSE);
+        g_closeView->RemoveAll();
+        delete g_imageClose;
+        g_imageClose = nullptr;
+        delete g_closeLable;
+        g_closeLable = nullptr;
+        RootView::GetInstance()->Remove(g_closeView);
+        delete g_closeView;
+        g_closeView = nullptr;
     }
 }
 
 UIViewGroup *CreateAlarmRingView()
 {
-    ringView = new UIViewGroup();
-    if (ringView == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmRingView ringView null!");
+    g_ringView = new UIViewGroup();
+    if (g_ringView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmRingView g_ringView null!");
         return nullptr;
     }
-    ringView->SetPosition(SET_ZERO, SET_ZERO);
-    ringView->SetWidth(Screen::GetInstance().GetWidth());
-    ringView->SetHeight(Screen::GetInstance().GetHeight());
-    imageRing = new UIImageView();
-    if (imageRing == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmRingView imageRing null!");
-        delete ringView;
-        ringView = nullptr;
+    g_ringView->SetPosition(SET_ZERO, SET_ZERO);
+    g_ringView->SetWidth(Screen::GetInstance().GetWidth());
+    g_ringView->SetHeight(Screen::GetInstance().GetHeight());
+    g_imageRing = new UIImageView();
+    if (g_imageRing == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmRingView g_imageRing null!");
+        delete g_ringView;
+        g_ringView = nullptr;
         return nullptr;
     }
-    imageRing->SetPosition(DELAY_IMAGE_X, DELAY_IMAGE_Y);
-    imageRing->SetWidth(SET_SRC);
-    imageRing->SetHeight(SET_SRC);
-    imageRing->SetSrc(ALARM_CLOCK_POP_ADD_PATH);
-    ringView->Add(imageRing);
-    ringLable = new UILabel();
-    if (ringLable == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmRingView::ringLable null!");
-        delete ringView;
-        ringView = nullptr;
-        delete imageRing;
+    g_imageRing->SetPosition(DELAY_IMAGE_X, DELAY_IMAGE_Y);
+    g_imageRing->SetWidth(SET_SRC);
+    g_imageRing->SetHeight(SET_SRC);
+    g_imageRing->SetSrc(ALARM_CLOCK_POP_ADD_PATH);
+    g_ringView->Add(g_imageRing);
+    g_ringLable = new UILabel();
+    if (g_ringLable == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmRingView::g_ringLable null!");
+        delete g_ringView;
+        g_ringView = nullptr;
+        delete g_imageRing;
         return nullptr;
     }
-    ringLable->SetPosition(DELAY_LABEL_X, DELAY_LABEL_Y, DELAY_LABEL_LENGTH, DELAY_LABEL_HEIGHT);
-    ringLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, DELAY_LABEL_FONT);
-    ringLable->SetText(RING_AGAIN);
-    ringView->Add(ringLable);
-    ringView->SetViewId(ALARM_VIEW_DELAY);
-    UIView::OnDragListener *listener =static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());
-    ringView->SetOnDragListener(listener);
-    ringView->SetDraggable(true);
-    ringView->SetTouchable(true);
-    return ringView;
+    g_ringLable->SetPosition(DELAY_LABEL_X, DELAY_LABEL_Y, DELAY_LABEL_LENGTH, DELAY_LABEL_HEIGHT);
+    g_ringLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, DELAY_LABEL_FONT);
+    g_ringLable->SetText(RING_AGAIN);
+    g_ringView->Add(g_ringLable);
+    g_ringView->SetViewId(ALARM_VIEW_DELAY);
+    UIView::OnDragListener *listener = static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());
+    g_ringView->SetOnDragListener(listener);
+    g_ringView->SetDraggable(true);
+    g_ringView->SetTouchable(true);
+    return g_ringView;
 }
 
 void FreeAlarmRingView(void)
 {
-    if (ringView != nullptr) {
-        DisableAlarmTimer(NOTIFY_ALARM_DELAY);
-        ringView->RemoveAll();
-        delete imageRing;
-        imageRing = nullptr;
-        delete ringLable;
-        ringLable = nullptr;
-        RootView::GetInstance()->Remove(ringView);
-        delete ringView;
-        ringView = nullptr;
+    if (g_ringView != nullptr) {
+        DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_DELAY);
+        g_ringView->RemoveAll();
+        delete g_imageRing;
+        g_imageRing = nullptr;
+        delete g_ringLable;
+        g_ringLable = nullptr;
+        RootView::GetInstance()->Remove(g_ringView);
+        delete g_ringView;
+        g_ringView = nullptr;
     }
 }
 
 static bool CreateAlarmViewImage(void)
 {
-    imageDelete = new UIImageView();
-    if (imageDelete == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showAlarmNotify imageDelete null!");
+    g_imageDelete = new UIImageView();
+    if (g_imageDelete == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showAlarmNotify g_imageDelete null!");
         return false;
     }
-    imageDelete->SetPosition(IMAGE_DELETE_X, IMAGE_DELETE_Y);
-    imageDelete->SetWidth(MAX_SET_SRC_LEN);
-    imageDelete->SetHeight(MAX_SET_SRC_LEN);
-    imageDelete->SetViewId(ALARM_IMAGE_DELETE);
-    imageDelete->SetSrc(ALARM_DELETE_ADD_PATH);
-    imageDelete->SetTouchable(true);
-    UIView::OnClickListener *closeListener = (UIView::OnClickListener *)AlarmViewEventListener::GetInstance();
-    imageDelete->SetOnClickListener(closeListener);
-
-    imageClock = new UIImageView();
-    if (imageClock == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showAlarmNotify imageClock null!");
-        delete imageDelete;
+    g_imageDelete->SetPosition(IMAGE_DELETE_X, IMAGE_DELETE_Y);
+    g_imageDelete->SetWidth(MAX_SET_SRC_LEN);
+    g_imageDelete->SetHeight(MAX_SET_SRC_LEN);
+    g_imageDelete->SetViewId(ALARM_IMAGE_DELETE);
+    g_imageDelete->SetSrc(ALARM_DELETE_ADD_PATH);
+    g_imageDelete->SetTouchable(true);
+    UIView::OnClickListener *closeListener = static_cast<UIView::OnClickListener *>\
+        (AlarmViewEventListener::GetInstance());
+    g_imageDelete->SetOnClickListener(closeListener);
+
+    g_imageClock = new UIImageView();
+    if (g_imageClock == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showAlarmNotify g_imageClock null!");
+        delete g_imageDelete;
         return false;
     }
-    imageClock->SetPosition(IMAGE_CLOCK_X, IMAGE_CLOCK_Y);
-    imageClock->SetWidth(MAX_SET_SRC_LEN);
-    imageClock->SetHeight(MAX_SET_SRC_LEN);
-    imageClock->SetViewId(ALARM_IMAGE_CLOCK);
-    imageClock->SetSrc(ALARM_CLOCK_ADD_PATH);
-    imageClock->SetTouchable(true);
-    imageClock->SetTouchable(true);
-    UIView::OnClickListener *clockListener = (UIView::OnClickListener *)OHOS::AlarmViewEventListener::GetInstance();
-    imageClock->SetOnClickListener(clockListener);
+    g_imageClock->SetPosition(IMAGE_CLOCK_X, IMAGE_CLOCK_Y);
+    g_imageClock->SetWidth(MAX_SET_SRC_LEN);
+    g_imageClock->SetHeight(MAX_SET_SRC_LEN);
+    g_imageClock->SetViewId(ALARM_IMAGE_CLOCK);
+    g_imageClock->SetSrc(ALARM_CLOCK_ADD_PATH);
+    g_imageClock->SetTouchable(true);
+    g_imageClock->SetTouchable(true);
+    UIView::OnClickListener *clockListener = static_cast<UIView::OnClickListener *>\
+        (OHOS::AlarmViewEventListener::GetInstance());
+    g_imageClock->SetOnClickListener(clockListener);
     return true;
 }
 
 static void FreeAlarmViewImage(void)
 {
-    delete imageDelete;
-    imageDelete = nullptr;
-    delete imageClock;
-    imageClock = nullptr;
+    delete g_imageDelete;
+    g_imageDelete = nullptr;
+    delete g_imageClock;
+    g_imageClock = nullptr;
 }
 
 static bool CreateAlarmViewLabel(void)
 {
-    struct tm local_time;
-    time_t seconds;
-    seconds = time(NULL);
-    int16 thisHour, thisMin;
-
-    mainLable = new UILabel();
-    if (mainLable == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmViewLabel mainLable is nullptr");
+    struct tm localTime;
+    int16 thisHour;
+    int16 thisMin;
+
+    g_mainLable = new UILabel();
+    if (g_mainLable == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmViewLabel g_mainLable is nullptr");
         return false;
     }
-    mainLable->SetPosition(LABEL_X, LABEL_Y, LABEL_WIDTH, LABEL_HEIGHT);
-    mainLable->SetText("闹钟");
-    mainLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);
-
-    dClock = new UIDigitalClock();
-    if (dClock == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmViewLabel dClock is nullptr");
-        delete mainLable;
+    g_mainLable->SetPosition(LABEL_X, LABEL_Y, LABEL_WIDTH, LABEL_HEIGHT);
+    g_mainLable->SetText("闹钟");
+    g_mainLable->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);
+
+    g_dClock = new UIDigitalClock();
+    if (g_dClock == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmViewLabel g_dClock is nullptr");
+        delete g_mainLable;
         return false;
     }
-    dClock->SetPosition(CLOCK_X, CLOCK_Y);
-    dClock->Resize(DIGITAL_CLOCK_WIDTH, DIGITAL_CLOCK_HEIGHT);
-    dClock->SetFont(DEFAULT_VECTOR_FONT_FILENAME, CLOCK_FONT);
-    if (localtime_r(&seconds, &local_time) == NULL) {
+    g_dClock->SetPosition(CLOCK_X, CLOCK_Y);
+    g_dClock->Resize(DIGITAL_CLOCK_WIDTH, DIGITAL_CLOCK_HEIGHT);
+    g_dClock->SetFont(DEFAULT_VECTOR_FONT_FILENAME, CLOCK_FONT);
+    time_t seconds = time(nullptr);
+    if (localtime_r(&seconds, &localTime) == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmViewLabel get localtime error!");
-        delete mainLable;
-        delete dClock;
+        delete g_mainLable;
+        delete g_dClock;
         return false;
     }
     AlarmClockModel::GetInstance()->GetPopTimeData(&thisHour, &thisMin);
-    dClock->SetDisplayMode(UIDigitalClock::DISPLAY_24_HOUR_NO_SECONDS);
-    dClock->SetTime24Hour(thisHour, thisMin, 0);
+    g_dClock->SetDisplayMode(UIDigitalClock::DISPLAY_24_HOUR_NO_SECONDS);
+    g_dClock->SetTime24Hour(thisHour, thisMin, 0);
     return true;
 }
 
 static void FreeAlarmViewLabel(void)
 {
-    delete mainLable;
-    mainLable = nullptr;
-    delete dClock;
-    dClock = nullptr;
+    delete g_mainLable;
+    g_mainLable = nullptr;
+    delete g_dClock;
+    g_dClock = nullptr;
 }
 
 UIViewGroup* CreateAlarmView(void)
 {
     AlarmClockModel::GetInstance()->AlarmGetClockNum();
-    alarmView = new UIViewGroup();
-    if (alarmView == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmView alarmView null!");
+    g_alarmView = new UIViewGroup();
+    if (g_alarmView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateAlarmView g_alarmView null!");
         return nullptr;
     }
-    alarmView->SetPosition(CONTAINER_X, CONTAINER_Y,
-                          Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
-    alarmView->SetViewId(ALARM_VIEW_POPUP);
+    g_alarmView->SetPosition(CONTAINER_X, CONTAINER_Y,
+                             Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+    g_alarmView->SetViewId(ALARM_VIEW_POPUP);
 
-    if (CreateAlarmViewLabel() == false) {
-        delete alarmView;
-        alarmView = nullptr;
+    if (!CreateAlarmViewLabel()) {
+        delete g_alarmView;
+        g_alarmView = nullptr;
         return nullptr;
     }
 
-    if (CreateAlarmViewImage() == false) {
-        delete alarmView;
-        alarmView = nullptr;
+    if (!CreateAlarmViewImage()) {
+        delete g_alarmView;
+        g_alarmView = nullptr;
         FreeAlarmViewLabel();
         return nullptr;
     }
-    alarmView->Add(mainLable);
-    alarmView->Add(dClock);
-    alarmView->Add(imageDelete);
-    alarmView->Add(imageClock);
-
-    alarmView->SetDraggable(true);
-    alarmView->SetTouchable(true);
-    UIView::OnDragListener *listener =static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());
-    alarmView->SetOnDragListener(listener);
-    StartAlarmTimer(NOTIFY_ALARM_RING, (int32_t)NOTOFY_NO_OPERATE_TIME);
-    return alarmView;
+    g_alarmView->Add(g_mainLable);
+    g_alarmView->Add(g_dClock);
+    g_alarmView->Add(g_imageDelete);
+    g_alarmView->Add(g_imageClock);
+
+    g_alarmView->SetDraggable(true);
+    g_alarmView->SetTouchable(true);
+    UIView::OnDragListener *listener = static_cast<UIView::OnDragListener*>(AlarmViewEventListener::GetInstance());
+    g_alarmView->SetOnDragListener(listener);
+    StartAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING, NOTOFY_NO_OPERATE_TIME);
+    return g_alarmView;
 }
 void FreeAlarmView(void)
 {
-    if (alarmView != nullptr) {
-        DisableAlarmTimer(NOTIFY_ALARM_RING);
-        alarmView->RemoveAll();
+    if (g_alarmView != nullptr) {
+        DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING);
+        g_alarmView->RemoveAll();
         FreeAlarmViewLabel();
         FreeAlarmViewImage();
-        RootView::GetInstance()->Remove(alarmView);
-        delete alarmView;
-        alarmView = nullptr;
+        RootView::GetInstance()->Remove(g_alarmView);
+        delete g_alarmView;
+        g_alarmView = nullptr;
     }
 }
 
@@ -436,13 +437,13 @@ bool AlarmViewEventListener::OnDragEnd(UIView& view, const DragEvent& event)
 {
     if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) {
         if (strcmp(view.GetViewId(), ALARM_VIEW_POPUP) == 0) {
-            DisableAlarmTimer(NOTIFY_ALARM_RING);
+            DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING);
             AlarmPopUpPresenter::GetInstance()->DelayAlarmRing();
             UIViewGroup* alarmRingView = CreateAlarmRingView();
             NotificationManager::GetInstance()->screenContainer_->SetVisible(false);
             RootView::GetInstance()->Add(alarmRingView);
             alarmRingView->SetVisible(true);
-            StartAlarmTimer(NOTIFY_ALARM_DELAY, (int32_t)NOTIFY_THREE_SECONDS);
+            StartAlarmTimer(AlarmTimerType::NOTIFY_ALARM_DELAY, NOTIFY_THREE_SECONDS);
         } else if (strcmp(view.GetViewId(), ALARM_VIEW_CLOSE) == 0 ||
                    strcmp(view.GetViewId(), ALARM_VIEW_DELAY) == 0) {
             NotificationManager::GetInstance()->StopNotify();
@@ -456,23 +457,23 @@ bool AlarmViewEventListener::OnClick(UIView& view, const ClickEvent& event)
     UNUSED(event);
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlamNotify ClickListener %s", view.GetViewId());
     if (strcmp(view.GetViewId(), ALARM_IMAGE_DELETE) == 0) {
-        DisableAlarmTimer(NOTIFY_ALARM_RING);
+        DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING);
         AlarmPopUpPresenter::GetInstance()->CancelAlarmRing();
         UIViewGroup* alarmCloseView = CreateAlarmCloseView();
         NotificationManager::GetInstance()->screenContainer_->SetVisible(false);
         RootView::GetInstance()->Add(alarmCloseView);
         alarmCloseView->SetVisible(true);
-        StartAlarmTimer(NOTIFY_ALARM_CLOSE, (int32_t)NOTIFY_THREE_SECONDS);
+        StartAlarmTimer(AlarmTimerType::NOTIFY_ALARM_CLOSE, NOTIFY_THREE_SECONDS);
         return true;
     } else if (strcmp(view.GetViewId(), ALARM_IMAGE_CLOCK) == 0) {
-        DisableAlarmTimer(NOTIFY_ALARM_RING);
+        DisableAlarmTimer(AlarmTimerType::NOTIFY_ALARM_RING);
         AlarmPopUpPresenter::GetInstance()->DelayAlarmRing();
         UIViewGroup* alarmRingView = CreateAlarmRingView();
         NotificationManager::GetInstance()->screenContainer_->SetVisible(false);
         RootView::GetInstance()->Add(alarmRingView);
         alarmRingView->SetVisible(true);
-        StartAlarmTimer(NOTIFY_ALARM_DELAY, (int32_t)NOTIFY_THREE_SECONDS);
+        StartAlarmTimer(AlarmTimerType::NOTIFY_ALARM_DELAY, NOTIFY_THREE_SECONDS);
     }
     return true;
 }
-}  // namespace OHOS
\ No newline at end of file
+}  // namespace OHOS
index 26ace86..644f625 100644 (file)
@@ -3,7 +3,9 @@
 #include "components/ui_button.h"
 #include "components/ui_image_view.h"
 #include "components/ui_label_ext.h"
+#ifdef FD230
 #include "language/font/ui_resource_string.h"
+#endif
 #include <UIComponents.h>
 
 namespace OHOS
@@ -72,8 +74,11 @@ namespace OHOS
             DrinkReminderTitleLabel->SetPosition(83, 52, 300, 35);
             DrinkReminderTitleLabel->SetStyle(STYLE_TEXT_FONT, 30);
             DrinkReminderTitleLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
-            // DrinkReminderTitleLabel->SetText("喝水提醒");
+            #ifdef FD230
             DrinkReminderTitleLabel->SetTextId(STR_DRINK_WATER_REMINDER);
+            #else
+            DrinkReminderTitleLabel->SetText("喝水提醒");
+            #endif
             DrinkReminderTitleLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
             DrinkReminderTitleLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
             DrinkReminderTitleLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
@@ -96,7 +101,9 @@ namespace OHOS
             DrinkReminderNoteLabel->SetPosition(53, 248, 360, 70);
             DrinkReminderNoteLabel->SetStyle(STYLE_TEXT_FONT, 30);
             DrinkReminderNoteLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
+            #ifdef FD230
             SetLabelId(DrinkReminderNoteLabel, STR_DRINK_WATER_REMINDER_NOTE);
+            #endif
             DrinkReminderNoteLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
             DrinkReminderNoteLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
             DrinkReminderNoteLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
@@ -124,8 +131,11 @@ namespace OHOS
             DrinkReminderLabel->SetPosition(133, 399, 200, 35);
             DrinkReminderLabel->SetStyle(STYLE_TEXT_FONT, 30);
             DrinkReminderLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
-            // DrinkReminderLabel->SetText("知道了");
+            #ifdef FD230
             DrinkReminderLabel->SetTextId(STR_KONW);
+            #else
+            DrinkReminderLabel->SetText("知道了");
+            #endif
             DrinkReminderLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
             DrinkReminderLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
             DrinkReminderLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
index baa7cd9..a7c9f3f 100755 (executable)
 #ifdef SUPPORT_CAT1_SERVICE
 #include "cat1_server.h"
 #endif
-#include "cat1_server.h"
-#define NOTIFY_THREE_SECONDS 3000
-#define NOTIFY_ONE_SECOND 1000
-#define NOTIFY_THIRTY_SECONDS 30000
-#define NOTIFY_ONE_MINUTE 60000
-#define NOTOFY_NO_OPERATE_TIME 35000
-
 #include "cat1_server_hal.h"
-#include "NativeAbility.h"
 #include "custom_utils.h"
-#include "phoneaddressmodel.h"
+// #define NOTIFY_THREE_SECONDS 3000
+// #define NOTIFY_ONE_SECOND 1000
+// #define NOTIFY_THIRTY_SECONDS 30000
+// #define NOTIFY_ONE_MINUTE 60000
+// #define NOTOFY_NO_OPERATE_TIME 35000
 
 namespace OHOS {
-int changeImage = 0;
-osTimerId_t g_callDuration = NULL; // timer of call duration
-osTimerId_t g_callCurrentTime = NULL; // timer of current time
+constexpr int32_t NOTIFY_THREE_SECONDS = 3000;
+constexpr int32_t NOTIFY_ONE_SECOND = 1000;
+constexpr int32_t NOTIFY_THIRTY_SECONDS = 30000;
+constexpr int32_t NOTIFY_ONE_MINUTE = 60000;
+constexpr int32_t NOTOFY_NO_OPERATE_TIME = 35000;
+int g_changeImage = 0;
+osTimerId_t g_callDurationTimer = nullptr; // timer of call duration
+osTimerId_t g_callCurrentTime = nullptr; // timer of current time
 osTimerId_t g_calldialTime = NULL;
 static constexpr uint16 MATH_ZERO = 0;
 
@@ -56,6 +57,8 @@ static constexpr uint16 LABEL_COMINGTIME_POSITION_Y = 340;
 // 图片坐标
 static constexpr uint16 LABEL_CALLERD_POSITION_X = 0;
 static constexpr uint16 LABEL_CALLERD_POSITION_Y = 160;
+static constexpr uint16 LABEL_NEWCALLERD_POSITION_X = 0;
+static constexpr uint16 LABEL_NEWCALLERD_POSITION_Y = 160;
 static constexpr uint16 IMAGE_HONRS_POSITION_X = 185;
 static constexpr uint16 IMAGE_HONRS_POSITION_Y = 10;
 static constexpr uint16 IMAGE_HANDUP_POSITION_X = 70;
@@ -63,27 +66,34 @@ static constexpr uint16 IMAGE_MIC_POSITION_X = 280;
 static constexpr uint16 IMAGE_DISSGREE_POSITION_X = 80;
 static constexpr uint16 IMAGE_AGREEING_POSITION_X = 270;
 static constexpr uint16 IMAGE_ALL_POSITION_Y = 240;
+static constexpr uint16 IMAGE_HANDUP2_POSITION_X = 177;
+static constexpr uint16 IMAGE_HANDUP2_POSITION_Y = 270;
 
 // 字体大小
 static constexpr uint16 FONT_CURRENT_SIZE = 25;
 static constexpr uint16 FONT_CALLER_SIZE = 40;
-UIViewGroup* phoneView = nullptr;
-UIViewGroup* callingView = nullptr;
-UIViewGroup* calldialView = nullptr;
-UIViewGroup* volumeSettingView = nullptr;
-VolumeSettingView *volumeSetting = nullptr;
-UIImageView* imageAgree = nullptr;
-UIImageView* imageDissgree = nullptr;
-UIImageView* imageMicrophone = nullptr;
-UIImageView* imageHandUp = nullptr;
-UIImageView* imageHorns = nullptr;
-UILabel* callerNum = nullptr;
-UILabel* callername = nullptr;
-UILabel* callerDisplay = nullptr;
-UILabel* callDuration = nullptr;
-UILabel* currentTimes = nullptr;
-UILabel* comingTimes = nullptr;
+UIViewGroup* g_phoneView = nullptr;
+UIViewGroup* g_multiPhoneView = nullptr;
+UIViewGroup* g_callingView = nullptr;
+UIViewGroup* g_waitingHintsView = nullptr;
+VolumeSettingView *g_volumeSetting = nullptr;
+UIImageView* g_imageAgree = nullptr;
+UIImageView* g_imageDissgree = nullptr;
+UIImageView* g_imageMicrophone = nullptr;
+UIImageView* g_imageHandUp = nullptr;
+UIImageView* g_imageHorns = nullptr;
+UIImageView* g_imageDissgreeNew = nullptr;
+UILabel* g_callerNum = nullptr;
+UILabel* g_callerDisplay = nullptr;
+UILabel* g_callDuration = nullptr;
+UILabel* g_currentTimes = nullptr;
+UILabel* g_comingTimes = nullptr;
+UILabel* g_newCallHints = nullptr;
+UILabel* g_newCallNum = nullptr;
+
 
+UILabel* callername = nullptr;
+UIViewGroup* calldialView = nullptr;
 UILabel *diallabel1 = nullptr;
 UILabel *diallabl2 = nullptr;
 UIButton *button1dial = nullptr;
@@ -108,13 +118,16 @@ void calllog_info_init()
     info.nameLen=3;
     int len=strlen(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
     memcpy_s(info.tel,20,CallerLogModel::GetInstance()->GetPhoneNumber().c_str(),len+1);
-    uapi_get_timestampe_ms(&info.creationTime);
+    uint32_t tmptime=0;
+    uapi_get_timestampe_ms(&tmptime);
+    info.creationTime = tmptime;
     info.callDurTime=0;
     
     info.telLen=len;
        
 
 }
+
 void addcalllog()
 {
     if(call_stat==0)
@@ -169,9 +182,11 @@ void CallTimerCallBack(int data)
 
 void CallTimerCallBackProc(int data)
 {
+    #ifdef FD230
     g_callTimesadd();
-    if (callDuration != nullptr) {
-       callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration());
+    #endif 
+    if (g_callDuration != nullptr) {
+        g_callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration().c_str());
     }
 }
 
@@ -188,8 +203,8 @@ void CalldialTimerCallBackProc(int data)
 
 void CallCurTimerCallBack(int data)
 {
-    if (currentTimes != nullptr) {
-       currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());
+    if (g_currentTimes != nullptr) {
+        g_currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());
     }
 }
 
@@ -197,36 +212,36 @@ void StartCallTimer(CallTimerType type, int32_t interval)
 {
     uint32_t tick;
     osStatus_t retTimer;
-    if (type >= NOTIFY_PHONE_UNKNOWN) {
+    if (type >= CallTimerType::NOTIFY_PHONE_UNKNOWN) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "StartCallTimer type:%d invalid!!", type);
         return;
     }
     switch (type) {
-        case NOTIFY_PHONE_CALLING_DISPLAY:
-            g_callDuration = osTimerNew((osTimerFunc_t)CallTimerCallBack, osTimerPeriodic, NULL, NULL);
+        case CallTimerType::NOTIFY_PHONE_CALLING_DISPLAY:
+            g_callDurationTimer = osTimerNew((osTimerFunc_t)CallTimerCallBack, osTimerPeriodic, nullptr, nullptr);
             tick = osMs2Tick(interval);
-            retTimer = osTimerStart(g_callDuration, tick);
-            if (retTimer != osOK && g_callDuration != NULL) {
+            retTimer = osTimerStart(g_callDurationTimer, tick);
+            if (retTimer != osOK && g_callDurationTimer != nullptr) {
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
                     "StartCallTimer osTimerStart failed, type = %d ret = %lx!!", type, retTimer);
-                osTimerDelete(g_callDuration);
-                g_callDuration = NULL;
+                osTimerDelete(g_callDurationTimer);
+                g_callDurationTimer = nullptr;
                 return;
             }
             break;
-        case NOTIFY_PHONE_CURTIME_DISPLAY:
-            g_callCurrentTime = osTimerNew((osTimerFunc_t)CallCurTimerCallBack, osTimerPeriodic, NULL, NULL);
+        case CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY:
+            g_callCurrentTime = osTimerNew((osTimerFunc_t)CallCurTimerCallBack, osTimerPeriodic, nullptr, nullptr);
             tick = osMs2Tick(interval);
             retTimer = osTimerStart(g_callCurrentTime, tick);
-            if (retTimer != osOK && g_callCurrentTime != NULL) {
+            if (retTimer != osOK && g_callCurrentTime != nullptr) {
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,
                     "StartCallTimer osTimerStart failed, type = %d ret = %lx!!", type, retTimer);
                 osTimerDelete(g_callCurrentTime);
-                g_callCurrentTime = NULL;
+                g_callCurrentTime = nullptr;
                 return;
             }
             break;
-         case NOTIFY_PHONE_DIAL_DISPLAY:
+         case CallTimerType::NOTIFY_PHONE_DIAL_DISPLAY:
             g_calldialTime = osTimerNew((osTimerFunc_t)CallCurTimerCallBack, osTimerPeriodic, NULL, NULL);
             tick = osMs2Tick(interval);
             retTimer = osTimerStart(g_calldialTime, tick);
@@ -245,38 +260,38 @@ void StartCallTimer(CallTimerType type, int32_t interval)
 
 void DisableCallTimer(CallTimerType type)
 {
-    if (type >= NOTIFY_PHONE_UNKNOWN) {
+    if (type >= CallTimerType::NOTIFY_PHONE_UNKNOWN) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableCallTimer type:%d invalid!!", type);
         return;
     }
     osStatus_t ret;
     switch (type) {
-        case NOTIFY_PHONE_CALLING_DISPLAY:
+        case CallTimerType::NOTIFY_PHONE_CALLING_DISPLAY:
             #ifdef FD230
-            if (g_callDuration != NULL) {
+            if (g_callDurationTimer != nullptr) {
                 info.callDurTime=get_g_callTimes();
                 g_callTimesclean();
                 addcalllog();
-                ret = osTimerDelete(g_callDuration);
+                ret = osTimerDelete(g_callDurationTimer);
                 if (ret != osOK) {
                     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableCallTimer failed, type= %d ret = %lx!", type, ret);
                     return;
                 }
-                g_callDuration = NULL;
+                g_callDurationTimer = nullptr;
             }
             break;
             #endif
-        case NOTIFY_PHONE_CURTIME_DISPLAY:
-            if (g_callCurrentTime != NULL) {
+        case CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY:
+            if (g_callCurrentTime != nullptr) {
                 ret = osTimerDelete(g_callCurrentTime);
                 if (ret != osOK) {
                     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableCallTimer failed, type= %d ret = %lx!", type, ret);
                     return;
                 }
-                g_callCurrentTime = NULL;
+                g_callCurrentTime = nullptr;
             }
             break;
-        case NOTIFY_PHONE_DIAL_DISPLAY:
+        case CallTimerType::NOTIFY_PHONE_DIAL_DISPLAY:
             if (g_calldialTime != NULL) {
                 ret = osTimerDelete(g_calldialTime);
                 if (ret != osOK) {
@@ -294,210 +309,278 @@ void DisableCallTimer(CallTimerType type)
 
 void HonrsViewChange(void)
 {
-    if (volumeSettingView == nullptr) {
-        volumeSetting = new VolumeSettingView();
-        if (volumeSetting == nullptr) {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "makephone_notification::volumeSetting nullptr err");
+    if (g_volumeSetting == nullptr) {
+        g_volumeSetting = new VolumeSettingView();
+        if (g_volumeSetting == nullptr) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "makephone_notification::g_volumeSetting nullptr err");
             return;
         }
-        if (volumeSetting->SetUpVolume() == false) {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "makephone_notification::volumeSetting SetUpVolume fail");
+        if (!g_volumeSetting->SetUpVolume()) {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "makephone_notification::g_volumeSetting SetUpVolume fail");
             return;
         }
-        volumeSetting->GetProgress()->SetValue(AudioManager::GetInstance().GetVolume(AUDIO_STREAM_VOICE_CALL_BT_SCO));
+        g_volumeSetting->GetProgress()->SetValue(
+            AudioManager::GetInstance().GetVolume(AUDIO_STREAM_VOICE_CALL_BT_SCO));
         if (AudioManager::GetInstance().GetVolume(AUDIO_STREAM_VOICE_CALL_BT_SCO) == 0) {
             ImageInfo *image = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUTE_BUTTON, PLAYER_IAMGES);
-            volumeSetting->GetDecreaseButton()->SetImageSrc(image, image);
+            g_volumeSetting->GetDecreaseButton()->SetImageSrc(image, image);
         }
-        volumeSettingView = volumeSetting;
-        NotificationManager::GetInstance()->screenContainer_->Add(volumeSettingView);
+        NotificationManager::GetInstance()->screenContainer_->Add(g_volumeSetting);
     }
-    VolumeSliderEventListener *volumeSliderEventListener = VolumeSliderEventListener::GetInstance();
+    VolumeSliderEventListener *volumeSliderEventListener = g_volumeSetting->GetVolumeEventListener();
     if (volumeSliderEventListener == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "makephone_notification::volumeSliderEventListener nullptr err");
         return;
     }
     UIView::OnDragListener *dragListener = (UIView::OnDragListener *)OHOS::CallViewEventListener::GetInstance();
-    volumeSettingView->SetOnDragListener(dragListener);
-    // volumeSliderEventListener->SetPlayerCoefficients(VOLUMEPHONENOTIFY); // 进度条系数
-    volumeSettingView->SetVisible(true);
+    g_volumeSetting->SetOnDragListener(dragListener);
+    volumeSliderEventListener->SetPlayerCoefficients(VOLUMEPHONENOTIFY); // 进度条系数
+    g_volumeSetting->SetVisible(true);
     // 刷新UI
     RootView::GetInstance()->Invalidate();
 }
+VolumeSettingView *GetvolumeSetting(void)
+{
+    return g_volumeSetting;
+}
 
 static void FreeCallingViewImage(void)
 {
-    if (imageMicrophone != nullptr) {
-        delete imageMicrophone;
-        imageMicrophone = nullptr;
+    if (g_imageMicrophone != nullptr) {
+        delete g_imageMicrophone;
+        g_imageMicrophone = nullptr;
     }
-    if (imageHandUp != nullptr) {
-        delete imageHandUp;
-        imageHandUp = nullptr;
+    if (g_imageHandUp != nullptr) {
+        delete g_imageHandUp;
+        g_imageHandUp = nullptr;
     }
-    if (imageHorns != nullptr) {
-        delete imageHorns;
-        imageHorns = nullptr;
+    if (g_imageHorns != nullptr) {
+        delete g_imageHorns;
+        g_imageHorns = nullptr;
     }
 }
 
 static bool DrawCallingViewImage(void)
 {
-    imageMicrophone = new UIImageView();
-    if (imageMicrophone == nullptr) {
+    g_imageMicrophone = new UIImageView();
+    if (g_imageMicrophone == nullptr) {
         return false;
     }
-    imageMicrophone->SetPosition(IMAGE_MIC_POSITION_X, IMAGE_ALL_POSITION_Y);
-    imageMicrophone->SetSrc(PNG_MICROPHONE_OPEN_IMAGE_PATH);
-    imageMicrophone->SetTouchable(true);
-    imageMicrophone->SetViewId("microphoneChange");
+    g_imageMicrophone->SetPosition(IMAGE_MIC_POSITION_X, IMAGE_ALL_POSITION_Y);
+    g_imageMicrophone->SetSrc(PNG_MICROPHONE_OPEN_IMAGE_PATH);
+    g_imageMicrophone->SetTouchable(true);
+    g_imageMicrophone->SetViewId("microphoneChange");
 
-    imageHandUp = new UIImageView();
-    if (imageHandUp == nullptr) {
+    g_imageHandUp = new UIImageView();
+    if (g_imageHandUp == nullptr) {
         FreeCallingViewImage();
         return false;
     }
-    imageHandUp->SetPosition(IMAGE_HANDUP_POSITION_X, IMAGE_ALL_POSITION_Y);
-    imageHandUp->SetSrc(PNG_DISSGREE_IMAGE_PATH);
-    imageHandUp->SetTouchable(true);
-    imageHandUp->SetViewId("callingHandUp");
+    g_imageHandUp->SetPosition(IMAGE_HANDUP_POSITION_X, IMAGE_ALL_POSITION_Y);
+    g_imageHandUp->SetSrc(PNG_DISSGREE_IMAGE_PATH);
+    g_imageHandUp->SetTouchable(true);
+    g_imageHandUp->SetViewId("callingHandUp");
 
-    imageHorns = new UIImageView();
-    if (imageHorns == nullptr) {
+    g_imageHorns = new UIImageView();
+    if (g_imageHorns == nullptr) {
         FreeCallingViewImage();
         return false;
     }
-    imageHorns->SetPosition(IMAGE_HONRS_POSITION_X, IMAGE_HONRS_POSITION_Y);
-    imageHorns->SetSrc(PNG_SOUNDBUTTON2);
-    imageHorns->SetTouchable(true);
-    imageHorns->SetViewId("volumeSwitch");
+    g_imageHorns->SetPosition(IMAGE_HONRS_POSITION_X, IMAGE_HONRS_POSITION_Y);
+    g_imageHorns->SetSrc(PNG_SOUNDBUTTON2);
+    g_imageHorns->SetTouchable(true);
+    g_imageHorns->SetViewId("volumeSwitch");
 
     return true;
 }
 
 static void FreeCallingViewUILabel(void)
 {
-    if (callerDisplay != nullptr) {
-        delete callerDisplay;
-        callerDisplay = nullptr;
+    if (g_callerDisplay != nullptr) {
+        delete g_callerDisplay;
+        g_callerDisplay = nullptr;
     }
-    if (callDuration != nullptr) {
-        delete callDuration;
-        callDuration =  nullptr;
+    if (g_callDuration != nullptr) {
+        delete g_callDuration;
+        g_callDuration =  nullptr;
     }
-    if (currentTimes != nullptr) {
-        delete currentTimes;
-        currentTimes = nullptr;
+    if (g_currentTimes != nullptr) {
+        delete g_currentTimes;
+        g_currentTimes = nullptr;
     }
 }
 
 static bool DrawCallingViewUILabel(void)
 {
-    callerDisplay = new UILabel();
-    if (callerDisplay == nullptr) {
+    g_callerDisplay = new UILabel();
+    if (g_callerDisplay == nullptr) {
         return false;
     }
-    callerDisplay->SetPosition(LABEL_PERCENT_POSITION_X, LABEL_PERCENT_POSITION_Y,
+    g_callerDisplay->SetPosition(LABEL_PERCENT_POSITION_X, LABEL_PERCENT_POSITION_Y,
         Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);
-    callerDisplay->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
-    callerDisplay->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
-    callerDisplay->SetAlign(TEXT_ALIGNMENT_CENTER);
-    callerDisplay->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);
-    callerDisplay->SetTextColor(Color::White());
-
-    callDuration = new UILabel();
-    if (callDuration == nullptr) {
+    g_callerDisplay->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
+    g_callerDisplay->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
+    g_callerDisplay->SetAlign(TEXT_ALIGNMENT_CENTER);
+    g_callerDisplay->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);
+    g_callerDisplay->SetTextColor(Color::White());
+
+    g_callDuration = new UILabel();
+    if (g_callDuration == nullptr) {
         FreeCallingViewUILabel();
         return false;
     }
-    callDuration->SetPosition(LABEL_CALLERD_POSITION_X, LABEL_CALLERD_POSITION_Y,
+    g_callDuration->SetPosition(LABEL_CALLERD_POSITION_X, LABEL_CALLERD_POSITION_Y,
         Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);
-    callDuration->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
-    callDuration->SetAlign(TEXT_ALIGNMENT_CENTER);
-    callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration());
-    callDuration->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);
-    callDuration->SetTextColor(Color::White());
-
-    currentTimes = new UILabel();
-    if (currentTimes == nullptr) {
+    g_callDuration->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
+    g_callDuration->SetAlign(TEXT_ALIGNMENT_CENTER);
+    g_callDuration->SetText(CallerLogModel::GetInstance()->DisplayCallDuration().c_str());
+    g_callDuration->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);
+    g_callDuration->SetTextColor(Color::White());
+
+    g_currentTimes = new UILabel();
+    if (g_currentTimes == nullptr) {
         FreeCallingViewUILabel();
         return false;
     }
-    currentTimes->SetPosition(LABEL_CURREMTTIME_POSITION_X, LABEL_CURREMTTIME_POSITION_Y,
+    g_currentTimes->SetPosition(LABEL_CURREMTTIME_POSITION_X, LABEL_CURREMTTIME_POSITION_Y,
         Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);
-    currentTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
-    currentTimes->SetAlign(TEXT_ALIGNMENT_CENTER);
-    currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());
-    currentTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);
-    currentTimes->SetTextColor(Color::White());
+    g_currentTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
+    g_currentTimes->SetAlign(TEXT_ALIGNMENT_CENTER);
+    g_currentTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());
+    g_currentTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);
+    g_currentTimes->SetTextColor(Color::White());
 
     return true;
 }
 
+static bool DrawWaitingHintsViewImage(void)
+{
+    g_imageDissgreeNew = new UIImageView();
+    if (g_imageDissgreeNew == nullptr) {
+        FreeCallingViewImage();
+        return false;
+    }
+    g_imageDissgreeNew->SetPosition(IMAGE_HANDUP2_POSITION_X, IMAGE_HANDUP2_POSITION_Y);
+    g_imageDissgreeNew->SetSrc(PNG_DISSGREE_IMAGE_PATH);
+    g_imageDissgreeNew->SetTouchable(true);
+    g_imageDissgreeNew->SetViewId("newCallHandUp");
+    return true;
+}
+
+static void FreeWaitingHintsViewImage(void)
+{
+    if (g_imageDissgreeNew != nullptr) {
+        delete g_imageDissgreeNew;
+        g_imageDissgreeNew = nullptr;
+    }
+}
+
+static void FreeWaitingHintsViewLabel(void)
+{
+    if (g_newCallNum != nullptr) {
+        delete g_newCallNum;
+        g_newCallNum = nullptr;
+    }
+    if (g_newCallHints != nullptr) {
+        delete g_newCallHints;
+        g_newCallHints = nullptr;
+    }
+}
+
+static bool DrawWaitingHintsViewLabel(void)
+{
+    g_newCallNum = new UILabel();
+    if (g_newCallNum == nullptr) {
+        return false;
+    }
+    g_newCallNum->SetPosition(LABEL_PERCENT_POSITION_X, LABEL_PERCENT_POSITION_Y,
+        Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);
+    g_newCallNum->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
+    g_newCallNum->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
+    g_newCallNum->SetAlign(TEXT_ALIGNMENT_CENTER);
+    g_newCallNum->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);
+    g_newCallNum->SetTextColor(Color::White());
+
+    g_newCallHints = new UILabel();
+    if (g_newCallHints == nullptr) {
+        FreeWaitingHintsViewLabel();
+        return false;
+    }
+    g_newCallHints->SetPosition(LABEL_NEWCALLERD_POSITION_X, LABEL_NEWCALLERD_POSITION_Y,
+        Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);
+    g_newCallHints->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
+    g_newCallHints->SetText("新来电");
+    g_newCallHints->SetAlign(TEXT_ALIGNMENT_CENTER);
+    g_newCallHints->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);
+    g_newCallHints->SetTextColor(Color::White());
+    return true;
+}
+
 static void FreePhoneCallViewImage(void)
 {
-    if (imageAgree != nullptr) {
-        delete imageAgree;
-        imageAgree = nullptr;
+    if (g_imageAgree != nullptr) {
+        delete g_imageAgree;
+        g_imageAgree = nullptr;
     }
-    if (imageDissgree != nullptr) {
-        delete imageDissgree;
-        imageDissgree = nullptr;
+    if (g_imageDissgree != nullptr) {
+        delete g_imageDissgree;
+        g_imageDissgree = nullptr;
     }
 }
 
 static bool DrawPhoneCallViewImage(void)
 {
-    imageAgree = new UIImageView();
-    if (imageAgree == nullptr) {
+    g_imageAgree = new UIImageView();
+    if (g_imageAgree == nullptr) {
         return false;
     }
-    imageAgree->SetPosition(IMAGE_AGREEING_POSITION_X, IMAGE_ALL_POSITION_Y);
-    imageAgree->SetSrc(PNG_AGREEING_IMAGE_PATH);
-    imageAgree->SetTouchable(true);
-    imageAgree->SetViewId("answer");
-    UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::CallViewEventListener::GetInstance();
-    imageAgree->SetOnClickListener(clickListener);
-    imageDissgree = new UIImageView();
-    if (imageDissgree == nullptr) {
+    g_imageAgree->SetPosition(IMAGE_AGREEING_POSITION_X, IMAGE_ALL_POSITION_Y);
+    g_imageAgree->SetSrc(PNG_AGREEING_IMAGE_PATH);
+    g_imageAgree->SetTouchable(true);
+    g_imageAgree->SetViewId("answer");
+    UIView::OnClickListener *clickListener = static_cast<UIView::OnClickListener *>\
+        (OHOS::CallViewEventListener::GetInstance());
+    g_imageAgree->SetOnClickListener(clickListener);
+    g_imageDissgree = new UIImageView();
+    if (g_imageDissgree == nullptr) {
         FreePhoneCallViewImage();
         return false;
     }
-    imageDissgree->SetPosition(IMAGE_DISSGREE_POSITION_X, IMAGE_ALL_POSITION_Y);
-    imageDissgree->SetSrc(PNG_DISSGREE_IMAGE_PATH);
-    imageDissgree->SetTouchable(true);
-    imageDissgree->SetViewId("displayHandUp");
-    imageDissgree->SetOnClickListener(clickListener);
+    g_imageDissgree->SetPosition(IMAGE_DISSGREE_POSITION_X, IMAGE_ALL_POSITION_Y);
+    g_imageDissgree->SetSrc(PNG_DISSGREE_IMAGE_PATH);
+    g_imageDissgree->SetTouchable(true);
+    g_imageDissgree->SetViewId("displayHandUp");
+    g_imageDissgree->SetOnClickListener(clickListener);
     return true;
 }
 
 static void FreePhoneCallViewLabel(void)
 {
-    if (callerNum != nullptr) {
-        delete callerNum;
-        callerNum = nullptr;
+    if (g_callerNum != nullptr) {
+        delete g_callerNum;
+        g_callerNum = nullptr;
     }
-    if (comingTimes != nullptr) {
-        delete comingTimes;
-        comingTimes = nullptr;
+    if (g_comingTimes != nullptr) {
+        delete g_comingTimes;
+        g_comingTimes = nullptr;
     }
 }
 
 static bool DrawPhoneCallViewLabel(void)
 {
-    callerNum = new UILabel();
-    if (callerNum == nullptr) {
+    g_callerNum = new UILabel();
+    if (g_callerNum == nullptr) {
         return false;
     }
-    callerNum->SetPosition(LABEL_COMINGVIEW_POSITION_X, LABEL_COMINGVIEW_POSITION_Y, Screen::GetInstance().GetWidth(),
-        TITLE_LABEL_DEFAULT_HEIGHT);
-    callerNum->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
+    g_callerNum->SetPosition(LABEL_COMINGVIEW_POSITION_X, LABEL_COMINGVIEW_POSITION_Y,
+        Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);
+    g_callerNum->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "CreatePhoneCallView phonenum:%s!",
                   CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
-    callerNum->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
-    callerNum->SetAlign(TEXT_ALIGNMENT_CENTER);
-    callerNum->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);
-    callerNum->SetTextColor(Color::White());
+    g_callerNum->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
+    g_callerNum->SetAlign(TEXT_ALIGNMENT_CENTER);
+    g_callerNum->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);
+    g_callerNum->SetTextColor(Color::White());
 
     // callername
 
@@ -512,78 +595,79 @@ static bool DrawPhoneCallViewLabel(void)
     //               CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
     const char *number=CallerLogModel::GetInstance()->GetPhoneNumber().c_str();
     char name[32]={0};
+    #ifdef FD230
     OHOS::get_phone_addrss_name(name,number);
-
+    #endif
     callername->SetText(name);
     callername->SetAlign(TEXT_ALIGNMENT_CENTER);
     callername->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE);
     callername->SetTextColor(Color::White());
 
 
-    comingTimes = new UILabel();
-    if (comingTimes == nullptr) {
+    g_comingTimes = new UILabel();
+    if (g_comingTimes == nullptr) {
         FreePhoneCallViewLabel();
         return false;
     }
-    comingTimes->SetPosition(LABEL_COMINGTIME_POSITION_X, LABEL_COMINGTIME_POSITION_Y,
+    g_comingTimes->SetPosition(LABEL_COMINGTIME_POSITION_X, LABEL_COMINGTIME_POSITION_Y,
         Screen::GetInstance().GetWidth(), TITLE_LABEL_DEFAULT_HEIGHT);
-    comingTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
-    comingTimes->SetAlign(TEXT_ALIGNMENT_CENTER);
-    comingTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());
-    comingTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);
-    comingTimes->SetTextColor(Color::White());
+    g_comingTimes->SetStyle(STYLE_BACKGROUND_COLOR, OPA_TRANSPARENT);
+    g_comingTimes->SetAlign(TEXT_ALIGNMENT_CENTER);
+    g_comingTimes->SetText(CallerLogModel::GetInstance()->InitDateHourTime().c_str());
+    g_comingTimes->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CURRENT_SIZE);
+    g_comingTimes->SetTextColor(Color::White());
     return true;
 }
 
 UIViewGroup* CreatePhoneCallView(void)
 {
-    phoneView = new UIViewGroup();
-    if (phoneView == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreatePhoneCallView phoneView null!");
+    g_phoneView = new UIViewGroup();
+    if (g_phoneView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreatePhoneCallView g_phoneView null!");
         return nullptr;
     }
-    phoneView->SetPosition(MATH_ZERO, MATH_ZERO);
-    phoneView->SetWidth(Screen::GetInstance().GetWidth());
-    phoneView->SetHeight(Screen::GetInstance().GetHeight());
-    if (DrawPhoneCallViewImage() == false) {
-        delete phoneView;
-        phoneView = nullptr;
+    g_phoneView->SetPosition(MATH_ZERO, MATH_ZERO);
+    g_phoneView->SetWidth(Screen::GetInstance().GetWidth());
+    g_phoneView->SetHeight(Screen::GetInstance().GetHeight());
+    if (!DrawPhoneCallViewImage()) {
+        delete g_phoneView;
+        g_phoneView = nullptr;
         return nullptr;
     }
-    if (DrawPhoneCallViewLabel() == false) {
+    if (!DrawPhoneCallViewLabel()) {
         FreePhoneCallViewImage();
-        delete phoneView;
-        phoneView = nullptr;
+        delete g_phoneView;
+        g_phoneView = nullptr;
         return nullptr;
     }
-    phoneView->Add(imageAgree);
-    phoneView->Add(imageDissgree);
-    phoneView->Add(callerNum);
-    phoneView->Add(callername);
-    phoneView->Add(comingTimes);
-    phoneView->SetDraggable(true);
-    phoneView->SetTouchable(true);
+    g_phoneView->Add(g_imageAgree);
+    g_phoneView->Add(g_imageDissgree);
+    g_phoneView->Add(g_callerNum);
+    g_phoneView->Add(callername);
+    g_phoneView->Add(g_comingTimes);
+    g_phoneView->SetDraggable(true);
+    g_phoneView->SetTouchable(true);
     call_stat=2;
     calllog_info_init();
-    return phoneView;
+    return g_phoneView;
 }
 
 void FreePhoneCallView(void)
 {
-    if (phoneView != nullptr) {
-        phoneView->RemoveAll();
+    if (g_phoneView != nullptr) {
+        g_phoneView->RemoveAll();
         FreePhoneCallViewImage();
         FreePhoneCallViewLabel();
-        RootView::GetInstance()->Remove(phoneView);
-        delete phoneView;
-        phoneView = nullptr;
+        RootView::GetInstance()->Remove(g_phoneView);
+        delete g_phoneView;
+        g_phoneView = nullptr;
     }
 }
 
 void FreeCalldialView(void)
 {
     if (calldialView != nullptr) {
-        DisableCallTimer(NOTIFY_PHONE_CALLING_DISPLAY);
+        DisableCallTimer(CallTimerType::NOTIFY_PHONE_CALLING_DISPLAY);
         calldialView->RemoveAll();
         if(diallabel1!=NULL)
         {
@@ -602,7 +686,7 @@ void FreeCalldialView(void)
             delete button1dial;
             button1dial =nullptr;
         }
-        DisableCallTimer(NOTIFY_PHONE_DIAL_DISPLAY);
+        DisableCallTimer(CallTimerType::NOTIFY_PHONE_DIAL_DISPLAY);
         RootView::GetInstance()->Remove(calldialView);
         delete calldialView;
         calldialView = nullptr;
@@ -693,50 +777,108 @@ UIViewGroup* CreateCalldialView(void)
     UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::CallViewEventListener::GetInstance();
     calldialView->SetOnClickListener(clickListener);
    
-    StartCallTimer(NOTIFY_PHONE_DIAL_DISPLAY, (int32_t)NOTIFY_ONE_SECOND);
+    StartCallTimer(CallTimerType::NOTIFY_PHONE_DIAL_DISPLAY, (int32_t)NOTIFY_ONE_SECOND);
 
     call_stat=0;
     calllog_info_init();
     return calldialView;
 }
+UIViewGroup* CreateMultiplePhoneView(void)
+{
+    g_multiPhoneView = new UIViewGroup();
+    if (g_multiPhoneView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateMultiplePhoneView g_multiPhoneView null!");
+        return nullptr;
+    }
+    g_multiPhoneView->SetPosition(MATH_ZERO, MATH_ZERO);
+    g_multiPhoneView->SetWidth(Screen::GetInstance().GetWidth());
+    g_multiPhoneView->SetHeight(Screen::GetInstance().GetHeight());
+    if (!DrawCallingViewImage()) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateMultiplePhoneView create image error!");
+        delete g_multiPhoneView;
+        g_multiPhoneView = nullptr;
+        return nullptr;
+    }
+    if (!DrawCallingViewUILabel()) {
+        FreeCallingViewImage();
+        delete g_multiPhoneView;
+        g_multiPhoneView = nullptr;
+        return nullptr;
+    }
+    g_callerDisplay->SetText("正在通话");
+    g_callDuration->SetText("");
+    g_multiPhoneView->Add(g_imageMicrophone);
+    g_multiPhoneView->Add(g_imageHandUp);
+    g_multiPhoneView->Add(g_imageHorns);
+    g_multiPhoneView->Add(g_callerDisplay);
+    g_multiPhoneView->Add(g_callDuration);
+    g_multiPhoneView->Add(g_currentTimes);
+    g_multiPhoneView->SetDraggable(true);
+    g_multiPhoneView->SetTouchable(true);
+    UIView::OnClickListener *clickListener = static_cast<UIView::OnClickListener *>\
+        (OHOS::CallViewEventListener::GetInstance());
+    g_imageMicrophone->SetOnClickListener(clickListener);
+    g_imageHandUp->SetOnClickListener(clickListener);
+    g_imageHorns->SetOnClickListener(clickListener);
+    StartCallTimer(CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY, NOTIFY_THIRTY_SECONDS);
+    NotificationManager::GetInstance()->SetVolumeScreenStatus(false);
 
+    return g_multiPhoneView;
+}
 
+void FreeMultiplePhoneCallView(void)
+{
+    if (g_multiPhoneView != nullptr) {
+        DisableCallTimer(CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY);
+        g_multiPhoneView->RemoveAll();
+        FreeCallingViewImage();
+        FreeCallingViewUILabel();
+        RootView::GetInstance()->Remove(g_multiPhoneView);
+        delete g_multiPhoneView;
+        g_multiPhoneView = nullptr;
+    }
+    if (g_volumeSetting != nullptr) {
+        delete g_volumeSetting;
+        g_volumeSetting = nullptr;
+    }
+}
 UIViewGroup* CreateCallingView(void)
 {
-    callingView = new UIViewGroup();
-    if (callingView == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateCallingView callingView null!");
+    g_callingView = new UIViewGroup();
+    if (g_callingView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateCallingView g_callingView null!");
         return nullptr;
     }
-    callingView->SetPosition(MATH_ZERO, MATH_ZERO);
-    callingView->SetWidth(Screen::GetInstance().GetWidth());
-    callingView->SetHeight(Screen::GetInstance().GetHeight());
-    if (DrawCallingViewImage() == false) {
+    g_callingView->SetPosition(MATH_ZERO, MATH_ZERO);
+    g_callingView->SetWidth(Screen::GetInstance().GetWidth());
+    g_callingView->SetHeight(Screen::GetInstance().GetHeight());
+    if (!DrawCallingViewImage()) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateCallingView create image error!");
-        delete callingView;
-        callingView = nullptr;
+        delete g_callingView;
+        g_callingView = nullptr;
         return nullptr;
     }
-    if (DrawCallingViewUILabel() == false) {
+    if (!DrawCallingViewUILabel()) {
         FreeCallingViewImage();
-        delete callingView;
-        callingView = nullptr;
+        delete g_callingView;
+        g_callingView = nullptr;
         return nullptr;
     }
-    callingView->Add(imageMicrophone);
-    callingView->Add(imageHandUp);
-    callingView->Add(imageHorns);
-    callingView->Add(callerDisplay);
-    callingView->Add(callDuration);
-    callingView->Add(currentTimes);
-    callingView->SetDraggable(true);
-    callingView->SetTouchable(true);
-    UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::CallViewEventListener::GetInstance();
-    imageMicrophone->SetOnClickListener(clickListener);
-    imageHandUp->SetOnClickListener(clickListener);
-    imageHorns->SetOnClickListener(clickListener);
-    StartCallTimer(NOTIFY_PHONE_CALLING_DISPLAY, (int32_t)NOTIFY_ONE_SECOND);
-    StartCallTimer(NOTIFY_PHONE_CURTIME_DISPLAY, (int32_t)NOTIFY_THIRTY_SECONDS);
+    g_callingView->Add(g_imageMicrophone);
+    g_callingView->Add(g_imageHandUp);
+    g_callingView->Add(g_imageHorns);
+    g_callingView->Add(g_callerDisplay);
+    g_callingView->Add(g_callDuration);
+    g_callingView->Add(g_currentTimes);
+    g_callingView->SetDraggable(true);
+    g_callingView->SetTouchable(true);
+    UIView::OnClickListener *clickListener = static_cast<UIView::OnClickListener *>\
+        (OHOS::CallViewEventListener::GetInstance());
+    g_imageMicrophone->SetOnClickListener(clickListener);
+    g_imageHandUp->SetOnClickListener(clickListener);
+    g_imageHorns->SetOnClickListener(clickListener);
+    StartCallTimer(CallTimerType::NOTIFY_PHONE_CALLING_DISPLAY, NOTIFY_ONE_SECOND);
+    StartCallTimer(CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY, NOTIFY_THIRTY_SECONDS);
     NotificationManager::GetInstance()->SetVolumeScreenStatus(false);
 
     if(call_stat==2)
@@ -744,31 +886,112 @@ UIViewGroup* CreateCallingView(void)
         call_stat=1;
     }
     
-    return callingView;
+    return g_callingView;
 }
 
 void FreeCallingView(void)
 {
-    if (callingView != nullptr) {
-        DisableCallTimer(NOTIFY_PHONE_CALLING_DISPLAY);
-        DisableCallTimer(NOTIFY_PHONE_CURTIME_DISPLAY);
-        callingView->RemoveAll();
+    if (g_callingView != nullptr) {
+        DisableCallTimer(CallTimerType::NOTIFY_PHONE_CALLING_DISPLAY);
+        DisableCallTimer(CallTimerType::NOTIFY_PHONE_CURTIME_DISPLAY);
+        g_callingView->RemoveAll();
         FreeCallingViewImage();
         FreeCallingViewUILabel();
-        RootView::GetInstance()->Remove(callingView);
-        delete callingView;
-        callingView = nullptr;
+        RootView::GetInstance()->Remove(g_callingView);
+        delete g_callingView;
+        g_callingView = nullptr;
     }
-    if (volumeSettingView != nullptr) {
-        delete volumeSettingView;
-        volumeSettingView = nullptr;
-        volumeSetting = nullptr;
+    if (g_volumeSetting != nullptr) {
+        delete g_volumeSetting;
+        g_volumeSetting = nullptr;
+    }
+}
+
+UIViewGroup* CreateWaitingHintsView(void)
+{
+    g_waitingHintsView = new UIViewGroup();
+    if (g_waitingHintsView == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateWaitingHintsView g_waitingHintsView null!");
+        return nullptr;
+    }
+    g_waitingHintsView->SetPosition(MATH_ZERO, MATH_ZERO);
+    g_waitingHintsView->SetWidth(Screen::GetInstance().GetWidth());
+    g_waitingHintsView->SetHeight(Screen::GetInstance().GetHeight());
+    if (!DrawWaitingHintsViewImage()) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CreateWaitingHintsView create image error!");
+        delete g_waitingHintsView;
+        g_waitingHintsView = nullptr;
+        return nullptr;
+    }
+    if (!DrawWaitingHintsViewLabel()) {
+        FreeWaitingHintsViewImage();
+        delete g_waitingHintsView;
+        g_waitingHintsView = nullptr;
+        return nullptr;
+    }
+    g_waitingHintsView->Add(g_imageDissgreeNew);
+    g_waitingHintsView->Add(g_newCallNum);
+    g_waitingHintsView->Add(g_newCallHints);
+    g_waitingHintsView->SetDraggable(true);
+    g_waitingHintsView->SetTouchable(true);
+    UIView::OnClickListener *clickListener = static_cast<UIView::OnClickListener *>\
+        (OHOS::CallViewEventListener::GetInstance());
+    g_imageDissgreeNew->SetOnClickListener(clickListener);
+    return g_waitingHintsView;
+}
+
+void FreeWaitingHintsView(void)
+{
+    if (g_waitingHintsView != nullptr) {
+        g_waitingHintsView->RemoveAll();
+        FreeWaitingHintsViewImage();
+        FreeWaitingHintsViewLabel();
+        RootView::GetInstance()->Remove(g_waitingHintsView);
+        delete g_waitingHintsView;
+        g_waitingHintsView = nullptr;
     }
 }
 
 void RefreshMicrophoneImageSrc(const char* src)
 {
-    imageMicrophone->SetSrc(src);
+    g_imageMicrophone->SetSrc(src);
+}
+
+void EnableWaitingView(void)
+{
+    if (g_waitingHintsView == nullptr) {
+        CreateWaitingHintsView();
+    }
+    if (NotificationManager::GetInstance()->screenContainer_ != nullptr) {
+        NotificationManager::GetInstance()->screenContainer_->SetVisible(false);
+    }
+    RootView::GetInstance()->Add(g_waitingHintsView);
+    g_waitingHintsView->SetVisible(true);
+    RootView::GetInstance()->Invalidate();
+}
+
+void DisableWatingView(void)
+{
+    if (g_waitingHintsView != nullptr) {
+        g_waitingHintsView->SetVisible(false);
+        FreeWaitingHintsView();
+        if (NotificationManager::GetInstance()->screenContainer_ != nullptr) {
+            NotificationManager::GetInstance()->screenContainer_->SetVisible(true);
+        }
+        RootView::GetInstance()->Invalidate();
+    }
+}
+
+bool HintsHandupClick(void)
+{
+    if (RejectIncomingCall() != 0) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[HintsHandupClick] RejectIncomingCall error");
+        return false;
+    }
+    CallerLogModel::GetInstance()->SetWaitingStatus(false);
+    CallerLogModel::GetInstance()->SetCallStatus(true);
+
+    return true;
 }
 
 CallViewEventListener::CallViewEventListener()
@@ -792,10 +1015,9 @@ bool CallViewEventListener::OnDragEnd(OHOS::UIView& view, const OHOS::DragEvent&
     if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) 
     {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "xxxxxxxxxxxxxxx");
-        volumeSettingView->SetVisible(false);
-        volumeSetting->SetVisible(false);
+        g_volumeSetting->SetVisible(false);
         unsigned char volumeValue;
-        volumeValue = (unsigned char) ((double) (volumeSetting->sounding * CALL_VOLUME_MAX) / (VOLUME_MAX - VOLUME_MIN)); // 音量转换
+        volumeValue = (unsigned char) ((double) (g_volumeSetting->sounding * CALL_VOLUME_MAX) / (VOLUME_MAX - VOLUME_MIN)); // 音量转换
         SetSpeakerVolume(volumeValue);
         return true;
     }
@@ -880,20 +1102,23 @@ bool CallViewEventListener::OnClick(UIView& view, const ClickEvent& event)
     } 
     
     else if (strcmp(view.GetViewId(), "microphoneChange") == 0) {
-        if (changeImage == 0) {
-            changeImage = 1;
+        if (g_changeImage == 0) {
+            g_changeImage = 1;
             RefreshMicrophoneImageSrc(PNG_MICROPHONE_CLOSE_IMAGE_PATH);
             SetMicMute(true);
         } else {
-            changeImage = 0;
+            g_changeImage = 0;
             RefreshMicrophoneImageSrc(PNG_MICROPHONE_OPEN_IMAGE_PATH);
             SetMicMute(false);
         }
         return true;
     } else if (strcmp(view.GetViewId(), "volumeSwitch") == 0) {
         HonrsViewChange();
+    } else if (strcmp(view.GetViewId(), "newCallHandUp") == 0) {
+        if (!HintsHandupClick()) {
+            return false;
+        }
     }
-// #endif
     return true;
 }
 }  // namespace OHOS
\ No newline at end of file
index 3298f9a..7878009 100755 (executable)
@@ -1,8 +1,8 @@
 /*
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-03-07 18:27:45
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-03-25 18:23:17
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-05-27 23:52:29
  * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/notification_manager_customer.cpp
  */
 /*
@@ -32,7 +32,11 @@ void NotificationManager::FreeNotifyViews()
     FreeAlarmRingView();
     FreePhoneCallView();
     FreeCallingView();
+    FreeMultiplePhoneCallView();
+    FreeWaitingHintsView();
+#ifdef FD230
     FreeCalldialView();
+#endif
     FreeFindWatchView();
     FreelowPower();
     FreeDrinkReminderView();
index c7b92b6..fc12b63 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-03-22 10:04:36
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-29 20:09:47
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-05-28 00:03:19
  * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp
  */
 #include "notification_manager.h"
@@ -700,7 +700,8 @@ namespace OHOS
         #ifdef SUPPORT_BLE_SERVICE
         comfirmPaire(0);
         #endif
-        if( NotificationManager::GetInstance()->GetShowingNotifyId() == TOPIC_EVENT_DEVICE_BIND && NotificationManager::GetInstance()->hasNotifyShowing() == true)
+        if( NotificationManager::GetInstance()->GetShowingNotifyId() == TOPIC_EVENT_DEVICE_BIND &&
+            NotificationManager::GetInstance()->HasNotifyShowing() == true)
         {
             NotificationManager::GetInstance()->StopNotify();
         }
index 92c898f..99fe159 100644 (file)
@@ -3,13 +3,15 @@
 #include "components/ui_button.h"
 #include "components/ui_image_view.h"
 #include "components/ui_label_ext.h"
+#ifdef FD230
 #include "language/font/ui_resource_string.h"
+#endif
 #include <UIComponents.h>
 #include <cmsis_os2.h>
 #include <broadcast_feature.h>
 #include <service/graphic_service.h>
 #include <thread>
-#include "config/include/ConfigModel.h"
+#include "ConfigModel.h"
 
 namespace OHOS
 {
@@ -95,8 +97,11 @@ namespace OHOS
             SedentaryReminderTitleLabel->SetPosition(83, 52, 300, 35);
             SedentaryReminderTitleLabel->SetStyle(STYLE_TEXT_FONT, 30);
             SedentaryReminderTitleLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
-            // SedentaryReminderTitleLabel->SetText("久坐提醒");
+            #ifdef FD230
             SedentaryReminderTitleLabel->SetTextId(STR_SEDENTARY_REMINDER);
+            #else
+            SedentaryReminderTitleLabel->SetText("久坐提醒");
+            #endif
             SedentaryReminderTitleLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
             SedentaryReminderTitleLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
             SedentaryReminderTitleLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
@@ -119,7 +124,9 @@ namespace OHOS
             SedentaryReminderNoteLabel->SetPosition(53, 248, 360, 70);
             SedentaryReminderNoteLabel->SetStyle(STYLE_TEXT_FONT, 30);
             SedentaryReminderNoteLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
+            #ifdef FD230
             SetLabelId(SedentaryReminderNoteLabel, STR_SEDENTARY_REMINDER_NOTE);
+            #endif
             // UpdateLabel(SedentaryReminderNoteLabel,"1",STR_SEDENTARY_REMINDER_NOTE);
             SedentaryReminderNoteLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
             SedentaryReminderNoteLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
@@ -148,8 +155,11 @@ namespace OHOS
             SedentaryReminderLabel->SetPosition(133, 399, 200, 35);
             SedentaryReminderLabel->SetStyle(STYLE_TEXT_FONT, 30);
             SedentaryReminderLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
-            // SedentaryReminderLabel->SetText("知道了");
+            #ifdef FD230
             SedentaryReminderLabel->SetTextId(STR_KONW);
+            #else
+            SedentaryReminderLabel->SetText("知道了");
+            #endif
             SedentaryReminderLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
             SedentaryReminderLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
             SedentaryReminderLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
index 60969b2..e04b422 100755 (executable)
@@ -5,8 +5,8 @@
  * Create: 2021-11-11
  */
 
-#include "msg_center.h"
 #include <stdio.h>
+#include "msg_center.h"
 #include "adapter.h"
 #include "msg_center_protocol.h"
 #include "msg_center_cmd.h"
@@ -17,7 +17,9 @@
 #endif
 #include "common_def.h"
 #include "player_sample_wrapper.h"
-#include "cmsis_os2.h"
+#include "baidumap_msg_center.h"
+#include "baidumap.h"
+#include "soc_osal.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -29,7 +31,7 @@ extern "C" {
 #define TASK_PRIORITY_PCM_STREAM    (osPriority_t)(40)
 #define PCM_STREAM_MSG_STACK_SIZE   0xC00
 
-osMessageQueueId_t g_pcm_stream_msg_queue_id = NULL;
+osMessageQueueId_t g_pcm_stream_msg_queue_id = nullptr;
 
 errcode_t msg_center_navigation_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
 {
@@ -37,7 +39,7 @@ errcode_t msg_center_navigation_start(uint8_t cmd_id, uint8_t type, void *usr_da
     uint8_t ack = 1; /* 与手机APK侧约定 */
 
     char *bundleName = msg_center_get_bundle_name(cmd_id);
-    if (bundleName == NULL) {
+    if (bundleName == nullptr) {
         return ERRCODE_FAIL;
     }
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "bundle name = %s\r\n", bundleName);
@@ -77,18 +79,17 @@ errcode_t msg_center_navigation_recv(uint8_t cmd_id, uint8_t type, void *usr_dat
     }
 
     char *data = (char *)malloc(payload_len + 1);
-    if (data == NULL) {
+    if (data == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "msg_center_navigation_recv: malloc failed.\r\n");
         return ERRCODE_FAIL;
     }
 
-    memcpy(data, tlv_payload, payload_len);
+    (void)memcpy_s(data, payload_len, tlv_payload, payload_len);
     data[payload_len] = '\0';
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv navigate info--> %s\r\n", tlv_payload);
     DmsLiteSendMsgToJS(data);
-    data = NULL;
     free(data);
-
+    data = nullptr;
     return ERRCODE_SUCC;
 }
 
@@ -97,7 +98,7 @@ static errcode_t pcm_stream_task_init(void)
     osMessageQueueAttr_t m_attr = {0};
     m_attr.name = "PCM_STREAM_MSG";
     g_pcm_stream_msg_queue_id = osMessageQueueNew(PCM_STREAM_MSG_QUEUE_LEN, sizeof(pcm_stream_queue_msg), &m_attr);
-    if (g_pcm_stream_msg_queue_id == 0) {
+    if (g_pcm_stream_msg_queue_id == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "create msg queue fail\r\n");
         return ERRCODE_FAIL;
     }
@@ -132,7 +133,7 @@ static errcode_t pcm_stream_task_body(void *data)
     }
 
     for (;;) {
-        osStatus_t ret = osMessageQueueGet(g_pcm_stream_msg_queue_id, &msg, NULL, osWaitForever);
+        osStatus_t ret = osMessageQueueGet(g_pcm_stream_msg_queue_id, &msg, nullptr, osWaitForever);
         if (ret != osOK) {
             continue;
         }
@@ -145,7 +146,8 @@ static errcode_t pcm_stream_task_body(void *data)
                 return ERRCODE_FAIL;
             }
         } else if (msg.msg_id == MSGCENTER_TYPE_ID_XIAODU_END_RECORD) {
-            res = msg_center_xiaodu_send_end_record(MSGCENTER_CMD_XIAODU, MSGCENTER_TYPE_ID_XIAODU_END_RECORD, NULL, 0);
+            res = msg_center_xiaodu_send_end_record(MSGCENTER_CMD_XIAODU, MSGCENTER_TYPE_ID_XIAODU_END_RECORD, msg.data,
+                msg.len);
             if (res != ERRCODE_SUCC) {
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "send pcm stream failed");
                 return ERRCODE_FAIL;
@@ -157,6 +159,11 @@ static errcode_t pcm_stream_task_body(void *data)
     return ERRCODE_SUCC;
 }
 
+osMessageQueueId_t GetPcmMsgQueueId(void)
+{
+    return g_pcm_stream_msg_queue_id;
+}
+
 errcode_t pcm_stream_create_task(void)
 {
     errcode_t ret = ERRCODE_SUCC;
@@ -166,8 +173,9 @@ errcode_t pcm_stream_create_task(void)
         return ERRCODE_FAIL;
     }
 
-    osThreadAttr_t attr = {"pcm_stream", 0, NULL, 0, NULL, PCM_STREAM_MSG_STACK_SIZE, TASK_PRIORITY_PCM_STREAM, 0, 0 };
-    if (osThreadNew((osThreadFunc_t)pcm_stream_task_body, NULL, &attr) == NULL) {
+    osThreadAttr_t attr = {"pcm_stream", 0, nullptr, 0, nullptr, PCM_STREAM_MSG_STACK_SIZE, TASK_PRIORITY_PCM_STREAM, 0,
+         0 };
+    if (osThreadNew((osThreadFunc_t)pcm_stream_task_body, nullptr, &attr) == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "create pcm_stream task fail!\r\n");
         return ERRCODE_FAIL;
     }
@@ -183,7 +191,7 @@ errcode_t msg_center_xiaodu_start(uint8_t cmd_id, uint8_t type, void *usr_data,
     errcode_t ret = ERRCODE_SUCC;
 
     char *bundleName = msg_center_get_bundle_name(cmd_id);
-    if (bundleName == NULL) {
+    if (bundleName == nullptr) {
         return ERRCODE_FAIL;
     }
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "bundle name = %s\r\n", bundleName);
@@ -223,18 +231,17 @@ errcode_t msg_center_xiaodu_recv_xiaodu_info(uint8_t cmd_id, uint8_t type, void
     }
 
     char *data = (char *)malloc(payload_len + 1);
-    if (data == NULL) {
+    if (data == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "msg_center_xiaodu_recv_xiaodu_info: malloc failed.\r\n");
         return ERRCODE_FAIL;
     }
 
-    memcpy(data, tlv_payload, payload_len);
+    (void)memcpy_s(data, payload_len, tlv_payload, payload_len);
     data[payload_len] = '\0';
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv xiaodu info--> %s\r\n", tlv_payload);
     DmsLiteSendMsgToJS(data);
-    data = NULL;
     free(data);
-
+    data = nullptr;
     return ERRCODE_SUCC;
 }
 
@@ -253,22 +260,22 @@ errcode_t msg_center_xiaodu_recv_wenxin_info(uint8_t cmd_id, uint8_t type, void
     }
 
     char *data = (char *)malloc(payload_len + 1);
-    if (data == NULL) {
+    if (data == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "msg_center_xiaodu_recv_wenxin_info: malloc failed.\r\n");
         return ERRCODE_FAIL;
     }
 
-    memcpy(data, tlv_payload, payload_len);
+    (void)memcpy_s(data, payload_len, tlv_payload, payload_len);
     data[payload_len] = '\0';
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv wenxin info--> %s\r\n", tlv_payload);
     DmsLiteSendMsgToJS(data);
-    data = NULL;
     free(data);
-
+    data = nullptr;
     return ERRCODE_SUCC;
 }
 
-static int32_t convert_para_to_player_para(const uint8_t *inParam, uint16_t paramLen, int32_t *outArgc, uint8_t **outArgv)
+static int32_t convert_para_to_player_para(const uint8_t *inParam, uint16_t paramLen, int32_t *outArgc,
+    uint8_t **outArgv)
 {
     int ret;
     char *pos;
@@ -276,47 +283,47 @@ static int32_t convert_para_to_player_para(const uint8_t *inParam, uint16_t para
     uint32_t paramCnt = 0;
 
     strTemp = (uint8_t*)osal_kmalloc(paramLen, OSAL_GFP_KERNEL);
-    if (strTemp == NULL) {
-        WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} malloc failed.\r\n", __FUNCTION__, __LINE__);
+    if (strTemp == nullptr) {
+        WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} malloc failed.\r\n", __FUNCTION__, __LINE__);
         return ERRCODE_FAIL;
     }
 
     ret = memset_s(strTemp, paramLen, 0, paramLen);
     if (ret != EOK) {
-        WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} memset_s failed.\r\n", __FUNCTION__, __LINE__);
+        WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} memset_s failed.\r\n", __FUNCTION__, __LINE__);
         osal_kfree(strTemp);
         return ERRCODE_FAIL;
     }
 
     ret = memcpy_s(strTemp, paramLen, inParam, paramLen);
     if (ret != EOK) {
-        WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} memcpy_s failed.\r\n", __FUNCTION__, __LINE__);
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} memcpy_s failed.\r\n", __FUNCTION__, __LINE__);
         osal_kfree(strTemp);
         return ERRCODE_FAIL;
     }
 
     pos = strtok((char*)strTemp, ",");
-    for (uint32_t i = 0; pos != NULL; i++) {
+    for (uint32_t i = 0; pos != nullptr; i++) {
         outArgv[i] = (uint8_t*)osal_kmalloc(strlen(pos) + 1, OSAL_GFP_KERNEL);
-        if (outArgv[i] == NULL) {
-            WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} malloc failed.\r\n", __FUNCTION__, __LINE__);
+        if (outArgv[i] == nullptr) {
+            WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} malloc failed.\r\n", __FUNCTION__, __LINE__);
             osal_kfree(strTemp);
             return ERRCODE_FAIL;
         }
         ret = memcpy_s(outArgv[i], strlen(pos) + 1, pos, strlen(pos) + 1);
         if (ret != EOK) {
-            WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} memcpy_s failed.\r\n", __FUNCTION__, __LINE__);
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} memcpy_s failed.\r\n", __FUNCTION__, __LINE__);
             osal_kfree(strTemp);
             return ERRCODE_FAIL;
         }
         paramCnt++;
         if (*outArgc >= TTS_MEDIA_MAX_PARAM_CNT) {
-            WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER,"{%s():%d} invalid argc: %d(max: 64).\r\n",
+            WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} invalid argc: %d(max: 64).\r\n",
                 __FUNCTION__, __LINE__, *outArgc);
             osal_kfree(strTemp);
             return ERRCODE_FAIL;
         }
-        pos = strtok(NULL, ",");
+        pos = strtok(nullptr, ",");
     }
 
     *outArgc = paramCnt;
@@ -345,9 +352,9 @@ static void msg_center_tts_player_start(const uint8_t *data, uint32_t dataLen)
 
 FREE:
     for (int32_t i = 0; i < argc; i++) {
-        if (argv[i] != NULL) {
+        if (argv[i] != nullptr) {
             osal_kfree(argv[i]);
-            argv[i]  = NULL;
+            argv[i]  = nullptr;
         }
     }
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "{%s():%d} func out %s.\r\n", __FUNCTION__, __LINE__,
@@ -371,17 +378,17 @@ errcode_t msg_center_xiaodu_recv_tts(uint8_t cmd_id, uint8_t type, void *usr_dat
 
     /* 播放tts语音 */
     char *tts_file = (char *)malloc(payload_len + 1);
-    if (tts_file == NULL) {
+    if (tts_file == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "msg_center_xiaodu_recv_tts: malloc failed.\r\n");
         return ERRCODE_FAIL;
     }
 
-    memcpy(tts_file, tlv_payload, payload_len);
+    (void)memcpy_s(tts_file, payload_len, tlv_payload, payload_len);
     tts_file[payload_len] = '\0';
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv_tts file: %s\r\n", tts_file);
 
     char buffer[TTS_AUDIO_PARA_LEN] = {0};
-    sprintf_s(buffer, TTS_AUDIO_PARA_LEN, "%s,%s,%d,%d", "xx", tts_file, 1, 0);
+    (void)sprintf_s(buffer, TTS_AUDIO_PARA_LEN, "%s,%s,%d,%d", "xx", tts_file, 1, 0);
     msg_center_tts_player_start((const uint8_t *)buffer, strlen(buffer));
 
     /* 播放完成后需删除文件 */
@@ -420,18 +427,51 @@ errcode_t msg_center_xiaodu_send_pcm_stream(uint8_t cmd_id, uint8_t type, void *
 errcode_t msg_center_xiaodu_send_end_record(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
 {
     errcode_t ret = ERRCODE_SUCC;
-    uint8_t end_record_flag = 0;
 
-    ret = msg_center_send_data(cmd_id, type, &end_record_flag, sizeof(end_record_flag));
+    ret = msg_center_send_data(cmd_id, type, usr_data, usr_len);
     if (ret != ERRCODE_SUCC) {
         return ERRCODE_FAIL;
     }
 
-    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "send pcm stream end.\r\n");
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "send pcm stream end, usr_data = %d, usr_len = %d\r\n",
+                  *(uint8_t *)usr_data, usr_len); /* usr_data参考协议msg_center_pcm_end_flag_t */
     pcm_stream_del_queue();
     return ERRCODE_SUCC;
 }
 
+static void msg_center_transfer_longbuf(char *data, uint8_t type)
+{
+    FILE *fp = nullptr;
+
+    fp = fopen(data, "rb");
+    if (fp == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "%s: open %s fail.\r\n", vector_navi_get_str(type), data);
+        return;
+    }
+
+    fseek(fp, 0L, SEEK_END);
+    long file_len = ftell(fp);
+    char *file_content = (char *)malloc(sizeof(char) * (file_len + 1));
+    if (file_content == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "%s: malloc fail, file_len = %d.\r\n", vector_navi_get_str(type), file_len);
+        return;
+    }
+
+    fseek(fp, 0L, SEEK_SET);
+    if (fread(file_content, file_len, 1, fp) != 1) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "%s: fread fail, file_len = %d.\r\n", vector_navi_get_str(type), file_len);
+        return;
+    }
+    fclose(fp);
+    file_content[file_len] = '\0';
+
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "file_len = %d.\r\n", file_len);
+    /* send to JSI */
+    BaidumapSendMsgToJS(file_content, type);
+    free(file_content);
+    file_content = nullptr;
+}
+
 errcode_t msg_center_vector_navi_pull_up(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
 {
     unused(usr_data);
@@ -439,7 +479,7 @@ errcode_t msg_center_vector_navi_pull_up(uint8_t cmd_id, uint8_t type, void *usr
     errcode_t ret = ERRCODE_SUCC;
 
     char *bundleName = msg_center_get_bundle_name(cmd_id);
-    if (bundleName == NULL) {
+    if (bundleName == nullptr) {
         return ERRCODE_FAIL;
     }
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "bundle name = %s\r\n", bundleName);
@@ -467,43 +507,12 @@ errcode_t msg_center_vector_navi_pull_up(uint8_t cmd_id, uint8_t type, void *usr
 
 errcode_t msg_center_vector_navi_recv_svg(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
 {
-#if 0
-    /* 单包合并方案,效率低且file_name不好控制 */
-    FILE *fw = NULL;
-
-    if (access(BAIDU_NAVI_BASE_DIR, F_OK) != 0) {
-        if (mkdir(BAIDU_NAVI_BASE_DIR, S_IREAD | S_IWRITE) != 0) {
-             WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "mkdir /user/baidu_navi/ fail.\r\n");
-            return ERRCODE_FAIL;
-        }
-    }
-
-    char svg_file_path[BAIDU_NAVI_MAX_FILE_LEN] = { 0 };
-    if (sprintf_s(svg_file_path, sizeof(svg_file_path), "%s%s", BAIDU_NAVI_BASE_DIR, svg_file_path) < 0) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "svg_file_path is valid.\r\n");
-        return ERRCODE_FAIL;
-    }
-
-    fw = fopen(svg_file_path, "wb");
-    if (!fw) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "open svg_file_path fail.\r\n");
-        return ERRCODE_FAIL;
-    }
-
-    if (fwrite(usr_data, usr_len, 1, fw) != 1) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "write svg_file fail.\r\n");
-        return ERRCODE_FAIL;
-    }
-    fclose(fw);
-
-    return ERRCODE_SUCC;
-#endif
-    /* 采用数传方案,svg上传板侧后通知msg_center文件名 */
     uint8_t tl_len = msg_center_get_tlv_tl_len(usr_data);
     uint16_t payload_len = usr_len - tl_len;
     uint8_t *tlv_payload = (uint8_t *)msg_center_get_tlv_payload(usr_data);
     uint8_t ack = 1;
     errcode_t ret = ERRCODE_SUCC;
+    uint8_t res;
 
     /* ack */
     ret = msg_center_send_data(cmd_id, type, &ack, sizeof(ack));
@@ -511,17 +520,38 @@ errcode_t msg_center_vector_navi_recv_svg(uint8_t cmd_id, uint8_t type, void *us
         return ERRCODE_FAIL;
     }
 
-    /* svg_file_name */
-    char *svg_file = (char *)malloc(payload_len + 1);
-    if (svg_file == NULL) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "recv_svg: malloc failed.\r\n");
+    /* svg json */
+    char *svg_json = (char *)malloc(payload_len + 1);
+    if (svg_json == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "rec_svg_json: malloc failed.\r\n");
         return ERRCODE_FAIL;
     }
 
-    memcpy(svg_file, tlv_payload, payload_len);
-    svg_file[payload_len] = '\0';
-    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv_svg file: %s\r\n", svg_file);
-    /* send svg_file to baiduSDK */
+    (void)memcpy_s(svg_json, payload_len, tlv_payload, payload_len);
+    svg_json[payload_len] = '\0';
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_MSG_CENTER, "rec_svg_json file: %s\r\n", svg_json);
+
+#if defined(SUPPORT_POWER_MANAGER)
+    const power_display_svr_api_t *display_api = power_display_svr_get_api();
+    if (display_api->get_screen_state() != SCREEN_ON) {
+        display_api->turn_on_screen();
+    }
+    display_api->set_screen_set_keepon_timeout(600000); // 600000ms
+#endif
+
+    /* send svg_json to baiduSDK */
+    struct Content content = {
+        .x = 0,
+        .y = 0,
+        .z = 0,
+        .data = NULL,
+        .json = svg_json
+    };
+
+    DuerMapInfo(cmd_id, type, &content);
+
+    free(svg_json);
+    svg_json = NULL;
 
     return ERRCODE_SUCC;
 }
@@ -533,6 +563,8 @@ errcode_t msg_center_vector_navi_req_svg(uint8_t cmd_id, uint8_t type, void *usr
     if (ret != ERRCODE_SUCC) {
         return ERRCODE_FAIL;
     }
+
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_MSG_CENTER, "usr_data = %s\r\n", usr_data);
     return ERRCODE_SUCC;
 }
 
@@ -565,20 +597,18 @@ errcode_t msg_center_vector_navi_recv_dst_list(uint8_t cmd_id, uint8_t type, voi
     uint8_t ack = 1;
     errcode_t ret = ERRCODE_SUCC;
 
-    /* send to baiduSDK */
     char *data = (char *)malloc(payload_len + 1);
-    if (data == NULL) {
+    if (data == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "recv dst list: malloc failed.\r\n");
         return ERRCODE_FAIL;
     }
 
-    memcpy(data, tlv_payload, payload_len);
+    (void)memcpy_s(data, payload_len, tlv_payload, payload_len);
     data[payload_len] = '\0';
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv vector navi info--> %s\r\n", tlv_payload);
-    // DmsLiteSendMsgToJS(data);
-    data = NULL;
+    /* send to baiduSDK */
     free(data);
-
+    data = nullptr;
     return ERRCODE_SUCC;
 }
 
@@ -603,18 +633,17 @@ errcode_t msg_center_vector_navi_recv_navi_info(uint8_t cmd_id, uint8_t type, vo
 
     /* send to BaiduSDK */
     char *data = (char *)malloc(payload_len + 1);
-    if (data == NULL) {
+    if (data == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "recv dst list: malloc failed.\r\n");
         return ERRCODE_FAIL;
     }
 
-    memcpy(data, tlv_payload, payload_len);
+    (void)memcpy_s(data, payload_len, tlv_payload, payload_len);
     data[payload_len] = '\0';
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv vector navi info--> %s\r\n", tlv_payload);
-    // DmsLiteSendMsgToJS(data);
-    data = NULL;
+    /* send data to js */
     free(data);
-
+    data = nullptr;
     return ERRCODE_SUCC;
 }
 
@@ -638,8 +667,11 @@ errcode_t msg_center_vector_navi_req_poi(uint8_t cmd_id, uint8_t type, void *usr
     errcode_t ret = ERRCODE_SUCC;
     ret = msg_center_send_data(cmd_id, type, usr_data, usr_len);
     if (ret != ERRCODE_SUCC) {
+        BaidumapFailSendMsgToJS("send data fail", type + 1); // JSI提供的fail回调只挂接了rec,因此req流程中加一
         return ERRCODE_FAIL;
     }
+
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "req poi ok.\r\n");
     return ERRCODE_SUCC;
 }
 
@@ -651,19 +683,26 @@ errcode_t msg_center_vector_navi_recv_poi(uint8_t cmd_id, uint8_t type, void *us
     uint8_t ack = 1;
     errcode_t ret = ERRCODE_SUCC;
 
-    /* send to baiduSDK */
+    /* ack */
+    ret = msg_center_send_data(cmd_id, type, &ack, sizeof(ack));
+    if (ret != ERRCODE_SUCC) {
+        return ERRCODE_FAIL;
+    }
+
     char *data = (char *)malloc(payload_len + 1);
-    if (data == NULL) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "recv dst list: malloc failed.\r\n");
+    if (data == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "recv poi: malloc failed.\r\n");
+        BaidumapFailSendMsgToJS("rec malloc fail", type);
         return ERRCODE_FAIL;
     }
 
-    memcpy(data, tlv_payload, payload_len);
+    (void)memcpy_s(data, payload_len, tlv_payload, payload_len);
     data[payload_len] = '\0';
-    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv vector navi info--> %s\r\n", tlv_payload);
-    // DmsLiteSendMsgToJS(data);
-    data = NULL;
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "recv poi info -- > %s, usr_len = %d\r\n", tlv_payload, usr_len);
+
+    msg_center_transfer_longbuf(data, type);
     free(data);
+    data = nullptr;
 
     return ERRCODE_SUCC;
 }
@@ -693,6 +732,358 @@ errcode_t msg_center_vector_navi_finish_from_phone(uint8_t cmd_id, uint8_t type,
     return ERRCODE_SUCC;
 }
 
+static errcode_t msg_center_vector_navi_req_common_proc(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    errcode_t ret = ERRCODE_SUCC;
+    ret = msg_center_send_data(cmd_id, type, usr_data, usr_len);
+    if (ret != ERRCODE_SUCC) {
+        BaidumapFailSendMsgToJS("send data fail", type + 1);
+        return ERRCODE_FAIL;
+    }
+
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "%s, usr_data = %s, usr_len = %d\r\n", vector_navi_get_str(type),
+                  usr_data == NULL ? NULL : usr_data, usr_len);
+    return ERRCODE_SUCC;
+}
+
+static bool is_vector_navi_longbuf(uint8_t type)
+{
+    if (type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_POI_SUG_SEARCH ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REGEOCODE_SEARCH ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_RIDING_SEARCH ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_WALKING_SEARCH ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_TRANSIT_SEARCH ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REMAIN_ROUTE_UPDATE ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_RE_ROUTE_COMPLETE) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+static bool has_two_callback(uint8_t type)
+{
+    if (type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_GEOCODE_SEARCH ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_REGEOCODE_SEARCH ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_RECV_POI ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_RIDING_SEARCH ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_WALKING_SEARCH ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_ROUTE_TRANSIT_SEARCH ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_AUTH_LICENSE ||
+        type == MSGCENTER_TYPE_ID_VECTOR_NAVI_REC_NAVI_INIT) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+static errcode_t msg_center_vector_navi_rec_common_proc(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    uint8_t tl_len = msg_center_get_tlv_tl_len(usr_data);
+    uint16_t payload_len = usr_len - tl_len;
+    uint8_t *tlv_payload = (uint8_t *)msg_center_get_tlv_payload(usr_data);
+    errcode_t ret = ERRCODE_SUCC;
+    uint8_t ack = 1;
+
+    /* ack */
+    ret = msg_center_send_data(cmd_id, type, &ack, sizeof(ack));
+    if (ret != ERRCODE_SUCC) {
+        return ERRCODE_FAIL;
+    }
+
+    #if defined(SUPPORT_POWER_MANAGER)
+        const power_display_svr_api_t *display_api = power_display_svr_get_api();
+        if (display_api->get_screen_state() != SCREEN_ON) {
+            display_api->turn_on_screen();
+        }
+        display_api->set_screen_set_keepon_timeout(600000); // 600000ms
+    #endif
+
+    char *data = (char *)malloc(payload_len + 1);
+    if (data == nullptr) {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "%s: malloc failed.\r\n", vector_navi_get_str(type));
+        BaidumapFailSendMsgToJS("rec malloc fail", type);
+        return ERRCODE_FAIL;
+    }
+
+    (void)memcpy_s(data, payload_len, tlv_payload, payload_len);
+    data[payload_len] = '\0';
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "%s -- > %s\r\n", vector_navi_get_str(type), tlv_payload);
+
+    if (is_vector_navi_longbuf(type) && payload_len != 1) {
+        msg_center_transfer_longbuf(data, type);
+    } else if (has_two_callback(type) && payload_len == 1) {
+        if (strcmp(data, "1") == 0) {
+            BaidumapSendMsgToJS(data, type);
+        } else if ((strcmp(data, "0") == 0)) {
+            BaidumapFailSendMsgToJS(data, type);
+        } else {
+            WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "%s, app should trans 0 or 1\r\n", vector_navi_get_str(type));
+        }
+    } else {
+        BaidumapSendMsgToJS(data, type);
+    }
+    free(data);
+    data = nullptr;
+
+    return ERRCODE_SUCC;
+}
+
+errcode_t msg_center_vector_navi_req_auth_license(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_auth_license(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_geo_location(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_geo_location(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_navi_init(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_navi_init(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_route_plan_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_route_plan_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_route_plan_succ(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_route_plan_succ(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_route_plan_fail(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_route_plan_fail(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_navi_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_navi_start(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_navi_destroy(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_navi_destroy(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_road_guide_text_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_road_guide_text_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_road_guide_icon_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_road_guide_icon_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_remain_time_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_remain_time_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_remain_distance_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_remain_distance_update(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                            uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_remain_route_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_remain_route_update(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_gps_status_change(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_gps_status_change(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_route_faraway(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_route_faraway(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_route_plan_yawing(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_route_plan_yawing(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_re_route_complete(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_re_route_complete(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_arrive_destination(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_arrive_destination(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vertor_navi_req_poi_sug_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vertor_navi_rec_poi_sug_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_route_riding_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_route_riding_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_route_walking_search(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                          uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_route_walking_search(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                          uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_route_transit_search(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                          uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_route_transit_search(uint8_t cmd_id, uint8_t type, void *usr_data,
+                                                          uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_geocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_geocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_regeocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_rec_regeocode_search(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_rec_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
+errcode_t msg_center_vector_navi_req_destroy_page(uint8_t cmd_id, uint8_t type, void *usr_data, uint16_t usr_len)
+{
+    return msg_center_vector_navi_req_common_proc(cmd_id, type, usr_data, usr_len);
+}
+
 #ifdef __cplusplus
 }
-#endif
\ No newline at end of file
+#endif
index efc7e49..7ac6713 100755 (executable)
 #include "stdint.h"
 #include "stdbool.h"
 #include "errcode.h"
+#if !defined(SW_UART_DEBUG) && !defined(SW_RTT_DEBUG)
+#include "soc_diag_util.h"
+#include "log_oam_logger.h"
+#include "log_def.h"
+#else
 #include "debug_print.h"
+#endif
 
 #ifdef __cplusplus
 #if __cplusplus
@@ -34,11 +40,15 @@ extern "C" {
 /* * 获取对应动作的掩码 */
 #define GET_ACTION_MASK(action) (1 << ((uint32_t)(action)))
 
-#ifdef DISPLAY_HSO_DEBUG_LOG
-#define POWER_DISPLAY_PRINT_ERR(log_num, fmt, args...) uapi_diag_error_log(0, fmt, ##arg)
-#define POWER_DISPLAY_PRINT_WARN(log_num, fmt, args...) uapi_diag_warning_log(0, fmt, ##arg)
-#define POWER_DISPLAY_PRINT_INFO(log_num, fmt, args...) uapi_diag_info_log(0, fmt, ##arg)
-#define POWER_DISPLAY_PRINT_DEBUG(log_num, fmt, args...)
+#if !defined(SW_UART_DEBUG) && !defined(SW_RTT_DEBUG)
+#define POWER_DISPLAY_PRINT_ERR(log_num, fmt, arg...) uapi_diag_error_log(0, fmt, ##arg)
+#define POWER_DISPLAY_PRINT_WARN(log_num, fmt, arg...) uapi_diag_warning_log(0, fmt, ##arg)
+#define POWER_DISPLAY_PRINT_INFO(log_num, fmt, arg...) uapi_diag_info_log(0, fmt, ##arg)
+#ifdef WEARABLE_LOG_DEBUG
+#define POWER_DISPLAY_PRINT_DEBUG(log_num, fmt, arg...) uapi_diag_debug_log(0, fmt, ##arg)
+#else
+#define POWER_DISPLAY_PRINT_DEBUG(log_num, fmt, arg...)
+#endif
 #else
 #define POWER_DISPLAY_PRINT_ERR(log_num, fmt, arg...) PRINT("[POWER_MANAGER E/] %s: " fmt "\r\n", __FUNCTION__, ##arg)
 #define POWER_DISPLAY_PRINT_WARN(log_num, fmt, arg...) PRINT("[POWER_MANAGER W/] %s: " fmt "\r\n", __FUNCTION__, ##arg)
@@ -199,34 +209,6 @@ typedef enum timer_event_type {
 
 } timer_event_type_t;
 
-/**
- * @brief Touch Panel事件类型枚举值
- *
- * TP数据上报时需要同时标识当前TP事件类型,比如按下、释放
- * 在standby mode上报的TP事件只包含当前事件的类型
- *
- */
-typedef enum touch_event_type {
-    /* * 手指触摸 */
-    TP_PRESS = 0,
-    /* * 手指抬起 */
-    TP_RELEASE = 1,
-    /* * 手指触摸后滑动 */
-    TP_MOVE = 2,
-    /* * 主表盘盖屏 */
-    TP_COVER = 3,
-    /* * 手指单击 */
-    TP_SHORT_CLICK = 4,
-    /* * 手指双击 */
-    TP_DOUBLE_CLICK = 5,
-    /* * 上滑 */
-    TP_SLIDE_UP = 6,
-    /* * 下滑 */
-    TP_SLIDE_DOWN = 7,
-    /* * 异常TP事件 */
-    TP_INVALID,
-} touch_event_type_t;
-
 /**
  * @brief 屏幕管理上下文,记录关键配置信息,传递给过滤器使用
  */
@@ -418,7 +400,6 @@ errcode_t power_display_task_init(void);
  */
 screen_context_t *power_display_get_screen_context(void);
 
-
 #ifdef __cplusplus
 #if __cplusplus
 }
index 85baf1a..2743266 100755 (executable)
@@ -93,7 +93,7 @@ static void caculate_screen_off_time()
     if (last_screen_off_timestamp == 0) {
         return;
     }
-    screen_off_time = last_screen_on_timestamp - last_screen_off_timestamp; //???????????????????????????
+    screen_off_time = last_screen_on_timestamp - last_screen_off_timestamp; //灭屏时间间隔等于本次亮屏的时间点减去上次灭屏的时间点。
     screen_context_t *sc = power_display_get_screen_context();
     sc->screen_off_time_interval = screen_off_time;
 }
@@ -175,7 +175,7 @@ static void caculate_screen_on_time()
     if (last_screen_on_timestamp == 0) {
         return;
     }
-    screen_on_time = last_screen_off_timestamp - last_screen_on_timestamp; //???????????????????????????
+    screen_on_time = last_screen_off_timestamp - last_screen_on_timestamp; //亮屏时间间隔等于本次灭屏的时间点减去上次亮屏的时间点。
     screen_context_t *sc = power_display_get_screen_context();
     sc->screen_on_time_interval = screen_on_time;
 }
@@ -188,19 +188,20 @@ static uint32_t action_display_lcd_off()
     }
     last_screen_off_timestamp = get_display_timestamp();
     caculate_screen_on_time();
-#ifdef SUPPORT_AT_OHOSFWK
-    notify_screen_off_event();
-#endif
 #if defined(ENABLE_UIKIT) || defined(ENABLE_LVGL)
     NotifyScreenOff(); // Instruct the uikit to close the display operation.
 #endif
+
+#ifdef SUPPORT_AT_OHOSFWK
+    notify_screen_off_event();
+#endif
+
     osDelay(100);        // Wait 100ms for the uikit to complete display.
     touch_screen_suspend(); // close touch
     rotary_encoder_suspend();
     ext_errno ret = drv_vau_suspend(NULL);
     if (ret != 0) {
         POWER_DISPLAY_PRINT_ERR(0, "drv vau suspend error ret=%x\r\n", ret);
-        return ERRCODE_FAIL;
     }
 #ifdef SUPPORT_GPU_JPEG
     (void)drv_jpeg_suspend(NULL);
@@ -209,7 +210,6 @@ static uint32_t action_display_lcd_off()
     ret = drv_dpu_suspend(NULL);
     if (ret != 0) {
         POWER_DISPLAY_PRINT_ERR(0, "drv dpu suspend error ret=%x\r\n", ret);
-        return ERRCODE_FAIL;
     }
 #endif
 #ifdef SUPPORT_GPU_GMMU
index 5e5828d..aceb0a7 100755 (executable)
@@ -8,6 +8,7 @@
 #include "power_display_service.h"
 #include "display_filter.h"
 #include "common_def.h"
+#include "touch_screen_def.h"
 
 static input_action_t filter_gui_execute_product_rule(screen_context_t *current, uint32_t event)
 {
@@ -28,13 +29,13 @@ static input_action_t filter_gui_execute_touch_event(screen_context_t *current,
 {
     unused(type);
     input_action_t ac = KEEP_CURRENT_STATE;
-    if (event == TP_PRESS) {
+    if (event == MC_TP_PRESS) {
         current->press_state = true;
-    } else if (event == TP_RELEASE || event == TP_COVER) {
+    } else if (event == MC_TP_RELEASE || event == MC_TP_COVER) {
         current->press_state = false;
     }
 
-    if (event == TP_COVER) {
+    if (event == MC_TP_COVER) {
         ac = TURN_OFF_SCREEN;
     } else {
         ac = TURN_ON_SCREEN;
index a1909dc..de79404 100755 (executable)
@@ -19,8 +19,9 @@
 #include "input_app.h"
 #include "touch_screen_def.h"
 #include "display_state_machine.h"
+#include "touch_screen_def.h"
 
-#define DISPLAY_AUTO_POWER_OFF_PERIOD_MS (1000 * 5)  //5秒
+#define DISPLAY_AUTO_POWER_OFF_PERIOD_MS 5000
 #define DISPLAY_DEFAULT_BRIGHTNESS 50
 #define POWER_DISPLAY_QUEUE_MAX_SIZE 64
 #define POWER_DISPLAY_MAX_SIZE 0x10
@@ -131,9 +132,7 @@ static errcode_t power_display_set_auto_timeout_function(bool enable)
 
 static errcode_t power_display_set_keepon_timeout(uint32_t time)
 {
-    if (g_screen_context.keep_on_timeout != 0 && time != 0) 
-    // if (g_screen_context.keep_on_timeout != 0 ) 
-    {
+    if (g_screen_context.keep_on_timeout != 0 && time != 0) {
         POWER_DISPLAY_PRINT_ERR(0, "current has been set %u,need to wait for timeout or set 0 to cancel. \r\n",
             g_screen_context.keep_on_timeout);
         return ERRCODE_FAIL;
@@ -224,11 +223,11 @@ static void power_display_touch_event_cb(uint32_t event, uint32_t event_value)
     unused(event_value);
     message_type_t mt = GUI_EVENT_CMD;
     uint32_t event_info = TOUCH;
-    if (event == INDEV_STATE_PRESS) {
-        event_info += TP_PRESS;
+    if (event == MC_TP_PRESS || event == MC_TP_MOVE) {
+        event_info += MC_TP_PRESS;
         g_power_tp_press_num++;
-    } else if (event == INDEV_STATE_RELEASE) {
-        event_info += TP_RELEASE;
+    } else if (event == MC_TP_RELEASE) {
+        event_info += MC_TP_RELEASE;
         g_power_tp_press_num = 0;
     } else {
         return;
index 963d19f..800d1b6 100755 (executable)
 #define LCD_FILL_COLOR_ADDR   0x60280000\r
 #endif\r
 \r
-#define PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG 0x57000014\r
-#define PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL 0xb66\r
-#define PM_MCU_SEND_IPC_WKUP_BT_REG        0x52000034\r
-#define PM_MCU_SEND_IPC_WKUP_BT_VAL        0x2\r
-#define BT_RESET_DELAY  500\r
 #define POWER_KEY_PARAM_LEN                0x2\r
 #define CALENDAR_PARAM_LEN                 0x6\r
 #ifdef CFG_DRIVERS_MMC\r
@@ -416,10 +411,7 @@ uint32_t mcu_os_sys_reset(uint8_t *para, uint32_t para_len)
 \r
     send_spp_diag_msg(g_app_diag_flag, &g_mcu_diag_header, res, DIAG_RES_LEN);\r
     reset_deal_with_fs();\r
-    // when bt at sleep, need wkup bt before soft reset\r
-    writew(PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG, PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL);\r
-    writew(PM_MCU_SEND_IPC_WKUP_BT_REG, PM_MCU_SEND_IPC_WKUP_BT_VAL);\r
-    uapi_tcxo_delay_ms(BT_RESET_DELAY);\r
+\r
     set_cpu_utils_reset_cause(REBOOT_CAUSE_APPLICATION_SYSRESETREQ);\r
     hal_reboot_chip();\r
     return ERRCODE_SUCC;\r
@@ -466,8 +458,6 @@ uint32_t mcu_os_heap_info(uint8_t *para, uint32_t para_len)
     }\r
     wstp_print("\r\n");\r
 \r
-\r
-\r
 #endif\r
 #if defined __FREERTOS__ && defined FREERTOS_DEBUG\r
     freertos_heap_print();\r
@@ -1212,10 +1202,7 @@ uint32_t mcu_pm_into_force_ds_mode(uint8_t *para, uint32_t para_len)
 {\r
     unused(para);\r
     unused(para_len);\r
-    // when bt at sleep, need wkup bt before soft reset\r
-    writew(PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG, PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL);\r
-    writew(PM_MCU_SEND_IPC_WKUP_BT_REG, PM_MCU_SEND_IPC_WKUP_BT_VAL);\r
-    uapi_tcxo_delay_ms(BT_RESET_DELAY);\r
+\r
     set_cpu_utils_reset_cause(REBOOT_CAUSE_APPLICATION_SYSRESETREQ);\r
     writew(0x5702C010, 0x5A5A);\r
     hal_reboot_chip();\r
index 7fa4d21..7a36219 100755 (executable)
@@ -14,6 +14,7 @@
 #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
@@ -162,9 +163,9 @@ static uint32_t OhosfwkATCmdBmSet(uint8_t *para, uint32_t paraLen, char *strComm
 
     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!");
     }
index be9afc1..274de4b 100755 (executable)
@@ -644,9 +644,6 @@ void main(void)
     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);
index df69103..06298c8 100755 (executable)
@@ -79,9 +79,9 @@ uint32_t read_cell_array(qspi_data_type_def *qspi_data)
     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
@@ -111,9 +111,9 @@ uint32_t program_execute(qspi_data_type_def *qspi_data)
     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
@@ -137,9 +137,9 @@ uint32_t block_erase(qspi_data_type_def *qspi_data)
     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
index 32e4101..8c740c0 100755 (executable)
@@ -111,15 +111,15 @@ uint32_t mc_flash_read_page(uint32_t nand_page, uint8_t *data, uint32_t data_len
 {\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
@@ -139,7 +139,7 @@ uint32_t mc_flash_write_page(uint32_t nand_page, uint8_t *data, uint32_t data_le
 {\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
@@ -148,7 +148,7 @@ uint32_t mc_flash_write_page(uint32_t nand_page, uint8_t *data, uint32_t data_le
     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
@@ -168,9 +168,9 @@ uint32_t mc_flash_erase_block(uint32_t block_no)
     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
@@ -197,11 +197,11 @@ uint32_t mc_flash_mark_bad_block(uint32_t block_no)
     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
@@ -213,7 +213,7 @@ uint32_t mc_flash_check_bad_block(uint32_t block_no)
 {\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
@@ -225,7 +225,7 @@ uint32_t mc_flash_check_bad_block(uint32_t block_no)
     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
index 1baac32..e669413 100755 (executable)
@@ -76,8 +76,11 @@ void qspi_read_width_8(uint8_t *buffer, uint32_t length)
             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
@@ -100,8 +103,11 @@ void qspi_read_width_32(uint32_t *recvbuf, uint32_t length)
             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
index 8da417e..d494bbb 100755 (executable)
@@ -93,8 +93,10 @@ macro(build_library)
     else()
         if(DEFINED LIB)
         else()
-            message(STATUS "${SOURCES0} is not found, finding lib${COMPONENT_NAME}.a in ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_COMMAND}")
-            find_library(LINK_LIB_${COMPONENT_NAME} "lib${COMPONENT_NAME}.a" ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_COMMAND})
+            set(TARGET_COMMAND_TMP ${TARGET_COMMAND})
+            string(REPLACE "-user" "" TARGET_COMMAND_TMP ${TARGET_COMMAND_TMP})
+            message(STATUS "${SOURCES0} is not found, finding lib${COMPONENT_NAME}.a in ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_COMMAND_TMP}")
+            find_library(LINK_LIB_${COMPONENT_NAME} "lib${COMPONENT_NAME}.a" ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_COMMAND_TMP})
             if(NOT LINK_LIB_${COMPONENT_NAME})
                 message(FATAL_ERROR "${SOURCES0} is not found && lib${COMPONENT_NAME}.a not find")
             endif()
index 7f71211..bce4505 100755 (executable)
@@ -113,9 +113,8 @@ target = {
                     "-:TARGET_CHIP_BRANDY=1", "-:BRANDY_CHIP_V100=1", 'CFG_DRIVERS_NANDFLASH', 'CONFIG_ZDIAG_NV_SUPPORT',
                     'CONFIG_ZDIAG_AUDIO_PROC_SUPPORT', 'CONFIG_ZDIAG_AUDIO_DUMP_SUPPORT', 'CONFIG_ZDIAG_AUDIO_PROBE_SUPPORT', 'CONFIG_SEA_PHS_SUPPORT', 'CONFIG_DIAG_GPU_PROC_SUPPORT',
                     'SUPPORT_BLE', 'SUPPORT_BREDR', 'ENABLE_UIKIT', 'SUPPORT_GPU_JPEG', 'SUPPORT_GPU_GMMU', 'SUPPORT_GPU_OPENVG',
-                    'SW_UART_DEBUG', 'SAVE_EXC_INFO', 'HASH_MEM_COPY', 'JS_ENABLE', 
-                    'CONFIG_LOW_POWER_TEST',
-                    'ENABLE_ECC',
+                    'SW_UART_DEBUG', 'SAVE_EXC_INFO', 'HASH_MEM_COPY', 'JS_ENABLE', 'CONFIG_LOW_POWER_TEST',
+                    'ENABLE_ECC','MIPI_ULPS_SUPPORT','SUPPORT_ALIPAY_SEC',
                     'FT_SINGLE_UART',
                     'PPG_HX3695',
                     # 'ACC_LIS2DOC',
@@ -129,16 +128,15 @@ target = {
                     'SUPPORT_SPO2_NOTIFICATION',
                     'SUPPORT_SPO2_NOTIFICATION_TEST',
                     'SUPPORT_DEVICE_PAIRING_NOTIFICATION',
-                    'MIPI_ULPS_SUPPORT', 
                     'ENABLE_FONT_VECTOR_GLOBAL', 
                     'ENABLE_SHAPING',
                     'TPTYPE_FT6X46',
                     'SUPPORT_CHARGER_PLUG_DETECTION_NOTIFICATION',
                     'SUPPORT_AT_CUSTOMUTILS',
-                    'SUPPORT_ALIPAY_SEC',
                     'SUPPORT_BLE_SERVICE',
                     'FD230',
                     'CYWEE_SPORT',
+                    'SUPPORT_BAIDU_MAP',
                     'SUPPORT_HID_SERVICE',
                     'SUPPORT_TELECOM_DMP',
                     ],
@@ -147,15 +145,13 @@ target = {
                           'psram', 'hal_mipi', 'mipi_tx', 'non_os', 'touch',
                           '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',
+                          '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',
+                          'baidumapcomponent',
+                                                 'baidumapsdk',
                           'audio_at_service', 
                           'media_at_service', 
                           'bt_manager_at_service',
-                          "audio_proc", "audio_dump", "audio_probe", "power_manager", "gpu_proc", 'bts_header',
                           "ppg_sensor",
                           "ppgBleService",
                           "mag_sensor",
@@ -168,8 +164,9 @@ target = {
                           "CustomUIcomponentTool",
                           "custom_utils",
                           "custom_utilscpp",
+                          "custom_config",
                           "rotary_encoder",
-                          #"nativelauncher",
+                        #   "nativelauncher",
                            "fd230launcher",
                            "ppg_service",
                         #    "acc_sensor",
@@ -184,9 +181,15 @@ target = {
         'dsp_version': 'max',
         'packet': True,
         'image_analysis': False,
-         #'fs_image_path':'evb4',
-         'fs_image_path':'fd230',
+        #  'fs_image_path':'evb4',
+        'fs_image_path':'fd230',
         'fs_image': True
+    },
+       #native-js-user: liteos + uikit + nandflash + mipi + psram + audio  典型合封UIKIT版本
+    #离线日志版本
+    'brandy-native-js-user': {
+        'base_target_name': 'brandy-native-js',
+        'defines': ['-:SW_UART_DEBUG'],
     },
     #native-xts: liteos + uikit + nandflash + mipi + psram + audio  典型合封UIKIT版本
     'brandy-xts': {
@@ -205,6 +208,7 @@ target = {
                     'MAG_MMC5603',
                                        'ENABLE_FONT_VECTOR_GLOBAL', 
                     'ENABLE_SHAPING',
+                    'SUPPORT_BAIDU_MAP',
                     'TPTYPE_FT6X46'
                                        ],
         'ram_component': ["algorithm", "dfx_port_brandy", "dfx_update", 'dfx_nv', "osal", "arch_port", "-:testsuite",
@@ -214,6 +218,8 @@ target = {
                           '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',
+                                                 'baidumapcomponent',
+                                                 'baidumapsdk',
                                                  "ppg_sensor",
                           "acc_sensor",
                           "mag_sensor",
@@ -353,15 +359,12 @@ target = {
                     "SSB_USE_PLL", "VERSION_STANDARD", "BUILD_APPLICATION_SSB", "LIBBOOTLOADER", "LIBCODELOADER",
                     "LIBCPU_UTILS", "LIBAPP_VERSION", "LIBPANIC", "LIBCONNECTIVITY", "LIBERROR_CODE", "LIBSEC_RANDOM",
                     "LIBCODELOADER_SSB", "LIBJLINK_LOAD", "LIBLIB_UTILS", "LIBBUILD_VERSION",
-                   'ENABLE_ECC',
-                   "CFG_DRIVERS_NANDFLASH",
-                    "NO_TIMEOUT", "CONFIG_UART_BAUD_RATE_DIV_8", 'SW_UART_DEBUG', 'LARGE_BUFFER',
+                               "NO_TIMEOUT", "CONFIG_UART_BAUD_RATE_DIV_8", 'SW_UART_DEBUG', 'LARGE_BUFFER',
+                                       'ENABLE_ECC',"CFG_DRIVERS_NANDFLASH",
                     'FT_SINGLE_UART'
                     ],
         'ram_component': ['arch_port', 'hal_l2ram', 'sec_boot', 'libboundscheck',
-                          'dfx_exception', 'error_code', 'psram', 'osal', 'cmn_header', 
-                          'boot_ulp', 
-                          'boot_nandflash'
+                          'dfx_exception', 'error_code', 'psram', 'osal', 'cmn_header', 'boot_ulp', 'boot_nandflash'
                           ],
         'ram_component_set': ['pinctrl'],
         'target': 'ssb',
@@ -375,10 +378,11 @@ target_group = {
     'pack_brandy_target4': ['brandy-ssb', 'brandy-target4-r', 'brandy-target4'],
     'pack_brandy_target5': ['brandy-ssb', 'brandy-target5-r', 'brandy-target5'],
     'pack_brandy_native_js': ['brandy-ssb', 'brandy-native-js-r', 'brandy-native-js'],
+    'pack_brandy_native_js_user': ['brandy-ssb', 'brandy-native-js-r', 'brandy-native-js-user'],
     'pack_brandy_xts': ['brandy-ssb', 'brandy-xts-r', 'brandy-xts'],
 
     'brandy_all': ['brandy-ssb',
-                   'brandy-target1', 'brandy-target3', 'brandy-target4', 'brandy-target5', 'brandy-native-js', 'brandy-xts',
+                   'brandy-target1', 'brandy-target3', 'brandy-target4', 'brandy-target5', 'brandy-native-js', 'brandy-native-js-user', 'brandy-xts',
                    'brandy-target1-r', 'brandy-target3-r', 'brandy-target4-r', 'brandy-target5-r', 'brandy-native-js-r', 'brandy-xts-r',
                    'testsuite-brandy-sdk']
 }
@@ -1,10 +1,10 @@
-{
-    "OUT_BIN_DIR" : "output/brandy/nv_bin",
-    "OUT_BIN_NAME" : "brandy_all_nv.bin",
-    "BUILD_TEMP_PATH" : "output/brandy",
-
-    "NV_TARGET_JSON_PATH" : "middleware/chips/brandy/nv/nv_config/cfg/nv_target.json",
-    "NV_RELATIVE_PATH" : "output/brandy/nv_bin/temp",
-    "NV_DEFAULT_CFG_DIR" : "middleware/chips/brandy/nv/nv_config/cfg",
-    "DATABASE_TXT_FILE" : "output/brandy/nv_bin"
+{\r
+    "OUT_BIN_DIR" : "output/brandy/nv_bin",\r
+    "OUT_BIN_NAME" : "brandy_all_nv.bin",\r
+    "BUILD_TEMP_PATH" : "output/brandy",\r
+\r
+    "NV_TARGET_JSON_PATH" : "middleware/chips/brandy/nv/nv_config/cfg/nv_target.json",\r
+    "NV_RELATIVE_PATH" : "output/brandy/nv_bin/temp",\r
+    "NV_DEFAULT_CFG_DIR" : "middleware/chips/brandy/nv/nv_config/cfg/eng",\r
+    "DATABASE_TXT_FILE" : "output/brandy/nv_bin"\r
 }
\ No newline at end of file
diff --git a/code/sdk/build/config/target_config/brandy/nv_bin_cfg/mk_nv_bin_cfg_user.json b/code/sdk/build/config/target_config/brandy/nv_bin_cfg/mk_nv_bin_cfg_user.json
new file mode 100644 (file)
index 0000000..e42ffa6
--- /dev/null
@@ -0,0 +1,10 @@
+{\r
+    "OUT_BIN_DIR" : "output/brandy/nv_bin",\r
+    "OUT_BIN_NAME" : "brandy_all_nv.bin",\r
+    "BUILD_TEMP_PATH" : "output/brandy",\r
+\r
+    "NV_TARGET_JSON_PATH" : "middleware/chips/brandy/nv/nv_config/cfg/nv_target.json",\r
+    "NV_RELATIVE_PATH" : "output/brandy/nv_bin/temp",\r
+    "NV_DEFAULT_CFG_DIR" : "middleware/chips/brandy/nv/nv_config/cfg/user",\r
+    "DATABASE_TXT_FILE" : "output/brandy/nv_bin"\r
+}
\ No newline at end of file
index 98a0525..83bd831 100755 (executable)
@@ -17,7 +17,7 @@ target_template = {
         'hso_enable': False,
         'os': 'non-os',
         'CONFIG_WATCHDOG_USING_V100': 'y',
-        'defines': ["RISCV_70", "CONFIG_XIP_ENABLE_READ_OVERTIME", 'CONFIG_PINCTRL_SUPPORT_IE'],
+        'defines': ["RISCV_70", "CONFIG_XIP_ENABLE_READ_OVERTIME", 'CONFIG_PINCTRL_SUPPORT_IE', 'CONFIG_EFUSE_CLK_EN'],
         'std_libs': ['c', 'm', 'clang_rt.builtins-riscv32', 'gloss'],
         'defines_set': ['libsec_defines', 'chip_defines', 'version_defines'],
         'ram_component_set': ['cpu_trace', 'ipc', 'mem', 'boot_common_lib', 'gpio_v100', 'ssb_libs',
@@ -54,7 +54,7 @@ target_template = {
                     "CONFIG_NV_SUPPORT_SINGLE_CORE_SYSTEM", 'CONFIG_NV_FEATURE_SUPPORT', 'CONFIG_SPI_SUPPORT_LPC',
                     "RISCV_70", 'SUPPORT_DIAG_V2_PROTOCOL', 'CONFIG_PINCTRL_SUPPORT_IE',
                     "DUMP_MEM_SUPPORT", "DUMP_REG_SUPPORT", "SUPPORT_DFX_EXCEPTION", 'CONFIG_SPI_SUPPORT_DMA',
-                    'CONFIG_I2C_SUPPORT_DMA', 'CONFIG_I2C_SUPPORT_LPC'],
+                    'CONFIG_I2C_SUPPORT_DMA', 'CONFIG_I2C_SUPPORT_LPC', 'CONFIG_EFUSE_CLK_EN'],
         'defines_set': ['chip_defines', 'version_defines'],
         'ram_component': ['brandy_std_lds', 'liteos_207_1_0', 'partition', 'chip_brandy', 'driver_header', 'nand_flash',
                           'brandy_app_standard', 'board_brandy', 'brandy_clocks', 'pmu_brandy', 'hal_sectors',
@@ -92,7 +92,7 @@ target_template = {
                     "CONFIG_NV_SUPPORT_SINGLE_CORE_SYSTEM", 'CONFIG_NV_FEATURE_SUPPORT', 'CONFIG_SPI_SUPPORT_LPC',
                     "CONFIG_XIP_ENABLE_READ_OVERTIME", 'SUPPORT_DIAG_V2_PROTOCOL', 'CONFIG_PINCTRL_SUPPORT_IE',
                     "DUMP_MEM_SUPPORT", "DUMP_REG_SUPPORT", "SUPPORT_DFX_EXCEPTION", 'CONFIG_SPI_SUPPORT_DMA',
-                    'CONFIG_I2C_SUPPORT_DMA', 'FREERTOS_DEBUG', 'CONFIG_I2C_SUPPORT_LPC'],
+                    'CONFIG_I2C_SUPPORT_DMA', 'FREERTOS_DEBUG', 'CONFIG_I2C_SUPPORT_LPC', 'CONFIG_EFUSE_CLK_EN'],
         'defines_set': ['chip_defines', 'version_defines'],
         'ram_component': ['brandy_std_lds', 'chip_brandy', 'brandy_app_standard', 'driver_header',
                           'board_brandy', 'brandy_clocks', 'pmu_brandy', 'c', 'm', 'segger', 'posix', 'sec', 'freertos',
@@ -131,7 +131,8 @@ target_template = {
                     'CONFIG_PINCTRL_SUPPORT_IE', 'CONFIG_DFX_SUPPORT_SOC_LOG=0',
                     'CONFIG_I2C_SUPPORT_LPC', 'CONFIG_DFX_SUPPORT_TRANSMIT_FILE=0', 'CONFIG_DFX_SUPPORT_DIAG_BEAT_HEART=0',
                     'CONFIG_DFX_SUPPORT_DIAG_VRTTUAL_SHELL=0', 'CONFIG_DFX_SUPPORT_DIAG_CONNECT_BLE=0',
-                    'CONFIG_DFX_SUPPORT_OFFLINE_LOG_FILE=0', 'CONFIG_DFX_MEMORY_DEBUG=0', 'CONFIG_DFX_SUPPORT_DIAG_ADAPT_SOC_LOG=0'],
+                    'CONFIG_DFX_SUPPORT_OFFLINE_LOG_FILE=0', 'CONFIG_DFX_MEMORY_DEBUG=0', 'CONFIG_DFX_SUPPORT_DIAG_ADAPT_SOC_LOG=0',
+                    'CONFIG_EFUSE_CLK_EN'],
         'defines_set': ['chip_defines', 'version_defines'],
         'ram_component': ['brandy_recovery_lds', 'liteos_207_1_0', 'partition', 'chip_brandy', 'driver_header',
                           'brandy_app_recovery', 'board_brandy', 'brandy_clocks', 'pmu_brandy', 'partition_brandy',
@@ -170,7 +171,7 @@ target_template = {
                     'CONFIG_I2C_SUPPORT_LPC', 'CONFIG_DFX_SUPPORT_TRANSMIT_FILE=0', 'CONFIG_DFX_SUPPORT_SOC_LOG=0',
                     'CONFIG_DFX_SUPPORT_DIAG_BEAT_HEART=0', 'CONFIG_DFX_SUPPORT_DIAG_VRTTUAL_SHELL=0',
                     'CONFIG_DFX_SUPPORT_DIAG_CONNECT_BLE=0', 'CONFIG_DFX_SUPPORT_OFFLINE_LOG_FILE=0',
-                    'CONFIG_DFX_MEMORY_DEBUG=0', 'CONFIG_DFX_SUPPORT_DIAG_ADAPT_SOC_LOG=0'],
+                    'CONFIG_DFX_MEMORY_DEBUG=0', 'CONFIG_DFX_SUPPORT_DIAG_ADAPT_SOC_LOG=0', 'CONFIG_EFUSE_CLK_EN'],
         'defines_set': ['chip_defines', 'version_defines'],
         'ram_component': ['brandy_recovery_lds', 'partition', 'chip_brandy', 'freertos', 'cmsis_rtos', 'xlt_mem',
                           'brandy_app_recovery', 'board_brandy', 'brandy_clocks', 'pmu_brandy', 'partition_brandy',
@@ -210,7 +211,7 @@ target_template = {
                     "RISCV_70", "CONFIG_XIP_ENABLE_READ_OVERTIME", 'SUPPORT_DIAG_V2_PROTOCOL', 'CONFIG_SPI_SUPPORT_LPC',
                     "SUPPORT_GPU_JPEG", "SUPPORT_GPU_GMMU", "SUPPORT_GPU_OPENVG", 'CONFIG_PINCTRL_SUPPORT_IE',
                     'CONFIG_SPI_SUPPORT_DMA', 'CONFIG_I2C_SUPPORT_DMA', 'CONFIG_UART_SUPPORT_DMA',
-                    'CONFIG_I2C_SUPPORT_LPC'],
+                    'CONFIG_I2C_SUPPORT_LPC', 'CONFIG_EFUSE_CLK_EN'],
         'defines_set': ['chip_defines', 'version_defines'],
         'ram_component': ['brandy_std_lds', 'liteos_207_1_0', 'chip_brandy', 'driver_header', 'nand_flash',
                           'brandy_testsuite', 'board_brandy', 'brandy_clocks', 'pmu_brandy', 'hal_sectors',
index be29f06..5a65f6a 100755 (executable)
@@ -116,8 +116,8 @@ component_set = {
     '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', 'utils_kv_store', 'native_file'],
+    'ohos_set' : ['bootstrap', 'samgr', 'ams', 'bms', 'bms_sign_mode', 'ace', 'ace_adapt', 'permission', 'appverify', 'jerryscript','js_player', 'js_audio_captuer',  'i18n',
+                  'resmgr', 'syspara', 'utils_kv_store', 'native_file', 'storage_jsapi', 'brightness'],
     'wearable_set' : ['nativeabilityfwk', 'ai_voice_service', 'ai_voice_engine_hal', 'ai_voice_audio_stream_wrapper', 'ohos_deps',
                       'broadcast', 'msg_center', 'msg_center_adapt', 'ohos_startup'],
     'xts_set' : ["xts_adapt", "ohos_drv_v3.2",
index 33d994c..07d53b2 100755 (executable)
@@ -27,16 +27,28 @@ class CMakeBuilder(BuildEnvironment):
         self.sdk = None
         self.pack_tool = None
 
-    def get_build_cmd(self, env):
+    def get_component(self, env):
         com_config = CommonConfig(env.get('arch'))
-        ext_cmd = []
-        for component in self.component:
+        components = []
+        if env.get('just_build_components', False):
+            just_build_components = env.get('just_build_components', False)
+        else:
+            just_build_components = self.component
+        for component in just_build_components:
             if component in env.get('ram_component', False):
-                ext_cmd.append(component)
-            if component in env.get('ram_component_set', False):
-                for comm in com_config.get_component_set(component):
-                    if comm in env.get('ram_component', False):
-                        ext_cmd.append(comm)
+                components.append(component)
+                continue
+            if component not in env.get('ram_component_set', False):
+                continue
+            for comm in com_config.get_component_set(component):
+                if comm in env.get('ram_component', False):
+                    components.append(comm)
+        return components
+
+    def get_build_cmd(self, env):
+        ext_cmd = []
+        components = self.get_component(env)
+        ext_cmd.extend(components)
         if self.generator == 'Ninja':
             return ['ninja'] + ext_cmd + ['-j%d' % self.thread]
         else:
@@ -114,6 +126,10 @@ class CMakeBuilder(BuildEnvironment):
             return
 
         self.compile_target(target, env)
+
+        if env.get('just_build_components'):
+            return
+
         if env.get("fs_image"):
             fs_image_path = os.path.join(root_path, 'build', 'config', 'target_config', env.get('chip'),'mk_fs_image', env.get('fs_image_path'))
             fs_script_path = os.path.join(fs_image_path, 'mkyaffs2tool.py')
@@ -269,11 +285,17 @@ class CMakeBuilder(BuildEnvironment):
             _excute(self.cmake_cmd, log_file, self.dump)
             _excute(self.get_build_cmd(env), log_file, self.dump)
         else:
-            _excute(["cmake", "--build", output_path, '-j%d' % self.thread], log_file, self.dump)
-
-        if len(self.component) > 0:
-            print("######### Build target:%s, component:[%s] success" % (target_name, ' '.join(self.component)))
-            exit(0)
+            ext_cmd = []
+            components_target = self.get_component(env)
+            print(components_target)
+            if components_target:
+                ext_cmd = ['--target'] + components_target
+            _excute(["cmake", "--build", output_path, '-j%d' % self.thread] + ext_cmd, log_file, self.dump)
+
+        if len(self.get_component(env)) > 0:
+            os.chdir(org_work_path)
+            print("######### Build target:%s, component:[%s] success" % (target_name, ' '.join(self.get_component(env))))
+            return 0
 
         if env.is_enable_hso() and not nhso:
             cmd = self.get_build_cmd(env)
index db070c3..08b216d 100755 (executable)
@@ -881,7 +881,7 @@ class ParseCtrl():
         """
         if self.parse_debug_info_phase_0==True:
             return
-        with open(file,'r') as fp:
+        with open(file,'r',encoding='utf-8') as fp:
             lines=fp.readlines()
             self.parse_debug_info_lines(lines)
         self.parse_debug_info_phase_0=True
index 2fe9590..e4011f8 100755 (executable)
@@ -8,7 +8,9 @@ import sys
 import time
 
 from utils.build_utils import root_path, script_path, target_config_path, output_root
-from utils.build_utils import pkg_tools_path, jlink_tools_path, lzma_tools_path, sign_tools_path, memcheck_tools_path, factory_tools_path, derived_tools_path
+from utils.build_utils import pkg_tools_path, jlink_tools_path, lzma_tools_path, sign_tools_path
+from utils.build_utils import memcheck_tools_path, factory_tools_path, derived_tools_path
+from utils.build_utils import ohos_tools_path
 from utils.build_utils import CopyModule, exec_shell, cmp_file, rm_pyc, rm_all, fn_get_subdirs
 from enviroment import TargetEnvironment
 from sdk_generator.target_config_genarator import genarate_reserve_config
@@ -24,6 +26,7 @@ sdk_copy_common_files = [
     os.path.join(memcheck_tools_path),
     os.path.join(factory_tools_path, 'factory_tools'),
     os.path.join(derived_tools_path),
+    os.path.join(ohos_tools_path),
 ]
 
 sdk_close_components = [
index c43caca..2bed760 100755 (executable)
@@ -33,6 +33,7 @@ sign_tools_path = os.path.join(root_path, 'tools', 'bin', 'sign_tool')
 memcheck_tools_path = os.path.join(root_path, 'tools', 'bin', 'memcheck')
 factory_tools_path = os.path.join(root_path, 'tools', 'bin', 'factory_tools')
 derived_tools_path = os.path.join(root_path, 'tools', 'bin', 'derived_key_tool')
+ohos_tools_path = os.path.join(root_path, 'tools', 'bin', 'ohos_tools')
 
 """
 Colors defines. To highlight important output.
index d233e1b..69a5f10 100755 (executable)
@@ -238,6 +238,7 @@ SECTIONS
         *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*)
@@ -245,6 +246,10 @@ SECTIONS
         *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*)
index 5d8a7e8..70fd0c1 100755 (executable)
@@ -31,8 +31,8 @@
 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
index fed10f8..6e7185a 100755 (executable)
 #define OTP_DSP_OVERLAY_ROLLBACK_VERSION_BIT 32
 
 #define OTP_ATE_CRC                       255
+
+// reserved 256-383(128 bytes) for user
+#define OTP_APP_USER_START              256
+#define OTP_APP_USER_END                383
+
+
 /**
  * @}
  */
index d71f820..e2cd0bb 100755 (executable)
@@ -11,6 +11,7 @@
 #define EFUSE_PORTING_H
 
 #include <stdint.h>
+#include <stdbool.h>
 
 #ifdef __cplusplus
 #if __cplusplus
@@ -172,6 +173,20 @@ uint8_t efuse_port_get_en_switch(void);
  * @endif
  */
 errcode_t efuse_port_read_buffer_by_reload(uint8_t *buffer, uint32_t byte_number, uint16_t length);
+
+/**
+ * @if Eng
+ * @brief  Open or close efuse region clock gate.
+ * @param  [in] efuse_region the efuse region index.
+ * @param  [in] en open or close.
+ * @else
+ * @brief  打开efuse的时钟门控。
+ * @param  [in] efuse_region efuse 区域。
+ * @param  [in] en 打开或关闭时钟。
+ * @endif
+ */
+void efuse_port_set_clk_en(hal_efuse_region_t efuse_region, bool en);
+
 /**
  * @}
  */
index 396fca7..3d2aecf 100755 (executable)
@@ -41,6 +41,21 @@ extern "C" {
 #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.
index 808c948..a23c5e6 100755 (executable)
@@ -7,6 +7,7 @@
  * 2022-10-20, Create file. \n
  */
 #include "hal_efuse_v100.h"
+#include "chip_io.h"
 #include "efuse_porting.h"
 
 #define FUSE_CTL_RB_BASE            0x57028000
@@ -102,6 +103,21 @@ uint8_t efuse_port_get_en_switch(void)
     return get_efuse_en_switch_val();
 }
 
+void efuse_port_set_clk_en(hal_efuse_region_t efuse_region, bool en)
+{
+    unused(en);
+    switch (efuse_region) {
+        case HAL_EFUSE_REGION_1:
+            writew(0x52000210, 0xB);
+            break;
+        case HAL_EFUSE_REGION_2:
+            writew(0x52000210, 0xD);
+            break;
+        default:
+            break;
+    }
+}
+
 errcode_t efuse_port_read_buffer_by_reload(uint8_t *buffer, uint32_t byte_number, uint16_t length)
 {
     if ((length == 0) || (byte_number >= EFUSE_MAX_BYTES) ||
index e071e7d..27ce6ab 100755 (executable)
@@ -31,4 +31,41 @@ void systick_port_unregister_hal_funcs(void)
 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
index 8e1958e..890eba0 100755 (executable)
@@ -12,7 +12,6 @@ set(PRIVATE_HEADER
 )
 
 set(PUBLIC_HEADER
-    ${CMAKE_CURRENT_SOURCE_DIR}
 )
 
 set(PRIVATE_DEFINES
index f0a5ee7..9de2ac1 100755 (executable)
@@ -280,6 +280,10 @@ static td_s32 msg_fifo_put_pkt(const core_msg_inst *msg_inst, core_msg_module ms
     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);
index 6489c08..f443d0b 100755 (executable)
@@ -26,7 +26,7 @@ extern "C" {
 #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
index ae56c7d..ddff778 100755 (executable)
@@ -9,7 +9,6 @@ set(SOURCES
 )
 
 set(PUBLIC_HEADER
-    ${CMAKE_CURRENT_SOURCE_DIR}
 )
 
 set(PRIVATE_HEADER
index 6e1caee..f5765bf 100755 (executable)
@@ -12,7 +12,6 @@ set(PRIVATE_HEADER
 )
 
 set(PUBLIC_HEADER
-    ${CMAKE_CURRENT_SOURCE_DIR}
 )
 
 set(PRIVATE_DEFINES
index 16f3cb3..0addfef 100755 (executable)
@@ -415,7 +415,7 @@ static errcode_t i2c_transmit_dma(i2c_bus_t bus, hal_i2c_buffer_wrap_t *data_cfg
 static errcode_t i2c_transmit_read_cmd_by_dma(i2c_bus_t bus, hal_i2c_buffer_wrap_t *data_cfg)
 {
     uint8_t dma_ch;
-    uint16_t read_cmd = 0x100;
+    static uint16_t read_cmd = 0x100;
     dma_ch_user_peripheral_config_t user_cfg = {0};
 
     i2c_write_by_dma_config(bus, &read_cmd, data_cfg->len, &user_cfg);
index 110353e..557e4b1 100755 (executable)
@@ -90,9 +90,9 @@ uint32_t read_cell_array(qspi_data_type_def *qspi_data)
     nand_qspi_enable();
     writel(SER, 0x0);
     nand_qspi_write_data(qspi_data->instruction);
-    nand_qspi_write_data(DUMMY_CYCLE_BYTE);
-    nand_qspi_write_data(qspi_data->data_ptr[0]);
-    nand_qspi_write_data(qspi_data->data_ptr[1]);
+    nand_qspi_write_data(qspi_data->data_ptr[1]); /* 1: bit24~bit16 */
+    nand_qspi_write_data(qspi_data->data_ptr[2]); /* 2: bit15~bit8 */
+    nand_qspi_write_data(qspi_data->data_ptr[3]); /* 3: bit7~bit0 */
     writel(SER, SER_SELECT);
     is_nandflash_working = false;
     osal_irq_restore(irq_sts);
@@ -122,9 +122,9 @@ uint32_t program_execute(qspi_data_type_def *qspi_data)
     nand_qspi_enable();
     writel(SER, 0x0);
     nand_qspi_write_data(qspi_data->instruction);
-    nand_qspi_write_data(DUMMY_CYCLE_BYTE);
-    nand_qspi_write_data(qspi_data->data_ptr[0]);
-    nand_qspi_write_data(qspi_data->data_ptr[1]);
+    nand_qspi_write_data(qspi_data->data_ptr[1]); /* 1: bit24~bit16 */
+    nand_qspi_write_data(qspi_data->data_ptr[2]); /* 2: bit15~bit8 */
+    nand_qspi_write_data(qspi_data->data_ptr[3]); /* 3: bit7~bit0 */
     writel(SER, SER_SELECT);
     is_nandflash_working = false;
     osal_irq_restore(irq_sts);
@@ -148,9 +148,9 @@ uint32_t block_erase(qspi_data_type_def *qspi_data)
     nand_qspi_enable();
     writel(SER, 0x0);
     nand_qspi_write_data(qspi_data->instruction);
-    nand_qspi_write_data(DUMMY_CYCLE_BYTE);
-    nand_qspi_write_data(qspi_data->data_ptr[0]);
-    nand_qspi_write_data(qspi_data->data_ptr[1]);
+    nand_qspi_write_data(qspi_data->data_ptr[1]); /* 1: bit24~bit16 */
+    nand_qspi_write_data(qspi_data->data_ptr[2]); /* 2: bit15~bit8 */
+    nand_qspi_write_data(qspi_data->data_ptr[3]); /* 3: bit7~bit0 */
     writel(SER, SER_SELECT);
     is_nandflash_working = false;
     osal_irq_restore(irq_sts);
index 632ea8b..8213da2 100755 (executable)
@@ -112,15 +112,15 @@ uint32_t mc_flash_read_page(uint32_t nand_page, uint8_t *data, uint32_t data_len
 {
     uapi_watchdog_kick();
     NFPRINT("mc_flash_read_page nand_page = %d\r\n", nand_page);
-    uint16_t page_addr;
+    uint32_t page_addr;
     errno_t err_code;
     uint8_t error_cnt = 0;
     if (nand_page >= (get_nand_flash()->pages_per_block * get_nand_flash()->total_block)) {
         return MC_FAILURE;
     }
     mc_flash_busy_wait();
-    page_addr = SWAP_U16(nand_page);
-    NFPRINT("page addr = %d \r\n", page_addr);
+    page_addr = SWAP_U32(nand_page);
+    NFPRINT("page addr = %u \r\n", page_addr);
     qspi_data_type_def qspi_data = {0};
     qspi_data.data_ptr = (uint8_t *)&page_addr;
     qspi_data.instruction = 0x13;
@@ -140,7 +140,7 @@ uint32_t mc_flash_write_page(uint32_t nand_page, uint8_t *data, uint32_t data_le
 {
     uapi_watchdog_kick();
     uint32_t ret;
-    uint16_t page_addr;
+    uint32_t page_addr;
     uint8_t status_reg;
     write_cmd(CMD_FLASH_WREN);
     qspi_data_type_def p_load_qspi_data = {0};
@@ -149,7 +149,7 @@ uint32_t mc_flash_write_page(uint32_t nand_page, uint8_t *data, uint32_t data_le
     program_load(&p_load_qspi_data, data, data_len, oob, oob_len);
     qspi_data_type_def e_load_qspi_data = {0};
     e_load_qspi_data.instruction = CMD_FLASH_PP_EXE;
-    page_addr = SWAP_U16(nand_page);
+    page_addr = SWAP_U32(nand_page);
     e_load_qspi_data.data_ptr = (uint8_t *)&page_addr;
     program_execute(&e_load_qspi_data);
     mc_flash_busy_wait();
@@ -169,9 +169,9 @@ uint32_t mc_flash_erase_block(uint32_t block_no)
     uapi_watchdog_kick();
     NFPRINT("mc_flash_erase_block block_no = %d\r\n", block_no);
     uint32_t ret;
-    uint16_t page_addr;
+    uint32_t page_addr;
     uint8_t reg_status;
-    page_addr = SWAP_U16(block_no * get_nand_flash()->pages_per_block);
+    page_addr = SWAP_U32(block_no * get_nand_flash()->pages_per_block);
     write_cmd(CMD_FLASH_WREN);
     qspi_data_type_def erase_qspi_data = {0};
     erase_qspi_data.data_ptr = (uint8_t *)&page_addr;
@@ -202,7 +202,7 @@ uint32_t mc_flash_mark_bad_block(uint32_t block_no)
     mark_bad_block(&mark);
     qspi_data_type_def execute = {0};
     execute.instruction = CMD_FLASH_PP_EXE;
-    uint16_t page_addr = SWAP_U16(block_no * get_nand_flash()->pages_per_block);
+    uint32_t page_addr = SWAP_U32(block_no * get_nand_flash()->pages_per_block);
     execute.data_ptr = (uint8_t *)&page_addr;
     program_execute(&execute);
     mc_flash_busy_wait();
@@ -214,7 +214,7 @@ uint32_t mc_flash_check_bad_block(uint32_t block_no)
 {
     uapi_watchdog_kick();
     uint32_t ret = NOT_BAD_BLOCK;
-    uint16_t page_addr = SWAP_U16(block_no * get_nand_flash()->pages_per_block);
+    uint32_t page_addr = SWAP_U32(block_no * get_nand_flash()->pages_per_block);
     qspi_data_type_def cell_read = {0};
     cell_read.data_ptr = (uint8_t *)&page_addr;
     cell_read.instruction = CMD_FLASH_READ_PAGE;
index a6d425b..7b83500 100755 (executable)
@@ -55,6 +55,7 @@ uint32_t yf_volume_percent[YF_VOLUMES_NUM] = {100};
 static const char * const g_volume_names[YF_VOLUMES_NUM] = { YF_NAME_STRS };
 
 struct mtd_info nandflash_freertos_info;
+bool get_exception_status(void);
 
 struct nand_driver_struct *get_nand_flash(void)
 {
@@ -122,17 +123,19 @@ static int formate_filesystem_init(uint32_t total_block_num)
     return 0;
 }
 
+/* Ê¹ÓÃÔ¼Êø£ºÖжϺÍÒì³£ÖУ¬½ûÖ¹sync²Ù×÷ */
 void nandflash_yaffs_sync(void)
 {
-    for (uint8_t index = 0; index < YF_VOLUMES_NUM; index++) {
-        int32_t ret = yaffs_sync(g_volume_names[index]);
-        if (ret != 0) {
-            PRINT("[%d] yaffs_sync fail, ret = %d", index, ret);
+    if (osal_in_interrupt() != true && get_exception_status() != true) {
+        for (uint8_t index = 0; index < YF_VOLUMES_NUM; index++) {
+            int32_t ret = yaffs_sync(g_volume_names[index]);
+            if (ret != 0) {
+                PRINT("[%d] yaffs_sync fail, ret = %d", index, ret);
+            }
         }
     }
 }
 
-
 void erase_all(struct nand_driver_struct *driver)
 {
     uint32_t ret;
index 71b2f7e..c5d0aa1 100755 (executable)
@@ -76,8 +76,11 @@ void qspi_read_width_8(uint8_t *buffer, uint32_t length)
             return;
         }
         while (((readl(SR)) & 0x8) == 0x8) {
-            buffer[ul_loop] = ((uint8_t)readl(DR));
-            ul_loop++;
+            if (ul_loop < length) {
+                buffer[ul_loop++] = ((uint8_t)readl(DR));
+            } else {
+                (void)readl(DR);
+            }
             ul_recv_timeout = 0;
         }
         ul_recv_timeout++;
@@ -100,8 +103,11 @@ void qspi_read_width_32(uint32_t *recvbuf, uint32_t length)
             return;
         }
         while (((readl(SR)) & 0x8) == 0x8) {
-            recvbuf[ul_loop] = ((uint32_t)readl(DR));
-            ul_loop++;
+            if (ul_loop < length) {
+                recvbuf[ul_loop++] = ((uint32_t)readl(DR));
+            } else {
+                (void)readl(DR);
+            }
             ul_recv_timeout = 0;
         }
         ul_recv_timeout++;
index db302e9..e389d95 100755 (executable)
@@ -62,7 +62,7 @@
 #define S_MGPIO30_PAD_CTRL         (S_MGPIO_PAD_CTRL_BASE + 0x278)
 
 #define QSPI_BUS_PRI5              (M_CTL_RB_BASE + 0xA14)
-#define QSPI_M1_HIGHEST_PRI        0x33
+#define QSPI_M1_HIGHEST_PRI        0x22
 
 #define QSPI_RESET_LCD_GPIO        S_HGPIO0
 
index e711265..ef01586 100755 (executable)
@@ -41,6 +41,9 @@
 #endif
 #endif
 
+#define RTCS_TRIES_MAX 2000
+#define RTCS_LOAD_WAIT 120
+
 typedef enum rtc_flag {
     RTC_FLAG_NORMAL,
     RTC_FLAG_PERMANENT
@@ -137,6 +140,8 @@ STATIC void rtc_load_cycle_with_mask(rtc_index_t index, uint64_t cycle_with_mask
     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 */
@@ -214,7 +219,16 @@ STATIC uint32_t rtc_get_next_rtc(rtc_index_t index)
  */
 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;
     }
index 5548821..5dd0ba0 100755 (executable)
@@ -82,17 +82,29 @@ uint64_t uapi_systick_get_count(void)
 
 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)
index 9d955eb..99b87bb 100755 (executable)
@@ -7,13 +7,27 @@
 
 #include "hal_ipc.h"
 #include "arch_barrier.h"
+#include "chip_io.h"
 
+#define IPC_TRY_SEND_MAX 10000
+#define BT_DEEPSLEEP_FLAG 0x5a5a
+#define IPC_TRY_INTERVAL_TIME 100
 /*
  * MCPU core trigger a interrupt to BCPU core.
  */
 void hal_ipc_interrupt_security(void)
 {
-    MCPU_SOFT_INT_SET |= M_TO_BCPU_INT_OFFSET;
+    volatile uint32_t cnt = IPC_TRY_SEND_MAX;
+    while (cnt > 0) {
+        if (readw(GLB_CTL_B_RB_BASE + 0x1C) != BT_DEEPSLEEP_FLAG) {
+            if (cnt < IPC_TRY_SEND_MAX) {
+                uapi_tcxo_delay_us(IPC_TRY_INTERVAL_TIME);
+            }
+            MCPU_SOFT_INT_SET |= M_TO_BCPU_INT_OFFSET;
+            break;
+        }
+        cnt--;
+    }
 }
 
 /*
index 03a3758..d1034d4 100755 (executable)
 #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))
index 13d6d7a..e09b252 100755 (executable)
 #define HAL_ULP_AON_GENERAL_REG         (ULP_AON_CTL_RB_ADDR + 0x14)
 #define HAL_ULP_AON_NO_POWEROFF_FLAG    0xA5A5
 
-static uint16_t g_reset_cause = REBOOT_CAUSE_UNKNOWN;
+#define PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG 0x57000014
+#define PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL 0xb66
+#define PM_SLEEP_SOFT_RESET_FORCE_WKUP_ACK 0x499
+#define PM_MCU_SEND_IPC_WKUP_BT_REG        0x52000034
+#define PM_MCU_SEND_IPC_WKUP_BT_VAL        0x2
+#define PM_WAIT_BT_WAKEUP_DELAY            100
+#define HAL_REBOOT_WAIT_ACK_TRY_TIMES      60
+#define BT_RESET_DELAY                     500
+#define POS_NO_POWEROFF 15
+#define POS_FIRST_POWERON 14
 
+static uint16_t g_reset_cause = REBOOT_CAUSE_UNKNOWN;
 void hal_reboot_set_ulp_aon_no_poweroff_flag(void)
 {
-    reg16_write(HAL_ULP_AON_GENERAL_REG, HAL_ULP_AON_NO_POWEROFF_FLAG);
+    reg16_setbit(HAL_ULP_AON_GENERAL_REG, POS_NO_POWEROFF);
 }
 
 bool hal_reboot_get_ulp_aon_no_poweroff_flag(void)
 {
-    if (reg16(HAL_ULP_AON_GENERAL_REG) == HAL_ULP_AON_NO_POWEROFF_FLAG) {
+    if (reg16_getbit(HAL_ULP_AON_GENERAL_REG, POS_NO_POWEROFF)) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+void hal_reboot_set_first_power_on_flag(void)
+{
+    reg16_setbit(HAL_ULP_AON_GENERAL_REG, POS_FIRST_POWERON);
+}
+
+void hal_reboot_clear_first_power_on_flag(void)
+{
+    reg16_clrbit(HAL_ULP_AON_GENERAL_REG, POS_FIRST_POWERON);
+}
+
+bool hal_reboot_get_first_power_on_flag(void)
+{
+    if (reg16_getbit(HAL_ULP_AON_GENERAL_REG, POS_FIRST_POWERON)) {
         return true;
     } else {
         return false;
@@ -102,6 +131,23 @@ void hal_reboot_chip(void)
     set_cpu_utils_system_boot_magic();
 #ifdef SUPPORT_GPIO
     gpio_ulp_int_en(false);  // when soft reset, ulp area is not cleared.
+#endif
+    // when bt at sleep, need wkup bt before soft reset
+#if !defined(BUILD_APPLICATION_SSB)
+    uint16_t lock_cnt = 0;
+    uint16_t max_lock_cnt = HAL_REBOOT_WAIT_ACK_TRY_TIMES;
+    writew(PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG, PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL);
+    writew(PM_MCU_SEND_IPC_WKUP_BT_REG, PM_MCU_SEND_IPC_WKUP_BT_VAL);
+    while((readw(PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG) != PM_SLEEP_SOFT_RESET_FORCE_WKUP_ACK) && \
+          (lock_cnt < max_lock_cnt)) {
+        PRINT("bt not send ack[%x],don't to reset,try %d.\n", readw(PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG), lock_cnt);
+        uapi_tcxo_delay_ms(PM_WAIT_BT_WAKEUP_DELAY);
+        lock_cnt++;
+    }
+#else
+    writew(PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG, PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL);
+    writew(PM_MCU_SEND_IPC_WKUP_BT_REG, PM_MCU_SEND_IPC_WKUP_BT_VAL);
+    uapi_tcxo_delay_ms(BT_RESET_DELAY);
 #endif
     // Request the reset & wait for it...
     regw_clrbit(HAL_CHIP_RESET_REG, HAL_CHIP_RESET_REG_OFFSET, HAL_CHIP_RESET_REG_ENABLE_RESET_BIT);
index a6b0fcb..ed0140c 100755 (executable)
@@ -49,6 +49,22 @@ void hal_reboot_set_ulp_aon_no_poweroff_flag(void);
  */
 bool hal_reboot_get_ulp_aon_no_poweroff_flag(void);
 
+/**
+ * @brief  Set a universal register of the ULP region to a fix value to indicate that is first power-on
+ */
+void hal_reboot_set_first_power_on_flag(void);
+
+/**
+ * @brief  clear a universal register of the ULP region to a fix value to indicate that is not first power-on
+ */
+void hal_reboot_clear_first_power_on_flag(void);
+
+/**
+ * @brief  Get is first power-on
+ * @return true first power-on, false is re-poweron
+ */
+bool hal_reboot_get_first_power_on_flag(void);
+
 /**
   * @}
   */
index c678363..25dfcdf 100755 (executable)
@@ -54,6 +54,9 @@ static errcode_t hal_efuse_v100_refresh_read(hal_efuse_region_t region)
     if (region >= HAL_EFUSE_REGION_MAX) {
         return ERRCODE_INVALID_PARAM;
     }
+#ifdef CONFIG_EFUSE_CLK_EN
+    efuse_port_set_clk_en(region, true);
+#endif
     hal_efuse_ctl_set_wr_rd(region, HAL_EFUSE_READ_MODE);
     while (hal_efuse_ctl_get(region) != HAL_EFUSE_CLEAR_RESULT) {}
     return ERRCODE_SUCC;
@@ -115,6 +118,11 @@ static errcode_t hal_efuse_v100_read_byte(uint32_t byte_address, uint8_t *value)
         return ERRCODE_INVALID_PARAM;
     }
 
+#ifdef CONFIG_EFUSE_CLK_EN
+    hal_efuse_region_t region = hal_efuse_get_region(byte_address);
+    efuse_port_set_clk_en(region, true);
+#endif
+
     volatile uint16_t *efuse_byte = (volatile uint16_t *)((uintptr_t)hal_efuse_v100_get_writeread_addr(byte_address));
 
     if ((byte_address % HAL_EFUSE_BYTES_PRE_REG) != 0) {
@@ -146,6 +154,10 @@ static errcode_t hal_efuse_v100_write_byte(uint32_t byte_address, uint8_t value)
     hal_efuse_region_t region = hal_efuse_get_region(byte_address);
     uint16_t offset = hal_efuse_get_byte_offset(byte_address);
 
+#ifdef CONFIG_EFUSE_CLK_EN
+    efuse_port_set_clk_en(region, true);
+#endif
+
     volatile uint16_t *efuse_byte = (volatile uint16_t *)((uintptr_t)g_efuse_region_write_address[region] +
                                     ((offset >> 1U) << HAL_EFUSE_REG_SHIFT));
 
index 12dda61..10fe5b8 100644 (file)
@@ -14,6 +14,7 @@ add_subdirectory_if_exist(slip)
 add_subdirectory_if_exist(slip/cat1Service)
 add_subdirectory_if_exist(utils)
 add_subdirectory_if_exist(utilscpp)
+add_subdirectory_if_exist(config)
 add_subdirectory_if_exist(rotary_encoder)
 add_subdirectory_if_exist(vibrator/service)
 add_subdirectory_if_exist(cywee)
diff --git a/code/sdk/drivers/peripheral/config/CMakeLists.txt b/code/sdk/drivers/peripheral/config/CMakeLists.txt
new file mode 100644 (file)
index 0000000..20c5f3c
--- /dev/null
@@ -0,0 +1,56 @@
+#===============================================================================
+# @brief    cmake file
+# Copyright (c) @CompanyNameMagicTag 2022-2023. All rights reserved.
+#===============================================================================
+set(COMPONENT_NAME "custom_config")
+
+set(SOURCES
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/ConfigModel.cpp
+)
+
+set(PUBLIC_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/include
+    ${CMAKE_SOURCE_DIR}/open_source/openharmony/third_party/cJSON
+)
+
+set(PRIVATE_HEADER
+    ${CMAKE_SOURCE_DIR}/middleware/utils/update/inner_include
+)
+
+set(PRIVATE_DEFINES
+    TARGET_NAME="${TARGET_COMMAND}"
+    BUILD_TIME="${BUILD_TIME}"
+)
+
+set(PUBLIC_DEFINES
+)
+
+# 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()
@@ -4,11 +4,13 @@
 #include <iostream>
 #include <fstream>
 #include <filesystem>
-#include "../../../../../../open_source/openharmony/third_party/cJSON/cJSON.h"
+#include "cJSON.h"
 #include "wearable_log.h"
-#include "components/ui_image_animator.h"
 #include "vector"
+#ifdef FD230
+#include "components/ui_image_animator.h"
 #include "language/font/ui_resource_string.h"
+#endif
 struct dial_config
 {
     std::string dialname;
@@ -1,5 +1,5 @@
-#include "config/include/ConfigModel.h"
-#include "config/include/ConfigModelC.h"
+#include "ConfigModel.h"
+#include "ConfigModelC.h"
 #include "custom_utils.h"
 namespace OHOS
 {
index bda1058..717dc45 100644 (file)
@@ -280,7 +280,9 @@ static uint32_t ADD_ADDRESS(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
         printf("CAT1TEST ATCMD Convert Command Failed\n");
         return ERRCODE_FAIL;
     }
+    #ifdef FD230
     OHOS::add_addressbook_by_AT((char *)argv[0],(char *)argv[1]);
+    #endif
     //uapi_cat1_wakeup_cat1(1);
     //u32_t sret= OsShellPing( argc, (const char *)argv[0]);
     //printf("CAT1TEST ATCMD  ping   ret = 0x%X\n",sret);
@@ -301,7 +303,9 @@ static uint32_t read_ADDRESS(uint8_t *para, uint32_t paraLen, char *strCommonCmd
         printf("CAT1TEST ATCMD Convert Command Failed\n");
         return ERRCODE_FAIL;
     }
+    #ifdef FD230
     OHOS::read_addressbook_bin_file();
+    #endif
     return ERRCODE_SUCC;
 }
 
index 6d2284d..db77f6f 100644 (file)
@@ -25,8 +25,8 @@
 #include <string.h>
 
 
-#include "config/include/ConfigModelC.h"
-#include "config/include/ConfigModel.h"
+#include "ConfigModelC.h"
+#include "ConfigModel.h"
 #include "wearable_log.h"
 #include "custom_runtime.h"
 
index 491aba3..697a3d9 100644 (file)
@@ -152,8 +152,10 @@ int cat1_msg_event_sendmsg_toUI(char* callno)
 
 void up_report_timer(void)
 {
-     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "up_report_timer_");
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "up_report_timer_");
+    #ifdef FD230
     OHOS::start_report_timer();
+    #endif
 }
 
 
index 883324b..5bdfe1f 100644 (file)
@@ -291,6 +291,7 @@ ext_errno tp_ft6x46_i2c_data_write(uint8_t reg_addr, uint8_t *data_buf, uint16_t
     }
     if (ret != EXT_ERR_SUCCESS) {
         tp_err("tp data write fail! ret=0x%x", ret);
+               tp_mem_free(write_data);
         return ret;
     }
 
index 6d36fb1..ec0bb9a 100644 (file)
@@ -23,6 +23,8 @@
 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
@@ -103,7 +105,6 @@ ext_errno tp_i2c_data_read(uint16_t reg_addr, uint8_t *data_buf, uint32_t data_l
     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
@@ -111,15 +112,17 @@ ext_errno tp_i2c_data_read(uint16_t reg_addr, uint8_t *data_buf, uint32_t data_l
         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
@@ -131,6 +134,12 @@ ext_errno tp_i2c_data_read(uint16_t reg_addr, uint8_t *data_buf, uint32_t data_l
         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
@@ -139,17 +148,16 @@ ext_errno tp_i2c_cmd_write(uint16_t cmd)
     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
@@ -172,7 +180,6 @@ ext_errno tp_i2c_reg_write(uint16_t reg_addr, uint16_t reg_cfg)
     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
@@ -180,12 +187,11 @@ ext_errno tp_i2c_reg_write(uint16_t reg_addr, uint16_t reg_cfg)
         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
@@ -231,6 +237,7 @@ ext_errno tp_i2c_data_write(uint16_t reg_addr, uint8_t *data_buf, uint32_t data_
     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
@@ -247,10 +254,11 @@ ext_errno tp_i2c_data_write(uint16_t reg_addr, uint8_t *data_buf, uint32_t data_
     }\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
index ec85d22..927a5d7 100644 (file)
@@ -23,6 +23,8 @@
 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
@@ -96,7 +98,6 @@ ext_errno tp_i2c_data_read(uint16_t reg_addr, uint8_t *data_buf, uint32_t data_l
     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
@@ -104,15 +105,17 @@ ext_errno tp_i2c_data_read(uint16_t reg_addr, uint8_t *data_buf, uint32_t data_l
         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
@@ -124,6 +127,12 @@ ext_errno tp_i2c_data_read(uint16_t reg_addr, uint8_t *data_buf, uint32_t data_l
         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
@@ -132,17 +141,16 @@ ext_errno tp_i2c_cmd_write(uint16_t cmd)
     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
@@ -166,7 +174,6 @@ ext_errno tp_i2c_reg_write(uint16_t reg_addr, uint16_t reg_cfg)
     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
@@ -174,12 +181,12 @@ ext_errno tp_i2c_reg_write(uint16_t reg_addr, uint16_t reg_cfg)
         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
@@ -225,6 +232,7 @@ ext_errno tp_i2c_data_write(uint16_t reg_addr, uint8_t *data_buf, uint32_t data_
     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
@@ -241,10 +249,11 @@ ext_errno tp_i2c_data_write(uint16_t reg_addr, uint8_t *data_buf, uint32_t data_
     }\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
index 55e014b..9438a36 100644 (file)
@@ -25,7 +25,7 @@
 #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
index fd80eab..ca515fc 100644 (file)
 #include "errcode.h"
 #include "power_display_service.h"
 // #include "config/include/ConfigModelC.h"
+
+#ifdef FD230
 #include "soundandvibration/include/SoundAndVibrationVolumeSettingC.h"
 #include "networkandcall/include/NetworkAndCallC.h"
+#endif
 #include <dirent.h>
 #include <unistd.h>
 #include "custom_runtime.h"
@@ -249,7 +252,9 @@ bool start_custom_ble_service(void)
         PRINT("register custom protocol classic bt service !\r\n");
 
         BtInitCallBacks();
+        #ifdef FD230
         BtA2dpInit();
+        #endif
         enable_a2dp_service(true);
         BtInitSpp();
         enable_spp_service(true);
@@ -855,27 +860,45 @@ void uapi_set_screen_on_api(void)
 /*系统声音设置*/
 void uapi_systemVolumeSet(int16_t sounding)
 {
+    #ifdef FD230
     SystemVolumeSet(sounding);
+    #endif
 }
 
 //通话音量设置
 void uapi_callVolumeSet(int16_t sounding)
 {
+    #ifdef FD230
     CallVolumeSet(sounding);
+    #endif
 }
 
 //震动强度设置
 void uapi_vibrationModeSet(int value)
 {
+    #ifdef FD230
     VibationModeSet(value);
+    #endif
 }
 
 //设置是否静音
 void uapi_setSilentMode(bool isopen)
 {
+    #ifdef FD230
     SilentModelSet(isopen);
+    #endif
+}
+void power_on_cat1(void)
+{
+    uapi_cat1_power_on(1);
+    uapi_cat1_reset(0);
 }
 
+void power_off_cat1(void)
+{
+    uapi_cat1_reset(1);
+    uapi_cat1_power_on(0);
+}
 //设置4G能力开关是否开启
 void uapi_set4GCapability(bool isopen)
 {
index 93b3fc6..416f5b6 100755 (executable)
@@ -103,6 +103,24 @@ extern "C" {
  */
 #define SERVICE_INFORMATION 0x800000
 
+/**
+ * @if Eng
+ * @brief The Class of Device Audio or Vido.
+ * @else
+ * @brief 音配设备类型。
+ * @endif
+ */
+#define DEVICE_MAJOR_CLASS_AUDIO_VIDEO 0x400
+
+/**
+ * @if Eng
+ * @brief The Class of Device Phone.
+ * @else
+ * @brief 手机设备类型。
+ * @endif
+ */
+#define DEVICE_MAJOR_CLASS_PHONE 0x200
+
 /**
  * @if Eng
  * @brief Enum of Bluetooth stack state.
@@ -772,6 +790,29 @@ errcode_t gap_disconnect_remote_device(const bd_addr_t *addr);
  */
 errcode_t gap_connect_remote_device(const bd_addr_t *addr);
 
+/**
+ * @if Eng
+ * @brief Use this funtion to set the inquiry parameters.
+ * @par  Use this funtion to set the inquiry parameters.
+ * @attention NULL
+ * @param  [in] device_class #uint32_t, class of device to report.
+ * @param  [in] max_num #uint8_t, max number of response devices.
+ * @retval error code
+ * @par Dependency:
+ * @li  bts_gap.h
+ * @else
+ * @brief  设置扫描参数。
+ * @par    设置扫描参数。
+ * @attention 无
+ * @param  [in] device_class 设备类型。
+ * @param  [in] max_num 最大上报数量。
+ * @retval 执行结果错误码。
+ * @par 依赖:
+ * @li  bts_gap.h
+ * @endif
+ */
+errcode_t gap_br_set_inquiry_paramters(uint32_t device_class, uint8_t max_num);
+
 /**
  * @if Eng
  * @brief Use this funtion to start BT discovery.
@@ -1391,6 +1432,29 @@ typedef struct {
  */
 int gap_register_callbacks(gap_call_backs_t *func);
 
+/**
+ * @if Eng
+ * @brief Use this funtion to reconnect a media device.
+ * @par   Use this funtion to reconnect a media device.
+ * @attention NULL
+ * @param  [in] addr #const bd_addr_t *, address of the device.
+ * @retval #true Execute successfully.
+ * @retval #false Execution failed.
+ * @par Dependency:
+ * @li  bts_gap.h
+ * @else
+ * @brief  回连媒体设备。
+ * @par    回连媒体设备。
+ * @attention 无
+ * @param  [in] 要回连的设备地址。
+ * @retval #true  连接成功。
+ * @retval #false  连接失败。
+ * @par 依赖:
+ * @li  bts_gap.h
+ * @endif
+ */
+errcode_t gap_reconnect_media_device(const bd_addr_t *addr);
+
 /**
  * @}
  */
diff --git a/code/sdk/include/middleware/services/bts/common/bts_feature.h b/code/sdk/include/middleware/services/bts/common/bts_feature.h
new file mode 100644 (file)
index 0000000..5c13978
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2024. All rights reserved.
+ * Description: BTS FEATURE module.
+ */
+
+/**
+ * @defgroup bluetooth_bts_feature BTS FEATURE API
+ * @ingroup  bluetooth
+ * @{
+ */
+
+
+#ifndef BTS_FEATURE_H
+#define BTS_FEATURE_H
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "errcode.h"
+#include "bts_def.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @if Eng
+ * @brief Struct of BT stack feature.
+ * @else
+ * @brief 蓝牙特性位图。
+ * @endif
+ */
+typedef struct {
+    uint32_t bt_auto_reconnect_closed:1;        /*!< @if Eng BT reconnect feature.
+                                                @else   蓝牙回连特性。 @endif */
+    uint32_t reserved:31;                       /*!< @if Eng Featrues reserved for future.
+                                                @else   保留字段。 @endif */
+} bts_feature_t;
+
+/**
+ * @if Eng
+ * @brief Set BTS Features supported.
+ * @par   Set BTS Features supported.
+ * @attention NULL
+ * @param  [in] feature #bts_feature_t, a bitmap indicate supported features.
+ * @retval #BT_STATUS_SUCCESS   Excute successfully.
+ * @retval #Other               Error code, @ref bt_status_t
+ * @par Dependency:
+ * @li  bts_feature.h
+ * @see
+ * @else
+ * @brief  设置想要使用的特性。
+ * @par    设置想要使用的特性。
+ * @attention 无
+ * @param  [in] 特性位图。 @ref bts_feature_t
+ * @retval #BT_STATUS_SUCCESS   执行成功。
+ * @retval #Other               错误码, @ref bt_status_t。
+ * @par 依赖:
+ * @li  bts_feature.h
+ * @see
+ * @endif
+ */
+errcode_t bts_set_features(bts_feature_t *feature);
+
+/**
+ * @if Eng
+ * @brief Use this funtion to get BTS features supported.
+ * @par  Use this funtion to get BTS features supported.
+ * @attention NULL.
+ * @param  NULL.
+ * @retval BT features bitmap. see @ref bts_feature_t
+ * @par Dependency:
+ * @li  bts_feature.h
+ * @else
+ * @brief  获取BT协议栈支持的特性。
+ * @par    获取BT协议栈支持的特性。
+ * @attention 无
+ * @param  无
+ * @retval BT 特性位图。 参考 @ref bts_feature_t
+ * @par 依赖:
+ * @li  bts_feature.h
+ * @endif
+ */
+bts_feature_t bts_get_features(void);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+#endif
index 9510415..3505361 100644 (file)
@@ -1,10 +1,10 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="create style_name failed. @app_style.cpp(29),ERROR" ID="0xe10200ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="style_name set string value error @app_style.cpp(33),ERROR" ID="0xe102010a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="transform prop value must be set. @app_style.cpp(169),ERROR" ID="0xe102054a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="None style to parse. @app_style.cpp(187),ERROR" ID="0xe10205da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="None style to parse. @app_style.cpp(193),ERROR" ID="0xe102060a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc space error @app_style.cpp(265),ERROR" ID="0xe102084a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="convert style name to char failed, will be dropped @app_style.cpp(295),ERROR" ID="0xe102093a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="style name length is 0 or max, will be dropped @app_style.cpp(300),ERROR" ID="0xe1020962" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="create style error @app_style.cpp(308),ERROR" ID="0xe10209a2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="create style_name failed. @app_style.cpp(29),ERROR" ID="0xe10600ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="style_name set string value error @app_style.cpp(33),ERROR" ID="0xe106010a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="transform prop value must be set. @app_style.cpp(169),ERROR" ID="0xe106054a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="None style to parse. @app_style.cpp(187),ERROR" ID="0xe10605da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="None style to parse. @app_style.cpp(193),ERROR" ID="0xe106060a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc space error @app_style.cpp(265),ERROR" ID="0xe106084a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="convert style name to char failed, will be dropped @app_style.cpp(295),ERROR" ID="0xe106093a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="style name length is 0 or max, will be dropped @app_style.cpp(300),ERROR" ID="0xe1060962" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="create style error @app_style.cpp(308),ERROR" ID="0xe10609a2" />
                        </MSG_LOG>
\ No newline at end of file
index fbc65aa..41741a1 100644 (file)
@@ -1,9 +1,9 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="create style item string failed. @app_style_item.cpp(58),ERROR" ID="0xe10401d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="app_style set string value error @app_style_item.cpp(62),ERROR" ID="0xe10401f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="style item transform num to string fail @app_style_item.cpp(77),ERROR" ID="0xe104026a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="convert style prop name to char failed, will be dropped @app_style_item.cpp(90),ERROR" ID="0xe10402d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="style prop name length is 0, will be dropped @app_style_item.cpp(95),ERROR" ID="0xe10402fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="new styleItem error @app_style_item.cpp(114),ERROR" ID="0xe1040392" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="convert style value to char failed, will be dropped @app_style_item.cpp(135),ERROR" ID="0xe104043a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="new styleItem error @app_style_item.cpp(161),ERROR" ID="0xe104050a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="create style item string failed. @app_style_item.cpp(58),ERROR" ID="0xe10801d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="app_style set string value error @app_style_item.cpp(62),ERROR" ID="0xe10801f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="style item transform num to string fail @app_style_item.cpp(77),ERROR" ID="0xe108026a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="convert style prop name to char failed, will be dropped @app_style_item.cpp(90),ERROR" ID="0xe10802d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="style prop name length is 0, will be dropped @app_style_item.cpp(95),ERROR" ID="0xe10802fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="new styleItem error @app_style_item.cpp(114),ERROR" ID="0xe1080392" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="convert style value to char failed, will be dropped @app_style_item.cpp(135),ERROR" ID="0xe108043a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="new styleItem error @app_style_item.cpp(161),ERROR" ID="0xe108050a" />
                        </MSG_LOG>
\ No newline at end of file
index c12bf10..7b7e87f 100644 (file)
@@ -1,5 +1,5 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="malloc flags data buffer failed @app_style_manager.cpp(62),ERROR" ID="0xe10801f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="convert id value to char failed, will be dropped @app_style_manager.cpp(227),ERROR" ID="0xe108071a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="not supported yet @app_style_manager.cpp(243),WARNING" ID="0xe108079b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="invalid prop count @app_style_manager.cpp(283),ERROR" ID="0xe10808da" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="malloc flags data buffer failed @app_style_manager.cpp(62),ERROR" ID="0xe10c01f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="convert id value to char failed, will be dropped @app_style_manager.cpp(227),ERROR" ID="0xe10c071a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="not supported yet @app_style_manager.cpp(243),WARNING" ID="0xe10c079b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="invalid prop count @app_style_manager.cpp(283),ERROR" ID="0xe10c08da" />
                        </MSG_LOG>
\ No newline at end of file
index 4fc2d03..91cdbc7 100644 (file)
@@ -1,19 +1,19 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="initAppSysCmd bm! @appsys_bms_cmd.cpp(52),INFO" ID="0xe04a01a5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm ReceiveCallback resultCode = %d @appsys_bms_cmd.cpp(59),INFO" ID="0xe04a01dd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="argc &gt; 4, ERR!!! @appsys_bms_cmd.cpp(66),ERROR" ID="0xe04a0212" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="input failed! @appsys_bms_cmd.cpp(75),ERROR" ID="0xe04a025a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="argc &gt; 4, ERR!!! @appsys_bms_cmd.cpp(83),ERROR" ID="0xe04a029a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="js app is active, first need terminate @appsys_bms_cmd.cpp(109),INFO" ID="0xe04a036d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bm dump argc 2 only support allBundles, ERR!!! @appsys_bms_cmd.cpp(121),ERROR" ID="0xe04a03ca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo len = %d @appsys_bms_cmd.cpp(130),DBG" ID="0xe04a0416" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo bundleName = %s @appsys_bms_cmd.cpp(133),DBG" ID="0xe04a042e" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo versionName = %s @appsys_bms_cmd.cpp(134),DBG" ID="0xe04a0436" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo deviceType = %s @appsys_bms_cmd.cpp(136),DBG" ID="0xe04a0446" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo udid = %d @appsys_bms_cmd.cpp(138),DBG" ID="0xe04a0456" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo isSystemApp = %d @appsys_bms_cmd.cpp(139),DBG" ID="0xe04a045e" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm start @appsys_bms_cmd.cpp(158),INFO" ID="0xe04a04f5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="argc is not 2, ERR!!! @appsys_bms_cmd.cpp(160),ERROR" ID="0xe04a0502" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm command = %s @appsys_bms_cmd.cpp(165),INFO" ID="0xe04a052d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm no correct cmd!!! @appsys_bms_cmd.cpp(179),ERROR" ID="0xe04a059a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm end @appsys_bms_cmd.cpp(182),INFO" ID="0xe04a05b5" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="initAppSysCmd bm! @appsys_bms_cmd.cpp(53),INFO" ID="0xe04a01ad" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm ReceiveCallback resultCode = %d @appsys_bms_cmd.cpp(60),INFO" ID="0xe04a01e5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="argc &gt; 4, ERR!!! @appsys_bms_cmd.cpp(67),ERROR" ID="0xe04a021a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="input failed! @appsys_bms_cmd.cpp(76),ERROR" ID="0xe04a0262" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="argc &gt; 4, ERR!!! @appsys_bms_cmd.cpp(84),ERROR" ID="0xe04a02a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="js app is active, first need terminate @appsys_bms_cmd.cpp(110),INFO" ID="0xe04a0375" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bm dump argc 2 only support allBundles, ERR!!! @appsys_bms_cmd.cpp(122),ERROR" ID="0xe04a03d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo len = %d @appsys_bms_cmd.cpp(131),DBG" ID="0xe04a041e" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo bundleName = %s @appsys_bms_cmd.cpp(134),DBG" ID="0xe04a0436" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo versionName = %s @appsys_bms_cmd.cpp(135),DBG" ID="0xe04a043e" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo deviceType = %s @appsys_bms_cmd.cpp(137),DBG" ID="0xe04a044e" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo udid = %d @appsys_bms_cmd.cpp(139),DBG" ID="0xe04a045e" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm dump BundlesInfo isSystemApp = %d @appsys_bms_cmd.cpp(140),DBG" ID="0xe04a0466" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm start @appsys_bms_cmd.cpp(159),INFO" ID="0xe04a04fd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="argc is not 2, ERR!!! @appsys_bms_cmd.cpp(161),ERROR" ID="0xe04a050a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="cmd_bm command = %s @appsys_bms_cmd.cpp(166),INFO" ID="0xe04a0535" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm no correct cmd!!! @appsys_bms_cmd.cpp(180),ERROR" ID="0xe04a05a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="cmd_bm end @appsys_bms_cmd.cpp(183),INFO" ID="0xe04a05bd" />
                        </MSG_LOG>
\ No newline at end of file
index 761c465..da5ee92 100644 (file)
@@ -1,6 +1,6 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="AsyncTaskManager::Dispatch failed: handler is null. @async_task_manager.cpp(115),ERROR" ID="0xe056039a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="AsyncTaskManager::Dispatch failed: Fatal error is hitted. @async_task_manager.cpp(119),ERROR" ID="0xe05603ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="AsyncTaskManager::Dispatch failed: out of memory. @async_task_manager.cpp(125),ERROR" ID="0xe05603ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="AsyncTaskManager::Cancel failed: invalid task ID. @async_task_manager.cpp(149),ERROR" ID="0xe05604aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="AsyncTaskManager::CancelWithContext failed: null context. @async_task_manager.cpp(178),ERROR" ID="0xe0560592" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="AsyncTaskManager::Dispatch failed: handler is null. @async_task_manager.cpp(115),ERROR" ID="0xe05a039a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="AsyncTaskManager::Dispatch failed: Fatal error is hitted. @async_task_manager.cpp(119),ERROR" ID="0xe05a03ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="AsyncTaskManager::Dispatch failed: out of memory. @async_task_manager.cpp(125),ERROR" ID="0xe05a03ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="AsyncTaskManager::Cancel failed: invalid task ID. @async_task_manager.cpp(149),ERROR" ID="0xe05a04aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="AsyncTaskManager::CancelWithContext failed: null context. @async_task_manager.cpp(178),ERROR" ID="0xe05a0592" />
                        </MSG_LOG>
\ No newline at end of file
index f33750d..12aa032 100644 (file)
                        <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gattc read by uuid param error @btsrv_gatt_client.c(1206),ERROR" ID="0xd81625b2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gattc read by uuid addr memcpy fail @btsrv_gatt_client.c(1211),ERROR" ID="0xd81625da" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gattc write req param error @btsrv_gatt_client.c(1233),ERROR" ID="0xd816268a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write req param new fail! @btsrv_gatt_client.c(1238),ERROR" ID="0xd81626b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write req param set fail! @btsrv_gatt_client.c(1244),ERROR" ID="0xd81626e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write req addr memcpy fail @btsrv_gatt_client.c(1249),ERROR" ID="0xd816270a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write req value memcpy fail @btsrv_gatt_client.c(1256),ERROR" ID="0xd8162742" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gattc write cmd param error @btsrv_gatt_client.c(1278),ERROR" ID="0xd81627f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write cmd param new fail! @btsrv_gatt_client.c(1283),ERROR" ID="0xd816281a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write cmd addr memcpy fail @btsrv_gatt_client.c(1288),ERROR" ID="0xd8162842" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write cmd value memcpy fail @btsrv_gatt_client.c(1295),ERROR" ID="0xd816287a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gattc exchange mtu param error @btsrv_gatt_client.c(1317),ERROR" ID="0xd816292a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] addr memcpy fail @btsrv_gatt_client.c(1321),ERROR" ID="0xd816294a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[btsrv][ERROR] mc ble gatt mtu config req atb ret: %d @btsrv_gatt_client.c(1329),ERROR" ID="0xd816298a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gatt client callback memcpy fail @btsrv_gatt_client.c(1338),ERROR" ID="0xd81629d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write req param new fail! @btsrv_gatt_client.c(1241),ERROR" ID="0xd81626ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write req param set fail! @btsrv_gatt_client.c(1247),ERROR" ID="0xd81626fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write req addr memcpy fail @btsrv_gatt_client.c(1252),ERROR" ID="0xd8162722" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write req value memcpy fail @btsrv_gatt_client.c(1259),ERROR" ID="0xd816275a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gattc write cmd param error @btsrv_gatt_client.c(1281),ERROR" ID="0xd816280a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write cmd param new fail! @btsrv_gatt_client.c(1289),ERROR" ID="0xd816284a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write cmd addr memcpy fail @btsrv_gatt_client.c(1294),ERROR" ID="0xd8162872" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] write cmd value memcpy fail @btsrv_gatt_client.c(1301),ERROR" ID="0xd81628aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gattc exchange mtu param error @btsrv_gatt_client.c(1323),ERROR" ID="0xd816295a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] addr memcpy fail @btsrv_gatt_client.c(1327),ERROR" ID="0xd816297a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[btsrv][ERROR] mc ble gatt mtu config req atb ret: %d @btsrv_gatt_client.c(1335),ERROR" ID="0xd81629ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gatt client callback memcpy fail @btsrv_gatt_client.c(1344),ERROR" ID="0xd8162a02" />
                        </MSG_LOG>
\ No newline at end of file
index 05dd354..f22cc8a 100644 (file)
                        <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gatts send response data memcpy fail @btsrv_gatt_server.c(1601),ERROR" ID="0xd81a320a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[Error] enable ble first! @btsrv_gatt_server.c(1617),ERROR" ID="0xd81a328a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] invalid param @btsrv_gatt_server.c(1622),ERROR" ID="0xd81a32b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] malloc send notification param fail @btsrv_gatt_server.c(1628),ERROR" ID="0xd81a32e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] data memcpy fail @btsrv_gatt_server.c(1636),ERROR" ID="0xd81a3322" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] enable ble first! @btsrv_gatt_server.c(1653),ERROR" ID="0xd81a33aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] invalid param @btsrv_gatt_server.c(1658),ERROR" ID="0xd81a33d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] param new fail @btsrv_gatt_server.c(1663),ERROR" ID="0xd81a33fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] sen ntf/ind by uuid memcpy fail @btsrv_gatt_server.c(1673),ERROR" ID="0xd81a344a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] sen ntf/ind by uuid memcpy fail @btsrv_gatt_server.c(1682),ERROR" ID="0xd81a3492" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="set mtu out of bounds use dft_val:23 set_val:%d. @btsrv_gatt_server.c(1698),WARNING" ID="0xd81a3513" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gatt server callback memcpy fail @btsrv_gatt_server.c(1711),ERROR" ID="0xd81a357a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] malloc send notification param fail @btsrv_gatt_server.c(1631),ERROR" ID="0xd81a32fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] data memcpy fail @btsrv_gatt_server.c(1639),ERROR" ID="0xd81a333a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] enable ble first! @btsrv_gatt_server.c(1656),ERROR" ID="0xd81a33c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] invalid param @btsrv_gatt_server.c(1661),ERROR" ID="0xd81a33ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] param new fail @btsrv_gatt_server.c(1669),ERROR" ID="0xd81a342a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] sen ntf/ind by uuid memcpy fail @btsrv_gatt_server.c(1679),ERROR" ID="0xd81a347a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] sen ntf/ind by uuid memcpy fail @btsrv_gatt_server.c(1688),ERROR" ID="0xd81a34c2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="set mtu out of bounds use dft_val:23 set_val:%d. @btsrv_gatt_server.c(1704),WARNING" ID="0xd81a3543" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gatt server callback memcpy fail @btsrv_gatt_server.c(1717),ERROR" ID="0xd81a35aa" />
                        </MSG_LOG>
\ No newline at end of file
index 7aea144..6663e84 100644 (file)
@@ -3,9 +3,9 @@
                        <MSG STRUCTURE="diag_log_msg0" NAME="[Error] mc ble l2cap credit channel flow control atb fail! @btsv_l2cap_chan.c(50),ERROR" ID="0xd81e0192" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bth_l2cap_chan aleardy reg! @btsv_l2cap_chan.c(64),ERROR" ID="0xd81e0202" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bth_l2cap_chan reg fail! @btsv_l2cap_chan.c(73),ERROR" ID="0xd81e024a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bth_l2cap_chan == NULL @btsv_l2cap_chan.c(102),ERROR" ID="0xd81e0332" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] conn_node == NULL @btsv_l2cap_chan.c(108),ERROR" ID="0xd81e0362" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bth chan data write malloc fail! @btsv_l2cap_chan.c(114),ERROR" ID="0xd81e0392" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bth chan data write: memcpy failed! @btsv_l2cap_chan.c(120),ERROR" ID="0xd81e03c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bth chan data write: memcpy failed! @btsv_l2cap_chan.c(128),ERROR" ID="0xd81e0402" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bth_l2cap_chan == NULL @btsv_l2cap_chan.c(103),ERROR" ID="0xd81e033a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] conn_node == NULL @btsv_l2cap_chan.c(109),ERROR" ID="0xd81e036a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bth chan data write malloc fail! @btsv_l2cap_chan.c(115),ERROR" ID="0xd81e039a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bth chan data write: memcpy failed! @btsv_l2cap_chan.c(121),ERROR" ID="0xd81e03ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bth chan data write: memcpy failed! @btsv_l2cap_chan.c(129),ERROR" ID="0xd81e040a" />
                        </MSG_LOG>
\ No newline at end of file
index e487e2d..8860423 100644 (file)
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="osal_mutex_init in g_connect_list_lock failed @connection_manager.c(110),ERROR" ID="0xd8060372" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="create timer error! ret: %x @connection_manager.c(183),ERROR" ID="0xd80605ba" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="start timer error! ret: %x @connection_manager.c(191),ERROR" ID="0xd80605fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="start timer success! @connection_manager.c(196),INFO" ID="0xd8060625" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="already in discovery @connection_manager.c(216),WARNING" ID="0xd80606c3" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="start discovery fail ret: %x @connection_manager.c(230),ERROR" ID="0xd8060732" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery started @connection_manager.c(238),INFO" ID="0xd8060775" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="reconnect phone con_hdl:0x%x, result: %08x @connection_manager.c(355),INFO" ID="0xd8060b1d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="exist connect phone reject! @connection_manager.c(381),INFO" ID="0xd8060bed" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(402),ERROR" ID="0xd8060c92" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(406),ERROR" ID="0xd8060cb2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(412),ERROR" ID="0xd8060ce2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="create acl cfm ret = %08x @connection_manager.c(420),INFO" ID="0xd8060d25" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="dev_hdl: 0x%08x cod: 0x%x link_type: 0x%x @connection_manager.c(449),INFO" ID="0xd8060e0d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="already exist conn_node @connection_manager.c(459),INFO" ID="0xd8060e5d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="accept not paired earbuds. @connection_manager.c(468),INFO" ID="0xd8060ea5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="exist same type conn node. @connection_manager.c(472),INFO" ID="0xd8060ec5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="add conn info error! @connection_manager.c(479),ERROR" ID="0xd8060efa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(486),INFO" ID="0xd8060f35" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(494),ERROR" ID="0xd8060f72" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(501),ERROR" ID="0xd8060faa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(506),ERROR" ID="0xd8060fd2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(512),ERROR" ID="0xd8061002" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect exist conn_node @connection_manager.c(528),INFO" ID="0xd8061085" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="exist same type conn_node, disconnect. @connection_manager.c(534),INFO" ID="0xd80610b5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="find remote node fail @connection_manager.c(542),WARNING" ID="0xd80610f3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="add conn info error! @connection_manager.c(549),ERROR" ID="0xd806112a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="create acl ret = %08x @connection_manager.c(561),WARNING" ID="0xd806118b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="acl is connected @connection_manager.c(569),INFO" ID="0xd80611cd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(578),INFO" ID="0xd8061215" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="not exist conn node. @connection_manager.c(581),INFO" ID="0xd806122d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="is phone=0x%x @connection_manager.c(584),INFO" ID="0xd8061245" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="status error dev_hdl: %x status: %d @connection_manager.c(587),WARNING" ID="0xd806125b" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(627),INFO" ID="0xd806139d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="send msg connecting @connection_manager.c(659),INFO" ID="0xd806149d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(663),ERROR" ID="0xd80614ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(667),ERROR" ID="0xd80614da" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(673),ERROR" ID="0xd806150a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="send msg connecting success! @connection_manager.c(676),INFO" ID="0xd8061525" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="stop timer @connection_manager.c(681),INFO" ID="0xd806154d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="stop timer success! @connection_manager.c(689),INFO" ID="0xd806158d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="start timer @connection_manager.c(694),INFO" ID="0xd80615b5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(704),ERROR" ID="0xd8061602" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="create timer error! ret: %x @connection_manager.c(709),ERROR" ID="0xd806162a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="start timer error! ret: %x @connection_manager.c(715),ERROR" ID="0xd806165a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="start timer success! try to reconnect %d times interval %dms @connection_manager.c(720),INFO" ID="0xd8061685" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x reason: %08x @connection_manager.c(752),INFO" ID="0xd8061785" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="no conn record dev_hdl: %08x @connection_manager.c(761),WARNING" ID="0xd80617cb" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="rmt device class=0x%x is phone: 0x%x @connection_manager.c(771),INFO" ID="0xd806181d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(784),WARNING" ID="0xd8061883" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="get remote dev addr failed. dev_hdl: %x @connection_manager.c(798),WARNING" ID="0xd80618f3" />
-                       <MSG STRUCTURE="diag_log_msg6" NAME="addr: ****%02x%02x%02x%02x dev_hdl: %08x gap_remove_pair ret(bool): %d @connection_manager.c(807),INFO" ID="0xd806193d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="error dev_hdl: %x pair_ret: %x disconn_ret: %x @connection_manager.c(816),WARNING" ID="0xd8061983" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(823),INFO" ID="0xd80619bd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="conn node is null dev_hdl: %x @connection_manager.c(827),INFO" ID="0xd80619dd" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="status error dev_hdl: %x status: %d @connection_manager.c(833),INFO" ID="0xd8061a0d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(847),INFO" ID="0xd8061a7d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(855),WARNING" ID="0xd8061abb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="rmt device is phone @connection_manager.c(862),INFO" ID="0xd8061af5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="rmt device is not phone @connection_manager.c(865),INFO" ID="0xd8061b0d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="node not exist @connection_manager.c(876),INFO" ID="0xd8061b65" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="success @connection_manager.c(884),INFO" ID="0xd8061ba5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="descovery result @connection_manager.c(947),INFO" ID="0xd8061d9d" />
-                       <MSG STRUCTURE="diag_log_msg5" NAME="found device addr: ****%02x%02x%02x%02x name: %s @connection_manager.c(958),INFO" ID="0xd8061df5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_get_device_name failed @connection_manager.c(960),INFO" ID="0xd8061e05" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(984),WARNING" ID="0xd8061ec3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get device name fail @connection_manager.c(991),WARNING" ID="0xd8061efb" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id: %d @connection_manager.c(1060),WARNING" ID="0xd8062123" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="set discovery status to stop @connection_manager.c(1078),INFO" ID="0xd80621b5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id: %d @connection_manager.c(1149),WARNING" ID="0xd80623eb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show conn list: @connection_manager.c(1170),INFO" ID="0xd8062495" />
-                       <MSG STRUCTURE="diag_log_msg7" NAME="| %-4s | %-32s | %-12s | %-16s | %-16s | %-8s | %-8s | @connection_manager.c(1172),INFO" ID="0xd80624a5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remote is null @connection_manager.c(1180),ERROR" ID="0xd80624e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1183),ERROR" ID="0xd80624fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="name memcpy_s fail @connection_manager.c(1186),ERROR" ID="0xd8062512" />
-                       <MSG STRUCTURE="diag_log_msg10" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16d | %-16d | %-8d | %-8d | @connection_manager.c(1191),INFO" ID="0xd806253d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show conn list end! @connection_manager.c(1196),INFO" ID="0xd8062565" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show ble conn list: @connection_manager.c(1203),INFO" ID="0xd806259d" />
-                       <MSG STRUCTURE="diag_log_msg9" NAME="| %-4s | %-12s | %-10s | %-8s | %-12s | %-12s | %-12s | %-12s  | %-48s | @connection_manager.c(1208),INFO" ID="0xd80625c5" />
-                       <MSG STRUCTURE="diag_log_msg11" NAME="| %-4d | %02x******%02x%02x | %-10d | %-8d | %-12d | %-12d | %-12d | %-12d | %-48s | @connection_manager.c(1221),INFO" ID="0xd806262d" />
-                       <MSG STRUCTURE="diag_log_msg8" NAME="| %-4s | %-12s | %-10s | %-8s | %-12s | %-12s | %-12s | %-12s  | @connection_manager.c(1228),INFO" ID="0xd8062665" />
-                       <MSG STRUCTURE="diag_log_msg10" NAME="| %-4d | %02x******%02x%02x | %-10d | %-8d | %-12d | %-12d | %-12d | %-12d | @connection_manager.c(1234),INFO" ID="0xd8062695" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show ble conn list end! @connection_manager.c(1241),INFO" ID="0xd80626cd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show link mode: @connection_manager.c(1253),INFO" ID="0xd806272d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="| %-4s | %-32s | %-12s | %-16s | @connection_manager.c(1255),INFO" ID="0xd806273d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remote is null @connection_manager.c(1264),ERROR" ID="0xd8062782" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1267),ERROR" ID="0xd806279a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="name memcpy_s fail @connection_manager.c(1270),ERROR" ID="0xd80627b2" />
-                       <MSG STRUCTURE="diag_log_msg7" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16s | @connection_manager.c(1278),INFO" ID="0xd80627f5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show link mode end! @connection_manager.c(1283),INFO" ID="0xd806281d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="set scan mode old=%d new=%d @connection_manager.c(1345),INFO" ID="0xd8062a0d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_set_discovery_mode ret: %x @connection_manager.c(1356),INFO" ID="0xd8062a65" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk_set_discovery_mode mode: %x ret: %x @connection_manager.c(1367),INFO" ID="0xd8062abd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="already in discovery @connection_manager.c(1389),INFO" ID="0xd8062b6d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bt is not enabled @connection_manager.c(1402),WARNING" ID="0xd8062bd3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery already stopped @connection_manager.c(1407),WARNING" ID="0xd8062bfb" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_stop_device_discovery ret=0x%x @connection_manager.c(1412),INFO" ID="0xd8062c25" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery stopped @connection_manager.c(1415),INFO" ID="0xd8062c3d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="not start bt @connection_manager.c(1441),INFO" ID="0xd8062d0d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="param id null @connection_manager.c(1445),INFO" ID="0xd8062d2d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="exist connect audio device @connection_manager.c(1451),INFO" ID="0xd8062d5d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_br_cancel_discovery fail @connection_manager.c(1456),INFO" ID="0xd8062d85" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(1492),INFO" ID="0xd8062ea5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gatt client add conn node memcpy fail. @connection_manager.c(1559),ERROR" ID="0xd80630ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv connect state change cbk arg NULL! @connection_manager.c(1571),ERROR" ID="0xd806311a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect state update memcpy fail. @connection_manager.c(1576),ERROR" ID="0xd8063142" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect node is null. @connection_manager.c(1591),ERROR" ID="0xd80631ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp paired keys cbk param error @connection_manager.c(1608),ERROR" ID="0xd8063242" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="paired keys malloc fail. @connection_manager.c(1614),ERROR" ID="0xd8063272" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="paired keys malloc fail. @connection_manager.c(1619),ERROR" ID="0xd806329a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="pair keys notify, keys addr memcpy fail. @connection_manager.c(1624),ERROR" ID="0xd80632c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="pair keys notify, keys memcpy fail. @connection_manager.c(1631),ERROR" ID="0xd80632fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp paired complete cbk param error @connection_manager.c(1648),ERROR" ID="0xd8063382" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update incomes arg is NULL! @connection_manager.c(1659),ERROR" ID="0xd80633da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update, conn_node not found. @connection_manager.c(1666),ERROR" ID="0xd8063412" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update,connect_params NULL. @connection_manager.c(1672),ERROR" ID="0xd8063442" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update, addr memcpy fail. @connection_manager.c(1678),ERROR" ID="0xd8063472" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="connect param update done ret:%d. @connection_manager.c(1687),INFO" ID="0xd80634bd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_ble_connect_remote_device not start bt @connection_manager.c(1696),INFO" ID="0xd8063505" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_ble_connect_remote_device param id null @connection_manager.c(1700),INFO" ID="0xd8063525" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][INFO] addr memcpy to param fail. @connection_manager.c(1706),INFO" ID="0xd8063555" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv]addr memcpy fail. @connection_manager.c(1724),INFO" ID="0xd80635e5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1741),ERROR" ID="0xd806366a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read remote device rssi, conn_node not found. @connection_manager.c(1760),ERROR" ID="0xd8063702" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="read remote device rssi fail @connection_manager.c(1765),ERROR" ID="0xd806372a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="conn_node not found. @connection_manager.c(1779),ERROR" ID="0xd806379a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="osal_mutex_init in g_connect_list_lock failed @connection_manager.c(114),ERROR" ID="0xd8060392" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="create timer error! ret: %x @connection_manager.c(187),ERROR" ID="0xd80605da" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="start timer error! ret: %x @connection_manager.c(195),ERROR" ID="0xd806061a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="start timer success! @connection_manager.c(200),INFO" ID="0xd8060645" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="already in discovery @connection_manager.c(219),WARNING" ID="0xd80606db" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="max_num invalid. %u @connection_manager.c(223),WARNING" ID="0xd80606fb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="already in discovery @connection_manager.c(235),WARNING" ID="0xd806075b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="start discovery fail ret: %x @connection_manager.c(249),ERROR" ID="0xd80607ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery started @connection_manager.c(257),INFO" ID="0xd806080d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="reconnect phone con_hdl:0x%x, result: %08x @connection_manager.c(374),INFO" ID="0xd8060bb5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="exist connect phone reject! @connection_manager.c(402),INFO" ID="0xd8060c95" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(423),ERROR" ID="0xd8060d3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(427),ERROR" ID="0xd8060d5a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(433),ERROR" ID="0xd8060d8a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="create acl cfm ret = %08x @connection_manager.c(441),INFO" ID="0xd8060dcd" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="dev_hdl: 0x%08x cod: 0x%x link_type: 0x%x @connection_manager.c(470),INFO" ID="0xd8060eb5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="already exist conn_node @connection_manager.c(480),INFO" ID="0xd8060f05" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="accept not paired earbuds. @connection_manager.c(489),INFO" ID="0xd8060f4d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="exist same type conn node. @connection_manager.c(493),INFO" ID="0xd8060f6d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="add conn info error! @connection_manager.c(500),ERROR" ID="0xd8060fa2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(507),INFO" ID="0xd8060fdd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(515),ERROR" ID="0xd806101a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(522),ERROR" ID="0xd8061052" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(527),ERROR" ID="0xd806107a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(533),ERROR" ID="0xd80610aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect exist conn_node @connection_manager.c(549),INFO" ID="0xd806112d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="exist same type conn_node, disconnect. @connection_manager.c(555),INFO" ID="0xd806115d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="find remote node fail @connection_manager.c(563),WARNING" ID="0xd806119b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="add conn info error! @connection_manager.c(570),ERROR" ID="0xd80611d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="create acl ret = %08x @connection_manager.c(582),WARNING" ID="0xd8061233" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="acl is connected @connection_manager.c(590),INFO" ID="0xd8061275" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(599),INFO" ID="0xd80612bd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="not exist conn node. @connection_manager.c(602),INFO" ID="0xd80612d5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="is phone=0x%x @connection_manager.c(605),INFO" ID="0xd80612ed" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="status error dev_hdl: %x status: %d @connection_manager.c(608),WARNING" ID="0xd8061303" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(648),INFO" ID="0xd8061445" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="send msg connecting @connection_manager.c(680),INFO" ID="0xd8061545" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(684),ERROR" ID="0xd8061562" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(688),ERROR" ID="0xd8061582" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(694),ERROR" ID="0xd80615b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="send msg connecting success! @connection_manager.c(697),INFO" ID="0xd80615cd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="stop timer @connection_manager.c(702),INFO" ID="0xd80615f5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="stop timer success! @connection_manager.c(710),INFO" ID="0xd8061635" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="start timer @connection_manager.c(715),INFO" ID="0xd806165d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(725),ERROR" ID="0xd80616aa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="create timer error! ret: %x @connection_manager.c(730),ERROR" ID="0xd80616d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="start timer error! ret: %x @connection_manager.c(736),ERROR" ID="0xd8061702" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="start timer success! try to reconnect %d times interval %dms @connection_manager.c(741),INFO" ID="0xd806172d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x reason: %08x @connection_manager.c(778),INFO" ID="0xd8061855" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="no conn record dev_hdl: %08x @connection_manager.c(787),WARNING" ID="0xd806189b" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="rmt device class=0x%x is phone: 0x%x @connection_manager.c(797),INFO" ID="0xd80618ed" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(810),WARNING" ID="0xd8061953" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="get remote dev addr failed. dev_hdl: %x @connection_manager.c(824),WARNING" ID="0xd80619c3" />
+                       <MSG STRUCTURE="diag_log_msg6" NAME="addr: ****%02x%02x%02x%02x dev_hdl: %08x gap_remove_pair ret(bool): %d @connection_manager.c(833),INFO" ID="0xd8061a0d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="error dev_hdl: %x pair_ret: %x disconn_ret: %x @connection_manager.c(842),WARNING" ID="0xd8061a53" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(849),INFO" ID="0xd8061a8d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="conn node is null dev_hdl: %x @connection_manager.c(853),INFO" ID="0xd8061aad" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="status error dev_hdl: %x status: %d @connection_manager.c(859),INFO" ID="0xd8061add" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %08x @connection_manager.c(873),INFO" ID="0xd8061b4d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get addr fail @connection_manager.c(881),WARNING" ID="0xd8061b8b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="rmt device is phone @connection_manager.c(888),INFO" ID="0xd8061bc5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="rmt device is not phone @connection_manager.c(891),INFO" ID="0xd8061bdd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="node not exist @connection_manager.c(902),INFO" ID="0xd8061c35" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="success @connection_manager.c(910),INFO" ID="0xd8061c75" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="descovery result @connection_manager.c(973),INFO" ID="0xd8061e6d" />
+                       <MSG STRUCTURE="diag_log_msg5" NAME="found device addr: ****%02x%02x%02x%02x name: %s @connection_manager.c(982),INFO" ID="0xd8061eb5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_get_device_name failed @connection_manager.c(984),INFO" ID="0xd8061ec5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get device name fail @connection_manager.c(1009),WARNING" ID="0xd8061f8b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id: %d @connection_manager.c(1078),WARNING" ID="0xd80621b3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="set discovery status to stop @connection_manager.c(1096),INFO" ID="0xd8062245" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id: %d @connection_manager.c(1167),WARNING" ID="0xd806247b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show conn list: @connection_manager.c(1188),INFO" ID="0xd8062525" />
+                       <MSG STRUCTURE="diag_log_msg7" NAME="| %-4s | %-32s | %-12s | %-16s | %-16s | %-8s | %-8s | @connection_manager.c(1190),INFO" ID="0xd8062535" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remote is null @connection_manager.c(1198),ERROR" ID="0xd8062572" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1201),ERROR" ID="0xd806258a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="name memcpy_s fail @connection_manager.c(1204),ERROR" ID="0xd80625a2" />
+                       <MSG STRUCTURE="diag_log_msg10" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16d | %-16d | %-8d | %-8d | @connection_manager.c(1209),INFO" ID="0xd80625cd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show conn list end! @connection_manager.c(1214),INFO" ID="0xd80625f5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show ble conn list: @connection_manager.c(1221),INFO" ID="0xd806262d" />
+                       <MSG STRUCTURE="diag_log_msg9" NAME="| %-4s | %-12s | %-10s | %-8s | %-12s | %-12s | %-12s | %-12s  | %-48s | @connection_manager.c(1226),INFO" ID="0xd8062655" />
+                       <MSG STRUCTURE="diag_log_msg11" NAME="| %-4d | %02x******%02x%02x | %-10d | %-8d | %-12d | %-12d | %-12d | %-12d | %-48s | @connection_manager.c(1239),INFO" ID="0xd80626bd" />
+                       <MSG STRUCTURE="diag_log_msg8" NAME="| %-4s | %-12s | %-10s | %-8s | %-12s | %-12s | %-12s | %-12s  | @connection_manager.c(1246),INFO" ID="0xd80626f5" />
+                       <MSG STRUCTURE="diag_log_msg10" NAME="| %-4d | %02x******%02x%02x | %-10d | %-8d | %-12d | %-12d | %-12d | %-12d | @connection_manager.c(1252),INFO" ID="0xd8062725" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show ble conn list end! @connection_manager.c(1259),INFO" ID="0xd806275d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show link mode: @connection_manager.c(1271),INFO" ID="0xd80627bd" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="| %-4s | %-32s | %-12s | %-16s | @connection_manager.c(1273),INFO" ID="0xd80627cd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remote is null @connection_manager.c(1282),ERROR" ID="0xd8062812" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1285),ERROR" ID="0xd806282a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="name memcpy_s fail @connection_manager.c(1288),ERROR" ID="0xd8062842" />
+                       <MSG STRUCTURE="diag_log_msg7" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16s | @connection_manager.c(1296),INFO" ID="0xd8062885" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show link mode end! @connection_manager.c(1301),INFO" ID="0xd80628ad" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="set scan mode old=%d new=%d @connection_manager.c(1363),INFO" ID="0xd8062a9d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_set_discovery_mode ret: %x @connection_manager.c(1374),INFO" ID="0xd8062af5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk_set_discovery_mode mode: %x ret: %x @connection_manager.c(1385),INFO" ID="0xd8062b4d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="already in discovery @connection_manager.c(1407),INFO" ID="0xd8062bfd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bt is not enabled @connection_manager.c(1420),WARNING" ID="0xd8062c63" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery already stopped @connection_manager.c(1425),WARNING" ID="0xd8062c8b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_stop_device_discovery ret=0x%x @connection_manager.c(1430),INFO" ID="0xd8062cb5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="discovery stopped @connection_manager.c(1433),INFO" ID="0xd8062ccd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="not start bt @connection_manager.c(1459),INFO" ID="0xd8062d9d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="param id null @connection_manager.c(1463),INFO" ID="0xd8062dbd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="exist connect audio device @connection_manager.c(1469),INFO" ID="0xd8062ded" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_br_cancel_discovery fail @connection_manager.c(1474),INFO" ID="0xd8062e15" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @connection_manager.c(1510),INFO" ID="0xd8062f35" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] gatt client add conn node memcpy fail. @connection_manager.c(1577),ERROR" ID="0xd806314a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv connect state change cbk arg NULL! @connection_manager.c(1589),ERROR" ID="0xd80631aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect state update memcpy fail. @connection_manager.c(1594),ERROR" ID="0xd80631d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect node is null. @connection_manager.c(1609),ERROR" ID="0xd806324a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp paired keys cbk param error @connection_manager.c(1626),ERROR" ID="0xd80632d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="paired keys malloc fail. @connection_manager.c(1632),ERROR" ID="0xd8063302" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="paired keys malloc fail. @connection_manager.c(1637),ERROR" ID="0xd806332a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="pair keys notify, keys addr memcpy fail. @connection_manager.c(1642),ERROR" ID="0xd8063352" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="pair keys notify, keys memcpy fail. @connection_manager.c(1649),ERROR" ID="0xd806338a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp paired complete cbk param error @connection_manager.c(1666),ERROR" ID="0xd8063412" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update incomes arg is NULL! @connection_manager.c(1677),ERROR" ID="0xd806346a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update, conn_node not found. @connection_manager.c(1684),ERROR" ID="0xd80634a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update,connect_params NULL. @connection_manager.c(1690),ERROR" ID="0xd80634d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="connect param update, addr memcpy fail. @connection_manager.c(1696),ERROR" ID="0xd8063502" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="connect param update done ret:%d. @connection_manager.c(1705),INFO" ID="0xd806354d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_ble_connect_remote_device not start bt @connection_manager.c(1714),INFO" ID="0xd8063595" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_ble_connect_remote_device param id null @connection_manager.c(1718),INFO" ID="0xd80635b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][INFO] addr memcpy to param fail. @connection_manager.c(1724),INFO" ID="0xd80635e5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv]addr memcpy fail. @connection_manager.c(1742),INFO" ID="0xd8063675" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="addr memcpy_s fail @connection_manager.c(1759),ERROR" ID="0xd80636fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read remote device rssi, conn_node not found. @connection_manager.c(1778),ERROR" ID="0xd8063792" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read remote device rssi fail @connection_manager.c(1783),ERROR" ID="0xd80637ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="conn_node not found. @connection_manager.c(1797),ERROR" ID="0xd806382a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="auto reconnect is enabled, close it first. @connection_manager.c(1820),ERROR" ID="0xd80638e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @connection_manager.c(1825),ERROR" ID="0xd806390a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @connection_manager.c(1829),ERROR" ID="0xd806392a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @connection_manager.c(1836),ERROR" ID="0xd8063962" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="send msg connecting success! @connection_manager.c(1839),INFO" ID="0xd806397d" />
                        </MSG_LOG>
\ No newline at end of file
index b261f5f..927a87a 100644 (file)
@@ -1,6 +1,6 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Failed to RenderForDescriptor because the result value is undefined. @descriptor_utils.cpp(94),ERROR" ID="0xe0ca02f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="delete native view pointer from native element failed. @descriptor_utils.cpp(193),WARNING" ID="0xe0ca060b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to create descriptor because the type argument is null or empty. @descriptor_utils.cpp(211),ERROR" ID="0xe0ca069a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to create descriptor because the getter argument is not a function. @descriptor_utils.cpp(216),ERROR" ID="0xe0ca06c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to create descriptor because the render argument is not a function. @descriptor_utils.cpp(221),ERROR" ID="0xe0ca06ea" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Failed to RenderForDescriptor because the result value is undefined. @descriptor_utils.cpp(94),ERROR" ID="0xe0ce02f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="delete native view pointer from native element failed. @descriptor_utils.cpp(193),WARNING" ID="0xe0ce060b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to create descriptor because the type argument is null or empty. @descriptor_utils.cpp(211),ERROR" ID="0xe0ce069a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to create descriptor because the getter argument is not a function. @descriptor_utils.cpp(216),ERROR" ID="0xe0ce06c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to create descriptor because the render argument is not a function. @descriptor_utils.cpp(221),ERROR" ID="0xe0ce06ea" />
                        </MSG_LOG>
\ No newline at end of file
index 8749a49..3e6f360 100644 (file)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for path failed. @dft_impl.cpp(43),ERROR" ID="0xe058015a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for path failed. @dft_impl.cpp(43),ERROR" ID="0xe05c015a" />
                        </MSG_LOG>
\ No newline at end of file
index 33085c0..bd45882 100644 (file)
@@ -1,9 +1,9 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[Error value to string failed] @dfx_assist.cpp(36),ERROR" ID="0xe05a0122" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error message too long] @dfx_assist.cpp(43),ERROR" ID="0xe05a015a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc memory failed! @dfx_assist.cpp(50),ERROR" ID="0xe05a0192" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME=" [JS Error]: %s @dfx_assist.cpp(57),ERROR" ID="0xe05a01ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc memory failed! @dfx_assist.cpp(95),ERROR" ID="0xe05a02fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Exception backtrace]: @dfx_assist.cpp(99),ERROR" ID="0xe05a031a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="%u: [Backtrace string too long] @dfx_assist.cpp(108),ERROR" ID="0xe05a0362" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="%u: %s @dfx_assist.cpp(112),ERROR" ID="0xe05a0382" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[Error value to string failed] @dfx_assist.cpp(36),ERROR" ID="0xe05e0122" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error message too long] @dfx_assist.cpp(43),ERROR" ID="0xe05e015a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc memory failed! @dfx_assist.cpp(50),ERROR" ID="0xe05e0192" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME=" [JS Error]: %s @dfx_assist.cpp(57),ERROR" ID="0xe05e01ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc memory failed! @dfx_assist.cpp(95),ERROR" ID="0xe05e02fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Exception backtrace]: @dfx_assist.cpp(99),ERROR" ID="0xe05e031a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="%u: [Backtrace string too long] @dfx_assist.cpp(108),ERROR" ID="0xe05e0362" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="%u: %s @dfx_assist.cpp(112),ERROR" ID="0xe05e0382" />
                        </MSG_LOG>
\ No newline at end of file
index 2af67a1..fb1e68e 100644 (file)
@@ -1,9 +1,9 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="failed to execute the callback function of event. @event_util.cpp(42),ERROR" ID="0xe05c0152" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="failed to execute the callback function of event. @event_util.cpp(48),ERROR" ID="0xe05c0182" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="failed to set direction attribute for event argument. @event_util.cpp(113),ERROR" ID="0xe05c038a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to invoke event callback. @event_util.cpp(132),ERROR" ID="0xe05c0422" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="EventUtil::InvokeCallback failed: Async task dispatch failure. @event_util.cpp(142),ERROR" ID="0xe05c0472" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get element by UI view. @event_util.cpp(151),ERROR" ID="0xe05c04ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get element by UI view. @event_util.cpp(156),ERROR" ID="0xe05c04e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get element by UI view. @event_util.cpp(161),ERROR" ID="0xe05c050a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="failed to execute the callback function of event. @event_util.cpp(42),ERROR" ID="0xe0600152" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="failed to execute the callback function of event. @event_util.cpp(48),ERROR" ID="0xe0600182" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="failed to set direction attribute for event argument. @event_util.cpp(113),ERROR" ID="0xe060038a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to invoke event callback. @event_util.cpp(132),ERROR" ID="0xe0600422" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="EventUtil::InvokeCallback failed: Async task dispatch failure. @event_util.cpp(142),ERROR" ID="0xe0600472" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get element by UI view. @event_util.cpp(151),ERROR" ID="0xe06004ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get element by UI view. @event_util.cpp(156),ERROR" ID="0xe06004e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get element by UI view. @event_util.cpp(161),ERROR" ID="0xe060050a" />
                        </MSG_LOG>
\ No newline at end of file
index f7dd785..e1b3f67 100644 (file)
@@ -1,4 +1,4 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="hitted by fatal error[%d] @fatal_handler.cpp(56),ERROR" ID="0xe0ba01c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="the JS task is not killed after sleep very long time @fatal_handler.cpp(77),ERROR" ID="0xe0ba026a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="hitted again when handling fatal error @fatal_handler.cpp(157),WARNING" ID="0xe0ba04eb" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="hitted by fatal error[%d] @fatal_handler.cpp(56),ERROR" ID="0xe0be01c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="the JS task is not killed after sleep very long time @fatal_handler.cpp(77),ERROR" ID="0xe0be026a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="hitted again when handling fatal error @fatal_handler.cpp(157),WARNING" ID="0xe0be04eb" />
                        </MSG_LOG>
\ No newline at end of file
index f2218a2..6c735f0 100644 (file)
@@ -1,33 +1,33 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="GtBundleInstaller::PreCheckBundle fileSize = %d @gt_bundle_installer.cpp(65),INFO" ID="0xe042020d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bundleName does not match the appId! @gt_bundle_installer.cpp(91),ERROR" ID="0xe04202da" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] bundle num is %d @gt_bundle_installer.cpp(107),INFO" ID="0xe042035d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] bundle quantity exceeds the limit! @gt_bundle_installer.cpp(110),ERROR" ID="0xe0420372" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] APPVERI_AppVerify is %d @gt_bundle_installer.cpp(126),INFO" ID="0xe04203f5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="VINCENTSS::GtBundleInstaller::Install path = %s @gt_bundle_installer.cpp(181),INFO" ID="0xe04205ad" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] create random str fail! @gt_bundle_installer.cpp(208),ERROR" ID="0xe0420682" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VINCENTSS::GtBundleInstaller::Install 0002 @gt_bundle_installer.cpp(212),INFO" ID="0xe04206a5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode3 = %d @gt_bundle_installer.cpp(216),INFO" ID="0xe04206c5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VINCENTSS::GtBundleInstaller::Install 003 @gt_bundle_installer.cpp(224),INFO" ID="0xe0420705" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VINCENTSS::GtBundleInstaller::ProcessBundleInstall 001 @gt_bundle_installer.cpp(258),INFO" ID="0xe0420815" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode1 = %d @gt_bundle_installer.cpp(263),INFO" ID="0xe042083d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VINCENTSS::GtBundleInstaller::ProcessBundleInstall 002 @gt_bundle_installer.cpp(269),INFO" ID="0xe042086d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode2 = %d @gt_bundle_installer.cpp(273),INFO" ID="0xe042088d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode3 = %d @gt_bundle_installer.cpp(287),INFO" ID="0xe04208fd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode4 = %d @gt_bundle_installer.cpp(304),INFO" ID="0xe0420985" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode5 = %d @gt_bundle_installer.cpp(312),INFO" ID="0xe04209c5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode6 = %d @gt_bundle_installer.cpp(317),INFO" ID="0xe04209ed" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode7 = %d @gt_bundle_installer.cpp(328),INFO" ID="0xe0420a45" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode8 = %d @gt_bundle_installer.cpp(335),INFO" ID="0xe0420a7d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode9 = %d @gt_bundle_installer.cpp(345),INFO" ID="0xe0420acd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode10 = %d @gt_bundle_installer.cpp(352),INFO" ID="0xe0420b05" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode11 = %d @gt_bundle_installer.cpp(361),INFO" ID="0xe0420b4d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode12 = %d @gt_bundle_installer.cpp(367),INFO" ID="0xe0420b7d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] UpdateBundleInfo errorCode = %d @gt_bundle_installer.cpp(369),INFO" ID="0xe0420b8d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] srcRawFilePath is nullptr @gt_bundle_installer.cpp(389),ERROR" ID="0xe0420c2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] rawfile is not exists! @gt_bundle_installer.cpp(394),INFO" ID="0xe0420c55" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] dstRawFilePath is nullptr @gt_bundle_installer.cpp(402),ERROR" ID="0xe0420c92" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] frename rawfile fail! @gt_bundle_installer.cpp(408),ERROR" ID="0xe0420cc2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] transform js to bc when install, result is %d @gt_bundle_installer.cpp(555),INFO" ID="0xe042115d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] ConvertResInfoToBundleInfo errorCode = %d @gt_bundle_installer.cpp(580),INFO" ID="0xe0421225" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] delete permissions, result is %d @gt_bundle_installer.cpp(814),INFO" ID="0xe0421975" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="GtBundleInstaller::PreCheckBundle fileSize = %d @gt_bundle_installer.cpp(66),INFO" ID="0xe0420215" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bundleName does not match the appId! @gt_bundle_installer.cpp(92),ERROR" ID="0xe04202e2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] bundle num is %d @gt_bundle_installer.cpp(108),INFO" ID="0xe0420365" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] bundle quantity exceeds the limit! @gt_bundle_installer.cpp(111),ERROR" ID="0xe042037a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] APPVERI_AppVerify is %d @gt_bundle_installer.cpp(127),INFO" ID="0xe04203fd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="VINCENTSS::GtBundleInstaller::Install path = %s @gt_bundle_installer.cpp(182),INFO" ID="0xe04205b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] create random str fail! @gt_bundle_installer.cpp(209),ERROR" ID="0xe042068a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VINCENTSS::GtBundleInstaller::Install 0002 @gt_bundle_installer.cpp(213),INFO" ID="0xe04206ad" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode3 = %d @gt_bundle_installer.cpp(217),INFO" ID="0xe04206cd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VINCENTSS::GtBundleInstaller::Install 003 @gt_bundle_installer.cpp(225),INFO" ID="0xe042070d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VINCENTSS::GtBundleInstaller::ProcessBundleInstall 001 @gt_bundle_installer.cpp(259),INFO" ID="0xe042081d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode1 = %d @gt_bundle_installer.cpp(264),INFO" ID="0xe0420845" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VINCENTSS::GtBundleInstaller::ProcessBundleInstall 002 @gt_bundle_installer.cpp(270),INFO" ID="0xe0420875" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode2 = %d @gt_bundle_installer.cpp(274),INFO" ID="0xe0420895" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode3 = %d @gt_bundle_installer.cpp(288),INFO" ID="0xe0420905" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode4 = %d @gt_bundle_installer.cpp(305),INFO" ID="0xe042098d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode5 = %d @gt_bundle_installer.cpp(313),INFO" ID="0xe04209cd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode6 = %d @gt_bundle_installer.cpp(318),INFO" ID="0xe04209f5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode7 = %d @gt_bundle_installer.cpp(329),INFO" ID="0xe0420a4d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode8 = %d @gt_bundle_installer.cpp(336),INFO" ID="0xe0420a85" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode9 = %d @gt_bundle_installer.cpp(346),INFO" ID="0xe0420ad5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode10 = %d @gt_bundle_installer.cpp(353),INFO" ID="0xe0420b0d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode11 = %d @gt_bundle_installer.cpp(362),INFO" ID="0xe0420b55" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="errorCode12 = %d @gt_bundle_installer.cpp(368),INFO" ID="0xe0420b85" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] UpdateBundleInfo errorCode = %d @gt_bundle_installer.cpp(370),INFO" ID="0xe0420b95" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] srcRawFilePath is nullptr @gt_bundle_installer.cpp(390),ERROR" ID="0xe0420c32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] rawfile is not exists! @gt_bundle_installer.cpp(395),INFO" ID="0xe0420c5d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] dstRawFilePath is nullptr @gt_bundle_installer.cpp(403),ERROR" ID="0xe0420c9a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] frename rawfile fail! @gt_bundle_installer.cpp(409),ERROR" ID="0xe0420cca" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] transform js to bc when install, result is %d @gt_bundle_installer.cpp(556),INFO" ID="0xe0421165" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] ConvertResInfoToBundleInfo errorCode = %d @gt_bundle_installer.cpp(581),INFO" ID="0xe042122d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] delete permissions, result is %d @gt_bundle_installer.cpp(815),INFO" ID="0xe042197d" />
                        </MSG_LOG>
\ No newline at end of file
index 4651a24..0b41cd5 100644 (file)
@@ -30,5 +30,4 @@
                        <MSG STRUCTURE="diag_log_msg1" NAME="[BMS] delete byte code, result is %d @gt_bundle_manager_service.cpp(809),INFO" ID="0xe044194d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] add transform result record fail when restart! @gt_bundle_manager_service.cpp(822),ERROR" ID="0xe04419b2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BMS] refresh transform result record fail when restart! @gt_bundle_manager_service.cpp(828),ERROR" ID="0xe04419e2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="current sign mode is %d @gt_bundle_manager_service.cpp(1070),INFO" ID="0xe0442175" />
                        </MSG_LOG>
\ No newline at end of file
index e6d452d..2777196 100644 (file)
@@ -1,13 +1,32 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Invalid file path. @image_cache_manager.cpp(50),ERROR" ID="0xcb1c0192" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="File(%s) can not open. errno: %d @image_cache_manager.cpp(56),ERROR" ID="0xcb1c01c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ResId is invalid. @image_cache_manager.cpp(65),ERROR" ID="0xcb1c020a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="DirId can not match @image_cache_manager.cpp(70),ERROR" ID="0xcb1c0232" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ResId is out of the range @image_cache_manager.cpp(75),ERROR" ID="0xcb1c025a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="Invalid file path: %s @image_cache_manager.cpp(49),ERROR" ID="0xcb1c018a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="File(%s) can not open. errno: %d @image_cache_manager.cpp(55),ERROR" ID="0xcb1c01ba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ResId is invalid: 0x%x @image_cache_manager.cpp(64),ERROR" ID="0xcb1c0202" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="DirId can not match: resId: 0x%x, dirId: 0x%x @image_cache_manager.cpp(69),ERROR" ID="0xcb1c022a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ResId is out of the range: 0x%x @image_cache_manager.cpp(74),ERROR" ID="0xcb1c0252" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="multiImgInfo is nullptr! @image_cache_manager.cpp(95),ERROR" ID="0xcb1c02fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc node failed! @image_cache_manager.cpp(105),ERROR" ID="0xcb1c034a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="multiImgInfo.info is nullptr @image_cache_manager.cpp(115),ERROR" ID="0xcb1c039a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is already loaded. @image_cache_manager.cpp(354),WARNING" ID="0xcb1c0b13" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(529),ERROR" ID="0xcb1c108a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(557),ERROR" ID="0xcb1c116a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(584),ERROR" ID="0xcb1c1242" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(599),ERROR" ID="0xcb1c12ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(687),ERROR" ID="0xcb1c157a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for node failed! @image_cache_manager.cpp(155),ERROR" ID="0xcb1c04da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ImageCacheMalloc for img data failed! @image_cache_manager.cpp(163),ERROR" ID="0xcb1c051a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(228),ERROR" ID="0xcb1c0722" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="fread info header failed! @image_cache_manager.cpp(236),ERROR" ID="0xcb1c0762" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadAllImgInfo failed! @image_cache_manager.cpp(262),ERROR" ID="0xcb1c0832" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadSingleImgInfo failed! node is nullptr or imgIndex is invalid. @image_cache_manager.cpp(270),ERROR" ID="0xcb1c0872" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(292),ERROR" ID="0xcb1c0922" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadSingleImgInfo failed! @image_cache_manager.cpp(320),ERROR" ID="0xcb1c0a02" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="LoadAllInMultiRes failed! Open file failed: %s @image_cache_manager.cpp(331),ERROR" ID="0xcb1c0a5a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="fread bin header failed! @image_cache_manager.cpp(343),ERROR" ID="0xcb1c0aba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="LoadAllImgInfo failed! @image_cache_manager.cpp(362),ERROR" ID="0xcb1c0b52" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="LoadAllInMultiRes failed! file: %s @image_cache_manager.cpp(377),ERROR" ID="0xcb1c0bca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is already loaded. @image_cache_manager.cpp(385),WARNING" ID="0xcb1c0c0b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(403),ERROR" ID="0xcb1c0c9a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy info header failed! @image_cache_manager.cpp(407),ERROR" ID="0xcb1c0cba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy img data failed! @image_cache_manager.cpp(412),ERROR" ID="0xcb1c0ce2" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="LoadOneInMultiRes failed! resId: 0x%x, file: %s @image_cache_manager.cpp(499),ERROR" ID="0xcb1c0f9a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(513),ERROR" ID="0xcb1c100a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="Res file is not loaded: %s @image_cache_manager.cpp(570),ERROR" ID="0xcb1c11d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(598),ERROR" ID="0xcb1c12b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="Res file is not loaded: %s @image_cache_manager.cpp(625),ERROR" ID="0xcb1c138a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Res file is not loaded. @image_cache_manager.cpp(640),ERROR" ID="0xcb1c1402" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="CreateImageNode failed! @image_cache_manager.cpp(687),ERROR" ID="0xcb1c157a" />
                        </MSG_LOG>
\ No newline at end of file
index 7d25e5b..c0397f6 100644 (file)
@@ -1,16 +1,16 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="available free size: %d @js_ability.cpp(56),DBG" ID="0xe0bc01c6" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Launch only can be triggered once @js_ability.cpp(64),ERROR" ID="0xe0bc0202" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="invalid app path @js_ability.cpp(70),ERROR" ID="0xe0bc0232" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="invalid bundle name @js_ability.cpp(76),ERROR" ID="0xe0bc0262" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Create JSAbilityRuntime failed @js_ability.cpp(91),ERROR" ID="0xe0bc02da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Must trigger Launch first @js_ability.cpp(109),ERROR" ID="0xe0bc036a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="LIFECYCLE: JS Ability will be shown @js_ability.cpp(113),INFO" ID="0xe0bc038d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Must trigger Launch first @js_ability.cpp(124),ERROR" ID="0xe0bc03e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="LIFECYCLE: JS Ability will be hidden @js_ability.cpp(127),INFO" ID="0xe0bc03fd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Must trigger Launch first @js_ability.cpp(138),ERROR" ID="0xe0bc0452" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="LIFECYCLE: JS Ability is exiting @js_ability.cpp(142),INFO" ID="0xe0bc0475" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Fail to recover screen visible property @js_ability.cpp(152),ERROR" ID="0xe0bc04c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Must trigger Launch first @js_ability.cpp(167),ERROR" ID="0xe0bc053a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ForceDestroy interface is deprecated as JS engine can not run on other task @js_ability.cpp(183),ERROR" ID="0xe0bc05ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSAbility::HandleRenderTick js app is not forground @js_ability.cpp(218),ERROR" ID="0xe0bc06d2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="available free size: %d @js_ability.cpp(56),DBG" ID="0xe0c001c6" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Launch only can be triggered once @js_ability.cpp(64),ERROR" ID="0xe0c00202" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="invalid app path @js_ability.cpp(70),ERROR" ID="0xe0c00232" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="invalid bundle name @js_ability.cpp(76),ERROR" ID="0xe0c00262" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Create JSAbilityRuntime failed @js_ability.cpp(91),ERROR" ID="0xe0c002da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Must trigger Launch first @js_ability.cpp(109),ERROR" ID="0xe0c0036a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="LIFECYCLE: JS Ability will be shown @js_ability.cpp(113),INFO" ID="0xe0c0038d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Must trigger Launch first @js_ability.cpp(124),ERROR" ID="0xe0c003e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="LIFECYCLE: JS Ability will be hidden @js_ability.cpp(127),INFO" ID="0xe0c003fd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Must trigger Launch first @js_ability.cpp(138),ERROR" ID="0xe0c00452" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="LIFECYCLE: JS Ability is exiting @js_ability.cpp(142),INFO" ID="0xe0c00475" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Fail to recover screen visible property @js_ability.cpp(152),ERROR" ID="0xe0c004c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Must trigger Launch first @js_ability.cpp(167),ERROR" ID="0xe0c0053a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ForceDestroy interface is deprecated as JS engine can not run on other task @js_ability.cpp(183),ERROR" ID="0xe0c005ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSAbility::HandleRenderTick js app is not forground @js_ability.cpp(218),ERROR" ID="0xe0c006d2" />
                        </MSG_LOG>
\ No newline at end of file
index 29f309b..2f88837 100644 (file)
@@ -1,8 +1,8 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="invalid input parameters @js_ability_impl.cpp(35),ERROR" ID="0xe0be011a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="already initialized, return @js_ability_impl.cpp(40),ERROR" ID="0xe0be0142" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="relocate js file failed @js_ability_impl.cpp(62),ERROR" ID="0xe0be01f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc router heap memory failed. @js_ability_impl.cpp(75),ERROR" ID="0xe0be025a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="no router instance to perform the show request @js_ability_impl.cpp(135),ERROR" ID="0xe0be043a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="no router instance to perform the hide request @js_ability_impl.cpp(144),ERROR" ID="0xe0be0482" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="view model is undefined when call user's init @js_ability_impl.cpp(164),ERROR" ID="0xe0be0522" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="invalid input parameters @js_ability_impl.cpp(35),ERROR" ID="0xe0c2011a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="already initialized, return @js_ability_impl.cpp(40),ERROR" ID="0xe0c20142" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="relocate js file failed @js_ability_impl.cpp(62),ERROR" ID="0xe0c201f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc router heap memory failed. @js_ability_impl.cpp(77),ERROR" ID="0xe0c2026a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="no router instance to perform the show request @js_ability_impl.cpp(137),ERROR" ID="0xe0c2044a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="no router instance to perform the hide request @js_ability_impl.cpp(146),ERROR" ID="0xe0c20492" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="view model is undefined when call user's init @js_ability_impl.cpp(166),ERROR" ID="0xe0c20532" />
                        </MSG_LOG>
\ No newline at end of file
index c56e1a8..e2684fa 100644 (file)
@@ -1,15 +1,15 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="invalid snapshot version[%{public}d] @js_app_context.cpp(65),ERROR" ID="0xe0c0020a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to eval js code cause by empty JavaScript script. @js_app_context.cpp(75),ERROR" ID="0xe0c0025a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="empty js file or length is incorrect, eval user code failed @js_app_context.cpp(86),ERROR" ID="0xe0c002b2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="JS mode changed unexpected [%{public}d] @js_app_context.cpp(161),ERROR" ID="0xe0c0050a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to render app cause by render error. @js_app_context.cpp(180),ERROR" ID="0xe0c005a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Nothing to render as it is undefined. @js_app_context.cpp(185),ERROR" ID="0xe0c005ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for current ability path failed @js_app_context.cpp(222),ERROR" ID="0xe0c006f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for current uuid failed @js_app_context.cpp(239),ERROR" ID="0xe0c0077a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for current js path failed @js_app_context.cpp(269),ERROR" ID="0xe0c0086a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="uri is null. @js_app_context.cpp(302),ERROR" ID="0xe0c00972" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="uri is empty or too long. @js_app_context.cpp(307),ERROR" ID="0xe0c0099a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get resource path. @js_app_context.cpp(313),ERROR" ID="0xe0c009ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get resource path. @js_app_context.cpp(320),ERROR" ID="0xe0c00a02" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get resource path. @js_app_context.cpp(325),ERROR" ID="0xe0c00a2a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="invalid snapshot version[%{public}d] @js_app_context.cpp(65),ERROR" ID="0xe0c4020a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to eval js code cause by empty JavaScript script. @js_app_context.cpp(75),ERROR" ID="0xe0c4025a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="empty js file or length is incorrect, eval user code failed @js_app_context.cpp(86),ERROR" ID="0xe0c402b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="JS mode changed unexpected [%{public}d] @js_app_context.cpp(161),ERROR" ID="0xe0c4050a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to render app cause by render error. @js_app_context.cpp(180),ERROR" ID="0xe0c405a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Nothing to render as it is undefined. @js_app_context.cpp(185),ERROR" ID="0xe0c405ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for current ability path failed @js_app_context.cpp(222),ERROR" ID="0xe0c406f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for current uuid failed @js_app_context.cpp(239),ERROR" ID="0xe0c4077a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for current js path failed @js_app_context.cpp(269),ERROR" ID="0xe0c4086a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="uri is null. @js_app_context.cpp(302),ERROR" ID="0xe0c40972" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="uri is empty or too long. @js_app_context.cpp(307),ERROR" ID="0xe0c4099a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get resource path. @js_app_context.cpp(313),ERROR" ID="0xe0c409ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get resource path. @js_app_context.cpp(320),ERROR" ID="0xe0c40a02" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="fail to get resource path. @js_app_context.cpp(325),ERROR" ID="0xe0c40a2a" />
                        </MSG_LOG>
\ No newline at end of file
index b37a76d..edbeccf 100644 (file)
@@ -1,6 +1,6 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="JsAppEnvironment::JsAppEnvironment @js_app_environment.cpp(47),DBG" ID="0xe0c2017e" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to load JavaScript framework. @js_app_environment.cpp(108),ERROR" ID="0xe0c20362" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Success to load JavaScript framework. @js_app_environment.cpp(112),INFO" ID="0xe0c20385" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ACELite is running in snapshot mode @js_app_environment.cpp(141),DBG" ID="0xe0c2046e" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ACELite is running in JS parser mode @js_app_environment.cpp(143),DBG" ID="0xe0c2047e" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="JsAppEnvironment::JsAppEnvironment @js_app_environment.cpp(48),DBG" ID="0xe0c60186" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to load JavaScript framework. @js_app_environment.cpp(110),ERROR" ID="0xe0c60372" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Success to load JavaScript framework. @js_app_environment.cpp(114),INFO" ID="0xe0c60395" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ACELite is running in snapshot mode @js_app_environment.cpp(143),DBG" ID="0xe0c6047e" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ACELite is running in JS parser mode @js_app_environment.cpp(145),DBG" ID="0xe0c6048e" />
                        </MSG_LOG>
\ No newline at end of file
index 5b1487d..14b5042 100644 (file)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="please connect to debugger server with localhost:%d @js_debugger_config.cpp(56),INFO" ID="0xe05e01c5" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="please connect to debugger server with localhost:%d @js_debugger_config.cpp(56),INFO" ID="0xe06201c5" />
                        </MSG_LOG>
\ No newline at end of file
index 3b0d444..8bfb5fa 100644 (file)
@@ -1,46 +1,46 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="js value is not bool. @js_fwk_common.cpp(99),ERROR" ID="0xe060031a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to set function property cause by empty name. @js_fwk_common.cpp(110),ERROR" ID="0xe0600372" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to set function property cause by empty handler. @js_fwk_common.cpp(115),ERROR" ID="0xe060039a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="jerry_value_to_string failed, can not continue to generate char buffer @js_fwk_common.cpp(149),ERROR" ID="0xe06004aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for convert jerry string failed @js_fwk_common.cpp(159),ERROR" ID="0xe06004fa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="jerry string to char buffer failed, target size[%d] @js_fwk_common.cpp(170),ERROR" ID="0xe0600552" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="js value is not bool. @js_fwk_common.cpp(190),ERROR" ID="0xe06005f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="js number value is out of range. @js_fwk_common.cpp(208),DBG" ID="0xe0600686" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="js number value is out of range. @js_fwk_common.cpp(212),DBG" ID="0xe06006a6" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="cstr is nullptr. @js_fwk_common.cpp(226),ERROR" ID="0xe0600712" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="secLength is too long. @js_fwk_common.cpp(409),ERROR" ID="0xe0600cca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="append path error @js_fwk_common.cpp(433),ERROR" ID="0xe0600d8a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="error happen when append path @js_fwk_common.cpp(443),ERROR" ID="0xe0600dda" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="input path or fileName is invalid @js_fwk_common.cpp(460),ERROR" ID="0xe0600e62" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="input path or fileName is too long @js_fwk_common.cpp(467),ERROR" ID="0xe0600e9a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="malloc buffer for path failed, needed length[%u] @js_fwk_common.cpp(475),ERROR" ID="0xe0600eda" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc dirPath memory heap failed. @js_fwk_common.cpp(519),ERROR" ID="0xe060103a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="file doesn't exit or it's empty, [%s] @js_fwk_common.cpp(596),ERROR" ID="0xe06012a2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="realpath handle failed, [%s] @js_fwk_common.cpp(613),ERROR" ID="0xe060132a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="file name too long. @js_fwk_common.cpp(631),ERROR" ID="0xe06013ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="splice trace data failed. @js_fwk_common.cpp(639),ERROR" ID="0xe06013fa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="open file[%s] failed for reading. @js_fwk_common.cpp(655),ERROR" ID="0xe060147a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="open file[fd: %d] failed for reading @js_fwk_common.cpp(687),ERROR" ID="0xe060157a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="open file[path: %s] failed for reading @js_fwk_common.cpp(688),ERROR" ID="0xe0601582" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="malloc buffer for file content failed, file length[%d] @js_fwk_common.cpp(694),ERROR" ID="0xe06015b2" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="read fail, count(%d), length(%u), path(%s) @js_fwk_common.cpp(703),ERROR" ID="0xe06015fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="error index.js file path after locate @js_fwk_common.cpp(732),ERROR" ID="0xe06016e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="empty index.js file path after locate @js_fwk_common.cpp(737),ERROR" ID="0xe060170a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="malloc buffer for file path calculating from url, file length[%d] @js_fwk_common.cpp(807),ERROR" ID="0xe060193a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="append path error when calculating from url @js_fwk_common.cpp(811),ERROR" ID="0xe060195a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="watcher is undefined when inserting a watcher. @js_fwk_common.cpp(847),ERROR" ID="0xe0601a7a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc memory watcher failed. @js_fwk_common.cpp(854),ERROR" ID="0xe0601ab2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="No component binds element. @js_fwk_common.cpp(945),ERROR" ID="0xe0601d8a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="malloc buffer for path failed, needed length[%u] @js_fwk_common.cpp(1177),ERROR" ID="0xe06024ca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="use strcpy_s secure function errro(%d) @js_fwk_common.cpp(1184),ERROR" ID="0xe0602502" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get imagePath failed! @js_fwk_common.cpp(1221),ERROR" ID="0xe060262a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="malloc buffer for path failed, needed length[%u] @js_fwk_common.cpp(1250),ERROR" ID="0xe0602712" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="strcat_s failed! @js_fwk_common.cpp(1257),ERROR" ID="0xe060274a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="the image suffix error, please check! @js_fwk_common.cpp(1263),ERROR" ID="0xe060277a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to parse image src cause by empty source. @js_fwk_common.cpp(1277),ERROR" ID="0xe06027ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to parse image src cause by empty source. @js_fwk_common.cpp(1281),ERROR" ID="0xe060280a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Relative path is not allowed in image src. @js_fwk_common.cpp(1288),ERROR" ID="0xe0602842" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="the fontFamily is too long @js_fwk_common.cpp(1313),ERROR" ID="0xe060290a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc string failed @js_fwk_common.cpp(1319),ERROR" ID="0xe060293a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="copy fontFamily failed @js_fwk_common.cpp(1323),ERROR" ID="0xe060295a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="js value is not bool. @js_fwk_common.cpp(99),ERROR" ID="0xe064031a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to set function property cause by empty name. @js_fwk_common.cpp(110),ERROR" ID="0xe0640372" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to set function property cause by empty handler. @js_fwk_common.cpp(115),ERROR" ID="0xe064039a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="jerry_value_to_string failed, can not continue to generate char buffer @js_fwk_common.cpp(149),ERROR" ID="0xe06404aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc buffer for convert jerry string failed @js_fwk_common.cpp(159),ERROR" ID="0xe06404fa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="jerry string to char buffer failed, target size[%d] @js_fwk_common.cpp(170),ERROR" ID="0xe0640552" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="js value is not bool. @js_fwk_common.cpp(190),ERROR" ID="0xe06405f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="js number value is out of range. @js_fwk_common.cpp(208),DBG" ID="0xe0640686" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="js number value is out of range. @js_fwk_common.cpp(212),DBG" ID="0xe06406a6" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="cstr is nullptr. @js_fwk_common.cpp(226),ERROR" ID="0xe0640712" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="secLength is too long. @js_fwk_common.cpp(409),ERROR" ID="0xe0640cca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="append path error @js_fwk_common.cpp(433),ERROR" ID="0xe0640d8a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="error happen when append path @js_fwk_common.cpp(443),ERROR" ID="0xe0640dda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="input path or fileName is invalid @js_fwk_common.cpp(460),ERROR" ID="0xe0640e62" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="input path or fileName is too long @js_fwk_common.cpp(467),ERROR" ID="0xe0640e9a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="malloc buffer for path failed, needed length[%u] @js_fwk_common.cpp(475),ERROR" ID="0xe0640eda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc dirPath memory heap failed. @js_fwk_common.cpp(519),ERROR" ID="0xe064103a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="file doesn't exit or it's empty, [%s] @js_fwk_common.cpp(596),ERROR" ID="0xe06412a2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="realpath handle failed, [%s] @js_fwk_common.cpp(613),ERROR" ID="0xe064132a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="file name too long. @js_fwk_common.cpp(631),ERROR" ID="0xe06413ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="splice trace data failed. @js_fwk_common.cpp(639),ERROR" ID="0xe06413fa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="open file[%s] failed for reading. @js_fwk_common.cpp(655),ERROR" ID="0xe064147a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="open file[fd: %d] failed for reading @js_fwk_common.cpp(687),ERROR" ID="0xe064157a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="open file[path: %s] failed for reading @js_fwk_common.cpp(688),ERROR" ID="0xe0641582" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="malloc buffer for file content failed, file length[%d] @js_fwk_common.cpp(694),ERROR" ID="0xe06415b2" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="read fail, count(%d), length(%u), path(%s) @js_fwk_common.cpp(703),ERROR" ID="0xe06415fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="error index.js file path after locate @js_fwk_common.cpp(732),ERROR" ID="0xe06416e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="empty index.js file path after locate @js_fwk_common.cpp(737),ERROR" ID="0xe064170a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="malloc buffer for file path calculating from url, file length[%d] @js_fwk_common.cpp(807),ERROR" ID="0xe064193a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="append path error when calculating from url @js_fwk_common.cpp(811),ERROR" ID="0xe064195a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="watcher is undefined when inserting a watcher. @js_fwk_common.cpp(847),ERROR" ID="0xe0641a7a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc memory watcher failed. @js_fwk_common.cpp(854),ERROR" ID="0xe0641ab2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="No component binds element. @js_fwk_common.cpp(945),ERROR" ID="0xe0641d8a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="malloc buffer for path failed, needed length[%u] @js_fwk_common.cpp(1177),ERROR" ID="0xe06424ca" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="use strcpy_s secure function errro(%d) @js_fwk_common.cpp(1184),ERROR" ID="0xe0642502" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get imagePath failed! @js_fwk_common.cpp(1221),ERROR" ID="0xe064262a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="malloc buffer for path failed, needed length[%u] @js_fwk_common.cpp(1250),ERROR" ID="0xe0642712" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="strcat_s failed! @js_fwk_common.cpp(1257),ERROR" ID="0xe064274a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="the image suffix error, please check! @js_fwk_common.cpp(1263),ERROR" ID="0xe064277a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to parse image src cause by empty source. @js_fwk_common.cpp(1277),ERROR" ID="0xe06427ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Failed to parse image src cause by empty source. @js_fwk_common.cpp(1281),ERROR" ID="0xe064280a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Relative path is not allowed in image src. @js_fwk_common.cpp(1288),ERROR" ID="0xe0642842" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="the fontFamily is too long @js_fwk_common.cpp(1313),ERROR" ID="0xe064290a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc string failed @js_fwk_common.cpp(1319),ERROR" ID="0xe064293a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="copy fontFamily failed @js_fwk_common.cpp(1323),ERROR" ID="0xe064295a" />
                        </MSG_LOG>
\ No newline at end of file
index 2b3ff62..4247ae3 100644 (file)
@@ -1,11 +1,11 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="undefined state -&gt; init state @js_page_state.cpp(29),INFO" ID="0xe0fc00ed" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) is invalid when changing undefined state to init state. @js_page_state.cpp(41),ERROR" ID="0xe0fc014a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="init state -&gt; ready state @js_page_state.cpp(49),INFO" ID="0xe0fc018d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) is invalid when changing init state to ready state. @js_page_state.cpp(60),ERROR" ID="0xe0fc01e2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) -&gt; show state @js_page_state.cpp(68),INFO" ID="0xe0fc0225" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) is invalid when changing ready state to show state. @js_page_state.cpp(77),ERROR" ID="0xe0fc026a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) -&gt; background state @js_page_state.cpp(85),INFO" ID="0xe0fc02ad" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) is invalid when changing show state to background state. @js_page_state.cpp(93),ERROR" ID="0xe0fc02ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) -&gt; destroy state @js_page_state.cpp(102),INFO" ID="0xe0fc0335" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) is invalid when changing show state to destroy state. @js_page_state.cpp(111),ERROR" ID="0xe0fc037a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="undefined state -&gt; init state @js_page_state.cpp(29),INFO" ID="0xe10000ed" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) is invalid when changing undefined state to init state. @js_page_state.cpp(41),ERROR" ID="0xe100014a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="init state -&gt; ready state @js_page_state.cpp(49),INFO" ID="0xe100018d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) is invalid when changing init state to ready state. @js_page_state.cpp(60),ERROR" ID="0xe10001e2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) -&gt; show state @js_page_state.cpp(68),INFO" ID="0xe1000225" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) is invalid when changing ready state to show state. @js_page_state.cpp(77),ERROR" ID="0xe100026a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) -&gt; background state @js_page_state.cpp(85),INFO" ID="0xe10002ad" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) is invalid when changing show state to background state. @js_page_state.cpp(93),ERROR" ID="0xe10002ea" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) -&gt; destroy state @js_page_state.cpp(102),INFO" ID="0xe1000335" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="current state(%d) is invalid when changing show state to destroy state. @js_page_state.cpp(111),ERROR" ID="0xe100037a" />
                        </MSG_LOG>
\ No newline at end of file
index 065db36..d53ccf5 100644 (file)
@@ -1,22 +1,22 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="error input state:%d @js_page_state_machine.cpp(83),ERROR" ID="0xe0fe029a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc path memory heap failed. @js_page_state_machine.cpp(116),ERROR" ID="0xe0fe03a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="delete $page property failed from global object. @js_page_state_machine.cpp(148),ERROR" ID="0xe0fe04a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as this app's root path is invalid. @js_page_state_machine.cpp(160),ERROR" ID="0xe0fe0502" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as object is invalid. @js_page_state_machine.cpp(177),ERROR" ID="0xe0fe058a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as uri is invalid. @js_page_state_machine.cpp(186),ERROR" ID="0xe0fe05d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as uri is invalid. @js_page_state_machine.cpp(194),ERROR" ID="0xe0fe0612" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as uri is empty. @js_page_state_machine.cpp(201),ERROR" ID="0xe0fe064a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as generating js file's path failed. @js_page_state_machine.cpp(211),ERROR" ID="0xe0fe069a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as js file isn't existed. @js_page_state_machine.cpp(220),ERROR" ID="0xe0fe06e2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="error input state:%d @js_page_state_machine.cpp(278),ERROR" ID="0xe0fe08b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="relocat page JS file failed @js_page_state_machine.cpp(295),ERROR" ID="0xe0fe093a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Eval JS file failed @js_page_state_machine.cpp(301),ERROR" ID="0xe0fe096a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="JS Heap allocBytes[%d], peakAllocBytes[%d] @js_page_state_machine.cpp(333),DBG" ID="0xe0fe0a6e" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="StateMachine::ShowPage @js_page_state_machine.cpp(365),INFO" ID="0xe0fe0b6d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="showpage: the whole application already in background, do not operate rootview @js_page_state_machine.cpp(367),WARNING" ID="0xe0fe0b7b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="hidepage: the whole application already in background, do not operate rootview @js_page_state_machine.cpp(382),WARNING" ID="0xe0fe0bf3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="input parameter is invalid when invoking page life cycle callback. @js_page_state_machine.cpp(399),ERROR" ID="0xe0fe0c7a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="delete $page property failed from global object. @js_page_state_machine.cpp(424),ERROR" ID="0xe0fe0d42" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="delete $root property failed from global object. @js_page_state_machine.cpp(433),ERROR" ID="0xe0fe0d8a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] components leaked! @js_page_state_machine.cpp(475),ERROR" ID="0xe0fe0eda" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="error input state:%d @js_page_state_machine.cpp(83),ERROR" ID="0xe102029a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc path memory heap failed. @js_page_state_machine.cpp(116),ERROR" ID="0xe10203a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="delete $page property failed from global object. @js_page_state_machine.cpp(148),ERROR" ID="0xe10204a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as this app's root path is invalid. @js_page_state_machine.cpp(160),ERROR" ID="0xe1020502" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as object is invalid. @js_page_state_machine.cpp(177),ERROR" ID="0xe102058a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as uri is invalid. @js_page_state_machine.cpp(186),ERROR" ID="0xe10205d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as uri is invalid. @js_page_state_machine.cpp(194),ERROR" ID="0xe1020612" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as uri is empty. @js_page_state_machine.cpp(201),ERROR" ID="0xe102064a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as generating js file's path failed. @js_page_state_machine.cpp(211),ERROR" ID="0xe102069a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="statemachine init failed as js file isn't existed. @js_page_state_machine.cpp(220),ERROR" ID="0xe10206e2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="error input state:%d @js_page_state_machine.cpp(278),ERROR" ID="0xe10208b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="relocat page JS file failed @js_page_state_machine.cpp(295),ERROR" ID="0xe102093a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Eval JS file failed @js_page_state_machine.cpp(301),ERROR" ID="0xe102096a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="JS Heap allocBytes[%d], peakAllocBytes[%d] @js_page_state_machine.cpp(333),DBG" ID="0xe1020a6e" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="StateMachine::ShowPage @js_page_state_machine.cpp(365),INFO" ID="0xe1020b6d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="showpage: the whole application already in background, do not operate rootview @js_page_state_machine.cpp(367),WARNING" ID="0xe1020b7b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="hidepage: the whole application already in background, do not operate rootview @js_page_state_machine.cpp(382),WARNING" ID="0xe1020bf3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="input parameter is invalid when invoking page life cycle callback. @js_page_state_machine.cpp(399),ERROR" ID="0xe1020c7a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="delete $page property failed from global object. @js_page_state_machine.cpp(424),ERROR" ID="0xe1020d42" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="delete $root property failed from global object. @js_page_state_machine.cpp(433),ERROR" ID="0xe1020d8a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%d] components leaked! @js_page_state_machine.cpp(475),ERROR" ID="0xe1020eda" />
                        </MSG_LOG>
\ No newline at end of file
index e755012..1e7dbea 100644 (file)
@@ -1,14 +1,14 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="malloc performance data buffer failed @js_profiler.cpp(205),ERROR" ID="0xe0c6066a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc performance data buffer failed @js_profiler.cpp(211),ERROR" ID="0xe0c6069a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="sync js profiler msg error @js_profiler.cpp(224),ERROR" ID="0xe0c60702" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler flushmsg sprintf error @js_profiler.cpp(231),ERROR" ID="0xe0c6073a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler create error @js_profiler.cpp(237),ERROR" ID="0xe0c6076a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler open error @js_profiler.cpp(243),ERROR" ID="0xe0c6079a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ace dump js profiler msg error @js_profiler.cpp(251),ERROR" ID="0xe0c607da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler close error @js_profiler.cpp(257),ERROR" ID="0xe0c6080a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler memset_s failed @js_profiler.cpp(280),ERROR" ID="0xe0c608c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler memset_s failed @js_profiler.cpp(289),ERROR" ID="0xe0c6090a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ace js profiler tag(%d) mismatch! @js_profiler.cpp(358),ERROR" ID="0xe0c60b32" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler memset_s msg failed @js_profiler.cpp(394),ERROR" ID="0xe0c60c52" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler write msg failed @js_profiler.cpp(398),ERROR" ID="0xe0c60c72" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="malloc performance data buffer failed @js_profiler.cpp(205),ERROR" ID="0xe0ca066a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc performance data buffer failed @js_profiler.cpp(211),ERROR" ID="0xe0ca069a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="sync js profiler msg error @js_profiler.cpp(224),ERROR" ID="0xe0ca0702" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler flushmsg sprintf error @js_profiler.cpp(231),ERROR" ID="0xe0ca073a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler create error @js_profiler.cpp(237),ERROR" ID="0xe0ca076a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler open error @js_profiler.cpp(243),ERROR" ID="0xe0ca079a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ace dump js profiler msg error @js_profiler.cpp(251),ERROR" ID="0xe0ca07da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler close error @js_profiler.cpp(257),ERROR" ID="0xe0ca080a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler memset_s failed @js_profiler.cpp(280),ERROR" ID="0xe0ca08c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler memset_s failed @js_profiler.cpp(289),ERROR" ID="0xe0ca090a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ace js profiler tag(%d) mismatch! @js_profiler.cpp(358),ERROR" ID="0xe0ca0b32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler memset_s msg failed @js_profiler.cpp(394),ERROR" ID="0xe0ca0c52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ace js profiler write msg failed @js_profiler.cpp(398),ERROR" ID="0xe0ca0c72" />
                        </MSG_LOG>
\ No newline at end of file
index a38c907..cc56b35 100644 (file)
@@ -1,9 +1,9 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="replace async failed with null input parameter @js_router.cpp(31),ERROR" ID="0xe10000fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="router is replacing, can not handle the new request @js_router.cpp(43),ERROR" ID="0xe100015a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc state machine memory heap failed. @js_router.cpp(48),ERROR" ID="0xe1000182" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="dispatch replacing request failed @js_router.cpp(64),ERROR" ID="0xe1000202" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="replace sync failed, new sm should be prepared @js_router.cpp(78),ERROR" ID="0xe1000272" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="the whole application is in background, move to HIDE state directly @js_router.cpp(94),DBG" ID="0xe10002f6" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="no SM when performing show @js_router.cpp(110),ERROR" ID="0xe1000372" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="no SM when performing background @js_router.cpp(122),ERROR" ID="0xe10003d2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="replace async failed with null input parameter @js_router.cpp(31),ERROR" ID="0xe10400fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="router is replacing, can not handle the new request @js_router.cpp(43),ERROR" ID="0xe104015a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc state machine memory heap failed. @js_router.cpp(48),ERROR" ID="0xe1040182" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="dispatch replacing request failed @js_router.cpp(64),ERROR" ID="0xe1040202" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="replace sync failed, new sm should be prepared @js_router.cpp(78),ERROR" ID="0xe1040272" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="the whole application is in background, move to HIDE state directly @js_router.cpp(94),DBG" ID="0xe10402f6" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="no SM when performing show @js_router.cpp(110),ERROR" ID="0xe1040372" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="no SM when performing background @js_router.cpp(122),ERROR" ID="0xe10403d2" />
                        </MSG_LOG>
\ No newline at end of file
index 46264ea..c9bf4d9 100644 (file)
@@ -1,98 +1,98 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetGlobalObject has not been implemented in this js engine! @jsi.cpp(33),ERROR" ID="0xe0ce010a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateObject has not been implemented in this js engine! @jsi.cpp(43),ERROR" ID="0xe0ce015a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetProperty failed! @jsi.cpp(51),ERROR" ID="0xe0ce019a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetProperty has not been implemented in this js engine! @jsi.cpp(61),ERROR" ID="0xe0ce01ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetNamedProperty failed! @jsi.cpp(68),ERROR" ID="0xe0ce0222" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetNamedProperty has not been implemented in this js engine! @jsi.cpp(76),ERROR" ID="0xe0ce0262" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetNumberProperty failed! @jsi.cpp(83),ERROR" ID="0xe0ce029a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetBooleanProperty failed! @jsi.cpp(94),ERROR" ID="0xe0ce02f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetStringProperty failed! @jsi.cpp(105),ERROR" ID="0xe0ce034a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetStringPropertyWithBufferSize failed! @jsi.cpp(116),ERROR" ID="0xe0ce03a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateJerryFuncHelper get function pointer failed! @jsi.cpp(137),ERROR" ID="0xe0ce044a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateJerryFuncHelper allocate memory failed! @jsi.cpp(149),ERROR" ID="0xe0ce04aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateFunction failed! @jsi.cpp(166),ERROR" ID="0xe0ce0532" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateFunction has not been implemented in this js engine! @jsi.cpp(175),ERROR" ID="0xe0ce057a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateString has not been implemented in this js engine! @jsi.cpp(188),ERROR" ID="0xe0ce05e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateStringWithBufferSize has not been implemented in this js engine! @jsi.cpp(201),ERROR" ID="0xe0ce064a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateUndefined has not been implemented in this js engine! @jsi.cpp(210),ERROR" ID="0xe0ce0692" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsFunction has not been implemented in this js engine! @jsi.cpp(220),ERROR" ID="0xe0ce06e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsUndefined has not been implemented in this js engine! @jsi.cpp(230),ERROR" ID="0xe0ce0732" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsNumber has not been implemented in this js engine! @jsi.cpp(240),ERROR" ID="0xe0ce0782" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsString has not been implemented in this js engine! @jsi.cpp(250),ERROR" ID="0xe0ce07d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsBoolean has not been implemented in this js engine! @jsi.cpp(260),ERROR" ID="0xe0ce0822" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsNull has not been implemented in this js engine! @jsi.cpp(270),ERROR" ID="0xe0ce0872" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsObject has not been implemented in this js engine! @jsi.cpp(280),ERROR" ID="0xe0ce08c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsError has not been implemented in this js engine! @jsi.cpp(290),ERROR" ID="0xe0ce0912" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:JsonStringify failed! @jsi.cpp(298),ERROR" ID="0xe0ce0952" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:JsonStringify has not been implemented in this js engine! @jsi.cpp(307),ERROR" ID="0xe0ce099a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:JsonParse failed! @jsi.cpp(315),ERROR" ID="0xe0ce09da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:JsonParse has not been implemented in this js engine! @jsi.cpp(322),ERROR" ID="0xe0ce0a12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetProperty failed! @jsi.cpp(330),ERROR" ID="0xe0ce0a52" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetProperty has not been implemented in this js engine! @jsi.cpp(338),ERROR" ID="0xe0ce0a92" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetNamedProperty failed! @jsi.cpp(346),ERROR" ID="0xe0ce0ad2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetNamedProperty has not been implemented in this js engine! @jsi.cpp(355),ERROR" ID="0xe0ce0b1a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetNumberProperty failed! @jsi.cpp(363),ERROR" ID="0xe0ce0b5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetBooleanProperty failed! @jsi.cpp(375),ERROR" ID="0xe0ce0bba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetStringProperty failed! @jsi.cpp(387),ERROR" ID="0xe0ce0c1a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ReleaseValue has not been implemented in this js engine! @jsi.cpp(403),ERROR" ID="0xe0ce0c9a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetStringPropertyWithBufferSize failed! @jsi.cpp(410),ERROR" ID="0xe0ce0cd2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CallFunction failed! @jsi.cpp(430),ERROR" ID="0xe0ce0d72" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CallFunction error returned! @jsi.cpp(439),ERROR" ID="0xe0ce0dba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CallFunction allocate memory failed! @jsi.cpp(446),ERROR" ID="0xe0ce0df2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CallFunction error returned! @jsi.cpp(455),ERROR" ID="0xe0ce0e3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CallFunction has not been implemented in this js engine! @jsi.cpp(461),ERROR" ID="0xe0ce0e6a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateNumber has not been implemented in this js engine! @jsi.cpp(470),ERROR" ID="0xe0ce0eb2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateNumberNan has not been implemented in this js engine! @jsi.cpp(480),ERROR" ID="0xe0ce0f02" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateError parameters invalid! @jsi.cpp(555),ERROR" ID="0xe0ce115a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateError has not been implemented in this js engine! @jsi.cpp(563),ERROR" ID="0xe0ce119a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetErrorType has not been implemented in this js engine! @jsi.cpp(578),ERROR" ID="0xe0ce1212" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateBoolean has not been implemented in this js engine! @jsi.cpp(588),ERROR" ID="0xe0ce1262" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateNull has not been implemented in this js engine! @jsi.cpp(598),ERROR" ID="0xe0ce12b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateSymbol has not been implemented in this js engine! @jsi.cpp(610),ERROR" ID="0xe0ce1312" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsSymbol has not been implemented in this js engine! @jsi.cpp(620),ERROR" ID="0xe0ce1362" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateArray has not been implemented in this js engine! @jsi.cpp(631),ERROR" ID="0xe0ce13ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetPropertyByIndex has not been implemented in this js engine! @jsi.cpp(650),ERROR" ID="0xe0ce1452" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToString params invalid! @jsi.cpp(661),ERROR" ID="0xe0ce14aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToString malloc memory for empty char failed! @jsi.cpp(670),ERROR" ID="0xe0ce14f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToString malloc memory failed! @jsi.cpp(678),ERROR" ID="0xe0ce1532" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToString jerry string to char buffer failed @jsi.cpp(683),ERROR" ID="0xe0ce155a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToString has not been implemented in this js engine! @jsi.cpp(693),ERROR" ID="0xe0ce15aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToStringWithBufferSize params invalid! @jsi.cpp(703),ERROR" ID="0xe0ce15fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToStringWithBufferSize malloc memory failed! @jsi.cpp(716),ERROR" ID="0xe0ce1662" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToStringWithBufferSize jerry string to char buffer failed @jsi.cpp(722),ERROR" ID="0xe0ce1692" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToStringWithBufferSize has not been implemented in this js engine! @jsi.cpp(731),ERROR" ID="0xe0ce16da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToNumber params invalid! @jsi.cpp(742),ERROR" ID="0xe0ce1732" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToNumber has not been implemented in this js engine! @jsi.cpp(747),ERROR" ID="0xe0ce175a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToBoolean params invalid! @jsi.cpp(757),ERROR" ID="0xe0ce17aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToBoolean has not been implemented in this js engine! @jsi.cpp(762),ERROR" ID="0xe0ce17d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:JSIValueToString has not been implemented in this js engine! @jsi.cpp(775),ERROR" ID="0xe0ce183a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetArrayLength params invalid! @jsi.cpp(785),ERROR" ID="0xe0ce188a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetArrayLength has not been implemented in this js engine! @jsi.cpp(790),ERROR" ID="0xe0ce18b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetPropertyByIndex has not been implemented in this js engine! @jsi.cpp(801),ERROR" ID="0xe0ce190a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetObjectKeys failed! @jsi.cpp(809),ERROR" ID="0xe0ce194a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetObjectKeys has not been implemented in this js engine! @jsi.cpp(816),ERROR" ID="0xe0ce1982" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetJSHeapStatus has not been implemented in this js engine! @jsi.cpp(833),ERROR" ID="0xe0ce1a0a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsArray has not been implemented in this js engine! @jsi.cpp(843),ERROR" ID="0xe0ce1a5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:AcquireValue has not been implemented in this js engine! @jsi.cpp(854),ERROR" ID="0xe0ce1ab2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetModuleAPI failed! @jsi.cpp(862),ERROR" ID="0xe0ce1af2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetOnDestroy failed! @jsi.cpp(873),ERROR" ID="0xe0ce1b4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetOnDestroy has not been implemented in this js engine! @jsi.cpp(880),ERROR" ID="0xe0ce1b82" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetOnTerminate failed! @jsi.cpp(892),ERROR" ID="0xe0ce1be2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetNamedPointer failed! @jsi.cpp(909),ERROR" ID="0xe0ce1c6a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetNamedPointer has not been implemented in this js engine! @jsi.cpp(919),ERROR" ID="0xe0ce1cba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetTypedArrayInfo failed! @jsi.cpp(972),ERROR" ID="0xe0ce1e62" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetTypedArrayInfo has not been implemented in this js engine! @jsi.cpp(990),ERROR" ID="0xe0ce1ef2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateTypedArray has not been implemented in this js engine! @jsi.cpp(1045),ERROR" ID="0xe0ce20aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetArrayBufferInfo failed! @jsi.cpp(1053),ERROR" ID="0xe0ce20ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetArrayBufferInfo has not been implemented in this js engine! @jsi.cpp(1063),ERROR" ID="0xe0ce213a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateArrayBuffer has not been implemented in this js engine! @jsi.cpp(1078),ERROR" ID="0xe0ce21b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsArrayBuffer has not been implemented in this js engine! @jsi.cpp(1088),ERROR" ID="0xe0ce2202" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsTypedArray has not been implemented in this js engine! @jsi.cpp(1098),ERROR" ID="0xe0ce2252" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:DefineProperty failed! @jsi.cpp(1107),ERROR" ID="0xe0ce229a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:DefineProperty has not been implemented in this js engine! @jsi.cpp(1134),ERROR" ID="0xe0ce2372" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:DefineNamedProperty failed! @jsi.cpp(1142),ERROR" ID="0xe0ce23b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:DefineNamedProperty has not been implemented in this js engine! @jsi.cpp(1151),ERROR" ID="0xe0ce23fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateErrorWithCode parameters invalid! @jsi.cpp(1201),ERROR" ID="0xe0ce258a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateErrorWithCode error message too long! @jsi.cpp(1206),ERROR" ID="0xe0ce25b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateErrorWithCode has not been implemented in this js engine! @jsi.cpp(1219),ERROR" ID="0xe0ce261a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetGlobalObject has not been implemented in this js engine! @jsi.cpp(33),ERROR" ID="0xe0d2010a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateObject has not been implemented in this js engine! @jsi.cpp(43),ERROR" ID="0xe0d2015a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetProperty failed! @jsi.cpp(51),ERROR" ID="0xe0d2019a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetProperty has not been implemented in this js engine! @jsi.cpp(61),ERROR" ID="0xe0d201ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetNamedProperty failed! @jsi.cpp(68),ERROR" ID="0xe0d20222" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetNamedProperty has not been implemented in this js engine! @jsi.cpp(76),ERROR" ID="0xe0d20262" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetNumberProperty failed! @jsi.cpp(83),ERROR" ID="0xe0d2029a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetBooleanProperty failed! @jsi.cpp(94),ERROR" ID="0xe0d202f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetStringProperty failed! @jsi.cpp(105),ERROR" ID="0xe0d2034a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetStringPropertyWithBufferSize failed! @jsi.cpp(116),ERROR" ID="0xe0d203a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateJerryFuncHelper get function pointer failed! @jsi.cpp(137),ERROR" ID="0xe0d2044a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateJerryFuncHelper allocate memory failed! @jsi.cpp(149),ERROR" ID="0xe0d204aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateFunction failed! @jsi.cpp(166),ERROR" ID="0xe0d20532" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateFunction has not been implemented in this js engine! @jsi.cpp(175),ERROR" ID="0xe0d2057a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateString has not been implemented in this js engine! @jsi.cpp(188),ERROR" ID="0xe0d205e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateStringWithBufferSize has not been implemented in this js engine! @jsi.cpp(201),ERROR" ID="0xe0d2064a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateUndefined has not been implemented in this js engine! @jsi.cpp(210),ERROR" ID="0xe0d20692" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsFunction has not been implemented in this js engine! @jsi.cpp(220),ERROR" ID="0xe0d206e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsUndefined has not been implemented in this js engine! @jsi.cpp(230),ERROR" ID="0xe0d20732" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsNumber has not been implemented in this js engine! @jsi.cpp(240),ERROR" ID="0xe0d20782" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsString has not been implemented in this js engine! @jsi.cpp(250),ERROR" ID="0xe0d207d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsBoolean has not been implemented in this js engine! @jsi.cpp(260),ERROR" ID="0xe0d20822" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsNull has not been implemented in this js engine! @jsi.cpp(270),ERROR" ID="0xe0d20872" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsObject has not been implemented in this js engine! @jsi.cpp(280),ERROR" ID="0xe0d208c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsError has not been implemented in this js engine! @jsi.cpp(290),ERROR" ID="0xe0d20912" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:JsonStringify failed! @jsi.cpp(298),ERROR" ID="0xe0d20952" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:JsonStringify has not been implemented in this js engine! @jsi.cpp(307),ERROR" ID="0xe0d2099a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:JsonParse failed! @jsi.cpp(315),ERROR" ID="0xe0d209da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:JsonParse has not been implemented in this js engine! @jsi.cpp(322),ERROR" ID="0xe0d20a12" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetProperty failed! @jsi.cpp(330),ERROR" ID="0xe0d20a52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetProperty has not been implemented in this js engine! @jsi.cpp(338),ERROR" ID="0xe0d20a92" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetNamedProperty failed! @jsi.cpp(346),ERROR" ID="0xe0d20ad2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetNamedProperty has not been implemented in this js engine! @jsi.cpp(355),ERROR" ID="0xe0d20b1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetNumberProperty failed! @jsi.cpp(363),ERROR" ID="0xe0d20b5a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetBooleanProperty failed! @jsi.cpp(375),ERROR" ID="0xe0d20bba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetStringProperty failed! @jsi.cpp(387),ERROR" ID="0xe0d20c1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ReleaseValue has not been implemented in this js engine! @jsi.cpp(403),ERROR" ID="0xe0d20c9a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetStringPropertyWithBufferSize failed! @jsi.cpp(410),ERROR" ID="0xe0d20cd2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CallFunction failed! @jsi.cpp(430),ERROR" ID="0xe0d20d72" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CallFunction error returned! @jsi.cpp(439),ERROR" ID="0xe0d20dba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CallFunction allocate memory failed! @jsi.cpp(446),ERROR" ID="0xe0d20df2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CallFunction error returned! @jsi.cpp(455),ERROR" ID="0xe0d20e3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CallFunction has not been implemented in this js engine! @jsi.cpp(461),ERROR" ID="0xe0d20e6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateNumber has not been implemented in this js engine! @jsi.cpp(470),ERROR" ID="0xe0d20eb2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateNumberNan has not been implemented in this js engine! @jsi.cpp(480),ERROR" ID="0xe0d20f02" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateError parameters invalid! @jsi.cpp(555),ERROR" ID="0xe0d2115a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateError has not been implemented in this js engine! @jsi.cpp(563),ERROR" ID="0xe0d2119a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetErrorType has not been implemented in this js engine! @jsi.cpp(578),ERROR" ID="0xe0d21212" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateBoolean has not been implemented in this js engine! @jsi.cpp(588),ERROR" ID="0xe0d21262" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateNull has not been implemented in this js engine! @jsi.cpp(598),ERROR" ID="0xe0d212b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateSymbol has not been implemented in this js engine! @jsi.cpp(610),ERROR" ID="0xe0d21312" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsSymbol has not been implemented in this js engine! @jsi.cpp(620),ERROR" ID="0xe0d21362" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateArray has not been implemented in this js engine! @jsi.cpp(631),ERROR" ID="0xe0d213ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetPropertyByIndex has not been implemented in this js engine! @jsi.cpp(650),ERROR" ID="0xe0d21452" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToString params invalid! @jsi.cpp(661),ERROR" ID="0xe0d214aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToString malloc memory for empty char failed! @jsi.cpp(670),ERROR" ID="0xe0d214f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToString malloc memory failed! @jsi.cpp(678),ERROR" ID="0xe0d21532" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToString jerry string to char buffer failed @jsi.cpp(683),ERROR" ID="0xe0d2155a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToString has not been implemented in this js engine! @jsi.cpp(693),ERROR" ID="0xe0d215aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToStringWithBufferSize params invalid! @jsi.cpp(703),ERROR" ID="0xe0d215fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToStringWithBufferSize malloc memory failed! @jsi.cpp(716),ERROR" ID="0xe0d21662" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToStringWithBufferSize jerry string to char buffer failed @jsi.cpp(722),ERROR" ID="0xe0d21692" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToStringWithBufferSize has not been implemented in this js engine! @jsi.cpp(731),ERROR" ID="0xe0d216da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToNumber params invalid! @jsi.cpp(742),ERROR" ID="0xe0d21732" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToNumber has not been implemented in this js engine! @jsi.cpp(747),ERROR" ID="0xe0d2175a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToBoolean params invalid! @jsi.cpp(757),ERROR" ID="0xe0d217aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueToBoolean has not been implemented in this js engine! @jsi.cpp(762),ERROR" ID="0xe0d217d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:JSIValueToString has not been implemented in this js engine! @jsi.cpp(775),ERROR" ID="0xe0d2183a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetArrayLength params invalid! @jsi.cpp(785),ERROR" ID="0xe0d2188a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetArrayLength has not been implemented in this js engine! @jsi.cpp(790),ERROR" ID="0xe0d218b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetPropertyByIndex has not been implemented in this js engine! @jsi.cpp(801),ERROR" ID="0xe0d2190a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetObjectKeys failed! @jsi.cpp(809),ERROR" ID="0xe0d2194a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetObjectKeys has not been implemented in this js engine! @jsi.cpp(816),ERROR" ID="0xe0d21982" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetJSHeapStatus has not been implemented in this js engine! @jsi.cpp(833),ERROR" ID="0xe0d21a0a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsArray has not been implemented in this js engine! @jsi.cpp(843),ERROR" ID="0xe0d21a5a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:AcquireValue has not been implemented in this js engine! @jsi.cpp(854),ERROR" ID="0xe0d21ab2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetModuleAPI failed! @jsi.cpp(862),ERROR" ID="0xe0d21af2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetOnDestroy failed! @jsi.cpp(873),ERROR" ID="0xe0d21b4a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetOnDestroy has not been implemented in this js engine! @jsi.cpp(880),ERROR" ID="0xe0d21b82" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetOnTerminate failed! @jsi.cpp(892),ERROR" ID="0xe0d21be2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetNamedPointer failed! @jsi.cpp(909),ERROR" ID="0xe0d21c6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:SetNamedPointer has not been implemented in this js engine! @jsi.cpp(919),ERROR" ID="0xe0d21cba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetTypedArrayInfo failed! @jsi.cpp(972),ERROR" ID="0xe0d21e62" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetTypedArrayInfo has not been implemented in this js engine! @jsi.cpp(990),ERROR" ID="0xe0d21ef2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateTypedArray has not been implemented in this js engine! @jsi.cpp(1045),ERROR" ID="0xe0d220aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetArrayBufferInfo failed! @jsi.cpp(1053),ERROR" ID="0xe0d220ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:GetArrayBufferInfo has not been implemented in this js engine! @jsi.cpp(1063),ERROR" ID="0xe0d2213a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateArrayBuffer has not been implemented in this js engine! @jsi.cpp(1078),ERROR" ID="0xe0d221b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsArrayBuffer has not been implemented in this js engine! @jsi.cpp(1088),ERROR" ID="0xe0d22202" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:ValueIsTypedArray has not been implemented in this js engine! @jsi.cpp(1098),ERROR" ID="0xe0d22252" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:DefineProperty failed! @jsi.cpp(1107),ERROR" ID="0xe0d2229a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:DefineProperty has not been implemented in this js engine! @jsi.cpp(1134),ERROR" ID="0xe0d22372" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:DefineNamedProperty failed! @jsi.cpp(1142),ERROR" ID="0xe0d223b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:DefineNamedProperty has not been implemented in this js engine! @jsi.cpp(1151),ERROR" ID="0xe0d223fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateErrorWithCode parameters invalid! @jsi.cpp(1201),ERROR" ID="0xe0d2258a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateErrorWithCode error message too long! @jsi.cpp(1206),ERROR" ID="0xe0d225b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="JSI:CreateErrorWithCode has not been implemented in this js engine! @jsi.cpp(1219),ERROR" ID="0xe0d2261a" />
                        </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/kaleidoscope_utils.cpp.xml b/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/kaleidoscope_utils.cpp.xml
new file mode 100644 (file)
index 0000000..3b813ec
--- /dev/null
@@ -0,0 +1,25 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for data failed. @kaleidoscope_utils.cpp(31),ERROR" ID="0xcb3c00fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="kaleidoscopeInfo_ is not nullptr @kaleidoscope_utils.cpp(48),ERROR" ID="0xcb3c0182" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for kaleidoscopeInfo_ failed! @kaleidoscope_utils.cpp(54),ERROR" ID="0xcb3c01b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for data failed. @kaleidoscope_utils.cpp(66),ERROR" ID="0xcb3c0212" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="dst-&gt;info.data is nullptr @kaleidoscope_utils.cpp(78),ERROR" ID="0xcb3c0272" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="size does not match: src[%u, %u], dst[%u, %u]. @kaleidoscope_utils.cpp(85),ERROR" ID="0xcb3c02aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for sectorPath cmds failed. @kaleidoscope_utils.cpp(101),ERROR" ID="0xcb3c032a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for sectorPath data failed. @kaleidoscope_utils.cpp(106),ERROR" ID="0xcb3c0352" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for imgPath cmds failed. @kaleidoscope_utils.cpp(114),ERROR" ID="0xcb3c0392" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for imgPath data failed. @kaleidoscope_utils.cpp(129),ERROR" ID="0xcb3c040a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for partialInfo_ failed. @kaleidoscope_utils.cpp(152),ERROR" ID="0xcb3c04c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc for partial info data failed. @kaleidoscope_utils.cpp(164),ERROR" ID="0xcb3c0522" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="src or src-&gt;data is null. @kaleidoscope_utils.cpp(217),ERROR" ID="0xcb3c06ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UIMalloc for imgInfo_ failed. @kaleidoscope_utils.cpp(224),ERROR" ID="0xcb3c0702" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy imgInfo_ failed. @kaleidoscope_utils.cpp(230),ERROR" ID="0xcb3c0732" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitKaleidoscopeInfo failed. @kaleidoscope_utils.cpp(236),ERROR" ID="0xcb3c0762" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitInnerPath failed. @kaleidoscope_utils.cpp(243),ERROR" ID="0xcb3c079a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitPartialInfo failed. @kaleidoscope_utils.cpp(251),ERROR" ID="0xcb3c07da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="kaleidoscopeInfo_ or partialInfo_ is nullptr. @kaleidoscope_utils.cpp(422),ERROR" ID="0xcb3c0d32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="kaleidoscopeInfo_ or kaleidoscopeInfo_-&gt;info.data is nullptr. @kaleidoscope_utils.cpp(445),ERROR" ID="0xcb3c0dea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ConstructPartial failed. @kaleidoscope_utils.cpp(452),ERROR" ID="0xcb3c0e22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UpdateKaleidoscopeImgInfo failed, because isInternalMem_ is false. @kaleidoscope_utils.cpp(461),ERROR" ID="0xcb3c0e6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UpdateKaleidoscopeImgInfo failed, because addr is nullptr. @kaleidoscope_utils.cpp(466),ERROR" ID="0xcb3c0e92" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UpdateKaleidoscopeImgInfo failed, because kaleidoscopeInfo_ is nullptr. @kaleidoscope_utils.cpp(471),ERROR" ID="0xcb3c0eba" />
+                       </MSG_LOG>
\ No newline at end of file
index 007b214..d36cfcc 100644 (file)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="create watcher errpr @lazy_load_manager.cpp(105),ERROR" ID="0xe064034a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="create watcher errpr @lazy_load_manager.cpp(105),ERROR" ID="0xe068034a" />
                        </MSG_LOG>
\ No newline at end of file
index df964ee..abaa4da 100644 (file)
                        <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(584),ERROR" ID="0xcb0e1242" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="Convert2VGUBuffer failed. @lite_m_gfx_engine.cpp(611),ERROR" ID="0xcb0e131a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlur failed! @lite_m_gfx_engine.cpp(624),ERROR" ID="0xcb0e1382" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlit failed! @lite_m_gfx_engine.cpp(676),ERROR" ID="0xcb0e1522" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="DrawTransform failed. Software can only process uncompressed data. @lite_m_gfx_engine.cpp(710),ERROR" ID="0xcb0e1632" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(761),ERROR" ID="0xcb0e17ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu or RenderClearRect is null! @lite_m_gfx_engine.cpp(765),ERROR" ID="0xcb0e17ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(772),ERROR" ID="0xcb0e1822" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(778),ERROR" ID="0xcb0e1852" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu failed! @lite_m_gfx_engine.cpp(783),ERROR" ID="0xcb0e187a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(794),INFO" ID="0xcb0e18d5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="DeinitVgu failed! @lite_m_gfx_engine.cpp(799),ERROR" ID="0xcb0e18fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="AllocBuffer failed. @lite_m_gfx_engine.cpp(817),ERROR" ID="0xcb0e198a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unsupported PixelFormat: %d @lite_m_gfx_engine.cpp(844),ERROR" ID="0xcb0e1a62" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bufferInfo_ is not inited. @lite_m_gfx_engine.cpp(961),ERROR" ID="0xcb0e1e0a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="set value: %d @lite_m_gfx_engine.cpp(1005),DBG" ID="0xcb0e1f6e" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RenderBlit failed! @lite_m_gfx_engine.cpp(680),ERROR" ID="0xcb0e1542" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="DrawTransform failed. Software can only process uncompressed data. @lite_m_gfx_engine.cpp(713),ERROR" ID="0xcb0e164a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(764),ERROR" ID="0xcb0e17e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu or RenderClearRect is null! @lite_m_gfx_engine.cpp(768),ERROR" ID="0xcb0e1802" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(775),ERROR" ID="0xcb0e183a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="VGUPathInit, VGUPathAppendData, VGUPathClear or RenderPath is nullptr! @lite_m_gfx_engine.cpp(781),ERROR" ID="0xcb0e186a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="InitVgu failed! @lite_m_gfx_engine.cpp(786),ERROR" ID="0xcb0e1892" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="vguFuncs_ is null! @lite_m_gfx_engine.cpp(797),INFO" ID="0xcb0e18ed" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="DeinitVgu failed! @lite_m_gfx_engine.cpp(802),ERROR" ID="0xcb0e1912" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="AllocBuffer failed. @lite_m_gfx_engine.cpp(820),ERROR" ID="0xcb0e19a2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unsupported PixelFormat: %d @lite_m_gfx_engine.cpp(847),ERROR" ID="0xcb0e1a7a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bufferInfo_ is not inited. @lite_m_gfx_engine.cpp(963),ERROR" ID="0xcb0e1e1a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="set value: %d @lite_m_gfx_engine.cpp(1007),DBG" ID="0xcb0e1f7e" />
                        </MSG_LOG>
\ No newline at end of file
index 24e22b2..b3843de 100644 (file)
@@ -1,87 +1,90 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg6" NAME="generate addr: ****%02x%02x%02x%02x name: %s sp-ret: %d @local_device_manager.c(219),INFO" ID="0xd80806dd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="local dev info write error! ret 0x%x @local_device_manager.c(244),ERROR" ID="0xd80807a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="deinit bt stack @local_device_manager.c(277),INFO" ID="0xd80808ad" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(353),ERROR" ID="0xd8080b0a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn state change fail. @local_device_manager.c(372),ERROR" ID="0xd8080ba2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(381),ERROR" ID="0xd8080bea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp can not find connect node by handle @local_device_manager.c(400),ERROR" ID="0xd8080c82" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(407),ERROR" ID="0xd8080cba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(428),ERROR" ID="0xd8080d62" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble enable err,B core may be not calibration end and not notify A Core  @local_device_manager.c(451),ERROR" ID="0xd8080e1a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt init err ret = %08x @local_device_manager.c(482),ERROR" ID="0xd8080f12" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @local_device_manager.c(575),WARNING" ID="0xd80811fb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="inquiry complete @local_device_manager.c(583),INFO" ID="0xd808123d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(590),INFO" ID="0xd8081275" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(604),INFO" ID="0xd80812e5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv_connection_request_ind_callback: memecpy error @local_device_manager.c(618),ERROR" ID="0xd8081352" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="addr:****%02x%02x%02x%02x @local_device_manager.c(623),INFO" ID="0xd808137d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(633),INFO" ID="0xd80813cd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(647),ERROR" ID="0xd808143a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc errr @local_device_manager.c(661),ERROR" ID="0xd80814aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(667),ERROR" ID="0xd80814da" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg6" NAME="generate addr: ****%02x%02x%02x%02x name: %s sp-ret: %d @local_device_manager.c(238),INFO" ID="0xd8080775" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="local dev info write error! ret 0x%x @local_device_manager.c(263),ERROR" ID="0xd808083a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="deinit bt stack @local_device_manager.c(298),INFO" ID="0xd8080955" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(374),ERROR" ID="0xd8080bb2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn state change fail. @local_device_manager.c(393),ERROR" ID="0xd8080c4a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(402),ERROR" ID="0xd8080c92" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble smp can not find connect node by handle @local_device_manager.c(430),ERROR" ID="0xd8080d72" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[btsrv][ERROR] ble gap conn addr memcpy fail. @local_device_manager.c(437),ERROR" ID="0xd8080daa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(458),ERROR" ID="0xd8080e52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble enable err,B core may be not calibration end and not notify A Core  @local_device_manager.c(482),ERROR" ID="0xd8080f12" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt init err ret = %08x @local_device_manager.c(513),ERROR" ID="0xd808100a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled msg id %x @local_device_manager.c(610),WARNING" ID="0xd8081313" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="inquiry complete @local_device_manager.c(618),INFO" ID="0xd8081355" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(625),INFO" ID="0xd808138d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(639),INFO" ID="0xd80813fd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv_connection_request_ind_callback: memecpy error @local_device_manager.c(653),ERROR" ID="0xd808146a" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="addr:****%02x%02x%02x%02x @local_device_manager.c(658),INFO" ID="0xd8081495" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl:0x%08x @local_device_manager.c(668),INFO" ID="0xd80814e5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(682),ERROR" ID="0xd8081552" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="malloc errr @local_device_manager.c(696),ERROR" ID="0xd80815c2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(702),ERROR" ID="0xd80815f2" />
-                       <MSG STRUCTURE="diag_log_msg8" NAME="conn_hdl: %08x event: %04x role: %x result: %x dev_hdl: %x svc_hdl: %x svc_class: %x duration: %d @local_device_manager.c(716),INFO" ID="0xd8081665" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="received_bytes: %d sent_bytes: %d @local_device_manager.c(719),INFO" ID="0xd808167d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled service class 0x%x @local_device_manager.c(745),WARNING" ID="0xd808174b" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value&#65306;%08x @local_device_manager.c(768),INFO" ID="0xd8081805" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(775),INFO" ID="0xd808183d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(782),INFO" ID="0xd8081875" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value&#65306;%08x @local_device_manager.c(788),INFO" ID="0xd80818a5" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x reason: %x @local_device_manager.c(802),INFO" ID="0xd8081915" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="white_list_size:%d  @local_device_manager.c(808),INFO" ID="0xd8081945" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="transmit_power_level:%d  @local_device_manager.c(813),INFO" ID="0xd808196d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="register err id: %x ret: %x @local_device_manager.c(844),ERROR" ID="0xd8081a62" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bt enable err,B core may be not calibration end and not notify A Core  @local_device_manager.c(878),ERROR" ID="0xd8081b72" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt_init err ret = %08x @local_device_manager.c(907),ERROR" ID="0xd8081c5a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="buff is't long enough, need length:%d. @local_device_manager.c(1014),ERROR" ID="0xd8081fb2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get local name memcpy fail. @local_device_manager.c(1018),ERROR" ID="0xd8081fd2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="name: %s, length: %d @local_device_manager.c(1027),INFO" ID="0xd808201d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="failed: bt not enabled @local_device_manager.c(1042),INFO" ID="0xd8082095" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="local name null or length not match, len: %d @local_device_manager.c(1046),INFO" ID="0xd80820b5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="returns error ret: %x @local_device_manager.c(1052),WARNING" ID="0xd80820e3" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="set result name: &quot;%s&quot; name_len: %d get_re: %x @local_device_manager.c(1058),INFO" ID="0xd8082115" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_remove_all_pairs fail @local_device_manager.c(1118),ERROR" ID="0xd80822f2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap ble remove all pairs fail @local_device_manager.c(1124),ERROR" ID="0xd8082322" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="diable_bt_ret(errcode_t): %x @local_device_manager.c(1131),INFO" ID="0xd808235d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="disable_ble_ret(errcode_t): %x @local_device_manager.c(1136),INFO" ID="0xd8082385" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="set discovery data pointer is null. @local_device_manager.c(1167),ERROR" ID="0xd808247a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="adv_id(%d) advertising, please stop first. @local_device_manager.c(1182),ERROR" ID="0xd80824f2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="adv data alloc faild, length:%d @local_device_manager.c(1194),ERROR" ID="0xd8082552" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data adv data memcpy_s fail @local_device_manager.c(1198),ERROR" ID="0xd8082572" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="scan rsp data alloc faild, length:%d @local_device_manager.c(1207),ERROR" ID="0xd80825ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data scan rsp data memcpy_s fail @local_device_manager.c(1211),ERROR" ID="0xd80825da" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="adv_id(%d) advertising, please stop first. @local_device_manager.c(1247),ERROR" ID="0xd80826fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1259),ERROR" ID="0xd808275a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1273),ERROR" ID="0xd80827ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1295),ERROR" ID="0xd808287a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1300),ERROR" ID="0xd80828a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv data memcpy_s fail @local_device_manager.c(1324),ERROR" ID="0xd8082962" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set scan rsp data memcpy_s fail @local_device_manager.c(1331),ERROR" ID="0xd808299a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] btsrv_gap_set_adv_param memcpy_s fail @local_device_manager.c(1350),ERROR" ID="0xd8082a32" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv param memcpy_s fail @local_device_manager.c(1355),ERROR" ID="0xd8082a5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1375),ERROR" ID="0xd8082afa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1390),ERROR" ID="0xd8082b72" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap adv set terminated cbk param error @local_device_manager.c(1402),ERROR" ID="0xd8082bd2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble enable cbk param error @local_device_manager.c(1413),ERROR" ID="0xd8082c2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble read remote rssi cbk param error @local_device_manager.c(1424),ERROR" ID="0xd8082c82" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble conn param update cbk param error @local_device_manager.c(1440),ERROR" ID="0xd8082d02" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1482),ERROR" ID="0xd8082e52" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="adv id(%d) is discoverying, please stop first. @local_device_manager.c(1486),ERROR" ID="0xd8082e72" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv param alloc fail @local_device_manager.c(1495),ERROR" ID="0xd8082eba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1528),ERROR" ID="0xd8082fc2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="no advertising in progress or advertising for adv_id(%d). No advertising for adv_id(%d). @local_device_manager.c(1534),ERROR" ID="0xd8082ff2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="mc sdk ble stop adv atb failed  @local_device_manager.c(1540),ERROR" ID="0xd8083022" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning in process, please stop first. @local_device_manager.c(1574),ERROR" ID="0xd8083132" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning already stopped. @local_device_manager.c(1606),ERROR" ID="0xd8083232" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble stop extern scan ret: %#x @local_device_manager.c(1610),INFO" ID="0xd8083255" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy node == NULL @local_device_manager.c(1633),ERROR" ID="0xd808330a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy memcpy fail @local_device_manager.c(1638),ERROR" ID="0xd8083332" />
-                       <MSG STRUCTURE="diag_log_msg5" NAME="ble general set phy hdl:%x all:%x rx:%x tx:%x op:%x. @local_device_manager.c(1643),INFO" ID="0xd808335d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set phy ret: %#x @local_device_manager.c(1646),ERROR" ID="0xd8083372" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length node == NULL @local_device_manager.c(1667),ERROR" ID="0xd808341a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length memcpy fail @local_device_manager.c(1672),ERROR" ID="0xd8083442" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general set len hdl:%x maxoct:%x maxtime:%x @local_device_manager.c(1677),INFO" ID="0xd808346d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set len ret: %#x @local_device_manager.c(1680),ERROR" ID="0xd8083482" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bts sert log type levle:%x @local_device_manager.c(1698),INFO" ID="0xd8083515" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc errr @local_device_manager.c(731),ERROR" ID="0xd80816da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s errr @local_device_manager.c(737),ERROR" ID="0xd808170a" />
+                       <MSG STRUCTURE="diag_log_msg8" NAME="conn_hdl: %08x event: %04x role: %x result: %x dev_hdl: %x svc_hdl: %x svc_class: %x duration: %d @local_device_manager.c(751),INFO" ID="0xd808177d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="received_bytes: %d sent_bytes: %d @local_device_manager.c(754),INFO" ID="0xd8081795" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unhandled service class 0x%x @local_device_manager.c(780),WARNING" ID="0xd8081863" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value: %06d @local_device_manager.c(803),INFO" ID="0xd808191d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(810),INFO" ID="0xd8081955" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: 0x%08x @local_device_manager.c(817),INFO" ID="0xd808198d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x num_value: %06d @local_device_manager.c(823),INFO" ID="0xd80819bd" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x reason: %x @local_device_manager.c(837),INFO" ID="0xd8081a2d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="white_list_size:%d  @local_device_manager.c(843),INFO" ID="0xd8081a5d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="transmit_power_level:%d  @local_device_manager.c(848),INFO" ID="0xd8081a85" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="register err id: %x ret: %x @local_device_manager.c(879),ERROR" ID="0xd8081b7a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bt enable err,B core may be not calibration end and not notify A Core  @local_device_manager.c(914),ERROR" ID="0xd8081c92" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt_init err ret = %08x @local_device_manager.c(943),ERROR" ID="0xd8081d7a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="buff is't long enough, need length:%d. @local_device_manager.c(1050),ERROR" ID="0xd80820d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get local name memcpy fail. @local_device_manager.c(1054),ERROR" ID="0xd80820f2" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="name: %s, length: %d @local_device_manager.c(1063),INFO" ID="0xd808213d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="failed: bt not enabled @local_device_manager.c(1078),INFO" ID="0xd80821b5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="local name null or length not match, len: %d @local_device_manager.c(1082),INFO" ID="0xd80821d5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="returns error ret: %x @local_device_manager.c(1088),WARNING" ID="0xd8082203" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="set result name: &quot;%s&quot; name_len: %d get_re: %x @local_device_manager.c(1094),INFO" ID="0xd8082235" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap_remove_all_pairs fail @local_device_manager.c(1154),ERROR" ID="0xd8082412" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap ble remove all pairs fail @local_device_manager.c(1160),ERROR" ID="0xd8082442" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="diable_bt_ret(errcode_t): %x @local_device_manager.c(1167),INFO" ID="0xd808247d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="disable_ble_ret(errcode_t): %x @local_device_manager.c(1172),INFO" ID="0xd80824a5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="set discovery data pointer is null. @local_device_manager.c(1203),ERROR" ID="0xd808259a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="adv_id(%d) advertising, please stop first. @local_device_manager.c(1218),ERROR" ID="0xd8082612" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="adv data alloc faild, length:%d @local_device_manager.c(1231),ERROR" ID="0xd808267a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data adv data memcpy_s fail @local_device_manager.c(1235),ERROR" ID="0xd808269a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="scan rsp data alloc faild, length:%d @local_device_manager.c(1244),ERROR" ID="0xd80826e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap_ble_set_adv_data scan rsp data memcpy_s fail @local_device_manager.c(1248),ERROR" ID="0xd8082702" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="adv_id(%d) advertising, please stop first. @local_device_manager.c(1284),ERROR" ID="0xd8082822" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1296),ERROR" ID="0xd8082882" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap ble set adv param memcpy_s fail @local_device_manager.c(1310),ERROR" ID="0xd80828f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1332),ERROR" ID="0xd80829a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap set sec param error param NULL @local_device_manager.c(1337),ERROR" ID="0xd80829ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv data memcpy_s fail @local_device_manager.c(1361),ERROR" ID="0xd8082a8a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set scan rsp data memcpy_s fail @local_device_manager.c(1368),ERROR" ID="0xd8082ac2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] btsrv_gap_set_adv_param memcpy_s fail @local_device_manager.c(1387),ERROR" ID="0xd8082b5a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] gap set adv param memcpy_s fail @local_device_manager.c(1392),ERROR" ID="0xd8082b82" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1412),ERROR" ID="0xd8082c22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap ext adv rpt memcpy fail @local_device_manager.c(1427),ERROR" ID="0xd8082c9a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap adv set terminated cbk param error @local_device_manager.c(1439),ERROR" ID="0xd8082cfa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble enable cbk param error @local_device_manager.c(1450),ERROR" ID="0xd8082d52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble read remote rssi cbk param error @local_device_manager.c(1461),ERROR" ID="0xd8082daa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble conn param update cbk param error @local_device_manager.c(1477),ERROR" ID="0xd8082e2a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gap conn param malloc fail @local_device_manager.c(1489),ERROR" ID="0xd8082e8a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="ble conn param update cbk interval:%x, latency:%x, timeout:%x @local_device_manager.c(1496),INFO" ID="0xd8082ec5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1530),ERROR" ID="0xd8082fd2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="adv id(%d) is discoverying, please stop first. @local_device_manager.c(1534),ERROR" ID="0xd8082ff2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv param alloc fail @local_device_manager.c(1543),ERROR" ID="0xd808303a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="adv id is not active, please set param first. @local_device_manager.c(1576),ERROR" ID="0xd8083142" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="no advertising in progress or advertising for adv_id(%d). No advertising for adv_id(%d). @local_device_manager.c(1582),ERROR" ID="0xd8083172" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mc sdk ble stop adv atb failed  @local_device_manager.c(1588),ERROR" ID="0xd80831a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning in process, please stop first. @local_device_manager.c(1622),ERROR" ID="0xd80832b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="scanning already stopped. @local_device_manager.c(1654),ERROR" ID="0xd80833b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble stop extern scan ret: %#x @local_device_manager.c(1658),INFO" ID="0xd80833d5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy node == NULL @local_device_manager.c(1681),ERROR" ID="0xd808348a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set phy memcpy fail @local_device_manager.c(1686),ERROR" ID="0xd80834b2" />
+                       <MSG STRUCTURE="diag_log_msg5" NAME="ble general set phy hdl:%x all:%x rx:%x tx:%x op:%x. @local_device_manager.c(1691),INFO" ID="0xd80834dd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set phy ret: %#x @local_device_manager.c(1694),ERROR" ID="0xd80834f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length node == NULL @local_device_manager.c(1715),ERROR" ID="0xd808359a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble set data length memcpy fail @local_device_manager.c(1720),ERROR" ID="0xd80835c2" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general set len hdl:%x maxoct:%x maxtime:%x @local_device_manager.c(1725),INFO" ID="0xd80835ed" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble set len ret: %#x @local_device_manager.c(1728),ERROR" ID="0xd8083602" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bts sert log type levle:%x @local_device_manager.c(1746),INFO" ID="0xd8083695" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="g_bts_feature_bitmap bt_auto_reconnect_closed:%d. @local_device_manager.c(1767),ERROR" ID="0xd808373a" />
                        </MSG_LOG>
\ No newline at end of file
index c81179b..e509a74 100644 (file)
@@ -1,3 +1,3 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="malloc system info failed @locale_util.cpp(70),ERROR" ID="0xe0680232" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="get system language info failed @locale_util.cpp(76),ERROR" ID="0xe0680262" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="malloc system info failed @locale_util.cpp(70),ERROR" ID="0xe06c0232" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="get system language info failed @locale_util.cpp(76),ERROR" ID="0xe06c0262" />
                        </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/map_svg_parser.cpp.xml b/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/map_svg_parser.cpp.xml
new file mode 100644 (file)
index 0000000..3fabf8d
--- /dev/null
@@ -0,0 +1,72 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="set svg faild, path len is 0 @map_svg_parser.cpp(54),ERROR" ID="0xcb4601b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Invalid file path. @map_svg_parser.cpp(67),ERROR" ID="0xcb46021a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="File(%s) can not open. errno: %d @map_svg_parser.cpp(73),ERROR" ID="0xcb46024a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map header faild @map_svg_parser.cpp(78),ERROR" ID="0xcb460272" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="parser map success @map_svg_parser.cpp(97),DBG" ID="0xcb46030e" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="parser map failed @map_svg_parser.cpp(104),DBG" ID="0xcb460346" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map header faild @map_svg_parser.cpp(113),ERROR" ID="0xcb46038a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="The remaining data is insufficient. The read ends. @map_svg_parser.cpp(118),WARNING" ID="0xcb4603b3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="parser map success @map_svg_parser.cpp(153),DBG" ID="0xcb4604ce" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(160),ERROR" ID="0xcb460502" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map node array faild! @map_svg_parser.cpp(167),ERROR" ID="0xcb46053a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="read map node array faild, readLen:%d, realReadLen:%d @map_svg_parser.cpp(174),ERROR" ID="0xcb460572" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(187),ERROR" ID="0xcb4605da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map node faild.The data length is less than the read length! @map_svg_parser.cpp(193),ERROR" ID="0xcb46060a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map node array faild! @map_svg_parser.cpp(198),ERROR" ID="0xcb460632" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="memcpy_s map node array faild, nodeLen: 0x%x @map_svg_parser.cpp(205),ERROR" ID="0xcb46066a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(215),ERROR" ID="0xcb4606ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc path style array faild! @map_svg_parser.cpp(222),ERROR" ID="0xcb4606f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path style array faild @map_svg_parser.cpp(229),ERROR" ID="0xcb46072a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(242),ERROR" ID="0xcb460792" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read path style faild.The data length is less than the read length! @map_svg_parser.cpp(248),ERROR" ID="0xcb4607c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc path style array faild! @map_svg_parser.cpp(254),ERROR" ID="0xcb4607f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path style array faild @map_svg_parser.cpp(261),ERROR" ID="0xcb46082a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for buffer failed. @map_svg_parser.cpp(275),ERROR" ID="0xcb46089a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Alloc buffer for buffer failed. @map_svg_parser.cpp(284),ERROR" ID="0xcb4608e2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(295),ERROR" ID="0xcb46093a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(302),ERROR" ID="0xcb460972" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map path array faild @map_svg_parser.cpp(311),ERROR" ID="0xcb4609ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(318),ERROR" ID="0xcb4609f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read path cmd faild @map_svg_parser.cpp(324),ERROR" ID="0xcb460a22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read path data faild @map_svg_parser.cpp(330),ERROR" ID="0xcb460a52" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(341),ERROR" ID="0xcb460aaa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(348),ERROR" ID="0xcb460ae2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map path array faild @map_svg_parser.cpp(356),ERROR" ID="0xcb460b22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="alloc path faild @map_svg_parser.cpp(366),ERROR" ID="0xcb460b72" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path cmd faild @map_svg_parser.cpp(371),ERROR" ID="0xcb460b9a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s path data faild @map_svg_parser.cpp(378),ERROR" ID="0xcb460bd2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(413),ERROR" ID="0xcb460cea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(420),ERROR" ID="0xcb460d22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map text array faild @map_svg_parser.cpp(429),ERROR" ID="0xcb460d6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(436),ERROR" ID="0xcb460da2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read text faild @map_svg_parser.cpp(443),ERROR" ID="0xcb460dda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(451),ERROR" ID="0xcb460e1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read text offset faild @map_svg_parser.cpp(457),ERROR" ID="0xcb460e4a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(468),ERROR" ID="0xcb460ea2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(475),ERROR" ID="0xcb460eda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(483),ERROR" ID="0xcb460f1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path cmd faild @map_svg_parser.cpp(492),ERROR" ID="0xcb460f62" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text faild @map_svg_parser.cpp(497),ERROR" ID="0xcb460f8a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc text offset faild @map_svg_parser.cpp(507),ERROR" ID="0xcb460fda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s text offset faild @map_svg_parser.cpp(512),ERROR" ID="0xcb461002" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(546),ERROR" ID="0xcb461112" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(553),ERROR" ID="0xcb46114a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map image array faild @map_svg_parser.cpp(558),ERROR" ID="0xcb461172" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(566),ERROR" ID="0xcb4611b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(595),ERROR" ID="0xcb46129a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(602),ERROR" ID="0xcb4612d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(607),ERROR" ID="0xcb4612fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(615),ERROR" ID="0xcb46133a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(647),ERROR" ID="0xcb46143a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(654),ERROR" ID="0xcb461472" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map road array faild @map_svg_parser.cpp(659),ERROR" ID="0xcb46149a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(669),ERROR" ID="0xcb4614ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(676),ERROR" ID="0xcb461522" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(681),ERROR" ID="0xcb46154a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(700),ERROR" ID="0xcb4615e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(707),ERROR" ID="0xcb46161a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="read map poi array faild @map_svg_parser.cpp(712),ERROR" ID="0xcb461642" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[%s] param error! @map_svg_parser.cpp(722),ERROR" ID="0xcb461692" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc map path array faild! @map_svg_parser.cpp(729),ERROR" ID="0xcb4616ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s map text array faild @map_svg_parser.cpp(734),ERROR" ID="0xcb4616f2" />
+                       </MSG_LOG>
\ No newline at end of file
index a146bd5..08d3265 100644 (file)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="MemUtils::InitPSRam g_psramMemory = %x @mem_util.cpp(27),DBG" ID="0xe06c00de" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="MemUtils::InitPSRam g_psramMemory = %x @mem_util.cpp(27),DBG" ID="0xe07000de" />
                        </MSG_LOG>
\ No newline at end of file
index 1c0c3e2..0a4f564 100644 (file)
@@ -1,3 +1,3 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="parse percent value failed, invalid input parameters @number_parser.cpp(35),ERROR" ID="0xe06e011a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="parse percent value failed, input string too long [%d] @number_parser.cpp(44),ERROR" ID="0xe06e0162" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="parse percent value failed, invalid input parameters @number_parser.cpp(35),ERROR" ID="0xe072011a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="parse percent value failed, input string too long [%d] @number_parser.cpp(44),ERROR" ID="0xe0720162" />
                        </MSG_LOG>
\ No newline at end of file
index 41383d4..fee5236 100644 (file)
@@ -1,4 +1,4 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="ACELite version: %s @platform_adapter.cpp(33),DBG" ID="0xe10c010e" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ACELite commit: %s @platform_adapter.cpp(34),DBG" ID="0xe10c0116" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ACELite build stamp: %s @platform_adapter.cpp(35),DBG" ID="0xe10c011e" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="ACELite version: %s @platform_adapter.cpp(34),DBG" ID="0xe1100116" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ACELite commit: %s @platform_adapter.cpp(35),DBG" ID="0xe110011e" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ACELite build stamp: %s @platform_adapter.cpp(36),DBG" ID="0xe1100126" />
                        </MSG_LOG>
\ No newline at end of file
index 7822229..b4df39f 100644 (file)
@@ -9,58 +9,64 @@
                        <MSG STRUCTURE="diag_log_msg1" NAME="paired dev info write error! ret 0x%x @remote_device_manager.c(214),ERROR" ID="0xd80a06b2" />
                        <MSG STRUCTURE="diag_log_msg10" NAME="addr: ****%02x%02x%02x%02x [little endian: %02x%02x%02x%02x**** ] name: %s hdl: %x @remote_device_manager.c(229),INFO" ID="0xd80a072d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="create node error @remote_device_manager.c(233),ERROR" ID="0xd80a074a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @remote_device_manager.c(275),ERROR" ID="0xd80a089a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(282),ERROR" ID="0xd80a08d2" />
-                       <MSG STRUCTURE="diag_log_msg5" NAME="addr: ****%02x%02x%02x%02x hdl: %x @remote_device_manager.c(288),WARNING" ID="0xd80a0903" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv add remote dev node, acquire rmt dev list lock failed. @remote_device_manager.c(292),ERROR" ID="0xd80a0922" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv get remote dev node, acquire rmt dev list lock failed. @remote_device_manager.c(305),ERROR" ID="0xd80a098a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv clear remtoe dev list, acquire rmt dev list lock failed. @remote_device_manager.c(351),ERROR" ID="0xd80a0afa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv set remote dev status found 2 none, acquire rmt dev list lock failed. @remote_device_manager.c(389),ERROR" ID="0xd80a0c2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv dfx show remote dev list, acquire rmt dev list lock failed. @remote_device_manager.c(416),ERROR" ID="0xd80a0d02" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show remote device list: @remote_device_manager.c(422),INFO" ID="0xd80a0d35" />
-                       <MSG STRUCTURE="diag_log_msg9" NAME="| %-4s | %-32s | %-12s | %-16s | %-8s | %-8s | %-8s | %-8s | %-48s | @remote_device_manager.c(428),INFO" ID="0xd80a0d65" />
-                       <MSG STRUCTURE="diag_log_msg12" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16x | %-8d | %-8d | %-8d | %-8d | %-48s | @remote_device_manager.c(444),INFO" ID="0xd80a0de5" />
-                       <MSG STRUCTURE="diag_log_msg6" NAME="| %-4s | %-32s | %-12s | %-16s | %-8s | %-8s | @remote_device_manager.c(451),INFO" ID="0xd80a0e1d" />
-                       <MSG STRUCTURE="diag_log_msg9" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16x | %-8d | %-8d | @remote_device_manager.c(458),INFO" ID="0xd80a0e55" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="show remote device list end! @remote_device_manager.c(466),INFO" ID="0xd80a0e95" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="addr: ****%02X%02X%02X%02X @remote_device_manager.c(474),INFO" ID="0xd80a0ed5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="not in remote list @remote_device_manager.c(483),INFO" ID="0xd80a0f1d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="not have key status: %d have_key: %d @remote_device_manager.c(489),INFO" ID="0xd80a0f4d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s error @remote_device_manager.c(495),ERROR" ID="0xd80a0f7a" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="addr: ****%02X%02X%02X%02X  @remote_device_manager.c(520),INFO" ID="0xd80a1045" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="not in remote list @remote_device_manager.c(525),WARNING" ID="0xd80a106b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy error @remote_device_manager.c(532),ERROR" ID="0xd80a10a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @remote_device_manager.c(544),ERROR" ID="0xd80a1102" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(549),ERROR" ID="0xd80a112a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x result: %02x @remote_device_manager.c(571),INFO" ID="0xd80a11dd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="find/add remote device failed @remote_device_manager.c(596),WARNING" ID="0xd80a12a3" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="get remote device name fail. ret: %x  @remote_device_manager.c(611),WARNING" ID="0xd80a131b" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="get remote device name success. name: %s name_len: %d @remote_device_manager.c(616),INFO" ID="0xd80a1345" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc tmp_addr fail @remote_device_manager.c(620),ERROR" ID="0xd80a1362" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc tmp_name fail @remote_device_manager.c(624),ERROR" ID="0xd80a1382" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(630),ERROR" ID="0xd80a13b2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @remote_device_manager.c(637),ERROR" ID="0xd80a13ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %x @remote_device_manager.c(645),INFO" ID="0xd80a142d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="acl disconnected. dev_hdl: %x @remote_device_manager.c(647),INFO" ID="0xd80a143d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="dev not found @remote_device_manager.c(660),INFO" ID="0xd80a14a5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="find node fail @remote_device_manager.c(671),WARNING" ID="0xd80a14fb" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="memcpy error! last_len: %d cur_len: %d cpy_len: %d ret: %x @remote_device_manager.c(682),ERROR" ID="0xd80a1552" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="get pair devices num fail ret = %d @remote_device_manager.c(733),ERROR" ID="0xd80a16ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="get pair devices fail ret = %d @remote_device_manager.c(748),ERROR" ID="0xd80a1762" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap get paired devices list, acquire rmt dev list lock failed. @remote_device_manager.c(769),ERROR" ID="0xd80a180a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="num error! i: %d *number: %d @remote_device_manager.c(798),ERROR" ID="0xd80a18f2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="get pair devices num fail ret = %d @remote_device_manager.c(837),ERROR" ID="0xd80a1a2a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @remote_device_manager.c(856),INFO" ID="0xd80a1ac5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_un_pair_device ret: %x @remote_device_manager.c(859),INFO" ID="0xd80a1add" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @remote_device_manager.c(863),ERROR" ID="0xd80a1afa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(867),ERROR" ID="0xd80a1b1a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="acquire rmt dev list lock failed. @remote_device_manager.c(895),ERROR" ID="0xd80a1bfa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gap remove all pairs, acquire rmt dev list lock failed. @remote_device_manager.c(923),ERROR" ID="0xd80a1cda" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remove pair device fail @remote_device_manager.c(955),ERROR" ID="0xd80a1dda" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="remove pair all devices key fail @remote_device_manager.c(965),ERROR" ID="0xd80a1e2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="disconnect all devices fail @remote_device_manager.c(969),ERROR" ID="0xd80a1e4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="dev not found @remote_device_manager.c(996),INFO" ID="0xd80a1f25" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="dev not found @remote_device_manager.c(1019),INFO" ID="0xd80a1fdd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(1038),INFO" ID="0xd80a2075" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="dev not found @remote_device_manager.c(1062),INFO" ID="0xd80a2135" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @remote_device_manager.c(259),ERROR" ID="0xd80a081a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(264),ERROR" ID="0xd80a0842" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @remote_device_manager.c(293),ERROR" ID="0xd80a092a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(300),ERROR" ID="0xd80a0962" />
+                       <MSG STRUCTURE="diag_log_msg5" NAME="addr: ****%02x%02x%02x%02x hdl: %x @remote_device_manager.c(306),WARNING" ID="0xd80a0993" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv add remote dev node, acquire rmt dev list lock failed. @remote_device_manager.c(310),ERROR" ID="0xd80a09b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv get remote dev node, acquire rmt dev list lock failed. @remote_device_manager.c(323),ERROR" ID="0xd80a0a1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv clear remtoe dev list, acquire rmt dev list lock failed. @remote_device_manager.c(369),ERROR" ID="0xd80a0b8a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv set remote dev status found 2 none, acquire rmt dev list lock failed. @remote_device_manager.c(407),ERROR" ID="0xd80a0cba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="btsrv dfx show remote dev list, acquire rmt dev list lock failed. @remote_device_manager.c(434),ERROR" ID="0xd80a0d92" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show remote device list: @remote_device_manager.c(440),INFO" ID="0xd80a0dc5" />
+                       <MSG STRUCTURE="diag_log_msg9" NAME="| %-4s | %-32s | %-12s | %-16s | %-8s | %-8s | %-8s | %-8s | %-48s | @remote_device_manager.c(446),INFO" ID="0xd80a0df5" />
+                       <MSG STRUCTURE="diag_log_msg12" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16x | %-8d | %-8d | %-8d | %-8d | %-48s | @remote_device_manager.c(462),INFO" ID="0xd80a0e75" />
+                       <MSG STRUCTURE="diag_log_msg6" NAME="| %-4s | %-32s | %-12s | %-16s | %-8s | %-8s | @remote_device_manager.c(469),INFO" ID="0xd80a0ead" />
+                       <MSG STRUCTURE="diag_log_msg9" NAME="| %-4d | %-32s | ****%02x%02x%02x%02x | %-16x | %-8d | %-8d | @remote_device_manager.c(476),INFO" ID="0xd80a0ee5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="show remote device list end! @remote_device_manager.c(484),INFO" ID="0xd80a0f25" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="addr: ****%02X%02X%02X%02X @remote_device_manager.c(492),INFO" ID="0xd80a0f65" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="not in remote list @remote_device_manager.c(501),INFO" ID="0xd80a0fad" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="not have key status: %d have_key: %d @remote_device_manager.c(507),INFO" ID="0xd80a0fdd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s error @remote_device_manager.c(513),ERROR" ID="0xd80a100a" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="addr: ****%02X%02X%02X%02X  @remote_device_manager.c(538),INFO" ID="0xd80a10d5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="not in remote list @remote_device_manager.c(543),WARNING" ID="0xd80a10fb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy error @remote_device_manager.c(550),ERROR" ID="0xd80a1132" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @remote_device_manager.c(562),ERROR" ID="0xd80a1192" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(567),ERROR" ID="0xd80a11ba" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="dev_hdl: %08x result: %02x @remote_device_manager.c(589),INFO" ID="0xd80a126d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="find/add remote device failed @remote_device_manager.c(614),WARNING" ID="0xd80a1333" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="get remote device name fail. ret: %x  @remote_device_manager.c(629),WARNING" ID="0xd80a13ab" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="get remote device name success. name: %s name_len: %d @remote_device_manager.c(634),INFO" ID="0xd80a13d5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc tmp_addr fail @remote_device_manager.c(638),ERROR" ID="0xd80a13f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc tmp_name fail @remote_device_manager.c(642),ERROR" ID="0xd80a1412" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(648),ERROR" ID="0xd80a1442" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="send msg fail. %x @remote_device_manager.c(655),ERROR" ID="0xd80a147a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="dev_hdl: %x @remote_device_manager.c(663),INFO" ID="0xd80a14bd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="acl disconnected. dev_hdl: %x @remote_device_manager.c(665),INFO" ID="0xd80a14cd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="dev not found @remote_device_manager.c(678),INFO" ID="0xd80a1535" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="find node fail @remote_device_manager.c(689),WARNING" ID="0xd80a158b" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="memcpy error! last_len: %d cur_len: %d cpy_len: %d ret: %x @remote_device_manager.c(700),ERROR" ID="0xd80a15e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @remote_device_manager.c(707),ERROR" ID="0xd80a161a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(712),ERROR" ID="0xd80a1642" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="get pair devices num fail ret = %d @remote_device_manager.c(765),ERROR" ID="0xd80a17ea" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="get pair devices fail ret = %d @remote_device_manager.c(780),ERROR" ID="0xd80a1862" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap get paired devices list, acquire rmt dev list lock failed. @remote_device_manager.c(801),ERROR" ID="0xd80a190a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="num error! i: %d *number: %d @remote_device_manager.c(830),ERROR" ID="0xd80a19f2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="get pair devices num fail ret = %d @remote_device_manager.c(869),ERROR" ID="0xd80a1b2a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_disconnect_acl_by_handle ret: %x @remote_device_manager.c(888),INFO" ID="0xd80a1bc5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk_un_pair_device ret: %x @remote_device_manager.c(891),INFO" ID="0xd80a1bdd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @remote_device_manager.c(895),ERROR" ID="0xd80a1bfa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(899),ERROR" ID="0xd80a1c1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="acquire rmt dev list lock failed. @remote_device_manager.c(927),ERROR" ID="0xd80a1cfa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gap remove all pairs, acquire rmt dev list lock failed. @remote_device_manager.c(955),ERROR" ID="0xd80a1dda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remove pair device fail @remote_device_manager.c(987),ERROR" ID="0xd80a1eda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remove pair all devices key fail @remote_device_manager.c(997),ERROR" ID="0xd80a1f2a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="disconnect all devices fail @remote_device_manager.c(1001),ERROR" ID="0xd80a1f4a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="malloc fail @remote_device_manager.c(1032),ERROR" ID="0xd80a2042" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(1037),ERROR" ID="0xd80a206a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="dev not found @remote_device_manager.c(1046),INFO" ID="0xd80a20b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="dev not found @remote_device_manager.c(1069),INFO" ID="0xd80a216d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy fail @remote_device_manager.c(1088),INFO" ID="0xd80a2205" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="dev not found @remote_device_manager.c(1112),INFO" ID="0xd80a22c5" />
                        </MSG_LOG>
\ No newline at end of file
index 8856e20..f4d0e89 100644 (file)
@@ -9,59 +9,59 @@
                        <MSG STRUCTURE="diag_log_msg4" NAME="addr:%02x:**:**:**:%02x:%02x, handle:%02x @sdk_general_gatt.c(403),INFO" ID="0xd86e0c9d" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[ACore] ble gatt le conn event cbk already connected on addr:%02x:**:**:**:%02x:%02x @sdk_general_gatt.c(418),INFO" ID="0xd86e0d15" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] ble gatt le conn event cbk memcpy addr error @sdk_general_gatt.c(428),ERROR" ID="0xd86e0d62" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[ACore] ble gatt le conn event cbk tl not found on addr:%02x:**:**:**:%02x:%02x @sdk_general_gatt.c(438),INFO" ID="0xd86e0db5" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[ACore] ble gatt le conn event cbk tl remove on addr:%02x:**:**:**:%02x:%02x @sdk_general_gatt.c(444),INFO" ID="0xd86e0de5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt create server result bta len error, len = %u @sdk_general_gatt.c(459),ERROR" ID="0xd86e0e5a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] mc ble gatt create server result bta memcpy fail:%d,len:%d @sdk_general_gatt.c(467),ERROR" ID="0xd86e0e9a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt create service result bta len error. len = %u @sdk_general_gatt.c(480),ERROR" ID="0xd86e0f02" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt create service result bta memcpy fail: %d @sdk_general_gatt.c(487),ERROR" ID="0xd86e0f3a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt start service result bta len error. len = %u @sdk_general_gatt.c(501),ERROR" ID="0xd86e0faa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt start service result bta memcpy faile error: %d @sdk_general_gatt.c(508),ERROR" ID="0xd86e0fe2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt get gap ui attributes result bta len error. len = %u @sdk_general_gatt.c(521),ERROR" ID="0xd86e104a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt get gap ui attributes result bta memcpy faile error: %d @sdk_general_gatt.c(528),ERROR" ID="0xd86e1082" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery service rsp bta len error. len = %u @sdk_general_gatt.c(541),ERROR" ID="0xd86e10ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt discovery service rsp bta discovery_service error @sdk_general_gatt.c(549),ERROR" ID="0xd86e112a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery service complete bta len error. len = %u @sdk_general_gatt.c(562),ERROR" ID="0xd86e1192" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt discovery service complete bta discovery_service error @sdk_general_gatt.c(570),ERROR" ID="0xd86e11d2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt add characteristic result bta len error, len = %u @sdk_general_gatt.c(583),ERROR" ID="0xd86e123a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt add characteristic result bta memcpy fail error: %d @sdk_general_gatt.c(589),ERROR" ID="0xd86e126a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery include service rsp bta len error. len = %u @sdk_general_gatt.c(602),ERROR" ID="0xd86e12d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt discovery include service rsp bta discovery_service error @sdk_general_gatt.c(610),ERROR" ID="0xd86e1312" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery characteristics response bta len error. len = %u @sdk_general_gatt.c(623),ERROR" ID="0xd86e137a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore]mc ble gatt discovery characteristics response bta discovery_service error @sdk_general_gatt.c(631),ERROR" ID="0xd86e13ba" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery characteristics complete bta len error. len = %u @sdk_general_gatt.c(644),ERROR" ID="0xd86e1422" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore]mc ble gatt discovery characteristics complete bta discovery_service error @sdk_general_gatt.c(652),ERROR" ID="0xd86e1462" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery descriptor response bta len error. len = %u @sdk_general_gatt.c(665),ERROR" ID="0xd86e14ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt discovery descriptor response bta discovery_service error @sdk_general_gatt.c(673),ERROR" ID="0xd86e150a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery descriptor complete bta len error. len = %u @sdk_general_gatt.c(686),ERROR" ID="0xd86e1572" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt discovery descriptor complete bta discovery_service error @sdk_general_gatt.c(693),ERROR" ID="0xd86e15aa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt get hid report map response bta finish. result code = %x @sdk_general_gatt.c(705),INFO" ID="0xd86e160d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt get hid report map response bta len error. len = %u @sdk_general_gatt.c(711),INFO" ID="0xd86e163d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt read character complete bta len error. len = %u @sdk_general_gatt.c(726),ERROR" ID="0xd86e16b2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt read characterr complete bta read character error @sdk_general_gatt.c(733),ERROR" ID="0xd86e16ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] read service value finish. error code = %x @sdk_general_gatt.c(745),INFO" ID="0xd86e174d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] read service value response len error. len = %u @sdk_general_gatt.c(751),INFO" ID="0xd86e177d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] write service value finish. error code = %x @sdk_general_gatt.c(765),INFO" ID="0xd86e17ed" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] write service value response len error. len = %u @sdk_general_gatt.c(771),INFO" ID="0xd86e181d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt read descriptor response bta len error. len = %u @sdk_general_gatt.c(786),INFO" ID="0xd86e1895" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt read descriptor response bta error @sdk_general_gatt.c(793),ERROR" ID="0xd86e18ca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt character value notification bta len error. len = %u @sdk_general_gatt.c(806),INFO" ID="0xd86e1935" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt character value notification bta new fail @sdk_general_gatt.c(814),ERROR" ID="0xd86e1972" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt character value notification bta memset fail @sdk_general_gatt.c(821),ERROR" ID="0xd86e19aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt character value notification bta error @sdk_general_gatt.c(829),ERROR" ID="0xd86e19ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt read descriptor response bta error @sdk_general_gatt.c(837),ERROR" ID="0xd86e1a2a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="mc ble gatt character value notification bta handle:0x%x, len:%d @sdk_general_gatt.c(847),INFO" ID="0xd86e1a7d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt exchange mtu ind len error. len = %u @sdk_general_gatt.c(859),INFO" ID="0xd86e1add" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt exchange mtu ind error @sdk_general_gatt.c(863),ERROR" ID="0xd86e1afa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt handle service evt bta len error. len = %u @sdk_general_gatt.c(875),INFO" ID="0xd86e1b5d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt handle service evt bta new fail @sdk_general_gatt.c(882),ERROR" ID="0xd86e1b92" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt handle service evt bta memset fail @sdk_general_gatt.c(889),ERROR" ID="0xd86e1bca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt handle service evt bta addr error @sdk_general_gatt.c(897),ERROR" ID="0xd86e1c0a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt server read evt bta len error len = %u @sdk_general_gatt.c(910),INFO" ID="0xd86e1c75" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt server read evt bta new fail @sdk_general_gatt.c(916),ERROR" ID="0xd86e1ca2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt server read evt bta memset fai @sdk_general_gatt.c(921),ERROR" ID="0xd86e1cca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt server read evt bta addr error @sdk_general_gatt.c(927),ERROR" ID="0xd86e1cfa" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble conn general gatt proc:cmdid:0x%02X pay_len:%d. @sdk_general_gatt.c(946),INFO" ID="0xd86e1d95" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble conn general gatt proc no handle for command id:0x%02x. @sdk_general_gatt.c(961),INFO" ID="0xd86e1e0d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bt at cmd set le att mtu param fail, mtu param is null! @sdk_general_gatt.c(991),ERROR" ID="0xd86e1efa" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ACore] ble gatt le conn event cbk tl not found on addr:%02x:**:**:**:%02x:%02x @sdk_general_gatt.c(439),INFO" ID="0xd86e0dbd" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ACore] ble gatt le conn event cbk tl remove on addr:%02x:**:**:**:%02x:%02x @sdk_general_gatt.c(445),INFO" ID="0xd86e0ded" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt create server result bta len error, len = %u @sdk_general_gatt.c(461),ERROR" ID="0xd86e0e6a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] mc ble gatt create server result bta memcpy fail:%d,len:%d @sdk_general_gatt.c(469),ERROR" ID="0xd86e0eaa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt create service result bta len error. len = %u @sdk_general_gatt.c(482),ERROR" ID="0xd86e0f12" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt create service result bta memcpy fail: %d @sdk_general_gatt.c(489),ERROR" ID="0xd86e0f4a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt start service result bta len error. len = %u @sdk_general_gatt.c(503),ERROR" ID="0xd86e0fba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt start service result bta memcpy faile error: %d @sdk_general_gatt.c(510),ERROR" ID="0xd86e0ff2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt get gap ui attributes result bta len error. len = %u @sdk_general_gatt.c(523),ERROR" ID="0xd86e105a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt get gap ui attributes result bta memcpy faile error: %d @sdk_general_gatt.c(530),ERROR" ID="0xd86e1092" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery service rsp bta len error. len = %u @sdk_general_gatt.c(543),ERROR" ID="0xd86e10fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt discovery service rsp bta discovery_service error @sdk_general_gatt.c(551),ERROR" ID="0xd86e113a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery service complete bta len error. len = %u @sdk_general_gatt.c(564),ERROR" ID="0xd86e11a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt discovery service complete bta discovery_service error @sdk_general_gatt.c(572),ERROR" ID="0xd86e11e2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt add characteristic result bta len error, len = %u @sdk_general_gatt.c(585),ERROR" ID="0xd86e124a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt add characteristic result bta memcpy fail error: %d @sdk_general_gatt.c(591),ERROR" ID="0xd86e127a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery include service rsp bta len error. len = %u @sdk_general_gatt.c(604),ERROR" ID="0xd86e12e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt discovery include service rsp bta discovery_service error @sdk_general_gatt.c(612),ERROR" ID="0xd86e1322" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery characteristics response bta len error. len = %u @sdk_general_gatt.c(625),ERROR" ID="0xd86e138a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore]mc ble gatt discovery characteristics response bta discovery_service error @sdk_general_gatt.c(633),ERROR" ID="0xd86e13ca" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery characteristics complete bta len error. len = %u @sdk_general_gatt.c(646),ERROR" ID="0xd86e1432" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore]mc ble gatt discovery characteristics complete bta discovery_service error @sdk_general_gatt.c(654),ERROR" ID="0xd86e1472" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery descriptor response bta len error. len = %u @sdk_general_gatt.c(667),ERROR" ID="0xd86e14da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt discovery descriptor response bta discovery_service error @sdk_general_gatt.c(675),ERROR" ID="0xd86e151a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt discovery descriptor complete bta len error. len = %u @sdk_general_gatt.c(688),ERROR" ID="0xd86e1582" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt discovery descriptor complete bta discovery_service error @sdk_general_gatt.c(695),ERROR" ID="0xd86e15ba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt get hid report map response bta finish. result code = %x @sdk_general_gatt.c(707),INFO" ID="0xd86e161d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt get hid report map response bta len error. len = %u @sdk_general_gatt.c(713),INFO" ID="0xd86e164d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt read character complete bta len error. len = %u @sdk_general_gatt.c(728),ERROR" ID="0xd86e16c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt read characterr complete bta read character error @sdk_general_gatt.c(735),ERROR" ID="0xd86e16fa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] read service value finish. error code = %x @sdk_general_gatt.c(747),INFO" ID="0xd86e175d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] read service value response len error. len = %u @sdk_general_gatt.c(753),INFO" ID="0xd86e178d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] write service value finish. error code = %x @sdk_general_gatt.c(767),INFO" ID="0xd86e17fd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] write service value response len error. len = %u @sdk_general_gatt.c(773),INFO" ID="0xd86e182d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt read descriptor response bta len error. len = %u @sdk_general_gatt.c(788),INFO" ID="0xd86e18a5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt read descriptor response bta error @sdk_general_gatt.c(795),ERROR" ID="0xd86e18da" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt character value notification bta len error. len = %u @sdk_general_gatt.c(808),INFO" ID="0xd86e1945" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt character value notification bta new fail @sdk_general_gatt.c(816),ERROR" ID="0xd86e1982" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt character value notification bta memset fail @sdk_general_gatt.c(823),ERROR" ID="0xd86e19ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt character value notification bta error @sdk_general_gatt.c(831),ERROR" ID="0xd86e19fa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt read descriptor response bta error @sdk_general_gatt.c(839),ERROR" ID="0xd86e1a3a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="mc ble gatt character value notification bta handle:0x%x, len:%d @sdk_general_gatt.c(849),INFO" ID="0xd86e1a8d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt exchange mtu ind len error. len = %u @sdk_general_gatt.c(861),INFO" ID="0xd86e1aed" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt exchange mtu ind error @sdk_general_gatt.c(865),ERROR" ID="0xd86e1b0a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt handle service evt bta len error. len = %u @sdk_general_gatt.c(877),INFO" ID="0xd86e1b6d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt handle service evt bta new fail @sdk_general_gatt.c(884),ERROR" ID="0xd86e1ba2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt handle service evt bta memset fail @sdk_general_gatt.c(891),ERROR" ID="0xd86e1bda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt handle service evt bta addr error @sdk_general_gatt.c(899),ERROR" ID="0xd86e1c1a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] mc ble gatt server read evt bta len error len = %u @sdk_general_gatt.c(912),INFO" ID="0xd86e1c85" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt server read evt bta new fail @sdk_general_gatt.c(918),ERROR" ID="0xd86e1cb2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mc ble gatt server read evt bta memset fai @sdk_general_gatt.c(923),ERROR" ID="0xd86e1cda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ACore] mc ble gatt server read evt bta addr error @sdk_general_gatt.c(929),ERROR" ID="0xd86e1d0a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[ACore] ble conn general gatt proc:cmdid:0x%02X pay_len:%d. @sdk_general_gatt.c(948),INFO" ID="0xd86e1da5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ACore] ble conn general gatt proc no handle for command id:0x%02x. @sdk_general_gatt.c(963),INFO" ID="0xd86e1e1d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[Error] bt at cmd set le att mtu param fail, mtu param is null! @sdk_general_gatt.c(993),ERROR" ID="0xd86e1f0a" />
                        </MSG_LOG>
\ No newline at end of file
index 1812a70..2487c86 100644 (file)
@@ -1,20 +1,20 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(312),ERROR" ID="0xd8e009c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(329),ERROR" ID="0xd8e00a4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(354),ERROR" ID="0xd8e00b12" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(318),ERROR" ID="0xd8e009f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(335),ERROR" ID="0xd8e00a7a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(360),ERROR" ID="0xd8e00b42" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="rssi = %d  @stack_gap_if.c(385),INFO" ID="0xd8e00c0d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="mode = %02x  @stack_gap_if.c(437),INFO" ID="0xd8e00dad" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s error @stack_gap_if.c(529),ERROR" ID="0xd8e0108a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s error @stack_gap_if.c(533),ERROR" ID="0xd8e010aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(563),ERROR" ID="0xd8e0119a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="name_len = %hu, name = %s  @stack_gap_if.c(567),INFO" ID="0xd8e011bd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(598),ERROR" ID="0xd8e012b2" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="remote addr : ***0x%x:0x%x:0x%x  @stack_gap_if.c(603),INFO" ID="0xd8e012dd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(687),ERROR" ID="0xd8e0157a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(693),ERROR" ID="0xd8e015aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(732),ERROR" ID="0xd8e016e2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="conn_hdl=0x%x @stack_gap_if.c(738),INFO" ID="0xd8e01715" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="deinit bt sdk @stack_gap_if.c(745),INFO" ID="0xd8e0174d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="send mem_id to bt in_id=0x%x out_id=0x%x @stack_gap_if.c(772),INFO" ID="0xd8e01825" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(813),ERROR" ID="0xd8e0196a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(366),ERROR" ID="0xd8e00b72" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="rssi = %d  @stack_gap_if.c(391),INFO" ID="0xd8e00c3d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="mode = %02x  @stack_gap_if.c(443),INFO" ID="0xd8e00ddd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s error @stack_gap_if.c(535),ERROR" ID="0xd8e010ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s error @stack_gap_if.c(539),ERROR" ID="0xd8e010da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(569),ERROR" ID="0xd8e011ca" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="name_len = %hu, name = %s  @stack_gap_if.c(573),INFO" ID="0xd8e011ed" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(609),ERROR" ID="0xd8e0130a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="remote addr : ***0x%x:0x%x:0x%x  @stack_gap_if.c(614),INFO" ID="0xd8e01335" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(698),ERROR" ID="0xd8e015d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(704),ERROR" ID="0xd8e01602" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(743),ERROR" ID="0xd8e0173a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="conn_hdl=0x%x @stack_gap_if.c(749),INFO" ID="0xd8e0176d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="deinit bt sdk @stack_gap_if.c(756),INFO" ID="0xd8e017a5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="send mem_id to bt in_id=0x%x out_id=0x%x @stack_gap_if.c(783),INFO" ID="0xd8e0187d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memcpy_s fail. @stack_gap_if.c(824),ERROR" ID="0xd8e019c2" />
                        </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_coverflow_view.cpp.xml b/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_coverflow_view.cpp.xml
new file mode 100644 (file)
index 0000000..9cb8a70
--- /dev/null
@@ -0,0 +1,3 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="add faild, Input parameter error. @ui_coverflow_view.cpp(94),ERROR" ID="0xcb3e02f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="remove faild, Input parameter error. @ui_coverflow_view.cpp(135),ERROR" ID="0xcb3e043a" />
+                       </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_hexagons_list.cpp.xml b/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_hexagons_list.cpp.xml
new file mode 100644 (file)
index 0000000..ff2fbb7
--- /dev/null
@@ -0,0 +1,6 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="can not add view which is not image view @ui_hexagons_list.cpp(65),ERROR" ID="0xcb34020a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="can not add view which is not image view @ui_hexagons_list.cpp(89),ERROR" ID="0xcb3402ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="don't support scale when rebound mode is normal @ui_hexagons_list.cpp(219),ERROR" ID="0xcb3406da" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="scale value %f is invalid @ui_hexagons_list.cpp(224),ERROR" ID="0xcb340702" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="parameter is not valid, distance_:%u size:%d @ui_hexagons_list.cpp(614),ERROR" ID="0xcb341332" />
+                       </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_icosahedron_view.cpp.xml b/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_icosahedron_view.cpp.xml
new file mode 100644 (file)
index 0000000..e4a5ae0
--- /dev/null
@@ -0,0 +1,2 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="A maximum of 20 records can be added. @ui_icosahedron_view.cpp(100),ERROR" ID="0xcb420322" />
+                       </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_kaleidoscope_view.cpp.xml b/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_kaleidoscope_view.cpp.xml
new file mode 100644 (file)
index 0000000..f39f1c7
--- /dev/null
@@ -0,0 +1,4 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="buffer is nil @ui_kaleidoscope_view.cpp(46),ERROR" ID="0xcb3a0172" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="Fmt not support: %d @ui_kaleidoscope_view.cpp(55),ERROR" ID="0xcb3a01ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Init KaleidoscopeUtils failed. @ui_kaleidoscope_view.cpp(62),ERROR" ID="0xcb3a01f2" />
+                       </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_map_view.cpp.xml b/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_map_view.cpp.xml
new file mode 100644 (file)
index 0000000..6b960ad
--- /dev/null
@@ -0,0 +1,3 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="pois_ malloc fail @ui_map_view.cpp(79),ERROR" ID="0xcb44027a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="roads_ malloc fail @ui_map_view.cpp(130),ERROR" ID="0xcb440412" />
+                       </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_roller_view.cpp.xml b/code/sdk/interim_binary/brandy/acore/build_hso_cfg/hso_database/xml/base/closed_comp/ui_roller_view.cpp.xml
new file mode 100644 (file)
index 0000000..6c53c2d
--- /dev/null
@@ -0,0 +1,12 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is nullptr! @ui_roller_view.cpp(177),ERROR" ID="0xcb40058a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Already add an item with the same name. Remove it before adding this. @ui_roller_view.cpp(217),ERROR" ID="0xcb4006ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="name is empty! @ui_roller_view.cpp(257),ERROR" ID="0xcb40080a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Should remove an item in DISPLAY mode @ui_roller_view.cpp(262),ERROR" ID="0xcb400832" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="RollerItemInfo is null! @ui_roller_view.cpp(443),ERROR" ID="0xcb400dda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set align item when mode is about to change. @ui_roller_view.cpp(495),ERROR" ID="0xcb400f7a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Should SetCurrentItem in DISPLAY mode. @ui_roller_view.cpp(499),ERROR" ID="0xcb400f9a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="Cannot find an item with name: %s @ui_roller_view.cpp(514),ERROR" ID="0xcb401012" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot set mode when AlignAnim is running @ui_roller_view.cpp(609),ERROR" ID="0xcb40130a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mode is already set. @ui_roller_view.cpp(614),ERROR" ID="0xcb401332" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Cannot Set mode during transition or cannot set TRANSITION mode. @ui_roller_view.cpp(619),ERROR" ID="0xcb40135a" />
+                       </MSG_LOG>
\ No newline at end of file
index 8737d90..4deeda7 100755 (executable)
@@ -1,52 +1,53 @@
 <MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg = 0x%08X @core_msg.c(91),INFO" ID="0x981802dd" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call memcpy_s Failed, Error Code: [0x%08X] @core_msg.c(214),ERROR" ID="0x981806b2" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call memcpy_s Failed, Error Code: [0x%08X] @core_msg.c(237),ERROR" ID="0x9818076a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]read_pos = %u @core_msg.c(285),ERROR" ID="0x981808ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]write_pos = %u @core_msg.c(286),ERROR" ID="0x981808f2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_size = %u @core_msg.c(287),ERROR" ID="0x981808fa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_size = %u @core_msg.c(323),ERROR" ID="0x98180a1a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_crc = %u @core_msg.c(329),ERROR" ID="0x98180a4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(372),INFO" ID="0x98180ba5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_alloc Failed, Error Code: [0x%08X] @core_msg.c(378),ERROR" ID="0x98180bd2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_attach Failed, Error Code: [0x%08X] @core_msg.c(384),ERROR" ID="0x98180c02" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(392),INFO" ID="0x98180c45" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(401),INFO" ID="0x98180c8d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_get_id Failed, Error Code: [0x%08X] @core_msg.c(409),ERROR" ID="0x98180cca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_detach Failed, Error Code: [0x%08X] @core_msg.c(415),ERROR" ID="0x98180cfa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_free Failed, Error Code: [0x%08X] @core_msg.c(421),ERROR" ID="0x98180d2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(429),INFO" ID="0x98180d6d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(438),INFO" ID="0x98180db5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_get_id Failed, Error Code: [0x%08X] @core_msg.c(442),ERROR" ID="0x98180dd2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_attach Failed, Error Code: [0x%08X] @core_msg.c(448),ERROR" ID="0x98180e02" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(454),INFO" ID="0x98180e35" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(463),INFO" ID="0x98180e7d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_get_id Failed, Error Code: [0x%08X] @core_msg.c(467),ERROR" ID="0x98180e9a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_detach Failed, Error Code: [0x%08X] @core_msg.c(473),ERROR" ID="0x98180eca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(480),INFO" ID="0x98180f05" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(488),INFO" ID="0x98180f45" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(491),INFO" ID="0x98180f5d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_mod_init Failed, Error Code: [0x%08X] @core_msg.c(497),ERROR" ID="0x98180f8a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(504),INFO" ID="0x98180fc5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(512),INFO" ID="0x98181005" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(514),INFO" ID="0x98181015" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(519),INFO" ID="0x9818103d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_mod_deinit Failed, Error Code: [0x%08X] @core_msg.c(525),ERROR" ID="0x9818106a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(531),INFO" ID="0x9818109d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(541),INFO" ID="0x981810ed" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_mod_alloc Failed, Error Code: [0x%08X] @core_msg.c(552),ERROR" ID="0x98181142" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_inst-&gt;qid.u32 = 0x%08X @core_msg.c(559),INFO" ID="0x9818117d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_alloc_shrb Failed, Error Code: [0x%08X] @core_msg.c(564),ERROR" ID="0x981811a2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_inst-&gt;shrb_buf.data_buf = 0x%08X @core_msg.c(568),INFO" ID="0x981811c5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_attach_shrb Failed, Error Code: [0x%08X] @core_msg.c(572),ERROR" ID="0x981811e2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_inst-&gt;shrb_buf.data_buf = 0x%08X @core_msg.c(576),INFO" ID="0x98181205" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(581),INFO" ID="0x9818122d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(589),INFO" ID="0x9818126d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_free_shrb Failed, Error Code: [0x%08X] @core_msg.c(594),ERROR" ID="0x98181292" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_detach_shrb Failed, Error Code: [0x%08X] @core_msg.c(601),ERROR" ID="0x981812ca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_mod_free Failed, Error Code: [0x%08X] @core_msg.c(611),ERROR" ID="0x9818131a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(615),INFO" ID="0x9818133d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_init Failed, Error Code: [0x%08X] @core_msg.c(664),ERROR" ID="0x981814c2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_create Failed, Error Code: [0x%08X] @core_msg.c(675),ERROR" ID="0x9818151a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_destroy Failed, Error Code: [0x%08X] @core_msg.c(696),ERROR" ID="0x981815c2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]ret = 0x%08X @core_msg.c(785),ERROR" ID="0x9818188a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_size = %u @core_msg.c(284),ERROR" ID="0x981808e2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]read_pos = %u @core_msg.c(289),ERROR" ID="0x9818090a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]write_pos = %u @core_msg.c(290),ERROR" ID="0x98180912" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_size = %u @core_msg.c(291),ERROR" ID="0x9818091a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_size = %u @core_msg.c(327),ERROR" ID="0x98180a3a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_crc = %u @core_msg.c(333),ERROR" ID="0x98180a6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(376),INFO" ID="0x98180bc5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_alloc Failed, Error Code: [0x%08X] @core_msg.c(382),ERROR" ID="0x98180bf2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_attach Failed, Error Code: [0x%08X] @core_msg.c(388),ERROR" ID="0x98180c22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(396),INFO" ID="0x98180c65" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(405),INFO" ID="0x98180cad" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_get_id Failed, Error Code: [0x%08X] @core_msg.c(413),ERROR" ID="0x98180cea" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_detach Failed, Error Code: [0x%08X] @core_msg.c(419),ERROR" ID="0x98180d1a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_free Failed, Error Code: [0x%08X] @core_msg.c(425),ERROR" ID="0x98180d4a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(433),INFO" ID="0x98180d8d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(442),INFO" ID="0x98180dd5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_get_id Failed, Error Code: [0x%08X] @core_msg.c(446),ERROR" ID="0x98180df2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_attach Failed, Error Code: [0x%08X] @core_msg.c(452),ERROR" ID="0x98180e22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(458),INFO" ID="0x98180e55" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(467),INFO" ID="0x98180e9d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_get_id Failed, Error Code: [0x%08X] @core_msg.c(471),ERROR" ID="0x98180eba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_shrb_detach Failed, Error Code: [0x%08X] @core_msg.c(477),ERROR" ID="0x98180eea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(484),INFO" ID="0x98180f25" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(492),INFO" ID="0x98180f65" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(495),INFO" ID="0x98180f7d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_mod_init Failed, Error Code: [0x%08X] @core_msg.c(501),ERROR" ID="0x98180faa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(508),INFO" ID="0x98180fe5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(516),INFO" ID="0x98181025" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(518),INFO" ID="0x98181035" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(523),INFO" ID="0x9818105d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_mod_deinit Failed, Error Code: [0x%08X] @core_msg.c(529),ERROR" ID="0x9818108a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(535),INFO" ID="0x981810bd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(545),INFO" ID="0x9818110d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_mod_alloc Failed, Error Code: [0x%08X] @core_msg.c(556),ERROR" ID="0x98181162" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_inst-&gt;qid.u32 = 0x%08X @core_msg.c(563),INFO" ID="0x9818119d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_alloc_shrb Failed, Error Code: [0x%08X] @core_msg.c(568),ERROR" ID="0x981811c2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_inst-&gt;shrb_buf.data_buf = 0x%08X @core_msg.c(572),INFO" ID="0x981811e5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_attach_shrb Failed, Error Code: [0x%08X] @core_msg.c(576),ERROR" ID="0x98181202" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]msg_inst-&gt;shrb_buf.data_buf = 0x%08X @core_msg.c(580),INFO" ID="0x98181225" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(585),INFO" ID="0x9818124d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]enter... @core_msg.c(593),INFO" ID="0x9818128d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_free_shrb Failed, Error Code: [0x%08X] @core_msg.c(598),ERROR" ID="0x981812b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_detach_shrb Failed, Error Code: [0x%08X] @core_msg.c(605),ERROR" ID="0x981812ea" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call core_mod_free Failed, Error Code: [0x%08X] @core_msg.c(615),ERROR" ID="0x9818133a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[hifi]exit... @core_msg.c(619),INFO" ID="0x9818135d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_init Failed, Error Code: [0x%08X] @core_msg.c(668),ERROR" ID="0x981814e2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_create Failed, Error Code: [0x%08X] @core_msg.c(679),ERROR" ID="0x9818153a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]Call msg_fifo_destroy Failed, Error Code: [0x%08X] @core_msg.c(700),ERROR" ID="0x981815e2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hifi]ret = 0x%08X @core_msg.c(789),ERROR" ID="0x981818aa" />
                        </MSG_LOG>
\ No newline at end of file
index f50202b..3ab2f0f 100755 (executable)
@@ -86,7 +86,7 @@
                        <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][EA]next elt:cb_start=0x%x, ts=0x%x, prio=0x%x @ea_ram.c(55),INFO" ID="0x89c401bd" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="hci_set_min_enc_key_size, key_min_size:%d @hci_enc.c(24),INFO" ID="0x880200c5" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="hci_send_enc_change_evt, link_id:%d, status:%d, conhdl:%d, enc_stat:%d @hci_enc.c(74),INFO" ID="0x88020255" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[BIS]Invalid parameters finetimecnt:%d, iso_intv:%d, iso_subevtnum:%d @patch_lld_bis_evt.c(53),WARNING" ID="0x8a6c01ab" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[BIS]Invalid parameters finetimecnt:%d, iso_intv:%d, iso_subevtnum:%d @patch_lld_bis_evt.c(53),WARNING" ID="0x8a7001ab" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="ble log: memcpy adv_manu_spec_data fail when get adv data @ble_general_adv.c(209),ERROR" ID="0x8cb8068a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="ble log: memcpy adv_data fail when get adv data @ble_general_adv.c(231),ERROR" ID="0x8cb8073a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="ble log: memcpy mac fail when get adv data @ble_general_adv.c(255),ERROR" ID="0x8cb807fa" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="Controller|[%d]:0x%02x @bt_transparent_bypass.c(24),INFO" ID="0x8de400c5" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="BypassMode = 0x%x @bt_transparent_bypass.c(35),INFO" ID="0x8de4011d" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[BLE_TEST] private test mode, chmap---0x%x:0x%x:0x%x,0x%x @llc_ch_asses.c(237),INFO" ID="0x8834076d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk_is_device_connected hdl:0x%x status:%d @sdk_gap_conn_management.c(601),INFO" ID="0x8b8212cd" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk_is_device_connected hdl:0x%x status:%d @sdk_gap_conn_management.c(608),INFO" ID="0x8b821305" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][LOGN_STACK_GAP_DIS_REGISTER] RegisterDIService success. @gap_hlp_br.c(1528),INFO" ID="0x8b8a2fc5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][LOGN_STACK_GAP_DIS_REGISTER] RegisterDIService failed. @gap_hlp_br.c(1532),WARNING" ID="0x8b8a2fe3" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][LK_REQUEST] REMOTE_BD_ADDR=%02x:%02x:*:*:*:%02x @hci_secu.c(877),INFO" ID="0x8ad81b6d" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[WARNING][BIS]invalid rx phy %d  @lld_bis_evt.c(2073),WARNING" ID="0x896040cb" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="lld_evt_get_bis_cs_id, primary_desc=%d, second_desc=%d, primary_conflict=%d,second_conflict=%d @lld_bis_evt.c(2129),INFO" ID="0x8960428d" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="lld_evt_get_bis_cs_id2, primary_rem=%d, second_rem=%d,lastcs=%d, primary|second_dbg=0x%x @lld_bis_evt.c(2134),INFO" ID="0x896042b5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LLM]llm_ral_dev_add:ral is full @patch_llm_util.c(107),INFO" ID="0x8a6a035d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLM]llm_ral_dev_add:in_wl=%d, l_irk_valid=%d, p_irk_valid=%d, peer_id_addr_type=%d @patch_llm_util.c(133),INFO" ID="0x8a6a042d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][LLM]llm_ral_dev_add:peer_id_addr=0x%8x%4x, nbral=%d @patch_llm_util.c(139),INFO" ID="0x8a6a045d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LLM]llm_ral_dev_add:ral is full @patch_llm_util.c(107),INFO" ID="0x8a6e035d" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLM]llm_ral_dev_add:in_wl=%d, l_irk_valid=%d, p_irk_valid=%d, peer_id_addr_type=%d @patch_llm_util.c(133),INFO" ID="0x8a6e042d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][LLM]llm_ral_dev_add:peer_id_addr=0x%8x%4x, nbral=%d @patch_llm_util.c(139),INFO" ID="0x8a6e045d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LC]lm_get_auth_method:SP_OOB @lc_task.c(437),INFO" ID="0x887a0dad" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LC]lm_get_auth_method:SP_JUST_WORKS @lc_task.c(443),INFO" ID="0x887a0ddd" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[INFO][LC]lm_get_auth_method:0x%x @lc_task.c(447),INFO" ID="0x887a0dfd" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][param]hci_util_pack:format = NULL @hci_util.c(155),ERROR" ID="0x88d204da" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][param]hci_util_unpack:format = NULL @hci_util.c(248),ERROR" ID="0x88d207c2" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[BIS]pto_tx_idx=%d,pldcntr=%d,tx_desc_idx=%d,pkt_seq_num=%d @lld_bis_evt_ram.c(137),INFO" ID="0x8a30044d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[LD]ld_acl_sched_update_ts ts=0x%x @patch_ld_acl.c(37),INFO" ID="0x8a64012d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[LD]ld_acl_sched_update_ts ts=0x%x @patch_ld_acl.c(37),INFO" ID="0x8a68012d" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="llcp_priv_uhd_req_handler_v1:state%d,llc_env_ptr-&gt;loc_proc_state%d @llc_uhd_llcp.c(102),INFO" ID="0x894e0335" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[INFO][LLC][PHY]llcp_priv_uhd_req_handler_v1:txphys=%d,rxphys=%d @llc_uhd_llcp.c(106),INFO" ID="0x894e0355" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[INFO][LLC][PHY]llcp_priv_uhd_req_handler_v1:tx_uhd_capability%d,rx_uhd_capability%d @llc_uhd_llcp.c(109),INFO" ID="0x894e036d" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[HDAP]stream_id=%d not HDAP @packet_ul.c(54),INFO" ID="0x8c2a01b5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[HDAP]recv_packet_data_ind flow ctrl @packet_ul.c(58),INFO" ID="0x8c2a01d5" />
                        <MSG STRUCTURE="diag_log_msg5" NAME="[HCI][HDAP]data_len=%d, data[5]=0x%x, data[84]=0x%x, data[164]=0x%x, TIME=%ld @packet_ul.c(76),DBG" ID="0x8c2a0266" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]lld_big_acad_ind_handle, biginfo unpack fail @patch_llc_bis_util.c(93),WARNING" ID="0x8a6202eb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]lld_big_acad_ind_handle, biginfo unpack fail @patch_llc_bis_util.c(93),WARNING" ID="0x8a6602eb" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][BIS]uhd phy update:phy=%d,uhd_cap=%d,polar=%d,data_len=%d @lld_bis_uhd.c(153),INFO" ID="0x881004cd" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[INFO][LLD]lld_pdu_tx_flush_list:txnode-&gt;idx=%d @lld_util.c(123),INFO" ID="0x885c03dd" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLD]lld_util_set_cs_bd_address:idx=0x%x, type=%x, bd[5:4]=%x, bd[0]=%x @lld_util.c(166),INFO" ID="0x885c0535" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[ERROR][handle]bt_et_currentrxdescptr_currentrxdescptr_getf()=%d @ld_sscan.c(162),ERROR" ID="0x88a00512" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][param]ld_sscan_env.evt != evt @ld_sscan.c(178),ERROR" ID="0x88a00592" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[ERROR][SSCAN][LD]ld_sscan_evt_canceled_cbk: status = %d @ld_sscan.c(226),INFO" ID="0x88a00715" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="bt_init start... em start addr is 0x%x,em_size is 0x%x @bt_main.c(445),INFO" ID="0x89220ded" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]bt init pmu state change fail @bt_main.c(449),ERROR" ID="0x89220e0a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]bt_hal_phy_init started... @bt_main.c(469),INFO" ID="0x89220ead" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]init_sleep started... @bt_main.c(474),INFO" ID="0x89220ed5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]intc_init started... @bt_main.c(477),INFO" ID="0x89220eed" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]bt param config started... @bt_main.c(480),INFO" ID="0x89220f05" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]bt init end pmu state change fail @bt_main.c(501),ERROR" ID="0x89220faa" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="bt_init start... em start addr is 0x%x,em_size is 0x%x @bt_main.c(446),INFO" ID="0x89220df5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]bt init pmu state change fail @bt_main.c(450),ERROR" ID="0x89220e12" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]bt_hal_phy_init started... @bt_main.c(470),INFO" ID="0x89220eb5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]init_sleep started... @bt_main.c(475),INFO" ID="0x89220edd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]intc_init started... @bt_main.c(478),INFO" ID="0x89220ef5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]bt param config started... @bt_main.c(481),INFO" ID="0x89220f0d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]bt init end pmu state change fail @bt_main.c(502),ERROR" ID="0x89220fb2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="KFIFO: bt kfifo copy in memcpy error @bt_kfifo.c(89),ERROR" ID="0x8cae02ca" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="KFIFO: init_size:%d @bt_kfifo.c(125),INFO" ID="0x8cae03ed" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="KFIFO: none vaild size %d @bt_kfifo.c(131),ERROR" ID="0x8cae041a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="BT_DFT: bt dft aging test control param is NULL @bt_dft.c(1266),INFO" ID="0x8d0a2795" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="BT_DFT: bt dft aging test control param-&gt;pkt_ptr is NULL @bt_dft.c(1271),INFO" ID="0x8d0a27bd" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="BT_DFT: bt dft aging test control %d @bt_dft.c(1280),INFO" ID="0x8d0a2805" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="sco disconnect complete sco_hdl=0x%x @tladapter.c(159),INFO" ID="0x8b9c04fd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="sco disconnect complete sco_hdl=0x%x @tladapter.c(159),ERROR" ID="0x8b9c04fa" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="GET NV ERR, NV Buf is NULL, err_line = %d @bt_mdmrfabb_global.c(1017),ERROR" ID="0x89381fca" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="GET NV ERR, err_line = %d @bt_mdmrfabb_global.c(1027),ERROR" ID="0x8938201a" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="MEMCPY ERR, mem_flag = %d @bt_mdmrfabb_global.c(1041),ERROR" ID="0x8938208a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][CFG]g_aus_number_access MAX Error @bt_em_config.c(1080),ERROR" ID="0x894421c2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][CFG]BT_CFG_FAIL @bt_em_config.c(1131),ERROR" ID="0x8944235a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][CFG] bt_write_cfg_by_em failed @bt_em_config.c(1186),ERROR" ID="0x89442512" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][DFX]dfx_bt_parse_debug_cmd:too many Parameter, quit parsing @patch_btdfx.c(50),INFO" ID="0x8a520195" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][DFX]dfx_bt_parse_debug_cmd:too many Parameter, quit parsing @patch_btdfx.c(50),INFO" ID="0x8a560195" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="pbap srv pull phonebook ret=0x%x @bt_ahi_pbap.c(50),INFO" ID="0x8c9e0195" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="pbap srv pull cardlist ret=0x%x @bt_ahi_pbap.c(68),INFO" ID="0x8c9e0225" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="pbap srv pull cardentry ret=0x%x @bt_ahi_pbap.c(86),INFO" ID="0x8c9e02b5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][AE]llm_ext_adv_evt_end_elt_process:elt_to_free is NULL @llm_ae_pdu.c(944),WARNING" ID="0x884a1d83" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][AE]llm_ext_adv_evt_end_elt_process:nothing to release @llm_ae_pdu.c(952),WARNING" ID="0x884a1dc3" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[ERROR][AE]llm_ae_adv_elt_del:count=%, CNT = %d @llm_ae_pdu.c(1527),ERROR" ID="0x884a2fba" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[WARNING] llcp_channel_map_req_handler , INSTANT_REJECT, state=%d, mode=%d @patch_llc_llcp.c(42),WARNING" ID="0x8a520153" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[WARNING] llcp_channel_map_req_handler, INSTANT_COLLISION, map_instant_action %d instant_action %d @patch_llc_llcp.c(49),WARNING" ID="0x8a52018b" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="llcp_channel_map_req_handler, instant=%d, counter=%d, remote_device_id=%d @patch_llc_llcp.c(59),WARNING" ID="0x8a5201db" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[WARNING] llcp_channel_map_req_handler, INSTANT_PASSED, instant=%d, counter=%d @patch_llc_llcp.c(67),WARNING" ID="0x8a52021b" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ISOAL][ERR]iso_buf_alloc_fail @llc_isoal.c(200),INFO" ID="0x89de0645" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ISOAL][ERR]iso_buf_alloc_fail @llc_isoal.c(246),INFO" ID="0x89de07b5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ISOAL][ERR]iso_buf_alloc_fail @llc_isoal.c(289),INFO" ID="0x89de090d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[HFP][SCO_CONN_REQ] not support sco codec neg @hfp_hlp.c(1554),WARNING" ID="0x8be43093" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[HFP][SCO_CONN] SCO_HANDLE=0x%x @hfp_hlp.c(1624),INFO" ID="0x8be432c5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][create_handle] memcpy failed @gap_hlp_comm.c(260),ERROR" ID="0x8b8e0822" />
-                       <MSG STRUCTURE="diag_log_msg6" NAME="[GAP][ACL_EVENT_CALLBACK] JOB=%u, LINK_TYPE=%u, ACL_LINK_HANDLE=0x%x, REMOTE_ADDR=%02x:%02x:**:**:**:%02x @gap_hlp_comm.c(477),INFO" ID="0x8b8e0eed" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(887),ERROR" ID="0x8b8e1bba" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="gaph_hci_command_cbk, operation=%x, code:%x @gap_hlp_comm.c(981),INFO" ID="0x8b8e1ead" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][MEMCPY_FAILED]CreateContext memcpy fail,ret=%d @gap_hlp_comm.c(1048),INFO" ID="0x8b8e20c5" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LINK_ALREADY_EXISTS] REMOTE_ADDR=%02x:%02x:**:**:**:%02x @gap_hlp_comm.c(1086),INFO" ID="0x8b8e21f5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(1842),ERROR" ID="0x8b8e3992" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(1862),ERROR" ID="0x8b8e3a32" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LOCAL_DISC_REQ] REMOTE_ADDR=%02x:%02x:**:**:**:%02x, can't find acl link @gap_hlp_comm.c(2011),INFO" ID="0x8b8e3edd" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LOCAL_DISC_REQ] REMOTE_ADDR=%02x:%02x:**:**:**:%02x, can't find acl link @gap_hlp_comm.c(2041),INFO" ID="0x8b8e3fcd" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP] acl_link cbk link_type:%d job:%d @gap_hlp_comm.c(444),ERROR" ID="0x8b8e0de2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][acl]job:%d link is NULL @gap_hlp_comm.c(464),ERROR" ID="0x8b8e0e82" />
+                       <MSG STRUCTURE="diag_log_msg6" NAME="[GAP][ACL_EVENT_CALLBACK] JOB=%u, LINK_TYPE=%u, ACL_LINK_HANDLE=0x%x, REMOTE_ADDR=%02x:%02x:**:**:**:%02x @gap_hlp_comm.c(482),INFO" ID="0x8b8e0f15" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(892),ERROR" ID="0x8b8e1be2" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="gaph_hci_command_cbk, operation=%x, code:%x @gap_hlp_comm.c(986),INFO" ID="0x8b8e1ed5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][MEMCPY_FAILED]CreateContext memcpy fail,ret=%d @gap_hlp_comm.c(1053),INFO" ID="0x8b8e20ed" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LINK_ALREADY_EXISTS] REMOTE_ADDR=%02x:%02x:**:**:**:%02x @gap_hlp_comm.c(1091),INFO" ID="0x8b8e221d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(1847),ERROR" ID="0x8b8e39ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(1867),ERROR" ID="0x8b8e3a5a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LOCAL_DISC_REQ] REMOTE_ADDR=%02x:%02x:**:**:**:%02x, can't find acl link @gap_hlp_comm.c(2016),INFO" ID="0x8b8e3f05" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LOCAL_DISC_REQ] REMOTE_ADDR=%02x:%02x:**:**:**:%02x, can't find acl link @gap_hlp_comm.c(2046),INFO" ID="0x8b8e3ff5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][LLD]lld_ae_per_sync_start:evt_defer is null @lld_per_pdu.c(76),WARNING" ID="0x897a0263" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LLD]lld_ae_per_sync_start:sync start ok @lld_per_pdu.c(79),INFO" ID="0x897a027d" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[WARNING][LLD]lld_ae_per_sync_start:not start, syncinfo_time=0x%x, pdu_dur=%d @lld_per_pdu.c(84),WARNING" ID="0x897a02a3" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble disconnect error, the link does not exist. handle = %x @ble_core.c(950),ERROR" ID="0x8cc01db2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="ble core: The number of links has reached the maximum. @ble_core.c(1002),INFO" ID="0x8cc01f55" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble state ind handle message is NULL @ble_core.c(1026),ERROR" ID="0x8cc02012" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: The number of links has reached the maximum. @ble_core.c(1035),INFO" ID="0x8cc0205d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: The number of links has reached the maximum. @ble_core.c(1035),ERROR" ID="0x8cc0205a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble state ind rmt is NULL @ble_core.c(1081),ERROR" ID="0x8cc021ca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble state ind memcpy rmt fail: %d @ble_core.c(1090),ERROR" ID="0x8cc02212" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble state ind malloc fail: %d @ble_core.c(1100),ERROR" ID="0x8cc02262" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: app ble smp key handle message is NULL @ble_core.c(1109),ERROR" ID="0x8cc022aa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble state ind memcpy rmt fail: %d @ble_core.c(1154),ERROR" ID="0x8cc02412" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble log: AppBleConnResult msg_data is NULL @ble_core.c(1181),ERROR" ID="0x8cc024ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble log: AppBleConnResult link does not exist on handle:%x @ble_core.c(1188),ERROR" ID="0x8cc02522" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: conn update result fail = %d @ble_core.c(1208),WARNING" ID="0x8cc025c3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: Had Active Disconn,not to retry @ble_core.c(1333),INFO" ID="0x8cc029ad" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ANCS]500ms comes! @ble_core.c(1365),INFO" ID="0x8cc02aad" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: unsupported msg_id: 0x%x @ble_core.c(1385),INFO" ID="0x8cc02b4d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: app ble init fail ret:%x @ble_core.c(1481),ERROR" ID="0x8cc02e4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble core connect proc cmds param NULL @ble_core.c(1515),ERROR" ID="0x8cc02f5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble core connect proc cmds pkt_ptr NULL @ble_core.c(1520),ERROR" ID="0x8cc02f82" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble state ind memcpy rmt fail: %d @ble_core.c(1088),ERROR" ID="0x8cc02202" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: app ble smp key handle message is NULL @ble_core.c(1102),ERROR" ID="0x8cc02272" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble state ind memcpy rmt fail: %d @ble_core.c(1147),ERROR" ID="0x8cc023da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble log: AppBleConnResult msg_data is NULL @ble_core.c(1174),ERROR" ID="0x8cc024b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble log: AppBleConnResult link does not exist on handle:%x @ble_core.c(1181),ERROR" ID="0x8cc024ea" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: conn update result fail = %d @ble_core.c(1209),WARNING" ID="0x8cc025cb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: Had Active Disconn,not to retry @ble_core.c(1334),INFO" ID="0x8cc029b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ANCS]500ms comes! @ble_core.c(1366),INFO" ID="0x8cc02ab5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: unsupported msg_id: 0x%x @ble_core.c(1386),INFO" ID="0x8cc02b55" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: app ble init fail ret:%x @ble_core.c(1482),ERROR" ID="0x8cc02e52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble core connect proc cmds param NULL @ble_core.c(1516),ERROR" ID="0x8cc02f62" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble core connect proc cmds pkt_ptr NULL @ble_core.c(1521),ERROR" ID="0x8cc02f8a" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[ICO]accept status = %d, conhdl = %d @llc_iso_ico_hci.c(132),INFO" ID="0x89fa0425" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[iso_debug]remove ico 0x%x, %d @llc_iso_ico_hci.c(383),INFO" ID="0x89fa0bfd" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[ICO_debug]channel_num = %d, event_counter1 = %d, event_count2 = %d @llc_iso_ico_hci.c(441),INFO" ID="0x89fa0dcd" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[INFO][LMP]lmp_bt_uhd_pref_phy_req_handler Enter! State=%d @lc_lmp_uhd.c(415),INFO" ID="0x89a00cfd" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[L2CAP][SIGNAL_SEND]HANDLE=0x%x, CODE=0x%x, IDENTIFIER=%d, LENGTH=%d @l2cap_data_proc.c(126),INFO" ID="0x8bc403f5" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="hfp_handle_ev_disconnect_complete hdl=0x%x @sdk_hfp.c(202),INFO" ID="0x8b7e0655" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp set active mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(229),WARNING" ID="0x8b7e072b" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp map mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(236),INFO" ID="0x8b7e0765" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp set active mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(229),ERROR" ID="0x8b7e072a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp map mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(236),ERROR" ID="0x8b7e0762" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="memory copy failed ret=0x%x @sdk_hfp.c(250),WARNING" ID="0x8b7e07d3" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp map mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(291),WARNING" ID="0x8b7e091b" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="SDK_HFP: send msg to mcu ev= 0x%x, role=0x%x @sdk_hfp.c(296),WARNING" ID="0x8b7e0943" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp map mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(291),ERROR" ID="0x8b7e091a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="SDK_HFP: send msg to mcu ev= 0x%x, role=0x%x @sdk_hfp.c(296),ERROR" ID="0x8b7e0942" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="SDK_HFP: ev disconnect, conn_cfm-&gt;role = %x, conn_cfm-&gt;result=%d @sdk_hfp.c(360),INFO" ID="0x8b7e0b45" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="SDK_HFP: slc event = %d, slc_info-&gt;role = %x @sdk_hfp.c(388),INFO" ID="0x8b7e0c25" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[HFP][SDK]SLC RELEASED role=%d handle=0x%x @sdk_hfp.c(452),INFO" ID="0x8b7e0e25" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][AE]llm_per_sync_lost_report:sync link establish fail @llm_per_common.c(73),INFO" ID="0x8996024d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][AE]llm_per_sync_lost_report:sync link timeout @llm_per_common.c(86),INFO" ID="0x899602b5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][AE]:event is masked @llm_per_common.c(114),WARNING" ID="0x89960393" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI] create le connection addr:%02x******%02x%02x @hci_link_le.c(116),ERROR" ID="0x8ad603a2" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[INFO][LLD]lld_evt_ext_adv_schedule:llc_env[%d]=0x%x @lld_ae_sched.c(71),INFO" ID="0x8818023d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LLD]lld_evt_ext_adv_schedule:adv expire stop @lld_ae_sched.c(77),INFO" ID="0x8818026d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="pri_embuff failed @lld_ae_sched.c(166),ERROR" ID="0x88180532" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="role = slave, esco_lt_addr = acl_lt_addr = %d @lc_sco.c(1659),INFO" ID="0x887233dd" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][param]lc_sco_env[sync_linkid].p_nego_params != NULL @lc_sco.c(1912),ERROR" ID="0x88723bc2" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[ERROR]lc_sco_peer_reject_disc link_id=%d, reason=%d @lc_sco.c(2020),ERROR" ID="0x88723f22" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][LE_CONN_COMPLETE] STATUS=0x%x @hci_ev_le.c(408),INFO" ID="0x8ad00cc5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI][LE_META_ISO_EV] it is iso event @hci_ev_le.c(527),INFO" ID="0x8ad0107d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][LE_CONN_COMPLETE] STATUS=0x%x role:%d conn_handle:%d @hci_ev_le.c(410),ERROR" ID="0x8ad00cd2" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][LE_CONN_COMPLETE] addr=%02x******%02x%02x addr_type:%d @hci_ev_le.c(417),ERROR" ID="0x8ad00d0a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI][LE_META_ISO_EV] it is iso event @hci_ev_le.c(536),INFO" ID="0x8ad010c5" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[JITWS][AVDTP]a2dp_set_config_ind_cfm: can't find a2dp stream handle by input HANDLE=0x%x @a2dp_hlp.c(116),INFO" ID="0x8abe03a5" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="llc_chnl_cls_feats_process:conhdl:%d, dest_id:%d @llc_channel_classification.c(135),INFO" ID="0x89f4043d" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[CLS]map[0]:%d,map[1]:%d,map[2]:%d,map[3]:%d @llc_channel_classification.c(157),INFO" ID="0x89f404ed" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[INFO][param] BTC TopOfStack(%x), StackSize(%x) @bt_thread.c(741),INFO" ID="0x8924172d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]bt_run_state_report OK @bt_thread.c(801),INFO" ID="0x8924190d" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[INFO][BT]g_BtRunState=%d @bt_thread.c(816),INFO" ID="0x89241985" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][RandAddrCfm][ERROR] gap_fsminst is NULL @gap_hlp_le.c(1227),INFO" ID="0x8b8c265d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_ADV_PARAM, RESULT=0x%x @gap_hlp_le.c(2059),INFO" ID="0x8b8c405d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_DATA, RESULT=0x%x @gap_hlp_le.c(2124),INFO" ID="0x8b8c4265" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_RANDOM_ADDR, RESULT=0x%x @gap_hlp_le.c(2166),INFO" ID="0x8b8c43b5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][LE_MULTI_ADV][ERROR] gap_fsminst is NULL @gap_hlp_le.c(2169),INFO" ID="0x8b8c43cd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTIADV_ENABLE, RESULT=0x%x @gap_hlp_le.c(2235),INFO" ID="0x8b8c45dd" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_PARAM, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2313),INFO" ID="0x8b8c484d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_DATA, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2345),INFO" ID="0x8b8c494d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_RANDOM_ADDR, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2369),INFO" ID="0x8b8c4a0d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_ENABLE, SUB_CODE=%d, HANDLE=0x%x, ENABLE=%d @gap_hlp_le.c(2400),INFO" ID="0x8b8c4b05" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP] own_address_type = %x adv_event_flag = %x @gap_hlp_le.c(2553),INFO" ID="0x8b8c4fcd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]set ext adv - BT init not complete!!! @gap_hlp_le.c(3073),WARNING" ID="0x8b8c600b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3525),ERROR" ID="0x8b8c6e2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3531),ERROR" ID="0x8b8c6e5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3539),ERROR" ID="0x8b8c6e9a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3545),ERROR" ID="0x8b8c6eca" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP] smp cbk event:%d @gap_hlp_le.c(507),ERROR" ID="0x8b8c0fda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][RandAddrCfm][ERROR] gap_fsminst is NULL @gap_hlp_le.c(1229),INFO" ID="0x8b8c266d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_ADV_PARAM, RESULT=0x%x @gap_hlp_le.c(2061),INFO" ID="0x8b8c406d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_DATA, RESULT=0x%x @gap_hlp_le.c(2126),INFO" ID="0x8b8c4275" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_RANDOM_ADDR, RESULT=0x%x @gap_hlp_le.c(2168),INFO" ID="0x8b8c43c5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][LE_MULTI_ADV][ERROR] gap_fsminst is NULL @gap_hlp_le.c(2171),INFO" ID="0x8b8c43dd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTIADV_ENABLE, RESULT=0x%x @gap_hlp_le.c(2237),INFO" ID="0x8b8c45ed" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_PARAM, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2315),INFO" ID="0x8b8c485d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_DATA, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2347),INFO" ID="0x8b8c495d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_RANDOM_ADDR, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2371),INFO" ID="0x8b8c4a1d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_ENABLE, SUB_CODE=%d, HANDLE=0x%x, ENABLE=%d @gap_hlp_le.c(2402),INFO" ID="0x8b8c4b15" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP] own_address_type = %x adv_event_flag = %x @gap_hlp_le.c(2555),INFO" ID="0x8b8c4fdd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]set ext adv - BT init not complete!!! @gap_hlp_le.c(3075),WARNING" ID="0x8b8c601b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3527),ERROR" ID="0x8b8c6e3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3533),ERROR" ID="0x8b8c6e6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3541),ERROR" ID="0x8b8c6eaa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3547),ERROR" ID="0x8b8c6eda" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[WARNING]hci_bt_voice_over_dsp_param_handler acl_par[0x%x] sco_par[0x%x] @lc_hci_vodsp.c(50),WARNING" ID="0x8a500193" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="uapi_adp_map dsp2bt_mem_hdl:0x%x success! @lc_hci_vodsp.c(63),INFO" ID="0x8a5001fd" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="uapi_adp_map bt2dsp_mem_hdl:0x%x success! @lc_hci_vodsp.c(70),INFO" ID="0x8a500235" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="bt_abort_when_work @ld.c(332),INFO" ID="0x88920a65" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[BTC][CQDDR_RX_STAT] link_id=%d, next_rate_found=%d, next_rate_idx=%d @ld.c(968),INFO" ID="0x88921e45" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[LD][INIT]local_bd_addr=0x%0x:0x%0x:*:*:*:0x%0x @ld.c(1171),INFO" ID="0x8892249d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][HCI]memcpy failed @hci_core_ram.c(158),ERROR" ID="0x8ba604f2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hci][len] %02x @hci_core_ram.c(888),INFO" ID="0x8ba61bc5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] %02x @hci_core_ram.c(891),INFO" ID="0x8ba61bdd" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[T%x][TIMEOUT] OPCODE=0x%x, TIMER=0x%x @hci_core_ram.c(1239),WARNING" ID="0x8ba626bb" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[TIMEOUT] OPCODE=0x%x, TIMER=0x%x @hci_core_ram.c(1243),WARNING" ID="0x8ba626db" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[MEMCPY_FAILED]RecvDataBuff Memcpy fail @hci_core_ram.c(1466),DBG" ID="0x8ba62dd6" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[MEMCPY_FAILED]RecvDataBuff Memcpy fail @hci_core_ram.c(1484),DBG" ID="0x8ba62e66" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[NO GLE]Gle %d! @hci_core_ram.c(1515),INFO" ID="0x8ba62f5d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][HCI]memcpy failed @hci_core_ram.c(165),ERROR" ID="0x8ba6052a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI] cmd_opcode 0x%x @hci_core_ram.c(894),ERROR" ID="0x8ba61bf2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hci][len] %02x @hci_core_ram.c(897),INFO" ID="0x8ba61c0d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] %02x @hci_core_ram.c(900),INFO" ID="0x8ba61c25" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[T%x][TIMEOUT] OPCODE=0x%x, TIMER=0x%x @hci_core_ram.c(1248),WARNING" ID="0x8ba62703" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[HCI][TIMEOUT] OPCODE=0x%x, TIMER=0x%x @hci_core_ram.c(1252),ERROR" ID="0x8ba62722" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[MEMCPY_FAILED]RecvDataBuff Memcpy fail @hci_core_ram.c(1481),DBG" ID="0x8ba62e4e" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[MEMCPY_FAILED]RecvDataBuff Memcpy fail @hci_core_ram.c(1499),DBG" ID="0x8ba62ede" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][RX] external fsm buff overflow! fsm_limit=%lu @hci_core_ram.c(1536),ERROR" ID="0x8ba63002" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][RX]external fsm buff overflow! free buff opcode=0x%x @hci_core_ram.c(1541),ERROR" ID="0x8ba6302a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[NO GLE]Gle %d! @hci_core_ram.c(1573),INFO" ID="0x8ba6312d" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[INFO]:Start DFT with hook_type=%d @log_oam_msg.c(259),INFO" ID="0xa006081d" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[OML]recv oml msg type:%d, length:%d @log_oam_msg.c(511),INFO" ID="0xa0060ffd" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="receive hci message succ! @log_oam_msg.c(539),INFO" ID="0xa00610dd" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[WARNING] llcp_channel_map_req_handler, INSTANT_PASSED, instant=%d, counter=%d @llc_llcp.c(3624),WARNING" ID="0x88387143" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[INFO][LLC]llc_channel_map_instant_exec:dummy=%d,opcode=%d @llc_llcp.c(3663),INFO" ID="0x8838727d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][LLC]llcp_channel_map_req_handler:llc_env_ptr is null @llc_llcp.c(3693),WARNING" ID="0x8838736b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="smp_pair_new_patch @patch_bth.c(42),INFO" ID="0x8d540155" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[AVDTP][GET_SEP_FAIL] Can not get sep info @patch_bth.c(146),WARNING" ID="0x8d540493" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[STACK][RECV_RING_STOP] @patch_bth.c(234),INFO" ID="0x8d540755" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="smp_pair_new_patch @patch_bth.c(43),INFO" ID="0x8d54015d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[AVDTP][GET_SEP_FAIL] Can not get sep info @patch_bth.c(147),WARNING" ID="0x8d54049b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[STACK][RECV_RING_STOP] @patch_bth.c(235),INFO" ID="0x8d54075d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] att error rsp opcode:0x%x handle:%d error:0x%x @patch_bth.c(315),ERROR" ID="0x8d5409da" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble add ble white list fail: %d @bt_mpc_adpt_gap.c(52),ERROR" ID="0x8dd401a2" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble add ble white list params err! len = %d @bt_mpc_adpt_gap.c(56),ERROR" ID="0x8dd401c2" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble remove all ble white list fail: %d @bt_mpc_adpt_gap.c(71),ERROR" ID="0x8dd4023a" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc read remote rssi: %d @bt_mpc_adpt_gap.c(522),ERROR" ID="0x8dd41052" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc read remote rssi err! len = %d @bt_mpc_adpt_gap.c(525),ERROR" ID="0x8dd4106a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ECC]release semaphore fail @ecc_p256.c(1857),INFO" ID="0x89463a0d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI] remove remote exceed upper limit %d addr:%02x:%02x:xx:xx:xx:%02x! @hci_hlp_ram.c(522),WARNING" ID="0x8ba81053" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI] remove remote exceed upper limit %d addr:%02x:%02x:xx:xx:xx:%02x! @hci_hlp_ram.c(522),ERROR" ID="0x8ba81052" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy_s&#160;error @hci_hlp_ram.c(542),ERROR" ID="0x8ba810f2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="rx_phy is %d @patch_llc.c(19),INFO" ID="0x8a5a009d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="rx_phy is %d @patch_llc.c(19),INFO" ID="0x8a5e009d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_reserve.c(141),ERROR" ID="0x8dee046a" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[productline cali]productline_cali_start_tx, freq=%d, @bt_productline.c(41),INFO" ID="0x88fc014d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[productline cali]productline_cali_stop_tx @bt_productline.c(61),INFO" ID="0x88fc01ed" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt reliable write characteristic value req interface fail, ret%d @bt_mpc_adpt_gatt.c(576),WARNING" ID="0x8dd61203" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt write descriptor req param len error, len = %u @bt_mpc_adpt_gatt.c(587),ERROR" ID="0x8dd6125a" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt write descriptor req interface fail, ret%d @bt_mpc_adpt_gatt.c(594),WARNING" ID="0x8dd61293" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble notify att read data memcpy error! error_code = %x @bt_mpc_adpt_gatt.c(625),INFO" ID="0x8dd6138d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble notify att read addr memcpy error! error_code = %x @bt_mpc_adpt_gatt.c(632),INFO" ID="0x8dd613c5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu config req param len error, len = %u @bt_mpc_adpt_gatt.c(653),ERROR" ID="0x8dd6146a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu config req interface fail, ret%d @bt_mpc_adpt_gatt.c(660),WARNING" ID="0x8dd614a3" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report map req param len error, len = %u @bt_mpc_adpt_gatt.c(672),ERROR" ID="0x8dd61502" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report map req interface fail, ret%d @bt_mpc_adpt_gatt.c(679),WARNING" ID="0x8dd6153b" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt read descriptor req param len error, len = %u @bt_mpc_adpt_gatt.c(732),WARNING" ID="0x8dd616e3" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt read descriptor req param fail, ret%d @bt_mpc_adpt_gatt.c(738),WARNING" ID="0x8dd61713" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu set req param len error, len = %u @bt_mpc_adpt_gatt.c(750),ERROR" ID="0x8dd61772" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu set req interface fail, ret%d @bt_mpc_adpt_gatt.c(757),WARNING" ID="0x8dd617ab" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble notify att read addr memcpy error! error_code = %x @bt_mpc_adpt_gatt.c(617),ERROR" ID="0x8dd6134a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble notify att read data memcpy error! error_code = %x @bt_mpc_adpt_gatt.c(642),INFO" ID="0x8dd61415" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble notify att read addr memcpy error! error_code = %x @bt_mpc_adpt_gatt.c(649),INFO" ID="0x8dd6144d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu config req param len error, len = %u @bt_mpc_adpt_gatt.c(670),ERROR" ID="0x8dd614f2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu config req interface fail, ret%d @bt_mpc_adpt_gatt.c(677),WARNING" ID="0x8dd6152b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report map req param len error, len = %u @bt_mpc_adpt_gatt.c(689),ERROR" ID="0x8dd6158a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report map req interface fail, ret%d @bt_mpc_adpt_gatt.c(696),WARNING" ID="0x8dd615c3" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt read descriptor req param len error, len = %u @bt_mpc_adpt_gatt.c(753),WARNING" ID="0x8dd6178b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt read descriptor req param fail, ret%d @bt_mpc_adpt_gatt.c(759),WARNING" ID="0x8dd617bb" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu set req param len error, len = %u @bt_mpc_adpt_gatt.c(771),ERROR" ID="0x8dd6181a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu set req interface fail, ret%d @bt_mpc_adpt_gatt.c(778),WARNING" ID="0x8dd61853" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[BIS]rxmaxtime=%d,sub_intv=%d,bis_spacing=%d @lld_bis.c(279),INFO" ID="0x895c08bd" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][BIS]bis tx desc alloc fail @lld_bis.c(455),ERROR" ID="0x895c0e3a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]create elt fail @lld_bis.c(521),WARNING" ID="0x895c104b" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[INFO][LLC][AOA]lld_cte_conn_rx_hw_set:phyrate=%d, slot_duration=%d @lld_cte.c(504),INFO" ID="0x88620fc5" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][BT][CTE]lld_cte_iq_process:slot_dur = 0x%x, cte_time = %d, cte_type = %d, samp_cnt = %d @lld_cte.c(684),INFO" ID="0x88621565" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][CTE]lld_cte_save_iq_samp: suppflag DO NOT exist! @lld_cte.c(730),INFO" ID="0x886216d5" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][SEND_ACL_DATA] SLOT=%u, LEN=%u, Remaining Packet NUM=%u, HANDLE=0x%x @hci_data_proc.c(114),INFO" ID="0x8bda0395" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy error @hci_data_proc.c(372),ERROR" ID="0x8bda0ba2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy error @hci_data_proc.c(378),ERROR" ID="0x8bda0bd2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][RECV_ACL_DATA] CONN_HANDLE=0x%x, link not found @hci_data_proc.c(465),INFO" ID="0x8bda0e8d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] OPCODE=0x%x, HANDLE=0x%x, LEN=%u @hci_data_proc.c(669),INFO" ID="0x8bda14ed" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, disc_reason=0x%x, LEN=%u @hci_data_proc.c(679),INFO" ID="0x8bda153d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, OCF=0x%x, LEN=%u @hci_data_proc.c(685),WARNING" ID="0x8bda156b" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] OPCODE=0x%x, HANDLE=0x%x, LEN=%u @hci_data_proc.c(706),DBG" ID="0x8bda1616" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, OCF=0x%x, LEN=%u @hci_data_proc.c(711),DBG" ID="0x8bda163e" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] LEN=%u @hci_data_proc.c(726),DBG" ID="0x8bda16b6" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] %02x %02x %02x %02x @hci_data_proc.c(732),DBG" ID="0x8bda16e6" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] %02x %02x %02x @hci_data_proc.c(737),DBG" ID="0x8bda170e" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[HCI][H--&gt;C] %02x %02x @hci_data_proc.c(740),DBG" ID="0x8bda1726" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] %02x @hci_data_proc.c(742),DBG" ID="0x8bda1736" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[A2DP][HCI] a2dp_audio:first frame to btc, only for a2dp service. @hci_data_proc.c(761),INFO" ID="0x8bda17cd" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][SEND_ACL_DATA] SLOT=%u, LEN=%u, Remaining Packet NUM=%u, HANDLE=0x%x @hci_data_proc.c(134),INFO" ID="0x8bda0435" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy error @hci_data_proc.c(394),ERROR" ID="0x8bda0c52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy error @hci_data_proc.c(400),ERROR" ID="0x8bda0c82" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][RECV_ACL_DATA] CONN_HANDLE=0x%x, link not found @hci_data_proc.c(489),INFO" ID="0x8bda0f4d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] OPCODE=0x%x, HANDLE=0x%x, LEN=%u @hci_data_proc.c(697),INFO" ID="0x8bda15cd" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, disc_reason=0x%x, LEN=%u @hci_data_proc.c(707),INFO" ID="0x8bda161d" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, OCF=0x%x, LEN=%u @hci_data_proc.c(713),WARNING" ID="0x8bda164b" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] OPCODE=0x%x, HANDLE=0x%x, LEN=%u @hci_data_proc.c(734),DBG" ID="0x8bda16f6" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, OCF=0x%x, LEN=%u @hci_data_proc.c(739),DBG" ID="0x8bda171e" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] LEN=%u @hci_data_proc.c(754),DBG" ID="0x8bda1796" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] %02x %02x %02x %02x @hci_data_proc.c(760),DBG" ID="0x8bda17c6" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] %02x %02x %02x @hci_data_proc.c(765),DBG" ID="0x8bda17ee" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[HCI][H--&gt;C] %02x %02x @hci_data_proc.c(768),DBG" ID="0x8bda1806" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] %02x @hci_data_proc.c(770),DBG" ID="0x8bda1816" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[A2DP][HCI] a2dp_audio:first frame to btc, only for a2dp service. @hci_data_proc.c(789),INFO" ID="0x8bda18ad" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[BTH MIPS][TRANS_TASK][%ld]MS,[RECV TASK][%ld]MS, [SCHEDULE TASK][%ld]MS, [ISR][%ld]MS @bt_dfx.c(108),INFO" ID="0x8df80365" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[INFO][HCI]hci_rd_phy_cmd_handler Enter! conhdl=%d @lc_hci_uhd.c(56),INFO" ID="0x89a401c5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][HCI]hci_rd_phy_cmd_handler:lc_env_ptr is NULL @lc_hci_uhd.c(62),WARNING" ID="0x89a401f3" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="BTC_TWS-&gt;sear_abort_rx_lmp:opcode = %d, ext_opcode = %d @lm_tws_monitor.c(85),WARNING" ID="0x89ea02ab" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[SNIFF OFFSET] Cmd = %d 0:HL,1:PEER,2:UPDATE, offset = %d, Flag = %d @lm_tws_monitor.c(105),INFO" ID="0x89ea034d" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[SNIFF OFFSET] Linkid = %d, role = %d, 0:M,1:S, ClockN = 0x%x, clk_off = 0x%x @lm_tws_monitor.c(109),INFO" ID="0x89ea036d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEvConnUpdate, ev NULL @ble_general.c(114),ERROR" ID="0x8dda0392" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : conn result status = 0x%02x @ble_general.c(122),INFO" ID="0x8dda03d5" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="ble general : handle&amp;interval&amp;latency&amp;timeout, 0x%04x &amp; 0x%04x &amp; 0x%04x &amp; 0x%04x @ble_general.c(125),INFO" ID="0x8dda03ed" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : memcpy conn para result fail: %d @ble_general.c(134),ERROR" ID="0x8dda0432" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : conn para result malloc fail: %d @ble_general.c(143),ERROR" ID="0x8dda047a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEvEncryptionChange, ev NULL @ble_general.c(153),ERROR" ID="0x8dda04ca" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general : ENCRYPTION, status&amp;handle&amp;result = 0x%02x &amp; 0x%04x &amp; 0x%02x @ble_general.c(164),INFO" ID="0x8dda0525" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEncryptionNegativeReply, ev NULL @ble_general.c(185),ERROR" ID="0x8dda05ca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : BLE GENERAL KEY MISS, handle = 0x%02x @ble_general.c(189),ERROR" ID="0x8dda05ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general pair cfm callback, result = 0x%04x @ble_general.c(202),INFO" ID="0x8dda0655" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy addr fail when pair cbk @ble_general.c(209),ERROR" ID="0x8dda068a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general start pair ble addr null @ble_general.c(226),ERROR" ID="0x8dda0712" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy addr fail when start pair @ble_general.c(232),ERROR" ID="0x8dda0742" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : set bondle fail = %d @ble_general.c(240),ERROR" ID="0x8dda0782" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general start ble pair addr type = %d @ble_general.c(246),INFO" ID="0x8dda07b5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update param is NULL @ble_general.c(262),ERROR" ID="0x8dda0832" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update in is NULL @ble_general.c(269),ERROR" ID="0x8dda086a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update, ble remote addr NULL @ble_general.c(275),ERROR" ID="0x8dda089a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update, memcpy fail @ble_general.c(282),ERROR" ID="0x8dda08d2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : ConnUpdate cap&amp;atype = 0x%02x &amp; 0x%02x @ble_general.c(295),INFO" ID="0x8dda093d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="ble general : min&amp;max&amp;latency&amp;timeout, 0x%04x &amp; 0x%04x &amp; 0x%04x &amp; 0x%04x @ble_general.c(298),INFO" ID="0x8dda0955" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general conn update fail: %d @ble_general.c(304),ERROR" ID="0x8dda0982" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general disconnect, bleRemoteAddr_cpy NULL @ble_general.c(322),ERROR" ID="0x8dda0a12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general disconnect, memcpy fail @ble_general.c(328),ERROR" ID="0x8dda0a42" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general connect memcpy fail @ble_general.c(349),ERROR" ID="0x8dda0aea" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general set sec params bondable &amp; io_capability 0x%02x%02x @ble_general.c(389),INFO" ID="0x8dda0c2d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params set bondable failed @ble_general.c(394),INFO" ID="0x8dda0c55" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params set io capability failed @ble_general.c(401),INFO" ID="0x8dda0c8d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params failed @ble_general.c(414),INFO" ID="0x8dda0cf5" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general set sec params ok! g_config_smp_lesc = %u, g_config_smp_mode = %u @ble_general.c(419),INFO" ID="0x8dda0d1d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general remove smp key addr NULL @ble_general.c(431),ERROR" ID="0x8dda0d7a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general remove smp key mamcpy fail @ble_general.c(444),ERROR" ID="0x8dda0de2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general remove smp key new fail %d @ble_general.c(450),ERROR" ID="0x8dda0e12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble notification param is NULL @ble_general.c(472),ERROR" ID="0x8dda0ec2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : notify len_cpy error: %d @ble_general.c(478),ERROR" ID="0x8dda0ef2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble start pair new in is NULL @ble_general.c(487),ERROR" ID="0x8dda0f3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy ble_value fail when notify @ble_general.c(494),ERROR" ID="0x8dda0f72" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memset addr error when notify @ble_general.c(505),ERROR" ID="0x8dda0fca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : sais service cb arg is NULL @ble_general.c(520),ERROR" ID="0x8dda1042" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : GattsSaisServiceCbk, event len = %d, %d @ble_general.c(527),INFO" ID="0x8dda107d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg sais service service is NULL @ble_general.c(569),ERROR" ID="0x8dda11ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg sais service character is NULL @ble_general.c(580),ERROR" ID="0x8dda1222" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : alipay service cb arg is NULL @ble_general.c(603),ERROR" ID="0x8dda12da" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general : GattsAlipayServiceCbk, uuid = 0x%x, event = %d, len = %d @ble_general.c(611),INFO" ID="0x8dda131d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : GattsAlipayServiceCbk, pend uuid = 0x%04x @ble_general.c(632),DBG" ID="0x8dda13c6" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg alipay service service is NULL @ble_general.c(661),ERROR" ID="0x8dda14aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg alipay service character is NULL @ble_general.c(672),ERROR" ID="0x8dda1502" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : BleGeneralGattCallback_arg NULL @ble_general.c(688),ERROR" ID="0x8dda1582" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ANCS]Get Notification data, len=%d @ble_general.c(709),INFO" ID="0x8dda162d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : gap general conn cb para is NULL @ble_general.c(770),ERROR" ID="0x8dda1812" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : ble general connection event &amp; cap: 0x%02x, 0x%02x @ble_general.c(777),INFO" ID="0x8dda184d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : gap general smp succeed cb para is NULL @ble_general.c(813),ERROR" ID="0x8dda196a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : authentication failure cb para is NULL @ble_general.c(834),ERROR" ID="0x8dda1a12" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : BLE GENERAL SMP REQUEST FAIL, cap = 0x%02x status: %x @ble_general.c(841),ERROR" ID="0x8dda1a4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy addr fail when authentication @ble_general.c(849),ERROR" ID="0x8dda1a8a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : other branch @ble_general.c(867),INFO" ID="0x8dda1b1d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : gap cb event: 0x%02x @ble_general.c(902),INFO" ID="0x8dda1c35" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : batery service cb arg_cpy is NULL @ble_general.c(934),ERROR" ID="0x8dda1d32" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg battery service is NULL @ble_general.c(967),ERROR" ID="0x8dda1e3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg battery service character is NULL @ble_general.c(982),ERROR" ID="0x8dda1eb2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unknown product type:%x @ble_general.c(1009),INFO" ID="0x8dda1f8d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="product type:%x @ble_general.c(1017),INFO" ID="0x8dda1fcd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : App_RecoverSMPKeys data_len err, %d @ble_general.c(1080),ERROR" ID="0x8dda21c2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : NEW key_list fail, %d @ble_general.c(1086),ERROR" ID="0x8dda21f2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : List NEW key fail, %d @ble_general.c(1101),ERROR" ID="0x8dda226a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : List NEW key fail, %d @ble_general.c(1109),ERROR" ID="0x8dda22aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble init cBacks is NULL @ble_general.c(1132),ERROR" ID="0x8dda2362" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy cBacks fail when ble general ble init @ble_general.c(1139),ERROR" ID="0x8dda239a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEvConnUpdate, ev NULL @ble_general.c(111),ERROR" ID="0x8dda037a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : conn result status = 0x%02x @ble_general.c(119),INFO" ID="0x8dda03bd" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="ble general : handle&amp;interval&amp;latency&amp;timeout, 0x%04x &amp; 0x%04x &amp; 0x%04x &amp; 0x%04x @ble_general.c(122),INFO" ID="0x8dda03d5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEvEncryptionChange, ev NULL @ble_general.c(139),ERROR" ID="0x8dda045a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general : ENCRYPTION, status&amp;handle&amp;result = 0x%02x &amp; 0x%04x &amp; 0x%02x @ble_general.c(150),INFO" ID="0x8dda04b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEncryptionNegativeReply, ev NULL @ble_general.c(168),ERROR" ID="0x8dda0542" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : BLE GENERAL KEY MISS, handle = 0x%02x @ble_general.c(172),ERROR" ID="0x8dda0562" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general pair cfm callback, result = 0x%04x @ble_general.c(181),INFO" ID="0x8dda05ad" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general start pair ble addr null @ble_general.c(195),ERROR" ID="0x8dda061a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy addr fail when start pair @ble_general.c(201),ERROR" ID="0x8dda064a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : set bondle fail = %d @ble_general.c(209),ERROR" ID="0x8dda068a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general start ble pair addr type = %d @ble_general.c(215),INFO" ID="0x8dda06bd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update param is NULL @ble_general.c(231),ERROR" ID="0x8dda073a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update in is NULL @ble_general.c(238),ERROR" ID="0x8dda0772" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update, ble remote addr NULL @ble_general.c(244),ERROR" ID="0x8dda07a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update, memcpy fail @ble_general.c(251),ERROR" ID="0x8dda07da" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : ConnUpdate cap&amp;atype = 0x%02x &amp; 0x%02x @ble_general.c(264),INFO" ID="0x8dda0845" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="ble general : min&amp;max&amp;latency&amp;timeout, 0x%04x &amp; 0x%04x &amp; 0x%04x &amp; 0x%04x @ble_general.c(267),INFO" ID="0x8dda085d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general conn update fail: %d @ble_general.c(273),ERROR" ID="0x8dda088a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general disconnect, bleRemoteAddr_cpy NULL @ble_general.c(291),ERROR" ID="0x8dda091a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general disconnect, memcpy fail @ble_general.c(297),ERROR" ID="0x8dda094a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general connect memcpy fail @ble_general.c(318),ERROR" ID="0x8dda09f2" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general set sec params bondable &amp; io_capability 0x%02x%02x @ble_general.c(358),INFO" ID="0x8dda0b35" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params set bondable failed @ble_general.c(363),INFO" ID="0x8dda0b5d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params set io capability failed @ble_general.c(370),INFO" ID="0x8dda0b95" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params failed @ble_general.c(383),INFO" ID="0x8dda0bfd" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general set sec params ok! g_config_smp_lesc = %u, g_config_smp_mode = %u @ble_general.c(388),INFO" ID="0x8dda0c25" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general remove smp key addr NULL @ble_general.c(400),ERROR" ID="0x8dda0c82" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general remove smp key mamcpy fail @ble_general.c(413),ERROR" ID="0x8dda0cea" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general remove smp key new fail %d @ble_general.c(419),ERROR" ID="0x8dda0d1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble notification param is NULL @ble_general.c(441),ERROR" ID="0x8dda0dca" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : notify len_cpy error: %d @ble_general.c(447),ERROR" ID="0x8dda0dfa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble start pair new in is NULL @ble_general.c(456),ERROR" ID="0x8dda0e42" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy ble_value fail when notify @ble_general.c(463),ERROR" ID="0x8dda0e7a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memset addr error when notify @ble_general.c(474),ERROR" ID="0x8dda0ed2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : sais service cb arg is NULL @ble_general.c(489),ERROR" ID="0x8dda0f4a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : GattsSaisServiceCbk, event len = %d, %d @ble_general.c(496),INFO" ID="0x8dda0f85" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg sais service service is NULL @ble_general.c(538),ERROR" ID="0x8dda10d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg sais service character is NULL @ble_general.c(549),ERROR" ID="0x8dda112a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : alipay service cb arg is NULL @ble_general.c(572),ERROR" ID="0x8dda11e2" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general : GattsAlipayServiceCbk, uuid = 0x%x, event = %d, len = %d @ble_general.c(580),INFO" ID="0x8dda1225" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : GattsAlipayServiceCbk, pend uuid = 0x%04x @ble_general.c(601),DBG" ID="0x8dda12ce" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg alipay service service is NULL @ble_general.c(630),ERROR" ID="0x8dda13b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg alipay service character is NULL @ble_general.c(641),ERROR" ID="0x8dda140a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : BleGeneralGattCallback_arg NULL @ble_general.c(657),ERROR" ID="0x8dda148a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ANCS]Get Notification data, len=%d @ble_general.c(678),INFO" ID="0x8dda1535" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : gap general conn cb para is NULL @ble_general.c(739),ERROR" ID="0x8dda171a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : ble general connection event &amp; cap: 0x%02x, 0x%02x @ble_general.c(746),INFO" ID="0x8dda1755" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : gap general smp succeed cb para is NULL @ble_general.c(782),ERROR" ID="0x8dda1872" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : memcpy smp key store value fail: %d @ble_general.c(791),ERROR" ID="0x8dda18ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : authentication failure cb para is NULL @ble_general.c(801),ERROR" ID="0x8dda190a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : BLE GENERAL SMP REQUEST FAIL, cap = 0x%02x status: %x @ble_general.c(808),ERROR" ID="0x8dda1942" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy addr fail when authentication @ble_general.c(815),ERROR" ID="0x8dda197a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : other branch @ble_general.c(831),INFO" ID="0x8dda19fd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : gap cb event: 0x%02x @ble_general.c(870),ERROR" ID="0x8dda1b32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : batery service cb arg_cpy is NULL @ble_general.c(904),ERROR" ID="0x8dda1c42" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg battery service is NULL @ble_general.c(937),ERROR" ID="0x8dda1d4a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg battery service character is NULL @ble_general.c(952),ERROR" ID="0x8dda1dc2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unknown product type:%x @ble_general.c(979),INFO" ID="0x8dda1e9d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="product type:%x @ble_general.c(987),INFO" ID="0x8dda1edd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : App_RecoverSMPKeys data_len err, %d @ble_general.c(1050),ERROR" ID="0x8dda20d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : NEW key_list fail, %d @ble_general.c(1056),ERROR" ID="0x8dda2102" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : List NEW key fail, %d @ble_general.c(1071),ERROR" ID="0x8dda217a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : List NEW key fail, %d @ble_general.c(1079),ERROR" ID="0x8dda21ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble init cBacks is NULL @ble_general.c(1102),ERROR" ID="0x8dda2272" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy cBacks fail when ble general ble init @ble_general.c(1109),ERROR" ID="0x8dda22aa" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[WARNING]diag config :0x8182838C, get diag value is 0x%x @hibt_ram.c(110),WARNING" ID="0x88860373" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[WARNING]diag config :0x8d8e8f90, get diag value is 0x%x @hibt_ram.c(112),WARNING" ID="0x88860383" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[WARNING]diag config :0x919ba0a7, get diag value is 0x%x @hibt_ram.c(114),WARNING" ID="0x88860393" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNINIG][diag_isr]diag is going... @hibt_ram.c(388),WARNING" ID="0x88860c23" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[SPP][DLC_ESTAB_CFM] INIT_CREDITIN=%u @g_spp.c(209),INFO" ID="0x8b5e068d" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[SPP][CREITIN_IND] OLD_CREDITIN=%u, NEW_CREDITIN=%u @g_spp.c(414),DBG" ID="0x8b5e0cf6" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="mcu_int1_handler. @ipc_irq.c(74),ERROR" ID="0xa0600252" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[HCI]pts_mode=%d, is_le_ext_adving = %d, updated = %d @hci_le.c(147),INFO" ID="0x8b92049d" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[HCI]privacy=%d @hci_le.c(189),INFO" ID="0x8b9205ed" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[HCI]local-&gt;leisa_cur = %02x @hci_le.c(1272),INFO" ID="0x8b9227c5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[AE]ext adv elt not exist @lld_ae.c(3359),INFO" ID="0x89e068fd" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[AE]sync adv elt not exist @lld_ae.c(3372),INFO" ID="0x89e06965" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[AE]sync adv elt already in prog list @lld_ae.c(3384),INFO" ID="0x89e069c5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]lld_bis_report_rxnode:No rx_report buff! @patch_lld_bis_pdu.c(27),WARNING" ID="0x8a6600db" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][BIS]bis recombine:length=%d, recomb_flag=%d, pldcntr=%d, llid=%d @patch_lld_bis_pdu.c(58),WARNING" ID="0x8a6601d3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BIS]lld_bis_pdu_framed_rx_check:invalid middle pkt @patch_lld_bis_pdu.c(120),INFO" ID="0x8a6603c5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BIS]lld_bis_pdu_framed_rx_check:invalid last pkt @patch_lld_bis_pdu.c(134),INFO" ID="0x8a660435" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]lld_bis_report_rxnode:No rx_report buff! @patch_lld_bis_pdu.c(27),WARNING" ID="0x8a6a00db" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][BIS]bis recombine:length=%d, recomb_flag=%d, pldcntr=%d, llid=%d @patch_lld_bis_pdu.c(58),WARNING" ID="0x8a6a01d3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BIS]lld_bis_pdu_framed_rx_check:invalid middle pkt @patch_lld_bis_pdu.c(120),INFO" ID="0x8a6a03c5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BIS]lld_bis_pdu_framed_rx_check:invalid last pkt @patch_lld_bis_pdu.c(134),INFO" ID="0x8a6a0435" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[setup data path]coding=%d @llc_iso_hci.c(121),INFO" ID="0x883603cd" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[ISO]ISO conhdl don,t exist,conhdl=%d @llc_iso_hci.c(134),WARNING" ID="0x88360433" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[setup data path] set up out data path:%d, in data path:%d @llc_iso_hci.c(137),INFO" ID="0x8836044d" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[pscan stop]tx_time_total:%d, rx_time_total:%d, bt_statis_clock:%d @ld_pscan.c(923),WARNING" ID="0x88ba1cdb" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[WARNING]ts = 0x%x, asap_setting = %d, asap_limit = 0x%x, prio = %d @ld_pscan.c(1047),WARNING" ID="0x88ba20bb" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[WARNING]link_id = %d, step = %d, new_end_ts = 0x%x, rem_slots = %d @ld_pscan.c(1049),WARNING" ID="0x88ba20cb" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[BLE ACL] conhdl=%d, status:0x%04x, length:%d, rxflush|rxdone|cie:%08x @patch_lld_pdu.c(44),INFO" ID="0x8a540165" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BLE ACL] ccm 0x%x @patch_lld_pdu.c(45),INFO" ID="0x8a54016d" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="audio_debug ipc_send dsp begin,sequence_number = 0x%x,length = 0x%x. @a2dp_hlp_ram.c(93),INFO" ID="0x8ba002ed" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="audio_debug ready to go =======ipc_send dsp end===ret = %d. @a2dp_hlp_ram.c(100),INFO" ID="0x8ba00325" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR]audio_debug ipc2dsp_msg_str fail @a2dp_hlp_ram.c(102),WARNING" ID="0x8ba00333" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[AUTORATE] llcp_ico_phy_update_req_handler: stream_id=%d, channel_id=%d, m2s_phy=0x%x, s2m_phy=0x%x @llc_ico_llcp.c(435),INFO" ID="0x883c0d9d" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[AUTORATE] llcp_ico_phy_update_req_handler: nse=%d, instant=%d, ico_evt_counter=%d @llc_ico_llcp.c(437),INFO" ID="0x883c0dad" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[AUTORATE] llcp_ico_phy_update_req_handler:instant passed @llc_ico_llcp.c(445),WARNING" ID="0x883c0deb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]create big prepare fail @llc_bis_hci_ram.c(79),WARNING" ID="0x8a60027b" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="ea_prog_time_set current_time(0x%x)finetarget_time(0x%x),finecnt(%d),finetgtintmsk(%d) @patch_ea.c(68),WARNING" ID="0x8a540223" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]create big prepare fail @llc_bis_hci_ram.c(79),WARNING" ID="0x8a64027b" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="ea_prog_time_set current_time(0x%x)finetarget_time(0x%x),finecnt(%d),finetgtintmsk(%d) @patch_ea.c(68),WARNING" ID="0x8a580223" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="sdk pan get local addr error @sdk_pan.c(30),ERROR" ID="0x8e7e00f2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="sdk pan get local addr invalid. @sdk_pan.c(34),ERROR" ID="0x8e7e0112" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="sdk pan clean fail conn_hdl. @sdk_pan.c(61),INFO" ID="0x8e7e01ed" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]big param is NULL @llc_bis_hci.c(491),WARNING" ID="0x89560f5b" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]current role is master @llc_bis_hci.c(497),WARNING" ID="0x89560f8b" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]big trigger is false @llc_bis_hci.c(503),WARNING" ID="0x89560fbb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BTOS][MEM_INTEGRITY_CHECK]Not support! @osdep.c(678),INFO" ID="0x8b981535" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW]ALLOC_SIZE=%u, alloc fail! @osdep.c(709),WARNING" ID="0x8b98162b" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[MEM_FREE][%d][0x%p], caller:0x%x  @osdep.c(746),INFO" ID="0x8b981755" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[BTOS][MEM_FREE]ERROR_CODE=%u, addr:0x%p, caller:0x%x free fail! @osdep.c(754),WARNING" ID="0x8b981793" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW]ALLOC_SIZE=%u, alloc fail! @osdep.c(767),WARNING" ID="0x8b9817fb" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[BTOS][MEM_FREE]ERROR_CODE=%u, addr:0x%p, caller:0x%x, free fail! @osdep.c(782),WARNING" ID="0x8b981873" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW_S]AVAILABLE_MEMORY=%u, alloc fail because under secure threshold size! @osdep.c(813),WARNING" ID="0x8b98196b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BTOS][MEM_INTEGRITY_CHECK]Not support! @osdep.c(680),INFO" ID="0x8b981545" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW]ALLOC_SIZE=%u alloc fail! @osdep.c(712),ERROR" ID="0x8b981642" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[BTOS][MEM_NEW]fsm_count=%u fsm_limit=%u fsm_limit_max=%u hci_slice_rx=%u! @osdep.c(716),ERROR" ID="0x8b981662" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[MEM_FREE][%d][0x%p], caller:0x%x  @osdep.c(753),INFO" ID="0x8b98178d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[BTOS][MEM_FREE]ERROR_CODE=%u, addr:0x%p, caller:0x%x free fail! @osdep.c(761),WARNING" ID="0x8b9817cb" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW]ALLOC_SIZE=%u, alloc fail! @osdep.c(774),WARNING" ID="0x8b981833" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[BTOS][MEM_FREE]ERROR_CODE=%u, addr:0x%p, caller:0x%x, free fail! @osdep.c(789),WARNING" ID="0x8b9818ab" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW_S]AVAILABLE_MEMORY=%u, alloc fail because under secure threshold size! @osdep.c(820),WARNING" ID="0x8b9819a3" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[FRONTEND]bt_tx_power_get param level is %d, OUT OF RANGE @bt_mdmrfabb_config.c(97),ERROR" ID="0x88f8030a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="memory alloc failed @sdk_spp.c(176),ERROR" ID="0x8b6c0582" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[sdk][spp]read_stream failed ret=0x%x @sdk_spp.c(181),INFO" ID="0x8b6c05ad" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][CTE]llcp_cte_rsp_handler: LLCP_SUPP_RSP Received! But current version software DO NOT support this feature. @llc_llcp_ram.c(700),ERROR" ID="0x896615e2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][to_expire] wait_handle2 to_expire @hdlmgnt.c(428),INFO" ID="0x8ac80d65" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[HCI]CURRENT_LINK_MODE=0x%x, ACL Data Will be pend! @hci_link_br.c(217),INFO" ID="0x8bdc06cd" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][CONN_COMPLETE] LINK_STATUS=0x%x, EVENT_STATUS=0x%x, CONN_HDL=0x%x @hci_link_br.c(489),INFO" ID="0x8bdc0f4d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][CONN_REQUEST] LINK_TYPE=0x%x, REMOTE_ADDR=%02x:%02x:**:**:**:%02x @hci_link_br.c(561),INFO" ID="0x8bdc118d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[HCI][REMOVE_LINK] REF_COUNT=%u, STATUS=%u @hci_link_br.c(646),INFO" ID="0x8bdc1435" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI] create connection addr:%02x******%02x%02x @hci_link_br.c(257),ERROR" ID="0x8bdc080a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][CONN_COMPLETE] LINK_STATUS=0x%x, EVENT_STATUS=0x%x, CONN_HDL=0x%x @hci_link_br.c(494),ERROR" ID="0x8bdc0f72" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][CONN_REQUEST] LINK_TYPE=0x%x, REMOTE_ADDR=%02x:%02x:**:**:**:%02x @hci_link_br.c(569),ERROR" ID="0x8bdc11ca" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[HCI][REMOVE_LINK] REF_COUNT=%u, STATUS=%u @hci_link_br.c(653),ERROR" ID="0x8bdc146a" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[ERROR][CFG]rf ctl reg wr type err 0x%x, us_reg=0x%x, usval=0x%x @reg_access.c(58),ERROR" ID="0x893001d2" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[ERROR][CFG]rf ctl reg wr type err 0x%x, us_reg=0x%x, usval=0x%x @reg_access.c(100),ERROR" ID="0x89300322" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ble_general_gatt] find upper cbk fail @ble_general_gatt.c(91),ERROR" ID="0x8de002da" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble gatt client characteristic value callback memcpy fail: %d @ble_general_gatt.c(665),ERROR" ID="0x8de014ca" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble gatt client characteristic value callback memcpy fail: %d @ble_general_gatt.c(673),ERROR" ID="0x8de0150a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BCore] gatt client write result can't find upper cbk. @ble_general_gatt.c(708),ERROR" ID="0x8de01622" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BCore] gatt client write result addr memcpy fail @ble_general_gatt.c(720),ERROR" ID="0x8de01682" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble gatt client call back func type=%d @ble_general_gatt.c(773),INFO" ID="0x8de0182d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery service not found:0x%x. @ble_general_gatt.c(804),WARNING" ID="0x8de01923" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery include service not found:0x%x. @ble_general_gatt.c(827),WARNING" ID="0x8de019db" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic new fail. @ble_general_gatt.c(843),ERROR" ID="0x8de01a5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic memset fail. @ble_general_gatt.c(848),ERROR" ID="0x8de01a82" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery characteristic not found:0x%x. @ble_general_gatt.c(865),WARNING" ID="0x8de01b0b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid new fail. @ble_general_gatt.c(883),ERROR" ID="0x8de01b9a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid memset fail. @ble_general_gatt.c(889),ERROR" ID="0x8de01bca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid memcpy fail. @ble_general_gatt.c(903),ERROR" ID="0x8de01c3a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery characteristic by uuid not found:0x%x. @ble_general_gatt.c(914),WARNING" ID="0x8de01c93" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor by handle new fail. @ble_general_gatt.c(930),ERROR" ID="0x8de01d12" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor by handle not found:0x%x. @ble_general_gatt.c(944),WARNING" ID="0x8de01d83" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor new fail. @ble_general_gatt.c(964),ERROR" ID="0x8de01e22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor memset fail. @ble_general_gatt.c(969),ERROR" ID="0x8de01e4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor memcpy fail. @ble_general_gatt.c(975),ERROR" ID="0x8de01e7a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor not found:0x%x. @ble_general_gatt.c(986),WARNING" ID="0x8de01ed3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gatt read characteristic value respon new fail. @ble_general_gatt.c(1007),ERROR" ID="0x8de01f7a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read characteristic value respon memcpy fail: %d @ble_general_gatt.c(1014),ERROR" ID="0x8de01fb2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read characteristic value respon memcpy fail: %d @ble_general_gatt.c(1024),ERROR" ID="0x8de02002" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic value new fail. @ble_general_gatt.c(1047),ERROR" ID="0x8de020ba" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read descriptor value error:0x%x. @ble_general_gatt.c(1061),ERROR" ID="0x8de0212a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid new fail. @ble_general_gatt.c(1079),ERROR" ID="0x8de021ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid memcpy fail. @ble_general_gatt.c(1092),ERROR" ID="0x8de02222" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid memcpy fail. @ble_general_gatt.c(1099),ERROR" ID="0x8de0225a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read characteristic by uuid error:0x%x. @ble_general_gatt.c(1106),WARNING" ID="0x8de02293" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read multiple characteristic new fail. @ble_general_gatt.c(1124),ERROR" ID="0x8de02322" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read multiple characteristic memset fail. @ble_general_gatt.c(1131),ERROR" ID="0x8de0235a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read multiple characteristic error:0x%x. @ble_general_gatt.c(1147),WARNING" ID="0x8de023db" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read multiple characteristic error:0x%x. @ble_general_gatt.c(1177),WARNING" ID="0x8de024cb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic value memcpy failed @ble_general_gatt.c(1229),ERROR" ID="0x8de0266a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic value param is NULL @ble_general_gatt.c(1252),ERROR" ID="0x8de02722" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write characteristic value malloc fail, size:0x%x. @ble_general_gatt.c(1265),ERROR" ID="0x8de0278a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble general gatt write characteristic value memcpy fail: %d @ble_general_gatt.c(1275),ERROR" ID="0x8de027da" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write characteristic value fail:0x%x. @ble_general_gatt.c(1289),WARNING" ID="0x8de0284b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt reliable write characteristic value param is NULL @ble_general_gatt.c(1308),ERROR" ID="0x8de028e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt reliable write characteristic value malloc fail @ble_general_gatt.c(1315),ERROR" ID="0x8de0291a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BCore] ble general gatt reliable write characteristic value memcpy fail @ble_general_gatt.c(1324),ERROR" ID="0x8de02962" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt reliable write characteristic value fail:0x%x. @ble_general_gatt.c(1343),WARNING" ID="0x8de029fb" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write descriptor value malloc faile, size:0x%x. @ble_general_gatt.c(1360),ERROR" ID="0x8de02a82" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble general gatt write descriptor value memcpy fail: %d @ble_general_gatt.c(1369),ERROR" ID="0x8de02aca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor error:0x%x. @ble_general_gatt.c(1379),ERROR" ID="0x8de02b1a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read descriptor value response memcpy fail: %d @ble_general_gatt.c(1401),ERROR" ID="0x8de02bca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read descriptor value response memcpy fail: %d @ble_general_gatt.c(1409),ERROR" ID="0x8de02c0a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read descriptor value error:0x%x. @ble_general_gatt.c(1438),ERROR" ID="0x8de02cf2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt mtu config error:0x%x. @ble_general_gatt.c(1453),ERROR" ID="0x8de02d6a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt set gap ui attributes error:0x%x. @ble_general_gatt.c(1466),ERROR" ID="0x8de02dd2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt get gap ui attributes error:0x%x. @ble_general_gatt.c(1485),ERROR" ID="0x8de02e6a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bt mpc adapter gatt get hid report callback new fail @ble_general_gatt.c(1515),ERROR" ID="0x8de02f5a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report callback error_code = %x @ble_general_gatt.c(1526),INFO" ID="0x8de02fb5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble gatt client call back func type=%d @ble_general_gatt.c(771),INFO" ID="0x8de0181d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery service not found:0x%x. @ble_general_gatt.c(802),WARNING" ID="0x8de01913" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery include service not found:0x%x. @ble_general_gatt.c(825),WARNING" ID="0x8de019cb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic new fail. @ble_general_gatt.c(841),ERROR" ID="0x8de01a4a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic memset fail. @ble_general_gatt.c(846),ERROR" ID="0x8de01a72" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery characteristic not found:0x%x. @ble_general_gatt.c(863),WARNING" ID="0x8de01afb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid new fail. @ble_general_gatt.c(881),ERROR" ID="0x8de01b8a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid memset fail. @ble_general_gatt.c(887),ERROR" ID="0x8de01bba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid memcpy fail. @ble_general_gatt.c(901),ERROR" ID="0x8de01c2a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery characteristic by uuid not found:0x%x. @ble_general_gatt.c(912),WARNING" ID="0x8de01c83" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor by handle new fail. @ble_general_gatt.c(928),ERROR" ID="0x8de01d02" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor by handle not found:0x%x. @ble_general_gatt.c(942),WARNING" ID="0x8de01d73" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor new fail. @ble_general_gatt.c(962),ERROR" ID="0x8de01e12" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor memset fail. @ble_general_gatt.c(967),ERROR" ID="0x8de01e3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor memcpy fail. @ble_general_gatt.c(973),ERROR" ID="0x8de01e6a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor not found:0x%x. @ble_general_gatt.c(984),WARNING" ID="0x8de01ec3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gatt read characteristic value respon new fail. @ble_general_gatt.c(1005),ERROR" ID="0x8de01f6a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read characteristic value respon memcpy fail: %d @ble_general_gatt.c(1012),ERROR" ID="0x8de01fa2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read characteristic value respon memcpy fail: %d @ble_general_gatt.c(1022),ERROR" ID="0x8de01ff2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic value new fail. @ble_general_gatt.c(1045),ERROR" ID="0x8de020aa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read descriptor value error:0x%x. @ble_general_gatt.c(1059),ERROR" ID="0x8de0211a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid new fail. @ble_general_gatt.c(1077),ERROR" ID="0x8de021aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid memcpy fail. @ble_general_gatt.c(1090),ERROR" ID="0x8de02212" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid memcpy fail. @ble_general_gatt.c(1097),ERROR" ID="0x8de0224a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read characteristic by uuid error:0x%x. @ble_general_gatt.c(1104),WARNING" ID="0x8de02283" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read multiple characteristic new fail. @ble_general_gatt.c(1122),ERROR" ID="0x8de02312" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read multiple characteristic memset fail. @ble_general_gatt.c(1129),ERROR" ID="0x8de0234a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read multiple characteristic error:0x%x. @ble_general_gatt.c(1145),WARNING" ID="0x8de023cb" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read multiple characteristic error:0x%x. @ble_general_gatt.c(1175),WARNING" ID="0x8de024bb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic value memcpy failed @ble_general_gatt.c(1227),ERROR" ID="0x8de0265a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic value param is NULL @ble_general_gatt.c(1250),ERROR" ID="0x8de02712" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write characteristic value malloc fail, size:0x%x. @ble_general_gatt.c(1263),ERROR" ID="0x8de0277a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble general gatt write characteristic value memcpy fail: %d @ble_general_gatt.c(1273),ERROR" ID="0x8de027ca" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write characteristic value fail:0x%x. @ble_general_gatt.c(1287),WARNING" ID="0x8de0283b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt reliable write characteristic value param is NULL @ble_general_gatt.c(1306),ERROR" ID="0x8de028d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt reliable write characteristic value malloc fail @ble_general_gatt.c(1313),ERROR" ID="0x8de0290a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BCore] ble general gatt reliable write characteristic value memcpy fail @ble_general_gatt.c(1322),ERROR" ID="0x8de02952" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt reliable write characteristic value fail:0x%x. @ble_general_gatt.c(1341),WARNING" ID="0x8de029eb" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write descriptor value malloc faile, size:0x%x. @ble_general_gatt.c(1358),ERROR" ID="0x8de02a72" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble general gatt write descriptor value memcpy fail: %d @ble_general_gatt.c(1367),ERROR" ID="0x8de02aba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor error:0x%x. @ble_general_gatt.c(1377),ERROR" ID="0x8de02b0a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read descriptor value response memcpy fail: %d @ble_general_gatt.c(1399),ERROR" ID="0x8de02bba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read descriptor value response memcpy fail: %d @ble_general_gatt.c(1407),ERROR" ID="0x8de02bfa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read descriptor value error:0x%x. @ble_general_gatt.c(1436),ERROR" ID="0x8de02ce2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt mtu config error:0x%x. @ble_general_gatt.c(1451),ERROR" ID="0x8de02d5a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt set gap ui attributes error:0x%x. @ble_general_gatt.c(1464),ERROR" ID="0x8de02dc2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt get gap ui attributes error:0x%x. @ble_general_gatt.c(1483),ERROR" ID="0x8de02e5a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bt mpc adapter gatt get hid report callback new fail @ble_general_gatt.c(1513),ERROR" ID="0x8de02f4a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report callback error_code = %x @ble_general_gatt.c(1524),INFO" ID="0x8de02fa5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="llc_test_set_cis_param : alloc fail! @llc_cis_ram.c(30),INFO" ID="0x8a2a00f5" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="llc_test_set_cis_param :cig_id=%d, cis_id=%d, cis_conhdl=%d, struct_size=%d @llc_cis_ram.c(60),INFO" ID="0x8a2a01e5" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="llc_test_set_cis_param :cig_id=%d, cis_id=%d, sdu_intv_m2s=%d, sdu_intv_s2m=%d @llc_cis_ram.c(62),INFO" ID="0x8a2a01f5" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[DEBUG]g_msg_ptr_read%d, @btdfx_fn.c(2093),INFO" ID="0x88e4416d" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[PMU][ERROR]Wakeup isr come more than once, sleep_int_id:%d, wakeup_int_id:%d @bt_sleep.c(139),WARNING" ID="0x88f0045b" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]wakeup pmu state change fail @bt_sleep.c(147),ERROR" ID="0x88f0049a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="g_clock_32k_100x = %d @bt_sleep.c(177),INFO" ID="0x88f0058d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]bt_program_sleep clk(%d)dur(%d)glbcnt(0x%x) @bt_sleep.c(222),INFO" ID="0x88f006f5" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[ERROR][SLEEP]wakeup_end clk(%d) sleep_time(%d) sleep_dur(%d) @bt_sleep.c(265),ERROR" ID="0x88f0084a" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]wakeup_end clk(%d) fincnt(%d)glbcnt(0x%x) @bt_sleep.c(269),INFO" ID="0x88f0086d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]btc sleep pmu state change fail @bt_sleep.c(311),ERROR" ID="0x88f009ba" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[PMU][WARNING]Set osc_en down more than once, sleep_int_id:%d, wakeup_int_id:%d @bt_sleep.c(320),WARNING" ID="0x88f00a03" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]sleep time is too short! @bt_sleep.c(370),WARNING" ID="0x88f00b93" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][SLEEP]osc_en wakeup isr error! @bt_sleep.c(374),ERROR" ID="0x88f00bb2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]extern wakeup pmu state change fail @bt_sleep.c(390),ERROR" ID="0x88f00c32" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]extern wakeup btc clk(%d)slp_dur_slot(%d)glbcnt(%d) @bt_sleep.c(396),INFO" ID="0x88f00c65" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="g_dfx_time:%d @bt_sleep.c(416),INFO" ID="0x88f00d05" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][LLD]lld_periodic_adv_start:sync_dur=%d, intv_min=%d, intv_max=%d @lld_per_ram.c(53),INFO" ID="0x8a5e01ad" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="g_clock_32k_100x = %d @bt_sleep.c(178),INFO" ID="0x88f00595" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]bt_program_sleep clk(%d)dur(%d)glbcnt(0x%x) @bt_sleep.c(224),INFO" ID="0x88f00705" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ERROR][SLEEP]wakeup_end clk(%d) sleep_time(%d) sleep_dur(%d) @bt_sleep.c(267),ERROR" ID="0x88f0085a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]wakeup_end clk(%d) fincnt(%d)glbcnt(0x%x) @bt_sleep.c(271),INFO" ID="0x88f0087d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]btc sleep pmu state change fail @bt_sleep.c(313),ERROR" ID="0x88f009ca" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[PMU][WARNING]Set osc_en down more than once, sleep_int_id:%d, wakeup_int_id:%d @bt_sleep.c(322),WARNING" ID="0x88f00a13" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]sleep time is too short! @bt_sleep.c(372),WARNING" ID="0x88f00ba3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][SLEEP]osc_en wakeup isr error! @bt_sleep.c(376),ERROR" ID="0x88f00bc2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]extern wakeup pmu state change fail @bt_sleep.c(392),ERROR" ID="0x88f00c42" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]extern wakeup btc clk(%d)slp_dur_slot(%d)glbcnt(%d) @bt_sleep.c(398),INFO" ID="0x88f00c75" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="g_dfx_time:%d @bt_sleep.c(418),INFO" ID="0x88f00d15" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][LLD]lld_periodic_adv_start:sync_dur=%d, intv_min=%d, intv_max=%d @lld_per_ram.c(53),INFO" ID="0x8a6201ad" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[SMP][LongTermKeyRequest]key-&gt;fea = 0x%x @smp_ui.c(426),INFO" ID="0x8dac0d55" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest]key == NULL @smp_ui.c(430),INFO" ID="0x8dac0d75" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[SMP][LongTermKeyRequest]link-&gt;hcihdl = %u, link-&gt;remote = 0x%x, key = 0x%x @smp_ui.c(457),INFO" ID="0x8dac0e4d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest][No LESC LTK SEND] @smp_ui.c(470),INFO" ID="0x8dac0eb5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest][DIV mismatch, Unpaired] @smp_ui.c(494),INFO" ID="0x8dac0f75" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest][ECDH LTK unavailable, pair!=NULL] @smp_ui.c(507),INFO" ID="0x8dac0fdd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest][LTK unavailable, pair=NULL] @smp_ui.c(520),INFO" ID="0x8dac1045" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[SMP][LongTermKeyRequest]LKT:0x%02x%02x%02x%02x @smp_ui.c(527),ERROR" ID="0x8dac107a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest][Send Negative Reply!] @smp_ui.c(542),INFO" ID="0x8dac10f5" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][high power] enable on linkid:%d, last_rx_err_pkt:%d, rssi_delta:%d, time:0x%x @lc_task_ram.c(1392),INFO" ID="0x8a482b85" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][high power] disable on linkid:%d, last_rx_err_pkt:%d, rssi_delta:%d, time:0x%x @lc_task_ram.c(1402),INFO" ID="0x8a482bd5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LC]lmp_encaps_payl_handler:sp fail in LC_WAIT_PUB_KEY_PAYLOAD_RSP_PEER @lc_task_ram.c(1703),INFO" ID="0x8a48353d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="pce_update_status null returned @sdk_pbap.c(168),WARNING" ID="0x8b740543" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="pbap_pull_phone_book conn_hdl=0x%x @sdk_pbap.c(669),INFO" ID="0x8b7414ed" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="pbap_pull_phone_book err ret=0x%x @sdk_pbap.c(682),WARNING" ID="0x8b741553" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="lld_evt_defered_elt_handler,  test end @patch_lld_evt.c(141),WARNING" ID="0x8a5c046b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LLD]lld_evt_flush_common:elt is null @patch_lld_evt.c(212),INFO" ID="0x8a5c06a5" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="c_evt-&gt;mode=%d, next_elt-&gt;mode=%d, cur-&gt;conhdl=%d, n_evt-&gt;conhdl=%d @patch_lld_evt.c(269),INFO" ID="0x8a5c086d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="current_elt-&gt;current_prio=%d, next_elt-&gt;current_prio=%d, llm_le_env.sync_state =%d @patch_lld_evt.c(271),INFO" ID="0x8a5c087d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="lld_evt_defered_elt_handler,  test end @patch_lld_evt.c(141),WARNING" ID="0x8a60046b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LLD]lld_evt_flush_common:elt is null @patch_lld_evt.c(212),INFO" ID="0x8a6006a5" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="c_evt-&gt;mode=%d, next_elt-&gt;mode=%d, cur-&gt;conhdl=%d, n_evt-&gt;conhdl=%d @patch_lld_evt.c(269),INFO" ID="0x8a60086d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="current_elt-&gt;current_prio=%d, next_elt-&gt;current_prio=%d, llm_le_env.sync_state =%d @patch_lld_evt.c(271),INFO" ID="0x8a60087d" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[osMonitor]No.%d task was blocked tick %ld, count %ld @runtime_monitor.c(128),ERROR" ID="0xa00e0402" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[osMonitor]No.%d task was blocked up to limited times! @runtime_monitor.c(137),ERROR" ID="0xa00e044a" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[osMonitor]No.%d task work overtime! threshold tick %d, work time %d @runtime_monitor.c(184),WARNING" ID="0xa00e05c3" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][LD]ld_bt_test_mode_rx_start:evt is null @dbg_bt_test_tx_rx.c(570),WARNING" ID="0x899c11d3" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][LD]ld_bt_test_mode_rx_start ea insert fail! @dbg_bt_test_tx_rx.c(592),WARNING" ID="0x899c1283" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][LD]ld_evt_start_rx_cbk:evt is null @dbg_bt_test_tx_rx.c(601),WARNING" ID="0x899c12cb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk]gatt_get_descriptor_value memcpy failed @sdk_gatt.c(386),ERROR" ID="0x8b800c12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_get_descriptor_value&#160;memcpy_s&#160;error @sdk_gatt.c(570),ERROR" ID="0x8b8011d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic mem_new failed @sdk_gatt.c(792),ERROR" ID="0x8b8018c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt.c(797),ERROR" ID="0x8b8018ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt.c(806),ERROR" ID="0x8b801932" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="btsdk gatt get characteristics by uuid start_handle:0x%x end_handle:0x%x, uuid:0x%x @sdk_gatt.c(829),INFO" ID="0x8b8019ed" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk gatt get characteristic value by uuid start_handle:0x%x end_handle:0x%x @sdk_gatt.c(877),INFO" ID="0x8b801b6d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[sdk]gatt_get_descriptor_by_handle start_handle:0x%x end_handle:0x%x @sdk_gatt.c(900),INFO" ID="0x8b801c25" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[sdk]gatt_get_multiple_characteristics_by_handle handle_count:0x%x @sdk_gatt.c(921),INFO" ID="0x8b801ccd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_set_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1199),ERROR" ID="0x8b80257a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_set_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1212),ERROR" ID="0x8b8025e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_get_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1284),ERROR" ID="0x8b802822" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_send_response&#160;memcpy_s&#160;error @sdk_gatt.c(1882),ERROR" ID="0x8b803ad2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_change_descriptor_value&#160;memcpy_s&#160;error @sdk_gatt.c(1963),ERROR" ID="0x8b803d5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_notify_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt.c(2008),ERROR" ID="0x8b803ec2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_notify_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt.c(2015),ERROR" ID="0x8b803efa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]can't find hdl by uuid @sdk_gatt.c(2206),ERROR" ID="0x8b8044f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk]gatt_get_descriptor_value memcpy failed @sdk_gatt.c(387),ERROR" ID="0x8b800c1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_get_descriptor_value&#160;memcpy_s&#160;error @sdk_gatt.c(571),ERROR" ID="0x8b8011da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic mem_new failed @sdk_gatt.c(793),ERROR" ID="0x8b8018ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt.c(798),ERROR" ID="0x8b8018f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt.c(807),ERROR" ID="0x8b80193a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="btsdk gatt get characteristics by uuid start_handle:0x%x end_handle:0x%x, uuid:0x%x @sdk_gatt.c(830),INFO" ID="0x8b8019f5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk gatt get characteristic value by uuid start_handle:0x%x end_handle:0x%x @sdk_gatt.c(878),INFO" ID="0x8b801b75" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[sdk]gatt_get_descriptor_by_handle start_handle:0x%x end_handle:0x%x @sdk_gatt.c(901),INFO" ID="0x8b801c2d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[sdk]gatt_get_multiple_characteristics_by_handle handle_count:0x%x @sdk_gatt.c(922),INFO" ID="0x8b801cd5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_set_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1200),ERROR" ID="0x8b802582" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_set_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1213),ERROR" ID="0x8b8025ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_get_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1285),ERROR" ID="0x8b80282a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_send_response&#160;memcpy_s&#160;error @sdk_gatt.c(1883),ERROR" ID="0x8b803ada" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_change_descriptor_value&#160;memcpy_s&#160;error @sdk_gatt.c(1964),ERROR" ID="0x8b803d62" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_notify_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt.c(2009),ERROR" ID="0x8b803eca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_notify_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt.c(2016),ERROR" ID="0x8b803f02" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]can't find hdl by uuid @sdk_gatt.c(2207),ERROR" ID="0x8b8044fa" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[bt_debug]BT rfpll addr:0x%x = %04x @bt_dbg.c(72),INFO" ID="0x89320245" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[bt_debug]BT rf    addr:0x%x = %04x @bt_dbg.c(78),INFO" ID="0x89320275" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[bt_debug]BT mdm    addr:0x%x = %04x @bt_dbg.c(92),INFO" ID="0x893202e5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][CTE]llm_util_per_sync_check_cte_type: HIT - Do not sync to packets without a CTE @llm_ram.c(125),WARNING" ID="0x8a1803eb" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[WARNING][CTE] type check: HIT - Do not sync to packets with an %d type CTE @llm_ram.c(134),WARNING" ID="0x8a180433" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(75),ERROR" ID="0x8c4c025a" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT]UUID[0x%04x] start hdl[0x%x], end hdl[0x%x] @att_gatt.c(956),INFO" ID="0x8c4c1de5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1057),ERROR" ID="0x8c4c210a" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[ATT]UUID[0x%04x] hdl[0x%x], value hdl[0x%x], len[0x%x]  @att_gatt.c(1069),INFO" ID="0x8c4c216d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="properties[0x%x] @att_gatt.c(1070),INFO" ID="0x8c4c2175" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1128),ERROR" ID="0x8c4c2342" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT]UUID[0x%04x], hdl[0x%x], len[0x%x] @att_gatt.c(1137),INFO" ID="0x8c4c238d" />
-                       <MSG STRUCTURE="diag_log_msg5" NAME="GATT_Server_Create_UpdateCCC_Item, add item[hdl:%d] ccc onaddr:0x%02x:%02x:xx:xx:%02x:%02x @att_gatt.c(1351),INFO" ID="0x8c4c2a3d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1475),ERROR" ID="0x8c4c2e1a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s error @att_gatt.c(2327),ERROR" ID="0x8c4c48ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2573),ERROR" ID="0x8c4c506a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2601),ERROR" ID="0x8c4c514a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2606),ERROR" ID="0x8c4c5172" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[ATT_GATT] gatt tl done reason:%d occured:%d @att_gatt.c(320),ERROR" ID="0x8c4c0a02" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[ATT_GATT] gatt tl create require:%d addr:%02x******%02x%02x @att_gatt.c(414),ERROR" ID="0x8c4c0cf2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ATT_GATT]tl timeout evt:%d @att_gatt.c(667),ERROR" ID="0x8c4c14da" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[ATT_GATT] gatt tl disconnect require:%d addr:%02x******%02x%02x @att_gatt.c(844),ERROR" ID="0x8c4c1a62" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[ATT_GATT] gatt event cbk:%p evt:%d @att_gatt.c(871),ERROR" ID="0x8c4c1b3a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] gatt error cfm task:%d errcode:%d mask:%d @att_gatt.c(887),ERROR" ID="0x8c4c1bba" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT]UUID[0x%04x] start hdl[0x%x], end hdl[0x%x] @att_gatt.c(973),INFO" ID="0x8c4c1e6d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1074),ERROR" ID="0x8c4c2192" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[ATT]UUID[0x%04x] hdl[0x%x], value hdl[0x%x], len[0x%x]  @att_gatt.c(1086),INFO" ID="0x8c4c21f5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="properties[0x%x] @att_gatt.c(1087),INFO" ID="0x8c4c21fd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1145),ERROR" ID="0x8c4c23ca" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT]UUID[0x%04x], hdl[0x%x], len[0x%x] @att_gatt.c(1154),INFO" ID="0x8c4c2415" />
+                       <MSG STRUCTURE="diag_log_msg5" NAME="GATT_Server_Create_UpdateCCC_Item, add item[hdl:%d] ccc onaddr:0x%02x:%02x:xx:xx:%02x:%02x @att_gatt.c(1368),INFO" ID="0x8c4c2ac5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1492),ERROR" ID="0x8c4c2ea2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ATT_GATT] create le connect mask:%d @att_gatt.c(1810),ERROR" ID="0x8c4c3892" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ATT_GATT] create br connect mask:%d @att_gatt.c(1819),ERROR" ID="0x8c4c38da" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] smp cfm mask:%d task_index:%d result:%d @att_gatt.c(1938),ERROR" ID="0x8c4c3c92" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] smp request mask:%d task_index:%d sec_mode:%d @att_gatt.c(1973),ERROR" ID="0x8c4c3daa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s error @att_gatt.c(2356),ERROR" ID="0x8c4c49a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2602),ERROR" ID="0x8c4c5152" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2630),ERROR" ID="0x8c4c5232" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2635),ERROR" ID="0x8c4c525a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="memory alloc failed @bt_ahi_hfp.c(279),WARNING" ID="0x8c9e08bb" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="memory set failed. @bt_ahi_hfp.c(284),WARNING" ID="0x8c9e08e3" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed. @bt_ahi_hfp.c(293),WARNING" ID="0x8c9e092b" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][LLC][PHY]hci_le_set_phy_cmd_handler:llc is in disconnected state @llc_hci.c(1500),WARNING" ID="0x88322ee3" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLC][PHY]hci_le_set_phy_cmd_handler:current_txphy=%d, current_rxphy=%d, txphyoption=%d, rxphyoption=%d @llc_hci.c(1545),INFO" ID="0x8832304d" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[CHR]handle %d action %d  @llc_hci.c(2463),INFO" ID="0x88324cfd" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap set discovery mode result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(75),INFO" ID="0x8c9e025d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap get discovery mode result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(89),INFO" ID="0x8c9e02cd" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap stop discovery result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(99),INFO" ID="0x8c9e031d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap create acl result = 0x%x, dev_hdl = 0x%x, link type = %d  @bt_ahi_gap.c(113),INFO" ID="0x8c9e038d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(126),ERROR" ID="0x8c9e03f2" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap create acl cfm cbk result = 0x%x, acl_hdl = 0x%x, link type = %d  @bt_ahi_gap.c(131),INFO" ID="0x8c9e041d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap create acla result = 0x%x @bt_ahi_gap.c(140),INFO" ID="0x8c9e0465" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap reconnect phone result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(151),INFO" ID="0x8c9e04bd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap get rmt dev handle result = 0x%x @bt_ahi_gap.c(163),INFO" ID="0x8c9e051d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap device is connected result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(175),INFO" ID="0x8c9e057d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk disconnect acl by handle result = 0x%x @bt_ahi_gap.c(186),INFO" ID="0x8c9e05d5" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap pair device result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(198),INFO" ID="0x8c9e0635" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap add rmt device rsp.result = %x @bt_ahi_gap.c(215),INFO" ID="0x8c9e06bd" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap update rmt device name result = 0x%x, name = %s  @bt_ahi_gap.c(235),INFO" ID="0x8c9e075d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(249),ERROR" ID="0x8c9e07ca" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap update rmt device name cfm cbk result = 0x%x, opindex = 0x%x, size = %d  @bt_ahi_gap.c(257),INFO" ID="0x8c9e080d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap update rmt device name async result = 0x%x @bt_ahi_gap.c(267),INFO" ID="0x8c9e085d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap get local name result = 0x%x, length = %d, name = %s  @bt_ahi_gap.c(303),INFO" ID="0x8c9e097d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="stack gap get rmt dev addr result = 0x%x, addr[%02x:**:**:**:%02x:%02x] @bt_ahi_gap.c(328),INFO" ID="0x8c9e0a45" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap browse rmt service overflow, max_count = %d, svc_count = %d @bt_ahi_gap.c(350),ERROR" ID="0x8c9e0af2" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap browse rmt service result = 0x%x, svc_count = %d, svc_hdl[0] = 0x%x @bt_ahi_gap.c(356),INFO" ID="0x8c9e0b25" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp enable sco:scohdl=0x%x inid=0x%x outid=0x%x @bt_ahi_gap.c(377),INFO" ID="0x8c9e0bcd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="hfp disable sco:scohdl=0x%x @bt_ahi_gap.c(381),INFO" ID="0x8c9e0bed" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="result = 0x%x, handle = 0x%x, service_class = %02x  @bt_ahi_gap.c(414),INFO" ID="0x8c9e0cf5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap init, res = 0x%x  @bt_ahi_gap.c(425),INFO" ID="0x8c9e0d4d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="set bt tx power, hdl=0x%x, power=%d, ret=0x%x @bt_ahi_gap.c(438),INFO" ID="0x8c9e0db5" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="br gap read rssi, hdl=0x%x, rssi=%d, ret=0x%x @bt_ahi_gap.c(446),INFO" ID="0x8c9e0df5" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="set active scene scene = %d, bitrate = %d, delay = %d, ret=0x%x @bt_ahi_gap.c(462),INFO" ID="0x8c9e0e75" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="set inquiry scan param interval = %d, window = %d @bt_ahi_gap.c(470),INFO" ID="0x8c9e0eb5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(481),ERROR" ID="0x8c9e0f0a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap restore rmt device rsp.result = %x @bt_ahi_gap.c(485),INFO" ID="0x8c9e0f2d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="br gap get link mode, hdl=0x%x, mode=%d, ret=0x%x @bt_ahi_gap.c(494),INFO" ID="0x8c9e0f75" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap set discovery mode result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(82),INFO" ID="0x8c9e0295" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap get discovery mode result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(96),INFO" ID="0x8c9e0305" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap stop discovery result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(106),INFO" ID="0x8c9e0355" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap create acl result = 0x%x, dev_hdl = 0x%x, link type = %d  @bt_ahi_gap.c(120),INFO" ID="0x8c9e03c5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(133),ERROR" ID="0x8c9e042a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap create acl cfm cbk result = 0x%x, acl_hdl = 0x%x, link type = %d  @bt_ahi_gap.c(138),INFO" ID="0x8c9e0455" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap create acla result = 0x%x @bt_ahi_gap.c(147),INFO" ID="0x8c9e049d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap reconnect phone result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(158),INFO" ID="0x8c9e04f5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap get rmt dev handle result = 0x%x @bt_ahi_gap.c(170),INFO" ID="0x8c9e0555" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap device is connected result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(182),INFO" ID="0x8c9e05b5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk disconnect acl by handle result = 0x%x @bt_ahi_gap.c(193),INFO" ID="0x8c9e060d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap pair device result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(205),INFO" ID="0x8c9e066d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap add rmt device rsp.result = %x @bt_ahi_gap.c(222),INFO" ID="0x8c9e06f5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap update rmt device name result = 0x%x, name = %s  @bt_ahi_gap.c(242),INFO" ID="0x8c9e0795" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(256),ERROR" ID="0x8c9e0802" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap update rmt device name cfm cbk result = 0x%x, opindex = 0x%x, size = %d  @bt_ahi_gap.c(264),INFO" ID="0x8c9e0845" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap update rmt device name async result = 0x%x @bt_ahi_gap.c(274),INFO" ID="0x8c9e0895" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap get local name result = 0x%x, length = %d, name = %s  @bt_ahi_gap.c(310),INFO" ID="0x8c9e09b5" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="stack gap get rmt dev addr result = 0x%x, addr[%02x:**:**:**:%02x:%02x] @bt_ahi_gap.c(335),INFO" ID="0x8c9e0a7d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap browse rmt service overflow, max_count = %d, svc_count = %d @bt_ahi_gap.c(357),ERROR" ID="0x8c9e0b2a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap browse rmt service result = 0x%x, svc_count = %d, svc_hdl[0] = 0x%x @bt_ahi_gap.c(363),INFO" ID="0x8c9e0b5d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp enable sco:scohdl=0x%x inid=0x%x outid=0x%x @bt_ahi_gap.c(384),INFO" ID="0x8c9e0c05" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="hfp disable sco:scohdl=0x%x @bt_ahi_gap.c(388),INFO" ID="0x8c9e0c25" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="result = 0x%x, handle = 0x%x, service_class = %02x  @bt_ahi_gap.c(421),INFO" ID="0x8c9e0d2d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap init, res = 0x%x  @bt_ahi_gap.c(432),INFO" ID="0x8c9e0d85" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="set bt tx power, hdl=0x%x, power=%d, ret=0x%x @bt_ahi_gap.c(445),INFO" ID="0x8c9e0ded" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="br gap read rssi, hdl=0x%x, rssi=%d, ret=0x%x @bt_ahi_gap.c(453),INFO" ID="0x8c9e0e2d" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="set active scene scene = %d, bitrate = %d, delay = %d, ret=0x%x @bt_ahi_gap.c(469),INFO" ID="0x8c9e0ead" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="set inquiry scan param interval = %d, window = %d @bt_ahi_gap.c(477),INFO" ID="0x8c9e0eed" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(488),ERROR" ID="0x8c9e0f42" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap restore rmt device rsp.result = %x @bt_ahi_gap.c(492),INFO" ID="0x8c9e0f65" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="br gap get link mode, hdl=0x%x, mode=%d, ret=0x%x @bt_ahi_gap.c(501),INFO" ID="0x8c9e0fad" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memset failed @gap_ui.c(1251),ERROR" ID="0x8b5c271a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_ui.c(1255),ERROR" ID="0x8b5c273a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_ui.c(1259),ERROR" ID="0x8b5c275a" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="%02x @bt_dft_bdi.c(957),WARNING" ID="0x8d0c1deb" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="bt dft get bdi @bt_dft_bdi.c(964),INFO" ID="0x8d0c1e25" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="bt dft get bdi err @bt_dft_bdi.c(966),INFO" ID="0x8d0c1e35" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="hlp_link_key_req_cbk no source addr:0x%x @sdk_hlp.c(900),INFO" ID="0x8b7a1c25" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="hlp_connection_ev_cbk_dis_conn hdl:0x%x status:%d @sdk_hlp.c(2055),INFO" ID="0x8b7a403d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="hlp_link_key_req_cbk no source addr:0x%x @sdk_hlp.c(898),INFO" ID="0x8b7a1c15" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="hlp_connection_ev_cbk_dis_conn hdl:0x%x status:%d @sdk_hlp.c(2053),INFO" ID="0x8b7a402d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[SDK] connect event cbk connected: %d, reason: %d link_type:%d! @sdk_hlp.c(2074),ERROR" ID="0x8b7a40d2" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[SDK] connect event cbk cap:%d addr:%02x******%02x%02x @sdk_hlp.c(2089),ERROR" ID="0x8b7a414a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[SDK] connect event cbk status:%d dev_hdl:0x%x @sdk_hlp.c(2092),ERROR" ID="0x8b7a4162" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="gdk message post, failed retry later. @gdk_msg.c(46),ERROR" ID="0x8cb40172" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="gdk message timer cback @gdk_msg.c(74),DBG" ID="0x8cb40256" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="gdk message add itor_msgid:0x%x, itor_ts:0x%lld @gdk_msg.c(107),DBG" ID="0x8cb4035e" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="gdk message loop message_ts = 0x%x @gdk_msg.c(391),DBG" ID="0x8cb40c3e" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="gdk message loop timeout_ms  = 0x%x @gdk_msg.c(405),DBG" ID="0x8cb40cae" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[ERR][CHR_UPDATE]error_handler:no handle: err_id = 0x%x, err_id_high = 0x%x,err_id_low = 0x%x @bt_chr.c(37),ERROR" ID="0x88de012a" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[PF][DUMP INFO] stack point: 0x%x, stack address: 0x%x, stack size: 0x%x @log_oml_exception.c(410),ERROR" ID="0xa0080cd2" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[PF][DUMP INFO] stack point: 0x%x, stack address: 0x%x, stack size: 0x%x @log_oml_exception.c(411),ERROR" ID="0xa0080cda" />
                        <MSG STRUCTURE="diag_log_msg4" NAME="[LPF_CALI]code = %x, abs_diff_val = %d, pwr_1m = %d, 2 * pwr_2_5m = %d @bt_cali_func.c(564),INFO" ID="0x894211a5" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[rxiq]trim version = %d @bt_cali_func.c(1281),INFO" ID="0x8942280d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="START CALCU PREF @bt_cali_func.c(1447),INFO" ID="0x89422d3d" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[DADP][get_active_device_handle] REMOTE_ADDR=%02x:%02x:**:**:**:%02x @packet_dl.c(381),INFO" ID="0x8c280bed" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][param]ke_msg_alloc:msg = NULL @ke_msg.c(73),ERROR" ID="0x891a024a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR]the MSG is not in heap @ke_msg.c(183),ERROR" ID="0x891a05ba" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[TIMRE_ADD][STACK_TIMER] TIMER=0x%x, TIME=%u @fsm.c(669),INFO" ID="0x8b5814ed" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_EXPIR]timeout timer err! @fsm.c(767),ERROR" ID="0x8b5817fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_EXPIR]timeout but no right timer! @fsm.c(797),WARNING" ID="0x8b5818eb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[timer_expire_in_sch_lite]timer has been free; not need free! @fsm.c(813),WARNING" ID="0x8b58196b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_DEL][STACK_TIMER] in_ft is NULL! @fsm.c(938),INFO" ID="0x8b581d55" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[FSM][QOS]producer %u @fsm.c(83),ERROR" ID="0x8b58029a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[FSM][QOS]consumer %u @fsm.c(97),ERROR" ID="0x8b58030a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[TIMRE_ADD][STACK_TIMER] TIMER=0x%x, TIME=%u @fsm.c(725),INFO" ID="0x8b5816ad" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_EXPIR]timeout timer err! @fsm.c(823),ERROR" ID="0x8b5819ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_EXPIR]timeout but no right timer! @fsm.c(853),WARNING" ID="0x8b581aab" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[timer_expire_in_sch_lite]timer has been free; not need free! @fsm.c(869),WARNING" ID="0x8b581b2b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_DEL][STACK_TIMER] in_ft is NULL! @fsm.c(994),INFO" ID="0x8b581f15" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="llc_ico_update_finished unknown ico_conhdl @llc_ico.c(203),WARNING" ID="0x883e065b" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[ICO]conhdl unknown conhdl role, conhdl = %d, role = %d @llc_ico.c(216),ERROR" ID="0x883e06c2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="llc_cis_update_finished unknown cis_conhdl @llc_ico.c(235),WARNING" ID="0x883e075b" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][LLD]lld_ext_con_start_by_phy_opt:elt_scan=0x%x, elt_connect=0x%x, aux_init_elt=0x%x @lld_con.c(1323),INFO" ID="0x8970295d" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="btsdk get remote device address failed! dev_hdl = 0x%x @bt_ahi_common.c(97),ERROR" ID="0x8c9e030a" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="btsrv passkey req ind callback dev_hdl = 0x%x @bt_ahi_common.c(162),INFO" ID="0x8c9e0515" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLD]lld_bis_elt_ready:elt=0x%x,elt_ts=0x%x,intv=%d,duration_min=%d @patch_lld_bis.c(46),INFO" ID="0x8a560175" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLD]lld_bis_elt_ready:elt=0x%x,elt_ts=0x%x,intv=%d,duration_min=%d @patch_lld_bis.c(46),INFO" ID="0x8a5a0175" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[INFO]hci_dbg_meta_evt_pkupk:in=%d,*in=%d @hci_msg.c(1958),INFO" ID="0x88d03d35" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[LOW_POWER]des is error ,des:0x%x,%s,%d @hal_cpu_hifi.c(69),INFO" ID="0xa028022d" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[LOW_POWER]des is error ,des:0x%x,%s,%d @hal_cpu_hifi.c(85),INFO" ID="0xa02802ad" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_table.c(1011),ERROR" ID="0x8d661f9a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_table.c(1184),ERROR" ID="0x8d662502" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_table.c(1273),ERROR" ID="0x8d6627ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR]p_data is null @bt_tran_task.c(56),ERROR" ID="0x8c9401c2" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:route data:TID&amp;SOF&amp;SID&amp;CID, LEN = 0x%04X%04X, %d @bt_tran_task.c(86),WARNING" ID="0x8c9402b3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Error route_id! @bt_tran_task.c(98),ERROR" ID="0x8c940312" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:route data:TID&amp;SOF&amp;SID&amp;CID, LEN = 0x%04X%04X, %d @bt_tran_task.c(118),WARNING" ID="0x8c9403b3" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:data:TID&amp;SOF&amp;SID&amp;CID:0x%04X%04X,LEN:%d @bt_tran_task.c(121),WARNING" ID="0x8c9403cb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="INVALID DATA! @bt_tran_task.c(157),ERROR" ID="0x8c9404ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="BT_TRAN: TXMCU:ipc send data = %d @bt_tran_task.c(185),ERROR" ID="0x8c9405ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UNKNOW CORE! @bt_tran_task.c(195),ERROR" ID="0x8c94061a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task framek free property allow_free= %d @bt_tran_task.c(235),INFO" ID="0x8c94075d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="pst_property-&gt;en_id = 0x%x @bt_tran_task.c(253),INFO" ID="0x8c9407ed" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="BT_TRAN: data ERROR data_len:%d @bt_tran_task.c(311),WARNING" ID="0x8c9409bb" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="BT_TRAN: data ERROR data:0x%08x, 0x%08x @bt_tran_task.c(315),WARNING" ID="0x8c9409db" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="rec mcu error data,tid:0x%x,sof:0x%x,len:0x%04x,opcode:0x%04x @bt_tran_task.c(324),ERROR" ID="0x8c940a22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="hci qos buf overflow. @bt_tran_task.c(349),ERROR" ID="0x8c940aea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble fsm buf overflow. @bt_tran_task.c(354),ERROR" ID="0x8c940b12" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="rec data malloc fail opcode:0x%04x,length:(0x%04x) @bt_tran_task.c(363),ERROR" ID="0x8c940b5a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="rec data memcpy fail opcode:0x%04x,length:(0x%04x) @bt_tran_task.c(369),ERROR" ID="0x8c940b8a" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="rec mcu write property fail,tid:0x%x,sof:0x%x,len:0x%04x,opcode:0x%04x @bt_tran_task.c(379),ERROR" ID="0x8c940bda" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data data len err = %d @bt_tran_task.c(409),ERROR" ID="0x8c940cca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data data len err = %d @bt_tran_task.c(419),ERROR" ID="0x8c940d1a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data from M7 error = %d @bt_tran_task.c(423),ERROR" ID="0x8c940d3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ipc data from unknow core @bt_tran_task.c(435),ERROR" ID="0x8c940d9a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task handler osMessageQueueGet fail ret:(%x) @bt_tran_task.c(461),ERROR" ID="0x8c940e6a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task framek write property en_id = 0x%x @bt_tran_task.c(485),INFO" ID="0x8c940f2d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="write Property fail id:0x%x, ret:0x%x @bt_tran_task.c(493),ERROR" ID="0x8c940f6a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="bt tran task framek write property fail en_id:%d,ret:%x @bt_tran_task.c(502),ERROR" ID="0x8c940fb2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR]p_data is null @bt_tran_task.c(85),ERROR" ID="0x8c9402aa" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:route data:TID&amp;SOF&amp;SID&amp;CID, LEN = 0x%04X%04X, %d @bt_tran_task.c(115),ERROR" ID="0x8c94039a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Error route_id! @bt_tran_task.c(127),ERROR" ID="0x8c9403fa" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:route data:TID&amp;SOF&amp;SID&amp;CID, LEN = 0x%04X%04X, %d @bt_tran_task.c(147),ERROR" ID="0x8c94049a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:data:TID&amp;SOF&amp;SID&amp;CID:0x%04X%04X,LEN:%d @bt_tran_task.c(150),ERROR" ID="0x8c9404b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="INVALID DATA! @bt_tran_task.c(186),ERROR" ID="0x8c9405d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="BT_TRAN: TXMCU:ipc send data = %d @bt_tran_task.c(214),ERROR" ID="0x8c9406b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UNKNOW CORE! @bt_tran_task.c(224),ERROR" ID="0x8c940702" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task framek free property allow_free= %d @bt_tran_task.c(264),INFO" ID="0x8c940845" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="pst_property-&gt;en_id = 0x%x @bt_tran_task.c(282),INFO" ID="0x8c9408d5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ipc buf release number:%u %u. @bt_tran_task.c(330),ERROR" ID="0x8c940a52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="hci qos buf overflow. @bt_tran_task.c(356),ERROR" ID="0x8c940b22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble fsm buf overflow. @bt_tran_task.c(362),ERROR" ID="0x8c940b52" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ipc buf warning number:%u %u. @bt_tran_task.c(370),ERROR" ID="0x8c940b92" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="BT_TRAN: data ERROR data_len:%d @bt_tran_task.c(389),WARNING" ID="0x8c940c2b" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="BT_TRAN: data ERROR data:0x%08x, 0x%08x @bt_tran_task.c(393),WARNING" ID="0x8c940c4b" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="rec mcu error data,tid:0x%x,sof:0x%x,len:0x%04x,opcode:0x%04x @bt_tran_task.c(402),ERROR" ID="0x8c940c92" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="rec data malloc fail opcode:0x%04x,length:(0x%04x) @bt_tran_task.c(420),ERROR" ID="0x8c940d22" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="rec data memcpy fail opcode:0x%04x,length:(0x%04x) @bt_tran_task.c(426),ERROR" ID="0x8c940d52" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="rec mcu write property fail,tid:0x%x,sof:0x%x,len:0x%04x,opcode:0x%04x @bt_tran_task.c(436),ERROR" ID="0x8c940da2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data data len err = %d @bt_tran_task.c(473),ERROR" ID="0x8c940eca" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data data len err = %d @bt_tran_task.c(483),ERROR" ID="0x8c940f1a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data from M7 error = %d @bt_tran_task.c(487),ERROR" ID="0x8c940f3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ipc data from unknow core @bt_tran_task.c(499),ERROR" ID="0x8c940f9a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task handler osMessageQueueGet fail ret:(%x) @bt_tran_task.c(525),ERROR" ID="0x8c94106a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task framek write property en_id = 0x%x @bt_tran_task.c(549),INFO" ID="0x8c94112d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="write Property fail id:0x%x, ret:0x%x @bt_tran_task.c(557),ERROR" ID="0x8c94116a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="bt tran task framek write property fail en_id:%d,ret:%x @bt_tran_task.c(566),ERROR" ID="0x8c9411b2" />
                        <MSG STRUCTURE="diag_log_msg3" NAME="[lc_sc_lmp_msg_conflict_check] policy=%d, state=%d, current_state=%d @lc_sc.c(763),INFO" ID="0x887c17dd" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="lc_sc_hci_command_reject no found opcode in tab, opcode=%d @lc_sc.c(1226),ERROR" ID="0x887c2652" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[INFO][LC_SC]:in role switch or enc state, to save message id=%d @lc_sc.c(1374),INFO" ID="0x887c2af5" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[ERROR][LLC][SUPP]llc_conn_cte_req_ind_handler:discard the message @llc_task_ram.c(323),ERROR" ID="0x8a140a1a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]convert uuid to sdk memcpy_s error @sdk_gatt_hlp.c(113),ERROR" ID="0x8da6038a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]convert uuid to stack memcpy_s error @sdk_gatt_hlp.c(125),ERROR" ID="0x8da603ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att exchange mtu addr memcpy fail @sdk_gatt_hlp.c(574),ERROR" ID="0x8da611f2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[gatth_get_multiple_characteristics_value] rmt:0x%x mtu:0x%x @sdk_gatt_hlp.c(880),INFO" ID="0x8da61b85" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[gatth_get_characteristics_by_uuid] start_handle:0x%x end_handle:0x%x @sdk_gatt_hlp.c(1013),INFO" ID="0x8da61fad" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk gatth get descriptor by handle arg-&gt;start_handle:0x%x arg-&gt;end_handle:0x%x @sdk_gatt_hlp.c(1056),INFO" ID="0x8da62105" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gatth_set_reliable_characteristic_value in @sdk_gatt_hlp.c(1101),INFO" ID="0x8da6226d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[gatth_set_characteristic_value] memcpy failed @sdk_gatt_hlp.c(1138),ERROR" ID="0x8da62392" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic rmt is NULL @sdk_gatt_hlp.c(1170),ERROR" ID="0x8da62492" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt_hlp.c(1177),ERROR" ID="0x8da624ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic tl is NULL @sdk_gatt_hlp.c(1191),ERROR" ID="0x8da6253a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[gatth_check_and_save_value] memcpy failed @sdk_gatt_hlp.c(1651),ERROR" ID="0x8da6339a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_execute_write_complete&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1748),ERROR" ID="0x8da636a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_write_ind&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1892),ERROR" ID="0x8da63b22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_write_ind&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1914),ERROR" ID="0x8da63bd2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_send_response&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(2267),ERROR" ID="0x8da646da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_notify_multiple_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(2500),ERROR" ID="0x8da64e22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info mem new fail @sdk_gatt_hlp.c(2552),ERROR" ID="0x8da64fc2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info service uuid memcpy fail @sdk_gatt_hlp.c(2562),ERROR" ID="0x8da65012" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info attribute uuid memcpy fail @sdk_gatt_hlp.c(2567),ERROR" ID="0x8da6503a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info addr memcpy fail @sdk_gatt_hlp.c(2572),ERROR" ID="0x8da65062" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info val memcpy fail @sdk_gatt_hlp.c(2577),ERROR" ID="0x8da6508a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind can't find service by service hdl @sdk_gatt_hlp.c(2623),ERROR" ID="0x8da651fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write pkt null @sdk_gatt_hlp.c(2629),ERROR" ID="0x8da6522a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind can't find server cbk by server hdl @sdk_gatt_hlp.c(2636),ERROR" ID="0x8da65262" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info mem new fail @sdk_gatt_hlp.c(2668),ERROR" ID="0x8da65362" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info service uuid memcpy fail @sdk_gatt_hlp.c(2679),ERROR" ID="0x8da653ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info attribute uuid memcpy fail @sdk_gatt_hlp.c(2684),ERROR" ID="0x8da653e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info addr memcpy fail @sdk_gatt_hlp.c(2689),ERROR" ID="0x8da6540a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info val memcpy fail @sdk_gatt_hlp.c(2695),ERROR" ID="0x8da6543a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind can't find service by service hdl @sdk_gatt_hlp.c(2715),ERROR" ID="0x8da654da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read pkt null @sdk_gatt_hlp.c(2721),ERROR" ID="0x8da6550a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind can't find server cbk by server hdl @sdk_gatt_hlp.c(2728),ERROR" ID="0x8da65542" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]write element @sdk_gatt_hlp.c(2765),INFO" ID="0x8da6566d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]read element @sdk_gatt_hlp.c(2769),INFO" ID="0x8da6568d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]write element free @sdk_gatt_hlp.c(2775),INFO" ID="0x8da656bd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att exchange mtu addr memcpy fail @sdk_gatt_hlp.c(581),ERROR" ID="0x8da6122a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[gatth_get_multiple_characteristics_value] rmt:0x%x mtu:0x%x @sdk_gatt_hlp.c(887),INFO" ID="0x8da61bbd" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[gatth_get_characteristics_by_uuid] start_handle:0x%x end_handle:0x%x @sdk_gatt_hlp.c(1020),INFO" ID="0x8da61fe5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk gatth get descriptor by handle arg-&gt;start_handle:0x%x arg-&gt;end_handle:0x%x @sdk_gatt_hlp.c(1063),INFO" ID="0x8da6213d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gatth_set_reliable_characteristic_value in @sdk_gatt_hlp.c(1108),INFO" ID="0x8da622a5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[gatth_set_characteristic_value] memcpy failed @sdk_gatt_hlp.c(1145),ERROR" ID="0x8da623ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic rmt is NULL @sdk_gatt_hlp.c(1178),ERROR" ID="0x8da624d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt_hlp.c(1186),ERROR" ID="0x8da62512" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic tl is NULL @sdk_gatt_hlp.c(1201),ERROR" ID="0x8da6258a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[SDK_GATT_HLP] HCI QOS state:%u @sdk_gatt_hlp.c(1550),ERROR" ID="0x8da63072" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[gatth_check_and_save_value] memcpy failed @sdk_gatt_hlp.c(1667),ERROR" ID="0x8da6341a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_execute_write_complete&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1764),ERROR" ID="0x8da63722" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_write_ind&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1908),ERROR" ID="0x8da63ba2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_write_ind&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1930),ERROR" ID="0x8da63c52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_send_response&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(2283),ERROR" ID="0x8da6475a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_notify_multiple_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(2516),ERROR" ID="0x8da64ea2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info mem new fail @sdk_gatt_hlp.c(2568),ERROR" ID="0x8da65042" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info service uuid memcpy fail @sdk_gatt_hlp.c(2578),ERROR" ID="0x8da65092" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info attribute uuid memcpy fail @sdk_gatt_hlp.c(2583),ERROR" ID="0x8da650ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info addr memcpy fail @sdk_gatt_hlp.c(2588),ERROR" ID="0x8da650e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info val memcpy fail @sdk_gatt_hlp.c(2593),ERROR" ID="0x8da6510a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind can't find service by service hdl @sdk_gatt_hlp.c(2639),ERROR" ID="0x8da6527a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write pkt null @sdk_gatt_hlp.c(2645),ERROR" ID="0x8da652aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind can't find server cbk by server hdl @sdk_gatt_hlp.c(2652),ERROR" ID="0x8da652e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info mem new fail @sdk_gatt_hlp.c(2684),ERROR" ID="0x8da653e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info service uuid memcpy fail @sdk_gatt_hlp.c(2695),ERROR" ID="0x8da6543a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info attribute uuid memcpy fail @sdk_gatt_hlp.c(2700),ERROR" ID="0x8da65462" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info addr memcpy fail @sdk_gatt_hlp.c(2705),ERROR" ID="0x8da6548a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info val memcpy fail @sdk_gatt_hlp.c(2711),ERROR" ID="0x8da654ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind can't find service by service hdl @sdk_gatt_hlp.c(2731),ERROR" ID="0x8da6555a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read pkt null @sdk_gatt_hlp.c(2737),ERROR" ID="0x8da6558a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind can't find server cbk by server hdl @sdk_gatt_hlp.c(2744),ERROR" ID="0x8da655c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]write element @sdk_gatt_hlp.c(2781),INFO" ID="0x8da656ed" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]read element @sdk_gatt_hlp.c(2785),INFO" ID="0x8da6570d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]write element free @sdk_gatt_hlp.c(2791),INFO" ID="0x8da6573d" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="[AVDTP][EVENT_CALLBACK] EVENT=%u @a2dp_ui_ram.c(199),INFO" ID="0x8ba2063d" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][CIS]cig_param is null @llc_cis.c(115),WARNING" ID="0x89d0039b" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[CIS]calc tx_latency result, tx_latency_m2s:%d, tx_latency_s2m:%d @llc_cis.c(179),INFO" ID="0x89d0059d" />
index 79aaed9..a75cd46 100755 (executable)
@@ -1,14 +1,24 @@
 <MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(75),ERROR" ID="0x8c4c025a" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT]UUID[0x%04x] start hdl[0x%x], end hdl[0x%x] @att_gatt.c(956),INFO" ID="0x8c4c1de5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1057),ERROR" ID="0x8c4c210a" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[ATT]UUID[0x%04x] hdl[0x%x], value hdl[0x%x], len[0x%x]  @att_gatt.c(1069),INFO" ID="0x8c4c216d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="properties[0x%x] @att_gatt.c(1070),INFO" ID="0x8c4c2175" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1128),ERROR" ID="0x8c4c2342" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT]UUID[0x%04x], hdl[0x%x], len[0x%x] @att_gatt.c(1137),INFO" ID="0x8c4c238d" />
-                       <MSG STRUCTURE="diag_log_msg5" NAME="GATT_Server_Create_UpdateCCC_Item, add item[hdl:%d] ccc onaddr:0x%02x:%02x:xx:xx:%02x:%02x @att_gatt.c(1351),INFO" ID="0x8c4c2a3d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1475),ERROR" ID="0x8c4c2e1a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s error @att_gatt.c(2327),ERROR" ID="0x8c4c48ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2573),ERROR" ID="0x8c4c506a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2601),ERROR" ID="0x8c4c514a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2606),ERROR" ID="0x8c4c5172" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[ATT_GATT] gatt tl done reason:%d occured:%d @att_gatt.c(320),ERROR" ID="0x8c4c0a02" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[ATT_GATT] gatt tl create require:%d addr:%02x******%02x%02x @att_gatt.c(414),ERROR" ID="0x8c4c0cf2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ATT_GATT]tl timeout evt:%d @att_gatt.c(667),ERROR" ID="0x8c4c14da" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[ATT_GATT] gatt tl disconnect require:%d addr:%02x******%02x%02x @att_gatt.c(844),ERROR" ID="0x8c4c1a62" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[ATT_GATT] gatt event cbk:%p evt:%d @att_gatt.c(871),ERROR" ID="0x8c4c1b3a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] gatt error cfm task:%d errcode:%d mask:%d @att_gatt.c(887),ERROR" ID="0x8c4c1bba" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT]UUID[0x%04x] start hdl[0x%x], end hdl[0x%x] @att_gatt.c(973),INFO" ID="0x8c4c1e6d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1074),ERROR" ID="0x8c4c2192" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[ATT]UUID[0x%04x] hdl[0x%x], value hdl[0x%x], len[0x%x]  @att_gatt.c(1086),INFO" ID="0x8c4c21f5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="properties[0x%x] @att_gatt.c(1087),INFO" ID="0x8c4c21fd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1145),ERROR" ID="0x8c4c23ca" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT]UUID[0x%04x], hdl[0x%x], len[0x%x] @att_gatt.c(1154),INFO" ID="0x8c4c2415" />
+                       <MSG STRUCTURE="diag_log_msg5" NAME="GATT_Server_Create_UpdateCCC_Item, add item[hdl:%d] ccc onaddr:0x%02x:%02x:xx:xx:%02x:%02x @att_gatt.c(1368),INFO" ID="0x8c4c2ac5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(1492),ERROR" ID="0x8c4c2ea2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ATT_GATT] create le connect mask:%d @att_gatt.c(1810),ERROR" ID="0x8c4c3892" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ATT_GATT] create br connect mask:%d @att_gatt.c(1819),ERROR" ID="0x8c4c38da" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] smp cfm mask:%d task_index:%d result:%d @att_gatt.c(1938),ERROR" ID="0x8c4c3c92" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] smp request mask:%d task_index:%d sec_mode:%d @att_gatt.c(1973),ERROR" ID="0x8c4c3daa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s error @att_gatt.c(2356),ERROR" ID="0x8c4c49a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2602),ERROR" ID="0x8c4c5152" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2630),ERROR" ID="0x8c4c5232" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ATT]memcpy_s&#160;error @att_gatt.c(2635),ERROR" ID="0x8c4c525a" />
                        </MSG_LOG>
\ No newline at end of file
index 7520b7a..0c2bfe4 100755 (executable)
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble disconnect error, the link does not exist. handle = %x @ble_core.c(950),ERROR" ID="0x8cc01db2" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="ble core: The number of links has reached the maximum. @ble_core.c(1002),INFO" ID="0x8cc01f55" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble state ind handle message is NULL @ble_core.c(1026),ERROR" ID="0x8cc02012" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: The number of links has reached the maximum. @ble_core.c(1035),INFO" ID="0x8cc0205d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: The number of links has reached the maximum. @ble_core.c(1035),ERROR" ID="0x8cc0205a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble state ind rmt is NULL @ble_core.c(1081),ERROR" ID="0x8cc021ca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble state ind memcpy rmt fail: %d @ble_core.c(1090),ERROR" ID="0x8cc02212" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble state ind malloc fail: %d @ble_core.c(1100),ERROR" ID="0x8cc02262" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: app ble smp key handle message is NULL @ble_core.c(1109),ERROR" ID="0x8cc022aa" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble state ind memcpy rmt fail: %d @ble_core.c(1154),ERROR" ID="0x8cc02412" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble log: AppBleConnResult msg_data is NULL @ble_core.c(1181),ERROR" ID="0x8cc024ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble log: AppBleConnResult link does not exist on handle:%x @ble_core.c(1188),ERROR" ID="0x8cc02522" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: conn update result fail = %d @ble_core.c(1208),WARNING" ID="0x8cc025c3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: Had Active Disconn,not to retry @ble_core.c(1333),INFO" ID="0x8cc029ad" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[ANCS]500ms comes! @ble_core.c(1365),INFO" ID="0x8cc02aad" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: unsupported msg_id: 0x%x @ble_core.c(1385),INFO" ID="0x8cc02b4d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: app ble init fail ret:%x @ble_core.c(1481),ERROR" ID="0x8cc02e4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble core connect proc cmds param NULL @ble_core.c(1515),ERROR" ID="0x8cc02f5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble core connect proc cmds pkt_ptr NULL @ble_core.c(1520),ERROR" ID="0x8cc02f82" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble state ind memcpy rmt fail: %d @ble_core.c(1088),ERROR" ID="0x8cc02202" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: app ble smp key handle message is NULL @ble_core.c(1102),ERROR" ID="0x8cc02272" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble state ind memcpy rmt fail: %d @ble_core.c(1147),ERROR" ID="0x8cc023da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble log: AppBleConnResult msg_data is NULL @ble_core.c(1174),ERROR" ID="0x8cc024b2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble log: AppBleConnResult link does not exist on handle:%x @ble_core.c(1181),ERROR" ID="0x8cc024ea" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: conn update result fail = %d @ble_core.c(1209),WARNING" ID="0x8cc025cb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: Had Active Disconn,not to retry @ble_core.c(1334),INFO" ID="0x8cc029b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[ANCS]500ms comes! @ble_core.c(1366),INFO" ID="0x8cc02ab5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: unsupported msg_id: 0x%x @ble_core.c(1386),INFO" ID="0x8cc02b55" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: app ble init fail ret:%x @ble_core.c(1482),ERROR" ID="0x8cc02e52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble core connect proc cmds param NULL @ble_core.c(1516),ERROR" ID="0x8cc02f62" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble core: ble core connect proc cmds pkt_ptr NULL @ble_core.c(1521),ERROR" ID="0x8cc02f8a" />
                        </MSG_LOG>
\ No newline at end of file
index f1f75bf..4a9232f 100755 (executable)
@@ -1,69 +1,67 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEvConnUpdate, ev NULL @ble_general.c(114),ERROR" ID="0x8dda0392" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : conn result status = 0x%02x @ble_general.c(122),INFO" ID="0x8dda03d5" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="ble general : handle&amp;interval&amp;latency&amp;timeout, 0x%04x &amp; 0x%04x &amp; 0x%04x &amp; 0x%04x @ble_general.c(125),INFO" ID="0x8dda03ed" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : memcpy conn para result fail: %d @ble_general.c(134),ERROR" ID="0x8dda0432" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : conn para result malloc fail: %d @ble_general.c(143),ERROR" ID="0x8dda047a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEvEncryptionChange, ev NULL @ble_general.c(153),ERROR" ID="0x8dda04ca" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general : ENCRYPTION, status&amp;handle&amp;result = 0x%02x &amp; 0x%04x &amp; 0x%02x @ble_general.c(164),INFO" ID="0x8dda0525" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEncryptionNegativeReply, ev NULL @ble_general.c(185),ERROR" ID="0x8dda05ca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : BLE GENERAL KEY MISS, handle = 0x%02x @ble_general.c(189),ERROR" ID="0x8dda05ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general pair cfm callback, result = 0x%04x @ble_general.c(202),INFO" ID="0x8dda0655" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy addr fail when pair cbk @ble_general.c(209),ERROR" ID="0x8dda068a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general start pair ble addr null @ble_general.c(226),ERROR" ID="0x8dda0712" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy addr fail when start pair @ble_general.c(232),ERROR" ID="0x8dda0742" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : set bondle fail = %d @ble_general.c(240),ERROR" ID="0x8dda0782" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general start ble pair addr type = %d @ble_general.c(246),INFO" ID="0x8dda07b5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update param is NULL @ble_general.c(262),ERROR" ID="0x8dda0832" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update in is NULL @ble_general.c(269),ERROR" ID="0x8dda086a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update, ble remote addr NULL @ble_general.c(275),ERROR" ID="0x8dda089a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update, memcpy fail @ble_general.c(282),ERROR" ID="0x8dda08d2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : ConnUpdate cap&amp;atype = 0x%02x &amp; 0x%02x @ble_general.c(295),INFO" ID="0x8dda093d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="ble general : min&amp;max&amp;latency&amp;timeout, 0x%04x &amp; 0x%04x &amp; 0x%04x &amp; 0x%04x @ble_general.c(298),INFO" ID="0x8dda0955" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general conn update fail: %d @ble_general.c(304),ERROR" ID="0x8dda0982" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general disconnect, bleRemoteAddr_cpy NULL @ble_general.c(322),ERROR" ID="0x8dda0a12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general disconnect, memcpy fail @ble_general.c(328),ERROR" ID="0x8dda0a42" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general connect memcpy fail @ble_general.c(349),ERROR" ID="0x8dda0aea" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general set sec params bondable &amp; io_capability 0x%02x%02x @ble_general.c(389),INFO" ID="0x8dda0c2d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params set bondable failed @ble_general.c(394),INFO" ID="0x8dda0c55" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params set io capability failed @ble_general.c(401),INFO" ID="0x8dda0c8d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params failed @ble_general.c(414),INFO" ID="0x8dda0cf5" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general set sec params ok! g_config_smp_lesc = %u, g_config_smp_mode = %u @ble_general.c(419),INFO" ID="0x8dda0d1d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general remove smp key addr NULL @ble_general.c(431),ERROR" ID="0x8dda0d7a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general remove smp key mamcpy fail @ble_general.c(444),ERROR" ID="0x8dda0de2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general remove smp key new fail %d @ble_general.c(450),ERROR" ID="0x8dda0e12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble notification param is NULL @ble_general.c(472),ERROR" ID="0x8dda0ec2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : notify len_cpy error: %d @ble_general.c(478),ERROR" ID="0x8dda0ef2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble start pair new in is NULL @ble_general.c(487),ERROR" ID="0x8dda0f3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy ble_value fail when notify @ble_general.c(494),ERROR" ID="0x8dda0f72" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memset addr error when notify @ble_general.c(505),ERROR" ID="0x8dda0fca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : sais service cb arg is NULL @ble_general.c(520),ERROR" ID="0x8dda1042" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : GattsSaisServiceCbk, event len = %d, %d @ble_general.c(527),INFO" ID="0x8dda107d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg sais service service is NULL @ble_general.c(569),ERROR" ID="0x8dda11ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg sais service character is NULL @ble_general.c(580),ERROR" ID="0x8dda1222" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : alipay service cb arg is NULL @ble_general.c(603),ERROR" ID="0x8dda12da" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general : GattsAlipayServiceCbk, uuid = 0x%x, event = %d, len = %d @ble_general.c(611),INFO" ID="0x8dda131d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : GattsAlipayServiceCbk, pend uuid = 0x%04x @ble_general.c(632),DBG" ID="0x8dda13c6" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg alipay service service is NULL @ble_general.c(661),ERROR" ID="0x8dda14aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg alipay service character is NULL @ble_general.c(672),ERROR" ID="0x8dda1502" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : BleGeneralGattCallback_arg NULL @ble_general.c(688),ERROR" ID="0x8dda1582" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[ANCS]Get Notification data, len=%d @ble_general.c(709),INFO" ID="0x8dda162d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : gap general conn cb para is NULL @ble_general.c(770),ERROR" ID="0x8dda1812" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : ble general connection event &amp; cap: 0x%02x, 0x%02x @ble_general.c(777),INFO" ID="0x8dda184d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : gap general smp succeed cb para is NULL @ble_general.c(813),ERROR" ID="0x8dda196a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : authentication failure cb para is NULL @ble_general.c(834),ERROR" ID="0x8dda1a12" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : BLE GENERAL SMP REQUEST FAIL, cap = 0x%02x status: %x @ble_general.c(841),ERROR" ID="0x8dda1a4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy addr fail when authentication @ble_general.c(849),ERROR" ID="0x8dda1a8a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : other branch @ble_general.c(867),INFO" ID="0x8dda1b1d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : gap cb event: 0x%02x @ble_general.c(902),INFO" ID="0x8dda1c35" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : batery service cb arg_cpy is NULL @ble_general.c(934),ERROR" ID="0x8dda1d32" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg battery service is NULL @ble_general.c(967),ERROR" ID="0x8dda1e3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg battery service character is NULL @ble_general.c(982),ERROR" ID="0x8dda1eb2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="unknown product type:%x @ble_general.c(1009),INFO" ID="0x8dda1f8d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="product type:%x @ble_general.c(1017),INFO" ID="0x8dda1fcd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : App_RecoverSMPKeys data_len err, %d @ble_general.c(1080),ERROR" ID="0x8dda21c2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : NEW key_list fail, %d @ble_general.c(1086),ERROR" ID="0x8dda21f2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : List NEW key fail, %d @ble_general.c(1101),ERROR" ID="0x8dda226a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : List NEW key fail, %d @ble_general.c(1109),ERROR" ID="0x8dda22aa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble init cBacks is NULL @ble_general.c(1132),ERROR" ID="0x8dda2362" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy cBacks fail when ble general ble init @ble_general.c(1139),ERROR" ID="0x8dda239a" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEvConnUpdate, ev NULL @ble_general.c(111),ERROR" ID="0x8dda037a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : conn result status = 0x%02x @ble_general.c(119),INFO" ID="0x8dda03bd" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="ble general : handle&amp;interval&amp;latency&amp;timeout, 0x%04x &amp; 0x%04x &amp; 0x%04x &amp; 0x%04x @ble_general.c(122),INFO" ID="0x8dda03d5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEvEncryptionChange, ev NULL @ble_general.c(139),ERROR" ID="0x8dda045a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general : ENCRYPTION, status&amp;handle&amp;result = 0x%02x &amp; 0x%04x &amp; 0x%02x @ble_general.c(150),INFO" ID="0x8dda04b5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : HciEncryptionNegativeReply, ev NULL @ble_general.c(168),ERROR" ID="0x8dda0542" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : BLE GENERAL KEY MISS, handle = 0x%02x @ble_general.c(172),ERROR" ID="0x8dda0562" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general pair cfm callback, result = 0x%04x @ble_general.c(181),INFO" ID="0x8dda05ad" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general start pair ble addr null @ble_general.c(195),ERROR" ID="0x8dda061a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy addr fail when start pair @ble_general.c(201),ERROR" ID="0x8dda064a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : set bondle fail = %d @ble_general.c(209),ERROR" ID="0x8dda068a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general start ble pair addr type = %d @ble_general.c(215),INFO" ID="0x8dda06bd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update param is NULL @ble_general.c(231),ERROR" ID="0x8dda073a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update in is NULL @ble_general.c(238),ERROR" ID="0x8dda0772" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update, ble remote addr NULL @ble_general.c(244),ERROR" ID="0x8dda07a2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general conn update, memcpy fail @ble_general.c(251),ERROR" ID="0x8dda07da" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : ConnUpdate cap&amp;atype = 0x%02x &amp; 0x%02x @ble_general.c(264),INFO" ID="0x8dda0845" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="ble general : min&amp;max&amp;latency&amp;timeout, 0x%04x &amp; 0x%04x &amp; 0x%04x &amp; 0x%04x @ble_general.c(267),INFO" ID="0x8dda085d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general conn update fail: %d @ble_general.c(273),ERROR" ID="0x8dda088a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general disconnect, bleRemoteAddr_cpy NULL @ble_general.c(291),ERROR" ID="0x8dda091a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general disconnect, memcpy fail @ble_general.c(297),ERROR" ID="0x8dda094a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general connect memcpy fail @ble_general.c(318),ERROR" ID="0x8dda09f2" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general set sec params bondable &amp; io_capability 0x%02x%02x @ble_general.c(358),INFO" ID="0x8dda0b35" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params set bondable failed @ble_general.c(363),INFO" ID="0x8dda0b5d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params set io capability failed @ble_general.c(370),INFO" ID="0x8dda0b95" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general set sec params failed @ble_general.c(383),INFO" ID="0x8dda0bfd" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general set sec params ok! g_config_smp_lesc = %u, g_config_smp_mode = %u @ble_general.c(388),INFO" ID="0x8dda0c25" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general remove smp key addr NULL @ble_general.c(400),ERROR" ID="0x8dda0c82" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general remove smp key mamcpy fail @ble_general.c(413),ERROR" ID="0x8dda0cea" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : ble general remove smp key new fail %d @ble_general.c(419),ERROR" ID="0x8dda0d1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble notification param is NULL @ble_general.c(441),ERROR" ID="0x8dda0dca" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : notify len_cpy error: %d @ble_general.c(447),ERROR" ID="0x8dda0dfa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble start pair new in is NULL @ble_general.c(456),ERROR" ID="0x8dda0e42" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy ble_value fail when notify @ble_general.c(463),ERROR" ID="0x8dda0e7a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memset addr error when notify @ble_general.c(474),ERROR" ID="0x8dda0ed2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : sais service cb arg is NULL @ble_general.c(489),ERROR" ID="0x8dda0f4a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : GattsSaisServiceCbk, event len = %d, %d @ble_general.c(496),INFO" ID="0x8dda0f85" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg sais service service is NULL @ble_general.c(538),ERROR" ID="0x8dda10d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg sais service character is NULL @ble_general.c(549),ERROR" ID="0x8dda112a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : alipay service cb arg is NULL @ble_general.c(572),ERROR" ID="0x8dda11e2" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="ble general : GattsAlipayServiceCbk, uuid = 0x%x, event = %d, len = %d @ble_general.c(580),INFO" ID="0x8dda1225" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : GattsAlipayServiceCbk, pend uuid = 0x%04x @ble_general.c(601),DBG" ID="0x8dda12ce" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg alipay service service is NULL @ble_general.c(630),ERROR" ID="0x8dda13b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg alipay service character is NULL @ble_general.c(641),ERROR" ID="0x8dda140a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : BleGeneralGattCallback_arg NULL @ble_general.c(657),ERROR" ID="0x8dda148a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[ANCS]Get Notification data, len=%d @ble_general.c(678),INFO" ID="0x8dda1535" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : gap general conn cb para is NULL @ble_general.c(739),ERROR" ID="0x8dda171a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : ble general connection event &amp; cap: 0x%02x, 0x%02x @ble_general.c(746),INFO" ID="0x8dda1755" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : gap general smp succeed cb para is NULL @ble_general.c(782),ERROR" ID="0x8dda1872" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : memcpy smp key store value fail: %d @ble_general.c(791),ERROR" ID="0x8dda18ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : authentication failure cb para is NULL @ble_general.c(801),ERROR" ID="0x8dda190a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ble general : BLE GENERAL SMP REQUEST FAIL, cap = 0x%02x status: %x @ble_general.c(808),ERROR" ID="0x8dda1942" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy addr fail when authentication @ble_general.c(815),ERROR" ID="0x8dda197a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : other branch @ble_general.c(831),INFO" ID="0x8dda19fd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : gap cb event: 0x%02x @ble_general.c(870),ERROR" ID="0x8dda1b32" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : batery service cb arg_cpy is NULL @ble_general.c(904),ERROR" ID="0x8dda1c42" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg battery service is NULL @ble_general.c(937),ERROR" ID="0x8dda1d4a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : reg battery service character is NULL @ble_general.c(952),ERROR" ID="0x8dda1dc2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="unknown product type:%x @ble_general.c(979),INFO" ID="0x8dda1e9d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="product type:%x @ble_general.c(987),INFO" ID="0x8dda1edd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : App_RecoverSMPKeys data_len err, %d @ble_general.c(1050),ERROR" ID="0x8dda20d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : NEW key_list fail, %d @ble_general.c(1056),ERROR" ID="0x8dda2102" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : List NEW key fail, %d @ble_general.c(1071),ERROR" ID="0x8dda217a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general : List NEW key fail, %d @ble_general.c(1079),ERROR" ID="0x8dda21ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : ble general ble init cBacks is NULL @ble_general.c(1102),ERROR" ID="0x8dda2272" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general : memcpy cBacks fail when ble general ble init @ble_general.c(1109),ERROR" ID="0x8dda22aa" />
                        </MSG_LOG>
\ No newline at end of file
index c808c18..a9b35a4 100755 (executable)
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble gatt client characteristic value callback memcpy fail: %d @ble_general_gatt.c(665),ERROR" ID="0x8de014ca" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="ble gatt client characteristic value callback memcpy fail: %d @ble_general_gatt.c(673),ERROR" ID="0x8de0150a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[BCore] gatt client write result can't find upper cbk. @ble_general_gatt.c(708),ERROR" ID="0x8de01622" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BCore] gatt client write result addr memcpy fail @ble_general_gatt.c(720),ERROR" ID="0x8de01682" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble gatt client call back func type=%d @ble_general_gatt.c(773),INFO" ID="0x8de0182d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery service not found:0x%x. @ble_general_gatt.c(804),WARNING" ID="0x8de01923" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery include service not found:0x%x. @ble_general_gatt.c(827),WARNING" ID="0x8de019db" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic new fail. @ble_general_gatt.c(843),ERROR" ID="0x8de01a5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic memset fail. @ble_general_gatt.c(848),ERROR" ID="0x8de01a82" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery characteristic not found:0x%x. @ble_general_gatt.c(865),WARNING" ID="0x8de01b0b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid new fail. @ble_general_gatt.c(883),ERROR" ID="0x8de01b9a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid memset fail. @ble_general_gatt.c(889),ERROR" ID="0x8de01bca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid memcpy fail. @ble_general_gatt.c(903),ERROR" ID="0x8de01c3a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery characteristic by uuid not found:0x%x. @ble_general_gatt.c(914),WARNING" ID="0x8de01c93" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor by handle new fail. @ble_general_gatt.c(930),ERROR" ID="0x8de01d12" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor by handle not found:0x%x. @ble_general_gatt.c(944),WARNING" ID="0x8de01d83" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor new fail. @ble_general_gatt.c(964),ERROR" ID="0x8de01e22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor memset fail. @ble_general_gatt.c(969),ERROR" ID="0x8de01e4a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor memcpy fail. @ble_general_gatt.c(975),ERROR" ID="0x8de01e7a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor not found:0x%x. @ble_general_gatt.c(986),WARNING" ID="0x8de01ed3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gatt read characteristic value respon new fail. @ble_general_gatt.c(1007),ERROR" ID="0x8de01f7a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read characteristic value respon memcpy fail: %d @ble_general_gatt.c(1014),ERROR" ID="0x8de01fb2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read characteristic value respon memcpy fail: %d @ble_general_gatt.c(1024),ERROR" ID="0x8de02002" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic value new fail. @ble_general_gatt.c(1047),ERROR" ID="0x8de020ba" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read descriptor value error:0x%x. @ble_general_gatt.c(1061),ERROR" ID="0x8de0212a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid new fail. @ble_general_gatt.c(1079),ERROR" ID="0x8de021ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid memcpy fail. @ble_general_gatt.c(1092),ERROR" ID="0x8de02222" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid memcpy fail. @ble_general_gatt.c(1099),ERROR" ID="0x8de0225a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read characteristic by uuid error:0x%x. @ble_general_gatt.c(1106),WARNING" ID="0x8de02293" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read multiple characteristic new fail. @ble_general_gatt.c(1124),ERROR" ID="0x8de02322" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read multiple characteristic memset fail. @ble_general_gatt.c(1131),ERROR" ID="0x8de0235a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read multiple characteristic error:0x%x. @ble_general_gatt.c(1147),WARNING" ID="0x8de023db" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read multiple characteristic error:0x%x. @ble_general_gatt.c(1177),WARNING" ID="0x8de024cb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic value memcpy failed @ble_general_gatt.c(1229),ERROR" ID="0x8de0266a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic value param is NULL @ble_general_gatt.c(1252),ERROR" ID="0x8de02722" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write characteristic value malloc fail, size:0x%x. @ble_general_gatt.c(1265),ERROR" ID="0x8de0278a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble general gatt write characteristic value memcpy fail: %d @ble_general_gatt.c(1275),ERROR" ID="0x8de027da" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write characteristic value fail:0x%x. @ble_general_gatt.c(1289),WARNING" ID="0x8de0284b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt reliable write characteristic value param is NULL @ble_general_gatt.c(1308),ERROR" ID="0x8de028e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt reliable write characteristic value malloc fail @ble_general_gatt.c(1315),ERROR" ID="0x8de0291a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BCore] ble general gatt reliable write characteristic value memcpy fail @ble_general_gatt.c(1324),ERROR" ID="0x8de02962" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt reliable write characteristic value fail:0x%x. @ble_general_gatt.c(1343),WARNING" ID="0x8de029fb" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write descriptor value malloc faile, size:0x%x. @ble_general_gatt.c(1360),ERROR" ID="0x8de02a82" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble general gatt write descriptor value memcpy fail: %d @ble_general_gatt.c(1369),ERROR" ID="0x8de02aca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor error:0x%x. @ble_general_gatt.c(1379),ERROR" ID="0x8de02b1a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read descriptor value response memcpy fail: %d @ble_general_gatt.c(1401),ERROR" ID="0x8de02bca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read descriptor value response memcpy fail: %d @ble_general_gatt.c(1409),ERROR" ID="0x8de02c0a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read descriptor value error:0x%x. @ble_general_gatt.c(1438),ERROR" ID="0x8de02cf2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt mtu config error:0x%x. @ble_general_gatt.c(1453),ERROR" ID="0x8de02d6a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt set gap ui attributes error:0x%x. @ble_general_gatt.c(1466),ERROR" ID="0x8de02dd2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt get gap ui attributes error:0x%x. @ble_general_gatt.c(1485),ERROR" ID="0x8de02e6a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="bt mpc adapter gatt get hid report callback new fail @ble_general_gatt.c(1515),ERROR" ID="0x8de02f5a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report callback error_code = %x @ble_general_gatt.c(1526),INFO" ID="0x8de02fb5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble gatt client call back func type=%d @ble_general_gatt.c(771),INFO" ID="0x8de0181d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery service not found:0x%x. @ble_general_gatt.c(802),WARNING" ID="0x8de01913" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery include service not found:0x%x. @ble_general_gatt.c(825),WARNING" ID="0x8de019cb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic new fail. @ble_general_gatt.c(841),ERROR" ID="0x8de01a4a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic memset fail. @ble_general_gatt.c(846),ERROR" ID="0x8de01a72" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery characteristic not found:0x%x. @ble_general_gatt.c(863),WARNING" ID="0x8de01afb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid new fail. @ble_general_gatt.c(881),ERROR" ID="0x8de01b8a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid memset fail. @ble_general_gatt.c(887),ERROR" ID="0x8de01bba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery characteristic by uuid memcpy fail. @ble_general_gatt.c(901),ERROR" ID="0x8de01c2a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery characteristic by uuid not found:0x%x. @ble_general_gatt.c(912),WARNING" ID="0x8de01c83" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor by handle new fail. @ble_general_gatt.c(928),ERROR" ID="0x8de01d02" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor by handle not found:0x%x. @ble_general_gatt.c(942),WARNING" ID="0x8de01d73" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor new fail. @ble_general_gatt.c(962),ERROR" ID="0x8de01e12" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor memset fail. @ble_general_gatt.c(967),ERROR" ID="0x8de01e3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt discovery descriptor memcpy fail. @ble_general_gatt.c(973),ERROR" ID="0x8de01e6a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor not found:0x%x. @ble_general_gatt.c(984),WARNING" ID="0x8de01ec3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble gatt read characteristic value respon new fail. @ble_general_gatt.c(1005),ERROR" ID="0x8de01f6a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read characteristic value respon memcpy fail: %d @ble_general_gatt.c(1012),ERROR" ID="0x8de01fa2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read characteristic value respon memcpy fail: %d @ble_general_gatt.c(1022),ERROR" ID="0x8de01ff2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic value new fail. @ble_general_gatt.c(1045),ERROR" ID="0x8de020aa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read descriptor value error:0x%x. @ble_general_gatt.c(1059),ERROR" ID="0x8de0211a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid new fail. @ble_general_gatt.c(1077),ERROR" ID="0x8de021aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid memcpy fail. @ble_general_gatt.c(1090),ERROR" ID="0x8de02212" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read characteristic by uuid memcpy fail. @ble_general_gatt.c(1097),ERROR" ID="0x8de0224a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read characteristic by uuid error:0x%x. @ble_general_gatt.c(1104),WARNING" ID="0x8de02283" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read multiple characteristic new fail. @ble_general_gatt.c(1122),ERROR" ID="0x8de02312" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt read multiple characteristic memset fail. @ble_general_gatt.c(1129),ERROR" ID="0x8de0234a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read multiple characteristic error:0x%x. @ble_general_gatt.c(1145),WARNING" ID="0x8de023cb" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read multiple characteristic error:0x%x. @ble_general_gatt.c(1175),WARNING" ID="0x8de024bb" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic value memcpy failed @ble_general_gatt.c(1227),ERROR" ID="0x8de0265a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic value param is NULL @ble_general_gatt.c(1250),ERROR" ID="0x8de02712" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write characteristic value malloc fail, size:0x%x. @ble_general_gatt.c(1263),ERROR" ID="0x8de0277a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble general gatt write characteristic value memcpy fail: %d @ble_general_gatt.c(1273),ERROR" ID="0x8de027ca" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write characteristic value fail:0x%x. @ble_general_gatt.c(1287),WARNING" ID="0x8de0283b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt reliable write characteristic value param is NULL @ble_general_gatt.c(1306),ERROR" ID="0x8de028d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt reliable write characteristic value malloc fail @ble_general_gatt.c(1313),ERROR" ID="0x8de0290a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BCore] ble general gatt reliable write characteristic value memcpy fail @ble_general_gatt.c(1322),ERROR" ID="0x8de02952" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt reliable write characteristic value fail:0x%x. @ble_general_gatt.c(1341),WARNING" ID="0x8de029eb" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt write descriptor value malloc faile, size:0x%x. @ble_general_gatt.c(1358),ERROR" ID="0x8de02a72" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble general gatt write descriptor value memcpy fail: %d @ble_general_gatt.c(1367),ERROR" ID="0x8de02aba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt discovery descriptor error:0x%x. @ble_general_gatt.c(1377),ERROR" ID="0x8de02b0a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read descriptor value response memcpy fail: %d @ble_general_gatt.c(1399),ERROR" ID="0x8de02bba" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BCore] ble gatt read descriptor value response memcpy fail: %d @ble_general_gatt.c(1407),ERROR" ID="0x8de02bfa" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt read descriptor value error:0x%x. @ble_general_gatt.c(1436),ERROR" ID="0x8de02ce2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt mtu config error:0x%x. @ble_general_gatt.c(1451),ERROR" ID="0x8de02d5a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt set gap ui attributes error:0x%x. @ble_general_gatt.c(1464),ERROR" ID="0x8de02dc2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble general gatt get gap ui attributes error:0x%x. @ble_general_gatt.c(1483),ERROR" ID="0x8de02e5a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="bt mpc adapter gatt get hid report callback new fail @ble_general_gatt.c(1513),ERROR" ID="0x8de02f4a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report callback error_code = %x @ble_general_gatt.c(1524),INFO" ID="0x8de02fa5" />
                        </MSG_LOG>
\ No newline at end of file
index e38f9ce..6c194ad 100755 (executable)
@@ -1,33 +1,33 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg2" NAME="stack gap set discovery mode result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(75),INFO" ID="0x8c9e025d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap get discovery mode result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(89),INFO" ID="0x8c9e02cd" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap stop discovery result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(99),INFO" ID="0x8c9e031d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap create acl result = 0x%x, dev_hdl = 0x%x, link type = %d  @bt_ahi_gap.c(113),INFO" ID="0x8c9e038d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(126),ERROR" ID="0x8c9e03f2" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap create acl cfm cbk result = 0x%x, acl_hdl = 0x%x, link type = %d  @bt_ahi_gap.c(131),INFO" ID="0x8c9e041d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap create acla result = 0x%x @bt_ahi_gap.c(140),INFO" ID="0x8c9e0465" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap reconnect phone result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(151),INFO" ID="0x8c9e04bd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap get rmt dev handle result = 0x%x @bt_ahi_gap.c(163),INFO" ID="0x8c9e051d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap device is connected result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(175),INFO" ID="0x8c9e057d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk disconnect acl by handle result = 0x%x @bt_ahi_gap.c(186),INFO" ID="0x8c9e05d5" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap pair device result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(198),INFO" ID="0x8c9e0635" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap add rmt device rsp.result = %x @bt_ahi_gap.c(215),INFO" ID="0x8c9e06bd" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap update rmt device name result = 0x%x, name = %s  @bt_ahi_gap.c(235),INFO" ID="0x8c9e075d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(249),ERROR" ID="0x8c9e07ca" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap update rmt device name cfm cbk result = 0x%x, opindex = 0x%x, size = %d  @bt_ahi_gap.c(257),INFO" ID="0x8c9e080d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap update rmt device name async result = 0x%x @bt_ahi_gap.c(267),INFO" ID="0x8c9e085d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap get local name result = 0x%x, length = %d, name = %s  @bt_ahi_gap.c(303),INFO" ID="0x8c9e097d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="stack gap get rmt dev addr result = 0x%x, addr[%02x:**:**:**:%02x:%02x] @bt_ahi_gap.c(328),INFO" ID="0x8c9e0a45" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap browse rmt service overflow, max_count = %d, svc_count = %d @bt_ahi_gap.c(350),ERROR" ID="0x8c9e0af2" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap browse rmt service result = 0x%x, svc_count = %d, svc_hdl[0] = 0x%x @bt_ahi_gap.c(356),INFO" ID="0x8c9e0b25" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp enable sco:scohdl=0x%x inid=0x%x outid=0x%x @bt_ahi_gap.c(377),INFO" ID="0x8c9e0bcd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="hfp disable sco:scohdl=0x%x @bt_ahi_gap.c(381),INFO" ID="0x8c9e0bed" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="result = 0x%x, handle = 0x%x, service_class = %02x  @bt_ahi_gap.c(414),INFO" ID="0x8c9e0cf5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap init, res = 0x%x  @bt_ahi_gap.c(425),INFO" ID="0x8c9e0d4d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="set bt tx power, hdl=0x%x, power=%d, ret=0x%x @bt_ahi_gap.c(438),INFO" ID="0x8c9e0db5" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="br gap read rssi, hdl=0x%x, rssi=%d, ret=0x%x @bt_ahi_gap.c(446),INFO" ID="0x8c9e0df5" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="set active scene scene = %d, bitrate = %d, delay = %d, ret=0x%x @bt_ahi_gap.c(462),INFO" ID="0x8c9e0e75" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="set inquiry scan param interval = %d, window = %d @bt_ahi_gap.c(470),INFO" ID="0x8c9e0eb5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(481),ERROR" ID="0x8c9e0f0a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap restore rmt device rsp.result = %x @bt_ahi_gap.c(485),INFO" ID="0x8c9e0f2d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="br gap get link mode, hdl=0x%x, mode=%d, ret=0x%x @bt_ahi_gap.c(494),INFO" ID="0x8c9e0f75" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg2" NAME="stack gap set discovery mode result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(82),INFO" ID="0x8c9e0295" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap get discovery mode result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(96),INFO" ID="0x8c9e0305" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap stop discovery result = 0x%x, mode = 0x%x  @bt_ahi_gap.c(106),INFO" ID="0x8c9e0355" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap create acl result = 0x%x, dev_hdl = 0x%x, link type = %d  @bt_ahi_gap.c(120),INFO" ID="0x8c9e03c5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(133),ERROR" ID="0x8c9e042a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap create acl cfm cbk result = 0x%x, acl_hdl = 0x%x, link type = %d  @bt_ahi_gap.c(138),INFO" ID="0x8c9e0455" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap create acla result = 0x%x @bt_ahi_gap.c(147),INFO" ID="0x8c9e049d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap reconnect phone result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(158),INFO" ID="0x8c9e04f5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap get rmt dev handle result = 0x%x @bt_ahi_gap.c(170),INFO" ID="0x8c9e0555" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap device is connected result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(182),INFO" ID="0x8c9e05b5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="btsdk disconnect acl by handle result = 0x%x @bt_ahi_gap.c(193),INFO" ID="0x8c9e060d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap pair device result = 0x%x, dev_hdl = 0x%x  @bt_ahi_gap.c(205),INFO" ID="0x8c9e066d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap add rmt device rsp.result = %x @bt_ahi_gap.c(222),INFO" ID="0x8c9e06f5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap update rmt device name result = 0x%x, name = %s  @bt_ahi_gap.c(242),INFO" ID="0x8c9e0795" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(256),ERROR" ID="0x8c9e0802" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap update rmt device name cfm cbk result = 0x%x, opindex = 0x%x, size = %d  @bt_ahi_gap.c(264),INFO" ID="0x8c9e0845" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap update rmt device name async result = 0x%x @bt_ahi_gap.c(274),INFO" ID="0x8c9e0895" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap get local name result = 0x%x, length = %d, name = %s  @bt_ahi_gap.c(310),INFO" ID="0x8c9e09b5" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="stack gap get rmt dev addr result = 0x%x, addr[%02x:**:**:**:%02x:%02x] @bt_ahi_gap.c(335),INFO" ID="0x8c9e0a7d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="stack gap browse rmt service overflow, max_count = %d, svc_count = %d @bt_ahi_gap.c(357),ERROR" ID="0x8c9e0b2a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="stack gap browse rmt service result = 0x%x, svc_count = %d, svc_hdl[0] = 0x%x @bt_ahi_gap.c(363),INFO" ID="0x8c9e0b5d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp enable sco:scohdl=0x%x inid=0x%x outid=0x%x @bt_ahi_gap.c(384),INFO" ID="0x8c9e0c05" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="hfp disable sco:scohdl=0x%x @bt_ahi_gap.c(388),INFO" ID="0x8c9e0c25" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="result = 0x%x, handle = 0x%x, service_class = %02x  @bt_ahi_gap.c(421),INFO" ID="0x8c9e0d2d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap init, res = 0x%x  @bt_ahi_gap.c(432),INFO" ID="0x8c9e0d85" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="set bt tx power, hdl=0x%x, power=%d, ret=0x%x @bt_ahi_gap.c(445),INFO" ID="0x8c9e0ded" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="br gap read rssi, hdl=0x%x, rssi=%d, ret=0x%x @bt_ahi_gap.c(453),INFO" ID="0x8c9e0e2d" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="set active scene scene = %d, bitrate = %d, delay = %d, ret=0x%x @bt_ahi_gap.c(469),INFO" ID="0x8c9e0ead" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="set inquiry scan param interval = %d, window = %d @bt_ahi_gap.c(477),INFO" ID="0x8c9e0eed" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="memory copy failed @bt_ahi_gap.c(488),ERROR" ID="0x8c9e0f42" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="stack gap restore rmt device rsp.result = %x @bt_ahi_gap.c(492),INFO" ID="0x8c9e0f65" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="br gap get link mode, hdl=0x%x, mode=%d, ret=0x%x @bt_ahi_gap.c(501),INFO" ID="0x8c9e0fad" />
                        </MSG_LOG>
\ No newline at end of file
index 4023826..bbe9874 100755 (executable)
@@ -1,8 +1,8 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg2" NAME="bt_init start... em start addr is 0x%x,em_size is 0x%x @bt_main.c(445),INFO" ID="0x89220ded" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]bt init pmu state change fail @bt_main.c(449),ERROR" ID="0x89220e0a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]bt_hal_phy_init started... @bt_main.c(469),INFO" ID="0x89220ead" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]init_sleep started... @bt_main.c(474),INFO" ID="0x89220ed5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]intc_init started... @bt_main.c(477),INFO" ID="0x89220eed" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]bt param config started... @bt_main.c(480),INFO" ID="0x89220f05" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]bt init end pmu state change fail @bt_main.c(501),ERROR" ID="0x89220faa" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg2" NAME="bt_init start... em start addr is 0x%x,em_size is 0x%x @bt_main.c(446),INFO" ID="0x89220df5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]bt init pmu state change fail @bt_main.c(450),ERROR" ID="0x89220e12" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]bt_hal_phy_init started... @bt_main.c(470),INFO" ID="0x89220eb5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]init_sleep started... @bt_main.c(475),INFO" ID="0x89220edd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]intc_init started... @bt_main.c(478),INFO" ID="0x89220ef5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][BT]bt param config started... @bt_main.c(481),INFO" ID="0x89220f0d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]bt init end pmu state change fail @bt_main.c(502),ERROR" ID="0x89220fb2" />
                        </MSG_LOG>
\ No newline at end of file
index 6d82518..b4a447d 100755 (executable)
                        <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt reliable write characteristic value req interface fail, ret%d @bt_mpc_adpt_gatt.c(576),WARNING" ID="0x8dd61203" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt write descriptor req param len error, len = %u @bt_mpc_adpt_gatt.c(587),ERROR" ID="0x8dd6125a" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt write descriptor req interface fail, ret%d @bt_mpc_adpt_gatt.c(594),WARNING" ID="0x8dd61293" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble notify att read data memcpy error! error_code = %x @bt_mpc_adpt_gatt.c(625),INFO" ID="0x8dd6138d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble notify att read addr memcpy error! error_code = %x @bt_mpc_adpt_gatt.c(632),INFO" ID="0x8dd613c5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu config req param len error, len = %u @bt_mpc_adpt_gatt.c(653),ERROR" ID="0x8dd6146a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu config req interface fail, ret%d @bt_mpc_adpt_gatt.c(660),WARNING" ID="0x8dd614a3" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report map req param len error, len = %u @bt_mpc_adpt_gatt.c(672),ERROR" ID="0x8dd61502" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report map req interface fail, ret%d @bt_mpc_adpt_gatt.c(679),WARNING" ID="0x8dd6153b" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt read descriptor req param len error, len = %u @bt_mpc_adpt_gatt.c(732),WARNING" ID="0x8dd616e3" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt read descriptor req param fail, ret%d @bt_mpc_adpt_gatt.c(738),WARNING" ID="0x8dd61713" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu set req param len error, len = %u @bt_mpc_adpt_gatt.c(750),ERROR" ID="0x8dd61772" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu set req interface fail, ret%d @bt_mpc_adpt_gatt.c(757),WARNING" ID="0x8dd617ab" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble notify att read addr memcpy error! error_code = %x @bt_mpc_adpt_gatt.c(617),ERROR" ID="0x8dd6134a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble notify att read data memcpy error! error_code = %x @bt_mpc_adpt_gatt.c(642),INFO" ID="0x8dd61415" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ble core: ble notify att read addr memcpy error! error_code = %x @bt_mpc_adpt_gatt.c(649),INFO" ID="0x8dd6144d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu config req param len error, len = %u @bt_mpc_adpt_gatt.c(670),ERROR" ID="0x8dd614f2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu config req interface fail, ret%d @bt_mpc_adpt_gatt.c(677),WARNING" ID="0x8dd6152b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report map req param len error, len = %u @bt_mpc_adpt_gatt.c(689),ERROR" ID="0x8dd6158a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt get hid report map req interface fail, ret%d @bt_mpc_adpt_gatt.c(696),WARNING" ID="0x8dd615c3" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt read descriptor req param len error, len = %u @bt_mpc_adpt_gatt.c(753),WARNING" ID="0x8dd6178b" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt read descriptor req param fail, ret%d @bt_mpc_adpt_gatt.c(759),WARNING" ID="0x8dd617bb" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu set req param len error, len = %u @bt_mpc_adpt_gatt.c(771),ERROR" ID="0x8dd6181a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt mpc adapter gatt mtu set req interface fail, ret%d @bt_mpc_adpt_gatt.c(778),WARNING" ID="0x8dd61853" />
                        </MSG_LOG>
\ No newline at end of file
index 1d99442..8c40a46 100755 (executable)
@@ -1,14 +1,14 @@
 <MSG_LOG><MSG STRUCTURE="diag_log_msg2" NAME="[PMU][ERROR]Wakeup isr come more than once, sleep_int_id:%d, wakeup_int_id:%d @bt_sleep.c(139),WARNING" ID="0x88f0045b" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]wakeup pmu state change fail @bt_sleep.c(147),ERROR" ID="0x88f0049a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="g_clock_32k_100x = %d @bt_sleep.c(177),INFO" ID="0x88f0058d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]bt_program_sleep clk(%d)dur(%d)glbcnt(0x%x) @bt_sleep.c(222),INFO" ID="0x88f006f5" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[ERROR][SLEEP]wakeup_end clk(%d) sleep_time(%d) sleep_dur(%d) @bt_sleep.c(265),ERROR" ID="0x88f0084a" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]wakeup_end clk(%d) fincnt(%d)glbcnt(0x%x) @bt_sleep.c(269),INFO" ID="0x88f0086d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]btc sleep pmu state change fail @bt_sleep.c(311),ERROR" ID="0x88f009ba" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[PMU][WARNING]Set osc_en down more than once, sleep_int_id:%d, wakeup_int_id:%d @bt_sleep.c(320),WARNING" ID="0x88f00a03" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]sleep time is too short! @bt_sleep.c(370),WARNING" ID="0x88f00b93" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][SLEEP]osc_en wakeup isr error! @bt_sleep.c(374),ERROR" ID="0x88f00bb2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]extern wakeup pmu state change fail @bt_sleep.c(390),ERROR" ID="0x88f00c32" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]extern wakeup btc clk(%d)slp_dur_slot(%d)glbcnt(%d) @bt_sleep.c(396),INFO" ID="0x88f00c65" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="g_dfx_time:%d @bt_sleep.c(416),INFO" ID="0x88f00d05" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="g_clock_32k_100x = %d @bt_sleep.c(178),INFO" ID="0x88f00595" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]bt_program_sleep clk(%d)dur(%d)glbcnt(0x%x) @bt_sleep.c(224),INFO" ID="0x88f00705" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ERROR][SLEEP]wakeup_end clk(%d) sleep_time(%d) sleep_dur(%d) @bt_sleep.c(267),ERROR" ID="0x88f0085a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]wakeup_end clk(%d) fincnt(%d)glbcnt(0x%x) @bt_sleep.c(271),INFO" ID="0x88f0087d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]btc sleep pmu state change fail @bt_sleep.c(313),ERROR" ID="0x88f009ca" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[PMU][WARNING]Set osc_en down more than once, sleep_int_id:%d, wakeup_int_id:%d @bt_sleep.c(322),WARNING" ID="0x88f00a13" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]sleep time is too short! @bt_sleep.c(372),WARNING" ID="0x88f00ba3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][SLEEP]osc_en wakeup isr error! @bt_sleep.c(376),ERROR" ID="0x88f00bc2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[PMU][ERROR]extern wakeup pmu state change fail @bt_sleep.c(392),ERROR" ID="0x88f00c42" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][SLEEP]extern wakeup btc clk(%d)slp_dur_slot(%d)glbcnt(%d) @bt_sleep.c(398),INFO" ID="0x88f00c75" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="g_dfx_time:%d @bt_sleep.c(418),INFO" ID="0x88f00d15" />
                        </MSG_LOG>
\ No newline at end of file
index b6a0dc1..45cfe4c 100755 (executable)
@@ -1,27 +1,29 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[ERROR]p_data is null @bt_tran_task.c(56),ERROR" ID="0x8c9401c2" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:route data:TID&amp;SOF&amp;SID&amp;CID, LEN = 0x%04X%04X, %d @bt_tran_task.c(86),WARNING" ID="0x8c9402b3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="Error route_id! @bt_tran_task.c(98),ERROR" ID="0x8c940312" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:route data:TID&amp;SOF&amp;SID&amp;CID, LEN = 0x%04X%04X, %d @bt_tran_task.c(118),WARNING" ID="0x8c9403b3" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:data:TID&amp;SOF&amp;SID&amp;CID:0x%04X%04X,LEN:%d @bt_tran_task.c(121),WARNING" ID="0x8c9403cb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="INVALID DATA! @bt_tran_task.c(157),ERROR" ID="0x8c9404ea" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="BT_TRAN: TXMCU:ipc send data = %d @bt_tran_task.c(185),ERROR" ID="0x8c9405ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="UNKNOW CORE! @bt_tran_task.c(195),ERROR" ID="0x8c94061a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task framek free property allow_free= %d @bt_tran_task.c(235),INFO" ID="0x8c94075d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="pst_property-&gt;en_id = 0x%x @bt_tran_task.c(253),INFO" ID="0x8c9407ed" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="BT_TRAN: data ERROR data_len:%d @bt_tran_task.c(311),WARNING" ID="0x8c9409bb" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="BT_TRAN: data ERROR data:0x%08x, 0x%08x @bt_tran_task.c(315),WARNING" ID="0x8c9409db" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="rec mcu error data,tid:0x%x,sof:0x%x,len:0x%04x,opcode:0x%04x @bt_tran_task.c(324),ERROR" ID="0x8c940a22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="hci qos buf overflow. @bt_tran_task.c(349),ERROR" ID="0x8c940aea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble fsm buf overflow. @bt_tran_task.c(354),ERROR" ID="0x8c940b12" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="rec data malloc fail opcode:0x%04x,length:(0x%04x) @bt_tran_task.c(363),ERROR" ID="0x8c940b5a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="rec data memcpy fail opcode:0x%04x,length:(0x%04x) @bt_tran_task.c(369),ERROR" ID="0x8c940b8a" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="rec mcu write property fail,tid:0x%x,sof:0x%x,len:0x%04x,opcode:0x%04x @bt_tran_task.c(379),ERROR" ID="0x8c940bda" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data data len err = %d @bt_tran_task.c(409),ERROR" ID="0x8c940cca" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data data len err = %d @bt_tran_task.c(419),ERROR" ID="0x8c940d1a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data from M7 error = %d @bt_tran_task.c(423),ERROR" ID="0x8c940d3a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ipc data from unknow core @bt_tran_task.c(435),ERROR" ID="0x8c940d9a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task handler osMessageQueueGet fail ret:(%x) @bt_tran_task.c(461),ERROR" ID="0x8c940e6a" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task framek write property en_id = 0x%x @bt_tran_task.c(485),INFO" ID="0x8c940f2d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="write Property fail id:0x%x, ret:0x%x @bt_tran_task.c(493),ERROR" ID="0x8c940f6a" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="bt tran task framek write property fail en_id:%d,ret:%x @bt_tran_task.c(502),ERROR" ID="0x8c940fb2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[ERROR]p_data is null @bt_tran_task.c(85),ERROR" ID="0x8c9402aa" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:route data:TID&amp;SOF&amp;SID&amp;CID, LEN = 0x%04X%04X, %d @bt_tran_task.c(115),ERROR" ID="0x8c94039a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="Error route_id! @bt_tran_task.c(127),ERROR" ID="0x8c9403fa" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:route data:TID&amp;SOF&amp;SID&amp;CID, LEN = 0x%04X%04X, %d @bt_tran_task.c(147),ERROR" ID="0x8c94049a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="BT_TRAN:data:TID&amp;SOF&amp;SID&amp;CID:0x%04X%04X,LEN:%d @bt_tran_task.c(150),ERROR" ID="0x8c9404b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="INVALID DATA! @bt_tran_task.c(186),ERROR" ID="0x8c9405d2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="BT_TRAN: TXMCU:ipc send data = %d @bt_tran_task.c(214),ERROR" ID="0x8c9406b2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="UNKNOW CORE! @bt_tran_task.c(224),ERROR" ID="0x8c940702" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task framek free property allow_free= %d @bt_tran_task.c(264),INFO" ID="0x8c940845" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="pst_property-&gt;en_id = 0x%x @bt_tran_task.c(282),INFO" ID="0x8c9408d5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ipc buf release number:%u %u. @bt_tran_task.c(330),ERROR" ID="0x8c940a52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="hci qos buf overflow. @bt_tran_task.c(356),ERROR" ID="0x8c940b22" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble fsm buf overflow. @bt_tran_task.c(362),ERROR" ID="0x8c940b52" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="ipc buf warning number:%u %u. @bt_tran_task.c(370),ERROR" ID="0x8c940b92" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="BT_TRAN: data ERROR data_len:%d @bt_tran_task.c(389),WARNING" ID="0x8c940c2b" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="BT_TRAN: data ERROR data:0x%08x, 0x%08x @bt_tran_task.c(393),WARNING" ID="0x8c940c4b" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="rec mcu error data,tid:0x%x,sof:0x%x,len:0x%04x,opcode:0x%04x @bt_tran_task.c(402),ERROR" ID="0x8c940c92" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="rec data malloc fail opcode:0x%04x,length:(0x%04x) @bt_tran_task.c(420),ERROR" ID="0x8c940d22" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="rec data memcpy fail opcode:0x%04x,length:(0x%04x) @bt_tran_task.c(426),ERROR" ID="0x8c940d52" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="rec mcu write property fail,tid:0x%x,sof:0x%x,len:0x%04x,opcode:0x%04x @bt_tran_task.c(436),ERROR" ID="0x8c940da2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data data len err = %d @bt_tran_task.c(473),ERROR" ID="0x8c940eca" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data data len err = %d @bt_tran_task.c(483),ERROR" ID="0x8c940f1a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="ipc data from M7 error = %d @bt_tran_task.c(487),ERROR" ID="0x8c940f3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ipc data from unknow core @bt_tran_task.c(499),ERROR" ID="0x8c940f9a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task handler osMessageQueueGet fail ret:(%x) @bt_tran_task.c(525),ERROR" ID="0x8c94106a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="bt tran task framek write property en_id = 0x%x @bt_tran_task.c(549),INFO" ID="0x8c94112d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="write Property fail id:0x%x, ret:0x%x @bt_tran_task.c(557),ERROR" ID="0x8c94116a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="bt tran task framek write property fail en_id:%d,ret:%x @bt_tran_task.c(566),ERROR" ID="0x8c9411b2" />
                        </MSG_LOG>
\ No newline at end of file
index cec3cd9..62c052b 100755 (executable)
@@ -1,6 +1,8 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg2" NAME="[TIMRE_ADD][STACK_TIMER] TIMER=0x%x, TIME=%u @fsm.c(669),INFO" ID="0x8b5814ed" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_EXPIR]timeout timer err! @fsm.c(767),ERROR" ID="0x8b5817fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_EXPIR]timeout but no right timer! @fsm.c(797),WARNING" ID="0x8b5818eb" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[timer_expire_in_sch_lite]timer has been free; not need free! @fsm.c(813),WARNING" ID="0x8b58196b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_DEL][STACK_TIMER] in_ft is NULL! @fsm.c(938),INFO" ID="0x8b581d55" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="[FSM][QOS]producer %u @fsm.c(83),ERROR" ID="0x8b58029a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[FSM][QOS]consumer %u @fsm.c(97),ERROR" ID="0x8b58030a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[TIMRE_ADD][STACK_TIMER] TIMER=0x%x, TIME=%u @fsm.c(725),INFO" ID="0x8b5816ad" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_EXPIR]timeout timer err! @fsm.c(823),ERROR" ID="0x8b5819ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_EXPIR]timeout but no right timer! @fsm.c(853),WARNING" ID="0x8b581aab" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[timer_expire_in_sch_lite]timer has been free; not need free! @fsm.c(869),WARNING" ID="0x8b581b2b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[TIMER_DEL][STACK_TIMER] in_ft is NULL! @fsm.c(994),INFO" ID="0x8b581f15" />
                        </MSG_LOG>
\ No newline at end of file
index 363dc3a..63850e3 100755 (executable)
@@ -1,11 +1,13 @@
 <MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[GAP][create_handle] memcpy failed @gap_hlp_comm.c(260),ERROR" ID="0x8b8e0822" />
-                       <MSG STRUCTURE="diag_log_msg6" NAME="[GAP][ACL_EVENT_CALLBACK] JOB=%u, LINK_TYPE=%u, ACL_LINK_HANDLE=0x%x, REMOTE_ADDR=%02x:%02x:**:**:**:%02x @gap_hlp_comm.c(477),INFO" ID="0x8b8e0eed" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(887),ERROR" ID="0x8b8e1bba" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="gaph_hci_command_cbk, operation=%x, code:%x @gap_hlp_comm.c(981),INFO" ID="0x8b8e1ead" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][MEMCPY_FAILED]CreateContext memcpy fail,ret=%d @gap_hlp_comm.c(1048),INFO" ID="0x8b8e20c5" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LINK_ALREADY_EXISTS] REMOTE_ADDR=%02x:%02x:**:**:**:%02x @gap_hlp_comm.c(1086),INFO" ID="0x8b8e21f5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(1842),ERROR" ID="0x8b8e3992" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(1862),ERROR" ID="0x8b8e3a32" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LOCAL_DISC_REQ] REMOTE_ADDR=%02x:%02x:**:**:**:%02x, can't find acl link @gap_hlp_comm.c(2011),INFO" ID="0x8b8e3edd" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LOCAL_DISC_REQ] REMOTE_ADDR=%02x:%02x:**:**:**:%02x, can't find acl link @gap_hlp_comm.c(2041),INFO" ID="0x8b8e3fcd" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP] acl_link cbk link_type:%d job:%d @gap_hlp_comm.c(444),ERROR" ID="0x8b8e0de2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][acl]job:%d link is NULL @gap_hlp_comm.c(464),ERROR" ID="0x8b8e0e82" />
+                       <MSG STRUCTURE="diag_log_msg6" NAME="[GAP][ACL_EVENT_CALLBACK] JOB=%u, LINK_TYPE=%u, ACL_LINK_HANDLE=0x%x, REMOTE_ADDR=%02x:%02x:**:**:**:%02x @gap_hlp_comm.c(482),INFO" ID="0x8b8e0f15" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(892),ERROR" ID="0x8b8e1be2" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="gaph_hci_command_cbk, operation=%x, code:%x @gap_hlp_comm.c(986),INFO" ID="0x8b8e1ed5" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][MEMCPY_FAILED]CreateContext memcpy fail,ret=%d @gap_hlp_comm.c(1053),INFO" ID="0x8b8e20ed" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LINK_ALREADY_EXISTS] REMOTE_ADDR=%02x:%02x:**:**:**:%02x @gap_hlp_comm.c(1091),INFO" ID="0x8b8e221d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(1847),ERROR" ID="0x8b8e39ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_comm.c(1867),ERROR" ID="0x8b8e3a5a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LOCAL_DISC_REQ] REMOTE_ADDR=%02x:%02x:**:**:**:%02x, can't find acl link @gap_hlp_comm.c(2016),INFO" ID="0x8b8e3f05" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LOCAL_DISC_REQ] REMOTE_ADDR=%02x:%02x:**:**:**:%02x, can't find acl link @gap_hlp_comm.c(2046),INFO" ID="0x8b8e3ff5" />
                        </MSG_LOG>
\ No newline at end of file
index 2d0bcaa..da45fb1 100755 (executable)
@@ -1,17 +1,18 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[GAP][RandAddrCfm][ERROR] gap_fsminst is NULL @gap_hlp_le.c(1227),INFO" ID="0x8b8c265d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_ADV_PARAM, RESULT=0x%x @gap_hlp_le.c(2059),INFO" ID="0x8b8c405d" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_DATA, RESULT=0x%x @gap_hlp_le.c(2124),INFO" ID="0x8b8c4265" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_RANDOM_ADDR, RESULT=0x%x @gap_hlp_le.c(2166),INFO" ID="0x8b8c43b5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][LE_MULTI_ADV][ERROR] gap_fsminst is NULL @gap_hlp_le.c(2169),INFO" ID="0x8b8c43cd" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTIADV_ENABLE, RESULT=0x%x @gap_hlp_le.c(2235),INFO" ID="0x8b8c45dd" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_PARAM, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2313),INFO" ID="0x8b8c484d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_DATA, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2345),INFO" ID="0x8b8c494d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_RANDOM_ADDR, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2369),INFO" ID="0x8b8c4a0d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_ENABLE, SUB_CODE=%d, HANDLE=0x%x, ENABLE=%d @gap_hlp_le.c(2400),INFO" ID="0x8b8c4b05" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP] own_address_type = %x adv_event_flag = %x @gap_hlp_le.c(2553),INFO" ID="0x8b8c4fcd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]set ext adv - BT init not complete!!! @gap_hlp_le.c(3073),WARNING" ID="0x8b8c600b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3525),ERROR" ID="0x8b8c6e2a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3531),ERROR" ID="0x8b8c6e5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3539),ERROR" ID="0x8b8c6e9a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3545),ERROR" ID="0x8b8c6eca" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="[GAP] smp cbk event:%d @gap_hlp_le.c(507),ERROR" ID="0x8b8c0fda" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][RandAddrCfm][ERROR] gap_fsminst is NULL @gap_hlp_le.c(1229),INFO" ID="0x8b8c266d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_ADV_PARAM, RESULT=0x%x @gap_hlp_le.c(2061),INFO" ID="0x8b8c406d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_DATA, RESULT=0x%x @gap_hlp_le.c(2126),INFO" ID="0x8b8c4275" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTI_RANDOM_ADDR, RESULT=0x%x @gap_hlp_le.c(2168),INFO" ID="0x8b8c43c5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP][LE_MULTI_ADV][ERROR] gap_fsminst is NULL @gap_hlp_le.c(2171),INFO" ID="0x8b8c43dd" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[GAP][LE_MULTI_ADV] ACTION=UPDATE_MULTIADV_ENABLE, RESULT=0x%x @gap_hlp_le.c(2237),INFO" ID="0x8b8c45ed" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_PARAM, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2315),INFO" ID="0x8b8c485d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_DATA, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2347),INFO" ID="0x8b8c495d" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_RANDOM_ADDR, SUB_CODE=%d, HANDLE=0x%x @gap_hlp_le.c(2371),INFO" ID="0x8b8c4a1d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[GAP][LE_MULTI_ADV] ACTION=SET_MULTI_ADV_ENABLE, SUB_CODE=%d, HANDLE=0x%x, ENABLE=%d @gap_hlp_le.c(2402),INFO" ID="0x8b8c4b15" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[GAP] own_address_type = %x adv_event_flag = %x @gap_hlp_le.c(2555),INFO" ID="0x8b8c4fdd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]set ext adv - BT init not complete!!! @gap_hlp_le.c(3075),WARNING" ID="0x8b8c601b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3527),ERROR" ID="0x8b8c6e3a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3533),ERROR" ID="0x8b8c6e6a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3541),ERROR" ID="0x8b8c6eaa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[GAP]memcpy failed @gap_hlp_le.c(3547),ERROR" ID="0x8b8c6eda" />
                        </MSG_LOG>
\ No newline at end of file
index ef7adc3..0bdff1a 100755 (executable)
@@ -1,9 +1,12 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[GAP][HCI]memcpy failed @hci_core_ram.c(158),ERROR" ID="0x8ba604f2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[hci][len] %02x @hci_core_ram.c(888),INFO" ID="0x8ba61bc5" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] %02x @hci_core_ram.c(891),INFO" ID="0x8ba61bdd" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[T%x][TIMEOUT] OPCODE=0x%x, TIMER=0x%x @hci_core_ram.c(1239),WARNING" ID="0x8ba626bb" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[TIMEOUT] OPCODE=0x%x, TIMER=0x%x @hci_core_ram.c(1243),WARNING" ID="0x8ba626db" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[MEMCPY_FAILED]RecvDataBuff Memcpy fail @hci_core_ram.c(1466),DBG" ID="0x8ba62dd6" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[MEMCPY_FAILED]RecvDataBuff Memcpy fail @hci_core_ram.c(1484),DBG" ID="0x8ba62e66" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[NO GLE]Gle %d! @hci_core_ram.c(1515),INFO" ID="0x8ba62f5d" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[GAP][HCI]memcpy failed @hci_core_ram.c(165),ERROR" ID="0x8ba6052a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI] cmd_opcode 0x%x @hci_core_ram.c(894),ERROR" ID="0x8ba61bf2" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[hci][len] %02x @hci_core_ram.c(897),INFO" ID="0x8ba61c0d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] %02x @hci_core_ram.c(900),INFO" ID="0x8ba61c25" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[T%x][TIMEOUT] OPCODE=0x%x, TIMER=0x%x @hci_core_ram.c(1248),WARNING" ID="0x8ba62703" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[HCI][TIMEOUT] OPCODE=0x%x, TIMER=0x%x @hci_core_ram.c(1252),ERROR" ID="0x8ba62722" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[MEMCPY_FAILED]RecvDataBuff Memcpy fail @hci_core_ram.c(1481),DBG" ID="0x8ba62e4e" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[MEMCPY_FAILED]RecvDataBuff Memcpy fail @hci_core_ram.c(1499),DBG" ID="0x8ba62ede" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][RX] external fsm buff overflow! fsm_limit=%lu @hci_core_ram.c(1536),ERROR" ID="0x8ba63002" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][RX]external fsm buff overflow! free buff opcode=0x%x @hci_core_ram.c(1541),ERROR" ID="0x8ba6302a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[NO GLE]Gle %d! @hci_core_ram.c(1573),INFO" ID="0x8ba6312d" />
                        </MSG_LOG>
\ No newline at end of file
index ea716cd..e9bfbf6 100755 (executable)
@@ -1,16 +1,16 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg4" NAME="[HCI][SEND_ACL_DATA] SLOT=%u, LEN=%u, Remaining Packet NUM=%u, HANDLE=0x%x @hci_data_proc.c(114),INFO" ID="0x8bda0395" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy error @hci_data_proc.c(372),ERROR" ID="0x8bda0ba2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy error @hci_data_proc.c(378),ERROR" ID="0x8bda0bd2" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][RECV_ACL_DATA] CONN_HANDLE=0x%x, link not found @hci_data_proc.c(465),INFO" ID="0x8bda0e8d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] OPCODE=0x%x, HANDLE=0x%x, LEN=%u @hci_data_proc.c(669),INFO" ID="0x8bda14ed" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, disc_reason=0x%x, LEN=%u @hci_data_proc.c(679),INFO" ID="0x8bda153d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, OCF=0x%x, LEN=%u @hci_data_proc.c(685),WARNING" ID="0x8bda156b" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] OPCODE=0x%x, HANDLE=0x%x, LEN=%u @hci_data_proc.c(706),DBG" ID="0x8bda1616" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, OCF=0x%x, LEN=%u @hci_data_proc.c(711),DBG" ID="0x8bda163e" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] LEN=%u @hci_data_proc.c(726),DBG" ID="0x8bda16b6" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] %02x %02x %02x %02x @hci_data_proc.c(732),DBG" ID="0x8bda16e6" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] %02x %02x %02x @hci_data_proc.c(737),DBG" ID="0x8bda170e" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[HCI][H--&gt;C] %02x %02x @hci_data_proc.c(740),DBG" ID="0x8bda1726" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] %02x @hci_data_proc.c(742),DBG" ID="0x8bda1736" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[A2DP][HCI] a2dp_audio:first frame to btc, only for a2dp service. @hci_data_proc.c(761),INFO" ID="0x8bda17cd" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg4" NAME="[HCI][SEND_ACL_DATA] SLOT=%u, LEN=%u, Remaining Packet NUM=%u, HANDLE=0x%x @hci_data_proc.c(134),INFO" ID="0x8bda0435" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy error @hci_data_proc.c(394),ERROR" ID="0x8bda0c52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy error @hci_data_proc.c(400),ERROR" ID="0x8bda0c82" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][RECV_ACL_DATA] CONN_HANDLE=0x%x, link not found @hci_data_proc.c(489),INFO" ID="0x8bda0f4d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] OPCODE=0x%x, HANDLE=0x%x, LEN=%u @hci_data_proc.c(697),INFO" ID="0x8bda15cd" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, disc_reason=0x%x, LEN=%u @hci_data_proc.c(707),INFO" ID="0x8bda161d" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, OCF=0x%x, LEN=%u @hci_data_proc.c(713),WARNING" ID="0x8bda164b" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] OPCODE=0x%x, HANDLE=0x%x, LEN=%u @hci_data_proc.c(734),DBG" ID="0x8bda16f6" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] OPCODE=0x%x, OGF=0x%x, OCF=0x%x, LEN=%u @hci_data_proc.c(739),DBG" ID="0x8bda171e" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] LEN=%u @hci_data_proc.c(754),DBG" ID="0x8bda1796" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][H--&gt;C] %02x %02x %02x %02x @hci_data_proc.c(760),DBG" ID="0x8bda17c6" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][H--&gt;C] %02x %02x %02x @hci_data_proc.c(765),DBG" ID="0x8bda17ee" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[HCI][H--&gt;C] %02x %02x @hci_data_proc.c(768),DBG" ID="0x8bda1806" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[HCI][H--&gt;C] %02x @hci_data_proc.c(770),DBG" ID="0x8bda1816" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[A2DP][HCI] a2dp_audio:first frame to btc, only for a2dp service. @hci_data_proc.c(789),INFO" ID="0x8bda18ad" />
                        </MSG_LOG>
\ No newline at end of file
index 648aeab..fbf25fb 100755 (executable)
@@ -1,3 +1,4 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="[HCI][LE_CONN_COMPLETE] STATUS=0x%x @hci_ev_le.c(408),INFO" ID="0x8ad00cc5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI][LE_META_ISO_EV] it is iso event @hci_ev_le.c(527),INFO" ID="0x8ad0107d" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg3" NAME="[HCI][LE_CONN_COMPLETE] STATUS=0x%x role:%d conn_handle:%d @hci_ev_le.c(410),ERROR" ID="0x8ad00cd2" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][LE_CONN_COMPLETE] addr=%02x******%02x%02x addr_type:%d @hci_ev_le.c(417),ERROR" ID="0x8ad00d0a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[HCI][LE_META_ISO_EV] it is iso event @hci_ev_le.c(536),INFO" ID="0x8ad010c5" />
                        </MSG_LOG>
\ No newline at end of file
index e060f24..720dfbc 100755 (executable)
@@ -1,3 +1,3 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg4" NAME="[HCI] remove remote exceed upper limit %d addr:%02x:%02x:xx:xx:xx:%02x! @hci_hlp_ram.c(522),WARNING" ID="0x8ba81053" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg4" NAME="[HCI] remove remote exceed upper limit %d addr:%02x:%02x:xx:xx:xx:%02x! @hci_hlp_ram.c(522),ERROR" ID="0x8ba81052" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[HCI]memcpy_s&#160;error @hci_hlp_ram.c(542),ERROR" ID="0x8ba810f2" />
                        </MSG_LOG>
\ No newline at end of file
index 0e17c34..043c21b 100755 (executable)
@@ -1,5 +1,6 @@
 <MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="[HCI]CURRENT_LINK_MODE=0x%x, ACL Data Will be pend! @hci_link_br.c(217),INFO" ID="0x8bdc06cd" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][CONN_COMPLETE] LINK_STATUS=0x%x, EVENT_STATUS=0x%x, CONN_HDL=0x%x @hci_link_br.c(489),INFO" ID="0x8bdc0f4d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][CONN_REQUEST] LINK_TYPE=0x%x, REMOTE_ADDR=%02x:%02x:**:**:**:%02x @hci_link_br.c(561),INFO" ID="0x8bdc118d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[HCI][REMOVE_LINK] REF_COUNT=%u, STATUS=%u @hci_link_br.c(646),INFO" ID="0x8bdc1435" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI] create connection addr:%02x******%02x%02x @hci_link_br.c(257),ERROR" ID="0x8bdc080a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[HCI][CONN_COMPLETE] LINK_STATUS=0x%x, EVENT_STATUS=0x%x, CONN_HDL=0x%x @hci_link_br.c(494),ERROR" ID="0x8bdc0f72" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[HCI][CONN_REQUEST] LINK_TYPE=0x%x, REMOTE_ADDR=%02x:%02x:**:**:**:%02x @hci_link_br.c(569),ERROR" ID="0x8bdc11ca" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[HCI][REMOVE_LINK] REF_COUNT=%u, STATUS=%u @hci_link_br.c(653),ERROR" ID="0x8bdc146a" />
                        </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hci_link_le.c.xml b/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/hci_link_le.c.xml
new file mode 100644 (file)
index 0000000..7726db4
--- /dev/null
@@ -0,0 +1,2 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg3" NAME="[HCI] create le connection addr:%02x******%02x%02x @hci_link_le.c(116),ERROR" ID="0x8ad603a2" />
+                       </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/ipc_irq.c.xml b/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/ipc_irq.c.xml
new file mode 100644 (file)
index 0000000..d492b4a
--- /dev/null
@@ -0,0 +1,2 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="mcu_int1_handler. @ipc_irq.c(74),ERROR" ID="0xa0600252" />
+                       </MSG_LOG>
\ No newline at end of file
index db94924..fc06735 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]create big prepare fail @llc_bis_hci_ram.c(79),WARNING" ID="0x8a60027b" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]create big prepare fail @llc_bis_hci_ram.c(79),WARNING" ID="0x8a64027b" />
                        </MSG_LOG>
\ No newline at end of file
index 6f0e8e2..53c2078 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg3" NAME="[INFO][LLD]lld_periodic_adv_start:sync_dur=%d, intv_min=%d, intv_max=%d @lld_per_ram.c(53),INFO" ID="0x8a5e01ad" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg3" NAME="[INFO][LLD]lld_periodic_adv_start:sync_dur=%d, intv_min=%d, intv_max=%d @lld_per_ram.c(53),INFO" ID="0x8a6201ad" />
                        </MSG_LOG>
\ No newline at end of file
index 5129a41..aedb9ec 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg3" NAME="[PF][DUMP INFO] stack point: 0x%x, stack address: 0x%x, stack size: 0x%x @log_oml_exception.c(410),ERROR" ID="0xa0080cd2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg3" NAME="[PF][DUMP INFO] stack point: 0x%x, stack address: 0x%x, stack size: 0x%x @log_oml_exception.c(411),ERROR" ID="0xa0080cda" />
                        </MSG_LOG>
\ No newline at end of file
index def1f92..abaece3 100755 (executable)
@@ -1,8 +1,9 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[BTOS][MEM_INTEGRITY_CHECK]Not support! @osdep.c(678),INFO" ID="0x8b981535" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW]ALLOC_SIZE=%u, alloc fail! @osdep.c(709),WARNING" ID="0x8b98162b" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[MEM_FREE][%d][0x%p], caller:0x%x  @osdep.c(746),INFO" ID="0x8b981755" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[BTOS][MEM_FREE]ERROR_CODE=%u, addr:0x%p, caller:0x%x free fail! @osdep.c(754),WARNING" ID="0x8b981793" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW]ALLOC_SIZE=%u, alloc fail! @osdep.c(767),WARNING" ID="0x8b9817fb" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[BTOS][MEM_FREE]ERROR_CODE=%u, addr:0x%p, caller:0x%x, free fail! @osdep.c(782),WARNING" ID="0x8b981873" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW_S]AVAILABLE_MEMORY=%u, alloc fail because under secure threshold size! @osdep.c(813),WARNING" ID="0x8b98196b" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[BTOS][MEM_INTEGRITY_CHECK]Not support! @osdep.c(680),INFO" ID="0x8b981545" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW]ALLOC_SIZE=%u alloc fail! @osdep.c(712),ERROR" ID="0x8b981642" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[BTOS][MEM_NEW]fsm_count=%u fsm_limit=%u fsm_limit_max=%u hci_slice_rx=%u! @osdep.c(716),ERROR" ID="0x8b981662" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[MEM_FREE][%d][0x%p], caller:0x%x  @osdep.c(753),INFO" ID="0x8b98178d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[BTOS][MEM_FREE]ERROR_CODE=%u, addr:0x%p, caller:0x%x free fail! @osdep.c(761),WARNING" ID="0x8b9817cb" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW]ALLOC_SIZE=%u, alloc fail! @osdep.c(774),WARNING" ID="0x8b981833" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[BTOS][MEM_FREE]ERROR_CODE=%u, addr:0x%p, caller:0x%x, free fail! @osdep.c(789),WARNING" ID="0x8b9818ab" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BTOS][MEM_NEW_S]AVAILABLE_MEMORY=%u, alloc fail because under secure threshold size! @osdep.c(820),WARNING" ID="0x8b9819a3" />
                        </MSG_LOG>
\ No newline at end of file
index c1cf4a5..99ca52a 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[INFO][DFX]dfx_bt_parse_debug_cmd:too many Parameter, quit parsing @patch_btdfx.c(50),INFO" ID="0x8a520195" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[INFO][DFX]dfx_bt_parse_debug_cmd:too many Parameter, quit parsing @patch_btdfx.c(50),INFO" ID="0x8a560195" />
                        </MSG_LOG>
\ No newline at end of file
index 9f07411..85e002a 100755 (executable)
@@ -1,4 +1,5 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="smp_pair_new_patch @patch_bth.c(42),INFO" ID="0x8d540155" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[AVDTP][GET_SEP_FAIL] Can not get sep info @patch_bth.c(146),WARNING" ID="0x8d540493" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[STACK][RECV_RING_STOP] @patch_bth.c(234),INFO" ID="0x8d540755" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="smp_pair_new_patch @patch_bth.c(43),INFO" ID="0x8d54015d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[AVDTP][GET_SEP_FAIL] Can not get sep info @patch_bth.c(147),WARNING" ID="0x8d54049b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[STACK][RECV_RING_STOP] @patch_bth.c(235),INFO" ID="0x8d54075d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[ATT_GATT] att error rsp opcode:0x%x handle:%d error:0x%x @patch_bth.c(315),ERROR" ID="0x8d5409da" />
                        </MSG_LOG>
\ No newline at end of file
index dddfc30..f17b4dd 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg4" NAME="ea_prog_time_set current_time(0x%x)finetarget_time(0x%x),finecnt(%d),finetgtintmsk(%d) @patch_ea.c(68),WARNING" ID="0x8a540223" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg4" NAME="ea_prog_time_set current_time(0x%x)finetarget_time(0x%x),finecnt(%d),finetgtintmsk(%d) @patch_ea.c(68),WARNING" ID="0x8a580223" />
                        </MSG_LOG>
\ No newline at end of file
index f07fb9d..02a4507 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="[LD]ld_acl_sched_update_ts ts=0x%x @patch_ld_acl.c(37),INFO" ID="0x8a64012d" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="[LD]ld_acl_sched_update_ts ts=0x%x @patch_ld_acl.c(37),INFO" ID="0x8a68012d" />
                        </MSG_LOG>
\ No newline at end of file
index fe553a9..cf9158d 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="rx_phy is %d @patch_llc.c(19),INFO" ID="0x8a5a009d" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="rx_phy is %d @patch_llc.c(19),INFO" ID="0x8a5e009d" />
                        </MSG_LOG>
\ No newline at end of file
index 86fb486..67e4fa3 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]lld_big_acad_ind_handle, biginfo unpack fail @patch_llc_bis_util.c(93),WARNING" ID="0x8a6202eb" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]lld_big_acad_ind_handle, biginfo unpack fail @patch_llc_bis_util.c(93),WARNING" ID="0x8a6602eb" />
                        </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_llc_llcp.c.xml b/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_llc_llcp.c.xml
new file mode 100644 (file)
index 0000000..1ecab8a
--- /dev/null
@@ -0,0 +1,5 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg2" NAME="[WARNING] llcp_channel_map_req_handler , INSTANT_REJECT, state=%d, mode=%d @patch_llc_llcp.c(42),WARNING" ID="0x8a520153" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[WARNING] llcp_channel_map_req_handler, INSTANT_COLLISION, map_instant_action %d instant_action %d @patch_llc_llcp.c(49),WARNING" ID="0x8a52018b" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="llcp_channel_map_req_handler, instant=%d, counter=%d, remote_device_id=%d @patch_llc_llcp.c(59),WARNING" ID="0x8a5201db" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[WARNING] llcp_channel_map_req_handler, INSTANT_PASSED, instant=%d, counter=%d @patch_llc_llcp.c(67),WARNING" ID="0x8a52021b" />
+                       </MSG_LOG>
\ No newline at end of file
index d3c08e7..fd1decc 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLD]lld_bis_elt_ready:elt=0x%x,elt_ts=0x%x,intv=%d,duration_min=%d @patch_lld_bis.c(46),INFO" ID="0x8a560175" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLD]lld_bis_elt_ready:elt=0x%x,elt_ts=0x%x,intv=%d,duration_min=%d @patch_lld_bis.c(46),INFO" ID="0x8a5a0175" />
                        </MSG_LOG>
\ No newline at end of file
index a6d92f0..20d9c77 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg3" NAME="[BIS]Invalid parameters finetimecnt:%d, iso_intv:%d, iso_subevtnum:%d @patch_lld_bis_evt.c(53),WARNING" ID="0x8a6c01ab" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg3" NAME="[BIS]Invalid parameters finetimecnt:%d, iso_intv:%d, iso_subevtnum:%d @patch_lld_bis_evt.c(53),WARNING" ID="0x8a7001ab" />
                        </MSG_LOG>
\ No newline at end of file
index fe3c011..852bea2 100755 (executable)
@@ -1,5 +1,5 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]lld_bis_report_rxnode:No rx_report buff! @patch_lld_bis_pdu.c(27),WARNING" ID="0x8a6600db" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][BIS]bis recombine:length=%d, recomb_flag=%d, pldcntr=%d, llid=%d @patch_lld_bis_pdu.c(58),WARNING" ID="0x8a6601d3" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BIS]lld_bis_pdu_framed_rx_check:invalid middle pkt @patch_lld_bis_pdu.c(120),INFO" ID="0x8a6603c5" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[BIS]lld_bis_pdu_framed_rx_check:invalid last pkt @patch_lld_bis_pdu.c(134),INFO" ID="0x8a660435" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[WARNING][BIS]lld_bis_report_rxnode:No rx_report buff! @patch_lld_bis_pdu.c(27),WARNING" ID="0x8a6a00db" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][BIS]bis recombine:length=%d, recomb_flag=%d, pldcntr=%d, llid=%d @patch_lld_bis_pdu.c(58),WARNING" ID="0x8a6a01d3" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BIS]lld_bis_pdu_framed_rx_check:invalid middle pkt @patch_lld_bis_pdu.c(120),INFO" ID="0x8a6a03c5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[BIS]lld_bis_pdu_framed_rx_check:invalid last pkt @patch_lld_bis_pdu.c(134),INFO" ID="0x8a6a0435" />
                        </MSG_LOG>
\ No newline at end of file
index 616cab1..563f73f 100755 (executable)
@@ -1,5 +1,5 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="lld_evt_defered_elt_handler,  test end @patch_lld_evt.c(141),WARNING" ID="0x8a5c046b" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LLD]lld_evt_flush_common:elt is null @patch_lld_evt.c(212),INFO" ID="0x8a5c06a5" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="c_evt-&gt;mode=%d, next_elt-&gt;mode=%d, cur-&gt;conhdl=%d, n_evt-&gt;conhdl=%d @patch_lld_evt.c(269),INFO" ID="0x8a5c086d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="current_elt-&gt;current_prio=%d, next_elt-&gt;current_prio=%d, llm_le_env.sync_state =%d @patch_lld_evt.c(271),INFO" ID="0x8a5c087d" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="lld_evt_defered_elt_handler,  test end @patch_lld_evt.c(141),WARNING" ID="0x8a60046b" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LLD]lld_evt_flush_common:elt is null @patch_lld_evt.c(212),INFO" ID="0x8a6006a5" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="c_evt-&gt;mode=%d, next_elt-&gt;mode=%d, cur-&gt;conhdl=%d, n_evt-&gt;conhdl=%d @patch_lld_evt.c(269),INFO" ID="0x8a60086d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="current_elt-&gt;current_prio=%d, next_elt-&gt;current_prio=%d, llm_le_env.sync_state =%d @patch_lld_evt.c(271),INFO" ID="0x8a60087d" />
                        </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_lld_pdu.c.xml b/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/patch_lld_pdu.c.xml
new file mode 100644 (file)
index 0000000..6cdef53
--- /dev/null
@@ -0,0 +1,3 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg4" NAME="[BLE ACL] conhdl=%d, status:0x%04x, length:%d, rxflush|rxdone|cie:%08x @patch_lld_pdu.c(44),INFO" ID="0x8a540165" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[BLE ACL] ccm 0x%x @patch_lld_pdu.c(45),INFO" ID="0x8a54016d" />
+                       </MSG_LOG>
\ No newline at end of file
index 9519276..e806e6c 100755 (executable)
@@ -1,4 +1,4 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LLM]llm_ral_dev_add:ral is full @patch_llm_util.c(107),INFO" ID="0x8a6a035d" />
-                       <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLM]llm_ral_dev_add:in_wl=%d, l_irk_valid=%d, p_irk_valid=%d, peer_id_addr_type=%d @patch_llm_util.c(133),INFO" ID="0x8a6a042d" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][LLM]llm_ral_dev_add:peer_id_addr=0x%8x%4x, nbral=%d @patch_llm_util.c(139),INFO" ID="0x8a6a045d" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[INFO][LLM]llm_ral_dev_add:ral is full @patch_llm_util.c(107),INFO" ID="0x8a6e035d" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[INFO][LLM]llm_ral_dev_add:in_wl=%d, l_irk_valid=%d, p_irk_valid=%d, peer_id_addr_type=%d @patch_llm_util.c(133),INFO" ID="0x8a6e042d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[INFO][LLM]llm_ral_dev_add:peer_id_addr=0x%8x%4x, nbral=%d @patch_llm_util.c(139),INFO" ID="0x8a6e045d" />
                        </MSG_LOG>
\ No newline at end of file
index eb1b6bb..14ad471 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg2" NAME="btsdk_is_device_connected hdl:0x%x status:%d @sdk_gap_conn_management.c(601),INFO" ID="0x8b8212cd" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg2" NAME="btsdk_is_device_connected hdl:0x%x status:%d @sdk_gap_conn_management.c(608),INFO" ID="0x8b821305" />
                        </MSG_LOG>
\ No newline at end of file
index e4f7143..5b560d1 100755 (executable)
@@ -1,18 +1,18 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[sdk]gatt_get_descriptor_value memcpy failed @sdk_gatt.c(386),ERROR" ID="0x8b800c12" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_get_descriptor_value&#160;memcpy_s&#160;error @sdk_gatt.c(570),ERROR" ID="0x8b8011d2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic mem_new failed @sdk_gatt.c(792),ERROR" ID="0x8b8018c2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt.c(797),ERROR" ID="0x8b8018ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt.c(806),ERROR" ID="0x8b801932" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="btsdk gatt get characteristics by uuid start_handle:0x%x end_handle:0x%x, uuid:0x%x @sdk_gatt.c(829),INFO" ID="0x8b8019ed" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk gatt get characteristic value by uuid start_handle:0x%x end_handle:0x%x @sdk_gatt.c(877),INFO" ID="0x8b801b6d" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[sdk]gatt_get_descriptor_by_handle start_handle:0x%x end_handle:0x%x @sdk_gatt.c(900),INFO" ID="0x8b801c25" />
-                       <MSG STRUCTURE="diag_log_msg1" NAME="[sdk]gatt_get_multiple_characteristics_by_handle handle_count:0x%x @sdk_gatt.c(921),INFO" ID="0x8b801ccd" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_set_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1199),ERROR" ID="0x8b80257a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_set_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1212),ERROR" ID="0x8b8025e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_get_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1284),ERROR" ID="0x8b802822" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_send_response&#160;memcpy_s&#160;error @sdk_gatt.c(1882),ERROR" ID="0x8b803ad2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_change_descriptor_value&#160;memcpy_s&#160;error @sdk_gatt.c(1963),ERROR" ID="0x8b803d5a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_notify_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt.c(2008),ERROR" ID="0x8b803ec2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_notify_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt.c(2015),ERROR" ID="0x8b803efa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]can't find hdl by uuid @sdk_gatt.c(2206),ERROR" ID="0x8b8044f2" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[sdk]gatt_get_descriptor_value memcpy failed @sdk_gatt.c(387),ERROR" ID="0x8b800c1a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_get_descriptor_value&#160;memcpy_s&#160;error @sdk_gatt.c(571),ERROR" ID="0x8b8011da" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic mem_new failed @sdk_gatt.c(793),ERROR" ID="0x8b8018ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt.c(798),ERROR" ID="0x8b8018f2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt.c(807),ERROR" ID="0x8b80193a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="btsdk gatt get characteristics by uuid start_handle:0x%x end_handle:0x%x, uuid:0x%x @sdk_gatt.c(830),INFO" ID="0x8b8019f5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk gatt get characteristic value by uuid start_handle:0x%x end_handle:0x%x @sdk_gatt.c(878),INFO" ID="0x8b801b75" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[sdk]gatt_get_descriptor_by_handle start_handle:0x%x end_handle:0x%x @sdk_gatt.c(901),INFO" ID="0x8b801c2d" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[sdk]gatt_get_multiple_characteristics_by_handle handle_count:0x%x @sdk_gatt.c(922),INFO" ID="0x8b801cd5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_set_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1200),ERROR" ID="0x8b802582" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_set_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1213),ERROR" ID="0x8b8025ea" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_get_gap_ui_attributes&#160;memcpy_s&#160;error @sdk_gatt.c(1285),ERROR" ID="0x8b80282a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_send_response&#160;memcpy_s&#160;error @sdk_gatt.c(1883),ERROR" ID="0x8b803ada" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_change_descriptor_value&#160;memcpy_s&#160;error @sdk_gatt.c(1964),ERROR" ID="0x8b803d62" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_notify_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt.c(2009),ERROR" ID="0x8b803eca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatt_notify_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt.c(2016),ERROR" ID="0x8b803f02" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]can't find hdl by uuid @sdk_gatt.c(2207),ERROR" ID="0x8b8044fa" />
                        </MSG_LOG>
\ No newline at end of file
index da86876..481ab07 100755 (executable)
@@ -1,37 +1,38 @@
 <MSG_LOG><MSG STRUCTURE="diag_log_msg0" NAME="[SDK]convert uuid to sdk memcpy_s error @sdk_gatt_hlp.c(113),ERROR" ID="0x8da6038a" />
                        <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]convert uuid to stack memcpy_s error @sdk_gatt_hlp.c(125),ERROR" ID="0x8da603ea" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att exchange mtu addr memcpy fail @sdk_gatt_hlp.c(574),ERROR" ID="0x8da611f2" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[gatth_get_multiple_characteristics_value] rmt:0x%x mtu:0x%x @sdk_gatt_hlp.c(880),INFO" ID="0x8da61b85" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="[gatth_get_characteristics_by_uuid] start_handle:0x%x end_handle:0x%x @sdk_gatt_hlp.c(1013),INFO" ID="0x8da61fad" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk gatth get descriptor by handle arg-&gt;start_handle:0x%x arg-&gt;end_handle:0x%x @sdk_gatt_hlp.c(1056),INFO" ID="0x8da62105" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="gatth_set_reliable_characteristic_value in @sdk_gatt_hlp.c(1101),INFO" ID="0x8da6226d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[gatth_set_characteristic_value] memcpy failed @sdk_gatt_hlp.c(1138),ERROR" ID="0x8da62392" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic rmt is NULL @sdk_gatt_hlp.c(1170),ERROR" ID="0x8da62492" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt_hlp.c(1177),ERROR" ID="0x8da624ca" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic tl is NULL @sdk_gatt_hlp.c(1191),ERROR" ID="0x8da6253a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[gatth_check_and_save_value] memcpy failed @sdk_gatt_hlp.c(1651),ERROR" ID="0x8da6339a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_execute_write_complete&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1748),ERROR" ID="0x8da636a2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_write_ind&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1892),ERROR" ID="0x8da63b22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_write_ind&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1914),ERROR" ID="0x8da63bd2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_send_response&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(2267),ERROR" ID="0x8da646da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_notify_multiple_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(2500),ERROR" ID="0x8da64e22" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info mem new fail @sdk_gatt_hlp.c(2552),ERROR" ID="0x8da64fc2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info service uuid memcpy fail @sdk_gatt_hlp.c(2562),ERROR" ID="0x8da65012" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info attribute uuid memcpy fail @sdk_gatt_hlp.c(2567),ERROR" ID="0x8da6503a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info addr memcpy fail @sdk_gatt_hlp.c(2572),ERROR" ID="0x8da65062" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info val memcpy fail @sdk_gatt_hlp.c(2577),ERROR" ID="0x8da6508a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind can't find service by service hdl @sdk_gatt_hlp.c(2623),ERROR" ID="0x8da651fa" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write pkt null @sdk_gatt_hlp.c(2629),ERROR" ID="0x8da6522a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind can't find server cbk by server hdl @sdk_gatt_hlp.c(2636),ERROR" ID="0x8da65262" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info mem new fail @sdk_gatt_hlp.c(2668),ERROR" ID="0x8da65362" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info service uuid memcpy fail @sdk_gatt_hlp.c(2679),ERROR" ID="0x8da653ba" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info attribute uuid memcpy fail @sdk_gatt_hlp.c(2684),ERROR" ID="0x8da653e2" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info addr memcpy fail @sdk_gatt_hlp.c(2689),ERROR" ID="0x8da6540a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info val memcpy fail @sdk_gatt_hlp.c(2695),ERROR" ID="0x8da6543a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind can't find service by service hdl @sdk_gatt_hlp.c(2715),ERROR" ID="0x8da654da" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read pkt null @sdk_gatt_hlp.c(2721),ERROR" ID="0x8da6550a" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind can't find server cbk by server hdl @sdk_gatt_hlp.c(2728),ERROR" ID="0x8da65542" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]write element @sdk_gatt_hlp.c(2765),INFO" ID="0x8da6566d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]read element @sdk_gatt_hlp.c(2769),INFO" ID="0x8da6568d" />
-                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]write element free @sdk_gatt_hlp.c(2775),INFO" ID="0x8da656bd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att exchange mtu addr memcpy fail @sdk_gatt_hlp.c(581),ERROR" ID="0x8da6122a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[gatth_get_multiple_characteristics_value] rmt:0x%x mtu:0x%x @sdk_gatt_hlp.c(887),INFO" ID="0x8da61bbd" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[gatth_get_characteristics_by_uuid] start_handle:0x%x end_handle:0x%x @sdk_gatt_hlp.c(1020),INFO" ID="0x8da61fe5" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="btsdk gatth get descriptor by handle arg-&gt;start_handle:0x%x arg-&gt;end_handle:0x%x @sdk_gatt_hlp.c(1063),INFO" ID="0x8da6213d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="gatth_set_reliable_characteristic_value in @sdk_gatt_hlp.c(1108),INFO" ID="0x8da622a5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[gatth_set_characteristic_value] memcpy failed @sdk_gatt_hlp.c(1145),ERROR" ID="0x8da623ca" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic rmt is NULL @sdk_gatt_hlp.c(1178),ERROR" ID="0x8da624d2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic memcpy failed @sdk_gatt_hlp.c(1186),ERROR" ID="0x8da62512" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="ble general gatt write characteristic tl is NULL @sdk_gatt_hlp.c(1201),ERROR" ID="0x8da6258a" />
+                       <MSG STRUCTURE="diag_log_msg1" NAME="[SDK_GATT_HLP] HCI QOS state:%u @sdk_gatt_hlp.c(1550),ERROR" ID="0x8da63072" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[gatth_check_and_save_value] memcpy failed @sdk_gatt_hlp.c(1667),ERROR" ID="0x8da6341a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_execute_write_complete&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1764),ERROR" ID="0x8da63722" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_write_ind&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1908),ERROR" ID="0x8da63ba2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_server_write_ind&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(1930),ERROR" ID="0x8da63c52" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_send_response&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(2283),ERROR" ID="0x8da6475a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SDK]gatth_notify_multiple_characteristic_changed&#160;memcpy_s&#160;error @sdk_gatt_hlp.c(2516),ERROR" ID="0x8da64ea2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info mem new fail @sdk_gatt_hlp.c(2568),ERROR" ID="0x8da65042" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info service uuid memcpy fail @sdk_gatt_hlp.c(2578),ERROR" ID="0x8da65092" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info attribute uuid memcpy fail @sdk_gatt_hlp.c(2583),ERROR" ID="0x8da650ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info addr memcpy fail @sdk_gatt_hlp.c(2588),ERROR" ID="0x8da650e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind data info val memcpy fail @sdk_gatt_hlp.c(2593),ERROR" ID="0x8da6510a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind can't find service by service hdl @sdk_gatt_hlp.c(2639),ERROR" ID="0x8da6527a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write pkt null @sdk_gatt_hlp.c(2645),ERROR" ID="0x8da652aa" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att write ind can't find server cbk by server hdl @sdk_gatt_hlp.c(2652),ERROR" ID="0x8da652e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info mem new fail @sdk_gatt_hlp.c(2684),ERROR" ID="0x8da653e2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info service uuid memcpy fail @sdk_gatt_hlp.c(2695),ERROR" ID="0x8da6543a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info attribute uuid memcpy fail @sdk_gatt_hlp.c(2700),ERROR" ID="0x8da65462" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info addr memcpy fail @sdk_gatt_hlp.c(2705),ERROR" ID="0x8da6548a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind data info val memcpy fail @sdk_gatt_hlp.c(2711),ERROR" ID="0x8da654ba" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind can't find service by service hdl @sdk_gatt_hlp.c(2731),ERROR" ID="0x8da6555a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read pkt null @sdk_gatt_hlp.c(2737),ERROR" ID="0x8da6558a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]att read ind can't find server cbk by server hdl @sdk_gatt_hlp.c(2744),ERROR" ID="0x8da655c2" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]write element @sdk_gatt_hlp.c(2781),INFO" ID="0x8da656ed" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]read element @sdk_gatt_hlp.c(2785),INFO" ID="0x8da6570d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[sdk_gatt_hlp]write element free @sdk_gatt_hlp.c(2791),INFO" ID="0x8da6573d" />
                        </MSG_LOG>
\ No newline at end of file
index f19cb41..fcab8d5 100755 (executable)
@@ -1,9 +1,9 @@
 <MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="hfp_handle_ev_disconnect_complete hdl=0x%x @sdk_hfp.c(202),INFO" ID="0x8b7e0655" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp set active mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(229),WARNING" ID="0x8b7e072b" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp map mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(236),INFO" ID="0x8b7e0765" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp set active mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(229),ERROR" ID="0x8b7e072a" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp map mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(236),ERROR" ID="0x8b7e0762" />
                        <MSG STRUCTURE="diag_log_msg1" NAME="memory copy failed ret=0x%x @sdk_hfp.c(250),WARNING" ID="0x8b7e07d3" />
-                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp map mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(291),WARNING" ID="0x8b7e091b" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="SDK_HFP: send msg to mcu ev= 0x%x, role=0x%x @sdk_hfp.c(296),WARNING" ID="0x8b7e0943" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="hfp map mem id: sco_hdl=0x%x in_mem=0x%x out_mem=0x%x @sdk_hfp.c(291),ERROR" ID="0x8b7e091a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="SDK_HFP: send msg to mcu ev= 0x%x, role=0x%x @sdk_hfp.c(296),ERROR" ID="0x8b7e0942" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="SDK_HFP: ev disconnect, conn_cfm-&gt;role = %x, conn_cfm-&gt;result=%d @sdk_hfp.c(360),INFO" ID="0x8b7e0b45" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="SDK_HFP: slc event = %d, slc_info-&gt;role = %x @sdk_hfp.c(388),INFO" ID="0x8b7e0c25" />
                        <MSG STRUCTURE="diag_log_msg2" NAME="[HFP][SDK]SLC RELEASED role=%d handle=0x%x @sdk_hfp.c(452),INFO" ID="0x8b7e0e25" />
index 5949061..af8daa1 100755 (executable)
@@ -1,3 +1,6 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="hlp_link_key_req_cbk no source addr:0x%x @sdk_hlp.c(900),INFO" ID="0x8b7a1c25" />
-                       <MSG STRUCTURE="diag_log_msg2" NAME="hlp_connection_ev_cbk_dis_conn hdl:0x%x status:%d @sdk_hlp.c(2055),INFO" ID="0x8b7a403d" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="hlp_link_key_req_cbk no source addr:0x%x @sdk_hlp.c(898),INFO" ID="0x8b7a1c15" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="hlp_connection_ev_cbk_dis_conn hdl:0x%x status:%d @sdk_hlp.c(2053),INFO" ID="0x8b7a402d" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[SDK] connect event cbk connected: %d, reason: %d link_type:%d! @sdk_hlp.c(2074),ERROR" ID="0x8b7a40d2" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[SDK] connect event cbk cap:%d addr:%02x******%02x%02x @sdk_hlp.c(2089),ERROR" ID="0x8b7a414a" />
+                       <MSG STRUCTURE="diag_log_msg2" NAME="[SDK] connect event cbk status:%d dev_hdl:0x%x @sdk_hlp.c(2092),ERROR" ID="0x8b7a4162" />
                        </MSG_LOG>
\ No newline at end of file
diff --git a/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/smp_ui.c.xml b/code/sdk/interim_binary/brandy/bt/build_hso_cfg/hso_database/xml/base/bt_core/smp_ui.c.xml
new file mode 100644 (file)
index 0000000..8c7cf10
--- /dev/null
@@ -0,0 +1,10 @@
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="[SMP][LongTermKeyRequest]key-&gt;fea = 0x%x @smp_ui.c(426),INFO" ID="0x8dac0d55" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest]key == NULL @smp_ui.c(430),INFO" ID="0x8dac0d75" />
+                       <MSG STRUCTURE="diag_log_msg3" NAME="[SMP][LongTermKeyRequest]link-&gt;hcihdl = %u, link-&gt;remote = 0x%x, key = 0x%x @smp_ui.c(457),INFO" ID="0x8dac0e4d" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest][No LESC LTK SEND] @smp_ui.c(470),INFO" ID="0x8dac0eb5" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest][DIV mismatch, Unpaired] @smp_ui.c(494),INFO" ID="0x8dac0f75" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest][ECDH LTK unavailable, pair!=NULL] @smp_ui.c(507),INFO" ID="0x8dac0fdd" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest][LTK unavailable, pair=NULL] @smp_ui.c(520),INFO" ID="0x8dac1045" />
+                       <MSG STRUCTURE="diag_log_msg4" NAME="[SMP][LongTermKeyRequest]LKT:0x%02x%02x%02x%02x @smp_ui.c(527),ERROR" ID="0x8dac107a" />
+                       <MSG STRUCTURE="diag_log_msg0" NAME="[SMP][LongTermKeyRequest][Send Negative Reply!] @smp_ui.c(542),INFO" ID="0x8dac10f5" />
+                       </MSG_LOG>
\ No newline at end of file
index 3041023..bab79cb 100755 (executable)
@@ -1,2 +1,2 @@
-<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="sco disconnect complete sco_hdl=0x%x @tladapter.c(159),INFO" ID="0x8b9c04fd" />
+<MSG_LOG><MSG STRUCTURE="diag_log_msg1" NAME="sco disconnect complete sco_hdl=0x%x @tladapter.c(159),ERROR" ID="0x8b9c04fa" />
                        </MSG_LOG>
\ No newline at end of file
index e61fe55..1557c5e 100755 (executable)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_audio_manager_wrapper.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_audio_manager_wrapper.a differ
index 8df753e..61b8bb2 100755 (executable)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_brandy_service.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_brandy_service.a differ
index 861e04f..3f240ee 100755 (executable)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_sdk.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/freertos/br/libbt_host_sdk.a differ
index baac1e3..1a804b7 100755 (executable)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a differ
index 653fee4..f219767 100755 (executable)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_brandy_service.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_brandy_service.a differ
index 50c5f68..b164a1f 100755 (executable)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_sdk.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_sdk.a differ
index 3e0841b..1799e16 100755 (executable)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_brandy_service.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_brandy_service.a differ
index da48fbd..6fdd668 100755 (executable)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_sdk.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/mini/br/libbt_host_sdk.a differ
index 5d784c2..4b5183c 100755 (executable)
@@ -11,6 +11,7 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/last_dump_adapt.c
     ${CMAKE_CURRENT_SOURCE_DIR}/sample_data_adapt.c
     ${CMAKE_CURRENT_SOURCE_DIR}/zdiag_adapt_sdt.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/mon_log_output.c
 )
 
 set(PUBLIC_HEADER
@@ -19,14 +20,27 @@ set(PUBLIC_HEADER
 )
 
 set(PRIVATE_HEADER
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/diag_system_cmd/include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/diag_system_cmd/dfx_include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/diag_mocked_shell/include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/last_dump/dfx_include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/last_dump/include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/sample_data/dfx_include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/sample_data/include
     ${ROOT_DIR}/include/middleware/services/bts
     ${ROOT_DIR}/include/middleware/services/bts/ble
     ${ROOT_DIR}/include/middleware/services/bts/br
     ${ROOT_DIR}/include/middleware/services/bts/common
 )
 
-set(PRIVATE_DEFINES
-)
+if("${TARGET_COMMAND}" MATCHES "-user$")
+    set(PRIVATE_DEFINES
+        USER_VERSION
+    )
+else()
+    set(PRIVATE_DEFINES
+    )
+endif()
 
 set(PUBLIC_DEFINES
 )
index b843c9f..f7a112a 100755 (executable)
@@ -86,6 +86,8 @@
 #include "key_id.h"
 #endif
 
+#include "mon_log_output.h"
+
 #define DFX_MSG_TASK_PRIO       5
 
 const diag_cmd_reg_obj_t g_diag_default_cmd_tbl[] = {
@@ -108,8 +110,8 @@ const diag_cmd_reg_obj_t g_diag_default_cmd_tbl[] = {
     { DIAG_CMD_ID_DBG_STAT_QUERY, DIAG_CMD_ID_DBG_STAT_QUERY, diag_cmd_stat_query },
 };
 
-static unsigned long g_dfx_osal_queue_id;
-static unsigned long g_dfx_transmit_queue_id;
+static unsigned long g_dfx_osal_queue_id = DFX_INVALID_QUEUE_ID;
+static unsigned long g_dfx_transmit_queue_id = DFX_INVALID_QUEUE_ID;
 
 static errcode_t register_default_diag_cmd(void)
 {
@@ -412,6 +414,11 @@ errcode_t dfx_system_init(void)
     if (ret != ERRCODE_SUCC) {
         return ret;
     }
+#ifdef USER_VERSION
+    diag_highest_level_proc(DIAG_LOG_LEVEL_WARN);
+    mon_log_output_ctrl_init();
+    mon_log_output_enable(true);
+#endif
     return ERRCODE_SUCC;
 }
 
index e705c6d..90d4399 100755 (executable)
@@ -24,6 +24,7 @@
 #include "debug_print.h"\r
 \r
 #define DFX_CHIP_WS_TV_SEC      1663739960\r
+#define DFX_INVALID_QUEUE_ID    0xFFFFFFFF\r
 \r
 typedef enum {\r
     FLASH_OP_TYPE_OTA,\r
@@ -101,6 +102,11 @@ static inline errcode_t dfx_event_write(dfx_event_id_t event_id)
 /* Msg 接口 */\r
 static inline errcode_t dfx_msg_write(uint32_t msg_id, uint8_t *msg, uint16_t msg_len, bool wait)\r
 {\r
+    unsigned long queue_id = dfx_get_osal_queue_id();\r
+    if (queue_id == DFX_INVALID_QUEUE_ID) {\r
+        return ERRCODE_FAIL;\r
+    }\r
+\r
     unsigned int timeout = (wait) ? OSAL_MSGQ_WAIT_FOREVER : 0;\r
     uint8_t msg_data[DFX_MSG_MAX_SIZE + DFX_MSG_ID_LEN];\r
 \r
@@ -110,7 +116,7 @@ static inline errcode_t dfx_msg_write(uint32_t msg_id, uint8_t *msg, uint16_t ms
         return ERRCODE_FAIL;\r
     }\r
 \r
-    return (errcode_t)osal_msg_queue_write_copy(dfx_get_osal_queue_id(),\r
+    return (errcode_t)osal_msg_queue_write_copy(queue_id,\r
                                                 msg_data, DFX_MSG_MAX_SIZE + DFX_MSG_ID_LEN, timeout);\r
 }\r
 \r
@@ -124,6 +130,10 @@ static inline errcode_t transmit_msg_write(uint32_t msg_id, uint8_t *msg, uint16
 #if (defined(MEMORY_MINI))\r
     return dfx_msg_write(msg_id, msg, msg_len, wait);\r
 #else\r
+    unsigned long queue_id = dfx_get_transmit_queue_id();\r
+    if (queue_id == DFX_INVALID_QUEUE_ID) {\r
+        return ERRCODE_FAIL;\r
+    }\r
     unsigned int timeout = (wait) ? OSAL_MSGQ_WAIT_FOREVER : 0;\r
     uint8_t msg_data[DFX_MSG_MAX_SIZE + DFX_MSG_ID_LEN];\r
 \r
@@ -133,7 +143,7 @@ static inline errcode_t transmit_msg_write(uint32_t msg_id, uint8_t *msg, uint16
         return ERRCODE_FAIL;\r
     }\r
 \r
-    return (errcode_t)osal_msg_queue_write_copy(dfx_get_transmit_queue_id(),\r
+    return (errcode_t)osal_msg_queue_write_copy(queue_id,\r
                                                 msg_data, DFX_MSG_MAX_SIZE + DFX_MSG_ID_LEN, timeout);\r
 #endif\r
 }\r
index 7df400f..8fed177 100755 (executable)
@@ -16,6 +16,7 @@ typedef enum {
     NATIVEABILITY_CPP,
     NATIVELAUNCHER_CPP,
     MAINVIEW_CPP,
+    MAINMODEL_CPP,
     ACTIVITYMODEL_CPP,
     ACTIVITYPRESENTER_CPP,
     ACTIVITYWEEKVIEW_CPP,
@@ -195,6 +196,34 @@ typedef enum {
     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,
+    DISPLAY_STATE_MACHINE_C,
+    POWER_DISPLAY_SERVICE_C,
+    GUI_EVENT_FILTER_C,
+    SLICE_EVENT_FILTER_C,
+    TIMER_EVENT_FILTER_C,
+    DISPLAY_ACTION_C,
+    TIMER_ACTION_C,
+    TOUCH_ACTION_C,
+    ALIPAY_FEATURE_C,
+    ALIPAY_BLUETOOTH_C,
     APP_FILE_ID_MAX = 1024,
 } log_file_list_enum_app_t;
 
index ac84170..2bc496e 100755 (executable)
@@ -128,6 +128,10 @@ typedef enum {
     STACK_PAN_IF_C,
     STACK_PBAP_IF_C,
     STACK_SPP_IF_C,
+    SAMPLE_BLE_ANCS_C,
+    BLE_ANCS_CLIENT_C,
+    SAMPLE_BLE_AMS_C,
+    BLE_AMS_CLIENT_C,
     BTH_FILE_ID_MAX = 1024,
 } log_file_list_enum_bth_t;
 #endif
index 0886e8c..df22386 100755 (executable)
@@ -419,6 +419,21 @@ typedef enum {
     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_ROLLER_VIEW_CPP,
+    UI_ICOSAHEDRON_VIEW_CPP,
+    UI_MAP_VIEW_CPP,
+    MAP_SVG_PARSER_CPP,
+    SLICETRANSITION_CPP,
+    TRANSITIONMANAGER_CPP,
+    UI_PINYIN_CANDIDATE_CPP,
+    HEXAGONSTRANSITION_CPP,
+    BACKTOHEXAGONSTRANSITION_CPP,
     FILE_ID_MAX = 1024,
 } log_file_list_enum_gui_t;
 #endif
index 2069373..bda3e38 100644 (file)
@@ -52,6 +52,8 @@ typedef enum {
     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,
@@ -168,6 +170,7 @@ typedef enum {
     APP_PROVISION_C,
     APP_VERIFY_C,
     MBEDTLS_PKCS7_C,
+    BAIDU_MAP_COMPONENT_CPP,
 } log_file_list_enum_ohos_e;
 
 #endif /* LOG_DEF_OHOS_H */
index 98052e3..9a5c179 100755 (executable)
@@ -78,6 +78,7 @@ typedef enum {
     DFX_CHANNEL_C,
     SAMPLE_DATA_ADAPT_C,
     ZDIAG_ADAPT_SDT_C,
+    MON_LOG_OUTPUT_C,
     DIAG_CMD_DST_C,
     DIAG_DEBUG_C,
     DIAG_FILTER_C,
index 57b76e2..47a0f8d 100755 (executable)
@@ -7,7 +7,7 @@
 #ifndef ZDIAG_CONFIG_H\r
 #define ZDIAG_CONFIG_H\r
 \r
-#define DFX_OFFLINE_LOG_MUTI_FILE_NUM   20                      /* 离线日志最大文件个数 */\r
+#define DFX_OFFLINE_LOG_MUTI_FILE_NUM   5                       /* 离线日志最大文件个数 */\r
 #define DFX_OFFLINE_LOG_FILE_SIZE       (1024 * 1024)           /* 离线日志每个文件最大字节数 */\r
 #define DFX_OFFLINE_LOG_PATH            "/user/log/"            /* 离线日志存放路径 */\r
 #define DFX_OFFLINE_LOG_NAME            "log_file_diag.bin"     /* 离线日志文件名 */\r
diff --git a/code/sdk/middleware/chips/brandy/dfx/mon_log_output.c b/code/sdk/middleware/chips/brandy/dfx/mon_log_output.c
new file mode 100644 (file)
index 0000000..f145947
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2023-2023. All rights reserved. \n
+ * Description: log output monitor.
+ */
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <log_module_id.h>
+#include <diag_log.h>
+#include <diag_msg.h>
+#include <osal_timer.h>
+#include "common_def.h"
+#include "mon_log_output.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+#endif /* __cplusplus */
+#define MODULEID_COUNT (MODULEID_BUTT + 2)
+STATIC uint32_t g_mon_logcnt_max[MODULEID_COUNT] = { 0,
+                                                     MAX_LOGCNT_BT,
+                                                     0,
+                                                     MAX_LOGCNT_DSP,
+                                                     MAX_LOGCNT_PF,
+                                                     MAX_LOGCNT_MEDIA,
+                                                     0,
+                                                     MAX_LOGCNT_APP,
+                                                     MAX_LOGCNT_GPU,
+                                                     MAX_LOGCNT_GUI,
+                                                     0,
+                                                     MAX_LOGCNT_BTH,
+                                                     MAX_LOGCNT_OHOS,
+                                                     0,
+                                                     MAX_LOGCNT_BT_STATUS,
+                                                     MAX_LOGCNT_BT_OTA };
+STATIC uint32_t g_mon_logcnt_ctrl[MODULEID_COUNT] = { 0 };
+STATIC osal_timer g_logcnt_timer = { 0 };
+STATIC bool g_logcnt_en = false;
+
+STATIC void mon_logcnt_enable(void)
+{
+    for (uint32_t i = 0; i < MODULEID_COUNT; i++) {
+        g_mon_logcnt_ctrl[i] = 0;
+    }
+
+    osal_timer_start(&g_logcnt_timer);
+}
+
+STATIC void mon_log_output_timer_alert(unsigned long data)
+{
+    unused(data);
+    mon_logcnt_enable();
+}
+
+STATIC bool mon_logcnt_process(uint8_t mid, uint8_t level)
+{
+    unused(level);
+    if (mid >= MODULEID_COUNT) {
+        return false;
+    }
+
+    if ((g_logcnt_en == true) && (g_mon_logcnt_max[mid] < g_mon_logcnt_ctrl[mid])) {
+        return false;
+    }
+
+    g_mon_logcnt_ctrl[mid]++;
+    return true;
+}
+
+void mon_log_output_ctrl_init(void)
+{
+    g_logcnt_timer.handler = mon_log_output_timer_alert;
+    g_logcnt_timer.data = 0;
+    g_logcnt_timer.interval = MON_LOG_CNT_CLEAR_TIMEOUT;
+
+    if (osal_timer_init(&g_logcnt_timer) < 0) {
+        uapi_diag_error_log(0, "Create logcnt timer failed!");
+        return;
+    }
+
+    /* register log file hook */
+    uapi_diag_register_msg_flow_control_hook(mon_logcnt_process);
+
+    osal_timer_start(&g_logcnt_timer);
+}
+
+uint32_t *mon_log_output_get_counter(void)
+{
+    return &g_mon_logcnt_ctrl;
+}
+
+void mon_log_output_enable(bool enable)
+{
+    if (g_logcnt_en == enable) {
+        return; /* Same settings, do nothing */
+    }
+
+    g_logcnt_en = enable;
+
+    if (enable == true) {
+        mon_logcnt_enable(); /* start over counting */
+    } else {
+        osal_timer_stop(&g_logcnt_timer); /* continue counting, but do not clear */
+    }
+}
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* __cplusplus */
+
diff --git a/code/sdk/middleware/chips/brandy/dfx/mon_log_output.h b/code/sdk/middleware/chips/brandy/dfx/mon_log_output.h
new file mode 100644 (file)
index 0000000..59c1a5a
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2023-2023. All rights reserved. \n
+ * Description: log output monitor.
+ */
+
+#ifndef MON_LOG_OUTPUT_H
+#define MON_LOG_OUTPUT_H
+
+#include "stdint.h"
+#include "stdbool.h"
+
+#ifdef __cplusplus
+#if __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+#endif /* __cplusplus */
+
+#define MON_LOG_CNT_CLEAR_TIMEOUT       (1000 * 60 * 15)  /* 15 min */
+#define MAX_LOGCNT_BT             9000
+#define MAX_LOGCNT_DSP            1000
+#define MAX_LOGCNT_PF             2000
+#define MAX_LOGCNT_MEDIA          1000
+#define MAX_LOGCNT_APP            5000
+#define MAX_LOGCNT_GPU            2000
+#define MAX_LOGCNT_GUI            1000
+#define MAX_LOGCNT_BTH            3000
+#define MAX_LOGCNT_OHOS           1000
+#define MAX_LOGCNT_BT_STATUS      3000
+#define MAX_LOGCNT_BT_OTA         3000
+
+void mon_log_output_ctrl_init(void);
+uint32_t *mon_log_output_get_counter(void);
+void mon_log_output_enable(bool enable);
+
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* __cplusplus */
+
+#endif
index 7b3c3c0..ea74ec4 100755 (executable)
@@ -338,7 +338,9 @@ void diag_debug_cmd_proc(uint8_t *data, uint32_t len)
 void diag_auto_log_report_enable(void)\r
 {\r
     uint32_t level[] = {\r
+#ifndef USER_VERSION\r
         DIAG_LOG_LEVEL_DBG,\r
+#endif\r
         DIAG_LOG_LEVEL_INFO,\r
         DIAG_LOG_LEVEL_WARN,\r
         DIAG_LOG_LEVEL_ERROR,\r
@@ -354,6 +356,7 @@ void diag_auto_log_report_enable(void)
         LOG_OTA_MODULE,\r
         LOG_OHOSMODULE,\r
         LOG_BTHMODULE,\r
+        LOG_GPUMODULE,\r
     };\r
 \r
 #ifndef FT_SINGLE_UART\r
index 9e0d1e4..15e8e13 100755 (executable)
@@ -13,6 +13,9 @@ elseif (${ARCH_FAMILY} STREQUAL "riscv")
     set(SOURCES
         ${CMAKE_CURRENT_SOURCE_DIR}/exception_riscv.s
         ${CMAKE_CURRENT_SOURCE_DIR}/exception_riscv.c
+        ${CMAKE_CURRENT_SOURCE_DIR}/chip_system_time.c
+        ${CMAKE_CURRENT_SOURCE_DIR}/chip_exception_utils.c
+        ${CMAKE_CURRENT_SOURCE_DIR}/exception_dump.c
     )
 endif()
 
diff --git a/code/sdk/middleware/chips/brandy/exception/chip_exception_utils.c b/code/sdk/middleware/chips/brandy/exception/chip_exception_utils.c
new file mode 100644 (file)
index 0000000..0af3409
--- /dev/null
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.
+ * Description: utils
+ * Author:
+ * Create:
+ */
+#include "chip_exception_utils.h"
+#include <stdbool.h>
+#include "hal_reboot.h"
+#include "chip_io.h"
+
+#define STATUS_ADDRESS  0x5702C1E8
+#define VBUS_INSERT_POS 4
+#define PWREN_PRESS_POS 3
+
+bool is_first_power_on(void)
+{
+    return hal_reboot_get_first_power_on_flag();
+}
+
+bool is_vbus_insert(void)
+{
+    if (reg32_getbit(STATUS_ADDRESS, VBUS_INSERT_POS)) {
+        return true;
+    }
+    return false;
+}
+
+bool is_pwren_press(void)
+{
+    if (reg32_getbit(STATUS_ADDRESS, PWREN_PRESS_POS)) {
+        return true;
+    }
+    return false;
+}
\ No newline at end of file
diff --git a/code/sdk/middleware/chips/brandy/exception/chip_exception_utils.h b/code/sdk/middleware/chips/brandy/exception/chip_exception_utils.h
new file mode 100644 (file)
index 0000000..2a7a679
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.
+ * Description: utils
+ * Author:
+ * Create:
+ */
+#ifndef CHIP_EXCEPTION_UTILS_H
+#define CHIP_EXCEPTION_UTILS_H
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stdbool.h>
+
+/**
+ * @brief Check if this is the first power-on since the device was battery-powered.
+ * @return true if this is the first power-on, false otherwise.
+ */
+bool is_first_power_on(void);
+
+/**
+ * @brief Check if the VBUS (power supply) is inserted.
+ * @return true if VBUS is inserted, false otherwise.
+ */
+bool is_vbus_insert(void);
+
+/**
+ * @brief Check if the power button (PWREN) is being pressed.
+ * @return true if PWREN is pressed, false otherwise.
+ */
+bool is_pwren_press(void);
+#endif
diff --git a/code/sdk/middleware/chips/brandy/exception/chip_system_time.c b/code/sdk/middleware/chips/brandy/exception/chip_system_time.c
new file mode 100644 (file)
index 0000000..36c2131
--- /dev/null
@@ -0,0 +1,152 @@
+/**
+ * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.
+ * Description: get time
+ * Author:
+ * Create:
+ */
+#ifndef BUILD_APPLICATION_SSB
+
+#include "chip_system_time.h"
+
+#define SECONDS_PER_MINUTE      60 /* second per minute */
+#define MINUTES_PER_HOUR        60   /* second per minute */
+#define MSEC_PER_SEC            1000
+#define USEC_PER_MSEC           1000
+#define TZ_ADDRESS              0x5702C014
+#define MAX_TIMEZONE_HOURS      24
+#define TIME_MAX                64
+
+void print_time(calendar_t *date)
+{
+    printf("CALLENDAR:year = %d, month = %d, day = %d, hour = %d, minute = %d, second = %d \r\n",
+        date->year,
+        date->mon,
+        date->day,
+        date->hour,
+        date->min,
+        date->sec);
+}
+
+void print_time_2(struct tm *date)
+{
+    printf("TM:year = %d, month = %d, day = %d, hour = %d, minute = %d, second = %d \r\n",
+        date->tm_year + 1900,
+        date->tm_mon,
+        date->tm_mday,
+        date->tm_hour,
+        date->tm_min,
+        date->tm_sec);
+}
+
+static uint16_t get_timezone(void)
+{
+    return readw(TZ_ADDRESS) & 0x00FF;
+}
+
+static void set_timezone(uint16_t timezone)
+{
+    uint16_t tz_zone = readw(TZ_ADDRESS) & 0xFF00;
+    tz_zone = tz_zone | timezone;
+    writew(TZ_ADDRESS, tz_zone);
+}
+
+void save_time(void)
+{
+    uint64_t time_sec = get_local_timestamp();
+    time_sec = time_sec * MSEC_PER_SEC;
+    uapi_calendar_set_timestamp(time_sec);
+}
+
+uint32_t get_current_timestamp(void)
+{
+    uint32_t timestamp = 0;
+    struct timeval current_time = {0};
+    if (gettimeofday(&current_time, NULL)) {
+        return 0;
+    }
+    struct tm tm;
+    localtime_r(&current_time.tv_sec, &tm);
+    timestamp = (uint32_t)current_time.tv_sec;
+    return timestamp;
+}
+
+uint32_t get_local_timestamp(void)
+{
+    uint32_t timestamp = get_current_timestamp() + get_timezone() * MINUTES_PER_HOUR * SECONDS_PER_MINUTE;
+    return timestamp;
+}
+
+void get_current_time(struct timeval *tv, struct tm *tm)
+{
+    char timebuf[TIME_MAX] = {0};
+    if (gettimeofday(tv, NULL)) {
+        return;
+    }
+    localtime_r(&tv->tv_sec, tm);
+    tm->tm_mon = tm->tm_mon + 1;
+    printf("get_current_time tv_tv_sec = %d \r\n", tv->tv_sec);
+    print_time_2(tm);
+}
+
+void restore_time(void)
+{
+    uapi_ulp_systick_soc_calibration();
+    calendar_t date;
+    uapi_calendar_get_datetime(&date);
+    print_time(&date);
+    uint64_t sec;
+    uapi_calendar_get_timestamp(&sec);
+    printf("callendar timestamp = %lld \r\n", sec);
+    sec = sec / MSEC_PER_SEC;
+    sync_time(sec, get_timezone());
+}
+
+uint32_t sync_time(uint32_t timestamp, uint32_t timezone)
+{
+    printf("sync time timestamp %d, timezone %d \r\n", timestamp, timezone);
+    uint32_t seconds;
+    if (timezone > MAX_TIMEZONE_HOURS) {
+        return ERRCODE_FAIL;
+    }
+    if (timestamp == 0) {
+        return ERRCODE_FAIL;
+    } else if (timestamp <= (timezone * MINUTES_PER_HOUR * SECONDS_PER_MINUTE)) {
+        seconds = 0;
+    } else {
+        seconds = timestamp - (timezone * MINUTES_PER_HOUR * SECONDS_PER_MINUTE);
+    }
+    set_timezone(timezone);
+    struct timeval tv = {0};
+    struct timezone tzone = {0};
+    tv.tv_sec = seconds;
+    tv.tv_usec = 0;
+    tzone.tz_dsttime = 0;
+    tzone.tz_minuteswest = timezone * MINUTES_PER_HOUR;
+    return settimeofday(&tv, &tzone);
+}
+
+void test_bandy_time(void)
+{
+    struct tm tm;
+    struct timeval tv;
+    uint32_t time = 1716044461;  // 2024-5-18 15:1:1
+    printf("--------SYNC TIME----------\r\n");
+    get_current_timestamp();
+    get_current_time(&tv, &tm);
+    sync_time(time, 8);
+    get_current_timestamp();
+    get_current_time(&tv, &tm);
+    printf("--------SAVE TIME----------\r\n");
+    get_current_timestamp();
+    get_current_time(&tv, &tm);
+    save_time();
+    get_current_timestamp();
+    get_current_time(&tv, &tm);
+    printf("--------RESTORE TIME----------\r\n");
+    get_current_timestamp();
+    get_current_time(&tv, &tm);
+    restore_time();
+    get_current_timestamp();
+    get_current_time(&tv, &tm);
+}
+#endif
\ No newline at end of file
diff --git a/code/sdk/middleware/chips/brandy/exception/chip_system_time.h b/code/sdk/middleware/chips/brandy/exception/chip_system_time.h
new file mode 100644 (file)
index 0000000..d2f2e77
--- /dev/null
@@ -0,0 +1,67 @@
+/**
+ * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.
+ * Description: time
+ * Author:
+ * Create:
+ */
+#ifndef CHIP_SYSTEM_TIME_H
+#define CHIP_SYSTEM_TIME_H
+
+#ifndef BUILD_APPLICATION_SSB
+#include <stdio.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include "calendar.h"
+#include "chip_io.h"
+#include "errcode.h"
+#include "time.h"
+#include "sys/time.h"
+/**
+ * @brief  Print the time represented by the given calendar date
+ * @return void.
+ */
+void print_time(calendar_t *date);
+
+/**
+ * @brief  Save the current system time to non-volatile memory
+ * @return void.
+ */
+void save_time(void);
+
+/**
+ * @brief  Get the current system time as a Unix timestamp
+ * @return void.
+ */
+uint32_t get_current_timestamp(void);
+
+/**
+ * @brief  Get the current system time as a timeval struct and a tm
+ * @return void.
+ */
+void get_current_time(struct timeval *tv, struct tm *tm);
+
+/**
+ * @brief  Restore the system time from the saved non-volatile
+ * @return void.
+ */
+void restore_time(void);
+
+/**
+ * @brief  Synchronize the system time with the given timestamp and timezone
+ * @return void.
+ */
+uint32_t sync_time(uint32_t timestamp, uint32_t timezone);
+
+/**
+ * @brief  use for test
+ * @return void.
+ */
+void test_time(void);
+
+/**
+ * @brief  Get the current system time as a local timestamp with timezone offset
+ * @return void.
+ */
+uint32_t get_local_timestamp(void);
+#endif
+#endif
\ No newline at end of file
index ede22b6..77b5f48 100755 (executable)
@@ -519,6 +519,7 @@ errcode_t emmc_exc_info_write(void);
 #endif
 #endif
 void reset_deal_with_fs(void);
+bool get_exception_status(void);
 /**
   * @}
   */
diff --git a/code/sdk/middleware/chips/brandy/exception/exception_dump.c b/code/sdk/middleware/chips/brandy/exception/exception_dump.c
new file mode 100644 (file)
index 0000000..6d42aea
--- /dev/null
@@ -0,0 +1,99 @@
+/**
+ * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.
+ * Description: dump
+ * Author:
+ * Create:
+ */
+#include "exception_dump.h"
+#include <stdio.h>
+#include <string.h>
+#include "exception.h"
+#include "memory_config.h"
+#include "time.h"
+#include "sys/time.h"
+#include "chip_io.h"
+#ifdef CFG_DRIVERS_NANDFLASH
+#include "nandflash_config.h"
+
+#define PSRAM_DUMP_TO_FILE_LENGTH   0x40000  // 256KB
+
+void exception_dump_memory_to_file(char *file_name, uint32_t dump_time, uintptr_t startAddr, uint32_t length)
+{
+    char *str = (char *)malloc(200);
+    memset_s(str, 200, 0, 200);
+    sprintf(str, file_name, dump_time);
+    exc_info_write(str, 0, (const uint8_t *)startAddr, length);
+}
+
+typedef struct {
+    char *name;
+    uintptr_t start_addr;
+    uint32_t len;
+} mem_dump_to_file_t;
+
+static const mem_dump_to_file_t g_mem_dump_to_file_info[] = {
+    {"/user/exc/APP_DTCM_ORIGIN_%d.bin", APP_DTCM_ORIGIN, APP_DTCM_LENGTH},
+    {"/user/exc/MCPU_TRACE_MEM_REGION_%d.bin", MCPU_TRACE_MEM_REGION_START, CPU_TRACE_MEM_REGION_LENGTH},
+    {"/user/exc/PSRAM_ORIGIN_%d.bin", PSRAM_APP_DATA_ADDR, PSRAM_DUMP_TO_FILE_LENGTH},
+};
+
+void dump_mem_to_file(uint32_t time_sec)
+{
+    uint16_t count = (uint16_t)(sizeof(g_mem_dump_to_file_info) / sizeof(mem_dump_to_file_t));
+    for (uint8_t i = 0; i < count; i++) {
+        exception_dump_memory_to_file(g_mem_dump_to_file_info[i].name,
+            time_sec,
+            g_mem_dump_to_file_info[i].start_addr,
+            g_mem_dump_to_file_info[i].len);
+    }
+}
+#endif
+
+#ifdef CFG_DUMP_REG_SUPPORT
+char *g_regist_str  = "[PMU1_B_SOC_PWR_EN_REG %x, %x]\r\n
+                     [PMU1_BT_CBB_PWR_EN_REG %x, %x]\r\n
+                     [PMU1_BMEM_PWR_EN_REG %x, %x]\r\n
+                     [PMU1_BT_EM_PWR_EN_REG %x, %x]\r\n
+                     [PMU1_MCU_HS_PWR_EN_REG %x, %x]\r\n
+                     [PMU1_DSUB_PWR_EN_REG %x, %x]\r\n
+                     [PMU1_ASUB_PWR_EN_REG %x, %x]\r\n
+                     [PMU1_S_EGPIO_PWR_EN_REG %x, %x]\r\n
+                     [PMU1_BT_RF_PWR_EN_REG %x, %x]\r\n
+                     [PMU1_MCU_PWR_EN_REG %x, %x]\r\n
+                     [PMU1_MEM_PWR_EN_REG %x, %x]\r\n
+                     [PMU1_COM_PWR_EN_REG %x, %x]";
+static const char *g_reg_path = "/user/exc/reg_path%d.txt";
+
+void dump_reg_to_file(uint32_t time_sec)
+{
+    char *file_name = (char *)malloc(100);
+    sprintf(file_name, g_reg_path, time_sec);
+    char *str = (char *)malloc(500);
+    uint32_t ctrl_base = 0x57004000;
+    sprintf(str, g_regist_str,
+                  ctrl_base + 0x20,  readl(ctrl_base + 0x20),
+                  ctrl_base + 0x24,  readl(ctrl_base + 0x24),
+                  ctrl_base + 0x28,  readl(ctrl_base + 0x28),
+                  ctrl_base + 0x2c,  readl(ctrl_base + 0x2c),
+                  ctrl_base + 0x30,  readl(ctrl_base + 0x30),
+                  ctrl_base + 0x34,  readl(ctrl_base + 0x34),
+                  ctrl_base + 0x38,  readl(ctrl_base + 0x38),
+                  ctrl_base + 0x5c,  readl(ctrl_base + 0x5c),
+                  ctrl_base + 0x60,  readl(ctrl_base + 0x60),
+                  ctrl_base + 0x64,  readl(ctrl_base + 0x64),
+                  ctrl_base + 0x68,  readl(ctrl_base + 0x68),
+                  ctrl_base + 0x78,  readl(ctrl_base + 0x78));
+    exc_info_write(file_name, 0, (uint8_t *)str, strlen(str));
+}
+#endif
+
+void dump_all_to_file(void)
+{
+    uint32_t timestamp = get_local_timestamp();
+#ifdef CFG_DRIVERS_NANDFLASH
+    dump_mem_to_file(timestamp);
+#endif
+#ifdef CFG_DUMP_REG_SUPPORT
+    dump_reg_to_file(timestamp);
+#endif
+}
\ No newline at end of file
diff --git a/code/sdk/middleware/chips/brandy/exception/exception_dump.h b/code/sdk/middleware/chips/brandy/exception/exception_dump.h
new file mode 100644 (file)
index 0000000..e375ec1
--- /dev/null
@@ -0,0 +1,16 @@
+/**
+ * Copyright (c) CompanyNameMagicTag 2023-2023. All rights reserved.
+ * Description: dump
+ * Author:
+ * Create:
+ */
+#ifndef EXCEPTION_DUMP_H
+#define EXCEPTION_DUMP_H
+
+/**
+ * @brief  support nandflash storage dump sysmem to file.
+ * @return void.
+ */
+void dump_all_to_file(void);
+
+#endif
\ No newline at end of file
index 5d9652d..0a0e6d1 100755 (executable)
@@ -13,6 +13,8 @@
 #include "non_os_reboot.h"\r
 #include "watchdog_porting.h"\r
 #include "flash.h"\r
+#include "exception_dump.h"\r
+\r
 #if defined(BUILD_APPLICATION_STANDARD) && !defined(BUILD_RECOVERY_IMAGE)\r
 #include "nv.h"\r
 #endif\r
@@ -114,7 +116,7 @@ exc_info_t g_exc_info;
 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
@@ -137,12 +139,13 @@ static const char *g_exc_info_path = "/user/exc/exc_info.bin";
 static volatile uint32_t g_bt_nmi_reboot = 0;\r
 static volatile uint32_t g_bt_nmi_mask = 0;\r
 #endif\r
-#if MASTER_BY_BRANDY_ONLY\r
-#define PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG 0x57000014\r
-#define PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL 0xb66\r
-#define PM_MCU_SEND_IPC_WKUP_BT_REG        0x52000034\r
-#define PM_MCU_SEND_IPC_WKUP_BT_BIT        0x1\r
-#endif\r
+\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
@@ -827,6 +830,7 @@ static errcode_t exc_info_write_local(exc_info_save_t *exc_info_save, uint32_t e
     nand_driver_init(SPEED_SLOW);\r
     set_trans_type(TRANS_BY_CPU_SINGLE_LINE);\r
     ret = exc_info_write(g_exc_info_path, 0, (const uint8_t *)exc_info_save, exc_size);\r
+    dump_all_to_file();\r
 #endif\r
 #ifdef CFG_DRIVERS_MMC\r
     char *exc_info_buffer = (char *)osal_kmalloc_align(ONE_SECTOR_SIZE, 0, MMC_BUFFER_ALIGN);\r
@@ -915,7 +919,7 @@ void do_hard_fault_handler(exc_context_t *exc_buf_addr)
     uapi_flash_switch_to_xip_mode(CHIP_FLASH_ID);\r
 #if (CORE == MASTER_BY_ALL) && (CORE != WIFI)\r
     if (g_is_repeat_exc == true) {\r
-        cpu_utils_reset_chip_with_log((cores_t)MASTER_BY_ALL, REBOOT_CAUSE_APPLICATION_HARDFAULT);\r
+        cpu_utils_reset_chip_with_log((cores_t)MASTER_BY_ALL, REBOOT_CAUSE_APPLICATION_SECOND_FAULT);\r
     }\r
     /* If the process is restarted at the end of an abnormal process, the value of this variable is false. */\r
     /* Do not need to manually set false at the end. */\r
@@ -953,7 +957,6 @@ void do_hard_fault_handler(exc_context_t *exc_buf_addr)
     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
@@ -974,11 +977,6 @@ void reset_deal_with_fs(void)
 static void deal_with_exception(exc_context_t *exc_buf_addr, uint32_t exc_type, reboot_cause_t reset_cause)\r
 {\r
     UNUSED(reset_cause);\r
-#if MASTER_BY_BRANDY_ONLY\r
-    // when bt at sleep, need wkup bt before soft reset\r
-    writew(PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG, PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL);\r
-    reg16_setbit(PM_MCU_SEND_IPC_WKUP_BT_REG, PM_MCU_SEND_IPC_WKUP_BT_BIT);\r
-#endif\r
 #if defined(BUILD_APPLICATION_STANDARD) && (CORE == MASTER_BY_ALL)\r
     set_exception_time_stamp();\r
     // Record the reason before wait, so apps can get the reason.\r
@@ -998,6 +996,8 @@ static void deal_with_exception(exc_context_t *exc_buf_addr, uint32_t exc_type,
 #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
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from code/sdk/middleware/chips/brandy/nv/nv_config/cfg/acore/app.json
rename to code/sdk/middleware/chips/brandy/nv/nv_config/cfg/eng/acore/app.json
index 1e6fff5..e71b832
             "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",
                 65576964, 1000, 679102459, 67108874, 327680, 655367, 2126009683,
                 654734439, 1, 0, 0, 0, 0, 0, 10551272, 655336, 4286447619, 64536,
                 500, 16384, 3277, 0, 66049, 0]]
-        },
-        "custom_key_serial_num":{
-            "key_id": "0x1010",
-            "key_status": "alive",
-            "structure_type": "custom_key_sn_t",
-            "attributions": 4,
-            "value": [32, 
-            [0, 0, 0, 0, 0, 0, 0, 0,
-            0, 0, 0, 0, 0, 0, 0, 0,
-            0, 0, 0, 0, 0, 0, 0, 0,
-            0, 0, 0, 0, 0, 0, 0, 0]]
         }
     }
 }
diff --git a/code/sdk/middleware/chips/brandy/nv/nv_config/cfg/user/acore/app.json b/code/sdk/middleware/chips/brandy/nv/nv_config/cfg/user/acore/app.json
new file mode 100644 (file)
index 0000000..11a5df8
--- /dev/null
@@ -0,0 +1,92 @@
+{
+    "common":{
+        "module_id": "0x0", 
+        "secure_conn":{
+            "key_id": "0x2001",
+            "key_status": "alive",
+            "structure_type": "ext_nv_secure_conn_t",
+            "attributions": 1,
+            "value": [[
+                       243, 241, 252, 189, 233, 154, 35, 34, 155, 96, 183, 133, 229, 196, 190, 222, 180, 146, 211, 63,
+                       59, 38, 229, 100, 24, 165, 216, 53, 120, 133, 104, 166, 31, 6, 220, 125, 87, 47, 131, 42, 74,
+                       240, 107, 111, 146, 239, 251, 229, 146, 99, 46, 4, 38, 183, 99, 2, 47, 215, 88, 151, 178, 198,
+                       148, 222, 135, 2, 156, 203, 192, 138, 178, 118, 6, 110, 40, 38, 235, 31, 220, 118, 53, 75, 152,
+                       32, 246, 4, 225, 131, 242, 96, 176, 20, 131, 184, 39, 88, 96, 7, 205, 231, 158, 10, 136, 178,
+                       32, 19, 156, 88, 133, 93, 18, 251, 35, 146, 58, 83, 25, 188, 84, 151, 99, 38, 102, 48, 240, 214,
+                       157, 197, 88, 160, 224, 71, 174, 4, 216, 234, 117, 87, 53, 132, 204, 99, 62, 201, 61, 116, 186,
+                       29, 201, 172, 140, 176, 226, 123, 55, 95, 18, 197, 30, 244, 19, 143, 112, 12, 29, 162, 188, 208,
+                       48, 242, 108, 76, 170, 139, 140, 198, 177, 233, 251, 57, 91, 10, 70, 117, 231, 226, 67, 26, 55,
+                       249, 144, 165, 75, 125, 215, 220, 190, 199, 116, 40, 221, 0, 17, 90, 25, 11, 47, 177, 255, 218,
+                       153, 254, 127, 237, 211, 170, 174, 104, 76, 47, 136, 193, 0, 147, 157, 74, 213, 180, 143, 240,
+                       173, 98, 90, 27, 30, 213, 217, 247, 50, 147, 202, 224, 54, 147, 34, 19, 177, 128, 27, 123, 101,
+                       242, 36, 68, 71, 184, 62, 166, 134, 86, 98, 216, 120, 123, 191, 49, 135, 105, 187, 38, 241, 125,
+                       26, 80, 141, 151, 222, 240, 253, 115, 102, 86, 118, 153, 214, 4, 209, 186, 110, 50, 105, 194,
+                       100, 125, 242, 51, 117, 118, 107, 164, 133, 229, 157, 221, 114, 121, 152, 204, 57, 119, 176,
+                       167, 75, 208, 156, 243, 138, 176, 50, 102, 121, 69, 22, 21, 225, 41, 216, 247, 133, 47, 129, 74,
+                       20, 79, 236, 42, 38, 134, 68, 224, 200, 42, 223, 23, 191, 88, 221, 31, 133, 145, 171, 46, 98, 4,
+                       202, 160, 0, 89, 222, 92, 67, 160, 163, 185, 52, 70, 129, 62, 112, 1, 223, 187, 218, 241, 25,
+                       215, 129, 196, 249, 32, 201, 96, 249, 165
+                      ],
+                      [15,238,119,231,29,44,120,58,55,14,80,125,220,227,124,8,39,0,104,162],20]
+        },
+        "offline_enable_flag":{
+            "key_id": "0x2002",
+            "key_status": "alive",
+            "structure_type": "uint8_t",
+            "attributions": 1,
+            "value": 1
+        },
+        "btsrv_local_device_info":{
+            "key_id": "0x2101",
+            "key_status": "alive",
+            "structure_type": "btsrv_local_device_info_t",
+            "attributions": 1,
+            "value": [[40,17,6,133,105, 89],0,0,["W","a","t","c","h","D","e","m","o",0]]
+        },
+        "btsrv_paired_device_info":{
+            "key_id": "0x2102",
+            "key_status": "alive",
+            "structure_type": "btsrv_paired_device_info_t",
+            "attributions": 1,
+            "value": [0]
+        },
+        "btsrv_tx_power_info":{
+            "key_id": "0x2103",
+            "key_status": "",
+            "structure_type": "btsrv_calibration_config_t",
+            "attributions": 1,
+            "value": [8,[75,75,75,75,55,55,95,95],[2,15,27,31,41,51,66,77],[-28,1818,-6745],0,14,14,14,12,0,0,0,0]
+        },
+        "bth_host_config": {
+            "key_id": "0x2104",
+            "key_status": "alive",
+            "structure_type": "bth_product_data_config_t",
+            "attributions": 1,
+            "value": [0]
+        },
+        "audio_vqe_param":{
+            "key_id": "0x320C",
+            "key_status": "alive",
+            "structure_type": "audio_vqe_param_t",
+            "attributions": 1,
+            "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",
+            "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, 327690, 13107205,
+                65576964, 1000, 679102459, 67108874, 327680, 655367, 2126009683,
+                654734439, 1, 0, 0, 0, 0, 0, 10551272, 655336, 4286447619, 64536,
+                500, 16384, 3277, 0, 66049, 0]]
+        }
+    }
+}
index 16c84a7..d8b0f2b 100755 (executable)
@@ -39,6 +39,8 @@ typedef enum {
     PM_ID_STORAGE,
     PM_ID_TOUCH,
     PM_ID_JPEG,
+       PM_ID_JS,
+       PM_ID_MSGCENTER,
     PM_ID_HEART,//新增,心率芯片
     PM_ID_MOTOR,//新增,马达
     PM_ID_GSENSOR,//新增,加速计
index 959d333..a67bea2 100755 (executable)
@@ -144,6 +144,8 @@ void pm_core_suspend(void)
         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();
@@ -225,8 +227,8 @@ void pm_core_resume_min(void)
     clocks_system_resume_clock();
     uapi_dma_init();
     uapi_dma_open();
+    cpu_trace_enable_mcpu_repeat();
     storage_device_resume();
-
     reg16_setbit(0x520003e4, 0x0); // set mcpu_clken_slp in MSUB_SLP_CFG
     reg16_setbit(0x520003e4, 0x1); // set mcpu_hclken_slp in MSUB_SLP_CFG
     clocks_auto_cg_config();
@@ -272,6 +274,8 @@ void pm_core_resume(void)
     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();
     }
index e54d543..e0af7a8 100755 (executable)
@@ -48,9 +48,6 @@
 #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];
@@ -353,8 +350,6 @@ void display_suspend_tmp(void)
     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)
index 71da1bb..4d58f18 100755 (executable)
 #define PM_SLEEP_SEL_EVENT            0x777
 #define PM_SLEEP_TRACE_DEF_VAL        0x5a5a
 #define PM_OS_US_TO_MS                  1000
-#define PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG 0x57000014
-#define PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL 0xb66
-#define PM_MCU_SEND_IPC_WKUP_BT_REG        0x52000034
-#define PM_MCU_SEND_IPC_WKUP_BT_VAL        0x2
-#define BT_RESET_DELAY  10
 
 enum {
     PM_SLEEP_STATE_IDLE,
@@ -176,9 +171,6 @@ void pm_enter_deep_sleep_wfi(void)
 
 void pm_wkup_event_by_ulp_callback(void)
 {
-    writew(PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG, PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL);
-    writew(PM_MCU_SEND_IPC_WKUP_BT_REG, PM_MCU_SEND_IPC_WKUP_BT_VAL);
-    uapi_tcxo_delay_ms(BT_RESET_DELAY);
     set_cpu_utils_reset_cause(REBOOT_CAUSE_APPLICATION_SYSRESETREQ);
     hal_reboot_chip();
 }
index 524e670..b414a90 100755 (executable)
 
 #define MS_ID_ADDR                         0xF8
 #define CHIP_ID_ADDR                       OTP_CHIP_ID_START
-#define TCXO_REBOOT_DELAY                  500ULL
-#define PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG 0x57000014
-#define PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL 0xb66
-#define PM_MCU_SEND_IPC_WKUP_BT_REG        0x52000034
-#define PM_MCU_SEND_IPC_WKUP_BT_VAL        0x2
 #define SUB_RSA4096_PUBKEY_N_OFFSET        24
 
 #define uapi_array_size(_array)  (sizeof(_array) / sizeof((_array)[0]))
@@ -187,11 +182,6 @@ errcode_t upg_get_fota_partiton_area_addr(uint32_t *start_address, uint32_t *siz
  */
 void upg_reboot(void)
 {
-    // when bt at sleep, need wkup bt before soft reset
-    writew(PM_SLEEP_SOFT_RESET_FORCE_WKUP_REG, PM_SLEEP_SOFT_RESET_FORCE_WKUP_VAL);
-    writew(PM_MCU_SEND_IPC_WKUP_BT_REG, PM_MCU_SEND_IPC_WKUP_BT_VAL);
-    /* 重启前睡眠500ms */
-    uapi_tcxo_delay_ms((uint64_t)TCXO_REBOOT_DELAY);
     cpu_utils_set_system_status_by_cause(REBOOT_CAUSE_UPG_COMPLETION);
     hal_reboot_chip();
 }
index 5c1a5f3..a5a267e 100755 (executable)
@@ -435,16 +435,15 @@ td_void uapi_jpeg_decompress_destroy(jpeg_decompress_ptr dinfo)
 \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
index 4185740..4f3fb54 100755 (executable)
@@ -184,6 +184,11 @@ static td_s32 vau_draw_make_path(const ext_vau_path *path, vau_hardware_node *no
         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);
index 418dcd1..18775ee 100755 (executable)
@@ -30,7 +30,6 @@ static td_void dpu_hal_reg_unmap(void)
 {\r
     if (g_dpu_reg != TD_NULL) {\r
         osal_iounmap((void *)g_dpu_reg, sizeof(dpu_regs_type));\r
-        g_dpu_reg = TD_NULL;\r
     }\r
     return;\r
 }\r
index f2991bf..76d7580 100755 (executable)
@@ -14,6 +14,7 @@
 #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
@@ -31,6 +32,16 @@ static td_s32 drv_dpu_close(td_void *private_data)
     return EXT_SUCCESS;\r
 }\r
 \r
+static td_void drv_dpu_set_suspend_flag(td_bool flag)\r
+{\r
+    unsigned long flags = 0;\r
+    dpu_disp_info *disp_info = dpu_disp_get_info();\r
+\r
+    osal_spin_lock_irqsave(&disp_info->disp_lock, &flags);\r
+    g_dpu_suspend_flag = flag;\r
+    osal_spin_unlock_irqrestore(&disp_info->disp_lock, &flags);\r
+}\r
+\r
 td_s32 drv_dpu_suspend(td_void *private_data)\r
 {\r
     uapi_unused(private_data);\r
@@ -39,15 +50,18 @@ td_s32 drv_dpu_suspend(td_void *private_data)
         return EXT_SUCCESS;\r
     }\r
 \r
+    td_s32 ret = dpu_wait_all_finish();\r
+\r
     dpu_dfx_info *dfx_info = dpu_dfx_get_info();\r
     dfx_info->suspend_cnt++;\r
 \r
     dpu_dbg("dpu suspend start");\r
     dpu_hal_deinit();\r
     dpu_layer_suspend();\r
+    drv_dpu_set_suspend_flag(TD_TRUE);\r
     dpu_dbg("dpu suspend ok");\r
 \r
-    return EXT_SUCCESS;\r
+    return ret;\r
 }\r
 \r
 td_s32 drv_dpu_resume(td_void *private_data)\r
@@ -65,6 +79,7 @@ td_s32 drv_dpu_resume(td_void *private_data)
     dpu_hal_init();\r
     dpu_layer_resume();\r
     dpu_disp_chl_cfg();\r
+    drv_dpu_set_suspend_flag(TD_FALSE);\r
     dpu_dbg("dpu resume ok");\r
 \r
     return EXT_SUCCESS;\r
@@ -137,6 +152,11 @@ td_s32 dpu_ioctl(td_s32 module_idx, td_ulong ioctl_cmd, td_void *para)
         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
index e0cef8e..03446a4 100755 (executable)
@@ -151,10 +151,13 @@ td_void dpu_isr_deinit(void)
 td_void dpu_isr_wait_finish(void)\r
 {\r
     td_s32 ret;\r
+    dpu_dfx_info *dfx_info = dpu_dfx_get_info();\r
 \r
     ret = osal_wait_timeout_interruptible(&g_dpu_isr_info.finish_event,\r
                                           isr_get_finish_done, TD_NULL, 500); /* 500 ms */\r
     if (ret <= 0) {\r
+        dfx_info->refresh_total = 0;\r
+        dfx_info->frm_done_total = 0;\r
         dpu_err("osal_wait_timeout!!!!");\r
         return;\r
     }\r
@@ -182,3 +185,26 @@ td_void dpu_isr_clear_finish_flag(void)
 {\r
     g_dpu_isr_info.finish_done = 0;\r
 }\r
+\r
+td_s32 dpu_wait_all_finish(td_void)\r
+{\r
+    unsigned long flag = 0;\r
+    dpu_dfx_info *dfx_info = dpu_dfx_get_info();\r
+    const td_u32 wait_time = 200;\r
+    td_u32 cnt = 0;\r
+\r
+    while (cnt++ < wait_time) {\r
+        osal_spin_lock_irqsave(&g_dpu_isr_info.isr_lock, &flag);\r
+        if (dfx_info->refresh_total == dfx_info->frm_done_total) {\r
+            osal_spin_unlock_irqrestore(&g_dpu_isr_info.isr_lock, &flag);\r
+            break;\r
+        }\r
+        osal_spin_unlock_irqrestore(&g_dpu_isr_info.isr_lock, &flag);\r
+        osal_udelay(100); // 100us\r
+    }\r
+    if (cnt >= wait_time) {\r
+        dpu_err("dpu_wait_all_finish timeout!!!!");\r
+        return EXT_FAILURE;\r
+    }\r
+    return EXT_SUCCESS;\r
+}\r
index b8ab241..4dedbc6 100755 (executable)
@@ -21,6 +21,7 @@ td_void dpu_isr_deinit(void);
 td_void dpu_isr_wait_finish(void);\r
 td_void dpu_isr_wait_te_signal(void);\r
 td_void dpu_isr_clear_finish_flag(void);\r
+td_s32 dpu_wait_all_finish(td_void);\r
 \r
 #ifdef __cplusplus\r
 #if __cplusplus\r
index f94c87b..b02f228 100755 (executable)
@@ -91,8 +91,6 @@ static td_void dpu_layer_set_run_info(dpu_layer_run_info *run_info, const drv_dp
     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
@@ -180,6 +178,16 @@ static td_void dpu_layer_yuv_base_config(dpu_layer_dev *layer_dev)
     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
@@ -283,17 +291,14 @@ static td_void dpu_layer_calculate_gp_region(ext_rect *gp_region)
     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
index 408234f..f5a72e7 100755 (executable)
@@ -119,6 +119,11 @@ td_s32 gmmu_ioctl(td_s32 module_idx, td_ulong ioctl_cmd, td_void *para)
         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;
     }
index 848bd8c..2ba04ef 100755 (executable)
@@ -80,16 +80,14 @@ td_s32 jpeg_dev_close(td_void)
     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;
 }
index 80db255..e0f6adb 100755 (executable)
@@ -22,8 +22,8 @@ extern "C" {
 
 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
index b4268d1..02439a8 100755 (executable)
@@ -50,6 +50,8 @@ typedef struct {
     td_float start_cost;
     td_float get_status_cost;
     td_float init_cost;
+    td_u32 create_cnt;
+    td_u32 destroy_cnt;
 } drv_jpeg_dfx_info;
 
 
index 00d4ca8..de4d115 100755 (executable)
@@ -17,6 +17,7 @@
 
 #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);
@@ -68,18 +69,33 @@ static td_s32 drv_jpeg_close(td_void *private_data)
     return EXT_SUCCESS;
 }
 
+static td_void drv_jpeg_set_suspend_flag(td_bool flag)
+{
+    unsigned long flags = 0;
+    drv_jpeg_context *jpeg_context = jpeg_context_get();
+
+    osal_spin_lock_irqsave(&jpeg_context->lock, &flags);
+    g_jpeg_suspend_flag = flag;
+    osal_spin_unlock_irqrestore(&jpeg_context->lock, &flags);
+}
+
 td_s32 drv_jpeg_suspend(td_void *private_data)
 {
     uapi_unused(private_data);
-    
-    return jpeg_suspend();
+
+    td_s32 ret = jpeg_wait_all_finish();
+    jpeg_suspend();
+    drv_jpeg_set_suspend_flag(TD_TRUE);
+    return ret;
 }
 
 td_s32 drv_jpeg_resume(td_void *private_data)
 {
     uapi_unused(private_data);
 
-    return jpeg_resume();
+    jpeg_resume();
+    drv_jpeg_set_suspend_flag(TD_FALSE);
+    return EXT_SUCCESS;
 }
 
 td_s32 jpeg_open(const td_char *path_name, td_s32 flags, td_s32 mode)
@@ -107,6 +123,11 @@ td_s32 jpeg_ioctl(td_s32 module_idx, td_ulong ioctl_cmd, td_void *para)
         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);
 }
 
index d000e45..c76b33a 100755 (executable)
@@ -275,6 +275,8 @@ td_s32 jpeg_ioctl_decomress_create(td_u32 cmd, td_void *arg, td_void *file)
     uapi_unused(file);
     uapi_unused(arg);
 
+    drv_jpeg_dfx_info *jpeg_dfx_info = jpeg_dfx_get_info();
+    jpeg_dfx_info->create_cnt++;
     uapi_pm_add_sleep_veto(PM_ID_JPEG);
     return EXT_SUCCESS;
 }
@@ -285,6 +287,8 @@ td_s32 jpeg_ioctl_decompress_destroy(td_u32 cmd, td_void *arg, td_void *file)
     uapi_unused(file);
     uapi_unused(arg);
 
+    drv_jpeg_dfx_info *jpeg_dfx_info = jpeg_dfx_get_info();
+    jpeg_dfx_info->destroy_cnt++;
     uapi_pm_remove_sleep_veto(PM_ID_JPEG);
     return EXT_SUCCESS;
 }
index 040d5ef..2f7babb 100755 (executable)
@@ -54,3 +54,27 @@ td_s32 jpeg_isr_init(td_void)
 
     return EXT_SUCCESS;
 }
+
+td_s32 jpeg_wait_all_finish(td_void)
+{
+    unsigned long flag = 0;
+    drv_jpeg_dfx_info *dfx_info = jpeg_dfx_get_info();
+    const td_u32 wait_time = 200;
+    td_u32 cnt = 0;
+    drv_jpeg_context *jpeg_context = jpeg_context_get();
+
+    while (cnt++ < wait_time) {
+        osal_spin_lock_irqsave(&jpeg_context->lock, &flag);
+        if (dfx_info->create_cnt == dfx_info->destroy_cnt) {
+            osal_spin_unlock_irqrestore(&jpeg_context->lock, &flag);
+            break;
+        }
+        osal_spin_unlock_irqrestore(&jpeg_context->lock, &flag);
+        osal_udelay(100); // 100us
+    }
+    if (cnt >= wait_time) {
+        jpeg_err("jpeg_wait_all_finish timeout");
+        return EXT_FAILURE;
+    }
+    return EXT_SUCCESS;
+}
index dd887f6..edc95d0 100755 (executable)
@@ -15,6 +15,7 @@ extern "C" {
 #endif
 
 td_s32 jpeg_isr_init(td_void);
+td_s32 jpeg_wait_all_finish(td_void);
 
 #ifdef __cplusplus
 #if __cplusplus
index fc41f48..d2ea85a 100755 (executable)
@@ -30,7 +30,7 @@ typedef struct {
 \r
 static td_s32 vau_dfx_help(int argc, const char *argv[]);\r
 static inline td_void vau_dfx_print_func_info(void);\r
-static inline td_void vau_dfx_print_func_time_info(void);\r
+static td_void vau_dfx_print_func_time_info(void);\r
 static td_void vau_dfx_print_func_cnt_info(void);\r
 \r
 /*-------------------------------- par define ---------------------------------------------*/\r
@@ -79,8 +79,10 @@ static inline td_void vau_dfx_print_func_info(td_void)
     vau_print("end func info: ------------------------------------\n");\r
 }\r
 \r
-static inline td_void vau_dfx_print_func_time_info(td_void)\r
+static td_void vau_dfx_print_func_time_info(td_void)\r
 {\r
+    uapi_reg_read(HAL_VAU_LIST_PFCNT, g_vau_dfx_info.func_info.time_info.list_pfcnt);\r
+\r
     vau_print("-----------time info-----------\n");\r
     vau_print("create_cost(us)      :%u\n", (td_u32)(g_vau_dfx_info.func_info.time_info.create_cost));\r
     vau_print("destroy_cost(us)     :%u\n", (td_u32)(g_vau_dfx_info.func_info.time_info.destroy_cost));\r
index 1284292..2b10d0c 100755 (executable)
@@ -227,7 +227,7 @@ td_void vau_hal_apb_vector_draw_init(td_void)
     u_vau_draw_cvrg_weight1 weight1;\r
 \r
     quad.bits.threshold_quad = 0.125; /* 0.125 : default threshold for quad split */\r
-    cubic.bits.threshold_cubic = 0.125; /* 0.125 : default threshold for cubic split */\r
+    cubic.bits.threshold_cubic = 1.0f; /* 0.125 : default threshold for cubic split */\r
 \r
     weight0.bits.weight0 = 32; /* 32 default weithg for 8x */\r
     weight0.bits.weight1 = 32; /* 32 default weithg for 8x */\r
index 5d9c2a1..b405756 100755 (executable)
 #include "vau_hal.h"\r
 #include "vau_dfx.h"\r
 #include "vau_pre_process.h"\r
+#include "vau_handle.h"\r
 \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
@@ -31,18 +34,30 @@ static td_s32 drv_vau_close(td_void *private_data)
     return EXT_SUCCESS;\r
 }\r
 \r
+static td_void drv_vau_set_suspend_flag(td_bool flag)\r
+{\r
+    unsigned long flags = 0;\r
+    vau_handle_mgr *vau_handle_list = vau_handle_list_get();\r
+\r
+    osal_spin_lock_irqsave(&vau_handle_list->lock, &flags);\r
+    g_vau_suspend_flag = flag;\r
+    osal_spin_unlock_irqrestore(&vau_handle_list->lock, &flags);\r
+}\r
+\r
 td_s32 drv_vau_suspend(td_void *private_data)\r
 {\r
     uapi_unused(private_data);\r
 \r
+    td_s32 ret = drv_vau_wait_all_done();\r
     vau_dfx_info *dfx_info = vau_dfx_get_info();\r
     dfx_info->suspend_cnt++;\r
 \r
     vau_dbg("vau suspend start");\r
     vau_hal_suspend();\r
+    drv_vau_set_suspend_flag(TD_TRUE);\r
     vau_dbg("vau suspend ok");\r
 \r
-    return EXT_SUCCESS;\r
+    return ret;\r
 }\r
 \r
 td_s32 drv_vau_resume(td_void *private_data)\r
@@ -60,6 +75,7 @@ td_s32 drv_vau_resume(td_void *private_data)
 #ifdef CONFIG_CLDO1PD_SUPPORT\r
     vau_mem_draw_pool_init();\r
 #endif\r
+    drv_vau_set_suspend_flag(TD_FALSE);\r
     vau_dbg("vau resume ok");\r
 \r
     return EXT_SUCCESS;\r
@@ -120,6 +136,11 @@ td_s32 vau_ioctl(td_s32 module_idx, td_ulong ioctl_cmd, td_void *para)
         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
index 98f53d3..60e784c 100755 (executable)
@@ -433,7 +433,6 @@ td_s32 vau_list_submit_job(td_handle handle, td_u32 time_out,
     td_size_t lockflags = 0;
     td_bool asynflag = 0;
     td_u32 tmp_time_out = time_out;
-    vau_dfx_info *vau_info = vau_dfx_get_info();
 
     if ((tmp_time_out == 0) || (tmp_time_out > 2000)) { /* 2000ms */
         tmp_time_out = 2000;                        /* max 2000ms */
@@ -456,7 +455,6 @@ td_s32 vau_list_submit_job(td_handle handle, td_u32 time_out,
         wait_ret = osal_wait_timeout_interruptible(&g_vau_block_job_wq, vau_osal_wait_check,
                                                    (td_void *)&job->notify_type, tmp_time_out);
         osal_spin_lock_irqsave(&g_vau_sw_job_list->lock, &lockflags);
-        uapi_reg_read(HAL_VAU_LIST_PFCNT, vau_info->func_info.time_info.list_pfcnt);
         job->wait_for_done_count--;
         ret = vau_list_wake_up_job(job, asynflag, &wait_ret);
         osal_spin_unlock_irqrestore(&g_vau_sw_job_list->lock, &lockflags);
index 1986740..03e4c0d 100755 (executable)
@@ -45,6 +45,7 @@ set(COMPONENT_CCFLAGS
     -Wno-unused-function
     -Wno-incompatible-pointer-types
     -Wno-incompatible-pointer-types-discards-qualifiers
+    -Werror=return-type
 )
 
 set(WHOLE_LINK
@@ -97,6 +98,7 @@ list(APPEND CFLAG -Wno-missing-field-initializers)
 set(COMPONENT_CCFLAGS
     ${CFLAG}
     -Wno-sign-compare
+    -Werror=return-type
 )
 
 set(WHOLE_LINK
@@ -144,6 +146,7 @@ set(COMPONENT_CCFLAGS
     ${CFLAG}
     -Wno-unused-parameter
     -Wno-unused-function
+    -Werror=return-type
 )
 
 set(WHOLE_LINK
index f20d975..8eb8684 100755 (executable)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-native-js/libdisplay_gfx.a differ
index eb73ea8..9ad11a0 100755 (executable)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-target1/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-target1/libdisplay_gfx.a differ
index f5f1c39..9c32117 100755 (executable)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-target3/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-target3/libdisplay_gfx.a differ
index 4a8ab12..dde8b6f 100755 (executable)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-target5/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-target5/libdisplay_gfx.a differ
index d78c316..a8b77c9 100755 (executable)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-xts/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-xts/libdisplay_gfx.a differ
index 6f64ebd..c150837 100755 (executable)
@@ -232,7 +232,6 @@ static int32_t AllocMem(const AllocInfo *info, BufferHandle **handle)
 
     uint8_t *addr = LosAllocMem(pool, (uint32_t)(buffer->size));
     if (addr == NULL) {
-        DISP_LOGE("LosAllocMem failure\n");
         ret = DISPLAY_FAILURE;
         goto END;
     }
@@ -241,7 +240,6 @@ static int32_t AllocMem(const AllocInfo *info, BufferHandle **handle)
 
 END:
     if ((ret != DISPLAY_SUCCESS) && (buffer != NULL)) {
-        DISP_LOGE("AllocMem FAILED.\n");
         free(buffer);
         buffer = NULL;
     }
index c8b06bf..4962c48 100755 (executable)
@@ -33,6 +33,7 @@ set(COMPONENT_CCFLAGS
     ${CFLAG}
     -Wno-incompatible-function-pointer-types
     -Wno-implicit-function-declaration
+    -Werror=return-type
 )
 
 set(WHOLE_LINK
index c2aa262..e6bd804 100755 (executable)
@@ -47,6 +47,7 @@ set(public_configs
     -Wno-tautological-pointer-compare\r
     -Wno-unused-private-field\r
     -Wno-unused-function\r
+    -Werror=return-type\r
 )\r
 \r
 # build graphic utils\r
@@ -180,6 +181,7 @@ set(COMPONENT_CCFLAGS
     -Wno-tautological-pointer-compare\r
     -Wno-unused-private-field\r
     -Wno-unused-function\r
+    -Werror=return-type\r
 )\r
 \r
 set(WHOLE_LINK\r
@@ -212,9 +214,11 @@ set(COMPONENT_SRC
     ${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_roller_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
+    ${PROP_UI_SRC}/components_ext/ui_icosahedron_view.cpp\r
 )\r
 \r
 set(SOURCES\r
@@ -257,6 +261,7 @@ set(COMPONENT_CCFLAGS
     -Wno-tautological-pointer-compare\r
     -Wno-unused-private-field\r
     -Wno-unused-function\r
+    -Werror=return-type\r
 )\r
 \r
 set(WHOLE_LINK\r
index 8161135..d629f41 100755 (executable)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-native-js/libuikit_ext.a differ
index 8161135..8ec26e3 100755 (executable)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-target3/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-target3/libuikit_ext.a differ
index 8161135..3349124 100755 (executable)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-xts/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-xts/libuikit_ext.a differ
diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/include/common/graphic_utils.h b/code/sdk/middleware/services/gui/uikit/proprietary/include/common/graphic_utils.h
new file mode 100644 (file)
index 0000000..7fdd0b1
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2023. All rights reserved.
+ */
+
+#ifndef DEFER_UTILS_H
+#define DEFER_UTILS_H
+
+#include <cstdint>
+#include "gfx_utils/image_info.h"
+#include "gfx_utils/graphic_math.h"
+
+namespace OHOS {
+#ifndef defer
+struct defer_dummy {};
+template <class F> struct deferrer { F f; ~deferrer() { f(); } };
+template <class F> deferrer<F> operator*(defer_dummy, F f) { return {f}; }
+#define DEFER_(LINE) zz_defer##LINE
+#define DEFER(LINE) DEFER_(LINE)
+#define defer auto DEFER(__LINE__) = defer_dummy{} *[&]()
+#endif // defer
+} // OHOS
+#endif // DEFER_UTILS_H
\ No newline at end of file
index 38c5a15..095a9f1 100755 (executable)
@@ -37,6 +37,7 @@
 #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 {
@@ -103,16 +104,24 @@ public:
      */
     void UpdateImageInfoIfNecessary(ImageInfo& info);
 
+    void* FreeAndGetBuf(const AllocInfo& info, GrallocBuffer& buffer);
+
+    /**
+     * @brief Dump image information.
+     */
+    void Dump();
+
 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 {
@@ -149,7 +158,6 @@ private:
     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);
index f86fd9e..de6afb6 100755 (executable)
@@ -286,6 +286,9 @@ public:
      */\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
index 9d19e86..535696c 100755 (executable)
@@ -39,6 +39,8 @@ public:
      * @version 1.0
      */
     virtual void CardSwipeAlg(UIImageView* leftCard, UIImageView* rightCard, int16_t xOffset) {}
+
+    bool isNeedClip_ = false;
 };
 }
 #endif
index c126d1b..7ed170f 100644 (file)
 
 namespace OHOS {
 
-typedef struct {
+struct ImageInfoExt {
     ImageInfo info;
     uint32_t stride;
-} ImageInfoExt;
+};
 
 class KaleidoscopeUtils : public HeapBase {
 public:
@@ -50,7 +50,7 @@ public:
     * @param  [in]  addr    Address of kaleidoscope data.
     * @return Return true if update successfully; and false otherwise.
     */
-    bool UpdateKaleidoscopeAddr(const uint8_t* addr);
+    bool UpdateKaleidoscopeImgInfo(const ImageInfoExt &imgInfo);
 
     /**
     * @brief  Obtain kaleidoscope img.
@@ -58,6 +58,12 @@ public:
     */
     ImageInfoExt* GetKaleidoscopeInfo();
 
+    /**
+    * @brief  Get pointer to source ImageInfo struct.
+    * @return Return pointer to source ImageInfo struct.
+    */
+    const ImageInfo* GetSrcImgInfo();
+
 private:
     ImageInfo* imgInfo_ = nullptr;
     ImageInfoExt* kaleidoscopeInfo_ = nullptr;
@@ -81,8 +87,8 @@ private:
     void DeInitPartialInfo();
     void DeinitInnerPath();
     void DeinitImgInfo();
-    bool ConstructFirstQuadrant(BufferInfo& bufferInfo);
-    bool ConstructRestQuadrant(BufferInfo& bufferInfo);
+    bool ConstructFirstQuadrant(BufferInfo& dstBufInfo);
+    bool ConstructRestQuadrant(BufferInfo& dstBufInfo);
 };
 }
 #endif
index ac83426..a9258e0 100644 (file)
@@ -105,11 +105,11 @@ private:
     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_;
index d3b668c..9e90eb0 100755 (executable)
@@ -51,6 +51,20 @@ public:
      */
     ~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
      *        SetHorCurrentPage() is called.
index e063a8a..c94aa72 100644 (file)
 \r
 #ifndef UI_COVERFLOW_VIEW_H\r
 #define UI_COVERFLOW_VIEW_H\r
-#include "components/ui_swipe_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
-    UICoverflowView();\r
+    explicit UICoverflowView(uint8_t mirrorOpa = 30, bool supportMirror = true); // 30: default mirror opacity\r
     ~UICoverflowView() override;\r
 \r
     /**\r
@@ -43,25 +43,26 @@ public:
     void Remove(const char* id);\r
 \r
     /**\r
-     * @brief Set center item width in static display mode.\r
+     * @brief Set image size.\r
      *\r
-     * @param width setting item width.\r
+     * @param width setting image width.\r
+     * @param height setting image height.\r
      */\r
-    void SetItemWidth(uint16_t width);\r
+    void SetImgSize(uint16_t width, uint16_t height);\r
 \r
     /**\r
-     * @brief Set ratote angle between the left and right items in static display mode.\r
+     * @brief Set image direct interval.\r
      *\r
-     * @param angle setting ratote angle.\r
+     * @param padding setting padding value. The interval between two images is twice the padding.\r
      */\r
-    void SetRotateAngle(float angle);\r
+    void SetImgPadding(uint16_t padding);\r
 \r
     /**\r
-     * @brief Set mirror image opacity.\r
+     * @brief Set rotate angle between the left and right items in static display mode.\r
      *\r
-     * @param opa setting mirror opacity value.\r
+     * @param angle setting rotate angle.\r
      */\r
-    void SetMirrorOpacity(uint8_t opa);\r
+    void SetRotateAngle(float angle);\r
 \r
     /**\r
      * @brief Represents a listener for swipe of the coverflow view.\r
@@ -88,23 +89,30 @@ public:
     uint8_t GetDirection() const = delete;\r
 protected:\r
     bool DragXInner(int16_t distance) override;\r
+    void RefreshCurrentView(int16_t distance, uint8_t dragDirection);\r
 \r
 private:\r
     void UpdatePerspectiveMatrix();\r
     void ReMeasure(void) override;\r
     void TransformImage(UIImageView* view);\r
-    void TransformPage(uint16_t index);\r
     void DeleteGroup(UIViewGroup* group);\r
+    bool CalCurViewInfo();\r
 \r
     using UISwipeView::Add;\r
     using UISwipeView::Remove;\r
 \r
     OnCoverflowScrollListener* coverflowListener_;\r
-    uint16_t itemWidth_;\r
-    uint8_t mirrorOpa_;\r
-    float rotateAngle_;\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
+    uint16_t swipeMid_;\r
 };\r
 } // namespace OHOS\r
 #endif // UI_COVERFLOW_VIEW_H\r
index e0d4fef..37229c7 100755 (executable)
@@ -181,6 +181,9 @@ public:
     void RegisterSwipeCallback(CardSwipe* callback)
     {
         horizontal_.RegisterSwipeCallback(callback);
+        if (callback != nullptr) {
+            isNeedClip_ = callback->isNeedClip_;
+        }
     }
 
     /* *
@@ -210,7 +213,7 @@ private:
     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_ = INVALID_VIEW_INDEX;
@@ -220,6 +223,7 @@ private:
     HorSwipeView horizontal_;
     UIView* tailView_ = nullptr;
     UISwipeView::OnSwipeListener *swipeListener_ = nullptr;
+    bool isNeedClip_ = false;
 
     void RemoveAllInner(UISwipeView& view);
     void ProcessRes(void);
index 5a7e3d1..7d287c5 100644 (file)
@@ -184,10 +184,16 @@ public:
      */
     Vector2<int16_t> GetCurrentPosition(uint8_t index);
 
+    UIViewType GetViewType() const override
+    {
+        return UI_HEXAGONS_LIST;
+    }
+
+    void ReMeasure() override;
+
 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
      *
@@ -214,7 +220,7 @@ private:
     uint16_t maxLap_ = 0;
     uint16_t maxAngleInMaxLap_ = 0;
     Graphic::Vector<uint8_t> polygonPoints_{10};
-    uint16_t imgDistance_{0};
+    float imgDistance_{0};
     uint16_t oriImgDistance_{0};
     float oriScaleFactor_{0.23f};
     int16_t imgSizeInCenter_{0};
diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_icosahedron_view.h b/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_icosahedron_view.h
new file mode 100644 (file)
index 0000000..e483fa4
--- /dev/null
@@ -0,0 +1,125 @@
+/*\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_ICOSAHEDRON_VIEW_H\r
+#define UI_ICOSAHEDRON_VIEW_H\r
+#include "components/ui_abstract_scroll.h"\r
+#include "gfx_utils/graphic_math.h"\r
+#include "components_ext/triangular_plane.h"\r
+\r
+namespace OHOS {\r
+class UIIcosahedronView : public UIAbstractScroll {\r
+public:\r
+    UIIcosahedronView();\r
+    virtual ~UIIcosahedronView();\r
+\r
+    /**\r
+     * @brief Set the edge length of the icosahedron.\r
+     *\r
+     * @param sideLen edge length of body shape.\r
+     */\r
+    void SetSideLength(uint16_t sideLen);\r
+\r
+    /**\r
+     * @brief Add a one-sided view to the icosahedron.\r
+     *\r
+     * @param view Single-sided corresponding view.Only supported ui image view.\r
+     */\r
+    void Add(UIView* view) override;\r
+\r
+    /**\r
+     * @brief Refresh icosahedral position.physique position will be reset after refreshing\r
+     */\r
+    void RefreshIcosahedron();\r
+\r
+    /**\r
+     * @brief Rotates the icosahedral in 3d.\r
+     *\r
+     * @param angle Indicates the rotation angle.\r
+     * @param pivotStart Indicates the coordinates of the rotation start pivot.\r
+     * @param pivotEnd Indicates the coordinates of the rotation end pivot.\r
+     */\r
+    bool RotatePlanes(int16_t angle, const Vector3<float>& pivotStart, const Vector3<float>& pivotEnd);\r
+\r
+    UIViewType GetViewType() const override\r
+    {\r
+        return UI_ICOSAHEDRON_VIEW;\r
+    }\r
+\r
+protected:\r
+    bool OnDragStartEvent(const DragEvent& event);\r
+    bool OnDragEvent(const DragEvent& event);\r
+    bool OnDragEndEvent(const DragEvent& event);\r
+    bool DragXInner(int16_t distance) override\r
+    {\r
+        return true;\r
+    }\r
+\r
+    bool DragYInner(int16_t distance) override\r
+    {\r
+        return true;\r
+    }\r
+\r
+private:\r
+    class inertiaAnimatorCallback : public AnimatorCallback {\r
+    public:\r
+        inertiaAnimatorCallback() : rotateTimes_(0), curtTime_(0), angle_(0)\r
+        {\r
+        }\r
+\r
+        virtual ~inertiaAnimatorCallback() {}\r
+\r
+        void SetRotateTimes(uint16_t times)\r
+        {\r
+            curtTime_ = 0;\r
+            rotateTimes_ = times;\r
+        }\r
+\r
+        void SetRotateAngle(int16_t angle)\r
+        {\r
+            angle_ = angle;\r
+        }\r
+\r
+        void SetRotateAxis(const Vector3<float>& rotateStart, const Vector3<float>& rotateEnd)\r
+        {\r
+            rotateStart_ = rotateStart;\r
+            rotateEnd_ = rotateEnd;\r
+        }\r
+\r
+        virtual void Callback(UIView* view) override;\r
+\r
+    private:\r
+        uint16_t rotateTimes_;\r
+        uint16_t curtTime_;\r
+        int16_t angle_;\r
+        Vector3<float> rotateStart_;\r
+        Vector3<float> rotateEnd_;\r
+    };\r
+    Matrix4<float> CalculateRotateMatrix(TriangularPlane dst);\r
+    Point startPoint_;\r
+    uint16_t sideLen_;\r
+\r
+    TriangularPlane plane_[20]; // 20: plane number\r
+    Matrix4<float> imgMatrix_;\r
+    Matrix4<float> sphereMatrix_;\r
+    Matrix4<float> lastSphereMatrix_;\r
+    bool isUpdateSideLen_ = true;\r
+\r
+    Animator inertiaAnimator_;\r
+    inertiaAnimatorCallback inertiaCallback_;\r
+    float lastAngle_;\r
+};\r
+} // namespace OHOS\r
+#endif  // UI_ICOSAHEDRON_H
\ No newline at end of file
index fcb0021..f2c5312 100644 (file)
@@ -58,7 +58,7 @@ public:
                            The size of img must match the size of screen.
     * @return Return true if set successfully; and false otherwise.
     */
-    bool SetSrc(const ImageInfo* info);
+    bool SetSrc(const ImageInfo* src);
 
     /**
     * @brief  Update the kaleidoscope by a rotate value.
@@ -96,6 +96,9 @@ public:
     void StopRotateAnimator();
 
     void OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) override;
+
+    void DumpImgInfo() override;
+
 private:
     class RotateCallback : public AnimatorCallback {
     public:
index cb79cae..f39d0bf 100755 (executable)
@@ -59,7 +59,7 @@ public:
      * @since 1.0\r
      * @version 1.0\r
      */\r
-    UIListExt(uint8_t direction)\r
+    explicit UIListExt(uint8_t direction)\r
     {\r
         SetDirection(direction);\r
     }\r
index 4365bd9..b347818 100755 (executable)
@@ -34,6 +34,7 @@
 
 #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"
@@ -169,21 +170,19 @@ public:
     }
 
     /**
-     * @brief Check if first video frame came.
+     * @brief Set preview image info.
      * @since 1.0
      * @version 1.0
      */
-    bool IsFirstFrameCame()
-    {
-        return isFirstFrameCome_;
-    }
+    void SetPreview(ImageInfo* info);
+
+    void DumpImgInfo() override;
 
 private:
     UILiteSurfaceView(const UILiteSurfaceView&) = delete;
     UILiteSurfaceView &operator=(const UILiteSurfaceView&) = delete;
     void InitLayer();
-    bool isStopped_ = false;
-    bool isFirstFrameCome_ = false;
+    bool isStopped_ = true;
     bool isLayerInit_ : 1;
     uint8_t flushCount_;
     LiteSurface* surface_ = nullptr;
@@ -192,12 +191,12 @@ private:
     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
index 75a2557..f7f5b26 100644 (file)
 namespace OHOS {
 #if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH
 struct POIInfo {
-    ImageDetail* img;
-    TextDetail* text[2];
-    uint8_t tag;
-    uint16_t rank;
-    uint16_t id;
+    ImageDetail* img = nullptr;
+    TextDetail* text[2] = {nullptr, nullptr};
+    uint8_t tag = 0;
+    uint16_t rank = 0;
+    uint16_t id = 0;
     Rect rect;
-    Point orignPos;
-    bool visible;
+    Point orignPos = {0, 0};
+    bool visible = false;
 };
 
 struct RoadInfo {
-    TextDetail* text;
+    TextDetail* text = nullptr;
     Rect rect;
-    Point orignPos;
-    bool visible;
+    Point orignPos = {0, 0};
+    bool visible = false;
 };
 
 class OnPOIClickListener : public HeapBase {
@@ -144,27 +144,28 @@ public:
     void SetY(int16_t x) override;
 
 private:
-    POIInfo* POIs_ = nullptr;
+    POIInfo* pois_ = nullptr;
     RoadInfo* roads_ = nullptr;
-    OnPOIClickListener* POIlistener_ = 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;
+    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;
+    uint32_t poiMask_ = 0;
     float scale_ = 1.0f;
+    bool isSetSVG_ = false;
 
+    void InitMapInfo();
     void DrawPath(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea);
     void DrawText(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea, TextDetail& info, Point offset = {0, 0},
         bool isPOIText = false);
index d2bea3e..fb38503 100755 (executable)
@@ -94,7 +94,7 @@ public:
      * @since 1.0\r
      * @version 1.0\r
      */\r
-    void SetImageSrc(const char* ImgSrc);\r
+    void SetImageSrc(const char* imgSrc);\r
 \r
     /**\r
      * @brief Sets the image info for menu image.\r
@@ -102,7 +102,7 @@ public:
      * @since 1.0\r
      * @version 1.0\r
      */\r
-    void SetImageSrc(const ImageInfo* ImgSrc);\r
+    void SetImageSrc(const ImageInfo* imgSrc);\r
 \r
     /**\r
      * @brief Sets the text for this item.\r
@@ -291,6 +291,8 @@ public:
     void ReMeasure() override;\r
     void OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) override;\r
 \r
+    void DumpImgInfo() override;\r
+\r
 private:\r
     UIImageView* image_ = nullptr;\r
     Style textStyle_;\r
diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_roller_view.h b/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_roller_view.h
new file mode 100644 (file)
index 0000000..24465f6
--- /dev/null
@@ -0,0 +1,310 @@
+/*
+ * 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.
+ */
+
+#ifndef UI_ROLLER_VIEW_H
+#define UI_ROLLER_VIEW_H
+#include <string>
+#include "components/ui_abstract_scroll.h"
+
+namespace OHOS {
+
+enum RollerViewMode {
+    DISPLAY, // Display all items in roller form.
+    COVER,   // Display current item at full size.
+    TRANSITION,  // used internally.
+};
+
+class UIRollerView : public UIAbstractScroll {
+public:
+    UIRollerView();
+    virtual ~UIRollerView() override;
+
+    /**
+    * @brief  Set item size, which is the size of image in DisplayMode.
+    */
+    void SetItemSize(uint16_t width, uint16_t height);
+
+    /**
+    * @brief  Set item padding.
+    */
+    void SetItemPadding(uint16_t padding);
+
+    /**
+    * @brief  Set mirror img opacity.
+    */
+    void SetMirrorOpacity(uint8_t opa);
+
+    /**
+    * @brief  Set sensitivity factor.
+    *         Drag distance will be converted to angle, and will multiply by this factor.
+    */
+    void SetSensitivityFactor(float sensitivity);
+
+    /**
+    * @brief  Get sensitivity factor. Default value is 1.0.
+    */
+    float GetSensitivityFactor();
+
+    /**
+    * @brief  Add an item.
+    */
+    void AddItem(std::string name, const ImageInfo* src);
+
+    /**
+    * @brief  Remove an item.
+    */
+    void RemoveItem(std::string name);
+
+    /**
+    * @brief  Clear all items.
+    */
+    void ClearAll();
+
+    /**
+    * @brief  Get current item name.
+    */
+    std::string GetCurrentItemName();
+
+    /**
+    * @brief  Get current item, which contains 2 imgs.
+    */
+    UIViewGroup* GetCurrentItem();
+
+    /**
+    * @brief  Set current item.
+    */
+    void SetCurrentItem(std::string name, bool enableAnimator = false);
+
+    /**
+    * @brief  Set current mode, choose from [DISPLAY, COVER].
+    */
+    void SetMode(RollerViewMode mode, bool enableAnimator = false);
+
+    /**
+    * @brief  Mode change listener.
+    */
+    class OnModeChangeListener : public HeapBase {
+    public:
+        /**
+        * @brief  Called when RollerViewMode is changed.
+        */
+        virtual void OnModeChange(UIRollerView* view, RollerViewMode targetMode) = 0;
+        virtual ~OnModeChangeListener() {}
+    };
+
+    /**
+    * @brief  Get OnModeChangeListener.
+    */
+    OnModeChangeListener*& GetOnModeChangeListener()
+    {
+        return onModeChangeListener_;
+    }
+
+    /**
+    * @brief  Set OnModeChangeListener.
+    */
+    void SetOnModeChangeListener(OnModeChangeListener* onModeChangeListener)
+    {
+        onModeChangeListener_ = onModeChangeListener;
+    }
+
+    /**
+    * @brief  Get current mode.
+    */
+    RollerViewMode GetMode();
+
+    /**
+    * @brief  Set camera distance. If not set, default distance is 1000.
+    */
+    void SetCamDistance(int16_t distance);
+
+    /**
+    * @brief  Set absolute y coordinate of camera.
+              Default value is GetY() - GetHeight() / 3.
+    */
+    void SetCamY(int16_t y);
+
+    UIViewType GetViewType() const override
+    {
+        return UI_ROLLER_VIEW;
+    }
+
+    bool OnDragStartEvent(const DragEvent& event) override;
+    bool OnDragEvent(const DragEvent& event) override;
+    bool OnDragEndEvent(const DragEvent& event) override;
+
+    void SetDirection(uint8_t direction) = delete;
+    uint8_t GetDirection() const = delete;
+    void SetLoopState(bool loop) = delete;
+
+protected:
+    bool DragXInner(int16_t distance);
+    bool DragYInner(int16_t distance)
+    {
+        return true;
+    }
+
+private:
+    class AlignAnimatorCallback : public AnimatorCallback {
+    public:
+        AlignAnimatorCallback()
+            : curTime_(0),
+              animTime_(0),
+              angle_(0),
+              previousAngle_(0)
+        {
+        }
+
+        virtual ~AlignAnimatorCallback() {}
+
+        void SetAnimTimes(uint16_t times)
+        {
+            animTime_ = times;
+        }
+
+        void SetAngle(float angle)
+        {
+            angle_ = angle;
+        }
+
+        void ResetCallback()
+        {
+            angle_ = 0;
+            previousAngle_ = 0;
+            animTime_ = 0;
+            curTime_ = 0;
+        }
+
+        virtual void Callback(UIView* view) override;
+
+        uint16_t curTime_;
+        uint16_t animTime_;
+        float previousAngle_;
+        float angle_;
+    };
+
+    class TransitionAnimatorCallback : public AnimatorCallback {
+    public:
+        TransitionAnimatorCallback() : curTime_(0), animTime_(0),
+            startScaleX_(0), startScaleY_(0), endScaleX_(0), endScaleY_(0),
+            camPos_({0, 0}), targetCamPos_({0, 0})
+        {
+        }
+
+        virtual ~TransitionAnimatorCallback() {}
+
+        void SetAnimTimes(uint16_t times)
+        {
+            animTime_ = times;
+        }
+
+        void SetScaleFactor(float startScaleX, float startScaleY, float endScaleX, float endScaleY)
+        {
+            startScaleX_ = startScaleX;
+            startScaleY_ = startScaleY;
+            endScaleX_ = endScaleX;
+            endScaleY_ = endScaleY;
+        }
+
+        void SetCamPosition(Point previousCamPos, Point targetCamPos)
+        {
+            camPos_ = previousCamPos;
+            targetCamPos_ = targetCamPos;
+        }
+
+        void ResetCallback()
+        {
+            curTime_ = 0;
+            animTime_ = 0;
+            startScaleX_ = 0;
+            startScaleY_ = 0;
+            endScaleX_ = 0;
+            endScaleY_ = 0;
+            camPos_ = {0, 0};
+            targetCamPos_ = {0, 0};
+        }
+
+        virtual void Callback(UIView* view) override;
+
+        uint16_t curTime_;
+        uint16_t animTime_;
+        float startScaleX_;
+        float startScaleY_;
+        float endScaleX_;
+        float endScaleY_;
+        Point camPos_;
+        Point targetCamPos_;
+    };
+
+    /* calculate swipe anim period: angle offset / ANGLE_COEFFICIENT. Minimum swipe anim period is MIN_DRAG_TIMES. */
+    static constexpr uint8_t ANGLE_COEFFICIENT = 5;
+    /* the minimum period of mode transition animator. */
+    static constexpr uint8_t MIN_TRANSITION_TIMES = 5;
+    /* calculate mode transition animator period: scale offset / TRANSITION_COEFFICIENT. */
+    static constexpr float TRANSITION_COEFFICIENT = 0.2;
+    OnModeChangeListener* onModeChangeListener_;
+    float ConvertDistanceToAngle(int16_t distance);
+    bool IsInCurrentItemRange(float angle);
+    void InitImg(UIView* img);
+    void DoCalculation();
+    void PrepAlign(float angle);
+    void SetCamPosInner(Point position);
+    void StartTransitionAnim();
+    void StopTransitionAnim();
+    void ReflectImg(UIView* img, UIView* mirror);
+    void ReMeasure(void) override;
+    void LayoutItem();
+    void TransformByAngle(float angle);
+    void TransformItemGroup(UIView* view, float angle);
+    void DelItemGroup(UIViewGroup* group);
+    void ResetState();
+    void StartAlignAnim();
+    void StopAlignAnim();
+    void MoveHeadOrTail();
+    void HandleMode();
+    void HandleAlign();
+    void UpdateCam();
+
+    Animator alignAnim_;
+    AlignAnimatorCallback alignCallback_;
+
+    Animator transitionAnim_;
+    TransitionAnimatorCallback transitionCallback_;
+
+    int16_t camY_ = 0;
+    bool isCamYSet_ = false;
+    RollerViewMode mode_ = DISPLAY;
+    RollerViewMode targetMode_ = DISPLAY;
+    bool switchModeWithAnim_ = false;
+    bool alignWithAnim_ = false;
+    UIView* coverPreviousItem_ = nullptr;
+    uint16_t itemWidth_ = 0;
+    uint16_t itemHeight_ = 0;
+    uint8_t mirrorOpa_ = 100;
+    float radius_ = 0.0f;
+    float perimeter_ = 0.0f;
+    float sensitivityFactor_ = 1.0f;
+    float anglePerItem_ = 0.0f;
+    Point camPosition_ = {0, 0};
+    Point displayCamPosition_ = {0, 0};
+    uint16_t cameraDistance_ = 1000;
+    uint16_t itemPadding_ = 0;
+    bool needLayout_ = false;
+    UIViewGroup* currentItem_ = nullptr;
+    UIViewGroup* alignItem_ = nullptr;
+    float alignAngle_ = 0.0f;
+};
+} // namespace OHOS
+#endif // UI_ROLLER_VIEW_H
index 73dafd3..c21b682 100755 (executable)
@@ -410,6 +410,8 @@ public:
      */\r
     void SetWorkMode(WorkMode newMode) override;\r
 \r
+    void DumpImgInfo() override;\r
+\r
 private:\r
     Hand hourHand_;\r
     Hand minuteHand_;\r
index 15f0f33..fa8d6a0 100755 (executable)
@@ -101,6 +101,16 @@ public:
      */\r
     bool InitGraphicService();\r
 \r
+    /**\r
+    * @brief GPU Reset start.\r
+    */\r
+    void GpuResetStart(void);\r
+\r
+    /**\r
+    * @brief GPU Reset end.\r
+    */\r
+    void GpuResetEnd(void);\r
+\r
 #ifdef ENABLE_CMSIS\r
     static void NativeMainThread(void* args);\r
     static void RtcEventThread(void* args);\r
@@ -118,6 +128,7 @@ private:
     static OHOS::GraphicMutex rtcEventMutex_;\r
     static OHOS::GraphicCond rtcEventCond_;\r
     static bool fullRefreshFlag_;\r
+    bool isGpuReseting = false;\r
     void DecreaseTriggerCount();\r
     void SetUpRootView();\r
     GraphicService();\r
index ca6945d..dcc86f2 100755 (executable)
@@ -30,10 +30,15 @@ extern "C" {
 #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.
  */
@@ -59,6 +64,16 @@ void ShowGraphicOTALogo(void);
  */
 void HideGraphicLogo(void);
 void HideGraphicOtaLogo(void);
+
+/**
+ * @brief GPU Reset start.
+ */
+void GpuResetStart(void);
+
+/**
+ * @brief GPU Reset end.
+ */
+void GpuResetEnd(void);
 #ifdef __cplusplus
 };
 #endif
index dbff032..513c80a 100755 (executable)
@@ -60,7 +60,7 @@ static void UikitRTCCallBack(uintptr_t data)
     GraphicService::GetInstance()->UpdateGraphicEvent();
 }
 
-void SetFrequence(int freq)
+void SetFrequenceInner(int freq)
 {
     if (!g_isScreenOn) {
         return;
@@ -85,6 +85,13 @@ void SetFrequence(int freq)
     }
 }
 
+void SetFrequence(int freq)
+{
+    GraphicService::GetInstance()->PostGraphicEvent([=] {
+            SetFrequenceInner(freq);
+        });
+}
+
 void NotifyScreenOn(void)
 {
     if (g_rtcHandle == nullptr) {
index ef6ae8e..82c36b1 100755 (executable)
@@ -25,6 +25,11 @@ LiteSurface::LiteSurface() : bufferCount_(0), queueSize_(0), size_(0),
 }
 
 LiteSurface::~LiteSurface()
+{
+    ClearBuffers();
+}
+
+void LiteSurface::ClearBuffers()
 {
     lock_.Lock();
     freeList_.Clear();
@@ -42,6 +47,7 @@ LiteSurface::~LiteSurface()
         node = node->next_;
     }
     buffers_.Clear();
+    bufferCount_ = 0;
     lock_.Unlock();
 }
 
@@ -312,4 +318,9 @@ void LiteSurface::CancelBuffer(SurfaceBuffer* buffer)
 {
     ReleaseBuffer(buffer);
 }
+
+SurfaceBuffer* LiteSurface::GetBackBuf()
+{
+    return dirtyList_.Back();
+}
 } // namespace OHOS
index 1bf9a68..15eb859 100755 (executable)
@@ -27,13 +27,13 @@ void LowPowerManager::TryToEnterLowPower()
 
 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()
@@ -57,8 +57,8 @@ bool LowPowerManager::CheckTaskState()
     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;
     }
 }
index 987dfc7..6638e1b 100644 (file)
@@ -140,8 +140,8 @@ bool UIBarcode::FillImageInfo()
         GRAPHIC_LOGE("actualLength is 0 or actualLength > width");
         return false;
     }
-    uint32_t step = width / actualLength;
-    imageInfo_.header.width = actualLength * step;
+    uint32_t step = static_cast<uint32_t>(width / actualLength);
+    imageInfo_.header.width = static_cast<uint32_t>(actualLength) * step;
     imageInfo_.header.height = height;
     imageInfo_.header.colorMode = RGB565;
     stride_ = DisplayDev::GetInstance()->CalcStride(imageInfo_.header.width, PIXEL_FMT_RGB_565);
@@ -166,12 +166,12 @@ void UIBarcode::FillBarCodeColor(ImageInfo& imageInfo, int32_t actualLength, uin
 {
     uint8_t* data = const_cast<uint8_t *>(imageInfo.data);
 
-    for (uint32_t i = 0; i < actualLength; i++) {
+    for (uint32_t i = 0; i < static_cast<uint32_t>(actualLength); i++) {
         if ((*(destData + i)) == 0) {
             continue;
         }
 
-        int16_t codeOffset = i * offset * 2; // 2: rgb565 has 2 byte per pixel
+        int16_t codeOffset = static_cast<int16_t>(i * offset * 2); // 2: rgb565 has 2 byte per pixel
         for (uint32_t k = 0; k < offset; k++) {
             *(data + codeOffset + k * 2) = 0; // 2: rgb565 has 2 byte per pixel
             *(data + codeOffset + k * 2 + 1) = 0; // 2: rgb565 has 2 byte per pixel
index c6a48d5..2b578d7 100644 (file)
@@ -60,7 +60,10 @@ void UICustomHexagonsList::RotateAnimatorCallback::Callback(UIView* view)
     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);
-        hexView->GetViewByIndex(centerIndex_)->SetOpaScale(opa);
+        UIView* curview = hexView->GetViewByIndex(centerIndex_);
+        if (curview != nullptr) {
+            curview->SetOpaScale(opa);
+        }
     }
     if ((FloatMore(startScale_, endScale_) && (curScale >= endScale_)) ||
         (FloatLess(startScale_, endScale_) || (curScale <= endScale_))) {
@@ -86,8 +89,10 @@ void UICustomHexagonsList::StartRotateAnimator(uint8_t center, int16_t xDistance
 
 void UICustomHexagonsList::StopRotateAnimator()
 {
-    rotateAnimator_->Stop();
-    rotateCallback_.ResetCallback();
+    if (rotateAnimator_ != nullptr) {
+        rotateAnimator_->Stop();
+        rotateCallback_.ResetCallback();
+    }
 }
 
 #if ENABLE_ROTATE_INPUT
index 963891f..f6da293 100755 (executable)
  * limitations under the License.
  */
 
-#include "input_method/ui_input_method.h"
+#include <securec.h>
 #include "common/screen.h"
 #include "components/root_view.h"
-#include "font/ui_font.h"
 #include "input_method/ui_soft_keyboard.h"
+#include "input_method/ui_input_method.h"
 
 #if ENABLE_SOFT_KEYBOARD
 namespace OHOS {
@@ -26,6 +26,7 @@ enum class SYS_IMT_TYPE {
     SYS_IME_CAP,
     SYS_IME_NUMBER,
     SYS_IME_SYMBOL,
+    SYS_IME_PINYIN,
     SYS_IME_ALL,
 };
 UIInputMethod::UIInputMethod()
@@ -34,6 +35,7 @@ UIInputMethod::UIInputMethod()
     customSoftKeyboard_.PushBack(UICapitalSoftKeyboard::GetInstance());
     customSoftKeyboard_.PushBack(UINumberSoftKeyboard::GetInstance());
     customSoftKeyboard_.PushBack(UISymbolSoftKeyboard::GetInstance());
+    customSoftKeyboard_.PushBack(UIPinyinSoftKeyboard::GetInstance());
     curSoftKeyboard_ = customSoftKeyboard_[static_cast<int>(SYS_IMT_TYPE::SYS_IME_EN)];
 }
 
@@ -54,6 +56,15 @@ UIInputMethod::~UIInputMethod()
         previeBox_ = nullptr;
     }
 
+    if (pinyinPreview_ != nullptr) {
+        delete pinyinPreview_;
+        pinyinPreview_ = nullptr;
+    }
+
+    ClearPinyinTable();
+
+    ClearHanziCandidate();
+
     curSoftKeyboard_ = nullptr;
     isInit_ = false;
 }
@@ -70,15 +81,16 @@ void UIInputMethod::OnShow(InputMethodManager::InputMethodParam& param)
         GRAPHIC_LOGD("UI system soft keyboard has been shown\n");
         return;
     }
+    SetupPinyinTable();
     InitInputMethod();
 
     // update edit text
     edit_ = static_cast<UIEditText *>(param.view);
     if (previeBox_ != nullptr) {
         previeBox_->SetInputType(param.inputType);
+        previeBox_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, UITextPreviewBox::DEFAULT_EDIT_FONT_SIZE);
         previeBox_->SetText(param.text.c_str());
         previeBox_->Focus();
-        previeBox_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, UITextPreviewBox::DEFAULT_EDIT_FONT_SIZE);
         if (edit_ != nullptr) {
             previeBox_->SetStyle(STYLE_LINE_HEIGHT, edit_->GetStyle(STYLE_LINE_HEIGHT));
             previeBox_->SetMaxLength(edit_->GetMaxLength());
@@ -117,7 +129,7 @@ void UIInputMethod::OnHide()
     InputMethodManager::GetInstance().OnKeyboardHide();
 }
 
-void UIInputMethod::Input(UI_KEYCODE &key)
+void UIInputMethod::Input(UI_KEYCODE key)
 {
     if (key >= UI_KEYCODE::UI_KEY_SOFT_KEYBOARD) {
         ChangSoftKeyboard(key);
@@ -128,6 +140,61 @@ void UIInputMethod::Input(UI_KEYCODE &key)
     }
 }
 
+void UIInputMethod::InputPinyin(UI_KEYCODE key)
+{
+    // process pinyin logic here
+    if (key >= UI_KEYCODE::UI_KEY_SOFT_KEYBOARD) {
+        if (curKeyboardIndex_ == static_cast<uint8_t>(SYS_IMT_TYPE::SYS_IME_PINYIN)) {
+            HidePinyinPreview();
+            HideHanziPageList();
+        }
+        ChangSoftKeyboard(key);
+        return;
+    }
+    if (curSoftKeyboard_ == nullptr) {
+        return;
+    }
+
+    switch (key) {
+        case UI_KEYCODE::UI_KEY_ENTER:
+            HidePinyinPreview();
+            HideHanziPageList();
+            DealSendKey();
+            break;
+        case UI_KEYCODE::UI_KEY_DEL:
+            if (pinyinPreview_ && pinyinPreview_->IsVisible()) {
+                DealPinyinDelKey();
+            } else {
+                DealDelKey();
+            }
+            break;
+        default:
+            if (key >= UI_KEYCODE::UI_KEY_a && key <= UI_KEYCODE::UI_KEY_z) {
+                InsertPinyin(key);
+            } else {
+                DealNormalKey(key);
+            }
+            break;
+    }
+}
+
+void UIInputMethod::ShowHanziPageList()
+{
+    if (hanziList_ == nullptr || pinyinPreview_ == nullptr) {
+        return;
+    }
+    if (pinyinPreview_->GetText() != nullptr && strlen(pinyinPreview_->GetText()) != 0) {
+        hanziList_->SetVisible(true);
+    }
+}
+
+void UIInputMethod::HideHanziPageList()
+{
+    if (hanziList_ != nullptr) {
+        hanziList_->SetVisible(false);
+    }
+}
+
 uint8_t UIInputMethod::HideOptionBox()
 {
     if ((optionBox_ == nullptr) || !optionBox_->IsVisible()) {
@@ -152,10 +219,32 @@ void UIInputMethod::ShowOptionBox(UIView *view, UI_KEYCODE *keys, uint8_t num)
     return;
 }
 
+bool UIInputMethod::OnClick(UIView& view, const ClickEvent& event)
+{
+    if (previeBox_ == nullptr) {
+        return false;
+    }
+    UILabelButton *btn = dynamic_cast<UILabelButton*>(&view);
+    if (btn == nullptr) {
+        return false;
+    }
+
+    std::string u8hanzi;
+    const char *hanzi = btn->GetText();
+    if (hanzi != nullptr) {
+        u8hanzi = hanzi;
+    }
+    previeBox_->InsertHanzi(u8hanzi);
+    HideHanziPageList();
+    HidePinyinPreview();
+    return true;
+}
+
 void UIInputMethod::DealSendKey()
 {
     std::string inputText = previeBox_->GetText();
     InputMethodManager::GetInstance().InsertText(inputText);
+    ClearPinyinTable();
     InputMethodManager::GetInstance().HideInputMethod();
 }
 
@@ -166,7 +255,92 @@ void UIInputMethod::DealDelKey()
     }
 }
 
-void UIInputMethod::DealFunctionKey(UI_KEYCODE &keyCode)
+void UIInputMethod::DealPinyinDelKey()
+{
+    if (pinyinPreview_ == nullptr) {
+        return;
+    }
+    const char *str = pinyinPreview_->GetText();
+    std::string pinyin;
+    if (str != nullptr && strlen(str) > 0) {
+        pinyin = str;
+    }
+    if (pinyin.length() > 0) {
+        pinyin = pinyin.substr(0, pinyin.length() - 1);
+        pinyinPreview_->SetText(pinyin.c_str());
+    }
+    const char *text = pinyinPreview_->GetText();
+    if (text == nullptr || strlen(text) == 0) {
+        pinyinPreview_->SetVisible(false);
+        HideHanziPageList();
+        return;
+    }
+
+    // find pinyin hanzi, and display!
+    UpdateHanziOption(text);
+}
+
+void UIInputMethod::HidePinyinPreview()
+{
+    if (pinyinPreview_ != nullptr) {
+        pinyinPreview_->SetText("");
+        pinyinPreview_->SetVisible(false);
+    }
+}
+
+void UIInputMethod::ShowPinyinPreview()
+{
+    if (pinyinPreview_ != nullptr) {
+        pinyinPreview_->SetVisible(true);
+    }
+}
+
+void UIInputMethod::ClearHanziCandidate()
+{
+    if (hanziAdapter_ != nullptr) {
+        delete hanziAdapter_;
+        hanziAdapter_ = nullptr;
+    }
+    if (hanziList_ != nullptr) {
+        delete hanziList_;
+        hanziList_ = nullptr;
+    }
+    memset_s(hanziMatched_, sizeof(hanziMatched_), 0,
+        sizeof(hanziMatched_));
+}
+
+void UIInputMethod::SetupHanziCandidate()
+{
+    if (inputMethod_ == nullptr) {
+        return;
+    }
+    ClearHanziCandidate();
+    int16_t x = 28;
+    int16_t y = 200;
+    int16_t w = 398;
+    int16_t h = 50;
+    int8_t gap = 2;
+    int16_t buttonGap = (w - gap) / DEFAULT_NUMPERPAGE;
+    int16_t btnWidth = buttonGap - gap;
+    int16_t btnHeight = h - gap * 2; // 2: half
+
+    hanziAdapter_ = new HanziAdapter;
+    // set height, set width, set data
+    hanziAdapter_->SetWidthAndHeight(w, h);
+    hanziAdapter_->SetClickListener(this);
+
+    hanziList_ = new UIList(UIList::HORIZONTAL);
+    // set position, font, adapter, listener, and add to inputmethod
+    hanziList_->SetPosition(x, y, w, h);
+    hanziList_->SetStyle(STYLE_BACKGROUND_COLOR, 0xFFE8EAEE);
+    hanziList_->SetIntercept(false);
+    hanziList_->SetAdapter(hanziAdapter_);
+    hanziList_->SetScrollStateListener(this);
+    hanziList_->SetVisible(false);
+    inputMethod_->Add(hanziList_);
+}
+
+void UIInputMethod::DealFunctionKey(UI_KEYCODE keyCode)
 {
     if (curSoftKeyboard_ != nullptr) {
         switch (keyCode) {
@@ -182,7 +356,7 @@ void UIInputMethod::DealFunctionKey(UI_KEYCODE &keyCode)
     }
 }
 
-void UIInputMethod::DealNormalKey(UI_KEYCODE &keyCode)
+void UIInputMethod::DealNormalKey(UI_KEYCODE keyCode)
 {
     if (previeBox_ != nullptr) {
         UITextPreviewBox::TextPreviewBoxMode mode = previeBox_->GetEditMode();
@@ -200,7 +374,7 @@ void UIInputMethod::DealNormalKey(UI_KEYCODE &keyCode)
     }
 }
 
-void UIInputMethod::ChangSoftKeyboard(UI_KEYCODE &keyCode)
+void UIInputMethod::ChangSoftKeyboard(UI_KEYCODE keyCode)
 {
     switch (keyCode) {
         case UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_EN:
@@ -215,6 +389,9 @@ void UIInputMethod::ChangSoftKeyboard(UI_KEYCODE &keyCode)
         case UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_SYMBOL:
             curKeyboardIndex_ = static_cast<uint8_t>(SYS_IMT_TYPE::SYS_IME_SYMBOL);
             break;
+        case UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_PINYIN:
+            curKeyboardIndex_ = static_cast<uint8_t>(SYS_IMT_TYPE::SYS_IME_PINYIN);
+            break;
         default:
             curKeyboardIndex_++;
             break;
@@ -234,7 +411,7 @@ void UIInputMethod::ChangSoftKeyboard(UI_KEYCODE &keyCode)
     inputMethod_->Invalidate();
 }
 
-void UIInputMethod::InsertChar(UI_KEYCODE& keyCode)
+void UIInputMethod::InsertChar(UI_KEYCODE keyCode)
 {
     if (previeBox_ != nullptr) {
         previeBox_->InsertChar(keyCode);
@@ -242,6 +419,60 @@ void UIInputMethod::InsertChar(UI_KEYCODE& keyCode)
     return;
 }
 
+void UIInputMethod::InsertPinyin(UI_KEYCODE pinyin)
+{
+    if (pinyinPreview_ == nullptr) {
+        return;
+    }
+    char ch = static_cast<char>(pinyin);
+    std::string originPinyin;
+    const char *str = pinyinPreview_->GetText();
+    if (str != nullptr && strlen(str) > 0) {
+        originPinyin = str;
+    }
+    originPinyin = originPinyin + ch;
+    pinyinPreview_->SetText(originPinyin.c_str());
+    pinyinPreview_->SetVisible(true);
+    const char *text = pinyinPreview_->GetText();
+    if (text == nullptr) {
+        return;
+    }
+
+    // find pinyin hanzi, and display!
+    UpdateHanziOption(text);
+}
+
+void UIInputMethod::UpdateHanziOption(const std::string &pinyin)
+{
+    if (pinyin.empty() || pinyinTable_ == nullptr) {
+        return;
+    }
+
+    PinyinState res = pinyinTable_->FindHanzi(pinyin);
+    if (res != PinyinState::SUCCESS) {
+        GRAPHIC_LOGE("%s", pinyinTable_->DebugInfo(res).c_str());
+        return;
+    }
+
+    uint8_t matchnum = pinyinTable_->GetMatchHanziNum();
+    if (matchnum == 0) {
+        return;
+    }
+
+    memset_s(hanziMatched_, sizeof(hanziMatched_),
+        0, sizeof(hanziMatched_));
+    res = pinyinTable_->GetAllHanzi(hanziMatched_,
+        sizeof(hanziMatched_) / sizeof(hanziMatched_[0]));
+    if (res != PinyinState::SUCCESS) {
+        GRAPHIC_LOGE("%s", pinyinTable_->DebugInfo(res).c_str());
+        return;
+    }
+    hanziAdapter_->SetData(hanziMatched_, matchnum);
+    hanziList_->ScrollTo(0);
+    hanziList_->SetVisible(true);
+    hanziList_->RefreshList();
+}
+
 void UIInputMethod::InitInputMethod()
 {
     if (isInit_) {
@@ -261,6 +492,8 @@ void UIInputMethod::InitInputMethod()
     SetupOptionBox();
     SetupSoftKeyboard();
     SetupTextPreviewBox();
+    SetupHanziCandidate();
+    SetupPinyinPreviewBox();
     isInit_ = true;
 }
 
@@ -301,5 +534,117 @@ void UIInputMethod::SetupTextPreviewBox()
         inputMethod_->Add(previeBox_);
     }
 }
+
+void UIInputMethod::SetupPinyinPreviewBox()
+{
+    if (pinyinPreview_ != nullptr) {
+        return;
+    }
+    pinyinPreview_ = new UILabel;
+    int16_t x = 28;
+    int16_t y = 160;
+    int16_t w = 77;
+    int16_t h = 30;
+    pinyinPreview_->SetPosition(x, y, w, h);
+    pinyinPreview_->SetStyle(STYLE_BACKGROUND_COLOR, 0xFFE8EAEE);
+    pinyinPreview_->SetStyle(STYLE_BORDER_RADIUS, 10); // 10: border radius
+    pinyinPreview_->SetText("");
+    pinyinPreview_->SetTouchable(false);
+    pinyinPreview_->SetTextColor(Color::Black());
+    pinyinPreview_->SetViewId("input_pinyin_text_view_id");
+    pinyinPreview_->SetVisible(false);
+
+    inputMethod_->Add(pinyinPreview_);
+}
+
+void UIInputMethod::SetupPinyinTable()
+{
+    if (pinyinTable_ != nullptr) {
+        return;
+    }
+    pinyinTable_ = new PinyinCandidate();
+    if (pinyinTable_ == nullptr) {
+        return;
+    }
+
+#ifndef WIN32
+    PinyinState state = pinyinTable_->Init("/user/res/pymb.bin");
+#else
+    PinyinState state = pinyinTable_->Init(RES_PATH"/pymb.bin");
+#endif
+    if (state != PinyinState::SUCCESS) {
+        ClearPinyinTable();
+    }
+}
+
+void UIInputMethod::ClearPinyinTable()
+{
+    if (pinyinTable_ != nullptr) {
+        delete pinyinTable_;
+        pinyinTable_ = nullptr;
+    }
+}
+
+UIView* UIInputMethod::HanziAdapter::GetView(UIView* inView, int16_t index)
+{
+    if (data_ == nullptr || size_ == 0) {
+        return nullptr;
+    }
+    if (index < 0 || index >= static_cast<int16_t>(size_)) {
+        return nullptr;
+    }
+
+    UILabelButton* item = dynamic_cast<UILabelButton*>(inView);
+    if (item == nullptr) {
+        int16_t gap = 2;
+        item  = new UILabelButton;
+        item->SetPosition(0, 0);
+        item->Resize(GetItemWidthWithMargin(index) - gap, GetItemHeightWithMargin(index));
+    }
+    item->SetOnClickListener(clickListener_);
+    item->SetText(reinterpret_cast<char*>(data_[index]));
+    item->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); // 40: means font size
+    item->SetViewIndex(index);
+    item->SetAlign(TEXT_ALIGNMENT_CENTER);
+    item->SetStyleForState(STYLE_BORDER_RADIUS, 0, UIButton::RELEASED);
+    item->SetStyleForState(STYLE_BORDER_RADIUS, 0, UIButton::PRESSED);
+    item->SetStyleForState(STYLE_BORDER_RADIUS, 0, UIButton::INACTIVE);
+    item->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::RELEASED);
+    item->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::PRESSED);
+    item->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::INACTIVE);
+    item->SetTextColor(Color::Black());
+    return item;
+}
+
+uint16_t UIInputMethod::HanziAdapter::GetCount()
+{
+    return size_;
+}
+
+int16_t UIInputMethod::HanziAdapter::GetItemWidthWithMargin(int16_t index)
+{
+    return width_ * 1.0 / UIInputMethod::DEFAULT_NUMPERPAGE;
+}
+
+int16_t UIInputMethod::HanziAdapter::GetItemHeightWithMargin(int16_t index)
+{
+    return height_;
+}
+
+bool UIInputMethod::HanziAdapter::SetWidthAndHeight(int16_t w, int16_t h)
+{
+    if (w > 0 && h > 0) {
+        width_ = w;
+        height_ = h;
+        return true;
+    }
+    return false;
+}
+
+void UIInputMethod::HanziAdapter::SetData(int8_t hanzi[][PinyinCandidate::IME_HZLENTH], uint8_t len)
+{
+    data_ = hanzi;
+    size_ = len;
+}
 } // namespace OHOS
 #endif // ENABLE_SOFT_KEYBOARD
index e22d60f..f3175a6 100755 (executable)
@@ -15,6 +15,7 @@
 
 #include "input_method/ui_keyboard_button.h"
 #include "input_method/ui_input_method.h"
+#include "input_method/ui_soft_keyboard.h"
 
 #if ENABLE_SOFT_KEYBOARD
 namespace OHOS {
@@ -66,6 +67,9 @@ void UIKeyboardButton::GetFuncKeyText(UI_KEYCODE key, std::string &tmpText)
         case UI_KEYCODE::UI_KEY_ENTER:
             tmpText += "Send";
             break;
+        case UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_PINYIN:
+            tmpText += "中";
+            break;
         case UI_KEYCODE::UI_KEY_DEL:
             tmpText += "Del";
             break;
@@ -91,10 +95,6 @@ void UIKeyboardButton::GetFuncKeyText(UI_KEYCODE key, std::string &tmpText)
 
 void UIKeyboardButton::SetButtonText()
 {
-    if (keyCode_ == nullptr) {
-        return;
-    }
-
     std::string tmpText;
     for (uint8_t i = 0; i < keyNum_; i++) {
         UI_KEYCODE key = keyCode_[i];
@@ -118,6 +118,11 @@ void UIKeyboardButton::Clear()
 bool UIKeyboardButton::OnClickEvent(const ClickEvent& event)
 {
     if (keyNum_ == 1) {
+        UIPinyinSoftKeyboard *parent = dynamic_cast<UIPinyinSoftKeyboard*>(GetParent());
+        if (parent != nullptr) {
+            UIInputMethod::GetInstance()->InputPinyin(keyCode_[0]);
+            return true;
+        }
         UIInputMethod::GetInstance()->Input(keyCode_[0]);
     }
     return true;
@@ -126,6 +131,10 @@ bool UIKeyboardButton::OnClickEvent(const ClickEvent& event)
 bool UIKeyboardButton::OnPressEvent(const PressEvent& event)
 {
     if (keyNum_ > 1) {
+        UIPinyinSoftKeyboard *parent = dynamic_cast<UIPinyinSoftKeyboard*>(GetParent());
+        if (parent != nullptr) {
+            UIInputMethod::GetInstance()->HideHanziPageList();
+        }
         UIInputMethod::GetInstance()->ShowOptionBox(this, keyCode_, keyNum_);
     }
     return true;
@@ -134,7 +143,13 @@ bool UIKeyboardButton::OnPressEvent(const PressEvent& event)
 bool UIKeyboardButton::OnReleaseEvent(const ReleaseEvent& event)
 {
     if (keyNum_ > 1) {
+        UIPinyinSoftKeyboard *parent = dynamic_cast<UIPinyinSoftKeyboard*>(GetParent());
         uint8_t keyIndex = UIInputMethod::GetInstance()->HideOptionBox();
+        if (parent != nullptr) {
+            UIInputMethod::GetInstance()->ShowHanziPageList();
+            UIInputMethod::GetInstance()->InputPinyin(keyCode_[keyIndex]);
+            return true;
+        }
         UIInputMethod::GetInstance()->Input(keyCode_[keyIndex]);
     }
     return true;
@@ -143,7 +158,13 @@ bool UIKeyboardButton::OnReleaseEvent(const ReleaseEvent& event)
 bool UIKeyboardButton::OnDragEndEvent(const DragEvent& event)
 {
     if (keyNum_ > 1) {
+        UIPinyinSoftKeyboard *parent = dynamic_cast<UIPinyinSoftKeyboard*>(GetParent());
         uint8_t keyIndex = UIInputMethod::GetInstance()->HideOptionBox();
+        if (parent != nullptr) {
+            UIInputMethod::GetInstance()->ShowHanziPageList();
+            UIInputMethod::GetInstance()->InputPinyin(keyCode_[keyIndex]);
+            return true;
+        }
         UIInputMethod::GetInstance()->Input(keyCode_[keyIndex]);
     }
     return true;
index ca25858..77c6370 100755 (executable)
 #include "common/low_power_manager.h"\r
 #include "components/ui_lite_surface_view.h"\r
 \r
+\r
+#ifndef UIKIT_SKIP_LINE\r
+#define UIKIT_SKIP_LINE 1\r
+#endif\r
+\r
 namespace OHOS {\r
 static constexpr int16_t YUV_WIDTH_ALIGNMENT = 128;\r
 UILiteSurfaceView::UILiteSurfaceView() : isLayerInit_(false), flushCount_(0)\r
@@ -36,8 +41,6 @@ UILiteSurfaceView::UILiteSurfaceView() : isLayerInit_(false), flushCount_(0)
         return;\r
     }\r
     surface_->RegisterConsumerListener(*this);\r
-    LiteMGfxEngine::GetInstance()->AddHardwareLayer(this);\r
-    GraphicService::GetInstance()->EnableAsyncMode(false);\r
     LowPowerManager::GetInstance()->PowerLock();\r
 }\r
 \r
@@ -116,10 +119,7 @@ void UILiteSurfaceView::Flush()
         --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
@@ -145,25 +145,6 @@ void UILiteSurfaceView::Flush()
     }\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
@@ -223,8 +204,13 @@ bool UILiteSurfaceView::GetBitmap(ImageInfo& bitmap)
         yuv.uvStride = ALIGN_BYTE(lastFlushedBuffer_->width, YUV_WIDTH_ALIGNMENT);\r
 \r
         CscRgbBuf rgb = {0};\r
+#if UIKIT_SKIP_LINE\r
+        rgb.width = lastFlushedBuffer_->width / 2; // 2: half\r
+        rgb.height = lastFlushedBuffer_->height / 2; // 2: half\r
+#else\r
         rgb.width = lastFlushedBuffer_->width;\r
         rgb.height = lastFlushedBuffer_->height;\r
+#endif\r
         rgb.stride = ALIGN_BYTE(rgb.width, BYTE_ALIGNMENT) * 3; // 3: 3 bytes for rgb888\r
 \r
         bitmap.header.colorMode = RGB888;\r
@@ -234,7 +220,15 @@ bool UILiteSurfaceView::GetBitmap(ImageInfo& bitmap)
         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
+#if UIKIT_SKIP_LINE\r
+            CscConvertYuvToRgbWithSkipLP(&rgb, &yuv);\r
+#else\r
+            CscConvertYuvToRgb(&rgb, &yuv);\r
+#endif\r
+        } else {\r
+            GRAPHIC_LOGE("UILiteSurfaceView::GetBitmap img alloc failed! size: 0x%x\n", bitmap.dataSize);\r
+        }\r
     }\r
     return true;\r
 }\r
@@ -255,6 +249,9 @@ void UILiteSurfaceView::BlitBitmapToFb(BufferInfo& gfxDstBuffer, const Rect& inv
     Rect rect = GetRect();\r
     rect.Intersect(rect, invalidatedArea);\r
     BlendOption blendOption;\r
+#if UIKIT_SKIP_LINE\r
+    blendOption.transMap.Scale(Vector2<float>{2.0, 2.0}, Vector2<float>{0, 0}); // 2.0: scale 2\r
+#endif\r
     blendOption.opacity = OPA_OPAQUE;\r
     blendOption.mode = BLEND_SRC_OVER;\r
     BaseGfxEngine::GetInstance()->Blit(gfxDstBuffer, {0, 0}, src, rect, blendOption);\r
@@ -262,6 +259,25 @@ void UILiteSurfaceView::BlitBitmapToFb(BufferInfo& gfxDstBuffer, const Rect& inv
 }\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
@@ -269,13 +285,21 @@ void UILiteSurfaceView::OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidated
         return;\r
     }\r
 \r
+    if ((isStopped_ || lastFlushedBuffer_ == nullptr) && 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
         ImageInfo bitmap;\r
-        GetBitmap(bitmap);\r
-        BlitBitmapToFb(gfxDstBuffer, invalidatedArea, bitmap);\r
-        ImageCacheFree(bitmap);\r
-        return;\r
+        if (GetBitmap(bitmap)) {\r
+            BlitBitmapToFb(gfxDstBuffer, invalidatedArea, bitmap);\r
+            ImageCacheFree(bitmap);\r
+            return;\r
+        }\r
     }\r
 #endif\r
 \r
@@ -286,6 +310,7 @@ void UILiteSurfaceView::OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidated
 \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
@@ -296,18 +321,62 @@ void UILiteSurfaceView::OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidated
 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
+        flushCount_ = 0;\r
+    } else {\r
+        ++flushCount_;\r
     }\r
-    if (!isLayerInit_) {\r
-        InitLayer();\r
+    lock_.Unlock();\r
+\r
+    if (isLastFrame) {\r
+        isStopped_ = true;\r
+        GraphicService::GetInstance()->PostGraphicEvent(\r
+            [&] {\r
+                if (surface_ != nullptr) {\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 (isStopped_) {\r
+        isStopped_ = false;\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
+            });\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
+void UILiteSurfaceView::DumpImgInfo()\r
+{\r
+    if (preView_ != nullptr) {\r
+        printf("view[%p]: viewType = %d\n", this, GetViewType());\r
+        const ImageInfo* info = preView_->GetImageInfo();\r
+        PrintImgInfo(info);\r
+    }\r
 }\r
 }\r
index d4c799a..37a8fc7 100755 (executable)
@@ -43,20 +43,19 @@ UIMenuItem::~UIMenuItem()
 \r
 void UIMenuItem::SetScaleCenter()\r
 {\r
-    Rect rect = GetOrigRect();\r
     if (transAlignMode_ == ScaleAlignMode::ALIGN_TEXT_LEFT) {\r
-        textScaleCenter_ = Vector2<float>{0.0, textRect_.GetHeight() / 2};\r
-        imgScaleCenter_ = Vector2<float>{textRect_.GetLeft() - imgRect_.GetLeft(), textRect_.GetHeight() / 2};\r
-        itemScaleCenter_ = Vector2<float>{textRect_.GetLeft(), textRect_.GetHeight() / 2};\r
+        textScaleCenter_ = Vector2<float>{0.0, textRect_.GetHeight() / 2.0f};\r
+        imgScaleCenter_ = Vector2<float>{textRect_.GetLeft() - imgRect_.GetLeft(), textRect_.GetHeight() / 2.0f};\r
+        itemScaleCenter_ = Vector2<float>{textRect_.GetLeft(), textRect_.GetHeight() / 2.0f};\r
     } else if (transAlignMode_ == ScaleAlignMode::ALIGN_IMAGE_LEFT) {\r
-        textScaleCenter_ = Vector2<float>{imgRect_.GetLeft() - textRect_.GetLeft(), imgRect_.GetHeight() / 2};\r
-        imgScaleCenter_ = Vector2<float>{0.0, imgRect_.GetHeight() / 2};\r
-        itemScaleCenter_ = Vector2<float>{imgRect_.GetLeft(), imgRect_.GetHeight() / 2};\r
+        textScaleCenter_ = Vector2<float>{imgRect_.GetLeft() - textRect_.GetLeft(), imgRect_.GetHeight() / 2.0f};\r
+        imgScaleCenter_ = Vector2<float>{0.0, imgRect_.GetHeight() / 2.0f};\r
+        itemScaleCenter_ = Vector2<float>{imgRect_.GetLeft(), imgRect_.GetHeight() / 2.0f};\r
     } else if (transAlignMode_ == ScaleAlignMode::ALIGN_ITEM_CENTER) {\r
         Rect rect = GetOrigRect();\r
-        itemScaleCenter_ = Vector2<float>{rect.GetX() + rect.GetWidth() / 2, rect.GetHeight() / 2};\r
-        textScaleCenter_ = Vector2<float>{itemScaleCenter_.x_ - textRect_.GetLeft(), rect.GetHeight() / 2};\r
-        imgScaleCenter_ = Vector2<float>{itemScaleCenter_.x_ - imgRect_.GetLeft(), rect.GetHeight() / 2};\r
+        itemScaleCenter_ = Vector2<float>{rect.GetX() + rect.GetWidth() / 2.0f, rect.GetHeight() / 2.0f};\r
+        textScaleCenter_ = Vector2<float>{itemScaleCenter_.x_ - textRect_.GetLeft(), rect.GetHeight() / 2.0f};\r
+        imgScaleCenter_ = Vector2<float>{itemScaleCenter_.x_ - imgRect_.GetLeft(), rect.GetHeight() / 2.0f};\r
     }\r
 }\r
 \r
@@ -99,7 +98,7 @@ void UIMenuItem::ReMeasure()
     UpdateTransformMap();\r
 }\r
 \r
-void UIMenuItem::SetImageSrc(const char* ImgSrc)\r
+void UIMenuItem::SetImageSrc(const char* imgSrc)\r
 {\r
     if (image_ == nullptr) {\r
         image_ = new UIImageView();\r
@@ -110,12 +109,12 @@ void UIMenuItem::SetImageSrc(const char* ImgSrc)
         image_->SetResizeMode(resizeMode_);\r
         image_->SetAutoEnable(false);\r
     }\r
-    image_->SetSrc(ImgSrc);\r
+    image_->SetSrc(imgSrc);\r
     UpdateRect();\r
     SetScaleCenter();\r
 }\r
 \r
-void UIMenuItem::SetImageSrc(const ImageInfo* ImgSrc)\r
+void UIMenuItem::SetImageSrc(const ImageInfo* imgSrc)\r
 {\r
     if (image_ == nullptr) {\r
         image_ = new UIImageView();\r
@@ -126,7 +125,7 @@ void UIMenuItem::SetImageSrc(const ImageInfo* ImgSrc)
         image_->SetResizeMode(resizeMode_);\r
         image_->SetAutoEnable(false);\r
     }\r
-    image_->SetSrc(ImgSrc);\r
+    image_->SetSrc(imgSrc);\r
     UpdateRect();\r
     SetScaleCenter();\r
 }\r
@@ -136,7 +135,7 @@ void UIMenuItem::OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea)
     BaseGfxEngine::GetInstance()->DrawRect(gfxDstBuffer, GetRect(), invalidatedArea, *style_, opaScale_);\r
     if (text_ != nullptr) {\r
         Rect rect;\r
-        rect.Join(invalidatedArea, textRect_);\r
+        rect.Intersect(invalidatedArea, textRect_);\r
         if (rect.GetLeft() < 0) {\r
             rect.SetLeft(0);\r
         }\r
@@ -153,4 +152,15 @@ void UIMenuItem::OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea)
         image_->OnDraw(gfxDstBuffer, invalidatedArea);\r
     }\r
 }\r
+\r
+void UIMenuItem::DumpImgInfo()\r
+{\r
+    if (image_ == nullptr) {\r
+        return;\r
+    }\r
+    printf("view[%p]: viewType = %d\n", this, GetViewType());\r
+    const ImageInfo* info = image_->GetImageInfo();\r
+    PrintImgInfo(info);\r
+}\r
+\r
 } // namespace OHOS\r
diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_pinyin_candidate.cpp b/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_pinyin_candidate.cpp
new file mode 100644 (file)
index 0000000..59d9a30
--- /dev/null
@@ -0,0 +1,364 @@
+/*
+ * Copyright (c) 2022 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.
+ */
+
+#include <cmath>
+#include <securec.h>
+#include "common/graphic_utils.h"
+#include "input_method/ui_pinyin_candidate.h"
+
+#if ENABLE_SOFT_KEYBOARD
+namespace OHOS {
+
+PinyinCandidate::PinyinCandidate()
+{
+    memset_s(m_pyTabBuf, sizeof(m_pyTabBuf), 0, sizeof(m_pyTabBuf));
+    memset_s(m_hzTabBuf, sizeof(m_hzTabBuf), 0, sizeof(m_hzTabBuf));
+}
+
+PinyinCandidate::~PinyinCandidate()
+{
+}
+
+PinyinCandidate::PinyinState PinyinCandidate::InitPinyinTablePath(const std::string &path)
+{
+    size_t len = path.length();
+    char *tablePath = new char[len + 1];
+    defer {
+        delete []tablePath;
+    };
+    if (tablePath == nullptr) {
+        GRAPHIC_LOGE("the length of path is too long.");
+        return PinyinState::MEM_ALLOC_ERROR;
+    }
+    int32_t ret = snprintf_s(tablePath, len + 1, len, "%s", path.c_str());
+    if (ret == -1) {
+        GRAPHIC_LOGE("Secure fuction issue.");
+        return PinyinState::MEM_COPY_ERROR;
+    }
+    char truePath[PATH_MAX + 1] = {0x00};
+#ifndef WIN32
+    if ((path.length() == 0) || (realpath(tablePath, truePath) == nullptr)) {
+        GRAPHIC_LOGE("The path of pin yin table is invalid.");
+        return PinyinState::INVALID_PATH;
+    }
+#else
+    memcpy_s(truePath, sizeof(truePath), tablePath, len + 1);
+#endif
+    m_pinyinTablePath = truePath;
+    return PinyinState::SUCCESS;
+}
+
+int32_t PinyinCandidate::SetLv2NumPerPage(uint8_t num)
+{
+    if ((num < 1) || (num > 10)) { //  10是汉字候选码的个数
+        return -1;
+    } else {
+        m_lv2NumPerPage = num;
+        return 0;
+    }
+}
+
+PinyinCandidate::PinyinState PinyinCandidate::Init(const std::string &path)
+{
+    PinyinState pathState = InitPinyinTablePath(path);
+    if (pathState != PinyinState::SUCCESS) {
+        return pathState;
+    }
+    InitEx();
+    return PinyinState::SUCCESS;
+}
+
+void PinyinCandidate::InitEx(void)
+{
+    int32_t ret;
+    size_t len = m_pinyinTablePath.length();
+    char *table = new char[len + 1];
+    defer {
+        delete []table;
+    };
+    if (table == nullptr) {
+        GRAPHIC_LOGE("Malloc mem fails.");
+        return;
+    }
+
+    ret = snprintf_s(table, len + 1, len, "%s", m_pinyinTablePath.c_str());
+    if (ret == -1) {
+        GRAPHIC_LOGE("Secure fuction issue.");
+        return;
+    }
+
+    ret = LoadCodeTable((const int8_t *)table);
+    if (ret != 0) {
+        GRAPHIC_LOGE("LoadCodeTable failed!");
+    }
+}
+
+std::string PinyinCandidate::DebugInfo(PinyinCandidate::PinyinState state) const
+{
+    static const struct {
+        PinyinState state;
+        std::string info;
+    } infoTable[] = {
+        {PinyinState::SUCCESS, "SUCCESS"},
+        {PinyinState::INVALID_PINYIN, "INVALID_PINYIN"},
+        {PinyinState::INVALID_PATH, "INVALID_PATH"},
+        {PinyinState::MEM_NOT_ENOUGH, "MEM_NOT_ENOUGH"},
+        {PinyinState::MEM_SET_ERROR, "MEM_SET_ERROR"},
+        {PinyinState::MEM_COPY_ERROR, "MEM_COPY_ERROR"},
+        {PinyinState::MEM_ALLOC_ERROR, "MEM_ALLOC_ERROR"},
+        {PinyinState::INVALID_PAGE_INDEX, "INVALID_PAGE_INDEX"},
+    };
+    for (size_t i = 0; i < sizeof(infoTable) / sizeof(infoTable[0]); ++i) {
+        if (infoTable[i].state == state) {
+            return infoTable[i].info;
+        }
+    }
+    return "not defined!";
+}
+
+PinyinCandidate::PinyinState PinyinCandidate::FindHanzi(const std::string &sourceStr)
+{
+    if (sourceStr.length() > IME_PYMAXLENTH) {
+        return PinyinState::INVALID_PINYIN;
+    }
+
+    bool candidateFlag = false;
+
+    hanziStatus_.m_currentHzPage = 0;
+    hanziStatus_.m_currentHzIndex = 0;
+    hanziStatus_.m_matchHzNumber = 0;
+    pinyinStatus_.m_currentPyIndex = sourceStr[0] - 'a';
+
+    if (pinyinStatus_.m_currentPyIndex >= MAXCHARNUM) {
+        return PinyinState::INVALID_PINYIN;
+    }
+
+    uint8_t index;
+    for (index = 0; index < MAXSAMEPREFIXPY; index++) {
+        if (strncmp(sourceStr.c_str(),
+                reinterpret_cast<char *>(m_pyTabBuf[pinyinStatus_.m_currentPyIndex][index].pinyin),
+                sourceStr.length()) == 0) {
+            candidateFlag = true;
+            break;
+        }
+    }
+
+    if (candidateFlag == false) {
+        GRAPHIC_LOGE("查找拼音索引出错!!\n");
+        return PinyinState::INVALID_PINYIN;
+    }
+
+    hanziStatus_.m_currentHzIndex = m_pyTabBuf[pinyinStatus_.m_currentPyIndex][index].hzIndex;
+    hanziStatus_.m_matchHzNumber = m_pyTabBuf[pinyinStatus_.m_currentPyIndex][index].hzNum;
+    if (m_lv2NumPerPage != 0) {
+        hanziStatus_.m_matchHZPageNumber =
+            static_cast<uint8_t>(ceil(1.0 * hanziStatus_.m_matchHzNumber / m_lv2NumPerPage));
+    }
+
+    return PinyinState::SUCCESS;
+}
+
+PinyinCandidate::PinyinState PinyinCandidate::GetHanziPage(
+    uint8_t pageNumber, int8_t candidate[][IME_HZLENTH], uint8_t len)
+{
+    if (len < m_lv2NumPerPage) {
+        /* 存放结果的字符串长度小于要求长度 */
+        return PinyinState::MEM_NOT_ENOUGH;
+    }
+
+    if (pageNumber >= GetHanziPagesNum()) {
+        return PinyinState::INVALID_PAGE_INDEX;
+    }
+
+    for (uint8_t i = 0; i < m_lv2NumPerPage; i++) {
+        uint16_t curIndex = hanziStatus_.m_currentHzIndex + (pageNumber * m_lv2NumPerPage) + i;
+        if (curIndex >= (hanziStatus_.m_currentHzIndex + hanziStatus_.m_matchHzNumber)) {
+            break;
+        }
+
+        if (curIndex >= MAXHZNUM) {
+            break;
+        }
+
+        candidate[i][0] =
+            (int8_t)(m_hzTabBuf[curIndex]
+                         .hz >>
+                     16);  //  Shift right by 16 bytes and get the storage bitin the encoding format
+        candidate[i][1] =
+            (int8_t)(m_hzTabBuf[curIndex]
+                         .hz >>
+                     8);   //  Shift right by 8 bytes and get the storage bit in the encoding format
+        candidate[i][2] =  // 2 is the index of the Array
+            (int8_t)(m_hzTabBuf[curIndex]
+                         .hz);
+    }
+    return PinyinState::SUCCESS;
+}
+
+PinyinCandidate::PinyinState PinyinCandidate::GetFwdHanziPage(int8_t candidate[][IME_HZLENTH], uint8_t len)
+{
+    if (hanziStatus_.m_currentHzPage > 0) {
+        --hanziStatus_.m_currentHzPage;
+        return GetHanziPage(hanziStatus_.m_currentHzPage, candidate, len);
+    }
+    return PinyinState::INVALID_PAGE_INDEX;
+}
+
+PinyinCandidate::PinyinState PinyinCandidate::GetCurHanziPage(int8_t candidate[][IME_HZLENTH], uint8_t len)
+{
+    return GetHanziPage(hanziStatus_.m_currentHzPage, candidate, len);
+}
+
+PinyinCandidate::PinyinState PinyinCandidate::GetNxtHanziPage(int8_t candidate[][IME_HZLENTH], uint8_t len)
+{
+    if (hanziStatus_.m_currentHzPage + 1 < GetHanziPagesNum()) {
+        ++hanziStatus_.m_currentHzPage;
+        return GetHanziPage(hanziStatus_.m_currentHzPage, candidate, len);
+    }
+    return PinyinState::INVALID_PAGE_INDEX;
+}
+
+PinyinCandidate::PinyinState PinyinCandidate::GetAllHanzi(int8_t candidate[][IME_HZLENTH], uint8_t len)
+{
+    if (len < hanziStatus_.m_matchHzNumber) {
+        return PinyinState::MEM_NOT_ENOUGH;
+    }
+
+    for (uint16_t i = hanziStatus_.m_currentHzIndex; i < hanziStatus_.m_currentHzIndex + hanziStatus_.m_matchHzNumber;
+         ++i) {
+        if (i >= MAXHZNUM) {
+            break;
+        }
+        candidate[i - hanziStatus_.m_currentHzIndex][0] =
+            static_cast<int8_t>(m_hzTabBuf[i]
+                         .hz >>
+                     16);  //  Shift right by 16 bytes and get the storage bitin the encoding format
+        candidate[i - hanziStatus_.m_currentHzIndex][1] =
+            static_cast<int8_t>(m_hzTabBuf[i]
+                         .hz >>
+                     8);   //  Shift right by 8 bytes and get the storage bit in the encoding format
+        candidate[i - hanziStatus_.m_currentHzIndex][2] =  // 2 is the index of the Array
+            static_cast<int8_t>(m_hzTabBuf[i]
+                         .hz);
+    }
+    return PinyinState::SUCCESS;
+}
+
+int32_t PinyinCandidate::LoadCodeTable(const int8_t *filePath)
+{
+    int32_t ret;
+    FILE *tableFile = nullptr;
+    uint32_t bufLen;
+    char resolvedPath[PATH_MAX + 1] = {0};
+
+#ifndef WIN32
+    if (realpath((const char *)filePath, resolvedPath) == nullptr) {
+        return -1;
+    }
+#else
+    memcpy_s(resolvedPath, sizeof(resolvedPath), filePath, strlen(reinterpret_cast<const char*>(filePath)) + 1);
+#endif
+
+    tableFile = fopen((const char *)resolvedPath, "rb");
+    if (tableFile == nullptr) {
+        return -1;
+    }
+
+    ret = memset_s(m_hzTabBuf, sizeof(m_hzTabBuf), 0, sizeof(m_hzTabBuf));
+    if (ret != EOK) {
+        (void)fclose(tableFile);
+        return -1;
+    }
+
+    ret = memset_s(m_pyTabBuf, sizeof(m_pyTabBuf), 0, sizeof(m_pyTabBuf));
+    if (ret != EOK) {
+        (void)fclose(tableFile);
+        return -1;
+    }
+
+    bufLen = fread(m_hzTabBuf, 1, sizeof(m_hzTabBuf), tableFile);
+    if (bufLen != sizeof(m_hzTabBuf)) {
+        (void)fclose(tableFile);
+        return -1;
+    }
+
+    if (fread(m_pyTabBuf, 1, sizeof(m_pyTabBuf), tableFile) != sizeof(m_pyTabBuf)) {
+        (void)fclose(tableFile);
+        return -1;
+    }
+
+    (void)fclose(tableFile);
+
+    return 0;
+}
+
+int32_t PinyinCandidate::RecoverCodeTable(const int8_t *filePath, const int8_t *BackupPath)
+{
+    FILE *tableFile = nullptr;
+    FILE *backupFile = nullptr;
+    uint32_t fileSizeCounter = 0;
+    int32_t temp = 0;
+    char resolvedPath1[PATH_MAX + 1] = {0};
+    char resolvedPath2[PATH_MAX + 1] = {0};
+
+#ifndef WIN32
+    if (realpath((const char *)filePath, resolvedPath1) == nullptr) {
+        return -1;
+    }
+
+    if (realpath((const char *)BackupPath, resolvedPath2)  == nullptr) {
+        return -1;
+    }
+#endif
+
+    /* 只写方式打开 */
+    tableFile = fopen(reinterpret_cast<char *>(resolvedPath1), "w");
+    if (tableFile == nullptr) {
+        return -1;
+    }
+
+    /* 只读方式打开 */
+    backupFile = fopen(reinterpret_cast<char *>(resolvedPath2), "r");
+    if (backupFile == nullptr) {
+        (void)fclose(tableFile);
+        return -1;
+    }
+
+    while (1) {
+        temp = fgetc(backupFile);
+        if ((temp == EOF) || (feof(backupFile) != 0)) {
+            break;
+        }
+
+        fputc((int8_t)temp, tableFile);
+        fileSizeCounter++;
+        if (fileSizeCounter > (sizeof(m_hzTabBuf) + sizeof(m_pyTabBuf))) {
+            /* 防止出错造成死循环 */
+            break;
+        }
+    }
+
+    fclose(tableFile);
+    fclose(backupFile);
+    if (fileSizeCounter == (sizeof(m_hzTabBuf) + sizeof(m_pyTabBuf))) {
+        GRAPHIC_LOGD("Code table file recover successed!");
+        return 0;
+    } else {
+        return -1;
+    }
+}
+
+} // namespace OHOS
+#endif // ENABLE_SOFT_KEYBOARD
\ No newline at end of file
index e5e5f57..d947fe1 100755 (executable)
@@ -288,7 +288,8 @@ void UIEnglishSoftKeyboard::CreateKeyButtons()
 {
     std::vector<SoftKey> keySet {
         {{COL_2_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_CAP,
-            UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_NUMBER, UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_SYMBOL}},
+            UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_NUMBER, UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_SYMBOL,
+            UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_PINYIN}},
         {{COL_3_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_a, UI_KEYCODE::UI_KEY_b, UI_KEYCODE::UI_KEY_c}},
         {{COL_4_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_d, UI_KEYCODE::UI_KEY_e, UI_KEYCODE::UI_KEY_f}},
         {{COL_2_X, ROW_2_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_g, UI_KEYCODE::UI_KEY_h, UI_KEYCODE::UI_KEY_i}},
@@ -318,7 +319,8 @@ void UICapitalSoftKeyboard::CreateKeyButtons()
 {
     std::vector<SoftKey> keySet {
         {{COL_2_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_EN,
-            UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_NUMBER, UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_SYMBOL}},
+            UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_NUMBER, UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_SYMBOL,
+            UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_PINYIN}},
         {{COL_3_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_A, UI_KEYCODE::UI_KEY_B, UI_KEYCODE::UI_KEY_C}},
         {{COL_4_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_D, UI_KEYCODE::UI_KEY_E, UI_KEYCODE::UI_KEY_F}},
         {{COL_2_X, ROW_2_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_G, UI_KEYCODE::UI_KEY_H, UI_KEYCODE::UI_KEY_I}},
@@ -355,8 +357,9 @@ void UINumberSoftKeyboard::CreateKeyButtons()
         {{COL_3_X, ROW_2_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_0}},
         {{COL_4_X, ROW_2_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_ASTERISK, UI_KEYCODE::UI_KEY_SLASH,
             UI_KEYCODE::UI_KEY_EQUAL}},
-        {{COL_2_X, ROW_3_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_CAP}},
-        {{COL_3_X, ROW_3_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_EN}},
+        {{COL_2_X, ROW_3_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_CAP,
+                                                     UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_EN}},
+        {{COL_3_X, ROW_3_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_PINYIN}},
         {{COL_4_X, ROW_3_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_SYMBOL}},
         //  FUNCTION_KEY
         {{COL_1_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_DEL}},
@@ -377,7 +380,8 @@ void UISymbolSoftKeyboard::CreateKeyButtons()
 {
     std::vector<SoftKey> keySet {
         {{COL_2_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_CAP,
-            UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_EN, UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_NUMBER}},
+            UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_EN, UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_PINYIN,
+            UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_NUMBER}},
         {{COL_3_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_EXCLAM, UI_KEYCODE::UI_KEY_DOUBLEQUOTE,
             UI_KEYCODE::UI_KEY_NUMBERSIGN}},
         {{COL_4_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_DOLLAR, UI_KEYCODE::UI_KEY_PERCENT,
@@ -402,5 +406,37 @@ void UISymbolSoftKeyboard::CreateKeyButtons()
         SetupKeyButton(key);
     }
 }
+
+void UIPinyinSoftKeyboard::CreateKeyButtons()
+{
+    std::vector<SoftKey> keySet {
+        {{COL_2_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_EN,
+                                                     UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_CAP,
+                                                     UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_NUMBER,
+                                                     UI_KEYCODE::UI_KEY_SOFT_KEYBOARD_SYMBOL}},
+        {{COL_3_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_a, UI_KEYCODE::UI_KEY_b, UI_KEYCODE::UI_KEY_c}},
+        {{COL_4_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_d, UI_KEYCODE::UI_KEY_e, UI_KEYCODE::UI_KEY_f}},
+        {{COL_2_X, ROW_2_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_g, UI_KEYCODE::UI_KEY_h, UI_KEYCODE::UI_KEY_i}},
+        {{COL_3_X, ROW_2_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_j, UI_KEYCODE::UI_KEY_k, UI_KEYCODE::UI_KEY_l}},
+        {{COL_4_X, ROW_2_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_m, UI_KEYCODE::UI_KEY_n, UI_KEYCODE::UI_KEY_o}},
+        {{COL_2_X, ROW_3_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_p, UI_KEYCODE::UI_KEY_q, UI_KEYCODE::UI_KEY_r,
+            UI_KEYCODE::UI_KEY_s}},
+        {{COL_3_X, ROW_3_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_t, UI_KEYCODE::UI_KEY_u, UI_KEYCODE::UI_KEY_v}},
+        {{COL_4_X, ROW_3_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_w, UI_KEYCODE::UI_KEY_x, UI_KEYCODE::UI_KEY_y,
+            UI_KEYCODE::UI_KEY_z}},
+        //  FUNCTION_KEY
+        {{COL_1_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_DEL}},
+        {{COL_5_X, ROW_1_Y, KEY_WIDTH, KEY_HEIGHT}, {UI_KEYCODE::UI_KEY_ENTER}},
+    };
+    for (auto key : keySet) {
+        SetupKeyButton(key);
+    }
+}
+
+UIPinyinSoftKeyboard* UIPinyinSoftKeyboard::GetInstance()
+{
+    static UIPinyinSoftKeyboard pinyinSoftkeyboard;
+    return &pinyinSoftkeyboard;
+}
 } // namespace OHOS
 #endif // ENABLE_SOFT_KEYBOARD
index b4fb207..86515b8 100755 (executable)
@@ -434,5 +434,37 @@ void UISweepClock::UpdateClock(bool clockInit)
         CalculateRedrawArea(rect, secondHand_, clockInit);
     }
 }
+
+void UISweepClock::DumpImgInfo()
+{
+    printf("view[%p]: viewType = %d\n", this, GetViewType());
+    if ((hourHand_.drawtype_ == DrawType::DRAW_IMAGE) && (hourHand_.image_.GetSrcType() == IMG_SRC_VARIABLE)) {
+        const ImageInfo* info = hourHand_.image_.GetImageInfo();
+        PrintImgInfo(info);
+    }
+    if ((minuteHand_.drawtype_ == DrawType::DRAW_IMAGE) && (minuteHand_.image_.GetSrcType() == IMG_SRC_VARIABLE)) {
+        const ImageInfo* info = minuteHand_.image_.GetImageInfo();
+        PrintImgInfo(info);
+    }
+    if ((secondHand_.drawtype_ == DrawType::DRAW_IMAGE) && (secondHand_.image_.GetSrcType() == IMG_SRC_VARIABLE)) {
+        const ImageInfo* info = secondHand_.image_.GetImageInfo();
+        PrintImgInfo(info);
+    }
+
+    if ((hourHandCircle_.circleImg_.GetSrcType() == IMG_SRC_VARIABLE)) {
+        const ImageInfo* info = hourHandCircle_.circleImg_.GetImageInfo();
+        PrintImgInfo(info);
+    }
+
+    if ((minuteHandCircle_.circleImg_.GetSrcType() == IMG_SRC_VARIABLE)) {
+        const ImageInfo* info = minuteHandCircle_.circleImg_.GetImageInfo();
+        PrintImgInfo(info);
+    }
+
+    if ((secondHandCircle_.circleImg_.GetSrcType() == IMG_SRC_VARIABLE)) {
+        const ImageInfo* info = secondHandCircle_.circleImg_.GetImageInfo();
+        PrintImgInfo(info);
+    }
+}
 }
 #endif
index bfca7ed..51355dd 100755 (executable)
@@ -135,6 +135,8 @@ void UITextPreviewBox::GetLineInfo(LineInfo& lineInfo)
     if (text == nullptr) {
         return;
     }
+    std::string u8str(text);
+    std::wstring u16str;
     UIFont::GetInstance()->SetCurrentFontId(inputText_->GetFontId(), inputText_->GetFontSize());
     lineInfo.lineHeight = GetStyleConst().GetStyle(STYLE_LINE_HEIGHT);
     if (lineInfo.lineHeight == 0) {
@@ -147,8 +149,9 @@ void UITextPreviewBox::GetLineInfo(LineInfo& lineInfo)
     uint32_t begin = 0;
     while ((begin < textLen) && (text[begin] != '\0') && (lineNum < GetMaxLength())) {
         uint32_t count = inputText_->GetTextLine(begin, textLen, GetContentRect().GetWidth(), lineNum, 0);
+        u16str = Utf8ToUtf16(u8str.substr(begin, count));
         begin += count;
-        lineInfo.charCountPerLine.push_back(count);
+        lineInfo.charCountPerLine.push_back(u16str.length());
         lineNum++;
     }
 }
@@ -184,18 +187,45 @@ void UITextPreviewBox::InitCursor()
 
 void UITextPreviewBox::InsertChar(UI_KEYCODE& keyCode)
 {
-    std::string temp = tempText_;
-    temp.insert(cursorIndex_, 1, static_cast<char>(keyCode));
-    if (!CheckSpaceLeft(temp.c_str())) {
+    std::wstring temp = tempText_;
+    std::string str;
+    temp.insert(cursorIndex_, 1, static_cast<wchar_t>(keyCode));
+    str = Utf16ToUtf8(temp);
+    if (!CheckSpaceLeft(str.c_str())) {
         GRAPHIC_LOGE("Character length exceeded. Fail to input the letter.");
         return;
     }
 
-    tempText_.insert(cursorIndex_, 1, static_cast<char>(keyCode));
+    tempText_.insert(cursorIndex_, 1, static_cast<wchar_t>(keyCode));
     uint16_t width = UIFont::GetInstance()->GetWidth(static_cast<uint32_t>(keyCode), 0);
     widthOfChars_.insert(widthOfChars_.begin() + cursorIndex_, width);
 
-    UIEditText::SetText(tempText_.c_str());
+    str = Utf16ToUtf8(tempText_);
+    UIEditText::SetText(str.c_str());
+    GetLineInfo(lineInfo_);
+
+    cursorIndex_++;
+    HandleCursorPosByIndex();
+}
+
+void UITextPreviewBox::InsertHanzi(const std::string &u8hanzi)
+{
+    std::wstring temp = tempText_;
+    std::string str;
+    std::wstring u16hanzi = Utf8ToUtf16(u8hanzi);
+    temp.insert(cursorIndex_, 1, u16hanzi[0]);
+    str = Utf16ToUtf8(temp);
+    if (!CheckSpaceLeft(str.c_str())) {
+        GRAPHIC_LOGE("Character length exceeded. Fail to input the letter.");
+        return;
+    }
+
+    tempText_.insert(cursorIndex_, 1, u16hanzi[0]);
+    uint16_t width = UIFont::GetInstance()->GetWidth(u16hanzi[0], 0);
+    widthOfChars_.insert(widthOfChars_.begin() + cursorIndex_, width);
+
+    str = Utf16ToUtf8(tempText_);
+    UIEditText::SetText(str.c_str());
     GetLineInfo(lineInfo_);
 
     cursorIndex_++;
@@ -210,7 +240,8 @@ void UITextPreviewBox::DeleteChar()
     tempText_.erase(cursorIndex_ - 1, 1);
     widthOfChars_.erase(widthOfChars_.begin() + cursorIndex_ - 1);
 
-    UIEditText::SetText(tempText_.c_str());
+    std::string temp = Utf16ToUtf8(tempText_);
+    UIEditText::SetText(temp.c_str());
     GetLineInfo(lineInfo_);
 
     cursorIndex_--;
@@ -307,13 +338,15 @@ void UITextPreviewBox::SetText(std::string text)
     widthOfChars_.clear();
     tempText_.clear();
 
-    tempText_ = text;
-    for (uint16_t i = 0; i < text.length(); i++) {
-        uint16_t width = UIFont::GetInstance()->GetWidth(text[i], 0);
+    tempText_ = Utf8ToUtf16(text);
+    UIEditText::SetText(text.c_str());
+    UIFont::GetInstance()->SetCurrentFontId(inputText_->GetFontId(), inputText_->GetFontSize());
+
+    for (uint16_t i = 0; i < tempText_.length(); i++) {
+        uint16_t width = UIFont::GetInstance()->GetWidth(tempText_[i], 0);
         widthOfChars_.push_back(width);
     }
 
-    UIEditText::SetText(tempText_.c_str());
     GetLineInfo(lineInfo_);
 
     cursorIndex_ = widthOfChars_.size();
index d2efc3b..4cae676 100644 (file)
@@ -15,6 +15,7 @@
 #ifndef GRAPHIC_LITE_MAP_SVG_PARSER_H\r
 #define GRAPHIC_LITE_MAP_SVG_PARSER_H\r
 #include <cstdint>\r
+#include <string>\r
 #include "gfx_utils/color.h"\r
 \r
 namespace OHOS {\r
@@ -88,7 +89,10 @@ public:
     MapSVGParser(void);\r
     virtual ~MapSVGParser(void);\r
 \r
+    bool SetSVG(const std::string& file);\r
     bool SetSVG(uint8_t* data, uint32_t length);\r
+    void ClearSVG();\r
+\r
     Color24 GetBackGroundColor(void);\r
     uint32_t GetImageOffset(void);\r
     void GetSize(int16_t& width, int16_t& height);\r
@@ -100,7 +104,6 @@ public:
     PathStyle* GetPathStyleByIndex(uint8_t index);\r
     TextDetail* GetTextByIndex(uint8_t index);\r
     ImageDetail* GetImageByIndex(uint8_t index);\r
-    void ClearSVG(uint8_t* data);\r
 \r
 private:\r
     struct MapHeader {\r
@@ -119,8 +122,10 @@ private:
     };\r
 \r
     static constexpr uint8_t PARSER_TYPE_NUM = 5;\r
-    typedef uint32_t (MapSVGParser::*MapTypeParserInit)(uint8_t* data, uint32_t length, uint32_t offset, uint8_t count);\r
-    typedef void (MapSVGParser::*MapTypeParserDeinit)(uint8_t count);\r
+    using MapTypeReadByData = uint32_t (MapSVGParser::*)(uint8_t *data, uint32_t length,\r
+        uint32_t offset, uint8_t count);\r
+    using MapTypeReadByPath = uint32_t (MapSVGParser::*)(FILE* fp, uint8_t count);\r
+    using MapTypeRelease = 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
@@ -129,25 +134,37 @@ private:
     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
+    uint32_t ReadMapNode(FILE* fp);\r
+    uint32_t ReadPathStyle(FILE* fp);\r
+    uint32_t ReadMapPath(FILE* fp, uint8_t count);\r
+    uint32_t ReadMapText(FILE* fp, uint8_t count);\r
+    uint32_t ReadMapImg(FILE* fp, uint8_t count);\r
+    uint32_t ReadMapRoad(FILE* fp, uint8_t count);\r
+    uint32_t ReadMapPOI(FILE* fp, uint8_t count);\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
+\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
+    MapTypeReadByData readByDataFunc[PARSER_TYPE_NUM] = {\r
+        &MapSVGParser::ReadMapPath, &MapSVGParser::ReadMapText, &MapSVGParser::ReadMapImg,\r
+        &MapSVGParser::ReadMapRoad, &MapSVGParser::ReadMapPOI };\r
+\r
+    MapTypeReadByPath readByPathFunc[PARSER_TYPE_NUM] = {\r
+        &MapSVGParser::ReadMapPath, &MapSVGParser::ReadMapText, &MapSVGParser::ReadMapImg,\r
+        &MapSVGParser::ReadMapRoad, &MapSVGParser::ReadMapPOI };\r
+\r
+    MapTypeRelease releaseFunc[PARSER_TYPE_NUM] = {\r
         &MapSVGParser::ReleaseMapPath, &MapSVGParser::ReleaseMapText, &MapSVGParser::ReleaseMapImg,\r
-        &MapSVGParser::ReleaseMapRoad, &MapSVGParser::ReleaseMapPOI\r
-    };\r
+        &MapSVGParser::ReleaseMapRoad, &MapSVGParser::ReleaseMapPOI };\r
 \r
-    MapHeader mapHeader_;\r
+    MapHeader mapHeader_ = {0};\r
     MapNode* nodeArray_ = nullptr;\r
     PathStyle* pathStyleArray_ = nullptr;\r
     PathDetail* pathArray_ = nullptr;\r
@@ -160,6 +177,8 @@ private:
     uint8_t roadCount_ = 0;\r
     POIDetail* poiArray_ = nullptr;\r
     uint8_t poiCount_ = 0;\r
+    uint8_t* data_ = nullptr;\r
+    std::string file_;\r
 };\r
 }\r
 #endif // GRAPHIC_LITE_MAP_SVG_PARSER_H\r
diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext/triangular_plane.h b/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components_ext/triangular_plane.h
new file mode 100644 (file)
index 0000000..7421851
--- /dev/null
@@ -0,0 +1,70 @@
+/*\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
index c009fcd..7f572ff 100755 (executable)
@@ -18,7 +18,7 @@ public:
     ~UICardContainer() override;
     UICardContainer(const UICardContainer &) = delete;
     UICardContainer &operator=(const UICardContainer &) = delete;
-    void SwitchCardToBitmap(bool bitMapFromFB = false);
+    void SwitchCardToBitmap(bool isNeedClip, bool bitMapFromFB = false);
     void SwitchBitmapToCard(void);
 
     void SetCardPage(UICardPage* page)
@@ -33,10 +33,10 @@ public:
         return cardPage_;
     }
 
-    UIImageView* GetCardimg(void)
+    UIImageView* GetCardimg(bool isNeedClip)
     {
         if (!isBitMapExist_) {
-            SwitchCardToBitmap();
+            SwitchCardToBitmap(isNeedClip);
         }
         return imgView_;
     }
@@ -62,7 +62,6 @@ private:
 #if ENABLE_ROTATE_INPUT
     bool OnRotateEvent(const RotateEvent& event) override;
 #endif
-    bool IsVideoContained(UIView* view);
 };
 }
 #endif
index a10a397..7f36d7b 100755 (executable)
@@ -36,9 +36,9 @@ void InputMethodManager::ShowInputMethod(UIView* view)
         return;
     }
 
-    inputView_ = view;
     UIViewType viewType = view->GetViewType();
     if (viewType == UI_EDIT_TEXT) {
+        inputView_ = view; // µã»÷¹â±ê»áµ¼ÖÂ×Ö·û´®¶ªÊ§£¬´Ë´¦Ð޸ĿÉÒÔ±ÜÃâÕâ¸öÎÊÌâ
         UIEditText* tmpView = reinterpret_cast<UIEditText*>(view);
         InputMethodParam param;
         param.view = view;
index 5f80183..b2771f1 100755 (executable)
@@ -28,6 +28,7 @@
 #include "securec.h"
 #include "dfx/dfx_record.h"
 #include "common/low_power_manager.h"
+#include "common/image_cache_manager.h"
 
 #if ENABLE_DEBUG
 #include "common/key_code.h"
@@ -75,6 +76,31 @@ void DumpMemoryCmd(int argc, char *argv[])
 {
     MemCheck::GetInstance()->DumpMemInfo();
 }
+
+void DumpImgCmd(int argc, char *argv[])
+{
+    ImageCacheManager::GetInstance().Dump();
+
+    printf("\n\n");
+    printf("========================DumpImgInfoRecursive========================\n");
+    RootView::GetInstance()->DumpImgInfoRecursive();
+}
+
+void SetMemMonitorCmd(int argc, char *argv[])
+{
+    if (argc != 1) {
+        GRAPHIC_LOGE("param err.\n");
+        return;
+    }
+    if (strcmp(argv[0], "0") == 0) {
+        GrallocEngines::GetInstance()->SetMemMonitor(false);
+    } else if (strcmp(argv[0], "1") == 0) {
+        GrallocEngines::GetInstance()->SetMemMonitor(true);
+    } else {
+        GRAPHIC_LOGE("param err.\n");
+        return;
+    }
+}
 #endif
 
 static bool ConvertToInt(const char* input, uint16_t& value)
@@ -471,6 +497,8 @@ struct DfxCmd g_dfxCmdList[] = {
     {"showtime", OHOS::ShowTime},
 #if ENABLE_MEMORY_CHECK
     {"dumpmem", OHOS::DumpMemoryCmd},
+    {"mem_monitor", OHOS::SetMemMonitorCmd},
+    {"dumpimg", OHOS::DumpImgCmd},
 #endif
 #if ENABLE_DEBUG
     {"inject_rotate", OHOS::InjectRotateEvent},
index 1785e88..2d84cd6 100755 (executable)
@@ -156,7 +156,7 @@ void DfxRenderReset()
 void DfxRecordShow()
 {
     if (g_dfxShow == ShowType::DFX_SHOW_ULPS) {
-        GRAPHIC_LOGP("g_ulpsExit: %d, g_flush: %d\n", g_ulpsExit, g_flush);
+        GRAPHIC_LOGP("g_ulpsExit: %u, g_flush: %u\n", g_ulpsExit, g_flush);
         return;
     }
 
index b3b5751..43de390 100755 (executable)
@@ -124,7 +124,7 @@ public:
     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;
diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/cube_effect.cpp b/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/cube_effect.cpp
new file mode 100644 (file)
index 0000000..748f45e
--- /dev/null
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2022 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.
+ */
+#include "securec.h"
+#include "common/screen.h"
+#include "cube_effect.h"
+
+namespace OHOS {
+namespace {
+static constexpr int16_t EASE_RANGE = 100;
+static constexpr int16_t CAMERA_DISTANCE = 500;
+static constexpr int16_t ROTATE_RANGE_MAX = 90;
+}
+
+void CubeEffect::OnSwipe(UISwipeView& view)
+{
+    if (preLeftCard != nullptr) {
+        preLeftCard->ResetTransParameter();
+        preLeftCard = nullptr;
+        container_->UIViewGroup::Remove(&leftImg_);
+        leftImg_.ResetTransParameter();
+    }
+
+    if (preRightCard != nullptr) {
+        preRightCard->ResetTransParameter();
+        preRightCard = nullptr;
+        container_->UIViewGroup::Remove(&rightImg_);
+        rightImg_.ResetTransParameter();
+    }
+}
+
+void CubeEffect::TransformCard(UIView* leftCard, UIView* rightCard, int16_t xOffset)
+{
+    int16_t width = Screen::GetInstance().GetWidth();
+
+    float angle = ROTATE_RANGE_MAX * MATH_ABS(xOffset) / (float)width;
+
+    uint16_t leftW = leftCard->GetWidth();
+    Vector3<float> leftRotateStart = {leftW + 1, 0, 0};
+    Vector3<float> leftRotateEnd = {leftW + 1, 1, 0};
+    Vector3<float> rightRotateStart = {-1, 0, 0};
+    Vector3<float> rightRotateEnd = {-1, 1, 0};
+    if (xOffset > 0) {
+        leftCard->Rotate((angle - ROTATE_RANGE_MAX), leftRotateStart, leftRotateEnd);
+        rightCard->Rotate(angle, rightRotateStart, rightRotateEnd);
+    } else if (xOffset < 0) {
+        leftCard->Rotate(-angle, leftRotateStart, leftRotateEnd);
+        rightCard->Rotate((ROTATE_RANGE_MAX - angle), rightRotateStart, rightRotateEnd);
+    } else {
+        leftCard->ResetTransParameter();
+        rightCard->ResetTransParameter();
+    }
+}
+
+void CubeEffect::TransformMirrorCard(UIView& leftCard, UIView& rightCard, int16_t xOffset)
+{
+    int16_t width = Screen::GetInstance().GetWidth();
+    int16_t height = Screen::GetInstance().GetHeight();
+    float angle = ROTATE_RANGE_MAX * MATH_ABS(xOffset) / (float)width;
+
+    Matrix4<float> perspectiveMatrix;
+    perspectiveMatrix[2][2] = 0;            // 2 : index
+    perspectiveMatrix[2][3] = -1.0f / CAMERA_DISTANCE; // 2 3 : index 1000:cam distance
+
+    int16_t leftRigth = leftCard.GetOrigRect().GetRight();
+    int16_t leftBottom = leftCard.GetOrigRect().GetBottom();
+    Matrix4<float> leftMatrix = Matrix4<float>::Rotate(180.0f, {0, leftBottom, 0}, {1.0, leftBottom, 0});
+    Vector3<float> leftRotateStart = {leftRigth, 0, 0};
+    Vector3<float> leftRotateEnd = {leftRigth, 1, 0};
+    Matrix4<float> leftTranslateFromCamera = Matrix4<float>::Translate(Vector3<float>(-leftRigth, -(height >> 1), 0));
+    Matrix4<float> leftTranslateToCamera = Matrix4<float>::Translate(Vector3<float>(leftRigth, (height >> 1), 0));
+
+    int16_t rightBottom = rightCard.GetOrigRect().GetBottom();
+    Matrix4<float> rightMatrix = Matrix4<float>::Rotate(180.0f, {0, rightBottom, 0}, {1.0, rightBottom, 0});
+    Vector3<float> rightRotateStart = {0, 0, 0};
+    Vector3<float> rightRotateEnd = {0, 1, 0};
+    Matrix4<float> rightTranslateFromCamera = Matrix4<float>::Translate(Vector3<float>(0, -(height >> 1), 0));
+    Matrix4<float> rightTranslateToCamera = Matrix4<float>::Translate(Vector3<float>(0, (height >> 1), 0));
+    if (xOffset > 0) {
+        leftMatrix = Matrix4<float>::Rotate((angle - ROTATE_RANGE_MAX), leftRotateStart, leftRotateEnd) * leftMatrix;
+        leftMatrix = leftTranslateToCamera * (perspectiveMatrix * leftTranslateFromCamera) * leftMatrix;
+        leftMatrix = Matrix4<float>::Translate({-(width - xOffset), 0, 0}) * leftMatrix;
+
+        rightMatrix = Matrix4<float>::Rotate(angle, rightRotateStart, rightRotateEnd) * rightMatrix;
+        rightMatrix = rightTranslateToCamera * (perspectiveMatrix * rightTranslateFromCamera) * rightMatrix;
+        rightMatrix = Matrix4<float>::Translate({xOffset, 0, 0}) * rightMatrix;
+    } else {
+        leftMatrix = Matrix4<float>::Rotate(-angle, leftRotateStart, leftRotateEnd) * leftMatrix;
+        leftMatrix = leftTranslateToCamera * (perspectiveMatrix * leftTranslateFromCamera) * leftMatrix;
+        leftMatrix = Matrix4<float>::Translate({xOffset, 0, 0}) * leftMatrix;
+
+        rightMatrix =
+            Matrix4<float>::Rotate((ROTATE_RANGE_MAX - angle), rightRotateStart, rightRotateEnd) * rightMatrix;
+        rightMatrix = rightTranslateToCamera * (perspectiveMatrix * rightTranslateFromCamera) * rightMatrix;
+        rightMatrix = Matrix4<float>::Translate({width + xOffset, 0, 0}) * rightMatrix;
+    }
+    TransformMap tempTrans;
+    tempTrans.SetMatrix(leftMatrix);
+    leftCard.SetTransformMap(tempTrans);
+
+    tempTrans.SetMatrix(rightMatrix);
+    rightCard.SetTransformMap(tempTrans);
+}
+
+void CubeEffect::CommonAlg(UIView* leftCard, UIView* rightCard, int16_t xOffset)
+{
+    if (leftCard == nullptr || rightCard == nullptr) {
+        return;
+    }
+
+    if (preLeftCard == nullptr) {
+        leftImg_.SetStyle(STYLE_IMAGE_OPA, 90); // 90: degree
+        rightImg_.SetStyle(STYLE_IMAGE_OPA, 90); // 90: degree
+        container_->UIViewGroup::Add(&leftImg_);
+        container_->UIViewGroup::Add(&rightImg_);
+    }
+
+    int16_t width = Screen::GetInstance().GetWidth();
+    int16_t height = Screen::GetInstance().GetHeight();
+    int16_t middleWidth = width / 2;
+    if (leftCard != preLeftCard && rightCard != preRightCard) {
+        leftImg_.SetPosition(0, 0, width, height);
+        if (leftCard->GetViewType() == UI_IMAGE_VIEW) {
+            leftImg_.SetSrc(static_cast<UIImageView *>(leftCard)->GetImageInfo());
+        }
+        preLeftCard = leftCard;
+        preLeftCard->SetCameraPosition(Vector2<float>(leftCard->GetWidth(), leftCard->GetHeight() / 2)); // 2: half
+        preLeftCard->SetCameraDistance(CAMERA_DISTANCE);
+        rightImg_.SetPosition(0, 0, width, height);
+        if (rightCard->GetViewType() == UI_IMAGE_VIEW) {
+            rightImg_.SetSrc(static_cast<UIImageView *>(rightCard)->GetImageInfo());
+        }
+        preRightCard = rightCard;
+        preRightCard->SetCameraPosition(Vector2<float>(0, rightCard->GetHeight() / 2)); // 2: half
+        preRightCard->SetCameraDistance(CAMERA_DISTANCE);
+    }
+
+    TransformCard(preLeftCard, preRightCard, xOffset);
+    TransformMirrorCard(leftImg_, rightImg_, xOffset);
+}
+
+void CubeEffect::CardSwipeAlg(UIImageView* leftCard, UIImageView* rightCard, int16_t xOffset)
+{
+    CommonAlg(leftCard, rightCard, xOffset);
+}
+
+void CubeEffect::CardSwipeAlg(UICardPage* leftCard, UICardPage* rightCard, int16_t xOffset)
+{
+    CommonAlg(leftCard, rightCard, xOffset);
+}
+}
diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/cube_effect.h b/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/swipe_effect/cube_effect.h
new file mode 100644 (file)
index 0000000..751d99e
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2022 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.
+ */
+
+#ifndef UI_CUBE_EFFECT_H
+#define UI_CUBE_EFFECT_H
+#include "components/ui_cross_view.h"
+
+namespace OHOS {
+class CubeEffect : public CardSwipe, public UISwipeView::OnSwipeListener {
+public:
+    CubeEffect(void) {}
+    ~CubeEffect() override {}
+    void CardSwipeAlg(UICardPage* leftCard, UICardPage* rightCard, int16_t xOffset) override;
+    void CardSwipeAlg(UIImageView* leftCard, UIImageView* rightCard, int16_t xOffset) override;
+    void OnSwipe(UISwipeView& view) override;
+
+    void SetContainer(UICrossView* view)
+    {
+        container_ = view;
+    }
+
+private:
+    UIImageView leftImg_;
+    UIImageView rightImg_;
+    UIView* preLeftCard = nullptr;
+    UIView* preRightCard = nullptr;
+    UICrossView* container_ = nullptr;
+
+    void CommonAlg(UIView* leftCard, UIView* rightCard, int16_t xOffset);
+    void TransformCard(UIView* leftCard, UIView* rightCard, int16_t xOffset);
+    void TransformMirrorCard(UIView& leftCard, UIView& rightCard, int16_t xOffset);
+};
+} // OHOS
+#endif // UI_CUBE_EFFECT_H
\ No newline at end of file
index 5ee348f..b055142 100755 (executable)
 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;
index d925c21..3cf98c7 100755 (executable)
 #ifndef GRAPHIC_LITE_UI_SOFT_KEYBOARD_H
 #define GRAPHIC_LITE_UI_SOFT_KEYBOARD_H
 
+#include "components/ui_label.h"
+#include "components/ui_label_button.h"
+#include "components/ui_list.h"
 #include "common/input_method_manager.h"
 #include "components/ui_edit_text.h"
 #include "input_method/ui_abstract_soft_keyboard.h"
 #include "input_method/ui_option_box.h"
 #include "input_method/ui_text_preview_box.h"
+#include "input_method/ui_pinyin_candidate.h"
 #include "gfx_utils/vector.h"
 
 #if ENABLE_SOFT_KEYBOARD
@@ -28,8 +32,35 @@ namespace OHOS {
 /**
  * @brief Provides the functions related to UIInputMethod.
  */
-class UIInputMethod : public InputMethodManager::InputMethodListener {
+class UIInputMethod : public InputMethodManager::InputMethodListener,
+    public UIView::OnClickListener, public ListScrollListener {
+    class HanziAdapter : public AbstractAdapter {
+    public:
+        ~HanziAdapter() override {};
+        HanziAdapter() {};
+        HanziAdapter(const HanziAdapter&) = delete;
+        HanziAdapter& operator=(const HanziAdapter&) = delete;
+        UIView* GetView(UIView* inView, int16_t index) override;
+        int16_t GetItemWidthWithMargin(int16_t index) override;
+        int16_t GetItemHeightWithMargin(int16_t index) override;
+        uint16_t GetCount() override;
+        bool SetWidthAndHeight(int16_t w, int16_t h);
+        void SetData(int8_t hanzi[][PinyinCandidate::IME_HZLENTH], uint8_t len);
+        void SetClickListener(UIView::OnClickListener* clickListener)
+        {
+            clickListener_ = clickListener;
+        }
+
+    private:
+        UIView::OnClickListener* clickListener_ = nullptr;
+        int8_t (*data_)[PinyinCandidate::IME_HZLENTH] = nullptr;
+        uint8_t size_ = 0;
+        int16_t width_ = 0;
+        int16_t height_ = 0;
+    };
 public:
+    static constexpr uint8_t DEFAULT_NUMPERPAGE = 5;
+    static constexpr uint8_t MAX_HANZIMATCHED = 255;
     static UIInputMethod* GetInstance();
 
     /**
@@ -47,7 +78,13 @@ public:
      * @brief Enter a key value in the input method.
      * @param keys key value, see UI_KEYCODE.
      */
-    void Input(UI_KEYCODE &key);
+    void Input(UI_KEYCODE key);
+
+    void InputPinyin(UI_KEYCODE key);
+
+    void ShowHanziPageList();
+
+    void HideHanziPageList();
 
     /**
      * @brief Hide soft keyboad option box.
@@ -62,6 +99,7 @@ public:
      */
     void ShowOptionBox(UIView *view, UI_KEYCODE *keys, uint8_t num);
 
+    bool OnClick(UIView& view, const ClickEvent& event) override;
 private:
     UIInputMethod();
     ~UIInputMethod() override;
@@ -71,18 +109,37 @@ private:
     void SetupOptionBox();
     void SetupSoftKeyboard();
     void SetupTextPreviewBox();
-    void InsertChar(UI_KEYCODE &keyCode);
-    void ChangSoftKeyboard(UI_KEYCODE &keyCode);
-    void DealFunctionKey(UI_KEYCODE& keyCode);
-    void DealNormalKey(UI_KEYCODE &keyCode);
+    void InsertChar(UI_KEYCODE keyCode);
+    void InsertPinyin(UI_KEYCODE pinyin);
+    void UpdateHanziOption(const std::string &pinyin);
+    void ChangSoftKeyboard(UI_KEYCODE keyCode);
+    void DealFunctionKey(UI_KEYCODE keyCode);
+    void DealNormalKey(UI_KEYCODE keyCode);
     void DealSendKey();
     void DealDelKey();
+    void DealPinyinDelKey();
 
     UIViewGroup* inputMethod_ = nullptr;
     UITextPreviewBox* previeBox_ = nullptr;  // soft keyboard edit box
     UIEditText* edit_ = nullptr;         // user creat edit box
     UIOptionBox* optionBox_ = nullptr;  // Preselection box
 
+    UILabel* pinyinPreview_ = nullptr; // pinyin preview box
+    void SetupPinyinPreviewBox();
+    void HidePinyinPreview();
+    void ShowPinyinPreview();
+
+    UIList *hanziList_ = nullptr;           // hanzi candidates
+    HanziAdapter *hanziAdapter_ = nullptr;  // hanzi adapter
+    int8_t hanziMatched_[MAX_HANZIMATCHED][PinyinCandidate::IME_HZLENTH];
+    void ClearHanziCandidate();
+    void SetupHanziCandidate();
+
+    PinyinCandidate* pinyinTable_ = nullptr; // pinyin and hanzi find table
+    void SetupPinyinTable();
+    void ClearPinyinTable();
+    using PinyinState = PinyinCandidate::PinyinState;
+
     UIAbstractSoftKeyboard* curSoftKeyboard_ = nullptr;
     uint8_t curKeyboardIndex_ = 0;
     Graphic::Vector<UIAbstractSoftKeyboard*> customSoftKeyboard_;
index ecd6bb2..168b576 100755 (executable)
@@ -140,6 +140,7 @@ enum class UI_KEYCODE : uint8_t {
     UI_KEY_SOFT_KEYBOARD_CAP     = 0xF7,
     UI_KEY_SOFT_KEYBOARD_NUMBER  = 0xF8,
     UI_KEY_SOFT_KEYBOARD_SYMBOL  = 0xF9,
+    UI_KEY_SOFT_KEYBOARD_PINYIN  = 0xFA,
 
     UI_KEY_BUTT = 0XFF,
 };
diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/innerkits/input_method/ui_pinyin_candidate.h b/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/innerkits/input_method/ui_pinyin_candidate.h
new file mode 100644 (file)
index 0000000..640554b
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2022 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.
+ */
+
+#ifndef GRAPHIC_LITE_UI_PINYIN_CANDIDATE_H
+#define GRAPHIC_LITE_UI_PINYIN_CANDIDATE_H
+#include "components/ui_label.h"
+#include "components/ui_view_group.h"
+#include "gfx_utils/vector.h"
+#include "graphic_config.h"
+#include "input_method/ui_keyboard_codetable.h"
+
+#if ENABLE_SOFT_KEYBOARD
+
+namespace OHOS {
+class PinyinCandidate : public HeapBase {
+public:
+    enum class PinyinState : int32_t {
+        SUCCESS = 0,
+        INVALID_PINYIN, // input source str is invalid
+        INVALID_PATH,
+        MEM_NOT_ENOUGH,
+        MEM_SET_ERROR,
+        MEM_COPY_ERROR,
+        MEM_ALLOC_ERROR,
+        INVALID_PAGE_INDEX,
+    };
+    static const uint32_t IME_PYMAXLENTH = 8;  //  单个拼音的最大字母个数
+    static const uint32_t IME_HZLENTH = 4;  //  单个汉字占内存大小
+    static const uint8_t MAXSAMEPREFIXPY = 45;  //  前缀相同的拼音的最大个数
+    static const int32_t MAXHZNUM = 0x2192;  //  汉字的总共个数
+    static const uint8_t MAXNUMBEROFCHAR = 5;  //  5 is the Maximum number of characters on key
+    static const uint8_t MAXCHARNUM = 26; // 26 characters, a ~ z
+    static const uint32_t MAX_TABLE_LEN = 12; // 12 is the max Length of Table
+    static const uint32_t MAX_TABLE_MEMBER_LEN = 5; // 5 is the max length of Tabel Member
+
+    PinyinCandidate(const PinyinCandidate&) = delete;
+    PinyinCandidate& operator=(const PinyinCandidate&) = delete;
+    ~PinyinCandidate();
+    PinyinCandidate();
+
+    std::string DebugInfo(PinyinState state) const;
+    PinyinState FindHanzi(const std::string &sourceStr);
+    PinyinState GetHanziPage(uint8_t pageNumber, int8_t candidate[][IME_HZLENTH], uint8_t len);
+    PinyinState GetFwdHanziPage(int8_t candidate[][IME_HZLENTH], uint8_t len);
+    PinyinState GetCurHanziPage(int8_t candidate[][IME_HZLENTH], uint8_t len);
+    PinyinState GetNxtHanziPage(int8_t candidate[][IME_HZLENTH], uint8_t len);
+    PinyinState GetAllHanzi(int8_t candidate[][IME_HZLENTH], uint8_t len);
+    uint8_t GetHanziPagesNum() const
+    {
+        return hanziStatus_.m_matchHZPageNumber;
+    }
+    uint8_t GetMatchHanziNum() const
+    {
+        return hanziStatus_.m_matchHzNumber;
+    }
+    uint8_t GetHanziPageIndex() const
+    {
+        return hanziStatus_.m_currentHzPage;
+    }
+
+    PinyinState Init(const std::string &path);
+
+    /* 设定每页显示二级候选码的个数 */
+    int32_t SetLv2NumPerPage(uint8_t num);
+    uint8_t GetLv2NumPerPage()
+    {
+        return m_lv2NumPerPage;
+    }
+
+protected:
+    /*  从外部文件装载候选码 */
+    int32_t LoadCodeTable(const int8_t *filePath);
+    /*  修复损坏的码表文件 */
+    int32_t RecoverCodeTable(const int8_t *filePath, const int8_t *backupPath);
+
+private:
+    /* init pinyin table path */
+    PinyinState InitPinyinTablePath(const std::string &path);
+    void InitEx(void);
+
+    /* 以下两结构组成了拼音码表,并且以只读方式保存,
+    * 今后扩展词频调整,则将词频数据以另外文件单独保存,
+    * FreqTableIndex数据成员用于实现拼音码表中的结构与词频表中的记录相映射
+    */
+    struct PYTab {
+        int8_t pinyin[IME_PYMAXLENTH];
+        uint32_t freqTableIndex; // 指向本结构在频率记录表中的位置
+        uint16_t hzIndex;
+        uint8_t hzNum;  // 拼音对应的汉字个数
+    };
+
+    struct HZTab {
+        uint32_t hz;
+        uint16_t freqTableIndex;  // 指向本结构在频率记录表中的位置
+    };
+
+    uint8_t m_lv2NumPerPage = 5; // 5 是二级候选码每页显示的个数
+
+    /* 拼音码表的缓存 */
+    PYTab m_pyTabBuf[MAXCHARNUM][MAXSAMEPREFIXPY];
+    HZTab m_hzTabBuf[MAXHZNUM] = {0, 0};  // 汉字码表缓存
+
+    struct {
+        uint8_t m_currentPyPage = 0; // current pinyin page number
+        uint8_t m_matchPyPage = 0; // matched pinyin page num
+        int8_t m_matchPyStartIndex = -1; /*  在码表中与指定拼音匹配的拼音的起始索引 */
+        int8_t m_matchPyEndIndex = -1;   /*  在码表中与指定拼音匹配的结束索引 */
+        uint8_t m_matchPyNumber = 0;     /*  与指定拼音匹配的候选码数量 */
+        uint8_t m_currentPyIndex = 0;
+    } pinyinStatus_;
+    struct {
+        uint16_t m_currentHzIndex = 0;
+        uint8_t m_matchHzNumber = 0;
+        uint8_t m_matchHZPageNumber = 0;
+        uint8_t m_currentHzPage = 0;
+    } hanziStatus_;
+
+    std::string m_pinyinTablePath = "";
+};
+} // namespace OHOS
+#endif // ENABLE_SOFT_KEYBOARD
+#endif // GRAPHIC_LITE_UI_PINYIN_CANDIDATE_H
\ No newline at end of file
index 3be731a..11202ca 100755 (executable)
@@ -83,6 +83,15 @@ public:
     void CreateKeyButtons() override;
     static UISymbolSoftKeyboard* GetInstance();
 };
+
+class UIPinyinSoftKeyboard : public UIAbstractSoftKeyboard {
+public:
+    UIPinyinSoftKeyboard() {}
+    ~UIPinyinSoftKeyboard() override {}
+    void CreateKeyButtons() override;
+    static UIPinyinSoftKeyboard* GetInstance();
+};
+
 } // namespace OHOS
 #endif // ENABLE_SOFT_KEYBOARD
 #endif // GRAPHIC_LITE_UI_INPUT_METHOD_H
index cd8151d..eaeb644 100755 (executable)
@@ -16,6 +16,9 @@
 #ifndef GRAPHIC_LITE_UI_EDIT_TEXT_H
 #define GRAPHIC_LITE_UI_EDIT_TEXT_H
 
+#include <string>
+#include <codecvt>
+#include <locale>
 #include <vector>
 #include "components/ui_edit_text.h"
 #include "input_method/ui_keyboard_codetable.h"
@@ -66,6 +69,7 @@ public:
     void OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) override;
     bool OnClickEvent(const ClickEvent& event) override;
     void InsertChar(UI_KEYCODE& keyCode);
+    void InsertHanzi(const std::string &u8hanzi);
     void DeleteChar();
     void SetText(std::string text);
 
@@ -91,13 +95,26 @@ protected:
     void GetLineInfo(LineInfo& lineInfo);
 
 private:
+    std::wstring Utf8ToUtf16(const std::string &text) const
+    {
+        std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> convert;
+        std::wstring wideText = convert.from_bytes(text);
+        return wideText;
+    }
+
+    std::string Utf16ToUtf8(const std::wstring &wtext) const
+    {
+        std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> convert;
+        return convert.to_bytes(wtext);
+    }
+
     uint32_t cursorIndex_ = 0;
     bool isCursorInited_ = false;
     CursorCallback cursorCallback_;
     Animator *cursorAnimator_ = nullptr;
     UIView *cursorView_ = nullptr;
     LineInfo lineInfo_ = {{0}};
-    std::string tempText_;
+    std::wstring tempText_;
     std::vector<uint16_t> widthOfChars_;
 
     TextPreviewBoxMode editMode_ = TEXT_PREVIEW_BOX_MODE_INSERT;
index bc21631..b173f99 100755 (executable)
@@ -43,7 +43,7 @@ void DisplayDev::LcdFlush(uint8_t layerId)
     }
     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;
@@ -159,7 +159,7 @@ bool DisplayDev::OpenLayer(uint8_t layerId, const LayerInfo& info, uint8_t buffe
     }
 
     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;
     }
 
@@ -394,7 +394,7 @@ void DisplayDev::SetLayerZOrder(uint8_t layerId, uint8_t order)
     }
 }
 
-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);
index b141813..3a98cda 100755 (executable)
  * 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;
@@ -40,14 +44,14 @@ bool GrallocEngines::Init()
     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));
@@ -56,6 +60,37 @@ bool GrallocEngines::AllocBuffer(const AllocInfo& info, GrallocBuffer& buffer)
 #if ENABLE_GMMU
     buffer.stride = static_cast<uint32_t>(bufferHandle->stride);
 #endif
+#if ENABLE_MEMORY_CHECK
+    if (isMonitorEnabled_) {
+        printf("[Alloc] addr = %p, size = %d, usage = %llu\n", bufferHandle->virAddr, bufferHandle->size, bufferHandle->usage);
+    }
+#endif
+    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;
 }
 
@@ -75,7 +110,15 @@ void GrallocEngines::FreeBuffer(uint8_t* virAddr)
     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);
+#if ENABLE_MEMORY_CHECK
+            if (isMonitorEnabled_) {
+                printf("[Free] addr = %p, size = %d, usage = %llu\n", virAddr, handle->size, handle->usage);
+            }
+#endif
             grallocFuncs_->FreeMem(handle);
         }
     }
@@ -141,5 +184,11 @@ void GrallocEngines::DumpMem()
     printf("total size: font %d (count: %d, max: %d), image %d, path %d, fb %d, mapbuffer:%d, yuv %d\n",
         fontCacheSize, fontCount, fontMax, imageCacheSize, pathCacheSize, fbSize, mapBufferSize, yuvCacheSize);
 }
+
+void GrallocEngines::SetMemMonitor(bool enable)
+{
+    isMonitorEnabled_ = enable;
+}
+
 #endif
 } // namespace OHOS
index 1c8ed68..01f4c1c 100755 (executable)
@@ -29,7 +29,7 @@ void* ImageCacheMalloc(ImageInfo& info)
     allocInfo.usage = HBM_USE_ASSIGN_SIZE;
     GrallocBuffer buffer;
     if (!GrallocEngines::GetInstance()->AllocBuffer(allocInfo, buffer)) {
-        GRAPHIC_LOGE("AllocBuffer failed.");
+        GRAPHIC_LOGE("ImageCacheMalloc failed! size = %u", info.dataSize);
         return nullptr;
     }
     info.phyAddr = reinterpret_cast<uint8_t*>(buffer.phyAddr);
index ef30654..7d4094d 100755 (executable)
@@ -97,7 +97,7 @@ public:
     /**
      * @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.
index af7a4c0..138bad1 100755 (executable)
@@ -39,14 +39,18 @@ public:
     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();
+    void SetMemMonitor(bool enable);
 #endif
 private:
     GrallocEngines() : grallocFuncs_(nullptr) {}
     ~GrallocEngines() {}
+    uint8_t yuvBufCnt_ = 0;
     GrallocFuncs* grallocFuncs_;
+    bool isMonitorEnabled_ = false;
 };
 } // end namespace
 #endif // GRAPHIC_LITE_GRALLOC_ENGINES_H
diff --git a/code/sdk/middleware/services/gui/uikit/res/panda_first.bin b/code/sdk/middleware/services/gui/uikit/res/panda_first.bin
new file mode 100644 (file)
index 0000000..0ba0c76
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3ead2ae29e2abd94663466f5cda7c392bfeffc3363e724891a9966a074a215f2
+size 103992
diff --git a/code/sdk/middleware/services/gui/uikit/res/pymb.bin b/code/sdk/middleware/services/gui/uikit/res/pymb.bin
new file mode 100644 (file)
index 0000000..1dd9e3d
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:aa81b306865f9f4ea6a588080f7f31e1a99558d2ca4a072b43a6368298e9d69f
+size 87472
diff --git a/code/sdk/middleware/services/gui/uikit/res/regular_hexagon.bin b/code/sdk/middleware/services/gui/uikit/res/regular_hexagon.bin
new file mode 100644 (file)
index 0000000..27c4fce
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5ab073aa44a3d363774a2643cf80e4a6f3a3ca6b886e3c5f347c99bd45ecf0b9
+size 14376
diff --git a/code/sdk/middleware/services/gui/uikit/res/regular_hexagon_inverse.bin b/code/sdk/middleware/services/gui/uikit/res/regular_hexagon_inverse.bin
new file mode 100644 (file)
index 0000000..b3f69e8
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f239864317c61724189ae003c5d6109f3d4835f10ea7bcda578791fb7ebc7ee
+size 14376
index da574a5..4100ec8 100755 (executable)
@@ -37,6 +37,7 @@ set(PRIVATE_HEADER
     ${UIKIT_ROOT_DIR}/proprietary/include/service
     ${UIKIT_ROOT_DIR}/proprietary/src/utils/innerkits
     ${UIKIT_ROOT_DIR}/proprietary/src/ui/frameworks
+    ${UIKIT_ROOT_DIR}/proprietary/src/ui/innerkits
     ${PROJECT_ROOT_DIR}/hal/input/include
     ${ROOTDIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
     ${ROOTDIR}/open_source/openharmony/third_party/bounds_checking_function/include
@@ -79,6 +80,7 @@ set(COMPONENT_CCFLAGS
     -Wno-missing-declarations
     -Wno-tautological-pointer-compare
     -Wno-unused-private-field
+    -Werror=return-type
 )
 
 set(WHOLE_LINK
index 78ecc57..c3730a2 100755 (executable)
@@ -175,7 +175,7 @@ bool UITestClockDial::HorizontalViewInit(void)
         pageStatus[maxPage - 1] = true;
     }
     listener = new SwipeListener();
-    listener->setCallback(calback);
+    listener->SetCallback(calback);
     mainSwipeGroup->SetOnSwipeListener(listener);
     GRAPHIC_LOGD("UITestClockDial::InitPage over\n");
     return true;
@@ -299,7 +299,7 @@ void UITestClockDial::PreLoad(uint16_t index)
     } else {
         if (!pageStatus[index - 1]) {
             if (!recordCard[index - 1]->InitView()) {
-                GRAPHIC_LOGE("PreLoad PAGE:%d\n", index - 1);
+                GRAPHIC_LOGE("PreLoad PAGE:%u\n", index - 1);
                 return;
             }
             pageStatus[index - 1] = true;
@@ -310,7 +310,7 @@ void UITestClockDial::PreLoad(uint16_t index)
     }
     if (!pageStatus[index + 1]) {
         if (!recordCard[index + 1]->InitView()) {
-            GRAPHIC_LOGE("PreLoad PAGE:%d\n", index + 1);
+            GRAPHIC_LOGE("PreLoad PAGE:%u\n", index + 1);
             return;
         }
         pageStatus[index + 1] = true;
index 53ba272..00d6e63 100755 (executable)
@@ -41,7 +41,7 @@ public:
     ~SwipeListener() override {}
     void OnSwipe(UISwipeView& view) override;
 
-    void setCallback(ZoomEffect* calback)
+    void SetCallback(ZoomEffect* calback)
     {
         calback_ = calback;
     }
index fd3e579..2291781 100644 (file)
@@ -66,18 +66,28 @@ void UITestCoverflow::TearDown()
     }\r
     delete coverflow_;\r
     coverflow_ = nullptr;\r
+\r
+    label_ = nullptr;\r
+    lastIndex_ = 0;\r
     showBtn_ = nullptr;\r
+    isShowBtnGrp_ = false;\r
     btnGrp_ = nullptr;\r
-    label_ = nullptr;\r
+    loadNum_ = 0;\r
+\r
     addBtn_ = nullptr;\r
     removeBtn_ = nullptr;\r
-    mirrorOpaAddBtn_ = nullptr;\r
-    mirrorOpaSubBtn_ = nullptr;\r
-    pageWidthAddBtn_ = nullptr;\r
-    pageWidthSubBtn_ = 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
@@ -117,15 +127,15 @@ void UITestCoverflow::InitButtonGroup()
         btnGrp_->SetVisible(false);\r
         container_->Add(btnGrp_);\r
     }\r
-    CreateLabelButton(&mirrorOpaAddBtn_, "opa+", 0, 0);\r
-    CreateLabelButton(&mirrorOpaSubBtn_, "opa-", 60, 0);    // 60: x position\r
-    CreateLabelButton(&pageWidthAddBtn_, "wid+", 120, 0);   // 120: x position\r
-    CreateLabelButton(&pageWidthSubBtn_, "wid-", 180, 0);   // 180: x position\r
-    CreateLabelButton(&maxAngleAddBtn_, "ang+", 0, 40);     // 40: y position\r
-    CreateLabelButton(&maxAngleSubBtn_, "ang-", 60, 40);    // 60: x position 40: y position\r
-    CreateLabelButton(&addBtn_, "add", 120, 40);            // 120: x position 40: y position\r
-    CreateLabelButton(&removeBtn_, "sub", 180, 40);         // 180: x position 40: y position\r
-    CreateLabelButton(&loopBtn_, "loop", 240, 40);          // 240: x position 40: y position\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
@@ -136,11 +146,11 @@ void UITestCoverflow::UITestCoverflowView001()
         }\r
         coverflow_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());\r
         coverflow_->SetIntercept(true);\r
+        coverflow_->SetThrowDrag(true);\r
+        coverflow_->SetSwipeACCLevel(150); // 150: set drag compensation distance\r
+        coverflow_->SetDragACCLevel(16); // 16: set drag time duration level\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
-            if (src == nullptr) {\r
-                continue;\r
-            }\r
             coverflow_->Add(g_faceInfo[i].name, src);\r
             loadNum_++;\r
         }\r
@@ -180,7 +190,7 @@ bool UITestCoverflow::OnScroll()
     }\r
     if (newCenterIndex != lastIndex_) {\r
         lastIndex_ = newCenterIndex;\r
-        label_->SetText(g_faceInfo[lastIndex_].name);\r
+        label_->SetText(coverflow_->GetViewByIndex(lastIndex_)->GetViewId());\r
     }\r
 \r
     Rect curViewRect = coverflow_->GetViewByIndex(lastIndex_)->GetOrigRect();\r
@@ -197,28 +207,23 @@ bool UITestCoverflow::OnScroll()
 \r
 bool UITestCoverflow::OnClick(UIView& view, const ClickEvent& event)\r
 {\r
-    if (&view == mirrorOpaAddBtn_) {\r
-        mirrorOpa_ += DEFAULT_STEP;\r
-        coverflow_->SetMirrorOpacity(mirrorOpa_);\r
-    } else if (&view == mirrorOpaSubBtn_) {\r
-        mirrorOpa_ -= DEFAULT_STEP;\r
-        coverflow_->SetMirrorOpacity(mirrorOpa_);\r
-    } else if (&view == showBtn_) {\r
+    if (&view == showBtn_) {\r
         btnGrp_->SetVisible(!btnGrp_->IsVisible());\r
     } else if (&view == loopBtn_) {\r
-        isLoop_ = !isLoop_;\r
-        coverflow_->SetLoopState(isLoop_);\r
-        if (isLoop_) {\r
-            loopBtn_->SetStyle(STYLE_BACKGROUND_COLOR, Color::Gray().full);\r
-        } else {\r
-            loopBtn_->SetStyle(STYLE_BACKGROUND_COLOR, Color::GetColorFromRGB(0x00, 0x7d, 0xff).full);\r
-        }\r
-    } else if (&view == pageWidthAddBtn_) {\r
-        itemWidth_ += DEFAULT_STEP;\r
-        coverflow_->SetItemWidth(itemWidth_);\r
-    } else if (&view == pageWidthSubBtn_) {\r
-        itemWidth_ -= DEFAULT_STEP;\r
-        coverflow_->SetItemWidth(itemWidth_);\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
index b67c47e..82c76ac 100644 (file)
@@ -53,17 +53,17 @@ private:
     uint8_t loadNum_ = 0;\r
     UILabelButton* addBtn_ = nullptr;\r
     UILabelButton* removeBtn_ = nullptr;\r
-    UILabelButton* mirrorOpaAddBtn_ = nullptr;\r
-    UILabelButton* mirrorOpaSubBtn_ = nullptr;\r
-    UILabelButton* pageWidthAddBtn_ = nullptr;\r
-    UILabelButton* pageWidthSubBtn_ = 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 itemWidth_ = 250;  // 250: default value\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
-    bool isLoop_ = false;\r
 };\r
 } // namespace OHOS\r
 #endif // UI_TEST_QRCODE_H
\ No newline at end of file
index be5dfec..dfbba8e 100755 (executable)
@@ -23,7 +23,7 @@ static constexpr int16_t VIDEO_WIDTH = 454;
 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;
@@ -58,11 +58,11 @@ static void ScreenStatusNotify(ScreenStatus status)
 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);
@@ -153,7 +153,7 @@ void UITestCross::VideoPage::PageInit()
     std::string uri("/user/video/demo_pure_video_loop.mp4");
     videoPlay_ = new MediaVideoPlay(surface, nullptr, uri, true);
 #ifdef SUPPORT_AT_OHOSFWK
-    g_videoPlay = videoPlay_;
+    g_videoPlay = videoPlayer_;
     registerNotifyScreenStatus(ScreenStatusNotify);
 #endif
 }
index 8999ad0..2025595 100755 (executable)
@@ -51,7 +51,7 @@ public:
     bool OnDragStartEvent(const DragEvent& event) override;
     bool OnDragEvent(const DragEvent& event) override;
     bool OnDragEndEvent(const DragEvent& event) override;
-    void RotatePlanes(int angleDelta, const Vector3<float>& rotateStart, const Vector3<float>& rotateEnd);
+    void RotatePlanes(int angle, const Vector3<float>& rotateStart, const Vector3<float>& rotateEnd);
 
 private:
     Graphic::Vector<CubeInfo> cubePlane_;
index adaeab5..686d1a5 100755 (executable)
@@ -43,7 +43,7 @@ private:
     UIViewGroup* group_ = nullptr;
     UICanvasExt* canvas_ = nullptr;
     UILabelButton* btn_ = nullptr;
-    int16_t index_;
+    int16_t index_ = 0;
 };
 }
 #endif // UI_TEST_SVG_H
\ No newline at end of file
index a84fb16..0084d2b 100755 (executable)
@@ -24,7 +24,7 @@
 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
@@ -36,7 +36,7 @@ static constexpr int16_t TEXT_FONT_SIEZ = 40;
 \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
@@ -47,22 +47,22 @@ static void ScreenStatusNotify(ScreenStatus status)
     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
index 7109caf..0e6bce6 100755 (executable)
@@ -96,7 +96,9 @@ void UITestGroup::SetUpTestCase()
     }
     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()});
@@ -106,18 +108,17 @@ void UITestGroup::SetUpTestCase()
     testCaseList_->PushBack(TestCaseInfo{"卡片切换", new UITestCardSwitch()});
     testCaseList_->PushBack(TestCaseInfo{"消息", new UITestMessage()});
     testCaseList_->PushBack(TestCaseInfo{"呼吸效果", new UITestBreath()});
+#ifndef QSPI_DISPLAY
     testCaseList_->PushBack(TestCaseInfo{"地图", new UITestMap()});
-#if !defined(_WIN32) && !defined(QSPI_DISPLAY)
+#if !defined(_WIN32)
     testCaseList_->PushBack(TestCaseInfo{"视频播放", new UITestVideoPlay()});
 #endif
-#if !defined(QSPI_DISPLAY)
     testCaseList_->PushBack(TestCaseInfo{"翻转动效", new UITestCross()});
-#endif
 #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()});
     testCaseList_->PushBack(TestCaseInfo{"动画曲线", new UITestRunningBall()});
index a4b37b1..3e1c2cb 100755 (executable)
@@ -16,6 +16,7 @@
 #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()
@@ -81,4 +82,16 @@ void InputDeviceManager::Clear()
 {
     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
index 508445c..4f8656d 100755 (executable)
@@ -432,18 +432,30 @@ Path* UIChartPillar::AllocPath(uint32_t cmdNum, uint32_t dataNum)
     }
     path->cmdNum = cmdNum;
     path->dataNum = dataNum;
-    AllocInfo info;
-    info.expectedSize = sizeof(uint8_t) * cmdNum + sizeof(float) * dataNum;
-    info.usage = HBM_USE_ASSIGN_SIZE | HBM_USE_MEM_PATH;
+
+    AllocInfo cmdInfo;
     GrallocBuffer cmdBuffer;
-    if (!GrallocEngines::GetInstance()->AllocBuffer(info, cmdBuffer)) {
-        GRAPHIC_LOGE("Alloc buffer for buffer failed.");
+    cmdInfo.expectedSize = sizeof(uint8_t) * cmdNum;
+    cmdInfo.usage = HBM_USE_ASSIGN_SIZE | HBM_USE_MEM_PATH;
+    if (!GrallocEngines::GetInstance()->AllocBuffer(cmdInfo, cmdBuffer)) {
+        GRAPHIC_LOGE("Alloc buffer for cmd buffer failed.");
         delete path;
-        path = nullptr;
         return nullptr;
     }
+
+    AllocInfo dataInfo;
+    GrallocBuffer dataBuffer;
+    dataInfo.expectedSize = sizeof(float) * dataNum;
+    dataInfo.usage = HBM_USE_ASSIGN_SIZE | HBM_USE_MEM_PATH;
+    if (!GrallocEngines::GetInstance()->AllocBuffer(dataInfo, dataBuffer)) {
+        GRAPHIC_LOGE("Alloc buffer for data buffer failed.");
+        delete path;
+        GrallocEngines::GetInstance()->FreeBuffer(reinterpret_cast<uint8_t*>(cmdBuffer.virAddr));
+        return nullptr;
+    }
+
     path->cmds = (uint8_t *)cmdBuffer.virAddr;
-    path->data = reinterpret_cast<float*>(path->cmds + cmdNum);
+    path->data = reinterpret_cast<float*>(dataBuffer.virAddr);
 
     return path;
 }
@@ -1023,13 +1035,12 @@ void UIChartPolyline::GradientWithVGU(BufferInfo& gfxDstBuffer, const Rect& inva
 {
     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;
     }
 
@@ -1061,7 +1072,7 @@ void UIChartPolyline::GradientWithVGU(BufferInfo& gfxDstBuffer, const Rect& inva
 
     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(
index ad12a80..621ff5d 100755 (executable)
@@ -139,6 +139,12 @@ void UIImageAnimatorView::SetImageAnimatorSrc(const ImageAnimatorInfo imageAnima
                                               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;
index 0456900..5b2af86 100755 (executable)
@@ -27,6 +27,7 @@
 #ifndef VERSION_LITE
 #include "gif_lib.h"
 #endif
+#include "draw/draw_utils.h"
 
 namespace OHOS {
 #ifndef VERSION_LITE
@@ -567,6 +568,15 @@ void UIImageView::SetSrc(const ImageInfo* src)
     Invalidate();
 }
 
+void UIImageView::DumpImgInfo()
+{
+    if (image_.GetSrcType() == IMG_SRC_VARIABLE) {
+        printf("view[%p]: viewType = %d\n", this, GetViewType());
+        const ImageInfo* info = image_.GetImageInfo();
+        PrintImgInfo(info);
+    }
+}
+
 #ifndef VERSION_LITE
 void UIImageView::AddAndStartGifAnimator()
 {
index 5c48338..18af043 100755 (executable)
@@ -83,7 +83,8 @@ public:
         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_;
index 9f2f1ab..e3b110b 100755 (executable)
@@ -147,7 +147,7 @@ void UIQrcode::SetQrcodeVal(const uint8_t* val, uint32_t length)
         qrcodeVal_ = nullptr;
     }
     dataBin_.clear();
-    for (int i = 0; i < length; i++) {
+    for (uint32_t i = 0; i < length; i++) {
         dataBin_.push_back(val[i]);
     }
 }
index a24706e..b743280 100755 (executable)
@@ -321,18 +321,16 @@ void UISwipeView::SwitchToPage(int16_t dst, bool needAnimator)
         yOffset = (GetHeight() >> 1) - (dstView->GetY() + (dstView->GetHeightWithMargin() >> 1));
     }
 
-    if ((xOffset != 0) || (yOffset != 0)) {
-        if (scrollAnimator_.GetState() != Animator::STOP) {
-            UIAbstractScroll::StopAnimator();
-        }
-        if (needAnimator) {
-            animatorCallback_.SetDragTimes(tickTime_);
-            animatorCallback_.SetDragStartValue(0, 0);
-            animatorCallback_.SetDragEndValue(xOffset, yOffset);
-            scrollAnimator_.Start();
-        } else {
-            MoveChildByOffset(xOffset, yOffset);
-        }
+    if (scrollAnimator_.GetState() != Animator::STOP) {
+        UIAbstractScroll::StopAnimator();
+    }
+    if (needAnimator) {
+        animatorCallback_.SetDragTimes(tickTime_);
+        animatorCallback_.SetDragStartValue(0, 0);
+        animatorCallback_.SetDragEndValue(xOffset, yOffset);
+        scrollAnimator_.Start();
+    } else {
+        MoveChildByOffset(xOffset, yOffset);
     }
 }
 
index 74a13ec..3f63d2e 100755 (executable)
@@ -26,6 +26,7 @@
 #include "gfx_utils/mem_api.h"
 #include "securec.h"
 #include "themes/theme_manager.h"
+#include <cstdio>
 
 namespace OHOS {
 UIView::UIView()
@@ -272,7 +273,8 @@ void UIView::Rotate(int16_t angle, const Vector2<float>& pivot)
 {
 #if !ENABLE_MAP_BUFFER
     UIViewType type = GetViewType();
-    if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW)) {
+    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;
     }
@@ -291,14 +293,15 @@ void UIView::Rotate(int16_t angle, const Vector3<float>& pivotStart, const Vecto
 {
 #if !ENABLE_MAP_BUFFER
     UIViewType type = GetViewType();
-    if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW)) {
+    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;
     }
 #endif
     if (transMap_ == nullptr) {
-        ReMeasure();
         transMap_ = new TransformMap();
+        ReMeasure();
     }
     bool firstTrans = transMap_->IsInvalid();
     Rect joinRect = transMap_->GetBoxRect();
@@ -317,7 +320,8 @@ void UIView::Scale(const Vector2<float>& scale, const Vector2<float>& pivot)
 {
 #if !ENABLE_MAP_BUFFER
     UIViewType type = GetViewType();
-    if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW)) {
+    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;
     }
@@ -331,14 +335,15 @@ void UIView::Scale(const Vector3<float>& scale, const Vector3<float>& pivot)
 {
 #if !ENABLE_MAP_BUFFER
     UIViewType type = GetViewType();
-    if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW)) {
+    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;
     }
 #endif
     if (transMap_ == nullptr) {
-        ReMeasure();
         transMap_ = new TransformMap();
+        ReMeasure();
     }
     bool firstTrans = transMap_->IsInvalid();
     Rect joinRect = transMap_->GetBoxRect();
@@ -365,14 +370,15 @@ void UIView::Shear(const Vector2<float>& shearX, const Vector2<float>& shearY, c
 {
 #if !ENABLE_MAP_BUFFER
     UIViewType type = GetViewType();
-    if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW)) {
+    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;
     }
 #endif
     if (transMap_ == nullptr) {
-        ReMeasure();
         transMap_ = new TransformMap();
+        ReMeasure();
     }
     bool firstTrans = transMap_->IsInvalid();
     Rect joinRect = transMap_->GetBoxRect();
@@ -391,7 +397,8 @@ void UIView::Translate(const Vector2<int16_t>& trans)
 {
 #if !ENABLE_MAP_BUFFER
     UIViewType type = GetViewType();
-    if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW)) {
+    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;
     }
@@ -404,14 +411,15 @@ void UIView::Translate(const Vector3<int16_t>& trans)
 {
 #if !ENABLE_MAP_BUFFER
     UIViewType type = GetViewType();
-    if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW)) {
+    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;
     }
 #endif
     if (transMap_ == nullptr) {
-        ReMeasure();
         transMap_ = new TransformMap();
+        ReMeasure();
     }
     bool firstTrans = transMap_->IsInvalid();
     Rect joinRect = transMap_->GetBoxRect();
@@ -437,8 +445,8 @@ bool UIView::IsTransInvalid()
 void UIView::SetCameraDistance(int16_t distance)
 {
     if (transMap_ == nullptr) {
-        ReMeasure();
         transMap_ = new TransformMap();
+        ReMeasure();
     }
     Rect joinRect = transMap_->GetBoxRect();
     transMap_->SetTransMapRect(GetOrigRect());
@@ -451,8 +459,8 @@ void UIView::SetCameraDistance(int16_t distance)
 void UIView::SetCameraPosition(const Vector2<float>& position)
 {
     if (transMap_ == nullptr) {
-        ReMeasure();
         transMap_ = new TransformMap();
+        ReMeasure();
     }
     Rect joinRect = transMap_->GetBoxRect();
     transMap_->SetTransMapRect(GetOrigRect());
@@ -510,7 +518,9 @@ void UIView::RequestFocus()
 
 void UIView::ClearFocus()
 {
-    FocusManager::GetInstance()->ClearFocus();
+    if (FocusManager::GetInstance()->GetFocusedView() == this) {
+        FocusManager::GetInstance()->ClearFocus();
+    }
 }
 #endif
 
@@ -799,7 +809,8 @@ void UIView::SetTransformMap(const TransformMap& transMap)
 {
 #if !ENABLE_MAP_BUFFER
     UIViewType type = GetViewType();
-    if ((type != UI_IMAGE_VIEW) && (type != UI_TEXTURE_MAPPER) && (type != UI_CANVAS_EXT) && (type != UI_MAP_VIEW)) {
+    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;
     }
@@ -1185,7 +1196,7 @@ bool UIView::GetBitmap(ImageInfo& bitmap)
     RootView::GetInstance()->SaveDrawContext();
     RootView::GetInstance()->UpdateBufferInfo(&newBufferInfo);
     RootView::GetInstance()->SetSnapshotFlag(true);
-    RootView::GetInstance()->Measure();
+    RootView::GetInstance()->MeasureView(this);
     RootView::GetInstance()->DrawTop(this, mask);
 #if ENABLE_VGU_ENGINE
     LiteMGfxEngine::GetInstance()->SyncHwDraw();
@@ -1197,4 +1208,47 @@ bool UIView::GetBitmap(ImageInfo& bitmap)
     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;
+}
+
+void UIView::PrintImgInfo(const ImageInfo* info)
+{
+    if (info == nullptr) {
+        printf("    ImgInfo[%p]\n", info);
+    } else {
+        printf("    ImgInfo[%p]: size = [%d, %d], fmt = %d, data = %p, dataSize = %d, cacheNode = %p\n",
+            info, info->header.width, info->header.height, info->header.colorMode, info->data, info->dataSize, info->cacheNode);
+    }
+}
+
+void UIView::DumpImgInfoRecursive()
+{
+    DumpImgInfo();
+
+    if (IsViewGroup()) {
+        UIView* child = static_cast<UIViewGroup*>(this)->GetChildrenHead();
+        while (child != nullptr) {
+            child->DumpImgInfoRecursive();
+            child = child->GetNextSibling();
+        }
+    }
+}
 } // namespace OHOS
index 295fb93..c5343fc 100755 (executable)
@@ -32,6 +32,14 @@ public:
     {}
     virtual ~PointerInputDevice() {}
 
+    void ClearPressableViews()
+    {
+        dragLen_ = { 0, 0 };
+        dragStep_ = { 0, 0 };
+        draggableView_ = nullptr;
+        touchableView_ = nullptr;
+    }
+
 protected:
     void DispatchEvent(const DeviceData& data) override;
 
index 11e09da..bd89a19 100755 (executable)
@@ -53,6 +53,11 @@ public:
      */
     void Clear();
 
+    /**
+     * Clear pressable views recorded in the pointer input device
+     */
+    void ClearPressableViews();
+
     void Callback() override;
 
     /**
index af00595..3219560 100755 (executable)
@@ -464,7 +464,7 @@ private:
     bool needScreencap_ = false;
 #endif
     bool isSnapshot_ = false;
-    UIView* blurView_;
+    UIView* blurView_ = nullptr;
     UIViewGroup sysView_;
     UIViewGroup appView_;
 };
index e39efb5..24c62e7 100755 (executable)
@@ -272,6 +272,8 @@ public:
     void SetWidth(int16_t width) override;
     void SetHeight(int16_t height) override;
 
+    void DumpImgInfo() override;
+
 protected:
     /**
      * @brief Represents the width of this image.
index 690be39..884e5c3 100755 (executable)
@@ -331,7 +331,7 @@ protected:
     virtual void SwitchToPage(int16_t dst, bool needAnimator = true);
     void MoveChildByOffset(int16_t xOffset, int16_t yOffset) override;
     void MoveHeadOrTailChild();
-
+    virtual void RefreshCurrentView(int16_t distance, uint8_t dragDirection);
     /**
      * @brief Indicates that the animation duration is 12 ticks.
      *
@@ -370,7 +370,6 @@ protected:
 #endif
 
 private:
-    void RefreshCurrentView(int16_t distance, uint8_t dragDirection);
     void RefreshCurrentViewInner(int16_t distance,
                                  uint8_t dragDirection,
                                  int16_t (UIView::*pfnGetXOrY)() const,
index 3c9227f..bffed44 100755 (executable)
@@ -115,6 +115,9 @@ enum UIViewType : uint8_t {
     UI_BARCODE,
     UI_MAP_VIEW,
     UI_KALEIDOSCOPE_VIEW,
+    UI_ROLLER_VIEW,
+    UI_HEXAGONS_LIST,
+    UI_ICOSAHEDRON_VIEW,
     UI_NUMBER_MAX
 };
 
@@ -1787,6 +1790,16 @@ public:
      *        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();
+
+    void DumpImgInfoRecursive();
+
+    virtual void DumpImgInfo() {}
+
 protected:
     bool touchable_ : 1;
     bool visible_ : 1;
@@ -1824,6 +1837,7 @@ protected:
     bool IsInvalid(float percent);
     void DrawViewBounds(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea);
     void UpdateRectInfo(uint8_t key, const Rect& rect);
+    void PrintImgInfo(const ImageInfo* info);
 
 private:
     Rect rect_;
index fd67642..a313837 100755 (executable)
@@ -157,7 +157,7 @@ namespace OHOS {
   * @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.
@@ -361,7 +361,7 @@ namespace OHOS {
 /**
  * @brief Graphics rendering accelerated by VGUEngine, which is disabled by default on other platforms.
  */
-#define ENABLE_VGU_ENGINE                 1
+#define ENABLE_VGU_ENGINE                 0
 /**
  * @brief ARM NEON ability, which is enabled by default on other platforms.
  */
@@ -369,7 +369,7 @@ namespace OHOS {
 /**
  * @brief vector font global ability, which is disabled by default on LiteOS.
  */
-#define ENABLE_FONT_VECTOR_GLOBAL                   1
+#define ENABLE_FONT_VECTOR_GLOBAL                   0
 /**
  * @brief image bin ability, which is disabled by default on LiteOS.
  */
@@ -594,7 +594,7 @@ static constexpr uint8_t INDEV_DRAG_LIMIT = 10;
 /* Maximum depth of view nesting. The default value is <b>64</b>. */
 static constexpr uint8_t COMPONENT_NESTING_DEPTH = 64;
 /* Long-press event threshold. The default value is <b>1000</b> ms. */
-static constexpr uint16_t INDEV_LONG_PRESS_TIME = 100;
+static constexpr uint16_t INDEV_LONG_PRESS_TIME = 1000;
 /* Delay for reporting a press event on a draggable object. The default value is <b>100</b> ms. */
 static constexpr uint16_t INDEV_PRESS_TIME_IN_DRAG = 100;
 /* Maximum number of bytes in a text that can be continuously displayed. The default value is <b>4096</b> bytes. */
index 7780787..748c81d 100755 (executable)
@@ -662,6 +662,19 @@ public:
      */
     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.
      *
@@ -865,7 +878,7 @@ bool Matrix4<T>::operator==(const Matrix4& other) const
 }
 
 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_;
@@ -875,12 +888,12 @@ Matrix4<T> Matrix4<T>::Rotate(T angle, const Vector3<T>& pivot1, const Vector3<T
     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
@@ -899,6 +912,14 @@ Matrix4<T> Matrix4<T>::Rotate(T angle, const Vector3<T>& pivot1, const Vector3<T
     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)
 {
index b90744c..ee97596 100755 (executable)
@@ -782,7 +782,7 @@ static bool InterruptCheckIsCanResume(const InterruptElement *interruptMain,
 \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
@@ -802,7 +802,6 @@ static void ResumeInterruptStream(const InterruptElement *interruptEl, List *lis
                 curInterruptEl->delayedStreamType = AUDIO_STREAM_INVALID;\r
             }\r
         }\r
-        it = ListIterNext(list, it);\r
     }\r
 }\r
 \r
index aa07c13..88f9624 100755 (executable)
@@ -365,7 +365,7 @@ static int32_t CheckTrackState(const AudioStreamStrategy *strategy, int32_t newS
     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");
             }
         }
@@ -522,7 +522,17 @@ static int32_t UpdateActiveStreamMixWeight(const AudioStreamStrategy *strategy,
             }
             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;
@@ -666,6 +676,10 @@ int32_t StreamMgrDestroyStreamOut(uintptr_t handle)
     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;
@@ -676,9 +690,8 @@ int32_t StreamMgrDestroyStreamOut(uintptr_t handle)
     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) {
@@ -737,15 +750,18 @@ int32_t StreamMgrDestroyStreamIn(uintptr_t handle)
 {
     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);
index d4248db..8347520 100755 (executable)
@@ -192,6 +192,9 @@ static int32_t ProcessCurStream(TrackHandleContext *context)
         return AUDIO_ERROR;
     }
     context->render = NULL;
+#ifdef SUPPORT_SET_DSP_CLOCK_FREQ
+    SetHifiClockFreqByStreamTypeAndDeviceType(context->streamInfo.streamType, (AudioDeviceType)validFwDevice, false);
+#endif
     return AUDIO_SUCCESS;
 }
 
@@ -355,6 +358,7 @@ int32_t SetTrackOutputDevice(uintptr_t handle, int32_t deviceId, const AudioStre
     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;
         }
@@ -473,10 +477,9 @@ static void DestroyAudioRenderHandle(TrackHandleContext *context)
 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;
         }
index 07b6c11..6df4ffc 100755 (executable)
@@ -448,6 +448,7 @@ typedef enum {
     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
index f85583c..46654fc 100755 (executable)
@@ -332,7 +332,7 @@ public:
     int32_t DumpInfo(AudioManagerDebugInfo &audioManagerInfo);\r
 \r
 private:\r
-    AudioManager();\r
+    AudioManager() noexcept;\r
     class AudioManagerImpl;\r
     AudioManagerImpl *impl_;\r
 };\r
index f22c581..4d38e17 100755 (executable)
@@ -272,6 +272,7 @@ PlayerControl::PlayerControl()
       seekToTimeMs_(-1),\r
       sourceType_(SOURCE_TYPE_BUT),\r
       firstAudioFrameAfterSeek_(false),\r
+      firstPosAfterSeek_(0),\r
       fd_(-1),\r
       offset_(0),\r
       playerSource_(nullptr),\r
@@ -610,6 +611,10 @@ int32_t PlayerControl::OnPlayControlEvent(void *priv, const EventCbType event) c
     } 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
@@ -623,15 +628,16 @@ int32_t PlayerControl::OnPlayControlEvent(void *priv, const EventCbType event) c
 int32_t PlayerControl::PauseResume(void)\r
 {\r
     CHECK_NULL_RETURN(sinkManager_, HI_ERR_PLAYERCONTROL_NULL_PTR, "sinkManager_ nullptr");\r
+    MediaMutexLock(schMutex_);\r
     int32_t ret = sinkManager_->Resume();\r
     if (ret != HI_SUCCESS) {\r
         if (ret != NOT_FOUND_ACTIVE_STREAME) {\r
             MEDIA_ERR_LOG("resume failed");\r
             hasVideo_ ? NotifyError(PLAYERCONTROL_ERROR_VID_PLAY_FAIL) : NotifyError(PLAYERCONTROL_ERROR_AUD_PLAY_FAIL);\r
         }\r
+        MediaMutexUnLock(schMutex_);\r
         return ret;\r
     }\r
-    MediaMutexLock(schMutex_);\r
     paused_ = false;\r
     // played to the end no need to signal\r
     if (!IsPlayEos()) {\r
@@ -1130,7 +1136,11 @@ void PlayerControl::ReportRenderPosition(void)
     CHECK_NULL_RETURN_NONE(sinkManager_, "sinkManager_ nullptr");\r
     sinkManager_->GetRenderPosition(position);\r
     if (position >= 0 && currentPosition_ != position) {\r
-        currentPosition_ = position;\r
+        if (lastRendPos_ > 0) {\r
+            currentPosition_ = position - lastRendPos_ + firstPosAfterSeek_;\r
+        } else {\r
+            currentPosition_ = position;\r
+        }\r
         EventCallback(PLAYERCONTROL_EVENT_PROGRESS, &currentPosition_);\r
     }\r
 }\r
@@ -1213,7 +1223,12 @@ int32_t PlayerControl::DequeueInputDataFromDemuxer(void)
 \r
     if (formatPacket_.data == nullptr && formatPacket_.len == 0) {\r
         strmReadEnd_ = true;\r
+        formatPacket_.timestampUs = -1;\r
         gettimeofday(&streamEndTime_, nullptr);\r
+        if (loop_) {\r
+            seekToTimeMs_ = 0;\r
+            return HI_FAILURE;\r
+        }\r
     }\r
 \r
     isAudio_ = (formatPacket_.frameType == FRAME_TYPE_AUDIO) ? true : false;\r
@@ -1277,6 +1292,8 @@ int32_t PlayerControl::QueueInputDataToAudioSink(void)
     }\r
     if (firstAudioFrameAfterSeek_) {\r
         firstAudioFrameAfterSeek_ = false;\r
+        sinkManager_->GetRenderPosition(lastRendPos_);\r
+        firstPosAfterSeek_ = formatPacket_.timestampUs;\r
         MEDIA_INFO_LOG("push firstAudioFrameAfterSeek_ success, pts:%lld", formatPacket_.timestampUs);\r
     }\r
     if (formatPacket_.data != nullptr || formatPacket_.len != 0) {\r
@@ -1832,6 +1849,7 @@ int32_t PlayerControl::DoSeekIfNeed(void)
     if (seekToTimeMs_ == -1) {\r
         return HI_SUCCESS;\r
     }\r
+    MEDIA_INFO_LOG("seek start");\r
     int32_t ret = AyncSeek(seekToTimeMs_);\r
     if (ret != HI_SUCCESS) {\r
         MEDIA_ERR_LOG(" AyncSeek  failed , ret:%d", ret);\r
@@ -1847,7 +1865,7 @@ int32_t PlayerControl::DoSeekIfNeed(void)
     seekToTimeMs_ = -1;\r
     firstAudioFrameAfterSeek_ = true;\r
     firstVideoFrameAfterSeek_ = true;\r
-    MEDIA_DEBUG_LOG("seek end");\r
+    MEDIA_INFO_LOG("seek end");\r
     return HI_SUCCESS;\r
 }\r
 \r
@@ -1896,6 +1914,11 @@ int32_t PlayerControl::DoSetPlaybackSpeed(float speed) const
     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
@@ -1910,6 +1933,13 @@ void PlayerControl::PlayerControlCondSignal(void)
     }\r
 }\r
 \r
+void PlayerControl::EnableSingleLooping(bool loop)\r
+{\r
+    MediaMutexLock(schMutex_);\r
+    loop_ = loop;\r
+    MediaMutexUnLock(schMutex_);\r
+}\r
+\r
 void PlayerControl::NotifyError(PlayerControlError playerError) const\r
 {\r
     EventCallback(PLAYERCONTROL_EVENT_ERROR, static_cast<void *>(&playerError));\r
@@ -1939,6 +1969,9 @@ void PlayerControl::FlushDecoder(void) const
 \r
 int32_t PlayerControl::DecoderAndSinkReset(void)\r
 {\r
+    if (strmReadEnd_ && loop_) {\r
+        return HI_SUCCESS;\r
+    }\r
     int32_t ret;\r
     bool isNeedResume = false;\r
     ret = sinkManager_->Pause();\r
@@ -1972,7 +2005,8 @@ int32_t PlayerControl::AyncSeek(int64_t seekTime)
             MEDIA_INFO_LOG("exec fmt_seek video stream failed, ret:%d", ret);\r
             seekTimeInMs = currentPosition_;\r
         }\r
-    } else if (fmtFileInfo_.s32UsedAudioStreamIndex != HI_DEMUXER_NO_MEDIA_STREAM) {\r
+    }\r
+    if (fmtFileInfo_.s32UsedAudioStreamIndex != HI_DEMUXER_NO_MEDIA_STREAM) {\r
         ret = playerSource_->Seek(fmtFileInfo_.s32UsedAudioStreamIndex, seekTimeInMs, FORMAT_SEEK_MODE_BACKWARD_KEY);\r
         if (ret != HI_SUCCESS) {\r
             MEDIA_INFO_LOG("exec fmt_seek audio stream failed, ret:%d", ret);\r
index 9012321..7c8d532 100755 (executable)
@@ -125,6 +125,7 @@ public:
     
     int32_t GetPlayerFileDumpInfo(PlayerFileDebugInfo &fileDebugInfo);
     void PlayerControlCondSignal(void);
+    void EnableSingleLooping(bool loop);
 protected:
     int32_t DoRegCallback(const PlayerCtrlCallbackParam &observer);
 
@@ -155,6 +156,7 @@ protected:
     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;
@@ -271,6 +273,7 @@ private:
     SourceType sourceType_;
     bool firstAudioFrameAfterSeek_;
     bool firstVideoFrameAfterSeek_;
+    int64_t firstPosAfterSeek_;
     int32_t fd_;
     uint64_t offset_;
     std::string filePath_;
index c9c06b8..69568fd 100755 (executable)
@@ -45,7 +45,7 @@ AudioSink::AudioSink()
       rendStartTime_(-1),
       lastRendPts_(AV_INVALID_PTS),
 #ifdef MINI_MEMORY_SUPPORT
-      lastRenderPtsWhenPause_(0),
+      lastRenderPosition_(0),
       hasSendEosFrame_(false),
 #endif
       lastRendSysTimeMs_(-1),
@@ -158,7 +158,7 @@ void AudioSink::ResetRendStartTime()
 {
     lastRendFrameCnt_ = 0;
 #ifdef MINI_MEMORY_SUPPORT
-    lastRenderPtsWhenPause_ = 0;
+    lastRenderPosition_ = 0;
 #endif
     lastRendPts_ = AV_INVALID_PTS;
     rendStartTime_ = AV_INVALID_PTS;
@@ -552,9 +552,7 @@ int32_t AudioSink::Pause(void)
         CHECK_FAILED_RETURN(outStream_->Pause(), 0, -1, "pause() fail");
     }
     paused_ = true;
-#ifdef MINI_MEMORY_SUPPORT
-    lastRenderPtsWhenPause_ = lastRendPts_;
-#endif
+    RecordLastPosition();
     return SINK_SUCCESS;
 }
 
@@ -632,7 +630,7 @@ void AudioSink::GetRenderPosition(int64_t &position) const
 
     position = posNs / NANOS_PER_MILLISECOND;
 #ifdef MINI_MEMORY_SUPPORT
-    position += lastRenderPtsWhenPause_;
+    position += lastRenderPosition_;
 #endif
 }
 
@@ -669,6 +667,13 @@ int32_t AudioSink::SetOutputDevice(const int32_t deviceId) const
     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;
index a3dcd9d..11dfc35 100755 (executable)
@@ -65,6 +65,7 @@ public:
     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();
@@ -94,7 +95,7 @@ private:
     int64_t rendStartTime_;
     int64_t lastRendPts_;
 #ifdef MINI_MEMORY_SUPPORT
-    int64_t lastRenderPtsWhenPause_;
+    int64_t lastRenderPosition_;
     bool hasSendEosFrame_;
 #endif
     int64_t lastRendSysTimeMs_;
index c9cb7a7..9ec34e6 100755 (executable)
@@ -466,5 +466,12 @@ int32_t SinkManager::SetOutputDevice(const int32_t deviceId) const
     }
     return -1;
 }
+
+void SinkManager::RecordLastPosition()
+{
+    if (audioSinkInfo_[0].sink != nullptr) {
+        audioSinkInfo_[0].sink->RecordLastPosition();
+    }
+}
 }
 }
index f3cf590..f9e02fb 100755 (executable)
@@ -79,6 +79,7 @@ public:
     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_;
index 9e82e2c..42dc934 100755 (executable)
@@ -985,6 +985,9 @@ int32_t Player::PlayerImpl::EnableSingleLooping(bool loop)
         return -1;
     }
     isSingleLoop_ = loop;
+    if (player_ != nullptr) {
+        player_->EnableSingleLooping(loop);
+    }
     MediaMutexUnLock(lock_);
     return 0;
 }
index c4b2f13..23c96bb 100755 (executable)
@@ -115,6 +115,15 @@ public:
      */
     static JSIValue SrcGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
 
+    /**
+     * the getter of audio srcInner property
+     *
+     * @param thisVal Indicates function execute context
+     * @param args Indicates the function arguments
+     * @param argsSize Indicates the size of function arguments
+     */
+    static JSIValue SrcInnerGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
     /**
      * the setter of audio src property
      *
@@ -124,6 +133,15 @@ public:
      */
     static JSIValue SrcSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
 
+    /**
+     * the setter of audio srcInner property
+     *
+     * @param thisVal Indicates function execute context
+     * @param args Indicates the function arguments
+     * @param argsSize Indicates the size of function arguments
+     */
+    static JSIValue SrcInnerSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
     /**
      * the getter of audio currentTime property
      *
index 3b71da8..3010548 100755 (executable)
@@ -89,7 +89,7 @@ public:
 
     bool Stop();
 
-    char *GetSrc() const;
+    char *GetSrc(bool innerFlag) const;
 
     double GetCurrentTime() const;
 
@@ -107,7 +107,7 @@ public:
 
     bool IsPlaying() const;
 
-    bool SetSrc(char *src);
+    bool SetSrc(char *src, bool innerFlag);
 
     bool SetCurrentTime(double currentTime) const;
 
@@ -159,6 +159,7 @@ private:
     static MediaMutexHandle lock_;
     static MediaThreadCondHandle condition_;
     static void *UpdateTimeHandler(void *arg);
+    static int GetSrcInnerPrefix(char *src, char *dest);
 
     Media::Player *player_;
     std::shared_ptr<AudioPlayerCallback> callback_;
@@ -170,11 +171,13 @@ private:
     AudioEventListener *onErrorListener_;
     AudioEventListener *onTimeUpdateListener_;
     char *src_;
+    char *srcInner_;
     char *status_;
     double volume_;
     bool autoPlay_;
     bool muted_;
     bool isRunning_;
+    bool isSysSrc_;
     MediaThreadIdHandle updateTimeProcess_;
 };
 } // namespace ACELite
index c830fe0..174b29f 100755 (executable)
@@ -153,7 +153,8 @@ JSIValue AudioModule::GetPlayState(const JSIValue thisVal, const JSIValue *args,
         AudioPlayer *audioPlayer = AudioPlayer::GetInstance();
         JSIValue data = JSI::CreateObject();
         JSI::SetStringProperty(data, "status", audioPlayer->GetStatus());
-        JSI::SetStringProperty(data, "src", audioPlayer->GetSrc());
+        JSI::SetStringProperty(data, "src", audioPlayer->GetSrc(false));
+        JSI::SetStringProperty(data, "srcInner", audioPlayer->GetSrc(true));
         JSI::SetNumberProperty(data, "currentTime", audioPlayer->GetCurrentTime());
         JSI::SetBooleanProperty(data, "autoplay", audioPlayer->GetAutoPlay());
         JSI::SetBooleanProperty(data, "loop", audioPlayer->IsLooping());
@@ -175,7 +176,13 @@ JSIValue AudioModule::GetPlayState(const JSIValue thisVal, const JSIValue *args,
 
 JSIValue AudioModule::SrcGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
 {
-    char *src = AudioPlayer::GetInstance()->GetSrc();
+    char *src = AudioPlayer::GetInstance()->GetSrc(false);
+    return (src == nullptr) ? JSI::CreateUndefined() : JSI::CreateString(src);
+}
+
+JSIValue AudioModule::SrcInnerGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+    char *src = AudioPlayer::GetInstance()->GetSrc(true);
     return (src == nullptr) ? JSI::CreateUndefined() : JSI::CreateString(src);
 }
 
@@ -188,7 +195,24 @@ JSIValue AudioModule::SrcSetter(const JSIValue thisVal, const JSIValue *args, ui
     ActivateAudioInterrupt();
     char *src = JSI::ValueToString(args[0]);
     bool autoPlay = AudioPlayer::GetInstance()->GetAutoPlay();
-    bool ret = AudioPlayer::GetInstance()->SetSrc(src);
+    bool ret = AudioPlayer::GetInstance()->SetSrc(src, false);
+    AudioPlayer::GetInstance()->SetAudioSessionId(interrupt->sessionID);
+    if (autoPlay) {
+        AudioPlayer::GetInstance()->Play();
+    }
+    return JSI::CreateBoolean(ret);
+}
+
+JSIValue AudioModule::SrcInnerSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+    if (argsSize < 1) {
+        MEDIA_ERR_LOG("1 argument is required.");
+        return JSI::CreateBoolean(false);
+    }
+    ActivateAudioInterrupt();
+    char *src = JSI::ValueToString(args[0]);
+    bool autoPlay = AudioPlayer::GetInstance()->GetAutoPlay();
+    bool ret = AudioPlayer::GetInstance()->SetSrc(src, true);
     AudioPlayer::GetInstance()->SetAudioSessionId(interrupt->sessionID);
     if (autoPlay) {
         AudioPlayer::GetInstance()->Play();
@@ -435,6 +459,7 @@ void InitAudioModule(JSIValue exports)
     JSI::SetModuleAPI(exports, "getPlayState", AudioModule::GetPlayState);
 
     AudioModule::DefineProperty(exports, "src", AudioModule::SrcGetter, AudioModule::SrcSetter);
+    AudioModule::DefineProperty(exports, "srcInner", AudioModule::SrcInnerGetter, AudioModule::SrcInnerSetter);
     AudioModule::DefineProperty(exports, "currentTime", AudioModule::CurrentTimeGetter, AudioModule::CurrentTimeSetter);
     AudioModule::DefineProperty(exports, "duration", AudioModule::DurationGetter, AudioModule::DurationSetter);
     AudioModule::DefineProperty(exports, "autoplay", AudioModule::AutoPlayGetter, AudioModule::AutoPlaySetter);
index 5c63678..a94b564 100755 (executable)
@@ -21,6 +21,8 @@
 #include "js_async_work.h"
 #include "media_log.h"
 #include "audio_manager.h"
+#include "bundlems_slite_client.h"
+#include "abilityms_slite_client.h"
 
 #define DELETE_NOT_NULL(pointer) \
     if (pointer != nullptr)      \
@@ -38,6 +40,8 @@ constexpr uint16_t MAX_VOLUME = 100;
 constexpr double DEFAULT_VOLUME = 1.0;
 constexpr double MILLISECONDS_PER_SECOND = 1000.0;
 constexpr uint32_t MICROSECONDS_PER_SECOND = 1000 * 1000;
+constexpr uint32_t MAX_PATH_LEN = 128;
+char absPath[MAX_PATH_LEN] = {0};
 
 static Audio::AudioManager& g_amInstance = Audio::AudioManager::GetInstance();
 
@@ -125,11 +129,13 @@ AudioPlayer::AudioPlayer() : player_(nullptr),
                              onErrorListener_(nullptr),
                              onTimeUpdateListener_(nullptr),
                              src_(nullptr),
+                             srcInner_(nullptr),
                              status_(const_cast<char *>(STATUS_STOP)),
                              volume_(DEFAULT_VOLUME),
                              autoPlay_(false),
                              muted_(false),
                              isRunning_(false),
+                             isSysSrc_(false),
                              updateTimeProcess_(nullptr) {}
 
 void AudioPlayer::ForkUpdateTimeThread()
@@ -184,6 +190,25 @@ void *AudioPlayer::UpdateTimeHandler(void *arg)
     return nullptr;
 }
 
+int AudioPlayer::GetSrcInnerPrefix(char *src, char *dest)
+{
+    int ret;
+    ElementName* topAbility = OHOS::AbilityMsClient::GetInstance().GetTopAbility();
+    if (topAbility != nullptr) {
+        BundleInfo bundleInfo;
+        ret = BundleMsClient::GetInstance().GetBundleInfo(topAbility->bundleName, 0, &bundleInfo);
+        if (ret == 0) {
+            (void)sprintf_s(dest, MAX_PATH_LEN - 1, "%s/assets/entry/%s", bundleInfo.codePath, src);
+            return 0;
+        } else {
+            MEDIA_ERR_LOG("failed to get bundleInfo!");
+        }
+    } else {
+        MEDIA_ERR_LOG("failed to get top ability!");
+    }
+    return -1;
+}
+
 void AudioPlayer::StopUpdateTimeThread()
 {
     MediaMutexLock(lock_);
@@ -267,10 +292,14 @@ void AudioPlayer::ReleaseEventListeners()
 
 void AudioPlayer::ReleaseSrc()
 {
-    if (src_ != nullptr) {
+    if (src_ != nullptr && isSysSrc_ == true) {
         ace_free(src_);
         src_ = nullptr;
     }
+    if (srcInner_ != nullptr && isSysSrc_ == false) {
+        ace_free(srcInner_);
+        srcInner_ = nullptr;
+    }
 }
 
 bool AudioPlayer::Play()
@@ -321,9 +350,9 @@ bool AudioPlayer::Stop()
     return true;
 }
 
-char *AudioPlayer::GetSrc() const
+char *AudioPlayer::GetSrc(bool innerFlag) const
 {
-    return src_;
+    return innerFlag ? srcInner_ : src_;
 }
 
 double AudioPlayer::GetCurrentTime() const
@@ -387,7 +416,7 @@ bool AudioPlayer::IsPlaying() const
     return player_->IsPlaying();
 }
 
-bool AudioPlayer::SetSrc(char *src)
+bool AudioPlayer::SetSrc(char *src, bool innerFlag)
 {
     if (src_ != nullptr) {
         if (!DestoryPlayer()) {
@@ -403,14 +432,28 @@ bool AudioPlayer::SetSrc(char *src)
         return true;
     }
 
-    std::string uri(src);
+    std::string uri;
+    if (innerFlag) {
+        srcInner_ = src;
+        (void)memset_s(absPath, MAX_PATH_LEN, 0, MAX_PATH_LEN);
+        if (GetSrcInnerPrefix(src, absPath) != 0) {
+            MEDIA_ERR_LOG("fail to get absolute path of srcInner.");
+            return false;
+        }
+        uri += absPath;
+        src_ = absPath;
+        isSysSrc_ = false;
+    } else {
+        uri += src;
+        src_ = src;
+        isSysSrc_ = true;
+    }
     std::map<std::string, std::string> header;
     Media::Source source(uri, header);
     if (player_->SetSource(source) != 0) {
         MEDIA_ERR_LOG("fail to set audio src property.");
         return false;
     }
-    src_ = src;
     if (player_->Prepare() != 0) {
         MEDIA_ERR_LOG("fail to prepare.");
         return false;
index e23fb05..d2591b3 100755 (executable)
@@ -63,6 +63,7 @@ typedef struct TagTestSample {
     bool needStop;
     AudioInterrupt interrupt;
     MediaThreadIdHandle audioCaptureProcess;
+    MediaMutexHandle mutex;
 } TestSample;
 
 struct SampleAudioCapturerInfo {
@@ -130,6 +131,29 @@ static AudioManager& g_amInstance = AudioManager::GetInstance();
 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;
@@ -163,22 +187,7 @@ static void* AudioCaptureProcess(void* 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;
 }
@@ -253,10 +262,12 @@ static int32_t HandleAudioCaptureCmd(int32_t argc, const char **argv)
             }
             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;
@@ -346,6 +357,12 @@ int32_t AudioCaptureSample(int32_t argc, const char **argv)
     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;
index ec7d37d..447b97c 100755 (executable)
@@ -56,7 +56,7 @@ const static int16_t MEDIA_PATH_MAX = 260;
 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;
index 75ffd97..42ef36b 100644 (file)
@@ -185,6 +185,7 @@ static void DeinitPlayerResources(MediaVideoPlay *videoPlay)
 {\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
@@ -204,6 +205,7 @@ static int32_t VideoPlay(MediaVideoPlay *videoPlay)
         (void)videoPlay->player_->Release();\r
         return MEDIA_ERR;\r
     }\r
+    videoPlay->player_->EnableSingleLooping(videoPlay->isLoop_);\r
     MediaMutexLock(videoPlay->mutex_);\r
     videoPlay->isPlayed_ = true;\r
     if (videoPlay->button_ != nullptr) {\r
@@ -221,6 +223,7 @@ static int32_t VideoPlay(MediaVideoPlay *videoPlay)
 \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
@@ -229,7 +232,6 @@ static void VideoStopAndExit(MediaVideoPlay *videoPlay)
     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
@@ -292,6 +294,24 @@ static Source GetVideoPlaySource(MediaVideoPlay *videoPlay)
     return source;\r
 }\r
 \r
+static int32_t SetAudioSessionIdAndStreamType(MediaVideoPlay *videoPlay)\r
+{\r
+    int32_t ret = MEDIA_OK;\r
+    if (!videoPlay->isPureVideo_) {\r
+        ret = videoPlay->player_->SetAudioSessionId(videoPlay->sessionId_);\r
+        if (ret != MEDIA_OK) {\r
+            MEDIA_ERR_LOG("set audio sessionId failed\n");\r
+            return ret;\r
+        }\r
+        ret = videoPlay->player_->SetAudioStreamType(AUDIO_STREAM_FITNESS_VIDEO);\r
+        if (ret != MEDIA_OK) {\r
+            MEDIA_ERR_LOG("set audio stream type failed\n");\r
+            return ret;\r
+        }\r
+    }\r
+    return ret;\r
+}\r
+\r
 static int32_t RunVideoPlay(MediaVideoPlay *videoPlay)\r
 {\r
     bool success = InitPlayerResources(videoPlay);\r
@@ -300,47 +320,32 @@ static int32_t RunVideoPlay(MediaVideoPlay *videoPlay)
         return MEDIA_ERR;\r
     }\r
     int32_t ret = 0;\r
-    do {\r
-        Source source = GetVideoPlaySource(videoPlay);\r
-        ret = videoPlay->player_->SetSource(source);\r
-        if (ret != 0) {\r
-            MEDIA_ERR_LOG("set source failed\n");\r
-            (void)DeinitPlayerResources(videoPlay);\r
-            return MEDIA_ERR;\r
-        }\r
-        ret = videoPlay->player_->Prepare();\r
-        if (ret != 0) {\r
-            MEDIA_ERR_LOG("prepare failed\n");\r
-            return ReleasePlayer(videoPlay);\r
-        }\r
-        if (!videoPlay->isPureVideo_) {\r
-            ret = videoPlay->player_->SetAudioSessionId(videoPlay->sessionId_);\r
-            if (ret != 0) {\r
-                MEDIA_ERR_LOG("set audio sessionId failed\n");\r
-                return ReleasePlayer(videoPlay);\r
-            }\r
-            ret = videoPlay->player_->SetAudioStreamType(AUDIO_STREAM_FITNESS_VIDEO);\r
-            if (ret != 0) {\r
-                MEDIA_ERR_LOG("set audio stream type failed\n");\r
-                return ReleasePlayer(videoPlay);\r
-            }\r
-        }\r
-        ret = videoPlay->player_->SetVideoSurface(videoPlay->surface_);\r
-        if (ret != 0) {\r
-            MEDIA_ERR_LOG("set video surface failed\n");\r
-            return ReleasePlayer(videoPlay);\r
-        }\r
-        ret = VideoPlay(videoPlay);\r
-        if (ret != 0) {\r
-            return ReleasePlayer(videoPlay);\r
-        }\r
-        VideoStopAndExit(videoPlay);\r
-        if (videoPlay->isPlaybackStopped_ ||\r
-            videoPlay->playError_ ||\r
-            videoPlay->interruptHintStop_) {\r
-            break;\r
-        }\r
-    } while (videoPlay->isLoop_);\r
+    Source source = GetVideoPlaySource(videoPlay);\r
+    ret = videoPlay->player_->SetSource(source);\r
+    if (ret != 0) {\r
+        MEDIA_ERR_LOG("set source failed\n");\r
+        (void)DeinitPlayerResources(videoPlay);\r
+        return MEDIA_ERR;\r
+    }\r
+    ret = videoPlay->player_->Prepare();\r
+    if (ret != 0) {\r
+        MEDIA_ERR_LOG("prepare failed\n");\r
+        return ReleasePlayer(videoPlay);\r
+    }\r
+    ret = SetAudioSessionIdAndStreamType(videoPlay);\r
+    if (ret != 0) {\r
+        return ReleasePlayer(videoPlay);\r
+    }\r
+    ret = videoPlay->player_->SetVideoSurface(videoPlay->surface_);\r
+    if (ret != 0) {\r
+        MEDIA_ERR_LOG("set video surface failed\n");\r
+        return ReleasePlayer(videoPlay);\r
+    }\r
+    ret = VideoPlay(videoPlay);\r
+    if (ret != 0) {\r
+        return ReleasePlayer(videoPlay);\r
+    }\r
+    VideoStopAndExit(videoPlay);\r
     SendBackgroundFrame(videoPlay);\r
     return 0;\r
 }\r
@@ -399,9 +404,16 @@ MediaVideoPlay::~MediaVideoPlay()
 \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
@@ -480,16 +492,32 @@ int32_t MediaVideoPlay::GetDumpInfo(PlayerDebugInfo *playerInfo)
 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
@@ -505,6 +533,15 @@ void MediaVideoPlay::SetVideoPlayLoop(bool isLoop)
     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
index 267fbff..7d260a4 100644 (file)
@@ -36,6 +36,7 @@ public:
     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
@@ -61,6 +62,7 @@ public:
     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
index eb7e388..cea092d 100755 (executable)
@@ -69,7 +69,7 @@ using namespace OHOS;
 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;
@@ -311,11 +311,6 @@ static void VideoStopAndExit(shared_ptr<Player> player)
     if (ret != 0) {
         MEDIA_ERR_LOG("Reset failed");
     }
-
-    if (g_isNeedLoop) {
-        return;
-    }
-
     ret = player->Release();
     if (ret != 0) {
         MEDIA_ERR_LOG("Release failed");
@@ -376,6 +371,7 @@ static int32_t VideoPlay(VideoPlaySampleContext *context)
         MEDIA_ERR_LOG("Play failed");
         goto RELEASE_PLAYER;
     }
+    context->player->EnableSingleLooping(g_isNeedLoop);
     MediaMutexLock(g_videoPlayContextMutex);
 #if defined(ENABLE_LVGL)
     g_isPlayed = true;
@@ -432,54 +428,50 @@ static int32_t RunVideoPlay(VideoPlaySampleContext *context)
         MEDIA_ERR_LOG("init player resources failed");
         return -1;
     }
-    do {
-        std::string uri(context->filePath);
-        std::map<std::string, std::string> header;
-        Source source(uri, header);
-        int32_t ret = context->player->SetSource(source);
-        if (ret != 0) {
-            MEDIA_ERR_LOG("SetSource failed");
-            goto DEINIT_PLAYER;
-        }
-        ret = context->player->Prepare();
-        if (ret != 0) {
-            MEDIA_ERR_LOG("Prepare failed");
-            goto RELEASE_PLAYER;
-        }
-        ret = context->player->SetAudioSessionId(context->sessionId);
-        if (ret != 0) {
-            MEDIA_ERR_LOG("SetAudioSessionId failed");
-            goto RELEASE_PLAYER;
-        }
-        ret = context->player->SetAudioStreamType(AUDIO_STREAM_FITNESS_VIDEO);
-        if (ret != 0) {
-            MEDIA_ERR_LOG("SetAudioStreamType failed");
-            goto RELEASE_PLAYER;
-        }
+    std::string uri(context->filePath);
+    std::map<std::string, std::string> header;
+    Source source(uri, header);
+    int32_t ret = context->player->SetSource(source);
+    if (ret != 0) {
+        MEDIA_ERR_LOG("SetSource failed");
+        goto DEINIT_PLAYER;
+    }
+    ret = context->player->Prepare();
+    if (ret != 0) {
+        MEDIA_ERR_LOG("Prepare failed");
+        goto RELEASE_PLAYER;
+    }
+    ret = context->player->SetAudioSessionId(context->sessionId);
+    if (ret != 0) {
+        MEDIA_ERR_LOG("SetAudioSessionId failed");
+        goto RELEASE_PLAYER;
+    }
+    ret = context->player->SetAudioStreamType(AUDIO_STREAM_FITNESS_VIDEO);
+    if (ret != 0) {
+        MEDIA_ERR_LOG("SetAudioStreamType failed");
+        goto RELEASE_PLAYER;
+    }
 #if defined(ENABLE_UIKIT)
-        ret = context->player->SetVideoSurface(context->surface);
+    ret = context->player->SetVideoSurface(context->surface);
 #elif defined(ENABLE_LVGL)
-        ret = context->player->SetVideoSurface(g_surface);
+    ret = context->player->SetVideoSurface(g_surface);
 #endif
-        if (ret != 0) {
-            MEDIA_ERR_LOG("SetVideoSurface failed");
-            goto RELEASE_PLAYER;
-        }
-        ret = VideoPlay(context);
-        if (ret != 0) {
-            goto RELEASE_PLAYER;
-        }
-        VideoStopAndExit(context->player);
+    if (ret != 0) {
+        MEDIA_ERR_LOG("SetVideoSurface failed");
+        goto RELEASE_PLAYER;
+    }
+    ret = VideoPlay(context);
+    if (ret != 0) {
+        goto RELEASE_PLAYER;
+    }
+    VideoStopAndExit(context->player);
 #if defined(ENABLE_LVGL)
-        context->isPlaybackCompleted = false;
-        if (g_isNeedLoop) {
-            MediaMutexLock(g_videoPlayContextMutex);
-            g_isPlayed = false;
-            g_pause = false;
-            MediaMutexUnLock(g_videoPlayContextMutex);
-        }
+    context->isPlaybackCompleted = false;
+    MediaMutexLock(g_videoPlayContextMutex);
+    g_isPlayed = false;
+    g_pause = false;
+    MediaMutexUnLock(g_videoPlayContextMutex);
 #endif
-    } while (g_isNeedLoop);
     return 0;
 
 RELEASE_PLAYER:
index 3bf0235..ce9d5b6 100755 (executable)
@@ -202,8 +202,13 @@ static int32_t RawFormatFree(HalHandle fmtHandle, FormatPacket *fmtFrame)
 static int32_t RawFormatSeek(__attribute__((unused)) HalHandle fmtHandle, __attribute__((unused))int32_t streamIndex,
     __attribute__((unused)) int64_t toMs, __attribute__((unused)) uint32_t flag)
 {
-    MEDIA_HAL_LOGE(MODULE_NAME, "not support");
-    return ERR_DEMUXER_NOT_SUPPORT;
+    RawFormatMember *member = (RawFormatMember *)fmtHandle;
+    CHK_NULL_RETURN(member, ERR_DEMUXER_INVALID_HANDLE, "input param fmtHandle null");
+    CHK_FAILED_RETURN(member->prepared, true, -1, "not prepared");
+    CHK_NULL_RETURN(member->ops, ERR_DEMUXER_NULL_PTR, "ops null");
+    CHK_NULL_RETURN(member->demuxer, ERR_DEMUXER_NULL_PTR, "demuxer null");
+    CHK_NULL_RETURN(member->ops->Seek, ERR_DEMUXER_NULL_PTR, "Seek null");
+    return member->ops->Seek(member->demuxer, toMs, flag);
 }
 
 static int32_t RawFormatSeekPos(__attribute__((unused)) HalHandle fmtHandle, int64_t pos, uint32_t whence)
index 3f7058b..d48c033 100755 (executable)
@@ -104,6 +104,18 @@ static void SBCDemuxerClose(HalHandle fmtHandle)
     free(demuxer);
 }
 
+static void FillFrameCommonInfo(FormatPacket *fmtFrame, int64_t timestamp)
+{
+    fmtFrame->packetType = PACKET_TYPE_AUDIO;
+    fmtFrame->trackId = 0;
+    fmtFrame->isKeyFrame = true;
+    fmtFrame->timestampUs = timestamp;
+    fmtFrame->durationUs = -1;
+    fmtFrame->frameIndex = 0;
+    fmtFrame->itemCnt = 0;
+    fmtFrame->item = NULL;
+}
+
 static int32_t SBCDemuxerReadFrame(HalHandle fmtHandle, FormatPacket *fmtFrame)
 {
     SBCDemuxer *demuxer = (SBCDemuxer *)fmtHandle;
@@ -120,15 +132,7 @@ static int32_t SBCDemuxerReadFrame(HalHandle fmtHandle, FormatPacket *fmtFrame)
         return MEDIA_HAL_NO_MEM;
     }
 
-    size_t readLen = fread(fmtFrame->data, 1, SBC_BLOCK_DATA_SIZE, demuxer->file);
-    if (readLen == -1) {
-        free(fmtFrame->data);
-        fmtFrame->data = NULL;
-        fmtFrame->len = 0;
-        MEDIA_HAL_LOGE(MODULE_NAME, "fread falied");
-        return MEDIA_HAL_ERR;
-    }
-
+    uint32_t readLen = fread(fmtFrame->data, 1, SBC_BLOCK_DATA_SIZE, demuxer->file);
     if (readLen == 0) {
         free(fmtFrame->data);
         fmtFrame->data = NULL;
@@ -136,14 +140,13 @@ static int32_t SBCDemuxerReadFrame(HalHandle fmtHandle, FormatPacket *fmtFrame)
         demuxer->eof = true;
         return RET_FILE_EOF;
     }
-
     fmtFrame->packetType = PACKET_TYPE_AUDIO;
     fmtFrame->len = readLen;
-
+    FillFrameCommonInfo(fmtFrame, -1);
     return MEDIA_HAL_OK;
 }
 
-static int32_t SBCDemuxerFreeFrame(HalHandle fmtHandle, FormatPacket *fmtFrame)
+static int32_t SBCDemuxerFreeFrame(const HalHandle fmtHandle, FormatPacket *fmtFrame)
 {
     MEDIA_HAL_UNUSED(fmtHandle);
     if (fmtFrame->data != NULL) {
@@ -155,11 +158,19 @@ static int32_t SBCDemuxerFreeFrame(HalHandle fmtHandle, FormatPacket *fmtFrame)
 
 static int32_t SBCDemuxerSeek(HalHandle fmtHandle, int64_t toMs, uint32_t flag)
 {
-    MEDIA_HAL_UNUSED(fmtHandle);
-    MEDIA_HAL_UNUSED(toMs);
+    SBCDemuxer *demuxer = (SBCDemuxer *)fmtHandle;
     MEDIA_HAL_UNUSED(flag);
-
-    MEDIA_HAL_LOGE(MODULE_NAME, "not support");
+    if (toMs == 0) {
+        int32_t ret = fseek(demuxer->file, toMs, SEEK_SET);
+        if (ret != 0) {
+            MEDIA_HAL_LOGE(MODULE_NAME, "failed to seek to the sbc file header.");
+            return MEDIA_HAL_ERR;
+        }
+        demuxer->eof = false;
+    } else {
+        MEDIA_HAL_LOGE(MODULE_NAME, "not support");
+        return MEDIA_HAL_ERR;
+    }
     return MEDIA_HAL_OK;
 }
 
index 37c1f3b..b0e14de 100755 (executable)
@@ -71,6 +71,7 @@ typedef struct {
     int32_t readLen;
     int32_t prepared;
     FILE *file;
+    int64_t fileSeekStartPosition;
 } SilkRawDemuxer;
 
 static HalHandle SilkDemuxerOpen(const char *url)
@@ -111,6 +112,7 @@ static HalHandle SilkDemuxerOpen(const char *url)
     demuxer->prepared = false;
     demuxer->firstFrame = true;
     demuxer->position = 0;
+    demuxer->fileSeekStartPosition = 0;
     MEDIA_HAL_LOGI(MODULE_NAME, "buffer Demuxer open");
     return (HalHandle)demuxer;
 FREE:
@@ -293,8 +295,21 @@ static int32_t SilkDemuxerFreeFrame(HalHandle fmtHandle, FormatPacket *fmtFrame)
 static int32_t SilkDemuxerSeek(__attribute__((unused)) HalHandle fmtHandle, __attribute__((unused)) int64_t toMs,
     __attribute__((unused)) uint32_t flag)
 {
-    MEDIA_HAL_LOGE(MODULE_NAME, "not support");
-    return MEDIA_HAL_ERR;
+    SilkRawDemuxer *demuxer = (SilkRawDemuxer *)fmtHandle;
+    if (toMs == 0) {
+        int32_t ret = fseek(demuxer->file, demuxer->fileSeekStartPosition, SEEK_SET);
+        if (ret != 0) {
+            MEDIA_HAL_LOGE(MODULE_NAME, "failed to seek to the silk file header.");
+            return MEDIA_HAL_ERR;
+        }
+        demuxer->eof = false;
+        demuxer->position = demuxer->fileSeekStartPosition;
+        MEDIA_HAL_LOGI(MODULE_NAME, "SilkRawDemuxer seek success = %d!!", ftell(demuxer->file));
+    } else {
+        MEDIA_HAL_LOGE(MODULE_NAME, "not support");
+        return MEDIA_HAL_ERR;
+    }
+    return MEDIA_HAL_OK;
 }
 
 static int32_t GetBlockSampleRateAndLength(SilkRawDemuxer *demuxer, int32_t *sampleRate, int16_t *length)
@@ -341,6 +356,7 @@ static int32_t ProbeScore(SilkRawDemuxer *demuxer, int32_t *score, int32_t offse
 {
     demuxer->probeSuccessed = true;
     demuxer->position = offset + SILK_HEAD_SIZE;
+    demuxer->fileSeekStartPosition = offset + SILK_HEAD_SIZE;
     if (fseek(demuxer->file, offset + SILK_HEAD_SIZE, SEEK_SET) != 0) {
         return MEDIA_HAL_ERR;
     }
index dd8765f..d5a904b 100755 (executable)
@@ -140,6 +140,11 @@ else()
         ${CMAKE_CURRENT_SOURCE_DIR}/diag_transmit/
     )
 endif()
+set(PRIVATE_HEADER
+    ${PRIVATE_HEADER}
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/diag_system_cmd/include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/diag_system_cmd/dfx_include
+)
 
 set(PRIVATE_DEFINES
 )
@@ -435,6 +440,8 @@ set(PUBLIC_HEADER
 )
 
 set(PRIVATE_HEADER
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/last_dump/dfx_include
+    ${ROOT_DIR}/middleware/utils/dfx/diag_dfx_cmd/last_dump/include
 )
 
 set(PRIVATE_DEFINES
index fe0f4e0..24d15c1 100755 (executable)
 #include "diag_log.h"
 #endif
 
+#if defined CFG_DRIVERS_NANDFLASH
+#include "nandflash_config.h"
+#endif
+
+#if !defined(BUILD_RECOVERY_IMAGE) && !defined(BUILD_APPLICATION_SSB)
+#include "cmsis_os2.h"
+#endif
+
 #if MCU_ONLY
 static cpu_utils_reboot_cb g_reboot_mcu_cb = NULL;
 #endif
@@ -150,16 +158,33 @@ static bool cpu_utils_sys_reboot_req(ipc_action_t message, const volatile ipc_pa
 #endif
     set_update_reset_cause_on_boot(false);
 #if MCU_ONLY && defined(USE_CMSIS_OS)
-    log_oml_memory_dump();
+    log_bt_req_dump();
 #endif
 #if MCU_ONLY
     if (g_reboot_mcu_cb != NULL) {  // when registering g_reboot_mcu_cb, need to restart chip by yourself.
         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);
+#if defined(BUILD_APPLICATION_STANDARD) && (USE_COMPRESS_LOG_INSTEAD_OF_SDT_LOG == NO)
+    PRINT("Reboot by core:%d with reason of 0x%x", src, reboot_reason);
+#endif
+
+#if (CORE == MASTER_BY_ALL)
+    set_update_reset_cause_on_boot(false);
+#endif
+    cpu_utils_set_system_status_by_cause(reboot_reason);
+#if !defined(BUILD_RECOVERY_IMAGE) && !defined(BUILD_APPLICATION_SSB)
+    /* Give the semaphore to ensure the main logging task will be active */
+    (void)osSemaphoreRelease(get_save_file_semaphore());
+#else
+    hal_reboot_chip();
+#endif
 
     return true;
 }
index cfe4cba..898bd5c 100755 (executable)
@@ -101,6 +101,7 @@ typedef enum {
 
     REBOOT_CAUSE_UPG_COMPLETION = 0x2040, // !< Start of custom reset reasons
     REBOOT_CAUSE_MON_MEM_ALMOST_EMPTY = 0x2041,
+    REBOOT_CAUSE_APPLICATION_SECOND_FAULT = 0x2042,
 
     REBOOT_CAUSE_APPLICATION_RPC_TIMEOUT = 0x2100,       // !< Start of custom reset reasons
 
index 89c3c5b..7da9d33 100755 (executable)
@@ -28,6 +28,8 @@
 #define SUB_MOD_ID_OFFSET 8\r
 #define PKT_DATA_CNT_2    2\r
 \r
+static diag_msg_flow_control_hook g_flow_control_hook = NULL;\r
+\r
 STATIC bool zdiag_msg_permit(uint32_t module_id, uint8_t level)\r
 {\r
     if ((zdiag_is_enable() == false) && (uapi_zdiag_offline_log_is_enable() != true)) {\r
@@ -153,6 +155,12 @@ static errcode_t uapi_diag_report_packet_direct_secure(uint16_t cmd_id, diag_opt
     return ERRCODE_SUCC;\r
 }\r
 #endif\r
+\r
+void uapi_diag_register_msg_flow_control_hook(diag_msg_flow_control_hook func)\r
+{\r
+    g_flow_control_hook = func;\r
+}\r
+\r
 errcode_t uapi_diag_report_packet(uint16_t cmd_id, diag_option_t *option, const uint8_t *packet,\r
     uint16_t packet_size, bool sync)\r
 {\r
@@ -308,6 +316,9 @@ errcode_t uapi_zdiag_report_sys_msg_instance(uint32_t module_id, uint32_t msg_id
         return ERRCODE_FAIL;\r
     }\r
 \r
+    if (g_flow_control_hook != NULL && g_flow_control_hook((uint8_t)module_id, level) == false) {\r
+        return ERRCODE_FAIL;\r
+    }\r
     diag_pkt_handle_init(&pkt, 1); /* data_cnt 为1 */\r
 \r
     if (uapi_zdiag_offline_log_is_enable()) {\r
index 0995edf..a9b5e23 100755 (executable)
 #include "diag_common.h"\r
 #include "diag_channel.h"\r
 \r
+typedef bool (*diag_msg_flow_control_hook)(uint8_t mid, uint8_t level);\r
+\r
 errcode_t diag_msg_proc(uint16_t msg_id, uint8_t *msg, uint32_t msg_len);\r
 \r
 void uapi_zdiag_set_offline_log_enable(bool enable);\r
 bool uapi_zdiag_offline_log_is_enable(void);\r
 \r
+void uapi_diag_register_msg_flow_control_hook(diag_msg_flow_control_hook func);\r
 #endif\r
index 39443c8..ac54a4e 100755 (executable)
@@ -33,6 +33,9 @@ set(SOURCES
 )
 
 set(PUBLIC_HEADER
+)
+
+set(PRIVATE_HEADER
     ${CMAKE_CURRENT_SOURCE_DIR}/diag_system_cmd/include
     ${CMAKE_CURRENT_SOURCE_DIR}/diag_system_cmd/dfx_include
     ${CMAKE_CURRENT_SOURCE_DIR}/diag_mocked_shell/include
@@ -40,9 +43,6 @@ set(PUBLIC_HEADER
     ${CMAKE_CURRENT_SOURCE_DIR}/last_dump/include
     ${CMAKE_CURRENT_SOURCE_DIR}/sample_data/dfx_include
     ${CMAKE_CURRENT_SOURCE_DIR}/sample_data/include
-)
-
-set(PRIVATE_HEADER
     ${CMAKE_SOURCE_DIR}/include/middleware/utils
 )
 set(PRIVATE_DEFINES
index ff233c1..f3d67d8 100755 (executable)
@@ -544,10 +544,8 @@ static int32_t dump_open_inst(audio_dump_inst *dump_inst)
     uapi_adp_attr adp_attr;
     osThreadAttr_t task_attr = {0};
     thread_callback func_call = NULL;
-    char *real_path = NULL;
 
-    real_path = realpath(dump_inst->file_path, NULL);
-    dump_inst->h_file = fopen(real_path, "wb");
+    dump_inst->h_file = fopen(dump_inst->file_path, "wb");
     if (dump_inst->h_file == NULL) {
         diag_dump_log("open %s failed.", dump_inst->file_path);
         return ERRCODE_FAIL;
index 68c80f5..360e14d 100755 (executable)
@@ -214,7 +214,7 @@ void log_event(const uint8_t *buffer, uint16_t length)
         }
     } 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++;
index b1ad6d0..cdf3a55 100755 (executable)
@@ -46,6 +46,8 @@
 #include "last_dump_adapt.h"
 #endif
 #endif
+#include "chip_io.h"
+#include "nandflash_config.h"
 
 #define STACK_SIZE 3
 
@@ -437,23 +439,42 @@ void log_oml_dump_stack(void)
 #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_bt_req_dump(void)
+{
+#if (USE_COMPRESS_LOG_INSTEAD_OF_SDT_LOG == NO)
+    log_watch_dog_reconfigure();
+#endif
+
+#ifdef HSO_SUPPORT
+    dfx_last_dump();
+#endif
+    return;
 }
 
 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);
-#elif CORE == APPS
+#elif CORE == APPS && !defined(BUILD_RECOVERY_IMAGE)
 #ifdef HSO_SUPPORT
     dfx_last_dump();
+    nand_driver_init(SPEED_SLOW);
+    set_trans_type(TRANS_BY_CPU_SINGLE_LINE);
+#if defined SAVE_EXC_INFO
+    save_preserve_file_to_nand();
+#endif
 #else
     log_exception_dump_memory(APP_ITCM_ORIGIN, APP_ITCM_LENGTH);
     log_exception_dump_memory(APP_DTCM_ORIGIN, APP_DTCM_LENGTH);
index be9873f..f83753b 100755 (executable)
@@ -27,7 +27,7 @@
 #ifdef SUPPORT_IPC
 #include "ipc.h"
 #endif
-
+#include "exception.h"
 #include "uart.h"
 #include "watchdog.h"
 #include "log_uart_porting.h"
@@ -368,7 +368,7 @@ void log_main(const void *unused_p)
 
             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();
             }
         }
index 85414ec..e26b6d8 100755 (executable)
@@ -21,6 +21,8 @@
 #define RESERVED_PC_INDEX 0
 #define RESERVED_LR_INDEX 1
 #define RESERVED_SP_INDEX 2
+#define BTRACE_ADDR_EXEC 0x5900E000
+#define BTRACE_ADDR_EXEC_LEN 0X1FF8
 
 // all security core preserve data here, if want to add new,should add tail for compatible befor version
 #pragma pack(4)
@@ -100,6 +102,31 @@ static void system_set_reboot_status_by_crash_cause(void)
         g_preserve_data_lib.reboot_status = REBOOT_SOFT_PANIC_TRIGGER_STATUS;
     }
 }
+#if defined SAVE_EXC_INFO
+#if !defined(BUILD_RECOVERY_IMAGE)
+void save_preserve_file_to_nand(void)
+{
+    const char *preserve_info_ex_path = "/user/exc/preserve.bin";
+    int32_t ret = exc_info_write(preserve_info_ex_path, 0, (uint8_t *)&g_preserve_data_lib, sizeof(preserve_data_t));
+    printf("save_preserve_file_to_nand ret:%d.\r\n", ret);
+}
+
+void save_btram_file_to_nand(void)
+{
+    const char *btram_info_path = "/user/exc/bt_ram_info.bin";
+    int32_t ret =
+        exc_info_write(btram_info_path, 0, (uint8_t *)BT_RAM_ORIGIN_APP_MAPPING, BT_RAM_ORIGIN_APP_MAPPING_LENGTH);
+    printf("save_btram_file_to_nand ret:%d.\r\n", ret);
+}
+
+void save_btrace_file_to_nand(void)
+{
+    const char *btrace_info_path = "/user/exc/btrace_info.bin";
+    int32_t ret = exc_info_write(btrace_info_path, 0, (uint8_t *)BTRACE_ADDR_EXEC, BTRACE_ADDR_EXEC_LEN);
+    printf("save_btrace_file_to_nand ret:%d.\r\n", ret);
+}
+#endif
+#endif
 
 #ifdef weak
 weak void watchdog_porting_pmu_reboot(void)
@@ -115,8 +142,11 @@ void system_boot_status_init(void)
 {
     bool is_hardwdg_timeout = false;
     if (!hal_reboot_get_ulp_aon_no_poweroff_flag()) {
+        hal_reboot_set_first_power_on_flag();
         hal_reboot_set_ulp_aon_no_poweroff_flag();
         memset_s((void *)&g_preserve_data_lib, sizeof(g_preserve_data_lib), 0, sizeof(g_preserve_data_lib));
+    } else {
+        hal_reboot_clear_first_power_on_flag();
     }
 
     if (g_preserve_data_lib.magic == 0) {    // Hard power-off restart
index 638afd0..8d735fa 100755 (executable)
@@ -112,6 +112,13 @@ uint32_t get_system_magic(void);
 
 void show_reboot_info(void);
 
+#if !defined(BUILD_RECOVERY_IMAGE)
+void save_preserve_file_to_nand(void);
+
+void save_btram_file_to_nand(void);
+
+void save_btrace_file_to_nand(void);
+#endif
 /**
  * @}
  */
index 846c417..540bec4 100755 (executable)
@@ -29,6 +29,7 @@ add_subdirectory_with_alias_if_exist(base/global/i18n_lite ${PROJECT_BINARY_DIR}
 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)
index 2166b4a..572bdff 100755 (executable)
@@ -1,11 +1,11 @@
 set(COMPONENT_NAME "i18n")
 
 set(PUBLIC_HEADER
-    ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/i18n/include
-    ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/kits/i18n/include
 )
 
 set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/i18n/include
+    ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/kits/i18n/include
 )
 
 set(SOURCES
index 6c4895f..2cf01e0 100755 (executable)
@@ -1,11 +1,11 @@
 set(COMPONENT_NAME "resmgr")
 
 set(PUBLIC_HEADER
-    ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/resmgr_lite/include
-    ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/innerkits/include
 )
 
 set(PRIVATE_HEADER
+    ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/resmgr_lite/include
+    ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/innerkits/include
 )
 
 set(SOURCES
index ebb566d..5a38671 100755 (executable)
@@ -6,6 +6,8 @@ set(PUBLIC_HEADER
 
 set(PRIVATE_HEADER
     ${ROOT_DIR}/open_source/openharmony/third_party/cJSON
+    ${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
 )
 
 set(SOURCES
index e759479..9a2c0fa 100755 (executable)
@@ -8,6 +8,12 @@ set(PUBLIC_HEADER
     ${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
@@ -22,10 +28,6 @@ set(PUBLIC_HEADER
     ${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
@@ -46,6 +48,23 @@ set(PRIVATE_HEADER
     ${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)
@@ -153,6 +172,12 @@ set(PUBLIC_HEADER
     ${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
@@ -167,10 +192,7 @@ set(PUBLIC_HEADER
     ${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
@@ -191,6 +213,10 @@ set(PRIVATE_HEADER
     ${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)
@@ -224,10 +250,12 @@ set(SOURCES
     ${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
@@ -287,3 +315,172 @@ install_sdk_by_sh("${CMAKE_CURRENT_SOURCE_DIR}/interfaces" "*")
 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}/base
+    ${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()
index 6c357d5..f29b72f 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * 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,
@@ -46,159 +48,161 @@ const uint8_t g_frameworkBCBuffer[] =
     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,
@@ -214,27 +218,29 @@ const uint8_t g_frameworkBCBuffer[] =
     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
index 4a5d10d..393093c 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -51,9 +55,11 @@ const char * const g_frameworkJSBuffer =
     "'},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
index aeffcf6..0e36c59 100755 (executable)
@@ -266,12 +266,14 @@ enum {
 #endif // FEATURE_COMPONENT_TABS
     KEYWORD(TEXT, text) // tag name, picker-view attr value
     KEYWORD(TEXT_ALIGN, textAlign) // text style type
+    KEYWORD(TEXT_ALIGN_VERTICAL, textAlignVertical) //text style vertical type
     KEYWORD(TEXT_OVERFLOW, textOverflow) // text style type
     KEYWORD(TIME, time) // picker-view attr value
 #ifdef FEATURE_COMPONENT_VIDEO
     KEYWORD(TIME_UPDATE, timeupdate) // video component timeupdate event tag
 #endif // FEATURE_COMPONENT_VIDEO
     KEYWORD(TOP, top)
+    KEYWORD(BOTTOM, bottom)
     KEYWORD(TOTAL_ANGLE, total-angle) // circle progress style
 #ifdef JS_TOUCH_EVENT_SUPPORT
     KEYWORD(TOUCHCANCEL, touchcancel) // ontouchcancel event
@@ -290,6 +292,9 @@ enum {
 #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
index 54e282d..76ea6a4 100755 (executable)
Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js/libace.a differ
index 86889f0..f294d80 100755 (executable)
Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-xts/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-xts/libace.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/baidu_map_component.cpp b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/baidu_map_component.cpp
new file mode 100644 (file)
index 0000000..58a9115
--- /dev/null
@@ -0,0 +1,330 @@
+/*\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
+const char * const BaiduMapComponent::FUNC_DRAW_CIRCLE = "draw_circle";\r
+const char * const BaiduMapComponent::FUNC_DRAW_NAVI_MARKER = "draw_navi_marker";\r
+const char * const BaiduMapComponent::FUNC_OVERLAYER_CLEAR_CIRCLE = "overlayer_clear_circle";\r
+const char * const BaiduMapComponent::FUNC_OVERLAYER_CLEAR_MARKER = "overlayer_clear_marker";\r
+const char * const BaiduMapComponent::FUNC_OVERLAYER_CLEAR_NAVI_MARKER = "overlayer_clear_navi_marker";\r
+const char * const BaiduMapComponent::FUNC_DESTROY = "destroy";\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
+    {FUNC_DRAW_CIRCLE, DrawCircle},\r
+    {FUNC_DRAW_NAVI_MARKER, DrawNaviMarker},\r
+    {FUNC_OVERLAYER_CLEAR_CIRCLE, OverlayerClearCircle},\r
+    {FUNC_OVERLAYER_CLEAR_MARKER, OverlayerClearMarker},\r
+    {FUNC_OVERLAYER_CLEAR_NAVI_MARKER, OverlayerClearNaviMarker},\r
+    {FUNC_DESTROY, Destroy}\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::DrawNaviMarker(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,"DrawNaviMarker");\r
+    char *json_navi_marker = MallocStringOf(args[0]);\r
+    MapComponentApi::getInstance().draw_navi_marker(json_navi_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::DrawCircle(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,"DrawCircle");\r
+    char *json_circle = MallocStringOf(args[0]);\r
+    MapComponentApi::getInstance().draw_circle(json_circle);\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
+JSValue BaiduMapComponent::OverlayerClearCircle(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,"OverlayerClearCircle");\r
+    MapComponentApi::getInstance().overlayer_clear_circle();\r
+    return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::OverlayerClearMarker(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,"OverlayerClearMarker");\r
+    MapComponentApi::getInstance().overlayer_clear_marker();\r
+    return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::OverlayerClearNaviMarker(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,"OverlayerClearNaviMarker");\r
+    MapComponentApi::getInstance().overlayer_clear_navi_marker();\r
+    return UNDEFINED;\r
+}\r
+\r
+JSValue BaiduMapComponent::Destroy(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,"Destroy");\r
+    MapComponentApi::getInstance().destroy();\r
+    return UNDEFINED;\r
+}\r
+\r
+} // namespace ACELite\r
+} // namespace OHOS\r
+#endif // FEATURE_COMPONENT_BAIDUMAP
\ No newline at end of file
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/baidu_map_component.h b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/components/baidu_map_component.h
new file mode 100644 (file)
index 0000000..af7ca15
--- /dev/null
@@ -0,0 +1,315 @@
+/*\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
+     * OverlayerClearCircle\r
+     */\r
+    static JSValue OverlayerClearCircle(const jerry_value_t func, const jerry_value_t context,\r
+                                        const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+    /**\r
+     * OverlayerClearMarker\r
+     */\r
+    static JSValue OverlayerClearMarker(const jerry_value_t func, const jerry_value_t context,\r
+                                        const jerry_value_t args[], const jerry_length_t argsSize);\r
+\r
+    /**\r
+     * OverlayerClearNaviMarker\r
+     */\r
+    static JSValue OverlayerClearNaviMarker(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
+     * DrawNaviMarker\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 DrawNaviMarker(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
+     * DrawCircle\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 DrawCircle(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
+    /**\r
+     * Destroy\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 Destroy(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 char * const FUNC_DRAW_CIRCLE;\r
+    static const char * const FUNC_DRAW_NAVI_MARKER;\r
+    static const char * const FUNC_OVERLAYER_CLEAR_CIRCLE;\r
+    static const char * const FUNC_OVERLAYER_CLEAR_MARKER;\r
+    static const char * const FUNC_OVERLAYER_CLEAR_NAVI_MARKER;\r
+    static const char * const FUNC_DESTROY;\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
index c686ee8..7e5c68f 100755 (executable)
@@ -57,6 +57,9 @@
 #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"
 
@@ -180,6 +183,11 @@ public:
                 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;
index 7970fcb..2b0992e 100755 (executable)
@@ -26,6 +26,10 @@ using namespace OHOS;
 
 namespace OHOS {
 namespace ACELite {
+
+UITextLanguageAlignment align_horizontal = UITextLanguageAlignment::TEXT_ALIGNMENT_LEFT;
+UITextLanguageAlignment align_vertical = UITextLanguageAlignment::TEXT_ALIGNMENT_TOP;
+
 TextComponent::TextComponent(jerry_value_t options, jerry_value_t children, AppStyleManager *styleManager)
     : Component(options, children, styleManager),
       fontSize_(DEFAULT_FONT_SIZE),
@@ -98,6 +102,9 @@ bool TextComponent::ApplyPrivateStyle(const AppStyleItem *styleItem)
         case K_LETTER_SPACING:
             SetTextLetterSpace(uiLabel_, styleItem);
             break;
+        case K_TEXT_ALIGN_VERTICAL:
+            SetTextAlignVertical(uiLabel_, styleItem);
+            break;
         case K_TEXT_ALIGN:
             SetTextAlign(uiLabel_, styleItem);
             break;
@@ -224,32 +231,60 @@ void TextComponent::PostUpdate(uint16_t attrKeyId)
     }
 }
 
+void TextComponent::SetTextAlignVertical(UILabel &label, const AppStyleItem *styleItem) const
+{
+    if (!IsStyleValueTypeString(styleItem)) {
+        HILOG_ERROR(HILOG_MODULE_ACE, "text text vertical align style value is invalid!");
+        return;
+    }
+
+    const char * const stylePropValue = GetStyleStrValue(styleItem);
+    uint16_t alignId = KeyParser::ParseKeyId(stylePropValue, GetStyleStrValueLen(styleItem));
+    switch (alignId) {
+        case K_CENTER:
+            align_vertical = UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER;
+            break;
+        case K_BOTTOM:
+            align_vertical = UITextLanguageAlignment::TEXT_ALIGNMENT_BOTTOM;
+            break;
+        case K_TOP:
+            align_vertical = UITextLanguageAlignment::TEXT_ALIGNMENT_TOP;
+            break;
+        default:
+            HILOG_WARN(HILOG_MODULE_ACE, "text vertical textAlign style value =%s is invalid, using default instead",
+                       stylePropValue);
+            break;
+    }
+    label.SetAlign(align_horizontal, align_vertical);
+}
+
 void TextComponent::SetTextAlign(UILabel &label, const AppStyleItem *styleItem) const
 {
     if (!IsStyleValueTypeString(styleItem)) {
-        HILOG_ERROR(HILOG_MODULE_ACE, "text text align style value is invalid!");
+        HILOG_ERROR(HILOG_MODULE_ACE, "text text horizontal align style value is invalid!");
         return;
     }
-    // set ui label text align, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER are support.
+
     const char * const stylePropValue = GetStyleStrValue(styleItem);
     uint16_t alignId = KeyParser::ParseKeyId(stylePropValue, GetStyleStrValueLen(styleItem));
-    UITextLanguageAlignment align = UITextLanguageAlignment::TEXT_ALIGNMENT_LEFT;
     switch (alignId) {
         case K_LEFT:
-            align = UITextLanguageAlignment::TEXT_ALIGNMENT_LEFT;
+            align_horizontal = UITextLanguageAlignment::TEXT_ALIGNMENT_LEFT;
             break;
         case K_RIGHT:
-            align = UITextLanguageAlignment::TEXT_ALIGNMENT_RIGHT;
+            align_horizontal = UITextLanguageAlignment::TEXT_ALIGNMENT_RIGHT;
             break;
         case K_CENTER:
-            align = UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER;
+            align_horizontal = UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER;
             break;
         default:
-            HILOG_WARN(HILOG_MODULE_ACE, "text textAlign style value =%s is invalid, using default instead",
+            HILOG_WARN(HILOG_MODULE_ACE, "text horizontal textAlign style value =%s is invalid, using default instead",
                        stylePropValue);
             break;
     }
-    label.SetAlign(align, UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);
+    label.SetAlign(align_horizontal, align_vertical);
 }
+
+
 } // namespace ACELite
 } // namespace OHOS
index fc9a39f..64778ea 100755 (executable)
@@ -44,6 +44,7 @@ protected:
 private:
     // parse js text align style to ui_label
     void SetTextAlign(UILabel& label, const AppStyleItem* styleItem) const;
+    void SetTextAlignVertical(UILabel& label, const AppStyleItem* styleItem) const;
     // parse js text size style to fontSize_
     void SetTextSize(const AppStyleItem* styleItem);
     // parse js text color style to ui_label
index d599272..68b56ba 100755 (executable)
@@ -112,11 +112,17 @@ public:
         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
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.cpp
new file mode 100644 (file)
index 0000000..ce1cf77
--- /dev/null
@@ -0,0 +1,1170 @@
+/*
+ * 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";
+//BT_CONNECT
+constexpr char CONNECT[] = "connectcallback";
+constexpr char DISCONNECT[] = "disconnectcallback";
+
+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;
+//BT_connect
+OHOS::ACELite::JSIValue bt_connect_successCallback = nullptr;
+OHOS::ACELite::JSIValue bt_connect_failCallback = nullptr;
+OHOS::ACELite::JSIValue bt_connect_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;
+        case MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_CONNECTED:
+            success = bt_connect_successCallback;
+            context = bt_connect_callbackContext;
+            break;
+        case MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_DISCONNECTED:
+            success = bt_connect_failCallback;
+            context = bt_connect_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;
+        case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_RIDING_SEARCH:
+            ReleaseJsValue(route_riding_successCallback);
+            ReleaseJsValue(route_riding_failCallback);
+            ReleaseJsValue(route_riding_callbackContext);
+            break;
+        case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_WALKING_SEARCH:
+            ReleaseJsValue(route_walking_successCallback);
+            ReleaseJsValue(route_walking_failCallback);
+            ReleaseJsValue(route_walking_callbackContext);
+            break;
+        case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_TRANSIT_SEARCH:
+            ReleaseJsValue(route_transit_successCallback);
+            ReleaseJsValue(route_transit_failCallback);
+            ReleaseJsValue(route_transit_callbackContext);
+            break;
+        case MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_CONNECTED:
+            ReleaseJsValue(bt_connect_successCallback);
+            ReleaseJsValue(bt_connect_failCallback);
+            ReleaseJsValue(bt_connect_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;
+                 case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_RIDING_SEARCH:
+                     if (isSuccess) {
+                         route_riding_successCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+                     } else {
+                         route_riding_failCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+                     }
+                     break;
+                 case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_WALKING_SEARCH:
+                     if (isSuccess) {
+                         route_walking_successCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+                     } else {
+                         route_walking_failCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+                     }
+                     break;
+                 case MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_TRANSIT_SEARCH:
+                     if (isSuccess) {
+                         route_transit_successCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+                     } else {
+                         route_transit_failCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+                     }
+                     break;
+                 case MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_CONNECTED:
+                     if (isSuccess) {
+                         bt_connect_successCallback = OHOS::ACELite::JSI::AcquireValue(callback);
+                     } else {
+                         bt_connect_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
+    ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_RIDING_SEARCH);
+    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);
+    setCallbackFunction(successCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_RIDING_SEARCH,true);
+    setCallbackFunction(failCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_RIDING_SEARCH,false);
+    msg_center_vector_navi_req_route_riding_search(MSGCENTER_CMD_VECTOR_NAVI, MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_RIDING_SEARCH,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
+    ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_WALKING_SEARCH);
+    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);
+    setCallbackFunction(successCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_WALKING_SEARCH,true);
+    setCallbackFunction(failCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_WALKING_SEARCH,false);
+    msg_center_vector_navi_req_route_walking_search(MSGCENTER_CMD_VECTOR_NAVI,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_WALKING_SEARCH,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
+    ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_TRANSIT_SEARCH);
+    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);
+    setCallbackFunction(successCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_TRANSIT_SEARCH,true);
+    setCallbackFunction(failCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_TRANSIT_SEARCH,false);
+    msg_center_vector_navi_req_route_transit_search(MSGCENTER_CMD_VECTOR_NAVI,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_ROUTE_TRANSIT_SEARCH,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);
+}
+
+/**
+ * destroy page interface
+ */
+JSIValue BaiduMapComponentModule::Destroy_page(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+    HILOG_INFO(HILOG_MODULE_ACE,"Destroy_page");
+    char *data = JSI::JsonStringify(args[0]);
+    HILOG_INFO(HILOG_MODULE_ACE,"Destroy_page : %s \n",data);
+    msg_center_vector_navi_req_destroy_page(MSGCENTER_CMD_VECTOR_NAVI,MSGCENTER_TYPE_ID_VECTOR_NAVI_REQ_DESTROY_PAGE,data,strlen(data));
+    return JSI::CreateBoolean(0);
+}
+
+/**
+ * BT connect interface
+ */
+JSIValue BaiduMapComponentModule::onBTConnect(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize)
+{
+    HILOG_INFO(HILOG_MODULE_ACE,"onBTConnect");
+    char *data = JSI::JsonStringify(args[0]);
+    HILOG_INFO(HILOG_MODULE_ACE,"onBTConnect : %s \n",data);
+    //success Callback & failed Callback
+    ReleaseMsgJsValue(MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_CONNECTED);
+    bt_connect_callbackContext = OHOS::ACELite::JSI::AcquireValue(thisVal);
+    OHOS::ACELite::JSIValue connectCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], CONNECT);
+    OHOS::ACELite::JSIValue disconnectCallback = OHOS::ACELite::JSI::GetNamedProperty(args[0], DISCONNECT);
+    setCallbackFunction(connectCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_CONNECTED,true);
+    setCallbackFunction(disconnectCallback,MSGCENTER_TYPE_ID_VECTOR_NAVI_BT_CONNECTED,false);
+    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);
+
+    /**
+     * destroy page
+     */
+    JSI::SetModuleAPI(exports, "destroy_page", BaiduMapComponentModule::Destroy_page);
+
+    /**
+     * BT connect interface
+     */
+    JSI::SetModuleAPI(exports, "onBTConnect", BaiduMapComponentModule::onBTConnect);
+
+}
+
+} // 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(&params->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(&params->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;
+}
+
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.h b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/baidumapcomponent/baidumap.h
new file mode 100644 (file)
index 0000000..93a3182
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+* 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);
+
+    /**
+     * destroy page interface
+     */
+    static JSIValue Destroy_page(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
+    /**
+     * bt connect interface
+     */
+    static JSIValue onBTConnect(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
+
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/display/display.cpp b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/display/display.cpp
new file mode 100644 (file)
index 0000000..bf97b75
--- /dev/null
@@ -0,0 +1,111 @@
+/*\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
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/display/display.h b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/display/display.h
new file mode 100644 (file)
index 0000000..3874955
--- /dev/null
@@ -0,0 +1,40 @@
+/*\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
index 4ab2f81..e6f4df9 100755 (executable)
@@ -33,6 +33,7 @@ extern void InitAppModule(JSIValue exports);
 #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);
@@ -44,10 +45,10 @@ 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);
@@ -62,9 +63,9 @@ extern void InitDfxModule(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);
@@ -87,6 +88,9 @@ const Module OHOS_MODULES[] = {
 #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},
@@ -102,10 +106,10 @@ const Module OHOS_MODULES[] = {
 //     {"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
@@ -116,9 +120,9 @@ const Module OHOS_MODULES[] = {
 //     {"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
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/app_data_module.cpp b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/app_data_module.cpp
new file mode 100644 (file)
index 0000000..6966cf0
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * 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
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/app_data_module.h b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/modules/presets/app_data_module.h
new file mode 100644 (file)
index 0000000..dfba14d
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * 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
index 9f1b335..82a3822 100755 (executable)
@@ -16,6 +16,8 @@ set(PUBLIC_HEADER
 
 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
@@ -102,3 +104,89 @@ install_sdk_by_sh("${CMAKE_CURRENT_SOURCE_DIR}/extcmd/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
index 638859b..e49a9a0 100755 (executable)
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js/libbms.a differ
index c36aac3..fd2e760 100755 (executable)
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-xts/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-xts/libbms.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/bundlems/sign_mode.cpp b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/bundlems/sign_mode.cpp
new file mode 100644 (file)
index 0000000..df1e672
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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
index f619d4f..d9f5eec 100755 (executable)
@@ -83,10 +83,6 @@ public:
     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();
@@ -121,9 +117,6 @@ private:
     PreAppList *preAppList_;
     bool updateFlag_;
     int32_t oldVersionCode_;
-#ifdef OHOS_DEBUG
-    bool isSignMode_ { true };
-#endif
 };
 }
 
diff --git a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/include/appexecfwk/appexecfwk_lite/services/bundlemgr_lite/include/sign_mode.h b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/include/appexecfwk/appexecfwk_lite/services/bundlemgr_lite/include/sign_mode.h
new file mode 100644 (file)
index 0000000..6ce1a27
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * 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
index a49694b..e0740bb 100755 (executable)
@@ -8,13 +8,13 @@ set(PUBLIC_HEADER
     ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/kits/communication/broadcast
     ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/kits/registry
     ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/kits/samgr
-    ${CMAKE_CURRENT_SOURCE_DIR}/services/samgr/dependency
-    ${CMAKE_CURRENT_SOURCE_DIR}/services/samgr/registry
 )
 
 set(PRIVATE_HEADER
     ${ROOT_DIR}/application/wearable/ohos_deps
     ${ROOT_DIR}/open_source/openharmony/utils/native/lite/include
+    ${CMAKE_CURRENT_SOURCE_DIR}/services/samgr/dependency
+    ${CMAKE_CURRENT_SOURCE_DIR}/services/samgr/registry
     ${PUBLIC_HEADER}
 
 )
index c4b2f13..23c96bb 100755 (executable)
@@ -115,6 +115,15 @@ public:
      */
     static JSIValue SrcGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
 
+    /**
+     * the getter of audio srcInner property
+     *
+     * @param thisVal Indicates function execute context
+     * @param args Indicates the function arguments
+     * @param argsSize Indicates the size of function arguments
+     */
+    static JSIValue SrcInnerGetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
     /**
      * the setter of audio src property
      *
@@ -124,6 +133,15 @@ public:
      */
     static JSIValue SrcSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
 
+    /**
+     * the setter of audio srcInner property
+     *
+     * @param thisVal Indicates function execute context
+     * @param args Indicates the function arguments
+     * @param argsSize Indicates the size of function arguments
+     */
+    static JSIValue SrcInnerSetter(const JSIValue thisVal, const JSIValue *args, uint8_t argsSize);
+
     /**
      * the getter of audio currentTime property
      *
index 3b71da8..3010548 100755 (executable)
@@ -89,7 +89,7 @@ public:
 
     bool Stop();
 
-    char *GetSrc() const;
+    char *GetSrc(bool innerFlag) const;
 
     double GetCurrentTime() const;
 
@@ -107,7 +107,7 @@ public:
 
     bool IsPlaying() const;
 
-    bool SetSrc(char *src);
+    bool SetSrc(char *src, bool innerFlag);
 
     bool SetCurrentTime(double currentTime) const;
 
@@ -159,6 +159,7 @@ private:
     static MediaMutexHandle lock_;
     static MediaThreadCondHandle condition_;
     static void *UpdateTimeHandler(void *arg);
+    static int GetSrcInnerPrefix(char *src, char *dest);
 
     Media::Player *player_;
     std::shared_ptr<AudioPlayerCallback> callback_;
@@ -170,11 +171,13 @@ private:
     AudioEventListener *onErrorListener_;
     AudioEventListener *onTimeUpdateListener_;
     char *src_;
+    char *srcInner_;
     char *status_;
     double volume_;
     bool autoPlay_;
     bool muted_;
     bool isRunning_;
+    bool isSysSrc_;
     MediaThreadIdHandle updateTimeProcess_;
 };
 } // namespace ACELite
index 8f557e3..0648d1d 100755 (executable)
 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()
 
@@ -223,54 +281,12 @@ set(PUBLIC_DEFINES
 )
 
 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" "*")
index 9c6dd51..9d650b5 100755 (executable)
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js/libjerryscript.a differ
index c738f1f..fc64215 100755 (executable)
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-xts/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-xts/libjerryscript.a differ
@@ -7,32 +7,55 @@
 #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
-  EXEC_ACE_JERRY_MALLOC_ERROR, // error when malloc
+  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_JSFILE_FAILED, // read .js file process failed
-  EXCE_ACE_JERRY_JSFILE_TOO_LARGE, // bytes of js file out of psRAM
+  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
-  EXEC_ACE_JERRY_UNLINKFILE_ERROR, // error when unlink bytecode file
+  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);
 
-#endif  // end JERRY_FOR_IAR_CONFIG
+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
@@ -21,7 +21,7 @@
  */
 #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.
@@ -64,9 +71,9 @@
 # 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 */
+
 /**
  * @}
  */
@@ -62,6 +71,7 @@ typedef enum
   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;
 
 /**
@@ -88,23 +98,37 @@ typedef enum
 #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;
 
 /**
@@ -119,15 +143,6 @@ typedef uint32_t ecma_value_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
  */
@@ -187,7 +202,11 @@ enum
                                                *   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)
@@ -327,10 +346,11 @@ typedef enum
                                        *   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;
 
@@ -390,6 +410,15 @@ typedef enum
  */
 #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.
  */
@@ -593,6 +622,7 @@ typedef enum
   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;
 
 /**
@@ -602,15 +632,13 @@ typedef enum
 {
   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 */
@@ -641,15 +669,16 @@ typedef enum
   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.
  */
@@ -658,35 +687,37 @@ typedef enum
   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)
 
 /**
@@ -709,19 +740,32 @@ typedef enum
 /**
  * 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
@@ -732,8 +776,8 @@ typedef struct
   /** 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 */
@@ -743,8 +787,9 @@ typedef struct
   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 */
@@ -764,7 +809,15 @@ typedef struct
   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;
 
 /**
@@ -804,6 +857,7 @@ typedef struct
       {
         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;
 
@@ -812,7 +866,7 @@ typedef struct
      */
     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;
 
@@ -822,10 +876,13 @@ typedef struct
     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;
 
     /**
@@ -848,6 +905,7 @@ typedef struct
         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;
 
@@ -856,7 +914,7 @@ typedef struct
      */
     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;
 
@@ -885,7 +943,6 @@ typedef struct
 #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.
  */
@@ -900,6 +957,17 @@ typedef struct
                                      *   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)
 
 /**
@@ -913,17 +981,16 @@ typedef struct
 
 #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)
@@ -939,18 +1006,62 @@ typedef struct
 
 #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
 {
@@ -1148,6 +1259,26 @@ typedef union
  * 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)
@@ -1155,29 +1286,36 @@ typedef union
  * 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
  */
@@ -1363,9 +1501,7 @@ typedef enum
 
   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;
 
 /**
@@ -1622,12 +1758,12 @@ typedef struct
 /**
  * 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
@@ -1703,6 +1839,27 @@ typedef struct
 
 #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.
@@ -1735,6 +1892,23 @@ typedef struct
 #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.
  */
@@ -1751,8 +1925,35 @@ do \
  * 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) */
+
 /**
  * @}
  * @}
@@ -39,7 +39,7 @@ extern "C"
 /**
  * Minor version of JerryScript API.
  */
-#define JERRY_API_MINOR_VERSION 1
+#define JERRY_API_MINOR_VERSION 3
 
 /**
  * Patch version of JerryScript API.
@@ -99,6 +99,11 @@ typedef enum
   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;
 
@@ -327,6 +332,11 @@ typedef enum
   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;
 
 /**
@@ -380,6 +390,7 @@ bool jerry_value_is_number (const jerry_value_t value);
 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);
@@ -494,6 +505,7 @@ jerry_value_t jerry_create_number_nan (void);
 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);
@@ -508,15 +520,20 @@ jerry_value_t jerry_create_undefined (void);
  */
 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,
@@ -556,10 +573,24 @@ bool jerry_foreach_object_property (const jerry_value_t obj_val, jerry_object_pr
                                     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.
  */
@@ -587,6 +618,8 @@ jerry_context_t *jerry_create_context (uint32_t heap_size, jerry_context_alloc_t
  */
 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.
@@ -606,6 +639,8 @@ jerry_length_t jerry_arraybuffer_read (const jerry_value_t value,
                                        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.
@@ -644,6 +679,17 @@ typedef enum
   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);
@@ -660,6 +706,19 @@ jerry_value_t jerry_get_typedarray_buffer (jerry_value_t value,
                                            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
 
 /**
  * @}
  */
 #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
  *
@@ -69,6 +100,11 @@ typedef uint32_t jmem_cpointer_t;
 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.
  *
@@ -223,6 +259,44 @@ void * JERRY_ATTR_PURE jmem_decompress_pointer (uintptr_t compressed_pointer);
     } \
   } 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
@@ -41,13 +41,15 @@ typedef enum
   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 */
@@ -68,7 +70,8 @@ typedef enum
   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
@@ -35,18 +33,22 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_RIGHT_SQUARE_CHAR, "]")
 #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
@@ -56,7 +58,9 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_UTC_U, "UTC")
 #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)
@@ -66,12 +70,16 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ALL, "all")
 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)
@@ -94,6 +102,9 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_POP, "pop")
 #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")
@@ -118,33 +129,44 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ATAN, "atan")
 #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")
@@ -157,8 +179,9 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_PUSH, "push")
 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)
@@ -172,6 +195,9 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SORT, "sort")
 #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
@@ -186,12 +212,26 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ARRAY_UL, "Array")
 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
@@ -199,10 +239,16 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CATCH, "catch")
 || 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")
@@ -210,22 +256,29 @@ 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
@@ -238,10 +291,13 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SHIFT, "shift")
 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")
@@ -255,10 +311,8 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NUMBER_UL, "Number")
 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) \
@@ -276,7 +330,9 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CONCAT, "concat")
 #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)
@@ -287,19 +343,19 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ESCAPE, "escape")
 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")
@@ -315,11 +371,17 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_REDUCE, "reduce")
 #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) \
@@ -330,45 +392,55 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SOURCE, "source")
 #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) \
@@ -398,8 +470,12 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INDEX_OF_UL, "indexOf")
 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)
@@ -421,12 +497,15 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_TIME_UL, "setTime")
 #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
@@ -439,7 +518,7 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INFINITY_UL, "Infinity")
 #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")
@@ -456,17 +535,19 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_MONTH_UL, "getMonth")
 #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
@@ -493,6 +574,9 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ARGUMENTS_UL, "Arguments")
 #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
@@ -504,10 +588,15 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MIN_VALUE_U, "MIN_VALUE")
 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
@@ -518,7 +607,7 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_DAY_UL, "getUTCDay")
 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)
@@ -530,6 +619,9 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_LASTINDEX_UL, "lastIndex")
 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")
@@ -560,7 +652,8 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_BYTE_OFFSET_UL, "byteOffset")
 #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")
@@ -580,7 +673,10 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_GET_UTC_DATE_UL, "getUTCDate")
 || 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
@@ -592,12 +688,10 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_MINUTES_UL, "setMinutes")
 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")
@@ -609,13 +703,16 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SYNTAX_ERROR_UL, "SyntaxError")
 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) \
@@ -644,7 +741,7 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_LOWER_CASE_UL, "toLowerCase")
 #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
@@ -654,7 +751,7 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_UTC_STRING_UL, "toUTCString")
 #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)
@@ -666,11 +763,11 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FLOAT64_ARRAY_UL, "Float64Array")
 #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
@@ -682,11 +779,16 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_EXTENSIBLE, "isExtensible")
 #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)
@@ -699,36 +801,49 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UTC_SECONDS_UL, "setUTCSeconds")
 #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")
@@ -749,7 +864,7 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_ENCODE_URI_COMPONENT, "encodeURIComponent
 #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)
@@ -759,7 +874,7 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_TO_LOCALE_TIME_STRING_UL, "toLocaleTimeSt
 #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")
@@ -769,20 +884,23 @@ LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (0, LIT_MAGIC_STRING__EMPTY)
 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)
@@ -818,60 +936,60 @@ LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (10, LIT_MAGIC_STRING_TYPED_ARRAY_UL)
 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)
@@ -884,7 +1002,7 @@ LIT_MAGIC_STRING_FIRST_STRING_WITH_SIZE (17, LIT_MAGIC_STRING_PREVENT_EXTENSIONS
 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)
@@ -44,6 +44,8 @@ jerry_value_t jerryx_handler_gc (const jerry_value_t func_obj_val, const jerry_v
                                  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
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Config_Full.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Config_Full.h
deleted file mode 100755 (executable)
index a8730d1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* DLib configuration. */
-/* Copyright 2003-2017 IAR Systems AB.  */
-
-#ifndef _DLIB_CONFIG_H
-#define _DLIB_CONFIG_H
-
-#ifndef _SYSTEM_BUILD
-  #pragma system_include
-#endif
-
-/* Turn on locale support. */
-#define _DLIB_FULL_LOCALE_SUPPORT 1
-
-/* Turn on FILE descriptor support. */
-#define _DLIB_FILE_DESCRIPTOR 1
-
-/* Turn on multibyte formatting. */
-#define _DLIB_FORMATTED_MULTIBYTE 1
-
-/* Turn on support for hex-floats in strtod. */
-#define _DLIB_STRTOD_HEX_FLOAT 1
-
-#endif /* _DLIB_CONFIG_H */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Defaults.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Defaults.h
deleted file mode 100755 (executable)
index 964e459..0000000
+++ /dev/null
@@ -1,599 +0,0 @@
-/***************************************************
- *
- * DLib_Defaults.h is the library configuration manager.
- *
- * Copyright 2003-2017 IAR Systems AB.
- *
- * This configuration header file performs the following tasks:
- *
- * 1. Includes the configuration header file, defined by _DLIB_CONFIG_FILE,
- *    that sets up a particular runtime environment.
- *
- * 2. Includes the product configuration header file, DLib_Product.h, that
- *    specifies default values for the product and makes sure that the
- *    configuration is valid.
- *
- * 3. Sets up default values for all remaining configuration symbols.
- *
- * This configuration header file, the one defined by _DLIB_CONFIG_FILE, and
- * DLib_Product.h configures how the runtime environment should behave. This
- * includes all system headers and the library itself, i.e. all system headers
- * includes this configuration header file, and the library has been built
- * using this configuration header file.
- *
- ***************************************************
- *
- * DO NOT MODIFY THIS FILE!
- *
- ***************************************************/
-
-#ifndef _DLIB_DEFAULTS_H
-#define _DLIB_DEFAULTS_H
-
-#ifndef _SYSTEM_BUILD
-  #pragma system_include
-#endif
-
-/* Include the main configuration header file. */
-#if defined(_DLIB_CONFIG_FILE_HEADER_NAME)
-  #include _DLIB_CONFIG_FILE_HEADER_NAME
-  /* _DLIB_CONFIG_FILE_STRING is the quoted variant of above */
-#elif defined(_DLIB_CONFIG_FILE)
-  #include _STRINGIFY(_DLIB_CONFIG_FILE)
-#else
-  #pragma message("Library configuration file is not specified. Use\
-  --dlib_config, please see the compiler reference guide for details.")
-#endif
-
-/* Include the product specific header file. */
-#ifndef __NO_DLIB_PRODUCT_FILE
-  #include <DLib_Product.h>
-#endif
-
-
-/*
- * The remainder of the file sets up defaults for a number of
- * configuration symbols, each corresponds to a feature in the
- * libary.
- *
- * The value of the symbols should either be 1, if the feature should
- * be supported, or 0 if it shouldn't. (Except where otherwise
- * noted.)
- */
-
-
-/*
- * File handling
- *
- * Determines whether FILE descriptors and related functions exists or not.
- * When this feature is selected, i.e. set to 1, then FILE descriptors and
- * related functions (e.g. fprintf, fopen) exist. All files, even stdin,
- * stdout, and stderr will then be handled with a file system mechanism that
- * buffers files before accessing the lowlevel I/O interface (__open, __read,
- * __write, etc).
- *
- * If not selected, i.e. set to 0, then FILE descriptors and related functions
- * (e.g. fprintf, fopen) does not exist. All functions that normally uses
- * stderr will use stdout instead. Functions that uses stdout and stdin (like
- * printf and scanf) will access the lowlevel I/O interface directly (__open,
- * __read, __write, etc), i.e. there will not be any buffering.
- *
- * The default is not to have support for FILE descriptors.
- */
-
-#ifndef _DLIB_FILE_DESCRIPTOR
-  #define _DLIB_FILE_DESCRIPTOR 0
-#endif
-
-
-/*
- * Use static buffers for stdout
- *
- * This setting controls whether the stream stdout uses a static 80 bytes
- * buffer or uses a one byte buffer allocated in the file descriptor. This
- * setting is only applicable if the FILE descriptors are enabled above.
- *
- * Default is to use a static 80 byte buffer.
- */
-
-#ifndef _DLIB_STDOUT_USES_STATIC_BUFFER
-  #define _DLIB_STDOUT_USES_STATIC_BUFFER 1
-#endif
-
-
-/*
- * Support of locale interface
- *
- * "Locale" is the system in C that support language- and
- * contry-specific settings for a number of areas, including currency
- * symbols, date and time, and multibyte encodings.
- *
- * This setting determines whether the locale interface exist or not.
- * When this feature is selected, i.e. set to 1, the locale interface exist
- * (setlocale, etc). A number of preselected locales can be activated during
- * runtime. The preselected locales and encodings are choosen at linkage. The
- * application will start with the "C" locale choosen. (Single byte encoding is
- * always supported in this mode.)
- *
- *
- * If not selected, i.e. set to 0, the locale interface (setlocale, etc) does
- * not exist. The C locale is then preset and cannot be changed.
- *
- * The default is not to have support for the locale interface with the "C"
- * locale and the single byte encoding.
- */
-
-#ifndef _DLIB_FULL_LOCALE_SUPPORT
-  #define _DLIB_FULL_LOCALE_SUPPORT 0
-#endif
-
-/*
- * Define what memory to place the locale table segment (.iar.locale_table)
- * in.
- */
-#ifndef _DLIB_LOCALE_TABLE_MEMORY
-  #define _DLIB_LOCALE_TABLE_MEMORY
-#endif
-
-/*
- * Wide character and multi byte character support in library.
- */
-
-#ifndef _DLIB_WIDE_CHARACTERS
-  #define _DLIB_WIDE_CHARACTERS 1
-#endif
-#ifndef _DLIB_CONFIG_AGNOSTIC
-  #if _DLIB_FILE_DESCRIPTOR && !_DLIB_WIDE_CHARACTERS
-    #error "_DLIB_FILE_DESCRIPTOR == 0 if wide characters are disabled"
-  #endif
-  #if _DLIB_FULL_LOCALE_SUPPORT && !_DLIB_WIDE_CHARACTERS
-    #error "_DLIB_FULL_LOCALE_SUPPORT == 0 if wide characters are disabled"
-  #endif
-#endif
-
-/*
- * Support of multibytes in printf- and scanf-like functions
- *
- * This is the default value for _DLIB_PRINTF_MULTIBYTE and
- * _DLIB_SCANF_MULTIBYTE. See them for a description.
- *
- * Default is to not have support for multibytes in printf- and scanf-like
- * functions.
- */
-
-#ifndef _DLIB_FORMATTED_MULTIBYTE
-  #define _DLIB_FORMATTED_MULTIBYTE 0
-#endif
-#ifndef _DLIB_CONFIG_AGNOSTIC
-  #if _DLIB_FORMATTED_MULTIBYTE && !_DLIB_WIDE_CHARACTERS
-    #error "_DLIB_FORMATTED_MULTIBYTE == 0 if wide characters are disabled"
-  #endif
-#endif
-
-/*
- * Hexadecimal floating-point numbers in strtod
- *
- * If selected, i.e. set to 1, strtod supports C99 hexadecimal floating-point
- * numbers. This also enables hexadecimal floating-points in internal functions
- * used for converting strings and wide strings to float, double, and long
- * double.
- *
- * If not selected, i.e. set to 0, C99 hexadecimal floating-point numbers
- * aren't supported.
- *
- * Default is not to support hexadecimal floating-point numbers.
- */
-
-#ifndef _DLIB_STRTOD_HEX_FLOAT
-  #define _DLIB_STRTOD_HEX_FLOAT 0
-#endif
-
-
-/*
- * Printf configuration symbols.
- *
- * All the configuration symbols described further on controls the behaviour
- * of printf, sprintf, and the other printf variants.
- *
- * The library proves four formatters for printf: 'tiny', 'small',
- * 'large', and 'default'.  The setup in this file controls all except
- * 'tiny'.  Note that both small' and 'large' explicitly removes
- * some features.
- */
-
-/*
- * Handle multibytes in printf
- *
- * This setting controls whether multibytes and wchar_ts are supported in
- * printf. Set to 1 to support them, otherwise set to 0.
- *
- * See _DLIB_FORMATTED_MULTIBYTE for the default setting.
- */
-#ifndef _DLIB_PRINTF_MULTIBYTE
-  #define _DLIB_PRINTF_MULTIBYTE _DLIB_FORMATTED_MULTIBYTE
-#endif
-#ifndef _DLIB_CONFIG_AGNOSTIC
-  #if _DLIB_PRINTF_MULTIBYTE && !_DLIB_FULL_LOCALE_SUPPORT
-    #error "_DLIB_PRINTF_MULTIBYTE needs full locale"
-  #endif
-  #if _DLIB_PRINTF_MULTIBYTE && !_DLIB_WIDE_CHARACTERS
-    #error "_DLIB_PRINTF_MULTIBYTE == 0 if wide characters are disabled"
-  #endif
-#endif
-
-/*
- * Support of formatting anything larger than int in printf
- *
- * This setting controls if 'int' should be used internally in printf, rather
- * than the largest existing integer type. If 'int' is used, any integer or
- * pointer type formatting use 'int' as internal type even though the
- * formatted type is larger. Set to 1 to use 'int' as internal type, otherwise
- * set to 0.
- *
- * See also next configuration.
- *
- * Default is to internally use largest existing internally type.
- */
-#ifndef _DLIB_PRINTF_INT_TYPE_IS_INT
-  #define _DLIB_PRINTF_INT_TYPE_IS_INT 0
-#endif
-
-/*
- * Support of formatting anything larger than long in printf
- *
- * This setting controls if 'long' should be used internally in printf, rather
- * than the largest existing integer type. If 'long' is used, any integer or
- * pointer type formatting use 'long' as internal type even though the
- * formatted type is larger. Set to 1 to use 'long' as internal type,
- * otherwise set to 0.
- *
- * See also previous configuration.
- *
- * Default is to internally use largest existing internally type.
- */
-#ifndef _DLIB_PRINTF_INT_TYPE_IS_LONG
-  #define _DLIB_PRINTF_INT_TYPE_IS_LONG 0
-#endif
-
-#if _DLIB_PRINTF_INT_TYPE_IS_INT && _DLIB_PRINTF_INT_TYPE_IS_LONG
-  #error "At most one of _DLIB_PRINTF_INT_TYPE_IS_INT and _DLIB_PRINTF_INT_TYPE_IS_LONG can be defined."
-#endif
-
-/*
- * Emit a char a time in printf
- *
- * This setting controls internal output handling. If selected, i.e. set to 1,
- * then printf emits one character at a time, which requires less code but
- * can be slightly slower for some types of output.
- *
- * If not selected, i.e. set to 0, then printf buffers some outputs.
- *
- * Note that it is recommended to either use full file support (see
- * _DLIB_FILE_DESCRIPTOR) or -- for debug output -- use the linker
- * option "-e__write_buffered=__write" to enable buffered I/O rather
- * than deselecting this feature.
- */
-#ifndef _DLIB_PRINTF_CHAR_BY_CHAR
-  #define _DLIB_PRINTF_CHAR_BY_CHAR 1
-#endif
-
-
-/*
- * Scanf configuration symbols.
- *
- * All the configuration symbols described here controls the
- * behaviour of scanf, sscanf, and the other scanf variants.
- *
- * The library proves three formatters for scanf: 'small', 'large',
- * and 'default'.  The setup in this file controls all, however both
- * 'small' and 'large' explicitly removes some features.
- */
-
-/*
- * Handle multibytes in scanf
- *
- * This setting controls whether multibytes and wchar_t:s are supported in
- * scanf. Set to 1 to support them, otherwise set to 0.
- *
- * See _DLIB_FORMATTED_MULTIBYTE for the default.
- */
-#ifndef _DLIB_SCANF_MULTIBYTE
-  #define _DLIB_SCANF_MULTIBYTE _DLIB_FORMATTED_MULTIBYTE
-#endif
-#ifndef _DLIB_CONFIG_AGNOSTIC
-  #if _DLIB_SCANF_MULTIBYTE && !_DLIB_FULL_LOCALE_SUPPORT
-    #error "_DLIB_SCANF_MULTIBYTE needs full locale"
-  #endif
-  #if _DLIB_SCANF_MULTIBYTE && !_DLIB_WIDE_CHARACTERS
-    #error "_DLIB_SCANF_MULTIBYTE == 0 if wide characters are disabled"
-  #endif
-#endif
-
-/*
- * Handle multibytes in asctime and strftime.
- *
- * This setting controls whether multibytes and wchar_ts are
- * supported.Set to 1 to support them, otherwise set to 0.
- *
- * See _DLIB_FORMATTED_MULTIBYTE for the default setting.
- */
-#ifndef _DLIB_STRFTIME_MULTIBYTE
-  #define _DLIB_STRFTIME_MULTIBYTE _DLIB_FORMATTED_MULTIBYTE
-#endif
-#ifndef _DLIB_CONFIG_AGNOSTIC
-  #if _DLIB_STRFTIME_MULTIBYTE && !_DLIB_FULL_LOCALE_SUPPORT
-    #error "_DLIB_STRFTIME_MULTIBYTE needs full locale"
-  #endif
-  #if _DLIB_STRFTIME_MULTIBYTE && !_DLIB_WIDE_CHARACTERS
-    #error "_DLIB_STRFTIME_MULTIBYTE == 0 if wide characters are disabled"
-  #endif
-#endif
-
-/*
- * Implement "qsort" using a bubble sort algorithm.
- *
- * Bubble sort is less efficient than quick sort but requires less RAM
- * and ROM resources.
- */
-
-#ifndef _DLIB_QSORT_USE_BUBBLE_SORT
-  #define _DLIB_QSORT_USE_BUBBLE_SORT 0
-#endif
-
-
-/*
- * Set Buffert size used in qsort
- */
-
-#ifndef _DLIB_QSORT_BUF_SIZE
-  #define _DLIB_QSORT_BUF_SIZE 256
-#endif
-
-
-/*
- * Use a simple rand implementation to reduce memory footprint.
- *
- * The default "rand" function uses an array of 32 32-bit integers of memory to
- * store the current state.
- *
- * The simple "rand" function uses only a single 32-bit integer. However, the
- * quality of the generated psuedo-random numbers are not as good as
- * the default implementation.
- */
-
-#ifndef _DLIB_RAND_USE_SIMPLE
-  #define _DLIB_RAND_USE_SIMPLE 0
-#endif
-
-
-/*
- * Set attributes for the function used by the C-SPY debug interface to stop at.
- */
-
-#ifndef _DLIB_DEBUG_BREAK_FUNCTION_ATTRIBUTE
-  #define _DLIB_DEBUG_BREAK_FUNCTION_ATTRIBUTE
-#endif
-
-/*
- * Used by products where one runtime library can be used by applications
- * with different data models, in order to reduce the total number of
- * libraries required. Typically, this is used when the pointer types does
- * not change over the data models used, but the placement of data variables
- * or/and constant variables do.
- *
- * If defined, this symbol is typically defined to the memory attribute that
- * is used by the runtime library. The actual define must use a
- * _Pragma("type_attribute = xxx") construct. In the header files, it is used
- * on all statically linked data objects seen by the application.
- */
-#ifndef _DLIB_DATA_ATTR
-  #define _DLIB_DATA_ATTR
-#endif
-
-#ifndef _DLIB_CONST_ATTR
-  #ifdef _DLIB_DATA_ATTR
-    #define _DLIB_CONST_ATTR _DLIB_DATA_ATTR
-  #else
-    #define _DLIB_CONST_ATTR
-  #endif
-#endif
-
-
-/*
- * Turn on support for the Target-specific ABI. The ABI is based on the
- * ARM AEABI. A target, except ARM, may deviate from it.
- */
-
-#ifndef _DLIB_SUPPORT_FOR_AEABI
-  #ifdef __EDG_IA64_ABI
-    #define _DLIB_SUPPORT_FOR_AEABI 1
-  #else
-    #define _DLIB_SUPPORT_FOR_AEABI 0
-  #endif
-#endif
-
-#if _DLIB_SUPPORT_FOR_AEABI == 1
-  /* Possible AEABI deviations */
-  #ifndef _DLIB_MBSTATET_IS_UNSIGNED_LONG
-    #if __INT_SIZE__ != 4
-      #define _DLIB_MBSTATET_USES_UNSIGNED_LONG 1
-    #else
-      #define _DLIB_MBSTATET_USES_UNSIGNED_LONG 0
-    #endif
-  #endif
-
-  #ifndef _DLIB_TIME_USES_LONG
-    #if __INT_SIZE__ != 4
-      #define _DLIB_TIME_USES_LONG 1
-    #else
-      #define _DLIB_TIME_USES_LONG 0
-    #endif
-  #endif
-
-  /*
-   * The "difunc" table contains information about C++ objects that
-   * should be dynamically initialized, where each entry in the table
-   * represents an initialization function that should be called. When
-   * the symbol _DLIB_AEABI_DIFUNC_CONTAINS_OFFSETS is true, each
-   * entry in the table is encoded as an offset from the entry
-   * location. When false, the entries contain the actual addresses to
-   * call.
-   */
-  #ifndef _DLIB_AEABI_DIFUNC_CONTAINS_OFFSETS
-    #define _DLIB_AEABI_DIFUNC_CONTAINS_OFFSETS 1
-  #endif
-#endif /* _DLIB_SUPPORT_FOR_AEABI == 1  */
-
-/*
- * Only use IA64 functions
- *
- * Remove the C++ __aeabi functions when using the IA64 interface. Used in
- * ARM AARCH64 mode.
- *
- */
-#ifndef _DLIB_ONLY_USE_CXA_FUNCTIONS
-#if defined(__ICCARM__) && defined(__aarch64__)
-    #define _DLIB_ONLY_USE_CXA_FUNCTIONS 1
-  #else
-    #define _DLIB_ONLY_USE_CXA_FUNCTIONS 0
-  #endif
-#endif
-
-/*
- * Turn on usage of a pragma to tell the linker the number of elements used
- * in a setjmp jmp_buf.
- */
-
-#ifndef _DLIB_USE_RTMODEL_JMP_BUF_NUM_ELEMENTS
-  #define _DLIB_USE_RTMODEL_JMP_BUF_NUM_ELEMENTS 0
-#endif
-
-
-/*
- * If true, the product supplies a "DLib_Product_string.h" file that
- * is included from "string.h".
- */
-
-#ifndef _DLIB_PRODUCT_STRING
-  #define _DLIB_PRODUCT_STRING 0
-#endif
-
-/*
- * Determine whether the math fma routines are fast or not.
- */
-#ifndef _DLIB_FAST_FMA
-  #define _DLIB_FAST_FMA 0
-#endif
-
-
-/*
- * Favor speed versus some size enlargements in floating point functions.
- */
-#ifndef _DLIB_SPEEDY_FLOATS
-  #define _DLIB_SPEEDY_FLOATS 0
-#endif
-
-
-/*
- * Include dlmalloc as an alternative heap manager in the product.
- *
- * Typically, an application will use a "malloc" heap manager that is
- * relatively small but not that efficient. An application can
- * optionally use the "dlmalloc" package, which provides a more
- * effective "malloc" heap manager, if it is included in the product
- * and supported by the settings.
- *
- * See the product documentation on how to use it, and whether or not
- * it is included in the product.
- */
-
-#ifndef _DLIB_INCLUDE_DLMALLOC_ALTERNATIVE
-  /* size_t/ptrdiff_t must be a 4 bytes unsigned integer. */
-  #if __SIZE_T_MAX__ < 0xfffffffful
-    #define _DLIB_INCLUDE_DLMALLOC_ALTERNATIVE 0
-  #else
-    #define _DLIB_INCLUDE_DLMALLOC_ALTERNATIVE 1
-  #endif
-#endif
-
-
-/*
- * Make sure certain C++ functions use the soft floating point variant.
- */
-
-#ifndef __SOFTFP
-  #define __SOFTFP
-#endif
-
-
-/*
- * Allow the 64-bit time_t interface?
- *
- * Default is yes if long long is 64 bits.
- */
-
-#ifndef _DLIB_TIME_ALLOW_64
-  #if __LONG_LONG_SIZE__ == 8
-    #define _DLIB_TIME_ALLOW_64 1
-  #else
-    #define _DLIB_TIME_ALLOW_64 0
-  #endif
-#endif
-
-
-/*
- * Is time_t 64 or 32 bits?
- *
- * Default is 32 bits.
- */
-
-#ifndef _DLIB_TIME_USES_64_DEFAULT
-  #define _DLIB_TIME_USES_64_DEFAULT 0
-#endif
-
-
-/*
- * Do we include math functions that demands lots of constant bytes?
- * (like erf, erfc, expm1, fma, lgamma, tgamma, and *_accurate)
- *
- */
-
-#ifndef _DLIB_ALLOW_LARGE_CONSTANT_TABLES_FOR_MATH
-  #define _DLIB_ALLOW_LARGE_CONSTANT_TABLES_FOR_MATH 1
-#endif
-
-
-/*
- * Support of weak.
- *
- * __weak must be supported. Support of weak means that the call to
- * a weak declared function that isn't part of the application will be
- * executed as a nop instruction.
- *
- */
-
-#ifndef __WEAK
-  #if !defined(__HAS_WEAK__) || !__HAS_WEAK__
-    #error "Compiler must support __weak"
-  #endif
-  #define __WEAK _Pragma("object_attribute = __weak")
-  #define __WEAK_DEFS 1
-#endif
-
-
-/*
- * Deleted options
- */
-#ifdef _DLIB_FLOAT_ENVIRONMENT
-  #error "Option has been removed"
-#endif
-
-#ifdef _DLIB_SMALL_TARGET
-  #error "Option has been removed"
-#endif
-
-#ifdef _DLIB_THREAD_SUPPORT
-  #error "Option has been removed"
-#endif
-
-#endif /* _DLIB_DEFAULTS_H */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product.h
deleted file mode 100755 (executable)
index 8b101a2..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Copyright 2017 IAR Systems AB. */
-
-#ifndef _DLIB_PRODUCTS_H_
-#define _DLIB_PRODUCTS_H_
-
-#ifndef _SYSTEM_BUILD
-   #pragma system_include
-#endif
-
-
-/*********************************************************************
-*
-*       Configuration
-*
-*********************************************************************/
-
-/* Wide character and multi byte character support in library.
- * This is not allowed to vary over configurations, since math-library
- * is built with wide character support.
- */
-#define _DLIB_WIDE_CHARACTERS 1
-
-/* This ensures that the standard header file "string.h" includes
- * the Arm-specific file "DLib_Product_string.h". */
-#define _DLIB_PRODUCT_STRING 1
-
-/* This ensures that the standard header file "fenv.h" includes
- * the Arm-specific file "DLib_Product_fenv.h". */
-#define _DLIB_PRODUCT_FENV 1
-
-/* This ensures that the standard header file "stdlib.h" includes
- * the Arm-specific file "DLib_Product_stdlib.h". */
-#define _DLIB_PRODUCT_STDLIB 1
-
-/* Max buffer used for swap in qsort */
-#if !defined(_DLIB_QSORT_BUF_SIZE)
-#define _DLIB_QSORT_BUF_SIZE 128
-#endif
-
-#if defined(__RWPI__)
-  /* No thread local storage with RWPI */
-  #define _THREAD_LOCAL
-#endif  
-
-/* Enable AEABI support */
-#define _DLIB_SUPPORT_FOR_AEABI 1
-
-/* Enable rtmodel for setjump buffer size */
-#define _DLIB_USE_RTMODEL_JMP_BUF_NUM_ELEMENTS 1
-
-/* Enable parsing of hex floats */
-#if !defined(_DLIB_STRTOD_HEX_FLOAT)
-#define _DLIB_STRTOD_HEX_FLOAT 1
-#elif _DLIB_STRTOD_HEX_FLOAT != 1
-#error "_DLIB_STRTOD_HEX_FLOAT must be 1 to match the  math-library"
-#endif
-
-/* Special placement for locale structures when building ropi libraries */
-#if defined(__ROPI__)
-#define _LOCALE_PLACEMENT_ static
-#endif
-
-/* Use atomic if possible */
-#ifndef __STDC_NO_ATOMICS__
-  #define _USE_ATOMIC_OPS 1
-#endif  
-
-/* CPP-library uses software floatingpoint interface */
-#define __SOFTFP  _Pragma( "type_attribute=__softfp" )
-
-/* functions for setting errno should be __no_scratch */
-#define __NO_SCRATCH  _Pragma( "type_attribute=__no_scratch" )
-
-/* Use speedy implementation of floats (simple quad). */
-#define _DLIB_SPEEDY_FLOATS 1
-
-/* Configure generic ELF init routines. */
-#define _DLIB_ELF_INIT_STATIC_BASE_DECLARATION __no_init uint32_t __iar_SB @ r9
-#define _DLIB_ELF_INIT_STATIC_BASE __iar_SB
-#define _DLIB_ELF_INIT_FUNCTION_ATTRIBUTES \
-  _Pragma("type_attribute=__interwork __thumb")
-#define _DLIB_ELF_INIT_TABLE_MEMORY       __data
-#define _DLIB_ELF_INIT_SOURCE_MEMORY      __data
-#define _DLIB_ELF_INIT_DESTINATION_MEMORY __data
-#define _DLIB_ELF_INIT_USE_RELATIVE_ROM_ADDRESSES 1
-#define _DLIB_ELF_INIT_REGION_COUNT_TYPE uint32_t
-#ifdef AVOID_ROPI
-#define _DLIB_ELF_INIT_MODULE_ATTRIBUTES          \
-  _Pragma("build_attribute vfpcc_compatible")     \
-  _Pragma("build_attribute arm_thumb_compatible") \
-  _Pragma("build_attribute rwpi_compatible")      \
-  _Pragma("diag_suppress=Pa107")                  \
-  _Pragma("rtmodel=\"CppFlavor\",\"*\"")          \
-  _Pragma("diag_default=Pa107")
-#else
-#define _DLIB_ELF_INIT_MODULE_ATTRIBUTES          \
-  _Pragma("build_attribute vfpcc_compatible")     \
-  _Pragma("build_attribute arm_thumb_compatible") \
-  _Pragma("build_attribute ropi_compatible")      \
-  _Pragma("build_attribute rwpi_compatible")      \
-  _Pragma("diag_suppress=Pa107")                  \
-  _Pragma("rtmodel=\"CppFlavor\",\"*\"")          \
-  _Pragma("diag_default=Pa107")
-#endif
-#define _DLIB_ELF_INIT_INTERFACE_VERSION 3
-
-#define _DLIB_USE_RTMODEL_JMP_BUF_NUM_ELEMENTS 1
-
-#define _XMATHWRAPPERS_DEF xarmmathwrappers.h
-
-#define _CPPINIT_ATTR _Pragma("no_bounds")
-
-#endif
-
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product_stdlib.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product_stdlib.h
deleted file mode 100755 (executable)
index 30e61cb..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/**************************************************
- *
- * ARM-specific configuration for stdlib.h in DLib.
- *
- * Copyright 2017 IAR Systems AB.
- *
- **************************************************/
-
-#ifndef _DLIB_PRODUCTS_STDLIB_H_
-#define _DLIB_PRODUCTS_STDLIB_H_
-
-#ifndef _SYSTEM_BUILD
-  #pragma system_include
-#endif
-
-#ifndef _NO_DEFINITIONS_IN_HEADER_FILES
-
-#ifdef __cplusplus
-extern "C" {
-#endif  
-
-#pragma type_attribute=__value_in_regs
-div_t __aeabi_idivmod(int n, int d);
-
-#if !_DLIB_ONLY_C89
-  #pragma type_attribute=__value_in_regs
-  lldiv_t __aeabi_ldivmod(long long n, long long d);
-#endif  
-
-#pragma inline=forced_no_body
-__ATTRIBUTES
-div_t div(int a, int b)
-{
-#if __ARM_FEATURE_IDIV  
-  int q = a / b;
-  int r = a - (q*b);
-  div_t d;
-  d.quot = q;
-  d.rem = r;
-  return d;
-#else
-  return __aeabi_idivmod(a, b);
-#endif    
-}
-
-#pragma inline=forced_no_body
-__ATTRIBUTES
-ldiv_t ldiv(long a, long b)
-{
-#if __ARM_FEATURE_IDIV  
-  int q = a / b;
-  int r = a - (q*b);
-  ldiv_t ld;
-  ld.quot = q;
-  ld.rem = r;
-#else
-  div_t d = __aeabi_idivmod(a, b);
-  ldiv_t ld;
-  ld.quot = d.quot;
-  ld.rem  = d.rem;
-#endif  
-  return ld;
-}
-
-#if !_DLIB_ONLY_C89
-  #pragma inline=forced_no_body
-  __ATTRIBUTES
-  lldiv_t lldiv(long long a, long long b)
-  {
-    return __aeabi_ldivmod(a, b);
-  }
-#endif  
-
-#ifdef __cplusplus
-};
-#endif  
-
-#endif /* _NO_DEFINITIONS_IN_HEADER_FILES */
-
-#endif /* _DLIB_PRODUCTS_STDLIB_H_ */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product_string.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/DLib_Product_string.h
deleted file mode 100755 (executable)
index acf18b0..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/**************************************************
- *
- * ARM-specific configuration for string.h in DLib.
- *
- * Copyright 2006-2017 IAR Systems AB.
- *
- * $Id: DLib_Product_string.h 126465 2018-03-21 15:15:50Z mats $
- *
- **************************************************/
-
-#ifndef _DLIB_PRODUCTS_STRING_H_
-#define _DLIB_PRODUCTS_STRING_H_
-
-#ifndef _SYSTEM_BUILD
-  #pragma system_include
-#endif
-
-#ifndef _NO_DEFINITIONS_IN_HEADER_FILES
-
-  /*
-   * The following is pre-declared by the compiler.
-   *
-   * __INTRINSIC void __aeabi_memset (void *, size_t, int);
-   * __INTRINSIC void __aeabi_memcpy (void *, const void *, size_t);
-   * __INTRINSIC void __aeabi_memmove(void *, const void *, size_t);
-   */
-
-
-  /*
-   * Inhibit inline definitions for routines with an effective
-   * ARM-specific implementation.
-   *
-   * Not in Cortex-M1 and Cortex-MS1
-   */
-
-  #if  __CORE__ != 11 && __CORE__ != 12
-
-  #define _DLIB_STRING_SKIP_INLINE_MEMCHR
-  #define _DLIB_STRING_SKIP_INLINE_MEMCMP
-  #define _DLIB_STRING_SKIP_INLINE_STRCHR
-  #define _DLIB_STRING_SKIP_INLINE_STRCMP
-  #define _DLIB_STRING_SKIP_INLINE_STRLEN
-  #define _DLIB_STRING_SKIP_INLINE_STRNCPY
-
-  #endif
-
-  /*
-   * Redirect calls to standard functions to the corresponding
-   * __aeabi_X function.
-   */
-#ifndef __AS_BOUNDS__
-_EXTERN_C
-
-  #define _DLIB_STRING_SKIP_INLINE_MEMCPY
-  #pragma inline=forced_no_body
-  __EFF_NENR1NW2R1 __ATTRIBUTES void * memcpy(void * _D, const void * _S, size_t _N)
-  {
-    __aeabi_memcpy(_D, _S, _N);
-    return _D;
-  }
-
-  #define _DLIB_STRING_SKIP_INLINE_MEMMOVE
-  #pragma inline=forced_no_body
-  __EFF_NENR1NW2R1 __ATTRIBUTES void * memmove(void * _D, const void * _S, size_t _N)
-  {
-    __aeabi_memmove(_D, _S, _N);
-    return _D;
-  }
-
-  #define _DLIB_STRING_SKIP_INLINE_MEMSET
-  #pragma inline=forced_no_body
-  __EFF_NENR1R1 __ATTRIBUTES void * memset(void * _D, int _C, size_t _N)
-  {
-    __aeabi_memset(_D, _N, _C);
-    return _D;
-  }
-
-_EXTERN_C_END
-#endif /* __AS_BOUNDS__ */
-#endif /* _NO_DEFINITIONS_IN_HEADER_FILES */
-
-#endif /* _DLIB_PRODUCTS_STRING_H_ */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg-internal.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg-internal.h
deleted file mode 100755 (executable)
index 3f9c4fe..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg.h
deleted file mode 100755 (executable)
index 8171bcf..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg.impl.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/arg.impl.h
deleted file mode 100755 (executable)
index 1b3111e..0000000
+++ /dev/null
@@ -1,443 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/byte-code.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/byte-code.h
deleted file mode 100755 (executable)
index 57a626a..0000000
+++ /dev/null
@@ -1,735 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/common.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/common.h
deleted file mode 100755 (executable)
index 1847977..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/debugger.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/debugger.h
deleted file mode 100755 (executable)
index d188256..0000000
+++ /dev/null
@@ -1,494 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-alloc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-alloc.h
deleted file mode 100755 (executable)
index 4379317..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-array-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-array-object.h
deleted file mode 100755 (executable)
index b5de122..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-arraybuffer-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-arraybuffer-object.h
deleted file mode 100755 (executable)
index a77deb5..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-boolean-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-boolean-object.h
deleted file mode 100755 (executable)
index adf0353..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array-iterator-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array-iterator-prototype.inc.h
deleted file mode 100755 (executable)
index f7ec656..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array-prototype.inc.h
deleted file mode 100755 (executable)
index ad86d85..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-array.inc.h
deleted file mode 100755 (executable)
index ccea4a5..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-arraybuffer-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-arraybuffer-prototype.inc.h
deleted file mode 100755 (executable)
index 852e356..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-arraybuffer.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-arraybuffer.inc.h
deleted file mode 100755 (executable)
index 2ed9fa4..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-boolean-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-boolean-prototype.inc.h
deleted file mode 100755 (executable)
index c8f2223..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-boolean.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-boolean.inc.h
deleted file mode 100755 (executable)
index a26f129..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-dataview-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-dataview-prototype.inc.h
deleted file mode 100755 (executable)
index 3dd9efd..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-dataview.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-dataview.inc.h
deleted file mode 100755 (executable)
index 75fbc68..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-date-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-date-prototype.inc.h
deleted file mode 100755 (executable)
index 5430801..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-date.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-date.inc.h
deleted file mode 100755 (executable)
index fc38bf5..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-error-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-error-prototype.inc.h
deleted file mode 100755 (executable)
index 2cb3444..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-error.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-error.inc.h
deleted file mode 100755 (executable)
index 3fbddac..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-evalerror-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-evalerror-prototype.inc.h
deleted file mode 100755 (executable)
index a6e1f64..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-evalerror.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-evalerror.inc.h
deleted file mode 100755 (executable)
index c6d7626..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float32array-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float32array-prototype.inc.h
deleted file mode 100755 (executable)
index 5ad673d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float32array.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float32array.inc.h
deleted file mode 100755 (executable)
index 7ba4130..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float64array-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float64array-prototype.inc.h
deleted file mode 100755 (executable)
index e3528d3..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float64array.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-float64array.inc.h
deleted file mode 100755 (executable)
index 76f6d73..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-function-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-function-prototype.inc.h
deleted file mode 100755 (executable)
index 945a14f..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-function.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-function.inc.h
deleted file mode 100755 (executable)
index c6a4a7b..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-global.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-global.inc.h
deleted file mode 100755 (executable)
index 4964887..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers-macro-defines.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers-macro-defines.inc.h
deleted file mode 100755 (executable)
index 53ecd64..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers-macro-undefs.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers-macro-undefs.inc.h
deleted file mode 100755 (executable)
index 8f72525..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-helpers.h
deleted file mode 100755 (executable)
index 319811a..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int16array-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int16array-prototype.inc.h
deleted file mode 100755 (executable)
index 0d70bd5..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int16array.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int16array.inc.h
deleted file mode 100755 (executable)
index 7522b80..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int32array-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int32array-prototype.inc.h
deleted file mode 100755 (executable)
index ca15f6e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int32array.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int32array.inc.h
deleted file mode 100755 (executable)
index 8319f84..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int8array-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int8array-prototype.inc.h
deleted file mode 100755 (executable)
index c96e557..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int8array.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-int8array.inc.h
deleted file mode 100755 (executable)
index 07a3800..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-internal-routines-template.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-internal-routines-template.inc.h
deleted file mode 100755 (executable)
index 06a10fb..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-/* 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
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-iterator-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-iterator-prototype.inc.h
deleted file mode 100755 (executable)
index 5070262..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-json.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-json.inc.h
deleted file mode 100755 (executable)
index 11446b8..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map-iterator-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map-iterator-prototype.inc.h
deleted file mode 100755 (executable)
index 8f3b326..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map-prototype.inc.h
deleted file mode 100755 (executable)
index c7d7bc7..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-map.inc.h
deleted file mode 100755 (executable)
index 2c4ca3d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-math.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-math.inc.h
deleted file mode 100755 (executable)
index f889b54..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-number-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-number-prototype.inc.h
deleted file mode 100755 (executable)
index 8b50925..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-number.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-number.inc.h
deleted file mode 100755 (executable)
index 695f9cb..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-object-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-object-prototype.inc.h
deleted file mode 100755 (executable)
index 5da1290..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-object.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-object.inc.h
deleted file mode 100755 (executable)
index 457a282..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-promise-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-promise-prototype.inc.h
deleted file mode 100755 (executable)
index 872fab5..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-promise.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-promise.inc.h
deleted file mode 100755 (executable)
index 3135ac7..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-rangeerror-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-rangeerror-prototype.inc.h
deleted file mode 100755 (executable)
index 6841715..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-rangeerror.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-rangeerror.inc.h
deleted file mode 100755 (executable)
index b1da135..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-referenceerror-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-referenceerror-prototype.inc.h
deleted file mode 100755 (executable)
index 496ea99..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-referenceerror.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-referenceerror.inc.h
deleted file mode 100755 (executable)
index 077a93d..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-regexp-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-regexp-prototype.inc.h
deleted file mode 100755 (executable)
index 33a1375..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-regexp.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-regexp.inc.h
deleted file mode 100755 (executable)
index 135427a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set-iterator-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set-iterator-prototype.inc.h
deleted file mode 100755 (executable)
index a193991..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set-prototype.inc.h
deleted file mode 100755 (executable)
index a035612..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-set.inc.h
deleted file mode 100755 (executable)
index c2847bb..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string-iterator-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string-iterator-prototype.inc.h
deleted file mode 100755 (executable)
index 9a04570..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string-prototype.inc.h
deleted file mode 100755 (executable)
index 5679079..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-string.inc.h
deleted file mode 100755 (executable)
index a8435a9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-symbol-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-symbol-prototype.inc.h
deleted file mode 100755 (executable)
index 8301f78..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-symbol.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-symbol.inc.h
deleted file mode 100755 (executable)
index b9a33ff..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-syntaxerror-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-syntaxerror-prototype.inc.h
deleted file mode 100755 (executable)
index 827290a..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-syntaxerror.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-syntaxerror.inc.h
deleted file mode 100755 (executable)
index 3585aea..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-type-error-thrower.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-type-error-thrower.inc.h
deleted file mode 100755 (executable)
index 640f40f..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-helpers.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-helpers.h
deleted file mode 100755 (executable)
index 7ddee8e..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-prototype-template.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-prototype-template.inc.h
deleted file mode 100755 (executable)
index 18615ec..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-prototype.inc.h
deleted file mode 100755 (executable)
index 7ca5b43..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-template.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray-template.inc.h
deleted file mode 100755 (executable)
index f1ba740..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typedarray.inc.h
deleted file mode 100755 (executable)
index 36cf1ea..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typeerror-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typeerror-prototype.inc.h
deleted file mode 100755 (executable)
index d570124..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typeerror.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-typeerror.inc.h
deleted file mode 100755 (executable)
index 587c4e7..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint16array-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint16array-prototype.inc.h
deleted file mode 100755 (executable)
index cacee65..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint16array.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint16array.inc.h
deleted file mode 100755 (executable)
index 90c3dd9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint32array-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint32array-prototype.inc.h
deleted file mode 100755 (executable)
index 4d75dea..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint32array.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint32array.inc.h
deleted file mode 100755 (executable)
index 7eb9e7f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8array-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8array-prototype.inc.h
deleted file mode 100755 (executable)
index 5c89a01..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8array.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8array.inc.h
deleted file mode 100755 (executable)
index 5fbdd6f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8clampedarray-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8clampedarray-prototype.inc.h
deleted file mode 100755 (executable)
index 623091f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8clampedarray.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-uint8clampedarray.inc.h
deleted file mode 100755 (executable)
index 68942b8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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) */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-urierror-prototype.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-urierror-prototype.inc.h
deleted file mode 100755 (executable)
index 9f92131..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-urierror.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtin-urierror.inc.h
deleted file mode 100755 (executable)
index c0d555b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* 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"
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins-internal.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins-internal.h
deleted file mode 100755 (executable)
index c82672b..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins.h
deleted file mode 100755 (executable)
index 15d21c4..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-builtins.inc.h
deleted file mode 100755 (executable)
index ddd1960..0000000
+++ /dev/null
@@ -1,546 +0,0 @@
-/* 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
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-comparison.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-comparison.h
deleted file mode 100755 (executable)
index d8e0084..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-container-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-container-object.h
deleted file mode 100755 (executable)
index 6959d2b..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-conversion.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-conversion.h
deleted file mode 100755 (executable)
index 61e5117..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-dataview-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-dataview-object.h
deleted file mode 100755 (executable)
index 3bc658a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-eval.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-eval.h
deleted file mode 100755 (executable)
index 057c4d2..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-exceptions.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-exceptions.h
deleted file mode 100755 (executable)
index 0dc0122..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-function-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-function-object.h
deleted file mode 100755 (executable)
index b5be335..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-gc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-gc.h
deleted file mode 100755 (executable)
index 6a4166a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-helpers.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-helpers.h
deleted file mode 100755 (executable)
index a4fbde4..0000000
+++ /dev/null
@@ -1,447 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-init-finalize.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-init-finalize.h
deleted file mode 100755 (executable)
index 0e4fda2..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-iterator-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-iterator-object.h
deleted file mode 100755 (executable)
index d4b81e6..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-jobqueue.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-jobqueue.h
deleted file mode 100755 (executable)
index 2607768..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-lcache.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-lcache.h
deleted file mode 100755 (executable)
index e4add39..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-lex-env.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-lex-env.h
deleted file mode 100755 (executable)
index 7ff5c98..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-literal-storage.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-literal-storage.h
deleted file mode 100755 (executable)
index debbcc5..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-module.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-module.h
deleted file mode 100755 (executable)
index 290b4d5..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-number-arithmetic.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-number-arithmetic.h
deleted file mode 100755 (executable)
index 2d9d00a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-number-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-number-object.h
deleted file mode 100755 (executable)
index c4baf75..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects-arguments.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects-arguments.h
deleted file mode 100755 (executable)
index 8f7a0dc..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects-general.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects-general.h
deleted file mode 100755 (executable)
index 74c1f3a..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-objects.h
deleted file mode 100755 (executable)
index c416ed2..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-promise-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-promise-object.h
deleted file mode 100755 (executable)
index 2e71b62..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-property-hashmap.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-property-hashmap.h
deleted file mode 100755 (executable)
index 13b4174..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-reference.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-reference.h
deleted file mode 100755 (executable)
index 37409ed..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-regexp-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-regexp-object.h
deleted file mode 100755 (executable)
index 1b1c6e5..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-string-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-string-object.h
deleted file mode 100755 (executable)
index b1c4b7a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-symbol-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-symbol-object.h
deleted file mode 100755 (executable)
index b5721da..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-try-catch-macro.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-try-catch-macro.h
deleted file mode 100755 (executable)
index 8d01ac0..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-typedarray-object.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/ecma-typedarray-object.h
deleted file mode 100755 (executable)
index 3171891..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jcontext.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jcontext.h
deleted file mode 100755 (executable)
index 0f779fa..0000000
+++ /dev/null
@@ -1,298 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-debugger-transport.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jerryscript-debugger-transport.h
deleted file mode 100755 (executable)
index f6f9aca..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jmem-allocator-internal.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jmem-allocator-internal.h
deleted file mode 100755 (executable)
index 3abb1b2..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt-bit-fields.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt-bit-fields.h
deleted file mode 100755 (executable)
index c5aaf37..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt-libc-includes.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/jrt-libc-includes.h
deleted file mode 100755 (executable)
index bf87a86..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-lexer.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-lexer.h
deleted file mode 100755 (executable)
index 79f7622..0000000
+++ /dev/null
@@ -1,334 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser-internal.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser-internal.h
deleted file mode 100755 (executable)
index d756f6d..0000000
+++ /dev/null
@@ -1,679 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser-limits.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser-limits.h
deleted file mode 100755 (executable)
index 89ed267..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-parser.h
deleted file mode 100755 (executable)
index 599abed..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-scanner-internal.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-scanner-internal.h
deleted file mode 100755 (executable)
index ab1942c..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-scanner.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/js-scanner.h
deleted file mode 100755 (executable)
index b44d0eb..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-char-helpers.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-char-helpers.h
deleted file mode 100755 (executable)
index 08c0439..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-strings.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-strings.h
deleted file mode 100755 (executable)
index 208108b..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-unicode-conversions.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-unicode-conversions.inc.h
deleted file mode 100755 (executable)
index 1398597..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-/* 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
-};
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-unicode-ranges.inc.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/lit-unicode-ranges.inc.h
deleted file mode 100755 (executable)
index 1749fea..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-/* 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
-};
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/opcodes.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/opcodes.h
deleted file mode 100755 (executable)
index faafba7..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-bytecode.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-bytecode.h
deleted file mode 100755 (executable)
index 715170b..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-compiler.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-compiler.h
deleted file mode 100755 (executable)
index 8dd2a72..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-parser.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/re-parser.h
deleted file mode 100755 (executable)
index 7e3c2e2..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm-defines.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm-defines.h
deleted file mode 100755 (executable)
index d757876..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm-stack.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm-stack.h
deleted file mode 100755 (executable)
index 331c264..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrycore/vm.h
deleted file mode 100755 (executable)
index b2a2f25..0000000
+++ /dev/null
@@ -1,387 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/arg-internal.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/arg-internal.h
deleted file mode 100755 (executable)
index 3f9c4fe..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/debugger-sha1.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/debugger-sha1.h
deleted file mode 100755 (executable)
index 16fe563..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/handle-scope-internal.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/handle-scope-internal.h
deleted file mode 100755 (executable)
index 34d80a3..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/arg.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/arg.h
deleted file mode 100755 (executable)
index 8171bcf..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/arg.impl.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/arg.impl.h
deleted file mode 100755 (executable)
index 1b3111e..0000000
+++ /dev/null
@@ -1,443 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/autorelease.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/autorelease.h
deleted file mode 100755 (executable)
index f7cf7de..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/autorelease.impl.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/autorelease.impl.h
deleted file mode 100755 (executable)
index 558b170..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/handle-scope.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/handle-scope.h
deleted file mode 100755 (executable)
index bd871fb..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/module.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jerryscript-ext/module.h
deleted file mode 100755 (executable)
index 1c1025d..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jext-common.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryext/jext-common.h
deleted file mode 100755 (executable)
index 9c59e0b..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrylibm/jerry-libm-internal.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrylibm/jerry-libm-internal.h
deleted file mode 100755 (executable)
index fb29c7f..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrylibm/math.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerrylibm/math.h
deleted file mode 100755 (executable)
index 496c242..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryport/jerryscript-port-default.h b/code/sdk/open_source/openharmony/third_party/jerryscript/include/jerryport/jerryscript-port-default.h
deleted file mode 100755 (executable)
index ba72081..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* 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 */
diff --git a/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/CMakeLists.txt b/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/CMakeLists.txt
new file mode 100644 (file)
index 0000000..10a7fa2
--- /dev/null
@@ -0,0 +1,64 @@
+#===============================================================================
+# @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/base
+    ${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()
diff --git a/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/common/include/nativeapi_common.h b/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/common/include/nativeapi_common.h
new file mode 100644 (file)
index 0000000..c72848f
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * 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
diff --git a/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/common/include/nativeapi_config.h b/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/common/include/nativeapi_config.h
new file mode 100644 (file)
index 0000000..a0a8394
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * 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
diff --git a/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/common/src/nativeapi_common.cpp b/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/common/src/nativeapi_common.cpp
new file mode 100644 (file)
index 0000000..181beb2
--- /dev/null
@@ -0,0 +1,85 @@
+/*\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
diff --git a/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/include/nativeapi_fs.h b/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/include/nativeapi_fs.h
new file mode 100644 (file)
index 0000000..2a3c2b5
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * 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 */
diff --git a/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/include/nativeapi_fs_impl.h b/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/include/nativeapi_fs_impl.h
new file mode 100644 (file)
index 0000000..6b1fdd5
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * 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
diff --git a/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs.cpp b/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs.cpp
new file mode 100644 (file)
index 0000000..4398320
--- /dev/null
@@ -0,0 +1,595 @@
+/*\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
diff --git a/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs_impl.cpp b/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/filekit/src/nativeapi_fs_impl.cpp
new file mode 100644 (file)
index 0000000..ae7052f
--- /dev/null
@@ -0,0 +1,484 @@
+/*
+ * 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
diff --git a/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/kvstorekit/include/nativeapi_kv.h b/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/kvstorekit/include/nativeapi_kv.h
new file mode 100644 (file)
index 0000000..78ec306
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * 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
@@ -1,5 +1,5 @@
-/* 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
@@ -7,38 +7,34 @@
  *     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
diff --git a/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/kvstorekit/src/nativeapi_kv.cpp b/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/kvstorekit/src/nativeapi_kv.cpp
new file mode 100644 (file)
index 0000000..b7c4676
--- /dev/null
@@ -0,0 +1,294 @@
+/*\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
diff --git a/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/kvstorekit/src/nativeapi_kv_impl.cpp b/code/sdk/open_source/openharmony/utils/native/lite/js/builtin/kvstorekit/src/nativeapi_kv_impl.cpp
new file mode 100644 (file)
index 0000000..331c01f
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * 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
index d430193..027a02e 100755 (executable)
@@ -49,6 +49,7 @@ enum {
     LOCAL_MGR_MSG_ID_READ_REMOTE_RSSI_BLE,
     LOCAL_MGR_MSG_ID_PAIRED_KEYS,           /* 上报BLE配对完成密钥 */
     LOCAL_MGR_MSG_ID_REPORT_TERMINATE_ADV,  /* 上报广播终止结果 */
+    LOCAL_MGR_MSG_ID_CONN_PARAM_UPDATE,     /* 连接参数更新 */
 };
 
 /* 发送本地设备管理模块消息 */
@@ -61,6 +62,7 @@ bool btsrv_is_bluetooth_enable(void);
 bool btsrv_is_bluetooth_disable(void);
 
 bool btsrv_set_local_addr(const bd_addr_t *bd_addr);
+bool is_bts_auto_reconnect_enable(void);
 
 /* 本地设备运行模式设置和查询 */
 uint32_t btsrv_set_local_device_mode(btsrv_local_device_mode mode);
diff --git a/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/include/sample_ble_ams.h b/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/include/sample_ble_ams.h
new file mode 100644 (file)
index 0000000..43ac2d7
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024. All rights reserved.
+ *
+ * Description:  AMS Client Test module.
+ */
+/**
+ * @defgroup bluetooth_sample_ble_ams AMS TEST API
+ * @ingroup  bluetooth
+ * @{
+ */
+
+#ifndef SAMPLE_BLE_AMS_H
+#define SAMPLE_BLE_AMS_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void ble_ams_client_at_cmd(uint8_t cmd_id, char **params, uint8_t params_cnt);
+
+/**
+ * @}
+ */
+#ifdef __cplusplus
+}
+#endif
+#endif
\ No newline at end of file
diff --git a/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/include/sample_ble_ancs.h b/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/include/sample_ble_ancs.h
new file mode 100644 (file)
index 0000000..f05e2f9
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024. All rights reserved.
+ *
+ * Description:  ANCS Client Test module.
+ */
+/**
+ * @defgroup bluetooth_sample_ble_ancs ANCS TEST API
+ * @ingroup  bluetooth
+ * @{
+ */
+
+#ifndef SAMPLE_BLE_ANCS_H
+#define SAMPLE_BLE_ANCS_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void ble_ancs_client_at_cmd(uint8_t cmd_id, char **params, uint8_t params_cnt);
+
+/**
+ * @}
+ */
+#ifdef __cplusplus
+}
+#endif
+#endif
\ No newline at end of file
index 0008d89..8bdb7ab 100755 (executable)
@@ -4,5 +4,7 @@ set(
     ${CMAKE_CURRENT_SOURCE_DIR}/sample_ble_bas.c
     ${CMAKE_CURRENT_SOURCE_DIR}/sample_ble_hid.c
     ${CMAKE_CURRENT_SOURCE_DIR}/sample_ble_fmp.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/sample_ble_ancs.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/sample_ble_ams.c
 )
 set(BTH_SAMPLE_LIST "${BTH_SAMPLE_LIST}" "${bt_comm_src_list}" CACHE INTERNAL "bt ram obj list" FORCE)
diff --git a/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/src/sample_ble_ams.c b/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/src/sample_ble_ams.c
new file mode 100644 (file)
index 0000000..c150a67
--- /dev/null
@@ -0,0 +1,320 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024. All rights reserved.
+ * Description: This module include test function of AMS Client module.
+ */
+#include <stdint.h>
+#include <stdlib.h>
+#include <td_base.h>
+#include "datatype.h"
+#include "sdk_general.h"
+#include "mpc_dispatch.h"
+#include "bt_at_cmd_api.h"
+#include "sample_common.h"
+#include "ble_ams_client.h"
+#include "sample_ble_ams.h"
+
+#define HEX_BYTE_CHAR_COUNT 2
+
+/* AMS客户端接口命令id */
+typedef enum {
+    BLE_SAMPLE_AMS_CLIENT_REGISTER_CBK = 1,                 /* 1 注册AMS客户端回调函数 */
+    BLE_SAMPLE_AMS_CLIENT_SETUP,                            /* 2  AMS客户端连接服务端 */
+    BLE_SAMPLE_AMS_CLIENT_SUBSCRIBE_REMOTE_COMMNAD,         /* 3  订阅远端命令 */
+    BLE_SAMPLE_AMS_CLIENT_SUBSCRIBE_ENTITY_UPDATE,          /* 4  订阅实体更新 */
+    BLE_SAMPLE_AMS_CLIENT_SEND_REMOTE_CMD,                  /* 5  发送远端命令 */
+    BLE_SAMPLE_AMS_CLIENT_REGISTER_INTERESTED_ENTITY_ATT,   /* 6  注册感兴趣的实体属性 */
+    BLE_SAMPLE_AMS_CLIENT_RETRIEVE_FULL_ENTITY_ATT,         /* 7  请求加载完整实体属性 */
+    BLE_SAMPLE_AMS_CLIENT_READ_FULL_ENTITY_ATT              /* 8  读取完整实体属性 */
+} ble_ams_client_at_cmd_id_t;
+
+/* 命令处理函数接口 */
+typedef uint8_t (*ble_ams_client_at_func_t)(uint8_t argc, char **argv);
+
+/* AMS客户端AT命令id与接口对应关系 */
+typedef struct {
+    ble_ams_client_at_cmd_id_t id;
+    ble_ams_client_at_func_t func;
+} ble_ams_client_at_hdl_info_t;
+
+/* 当前活跃媒体设备支持的远端命令 */
+ble_ams_remote_cmd_rpt_t *g_remote_cmd_supported = NULL;
+
+/* AMS服务建立结果回调 */
+static void ble_ams_client_setup_result_cbk(uint8_t client_id, uint16_t conn_id, errcode_t status)
+{
+    bts_info("[AMSClientSetupCBK]conn_id:%d status:0x%x\r\n", conn_id, status);
+}
+
+/* AMS服务订阅结果回调 */
+static void ble_ams_client_subscribe_result_cbk(uint8_t client_id, uint16_t conn_id,
+    ams_client_subscribe_type_t type, gatt_status_t status)
+{
+    bts_info("[AMSClientSubscribeResultCBK]conn_id:%d type:%d status:0x%x\r\n", conn_id, type, status);
+}
+
+/* AMS服务远端支持的命令上报 */
+static void ble_ams_client_remote_cmd_cbk(uint8_t client_id, uint16_t conn_id,
+    ble_ams_remote_cmd_rpt_t *remote_cmd, errcode_t status)
+{
+    if (status == ERRCODE_BT_SUCCESS) {
+        bts_sample_log_no_header("[AMSClientRemoteCMDCBK]conn_id:%d status:0x%x cmd_num=%d ",
+            conn_id, status, remote_cmd->cmd_num);
+        if (g_remote_cmd_supported != NULL) {
+            bt_os_free(g_remote_cmd_supported);
+        }
+        uint16_t length = sizeof(ble_ams_remote_cmd_rpt_t) + remote_cmd->cmd_num;
+        g_remote_cmd_supported = bt_os_new(length);
+        g_remote_cmd_supported->cmd_num = remote_cmd->cmd_num;
+        if (memcpy_s(g_remote_cmd_supported->remote_cmd, remote_cmd->cmd_num,
+            remote_cmd->remote_cmd, remote_cmd->cmd_num) != EOK) {
+            bts_error("[AMSClientSample] memcpy error!\r\n");
+            bt_os_free(g_remote_cmd_supported);
+            return;
+        }
+        bts_sample_log_no_header("supported_cmd=");
+        for (int i = 0; i < remote_cmd->cmd_num; i++) {
+            bts_sample_log_no_header("0x%02x", remote_cmd->remote_cmd[i]);
+        }
+        bts_sample_log_no_header("\r\n");
+    } else {
+        bts_info("[AMSClientRemoteCMDCBK]conn_id:%d status:0x%x\r\n", conn_id, status);
+    }
+}
+
+/* AMS服务实体更新上报 */
+static void ble_ams_client_entity_update_cbk(uint8_t client_id, uint16_t conn_id,
+    ble_ams_entity_update_rpt_t *entity_update, errcode_t status)
+{
+    if (status == ERRCODE_BT_SUCCESS) {
+        bts_info(
+            "[AMSClientEntityUpdateCBK]conn_id:%d status:0x%x entityId=%d att_id=%d update_flags=0x%x value=%s\r\n",
+            conn_id, status,
+            entity_update->entity_id,
+            entity_update->att_id,
+            entity_update->entity_update_flags,
+            entity_update->value);
+    } else {
+        bts_info("[AMSClientEntityUpdateCBK]conn_id:%d status:0x%x\r\n", conn_id, status);
+    }
+}
+
+/* AMS客户端写请求响应结果上报 */
+static void ble_ams_client_write_character_rsp_cbk(uint8_t client_id, uint16_t conn_id,
+    ams_client_write_character_type_t type,
+    gatt_status_t status)
+{
+    bts_info("[AMSClientWriteRSPCBK]conn_id:%d type:%d status:0x%x\r\n", conn_id, type, status);
+}
+
+/* AMS客户端读请求响应结果上报 */
+static void ble_ams_client_read_full_attr_result_cbk(uint8_t client_id, uint16_t conn_id,
+    ble_ams_full_attr_value_t *read_result,
+    gatt_status_t status)
+{
+    if (status == ERRCODE_BT_SUCCESS) {
+        bts_info("[AMSClientReadFullAttrCBK]conn_id:%d status:0x%x value_len=%d value=%s\r\n",
+            conn_id, status,
+            read_result->value_len,
+            read_result->value);
+    } else {
+        bts_info("[AMSClientReadFullAttrCBK]conn_id:%d status:0x%x\r\n", conn_id, status);
+    }
+}
+
+/* 注册AMS服务回调 */
+static uint8_t ble_ams_client_at_cmd_register_cbk(uint8_t argc, char **argv)
+{
+    ble_ams_client_callbacks_t cbk = {0};
+    cbk.setup_cb = ble_ams_client_setup_result_cbk;
+    cbk.subscribe_cb = ble_ams_client_subscribe_result_cbk;
+    cbk.remote_cmd_cb = ble_ams_client_remote_cmd_cbk;
+    cbk.entity_update_cb = ble_ams_client_entity_update_cbk;
+    cbk.write_rsp_cb = ble_ams_client_write_character_rsp_cbk;
+    cbk.read_full_attr_result_cb = ble_ams_client_read_full_attr_result_cbk;
+    errcode_t ret = ble_ams_client_register_callbacks(&cbk);
+    bts_info("ble ams client register cbk ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* AMS客户端发起服务建立 */
+static uint8_t ble_ams_client_at_cmd_setup(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN2) {
+        bts_error("ble ams client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    errcode_t ret = ble_ams_client_setup_service(client_id, conn_id);
+    bts_info("ble ams client setup ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* AMS客户端订阅远端命令特征通知 */
+static uint8_t ble_ams_client_at_cmd_remote_cmd(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN3) {
+        bts_error("ble ams client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    uint8_t sub_flag = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    sub_flag = (uint8_t)atoi(argv[BT_INDEX_2]);
+    if (sub_flag > AMS_CLIENT_NOTIFY_ENABLE) {
+        bts_error("ble ams client argc invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    errcode_t ret = ble_ams_client_subscribe_remote_cmd(client_id, conn_id, sub_flag);
+    bts_info("ble ams client sub remote cmd ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* AMS客户端订阅实体更新特征通知 */
+static uint8_t ble_ams_client_at_cmd_entity_update(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN3) {
+        bts_error("ble ams client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    uint8_t sub_flag = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    sub_flag = (uint8_t)atoi(argv[BT_INDEX_2]);
+    if (sub_flag > AMS_CLIENT_NOTIFY_ENABLE) {
+        bts_error("ble ams client argc invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    errcode_t ret = ble_ams_client_subscribe_entity_update(client_id, conn_id, sub_flag);
+    bts_info("ble ams client sub entity update ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* AMS客户端发送远端命令 */
+static uint8_t ble_ams_client_at_cmd_send_remote_cmd(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN3) {
+        bts_error("ble ams client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    uint8_t remote_cmd = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    remote_cmd = (uint8_t)atoi(argv[BT_INDEX_2]);
+    if (remote_cmd > AMS_RMT_CMD_ID_BOOKMARK_TRACK) {
+        bts_error("ble ams client argc invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    errcode_t ret = ble_ams_client_send_remote_cmd(client_id, conn_id, remote_cmd);
+    bts_info("ble ams client send remote cmd ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* AMS客户端注册感兴趣的实体属性 */
+static uint8_t ble_ams_client_at_cmd_register_interested_entity_att(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN5) {
+        bts_error("ble ams client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    uint16_t att_num = 0;
+    uint8_t entity_id = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    entity_id = (uint8_t)atoi(argv[BT_INDEX_2]);
+    att_num = (uint16_t)atoi(argv[BT_INDEX_3]);
+    uint32_t len = strlen(argv[BT_INDEX_4]);
+    if (len != (att_num * HEX_BYTE_CHAR_COUNT)) {
+        bts_error("ble ams client argc att_num invalid :%u\r\n", att_num);
+        return MPC_BT_FAIL;
+    }
+
+    ble_ams_interested_entity_attr_req_t *attr_req = bt_os_new(sizeof(ble_ams_interested_entity_attr_req_t) + att_num);
+    attr_req->entity_id = entity_id;
+    attr_req->att_num = att_num;
+    if (decode_hex_from_str(argv[BT_INDEX_4], attr_req->att_id) != EXT_ERR_SUCCESS) {
+        bt_os_free(attr_req);
+        bts_error("ble ams client decode attr fail!\r\n");
+        return MPC_BT_FAIL;
+    }
+    errcode_t ret = ble_ams_client_register_interested_entity_attribute(client_id, conn_id, attr_req);
+    bts_info("ble ams client register interested attr ret:0x%x\r\n", ret);
+    bt_os_free(attr_req);
+    return MPC_BT_SUCC;
+}
+
+/* AMS客户端请求加载完整的实体属性 */
+static uint8_t ble_ams_client_at_cmd_retrieve_full_attr(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN4) {
+        bts_error("ble ams client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    uint8_t entity_id = 0;
+    uint8_t attr_id = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    entity_id = (uint8_t)atoi(argv[BT_INDEX_2]);
+    attr_id = (uint8_t)atoi(argv[BT_INDEX_3]);
+
+    ble_ams_full_entity_attr_cmd_t *full_attr = bt_os_new(sizeof(ble_ams_full_entity_attr_cmd_t));
+    full_attr->entity_id = entity_id;
+    full_attr->att_id = attr_id;
+    errcode_t ret = ble_ams_client_retrieve_full_entity_attribute(client_id, conn_id, full_attr);
+    bts_info("ble ams client retrieve full attr ret:0x%x\r\n", ret);
+    bt_os_free(full_attr);
+    return MPC_BT_SUCC;
+}
+
+/* AMS客户端读取完整的实体属性 */
+static uint8_t ble_ams_client_at_cmd_read_full_attr(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN2) {
+        bts_error("ble ams client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+
+    errcode_t ret = ble_ams_client_read_full_entity_attribute(client_id, conn_id);
+    bts_info("ble ams client read full attr ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* AMS客户端AT命令与接口对应关系 */
+static ble_ams_client_at_hdl_info_t g_ble_ams_client_at_hdl[] = {
+    { BLE_SAMPLE_AMS_CLIENT_REGISTER_CBK, ble_ams_client_at_cmd_register_cbk },
+    { BLE_SAMPLE_AMS_CLIENT_SETUP, ble_ams_client_at_cmd_setup },
+    { BLE_SAMPLE_AMS_CLIENT_SUBSCRIBE_REMOTE_COMMNAD, ble_ams_client_at_cmd_remote_cmd },
+    { BLE_SAMPLE_AMS_CLIENT_SUBSCRIBE_ENTITY_UPDATE, ble_ams_client_at_cmd_entity_update },
+    { BLE_SAMPLE_AMS_CLIENT_SEND_REMOTE_CMD, ble_ams_client_at_cmd_send_remote_cmd },
+    { BLE_SAMPLE_AMS_CLIENT_REGISTER_INTERESTED_ENTITY_ATT, ble_ams_client_at_cmd_register_interested_entity_att },
+    { BLE_SAMPLE_AMS_CLIENT_RETRIEVE_FULL_ENTITY_ATT, ble_ams_client_at_cmd_retrieve_full_attr },
+    { BLE_SAMPLE_AMS_CLIENT_READ_FULL_ENTITY_ATT, ble_ams_client_at_cmd_read_full_attr },
+};
+
+/* AMS客户端AT命令处理入口函数 */
+void ble_ams_client_at_cmd(uint8_t cmd_id, char **params, uint8_t params_cnt)
+{
+    size_t hdl_cnt = sizeof(g_ble_ams_client_at_hdl) / sizeof(ble_ams_client_at_hdl_info_t);
+    for (uint8_t i = 0; i < hdl_cnt; i++) {
+        if (g_ble_ams_client_at_hdl[i].id == cmd_id && g_ble_ams_client_at_hdl[i].func != NULL) {
+            (void)g_ble_ams_client_at_hdl[i].func(params_cnt, params);
+            return;
+        }
+    }
+}
\ No newline at end of file
diff --git a/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/src/sample_ble_ancs.c b/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/ble_at_sample/src/sample_ble_ancs.c
new file mode 100644 (file)
index 0000000..560afcd
--- /dev/null
@@ -0,0 +1,401 @@
+/*
+ * Copyright (c) CompanyNameMagicTag 2024. All rights reserved.
+ * Description: This module include test function of ANCS Client module.
+ */
+#include <stdint.h>
+#include <stdlib.h>
+#include <td_base.h>
+#include "datatype.h"
+#include "sdk_general.h"
+#include "mpc_dispatch.h"
+#include "bt_at_cmd_api.h"
+#include "ble_ancs_client.h"
+#include "sample_ble_ancs.h"
+
+#define TEN 10
+#define ANCS_ATT_BYTE_LENGTH 6
+#define ANCS_DEC_CHAR_COUNT 2
+#define BYTE_BIT_COUNT 8
+
+/* ANCS客户端接口命令id */
+typedef enum {
+    BLE_SAMPLE_ANCS_CLIENT_REGISTER_CBK = 1, /* 1 注册ANCS客户端回调函数 */
+    BLE_SAMPLE_ANCS_CLIENT_SETUP,            /* 2  ANCS客户端连接服务端 */
+    BLE_SAMPLE_ANCS_CLIENT_SUBSCRIBE_NOTITY, /* 3  订阅通知 */
+    BLE_SAMPLE_ANCS_CLIENT_SUBSCRIBE_DATA,   /* 4  订阅数据 */
+    BLE_SAMPLE_ANCS_CLIENT_PERFORM_ACTION,   /* 5  执行操作 */
+    BLE_SAMPLE_ANCS_CLIENT_NOTIFY_ATT_GET,   /* 6  执行操作 */
+    BLE_SAMPLE_ANCS_CLIENT_APP_ATT_GET       /* 7  执行操作 */
+} ble_ancs_client_at_cmd_id_t;
+
+/* 命令处理函数接口 */
+typedef uint8_t (*ble_ancs_client_at_func_t)(uint8_t argc, char **argv);
+
+/* ANCS客户端AT命令id与接口对应关系 */
+typedef struct {
+    ble_ancs_client_at_cmd_id_t id;
+    ble_ancs_client_at_func_t func;
+} ble_ancs_client_at_hdl_info_t;
+
+/* ANCS服务建立结果回调 */
+static void ble_ancs_client_setup_result_cbk(uint8_t client_id, uint16_t conn_id, errcode_t status)
+{
+    bts_info("[ANCSClientSetupCBK]conn_id:%d status:0x%x\r\n", conn_id, status);
+}
+
+/* ANCS服务订阅结果回调 */
+static void ble_ancs_client_subscribe_result_cbk(uint8_t client_id, uint16_t conn_id,
+    ancs_client_subscribe_type_t type, gatt_status_t status)
+{
+    bts_info("[ANCSClientSubscribeResultCBK]conn_id:%d type:%d status:0x%x\r\n", conn_id, type, status);
+}
+
+/* ANCS服务命令执行结果回调 */
+static void ble_ancs_client_write_result_cbk(uint8_t client_id, uint16_t conn_id, gatt_status_t status)
+{
+    bts_info("[ANCSClientCMDResultCBK]conn_id:%d status:0x%x\r\n", conn_id, status);
+}
+
+/* ANCS服务消息通知回调 */
+static void ble_ancs_client_notify_source_cbk(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_notification_src_t *notify_src, errcode_t status)
+{
+    if (status == ERRCODE_BT_SUCCESS) {
+        bts_info(
+            "[ANCSClientNotifySRCCBK]conn_id:%d status:0x%x notify_id:%lu "
+            "eventId:%d eventFlags:0x%x category_id:%d\r\n",
+            conn_id, status,
+            notify_src->notification_uid,
+            notify_src->event_id,
+            notify_src->event_flags,
+            notify_src->category_id);
+    } else {
+        bts_error("[ANCSClientNotifySRCCBK]conn_id:%d status:0x%x.\r\n",
+            conn_id, status);
+    }
+}
+
+/* ANCS服务通知属性响应结果回调 */
+static void ble_ancs_client_notification_attr_rsp_cbk(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_notification_attr_rsp_t *notify_attr_rsp, errcode_t status)
+{
+    if (status == ERRCODE_BT_SUCCESS) {
+        bts_info("[ANCSClientNotifyATTRSPCBK]conn_id:%d status:0x%x notify_uid:%lu\r\n",
+            conn_id, status, notify_attr_rsp->notification_uid);
+
+        ble_ancs_attr_rsp_t *node = (ble_ancs_attr_rsp_t *)notify_attr_rsp->attr_rsp_lst.head;
+        uint16_t att_num = 1;
+        while (node != NULL) {
+            if (node != NULL) {
+                bts_info_no_header("[ANCSClientNotifyATTRSPCBK]att id:%d length:%lu att_value:%s\r\n",
+                    node->att_id, node->att_length, node->att);
+            }
+            node = lnext(node);
+            if (att_num == notify_attr_rsp->att_num) {
+                break;
+            }
+            att_num = att_num + 1;
+        }
+    } else {
+        bts_error("[ANCSClientNotifyATTRSPCBK]conn_id:%d status:0x%x.\r\n",
+            conn_id, status);
+    }
+}
+
+/* ANCS服务应用属性响应结果回调 */
+static void ble_ancs_client_app_attr_rsp_cbk(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_app_attr_rsp_t *app_attr_rsp, errcode_t status)
+{
+    bts_info("[ANCSClientAPPATTRSPCBK]conn_id:%d status:0x%x\r\n", conn_id, status);
+    if (status == ERRCODE_BT_SUCCESS) {
+        ble_ancs_attr_rsp_t *node = (ble_ancs_attr_rsp_t *)app_attr_rsp->attr_rsp_lst.head;
+        uint16_t att_num = 1;
+        while (node != NULL) {
+            if (node != NULL && node->att_id == ANCS_APP_ATT_DISPLAY_NAME) {
+                bts_info_no_header("[ANCSClientAPPATTRSPCBK]app id:%s length:%lu app name:%s\r\n",
+                    app_attr_rsp->app_id.id, node->att_length, node->att);
+            }
+            node = lnext(node);
+            if (att_num == app_attr_rsp->att_num) {
+                break;
+            }
+            att_num = att_num + 1;
+        }
+    } else {
+        bts_error("[ANCSClientAPPATTRSPCBK]conn_id:%d status:0x%x.\r\n",
+            conn_id, status);
+    }
+}
+
+/* 注册ancs服务回调 */
+static uint8_t ble_ancs_client_at_cmd_register_cbk(uint8_t argc, char **argv)
+{
+    ble_ancs_client_callbacks_t cbk = {0};
+    cbk.setup_cb = ble_ancs_client_setup_result_cbk;
+    cbk.subscribe_cb = ble_ancs_client_subscribe_result_cbk;
+    cbk.write_result_cb = ble_ancs_client_write_result_cbk;
+    cbk.notify_source_cb = ble_ancs_client_notify_source_cbk;
+    cbk.notify_attr_cb = ble_ancs_client_notification_attr_rsp_cbk;
+    cbk.app_attr_cb = ble_ancs_client_app_attr_rsp_cbk;
+    errcode_t ret = ble_ancs_client_register_callbacks(&cbk);
+    bts_info("ble ancs client register cbk ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* ANCS服务建立 */
+static uint8_t ble_ancs_client_at_cmd_setup(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN2) {
+        bts_error("ble ancs client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    errcode_t ret = ble_ancs_client_setup_service(client_id, conn_id);
+    bts_info("ble ancs client setup ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* 订阅通知 */
+static uint8_t ble_ancs_client_at_cmd_subscribe_notify(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN3) {
+        bts_error("ble ancs client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    uint8_t sub_flag = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    sub_flag = (uint8_t)atoi(argv[BT_INDEX_2]);
+    if (sub_flag > ANCS_CLIENT_NOTIFY_ENABLE) {
+        bts_error("ble ancs client argc invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    errcode_t ret = ble_ancs_client_subscribe_notification_source(client_id, conn_id, sub_flag);
+    bts_info("ble ancs client sub notify ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* 订阅数据 */
+static uint8_t ble_ancs_client_at_cmd_subscribe_data(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN3) {
+        bts_error("ble ancs client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    uint8_t sub_flag = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    sub_flag = (uint8_t)atoi(argv[BT_INDEX_2]);
+    if (sub_flag > ANCS_CLIENT_NOTIFY_ENABLE) {
+        bts_error("ble ancs client argc invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+
+    errcode_t ret = ble_ancs_client_subscribe_data_source(client_id, conn_id, sub_flag);
+    bts_info("ble ancs client sub data ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* 执行消息行为(积极或消极行为) */
+static uint8_t ble_ancs_client_at_cmd_perform_action(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN4) {
+        bts_error("ble ancs client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    uint32_t notify_uid = 0;
+    uint8_t action_id = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    notify_uid = (uint32_t)atoi(argv[BT_INDEX_2]);
+    action_id = (uint8_t)atoi(argv[BT_INDEX_3]);
+    if (action_id > ANCS_ACTION_RESERVED) {
+        bts_error("ble ancs client argc invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+    ble_ancs_notification_action_req_t action_cmd = {0};
+    action_cmd.notification_uid = notify_uid;
+    action_cmd.action_id = action_id;
+    errcode_t ret = ble_ancs_client_send_perform_notify_action_cmd(client_id, conn_id, &action_cmd);
+    bts_info("ble ancs client perform action ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* 十六进制字符转数值 */
+static uint8_t char_2_num(int8_t c)
+{
+    if (c >= '0' && c <= '9') {
+        return (uint8_t)(c - '0');
+    } else if (c >= 'A' && c <= 'F') {
+        return (uint8_t)(c - 'A' + TEN);
+    } else if (c >= 'a' && c <= 'f') {
+        return (uint8_t)(c - 'a' + TEN);
+    } else {
+        return TD_U8_MAX;
+    }
+}
+
+/* 十六进制字符转数值 */
+static uint8_t str_2_byte(const char *str)
+{
+    return ((char_2_num(str[0]) << TD_U4_BITS) + char_2_num(str[1]));
+}
+
+/* 十六进制字符转属性请求参数结构体 */
+static void decode_att_req_from_str(const char *str,  ble_ancs_attr_req_t *nums)
+{
+    uint32_t len = strlen(str);
+    uint32_t cnt = 0;
+    char *ptr_str = NULL;
+    uint16_t length_big_byte = 0;
+    uint16_t length_little_byte = 0;
+    ptr_str = str;
+    for (uint32_t i = 0; i < len - 1; i += ANCS_ATT_BYTE_LENGTH) { /* 6个字符为1组,2个字符为一个字节 */
+        nums[cnt].att_id = str_2_byte(ptr_str);
+        ptr_str += ANCS_DEC_CHAR_COUNT;
+        length_big_byte = (((uint16_t)str_2_byte(ptr_str)) << BYTE_BIT_COUNT);
+        ptr_str += ANCS_DEC_CHAR_COUNT;
+        length_little_byte = ((uint16_t)str_2_byte(ptr_str));
+        nums[cnt].att_max_length = (uint16_t)(length_big_byte | length_little_byte);
+        ptr_str += ANCS_DEC_CHAR_COUNT;
+        cnt++;
+    }
+}
+
+/* 获取通知属性 */
+static uint8_t ble_ancs_client_at_cmd_get_notify_att(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN5) {
+        bts_error("ble ancs client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    uint32_t notify_uid = 0;
+    uint8_t att_num = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    notify_uid = (uint32_t)atoi(argv[BT_INDEX_2]);
+    att_num = (uint8_t)atoi(argv[BT_INDEX_3]);
+    if (att_num == 0) {
+        bts_error("ble ancs client notify att req att num is zero!\r\n");
+        return MPC_BT_FAIL;
+    }
+    uint32_t len = strlen(argv[BT_INDEX_4]);
+    if ((att_num * ANCS_ATT_BYTE_LENGTH) != len) {
+        bts_error("ble ancs client notify att req att num is wrong!\r\n");
+        return MPC_BT_FAIL;
+    }
+
+    /* 获取来电通知属性 */
+    ble_ancs_notification_attr_req_t *notify_attr_req = bt_os_new(
+        sizeof(ble_ancs_notification_attr_req_t) + (att_num * sizeof(ble_ancs_attr_req_t)));
+    notify_attr_req->att_num = att_num;
+    notify_attr_req->notification_uid = notify_uid;
+    decode_att_req_from_str(argv[BT_INDEX_4], notify_attr_req->attr);
+    errcode_t ret = ble_ancs_client_send_get_notify_att_cmd(client_id, conn_id, notify_attr_req);
+    bt_os_free(notify_attr_req);
+    bts_info("ble ancs client notify att get ret:0x%x\r\n", ret);
+    return MPC_BT_SUCC;
+}
+
+/* 解析应用属性参数 */
+static uint8_t parse_app_att_req_param(ble_ancs_app_attr_req_t *app_attr_req,
+    uint16_t app_id_len, uint16_t att_num, char **argv)
+{
+    app_attr_req->att_num = att_num;
+    app_attr_req->app_id.len = app_id_len + 1;
+    uint8_t *id = bt_os_new(app_attr_req->app_id.len);
+    if (id == NULL) {
+        bts_error("[ANCSClientSample]app id memnew error!\r\n");
+        app_attr_req->app_id.id = NULL;
+        return MPC_BT_FAIL;
+    }
+    if (memcpy_s(id, app_attr_req->app_id.len, (uint8_t *)argv[BT_INDEX_2], app_id_len) != EOK) {
+        bts_error("[ANCSClientSample]app id memcpy error!\r\n");
+        bt_os_free(id);
+        app_attr_req->app_id.id = NULL;
+        return MPC_BT_FAIL;
+    }
+    *(id + app_id_len) = 0; /* This string is NULL-terminated */
+    app_attr_req->app_id.id = id;
+
+    /* 解析应用属性参数 */
+    decode_att_req_from_str(argv[BT_INDEX_4], app_attr_req->attr_id);
+    return MPC_BT_SUCC;
+}
+
+/* 获取应用属性 */
+static uint8_t ble_ancs_client_at_cmd_get_app_att(uint8_t argc, char **argv)
+{
+    if (argc != BT_AT_PARAM_LEN5) {
+        bts_error("ble ancs client argc num invalid :%u\r\n", argc);
+        return MPC_BT_FAIL;
+    }
+
+    uint8_t client_id = 0;
+    uint16_t conn_id = 0;
+    uint8_t att_num = 0;
+    uint16_t app_id_len = 0;
+    client_id = (uint8_t)atoi(argv[BT_INDEX_0]);
+    conn_id = (uint16_t)atoi(argv[BT_INDEX_1]);
+    app_id_len = strlen(argv[BT_INDEX_2]);
+    att_num = (uint8_t)atoi(argv[BT_INDEX_3]);
+    if (att_num == 0) {
+        bts_error("ble ancs client notify att req att num is zero!\r\n");
+        return MPC_BT_FAIL;
+    }
+    uint32_t len = strlen(argv[BT_INDEX_4]);
+    if ((att_num * ANCS_ATT_BYTE_LENGTH) != len) {
+        bts_error("ble ancs client notify att req att num is wrong!\r\n");
+        return MPC_BT_FAIL;
+    }
+
+    /* 获取应用属性 */
+    ble_ancs_app_attr_req_t *app_attr_req = bt_os_new(sizeof(ble_ancs_app_attr_req_t) + (att_num * sizeof(uint8_t)));
+    uint8_t result = parse_app_att_req_param(app_attr_req, app_id_len, att_num, argv);
+    if (result != MPC_BT_SUCC) {
+        if (app_attr_req->app_id.id != NULL) {
+            bt_os_free(app_attr_req->app_id.id);
+        }
+        bt_os_free(app_attr_req);
+        return result;
+    }
+    errcode_t ret = ble_ancs_client_send_get_app_att_cmd(client_id, conn_id, app_attr_req);
+    bts_info("ble ancs client app att get ret:0x%x\r\n", ret);
+    bt_os_free(app_attr_req->app_id.id);
+    bt_os_free(app_attr_req);
+    return MPC_BT_SUCC;
+}
+
+/* ANCS客户端AT命令与接口对应关系 */
+static ble_ancs_client_at_hdl_info_t g_ble_ancs_client_at_hdl[] = {
+    { BLE_SAMPLE_ANCS_CLIENT_REGISTER_CBK, ble_ancs_client_at_cmd_register_cbk },
+    { BLE_SAMPLE_ANCS_CLIENT_SETUP, ble_ancs_client_at_cmd_setup },
+    { BLE_SAMPLE_ANCS_CLIENT_SUBSCRIBE_NOTITY, ble_ancs_client_at_cmd_subscribe_notify },
+    { BLE_SAMPLE_ANCS_CLIENT_SUBSCRIBE_DATA, ble_ancs_client_at_cmd_subscribe_data },
+    { BLE_SAMPLE_ANCS_CLIENT_NOTIFY_ATT_GET, ble_ancs_client_at_cmd_get_notify_att },
+    { BLE_SAMPLE_ANCS_CLIENT_APP_ATT_GET, ble_ancs_client_at_cmd_get_app_att },
+    { BLE_SAMPLE_ANCS_CLIENT_PERFORM_ACTION, ble_ancs_client_at_cmd_perform_action },
+};
+
+void ble_ancs_client_at_cmd(uint8_t cmd_id, char **params, uint8_t params_cnt)
+{
+    size_t hdl_cnt = sizeof(g_ble_ancs_client_at_hdl) / sizeof(ble_ancs_client_at_hdl_info_t);
+    for (uint8_t i = 0; i < hdl_cnt; i++) {
+        if (g_ble_ancs_client_at_hdl[i].id == cmd_id && g_ble_ancs_client_at_hdl[i].func != NULL) {
+            (void)g_ble_ancs_client_at_hdl[i].func(params_cnt, params);
+            return;
+        }
+    }
+}
diff --git a/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/include/ble_ams_client.h b/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/include/ble_ams_client.h
new file mode 100644 (file)
index 0000000..39169e5
--- /dev/null
@@ -0,0 +1,977 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2024. All rights reserved.
+ * Description: BLE Apple Media Service Client module.
+ */
+
+/**
+ * @defgroup bluetooth_bts_ams_client AMS CLIENT API
+ * @ingroup  bluetooth
+ * @{
+ */
+#ifndef BLE_AMS_CLIENT_H
+#define BLE_AMS_CLIENT_H
+#include "errcode.h"
+#include "bth_stack.h"
+#include "bth_stack_gatt.h"
+#include "bts_gatt_client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * @if Eng
+ * @brief  Default value of Client Characteristic Configuration.
+ * @else
+ * @brief  客户端特征配置描述符的默认值。
+ * @endif
+ */
+#define BLE_AMS_CLIENT_CHARACTERISTIC_CONFIGURATION_DEFAULT 0x0000
+
+/**
+ * @if Eng
+ * @brief  Client Characteristic Configuration value is notification.
+ * @else
+ * @brief  客户端特征配置描述符的值为通知。
+ * @endif
+ */
+#define BLE_AMS_CLIENT_CHARACTERISTIC_CONFIGURATION_NOTIFICATION 0x0001
+
+/**
+ * @if Eng
+ * @brief  Enum of ams notify switch.
+ * @else
+ * @brief  通知开关
+ * @endif
+ */
+typedef enum {
+    AMS_CLIENT_NOTIFY_DISABLE, /*!< @if Eng disable notify @else 关闭通知 @endif */
+    AMS_CLIENT_NOTIFY_ENABLE,  /*!< @if Eng enable notify @else 开启通知 @endif */
+} ams_client_notify_enable_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of remote command
+ * @else
+ * @brief  远端命令ID
+ * @endif
+ */
+typedef enum {
+    AMS_RMT_CMD_ID_PLAY = 0,                  /*!< @if Eng play  @else 播放 @endif */
+    AMS_RMT_CMD_ID_PAUSE = 1,                 /*!< @if Eng pause  @else 暂停 @endif */
+    AMS_RMT_CMD_ID_TOGGLE_PLAY_PAUSE = 2,     /*!< @if Eng toggle play or pause @else 切换播放/暂停 @endif */
+    AMS_RMT_CMD_ID_NEXT_TRACK = 3,            /*!< @if Eng next track  @else 下一首 @endif */
+    AMS_RMT_CMD_ID_PREVIOUS_TRACK = 4,        /*!< @if Eng previous track  @else 上一首 @endif */
+    AMS_RMT_CMD_ID_VOLUME_UP = 5,             /*!< @if Eng volume up  @else 调高音量 @endif */
+    AMS_RMT_CMD_ID_VOLUME_DOWN = 6,           /*!< @if Eng volume down  @else 调低音量 @endif */
+    AMS_RMT_CMD_ID_ADVANCE_REPEAT_MODE = 7,   /*!< @if Eng advance repeat mode  @else 高级重复模式 @endif */
+    AMS_RMT_CMD_ID_ADVANCE_SHUFFLE_MODE = 8,  /*!< @if Eng advance shuffle mode  @else 高级随机模式 @endif */
+    AMS_RMT_CMD_ID_SKIP_FORWARD = 9,          /*!< @if Eng skip forward  @else 跳过前一个 @endif */
+    AMS_RMT_CMD_ID_SKIP_BACKWARD = 10,        /*!< @if Eng skip backward  @else 跳过后一个 @endif */
+    AMS_RMT_CMD_ID_LIKE_TRACK = 11,           /*!< @if Eng like track  @else 喜欢 @endif */
+    AMS_RMT_CMD_ID_DISLIKE_TRACK = 12,        /*!< @if Eng dislike track  @else 取消喜欢 @endif */
+    AMS_RMT_CMD_ID_BOOKMARK_TRACK = 13,       /*!< @if Eng bookmark track @else 标记喜欢或取消喜欢 @endif */
+    AMS_RMT_CMD_ID_RESERVED                   /*!< @if Eng reserved  @else 预留命令ID @endif */
+} ams_remote_cmd_id_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of entity id
+ * @else
+ * @brief  实体ID
+ * @endif
+ */
+typedef enum {
+    AMS_ENTITY_ID_PLAYER = 0,  /*!< @if Eng player  @else 播放器 @endif */
+    AMS_ENTITY_ID_QUEUE = 1,   /*!< @if Eng queue   @else 播放列表 @endif */
+    AMS_ENTITY_ID_TRACK = 2,   /*!< @if Eng track   @else 曲目 @endif */
+    AMS_ENTITY_ID_RESERVED     /*!< @if Eng reserved  @else 预留实体ID @endif */
+} ams_entity_id_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of entity update flags
+ * @else
+ * @brief  实体更新标记
+ * @endif
+ */
+typedef enum {
+    AMS_ENTITY_UPDATE_FLAG_TRUNCATED = (1 << 0),  /*!< @if Eng truncated  @else 销毁 @endif */
+    AMS_ENTITY_UPDATE_FLAG_RESERVED               /*!< @if Eng reserved  @else 预留标记 @endif */
+} ams_entity_updata_flag_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of player attribute id
+ * @else
+ * @brief  播放器属性ID
+ * @endif
+ */
+typedef enum {
+    AMS_PALYER_ATT_ID_NAME = 0,                /*!< @if Eng name  @else 播放器名称 @endif */
+    AMS_PALYER_ATT_ID_PLAYBACK_INFO = 1,       /*!< @if Eng playback info  @else 播放信息 @endif */
+    AMS_PALYER_ATT_ID_VOLUME = 2,              /*!< @if Eng volume  @else 音量,0-1的浮点数 @endif */
+    AMS_PALYER_ATT_ID_RESERVED                 /*!< @if Eng reserved  @else 预留属性ID @endif */
+} ams_player_att_id_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of queue attribute id
+ * @else
+ * @brief  队列属性ID
+ * @endif
+ */
+typedef enum {
+    AMS_QUEUE_ATT_ID_INDEX = 0,          /*!< @if Eng index  @else 序号,从0开始 @endif */
+    AMS_QUEUE_ATT_ID_COUNT = 1,          /*!< @if Eng count  @else 列表个数 @endif */
+    AMS_QUEUE_ATT_ID_SHUFFLE_MODE = 2,   /*!< @if Eng shuffle mode  @else 随机模式 @endif */
+    AMS_QUEUE_ATT_ID_REPEAT_MODE = 3,    /*!< @if Eng repeat mode  @else 重复模式 @endif */
+    AMS_QUEUE_ATT_ID_RESERVED            /*!< @if Eng reserved  @else 预留属性ID @endif */
+} ams_queue_att_id_t;
+
+
+/**
+ * @if Eng
+ * @brief  Enum of track attribute id
+ * @else
+ * @brief  曲目属性ID
+ * @endif
+ */
+typedef enum {
+    AMS_TRACK_ATT_ID_ARTIST = 0,        /*!< @if Eng artist  @else 艺术家 @endif */
+    AMS_TRACK_ATT_ID_ALBUM = 1,         /*!< @if Eng album  @else 专辑 @endif */
+    AMS_TRACK_ATT_ID_TITLE = 2,         /*!< @if Eng title  @else 标题 @endif */
+    AMS_TRACK_ATT_ID_DURATION = 3,      /*!< @if Eng duration  @else 音乐时长,秒级,浮点数 @endif */
+    AMS_TRACK_ATT_ID_RESERVED           /*!< @if Eng reserved  @else 预留属性ID @endif */
+} ams_track_att_id_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of shuffle mode
+ * @else
+ * @brief  随机模式
+ * @endif
+ */
+typedef enum {
+    AMS_SHUFFLE_MODE_OFF = 0,        /*!< @if Eng off  @else 关闭 @endif */
+    AMS_SHUFFLE_MODE_ONE = 1,        /*!< @if Eng one  @else 随机模式1 @endif */
+    AMS_SHUFFLE_MODE_ALL = 2,        /*!< @if Eng all  @else 随机模式2 @endif */
+    AMS_SHUFFLE_MODE_RESERVED        /*!< @if Eng reserved  @else 预留随机模式 @endif */
+} ams_shuffle_mode_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of repeat mode
+ * @else
+ * @brief  重复模式
+ * @endif
+ */
+typedef enum {
+    AMS_REPEAT_MODE_OFF = 0,        /*!< @if Eng off  @else 关闭 @endif */
+    AMS_REPEAT_MODE_ONE = 1,        /*!< @if Eng one  @else 重复模式1 @endif */
+    AMS_REPEAT_MODE_ALL = 2,        /*!< @if Eng all  @else 重复模式2 @endif */
+    AMS_REPEAT_MODE_RESERVED        /*!< @if Eng reserved  @else 预留重复模式 @endif */
+} ams_repeat_mode_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of subscribe type
+ * @else
+ * @brief  订阅类型
+ * @endif
+ */
+typedef enum {
+    AMS_CLIENT_SUBSCRIBE_REMOTE_CMD = 0,          /*!< @if Eng subscribe remote command @else 订阅远端命令 @endif */
+    AMS_CLIENT_SUBSCRIBE_ENTITY_UPDATE = 1,      /*!< @if Eng subscribe entity update @else 订阅实体更新 @endif */
+} ams_client_subscribe_type_t;
+
+
+/**
+ * @if Eng
+ * @brief  Enum of write character
+ * @else
+ * @brief  写特征类型
+ * @endif
+ */
+typedef enum {
+    AMS_CLIENT_WRITE_REMOTE_CMD = 0,          /*!< @if Eng write remote command   @else 写远端命令 @endif */
+    AMS_CLIENT_WRITE_ENTITY_UPDATE = 1,      /*!< @if Eng write entity update    @else 写实体更新 @endif */
+    AMS_CLIENT_WRITE_ENTITY_ATTRIBUTE = 2,   /*!< @if Eng write entity attribute @else 写实体属性 @endif */
+} ams_client_write_character_type_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of ams character.
+ * @else
+ * @brief  AMS服务特征。
+ * @endif
+ */
+typedef enum {
+    AMS_CHAR_REMOTE_CMD,         /*!< @if Eng remote command @else 远端命令 @endif */
+    AMS_CHAR_ENTITY_UPDATE,      /*!< @if Eng entity update @else 实体更新 @endif */
+    AMS_CHAR_ENTITY_ATTR,        /*!< @if Eng entity update @else 实体更新 @endif */
+    AMS_CHAR_INVALID,            /*!< @if Eng invalid @else 无效特征 @endif */
+} ams_character_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of ams error codes.
+ * @else
+ * @brief  AMS客户端写和读特征响应错误码。
+ * @endif
+ */
+typedef enum {
+    AMS_ERROR_CODE_INVALID_STATE = 0xA0,        /*!< @if Eng Invalid State
+                                                     @else 无效状态,客户端未发起服务建立 @endif */
+    AMS_ERROR_CODE_INVALID_CMD = 0xA1,          /*!< @if Eng Invalid command @else 无效命令 @endif */
+    AMS_ERROR_CODE_ABSENT_ATTRIBUTE = 0xA2     /*!< @if Eng Absent attribute @else 属性为空 @endif */
+} ams_write_error_code_t;
+ 
+/**
+ * @if Eng
+ * @brief  Struct of ams service.
+ * @else
+ * @brief  AMS服务。
+ * @endif
+ */
+typedef struct {
+    uint8_t client_id;                                   /*!< @if Eng client id @else 客户端ID @endif */
+    uint16_t conn_id;                                    /*!< @if Eng connect id @else 连接ID @endif */
+    uint16_t start_handle;                               /*!< @if Eng start handle @else 服务开始handle @endif */
+    uint16_t end_handle;                                 /*!< @if Eng end handle @else   服务结束handle @endif */
+    gattc_discovery_character_result_t remote_cmd;       /*!< @if Eng remote command @else 远端命令特征 @endif */
+    gattc_discovery_character_result_t entity_update;    /*!< @if Eng entity update @else 实体更新特征 @endif */
+    gattc_discovery_character_result_t entity_attr;      /*!< @if Eng entity attribute @else 实体属性特征 @endif */
+    uint16_t remote_cmd_ccc_handle;                      /*!< @if Eng remote command ccc
+                                                              @else 远端命令特征ccc描述符handle @endif */
+    uint16_t entity_update_ccc_handle;                   /*!< @if Eng entity update ccc
+                                                              @else 实体更新特征ccc描述符handle @endif */
+} ble_ams_service_t;
+
+/**
+ * @if Eng
+ * @brief  Struct of interested entity attribute request.
+ * @else
+ * @brief  感兴趣实体属性请求。
+ * @endif
+ */
+typedef struct {
+    uint8_t entity_id;                   /*!< @if Eng entity id @else 实体ID @endif */
+    uint16_t att_num;                    /*!< @if Eng the count of attribute @else 属性个数 @endif */
+    uint8_t att_id[0];                   /*!< @if Eng the array of attribute @else 属性ID数组 @endif */
+} ble_ams_interested_entity_attr_req_t;
+
+/**
+ * @if Eng
+ * @brief  Struct of full entity attribute request.
+ * @else
+ * @brief  完整实体属性请求。
+ * @endif
+ */
+typedef struct {
+    uint8_t entity_id;    /*!< @if Eng entity id @else 实体ID @endif */
+    uint8_t att_id;       /*!< @if Eng attribute id @else 属性ID @endif */
+} ble_ams_full_entity_attr_cmd_t;
+
+/**
+ * @if Eng
+ * @brief Struct of supported remote command.
+ * @else
+ * @brief  支持的远端命令。
+ * @endif
+ */
+typedef struct {
+    uint16_t cmd_num;      /*!< @if Eng the count of command @else 支持的远端命令个数 @endif */
+    uint8_t remote_cmd[0]; /*!< @if Eng the array of remote command @else 支持的远端命令数组 @endif */
+} ble_ams_remote_cmd_rpt_t;
+
+/**
+ * @if Eng
+ * @brief Struct of entity update info.
+ * @else
+ * @brief  实体更新信息。
+ * @endif
+ */
+typedef struct {
+    uint8_t entity_id;               /*!< @if Eng entity id @else 实体ID @endif */
+    uint8_t att_id;                  /*!< @if Eng attribute id @else 属性ID @endif */
+    uint8_t entity_update_flags;     /*!< @if Eng entity update flags @else 实体更新标记 @endif */
+    uint16_t value_length;           /*!< @if Eng the length of entity value @else 属性值长度 @endif */
+    uint8_t value[0];                /*!< @if Eng entity value @else 属性值字节序(字符串,以0结尾),上层应用根据协议解析 @endif */
+} ble_ams_entity_update_rpt_t;
+
+/**
+ * @if Eng
+ * @brief Struct of full entity attribute.
+ * @else
+ * @brief  完整实体属性信息。
+ * @endif
+ */
+typedef struct {
+    uint8_t entity_id;      /*!< @if Eng entity id @else 实体ID @endif */
+    uint8_t att_id;         /*!< @if Eng attribute id @else 属性ID @endif */
+    uint16_t value_len;     /*!< @if Eng the length of entity value @else 属性值长度 @endif */
+    uint8_t value[0];       /*!< @if Eng entity value @else 属性值字节序(字符串,以0结尾) @endif */
+} ble_ams_full_attr_value_t;
+
+
+/**
+ * @if Eng
+ * @brief Callback invoked when client setup service complete.
+ * @par Callback invoked when client setup service complete.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] status    error code{ @ref errcode_bt_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see ble_ams_client_callbacks_t
+ * @else
+ * @brief  AMS客户端服务建立完成回调函数。
+ * @par    AMS客户端服务建立完成回调函数。
+ * @attention
+ * @param [in] client_id 客户端ID。
+ * @param [in] conn_id   连接ID。
+ * @param [in] status    执行结果错误码{ @ref errcode_bt_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see ble_ams_client_callbacks_t
+ * @endif
+ */
+typedef void (*ams_client_setup_result_cbk)(uint8_t client_id, uint16_t conn_id, errcode_t status);
+
+/**
+ * @if Eng
+ * @brief Callback invoked when client subscribe character notify complete.
+ * @par Callback invoked when client subscribe character notify complete.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] type       subscribe type{ @ref ams_client_subscribe_type_t }.
+ * @param [in] status    gatt error code{ @ref gatt_status_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_stru.h
+ * @see ble_ams_client_callbacks_t
+ * @else
+ * @brief  AMS客户端订阅特征通知结果回调函数。
+ * @par    AMS客户端订阅特征通知结果回调函数。
+ * @attention
+ * @param [in] client_id 客户端ID。
+ * @param [in] conn_id   连接ID。
+ * @param [in] type      订阅类型{ @ref ams_client_subscribe_type_t }.
+ * @param [in] status    gatt操作错误码{ @ref gatt_status_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_stru.h
+ * @see ble_ams_client_callbacks_t
+ * @endif
+ */
+typedef void (*ams_client_subscribe_result_cbk)(uint8_t client_id, uint16_t conn_id,
+    ams_client_subscribe_type_t type, gatt_status_t status);
+
+/**
+ * @if Eng
+ * @brief Callback invoked when remote service notify supported remote command.
+ * @par Callback invoked when remote service notify supported remote command.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] remote_cmd supported remote command{ @ref ble_ams_remote_cmd_rpt_t }.
+ * @param [in] status    error code{ @ref errcode_bt_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see ble_ams_client_callbacks_t
+ * @else
+ * @brief  AMS远端服务通知支持的远端命令回调函数。
+ * @par    AMS远端服务通知支持的远端命令回调函数。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] remote_cmd      支持的远端命令{ @ref ble_ams_remote_cmd_rpt_t }.
+ * @param [in] status    操作错误码{ @ref errcode_bt_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see ble_ams_client_callbacks_t
+ * @endif
+ */
+typedef void (*ams_client_remote_command_rpt_cbk)(uint8_t client_id, uint16_t conn_id,
+    ble_ams_remote_cmd_rpt_t *remote_cmd, errcode_t status);
+
+/**
+ * @if Eng
+ * @brief Callback invoked when remote service notify entity update info.
+ * @par Callback invoked when remote service notify entity update info.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] entity_update entity update info{ @ref ble_ams_entity_update_rpt_t }.
+ * @param [in] status    error code{ @ref errcode_bt_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see ble_ams_client_callbacks_t
+ * @else
+ * @brief  AMS远端服务通知实体更新信息回调函数。
+ * @par    AMS远端服务通知实体更新信息回调函数。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] entity_update   实体更新信息{ @ref ble_ams_entity_update_rpt_t }.
+ * @param [in] status    操作错误码{ @ref errcode_bt_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see ble_ams_client_callbacks_t
+ * @endif
+ */
+typedef void (*ams_client_entity_update_rpt_cbk)(uint8_t client_id, uint16_t conn_id,
+    ble_ams_entity_update_rpt_t *entity_update, errcode_t status);
+
+/**
+ * @if Eng
+ * @brief Callback invoked when client write remote character complete.
+ * @par Callback invoked when client write remote character complete.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] type       character type{ @ref ams_client_write_character_type_t }.
+ * @param [in] status    gatt error code{ @ref gatt_status_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_stru.h
+ * @see ble_ams_client_callbacks_t
+ * @else
+ * @brief  AMS客户端写对端特征响应回调函数。
+ * @par    AMS客户端写对端特征响应回调函数。
+ * @attention
+ * @param [in] client_id      客户端ID。
+ * @param [in] conn_id        连接ID。
+ * @param [in] type           特征类型{ @ref ams_client_write_character_type_t }.
+ * @param [in] status         gatt操作错误码{ @ref gatt_status_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_stru.h
+ * @see ble_ams_client_callbacks_t
+ * @endif
+ */
+typedef void (*ams_client_write_character_rsp_cbk)(uint8_t client_id, uint16_t conn_id,
+    ams_client_write_character_type_t type,
+    gatt_status_t status);
+
+/**
+ * @if Eng
+ * @brief Callback invoked when client read remote character complete.
+ * @par Callback invoked when client read remote character complete.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] read_result full attribute value{ @ref ble_ams_full_attr_value_t }.
+ * @param [in] status    gatt error code{ @ref gatt_status_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_stru.h
+ * @see ble_ams_client_callbacks_t
+ * @else
+ * @brief  AMS客户端读对端特征响应回调函数。
+ * @par    AMS客户端读对端特征响应回调函数。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] read_result     特征值{ @ref ble_ams_full_attr_value_t }.
+ * @param [in] status    gatt操作错误码{ @ref gatt_status_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_stru.h
+ * @see ble_ams_client_callbacks_t
+ * @endif
+ */
+typedef void (*ams_client_read_full_attr_result_cbk)(uint8_t client_id, uint16_t conn_id,
+    ble_ams_full_attr_value_t *read_result,
+    gatt_status_t status);
+
+/**
+ * @if Eng
+ * @brief Struct of AMS client callback function.
+ * @else
+ * @brief AMS 客户端回调函数接口定义。
+ * @endif
+ */
+typedef struct {
+    ams_client_setup_result_cbk               setup_cb;          /*!< @if Eng setup callback @else 客户端服务建立完成回调 @endif */
+    ams_client_subscribe_result_cbk           subscribe_cb;      /*!< @if Eng subscribe callback
+                                                                      @else 订阅特征通知结果回调 @endif */
+    ams_client_remote_command_rpt_cbk         remote_cmd_cb;     /*!< @if Eng suppported remote command callback
+                                                                      @else 远端服务通知支持的远端命令回调 @endif */
+    ams_client_entity_update_rpt_cbk          entity_update_cb;  /*!< @if Eng entity update callback
+                                                                      @else 远端服务通知实体更新信息回调 @endif */
+    ams_client_write_character_rsp_cbk        write_rsp_cb;      /*!< @if Eng write response callback
+                                                                      @else 客户端写请求响应回调 @endif */
+    ams_client_read_full_attr_result_cbk      read_full_attr_result_cb; /*!< @if Eng read response callback
+                                                                             @else 客户端读请求响应回调 @endif */
+} ble_ams_client_callbacks_t;
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client setup service.
+ * @par The interface of AMS client setup service.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  AMS客户端发起服务建立。
+ * @par    AMS客户端发起服务建立。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ams_client_setup_service(uint8_t client_id, uint16_t conn_id);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client discovery service result callback.
+ * @par The interface of AMS client discovery service result callback.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] service    service info.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_client.h
+ * @see
+ * @else
+ * @brief  AMS客户端发现服务结果处理接口。
+ * @par    AMS客户端发现服务结果处理接口。
+ * @attention
+ * @param [in] client_id  客户端ID。
+ * @param [in] conn_id    连接ID。
+ * @param [in] service    AMS 服务信息。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_client.h
+ * @see
+ * @endif
+ */
+void ble_ams_client_discovery_service_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_service_result_t *service);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client discovery character result callback.
+ * @par The interface of AMS client discovery character result callback.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] character    character info.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_client.h
+ * @see
+ * @else
+ * @brief  AMS客户端发现特征结果处理接口。
+ * @par    AMS客户端发现特征结果处理接口。
+ * @attention
+ * @param [in] client_id  客户端ID。
+ * @param [in] conn_id    连接ID。
+ * @param [in] character    AMS 服务特征信息。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_client.h
+ * @see
+ * @endif
+ */
+void ble_ams_client_discovery_character_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_character_result_t *character);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client discovery descriptor result callback.
+ * @par The interface of AMS client discovery descriptor result callback.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] descriptor    descriptor info.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_client.h
+ * @see
+ * @else
+ * @brief  AMS客户端发现描述符结果处理接口。
+ * @par    AMS客户端发现描述符结果处理接口。
+ * @attention
+ * @param [in] client_id  客户端ID。
+ * @param [in] conn_id    连接ID。
+ * @param [in] descriptor    AMS 服务特征描述符信息。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_client.h
+ * @see
+ * @endif
+ */
+void ble_ams_client_discovery_descriptor_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_descriptor_result_t *descriptor);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client receive notify info callback.
+ * @par The interface of AMS client receive notify info callback.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] data       notify info.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_client.h
+ * @see
+ * @else
+ * @brief  AMS客户端接收对端通知信息处理接口。
+ * @par    AMS客户端接收对端通知信息处理接口。
+ * @attention
+ * @param [in] client_id  客户端ID。
+ * @param [in] conn_id    连接ID。
+ * @param [in] data       对端通知信息。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_client.h
+ * @see
+ * @endif
+ */
+void ble_ams_client_notify_cbk(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *data);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client write response callback.
+ * @par The interface of AMS client write response callback.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] status     gatt status {@ref gatt_status_t}.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_stru.h
+ * @see
+ * @else
+ * @brief  AMS客户端写请求响应结果处理接口。
+ * @par    AMS客户端写请求响应结果处理接口。
+ * @attention
+ * @param [in] client_id  客户端ID。
+ * @param [in] conn_id    连接ID。
+ * @param [in] status     gatt 操作结果码 {@ref gatt_status_t}.
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_stru.h
+ * @see
+ * @endif
+ */
+void ble_ams_client_write_cbk(uint8_t client_id, uint16_t conn_id, uint16_t handle, gatt_status_t status);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client read response callback.
+ * @par The interface of AMS client read response callback.
+ * @attention
+ * @param [in] client_id      client ID.
+ * @param [in] conn_id        connect id.
+ * @param [in] read_result    read response result.
+ * @param [in] status         gatt status {@ref gatt_status_t}.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_stru.h
+ * @li  bts_gatt_client.h
+ * @see
+ * @else
+ * @brief  AMS客户端读请求响应结果处理接口。
+ * @par    AMS客户端读请求响应结果处理接口。
+ * @attention
+ * @param [in] client_id      客户端ID。
+ * @param [in] conn_id        连接ID。
+ * @param [in] read_result    读请求响应结果.
+ * @param [in] status         gatt 操作结果码 {@ref gatt_status_t}.
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_stru.h
+ * @li  bts_gatt_client.h
+ * @see
+ * @endif
+ */
+void ble_ams_client_read_cbk(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *read_result,
+    gatt_status_t status);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client subscribe remote command character notify.
+ * @par The interface of AMS client subscribe remote command character notify.
+ * @attention
+ * @param [in] client_id      client ID.
+ * @param [in] conn_id        connect id.
+ * @param [in] enable_flag    enable/disable flag {@ref ams_client_notify_enable_t}.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  AMS客户端订阅远端命令特征通知接口。
+ * @par    AMS客户端订阅远端命令特征通知接口。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] enable_flag     开启/关闭标记。 {@ref ams_client_notify_enable_t}.
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ams_client_subscribe_remote_cmd(uint8_t client_id, uint16_t conn_id,
+    ams_client_notify_enable_t enable_flag);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client subscribe entity update character notify.
+ * @par The interface of AMS client subscribe entity update character notify.
+ * @attention
+ * @param [in] client_id      client ID.
+ * @param [in] conn_id        connect id.
+ * @param [in] enable_flag    enable/disable flag {@ref ams_client_notify_enable_t}.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  AMS客户端订阅实体更新特征通知接口。
+ * @par    AMS客户端订阅实体更新特征通知接口。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] enable_flag     开启/关闭标记。 {@ref ams_client_notify_enable_t}.
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ams_client_subscribe_entity_update(uint8_t client_id, uint16_t conn_id,
+    ams_client_notify_enable_t enable_flag);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client send remote command.
+ * @par The interface of AMS client send remote command, it is used for operating remote media action.
+ * @attention
+ * @param [in] client_id      client ID.
+ * @param [in] conn_id        connect id.
+ * @param [in] cmd_id         command id {@ref ams_remote_cmd_id_t}.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  AMS客户端发送远端命令接口。
+ * @par    AMS客户端发送远端命令接口,该接口用来控制对端媒体行为,例如播放/暂停,调节音量等
+ * @attention
+ * @param [in] client_id  客户端ID。
+ * @param [in] conn_id    连接ID。
+ * @param [in] cmd_id     命令ID。 {@ref ams_remote_cmd_id_t}.
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ams_client_send_remote_cmd(uint8_t client_id, uint16_t conn_id,
+    ams_remote_cmd_id_t cmd_id);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client register interested entity attribute.
+ * @par The interface of AMS client register interested entity attribute.
+ * @attention
+ * @param [in] client_id         client ID.
+ * @param [in] conn_id           connect id.
+ * @param [in] entity_attr_req   interested entity attribute list.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  AMS客户端注册感兴趣的实体属性接口。
+ * @par    AMS客户端注册感兴趣的实体属性,当该实体属性更新时,对端会发送通知到本端。
+ * @attention
+ * @param [in] client_id           客户端ID。
+ * @param [in] conn_id             连接ID。
+ * @param [in] entity_attr_req     感兴趣的实体属性列表。
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ams_client_register_interested_entity_attribute(uint8_t client_id, uint16_t conn_id,
+    ble_ams_interested_entity_attr_req_t *entity_attr_req);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client retrieve full entity attribute.
+ * @par The interface of AMS client retrieve full entity attribute.
+ * @attention
+ * @param [in] client_id         client ID.
+ * @param [in] conn_id           connect id.
+ * @param [in] full_attr_req     entity attribute.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  AMS客户端请求对端加载完整的实体属性信息接口。
+ * @par    AMS客户端请求对端加载完整的实体属性信息接口,稍后AMS客户端再发起读请求,读取完整的实体属性信息。
+ * @attention
+ * @param [in] client_id         客户端ID。
+ * @param [in] conn_id           连接ID。
+ * @param [in] full_attr_req     实体属性。
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ams_client_retrieve_full_entity_attribute(uint8_t client_id, uint16_t conn_id,
+    ble_ams_full_entity_attr_cmd_t *full_attr_req);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client read full entity attribute.
+ * @par The interface of AMS client read full entity attribute.
+ * @attention
+ * @param [in] client_id         client ID.
+ * @param [in] conn_id           connect id.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  AMS客户端读取完整实体属性信息接口。
+ * @par    AMS客户端读取完整完整实体属性信息接口。
+ * @attention
+ * @param [in] client_id         客户端ID。
+ * @param [in] conn_id           连接ID。
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ams_client_read_full_entity_attribute(uint8_t client_id, uint16_t conn_id);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client register callback.
+ * @par The interface of AMS client register callback.
+ * @attention
+ * @param [in] func        the pointer of callback struct.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  AMS客户端注册回调接口。
+ * @par    AMS客户端注册回调接口。
+ * @attention
+ * @param [in] func         回调函数结构体指针。
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ams_client_register_callbacks(ble_ams_client_callbacks_t *func);
+
+/**
+ * @if Eng
+ * @brief The interface of check service uuid whether or not AMS service.
+ * @par The interface of check service uuid whether or not AMS service.
+ * @attention
+ * @param [in] uuid         service uuid.
+ * @retval true or false    true:Yes, false:No.
+ * @par Dependency:
+ * @li
+ * @see
+ * @else
+ * @brief  AMS客户端注册回调接口。
+ * @par    AMS客户端注册回调接口。
+ * @attention
+ * @param [in] uuid         服务uuid。
+ * @retval 是或否 是:是AMS服务,否:不是AMS服务.
+ * @par 依赖:
+ * @li
+ * @see
+ * @endif
+ */
+bool is_ble_ams_service(bt_uuid_t *uuid);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client clear stored remote ams service info by connect id.
+ * @par The interface of AMS client clear stored remote ams service info by connect id.
+ * @attention
+ * @param [in] client_id         client ID.
+ * @param [in] conn_id           connect id.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li
+ * @see
+ * @else
+ * @brief  AMS客户端根据连接ID清理存储的对端AMS服务信息。
+ * @par    AMS客户端根据连接ID清理存储的对端AMS服务信息。
+ * @attention
+ * @param [in] client_id         客户端ID。
+ * @param [in] conn_id           连接ID。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li
+ * @see
+ * @endif
+ */
+void ble_ams_client_clear_remote_by_conn(uint8_t client_id, uint16_t conn_id);
+
+/**
+ * @if Eng
+ * @brief The interface of AMS client clear all stored remote ams service info.
+ * @par The interface of AMS client clear all stored remote ams service info.
+ * @attention
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li
+ * @see
+ * @else
+ * @brief  AMS客户端清理所有存储的对端AMS服务信息。
+ * @par    AMS客户端清理所有存储的对端AMS服务信息。
+ * @attention
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li
+ * @see
+ * @endif
+ */
+void ble_ams_client_clear_remote_all(void);
+
+/**
+ * @}
+ */
+#ifdef __cplusplus
+}
+#endif
+#endif
\ No newline at end of file
diff --git a/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/include/ble_ancs_client.h b/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/include/ble_ancs_client.h
new file mode 100644 (file)
index 0000000..4a71909
--- /dev/null
@@ -0,0 +1,947 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2024. All rights reserved.
+ * Description: BLE Apple Notification Center Service Client module.
+ */
+
+/**
+ * @defgroup bluetooth_bts_ancs_client ANCS CLIENT API
+ * @ingroup  bluetooth
+ * @{
+ */
+#ifndef BLE_ANCS_CLIENT_H
+#define BLE_ANCS_CLIENT_H
+#include "errcode.h"
+#include "sdk_list.h"
+#include "bth_stack.h"
+#include "bth_stack_gatt.h"
+#include "bts_gatt_client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @if Eng
+ * @brief  Default value of Client Characteristic Configuration.
+ * @else
+ * @brief  客户端特征配置描述符的默认值。
+ * @endif
+ */
+#define BLE_ANCS_CLIENT_CHARACTERISTIC_CONFIGURATION_DEFAULT 0x0000
+
+/**
+ * @if Eng
+ * @brief  Client Characteristic Configuration value is notification.
+ * @else
+ * @brief  客户端特征配置描述符的值为通知。
+ * @endif
+ */
+#define BLE_ANCS_CLIENT_CHARACTERISTIC_CONFIGURATION_NOTIFICATION 0x0001
+
+/**
+ * @if Eng
+ * @brief  Enum of ancs notify switch.
+ * @else
+ * @brief  通知开关枚举值。
+ * @endif
+ */
+typedef enum {
+    ANCS_CLIENT_NOTIFY_DISABLE, /*!< @if Eng disable notify @else 关闭通知 @endif */
+    ANCS_CLIENT_NOTIFY_ENABLE,  /*!< @if Eng enable notify @else 开启通知 @endif */
+} ancs_client_notify_enable_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of event id
+ * @else
+ * @brief  事件ID枚举值
+ * @endif
+ */
+typedef enum {
+    ANCS_EVENT_ADDED = 0,     /*!< @if Eng add @else 新增通知 @endif */
+    ANCS_EVENT_MODIFIED = 1,  /*!< @if Eng modify @else  修改通知 @endif */
+    ANCS_EVENT_REMOEVD = 2,   /*!< @if Eng remove @else  移除通知 @endif */
+    ANCS_EVENT_RESERVED       /*!< @if Eng reserved  @else 预留事件ID @endif */
+} ancs_event_id_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of event flags
+ * @else
+ * @brief  事件标记枚举值
+ * @endif
+ */
+typedef enum {
+    ANCS_EVENT_FLAG_SILENT = (1 << 0),            /*!< @if Eng silent          @else  安静  @endif */
+    ANCS_EVENT_FLAG_IMPORTANT = (1 << 1),         /*!< @if Eng important       @else  重要 @endif */
+    ANCS_EVENT_FLAG_PREEXISTING = (1 << 2),       /*!< @if Eng preexisting     @else   先存的   @endif */
+    ANCS_EVENT_FLAG_POSITIVE_ACTION = (1 << 3),   /*!< @if Eng positive action @else  积极活动 @endif */
+    ANCS_EVENT_FLAG_NEGATIVE_ACTION = (1 << 4),   /*!< @if Eng negative action @else  消极活动 @endif */
+    ANCS_EVENT_FLAG_RESERVED                      /*!< @if Eng reserved        @else 预留事件标记 @endif */
+} ancs_event_flags_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of command id
+ * @else
+ * @brief  命令ID枚举值
+ * @endif
+ */
+typedef enum {
+    ANCS_CMD_GET_NOTIFY_ATT = 0,          /*!< @if Eng Get notify attribute  @else 获取通知属性  @endif */
+    ANCS_CMD_GET_APP_ATT = 1,             /*!< @if Eng Get app attribute     @else  获取应用属性 @endif */
+    ANCS_CMD_PERFORM_NOTIFY_ACTION = 2,   /*!< @if Eng Perform notify action @else  处理通知     @endif */
+    ANCS_CMD_RESERVED                     /*!< @if Eng reserved              @else 预留命令ID    @endif */
+} ancs_command_id_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of category id
+ * @else
+ * @brief  分类ID枚举值
+ * @endif
+ */
+typedef enum {
+    ANCS_CATEGORY_OTHER = 0,            /*!< @if Eng Other            @else 其他 @endif */
+    ANCS_CATEGORY_INCOMING_CALL = 1,    /*!< @if Eng Incoming call    @else  来电 @endif */
+    ANCS_CATEGORY_MISSED_CALL = 2,      /*!< @if Eng Missed call      @else  未接来电 @endif */
+    ANCS_CATEGORY_VOICE_MAIL = 3,       /*!< @if Eng Voice mail       @else  语音消息 @endif */
+    ANCS_CATEGORY_SOCIAL = 4,           /*!< @if Eng Social           @else  社交 @endif */
+    ANCS_CATEGORY_SCHEDULE = 5,         /*!< @if Eng Schedule         @else  计划 @endif */
+    ANCS_CATEGORY_EMAIL = 6,            /*!< @if Eng Email            @else  邮件 @endif */
+    ANCS_CATEGORY_NEWS = 7,             /*!< @if Eng News             @else  新闻 @endif */
+    ANCS_CATEGORY_HEALTH_FITNESS = 8,   /*!< @if Eng Health fitness   @else  运动健康 @endif */
+    ANCS_CATEGORY_BUSINESS_FINANCE = 9, /*!< @if Eng Business finance @else  商业金融 @endif */
+    ANCS_CATEGORY_LOCATION = 10,        /*!< @if Eng Location         @else  位置 @endif */
+    ANCS_CATEGORY_ENTERTAINMENT = 11,   /*!< @if Eng Entertainment    @else  娱乐 @endif */
+    ANCS_CATEGORY_RESERVED              /*!< @if Eng reserved         @else 预留分类ID    @endif */
+} ancs_category_id_t;
+
+
+/**
+ * @if Eng
+ * @brief  Enum of notify attribute id
+ * @else
+ * @brief  通知属性ID枚举值
+ * @endif
+ */
+typedef enum {
+    ANCS_NOTIFY_ATT_APP_ID = 0,          /*!< @if Eng App id         @else 应用编号 @endif */
+    ANCS_NOTIFY_ATT_TITLE = 1,           /*!< @if Eng Title          @else  标题 @endif */
+    ANCS_NOTIFY_ATT_SUBTITLE = 2,        /*!< @if Eng Subtitle       @else 副标题 @endif */
+    ANCS_NOTIFY_ATT_MESSAGE = 3,         /*!< @if Eng Message        @else 消息 @endif */
+    ANCS_NOTIFY_ATT_MSG_SIZE = 4,        /*!< @if Eng Message size   @else 消息大小 @endif */
+    ANCS_NOTIFY_ATT_DATE = 5,            /*!< @if Eng Date           @else 日期 @endif */
+    ANCS_NOTIFY_ATT_POSITIVE_LABEL = 6,  /*!< @if Eng Positive lable @else  积极活动标签 @endif */
+    ANCS_NOTIFY_ATT_NEGATIVE_LABEL = 7,  /*!< @if Eng Negative lable @else  消极活动标签 @endif */
+    ANCS_NOTIFY_ATT_RESERVED             /*!< @if Eng reserved       @else 预留通知属性ID @endif */
+} ancs_notification_att_id_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of app attribute id
+ * @else
+ * @brief  应用属性ID枚举值
+ * @endif
+ */
+typedef enum {
+    ANCS_APP_ATT_DISPLAY_NAME = 0,          /*!< @if Eng Display name @else 应用显示名称 @endif */
+    ANCS_APP_ATT_RESERVED                   /*!< @if Eng reserved     @else 预留应用属性ID @endif */
+} ancs_app_att_id_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of action id
+ * @else
+ * @brief  活动ID枚举值
+ * @endif
+ */
+typedef enum {
+    ANCS_ACTION_POSITIVE = 0,          /*!< @if Eng Positive   @else 积极活动 @endif */
+    ANCS_ACTION_NEGATIVE = 1,          /*!< @if Eng Negative   @else 消极活动 @endif */
+    ANCS_ACTION_RESERVED               /*!< @if Eng Reserved   @else 预留活动ID @endif */
+} ancs_action_id_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of subscribe type
+ * @else
+ * @brief  订阅类型
+ * @endif
+ */
+typedef enum {
+    ANCS_CLIENT_SUBSCRIBE_NOTIFY = 0,        /*!< @if Eng Subscribe notify @else 订阅通知 @endif */
+    ANCS_CLIENT_SUBSCRIBE_DATA = 1,          /*!< @if Eng Subscribe data @else 订阅数据 @endif */
+} ancs_client_subscribe_type_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of ancs servie character.
+ * @else
+ * @brief  ANCS服务特征。
+ * @endif
+ */
+typedef enum {
+    ANCS_CHAR_NOTIFY_SRC = 0,   /*!< @if Eng Notify source @else 通知源 @endif */
+    ANCS_CHAR_CTRL_POINT = 1,   /*!< @if Eng Control point @else 控制点 @endif */
+    ANCS_CHAR_DATA_SRC = 2,     /*!< @if Eng Data Source   @else 数据源 @endif */
+    ANCS_CHAR_INVALID,
+} ancs_character_t;
+
+/**
+ * @if Eng
+ * @brief  Enum of ancs error codes.
+ * @else
+ * @brief  ANCS客户端写特征响应错误码。
+ * @endif
+ */
+typedef enum {
+    ANCS_ERROR_CODE_UNKNOW_CMD = 0xA0,        /*!< @if Eng Unknown command @else 未知命令 @endif */
+    ANCS_ERROR_CODE_INVALID_CMD = 0xA1,       /*!< @if Eng Invalid command @else 无效命令 @endif */
+    ANCS_ERROR_CODE_INVALID_PARAM = 0xA2,     /*!< @if Eng Invalid parameter @else 无效参数 @endif */
+    ANCS_ERROR_CODE_ACTION_FAILED = 0xA3      /*!< @if Eng The action was not performed @else 行为没有被执行 @endif */
+} ancs_write_error_code_t;
+
+/**
+ * @if Eng
+ * @brief  Struct of ancs servie.
+ * @else
+ * @brief  ANCS服务。
+ * @endif
+ */
+typedef struct {
+    uint8_t client_id;                                 /*!< @if Eng Client id @else    客户端ID @endif */
+    uint16_t conn_id;                                  /*!< @if Eng Connect id @else   连接ID @endif */
+    uint16_t start_handle;                             /*!< @if Eng Start handle @else 开始handle @endif */
+    uint16_t end_handle;                               /*!< @if Eng End handle @else   结束handle @endif */
+    gattc_discovery_character_result_t notify_src;     /*!< @if Eng Notify source @else 通知源 @endif */
+    gattc_discovery_character_result_t ctl_point;      /*!< @if Eng Control point @else 控制点 @endif */
+    gattc_discovery_character_result_t data_src;       /*!< @if Eng Data Source   @else 数据源 @endif */
+    uint16_t notify_src_ccc_handle;                    /*!< @if Eng Notify source CCC handle
+                                                            @else 通知源CCC描述符handle @endif */
+    uint16_t data_src_ccc_handle;                      /*!< @if Eng Data source CCC handle
+                                                            @else 数据源CCC描述符handle @endif */
+} ble_ancs_service_t;
+
+
+/**
+ * @if Eng
+ * @brief  Struct of notification info.
+ * @else
+ * @brief  通知消息结构体。
+ * @endif
+ */
+typedef struct {
+    uint8_t event_id;                   /*!< @if Eng Event id {@ref ancs_event_id_t}
+                                             @else 事件ID {@ref ancs_event_id_t} @endif */
+    uint8_t event_flags;                /*!< @if Eng Event flags {@ref ancs_event_flags_t}
+                                             @else 事件标记 {@ref ancs_event_flags_t} @endif */
+    uint8_t category_id;                /*!< @if Eng Category id {@ref ancs_category_id_t}
+                                             @else 分类ID {@ref ancs_category_id_t} @endif */
+    uint8_t category_count;             /*!< @if Eng Category count @else 分类消息个数 @endif */
+    uint32_t notification_uid;          /*!< @if Eng Notify uuid @else 通知ID @endif */
+} ble_ancs_notification_src_t;
+
+/**
+ * @if Eng
+ * @brief Struct of attribute request
+ * @else
+ * @brief  属性请求结构体。
+ * @endif
+ */
+typedef struct {
+    uint8_t att_id;                 /*!< @if Eng Attribute id @else 属性ID @endif */
+    uint16_t att_max_length;        /*!< @if Eng Attribute max length
+                                         @else 属性值最大长度,仅用于通知属性【标题】【子标题】【消息】属性,其他属性传0 @endif */
+} ble_ancs_attr_req_t;
+
+/**
+ * @if Eng
+ * @brief  Struct of notify attribute request
+ * @else
+ * @brief  通知属性请求结构体。
+ * @endif
+ */
+typedef struct {
+    uint32_t notification_uid;          /*!< @if Eng Notify uuid @else 通知ID @endif */
+    uint16_t att_num;                   /*!< @if Eng Attribute num @else 属性个数 @endif */
+    ble_ancs_attr_req_t attr[0];        /*!< @if Eng Attribute array @else 属性ID数组 @endif */
+} ble_ancs_notification_attr_req_t;
+
+/**
+ * @if Eng
+ * @brief  Struct of attribute response
+ * @else
+ * @brief  属性响应结构体。
+ * @endif
+ */
+typedef struct {
+    uint8_t att_id;                 /*!< @if Eng Attribute id     @else 属性ID @endif */
+    uint16_t att_length;            /*!< @if Eng Attribute length @else 属性长度 @endif */
+    uint8_t *att;                   /*!< @if Eng Attribute value  @else 属性值 @endif */
+} ble_ancs_attr_rsp_t;
+
+/**
+ * @if Eng
+ * @brief  Struct of notify attribute response
+ * @else
+ * @brief  通知属性响应结构体。
+ * @endif
+ */
+typedef struct {
+    uint32_t notification_uid;     /*!< @if Eng Notify uuid @else 通知ID @endif */
+    uint16_t att_num;              /*!< @if Eng Attribute num @else 属性个数 @endif */
+    struct list_stru attr_rsp_lst; /*!< @if Eng Attribute list {@ref ble_ancs_attr_rsp_t}
+                                        @else 属性列表 {@ref ble_ancs_attr_rsp_t} @endif */
+} ble_ancs_notification_attr_rsp_t;
+
+/**
+ * @if Eng
+ * @brief  Struct of APP id
+ * @else
+ * @brief  应用ID
+ * @endif
+ */
+typedef struct {
+    uint16_t len;         /*!< @if Eng Length @else 长度 @endif */
+    uint8_t *id;          /*!< @if Eng Id @else ID @endif */
+} ble_ancs_app_id_t;
+
+/**
+ * @if Eng
+ * @brief  Struct of app attribute request
+ * @else
+ * @brief  应用属性请求结构体。
+ * @endif
+ */
+typedef struct {
+    ble_ancs_app_id_t app_id;      /*!< @if Eng App id @else 应用ID @endif */
+    uint16_t att_num;              /*!< @if Eng Attribute num @else 属性个数 @endif */
+    uint8_t attr_id[0];            /*!< @if Eng Attribute Array {@ref ancs_app_att_id_t}
+                                        @else 属性ID数组 {@ref ancs_app_att_id_t} @endif */
+} ble_ancs_app_attr_req_t;
+
+/**
+ * @if Eng
+ * @brief Struct of app attribute response
+ * @else
+ * @brief  应用属性响应结构体。
+ * @endif
+ */
+typedef struct {
+    ble_ancs_app_id_t app_id;      /*!< @if Eng App id @else 应用ID @endif */
+    uint16_t att_num;              /*!< @if Eng Attribute num @else 属性个数 @endif */
+    struct list_stru attr_rsp_lst; /*!< @if Eng Attribute list {@ref ble_ancs_attr_rsp_t}
+                                        @else 属性列表 {@ref ble_ancs_attr_rsp_t} @endif */
+} ble_ancs_app_attr_rsp_t;
+
+
+/**
+ * @if Eng
+ * @brief Struct of perform action request
+ * @else
+ * @brief  通知处理请求结构体。
+ * @endif
+ */
+typedef struct {
+    uint32_t notification_uid;        /*!< @if Eng Notify uuid @else 通知ID @endif */
+    uint8_t action_id;                /*!< @if Eng Action id {@ref ancs_action_id_t}
+                                           @else 行为ID {@ref ancs_action_id_t} @endif */
+} ble_ancs_notification_action_req_t;
+
+/**
+ * @if Eng
+ * @brief Callback invoked when client setup service complete.
+ * @par Callback invoked when client setup service complete.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] status    error code{ @ref errcode_bt_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see ble_ancs_client_callbacks_t
+ * @else
+ * @brief  ANCS客户端服务建立完成回调函数。
+ * @par    ANCS客户端服务建立完成回调函数。
+ * @attention
+ * @param [in] client_id 客户端ID。
+ * @param [in] conn_id   连接ID。
+ * @param [in] status    执行结果错误码{ @ref errcode_bt_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see ble_ancs_client_callbacks_t
+ * @endif
+ */
+typedef void (*ancs_client_setup_result_cbk)(uint8_t client_id, uint16_t conn_id, errcode_t status);
+
+/**
+ * @if Eng
+ * @brief Callback invoked when client subscribe character notify complete.
+ * @par Callback invoked when client subscribe character notify complete.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] type       subscribe type{ @ref ancs_client_subscribe_type_t }.
+ * @param [in] status    gatt error code{ @ref gatt_status_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_stru.h
+ * @see ble_ancs_client_callbacks_t
+ * @else
+ * @brief  ANCS客户端订阅特征通知结果回调函数。
+ * @par    ANCS客户端订阅特征通知结果回调函数。
+ * @attention
+ * @param [in] client_id 客户端ID。
+ * @param [in] conn_id   连接ID。
+ * @param [in] type      订阅类型{ @ref ancs_client_subscribe_type_t }.
+ * @param [in] status    gatt操作错误码{ @ref gatt_status_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_stru.h
+ * @see ble_ancs_client_callbacks_t
+ * @endif
+ */
+typedef void (*ancs_client_subscribe_result_cbk)(uint8_t client_id, uint16_t conn_id,
+    ancs_client_subscribe_type_t type, gatt_status_t status);
+
+/**
+ * @if Eng
+ * @brief Callback invoked when remote service push notify message.
+ * @par Callback invoked when remote service push notify message.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] notify_src notify message { @ref ble_ancs_notification_src_t }.
+ * @param [in] status    error code{ @ref errcode_bt_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see ble_ancs_client_callbacks_t
+ * @else
+ * @brief  ANCS远端服务推送通知消息回调函数。
+ * @par    ANCS远端服务推送通知消息回调函数。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] notify_src      通知消息 { @ref ble_ancs_notification_src_t }.
+ * @param [in] status    操作错误码{ @ref errcode_bt_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see ble_ancs_client_callbacks_t
+ * @endif
+ */
+typedef void (*ancs_client_notify_source_cbk)(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_notification_src_t *notify_src, errcode_t status);
+
+/**
+ * @if Eng
+ * @brief Callback invoked when remote service push notify attribute info.
+ * @par Callback invoked when remote service push notify attribute info.
+ * @attention
+ * @param [in] client_id       client ID.
+ * @param [in] conn_id         connect id.
+ * @param [in] notify_attr_rsp notify attribute info { @ref ble_ancs_notification_attr_rsp_t }.
+ * @param [in] status    error code{ @ref errcode_bt_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see ble_ancs_client_callbacks_t
+ * @else
+ * @brief  ANCS远端服务推送通知属性信息回调函数。
+ * @par    ANCS远端服务推送通知属性信息回调函数。
+ * @attention
+ * @param [in] client_id            客户端ID。
+ * @param [in] conn_id              连接ID。
+ * @param [in] notify_attr_rsp      通知属性信息 { @ref ble_ancs_notification_attr_rsp_t }.
+ * @param [in] status    操作错误码{ @ref errcode_bt_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see ble_ancs_client_callbacks_t
+ * @endif
+ */
+typedef void (*ancs_client_notification_attr_rsp_cbk)(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_notification_attr_rsp_t *notify_attr_rsp, errcode_t status);
+
+/**
+ * @if Eng
+ * @brief Callback invoked when remote service push app attribute info.
+ * @par Callback invoked when remote service push app attribute info.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] app_attr_rsp app attribute info { @ref ble_ancs_app_attr_rsp_t }.
+ * @param [in] status    error code{ @ref errcode_bt_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see ble_ancs_client_callbacks_t
+ * @else
+ * @brief  ANCS远端服务推送应用属性信息回调函数。
+ * @par    ANCS远端服务推送应用属性信息回调函数。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] app_attr_rsp    应用属性信息 { @ref ble_ancs_app_attr_rsp_t }.
+ * @param [in] status    操作错误码{ @ref errcode_bt_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see ble_ancs_client_callbacks_t
+ * @endif
+ */
+typedef void (*ancs_client_app_attr_rsp_cbk)(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_app_attr_rsp_t *app_attr_rsp, errcode_t status);
+
+/**
+ * @if Eng
+ * @brief Callback invoked when client write contro point complete.
+ * @par Callback invoked when client write contro point complete.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] status    gatt error code{ @ref gatt_status_t }.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_stru.h
+ * @see ble_ancs_client_callbacks_t
+ * @else
+ * @brief  AMS客户端写控制点特征响应回调函数。
+ * @par    AMS客户端写控制点特征响应回调函数。
+ * @attention
+ * @param [in] client_id      客户端ID。
+ * @param [in] conn_id        连接ID。
+ * @param [in] status         gatt操作错误码{ @ref gatt_status_t }。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_stru.h
+ * @see ble_ancs_client_callbacks_t
+ * @endif
+ */
+typedef void (*ancs_client_write_result_cbk)(uint8_t client_id, uint16_t conn_id, gatt_status_t status);
+
+/**
+ * @if Eng
+ * @brief Struct of GATT client callback function.
+ * @else
+ * @brief GATT client回调函数接口定义。
+ * @endif
+ */
+typedef struct {
+    ancs_client_setup_result_cbk           setup_cb;          /*!< @if Eng setup callback @else 客户端服务建立完成回调 @endif */
+    ancs_client_subscribe_result_cbk        subscribe_cb;     /*!< @if Eng subscribe callback @else 订阅特征通知结果回调 @endif */
+    ancs_client_notify_source_cbk           notify_source_cb; /*!< @if Eng notify source callback
+                                                                   @else 远端服务推送通知消息回调 @endif */
+    ancs_client_notification_attr_rsp_cbk   notify_attr_cb;   /*!< @if Eng notify attribute callback
+                                                                   @else 远端服务推送通知属性信息回调 @endif */
+    ancs_client_app_attr_rsp_cbk            app_attr_cb;      /*!< @if Eng app attribute callback
+                                                                   @else 远端服务推送应用属性信息回调 @endif */
+    ancs_client_write_result_cbk            write_result_cb;  /*!< @if Eng write result callback
+                                                                   @else 客户端写控制点特征请求响应回调 @endif */
+} ble_ancs_client_callbacks_t;
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client setup service.
+ * @par The interface of ANCS client setup service.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  ANCS客户端发起服务建立。
+ * @par    ANCS客户端发起服务建立。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ancs_client_setup_service(uint8_t client_id, uint16_t conn_id);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client discovery service result callback.
+ * @par The interface of ANCS client discovery service result callback.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] service    service info.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_client.h
+ * @see
+ * @else
+ * @brief  ANCS客户端发现服务结果处理接口。
+ * @par    ANCS客户端发现服务结果处理接口。
+ * @attention
+ * @param [in] client_id  客户端ID。
+ * @param [in] conn_id    连接ID。
+ * @param [in] service    ANCS 服务信息。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_client.h
+ * @see
+ * @endif
+ */
+void ble_ancs_client_discovery_service_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_service_result_t *service);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client discovery character result callback.
+ * @par The interface of ANCS client discovery character result callback.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] character    character info.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_client.h
+ * @see
+ * @else
+ * @brief  ANCS客户端发现特征结果处理接口。
+ * @par    ANCS客户端发现特征结果处理接口。
+ * @attention
+ * @param [in] client_id  客户端ID。
+ * @param [in] conn_id    连接ID。
+ * @param [in] character    ANCS 服务特征信息。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_client.h
+ * @see
+ * @endif
+ */
+void ble_ancs_client_discovery_character_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_character_result_t *character);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client discovery descriptor result callback.
+ * @par The interface of ANCS client discovery descriptor result callback.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] descriptor    descriptor info.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_client.h
+ * @see
+ * @else
+ * @brief  ANCS客户端发现描述符结果处理接口。
+ * @par    ANCS客户端发现描述符结果处理接口。
+ * @attention
+ * @param [in] client_id     客户端ID。
+ * @param [in] conn_id       连接ID。
+ * @param [in] descriptor    ANCS服务特征描述符信息。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_client.h
+ * @see
+ * @endif
+ */
+void ble_ancs_client_discovery_descriptor_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_descriptor_result_t *descriptor);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client receive notify info callback.
+ * @par The interface of ANCS client receive notify info callback.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] data       notify info.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_client.h
+ * @see
+ * @else
+ * @brief  ANCS客户端接收对端通知信息处理接口。
+ * @par    ANCS客户端接收对端通知信息处理接口。
+ * @attention
+ * @param [in] client_id  客户端ID。
+ * @param [in] conn_id    连接ID。
+ * @param [in] data       对端通知信息。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_client.h
+ * @see
+ * @endif
+ */
+void ble_ancs_client_notify_cbk(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *data);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client write response callback.
+ * @par The interface of ANCS client write response callback.
+ * @attention
+ * @param [in] client_id  client ID.
+ * @param [in] conn_id    connect id.
+ * @param [in] status     gatt status {@ref gatt_status_t}.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li  bts_gatt_stru.h
+ * @see
+ * @else
+ * @brief  ANCS客户端写请求响应结果处理接口。
+ * @par    ANCS客户端写请求响应结果处理接口。
+ * @attention
+ * @param [in] client_id  客户端ID。
+ * @param [in] conn_id    连接ID。
+ * @param [in] status     gatt 操作结果码 {@ref gatt_status_t}.
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li  bts_gatt_stru.h
+ * @see
+ * @endif
+ */
+void ble_ancs_client_write_cbk(uint8_t client_id, uint16_t conn_id, uint16_t handle, gatt_status_t status);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client subscribe notify source character notify.
+ * @par The interface of ANCS client subscribe notify source character notify.
+ * @attention
+ * @param [in] client_id      client ID.
+ * @param [in] conn_id        connect id.
+ * @param [in] enable_flag    enable/disable flag {@ref ancs_client_notify_enable_t}.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  ANCS客户端订阅通知源特征通知接口。
+ * @par    ANCS客户端订阅通知源特征通知接口。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] enable_flag     开启/关闭标记。 {@ref ancs_client_notify_enable_t}.
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ancs_client_subscribe_notification_source(uint8_t client_id, uint16_t conn_id,
+    ancs_client_notify_enable_t enable_flag);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client subscribe data source character notify.
+ * @par The interface of ANCS client subscribe data source character notify.
+ * @attention
+ * @param [in] client_id      client ID.
+ * @param [in] conn_id        connect id.
+ * @param [in] enable_flag    enable/disable flag {@ref ancs_client_notify_enable_t}.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  ANCS客户端订阅数据源特征通知接口。
+ * @par    ANCS客户端订阅数据源特征通知接口。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] enable_flag     开启/关闭标记。 {@ref ancs_client_notify_enable_t}.
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ancs_client_subscribe_data_source(uint8_t client_id, uint16_t conn_id,
+    ancs_client_notify_enable_t enable_flag);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client send get notify attribute command.
+ * @par The interface of ANCS client send get notify attribute command.
+ * @attention
+ * @param [in] client_id      client ID.
+ * @param [in] conn_id        connect id.
+ * @param [in] notify_att_req   notify attribute request {@ref ble_ancs_notification_attr_req_t}.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  ANCS客户端发送获取通知属性命令接口。
+ * @par    ANCS客户端发送获取通知属性命令接口。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] notify_att_req  通知属性请求。 {@ref ble_ancs_notification_attr_req_t}.
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ancs_client_send_get_notify_att_cmd(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_notification_attr_req_t *notify_att_req);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client send get app attribute command.
+ * @par The interface of ANCS client send get app attribute command.
+ * @attention
+ * @param [in] client_id      client ID.
+ * @param [in] conn_id        connect id.
+ * @param [in] app_att_req   app attribute request {@ref ble_ancs_app_attr_req_t}.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  ANCS客户端发送获取应用属性命令接口。
+ * @par    ANCS客户端发送获取应用属性命令接口。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] app_att_req  应用属性请求。 {@ref ble_ancs_app_attr_req_t}.
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ancs_client_send_get_app_att_cmd(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_app_attr_req_t *app_att_req);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client send perform notify action command.
+ * @par The interface of ANCS client send perform notify action command.
+ * @attention
+ * @param [in] client_id      client ID.
+ * @param [in] conn_id        connect id.
+ * @param [in] action_req     perform action request {@ref ble_ancs_notification_action_req_t}.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  ANCS客户端发送执行通知行为命令接口。
+ * @par    ANCS客户端发送执行通知行为命令接口。
+ * @attention
+ * @param [in] client_id       客户端ID。
+ * @param [in] conn_id         连接ID。
+ * @param [in] action_req      执行行为请求。 {@ref ble_ancs_notification_action_req_t}.
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ancs_client_send_perform_notify_action_cmd(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_notification_action_req_t *action_req);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client register callback.
+ * @par The interface of ANCS client register callback.
+ * @attention
+ * @param [in] func        the pointer of callback struct.
+ * @retval errcode_t {@ref errcode_bt_t}.
+ * @par Dependency:
+ * @li  bts_def.h
+ * @see
+ * @else
+ * @brief  ANCS客户端注册回调接口。
+ * @par    ANCS客户端注册回调接口。
+ * @attention
+ * @param [in] func         回调函数结构体指针。
+ * @retval 操作错误码 {@ref errcode_bt_t}.
+ * @par 依赖:
+ * @li  bts_def.h
+ * @see
+ * @endif
+ */
+errcode_t ble_ancs_client_register_callbacks(ble_ancs_client_callbacks_t *func);
+
+/**
+ * @if Eng
+ * @brief The interface of check service uuid whether or not ANCS service.
+ * @par The interface of check service uuid whether or not ANCS service.
+ * @attention
+ * @param [in] uuid         service uuid.
+ * @retval true or false    true:Yes, false:No.
+ * @par Dependency:
+ * @li
+ * @see
+ * @else
+ * @brief  ANCS客户端注册回调接口。
+ * @par    ANCS客户端注册回调接口。
+ * @attention
+ * @param [in] uuid         服务uuid。
+ * @retval 是或否 是:是ANCS服务,否:不是ANCS服务.
+ * @par 依赖:
+ * @li
+ * @see
+ * @endif
+ */
+bool is_ble_ancs_service(bt_uuid_t *uuid);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client clear stored remote ANCS service info by connect id.
+ * @par The interface of ANCS client clear stored remote ANCS service info by connect id.
+ * @attention
+ * @param [in] client_id         client ID.
+ * @param [in] conn_id           connect id.
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li
+ * @see
+ * @else
+ * @brief  ANCS客户端根据连接ID清理存储的对端ANCS服务信息。
+ * @par    ANCS客户端根据连接ID清理存储的对端ANCS服务信息。
+ * @attention
+ * @param [in] client_id         客户端ID。
+ * @param [in] conn_id           连接ID。
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li
+ * @see
+ * @endif
+ */
+void ble_ancs_client_clear_remote_by_conn(uint8_t client_id, uint16_t conn_id);
+
+/**
+ * @if Eng
+ * @brief The interface of ANCS client clear all stored remote ANCS service info.
+ * @par The interface of ANCS client clear all stored remote ANCS service info.
+ * @attention
+ * @retval #void no return value.
+ * @par Dependency:
+ * @li
+ * @see
+ * @else
+ * @brief  ANCS客户端清理所有存储的对端ANCS服务信息。
+ * @par    ANCS客户端清理所有存储的对端ANCS服务信息。
+ * @attention
+ * @retval 无返回值。
+ * @par 依赖:
+ * @li
+ * @see
+ * @endif
+ */
+void ble_ancs_client_clear_remote_all(void);
+
+/**
+ * @}
+ */
+#ifdef __cplusplus
+}
+#endif
+#endif
\ No newline at end of file
index 1473bfd..b626a1d 100755 (executable)
@@ -8,5 +8,7 @@ set(
     ${CMAKE_CURRENT_SOURCE_DIR}/ble_fmp_target.c
     ${CMAKE_CURRENT_SOURCE_DIR}/ble_fmp_locator.c
     ${CMAKE_CURRENT_SOURCE_DIR}/ble_gatts_callbacks.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/ble_ancs_client.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/ble_ams_client.c
 )
 set(BTH_SAMPLE_LIST "${BTH_SAMPLE_LIST}" "${bt_comm_src_list}" CACHE INTERNAL "bt ram obj list" FORCE)
diff --git a/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/ble_ams_client.c b/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/ble_ams_client.c
new file mode 100644 (file)
index 0000000..56f352e
--- /dev/null
@@ -0,0 +1,593 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2024. All rights reserved.
+ * Description: BLE Apple Media Service Client module.
+ */
+
+#include <string.h>
+#include "sdk_list.h"
+#include "errcode.h"
+#include "btsrv_log.h"
+#include "bts_le_gap.h"
+#include "sdk_general.h"
+#include "bts_uuid.h"
+#include "ble_ams_client.h"
+
+#define BLE_CLIENT_CHARACTERISTIC_CONFIGURATION_UUID 0x2902
+#define AMS_ENTITY_UPDATE_NOTIFY_VALUE_OFFSET 3
+#define AMS_ENTITY_UPDATE_NOTIFY_FLAGS_OFFSET 2
+#define AMS_STRING_SUFFIX_ZERO_BYTE 1
+
+#define u16_low_byte(uuid) ((uint8_t)((uuid) & 0x00FF))
+#define u16_high_byte(uuid) ((uint8_t)(((uuid) & 0xFF00) >> 8))
+
+/* AMS服务UUID,小端序 */
+uint8_t ams_uuid[BT_UUID_MAX_LEN] = {
+    0xDC, 0xF8, 0x55, 0xAD, 0x02, 0xC5, 0xF4, 0x8E, 0x3A, 0x43, 0x36, 0x0F, 0x2B, 0x50, 0xD3, 0x89};
+
+/* AMS服务特征UUID-Remote Command,小端序 */
+uint8_t rmt_cmd_uuid[BT_UUID_MAX_LEN] = {
+    0xC2, 0x51, 0xCA, 0xF7, 0x56, 0x0E, 0xDF, 0xB8, 0x8A, 0x4A, 0xB1, 0x57, 0xD8, 0x81, 0x3C, 0x9B};
+
+/* AMS服务特征UUID-Entity Update,小端序 */
+uint8_t entity_update_uuid[BT_UUID_MAX_LEN] = {
+    0x02, 0xC1, 0x96, 0xBA, 0x92, 0xBB, 0x0C, 0x9A, 0x1F, 0x41, 0x8D, 0x80, 0xCE, 0xAB, 0x7C, 0x2F};
+
+/* AMS服务特征UUID-Entity Attribute,小端序 */
+uint8_t entity_att_uuid[BT_UUID_MAX_LEN] = {
+    0xD7, 0xD5, 0xBB, 0x70, 0xA8, 0xA3, 0xAB, 0xA6, 0xD8, 0x46, 0xAB, 0x23, 0x8C, 0xF3, 0xB2, 0xC6};
+
+/* AMS客户端回调函数结构体 */
+ble_ams_client_callbacks_t g_ams_callbacks_t = {0};
+
+/* 对端AMS服务信息 */
+struct list_stru g_ble_ams_service_list = {NULL, NULL};
+
+/* 根据连接ID查询存储的对端AMS服务信息 */
+static ble_ams_service_t* ams_service_remote_by_conn(uint8_t client_id, uint16_t conn_id)
+{
+    ble_ams_service_t *node = (ble_ams_service_t *)g_ble_ams_service_list.head;
+    while (node != NULL) {
+        if ((node->client_id == client_id) && (node->conn_id == conn_id)) {
+            return node;
+        }
+        node = lnext(node);
+    }
+
+    return NULL;
+}
+
+/* AMS客户端发起服务建立 */
+errcode_t ble_ams_client_setup_service(uint8_t client_id, uint16_t conn_id)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote != NULL) {
+        bts_error("ams client remote service is already exist,client_id:%u, conn_id:%u.\r\n",
+            client_id, conn_id);
+        return ERRCODE_BT_DONE;
+    }
+
+    bt_uuid_t service_uuid = {0};
+    service_uuid.uuid_len = BT_UUID_MAX_LEN;
+    if (memcpy_s(service_uuid.uuid, BT_UUID_MAX_LEN, ams_uuid, BT_UUID_MAX_LEN) != EOK) {
+        bts_error("[btsrv][ERROR] uuid memcpy fail!\r\n");
+        return ERRCODE_BT_FAIL;
+    }
+    return gattc_discovery_service(client_id, conn_id, &service_uuid);
+}
+
+/* 发现服务回调函数 */
+void ble_ams_client_discovery_service_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_service_result_t *service)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote != NULL) {
+        bts_error("ams client remote service is already exist,client_id:%u, conn_id:%u.\r\n",
+            client_id, conn_id);
+        return;
+    }
+    remote = bt_sdk_list_node_create(sizeof(ble_ams_service_t));
+    if (remote == NULL) {
+        bts_info("ams client remote node create fail.\r\n");
+        return;
+    }
+    remote->client_id = client_id;
+    remote->conn_id = conn_id;
+    remote->start_handle = service->start_hdl;
+    remote->end_handle = service->end_hdl;
+    bt_sdk_list_add_tail(&g_ble_ams_service_list, remote);
+
+    /* 发现特征 */
+    gattc_discovery_character_param_t param = {0};
+    param.service_handle = remote->start_handle;
+    errcode_t ret = gattc_discovery_character(client_id, conn_id, &param);
+    bts_info("ams client discovery character ret:%u.\r\n", ret);
+}
+
+/* AMS服务特征匹配 */
+static ams_character_t ams_char_match(bt_uuid_t *uuid)
+{
+    if (uuid->uuid_len != BT_UUID_MAX_LEN) {
+        return AMS_CHAR_INVALID;
+    }
+    bt_uuid_t char_uuid = {0};
+    char_uuid.uuid_len = BT_UUID_MAX_LEN;
+    if (memcpy_s(char_uuid.uuid, BT_UUID_MAX_LEN, rmt_cmd_uuid, BT_UUID_MAX_LEN) != EOK) {
+        bts_error("[btsrv][ERROR] remote cmd uuid memcpy fail!\r\n");
+        return AMS_CHAR_INVALID;
+    }
+    if (memcmp(&char_uuid, uuid, sizeof(bt_uuid_t)) == 0) {
+        return AMS_CHAR_REMOTE_CMD;
+    }
+    if (memcpy_s(char_uuid.uuid, BT_UUID_MAX_LEN, entity_update_uuid, BT_UUID_MAX_LEN) != EOK) {
+        bts_error("[btsrv][ERROR] entity update uuid memcpy fail!\r\n");
+        return AMS_CHAR_INVALID;
+    }
+    if (memcmp(&char_uuid, uuid, sizeof(bt_uuid_t)) == 0) {
+        return AMS_CHAR_ENTITY_UPDATE;
+    }
+    if (memcpy_s(char_uuid.uuid, BT_UUID_MAX_LEN, entity_att_uuid, BT_UUID_MAX_LEN) != EOK) {
+        bts_error("[btsrv][ERROR] entity att uuid memcpy fail!\r\n");
+        return AMS_CHAR_INVALID;
+    }
+    if (memcmp(&char_uuid, uuid, sizeof(bt_uuid_t)) == 0) {
+        return AMS_CHAR_ENTITY_ATTR;
+    }
+    return AMS_CHAR_INVALID;
+}
+
+/* 发现特征回调函数 */
+void ble_ams_client_discovery_character_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_character_result_t *character)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        return;
+    }
+
+    if ((character->declare_handle < remote->start_handle) ||
+        (character->declare_handle > remote->end_handle)) {
+        bts_error("ams client remote service did not have this character_handle:%u conn_id:%u\n",
+            character->declare_handle, conn_id);
+        return;
+    }
+
+    switch (ams_char_match(&(character->uuid))) {
+        case AMS_CHAR_REMOTE_CMD: {
+            remote->remote_cmd.declare_handle = character->declare_handle;
+            remote->remote_cmd.value_handle = character->value_handle;
+            remote->remote_cmd.properties = character->properties;
+
+            /* 发现描述符 */
+            gattc_discovery_descriptor(client_id, conn_id, character->declare_handle);
+            break;
+        }
+
+        case AMS_CHAR_ENTITY_UPDATE: {
+            remote->entity_update.declare_handle = character->declare_handle;
+            remote->entity_update.value_handle = character->value_handle;
+            remote->entity_update.properties = character->properties;
+
+            /* 发现描述符 */
+            gattc_discovery_descriptor(client_id, conn_id, character->declare_handle);
+            break;
+        }
+
+        case AMS_CHAR_ENTITY_ATTR: {
+            remote->entity_attr.declare_handle = character->declare_handle;
+            remote->entity_attr.value_handle = character->value_handle;
+            remote->entity_attr.properties = character->properties;
+            break;
+        }
+
+        default:
+            bts_error("[btsrv][INFO] invalid character!\r\n");
+            break;
+    }
+}
+
+/* 发现描述符回调函数 */
+void ble_ams_client_discovery_descriptor_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_descriptor_result_t *descriptor)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        return;
+    }
+
+    if (descriptor->descriptor_hdl < remote->start_handle ||
+        descriptor->descriptor_hdl > remote->end_handle) {
+        bts_error("ams client remote service did not have this descriptor_handle:%u conn_id:%u\n",
+            descriptor->descriptor_hdl, conn_id);
+        return;
+    }
+
+    /* 客户端特征配置描述符 */
+    bt_uuid_t ccc_uuid = {0};
+    bts_data_to_uuid_len2(BLE_CLIENT_CHARACTERISTIC_CONFIGURATION_UUID, &ccc_uuid);
+    if (!bts_uuid_is_equal(&ccc_uuid, &(descriptor->uuid))) {
+        return;
+    }
+
+    uint16_t cmd_ccc_max_handle = remote->end_handle;
+    uint16_t entity_ccc_max_handle = remote->end_handle;
+
+    if ((remote->entity_update.value_handle != 0) &&
+        (remote->remote_cmd.value_handle != 0) &&
+        (remote->remote_cmd.value_handle < remote->entity_update.value_handle)) {
+        cmd_ccc_max_handle = remote->entity_update.value_handle - 1;
+    } else if ((remote->remote_cmd.value_handle != 0) &&
+        (remote->entity_update.value_handle != 0) &&
+        (remote->remote_cmd.value_handle > remote->entity_update.value_handle)) {
+        entity_ccc_max_handle = remote->remote_cmd.value_handle - 1;
+    }
+
+    if ((remote->remote_cmd.value_handle != 0) &&
+        (descriptor->descriptor_hdl > remote->remote_cmd.value_handle) &&
+        (descriptor->descriptor_hdl <= cmd_ccc_max_handle)) {
+        remote->remote_cmd_ccc_handle = descriptor->descriptor_hdl;
+    } else if ((remote->entity_update.value_handle != 0) &&
+        (descriptor->descriptor_hdl > remote->entity_update.value_handle) &&
+        (descriptor->descriptor_hdl <= entity_ccc_max_handle)) {
+        remote->entity_update_ccc_handle = descriptor->descriptor_hdl;
+    }
+
+    if ((remote->remote_cmd_ccc_handle != 0) &&
+        (remote->entity_update_ccc_handle != 0)) {
+        if (g_ams_callbacks_t.setup_cb != NULL) {
+            g_ams_callbacks_t.setup_cb(client_id, conn_id, ERRCODE_BT_SUCCESS);
+        }
+    }
+}
+
+/* 处理远端命令上报信息 */
+static void remote_cmd_rpt_handle(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *data)
+{
+    errcode_t status = ERRCODE_BT_SUCCESS;
+    ble_ams_remote_cmd_rpt_t *rpt_data = bt_os_new(sizeof(ble_ams_remote_cmd_rpt_t) + data->data_len);
+    rpt_data->cmd_num = data->data_len;
+    if (memcpy_s(rpt_data->remote_cmd, rpt_data->cmd_num, data->data, rpt_data->cmd_num) != EOK) {
+        bts_error("[btsrv][ERROR] remote cmd rpt memcpy fail!\r\n");
+        status = ERRCODE_BT_MEMCPY_FAIL;
+    }
+
+    if (g_ams_callbacks_t.remote_cmd_cb != NULL) {
+        g_ams_callbacks_t.remote_cmd_cb(client_id, conn_id, rpt_data, status);
+    }
+    bt_os_free(rpt_data);
+}
+
+/* 处理实体更新上报信息 */
+static void entity_update_rpt_handle(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *data)
+{
+    errcode_t status = ERRCODE_BT_SUCCESS;
+    uint16_t value_len = data->data_len - AMS_ENTITY_UPDATE_NOTIFY_VALUE_OFFSET;
+    ble_ams_entity_update_rpt_t *rpt_data = bt_os_new(
+        sizeof(ble_ams_entity_update_rpt_t) + value_len + AMS_STRING_SUFFIX_ZERO_BYTE);
+    rpt_data->entity_id = *(data->data);
+    rpt_data->att_id = *(data->data + sizeof(uint8_t));
+    rpt_data->entity_update_flags = *(data->data + AMS_ENTITY_UPDATE_NOTIFY_FLAGS_OFFSET);
+    rpt_data->value_length = value_len + AMS_STRING_SUFFIX_ZERO_BYTE;
+    if (memcpy_s(rpt_data->value, rpt_data->value_length,
+        (data->data + AMS_ENTITY_UPDATE_NOTIFY_VALUE_OFFSET), value_len) != EOK) {
+        bts_error("[btsrv][ERROR] entity update rpt memcpy fail!\r\n");
+        status = ERRCODE_BT_MEMCPY_FAIL;
+    }
+    rpt_data->value[rpt_data->value_length - 1] = 0; /* 字符串拼接末尾0 */
+
+    if (g_ams_callbacks_t.entity_update_cb != NULL) {
+        g_ams_callbacks_t.entity_update_cb(client_id, conn_id, rpt_data, status);
+    }
+    bt_os_free(rpt_data);
+}
+
+/* 特征通知回调函数 */
+void ble_ams_client_notify_cbk(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *data)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        return;
+    }
+
+    /* Remote Command */
+    /* 数据格式:RemoteCommandID 1(1B)|RemoteCommandID 2(1B)|... */
+    if (data->handle == remote->remote_cmd.value_handle) {
+        remote_cmd_rpt_handle(client_id, conn_id, data);
+
+    /* Entity Update */
+    /* 数据格式:EntityID(1B)|AttributeID(1B)|EntityUpdateFlags(1B)|Value(动态) */
+    } else if (data->handle == remote->entity_update.value_handle) {
+        entity_update_rpt_handle(client_id, conn_id, data);
+    }
+}
+
+/* AMS客户端订阅结果处理函数 */
+static void ble_ams_client_subscribe_result(uint8_t client_id, uint16_t conn_id,
+    ams_client_subscribe_type_t type, gatt_status_t status)
+{
+    if (g_ams_callbacks_t.subscribe_cb != NULL) {
+        g_ams_callbacks_t.subscribe_cb(client_id, conn_id, type, status);
+    }
+}
+
+/* 注册感兴趣实体属性响应结果处理 */
+static void ble_ams_client_write_character_rsp(uint8_t client_id, uint16_t conn_id,
+    ams_client_write_character_type_t type,
+    gatt_status_t status)
+{
+    if (g_ams_callbacks_t.write_rsp_cb != NULL) {
+        g_ams_callbacks_t.write_rsp_cb(client_id, conn_id, type, status);
+    }
+}
+
+/* 写请求响应回调函数 */
+void ble_ams_client_write_cbk(uint8_t client_id, uint16_t conn_id, uint16_t handle, gatt_status_t status)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        return;
+    }
+
+    if (handle == (remote->remote_cmd_ccc_handle)) {
+        ble_ams_client_subscribe_result(client_id, conn_id, AMS_CLIENT_SUBSCRIBE_REMOTE_CMD, status);
+    } else if (handle == (remote->entity_update_ccc_handle)) {
+        ble_ams_client_subscribe_result(client_id, conn_id, AMS_CLIENT_SUBSCRIBE_ENTITY_UPDATE, status);
+    } else if (handle == (remote->entity_update.value_handle)) {
+        ble_ams_client_write_character_rsp(client_id, conn_id, AMS_CLIENT_WRITE_ENTITY_UPDATE, status);
+    } else if (handle == (remote->remote_cmd.value_handle)) {
+        ble_ams_client_write_character_rsp(client_id, conn_id, AMS_CLIENT_WRITE_REMOTE_CMD, status);
+    } else if (handle == (remote->entity_attr.value_handle)) {
+        ble_ams_client_write_character_rsp(client_id, conn_id, AMS_CLIENT_WRITE_ENTITY_ATTRIBUTE, status);
+    }
+}
+
+/* 读请求响应回调函数 */
+void ble_ams_client_read_cbk(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *read_result,
+    gatt_status_t status)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        return;
+    }
+
+    if (read_result->handle != remote->entity_attr.value_handle) {
+        return;
+    }
+ 
+    ble_ams_full_attr_value_t *full_value = bt_os_new(sizeof(ble_ams_full_attr_value_t) + read_result->data_len + 1);
+    full_value->value_len = read_result->data_len + 1;
+    if (read_result->data_len != 0) {
+        if (memcpy_s(full_value->value, full_value->value_len, read_result->data, read_result->data_len) != EOK) {
+            bts_error("[btsrv][ERROR] read result memcpy fail!\r\n");
+            bt_os_free(full_value);
+            return;
+        }
+    }
+    *(full_value->value + full_value->value_len - 1) = 0; /* 字符串末尾拼接0 */
+
+    if (g_ams_callbacks_t.read_full_attr_result_cb != NULL) {
+        g_ams_callbacks_t.read_full_attr_result_cb(client_id, conn_id, full_value, status);
+    }
+    bt_os_free(full_value);
+}
+
+/* 订阅远端命令特征通知 */
+errcode_t ble_ams_client_subscribe_remote_cmd(uint8_t client_id, uint16_t conn_id,
+    ams_client_notify_enable_t enable_flag)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        bts_error("ams client remote service is not exist, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (remote->remote_cmd_ccc_handle == 0) {
+        bts_error("ams client remote service did not discovery notify ccc, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    uint16_t ccc_value = BLE_AMS_CLIENT_CHARACTERISTIC_CONFIGURATION_DEFAULT;
+    if (enable_flag == AMS_CLIENT_NOTIFY_ENABLE) {
+        ccc_value = BLE_AMS_CLIENT_CHARACTERISTIC_CONFIGURATION_NOTIFICATION;
+    }
+    uint8_t notify_ccc_val[] = {
+        u16_low_byte(ccc_value),
+        u16_high_byte(ccc_value)
+    };
+    gattc_handle_value_t value = {0};
+    value.data_len = (uint16_t)sizeof(notify_ccc_val);
+    value.data = notify_ccc_val;
+    value.handle = remote->remote_cmd_ccc_handle;
+    return gattc_write_req(client_id, conn_id, &value);
+}
+
+/* 订阅实体更新特征通知 */
+errcode_t ble_ams_client_subscribe_entity_update(uint8_t client_id, uint16_t conn_id,
+    ams_client_notify_enable_t enable_flag)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        bts_error("ams client remote service is not exist, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (remote->entity_update_ccc_handle == 0) {
+        bts_error("ams client remote service did not discovery notify ccc, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    uint16_t ccc_value = BLE_AMS_CLIENT_CHARACTERISTIC_CONFIGURATION_DEFAULT;
+    if (enable_flag == AMS_CLIENT_NOTIFY_ENABLE) {
+        ccc_value = BLE_AMS_CLIENT_CHARACTERISTIC_CONFIGURATION_NOTIFICATION;
+    }
+    uint8_t notify_ccc_val[] = {
+        u16_low_byte(ccc_value),
+        u16_high_byte(ccc_value)
+    };
+    gattc_handle_value_t value = {0};
+    value.data_len = (uint16_t)sizeof(notify_ccc_val);
+    value.data = notify_ccc_val;
+    value.handle = remote->entity_update_ccc_handle;
+    return gattc_write_req(client_id, conn_id, &value);
+}
+
+/* 发送远端命令 */
+errcode_t ble_ams_client_send_remote_cmd(uint8_t client_id, uint16_t conn_id,
+    ams_remote_cmd_id_t cmd_id)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        bts_error("ams client remote service is not exist, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (remote->remote_cmd.value_handle == 0) {
+        bts_error("ams client did not discovery character, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    uint8_t data = (uint8_t)cmd_id;
+    gattc_handle_value_t value = {0};
+    value.data_len = (uint16_t)sizeof(uint8_t);
+    value.data = &data;
+    value.handle = remote->remote_cmd.value_handle;
+    return gattc_write_req(client_id, conn_id, &value);
+}
+
+/* 注册感兴趣的实体属性 */
+errcode_t ble_ams_client_register_interested_entity_attribute(uint8_t client_id, uint16_t conn_id,
+    ble_ams_interested_entity_attr_req_t *entity_attr_req)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        bts_error("ams client remote service is not exist, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (remote->entity_update.value_handle == 0) {
+        bts_error("ams client did not discovery character, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (entity_attr_req->att_num == 0) {
+        bts_error("ams client attr req param error, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_PARAM_ERR;
+    }
+
+    uint16_t data_length = sizeof(uint8_t) + (entity_attr_req->att_num) * sizeof(uint8_t);
+    uint8_t *data = bt_os_new(data_length);
+    uint8_t *pt_data = data;
+    *pt_data = entity_attr_req->entity_id;
+    pt_data = pt_data + 1;
+    for (int i = 0; i < entity_attr_req->att_num; i++) {
+        *(pt_data + i) = entity_attr_req->att_id[i];
+    }
+
+    gattc_handle_value_t value = {0};
+    value.data_len = data_length;
+    value.data = data;
+    value.handle = remote->entity_update.value_handle;
+    errcode_t result = gattc_write_req(client_id, conn_id, &value);
+    bt_os_free(data);
+    return result;
+}
+
+/* 获取完整的实体属性 */
+errcode_t ble_ams_client_retrieve_full_entity_attribute(uint8_t client_id, uint16_t conn_id,
+    ble_ams_full_entity_attr_cmd_t *full_attr_req)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        bts_error("ams client remote service is not exist, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (remote->entity_attr.value_handle == 0) {
+        bts_error("ams client did not discovery character, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    gattc_handle_value_t value = {0};
+    value.data_len = (uint16_t)sizeof(ble_ams_full_entity_attr_cmd_t);
+    value.data = full_attr_req;
+    value.handle = remote->entity_attr.value_handle;
+    return gattc_write_req(client_id, conn_id, &value);
+}
+
+/* 读取完整的实体属性 */
+errcode_t ble_ams_client_read_full_entity_attribute(uint8_t client_id, uint16_t conn_id)
+{
+    ble_ams_service_t *remote = ams_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        bts_error("ams client remote service is not exist, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (remote->entity_attr.value_handle == 0) {
+        bts_error("ams client did not discovery character, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+    return gattc_read_req_by_handle(client_id, conn_id, remote->entity_attr.value_handle);
+}
+
+/* 注册AMS客户端回调函数 */
+errcode_t ble_ams_client_register_callbacks(ble_ams_client_callbacks_t *func)
+{
+    if (memcpy_s(&g_ams_callbacks_t, sizeof(g_ams_callbacks_t), func, sizeof(ble_ams_client_callbacks_t)) != EOK) {
+        return ERRCODE_BT_MEMCPY_FAIL;
+    }
+    return ERRCODE_BT_SUCCESS;
+}
+
+/* AMS服务判断 */
+bool is_ble_ams_service(bt_uuid_t *uuid)
+{
+    bt_uuid_t ams_service_uuid = {0};
+    ams_service_uuid.uuid_len = BT_UUID_MAX_LEN;
+    if (memcpy_s(ams_service_uuid.uuid, BT_UUID_MAX_LEN, ams_uuid, BT_UUID_MAX_LEN) != EOK) {
+        bts_error("[BLE]service uuid memcpy error! \n");
+        return false;
+    }
+    if (ams_service_uuid.uuid_len != uuid->uuid_len) {
+        return false;
+    }
+
+    return (memcmp(uuid, &ams_service_uuid, sizeof(bt_uuid_t)) == 0 ? true : false);
+}
+
+/* 根据连接ID清理存储的对端AMS服务信息 */
+void ble_ams_client_clear_remote_by_conn(uint8_t client_id, uint16_t conn_id)
+{
+    ble_ams_service_t *node = NULL;
+    node = ams_service_remote_by_conn(client_id, conn_id);
+    if (node != NULL) {
+        bt_sdk_list_remove(&g_ble_ams_service_list, node);
+        sdk_list_node_free(node);
+    }
+}
+
+/* 清理所有存储的对端AMS服务信息 */
+void ble_ams_client_clear_remote_all(void)
+{
+    ble_ams_service_t *node = (ble_ams_service_t *)g_ble_ams_service_list.head;
+    ble_ams_service_t *cur_node = NULL;
+    while (node != NULL) {
+        cur_node = node;
+        node = lnext(node);
+        bt_sdk_list_remove(&g_ble_ams_service_list, cur_node);
+        sdk_list_node_free(cur_node);
+        cur_node = NULL;
+    }
+}
diff --git a/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/ble_ancs_client.c b/code/sdk/protocol/bt/host/bt/bts/bt_sample/ble_profile/profiles/src/ble_ancs_client.c
new file mode 100644 (file)
index 0000000..244b8ad
--- /dev/null
@@ -0,0 +1,896 @@
+/*
+ * Copyright (c) @CompanyNameMagicTag 2024. All rights reserved.
+ * Description: BLE Apple Notification Center Service Client module.
+ */
+
+#include <string.h>
+#include "sdk_list.h"
+#include "datatype.h"
+#include "errcode.h"
+#include "btsrv_log.h"
+#include "bts_le_gap.h"
+#include "sdk_general.h"
+#include "bts_uuid.h"
+#include "ble_gatts_callbacks.h"
+#include "ble_ancs_client.h"
+
+#define BLE_CLIENT_CHARACTERISTIC_CONFIGURATION_UUID 0x2902
+#define ANCS_NOTIFY_ATT_ID_OFFSET 5
+#define ANCS_NOTIFY_ATT_MAX_LENGTH_BYTE 2
+#define ANCS_NOTIFY_ACTION_ID_OFFSET 5
+#define ANCS_NOTIFY_ATT_VALUE_OFFSET 3
+#define BLE_ATT_HEADER_LEN 3
+#define BLE_ANCS_DATA_MAX_LEN 512
+#define ANCS_NOTIFY_UUID_BYTE_LENGTH 4
+#define ANCS_NOTIFY_SOURCE_LENGTH 8
+#define ANCS_NOTIFY_ATT_DATA_HEADER_LENGTH 8
+
+#define u16_low_byte(data) ((uint8_t)((data) & 0x00FF))
+#define u16_high_byte(data) ((uint8_t)(((data) & 0xFF00) >> 8))
+#define little_u8_2_u16(p)   ((((uint16_t)(*((p) + 1))) << 8) | ((uint16_t)(*(p))))
+#define u32_2_little_first_byte(uuid) ((uint8_t)((uuid) & 0x000000FF))
+#define u32_2_little_second_byte(uuid) ((uint8_t)(((uuid) & 0x0000FF00) >> 8))
+#define u32_2_little_three_byte(uuid) ((uint8_t)(((uuid) & 0x00FF0000) >> 16))
+#define u32_2_little_four_byte(uuid) ((uint8_t)(((uuid) & 0xFF000000) >> 24))
+#define little_byte_2_u32(data) (((uint32_t)(*(data))) | \
+    ((uint32_t)(((uint32_t)*((data) + BT_INDEX_1)) << 8)) | \
+    ((uint32_t)(((uint32_t)*((data) + BT_INDEX_2)) << 16)) | \
+    ((uint32_t)(((uint32_t)*((data) + BT_INDEX_3)) << 24)))
+
+/* ANCS服务UUID,小端序 */
+uint8_t ancs_uuid[BT_UUID_MAX_LEN] = {
+    0xD0, 0x00, 0x2D, 0x12, 0x1E, 0x4B, 0x0F, 0xA4, 0x99, 0x4E, 0xCE, 0xB5, 0x31, 0xF4, 0x05, 0x79};
+
+/* ANCS服务特征UUID-Notification Source,小端序 */
+uint8_t notify_src_uuid[BT_UUID_MAX_LEN] = {
+    0xBD, 0x1D, 0xA2, 0x99, 0xE6, 0x25, 0x58, 0x8C, 0xD9, 0x42, 0x01, 0x63, 0x0D, 0x12, 0xBF, 0x9F};
+
+/* ANCS服务特征UUID-Control Point,小端序 */
+uint8_t ctl_point_uuid[BT_UUID_MAX_LEN] = {
+    0xD9, 0xD9, 0xAA, 0xFD, 0xBD, 0x9B, 0x21, 0x98, 0xA8, 0x49, 0xE1, 0x45, 0xF3, 0xD8, 0xD1, 0x69};
+
+/* ANCS服务特征UUID-Data Source,小端序 */
+uint8_t data_src_uuid[BT_UUID_MAX_LEN] = {
+    0xFB, 0x7B, 0x7C, 0xCE, 0x6A, 0xB3, 0x44, 0xBE, 0xB5, 0x4B, 0xD6, 0x24, 0xE9, 0xC6, 0xEA, 0x22};
+
+ble_ancs_client_callbacks_t g_ancs_callbacks_t = {0};
+struct list_stru g_ble_ancs_service_list = {NULL, NULL}; /* ble_ancs_service_t */
+
+/* 根据连接ID查询ANCS服务信息 */
+static ble_ancs_service_t* ancs_service_remote_by_conn(uint8_t client_id, uint16_t conn_id)
+{
+    ble_ancs_service_t *node = (ble_ancs_service_t *)g_ble_ancs_service_list.head;
+    while (node != NULL) {
+        if ((node->client_id == client_id) && (node->conn_id == conn_id)) {
+            return node;
+        }
+        node = lnext(node);
+    }
+
+    return NULL;
+}
+
+/* ANCS服务特征匹配 */
+static ancs_character_t ancs_char_match(bt_uuid_t *uuid)
+{
+    if (uuid->uuid_len != BT_UUID_MAX_LEN) {
+        return ANCS_CHAR_INVALID;
+    }
+    bt_uuid_t char_uuid = {0};
+    char_uuid.uuid_len = BT_UUID_MAX_LEN;
+    if (memcpy_s(char_uuid.uuid, BT_UUID_MAX_LEN, notify_src_uuid, BT_UUID_MAX_LEN) != EOK) {
+        bts_error("[btsrv][ERROR] notify src uuid memcpy fail!\r\n");
+        return ANCS_CHAR_INVALID;
+    }
+    if (memcmp(&char_uuid, uuid, sizeof(bt_uuid_t)) == 0) {
+        return ANCS_CHAR_NOTIFY_SRC;
+    }
+    if (memcpy_s(char_uuid.uuid, BT_UUID_MAX_LEN, ctl_point_uuid, BT_UUID_MAX_LEN) != EOK) {
+        bts_error("[btsrv][ERROR] ctl point uuid memcpy fail!\r\n");
+        return ANCS_CHAR_INVALID;
+    }
+    if (memcmp(&char_uuid, uuid, sizeof(bt_uuid_t)) == 0) {
+        return ANCS_CHAR_CTRL_POINT;
+    }
+    if (memcpy_s(char_uuid.uuid, BT_UUID_MAX_LEN, data_src_uuid, BT_UUID_MAX_LEN) != EOK) {
+        bts_error("[btsrv][ERROR] data src uuid memcpy fail!\r\n");
+        return ANCS_CHAR_INVALID;
+    }
+    if (memcmp(&char_uuid, uuid, sizeof(bt_uuid_t)) == 0) {
+        return ANCS_CHAR_DATA_SRC;
+    }
+    return ANCS_CHAR_INVALID;
+}
+
+/* ANCS客户端发起服务建立 */
+errcode_t ble_ancs_client_setup_service(uint8_t client_id, uint16_t conn_id)
+{
+    ble_ancs_service_t *remote = ancs_service_remote_by_conn(client_id, conn_id);
+    if (remote != NULL) {
+        bts_error("ancs client remote service is already exist,client_id:%u, conn_id:%u.\r\n",
+            client_id, conn_id);
+        return ERRCODE_BT_DONE;
+    }
+    bt_uuid_t service_uuid = {0};
+    service_uuid.uuid_len = BT_UUID_MAX_LEN;
+    if (memcpy_s(service_uuid.uuid, BT_UUID_MAX_LEN, ancs_uuid, BT_UUID_MAX_LEN) != EOK) {
+        bts_error("[btsrv][ERROR] uuid memcpy fail!\r\n");
+        return ERRCODE_BT_FAIL;
+    }
+    return gattc_discovery_service(client_id, conn_id, &service_uuid);
+}
+
+/* ANCS客户端发现服务回调处理函数 */
+void ble_ancs_client_discovery_service_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_service_result_t *service)
+{
+    ble_ancs_service_t *remote = ancs_service_remote_by_conn(client_id, conn_id);
+    if (remote != NULL) {
+        bts_error("ancs client remote service is already exist,client_id:%u, conn_id:%u.\r\n",
+            client_id, conn_id);
+        return;
+    }
+    remote = bt_sdk_list_node_create(sizeof(ble_ancs_service_t));
+    if (remote == NULL) {
+        bts_info("ancs client remote node create fail.\r\n");
+        return;
+    }
+    remote->client_id = client_id;
+    remote->conn_id = conn_id;
+    remote->start_handle = service->start_hdl;
+    remote->end_handle = service->end_hdl;
+    bt_sdk_list_add_tail(&g_ble_ancs_service_list, remote);
+
+    /* 发现特征 */
+    gattc_discovery_character_param_t param = {0};
+    param.service_handle = remote->start_handle;
+    errcode_t ret = gattc_discovery_character(client_id, conn_id, &param);
+    bts_info("ancs client discovery character ret:%u.\r\n", ret);
+}
+
+/* ANCS客户端发现特征回调处理函数 */
+void ble_ancs_client_discovery_character_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_character_result_t *character)
+{
+    ble_ancs_service_t *remote = ancs_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        return;
+    }
+
+    if ((character->declare_handle < remote->start_handle) ||
+        (character->declare_handle > remote->end_handle)) {
+        bts_error("ancs client remote service did not have this character_handle:%u conn_id:%u\n",
+            character->declare_handle, conn_id);
+        return;
+    }
+
+    switch (ancs_char_match(&(character->uuid))) {
+        case ANCS_CHAR_NOTIFY_SRC: {
+            remote->notify_src.declare_handle = character->declare_handle;
+            remote->notify_src.value_handle = character->value_handle;
+            remote->notify_src.properties = character->properties;
+
+            /* 发现描述符 */
+            gattc_discovery_descriptor(client_id, conn_id, character->declare_handle);
+            break;
+        }
+
+        case ANCS_CHAR_DATA_SRC: {
+            remote->data_src.declare_handle = character->declare_handle;
+            remote->data_src.value_handle = character->value_handle;
+            remote->data_src.properties = character->properties;
+
+            /* 发现描述符 */
+            gattc_discovery_descriptor(client_id, conn_id, character->declare_handle);
+            break;
+        }
+
+        case ANCS_CHAR_CTRL_POINT: {
+            remote->ctl_point.declare_handle = character->declare_handle;
+            remote->ctl_point.value_handle = character->value_handle;
+            remote->ctl_point.properties = character->properties;
+            break;
+        }
+
+        default:
+            bts_error("[btsrv][INFO] invalid character!\r\n");
+            break;
+    }
+}
+
+/* ANCS客户端发现描述符回调处理函数 */
+void ble_ancs_client_discovery_descriptor_cbk(uint8_t client_id, uint16_t conn_id,
+    gattc_discovery_descriptor_result_t *descriptor)
+{
+    ble_ancs_service_t *remote = ancs_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        return;
+    }
+
+    if (descriptor->descriptor_hdl < remote->start_handle ||
+        descriptor->descriptor_hdl > remote->end_handle) {
+        bts_error("ancs client remote service did not have this descriptor_handle:%u conn_id:%u\n",
+            descriptor->descriptor_hdl, conn_id);
+        return;
+    }
+
+    /* 客户端特征配置描述符 */
+    bt_uuid_t ccc_uuid = {0};
+    bts_data_to_uuid_len2(BLE_CLIENT_CHARACTERISTIC_CONFIGURATION_UUID, &ccc_uuid);
+    if (!bts_uuid_is_equal(&ccc_uuid, &(descriptor->uuid))) {
+        return;
+    }
+
+    uint16_t notify_ccc_max_handle = remote->end_handle;
+    uint16_t data_ccc_max_handle = remote->end_handle;
+    if ((remote->data_src.value_handle != 0) &&
+        (remote->notify_src.value_handle != 0) &&
+        (remote->notify_src.value_handle < remote->data_src.value_handle)) {
+        notify_ccc_max_handle = remote->data_src.value_handle - 1;
+    } else if ((remote->notify_src.value_handle != 0) &&
+        (remote->data_src.value_handle != 0) &&
+        (remote->notify_src.value_handle > remote->data_src.value_handle)) {
+        data_ccc_max_handle = remote->notify_src.value_handle - 1;
+    }
+
+    if ((remote->notify_src.value_handle != 0) &&
+        (descriptor->descriptor_hdl > remote->notify_src.value_handle) &&
+        (descriptor->descriptor_hdl <= notify_ccc_max_handle)) {
+        remote->notify_src_ccc_handle = descriptor->descriptor_hdl;
+    } else if ((remote->data_src.value_handle != 0) &&
+        (descriptor->descriptor_hdl > remote->data_src.value_handle) &&
+        (descriptor->descriptor_hdl <= data_ccc_max_handle)) {
+        remote->data_src_ccc_handle = descriptor->descriptor_hdl;
+    }
+
+    if ((remote->notify_src_ccc_handle != 0) &&
+        (remote->data_src_ccc_handle != 0)) {
+        if (g_ancs_callbacks_t.setup_cb != NULL) {
+            g_ancs_callbacks_t.setup_cb(client_id, conn_id, ERRCODE_BT_SUCCESS);
+        }
+    }
+}
+
+/* ANCS客户端订阅通知源特征通知 */
+errcode_t ble_ancs_client_subscribe_notification_source(uint8_t client_id, uint16_t conn_id,
+    ancs_client_notify_enable_t enable_flag)
+{
+    ble_ancs_service_t *remote = ancs_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        bts_error("ancs client remote service is not exist, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (remote->notify_src_ccc_handle == 0) {
+        bts_error("ancs client remote service did not discovery notify ccc, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    uint16_t ccc_value = BLE_ANCS_CLIENT_CHARACTERISTIC_CONFIGURATION_DEFAULT;
+    if (enable_flag == ANCS_CLIENT_NOTIFY_ENABLE) {
+        ccc_value = BLE_ANCS_CLIENT_CHARACTERISTIC_CONFIGURATION_NOTIFICATION;
+    }
+    uint8_t notify_ccc_val[] = {
+        u16_low_byte(ccc_value),
+        u16_high_byte(ccc_value)
+    };
+    gattc_handle_value_t value = {0};
+    value.data_len = (uint16_t)sizeof(notify_ccc_val);
+    value.data = notify_ccc_val;
+    value.handle = remote->notify_src_ccc_handle;
+    return gattc_write_req(client_id, conn_id, &value);
+}
+
+/* ANCS客户端订阅数据源特征通知 */
+errcode_t ble_ancs_client_subscribe_data_source(uint8_t client_id, uint16_t conn_id,
+    ancs_client_notify_enable_t enable_flag)
+{
+    ble_ancs_service_t *remote = ancs_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        bts_error("ancs client remote service is not exist, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (remote->data_src_ccc_handle == 0) {
+        bts_error("ancs client remote service did not discovery data ccc, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    uint16_t ccc_value = BLE_ANCS_CLIENT_CHARACTERISTIC_CONFIGURATION_DEFAULT;
+    if (enable_flag == ANCS_CLIENT_NOTIFY_ENABLE) {
+        ccc_value = BLE_ANCS_CLIENT_CHARACTERISTIC_CONFIGURATION_NOTIFICATION;
+    }
+    uint8_t notify_ccc_val[] = {
+        u16_low_byte(ccc_value),
+        u16_high_byte(ccc_value)
+    };
+    gattc_handle_value_t value = {0};
+    value.data_len = (uint16_t)sizeof(notify_ccc_val);
+    value.data = notify_ccc_val;
+    value.handle = remote->data_src_ccc_handle;
+    return gattc_write_req(client_id, conn_id, &value);
+}
+
+/* u32转小端序字节流 */
+static uint32_t convert_little_2_u32(uint8_t *data)
+{
+    return little_byte_2_u32(data);
+}
+
+/* 释放【通知属性响应数据】申请的内存 */
+static void notify_att_rsp_free(ble_ancs_notification_attr_rsp_t *notify_att_rsp)
+{
+    ble_ancs_attr_rsp_t *node = notify_att_rsp->attr_rsp_lst.head;
+    ble_ancs_attr_rsp_t *cur_node = NULL;
+    /* 校验失败,清空队列 */
+    while (node != NULL) {
+        cur_node = node;
+        node = lnext(node);
+        bt_sdk_list_remove(&notify_att_rsp->attr_rsp_lst, cur_node); /* 出队 */
+        bt_os_free(cur_node->att);
+        sdk_list_node_free(cur_node);
+        cur_node = NULL;
+    }
+    bt_os_free(notify_att_rsp);
+    return;
+}
+
+/* 组装属性响应数据,兼容分包场景,只解析第一包 */
+static uint16_t ancs_att_rsp_package(ble_ancs_attr_rsp_t *attr_rsp,
+    uint8_t *data, uint16_t total_length, uint16_t offset_byte)
+{
+    if ((total_length - offset_byte) <= ANCS_NOTIFY_ATT_VALUE_OFFSET) { /* 最后一个属性只包含属性id或者属性长度 */
+        attr_rsp->att_id = *data;
+        attr_rsp->att_length = 0;
+        attr_rsp->att = 0;
+        return 0;
+    }
+    attr_rsp->att_id = *data;
+    uint16_t data_length = little_u8_2_u16(data + 1);
+    attr_rsp->att_length = data_length + 1; /* 字符串以0结尾 */
+    if (data_length != 0) {
+        uint8_t *att_data = bt_os_new(attr_rsp->att_length);
+        if (memset_s(att_data, attr_rsp->att_length, 0, attr_rsp->att_length) != EOK) {
+            bt_os_free(att_data);
+            attr_rsp->att_length = 0;
+            attr_rsp->att = 0;
+            return data_length;
+        }
+        uint16_t copy_length = data_length;
+        if ((total_length - offset_byte) < (data_length + ANCS_NOTIFY_ATT_VALUE_OFFSET)) { /* 最后一个属性 */
+            copy_length = total_length - offset_byte - ANCS_NOTIFY_ATT_VALUE_OFFSET;
+        }
+        if (memcpy_s(att_data, attr_rsp->att_length, data + ANCS_NOTIFY_ATT_VALUE_OFFSET, copy_length) != EOK) {
+            bts_error("[btsrv][ERROR] addr memcpy fail!\r\n");
+            bt_os_free(att_data);
+            attr_rsp->att_length = 0;
+            attr_rsp->att = 0;
+            return data_length;
+        }
+        att_data[attr_rsp->att_length - 1] = 0; /* 字符串以0结尾 */
+        attr_rsp->att = att_data;
+    } else {
+        attr_rsp->att_length = 0;
+        attr_rsp->att = 0;
+    }
+    return data_length;
+}
+
+/* 解析属性响应数据 */
+static uint16_t parse_att_rsp(uint8_t *data, uint16_t data_length, struct list_stru *attr_rsp_lst)
+{
+    uint16_t offset_byte = 0;
+    uint16_t att_num = 0;
+    uint16_t att_data_len = 0;
+    while (offset_byte < data_length) {
+        ble_ancs_attr_rsp_t *attr_rsp = (ble_ancs_attr_rsp_t *)bt_sdk_list_node_create(sizeof(ble_ancs_attr_rsp_t));
+        if (attr_rsp != NULL) {
+            att_data_len = ancs_att_rsp_package(attr_rsp, data, data_length, offset_byte);
+            att_num += 1;
+            bt_sdk_list_add_tail(attr_rsp_lst, attr_rsp);
+            offset_byte = offset_byte + 1 + sizeof(uint16_t) + att_data_len;
+            data = data + 1 + sizeof(uint16_t) + att_data_len;
+        }
+    }
+    return att_num;
+}
+
+/* 解析通知属性响应数据,响应数据格式:cmd_id(1B)|notify_uid(4B)|att_id1(1B)|att_id1_length(2B)|att_id1_data(动态)|... */
+static void notify_att_data_parse(uint8_t client_id, uint16_t conn_id, uint8_t *data, uint16_t data_length)
+{
+    ble_ancs_notification_attr_rsp_t *notify_att_rsp = NULL;
+    errcode_t result = ERRCODE_BT_SUCCESS;
+    if (data_length <= (ANCS_NOTIFY_ATT_DATA_HEADER_LENGTH - 1)) {
+        result = ERRCODE_BT_PARAM_ERR;
+    } else {
+        notify_att_rsp = bt_os_new(sizeof(ble_ancs_notification_attr_rsp_t));
+        notify_att_rsp->notification_uid = convert_little_2_u32(data);
+        notify_att_rsp->att_num = 0;
+        notify_att_rsp->attr_rsp_lst.head = NULL;
+        notify_att_rsp->attr_rsp_lst.tail = NULL;
+        data = data + ANCS_NOTIFY_UUID_BYTE_LENGTH;
+        notify_att_rsp->att_num = parse_att_rsp(data,
+            data_length - ANCS_NOTIFY_UUID_BYTE_LENGTH, &notify_att_rsp->attr_rsp_lst);
+    }
+
+    if (g_ancs_callbacks_t.notify_attr_cb != NULL) {
+        g_ancs_callbacks_t.notify_attr_cb(client_id, conn_id, notify_att_rsp, result);
+    }
+
+    if (notify_att_rsp != NULL) {
+        notify_att_rsp_free(notify_att_rsp);
+    }
+}
+
+/* 释放【应用属性响应结果】申请的内存 */
+static void app_att_rsp_free(ble_ancs_app_attr_rsp_t *app_att_rsp)
+{
+    ble_ancs_attr_rsp_t *node = app_att_rsp->attr_rsp_lst.head;
+    ble_ancs_attr_rsp_t *cur_node = NULL;
+    while (node != NULL) {
+        cur_node = node;
+        node = lnext(node);
+        bt_sdk_list_remove(&app_att_rsp->attr_rsp_lst, cur_node); /* 出队 */
+        bt_os_free(cur_node->att);
+        sdk_list_node_free(cur_node);
+        cur_node = NULL;
+    }
+    if (app_att_rsp->app_id.id != NULL) {
+        bt_os_free(app_att_rsp->app_id.id);
+    }
+    bt_os_free(app_att_rsp);
+    return;
+}
+
+/* 解析应用编号 */
+static void app_id_parse(ble_ancs_app_attr_rsp_t *app_att_rsp, uint8_t *data, uint16_t data_length)
+{
+    uint16_t app_id_len = 0;
+    for (int i = 0; i < data_length - 1; i++) {
+        app_id_len = app_id_len + 1;
+        if (*(data + i) == 0) {
+            break;
+        }
+    }
+    if (app_id_len != 0) {
+        app_att_rsp->app_id.len = app_id_len;
+        uint8_t *id = bt_os_new(app_id_len);
+        if (id != NULL) {
+            if (memcpy_s(id, app_id_len, data, app_id_len) != EOK) {
+                bt_os_free(id);
+                app_att_rsp->app_id.id = NULL;
+                return;
+            }
+            app_att_rsp->app_id.id = id;
+            return;
+        }
+    }
+    app_att_rsp->app_id.len = 0;
+    app_att_rsp->app_id.id = NULL;
+}
+
+/* 解析应用属性响应结果,响应格式:cmd_id(1B)|app_id(动态长度,字符串字节流,以NULL结尾)|att_id1(1B)|att_id1_length(2B)|att_id1_data(动态)|... */
+static void app_att_data_parse(uint8_t client_id, uint16_t conn_id, uint8_t *data, uint16_t data_length)
+{
+    ble_ancs_app_attr_rsp_t *app_att_rsp = NULL;
+    errcode_t result = ERRCODE_BT_SUCCESS;
+    if (data_length <= 0) {
+        result = ERRCODE_BT_PARAM_ERR;
+    } else {
+        app_att_rsp = bt_os_new(sizeof(ble_ancs_app_attr_rsp_t));
+        app_id_parse(app_att_rsp, data, data_length);
+        if ((app_att_rsp->app_id.len == 0) || (app_att_rsp->app_id.id == NULL)) {
+            result = ERRCODE_BT_PARAM_ERR;
+        } else {
+            app_att_rsp->att_num = 0;
+            app_att_rsp->attr_rsp_lst.head = NULL;
+            app_att_rsp->attr_rsp_lst.tail = NULL;
+            uint16_t app_id_len = app_att_rsp->app_id.len;
+            data = data + app_id_len;
+            app_att_rsp->att_num = parse_att_rsp(data, data_length - app_id_len, &app_att_rsp->attr_rsp_lst);
+        }
+    }
+
+    if (g_ancs_callbacks_t.app_attr_cb != NULL) {
+        g_ancs_callbacks_t.app_attr_cb(client_id, conn_id, app_att_rsp, result);
+    }
+
+    if (app_att_rsp != NULL) {
+        app_att_rsp_free(app_att_rsp);
+    }
+}
+
+/* ANCS客户端通知消息处理函数,消息格式:event_id(1B)|event_flags(1B)|category_id(1B)|category_count(1B)|notify_uuid(4B) */
+static void notify_src_handle(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *data)
+{
+    errcode_t result = ERRCODE_BT_SUCCESS;
+    ble_ancs_notification_src_t *notify_src_data = NULL;
+    if (data->data_len != ANCS_NOTIFY_SOURCE_LENGTH) {
+        result = ERRCODE_BT_PARAM_ERR;
+    } else {
+        uint8_t *pt_data = data->data;
+        notify_src_data = bt_os_new(sizeof(ble_ancs_notification_src_t));
+        notify_src_data->event_id = *pt_data;
+        notify_src_data->event_flags = *(pt_data + BT_INDEX_1);
+        notify_src_data->category_id = *(pt_data + BT_INDEX_2);
+        notify_src_data->category_count = *(pt_data + BT_INDEX_3);
+        pt_data = pt_data + BT_INDEX_4;
+        notify_src_data->notification_uid = convert_little_2_u32(pt_data);
+    }
+
+    if (g_ancs_callbacks_t.notify_source_cb != NULL) {
+        g_ancs_callbacks_t.notify_source_cb(client_id, conn_id, notify_src_data, result);
+    }
+    if (notify_src_data != NULL) {
+        bt_os_free(notify_src_data);
+    }
+}
+
+/* ANCS客户端数据消息处理函数 */
+static void data_src_handle(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *data)
+{
+    uint8_t *pt_data = data->data;
+    uint16_t data_length = data->data_len;
+    if ((data_length == (ble_gatt_mtu_exchange_result_get() - BLE_ATT_HEADER_LEN)) ||
+        (data_length == BLE_ANCS_DATA_MAX_LEN)) {
+        bts_error("response is larger than MTU, please limit attribute length, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+    }
+    uint8_t cmd_id = *pt_data;
+    pt_data = pt_data + 1;
+    switch (cmd_id) {
+        /* 数据格式:cmd_id(1B)|notify_uid(4B)|att_id1(1B)|att_id1_length(2B)|att_id1_data(动态)|... */
+        case ANCS_CMD_GET_NOTIFY_ATT:{
+            notify_att_data_parse(client_id, conn_id, pt_data, data->data_len - 1);
+            break;
+        }
+        /* 数据格式:cmd_id(1B)|app_id(动态长度,字符串字节流,以NULL结尾)|att_id1(1B)|att_id1_length(2B)|att_id1_data(动态)|... */
+        case ANCS_CMD_GET_APP_ATT:{
+            app_att_data_parse(client_id, conn_id, pt_data, data->data_len - 1);
+            break;
+        }
+        default:
+            break;
+    }
+}
+
+/* ANCS客户端接收对端通知处理函数 */
+void ble_ancs_client_notify_cbk(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *data)
+{
+    ble_ancs_service_t *remote = ancs_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        return;
+    }
+
+    /* notification source */
+    /* 数据格式:event_id(1B)|event_flags(1B)|category_id(1B)|category_count(1B)|notification_uid(4B) */
+    if (data->handle == remote->notify_src.value_handle) {
+        notify_src_handle(client_id, conn_id, data);
+    /* data source */
+    } else if (data->handle == remote->data_src.value_handle) {
+        data_src_handle(client_id, conn_id, data);
+    }
+}
+
+/* ANCS客户端订阅结果处理函数 */
+static void ble_ancs_client_subscribe_result(uint8_t client_id, uint16_t conn_id,
+    ancs_client_subscribe_type_t type, gatt_status_t status)
+{
+    if (g_ancs_callbacks_t.subscribe_cb != NULL) {
+        g_ancs_callbacks_t.subscribe_cb(client_id, conn_id, type, status);
+    }
+}
+
+/* ANCS客户端写请求响应结果处理函数 */
+static void ble_ancs_client_write_result(uint8_t client_id, uint16_t conn_id, gatt_status_t status)
+{
+    if (g_ancs_callbacks_t.write_result_cb != NULL) {
+        g_ancs_callbacks_t.write_result_cb(client_id, conn_id, status);
+    }
+}
+
+/* ANCS客户端写请求响应处理函数 */
+void ble_ancs_client_write_cbk(uint8_t client_id, uint16_t conn_id, uint16_t handle, gatt_status_t status)
+{
+    ble_ancs_service_t *remote = ancs_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        return;
+    }
+
+    if (handle == (remote->notify_src_ccc_handle)) {
+        ble_ancs_client_subscribe_result(client_id, conn_id, ANCS_CLIENT_SUBSCRIBE_NOTIFY, status);
+    } else if (handle == (remote->data_src_ccc_handle)) {
+        ble_ancs_client_subscribe_result(client_id, conn_id, ANCS_CLIENT_SUBSCRIBE_DATA, status);
+    } else if (handle == (remote->ctl_point.value_handle)) {
+        ble_ancs_client_write_result(client_id, conn_id, status);
+    }
+}
+
+/* 校验通知属性是否需要拼接【最大长度】参数 */
+static bool is_followed_by_max_length_param(uint8_t att_id)
+{
+    bool is_followed = false;
+    switch (att_id) {
+        case ANCS_NOTIFY_ATT_TITLE:
+        case ANCS_NOTIFY_ATT_SUBTITLE:
+        case ANCS_NOTIFY_ATT_MESSAGE:
+            is_followed = true;
+            break;
+        default:
+            break;
+    }
+    return is_followed;
+}
+
+/* u32转小端序 */
+static void u32_2_little(uint32_t notify_uid, uint8_t *pt_data)
+{
+    *(pt_data + BT_INDEX_1) = u32_2_little_first_byte(notify_uid);
+    *(pt_data + BT_INDEX_2) = u32_2_little_second_byte(notify_uid);
+    *(pt_data + BT_INDEX_3) = u32_2_little_three_byte(notify_uid);
+    *(pt_data + BT_INDEX_4) = u32_2_little_four_byte(notify_uid);
+}
+
+/* 组装通知属性请求参数 */
+static errcode_t package_notify_att_req_param(ble_ancs_notification_attr_req_t *notify_att_req, uint8_t *pt_data)
+{
+    /* command id */
+    *pt_data = ANCS_CMD_GET_NOTIFY_ATT;
+
+    /* notification uuid 小端 */
+    u32_2_little(notify_att_req->notification_uid, pt_data);
+
+    /* 拼接ATT ID */
+    pt_data = pt_data + ANCS_NOTIFY_ATT_ID_OFFSET;
+    for (int i = 0; i < notify_att_req->att_num; i++) {
+        /* 校验ATT ID */
+        if (notify_att_req->attr[i].att_id > ANCS_NOTIFY_ATT_NEGATIVE_LABEL) {
+            return ERRCODE_BT_PARAM_ERR;
+        }
+        *(pt_data) = notify_att_req->attr[i].att_id;
+        pt_data = pt_data + 1;
+
+        /* 属性带有最大长度参数,小端传输 */
+        if (is_followed_by_max_length_param(notify_att_req->attr[i].att_id)) {
+            *(pt_data) = u16_low_byte(notify_att_req->attr[i].att_max_length);
+            *(pt_data + 1) = u16_high_byte(notify_att_req->attr[i].att_max_length);
+            pt_data = pt_data + ANCS_NOTIFY_ATT_MAX_LENGTH_BYTE;
+        }
+    }
+    return ERRCODE_BT_SUCCESS;
+}
+
+/* 计算申请内存大小 */
+static uint16_t calc_notify_att_req_param_length(ble_ancs_notification_attr_req_t *notify_att_req)
+{
+    uint16_t data_len = sizeof(uint8_t) + sizeof(uint32_t) +
+        (notify_att_req->att_num) * sizeof(uint8_t);
+    for (int i = 0; i < notify_att_req->att_num; i++) {
+        /* 属性带有最大长度参数 */
+        if (is_followed_by_max_length_param(notify_att_req->attr[i].att_id)) {
+            data_len += sizeof(uint16_t);
+        }
+    }
+    return data_len;
+}
+
+/* 发送获取通知属性命令 */
+errcode_t ble_ancs_client_send_get_notify_att_cmd(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_notification_attr_req_t *notify_att_req)
+{
+    ble_ancs_service_t *remote = ancs_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        bts_error("ancs client remote service is not exist, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (remote->ctl_point.value_handle == 0) {
+        bts_error("ancs client remote service did not discovery character, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (notify_att_req->att_num == 0) {
+        bts_error("ancs client att num is invalid, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_PARAM_ERR;
+    }
+
+    /* 计算请求数据长度 */
+    uint16_t data_len = calc_notify_att_req_param_length(notify_att_req);
+
+    /* 请求数据格式:cmd_id(1B)|notify_uid(4B)|att_id1(1B)|att_id2(1B)|att_id2_max_length(2B)|... */
+    uint8_t *data = (uint8_t *)bt_os_new(data_len);
+
+    /* 指向参数数据的指针,用于拼接参数移动指针 */
+    uint8_t *pt_data = data;
+    errcode_t ret = package_notify_att_req_param(notify_att_req, pt_data);
+    if (ret != ERRCODE_BT_SUCCESS) {
+        bt_os_free(data);
+        return ret;
+    }
+    gattc_handle_value_t value = {0};
+    value.handle = remote->ctl_point.value_handle;
+    value.data_len = data_len;
+    value.data = data;
+    errcode_t result = gattc_write_req(client_id, conn_id, &value);
+    bt_os_free(data);
+    return result;
+}
+
+static errcode_t package_app_att_req_param(ble_ancs_app_attr_req_t *app_att_req, uint8_t *pt_data)
+{
+    /* command id */
+    *pt_data = ANCS_CMD_GET_APP_ATT;
+
+    /* app id ,字符串 */
+    pt_data = pt_data + 1;
+    if (memcpy_s(pt_data, app_att_req->app_id.len, app_att_req->app_id.id, app_att_req->app_id.len) != EOK) {
+        bts_error("[btsrv][ERROR] app id memcpy fail!\r\n");
+        return ERRCODE_BT_MALLOC_FAIL;
+    }
+
+    /* 校验 att id */
+    pt_data = pt_data + app_att_req->app_id.len;
+    for (int i = 0; i < app_att_req->att_num; i++) {
+        if (app_att_req->attr_id[i] > ANCS_APP_ATT_DISPLAY_NAME) {
+            return ERRCODE_BT_PARAM_ERR;
+        }
+        *(pt_data) = app_att_req->attr_id[i];
+        pt_data = pt_data + 1;
+    }
+
+    return ERRCODE_BT_SUCCESS;
+}
+
+/* 发送获取应用属性命令 */
+errcode_t ble_ancs_client_send_get_app_att_cmd(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_app_attr_req_t *app_att_req)
+{
+    ble_ancs_service_t *remote = ancs_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        bts_error("ancs client remote service is not exist, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (remote->ctl_point.value_handle == 0) {
+        bts_error("ancs client remote service did not discovery character, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (app_att_req->att_num == 0) {
+        bts_error("ancs client att num is invalid, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_PARAM_ERR;
+    }
+
+    if (app_att_req->app_id.len != strlen((char *)app_att_req->app_id.id) + 1) {
+        bts_error("[ANCSClient][AppIdentifier]string must be NULL-terminated!\r\n");
+        return ERRCODE_BT_PARAM_ERR;
+    }
+
+    /* 计算数据长度 */
+    uint16_t data_len = sizeof(uint8_t) + app_att_req->app_id.len +
+        (app_att_req->att_num) * sizeof(uint8_t);
+    
+    /* 数据格式:cmd_id(1B)|app_id(动态)|att_id1(1B)|att_id2(1B)|... */
+    uint8_t *data = (uint8_t *)bt_os_new(data_len);
+    /* 指向参数数据的指针,用于拼接参数移动指针 */
+    uint8_t *pt_data = data;
+    errcode_t ret = package_app_att_req_param(app_att_req, pt_data);
+    if (ret != ERRCODE_BT_SUCCESS) {
+        bt_os_free(data);
+        return ret;
+    }
+
+    gattc_handle_value_t value = {0};
+    value.handle = remote->ctl_point.value_handle;
+    value.data_len = data_len;
+    value.data = data;
+    errcode_t result = gattc_write_req(client_id, conn_id, &value);
+    bt_os_free(data);
+    return result;
+}
+
+/* 发送执行通知行为命令 */
+errcode_t ble_ancs_client_send_perform_notify_action_cmd(uint8_t client_id, uint16_t conn_id,
+    ble_ancs_notification_action_req_t *action_req)
+{
+    ble_ancs_service_t *remote = ancs_service_remote_by_conn(client_id, conn_id);
+    if (remote == NULL) {
+        bts_error("ancs client remote service is not exist, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+
+    if (remote->ctl_point.value_handle == 0) {
+        bts_error("ancs client remote service did not discovery character, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_NOT_READY;
+    }
+    if (action_req->action_id >= ANCS_ACTION_RESERVED) {
+        bts_error("ancs client action id is invalid, client_id:%u conn_id:%u\n",
+            client_id, conn_id);
+        return ERRCODE_BT_PARAM_ERR;
+    }
+
+    /* 计算数据长度 */
+    uint16_t data_len = sizeof(uint8_t) + sizeof(uint32_t) + sizeof(uint8_t);
+    
+    /* 数据格式:cmd_id(1B)|notify_uid(4B)|action_id(1B) */
+    uint8_t *data = (uint8_t *)bt_os_new(data_len);
+    /* 指向参数数据的指针,用于拼接参数移动指针 */
+    uint8_t *pt_data = data;
+
+    /* command id */
+    *pt_data = ANCS_CMD_PERFORM_NOTIFY_ACTION;
+
+    /* notification uuid 小端 */
+    u32_2_little(action_req->notification_uid, pt_data);
+    *(pt_data + ANCS_NOTIFY_ACTION_ID_OFFSET) = action_req->action_id;
+
+    gattc_handle_value_t value = {0};
+    value.handle = remote->ctl_point.value_handle;
+    value.data_len = data_len;
+    value.data = data;
+    errcode_t result = gattc_write_req(client_id, conn_id, &value);
+    bt_os_free(data);
+    return result;
+}
+
+/* 注册ANCS客户端回调函数 */
+errcode_t ble_ancs_client_register_callbacks(ble_ancs_client_callbacks_t *func)
+{
+    if (memcpy_s(&g_ancs_callbacks_t, sizeof(g_ancs_callbacks_t), func, sizeof(ble_ancs_client_callbacks_t)) != EOK) {
+        return ERRCODE_BT_MEMCPY_FAIL;
+    }
+    return ERRCODE_BT_SUCCESS;
+}
+
+/* ANCS服务判断 */
+bool is_ble_ancs_service(bt_uuid_t *uuid)
+{
+    bt_uuid_t ancs_service_uuid = {0};
+    ancs_service_uuid.uuid_len = BT_UUID_MAX_LEN;
+    if (memcpy_s(ancs_service_uuid.uuid, BT_UUID_MAX_LEN, ancs_uuid, BT_UUID_MAX_LEN) != EOK) {
+        bts_error("[BLE]client discovery ancs memcpy error! \n");
+        return false;
+    }
+    if (ancs_service_uuid.uuid_len != uuid->uuid_len) {
+        return false;
+    }
+
+    return (memcmp(uuid, &ancs_service_uuid, sizeof(bt_uuid_t)) == 0 ? true : false);
+}
+
+/* 根据连接ID清理本地存储的对端ANCS服务信息 */
+void ble_ancs_client_clear_remote_by_conn(uint8_t client_id, uint16_t conn_id)
+{
+    ble_ancs_service_t *node = NULL;
+    node = ancs_service_remote_by_conn(client_id, conn_id);
+    if (node != NULL) {
+        bt_sdk_list_remove(&g_ble_ancs_service_list, node);
+        sdk_list_node_free(node);
+    }
+}
+
+/* 清理本地存储的所有对端ANCS服务信息 */
+void ble_ancs_client_clear_remote_all(void)
+{
+    ble_ancs_service_t *node = (ble_ancs_service_t *)g_ble_ancs_service_list.head;
+    ble_ancs_service_t *cur_node = NULL;
+    while (node != NULL) {
+        cur_node = node;
+        node = lnext(node);
+        bt_sdk_list_remove(&g_ble_ancs_service_list, cur_node);
+        sdk_list_node_free(cur_node);
+        cur_node = NULL;
+    }
+}
index 6bfd8e4..a4df999 100755 (executable)
 #include "ble_bas_client.h"
 #include "ble_pro_dis_client.h"
 #include "ble_fmp_locator.h"
+#include "ble_ancs_client.h"
+#include "ble_ams_client.h"
 #include "bts_uuid.h"
 #include "ble_gatts_callbacks.h"
 
+uint32_t g_ble_gatt_mtu_size = 23;
+
 static bool bt_gatts_cmp_uuid(const bt_uuid_t *tgt_uuid, const bt_uuid_t *src_uuid)
 {
     uint8_t *tgt = (uint8_t *)bts_init_128bit_uuid(tgt_uuid);
@@ -52,12 +56,6 @@ static void ble_server_service_add_cbk(uint8_t server_id, bt_uuid_t *uuid, uint1
     bt_uuid_t fmp_service_uuid = {0};
     bts_data_to_uuid_len2(FMP_IMMEDIATE_ALERT_SERVICE_UUID, &fmp_service_uuid);
 
-    bt_uuid_t alpay_service_uuid = {0};
-    bts_data_to_uuid_len2(0x3802, &alpay_service_uuid);
-
-    bt_uuid_t ble_service_uuid = {0};
-    bts_data_to_uuid_len2(0x18e0, &ble_service_uuid);
-
     if (bt_gatts_cmp_uuid(uuid, &hid_service_uuid) == true) {
         ble_hid_add_characters_and_descriptors(server_id, handle);
         gatts_start_service(server_id, handle);
@@ -67,12 +65,8 @@ static void ble_server_service_add_cbk(uint8_t server_id, bt_uuid_t *uuid, uint1
     } else if (bt_gatts_cmp_uuid(uuid, &fmp_service_uuid) == true) {
         fmp_target_add_alc_characteristic(server_id, handle);
         gatts_start_service(server_id, handle);
-    } else if (bt_gatts_cmp_uuid(uuid, &alpay_service_uuid) == true) {
-        ble_hid_add_characters_and_descriptors(server_id, handle);
-        gatts_start_service(server_id, handle);
-    }else if (bt_gatts_cmp_uuid(uuid, &ble_service_uuid) == true) {
-        ble_hid_add_characters_and_descriptors(server_id, handle);
-        gatts_start_service(server_id, handle);
+    } else {
+        bts_error("[BLE] server add service cbk, service uuid is not matched.\n");
     }
 }
 
@@ -127,11 +121,10 @@ static void ble_server_req_read_cbk(uint8_t server_id, uint16_t conn_id, gatts_r
     bts_info("[BLE]server read req server: %u status: %u conn_id:%hu handle: %hu \n",
         server_id, status, conn_id, cb_para->handle);
 }
-#include "wearable_log.h"
+
 static void ble_server_req_write_cbk(uint8_t server_id, uint16_t conn_id, gatts_req_write_cb_t *cb_para,
     errcode_t status)
 {
-    WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "ble_server_req_write_cbk!!!!!!!!!\r\n");
     bts_info("[BLE]server write req server: %u status: %u conn_id:%hu handle: %hu \n",
         server_id, status, conn_id, cb_para->handle);
     if (status != ERRCODE_BT_SUCCESS) {
@@ -200,6 +193,10 @@ static void ble_client_discovery_service_cbk(uint8_t client_id, uint16_t conn_id
         ble_dis_client_discovery_service_cbk(client_id, conn_id, service);
     } else if (bt_gatts_cmp_uuid(&service->uuid, &fmp_service_uuid) == true) {
         fmp_locator_discovery_service_cbk(client_id, conn_id, service);
+    } else if (is_ble_ancs_service(&service->uuid)) {
+        ble_ancs_client_discovery_service_cbk(client_id, conn_id, service);
+    } else if (is_ble_ams_service(&service->uuid)) {
+        ble_ams_client_discovery_service_cbk(client_id, conn_id, service);
     }
 }
 
@@ -224,6 +221,8 @@ static void ble_client_discovery_character_cbk(uint8_t client_id, uint16_t conn_
         fmp_locator_discovery_characteristic_cbk(client_id, conn_id, character);
     } else {
         ble_dis_client_discovery_character_cbk(client_id, conn_id, character);
+        ble_ancs_client_discovery_character_cbk(client_id, conn_id, character);
+        ble_ams_client_discovery_character_cbk(client_id, conn_id, character);
     }
 }
 
@@ -236,6 +235,8 @@ static void ble_client_discovery_descriptor_cbk(uint8_t client_id, uint16_t conn
         return;
     }
     ble_bas_client_discovery_descriptor_cbk(client_id, conn_id, descriptor);
+    ble_ancs_client_discovery_descriptor_cbk(client_id, conn_id, descriptor);
+    ble_ams_client_discovery_descriptor_cbk(client_id, conn_id, descriptor);
 }
 
 static void ble_client_read_cbk(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *read_result,
@@ -243,17 +244,18 @@ static void ble_client_read_cbk(uint8_t client_id, uint16_t conn_id, gattc_handl
 {
     bts_info("[BLE]client read cbk client_id: %u conn_id: %hu status: %d handle: %hu \n",
         client_id, conn_id, status, read_result->handle);
-    if (status != ERRCODE_BT_SUCCESS) {
-        return;
-    }
     ble_bas_client_read_cbk(client_id, conn_id, read_result, status);
     ble_dis_client_read_cbk(client_id, conn_id, read_result, status);
+    ble_ams_client_read_cbk(client_id, conn_id, read_result, status);
 }
 
 static void ble_client_write_cbk(uint8_t client_id, uint16_t conn_id, uint16_t handle, gatt_status_t status)
 {
     bts_info("[BLE]client write cbk client_id: %u conn_id: %hu status: %d handle: %hu \n",
         client_id, conn_id, status, handle);
+
+    ble_ancs_client_write_cbk(client_id, conn_id, handle, status);
+    ble_ams_client_write_cbk(client_id, conn_id, handle, status);
 }
 
 static void ble_client_notification_cbk(uint8_t client_id, uint16_t conn_id, gattc_handle_value_t *data,
@@ -265,8 +267,16 @@ static void ble_client_notification_cbk(uint8_t client_id, uint16_t conn_id, gat
         return;
     }
     ble_bas_client_notify_characteristic_cbk(client_id, conn_id, data);
+    ble_ancs_client_notify_cbk(client_id, conn_id, data);
+    ble_ams_client_notify_cbk(client_id, conn_id, data);
 }
 
+static void ble_client_mtu_exchange_result_cbk(uint8_t client_id, uint16_t conn_id, uint32_t mtu_size, errcode_t status)
+{
+    bts_info("[BLE]client MTU changed cbk: status: %u client_id: %u conn_id: %u mtu:%u.\r\n",
+        status, client_id, conn_id, mtu_size);
+    g_ble_gatt_mtu_size = mtu_size;
+}
 
 errcode_t ble_client_register_gatt_callbacks(void)
 {
@@ -278,6 +288,12 @@ errcode_t ble_client_register_gatt_callbacks(void)
     cb.read_cb = ble_client_read_cbk;
     cb.write_cb = ble_client_write_cbk;
     cb.notification_cb = ble_client_notification_cbk;
+    cb.mtu_changed_cb = ble_client_mtu_exchange_result_cbk;
     ret = gattc_register_callbacks(&cb);
     return ret;
+}
+
+uint32_t ble_gatt_mtu_exchange_result_get(void)
+{
+    return g_ble_gatt_mtu_size;
 }
\ No newline at end of file
index fa5c044..f4196fd 100755 (executable)
@@ -11,6 +11,7 @@
 #include "soc_errno.h"
 #include "bts_br_gap.h"
 #include "bts_le_gap.h"
+#include "bts_feature.h"
 #include "bts_a2dp_source.h"
 #include "bts_br_gap.h"
 #include "bts_avrcp_controller.h"
@@ -58,6 +59,11 @@ typedef enum {
 
     BTSRV_SAMPLE_GAP_SHOW_FOUND_LIST,         /* 30 展示发现设备列表 */
     BTSRV_SAMPLE_GAP_SET_CONN_REQ_ANSWER,     /* 31 设置连接请求应答 */
+    BTSRV_SAMPLE_GAP_SET_FEATURE_CONFIG,      /* 32 蓝牙特性配置 */
+    BTSRV_SAMPLE_GAP_GET_FEATURE_CONFIG,      /* 33 蓝牙特性获取 */
+    BTSRV_SAMPLE_GAP_RECONNECT_PHONE,         /* 34 重连手机 */
+
+    BTSRV_SAMPLE_GAP_SET_INQUIRY_PARAM,       /* 35 设置搜到参数 */
 } btsrv_gap_sample_cmd_id;
 
 typedef enum {
@@ -255,7 +261,7 @@ static void btsrv_sample_cmd_enable_bt(const char **params, int32_t params_cnt)
 {
     bts_unused(params);
     bts_unused(params_cnt);
-    
+
     errcode_t ret = enable_bt_stack();
     bts_sample_log("enable_bt_stack ret(errcode_t): %x\n", ret);
 }
@@ -1104,6 +1110,21 @@ static void btsrv_sample_cmd_get_device_class(const char **params, int32_t param
     bts_sample_log("gap_get_device_class device_class: %d\n", ret);
 }
 
+static void btsrv_sample_cmd_set_filter_device_class(const char **params, int32_t params_cnt)
+{
+    if (params_cnt != 2) { /* 2:参数个数 */
+        bts_sample_log("gap_br_set_inquiry_paramters params_cnt error! need: device_class max_number\n");
+        return;
+    }
+
+    uint32_t dev_class = (uint32_t)atoi(params[0]);
+    uint8_t max_num = (uint8_t)atoi(params[1]);
+    bts_sample_log_with_func("dev_class:%u max_num:%u\n", dev_class, max_num);
+    int ret = gap_br_set_inquiry_paramters(dev_class, max_num);
+
+    bts_sample_log("gap_br_set_inquiry_paramters ret: %d\n", ret);
+}
+
 static void btsrv_sample_cmd_update_found_list(const char **params, int32_t params_cnt)
 {
     bts_unused(params);
@@ -1130,6 +1151,44 @@ static void btsrv_sample_cmd_set_connect_req_answer(const char **params, int32_t
     g_sample_gap_accept_conn = (bool)atoi(params[0]);
 }
 
+static void btsrv_sample_cmd_set_feature_config(const char **params, int32_t params_cnt)
+{
+    bts_feature_t feature;
+    if (params_cnt != 1) { /* 1:参数个数 */
+        bts_sample_log("btsrv_sample_cmd_set_feature_config params_cnt error! need: feature_config\n");
+        return;
+    }
+    *(int *)&feature = atoi(params[0]);
+    bts_sample_log("feature:%d bt_auto_reconnect_closed:%d\n", *(int *)&feature, feature.bt_auto_reconnect_closed);
+    errcode_t ret = bts_set_features(&feature);
+    bts_sample_log("bts set features ret:%d\n", ret);
+}
+
+static void btsrv_sample_cmd_get_feature_config(const char **params, int32_t params_cnt)
+{
+    bts_unused(params);
+    bts_unused(params_cnt);
+    bts_feature_t feature = bts_get_features();
+    bts_sample_log("bts get features feature: bt_auto_reconnect_closed:%d.\n", feature.bt_auto_reconnect_closed);
+}
+
+static void btsrv_sample_cmd_reconnect_phone(const char **params, int32_t params_cnt)
+{
+    errcode_t ret;
+    if (params_cnt != 1) { /* 1:参数个数 */
+        bts_sample_log("reconnect phone param error! need: bd_addr.\n");
+        return;
+    }
+
+    bd_addr_t bd_addr;
+    if (decode_bd_addr_from_str(params[0], bd_addr.addr, BD_ADDR_LEN) != EXT_ERR_SUCCESS) {
+        bts_sample_log("reconnect phone decode addr error!\n");
+        return;
+    }
+    ret = gap_reconnect_media_device(&bd_addr);
+    bts_sample_log("reconnect phone ret:%d.\n", ret);
+}
+
 btsrv_sample_cmd_hdl_info g_btsrv_gap_sample_hdls[] = {
     /* 0 */
     { BTSRV_SAMPLE_GAP_ENABLE_BLE,  btsrv_sample_cmd_enable_ble },
@@ -1166,12 +1225,23 @@ btsrv_sample_cmd_hdl_info g_btsrv_gap_sample_hdls[] = {
     { BTSRV_SAMPLE_GAP_GET_DEVICE_NAME, btsrv_sample_cmd_get_device_name },
     { BTSRV_SAMPLE_GAP_GET_DEVICE_CLASS, btsrv_sample_cmd_get_device_class },
 
+    /* 25 */
+    { BTSRV_SAMPLE_GAP_PAIR_REQUEST_RELY, NULL },
+    { BTSRV_SAMPLE_GAP_SET_DEVICE_PIN, NULL },
+    { BTSRV_SAMPLE_GAP_SET_DEVICE_PAIRING_CONFIRMATION, NULL },
+    { BTSRV_SAMPLE_GAP_SET_DEVICE_PASSKEY, NULL },
     /* 29 */
     { BTSRV_SAMPLE_GAP_UPDATE_FOUND_LIST, btsrv_sample_cmd_update_found_list },
 
     /* 30 */
     { BTSRV_SAMPLE_GAP_SHOW_FOUND_LIST, btsrv_sample_cmd_show_found_list },
-    { BTSRV_SAMPLE_GAP_SET_CONN_REQ_ANSWER, btsrv_sample_cmd_set_connect_req_answer }
+    { BTSRV_SAMPLE_GAP_SET_CONN_REQ_ANSWER, btsrv_sample_cmd_set_connect_req_answer },
+    { BTSRV_SAMPLE_GAP_SET_FEATURE_CONFIG, btsrv_sample_cmd_set_feature_config },
+    { BTSRV_SAMPLE_GAP_GET_FEATURE_CONFIG, btsrv_sample_cmd_get_feature_config },
+    { BTSRV_SAMPLE_GAP_RECONNECT_PHONE, btsrv_sample_cmd_reconnect_phone },
+
+    /* 35 */
+    { BTSRV_SAMPLE_GAP_SET_INQUIRY_PARAM, btsrv_sample_cmd_set_filter_device_class },
 };
 
 void btsrv_gap_sample_cmd(uint32_t cmd_id, const char **params, int32_t params_cnt)
index 33b445b..bdcc1fc 100755 (executable)
@@ -24,6 +24,8 @@
 #include "ble_pro_dis_client.h"
 #include "ble_bas_client.h"
 #include "ble_fmp_locator.h"
+#include "ble_ancs_client.h"
+#include "ble_ams_client.h"
 #include "osal_task.h"
 
 #define BTSRV_LOG_DEBUG
@@ -1500,8 +1502,8 @@ static void sample_gap_ble_scan_result_cbk(const gap_scan_result_data_t *scan_re
         scan_result_data->addr.addr[BT_INDEX_5]);
 }
 
-static void sample_gap_ble_conn_state_change_cbk(uint16_t conn_id, bd_addr_t *addr, gap_acl_state_t conn_state,
-    gap_pair_state_t pair_state, gap_ble_disc_reason_t disc_reason)
+static void sample_gap_ble_conn_state_change_cbk(uint16_t conn_id, bd_addr_t *addr, gap_ble_conn_state_t conn_state,
+    gap_ble_pair_state_t pair_state, gap_ble_disc_reason_t disc_reason)
 {
     bts_sample_log("ConnectStateChanged conn_id:%u addr:0x%02x:**:**:**:%02x:%02x addr_type:%u"
         "conn_state:%d pair_state:%d\r\n", conn_id, addr->addr[BT_INDEX_0], addr->addr[BT_INDEX_4],
@@ -1511,6 +1513,8 @@ static void sample_gap_ble_conn_state_change_cbk(uint16_t conn_id, bd_addr_t *ad
         ble_dis_client_clear_remote_by_conn(1, conn_id);
         ble_bas_client_clear_remote_by_conn(1, conn_id);
         ble_fmp_locator_clear_remote_by_conn(1, conn_id);
+        ble_ancs_client_clear_remote_by_conn(1, conn_id);
+        ble_ams_client_clear_remote_by_conn(1, conn_id);
     }
 }
 
@@ -1550,6 +1554,15 @@ static void sample_gap_ble_read_remote_rssi_cbk(uint16_t conn_id, int8_t rssi, e
     bts_sample_log("read remote rssi conn_id:%u rssi:%d status:%u\r\n", conn_id, rssi, status);
 }
 
+static void sample_gap_ble_connect_param_update_cbk(uint16_t conn_id, errcode_t status,
+    const gap_ble_conn_param_update_t *param)
+{
+    bts_sample_log("connect param changed conn_id:%u status:%u", conn_id, status);
+    if (param != NULL) {
+        bts_sample_log(" interval:%u latency:%u timeout:%u\r\n", param->interval, param->latency, param->timeout);
+    }
+}
+
 /* 注册GATT回调 params: sample_mode fill_callbacks */
 static void sample_gatt_cmd_ble_gatt_reg_cbk(char **params, int32_t params_cnt)
 {
@@ -1579,7 +1592,7 @@ static void sample_gatt_cmd_ble_gatt_reg_cbk(char **params, int32_t params_cnt)
             sample_gap_ble_read_remote_rssi_cbk,
             sample_gap_ble_terminate_adv_cbk,
             sample_gap_ble_auth_complete_cbk,
-            NULL,
+            sample_gap_ble_connect_param_update_cbk,
         };
         ret = gap_ble_register_callbacks(&cb);
         bts_sample_log("gap_ble_register_callbacks with funcs ret(errcode_t): %x\n", ret);
index cb15dc7..745461c 100755 (executable)
@@ -22,6 +22,8 @@
 #include "sample_bt_audio_hal.h"
 #include "sample_ble_fmp.h"
 #include "sample_pan_service.h"
+#include "sample_ble_ancs.h"
+#include "sample_ble_ams.h"
 
 #define BT_SRV_SAMPLE_CMD_ARGC_MIN 2
 
@@ -57,11 +59,13 @@ typedef enum {
     BTSRV_SAMPLE_CMD_GROUP_PAN = 22, /* 22 PAN 测试命令 */
     BTSRV_SAMPLE_CMD_GROUP_HFP_AG = 23, /* 23 HFP-AG 测试命令 */
 #endif
+
+    BTSRV_SAMPLE_CMD_GROUP_ANCS_CLIENT = 24, /* 24 ANCS CLIENT 测试命令 */
+    BTSRV_SAMPLE_CMD_GROUP_AMS_CLIENT = 25, /* 25  AMS CLIENT 测试命令 */
 } btsrv_sample_cmd_group;
 #if (BTH_LE_ONLY == YES) || (BTH_BREDR_LE_DOUBLE == YES)
 static void ble_service_sample_cmd(int32_t module_id, int32_t cmd_id, char **params, int32_t params_num)
 {
-    
     if (params == NULL) {
         return;
     }
@@ -102,6 +106,12 @@ static void ble_service_sample_cmd(int32_t module_id, int32_t cmd_id, char **par
         case BTSRV_SAMPLE_CMD_GROUP_FMP:
             ble_at_fmp_srv_cmd(cmd_id, params, params_num);
             break;
+        case BTSRV_SAMPLE_CMD_GROUP_ANCS_CLIENT:
+            ble_ancs_client_at_cmd(cmd_id, params, params_num);
+            break;
+        case BTSRV_SAMPLE_CMD_GROUP_AMS_CLIENT:
+            ble_ams_client_at_cmd(cmd_id, params, params_num);
+            break;
         default:
             bts_sample_log_with_func("invalid cmd group id\n");
             break;
index 9d60c12..bfef91a 100755 (executable)
@@ -482,7 +482,7 @@ int32_t btsdk_un_pair_device(uintptr_t dev_hdl);
 uintptr_t btsdk_add_remote_device(uint8_t *bd_addr, uint8_t addr_len);
 int32_t btsdk_update_remote_device_name(uintptr_t dev_hdl, uint8_t *name, uint16_t *plen);
 int32_t btsdk_update_remote_device_name_async(uintptr_t dev_hdl, gap_execute_command_cfm_cbk *cfm_cbk);
-int32_t btsdk_start_device_discovery(uint32_t dev_class);
+int32_t btsdk_start_device_discovery(uint32_t dev_class, uint8_t max_num,  uint8_t max_seconds);
 int32_t btsdk_get_remote_device_address(uintptr_t dev_hdl, uint8_t *bd_addr, uint8_t addr_len);
 int32_t btsdk_create_acl_link(uintptr_t dev_hdl, uint8_t link_type);
 int32_t btsdk_create_acl_link_async(uintptr_t dev_hdl, uint8_t link_type, gap_create_connection_cfm_cbk *cfm_cbk);
diff --git a/code/sdk/tools/bin/ohos_tools/ace-loader/jerry-snapshot.exe b/code/sdk/tools/bin/ohos_tools/ace-loader/jerry-snapshot.exe
new file mode 100644 (file)
index 0000000..895c74c
Binary files /dev/null and b/code/sdk/tools/bin/ohos_tools/ace-loader/jerry-snapshot.exe differ
diff --git a/code/sdk/tools/bin/ohos_tools/ace-loader/jerry.exe b/code/sdk/tools/bin/ohos_tools/ace-loader/jerry.exe
new file mode 100644 (file)
index 0000000..3bdadfb
Binary files /dev/null and b/code/sdk/tools/bin/ohos_tools/ace-loader/jerry.exe differ
index 8364845..7f1cef2 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:78f3f87cbaa6a870dd9d831761ce739bc2bbafeda2bb6b81d16e996c4ec754ae
-size 420744
+oid sha256:50235b92e206a09e815fe14c72151af459804ac9f4da442e5cd42c81c03a4498
+size 424520
index 4cad4b2..ee328bc 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:b7c477d213ca5deaa465b11198f183ffb199185c561987df857271b7b71a5277
-size 349752
+oid sha256:5fe2c957c1ebfe67a6b5d823b49f16c5045aae025364c8927b9b663aa1e21247
+size 349776
index 595a8c2..083a2ac 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:0cd5193c6cd78a21acec966babb67d79e9efd353483d89b42236c047e88b4640
-size 1281704
+oid sha256:8e8be28c68be08effa8cabbe2494bda1668226865698eea2a7f86e03800f54a5
+size 1282104
index 1d440b6..038c404 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:75ed053796a4f34bc8c11c8dcf90678cf153d0a05f038157841945466d4b912e
-size 330672
+oid sha256:9fd362db76e002ff8ddb9e37a86ecfe210de0ae3855d707365dbe23730560181
+size 330696
index 4c7c1f9..d8fb024 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:282ef40bfd40050b99c2f3db41f6a086a4ebd88f77259dae535b8d128c94d8fc
-size 131344
+oid sha256:c0397c19b0a08c87dc2842df1b0fea27ca676ef760276757014c4118ce2ca331
+size 131728
index 6c33e88..182eb09 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:51e4702e52a6ed1098fd9aca5fadd85259ff03da6f96e39b4a65a68f1a50a9b0
-size 344400
+oid sha256:3a529edcb039824693731bfdbf78a0de57c70dc1548f45fd38aec8e7882b7af3
+size 344424
index 01d0b4d..8f8efc0 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:0a9f0cc36776f99ebec1d033a56ba932aaecf0ca364ecc365f47d33189255645
-size 1025292
+oid sha256:740562d6fe2d0c9a86ee86394a065bd807a895e9a71a015fdf31adba93fc6ddc
+size 1025692
index 94129ab..9ab642e 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:5298cfa289e41b441fa2aae9525ca38e009ad7d9451ed82815ba895fe150491b
-size 74348
+oid sha256:32ab04bbf6a1acb89d6ecbf8b054d4bed2ce6120c51d7146014bd0e40e0f0f6f
+size 74300
index d1696e5..b4451d3 100755 (executable)
@@ -24,14 +24,18 @@ from param_packet import gen_flash_part_bin
 from nv_binary import nv_begin
 
 # brandy packet
-def build_brandy_other_bin():
+def build_brandy_other_bin(pack_style_str):
     ''' build brandy partition and nv '''
     chip_dir = os.path.join(SDK_DIR, "build", "config", "target_config", "brandy")
     # 分区配置文件路径
     partition_cfg = os.path.join(chip_dir, "param_sector", "param_sector.json")
     partition_bin = os.path.join(SDK_DIR, "output", "brandy", "partition_table.bin")
     # nv配置文件路径
-    nv_config_json = os.path.join(chip_dir, "nv_bin_cfg", "mk_nv_bin_cfg.json")
+    nv_config_json = os.path.join(chip_dir, "nv_bin_cfg")
+    if pack_style_str.endswith("-user"):
+        nv_config_json = os.path.join(nv_config_json, "mk_nv_bin_cfg_user.json")
+    else:
+        nv_config_json = os.path.join(nv_config_json, "mk_nv_bin_cfg_eng.json")
     targets = ["acore"]
     # 输出路径
     nv_output_path = os.path.join(SDK_DIR, "output", "brandy", "nv_bin")
@@ -45,7 +49,7 @@ def build_brandy_other_bin():
 
 def make_all_in_one_packet(pack_style_str):
     # make all in one packet
-    build_brandy_other_bin()
+    build_brandy_other_bin(pack_style_str)
 
     bin_dir = os.path.join(PKG_DIR, "bin", "brandy")
     application_dir = os.path.join(SDK_DIR,
@@ -54,6 +58,7 @@ def make_all_in_one_packet(pack_style_str):
                                    "acore",
                                    pack_style_str)
     recovery_target = "%s-r" % pack_style_str
+    recovery_target = recovery_target.replace('-user', '')
     recovery_bin = os.path.join(SDK_DIR,
                                 "output",
                                 "brandy",
diff --git a/patch_602_base_to_0521.txt b/patch_602_base_to_0521.txt
new file mode 100644 (file)
index 0000000..28667ea
--- /dev/null
@@ -0,0 +1,87 @@
+【补丁名称】patch_602_base_to_0521\r
+【基础版本】b602\r
+【修复问题】\r
+BT合入内容\r
+    1、解决调用a2dp snk接口断开失败问题。\r
+    2、解决手表与android手机通过WRTM连接后取消配对后能搜到手表BT但是连接不上的问题。\r
+    3、客户需求:BT自动回连开关、BT回连接口。\r
+    4、解决BLE数传触发流控丢包后A核无感知的问题。\r
+    5、优化B核BLE GAP事件上报流程,解决断连事件上报慢的问题。\r
+    6、解决BLE GATT断连处理中内存泄漏问题。\r
+    7、解决BR回连失败问题。\r
+    8、优化GATT服务发现、写请求等阻塞流程,从死等优化成60s超时。 \r
+    9、配置MTU默认值为23,解决ios mut更新失败兼容性问题。\r
+    10、客户需求合入:inquiry参数配置接口,可配置参数:设备类型、最大设备数量。\r
+    11、新增维测日志。\r
+    12、配合btc解决BLE数传和通话共存场景下通话卡顿问题,具体方案是:BT通话和BLE共存时,BT通话结束,连接参数恢复成原先的值。\r
+    13、解决ble地址变化时BLE write响应上报不成功问题。\r
+    14、增加默认广播数据名字长度限制。 \r
+    15、解决BT回连过程中,BLE数传ipc error问题。\r
+    16、解决MMI扫描内存不足问题\r
+    17、解决BLE配置广播数据后未清理内存导致系统内存资源不足问题\r
+    18、新增BLE ANCS/AMS Client功能\r
+PLT合入内容\r
+    1、dfx维测增强,增加bt panic场景bt ram,bt trace,preserve信息。\r
+    2、A核到B核IPC消息判断B核深睡flag。\r
+    3、复位前保护,复位等待B核响应。\r
+    4、QSPI指针越界\r
+    5、解决屏幕概率显示黑线,增加gpu memretention配置    \r
+    6、解决efuse写bit问题\r
+    7、SEC sha hash运算错误\r
+    8、适配2G NANDflash\r
+    9、RTC定时问题\r
+    10、解决log dump重新配置狗超时\r
+    11、增加user target,默认开启离线日志\r
+    12、离线日志增加流控功能\r
+    13、优化windows编译路径长问题\r
+    14、nv配置区分user和eng版本,解决nv升级未生效问题\r
+GUI合入内容\r
+    1、支持蜂窝进入退出仿苹果动效\r
+    2、支持CoverFlow的松手惯性动效\r
+    3、支持Dump图片资源使用信息\r
+    4、优化视频页面截图以及跳转进入动效方案\r
+    5、解决图片资源加卸载过程中的内存异常问题\r
+    6、解决SVG解析失败问题\r
+    7、解决页面跳转崩溃问题\r
+    8、解决跑马灯因精度导致的抖动问题\r
+    9、解决触摸事件因不同页面控件地址相同导致的异常处理问题\r
+    10、关闭MapBuffer节省图形占用内存\r
+    11、解决弧形列表内存泄漏问题\r
+    12、解决UICrossView 已对齐时松手不上报ScrollEnd回调\r
+    13、预防通过UIView清除了其他焦点控件\r
+    14、修复内存分配时内存没对齐问题\r
+    15、修复问题:Text绘制应取交集,否则可能传超大区域导致VAU绘制报错\r
+    16、修复corssview UIMenuItem截图失败\r
+AUDIO&MEDIA合入内容\r
+    1、解决3A算法无法调参的问题\r
+    2、解决HSO命令行无法dump数据的问题,删去多余的realpath操作\r
+    3、支持使用seek的方式进行音视频的循环播放,提升性能\r
+    4、解决从本地音乐切换到蓝牙音乐频率不改变的问题\r
+    5、支持设置视频退出的同步和异步模式\r
+OHOS合入内容\r
+    1、支持音频资源文件打包到JS应用的需求\r
+    2、支持百度矢量地图,合入百度JSI接口的修改\r
+    3、解决自定义地图控件场景ref count反转导致挂死问题\r
+GPU合入内容:\r
+    1、解决视频播放花屏问题以及低功耗时访问GPU寄存器问题\r
+    2、解决多线程场景下低功耗时GPU寄存器访问挂死问题\r
+NATIVE-JS sample合入内容\r
+    1、增加表盘管理\r
+    2、增加卡片管理\r
+    3、增加列表蜂窝切换\r
+    4、解决概率通话无声、耳机回连失败问题\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
+       全功能冒烟\r
+    自验证target:\r
+       Native-js、target3 rc版本\r
+【是否合入版本】根据测试结果确定
\ No newline at end of file
diff --git a/tools/ace-loader/jerry-snapshot.exe b/tools/ace-loader/jerry-snapshot.exe
new file mode 100644 (file)
index 0000000..895c74c
Binary files /dev/null and b/tools/ace-loader/jerry-snapshot.exe differ
diff --git a/tools/ace-loader/jerry.exe b/tools/ace-loader/jerry.exe
new file mode 100644 (file)
index 0000000..3bdadfb
Binary files /dev/null and b/tools/ace-loader/jerry.exe differ
diff --git a/tools/dial_converter_tool/README.txt b/tools/dial_converter_tool/README.txt
new file mode 100644 (file)
index 0000000..58d2c0f
--- /dev/null
@@ -0,0 +1,11 @@
+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
diff --git a/tools/dial_converter_tool/common_types.py b/tools/dial_converter_tool/common_types.py
new file mode 100644 (file)
index 0000000..444fc6e
--- /dev/null
@@ -0,0 +1,26 @@
+#!/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
diff --git a/tools/dial_converter_tool/converter.py b/tools/dial_converter_tool/converter.py
new file mode 100644 (file)
index 0000000..502ed35
--- /dev/null
@@ -0,0 +1,184 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_arc_label.py b/tools/dial_converter_tool/dial_arc_label.py
new file mode 100644 (file)
index 0000000..5f493fa
--- /dev/null
@@ -0,0 +1,67 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_arc_progress.py b/tools/dial_converter_tool/dial_arc_progress.py
new file mode 100644 (file)
index 0000000..1ee9f56
--- /dev/null
@@ -0,0 +1,101 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_box_progress.py b/tools/dial_converter_tool/dial_box_progress.py
new file mode 100644 (file)
index 0000000..b427fe6
--- /dev/null
@@ -0,0 +1,103 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_click.py b/tools/dial_converter_tool/dial_click.py
new file mode 100644 (file)
index 0000000..957dd7d
--- /dev/null
@@ -0,0 +1,46 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_digital_img.py b/tools/dial_converter_tool/dial_digital_img.py
new file mode 100644 (file)
index 0000000..a19c1b3
--- /dev/null
@@ -0,0 +1,71 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_kaleidoscope.py b/tools/dial_converter_tool/dial_kaleidoscope.py
new file mode 100644 (file)
index 0000000..450a6db
--- /dev/null
@@ -0,0 +1,34 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_label.py b/tools/dial_converter_tool/dial_label.py
new file mode 100644 (file)
index 0000000..a2549bf
--- /dev/null
@@ -0,0 +1,85 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_option_img.py b/tools/dial_converter_tool/dial_option_img.py
new file mode 100644 (file)
index 0000000..e5e318a
--- /dev/null
@@ -0,0 +1,48 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_rotate_img.py b/tools/dial_converter_tool/dial_rotate_img.py
new file mode 100644 (file)
index 0000000..a7d6e2e
--- /dev/null
@@ -0,0 +1,49 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_sequence_img.py b/tools/dial_converter_tool/dial_sequence_img.py
new file mode 100644 (file)
index 0000000..09781e8
--- /dev/null
@@ -0,0 +1,52 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_static_img.py b/tools/dial_converter_tool/dial_static_img.py
new file mode 100644 (file)
index 0000000..4e8302e
--- /dev/null
@@ -0,0 +1,46 @@
+#!/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
diff --git a/tools/dial_converter_tool/dial_video.py b/tools/dial_converter_tool/dial_video.py
new file mode 100644 (file)
index 0000000..f83c85c
--- /dev/null
@@ -0,0 +1,39 @@
+#!/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
diff --git a/tools/dial_converter_tool/dll/linux_cs/libcodec.so b/tools/dial_converter_tool/dll/linux_cs/libcodec.so
new file mode 100644 (file)
index 0000000..1b99f0b
Binary files /dev/null and b/tools/dial_converter_tool/dll/linux_cs/libcodec.so differ
diff --git a/tools/dial_converter_tool/dll/linux_es/libcodec.so b/tools/dial_converter_tool/dll/linux_es/libcodec.so
new file mode 100644 (file)
index 0000000..ddb8838
Binary files /dev/null and b/tools/dial_converter_tool/dll/linux_es/libcodec.so differ
diff --git a/tools/dial_converter_tool/dll/x64/release_cs/ICE_V5R1_BLOCK_HTC.dll b/tools/dial_converter_tool/dll/x64/release_cs/ICE_V5R1_BLOCK_HTC.dll
new file mode 100644 (file)
index 0000000..21b76ed
Binary files /dev/null and b/tools/dial_converter_tool/dll/x64/release_cs/ICE_V5R1_BLOCK_HTC.dll differ
diff --git a/tools/dial_converter_tool/dll/x64/release_cs/ICE_V5R1_BLOCK_HTC.lib b/tools/dial_converter_tool/dll/x64/release_cs/ICE_V5R1_BLOCK_HTC.lib
new file mode 100644 (file)
index 0000000..fcdc59f
Binary files /dev/null and b/tools/dial_converter_tool/dll/x64/release_cs/ICE_V5R1_BLOCK_HTC.lib differ
diff --git a/tools/dial_converter_tool/dll/x64/release_es/ICE_V5R1_BLOCK_HTC.dll b/tools/dial_converter_tool/dll/x64/release_es/ICE_V5R1_BLOCK_HTC.dll
new file mode 100644 (file)
index 0000000..4b74cd6
Binary files /dev/null and b/tools/dial_converter_tool/dll/x64/release_es/ICE_V5R1_BLOCK_HTC.dll differ
diff --git a/tools/dial_converter_tool/dll/x64/release_es/ICE_V5R1_BLOCK_HTC.lib b/tools/dial_converter_tool/dll/x64/release_es/ICE_V5R1_BLOCK_HTC.lib
new file mode 100644 (file)
index 0000000..811632b
Binary files /dev/null and b/tools/dial_converter_tool/dll/x64/release_es/ICE_V5R1_BLOCK_HTC.lib differ
diff --git a/tools/dial_converter_tool/img_convert.py b/tools/dial_converter_tool/img_convert.py
new file mode 100644 (file)
index 0000000..50abf97
--- /dev/null
@@ -0,0 +1,300 @@
+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
diff --git a/tools/dial_converter_tool/instance/analogue_dial/BIGCIRCLE_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/BIGCIRCLE_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..e6e3822
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/BIGCIRCLE_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/HEARTRATE_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/HEARTRATE_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..18e4557
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/HEARTRATE_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/HOURHAND.png b/tools/dial_converter_tool/instance/analogue_dial/HOURHAND.png
new file mode 100644 (file)
index 0000000..77cf955
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/HOURHAND.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/MAIN_FACE_IMAGE.png b/tools/dial_converter_tool/instance/analogue_dial/MAIN_FACE_IMAGE.png
new file mode 100644 (file)
index 0000000..e9369ea
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/MAIN_FACE_IMAGE.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/MEDCIRCLE_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/MEDCIRCLE_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..7a47b8f
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/MEDCIRCLE_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/MINUTEHAND.png b/tools/dial_converter_tool/instance/analogue_dial/MINUTEHAND.png
new file mode 100644 (file)
index 0000000..f4b1dbe
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/MINUTEHAND.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/PROGRESS_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/PROGRESS_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..9545cff
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/PROGRESS_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/SECONDHAND.png b/tools/dial_converter_tool/instance/analogue_dial/SECONDHAND.png
new file mode 100644 (file)
index 0000000..147de5f
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/SECONDHAND.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/SMALLCIRCLE_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/SMALLCIRCLE_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..54d9901
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/SMALLCIRCLE_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/analogue_dial.xml b/tools/dial_converter_tool/instance/analogue_dial/analogue_dial.xml
new file mode 100644 (file)
index 0000000..ee40385
--- /dev/null
@@ -0,0 +1,15 @@
+<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
diff --git a/tools/dial_converter_tool/instance/analogue_dial/preview_img.JPG b/tools/dial_converter_tool/instance/analogue_dial/preview_img.JPG
new file mode 100644 (file)
index 0000000..2b1ee83
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/preview_img.JPG differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/week/FIRDAY_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/week/FIRDAY_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..9c39932
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/week/FIRDAY_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/week/MONDAY_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/week/MONDAY_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..58d2cdd
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/week/MONDAY_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/week/SATURDAY_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/week/SATURDAY_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..861ad16
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/week/SATURDAY_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/week/SUNDAY_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/week/SUNDAY_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..1a09471
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/week/SUNDAY_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/week/THURSDAY_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/week/THURSDAY_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..a2e27c6
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/week/THURSDAY_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/week/TUESDAY_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/week/TUESDAY_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..c5b292d
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/week/TUESDAY_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/analogue_dial/week/WEDNESDAY_IMAGE_PATH.png b/tools/dial_converter_tool/instance/analogue_dial/week/WEDNESDAY_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..e099b56
Binary files /dev/null and b/tools/dial_converter_tool/instance/analogue_dial/week/WEDNESDAY_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/kaleidoscope_dial/BIGCIRCLE_IMAGE_PATH.png b/tools/dial_converter_tool/instance/kaleidoscope_dial/BIGCIRCLE_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..e6e3822
Binary files /dev/null and b/tools/dial_converter_tool/instance/kaleidoscope_dial/BIGCIRCLE_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/kaleidoscope_dial/HOURHAND.png b/tools/dial_converter_tool/instance/kaleidoscope_dial/HOURHAND.png
new file mode 100644 (file)
index 0000000..77cf955
Binary files /dev/null and b/tools/dial_converter_tool/instance/kaleidoscope_dial/HOURHAND.png differ
diff --git a/tools/dial_converter_tool/instance/kaleidoscope_dial/MEDCIRCLE_IMAGE_PATH.png b/tools/dial_converter_tool/instance/kaleidoscope_dial/MEDCIRCLE_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..7a47b8f
Binary files /dev/null and b/tools/dial_converter_tool/instance/kaleidoscope_dial/MEDCIRCLE_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/kaleidoscope_dial/MINUTEHAND.png b/tools/dial_converter_tool/instance/kaleidoscope_dial/MINUTEHAND.png
new file mode 100644 (file)
index 0000000..f4b1dbe
Binary files /dev/null and b/tools/dial_converter_tool/instance/kaleidoscope_dial/MINUTEHAND.png differ
diff --git a/tools/dial_converter_tool/instance/kaleidoscope_dial/SECONDHAND.png b/tools/dial_converter_tool/instance/kaleidoscope_dial/SECONDHAND.png
new file mode 100644 (file)
index 0000000..147de5f
Binary files /dev/null and b/tools/dial_converter_tool/instance/kaleidoscope_dial/SECONDHAND.png differ
diff --git a/tools/dial_converter_tool/instance/kaleidoscope_dial/SMALLCIRCLE_IMAGE_PATH.png b/tools/dial_converter_tool/instance/kaleidoscope_dial/SMALLCIRCLE_IMAGE_PATH.png
new file mode 100644 (file)
index 0000000..54d9901
Binary files /dev/null and b/tools/dial_converter_tool/instance/kaleidoscope_dial/SMALLCIRCLE_IMAGE_PATH.png differ
diff --git a/tools/dial_converter_tool/instance/kaleidoscope_dial/kaleidoscope_dial.xml b/tools/dial_converter_tool/instance/kaleidoscope_dial/kaleidoscope_dial.xml
new file mode 100644 (file)
index 0000000..4c1511e
--- /dev/null
@@ -0,0 +1,9 @@
+<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
diff --git a/tools/dial_converter_tool/instance/kaleidoscope_dial/preview_img.PNG b/tools/dial_converter_tool/instance/kaleidoscope_dial/preview_img.PNG
new file mode 100644 (file)
index 0000000..9d7239d
Binary files /dev/null and b/tools/dial_converter_tool/instance/kaleidoscope_dial/preview_img.PNG differ
diff --git a/tools/dial_converter_tool/instance/kaleidoscope_dial/rabbit454.png b/tools/dial_converter_tool/instance/kaleidoscope_dial/rabbit454.png
new file mode 100644 (file)
index 0000000..d937bf2
Binary files /dev/null and b/tools/dial_converter_tool/instance/kaleidoscope_dial/rabbit454.png differ
diff --git a/tools/dial_converter_tool/main.py b/tools/dial_converter_tool/main.py
new file mode 100644 (file)
index 0000000..cc57403
--- /dev/null
@@ -0,0 +1,45 @@
+#!/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
diff --git a/tools/dial_converter_tool/video_convert.py b/tools/dial_converter_tool/video_convert.py
new file mode 100644 (file)
index 0000000..d447a16
--- /dev/null
@@ -0,0 +1,32 @@
+#!/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
diff --git a/tools/dial_converter_tool/视频表盘制作变更.txt b/tools/dial_converter_tool/视频表盘制作变更.txt
new file mode 100644 (file)
index 0000000..8a9184b
--- /dev/null
@@ -0,0 +1,4 @@
+新增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