/ohos5.0/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/backup/src/ |
H A D | backup_manager.cpp | 65 RollBackData(backupPath); in Init() 68 CleanData(backupPath); in Init() 170 auto backupPath = path + BACKUP_BK_POSTFIX; in KeepData() local 171 CopyFile(path, backupPath, true); in KeepData() 177 auto backupPath = path + BACKUP_BK_POSTFIX; in SaveData() local 183 RemoveFile(backupPath.c_str()); in SaveData() 189 auto backupPath = path + BACKUP_BK_POSTFIX; in RollBackData() local 190 CopyFile(backupPath, path); in RollBackData() 192 RemoveFile(backupPath.c_str()); in RollBackData() 197 auto backupPath = path + BACKUP_BK_POSTFIX; in CleanData() local [all …]
|
/ohos5.0/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/kvdb/ |
H A D | kvdb_exporter.cpp | 28 void KVDBExporter::Exporter(const StoreMetaData &meta, const std::string &backupPath, bool &result) in Exporter() argument 36 manager.GetKvStore(meta.storeId, dbOption, [&manager, &backupPath, &dbPassword, &result] in Exporter() 43 dbstatus = delegate->Export(backupPath, dbPassword); in Exporter() 49 .append(backupPath) in Exporter()
|
H A D | kvdb_exporter.h | 29 static void Exporter(const StoreMetaData &meta, const std::string &backupPath, bool &result);
|
/ohos5.0/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/src/ |
H A D | connection_pool.cpp | 378 if (!writers_.IsFull() || config_.GetPath() == backupPath || newPath == backupPath) { in ChangeDbFileForRestore() 390 retVal = connection->Restore(backupPath, {}, slaveStatus); in ChangeDbFileForRestore() 399 return RestoreByDbSqliteType(newPath, backupPath, slaveStatus); in ChangeDbFileForRestore() 409 return connection->Restore(backupPath, {}, slaveStatus); in RestoreByDbSqliteType() 412 return RestoreMasterDb(newPath, backupPath); in RestoreByDbSqliteType() 415 int ConnPool::RestoreMasterDb(const std::string &newPath, const std::string &backupPath) in RestoreMasterDb() argument 417 if (!CheckIntegrity(backupPath)) { in RestoreMasterDb() 421 SqliteUtils::DeleteFile(backupPath + "-shm"); in RestoreMasterDb() 422 SqliteUtils::DeleteFile(backupPath + "-wal"); in RestoreMasterDb() 433 bool copyRet = SqliteUtils::CopyFile(backupPath, newPath); in RestoreMasterDb() [all …]
|
/ohos5.0/foundation/multimedia/ringtone_library/services/ringtone_restore/src/ |
H A D | ringtone_restore.cpp | 38 int32_t RingtoneRestore::Init(const std::string &backupPath) in Init() argument 41 if (backupPath.empty()) { in Init() 45 dbPath_ = backupPath + RINGTONELIBRARY_DB_PATH + "/rdb" + "/" + RINGTONE_LIBRARY_DB_NAME; in Init() 46 backupPath_ = backupPath; in Init() 52 if (RingtoneRestoreBase::Init(backupPath) != E_OK) { in Init()
|
H A D | ringtone_dualfwk_restore.cpp | 68 int32_t RingtoneDualFwkRestore::LoadDualFwkConf(const std::string &backupPath) in LoadDualFwkConf() argument 76 confLoader.Load(conf, RESTORE_SCENE_TYPE_DUAL_UPGRADE, backupPath); in LoadDualFwkConf() 115 int32_t RingtoneDualFwkRestore::Init(const std::string &backupPath) in Init() argument 118 if (backupPath.empty()) { in Init() 129 if (LoadDualFwkConf(backupPath + "/" + DUALFWK_SOUND_CONF_XML) != E_SUCCESS) { in Init() 133 if (RingtoneRestoreBase::Init(backupPath) != E_OK) { in Init() 496 int32_t RingtoneDualFwkRestoreClone::LoadDualFwkConf(const std::string &backupPath) in LoadDualFwkConf() argument 504 confLoader.Load(conf, RESTORE_SCENE_TYPE_DUAL_CLONE, backupPath); in LoadDualFwkConf()
|
H A D | ringtone_dualfw_restore.cpp | 91 int32_t RingtoneDualfwRestore::Init(const std::string &backupPath) in Init() argument 94 if (backupPath.empty()) { in Init() 98 dualfwConf_ = backupPath + "/" + DUALFW_SOUND_CONF_XML; in Init() 115 if (RingtoneRestoreBase::Init(backupPath) != E_OK) { in Init()
|
H A D | ringtone_restore_napi.cpp | 96 static int32_t RingtoneRestore(std::unique_ptr<RestoreInterface> &restore, string backupPath) in RingtoneRestore() argument 99 if ((restore != nullptr) && (restore->Init(backupPath)) == Media::E_OK) { in RingtoneRestore()
|
/ohos5.0/foundation/multimedia/ringtone_library/services/ringtone_restore/include/ |
H A D | ringtone_dualfwk_restore.h | 34 int32_t Init(const std::string &backupPath) override; 41 virtual int32_t LoadDualFwkConf(const std::string &backupPath) override; 61 virtual int32_t LoadDualFwkConf(const std::string &backupPath) override;
|
H A D | ringtone_restore_base.h | 30 int32_t Init(const std::string &backupPath) override; 41 virtual int32_t LoadDualFwkConf(const std::string &backupPath) { return -1; } in LoadDualFwkConf() argument
|
H A D | restore_interface.h | 28 virtual int32_t Init(const std::string &backupPath) = 0;
|
H A D | ringtone_dualfw_restore.h | 33 int32_t Init(const std::string &backupPath) override;
|
H A D | ringtone_restore.h | 30 int32_t Init(const std::string &backupPath) override;
|
/ohos5.0/foundation/multimedia/ringtone_library/test/unittest/ringtone_dualfwk_restore_test/src/ |
H A D | ringtone_dualfwk_restore_test.cpp | 148 string backupPath = ""; variable 149 int32_t res = g_restoreDualFwkService->Init(backupPath); 151 backupPath = "/data/test"; 152 res = g_restoreDualFwkService->Init(backupPath);
|
/ohos5.0/base/update/sys_installer/services/module_update/service/src/ |
H A D | module_update_main.cpp | 561 std::string backupPath = std::string(UPDATE_BACKUP_DIR) + "/" + hmpName; in BackupActiveModules() local 562 if (CheckPathExists(backupPath)) { in BackupActiveModules() 563 if (!ForceRemoveDirectory(backupPath)) { in BackupActiveModules() 564 LOG(ERROR) << "Failed to remove backup dir:" << backupPath; in BackupActiveModules() 568 if (!CreateDirIfNeeded(backupPath, DIR_MODE)) { in BackupActiveModules() 569 LOG(ERROR) << "Failed to create backup dir:" << backupPath; in BackupActiveModules() 576 if (!ForceRemoveDirectory(backupPath)) { in BackupActiveModules()
|
/ohos5.0/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/include/ |
H A D | connection_pool.h | 57 int ChangeDbFileForRestore(const std::string &newPath, const std::string &backupPath, 124 …int RestoreByDbSqliteType(const std::string &newPath, const std::string &backupPath, SlaveStatus &… 125 int RestoreMasterDb(const std::string &newPath, const std::string &backupPath);
|
H A D | rdb_store_impl.h | 117 int Restore(const std::string &backupPath, const std::vector<uint8_t> &newKey) override; 219 int GetDestPath(const std::string &backupPath, std::string &destPath);
|
/ohos5.0/base/update/sys_installer/services/module_update/util/src/ |
H A D | module_utils.cpp | 231 std::string backupPath = std::string(UPDATE_BACKUP_DIR) + "/" + hmpName; in Revert() local 232 if (CheckPathExists(backupPath)) { in Revert() 233 ret = rename(backupPath.c_str(), activePath.c_str()); in Revert() 235 … LOG(ERROR) << "Failed to rename " << backupPath << " to " << activePath << " err=" << errno; in Revert()
|
/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/native/src/ |
H A D | preferences_helper.cpp | 227 std::string backupPath = MakeFilePath(filePath, STR_BACKUP); in DeletePreferences() local 233 std::remove(backupPath.c_str()); in DeletePreferences() 243 if (IsFileExist(filePath) || IsFileExist(backupPath) || IsFileExist(brokenPath)) { in DeletePreferences()
|
/ohos5.0/foundation/distributeddatamgr/relational_store/test/ndk/unittest/ |
H A D | rdb_store_test.cpp | 431 std::string backupPath = "backup.db"; variable 432 errCode = OH_Rdb_Backup(storeTestRdbStore_, backupPath.c_str()); 434 errCode = OH_Rdb_Restore(storeTestRdbStore_, backupPath.c_str()); 465 std::string backupPath = " "; variable 466 errCode = OH_Rdb_Backup(storeTestRdbStore_, backupPath.c_str()); 478 backupPath = ""; 479 errCode = OH_Rdb_Backup(storeTestRdbStore_, backupPath.c_str()); 482 backupPath = RDB_TEST_PATH + std::string("/backup/backup.db"); 483 errCode = OH_Rdb_Backup(storeTestRdbStore_, backupPath.c_str()); 486 backupPath = RDB_TEST_PATH; [all …]
|
/ohos5.0/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
H A D | cert_manager_updateflag.c | 133 char backupPath[CERT_MAX_PATH_LEN] = { 0 }; in IsCertNeedBackup() local 134 size = CmFileRead(NULL, configPath, 0, (uint8_t *)backupPath, CERT_MAX_PATH_LEN - 1); in IsCertNeedBackup() 141 ret = CmIsFileExist(NULL, (const char *)backupPath); in IsCertNeedBackup()
|
/ohos5.0/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/mock/include/ |
H A D | rdb_store_impl.h | 68 int Restore(const std::string &backupPath, const std::vector<uint8_t> &newKey) override; 125 int GetDestPath(const std::string &backupPath, std::string &destPath);
|
/ohos5.0/foundation/bundlemanager/app_domain_verify/test/unittest/mock/include/ |
H A D | mock_rdb.h | 219 int Restore(const std::string& backupPath, const std::vector<uint8_t>& newKey) override in Restore() argument 224 const std::string newPath, const std::string backupPath, const std::vector<uint8_t>& newKey) in ChangeDbFileForRestore() argument
|
/ohos5.0/foundation/bundlemanager/bundle_framework/services/bundlemgr/test/mock/include/ |
H A D | mock_app_provision_info.h | 223 virtual int Restore(const std::string &backupPath, const std::vector<uint8_t> &newKey) in Restore() argument 227 virtual int ChangeDbFileForRestore(const std::string newPath, const std::string backupPath, in ChangeDbFileForRestore() argument
|
/ohos5.0/foundation/distributeddatamgr/relational_store/test/native/rdb/unittest/ |
H A D | rdb_store_impl_test.cpp | 521 const std::string backupPath = DATABASE_NAME; variable 527 errCode = connectionPool->ChangeDbFileForRestore(newPath, backupPath, newKey, curStatus); 531 errCode = connectionPool->ChangeDbFileForRestore(newPath, backupPath, newKey, curStatus); 535 errCode = connectionPool->ChangeDbFileForRestore(newPath2, backupPath, newKey, curStatus);
|