00001 /*************************************************************************** 00002 $RCSfile: libloader.h,v $ 00003 ------------------- 00004 cvs : $Id: libloader.h,v 1.6 2004/07/30 10:33:08 cstim Exp $ 00005 begin : Fri Nov 22 2002 00006 copyright : (C) 2002 by Martin Preuss 00007 email : martin@libchipcard.de 00008 00009 00010 *************************************************************************** 00011 * * 00012 * This library is free software; you can redistribute it and/or * 00013 * modify it under the terms of the GNU Lesser General Public * 00014 * License as published by the Free Software Foundation; either * 00015 * version 2.1 of the License, or (at your option) any later version. * 00016 * * 00017 * This library is distributed in the hope that it will be useful, * 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00020 * Lesser General Public License for more details. * 00021 * * 00022 * You should have received a copy of the GNU Lesser General Public * 00023 * License along with this library; if not, write to the Free Software * 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * 00025 * MA 02111-1307 USA * 00026 * * 00027 ***************************************************************************/ 00028 00029 00030 #ifndef GWENHYWFAR_LIBLOADER_H 00031 #define GWENHYWFAR_LIBLOADER_H "$Id" 00032 00033 #define GWEN_LIBLOADER_ERROR_TYPE "LIBLOADER" 00034 #define GWEN_LIBLOADER_ERROR_COULD_NOT_LOAD 1 00035 #define GWEN_LIBLOADER_ERROR_NOT_OPEN 2 00036 #define GWEN_LIBLOADER_ERROR_COULD_NOT_CLOSE 3 00037 #define GWEN_LIBLOADER_ERROR_COULD_NOT_RESOLVE 4 00038 #define GWEN_LIBLOADER_ERROR_NOT_FOUND 5 00039 00040 #include <gwenhywfar/gwenhywfarapi.h> 00041 #include <gwenhywfar/error.h> 00042 00043 #ifdef __cplusplus 00044 extern "C" { 00045 #endif 00046 00047 00058 00059 00060 typedef struct GWEN_LIBLOADERSTRUCT GWEN_LIBLOADER; 00061 00062 00063 GWENHYWFAR_API GWEN_LIBLOADER *GWEN_LibLoader_new(); 00064 00071 GWENHYWFAR_API void GWEN_LibLoader_free(GWEN_LIBLOADER *h); 00072 00073 GWENHYWFAR_API 00074 GWEN_ERRORCODE GWEN_LibLoader_OpenLibrary(GWEN_LIBLOADER *h, 00075 const char *name); 00076 GWENHYWFAR_API 00077 GWEN_ERRORCODE GWEN_LibLoader_OpenLibraryWithPath(GWEN_LIBLOADER *h, 00078 const char *path, 00079 const char *name); 00080 00081 GWENHYWFAR_API 00082 GWEN_ERRORCODE GWEN_LibLoader_CloseLibrary(GWEN_LIBLOADER *h); 00083 GWENHYWFAR_API 00084 GWEN_ERRORCODE GWEN_LibLoader_Resolve(GWEN_LIBLOADER *h, 00085 const char *name, void **p); 00086 00089 #ifdef __cplusplus 00090 } 00091 #endif 00092 00093 00094 #endif /* GWENHYWFAR_LIBLOADER_H */ 00095 00096