/ohos5.0/base/notification/distributed_notification_service/services/distributed/test/unittest/distributed_database_branch_test/ |
H A D | distributed_database_branch_test.cpp | 84 database_->OnDeviceConnected(); in SetUp() 89 database_ = nullptr; in TearDown() 116 ASSERT_NE(nullptr, database_); 130 ASSERT_NE(nullptr, database_); 134 database_->GetKvStore(); 144 ASSERT_NE(nullptr, database_); 147 database_->GetKvStore(); 157 ASSERT_NE(nullptr, database_); 160 database_->kvStore_ = nullptr; 161 database_->GetKvStore(); [all …]
|
/ohos5.0/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/rust/extension/ |
H A D | cloud_db_impl.cpp | 25 CloudDbImpl::CloudDbImpl(OhCloudExtCloudDatabase *database) : database_(database) in CloudDbImpl() 31 if (database_ != nullptr) { in ~CloudDbImpl() 32 OhCloudExtCloudDbFree(database_); in ~CloudDbImpl() 33 database_ = nullptr; in ~CloudDbImpl() 49 auto status = OhCloudExtCloudDbExecuteSql(database_, &sqlInfo, data.first); in Execute() 136 auto status = OhCloudExtCloudDbBatchQuery(database_, &info, &cloudData); in Query() 143 auto status = OhCloudExtCloudDbLock(database_, &expire); in Lock() 155 auto status = OhCloudExtCloudDbUnlock(database_); in Unlock() 166 if (database_ != nullptr) { in Close() 167 OhCloudExtCloudDbFree(database_); in Close() [all …]
|
H A D | cloud_db_impl.h | 48 OhCloudExtCloudDatabase *database_ = nullptr;
|
/ohos5.0/base/notification/distributed_notification_service/services/distributed/src/ |
H A D | distributed_notification_manager.cpp | 89 if (database_ == nullptr) { in GenerateLocalDistributedKey() 93 if (!database_->GetLocalDeviceId(deviceId)) { in GenerateLocalDistributedKey() 230 if (database_ == nullptr) { in OnDeviceConnected() 234 if (!database_->OnDeviceConnected()) { in OnDeviceConnected() 250 if (database_ == nullptr) { in OnDeviceDisconnected() 331 if (database_ == nullptr) { in Publish() 359 if (database_ == nullptr) { in Update() 380 if (database_ == nullptr) { in Delete() 400 if (database_ == nullptr) { in DeleteRemoteNotification() 441 if (database_ == nullptr) { in GetCurrentDistributedNotification() [all …]
|
H A D | distributed_preferences.cpp | 39 database_ = std::make_unique<DistributedPreferencesDatabase>(); in DistributedPreferences() 50 if (!database_->GetEntriesFromDistributedDB(DISTRIBUTED_LABEL, entries)) { in InitDistributedAllInfo() 146 if (!database_->PutToDistributedDB(key, std::to_string(isEnable))) { in SetDistributedEnable() 177 if (!database_->PutToDistributedDB(key, std::to_string(isEnable))) { in SetDistributedBundleEnable() 212 if (database_ == nullptr || preferencesInfo_ == nullptr) { in DeleteDistributedBundleInfo() 220 if (!database_->DeleteToDistributedDB(key)) { in DeleteDistributedBundleInfo() 232 if (database_ == nullptr) { in ClearDataInRestoreFactorySettings() 237 if (!database_->ClearDatabase()) { in ClearDataInRestoreFactorySettings() 255 if (database_ == nullptr || preferencesInfo_ == nullptr) { in SetSyncEnabledWithoutApp() 261 if (!database_->PutToDistributedDB(key, std::to_string(enabled))) { in SetSyncEnabledWithoutApp()
|
/ohos5.0/base/notification/distributed_notification_service/services/distributed/test/unittest/ |
H A D | distributed_database_test.cpp | 40 std::shared_ptr<DistributedDatabase> database_; member in OHOS::Notification::DistributedDatabaseTest 73 database_->OnDeviceConnected(); in SetUp() 78 database_ = nullptr; in TearDown() 122 EXPECT_EQ(database_->PutToDistributedDB(key, value), true); 135 EXPECT_EQ(database_->GetFromDistributedDB(key, value), true); 148 EXPECT_EQ(database_->GetEntriesFromDistributedDB(prifixKey, entries), true); 160 EXPECT_EQ(database_->DeleteToDistributedDB(key), true); 172 EXPECT_EQ(database_->ClearDataByDevice(deviceId), false); 184 EXPECT_EQ(database_->GetLocalDeviceId(deviceId), true); 196 EXPECT_EQ(database_->GetLocalDeviceInfo(deviceInfo), true); [all …]
|
/ohos5.0/foundation/resourceschedule/device_usage_statistics/services/packageusage/src/ |
H A D | bundle_active_user_service.cpp | 27 database_.InitDatabaseTableInfo(timeStamp); in Init() 28 database_.InitUsageGroupDatabase(APP_GROUP_DATABASE_INDEX, true); in Init() 51 database_.OnPackageUninstalled(userId_, "", 0, 0); in OnUserRemoved() 65 database_.OnPackageUninstalled(userId_, bundleName, uid, appIndex); in DeleteUninstalledBundleStats() 147 database_.RenewTableTime(newTime - oldTime); in RenewTableTime() 246 database_.UpdateBundleUsageData(i, *(currentStats_[i])); in RestoreStats() 249 database_.UpdateEventData(i, *(currentStats_[i])); in RestoreStats() 253 database_.UpdateModuleData(userId_, moduleRecords_, in RestoreStats() 326 database_.LoadModuleData(userId_, moduleRecords_); in LoadModuleAndFormStats() 327 database_.LoadFormData(userId_, moduleRecords_); in LoadModuleAndFormStats() [all …]
|
/ohos5.0/foundation/resourceschedule/device_usage_statistics/services/packagegroup/src/ |
H A D | bundle_active_user_history.cpp | 43 database_.PutDurationData(bootBasedDuration_, ScreenOnDuration_); in WriteDeviceDuration() 54 database_.PutBundleHistoryData(userId, userHistory); in WriteBundleUsage() 60 database_.OnPackageUninstalled(userId, bundleName, uid, appIndex); in OnBundleUninstalled() 68 database_.InitUsageGroupDatabase(APP_GROUP_DATABASE_INDEX, false); in BundleActiveUserHistory() 69 auto bootAndScreenOnDuraton = database_.GetDurationData(); in BundleActiveUserHistory() 123 database_.GetBundleHistoryData(userId); in GetUserHistory() 275 database_.PutDurationData(bootBasedDuration_, ScreenOnDuration_); in UpdateBootBasedAndScreenTime()
|
/ohos5.0/foundation/resourceschedule/device_usage_statistics/services/packageusage/include/ |
H A D | bundle_active_user_service.h | 48 database_.ChangeToDebug(); in BundleActiveUserService() 83 BundleActiveUsageDatabase database_; variable
|
/ohos5.0/base/notification/distributed_notification_service/services/distributed/include/ |
H A D | distributed_preferences.h | 104 std::unique_ptr<DistributedPreferencesDatabase> database_ = nullptr; variable
|
H A D | distributed_notification_manager.h | 170 std::shared_ptr<DistributedDatabase> database_ = nullptr; variable
|
/ohos5.0/foundation/resourceschedule/device_usage_statistics/services/packagegroup/include/ |
H A D | bundle_active_user_history.h | 40 BundleActiveUsageDatabase database_; variable
|
/ohos5.0/base/notification/distributed_notification_service/services/distributed/test/unittest/distributed_notification_manager_branch_test/ |
H A D | distributed_notification_manager_branch_test.cpp | 67 distributedManager_->database_ = nullptr;
|