mirror of
https://github.com/openharmony/ohos_bundles.git
synced 2026-07-01 06:41:17 -04:00
项目介绍
简介
系统属性模块,根据鸿蒙CDD文档提供获取设备信息的接口,如:产品名、品牌名、厂家名等,同时提供设置/读取系统属性的接口。
目录
表 1 系统属性模块源代码目录结构
使用C语言开发。
同时支持LiteOS-M、LiteOS-A平台。系统属性各字段由OEM厂商负责定义,当前方案仅提供框架及默认值。具体值需产品方按需进行调整。
使用
-
获取系统属性
char* value1 = GetProductType(); printf("Product type =%s\n", value1); free(value1); char* value2 = GetManufacture(); printf("Manufacture =%s\n", value2); free(value2); char* value3 = GetBrand(); printf("GetBrand =%s\n", value3); free(value3);