pub async unsafe fn pull_changes(
db: *mut sqlite3,
storage: &dyn SyncStorage,
our_device_id: &str,
cursors: &HashMap<String, u64>,
library_dir: &LibraryDir,
blob_plan: &dyn BlobPlan,
) -> Result<(HashMap<String, u64>, PullResult), PullError>Expand description
Pull and apply all new changesets from the sync storage.
db is a raw sqlite3 connection pointer. The caller MUST ensure no
SyncSession is active – the protocol requires ending the session before
pulling to avoid contaminating the next outgoing changeset.
cursors maps device_id -> last_seq we’ve applied from that device.
Returns the updated cursors map and a summary of what was applied.
§Safety
db must be a valid, open sqlite3 connection pointer.