/base/startup/init/interfaces/innerkits/syspara/ |
D | param_wrapper.cpp | 67 std::string GetParameter(const std::string& key, const std::string& def) in GetParameter() argument 78 if (IsValidParamValue(def.c_str(), MAX_VALUE_LEN) == 1) { in GetParameter() 79 return std::string(def); in GetParameter() 84 bool GetBoolParameter(const std::string& key, bool def) in GetBoolParameter() argument 99 return def; in GetBoolParameter() 102 int GetStringParameter(const std::string &key, std::string &value, const std::string def) in GetStringParameter() argument 114 if (IsValidParamValue(def.c_str(), MAX_VALUE_LEN) == 1) { in GetStringParameter() 115 value = std::string(def); in GetStringParameter() 122 T GetIntParameter(const std::string& key, T def, T min, T max) in GetIntParameter() argument 125 return def; in GetIntParameter() [all …]
|
D | parameter.c | 79 int GetParameter(const char *key, const char *def, char *value, uint32_t len) in GetParameter() argument 84 int ret = GetParameter_(key, def, value, len); in GetParameter() 322 int32_t GetIntParameter(const char *key, int32_t def) in GetIntParameter() argument 328 return def; in GetIntParameter() 332 return def; in GetIntParameter() 335 return def; in GetIntParameter() 340 uint32_t GetUintParameter(const char *key, uint32_t def) in GetUintParameter() argument 346 return def; in GetUintParameter() 350 return def; in GetUintParameter() 353 return def; in GetUintParameter()
|
D | param_comm.c | 70 INIT_LOCAL_API int GetParameter_(const char *key, const char *def, char *value, uint32_t len) in GetParameter_() argument 78 if (def == NULL) { in GetParameter_() 81 if (strlen(def) > len) { in GetParameter_() 84 ret = strcpy_s(value, len, def); in GetParameter_()
|
D | param_comm.h | 34 INIT_LOCAL_API int GetParameter_(const char *key, const char *def, char *value, uint32_t len);
|
/base/startup/syspara_lite/interfaces/innerkits/native/syspara/src/ |
D | param_wrapper.cpp | 27 int GetStringParameter(const std::string key, std::string &value, const std::string def) in GetStringParameter() argument 30 int ret = HalGetParameter(key.c_str(), def.c_str(), val, VALUE_MAX_LENGTH); in GetStringParameter() 37 int GetIntParameter(const std::string key, int def) in GetIntParameter() argument 39 return HalGetIntParameter(key.c_str(), def); in GetIntParameter()
|
D | parameter.c | 32 int GetParameter(const char *key, const char *def, char *value, unsigned int len) in GetParameter() argument 37 int ret = HalGetParameter(key, def, value, len); in GetParameter()
|
/base/powermgr/power_manager/utils/param/src/ |
D | sysparam.cpp | 38 int32_t SysParam::GetIntValue(const std::string& key, int32_t def) in GetIntValue() argument 41 int32_t ret = GetParameter(key.c_str(), std::to_string(def).c_str(), value, VALUE_MAX_LEN); in GetIntValue() 43 …COMP_UTILS, "GetParameter failed, return default value, ret=%{public}d, def=%{public}d", ret, def); in GetIntValue() 44 return def; in GetIntValue()
|
/base/startup/init/interfaces/innerkits/include/syspara/ |
D | parameters.h | 28 std::string GetParameter(const std::string& key, const std::string& def); 34 bool GetBoolParameter(const std::string& key, bool def); 42 T GetIntParameter(const std::string& key, T def, T min = std::numeric_limits<T>::min(), 51 T GetUintParameter(const std::string& key, T def, T max = std::numeric_limits<T>::max());
|
D | param_wrapper.h | 23 int GetStringParameter(const std::string &key, std::string &value, const std::string def = ""); 24 int GetIntParameter(const std::string &key, int def);
|
D | parameter.h | 52 int GetParameter(const char *key, const char *def, char *value, uint32_t len); 173 int32_t GetIntParameter(const char *key, int32_t def); 174 uint32_t GetUintParameter(const char *key, uint32_t def);
|
/base/startup/syspara_lite/adapter/native/syspara/src/ |
D | parameters.cpp | 30 std::string GetParameter(const std::string& key, const std::string& def) override in GetParameter() argument 41 return def; in GetParameter() 163 std::string GetParameter(const std::string& key, const std::string& def) in GetParameter() argument 165 return g_abstractorRef.GetParameter(key, def); in GetParameter() 168 bool GetBoolParameter(const std::string& key, bool def) in GetBoolParameter() argument 176 return def; in GetBoolParameter() 180 T GetIntParameter(const std::string& key, T def, T min, T max) in GetIntParameter() argument 183 return def; in GetIntParameter() 190 return def; in GetIntParameter() 199 T GetUintParameter(const std::string& key, T def, T max) in GetUintParameter() argument [all …]
|
/base/startup/syspara_lite/adapter/native/syspara/include/ |
D | parameters.h | 28 std::string GetParameter(const std::string& key, const std::string& def); 34 bool GetBoolParameter(const std::string& key, bool def); 42 T GetIntParameter(const std::string& key, T def, T min = std::numeric_limits<T>::min(), 51 T GetUintParameter(const std::string& key, T def, T max = std::numeric_limits<T>::max());
|
/base/startup/syspara_lite/interfaces/kits/js/ |
D | @ohos.systemparameter.d.ts | 35 function getSync(key: string, def?: string): string; 54 function get(key: string, def: string, callback: AsyncCallback<string>): void; 64 function get(key: string, def?: string): Promise<string>;
|
/base/startup/init/interfaces/kits/jskits/ |
D | @ohos.systemparameter.d.ts | 35 function getSync(key: string, def?: string): string; 54 function get(key: string, def: string, callback: AsyncCallback<string>): void; 64 function get(key: string, def?: string): Promise<string>;
|
/base/startup/syspara_lite/interfaces/innerkits/native/syspara/include/ |
D | param_wrapper.h | 23 int GetStringParameter(const std::string key, std::string &value, const std::string def = ""); 24 int GetIntParameter(const std::string key, int def);
|
D | parameter.h | 43 int GetParameter(const char *key, const char *def, char *value, unsigned int len);
|
/base/startup/syspara_lite/hals/parameter/include/ |
D | parameter_hal.h | 52 int HalGetParameter(const char *key, const char *def, char *value, unsigned int len); 54 int HalGetIntParameter(const char *key, int def);
|
/base/startup/syspara_lite/hals/parameter/src/ |
D | parameter_hal.cpp | 52 int HalGetParameter(const char *key, const char *def, char *value, unsigned int len) in HalGetParameter() argument 60 if (!IsValidValue(def, len)) { in HalGetParameter() 63 if (sprintf_s(value, len, "%s", def) < 0) { in HalGetParameter() 80 int HalGetIntParameter(const char *key, int def) in HalGetIntParameter() argument 83 return OHOS::system::GetIntParameter(strKey, def); in HalGetIntParameter()
|
/base/powermgr/power_manager/utils/param/include/ |
D | sysparam.h | 30 static int32_t GetIntValue(const std::string& key, int32_t def);
|
/base/security/access_token/services/accesstokenmanager/main/cpp/src/permission/ |
D | permission_definition_cache.cpp | 154 PermissionDef def; in RestorePermDefInfo() local 156 int32_t ret = DataTranslator::TranslationIntoPermissionDef(defValue, def); in RestorePermDefInfo() 161 Insert(def, tokenId); in RestorePermDefInfo()
|
D | permission_policy_set.cpp | 247 void PermissionPolicySet::PermDefToString(const PermissionDef& def, std::string& info) const in PermDefToString() argument 253 info.append(R"( "grantMode": )" + std::to_string(def.grantMode) + ",\n"); in PermDefToString() 254 info.append(R"( "availableLevel": )" + std::to_string(def.availableLevel) + ",\n"); in PermDefToString() 255 info.append(R"( "provisionEnable": )" + std::to_string(def.provisionEnable) + ",\n"); in PermDefToString() 256 …info.append(R"( "distributedSceneEnable": )" + std::to_string(def.distributedSceneEnable) + "… in PermDefToString() 258 info.append(R"( "labelId": )" + std::to_string(def.labelId) + ",\n"); in PermDefToString() 260 info.append(R"( "descriptionId": )" + std::to_string(def.descriptionId) + ",\n"); in PermDefToString()
|
/base/startup/syspara_lite/frameworks/parameter/src/ |
D | parameter_common.c | 60 int GetParameter(const char *key, const char *def, char *value, unsigned int len) in GetParameter() argument 72 if ((ret < 0) && IsValidValue(def, len)) { in GetParameter() 73 if (strncpy_s(value, len, def, len - 1) != 0) { in GetParameter() 76 ret = (int)strlen(def); in GetParameter()
|
/base/startup/syspara_lite/interfaces/kits/ |
D | parameter.h | 65 int GetParameter(const char *key, const char *def, char *value, unsigned int len);
|
/base/startup/init/test/moduletest/ |
D | syspara_moduleTest.cpp | 89 static void GetParameterTestReInt(const char *key, const char *def, char *value, uint32_t len) in GetParameterTestReInt() argument 91 int ret = GetParameter(key, def, value, len); in GetParameterTestReInt() 96 static void GetParameterTestFuncReStr(string key, string def) in GetParameterTestFuncReStr() argument 98 string ret = system::GetParameter(key, def); in GetParameterTestFuncReStr()
|
/base/customization/config_policy/frameworks/config_policy/src/ |
D | config_policy_utils.c | 72 static char *ExpandStr(char *src, const char *def, QueryFunc queryFunc); 324 static char *ExpandStr(char *src, const char *def, QueryFunc queryFunc) in ExpandStr() argument 349 if (value || defVal || def) { in ExpandStr() 350 ok = ok && AppendStr(&sh, value ? value : (defVal ? defVal : def)); in ExpandStr()
|