harmony 鸿蒙Distributed Data Management Subsystem Changelog
Distributed Data Management Subsystem Changelog
cl.distributeddatamgr.1 OH_Rdb_CloudSync Parameter Change
Access Level
Public
Reason for Change
After the change, the callback also returns the context.
Change Impact
This change is a non-compatible change. You need to modify the parameters in OH_Rdb_CloudSync.
API level
11
Change Since
OpenHarmony SDK 4.1.6.5
Key API/Component Changes
Before the change:
int OH_Rdb_CloudSync(OH_Rdb_Store *store, Rdb_SyncMode mode, const char *tables[], uint32_t count,
Rdb_SyncCallback *callback);
After the change:
int OH_Rdb_CloudSync(OH_Rdb_Store *store, Rdb_SyncMode mode, const char *tables[], uint32_t count,
const Rdb_ProgressObserver *observer);
Adaptation Guide
You need to add a parameter of the Rdb_ProgressObserver type. The newly added parameter includes the original callback field and a context field.
// Define the callback.
void CloudSyncObserverCallback(void *context, Rdb_ProgressDetails *progressDetails)
{
// Do something.
}
const Rdb_ProgressObserver observer = { .context = nullptr, .callback = CloudSyncObserverCallback };
OH_Rdb_CloudSync(storeTestRdbStore_, Rdb_SyncMode::SYNC_MODE_TIME_FIRST, table, TABLE_COUNT, &observer);
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Ability Subsystem Changelog
harmony 鸿蒙ArkCompiler Subsystem Changelog
harmony 鸿蒙ArkUI Subsystem Changelog
harmony 鸿蒙ArkWeb Subsystem Changelog
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦