diff --git a/interfaces/taihe/systemParameterEnhance/idl/ohos.systemParameterEnhance.taihe b/interfaces/taihe/systemParameterEnhance/idl/ohos.systemParameterEnhance.taihe index fa60c6f39f69884621d2a13e04876e9d343f0b7b..48182f0fe717cda0adceedd66add233defbea0d1 100644 --- a/interfaces/taihe/systemParameterEnhance/idl/ohos.systemParameterEnhance.taihe +++ b/interfaces/taihe/systemParameterEnhance/idl/ohos.systemParameterEnhance.taihe @@ -20,16 +20,25 @@ static { loadLibrary("systemParameterEnhance_taihe_native.z") } function getSync(key: String, def: Optional): String; -@gen_async("get") -@gen_promise("get") function getParam(key: String, def: Optional): String; -@gen_async("get") function getParamNodef(key: String): String; +@static_overload("get") +@async function getWithDefCallback(key: String, def: Optional): String; + +@static_overload("get") +@promise function getReturnsPromise(key: String, def: Optional): String; + +@static_overload("get") +@async function getWithCallback(key: String): String; + function setSync(key: String, value: String): void; -@gen_async("set") -@gen_promise("set") function setParam(key: String, value: String): void; +@static_overload("set") +@async function setWithCallback(key: String, value: String): void; + +@static_overload("set") +@promise function setReturnsPromise(key: String, value: String): void; \ No newline at end of file diff --git a/interfaces/taihe/systemParameterEnhance/src/ohos.systemParameterEnhance.impl.cpp b/interfaces/taihe/systemParameterEnhance/src/ohos.systemParameterEnhance.impl.cpp index b685bfdf2dbff48faa45a3b99aded116701823fd..edbf0c1d3394f9f6911ca83ef98bf09d1ad69d32 100644 --- a/interfaces/taihe/systemParameterEnhance/src/ohos.systemParameterEnhance.impl.cpp +++ b/interfaces/taihe/systemParameterEnhance/src/ohos.systemParameterEnhance.impl.cpp @@ -85,6 +85,11 @@ void setParam(string_view key, string_view value) TH_EXPORT_CPP_API_getSync(getSync); TH_EXPORT_CPP_API_getParam(getParam); +TH_EXPORT_CPP_API_getWithDefCallback(getParam); +TH_EXPORT_CPP_API_getReturnsPromise(getParam); TH_EXPORT_CPP_API_getParamNodef(getParamNodef); +TH_EXPORT_CPP_API_getWithCallback(getParamNodef); TH_EXPORT_CPP_API_setSync(setSync); +TH_EXPORT_CPP_API_setWithCallback(setParam); +TH_EXPORT_CPP_API_setReturnsPromise(setParam); TH_EXPORT_CPP_API_setParam(setParam);