背景
2023年11月,OpenHarmony如期而至的发布了4.0版本,开发套件同步升级到API 10。相比3.2 Release版本,新增4000多个API,应用开发能力更加丰富。虽然社区也同步发布了4.0的release报告也列了不少特性说明,对熟悉的人可能看的很清晰明了。此文章就做了个表格,从代码层面进行另一种解读。这是借助了社区的编译规范整改做的代码分析,基于的是4.0Release的源码
组件列表
名称 | 描述 | 版本 | 组件 | 子系统 | 系统能力 | 依赖组件 | 依赖三方库 |
---|---|---|---|---|---|---|---|
@ohos/ffrt | Concurrent Programming Framework | 4.0 | ffrt | resourceschedule | [] | [“hilog”, “hisysevent”, “hitrace”, “ipc”, “napi”, “frame_aware_sched”, “faultloggerd”] | [“bounds_checking_function”, “libunwind”] |
@ohos/device_standby | device_standby | 4.0 | device_standby | resourceschedule | [] | [“ability_base”, “ability_runtime”, “access_token”, “background_task_mgr”, “battery_manager”, “bundle_framework”, “call_manager”, “common_event_service”, “config_policy”, “c_utils”, “eventhandler”, “hilog”, “init”, “ipc”, “input”, “napi”, “netmanager_base”, “power_manager”, “safwk”, “samgr”, “sensor”, “time_service”, “work_scheduler”, “wifi”] | [“googletest”] |
@ohos/background_task_mgr | background task manager service | 3.1 | background_task_mgr | resourceschedule | [“SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask”, “SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask”, “SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply”] | [“ability_base”, “ability_runtime”, “access_token”, “bundle_framework”, “common_event_service”, “eventhandler”, “hitrace”, “hilog”, “ipc”, “init”, “napi”, “os_account”, “resource_management”, “safwk”, “samgr”, “c_utils”, “distributed_notification_service”, “hisysevent”, “hiview”, “i18n”, “relational_store”] | [“icu”] |
@ohos/resource_schedule_service | resource schedule service | 3.1 | resource_schedule_service | resourceschedule | [] | [“ability_base”, “ability_runtime”, “access_token”, “audio_framework”, “background_task_mgr”, “bluetooth”, “bundle_framework”, “c_utils”, “common_event_service”, “config_policy”, “core_service”, “efficiency_manager”, “eventhandler”, “frame_aware_sched”, “hilog”, “hisysevent”, “hitrace”, “init”, “ipc”, “movement”, “input”, “samgr”, “safwk”, “soc_perf”, “state_registry”, “window_manager”] | [“json”, “libxml2”] |
@ohos/qos_manager | qos_manager | 3.1 | qos_manager | resourceschedule | [] | [“ability_base”, “ability_runtime”, “c_utils”, “eventhandler”, “frame_aware_sched”, “hilog”, “hitrace”, “ipc”, “safwk”, “samgr”] | [“json”, “jsoncpp”] |
@ohos/frame_aware_sched | frame_aware_sched | 3.1 | frame_aware_sched | resourceschedule | [] | [“c_utils”, “eventhandler”, “hitrace”, “hilog”, “samgr”, “safwk”] | [“bounds_checking_function”, “libxml2”] |
@ohos/memmgr | memory management | 3.1.0 | memmgr | resourceschedule | null | [“ipc”, “ability_base”, “bundle_framework”, “safwk”, “background_task_mgr”, “ability_runtime”, “os_account”, “common_event_service”, “eventhandler”, “hilog”, “c_utils”, “samgr”, “resource_management”, “access_token”, “init”] | [] |
@ohos/work_scheduler | work scheduler service | 3.1 | work_scheduler | resourceschedule | [“SystemCapability.ResourceSchedule.WorkScheduler”] | [“thermal_manager”, “bundle_framework”, “safwk”, “os_account”, “common_event_service”, “ipc”, “c_utils”, “ability_runtime”, “hilog”, “samgr”, “hisysevent”, “napi”, “battery_manager”, “ability_base”, “eventhandler”, “background_task_mgr”, “device_standby”, “device_usage_statistics”, “access_token”, “netmanager_base”, “time_service”] | [“jsoncpp”] |
@ohos/device_usage_statistics | device usage statistics | 3.1 | device_usage_statistics | resourceschedule | [“SystemCapability.ResourceSchedule.UsageStatistics.AppGroup”, “SystemCapability.ResourceSchedule.UsageStatistics.App”] | [“bundle_framework”, “relational_store”, “safwk”, “common_event_service”, “os_account”, “ipc”, “access_token”, “ability_runtime”, “hilog”, “samgr”, “c_utils”, “napi”, “ability_base”, “background_task_mgr”, “eventhandler”, “power_manager”, “time_service”, “init”] | [] |
@ohos/samgr | system ability manager | 3.1 | samgr | systemabilitymgr | null | [“ability_base”, “access_token”, “bluetooth”, “c_utils”, “common_event_service”, “eventhandler”, “device_manager”, “hicollie”, “hilog”, “hisysevent”, “hitrace”, “init”, “ipc”, “resource_schedule_service”, “safwk”, “selinux_adapter”] | null |
@ohos/safwk | system ability framework | 3.1 | safwk | systemabilitymgr | null | [“hilog”, “hitrace”, “ipc”, “init”, “samgr”, “c_utils”] | null |
@ohos/distributeddatamgr_file | provides the application with JS interfaces for IO | 3.1 | distributedfilejs | distributeddatamgr | [“SystemCapability.FileManagement.File.FileIO”, “SystemCapability.FileManagement.File.Environment”, “SystemCapability.FileManagement.File.DistributedFile”] | [“ability_base”, “ability_manager”, “appexecfwk_base”, “appexecfwk_core”, “want”, “libhilog”, “ipc_core”, “ace_napi”, “samgr_proxy”] | [“e2fsprogs”] |
@ohos/pasteboard | Allowing paste/copy functions | 3.0 | pasteboard | distributeddatamgr | [“SystemCapability.Miscservices.Pasteboard”] | [“ability_base”, “ability_runtime”, “access_token”, “app_file_service”, “bundle_framework”, “c_utils”, “device_info_manager”, “device_manager”, “dfs_service”, “dlp_permission_service”, “eventhandler”, “file_api”, “hisysevent”, “hitrace”, “hilog”, “init”, “input”, “imf”, “ipc”, “image_framework”, “napi”, “os_account”, “safwk”, “samgr”, “time_service”] | [“libuv”] |
@ohos/napi | Node-API (formerly N-API) is an API for build native Addons | 3.1 | napi | arkui | [“SystemCapability.ArkUI.ArkUI.Napi”, “SystemCapability.ArkUI.ArkUI.Libuv”] | [“ets_runtime”, “hilog”, “hitrace”, “init”] | [“icu”, “jerryscript”, “libuv”, “node”, “bounds_checking_function”] |
@ohos/ui_appearance | Provide ui_appearance management. | 3.2 | ui_appearance | arkui | [“SystemCapability.ArkUI.UiAppearance”] | [“ability_runtime”, “ability_base”, “access_token”, “c_utils”, “hilog”, “init”, “ipc”, “napi”, “safwk”, “samgr”] | [] |
@ohos/advanced_ui_component | advanced_ui_component | 1.0.0 | advanced_ui_component | arkui | [] | [“hilog”, “napi”] | [] |
@ohos/neural_network_runtime | The Neural Network Runtime that bridges the inference framework and the device accelerator. | 4.0 | neural_network_runtime | ai | [] | [“c_utils”, “drivers_interface_nnrt”, “hdf_core”, “hilog”, “hitrace”, “mindspore”] | [] |
@ohos/intelligent_voice_framework | intelligent_voice framework | 4.0 | intelligent_voice_framework | ai | [“SystemCapability.AI.IntelligentVoice.Core”] | [“ability_base”, “ability_runtime”, “access_token”, “c_utils”, “common_event_service”, “data_share”, “drivers_interface_intelligent_voice”, “eventhandler”, “hdf_core”, “hilog”, “ipc”, “kv_store”, “audio_framework”, “napi”, “relational_store”, “safwk”, “samgr”] | [] |
@ohos/mindspore | AI Framework. | 3.1 | mindspore | thirdparty | [“SystemCapability.Ai.MindSpore”] | [“c_utils”, “hilog”, “hdf_core”, “ipc”, “neural_network_runtime”, “neural_network_runtime_ext”, “drivers_interface_nnrt”, “ability_runtime”, “napi”, “resource_management”, “bounds_checking_function”] | [] |
@ohos/device_info_manager | device profile | 3.1 | device_info_manager | deviceprofile | null | [“c_utils”, “hisysevent”, “hilog”, “ipc”, “syscap_codec”, “access_token”, “device_auth”, “samgr”, “kv_store”, “hitrace”, “eventhandler”, “safwk”, “dsoftbus”, “dmsfwk”, “device_manager”, “init”] | [“json”] |
@ohos/device_manager | device manager service | 3.0 | device_manager | distributedhardware | [“SystemCapability.DistributedHardware.DeviceManager”] | [“ability_base”, “ability_runtime”, “access_token”, “bundle_framework”, “c_utils”, “common_event_service”, “device_auth”, “dsoftbus”, “hisysevent”, “hitrace”, “hilog”, “init”, “ipc”, “napi”, “os_account”, “safwk”, “samgr”, “resource_management”] | [“json”, “node”, “googletest”, “mbedtls”, “openssl”] |
@ohos/distributed_hardware_fwk | distributed hardware framework | 4.0 | distributed_hardware_fwk | distributedhardware | [“SystemCapability.DistributedHardware.DistributedHardwareFWK”] | [“dsoftbus”, “eventhandler”, “hitrace”, “c_utils”, “hilog”, “samgr”, “ipc”, “safwk”, “hisysevent”, “device_manager”, “config_policy”, “init”, “kv_store”, “resource_schedule_service”, “graphic_2d”, “histreamer”] | [“json”, “googletest”, “openssl”] |
@ohos/drivers_peripheral_distributed_audio | distributed audo device driver | 4.0 | drivers_peripheral_distributed_audio | distributedhardware | null | [“c_utils”, “drivers_interface_distributed_audio”, “hdf_core”, “hilog”, “ipc”] | [] |
@ohos/distributed_audio | distributed audio | 4.0 | distributed_audio | distributedhardware | [“SystemCapability.DistributedHardware.DistributedAudio”] | [“audio_framework”, “c_utils”, “distributed_hardware_fwk”, “drivers_interface_audio”, “dsoftbus”, “eventhandler”, “hdf_core”, “hisysevent”, “hitrace”, “hilog”, “init”, “ipc”, “player_framework”, “safwk”, “samgr”] | [“json”] |
@ohos/drivers_interface_distributed_audio | distributed audio device driver interface | 4.0 | drivers_interface_distributed_audio | distributedhardware | null | [“ipc”, “hdf_core”, “hilog”, “c_utils”] | [] |
@ohos/distributed_screen | distributed hardware screen | 3.1 | distributed_screen | distributedhardware | [“SystemCapability.DistributedHardware.DistributedScreen”] | [“dsoftbus”, “hisysevent”, “init”, “ipc”, “hilog”, “input”, “graphic_2d”, “samgr”, “safwk”, “hitrace”, “c_utils”, “player_framework”, “window_manager”, “image_framework”, “distributed_hardware_fwk”] | [“json”, “libjpeg-turbo”] |
@ohos/distributed_input | distributed hardware input | 3.2 | distributed_input | distributedhardware | [“SystemCapability.DistributedHardware.DistributedInput”] | [“eventhandler”, “hilog”, “ipc”, “safwk”, “samgr”, “dsoftbus”, “c_utils”, “distributed_hardware_fwk”, “config_policy”, “hisysevent”, “hitrace”, “graphic_2d”, “window_manager”] | [“jsoncpp”, “googletest”, “libevdev”, “openssl”] |
@ohos/bluetooth_service | Provides basic Bluetooth and BLE functions for applications | 3.2.0 | bluetooth_service | communication | [“SystemCapability.Communication.Bluetooth.Core”, “SystemCapability.Communication.Bluetooth.Lite”] | [“ability_base”, “ability_runtime”, “audio_framework”, “av_session”, “base”, “hilog”, “hisysevent”, “hitrace”, “ipc”, “samgr_proxy”, “samgr”, “access_token”, “bluetooth”, “drivers_interface_bluetooth”, “eventhandler”, “ability_base”, “call_manager”, “core_service”, “hdf_core”, “init”, “input”, “safwk”, “common_event_service”, “state_registry”, “c_utils”] | [“googletest”, “libuv”, “libxml2”, “openssl”, “bounds_checking_function”] |
@openharmony/dsoftbus | dsoftbus | 3.0 | dsoftbus | communication | [“SystemCapability.Communication.SoftBus.Core”] | [“ability_base”, “ability_runtime”, “access_token”, “algorithm”, “bluetooth”, “bundle_framework”, “common”, “common_event_service”, “data_share”, “device_auth”, “drivers_interface_wlan”, “hicollie_native”, “hisysevent”, “hitrace”, “hilog”, “huks”, “init”, “ipc”, “os_account”, “relational_store”, “c_utils”, “safwk”, “samgr”, “wifi”] | [“bounds_checking_function”, “cJSON”, “libcoap”, “libnl”, “mbedtls”, “openssl”, “sqlite”] |
@ohos/dhcp | The DHCP module provides DHCP client and DHCP service, used to obtain, assign and manage IP address. | 3.1.0 | dhcp | communication | [] | [“ability_base”, “bundle_framework”, “c_utils”, “common_event_service”, “eventhandler”, “hilog”] | [“bounds_checking_function”, “openssl”] |
@openharmony/wifi_lite | wifi_lite | 3.1.0 | wifi_lite | communication | null | [] | [] |
@ohos/wifi | The WLAN module provides basic WLAN functions, peer-to-peer (P2P) connection, and WLAN notification, enabling your application to communicate with other devices through a WLAN. |