MusicKit  0.0.0
MKPlugin.h
00001 /*
00002  $Id$
00003  Defined In: The MusicKit
00004 
00005  Description:
00006  The MusicKit loads plugins (ObjC bundles) at various stages at runtime. These
00007  plugins can extend the operation of the MusicKit - for example, a plugin might
00008  allow any application using the MusicKit to be able to open certain types of
00009  XML files, or save in a totally different format. Bundles can also add ObjC
00010  categories onto existing MK classes.
00011 
00012  In order for a plugin to be loaded by the MusicKit, it must satisfy several conditions:
00013  
00014  (1) have the extension "mkplugin"
00015  (2) be found in one of the standard library locations .../MusicKitPlugins/<name>.mkplugin
00016  (3) correspond to the MusicKitPlugin protocol as specified below.
00017 
00018  Original Author: Stephen Brandon <stephen@brandonitconsulting.co.uk>
00019 
00020  Copyright (c) 2002 tomandandy, Inc.
00021  Permission is granted to use and modify this code for commercial and non-commercial
00022  purposes so long as the author attribution and this copyright message remains intact
00023  and accompanies all derived code.
00024 
00025  */
00026 
00027 #import "MusicKit.h"
00028 
00029 @protocol MusicKitPlugin
00030 + (NSString *) protocolVersion;
00031 - (void) setDelegate:(id)delegate;
00032 - (NSArray*)fileSavingSuffixes;
00033 - (NSArray*)fileOpeningSuffixes;
00034 - (MKScore*)openFileName:(NSString *)f forScore:(MKScore*)s;
00035 @end
00036 
00037 #define MK_BUNDLE_DIR @"MusicKitPlugins"
00038 #define MK_BUNDLE_EXTENSION @"mkplugin"
00039 
00040 extern void MKLoadAllBundlesOneOff(void);
00041 extern BOOL MKLoadAllBundles(void);
00042