SoundPackProtocol100


Declared In:
SoundPackProtocol.h


Protocol Description

No protocol description.


Method Types

+ canLoad
- soundPackName
- availableSounds
- isValid
- setIsValid:
- checksumForSound:
- class


Class Methods

canLoad

+ (BOOL)canLoad

In this class method, you can perform any checks to determine if you should in fact load. This will almost always return YES, but is provided for added flexibility. If this returns NO, the Sound Pack will not be loaded.


Instance Methods

availableSounds

- (NSArray *)availableSounds

This method should return a nil-terminated array of filenames. The file names should be 'clear', since MooSB simply removes the filename extensions (.wav, .aif) and displays the result in the UI.


checksumForSound:

- (NSString *)checksumForSound:(NSString *)sound

This function will be passed one of the strings returned from -(NSArray *)availableSounds. This function must return the _expected_ md5 checksum for the sound. That is, the one you calculated before compiling. Use the command 'md5 -q filename' in Terminal to calculate a checksum. Make sure you return _something_, even if the sound name passed in turns out to be invalid.


class

- (Class)class

This should return your princple class.


isValid

- (BOOL)isValid

This should return a variable that is set using -(void)setIsValid:(BOOL)validity;


setIsValid:

- (void)setIsValid:(BOOL)validity

This function should set the variable that is returned by -(BOOL)isValid;


soundPackName

- (NSString *)soundPackName

This is the Sound Pack name that will be displayed in the MooSB UI. This name should be unique, since MooSB will not load two Sound Packs with the same name.


Version 1.1 Copyright ©2002. All Rights Reserved.