Interface for managing ASAP index file operations. More...
#include <itable_callbacks.h>
Inheritance diagram for ITableCallbacks:
Collaboration diagram for ITableCallbacks:Public Member Functions | |
| virtual bool | load (const Settings &settings, std::vector< TableData > &tables, LoadingProgress *progress=nullptr)=0 |
| Loads table data from the ASAP index file. | |
| virtual bool | save (const Settings &settings, const std::vector< TableData > &tables, LoadingProgress *progress=nullptr)=0 |
| Saves table data to the ASAP index file. | |
| virtual std::vector< TableData > | mergeTables (const Settings &settings, const std::vector< TableData > &newTables, LoadingProgress *progress=nullptr)=0 |
| Merges new table data with existing index data. | |
Interface for managing ASAP index file operations.
Defines methods for loading, saving, and merging table data, supporting progress tracking and configuration via Settings. Implementers handle JSON serialization and file I/O.
|
pure virtual |
Loads table data from the ASAP index file.
Reads and parses asapcab_index.json from the specified settings.indexPath, populating the tables vector with TableData objects. Supports progress tracking.
| settings | The application settings containing the index file path. |
| tables | Reference to the vector to store the loaded table data. |
| progress | Optional pointer to LoadingProgress for real-time updates. |
Implemented in AsapIndexManager.
|
pure virtual |
Merges new table data with existing index data.
Compares new table data with existing index entries, updating tables with higher-quality metadata (based on jsonOwner priority), adding new tables, and removing deleted ones. Preserves user fields like playCount. Returns the merged table data.
| settings | The application settings containing the index file path. |
| newTables | The new table data to merge. |
| progress | Optional pointer to LoadingProgress for real-time updates. |
Implemented in AsapIndexManager.
|
pure virtual |
Saves table data to the ASAP index file.
Serializes the provided tables vector into a JSON array and writes it to asapcab_index.json at settings.indexPath. Supports progress tracking.
| settings | The application settings containing the index file path. |
| tables | The vector of TableData to save. |
| progress | Optional pointer to LoadingProgress for real-time updates. |
Implemented in AsapIndexManager.
Here is the caller graph for this function: