MIKMIDIMappingManagerDelegate
Objective-C
@protocol MIKMIDIMappingManagerDelegate <NSObject>
/**
* Used to determine the file name for a user mapping. This file name does *not* include the
* file extension, which will be added by the caller.
*
* If this method is not implemented, or returns nil, the mapping's name itself will be used.
*
* @param manager The MIKMIDIMappingManager asking for the name.
* @param mapping The mapping a file name is needed for.
*
* @return A file name for the mapping.
*/
- (nullable NSString *)mappingManager:(MIKMIDIMappingManager *)manager fileNameForMapping:(MIKMIDIMapping *)mapping;
/**
* When deleting user mappings, this method is called as a way to provide any additional
* file names that the mapping may have had in past versions of -fileNameForMapping:
*
* If you have changed the naming scheme that -fileNameForMapping: uses in any user-reaching
* code, you will probably want to implement this method as well, so users will be able to
* properly delete mappings with the old naming scheme.
*
* Just as with -fileNameForMapping:, the file names should *not* include the file extension.
*
* @param manager The MIKMIDIMappingManager asking for legacy names.
* @param mapping The mapping to return legacy file names for.
*
* @return An array of legacy file names, or nil.
*/
- (nullable MIKArrayOf(NSString *) *)mappingManager:(MIKMIDIMappingManager *)manager legacyFileNamesForUserMapping:(MIKMIDIMapping *)mapping;
@end
Swift
protocol MIKMIDIMappingManagerDelegate : NSObjectProtocol
This is currently undocumented. Documentation contributions are always welcome!
-
Used to determine the file name for a user mapping. This file name does not include the file extension, which will be added by the caller.
If this method is not implemented, or returns nil, the mapping’s name itself will be used.
Declaration
Objective-C
- (nullable NSString *)mappingManager:(nonnull MIKMIDIMappingManager *)manager fileNameForMapping:(nonnull MIKMIDIMapping *)mapping;
Swift
func mappingManager(_ manager: MIKMIDIMappingManager, fileNameFor mapping: MIKMIDIMapping) -> String?
Parameters
manager
The MIKMIDIMappingManager asking for the name.
mapping
The mapping a file name is needed for.
Return Value
A file name for the mapping.
-
When deleting user mappings, this method is called as a way to provide any additional file names that the mapping may have had in past versions of -fileNameForMapping: If you have changed the naming scheme that -fileNameForMapping: uses in any user-reaching code, you will probably want to implement this method as well, so users will be able to properly delete mappings with the old naming scheme. Just as with -fileNameForMapping:, the file names should *not* include the file extension.
Declaration
Objective-C
- (nullable NSArray<NSString *> *) mappingManager:(nonnull MIKMIDIMappingManager *)manager legacyFileNamesForUserMapping:(nonnull MIKMIDIMapping *)mapping;
Swift
func mappingManager(_ manager: MIKMIDIMappingManager, legacyFileNamesForUserMapping mapping: MIKMIDIMapping) -> [String]?
Parameters
manager
The MIKMIDIMappingManager asking for legacy names.
mapping
The mapping to return legacy file names for.
Return Value
An array of legacy file names, or nil.