mirror of
https://gitee.com/openharmony/distributeddatamgr_relational_store
synced 2024-11-23 15:11:33 +00:00
update the mock files
Signed-off-by: Sven Wang <wanghancai@huawei.com>
This commit is contained in:
parent
8e3b5ca42d
commit
eb8938f772
@ -112,7 +112,6 @@ protected:
|
||||
bool isEncrypt_;
|
||||
int64_t vSchema_ = 0;
|
||||
std::string path_;
|
||||
std::string orgPath_;
|
||||
std::string name_;
|
||||
std::string fileType_;
|
||||
|
||||
|
@ -77,6 +77,7 @@ private:
|
||||
std::string GetSecManagerName(const RdbStoreConfig &config);
|
||||
int SetEncrypt(const RdbStoreConfig &config);
|
||||
int SetEncryptKey(const std::vector<uint8_t> &key, int32_t iter);
|
||||
int SetServiceKey(const RdbStoreConfig &config, int32_t lastErr);
|
||||
int SetEncryptAgo(int32_t iter);
|
||||
int SetJournalMode(const RdbStoreConfig &config);
|
||||
int SetJournalSizeLimit(const RdbStoreConfig &config);
|
||||
|
@ -31,6 +31,7 @@ public:
|
||||
static std::shared_ptr<RdbStore> GetRdbStore(
|
||||
const RdbStoreConfig &config, int version, RdbOpenCallback &openCallback, int &errCode);
|
||||
static int DeleteRdbStore(const std::string &path);
|
||||
static int DeleteRdbStore(const RdbStoreConfig &config);
|
||||
static void ClearCache();
|
||||
};
|
||||
} // namespace NativeRdb
|
||||
|
@ -128,6 +128,8 @@ public:
|
||||
// distributed rdb
|
||||
int SetBundleName(const std::string &bundleName);
|
||||
std::string GetBundleName() const;
|
||||
int SetDistributedType(DistributedType type);
|
||||
DistributedType GetDistributedType() const;
|
||||
void SetModuleName(const std::string& moduleName);
|
||||
std::string GetModuleName() const;
|
||||
void SetServiceName(const std::string& serviceName);
|
||||
@ -147,6 +149,9 @@ public:
|
||||
int GetReadConSize() const;
|
||||
void SetReadConSize(int readConSize);
|
||||
void SetEncryptKey(const std::vector<uint8_t> &encryptKey);
|
||||
|
||||
void RestoreEncryptKey(const std::vector<uint8_t> &encryptKey) const;
|
||||
|
||||
std::vector<uint8_t> GetEncryptKey() const;
|
||||
void ChangeEncryptKey() const;
|
||||
std::vector<uint8_t> GetNewEncryptKey() const;
|
||||
@ -189,13 +194,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
return this->path == config.path && this->storageMode == config.storageMode
|
||||
&& this->storageMode == config.storageMode && this->journalMode == config.journalMode
|
||||
&& this->syncMode == config.syncMode && this->databaseFileType == config.databaseFileType
|
||||
&& this->isEncrypt_ == config.isEncrypt_ && this->securityLevel == config.securityLevel
|
||||
&& this->journalSize_ == config.journalSize_ && this->pageSize_ == config.pageSize_
|
||||
&& this->readConSize_ == config.readConSize_ && this->customDir_ == config.customDir_
|
||||
&& this->allowRebuilt_ == config.allowRebuilt_ && this->pluginLibs_ == config.pluginLibs_;
|
||||
return this->path_ == config.path_ && this->storageMode_ == config.storageMode_ &&
|
||||
this->journalMode_ == config.journalMode_ && this->syncMode_ == config.syncMode_ &&
|
||||
this->databaseFileType == config.databaseFileType && this->isEncrypt_ == config.isEncrypt_ &&
|
||||
this->securityLevel_ == config.securityLevel_ && this->journalSize_ == config.journalSize_ &&
|
||||
this->pageSize_ == config.pageSize_ && this->readConSize_ == config.readConSize_ &&
|
||||
this->customDir_ == config.customDir_ && this->allowRebuilt_ == config.allowRebuilt_ &&
|
||||
this->pluginLibs_ == config.pluginLibs_;
|
||||
}
|
||||
|
||||
bool IsSearchable() const;
|
||||
@ -210,20 +215,18 @@ public:
|
||||
bool GetAllowRebuild() const;
|
||||
void SetDBType(int32_t dbType);
|
||||
int32_t GetDBType() const;
|
||||
void SetIntegrityCheck(IntegrityCheck checkType);
|
||||
void SetIntegrityCheck(IntegrityCheck checkMode);
|
||||
IntegrityCheck GetIntegrityCheck() const;
|
||||
void SetPluginLibs(const std::vector<std::string> &pluginLibs);
|
||||
std::vector<std::string> GetPluginLibs() const;
|
||||
void SetIter(int32_t iter) const;
|
||||
int32_t GetIter() const;
|
||||
int SetDistributedType(DistributedType type);
|
||||
DistributedType GetDistributedType() const;
|
||||
|
||||
private:
|
||||
void ClearEncryptKey();
|
||||
int32_t GenerateEncryptedKey() const;
|
||||
|
||||
bool readOnly = false;
|
||||
bool readOnly_ = false;
|
||||
bool isEncrypt_ = false;
|
||||
bool isCreateNecessary_;
|
||||
bool isSearchable_ = false;
|
||||
@ -238,21 +241,21 @@ private:
|
||||
int32_t writeTimeout_ = 2; // seconds
|
||||
int32_t readTimeout_ = 1; // seconds
|
||||
int32_t dbType_ = DB_SQLITE;
|
||||
SecurityLevel securityLevel = SecurityLevel::LAST;
|
||||
SecurityLevel securityLevel_ = SecurityLevel::LAST;
|
||||
RoleType role_ = OWNER;
|
||||
StorageMode storageMode;
|
||||
IntegrityCheck checkType_ = IntegrityCheck::NONE;
|
||||
DistributedType distributedType_ = DistributedType::RDB_DEVICE_COLLABORATION;
|
||||
std::string name;
|
||||
std::string path;
|
||||
std::string journalMode;
|
||||
std::string syncMode;
|
||||
StorageMode storageMode_;
|
||||
IntegrityCheck checkType_ = IntegrityCheck::NONE;
|
||||
std::string name_;
|
||||
std::string path_;
|
||||
std::string journalMode_;
|
||||
std::string syncMode_;
|
||||
std::string databaseFileType;
|
||||
// distributed rdb
|
||||
std::string bundleName_;
|
||||
std::string moduleName_;
|
||||
std::string visitorDir_;
|
||||
std::string encryptAlgo;
|
||||
std::string encryptAlgo_;
|
||||
std::string dataGroupId_;
|
||||
std::string customDir_;
|
||||
mutable std::vector<uint8_t> encryptKey_{};
|
||||
@ -265,5 +268,4 @@ private:
|
||||
bool allowRebuilt_ = false;
|
||||
};
|
||||
} // namespace OHOS::NativeRdb
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user