RegionInfoUpdateListener
Listener for changes to the region structure, region states, and region operations.
UI guidance
This listener is designed to drive a UI that shows:
the region hierarchy (e.g., a tree/list)
per-region status and actions (Download / Update / Repair / Delete)
operation progress and completion feedback
The listener provides the following callbacks:
onStructureChanged delivers a snapshot of the current RegionStructure (roots + current region states).
onStatesChanged then reports delta updates for only those Regions whose RegionState changed since the previous call.
onOperationStatusesChanged reports delta updates for operations whose status changed since the previous call.
A typical UI flow:
In onStructureChanged, render the tree from RegionStructure.roots and cache the initial
regionStatesmap.In onStatesChanged, merge the received
stateInfo.regionStatesinto your cached map and update only affected UI items.In onOperationStatusesChanged, update operation progress UI using RegionOperationStatus.Progress and show completion feedback using RegionOperationStatus.Completed.
When deriving actions for a region, use the "UI guidance" section in RegionState.
Functions
Called to provide status changes for active and recently finished RegionOperations.
Called to provide the changed RegionStates.
Called when the region structure changes.