From 40bfd4301fa6ee935285c3bcc22c8fec9661f2f3 Mon Sep 17 00:00:00 2001 From: changjiaxing Date: Mon, 12 May 2025 19:45:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E9=98=85=E6=8E=A5=E5=8F=A3=E8=A3=B8?= =?UTF-8?q?=E6=8C=87=E9=92=88=E6=94=B9=E6=99=BA=E8=83=BD=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: changjiaxing Change-Id: I05fa64460d604833f23154af54a1d082e88b61de --- .../distributeddataservice/service/rdb/rdb_service_impl.cpp | 4 ++-- .../distributeddataservice/service/rdb/rdb_service_impl.h | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/services/distributeddataservice/service/rdb/rdb_service_impl.cpp b/services/distributeddataservice/service/rdb/rdb_service_impl.cpp index b2d0164d1..f94089cd6 100644 --- a/services/distributeddataservice/service/rdb/rdb_service_impl.cpp +++ b/services/distributeddataservice/service/rdb/rdb_service_impl.cpp @@ -609,7 +609,7 @@ void RdbServiceImpl::DoCloudSync(const RdbSyncerParam ¶m, const RdbService:: } int32_t RdbServiceImpl::Subscribe(const RdbSyncerParam ¶m, const SubscribeOption &option, - RdbStoreObserver *observer) + std::shared_ptr observer) { if (option.mode < 0 || option.mode >= SUBSCRIBE_MODE_MAX) { ZLOGE("mode:%{public}d error", option.mode); @@ -639,7 +639,7 @@ int32_t RdbServiceImpl::Subscribe(const RdbSyncerParam ¶m, const SubscribeOp } int32_t RdbServiceImpl::UnSubscribe(const RdbSyncerParam ¶m, const SubscribeOption &option, - RdbStoreObserver *observer) + std::shared_ptr observer) { if (option.mode < 0 || option.mode >= SUBSCRIBE_MODE_MAX) { ZLOGE("mode:%{public}d error", option.mode); diff --git a/services/distributeddataservice/service/rdb/rdb_service_impl.h b/services/distributeddataservice/service/rdb/rdb_service_impl.h index e58c6618f..47da7793f 100755 --- a/services/distributeddataservice/service/rdb/rdb_service_impl.h +++ b/services/distributeddataservice/service/rdb/rdb_service_impl.h @@ -66,10 +66,12 @@ public: int32_t Sync(const RdbSyncerParam ¶m, const Option &option, const PredicatesMemo &predicates, const AsyncDetail &async) override; - int32_t Subscribe(const RdbSyncerParam ¶m, const SubscribeOption &option, RdbStoreObserver *observer) override; + int32_t Subscribe(const RdbSyncerParam ¶m, + const SubscribeOption &option, + std::shared_ptr observer) override; int32_t UnSubscribe(const RdbSyncerParam ¶m, const SubscribeOption &option, - RdbStoreObserver *observer) override; + std::shared_ptrobserver) override; int32_t RegisterAutoSyncCallback(const RdbSyncerParam& param, std::shared_ptr observer) override; -- Gitee