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:

A typical UI flow:

  1. In onStructureChanged, render the tree from RegionStructure.roots and cache the initial regionStates map.

  2. In onStatesChanged, merge the received stateInfo.regionStates into your cached map and update only affected UI items.

  3. 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

Link copied to clipboard

Called to provide status changes for active and recently finished RegionOperations.

Link copied to clipboard
open fun onStatesChanged(stateInfo: RegionStateInfo)

Called to provide the changed RegionStates.

Link copied to clipboard
abstract fun onStructureChanged(structureResult: Result<RegionStructure, MapUpdateError>)

Called when the region structure changes.