dbio.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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
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
00223
00224