dbio.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003  -------------------
00004  cvs         : $Id$
00005  begin       : Wed Mar 31 2004
00006  copyright   : (C) 2004 by Martin Preuss
00007  email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 
00033 #ifndef GWENHYWFAR_DBIO_H
00034 #define GWENHYWFAR_DBIO_H
00035 
00036 #include <gwenhywfar/gwenhywfarapi.h>
00037 #include <gwenhywfar/plugin.h>
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 typedef struct GWEN_DBIO GWEN_DBIO;
00044 
00045 #ifdef __cplusplus
00046 }
00047 #endif
00048 
00049 
00050 #define GWEN_DBIO_PLUGIN_NAME "dbio"
00051 
00052 
00056 #define GWEN_DBIO_FOLDER "dbio"
00057 
00058 
00059 #include <gwenhywfar/path.h>
00060 #include <gwenhywfar/iolayer.h>
00061 #include <gwenhywfar/types.h>
00062 #include <gwenhywfar/misc.h>
00063 #include <gwenhywfar/inherit.h>
00064 #include <gwenhywfar/db.h>
00065 #include <gwenhywfar/libloader.h>
00066 #include <gwenhywfar/error.h>
00067 
00068 #include <stdio.h>
00069 
00070 #ifdef __cplusplus
00071 extern "C" {
00072 #endif
00073 
00074 
00075 GWEN_LIST_FUNCTION_LIB_DEFS(GWEN_DBIO, GWEN_DBIO, GWENHYWFAR_API)
00076 GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_DBIO, GWENHYWFAR_API)
00077 /* No trailing semicolon here because this is a macro call */
00078 
00079 typedef enum {
00080   GWEN_DBIO_CheckFileResultOk=0,
00081   GWEN_DBIO_CheckFileResultNotOk,
00082   GWEN_DBIO_CheckFileResultUnknown
00083 } GWEN_DBIO_CHECKFILE_RESULT;
00084 
00085 
00086 
00091 typedef GWEN_DBIO* (*GWEN_DBIO_PLUGIN_FACTORYFN)(GWEN_PLUGIN *pl);
00092 
00093 GWENHYWFAR_API
00094 GWEN_DBIO *GWEN_DBIO_Plugin_Factory(GWEN_PLUGIN *pl);
00108 GWENHYWFAR_API
00109 int GWEN_DBIO_Import(GWEN_DBIO *dbio,
00110                      GWEN_IO_LAYER *io,
00111                      GWEN_DB_NODE *db,
00112                      GWEN_DB_NODE *params,
00113                      uint32_t flags,
00114                      uint32_t guiid,
00115                      int msecs);
00116 
00117 GWENHYWFAR_API
00118 int GWEN_DBIO_ImportFromFile(GWEN_DBIO *dbio,
00119                              const char *fname,
00120                              GWEN_DB_NODE *db,
00121                              GWEN_DB_NODE *params,
00122                              uint32_t flags,
00123                              uint32_t guiid,
00124                              int msecs);
00125 
00130 GWENHYWFAR_API
00131 int GWEN_DBIO_Export(GWEN_DBIO *dbio,
00132                      GWEN_IO_LAYER *io,
00133                      GWEN_DB_NODE *db,
00134                      GWEN_DB_NODE *params,
00135                      uint32_t flags,
00136                      uint32_t guiid,
00137                      int msecs);
00138 
00139 GWENHYWFAR_API
00140 int GWEN_DBIO_ExportToFile(GWEN_DBIO *dbio,
00141                            const char *fname,
00142                            GWEN_DB_NODE *db,
00143                            GWEN_DB_NODE *params,
00144                            uint32_t flags,
00145                            uint32_t guiid,
00146                            int msecs);
00147 
00148 GWENHYWFAR_API
00149 int GWEN_DBIO_ExportToBuffer(GWEN_DBIO *dbio,
00150                              GWEN_BUFFER *buf,
00151                              GWEN_DB_NODE *db,
00152                              GWEN_DB_NODE *params,
00153                              uint32_t flags,
00154                              uint32_t guiid,
00155                              int msecs);
00156 
00157 
00161 GWENHYWFAR_API
00162 GWEN_DBIO_CHECKFILE_RESULT GWEN_DBIO_CheckFile(GWEN_DBIO *dbio,
00163                                                const char *fname,
00164                                                uint32_t guiid,
00165                                                int msecs);
00166 
00167 
00172 GWENHYWFAR_API
00173 void GWEN_DBIO_free(GWEN_DBIO *dbio);
00174 
00179 GWENHYWFAR_API
00180 void GWEN_DBIO_Attach(GWEN_DBIO *dbio);
00181 
00185 GWENHYWFAR_API
00186 const char *GWEN_DBIO_GetName(const GWEN_DBIO *dbio);
00187 
00191 GWENHYWFAR_API
00192 const char *GWEN_DBIO_GetDescription(const GWEN_DBIO *dbio);
00193 
00203 
00211 GWENHYWFAR_API
00212 GWEN_DBIO *GWEN_DBIO_GetPlugin(const char *modname);
00213 
00217 #ifdef __cplusplus
00218 }
00219 #endif
00220 
00221 
00222 #endif /* GWENHYWFAR_DBIO_H */
00223 
00224 

Generated on Wed Sep 3 15:21:58 2008 for gwenhywfar by  doxygen 1.5.6