openharmony_ci 6cde41d3e3 !21 优化代码
Merge pull request !21 from huangke11/master
2022-06-10 00:56:28 +00:00
2021-04-07 14:46:49 +08:00
2022-03-17 10:07:40 +08:00
2022-06-09 22:29:47 +08:00
2022-06-02 20:30:08 +08:00
2022-06-06 09:51:50 +08:00
2022-03-09 21:35:53 +08:00
2022-04-29 07:57:58 +08:00
2022-03-07 15:57:18 +08:00
2022-04-15 17:45:03 +08:00
2022-04-15 17:45:03 +08:00

Config Policy

Introduction

The config policy, namely, cust, provides APIs for each service module to obtain the configuration directories at different levels or the configuration file paths.

Directory Structure

The directory structure for the config policy is as follows:

/base/customization/
├── config_policy             # Code repository for the config policy
│   ├── frameworks            # Core code of the config policy
│   │   ├── config_policy     # config policy
│   │   │   └── src           # Implementation code
│   ├── interfaces            # APIs of the config policy
│   │   ├── inner_api         # APIs of the config policy for internal subsystems
│   │   └── kits              # JavaScript APIs
│   └── test                  # Test code

Usage

Call the APIs of the config policy to obtain the configuration directories at different levels or the configuration file paths.

#include "config_policy_utils.h"

const char *testPathSuffix = "user.xml"; // Set the name of the configuration file.
char buf[MAX_PATH_LEN] = {0};
char *filePath = GetOneCfgFile(testPathSuffix, buf, MAX_PATH_LEN); // Obtain the path of the configuration file with the highest priority.

Constraints

Programming language: C/C++

Repositories Involved

customization_config_policy

S
Description
暂无描述
Readme 1.7 MiB
Languages
C++ 74.5%
C 25.5%