|
JubeatPlus 3.9.11
|
Owns the frame-background catalogue and the enciphered archives that back each frame. More...
#include <TweetResourceManager.h>


Instance Methods | |
| (nullable NSArray< NSDictionary * > *) | - getResourceList |
| The frame-background catalogue, each entry a descriptor dictionary. | |
| (int) | - getInstallApplicationNum |
| The cached install-application count, seeded from the reward store at init. | |
| (void) | - setInstallApplicationNum: |
| Sets the cached install-application count. | |
Class Methods | |
| (instancetype) | + sharedManager |
| The shared instance, built once. | |
| (NSString *) | + getAppendResourcePath |
| The path of the append-data directory, creating it and its parents on demand. | |
| (NSString *) | + getFrameDirectoryPath: |
| The directory that holds one frame's archive, creating it on demand. | |
| (nullable NSString *) | + getFrameFilePath: |
The path of one frame's twitterResources.zip archive when it exists on disk. | |
| (BOOL) | + checkResourceName:dirName: |
| Verifies that a frame archive names the expected directory. | |
| (BOOL) | + checkMD5: |
| Verifies a frame archive against its trailing MD5 digest. | |
| (nullable KUnzip *) | + getResourceData: |
| Opens a frame's archive, falling back to the default frame when it is missing or corrupt. | |
| (BOOL) | + checkResourceData |
| Verifies every catalogued background frame's archive, deleting any that fails. | |
| (void) | + removeResourceData: |
| Deletes a frame's stored archive. | |
| (BOOL) | + moveResourceDataInDoc |
| Copies each bundled background-frame archive into the append-data layout. | |
| (BOOL) | + checkEnableSelecteFrame: |
| Reports whether a persisted frame selection is currently unlocked. | |
Owns the frame-background catalogue and the enciphered archives that back each frame.
| + (BOOL) checkEnableSelecteFrame: | (nullable NSString *) | frameName |
Reports whether a persisted frame selection is currently unlocked.
Finds the background frame whose fileName equals frameName and reports it enabled when it is unconditionally free (termType zero) or unlocked by the install count reaching the frame's threshold (termType one).
| frameName | The persisted frame selection's directory name. |
YES when the frame exists and is unlocked, NO otherwise. | + (BOOL) checkMD5: | (nullable NSData *) | data |
Verifies a frame archive against its trailing MD5 digest.
The last sixteen bytes are the expected digest; the MD5 is taken over everything before them.
| data | The archive bytes, digest included. |
YES when the digest matches and data is longer than the digest, NO otherwise. | + (BOOL) checkResourceData |
Verifies every catalogued background frame's archive, deleting any that fails.
Walks the frames whose itemType is zero, and for each confirms the archive is present, its MD5 digest matches, and its stored directory name is correct; a failing archive is removed.
YES when every frame's archive is present and valid, NO otherwise. | + (BOOL) checkResourceName: | (NSData *) | data | |
| dirName: | (NSString *) | dirName |
Verifies that a frame archive names the expected directory.
Opens data as an archive (stripping its trailing sixteen-byte digest), reads the twitterResources/filename.txt entry, and compares its UTF-8 contents to dirName.
| data | The archive bytes, digest included. |
| dirName | The expected frame directory name. |
YES when the archive's stored name matches dirName, NO otherwise. | + (NSString *) getAppendResourcePath |
The path of the append-data directory, creating it and its parents on demand.
The directory is <Library>/Private Documents/appendData ; the method creates the library directory, the Private Documents directory, and the appendData directory in turn when any is absent.
appendData directory path. | + (NSString *) getFrameDirectoryPath: | (NSString *) | frameName |
The directory that holds one frame's archive, creating it on demand.
| frameName | The frame's directory name (its fileName catalogue value). |
| + (NSString *) getFrameFilePath: | (NSString *) | frameName |
The path of one frame's twitterResources.zip archive when it exists on disk.
| frameName | The frame's directory name. |
| - (int) getInstallApplicationNum |
The cached install-application count, seeded from the reward store at init.
| + (KUnzip *) getResourceData: | (NSString *) | frameName |
Opens a frame's archive, falling back to the default frame when it is missing or corrupt.
Loads frameName 's archive, verifies its digest, and returns it as an archive reader with the trailing digest stripped. When that fails it retries with the default frame. The bytes still need deciphering by the caller.
| frameName | The requested frame's directory name. |
| - (NSArray< NSDictionary * > *) getResourceList |
The frame-background catalogue, each entry a descriptor dictionary.
| + (BOOL) moveResourceDataInDoc |
Copies each bundled background-frame archive into the append-data layout.
For every frame whose itemType is zero, copies twitterResources.zip out of the app bundle's appendData/<frameName> directory into the frame's on-disk directory, replacing any existing copy.
NO ; the binary discards the per-frame copy results and returns a fixed value. | + (void) removeResourceData: | (NSString *) | frameName |
Deletes a frame's stored archive.
| frameName | The frame's directory name. |
| - (void) setInstallApplicationNum: | (int) | installApplicationNum |
Sets the cached install-application count.
| installApplicationNum | The new count. |
| + (instancetype) sharedManager |
The shared instance, built once.