Lines Matching defs:key
66 ErrCode SettingDataShare::GetIntValue(const std::string& key, int32_t& value, const std::string &strUri)
69 ErrCode ret = GetLongValue(key, valueLong, strUri);
78 ErrCode SettingDataShare::GetLongValue(const std::string& key, int64_t& value, const std::string &strUri)
81 ErrCode ret = GetStringValue(key, valueStr, strUri);
94 ErrCode SettingDataShare::GetBoolValue(const std::string& key, bool& value, const std::string &strUri)
97 ErrCode ret = GetStringValue(key, valueStr, strUri);
111 const std::string& key, int32_t value, bool needNotify, const std::string &strUri)
113 return PutStringValue(key, std::to_string(value), needNotify, strUri);
117 const std::string& key, int64_t value, bool needNotify, const std::string &strUri)
119 return PutStringValue(key, std::to_string(value), needNotify, strUri);
123 const std::string& key, bool value, bool needNotify, const std::string &strUri)
126 return PutStringValue(key, valueStr, needNotify, strUri);
129 bool SettingDataShare::IsValidKey(const std::string& key, const std::string &strUri)
132 ErrCode ret = GetStringValue(key, value, strUri);
136 sptr<SettingObserver> SettingDataShare::CreateObserver(const std::string& key, SettingObserver::UpdateFunc& func)
140 observer->SetKey(key);
194 ErrCode SettingDataShare::GetStringValue(const std::string& key, std::string& value, const std::string &strUri)
208 predicates.EqualTo(SETTING_COLUMN_KEYWORD, key);
209 Uri uri(AssembleUri(key, strUri));
235 const std::string& key, const std::string& value, bool needNotify, const std::string &strUri)
247 DataShare::DataShareValueObject keyObj(key);
253 predicates.EqualTo(SETTING_COLUMN_KEYWORD, key);
254 Uri uri(AssembleUri(key, strUri));
259 helper->NotifyChange(AssembleUri(key, strUri));
293 Uri SettingDataShare::AssembleUri(const std::string& key, const std::string &strUri)
296 if (key == "close_fingerprint_nav_event_key" || key == "close_fingerprint_event_key") {
297 return Uri(SETTING_URI_USER_PROXY + "&key=" + key);
299 return Uri(SETTING_URI_PROXY + "&key=" + key);
301 return Uri(strUri + "&key=" + key);