openharmony_ci e4295d56f8 !40 safwk_lite组件依赖改成弱耦合
Merge pull request !40 from 吴敏杰/master
2024-12-31 08:43:23 +00:00
2023-09-05 11:00:17 +08:00
2022-09-28 09:36:51 +08:00
2024-12-31 06:17:44 +00:00
2024-12-30 13:54:46 +08:00
2024-05-23 10:58:49 +08:00
2022-09-28 09:36:51 +08:00
2022-10-24 14:23:23 +08:00

safwk_lite

Introduction

The Lite System Ability Framework (safwk_lite) component provides an empty process for running basic services.

System Architecture

Figure 1 Service-oriented architecture

  • Provider: a service provider that provides capabilities (external APIs) for the system.
  • Consumer: a service consumer that invokes the features (external APIs) provided by the service.
  • Samgr: an agency that manages capabilities provided by providers and helps consumers discover providers' capabilities.

Directory Structure

The following table describes the directory structure of the safwk_lite source code.

Table 1 Directory structure of the major source code

Name Description
safwk_lite Implementation of the foundation process.
bool Publish(sptr<IRemoteObject> systemAbility); Publishes a system ability.
virtual void DoStartSAProcess(const std::string& profilePath) = 0; Enables a system ability based on its profile.

The source code directory structure of the safwk_lite component is as follows:

├── BUILD.gn
├── readme.md
├── LICENSE
├── src
    └── main.c

Usage

Add a service to the foundation process.

After writing the service information based on the service template, add the dependencies to the BUILD.gn file.

deps = [
  "${aafwk_lite_path}/services/abilitymgr_lite:abilityms",
  "${appexecfwk_lite_path}/services/bundlemgr_lite:bundlems",
  "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
  "//base/security/permission_lite/services/ipc_auth:ipc_auth_target",
  "//base/security/permission_lite/services/pms:pms_target",
  "//foundation/ability/dmsfwk_lite:dtbschedmgr",
  "//foundation/systemabilitymgr/samgr_lite/samgr_server:server",
]

Repositories Involved

Samgr

systemabilitymgr_samgr_lite

systemabilitymgr_samgr

systemabilitymgr_safwk

systemabilitymgr_safwk_lite

S
Description
foundation process | foundation系统进程
Readme 973 KiB
Languages
C 100%