/ohos5.0/base/telephony/core_service/utils/preferences/src/ |
H A D | tel_profile_util.cpp | 38 return NativePreferences::E_ERROR; in SaveString() 58 return NativePreferences::E_ERROR; in SaveInt() 69 return NativePreferences::E_ERROR; in ObtainInt() 78 return NativePreferences::E_ERROR; in SaveBool() 89 return NativePreferences::E_ERROR; in ObtainBool() 98 return NativePreferences::E_ERROR; in SaveLong() 109 return NativePreferences::E_ERROR; in ObtainLong() 118 return NativePreferences::E_ERROR; in SaveFloat() 129 return NativePreferences::E_ERROR; in ObtainFloat() 138 return NativePreferences::E_ERROR; in IsExistKey() [all …]
|
/ohos5.0/base/telephony/telephony_data/common/src/ |
H A D | preferences_util.cpp | 31 return NativePreferences::PreferencesHelper::GetPreferences(path, errCode); in GetProfiles() 36 return NativePreferences::PreferencesHelper::DeletePreferences(path_); in DeleteProfiles() 43 return NativePreferences::E_ERROR; in SaveString() 63 return NativePreferences::E_ERROR; in SaveInt() 83 return NativePreferences::E_ERROR; in SaveBool() 103 return NativePreferences::E_ERROR; in SaveLong() 123 return NativePreferences::E_ERROR; in SaveFloat() 143 return NativePreferences::E_ERROR; in IsExistKey() 152 return NativePreferences::E_ERROR; in RemoveKey() 161 return NativePreferences::E_ERROR; in RemoveAll() [all …]
|
/ohos5.0/base/theme/screenlock_mgr/utils/src/ |
H A D | preferences_util.cpp | 30 return NativePreferences::PreferencesHelper::GetPreferences(path, errCode); in GetProfiles() 35 return NativePreferences::PreferencesHelper::DeletePreferences(path_); in DeleteProfiles() 42 return NativePreferences::E_ERROR; in SaveString() 62 return NativePreferences::E_ERROR; in SaveInt() 82 return NativePreferences::E_ERROR; in SaveBool() 102 return NativePreferences::E_ERROR; in SaveLong() 122 return NativePreferences::E_ERROR; in SaveFloat() 142 return NativePreferences::E_ERROR; in IsExistKey() 151 return NativePreferences::E_ERROR; in RemoveKey() 160 return NativePreferences::E_ERROR; in RemoveAll() [all …]
|
/ohos5.0/base/update/updateservice/services/core/ability/preference/src/ |
H A D | preference_utils.cpp | 31 std::shared_ptr<NativePreferences::Preferences> ptr = in GetPreference() 32 NativePreferences::PreferencesHelper::GetPreferences(path, errCode); in GetPreference() 45 return NativePreferences::PreferencesHelper::DeletePreferences(path) == NativePreferences::E_OK; in DeletePreference() 94 return ptr->PutString(key, value) == NativePreferences::E_OK; in SaveInner() 104 return ptr->PutInt(key, value) == NativePreferences::E_OK; in SaveInner() 114 return ptr->PutBool(key, value) == NativePreferences::E_OK; in SaveInner() 124 return ptr->PutLong(key, value) == NativePreferences::E_OK; in SaveInner() 134 return ptr->PutFloat(key, value) == NativePreferences::E_OK; in SaveInner() 238 if (ptr->Delete(key) != NativePreferences::E_OK) { in Remove() 250 if (ptr->Clear() != NativePreferences::E_OK) { in RemoveAll() [all …]
|
/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/ndk/src/ |
H A D | convertor_error_code.cpp | 28 { OHOS::NativePreferences::E_OK, OH_Preferences_ErrCode::PREFERENCES_OK }, 29 …{ OHOS::NativePreferences::E_INVALID_ARGS, OH_Preferences_ErrCode::PREFERENCES_ERROR_INVALID_PARAM… 30 … { OHOS::NativePreferences::E_KEY_EMPTY, OH_Preferences_ErrCode::PREFERENCES_ERROR_INVALID_PARAM }, 31 …{ OHOS::NativePreferences::E_KEY_EXCEED_MAX_LENGTH, OH_Preferences_ErrCode::PREFERENCES_ERROR_INVA… 32 …{ OHOS::NativePreferences::E_VALUE_EXCEED_MAX_LENGTH, OH_Preferences_ErrCode::PREFERENCES_ERROR_IN… 33 …{ OHOS::NativePreferences::E_NOT_SUPPORTED, OH_Preferences_ErrCode::PREFERENCES_ERROR_NOT_SUPPORTE… 34 …{ OHOS::NativePreferences::E_DELETE_FILE_FAIL, OH_Preferences_ErrCode::PREFERENCES_ERROR_DELETE_FI… 35 { OHOS::NativePreferences::E_GET_DATAOBSMGRCLIENT_FAIL, 37 …{ OHOS::NativePreferences::E_NO_DATA, OH_PREFERENCES_ERR_CODE_H::PREFERENCES_ERROR_KEY_NOT_FOUND }, 38 { OHOS::NativePreferences::E_OBSERVER_RESERVE, OH_Preferences_ErrCode::PREFERENCES_OK }
|
H A D | oh_preferences.cpp | 171 if (errCode != OHOS::NativePreferences::E_OK) { in OH_Preferences_Close() 190 if (res.first != OHOS::NativePreferences::E_OK) { in OH_Preferences_GetInt() 199 if (res.first == OHOS::NativePreferences::E_OK) { in OH_Preferences_GetInt() 220 if (res.first != OHOS::NativePreferences::E_OK) { in OH_Preferences_GetString() 281 if (res.first != OHOS::NativePreferences::E_OK) { in OH_Preferences_GetBool() 308 if (errCode != OHOS::NativePreferences::E_OK) { in OH_Preferences_SetInt() 324 if (errCode != OHOS::NativePreferences::E_OK) { in OH_Preferences_SetBool() 341 if (errCode != OHOS::NativePreferences::E_OK) { in OH_Preferences_SetString() 357 if (errCode != OHOS::NativePreferences::E_OK) { in OH_Preferences_Delete() 406 if (errCode != OHOS::NativePreferences::E_OK) { in RegisterDataObserver() [all …]
|
/ohos5.0/base/security/security_guard/services/data_collect/store/src/ |
H A D | preferences_wrapper.cpp | 30 int32_t errCode = NativePreferences::E_ERROR; in PutInt() 31 std::shared_ptr<NativePreferences::Preferences> preferences = in PutInt() 32 NativePreferences::PreferencesHelper::GetPreferences(PATH, errCode); in PutInt() 33 if (preferences == nullptr || errCode != NativePreferences::E_OK) { in PutInt() 38 if (errCode != NativePreferences::E_OK) { in PutInt() 43 return NativePreferences::E_OK; in PutInt() 48 int32_t errCode = NativePreferences::E_ERROR; in GetInt() 49 std::shared_ptr<NativePreferences::Preferences> preferences = in GetInt() 50 NativePreferences::PreferencesHelper::GetPreferences(PATH, errCode); in GetInt() 51 if (preferences == nullptr || errCode != NativePreferences::E_OK) { in GetInt()
|
/ohos5.0/foundation/distributeddatamgr/preferences/test/ndk/unittest/ |
H A D | preferences_ndk_test.cpp | 44 using namespace OHOS::NativePreferences; 220 OHOS::NativePreferences::E_OK); 251 OHOS::NativePreferences::E_OK); 280 OHOS::NativePreferences::E_OK); 304 OHOS::NativePreferences::E_OK); 334 OHOS::NativePreferences::E_OK); 363 OHOS::NativePreferences::E_OK); 394 OHOS::NativePreferences::E_OK); 423 OHOS::NativePreferences::E_OK); 453 OHOS::NativePreferences::E_OK); [all …]
|
H A D | preferences_ndk_value_test.cpp | 44 using namespace OHOS::NativePreferences; 125 … EXPECT_EQ(OHOS::NativePreferences::PreferencesHelper::DeletePreferences("/data/test/valueTestDb"), 126 OHOS::NativePreferences::E_OK); 178 … EXPECT_EQ(OHOS::NativePreferences::PreferencesHelper::DeletePreferences("/data/test/valueTestDb"), 179 OHOS::NativePreferences::E_OK); 222 … EXPECT_EQ(OHOS::NativePreferences::PreferencesHelper::DeletePreferences("/data/test/valueTestDb"), 223 OHOS::NativePreferences::E_OK); 260 OHOS::NativePreferences::E_OK); 295 OHOS::NativePreferences::E_OK); 322 OHOS::NativePreferences::E_OK); [all …]
|
/ohos5.0/base/update/updateservice/services/core/ability/preference/include/ |
H A D | preferences_utils.h | 57 std::shared_ptr<NativePreferences::Preferences> GetPreference(); 67 …std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, const std::string &va… 68 …bool SaveInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, const … 69 …bool SaveInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, const … 70 …bool SaveInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, const … 71 …bool SaveInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, const … 78 …std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, const std::string &de… 79 …int ObtainInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, const… 80 …bool ObtainInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, cons… 82 …std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, const int64_t &defVal… [all …]
|
/ohos5.0/foundation/multimodalinput/input/service/module_loader/src/ |
H A D | multimodal_input_preferences_manager.cpp | 83 std::shared_ptr<NativePreferences::Preferences> mousePref = in GetPreferencesSettings() 86 std::shared_ptr<NativePreferences::Preferences> keyboardPref = in GetPreferencesSettings() 89 std::shared_ptr<NativePreferences::Preferences> touchpadPref = in GetPreferencesSettings() 185 std::shared_ptr<NativePreferences::Preferences> pref = in SetIntValue() 186 NativePreferences::PreferencesHelper::GetPreferences(filePath, errCode); in SetIntValue() 198 NativePreferences::PreferencesHelper::RemovePreferencesFromCache(filePath); in SetIntValue() 221 std::shared_ptr<NativePreferences::Preferences> pref = in SetBoolValue() 222 NativePreferences::PreferencesHelper::GetPreferences(filePath, errCode); in SetBoolValue() 234 NativePreferences::PreferencesHelper::RemovePreferencesFromCache(filePath); in SetBoolValue() 242 std::shared_ptr<NativePreferences::Preferences> pref = in GetShortKeyDuration() [all …]
|
/ohos5.0/foundation/communication/netmanager_ext/services/netfirewallmanager/src/ |
H A D | netfirewall_preference_helper.cpp | 37 ptr_ = NativePreferences::PreferencesHelper::GetPreferences(filePath_, errCode); in GetPreference() 49 ptr_ = NativePreferences::PreferencesHelper::GetPreferences(filePath_, errCode); in GetPreference() 79 bool NetFirewallPreferenceHelper::SaveInner(std::shared_ptr<NativePreferences::Preferences> ptr, co… in SaveInner() 86 return ptr->PutInt(key, value) == NativePreferences::E_OK; in SaveInner() 89 bool NetFirewallPreferenceHelper::SaveInner(std::shared_ptr<NativePreferences::Preferences> ptr, co… in SaveInner() 96 return ptr->PutBool(key, value) == NativePreferences::E_OK; in SaveInner() 118 int32_t NetFirewallPreferenceHelper::ObtainInner(std::shared_ptr<NativePreferences::Preferences> pt… in ObtainInner() 124 bool NetFirewallPreferenceHelper::ObtainInner(std::shared_ptr<NativePreferences::Preferences> ptr, in ObtainInner() 140 if (ptr_->FlushSync() != NativePreferences::E_OK) { in RefreshSync() 157 int ret = NativePreferences::PreferencesHelper::DeletePreferences(filePath); in Clear()
|
/ohos5.0/foundation/systemabilitymgr/samgr/services/samgr/native/source/collect/ |
H A D | device_timed_collect_tool.cpp | 42 ptr_ = NativePreferences::PreferencesHelper::GetPreferences(path, errCode); in GetPreference() 74 … std::shared_ptr<NativePreferences::Preferences> ptr, const std::string& key, const int64_t& value) in SaveInner() 80 return ptr->PutLong(key, value) == NativePreferences::E_OK; in SaveInner() 84 … std::shared_ptr<NativePreferences::Preferences> ptr, const std::string& key, const string& value) in SaveInner() 90 return ptr->PutString(key, value) == NativePreferences::E_OK; in SaveInner() 93 std::map<std::string, NativePreferences::PreferencesValue> PreferencesUtil::ObtainAll() in ObtainAll() 126 …std::shared_ptr<NativePreferences::Preferences> ptr, const std::string& key, const int64_t& defVal… in ObtainInner() 132 …std::shared_ptr<NativePreferences::Preferences> ptr, const std::string& key, const std::string& de… in ObtainInner() 147 if (ptr_->FlushSync() != NativePreferences::E_OK) { in RefreshSync() 177 if (ptr_->Delete(key) != NativePreferences::E_OK) { in Remove()
|
/ohos5.0/foundation/communication/nfc/services/src/external_deps/ |
H A D | nfc_preferences.cpp | 37 std::shared_ptr<NativePreferences::Preferences> NfcPreferences::GetPreference(const std::string& fi… in GetPreference() 40 return NativePreferences::PreferencesHelper::GetPreferences(fileName, errCode_); in GetPreference() 45 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in SetString() 57 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in GetString() 68 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in SetInt() 80 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in GetInt() 91 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in Clear() 98 NativePreferences::PreferencesHelper::DeletePreferences(fileName_); in Clear() 103 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in Delete()
|
/ohos5.0/foundation/arkui/ace_engine/adapter/ohos/capability/preference/ |
H A D | storage_impl.cpp | 20 std::shared_ptr<NativePreferences::Preferences> StorageImpl::GetPreference(const std::string& fileN… in GetPreference() 26 auto pref = NativePreferences::PreferencesHelper::GetPreferences(fileName, errCode_); in GetPreference() 33 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in SetString() 43 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in GetString() 51 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in Clear() 55 NativePreferences::PreferencesHelper::DeletePreferences(fileName_); in Clear() 61 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in Delete()
|
/ohos5.0/foundation/multimedia/media_library/frameworks/services/media_dfx/src/ |
H A D | dfx_analyzer.cpp | 44 shared_ptr<NativePreferences::Preferences> prefs = in FlushThumbnail() 45 NativePreferences::PreferencesHelper::GetPreferences(THUMBNAIL_ERROR_XML, errCode); in FlushThumbnail() 69 shared_ptr<NativePreferences::Preferences> prefs = in FlushCommonBehavior() 70 NativePreferences::PreferencesHelper::GetPreferences(COMMON_BEHAVIOR_XML, errCode); in FlushCommonBehavior() 98 shared_ptr<NativePreferences::Preferences> prefs = in FlushDeleteBehavior() 99 NativePreferences::PreferencesHelper::GetPreferences(DELETE_BEHAVIOR_XML, errCode); in FlushDeleteBehavior() 119 shared_ptr<NativePreferences::Preferences> prefs = in FlushAdaptationToMovingPhoto() 120 … NativePreferences::PreferencesHelper::GetPreferences(ADAPTATION_TO_MOVING_PHOTO_XML, errCode); in FlushAdaptationToMovingPhoto()
|
H A D | dfx_reporter.cpp | 90 shared_ptr<NativePreferences::Preferences> prefs = in ReportThumbnailError() 91 NativePreferences::PreferencesHelper::GetPreferences(THUMBNAIL_ERROR_XML, errCode); in ReportThumbnailError() 96 map<string, NativePreferences::PreferencesValue> errorMap = prefs->GetAll(); in ReportThumbnailError() 130 shared_ptr<NativePreferences::Preferences> prefs = in ReportCommonBehavior() 131 NativePreferences::PreferencesHelper::GetPreferences(COMMON_BEHAVIOR_XML, errCode); in ReportCommonBehavior() 136 map<string, NativePreferences::PreferencesValue> errorMap = prefs->GetAll(); in ReportCommonBehavior() 157 shared_ptr<NativePreferences::Preferences> prefs = in ReportDeleteStatistic() 163 map<string, NativePreferences::PreferencesValue> deleteMap = prefs->GetAll(); in ReportDeleteStatistic() 305 shared_ptr<NativePreferences::Preferences> prefs = in ReportAdaptationToMovingPhoto() 368 shared_ptr<NativePreferences::Preferences> prefs = in ReportCloudSyncThumbGenerationStatus() [all …]
|
H A D | dfx_worker.cpp | 67 shared_ptr<NativePreferences::Preferences> prefs = in HandleLoopTask() 68 NativePreferences::PreferencesHelper::GetPreferences(DFX_COMMON_XML, errCode); in HandleLoopTask() 93 shared_ptr<NativePreferences::Preferences> prefs = in Prepare() 94 NativePreferences::PreferencesHelper::GetPreferences(DFX_COMMON_XML, errCode); in Prepare() 118 shared_ptr<NativePreferences::Preferences> prefs = in IsThumbnailUpdate() 119 NativePreferences::PreferencesHelper::GetPreferences(THUMBNAIL_ERROR_XML, errCode); in IsThumbnailUpdate() 137 shared_ptr<NativePreferences::Preferences> prefs = in IsDeleteStatisticUpdate() 138 NativePreferences::PreferencesHelper::GetPreferences(DELETE_BEHAVIOR_XML, errCode); in IsDeleteStatisticUpdate()
|
/ohos5.0/foundation/systemabilitymgr/samgr/services/samgr/native/include/collect/ |
H A D | device_timed_collect_tool.h | 35 std::map<std::string, NativePreferences::PreferencesValue> ObtainAll(); 47 …std::shared_ptr<NativePreferences::Preferences> ptr, const std::string& key, const int64_t& value); 49 …std::shared_ptr<NativePreferences::Preferences> ptr, const std::string& key, const std::string& va… 55 …std::shared_ptr<NativePreferences::Preferences> ptr, const std::string& key, const int64_t& defVal… 57 …std::shared_ptr<NativePreferences::Preferences> ptr, const std::string& key, const std::string& de… 58 std::shared_ptr<NativePreferences::Preferences> ptr_ = nullptr;
|
/ohos5.0/foundation/communication/netmanager_ext/services/netfirewallmanager/include/ |
H A D | netfirewall_preference_helper.h | 95 …bool SaveInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, const … 97 …bool SaveInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, const … 101 int32_t ObtainInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, 104 …bool ObtainInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, cons… 106 std::shared_ptr<NativePreferences::Preferences> ptr_ = nullptr;
|
/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/ndk/include/ |
H A D | oh_preferences_impl.h | 33 class NDKPreferencesObserver : public OHOS::NativePreferences::PreferencesObserver { 39 …void OnChange(const std::map<std::string, OHOS::NativePreferences::PreferencesValue> &records) ove… 53 explicit OH_PreferencesImpl(std::shared_ptr<OHOS::NativePreferences::Preferences> preferences); 58 std::shared_ptr<OHOS::NativePreferences::Preferences> GetNativePreferences() in GetNativePreferences() 72 std::shared_ptr<OHOS::NativePreferences::Preferences> preferences_;
|
/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/js/napi/common/src/ |
H A D | napi_preferences_error.cpp | 23 { NativePreferences::E_DELETE_FILE_FAIL, E_DELETE_FILE_FAIL, 25 { NativePreferences::E_GET_DATAOBSMGRCLIENT_FAIL, E_GET_DATAOBSMGRCLIENT_FAIL, 27 { NativePreferences::E_NOT_SUPPORTED, E_NOT_SUPPORTED, "Capability not supported." },
|
/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/cj/src/ |
H A D | preferences_impl.cpp | 34 using namespace OHOS::NativePreferences; 71 NativePreferences::Options options(path, context->GetBundleName(), dataGroupId); in PreferencesImpl() 178 NativePreferences::PreferencesValue preferencesValue = NativePreferences::PreferencesValue(-1); in CValueTypeToNativeValue() 181 preferencesValue = NativePreferences::PreferencesValue(value.integer); in CValueTypeToNativeValue() 185 preferencesValue = NativePreferences::PreferencesValue(value.float64); in CValueTypeToNativeValue() 189 preferencesValue = NativePreferences::PreferencesValue(std::string(value.string)); in CValueTypeToNativeValue() 193 preferencesValue = NativePreferences::PreferencesValue(value.boolean); in CValueTypeToNativeValue() 201 preferencesValue = NativePreferences::PreferencesValue(bools); in CValueTypeToNativeValue() 209 preferencesValue = NativePreferences::PreferencesValue(doubles); in CValueTypeToNativeValue() 217 preferencesValue = NativePreferences::PreferencesValue(strings); in CValueTypeToNativeValue() [all …]
|
/ohos5.0/foundation/bundlemanager/app_domain_verify/frameworks/common/src/config/ |
H A D | white_list_config_mgr.cpp | 90 std::shared_ptr<NativePreferences::Preferences> WhiteListConfigMgr::GetPreference(const std::string… in GetPreference() 93 NativePreferences::Options options(path); in GetPreference() 94 …std::shared_ptr<NativePreferences::Preferences> preferences = NativePreferences::PreferencesHelper… in GetPreference()
|
/ohos5.0/base/global/i18n/frameworks/intl/src/ |
H A D | preferred_language.cpp | 144 std::shared_ptr<NativePreferences::Preferences> PreferredLanguage::GetI18nAppPreferences() in GetI18nAppPreferences() 150 NativePreferences::Options options(i18nPreferencesFilePath); in GetI18nAppPreferences() 151 std::shared_ptr<NativePreferences::Preferences> preferences = in GetI18nAppPreferences() 152 NativePreferences::PreferencesHelper::GetPreferences(options, status); in GetI18nAppPreferences() 162 std::shared_ptr<NativePreferences::Preferences> preferences = GetI18nAppPreferences(); in IsSetAppPreferredLanguage() 177 std::shared_ptr<NativePreferences::Preferences> preferences = GetI18nAppPreferences(); in GetAppPreferredLanguage() 196 std::shared_ptr<NativePreferences::Preferences> preferences = GetI18nAppPreferences(); in SetAppPreferredLanguage()
|