00001 00002 // /*! \file FEAPIHostDeclarations.h 00003 // \brief host interface for Feature Extraction 00004 // plugin API (FEAPI). */ 00005 // 00006 // Copyright (c) 2006-2007, Ircam-Centre Pomidou 00007 // All rights reserved. 00008 // 00009 // Redistribution and use in source and binary forms, with or without 00010 // modification, are permitted provided that the following conditions 00011 // are met: 00012 // 00013 // * Redistributions of source code must retain the above copyright 00014 // notice, this list of conditions and the following disclaimer. 00015 // * Redistributions in binary form must reproduce the above 00016 // copyright notice, this list of conditions and the following 00017 // disclaimer in the documentation and/or other materials 00018 // provided with the distribution. 00019 // * Neither the name of the FEAPI development team nor the names 00020 // of its contributors may be used to endorse or promote products 00021 // derived from this software without specific prior written 00022 // permission. 00023 // 00024 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00025 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00026 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00027 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00028 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00029 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00030 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00031 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00032 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00033 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00034 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00035 // POSSIBILITY OF SUCH DAMAGE. 00036 // 00038 00040 #ifndef FEAPI_HOST_HEADER_H 00041 #define FEAPI_HOST_HEADER_H 00042 00043 #include "FEAPI.h" 00044 00045 #ifdef WIN32 00046 #include <windows.h> // needed for dll handling 00047 #include <io.h> // needed for file parsing 00048 #elif MAC 00049 #include <Carbon/Carbon.h> 00050 #endif 00051 00053 typedef struct PluginFunctions_ 00054 { 00055 // declare function pointers 00056 FEAPI_CreatePluginInstance_t pFunCreateInstance; 00057 FEAPI_DestroyPluginInstance_t pFunDestroyInstance; 00058 FEAPI_GetPluginAPIVersion_t pFunGetApiVersion; 00059 FEAPI_InitializePlugin_t pFunInitializePlugin; 00060 FEAPI_GetPluginName_t pFunGetPluginName; 00061 FEAPI_GetPluginVendor_t pFunGetPluginVendor; 00062 FEAPI_GetPluginProperty_t pFunGetPluginProperty; 00063 FEAPI_GetPluginId_t pFunGetPluginId; 00064 FEAPI_GetPluginVendorVersion_t pFunGetPluginVendorVersion; 00065 FEAPI_GetPluginDescription_t pFunGetPluginDescription; 00066 FEAPI_GetPluginCopyright_t pFunGetPluginCopyright; 00067 FEAPI_GetPluginNumOfInputs_t pFunGetNumberOfInputs; 00068 FEAPI_GetPluginInputDescription_t pFunGetInputDescription; 00069 FEAPI_GetPluginNumOfResults_t pFunGetNumberOfResults; 00070 FEAPI_GetPluginResultDescription_t pFunGetResultDescription; 00071 FEAPI_GetPluginNumOfParameters_t pFunGetNumberOfParameters; 00072 FEAPI_GetPluginParameterDescription_t pFunGetParameterDescription; 00073 FEAPI_SetPluginParameter_t pFunSetParameter; 00074 FEAPI_GetPluginParameter_t pFunGetParameter; 00075 FEAPI_ProcessPlugin_t pFunProcess; 00076 FEAPI_ProcessPluginDone_t pFunProcessDone; 00077 FEAPI_GetPluginSizeOfResult_t pFunGetSizeOfResult; 00078 FEAPI_GetPluginResult_t pFunGetResult; 00079 FEAPI_GetPluginResultLatency_t pFunGetResultLatency; 00080 FEAPI_ResetPlugin_t pFunReset; 00081 } FEAPI_PluginFunctions_t; 00082 00083 00084 typedef struct PluginFileNames_ FEAPI_PluginFileNames_t; 00085 00087 struct PluginFileNames_ 00088 { 00089 char acFilename[4096]; 00090 int iMajorVersion; 00091 FEAPI_PluginFileNames_t *pNextPlugin; 00092 }; 00093 00094 00096 #ifdef WIN32 00097 typedef HMODULE FEAPI_ModuleHandle_t; 00098 #elif MAC 00099 typedef CFBundleRef FEAPI_ModuleHandle_t; 00100 #endif 00101 00102 00103 #endif //FEAPI_HOST_HEADER_H