/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_INVALID_PARAM }, 32 { OHOS::NativePreferences::E_VALUE_EXCEED_MAX_LENGTH, OH_Preferences_ErrCode::PREFERENCES_ERROR_INVALID_PARAM }, 33 { OHOS::NativePreferences::E_NOT_SUPPORTED, OH_Preferences_ErrCode::PREFERENCES_ERROR_NOT_SUPPORTED }, 34 { OHOS::NativePreferences::E_DELETE_FILE_FAIL, OH_Preferences_ErrCode::PREFERENCES_ERROR_DELETE_FILE }, 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 [all...] |
H A D | oh_preferences.cpp | 33 (std::shared_ptr<OHOS::NativePreferences::Preferences> preferences) : preferences_(preferences) in OH_PreferencesImpl() 90 OHOS::NativePreferences::Options nativeOptions(filePath, option->GetBundleName(), in OH_Preferences_Open() 93 std::shared_ptr<OHOS::NativePreferences::Preferences> innerPreferences= in OH_Preferences_Open() 94 OHOS::NativePreferences::PreferencesHelper::GetPreferences(nativeOptions, err); in OH_Preferences_Open() 99 OHOS::NativePreferences::ExtractFileName(nativeOptions.filePath).c_str(), err); in OH_Preferences_Open() 124 static std::shared_ptr<OHOS::NativePreferences::Preferences> GetNativePreferencesFromOH(OH_Preferences *preference) in GetNativePreferencesFromOH() 134 std::shared_ptr<OHOS::NativePreferences::Preferences> innerPreferences= preferencesImpl->GetNativePreferences(); in GetNativePreferencesFromOH() 161 std::shared_ptr<OHOS::NativePreferences::Preferences> innerPreferences= preferencesImpl->GetNativePreferences(); in OH_Preferences_Close() 169 int errCode = OHOS::NativePreferences::PreferencesHelper::RemovePreferencesFromCache( in OH_Preferences_Close() 171 if (errCode != OHOS::NativePreferences in OH_Preferences_Close() [all...] |
/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& defValue) in ObtainInner() 132 std::shared_ptr<NativePreferences::Preferences> ptr, const std::string& key, const std::string& defValue) in ObtainInner() 147 if (ptr_->FlushSync() != NativePreferences::E_OK) { in RefreshSync() 177 if (ptr_->Delete(key) != NativePreferences in Remove() [all...] |
/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, const std::string &key, in SaveInner() 86 return ptr->PutInt(key, value) == NativePreferences::E_OK; in SaveInner() 89 bool NetFirewallPreferenceHelper::SaveInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, in SaveInner() 96 return ptr->PutBool(key, value) == NativePreferences::E_OK; in SaveInner() 118 int32_t NetFirewallPreferenceHelper::ObtainInner(std::shared_ptr<NativePreferences::Preferences> ptr, 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 in Clear() [all...] |
/foundation/arkui/ace_engine/adapter/ohos/capability/preference/ |
H A D | storage_impl.cpp | 19 std::shared_ptr<NativePreferences::Preferences> StorageImpl::GetPreference(const std::string& fileName) in GetPreference() 25 auto pref = NativePreferences::PreferencesHelper::GetPreferences(fileName, errCode_); in GetPreference() 32 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in SetString() 42 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in GetString() 50 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in Clear() 54 NativePreferences::PreferencesHelper::DeletePreferences(fileName_); in Clear() 60 std::shared_ptr<NativePreferences::Preferences> pref = GetPreference(fileName_); in Delete()
|
H A D | storage_impl.h | 58 std::shared_ptr<NativePreferences::Preferences> GetPreference(const std::string& fileName); 61 std::unordered_map<std::string, std::shared_ptr<NativePreferences::Preferences>> preferences_;
|
/foundation/communication/nfc/services/src/external_deps/ |
H A D | nfc_preferences.cpp | 37 std::shared_ptr<NativePreferences::Preferences> NfcPreferences::GetPreference(const std::string& fileName) 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()
|
/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& value); 55 std::shared_ptr<NativePreferences::Preferences> ptr, const std::string& key, const int64_t& defValue); 57 std::shared_ptr<NativePreferences::Preferences> ptr, const std::string& key, const std::string& defValue); 58 std::shared_ptr<NativePreferences::Preferences> ptr_ = nullptr;
|
/foundation/distributeddatamgr/preferences/test/ndk/unittest/ |
H A D | preferences_ndk_test.cpp | 44 using namespace OHOS::NativePreferences; 131 std::shared_ptr<OHOS::NativePreferences::Preferences> nativePreferences = pref->GetNativePreferences(); in PreferencesFlush() 139 EXPECT_EQ(PreferencesFlush(pref), OHOS::NativePreferences::E_OK); in SetAllValuesWithCheck() 146 EXPECT_EQ(PreferencesFlush(pref), OHOS::NativePreferences::E_OK); in SetAllValuesWithCheck() 155 EXPECT_EQ(PreferencesFlush(pref), OHOS::NativePreferences::E_OK); in SetAllValuesWithCheck() 223 EXPECT_EQ(OHOS::NativePreferences::PreferencesHelper::DeletePreferences("/data/test/testdb"), in HWTEST_F() 224 OHOS::NativePreferences::E_OK); in HWTEST_F() 254 EXPECT_EQ(OHOS::NativePreferences::PreferencesHelper::DeletePreferences("/data/test/testdb"), in HWTEST_F() 255 OHOS::NativePreferences::E_OK); in HWTEST_F() 283 EXPECT_EQ(OHOS::NativePreferences in HWTEST_F() [all...] |
H A D | preferences_ndk_value_test.cpp | 44 using namespace OHOS::NativePreferences; 85 std::shared_ptr<OHOS::NativePreferences::Preferences> nativePreferences = pref->GetNativePreferences(); in PreferencesFlush() 125 EXPECT_EQ(OHOS::NativePreferences::PreferencesHelper::DeletePreferences("/data/test/valueTestDb"), in HWTEST_F() 126 OHOS::NativePreferences::E_OK); in HWTEST_F() 178 EXPECT_EQ(OHOS::NativePreferences::PreferencesHelper::DeletePreferences("/data/test/valueTestDb"), in HWTEST_F() 179 OHOS::NativePreferences::E_OK); in HWTEST_F() 222 EXPECT_EQ(OHOS::NativePreferences::PreferencesHelper::DeletePreferences("/data/test/valueTestDb"), in HWTEST_F() 223 OHOS::NativePreferences::E_OK); in HWTEST_F() 259 EXPECT_EQ(OHOS::NativePreferences::PreferencesHelper::DeletePreferences("/data/test/valueTestDb"), in HWTEST_F() 260 OHOS::NativePreferences in HWTEST_F() [all...] |
/foundation/multimodalinput/input/service/module_loader/src/ |
H A D | multimodal_input_preferences_manager.cpp | 84 std::shared_ptr<NativePreferences::Preferences> mousePref = in GetPreferencesSettings() 85 NativePreferences::PreferencesHelper::GetPreferences(PATH + MOUSE_FILE_NAME, errCode); in GetPreferencesSettings() 87 std::shared_ptr<NativePreferences::Preferences> keyboardPref = in GetPreferencesSettings() 88 NativePreferences::PreferencesHelper::GetPreferences(PATH + KEYBOARD_FILE_NAME, errCode); in GetPreferencesSettings() 90 std::shared_ptr<NativePreferences::Preferences> touchpadPref = in GetPreferencesSettings() 91 NativePreferences::PreferencesHelper::GetPreferences(PATH + TOUCHPAD_FILE_NAME, errCode); in GetPreferencesSettings() 118 NativePreferences::PreferencesHelper::RemovePreferencesFromCache(PATH + MOUSE_FILE_NAME); in GetPreferencesSettings() 119 NativePreferences::PreferencesHelper::RemovePreferencesFromCache(PATH + KEYBOARD_FILE_NAME); in GetPreferencesSettings() 120 NativePreferences::PreferencesHelper::RemovePreferencesFromCache(PATH + TOUCHPAD_FILE_NAME); in GetPreferencesSettings() 194 std::shared_ptr<NativePreferences in SetIntValue() [all...] |
/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_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()
|
H A D | dfx_reporter.cpp | 89 shared_ptr<NativePreferences::Preferences> prefs = in ReportThumbnailError() 90 NativePreferences::PreferencesHelper::GetPreferences(THUMBNAIL_ERROR_XML, errCode); in ReportThumbnailError() 95 map<string, NativePreferences::PreferencesValue> errorMap = prefs->GetAll(); in ReportThumbnailError() 129 shared_ptr<NativePreferences::Preferences> prefs = in ReportCommonBehavior() 130 NativePreferences::PreferencesHelper::GetPreferences(COMMON_BEHAVIOR_XML, errCode); in ReportCommonBehavior() 135 map<string, NativePreferences::PreferencesValue> errorMap = prefs->GetAll(); in ReportCommonBehavior() 156 shared_ptr<NativePreferences::Preferences> prefs = in ReportDeleteStatistic() 157 NativePreferences::PreferencesHelper::GetPreferences(DELETE_BEHAVIOR_XML, errCode); in ReportDeleteStatistic() 162 map<string, NativePreferences::PreferencesValue> deleteMap = prefs->GetAll(); in ReportDeleteStatistic() 302 shared_ptr<NativePreferences in ReportAdaptationToMovingPhoto() [all...] |
/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 int32_t &value); 97 bool SaveInner(std::shared_ptr<NativePreferences::Preferences> ptr, const std::string &key, const bool &value); 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, const bool &defValue); 106 std::shared_ptr<NativePreferences::Preferences> ptr_ = nullptr;
|
/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, "Failed to delete preferences file." }, 24 { NativePreferences::E_GET_DATAOBSMGRCLIENT_FAIL, E_GET_DATAOBSMGRCLIENT_FAIL, 26 { NativePreferences::E_NOT_SUPPORTED, E_NOT_SUPPORTED, "Capability not supported" },
|
/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) override; 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_;
|
/foundation/distributeddatamgr/preferences/interfaces/inner_api/include/ |
H A D | preferences_observer.h | 26 namespace NativePreferences { namespace 45 virtual void OnChange(const std::map<std::string, NativePreferences::PreferencesValue> &records) {}; in OnChange() 47 } // End of namespace NativePreferences
|
/foundation/distributeddatamgr/preferences/frameworks/js/napi/common/include/ |
H A D | napi_preferences_observer.h | 26 public OHOS::NativePreferences::PreferencesObserver, 32 void OnChange(const std::map<std::string, NativePreferences::PreferencesValue> &records) override;
|
/foundation/bundlemanager/app_domain_verify/frameworks/common/include/config/ |
H A D | white_list_config_mgr.h | 37 std::shared_ptr<NativePreferences::Preferences> GetPreference(const std::string& path); 40 std::shared_ptr<NativePreferences::Preferences> preferences_;
|
/foundation/multimedia/ringtone_library/services/ringtone_dfx/src/ |
H A D | dfx_reporter.cpp | 42 shared_ptr<NativePreferences::Preferences> prefs = in ReportDfxMessage() 43 NativePreferences::PreferencesHelper::GetPreferences(DFX_COMMON_XML, errCode); in ReportDfxMessage()
|
H A D | dfx_worker.cpp | 59 shared_ptr<NativePreferences::Preferences> prefs = in InitCycleThread() 60 NativePreferences::PreferencesHelper::GetPreferences(DFX_COMMON_XML, errCode); in InitCycleThread()
|
/foundation/bundlemanager/app_domain_verify/frameworks/common/src/config/ |
H A D | white_list_config_mgr.cpp | 94 std::shared_ptr<NativePreferences::Preferences> WhiteListConfigMgr::GetPreference(const std::string& path) in GetPreference() 97 NativePreferences::Options options(path); in GetPreference() 98 std::shared_ptr<NativePreferences::Preferences> preferences = NativePreferences::PreferencesHelper::GetPreferences( in GetPreference()
|
/foundation/multimedia/ringtone_library/services/utils/src/ |
H A D | ringtone_utils.cpp | 131 shared_ptr<NativePreferences::Preferences> prefs = in CheckNeedScanner() 132 NativePreferences::PreferencesHelper::GetPreferences(xmlFilePath, errCode); in CheckNeedScanner() 175 shared_ptr<NativePreferences::Preferences> prefs = in SetMoveEL2DBToEL1() 176 NativePreferences::PreferencesHelper::GetPreferences(COMMON_XML_EL1, errCode); in SetMoveEL2DBToEL1()
|
/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 in CValueTypeToNativeValue() [all...] |