20#import <Foundation/Foundation.h>
22NS_ASSUME_NONNULL_BEGIN
43#pragma mark - Custom sequence directory tree
57- (void)deleteCustomSequenceDirectory:(nullable NSNumber *)musicID;
66- (BOOL)addIgnoreBackUpAttribute:(nullable NSString *)path;
79- (nullable NSString *)getDirectoryPath:(
int)musicID;
94- (BOOL)deleteJCF:(nullable NSString *)path;
102- (BOOL)loadJCF:(nullable NSString *)path;
110- (BOOL)saveJCF:(nullable NSString *)path;
112#pragma mark - Blowfish encode/decode
120- (BOOL)createEditDataWithNSData:(nullable NSData *)data;
128- (nullable NSMutableData *)exeSaveBFEnc:(nullable NSData *)data;
136- (nullable NSMutableData *)exeLoadBFDec:(nullable NSData *)data;
145- (nullable NSData *)exeBFEnc:(nullable NSData *)data;
154- (nullable NSData *)exeBFDec:(nullable NSData *)data;
156#pragma mark - Download tagging
165- (nullable NSString *)createDLString:(
char *)buffer isDL:(BOOL)isDL;
173- (BOOL)checkDownLoad:(nullable const
char *)buffer;
181- (BOOL)checkDownloadFile:(nullable NSData *)data;
191- (BOOL)localSaveDLFile:(nullable NSData *)data
192 serial:(nullable NSString *)serial
195#pragma mark - Packed binary format helpers
203- (nullable NSMutableDictionary *)pickUpEditorInfoFromData:(nullable NSData *)data;
212- (void)setCharArray:(
char *)buffer setData:(
unsigned int)data byte:(
int)byte;
221- (
unsigned int)getCharArrayValue:(const
char *)buffer byte:(
int)byte;
229- (BOOL)validateHash:(nullable NSData *)data;
231#pragma mark - Score data
245- (nullable NSMutableDictionary *)pickUpScoreData:(nullable const
char *)buffer;
253- (nullable NSMutableDictionary *)pickUpEditorInfo:(nullable const
char *)buffer;
261- (nullable NSMutableDictionary *)pickUpEditSimpleData:(nullable const
char *)buffer;
269- (nullable NSMutableArray<NSNumber *> *)pickUpSequenceTable:(nullable const
char *)buffer;
293- (nullable NSMutableArray<NSMutableDictionary *> *)getFileInfoList:(
unsigned int)musicID;
295#pragma mark - Edit state
322- (void)setScoreData:(nullable NSDictionary *)scoreData;
336- (void)setEditorInfo:(nullable NSDictionary *)editorInfo;
350- (void)setEditSimpleData:(nullable NSDictionary *)editSimpleData;
376- (void)setSequenceTable:(nullable NSMutableArray<NSNumber *> *)sequenceTable;
378#pragma mark - Last-edited file
386- (nullable NSString *)getLastEditFileName:(
int)musicID;
394- (nullable NSString *)getLastEditFilePath:(
int)musicID;
402- (void)setLastEditFileName:(
int)musicID fileName:(nullable NSString *)fileName;
410- (BOOL)IsExistEditFile:(
int)musicID;
412#pragma mark - Score hashing and update
420- (nullable NSString *)getScoreHash:(
int)score;
436- (void)scoreUpdate:(
int)score fullCombo:(BOOL)fullCombo tuneID:(
int)tuneID;
438#pragma mark - Music catalogue
The shared chart-editor data model.
Definition EditDataManager.h:28
void disableEdit()
Disables editing by setting the copy-lock flag.
Definition EditDataManager.m:648
int getMusicNum()
Returns the count of built-in and purchased music.
Definition EditDataManager.m:828
nullable NSMutableArray< NSString * > * getMusicIDList()
Returns the identifiers of every built-in and purchased music, as strings.
Definition EditDataManager.m:812
nullable NSMutableDictionary * getEditSimpleData()
Returns the simple-data dictionary.
Definition EditDataManager.m:670
void resetEditorInfo()
Rebuilds the editor-info and score dictionaries from application defaults.
Definition EditDataManager.m:687
instancetype init()
Initialises an empty manager with copying enabled and no loaded data.
Definition EditDataManager.m:113
int getEditSlotLimit()
Returns the number of editable slots: four plus one per forty music.
Definition EditDataManager.m:838
nullable NSMutableArray< NSNumber * > * getSequenceTable()
Returns the sequence table.
Definition EditDataManager.m:713
BOOL encodeBinary()
Encodes the editor-info, score, simple-data, and sequence table models into a packed blob stored as t...
Definition EditDataManager.m:520
void scoreDataReset()
Resets the score dictionary to its default (no best score, no full combo, zero hashes).
Definition EditDataManager.m:366
nullable NSString * createJCFName()
Builds a fresh .jcf file name from the current date and time.
Definition EditDataManager.m:174
BOOL bIsDownload
Whether the current chart is a downloaded chart.
Definition EditDataManager.h:481
BOOL bEnableCopy
Whether copying the current chart is allowed.
Definition EditDataManager.h:474
BOOL isEnableEdit()
Whether editing is currently enabled (the copy-lock flag is clear).
Definition EditDataManager.m:644
nullable NSMutableDictionary * getScoreData()
Returns the score dictionary.
Definition EditDataManager.m:652
instancetype sharedManager()
Returns the process-wide shared manager, creating it once.
Definition EditDataManager.m:103
void clearEditData()
Clears every loaded model reference.
Definition EditDataManager.m:679
nullable NSArray< NSString * > * getCustomSequenceDirectoryList()
Returns the names of the per-music custom-sequence directories, or nil if none exist.
Definition EditDataManager.m:129
nullable NSMutableDictionary * getEditorInfo()
Returns the editor-info dictionary.
Definition EditDataManager.m:661
nullable NSMutableData * getCurrentCustomData()
Returns the current encoded custom-data buffer.
Definition EditDataManager.m:842
BOOL decodeBinary()
Decodes the current custom data into the editor-info, score, simple-data, and sequence table models.
Definition EditDataManager.m:481
BOOL checkScoreHash()
Returns whether the stored score hash matches the stored best score.
Definition EditDataManager.m:783