Home
last modified time | relevance | path

Searched refs:DistributedKv (Results 1 – 25 of 40) sorted by relevance

12

/base/notification/distributed_notification_service/services/distributed/src/
Ddistributed_preferences_database.cpp38 kvDataManager_ = std::make_unique<DistributedKv::DistributedKvDataManager>(); in GetKvDataManager()
60 DistributedKv::Options options = { in GetKvStore()
63 .area = DistributedKv::EL1, in GetKvStore()
64 .kvStoreType = DistributedKv::KvStoreType::SINGLE_VERSION, in GetKvStore()
67 DistributedKv::AppId appId = {.appId = APP_ID}; in GetKvStore()
68 DistributedKv::StoreId storeId = {.storeId = STORE_ID}; in GetKvStore()
69DistributedKv::Status status = kvDataManager_->GetSingleKvStore(options, appId, storeId, kvStore_); in GetKvStore()
70 if (status != DistributedKv::Status::SUCCESS) { in GetKvStore()
104 DistributedKv::Key kvStoreKey(key); in PutToDistributedDB()
105 DistributedKv::Value kvStoreValue(value); in PutToDistributedDB()
[all …]
Ddistributed_database.cpp40 kvDataManager_ = std::make_unique<DistributedKv::DistributedKvDataManager>(); in GetKvDataManager()
42 DistributedKv::Status status = kvDataManager_->StartWatchDeviceChange(deviceCb_); in GetKvDataManager()
43 if (status != DistributedKv::Status::SUCCESS) { in GetKvDataManager()
69 DistributedKv::Options options { in GetKvStore()
71 .securityLevel = DistributedKv::SecurityLevel::S1, in GetKvStore()
74 .area = DistributedKv::EL1, in GetKvStore()
75 .kvStoreType = DistributedKv::KvStoreType::SINGLE_VERSION, in GetKvStore()
78 DistributedKv::AppId appId = {.appId = APP_ID}; in GetKvStore()
79 DistributedKv::StoreId storeId = {.storeId = STORE_ID}; in GetKvStore()
80DistributedKv::Status status = kvDataManager_->GetSingleKvStore(options, appId, storeId, kvStore_); in GetKvStore()
[all …]
Ddistributed_screen_status_manager.cpp60 std::vector<DistributedKv::DeviceInfo> devInfoList; in OnDeviceDisconnected()
61 DistributedKv::Status status = in OnDeviceDisconnected()
62 kvDataManager_->GetDeviceList(devInfoList, DistributedKv::DeviceFilterStrategy::NO_FILTER); in OnDeviceDisconnected()
63 if (status != DistributedKv::Status::SUCCESS) { in OnDeviceDisconnected()
75 DistributedKv::AppId appId = {.appId = APP_ID}; in OnDeviceDisconnected()
76 DistributedKv::StoreId storeId = {.storeId = STORE_ID}; in OnDeviceDisconnected()
88 kvDataManager_ = std::make_unique<DistributedKv::DistributedKvDataManager>(); in GetKvDataManager()
90 DistributedKv::Status status = kvDataManager_->StartWatchDeviceChange(deviceCb_); in GetKvDataManager()
91 if (status != DistributedKv::Status::SUCCESS) { in GetKvDataManager()
117 DistributedKv::Options options = { in GetKvStore()
[all …]
Ddistributed_device_callback.cpp28 const DistributedKv::DeviceInfo &info, const DistributedKv::DeviceChangeType &type) const in OnDeviceChanged()
31 if (type == DistributedKv::DeviceChangeType::DEVICE_ONLINE) { in OnDeviceChanged()
38 if (type == DistributedKv::DeviceChangeType::DEVICE_OFFLINE) { in OnDeviceChanged()
44 DistributedKv::DeviceFilterStrategy DistributedDeviceCallback::GetFilterStrategy() const in GetFilterStrategy()
46 return DistributedKv::DeviceFilterStrategy::NO_FILTER; in GetFilterStrategy()
Ddistributed_database_callback.cpp28 void DistributedDatabaseCallback::OnChange(const DistributedKv::ChangeNotification &changeNotificat… in OnChange()
33 const std::vector<DistributedKv::Entry> &entryList = changeNotification.GetInsertEntries(); in OnChange()
41 const std::vector<DistributedKv::Entry> &entryList = changeNotification.GetUpdateEntries(); in OnChange()
49 const std::vector<DistributedKv::Entry> &entryList = changeNotification.GetDeleteEntries(); in OnChange()
/base/account/os_account/services/accountmgr/src/
Daccount_data_storage.cpp42 void AccountDataStorage::TryTwice(const std::function<DistributedKv::Status()> &func) const in TryTwice()
44 OHOS::DistributedKv::Status status = func(); in TryTwice()
45 if (status == OHOS::DistributedKv::Status::IPC_ERROR) { in TryTwice()
51 OHOS::DistributedKv::Status AccountDataStorage::GetKvStore() in GetKvStore()
53 OHOS::DistributedKv::Options options = { in GetKvStore()
58 .area = OHOS::DistributedKv::EL1, in GetKvStore()
59 .kvStoreType = OHOS::DistributedKv::KvStoreType::SINGLE_VERSION, in GetKvStore()
63 …OHOS::DistributedKv::Status status = dataManager_.GetSingleKvStore(options, appId_, storeId_, kvSt… in GetKvStore()
64 if (status != OHOS::DistributedKv::Status::SUCCESS || kvStorePtr_ == nullptr) { in GetKvStore()
79 OHOS::DistributedKv::Status status = OHOS::DistributedKv::Status::SUCCESS; in CheckKvStore()
[all …]
/base/account/os_account/services/accountmgr/include/
Daccount_data_storage.h37 void TryTwice(const std::function<DistributedKv::Status()> &func) const;
38 virtual void SaveEntries(std::vector<OHOS::DistributedKv::Entry> allEntries,
48 OHOS::DistributedKv::Status GetEntries(
49 std::string subId, std::vector<OHOS::DistributedKv::Entry> &allEntries) const;
50 OHOS::DistributedKv::Status GetKvStore();
51 OHOS::DistributedKv::DistributedKvDataManager dataManager_;
52 std::shared_ptr<OHOS::DistributedKv::SingleKvStore> kvStorePtr_;
55 OHOS::DistributedKv::AppId appId_;
56 OHOS::DistributedKv::StoreId storeId_;
/base/notification/distributed_notification_service/services/distributed/include/
Ddistributed_device_callback.h25 class DistributedDeviceCallback : public DistributedKv::DeviceStatusChangeListener {
49 …const DistributedKv::DeviceInfo &info, const DistributedKv::DeviceChangeType &type) const override;
50 DistributedKv::DeviceFilterStrategy GetFilterStrategy() const override;
Ddistributed_database.h35 using Entry = DistributedKv::Entry;
36 using DeviceInfo = DistributedKv::DeviceInfo;
136 std::unique_ptr<DistributedKv::DistributedKvDataManager> kvDataManager_;
137 std::shared_ptr<DistributedKv::SingleKvStore> kvStore_;
Ddistributed_preferences_database.h34 using Entry = DistributedKv::Entry;
90 std::unique_ptr<DistributedKv::DistributedKvDataManager> kvDataManager_;
91 std::shared_ptr<DistributedKv::SingleKvStore> kvStore_;
Ddistributed_database_callback.h25 class DistributedDatabaseCallback : public DistributedKv::KvStoreObserver {
49 void OnChange(const DistributedKv::ChangeNotification &changeNotification) override;
Ddistributed_screen_status_manager.h65 std::unique_ptr<DistributedKv::DistributedKvDataManager> kvDataManager_ = nullptr;
66 std::shared_ptr<DistributedKv::SingleKvStore> kvStore_ = nullptr;
/base/notification/distributed_notification_service/frameworks/test/moduletest/
Dans_fw_module_test.cpp382 …NotificationRequest &req, std::vector<DistributedKv::Entry> &entries, DistributedKv::Entry &outEnt… in GetRequestInDistributedEntryList()
436 DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; in SetDistributedScreenStatus()
437 DistributedKv::StoreId storeId = {.storeId = KVSTORE_SCREEN_STATUS_STORE_ID}; in SetDistributedScreenStatus()
438 std::shared_ptr<DistributedKv::MockSingleKvStore> pointer = in SetDistributedScreenStatus()
439 DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); in SetDistributedScreenStatus()
441 DistributedKv::Key key("<remoteDeviceId>" + DELIMITER + "screen_status"); in SetDistributedScreenStatus()
442 DistributedKv::Value value(isScreenOn ? "on" : "off"); in SetDistributedScreenStatus()
1725 DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID};
1726 DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID};
1727 std::shared_ptr<DistributedKv::MockSingleKvStore> pointer =
[all …]
/base/notification/distributed_notification_service/services/distributed/test/unittest/
Ddistributed_database_test.cpp104 std::vector<DistributedKv::Entry> insertEntries;
105 std::vector<DistributedKv::Entry> updateEntries;
106 std::vector<DistributedKv::Entry> deleteEntries;
107 DistributedKv::ChangeNotification change(
112 DistributedKv::DeviceInfo deviceInfo;
113 deviceCallback_->OnDeviceChanged(deviceInfo, DistributedKv::DeviceChangeType::DEVICE_ONLINE);
114 deviceCallback_->OnDeviceChanged(deviceInfo, DistributedKv::DeviceChangeType::DEVICE_OFFLINE);
218 EXPECT_EQ(deviceCallback_->GetFilterStrategy(), DistributedKv::DeviceFilterStrategy::NO_FILTER);
/base/notification/distributed_notification_service/services/distributed/test/unittest/mock/
Dmock_distributed_kv_data_manager.cpp30 namespace DistributedKv { namespace
52 return DistributedKv::Status::SUCCESS; in GetSingleKvStore()
Dmock_change_notification.cpp19 namespace DistributedKv { namespace
Dmock_single_kv_store.h31 namespace DistributedKv {
336 std::map<std::string, DistributedKv::Status> &status) override;
/base/notification/distributed_notification_service/services/ans/include/
Ddistributed_kvstore_death_recipient.h25 class DistributedKvStoreDeathRecipient : public DistributedKv::KvStoreDeathRecipient {
/base/account/os_account/services/accountmgr/include/osaccount/
Dos_account_data_storage.h29 void SaveEntries(std::vector<OHOS::DistributedKv::Entry> allEntries,
/base/notification/distributed_notification_service/frameworks/test/moduletest/mock/
Dmock_change_notification.cpp19 namespace DistributedKv { namespace
/base/notification/distributed_notification_service/services/test/moduletest/mock/
Ddistributed_kv_data_manager.cpp23 namespace DistributedKv { namespace
/base/notification/distributed_notification_service/services/ans/test/unittest/mock/
Ddistributed_kv_data_manager.cpp23 namespace DistributedKv { namespace
/base/account/os_account/services/accountmgr/src/osaccount/
Dos_account_data_storage.cpp35 …std::vector<OHOS::DistributedKv::Entry> allEntries, std::map<std::string, std::shared_ptr<IAccount… in SaveEntries()
/base/account/os_account/services/accountmgr/include/appaccount/
Dapp_account_data_storage.h45 void SaveEntries(std::vector<OHOS::DistributedKv::Entry> allEntries,
/base/notification/distributed_notification_service/services/ans/test/unittest/mock/include/
Dmock_single_kv_store.h31 namespace DistributedKv {
334 std::map<std::string, DistributedKv::Status> &status) override;

12