JubeatPlus 3.9.11
Loading...
Searching...
No Matches
MarkerManager Class Reference

Owns the marker assets and their on-disc layout. More...

#include <MarkerManager.h>

Inheritance diagram for MarkerManager:
Collaboration diagram for MarkerManager:

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.

Detailed Description

Owns the marker assets and their on-disc layout.

Method Documentation

◆ checkMarkerBannerData:

+ (BOOL) checkMarkerBannerData: (nullable NSString *) name

Whether a marker's banner data is present.

Parameters
nameThe marker's data name.
Returns
Always YES.
Ghidra address:
0x1b7ef8

◆ checkMarkerData:

+ (BOOL) checkMarkerData: (nullable NSString *) name

Whether a marker's data is present on disc and passes its MD5 trailer check.

Parameters
nameThe marker's data name.
Returns
YES when the file exists and its trailing digest validates.
Ghidra address:
0x1b7f00

◆ checkRegularMarkerData

+ (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.

Returns
YES on success, NO when no list could be produced.
Ghidra address:
0x1b8fe0
Ghidra address:
0x1b8fe0

◆ convertMarkerList

+ (BOOL) convertMarkerList

Migrates a legacy marker-version list into the current list format.

Returns
YES when every default marker's data was found, NO otherwise.
Ghidra address:
0x1b8c68
Ghidra address:
0x1b8c68

◆ copyMarker:

+ (void) copyMarker: (nullable NSString *) name

Copies a bundled marker ZIP into the installed marker directory.

Parameters
nameThe bundled marker's base name.
Ghidra address:
0x1b8634

◆ copyMarkerBanner:

+ (void) copyMarkerBanner: (nullable NSString *) name

Copies a bundled banner PNG into the installed banner directory.

Parameters
nameThe bundled banner's base name.
Ghidra address:
0x1b8644

◆ copyMarkerItem:isBanner:

+ (void) copyMarkerItem: (nullable NSString *) name
isBanner: (BOOL) isBanner 

Copies a bundled marker or banner resource into the installed marker directory.

Parameters
nameThe bundled resource's base name.
isBannerYES to copy a banner PNG into the banner subdirectory; NO for a marker ZIP.
Ghidra address:
0x1b8378

◆ createDefaultMarkerList

+ (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.

Returns
Always YES.
Ghidra address:
0x1b8a04
Ghidra address:
0x1b8a04

◆ enableMarkerSelect

+ (BOOL) enableMarkerSelect

Whether marker selection may be enabled.

Returns
NO when an uninstalled marker has a reserved (sub-1000) identifier, YES otherwise.
Ghidra address:
0x1b94ec
Ghidra address:
0x1b94ec

◆ getCurrentMarkerList

+ (NSMutableArray< NSDictionary< NSString *, NSString * > * > *) getCurrentMarkerList

The installed markers, excluding those whose version is still 0.0.0.

Returns
A freshly built array of the installed markers.
Ghidra address:
0x1b7a04
Ghidra address:
0x1b7a04

◆ getDefaultMarkerSize

+ (int) getDefaultMarkerSize

The number of markers in the default list.

Returns
The constant 35.
Ghidra address:
0x1b75b0
Ghidra address:
0x1b75b0

◆ getMarkerBannerPath:

+ (nullable NSString *) getMarkerBannerPath: (nullable NSString *) name

The installed path of a marker's banner PNG.

Parameters
nameThe banner's base name.
Returns
The <markerDir>/banner/<name>.png path.
Ghidra address:
0x1b8910

◆ getMarkerDirectoryPath

+ (NSString *) getMarkerDirectoryPath

The installed marker directory, creating it (and the private documents parent) as needed.

Returns
The Library/Private\ Documents/marker path.
Ghidra address:
0x1b86d0
Ghidra address:
0x1b86d0

◆ getMarkerIndex:

+ (int) getMarkerIndex: (nullable NSString *) markerID

The position of a marker within the current (installed) list.

Parameters
markerIDThe marker's identifier, as stored under the markerID key.
Returns
The zero-based index of the first match, or zero when absent.
Ghidra address:
0x1b75b8

◆ getMarkerInfo:

+ (NSDictionary< NSString *, NSString * > *) getMarkerInfo: (int) index

The marker at index within the current (installed) list.

Parameters
indexThe zero-based index.
Returns
The marker's info dictionary.
Ghidra address:
0x1b7bb8
Ghidra address:
0x1b7bb8

◆ getMarkerList

+ (NSMutableArray< NSDictionary< NSString *, NSString * > * > *) getMarkerList

The full persisted marker list, deciphered and unarchived.

Returns
The marker list, or nil when nothing is stored.
Ghidra address:
0x1b775c
Ghidra address:
0x1b775c

◆ getMarkerPath:

+ (nullable NSString *) getMarkerPath: (nullable NSString *) name

The installed path of a marker's ZIP data.

Parameters
nameThe marker's base name.
Returns
The <markerDir>/<name>.zip path.
Ghidra address:
0x1b884c

◆ getReservedMarkerSize

+ (int) getReservedMarkerSize

The reserved marker index boundary.

Returns
The constant 1000.
Ghidra address:
0x1b75a8
Ghidra address:
0x1b75a8

◆ initWithDelegate:

- (instancetype) initWithDelegate: (nullable id) delegate

Initialises the manager with a delegate.

Stores delegate weakly and resets the current slot to zero.

Parameters
delegateThe object told about marker events; held weakly.
Returns
The initialised instance, or nil.
Ghidra address:
0x1b749c

◆ markerMove:bannerID:

+ (void) markerMove: (nullable NSString *) markerID
bannerID: (nullable NSString *) bannerID 

Copies both a bundled marker and its banner into place.

Parameters
markerIDThe bundled marker's base name.
bannerIDThe bundled banner's base name.
Ghidra address:
0x1b8654

◆ moveMarkerDataInDoc

+ (BOOL) moveMarkerDataInDoc

Copies the built-in current marker into the Documents marker directory.

Returns
Always YES.
Ghidra address:
0x1b96f4
Ghidra address:
0x1b96f4

◆ pullOutMarkerBanner:bannerID:

+ (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.

Parameters
pathThe downloaded marker archive path.
bannerIDThe banner's identifier.
Ghidra address:
0x1b8144

◆ saveMarker:markerID:

+ (void) saveMarker: (nullable NSData *) data
markerID: (nullable NSString *) markerID 

Writes downloaded marker data to its installed path and excludes it from backup.

Parameters
dataThe marker's file data.
markerIDThe marker's identifier.
Ghidra address:
0x1b82ac

◆ setDownloadList:

- (void) setDownloadList: (nullable NSArray *) list

Replaces the download list with a mutable copy of list.

Resets the current slot to zero.

Parameters
listThe markers queued for download.
Ghidra address:
0x1b7520

◆ setIgnoreSave:

+ (void) setIgnoreSave: (nullable NSURL *) url

Excludes a file URL from iCloud backup.

Parameters
urlThe file URL to flag.
Ghidra address:
0x1b80a8

◆ setMarkerInfo:

+ (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.

Parameters
infoThe marker's info dictionary.
Ghidra address:
0x1b7c1c

◆ setMarkerList:

+ (void) setMarkerList: (nullable NSArray< NSDictionary< NSString *, NSString * > * > *) list

Archives, enciphers, and persists list.

Parameters
listThe marker list to store.
Ghidra address:
0x1b78b4

The documentation for this class was generated from the following files: