00001 /* 00002 * Author: MA Hartman 00003 * Date: jan 18, 2007 00004 * 00005 * Function: 00006 * Header file that must be implemented by all biometric modules for 00007 * the Bio-SPHERE platform. This file is strictly in C so biometric 00008 * modules can be written in either C or C++. 00009 * 00010 * License information: 00011 * 00012 * Copyright (c) 2006 Maurits Hartman 00013 * 00014 * Permission is hereby granted, free of charge, to any person 00015 * obtaining a copy of this software and associated documentation 00016 * files (the "Software"), to deal in the Software without 00017 * restriction, including without limitation the rights to use, 00018 * copy, modify, merge, publish, distribute, sublicense, and/or sell 00019 * copies of the Software, and to permit persons to whom the 00020 * Software is furnished to do so, subject to the following 00021 * conditions: 00022 * 00023 * The above copyright notice and this permission notice shall be 00024 * included in all copies or substantial portions of the Software. 00025 * 00026 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00027 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 00028 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00029 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 00030 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 00031 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00032 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00033 * OTHER DEALINGS IN THE SOFTWARE. 00034 * 00035 */ 00036 00037 #ifndef BIOSPHERE_MODULE_H 00038 #define BIOSPHERE_MODULE_H 00039 00040 #include <biosphere.h> 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00062 typedef bs_status (*service_request_handler) ( 00063 const bs_service_request *request, 00064 bs_service_response **response, void *extra); 00065 00071 typedef struct bs_module 00072 { 00073 const int bsapi_major; 00074 const int bsapi_minor; 00076 const int module_major; 00077 const int module_minor; 00079 const char *name; 00080 const char *author; 00081 const char *date; 00082 const char *copyright; 00083 const char *description; 00089 bs_status (*init) (void); 00090 00095 bs_status (*cleanup) (void); 00096 00106 service_request_handler handler; 00107 00113 service_request_handler syshandler; 00114 00122 const char *services_definition; 00123 } bs_module; 00124 00129 #ifdef __cplusplus 00130 } 00131 #endif 00132 #endif /*BIOSPHERE_MODULE_H*/