|
Katana Plug-in APIs 0.1
|
00001 // Copyright (c) 2012 The Foundry Visionmongers Ltd. All Rights Reserved. 00002 00003 #ifndef KATANA_PLUGINAPI_FNPLUGINSYSTEM_FNPLUGINSYSTEM_H_ 00004 #define KATANA_PLUGINAPI_FNPLUGINSYSTEM_FNPLUGINSYSTEM_H_ 00005 00006 #if defined(FNPLUGINSYSTEM_H) 00007 #undef FNPLUGINHOST_DEFINED 00008 #define FNPLUGINHOST_DEFINED 00009 00010 #undef FNPLUGIN_DEFINED 00011 #define FNPLUGIN_DEFINED 00012 00013 #undef FNPLUGINSTATUS_DEFINED 00014 #define FNPLUGINSTATUS_DEFINED 00015 #endif // FNPLUGINSYSTEM_H 00016 00102 #ifdef __cplusplus 00103 extern "C" { 00104 #endif 00105 00106 00107 00130 //------------------------------------------------------------------------------ 00131 00132 #ifndef FNPLUGINSTATUS_DEFINED 00133 #define FNPLUGINSTATUS_DEFINED 00134 00136 enum FnPluginStatus 00137 { 00138 FnPluginStatusOK = 0, 00139 FnPluginStatusError = -1 00140 }; 00141 00142 // @cond FN_INTERNAL_DEV 00143 typedef enum FnPluginStatus FnPluginStatus; 00144 // @endcond 00145 00146 #endif // FNPLUGINSTATUS_DEFINED 00147 00149 typedef FnPluginStatus FnPlugStatus; 00150 00151 #ifndef FNPLUGINHOST_DEFINED 00152 #define FNPLUGINHOST_DEFINED 00153 00155 struct FnPluginHost 00156 { 00162 const void *(*getSuite)(const char *apiName, unsigned int apiVersion); 00163 00164 const char *name; 00165 const char *versionStr; 00166 unsigned int versionInt; 00167 00168 }; 00169 00170 // @cond FN_INTERNAL_DEV 00171 typedef struct FnPluginHost FnPluginHost; 00172 // @endcond 00173 00174 #endif // FNPLUGINHOST_DEFINED 00175 00176 #ifndef FNPLUGIN_DEFINED 00177 #define FNPLUGIN_DEFINED 00178 00180 struct FnPlugin 00181 { 00182 const char *name; 00183 const char *apiName; 00184 unsigned int apiVersion; 00185 unsigned int pluginVersionMajor; 00186 unsigned int pluginVersionMinor; 00187 00192 //FnPluginStatus (*setHost)(const FnPluginHost *host); 00193 FnPluginStatus (*setHost)(FnPluginHost *host); 00194 00197 const void *(*getSuite)(); 00198 00200 void (*flush)(); 00201 00202 }; 00203 00204 // @cond FN_INTERNAL_DEV 00205 typedef struct FnPlugin FnPlugin; 00206 // @endcond 00207 00208 #endif // FNPLUGIN_DEFINED 00209 00218 typedef FnPlugin *(*FnGetPluginsFunc)(unsigned int *numPlugins); 00219 00220 //------------------------------------------------------------------------------ 00221 00224 #ifdef __cplusplus 00225 } 00226 #endif 00227 00228 #endif // KATANA_PLUGINAPI_FNPLUGINSYSTEM_FNPLUGINSYSTEM_H_
1.7.3