|
JubeatPlus 3.9.11
|
Owns the marker assets and their on-disc layout. More...
#include <MarkerManager.h>


Instance Methods | |
| (instancetype) | - initWithDelegate: |
| Initialises the manager with a delegate. | |
| (void) | - setDownloadList: |
Replaces the download list with a mutable copy of list. | |
Class Methods | |
| (int) | + getReservedMarkerSize |
| The reserved marker index boundary. | |
| (int) | + getDefaultMarkerSize |
| The number of markers in the default list. | |
| (int) | + getMarkerIndex: |
| The position of a marker within the current (installed) list. | |
| (nullable NSMutableArray< NSDictionary< NSString *, NSString * > * > *) | + getMarkerList |
| The full persisted marker list, deciphered and unarchived. | |
| (void) | + setMarkerList: |
Archives, enciphers, and persists list. | |
| (nullable NSMutableArray< NSDictionary< NSString *, NSString * > * > *) | + getCurrentMarkerList |
The installed markers, excluding those whose version is still 0.0.0. | |
| (nullable NSDictionary< NSString *, NSString * > *) | + getMarkerInfo: |
The marker at index within the current (installed) list. | |
| (void) | + setMarkerInfo: |
| Inserts or replaces a marker in the list, keeping it ordered by identifier. | |
| (BOOL) | + checkMarkerBannerData: |
| Whether a marker's banner data is present. | |
| (BOOL) | + checkMarkerData: |
| Whether a marker's data is present on disc and passes its MD5 trailer check. | |
| (void) | + setIgnoreSave: |
| Excludes a file URL from iCloud backup. | |
| (void) | + pullOutMarkerBanner:bannerID: |
| Extracts a banner image from a downloaded marker archive, or copies the bundled banner. | |
| (void) | + saveMarker:markerID: |
| Writes downloaded marker data to its installed path and excludes it from backup. | |
| (void) | + copyMarkerItem:isBanner: |
| Copies a bundled marker or banner resource into the installed marker directory. | |
| (void) | + copyMarker: |
| Copies a bundled marker ZIP into the installed marker directory. | |
| (void) | + copyMarkerBanner: |
| Copies a bundled banner PNG into the installed banner directory. | |
| (void) | + markerMove:bannerID: |
| Copies both a bundled marker and its banner into place. | |
| (nullable NSString *) | + getMarkerDirectoryPath |
| The installed marker directory, creating it (and the private documents parent) as needed. | |
| (nullable NSString *) | + getMarkerPath: |
| The installed path of a marker's ZIP data. | |
| (nullable NSString *) | + getMarkerBannerPath: |
| The installed path of a marker's banner PNG. | |
| (BOOL) | + createDefaultMarkerList |
| Builds and persists the built-in default marker list. | |
| (BOOL) | + convertMarkerList |
| Migrates a legacy marker-version list into the current list format. | |
| (BOOL) | + checkRegularMarkerData |
| Validates the installed marker list, rebuilding it from defaults when it is missing. | |
| (BOOL) | + enableMarkerSelect |
| Whether marker selection may be enabled. | |
| (BOOL) | + moveMarkerDataInDoc |
| Copies the built-in current marker into the Documents marker directory. | |
Owns the marker assets and their on-disc layout.
| + (BOOL) checkMarkerBannerData: | (nullable NSString *) | name |
Whether a marker's banner data is present.
| name | The marker's data name. |
| + (BOOL) checkMarkerData: | (nullable NSString *) | name |
Whether a marker's data is present on disc and passes its MD5 trailer check.
| name | The marker's data name. |
| + (BOOL) checkRegularMarkerData |
Validates the installed marker list, rebuilding it from defaults when it is missing.
Ensures the marker and banner directories exist, resets a marker's version to 0.0.0 when its data is missing, extracts every banner, and persists the result.
| + (BOOL) convertMarkerList |
Migrates a legacy marker-version list into the current list format.
| + (void) copyMarker: | (nullable NSString *) | name |
Copies a bundled marker ZIP into the installed marker directory.
| name | The bundled marker's base name. |
| + (void) copyMarkerBanner: | (nullable NSString *) | name |
Copies a bundled banner PNG into the installed banner directory.
| name | The bundled banner's base name. |
| + (void) copyMarkerItem: | (nullable NSString *) | name | |
| isBanner: | (BOOL) | isBanner |
Copies a bundled marker or banner resource into the installed marker directory.
| name | The bundled resource's base name. |
| isBanner | YES to copy a banner PNG into the banner subdirectory; NO for a marker ZIP. |
| + (BOOL) createDefaultMarkerList |
Builds and persists the built-in default marker list.
Clears the stored list, adds a marker for each of the 35 default entries, marks entry 26 as the initial (1.0.0) marker, and records it as the current marker.
| + (BOOL) enableMarkerSelect |
Whether marker selection may be enabled.
| + (NSMutableArray< NSDictionary< NSString *, NSString * > * > *) getCurrentMarkerList |
The installed markers, excluding those whose version is still 0.0.0.
| + (int) getDefaultMarkerSize |
The number of markers in the default list.
| + (nullable NSString *) getMarkerBannerPath: | (nullable NSString *) | name |
The installed path of a marker's banner PNG.
| name | The banner's base name. |
<markerDir>/banner/<name>.png path. | + (NSString *) getMarkerDirectoryPath |
The installed marker directory, creating it (and the private documents parent) as needed.
Library/Private\ Documents/marker path. | + (int) getMarkerIndex: | (nullable NSString *) | markerID |
The position of a marker within the current (installed) list.
| markerID | The marker's identifier, as stored under the markerID key. |
| + (NSDictionary< NSString *, NSString * > *) getMarkerInfo: | (int) | index |
The marker at index within the current (installed) list.
| index | The zero-based index. |
| + (NSMutableArray< NSDictionary< NSString *, NSString * > * > *) getMarkerList |
The full persisted marker list, deciphered and unarchived.
| + (nullable NSString *) getMarkerPath: | (nullable NSString *) | name |
The installed path of a marker's ZIP data.
| name | The marker's base name. |
<markerDir>/<name>.zip path. | + (int) getReservedMarkerSize |
The reserved marker index boundary.
| - (instancetype) initWithDelegate: | (nullable id) | delegate |
Initialises the manager with a delegate.
Stores delegate weakly and resets the current slot to zero.
| delegate | The object told about marker events; held weakly. |
| + (void) markerMove: | (nullable NSString *) | markerID | |
| bannerID: | (nullable NSString *) | bannerID |
Copies both a bundled marker and its banner into place.
| markerID | The bundled marker's base name. |
| bannerID | The bundled banner's base name. |
| + (BOOL) moveMarkerDataInDoc |
Copies the built-in current marker into the Documents marker directory.
| + (void) pullOutMarkerBanner: | (nullable NSString *) | path | |
| bannerID: | (nullable NSString *) | bannerID |
Extracts a banner image from a downloaded marker archive, or copies the bundled banner.
When the archive at path contains banner.png it is uncompressed and written to the banner path; otherwise the bundled banner for bannerID is copied.
| path | The downloaded marker archive path. |
| bannerID | The banner's identifier. |
| + (void) saveMarker: | (nullable NSData *) | data | |
| markerID: | (nullable NSString *) | markerID |
Writes downloaded marker data to its installed path and excludes it from backup.
| data | The marker's file data. |
| markerID | The marker's identifier. |
| - (void) setDownloadList: | (nullable NSArray *) | list |
Replaces the download list with a mutable copy of list.
Resets the current slot to zero.
| list | The markers queued for download. |
| + (void) setIgnoreSave: | (nullable NSURL *) | url |
Excludes a file URL from iCloud backup.
| url | The file URL to flag. |
| + (void) setMarkerInfo: | (nullable NSDictionary< NSString *, NSString * > *) | info |
Inserts or replaces a marker in the list, keeping it ordered by identifier.
Replaces an existing entry with the same markerID; otherwise inserts info before the first marker with a greater numeric identifier, or appends it. Persists the result.
| info | The marker's info dictionary. |
| + (void) setMarkerList: | (nullable NSArray< NSDictionary< NSString *, NSString * > * > *) | list |
Archives, enciphers, and persists list.
| list | The marker list to store. |