Lines Matching refs:module
32 int32_t Config::GetConfig(const std::string &module, SharingDataGroupByModule::Ptr &values)
36 if (datas_ == nullptr || !datas_->HasModule(module)) {
37 SHARING_LOGE("data_s is null or has no module named %{public}s.", module.c_str());
41 return datas_->GetSharingValues(values, module);
44 int32_t Config::GetConfig(const std::string &module, const std::string &tag, SharingDataGroupByTag::Ptr &values)
48 if (GetConfig(module, modelValue) != CONFIGURE_ERROR_NONE) {
49 SHARING_LOGE("module %{public}s error.", module.c_str());
54 return datas_->GetSharingValues(values, module, tag);
57 int32_t Config::GetConfig(const std::string &module, const std::string &tag, const std::string &key,
62 if (GetConfig(module, tag, tagValue) != CONFIGURE_ERROR_NONE) {
63 SHARING_LOGE("module %{public}s, tag %{public}s error.", module.c_str(), tag.c_str());
68 SharingValue::Ptr valueTmp = datas_->GetSharingValue(key, module, tag);
86 int32_t Config::SetConfig(const std::string &module, const SharingDataGroupByModule::Ptr &values)
91 auto err = datas_->PutSharingValues(values, module);
99 int32_t Config::SetConfig(const std::string &module, const std::string &tag, const SharingDataGroupByTag::Ptr &values)
103 if (GetConfig(module, modelValue) != CONFIGURE_ERROR_NONE) {
104 modelValue = std::make_shared<SharingDataGroupByModule>(module);
121 int32_t Config::SetConfig(const std::string &module, const std::string &tag, const std::string &key,
126 if (!datas_->HasModule(module)) {
127 auto modelValue = std::make_shared<SharingDataGroupByModule>(module);
129 return SetConfig(module, modelValue);
132 if (!datas_->HasTag(module, tag)) {
135 return SetConfig(module, tag, tagValue);
138 datas_->PutSharingValue(key, value, module, tag);