Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 17-Mar-2025 | - | ||||
figures/ | H | 17-Mar-2025 | - | |||
src/ | H | 17-Mar-2025 | - | 69 | 41 | |
BUILD.gn | H A D | 17-Mar-2025 | 1.8 KiB | 58 | 49 | |
LICENSE | H A D | 17-Mar-2025 | 10.1 KiB | 177 | 150 | |
OAT.xml | H A D | 17-Mar-2025 | 6.1 KiB | 89 | 40 | |
README.md | H A D | 17-Mar-2025 | 2.5 KiB | 70 | 45 | |
README_zh.md | H A D | 17-Mar-2025 | 2.9 KiB | 86 | 58 | |
bundle.json | H A D | 17-Mar-2025 | 1.2 KiB | 46 | 46 |
README.md
1# safwk_lite 2 3## Introduction 4 5The Lite System Ability Framework (safwk_lite) component provides an empty process for running basic services. 6 7## System Architecture 8 9Figure 1 Service-oriented architecture 10 11 12 13 14- Provider: a service provider that provides capabilities (external APIs) for the system. 15- Consumer: a service consumer that invokes the features (external APIs) provided by the service. 16- Samgr: an agency that manages capabilities provided by providers and helps consumers discover providers' capabilities. 17 18 19## Directory Structure 20 21The following table describes the directory structure of the safwk_lite source code. 22 23**Table 1** Directory structure of the major source code 24 25| Name | Description | 26| ------------------------------------------------------------ | -------------------------------------- | 27| safwk_lite | Implementation of the foundation process. | 28| bool Publish(sptr\<IRemoteObject> systemAbility); | Publishes a system ability. | 29| virtual void DoStartSAProcess(const std::string& profilePath) = 0; | Enables a system ability based on its profile.| 30 31The source code directory structure of the safwk\_lite component is as follows: 32 33``` 34├── BUILD.gn 35├── readme.md 36├── LICENSE 37├── src 38 └── main.c 39``` 40 41## Usage 42 43Add a service to the foundation process. 44 45After writing the service information based on the service template, add the dependencies to the **BUILD.gn** file. 46 47``` 48deps = [ 49 "${aafwk_lite_path}/services/abilitymgr_lite:abilityms", 50 "${appexecfwk_lite_path}/services/bundlemgr_lite:bundlems", 51 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 52 "//base/security/permission_lite/services/ipc_auth:ipc_auth_target", 53 "//base/security/permission_lite/services/pms:pms_target", 54 "//foundation/ability/dmsfwk_lite:dtbschedmgr", 55 "//foundation/systemabilitymgr/samgr_lite/samgr_server:server", 56] 57``` 58 59## Repositories Involved 60 61Samgr 62 63[systemabilitymgr\_samgr\_lite](https://gitee.com/openharmony/systemabilitymgr_samgr_lite) 64 65[systemabilitymgr\_samgr](https://gitee.com/openharmony/systemabilitymgr_samgr) 66 67[systemabilitymgr\_safwk](https://gitee.com/openharmony/systemabilitymgr_safwk) 68 69[**systemabilitymgr\_safwk\_lite**](https://gitee.com/openharmony/systemabilitymgr_safwk_lite) 70
README_zh.md
1# 轻量型系统服务框架部件<a name="ZH-CN_TOPIC_0000001081445008"></a> 2 3- [简介](#section11660541593) 4- [目录](#section1464106163817) 5- [使用](#section10729231131110) 6- [相关仓](#section176111311166) 7 8## 简介<a name="section11660541593"></a> 9 10safwklite模块负责提供基础服务运行的空进程。 11 12## 系统架构<a name="section342962219551"></a> 13 14**图 1** 面向服务的架构 15 16 17 18 19- Provider:服务的提供者,为系统提供能力(对外接口)。 20- Consumer:服务的消费者,调用服务提供的功能(对外接口)。 21- Samgr:作为中介者,管理Provider提供的能力,同时帮助Consumer发现Provider的能力。 22 23 24## 目录<a name="section1464106163817"></a> 25 26系统服务管理源代码目录结构如下表所示: 27 28**表1 **主要源代码目录结构 29 30<a name="table43531856201716"></a> 31<table><thead align="left"><tr id="row20416556201718"><th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.1"><p id="p10416456121716"><a name="p10416456121716"></a><a name="p10416456121716"></a>名称</p> 32</th> 33<th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.2"><p id="p1841645631717"><a name="p1841645631717"></a><a name="p1841645631717"></a>描述</p> 34</th> 35</tr> 36</thead> 37<tbody><tr id="row104169564177"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p17416125614179"><a name="p17416125614179"></a><a name="p17416125614179"></a>safwk_lite</p> 38</td> 39<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p04163569170"><a name="p04163569170"></a><a name="p04163569170"></a>foundation进程实现</p> 40</td> 41</tr> 42</tbody> 43</table> 44 45其中系统服务管理safwk\_lite组件的源代码目录结构如下: 46 47``` 48├── BUILD.gn 49├── readme.md 50├── LICENSE 51├── src 52 └── main.c 53``` 54 55## 使用<a name="section10729231131110"></a> 56 57在foundation进程中添加服务 58 59按照服务的模板写完服务后在BUILD.gn中添加依赖即可: 60 61``` 62deps = [ 63 "${aafwk_lite_path}/services/abilitymgr_lite:abilityms", 64 "${appexecfwk_lite_path}/services/bundlemgr_lite:bundlems", 65 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 66 "//base/security/permission_lite/services/ipc_auth:ipc_auth_target", 67 "//base/security/permission_lite/services/pms:pms_target", 68 "//foundation/ability/dmsfwk_lite:dtbschedmgr", 69 "//foundation/systemabilitymgr/samgr_lite/samgr_server:server", 70] 71``` 72 73## 相关仓<a name="section176111311166"></a> 74 75系统服务管理子系统 76 77[systemabilitymgr\_samgr\_lite](https://gitee.com/openharmony/systemabilitymgr_samgr_lite) 78 79[systemabilitymgr\_samgr](https://gitee.com/openharmony/systemabilitymgr_samgr) 80 81[systemabilitymgr\_safwk](https://gitee.com/openharmony/systemabilitymgr_safwk) 82 83[**systemabilitymgr\_safwk\_lite**](https://gitee.com/openharmony/systemabilitymgr_safwk_lite) 84 85 86