|
JubeatPlus 3.9.11
|
The shared chart-editor data model. More...
#include <EditDataManager.h>


Instance Methods | |
| (instancetype) | - init |
| Initialises an empty manager with copying enabled and no loaded data. | |
| (nullable NSArray< NSString * > *) | - getCustomSequenceDirectoryList |
Returns the names of the per-music custom-sequence directories, or nil if none exist. | |
| (void) | - deleteCustomSequenceDirectory: |
| Deletes the custom-sequence directory for a boxed music identifier. | |
| (BOOL) | - addIgnoreBackUpAttribute: |
| Marks a path so it is excluded from iCloud/iTunes backup. | |
| (nullable NSString *) | - getDirectoryPath: |
| Returns the per-music custom-sequence directory path, creating the tree if needed. | |
| (nullable NSString *) | - createJCFName |
Builds a fresh .jcf file name from the current date and time. | |
| (BOOL) | - deleteJCF: |
Deletes a .jcf file at a path if it exists. | |
| (BOOL) | - loadJCF: |
Loads and decodes a .jcf file into the model. | |
| (BOOL) | - saveJCF: |
Encodes the model and writes it to a .jcf file. | |
| (BOOL) | - createEditDataWithNSData: |
| Stores raw data as the current custom data and decodes it. | |
| (nullable NSMutableData *) | - exeSaveBFEnc: |
| Blowfish-encrypts a copy of a buffer with the save-data key. | |
| (nullable NSMutableData *) | - exeLoadBFDec: |
| Blowfish-decrypts a copy of a buffer with the save-data key. | |
| (nullable NSData *) | - exeBFEnc: |
| The second-layer encrypt hook for downloaded charts. | |
| (nullable NSData *) | - exeBFDec: |
| The second-layer decrypt hook for downloaded charts. | |
| (nullable NSString *) | - createDLString:isDL: |
| Fills an eight-character random tag whose sixth character's low bit records the DL flag. | |
| (BOOL) | - checkDownLoad: |
| Tests whether a tag buffer's DL bit marks a downloaded chart. | |
| (BOOL) | - checkDownloadFile: |
| Tests whether a decrypted blob's DL tag marks a downloaded chart. | |
| (BOOL) | - localSaveDLFile:serial:usrTag: |
| Saves a downloaded chart locally, either loading an existing copy or installing a new one. | |
| (nullable NSMutableDictionary *) | - pickUpEditorInfoFromData: |
| Reads a fixed-size blob into a scratch buffer and picks up its editor info. | |
| (void) | - setCharArray:setData:byte: |
Writes an unsigned value into a buffer as byte little-endian bytes. | |
| (unsigned int) | - getCharArrayValue:byte: |
Reads byte little-endian bytes from a buffer into an unsigned value. | |
| (BOOL) | - validateHash: |
| Recomputes the current custom data's integrity hash and compares it to the stored value. | |
| (void) | - scoreDataReset |
| Resets the score dictionary to its default (no best score, no full combo, zero hashes). | |
| (nullable NSMutableDictionary *) | - pickUpScoreData: |
| Parses the score fields of a packed blob into a new dictionary, resetting on hash failure. | |
| (nullable NSMutableDictionary *) | - pickUpEditorInfo: |
| Parses the editor-info fields of a packed blob into a new dictionary. | |
| (nullable NSMutableDictionary *) | - pickUpEditSimpleData: |
| Parses the simple-data fields (counts, sectors, music bar, notes hash) of a packed blob. | |
| (nullable NSMutableArray< NSNumber * > *) | - pickUpSequenceTable: |
| Parses the 2000-entry note-word table of a packed blob into a boxed array. | |
| (BOOL) | - decodeBinary |
| Decodes the current custom data into the editor-info, score, simple-data, and sequence table models. | |
| (BOOL) | - encodeBinary |
| Encodes the editor-info, score, simple-data, and sequence table models into a packed blob stored as the current custom data. | |
| (nullable NSMutableArray< NSMutableDictionary * > *) | - getFileInfoList: |
Returns the editor-info dictionaries for every .jcf file in a music's directory. | |
| (BOOL) | - isEnableEdit |
| Whether editing is currently enabled (the copy-lock flag is clear). | |
| (void) | - disableEdit |
| Disables editing by setting the copy-lock flag. | |
| (nullable NSMutableDictionary *) | - getScoreData |
| Returns the score dictionary. | |
| (void) | - setScoreData: |
| Replaces the score dictionary with a mutable copy of the given dictionary. | |
| (nullable NSMutableDictionary *) | - getEditorInfo |
| Returns the editor-info dictionary. | |
| (void) | - setEditorInfo: |
| Replaces the editor-info dictionary with a mutable copy of the given dictionary. | |
| (nullable NSMutableDictionary *) | - getEditSimpleData |
| Returns the simple-data dictionary. | |
| (void) | - setEditSimpleData: |
| Replaces the simple-data dictionary with a mutable copy of the given dictionary. | |
| (void) | - clearEditData |
| Clears every loaded model reference. | |
| (void) | - resetEditorInfo |
| Rebuilds the editor-info and score dictionaries from application defaults. | |
| (nullable NSMutableArray< NSNumber * > *) | - getSequenceTable |
| Returns the sequence table. | |
| (void) | - setSequenceTable: |
| Sets the sequence table. | |
| (nullable NSString *) | - getLastEditFileName: |
| Returns the recorded last-edited file name for a music, if it still exists. | |
| (nullable NSString *) | - getLastEditFilePath: |
| Returns the full path of the recorded last-edited file for a music. | |
| (void) | - setLastEditFileName:fileName: |
| Records a file name as the last-edited file for a music. | |
| (BOOL) | - IsExistEditFile: |
| Returns whether a last-edited marker file exists for a music. | |
| (nullable NSString *) | - getScoreHash: |
| Returns the MD5 hash of a score packed as four little-endian bytes. | |
| (BOOL) | - checkScoreHash |
| Returns whether the stored score hash matches the stored best score. | |
| (void) | - scoreUpdate:fullCombo:tuneID: |
| Updates the best score and full-combo flag for a tune and saves the chart. | |
| (nullable NSMutableArray< NSString * > *) | - getMusicIDList |
| Returns the identifiers of every built-in and purchased music, as strings. | |
| (int) | - getMusicNum |
| Returns the count of built-in and purchased music. | |
| (int) | - getEditSlotLimit |
| Returns the number of editable slots: four plus one per forty music. | |
| (nullable NSMutableData *) | - getCurrentCustomData |
| Returns the current encoded custom-data buffer. | |
Class Methods | |
| (instancetype) | + sharedManager |
| Returns the process-wide shared manager, creating it once. | |
Properties | |
| BOOL | bEnableCopy |
| Whether copying the current chart is allowed. | |
| BOOL | bIsDownload |
| Whether the current chart is a downloaded chart. | |
The shared chart-editor data model.
| - (BOOL) addIgnoreBackUpAttribute: | (nullable NSString *) | path |
Marks a path so it is excluded from iCloud/iTunes backup.
The binary body only returns YES ; the attribute call was compiled out.
| path | The file-system path. |
YES always. | - (BOOL) checkDownLoad: | (nullable const char *) | buffer |
Tests whether a tag buffer's DL bit marks a downloaded chart.
| buffer | The tag buffer (the sixth byte's low bit is tested), or nullptr . |
YES if the low bit of buffer[5] is clear. | - (BOOL) checkDownloadFile: | (nullable NSData *) | data |
Tests whether a decrypted blob's DL tag marks a downloaded chart.
| data | The decrypted blob. |
YES if the blob is a downloaded chart. | - (BOOL) checkScoreHash |
Returns whether the stored score hash matches the stored best score.
YES if the score dictionary is self-consistent. | - (void) clearEditData |
Clears every loaded model reference.
| - (NSString *) createDLString: | (char *) | buffer | |
| isDL: | (BOOL) | isDL |
Fills an eight-character random tag whose sixth character's low bit records the DL flag.
| buffer | The eight-byte destination. |
| isDL | YES to mark the tag as downloaded (low bit clear). |
NSString . | - (BOOL) createEditDataWithNSData: | (nullable NSData *) | data |
Stores raw data as the current custom data and decodes it.
| data | The raw edit-data blob. |
YES always. | - (NSString *) createJCFName |
Builds a fresh .jcf file name from the current date and time.
<yyyyMMddHHmmssSSS>.jcf . | - (BOOL) decodeBinary |
Decodes the current custom data into the editor-info, score, simple-data, and sequence table models.
YES if the blob's integrity hash matched and it was decoded. | - (void) deleteCustomSequenceDirectory: | (nullable NSNumber *) | musicID |
Deletes the custom-sequence directory for a boxed music identifier.
| musicID | The music identifier, boxed as an NSNumber . |
| - (BOOL) deleteJCF: | (nullable NSString *) | path |
Deletes a .jcf file at a path if it exists.
| path | The file path, or nil . |
NO if path is nil , YES otherwise. | - (void) disableEdit |
Disables editing by setting the copy-lock flag.
| - (BOOL) encodeBinary |
Encodes the editor-info, score, simple-data, and sequence table models into a packed blob stored as the current custom data.
YES always. | - (nullable NSData *) exeBFDec: | (nullable NSData *) | data |
The second-layer decrypt hook for downloaded charts.
The binary returns its argument unchanged.
| data | The buffer. |
data unchanged. | - (nullable NSData *) exeBFEnc: | (nullable NSData *) | data |
The second-layer encrypt hook for downloaded charts.
The binary returns its argument unchanged.
| data | The buffer. |
data unchanged. | - (nullable NSMutableData *) exeLoadBFDec: | (nullable NSData *) | data |
Blowfish-decrypts a copy of a buffer with the save-data key.
| data | The ciphertext buffer. |
| - (nullable NSMutableData *) exeSaveBFEnc: | (nullable NSData *) | data |
Blowfish-encrypts a copy of a buffer with the save-data key.
| data | The plaintext buffer. |
| - (unsigned int) getCharArrayValue: | (const char *) | buffer | |
| byte: | (int) | byte |
Reads byte little-endian bytes from a buffer into an unsigned value.
| buffer | The source buffer. |
| byte | The number of bytes to read. |
| - (NSMutableData *) getCurrentCustomData |
Returns the current encoded custom-data buffer.
| - (NSArray< NSString * > *) getCustomSequenceDirectoryList |
Returns the names of the per-music custom-sequence directories, or nil if none exist.
edit folder, or nil . | - (NSString *) getDirectoryPath: | (int) | musicID |
Returns the per-music custom-sequence directory path, creating the tree if needed.
The path is <documents>/edit/<%09d> where the last component is the zero-padded nine-digit music identifier. Both the edit folder and the music subfolder are created on demand, and the edit folder is flagged no-backup on creation.
| musicID | The music identifier. |
| - (NSMutableDictionary *) getEditorInfo |
Returns the editor-info dictionary.
| - (NSMutableDictionary *) getEditSimpleData |
Returns the simple-data dictionary.
| - (int) getEditSlotLimit |
Returns the number of editable slots: four plus one per forty music.
| - (NSMutableArray< NSMutableDictionary * > *) getFileInfoList: | (unsigned int) | musicID |
Returns the editor-info dictionaries for every .jcf file in a music's directory.
| musicID | The music identifier. |
fileName . | - (NSString *) getLastEditFileName: | (int) | musicID |
Returns the recorded last-edited file name for a music, if it still exists.
| musicID | The music identifier. |
nil . | - (NSString *) getLastEditFilePath: | (int) | musicID |
Returns the full path of the recorded last-edited file for a music.
| musicID | The music identifier. |
nil . | - (NSMutableArray< NSString * > *) getMusicIDList |
Returns the identifiers of every built-in and purchased music, as strings.
| - (int) getMusicNum |
Returns the count of built-in and purchased music.
| - (NSMutableDictionary *) getScoreData |
Returns the score dictionary.
| - (NSString *) getScoreHash: | (int) | score |
Returns the MD5 hash of a score packed as four little-endian bytes.
| score | The score value. |
| - (NSMutableArray< NSNumber * > *) getSequenceTable |
Returns the sequence table.
| - (instancetype) init |
Initialises an empty manager with copying enabled and no loaded data.
| - (BOOL) isEnableEdit |
Whether editing is currently enabled (the copy-lock flag is clear).
YES if editing is enabled. | - (BOOL) IsExistEditFile: | (int) | musicID |
Returns whether a last-edited marker file exists for a music.
| musicID | The music identifier. |
YES if the marker file exists. | - (BOOL) loadJCF: | (nullable NSString *) | path |
Loads and decodes a .jcf file into the model.
| path | The file path. |
YES if the file was read and decoded successfully. | - (BOOL) localSaveDLFile: | (nullable NSData *) | data | |
| serial: | (nullable NSString *) | serial | |
| usrTag: | (int) | usrTag |
Saves a downloaded chart locally, either loading an existing copy or installing a new one.
| data | The downloaded, still-encoded chart blob. |
| serial | The download sequence identifier string. |
| usrTag | The user tag to record. |
YES on success. | - (nullable NSMutableDictionary *) pickUpEditorInfo: | (nullable const char *) | buffer |
Parses the editor-info fields of a packed blob into a new dictionary.
| buffer | The packed edit-data buffer. |
nil for a nullptr buffer. | - (nullable NSMutableDictionary *) pickUpEditorInfoFromData: | (nullable NSData *) | data |
Reads a fixed-size blob into a scratch buffer and picks up its editor info.
| data | The raw edit-data blob. |
| - (nullable NSMutableDictionary *) pickUpEditSimpleData: | (nullable const char *) | buffer |
Parses the simple-data fields (counts, sectors, music bar, notes hash) of a packed blob.
| buffer | The packed edit-data buffer. |
| - (nullable NSMutableDictionary *) pickUpScoreData: | (nullable const char *) | buffer |
Parses the score fields of a packed blob into a new dictionary, resetting on hash failure.
| buffer | The packed edit-data buffer. |
nil for a nullptr buffer. | - (nullable NSMutableArray< NSNumber * > *) pickUpSequenceTable: | (nullable const char *) | buffer |
Parses the 2000-entry note-word table of a packed blob into a boxed array.
| buffer | The packed edit-data buffer. |
| - (void) resetEditorInfo |
Rebuilds the editor-info and score dictionaries from application defaults.
| - (BOOL) saveJCF: | (nullable NSString *) | path |
Encodes the model and writes it to a .jcf file.
| path | The file path. |
NO if path is nil , YES otherwise. | - (void) scoreDataReset |
Resets the score dictionary to its default (no best score, no full combo, zero hashes).
| - (void) scoreUpdate: | (int) | score | |
| fullCombo: | (BOOL) | fullCombo | |
| tuneID: | (int) | tuneID |
Updates the best score and full-combo flag for a tune and saves the chart.
| score | The new score. |
| fullCombo | Whether the play was a full combo. |
| tuneID | The music identifier whose last-edited chart is updated. |
| - (void) setCharArray: | (char *) | buffer | |
| setData: | (unsigned int) | data | |
| byte: | (int) | byte |
Writes an unsigned value into a buffer as byte little-endian bytes.
| buffer | The destination buffer. |
| data | The value to store. |
| byte | The number of bytes to write. |
| - (void) setEditorInfo: | (nullable NSDictionary *) | editorInfo |
Replaces the editor-info dictionary with a mutable copy of the given dictionary.
| editorInfo | The source dictionary. |
| - (void) setEditSimpleData: | (nullable NSDictionary *) | editSimpleData |
Replaces the simple-data dictionary with a mutable copy of the given dictionary.
| editSimpleData | The source dictionary. |
| - (void) setLastEditFileName: | (int) | musicID | |
| fileName: | (nullable NSString *) | fileName |
Records a file name as the last-edited file for a music.
| musicID | The music identifier. |
| fileName | The file name to record. |
| - (void) setScoreData: | (nullable NSDictionary *) | scoreData |
Replaces the score dictionary with a mutable copy of the given dictionary.
| scoreData | The source dictionary. |
| - (void) setSequenceTable: | (nullable NSMutableArray< NSNumber * > *) | sequenceTable |
Sets the sequence table.
| sequenceTable | The sequence table. |
| + (instancetype) sharedManager |
Returns the process-wide shared manager, creating it once.
| - (BOOL) validateHash: | (nullable NSData *) | data |
Recomputes the current custom data's integrity hash and compares it to the stored value.
| data | Unused; the check reads the current writeData buffer. |
YES if the hashes match.
|
readnonatomicassign |
Whether copying the current chart is allowed.
|
readwritenonatomicassign |
Whether the current chart is a downloaded chart.
The getter is at 0x1ca3d8 and the setter at 0x1ca3e8.