提交 41452d18 编写于 作者: E ester.zhou

update doc

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 0112189b
# System Parameter # System Parameter
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
>
> - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. > - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - This is a system API and cannot be called by third-party applications. > - This is a system API and cannot be called by third-party applications.
...@@ -24,7 +25,7 @@ Obtains the value of the attribute with the specified key. ...@@ -24,7 +25,7 @@ Obtains the value of the attribute with the specified key.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| key | string | Yes| Key of the system attribute.| | key | string | Yes| Key of the system attribute.|
| def | string | No| Default Value| | def | string | No| Default value.|
**Return value** **Return value**
...@@ -48,7 +49,7 @@ try { ...@@ -48,7 +49,7 @@ try {
get(key: string, callback: AsyncCallback&lt;string&gt;): void get(key: string, callback: AsyncCallback&lt;string&gt;): void
Obtains the value of the attribute with the specified key. This API uses an asynchronous callback to return the result. Obtains the value of the attribute with the specified key.
**System capability**: SystemCapability.Startup.SysInfo **System capability**: SystemCapability.Startup.SysInfo
...@@ -79,7 +80,7 @@ try { ...@@ -79,7 +80,7 @@ try {
get(key: string, def: string, callback: AsyncCallback&lt;string&gt;): void get(key: string, def: string, callback: AsyncCallback&lt;string&gt;): void
Obtains the value of the attribute with the specified key. This API uses an asynchronous callback to return the result. Obtains the value of the attribute with the specified key.
**System capability**: SystemCapability.Startup.SysInfo **System capability**: SystemCapability.Startup.SysInfo
...@@ -112,7 +113,7 @@ try { ...@@ -112,7 +113,7 @@ try {
get(key: string, def?: string): Promise&lt;string&gt; get(key: string, def?: string): Promise&lt;string&gt;
Obtains the value of the attribute with the specified key. This API uses a promise to return the result. Obtains the value of the attribute with the specified key.
**System capability**: SystemCapability.Startup.SysInfo **System capability**: SystemCapability.Startup.SysInfo
...@@ -171,11 +172,11 @@ try { ...@@ -171,11 +172,11 @@ try {
``` ```
## parameter.set(key: string, value: string, callback: AsyncCallback&lt;void&gt;) ## parameter.set
set(key: string, value: string, callback: AsyncCallback&lt;void&gt;): void set(key: string, value: string, callback: AsyncCallback&lt;void&gt;): void
Sets a value for the attribute with the specified key. This API uses an asynchronous callback to return the result. Sets a value for the attribute with the specified key.
**System capability**: SystemCapability.Startup.SysInfo **System capability**: SystemCapability.Startup.SysInfo
...@@ -184,7 +185,7 @@ Sets a value for the attribute with the specified key. This API uses an asynchro ...@@ -184,7 +185,7 @@ Sets a value for the attribute with the specified key. This API uses an asynchro
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| key | string | Yes| Key of the system attribute.| | key | string | Yes| Key of the system attribute.|
| def | string | Yes| Default Value| | value | string | Yes| System attribute value to set.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result.| | callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result.|
**Example** **Example**
...@@ -203,11 +204,11 @@ try { ...@@ -203,11 +204,11 @@ try {
``` ```
## parameter.set(key: string, def?: string) ## parameter.set
set(key: string, def?: string): Promise&lt;string&gt; set(key: string, value: string): Promise&lt;void&gt;
Sets a value for the attribute with the specified key. This API uses a promise to return the result. Sets a value for the attribute with the specified key.
**System capability**: SystemCapability.Startup.SysInfo **System capability**: SystemCapability.Startup.SysInfo
...@@ -216,13 +217,13 @@ Sets a value for the attribute with the specified key. This API uses a promise t ...@@ -216,13 +217,13 @@ Sets a value for the attribute with the specified key. This API uses a promise t
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| key | string | Yes| Key of the system attribute.| | key | string | Yes| Key of the system attribute.|
| def | string | No| Default Value| | value| string | Yes| System attribute value to set.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;string&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册