From 2b5f37449c4e42bc6f6a3c059c83286ff16e2927 Mon Sep 17 00:00:00 2001 From: leiiyb Date: Thu, 7 Mar 2024 10:51:16 +0800 Subject: [PATCH] add local data changed notice Signed-off-by: leiiyb --- .../relational_store/include/relational_store.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index fcd70f2eb..ae54943c0 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -554,6 +554,12 @@ typedef enum Rdb_SubscribeType { * @brief Subscription to cloud data change details. */ RDB_SUBSCRIBE_TYPE_CLOUD_DETAILS, + + /** + * @brief Subscription to local data change details. + * @since 12 + */ + RDB_SUBSCRIBE_TYPE_LOCAL_DETAILS, } Rdb_SubscribeType; /** @@ -613,10 +619,12 @@ typedef struct Rdb_DataObserver { /** * @brief Registers an observer for the database. - * When data in the distributed database changes, the callback will be invoked. + * When data in the distributed database or the local database changes, the callback will be invoked. * * @param store Represents a pointer to an {@link OH_Rdb_Store} instance. * @param type Indicates the subscription type, which is defined in {@link Rdb_SubscribeType}. + * If its value is RDB_SUBSCRIBE_TYPE_LOCAL_DETAILS, the callback will be invoked for data changes + * in the local database. * @param observer The {@link Rdb_DataObserver} of change events in the database. * @return Returns the status code of the execution. See {@link OH_Rdb_ErrCode}. * @see OH_Rdb_Store.