gwenhywfar  5.11.1beta
dbio.h
Go to the documentation of this file.
1 /***************************************************************************
2  $RCSfile$
3  -------------------
4  cvs : $Id$
5  begin : Wed Mar 31 2004
6  copyright : (C) 2004 by Martin Preuss
7  email : martin@libchipcard.de
8 
9  ***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2.1 of the License, or (at your option) any later version. *
15  * *
16  * This library is distributed in the hope that it will be useful, *
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
19  * Lesser General Public License for more details. *
20  * *
21  * You should have received a copy of the GNU Lesser General Public *
22  * License along with this library; if not, write to the Free Software *
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
24  * MA 02111-1307 USA *
25  * *
26  ***************************************************************************/
27 
28 
33 #ifndef GWENHYWFAR_DBIO_H
34 #define GWENHYWFAR_DBIO_H
35 
37 #include <gwenhywfar/plugin.h>
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 typedef struct GWEN_DBIO GWEN_DBIO;
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 
50 #define GWEN_DBIO_PLUGIN_NAME "dbio"
51 
52 
56 #define GWEN_DBIO_FOLDER "dbio"
57 
58 
59 #include <gwenhywfar/path.h>
60 #include <gwenhywfar/syncio.h>
61 #include <gwenhywfar/types.h>
62 #include <gwenhywfar/misc.h>
63 #include <gwenhywfar/inherit.h>
64 #include <gwenhywfar/db.h>
65 #include <gwenhywfar/libloader.h>
66 #include <gwenhywfar/error.h>
67 
68 #include <stdio.h>
69 
70 #ifdef __cplusplus
71 extern "C" {
72 #endif
73 
74 
77 /* No trailing semicolon here because this is a macro call */
78 
79 typedef enum {
83 }
85 
86 
87 
92 typedef GWEN_DBIO *(*GWEN_DBIO_PLUGIN_FACTORYFN)(GWEN_PLUGIN *pl);
93 
111  GWEN_SYNCIO *sio,
112  GWEN_DB_NODE *db,
113  GWEN_DB_NODE *params,
114  uint32_t flags);
115 
118  const char *fname,
119  GWEN_DB_NODE *db,
120  GWEN_DB_NODE *params,
121  uint32_t flags);
122 
129  GWEN_SYNCIO *sio,
130  GWEN_DB_NODE *db,
131  GWEN_DB_NODE *params,
132  uint32_t flags);
133 
136  const char *fname,
137  GWEN_DB_NODE *db,
138  GWEN_DB_NODE *params,
139  uint32_t flags);
140 
143  GWEN_BUFFER *buf,
144  GWEN_DB_NODE *db,
145  GWEN_DB_NODE *params,
146  uint32_t flags);
147 
148 
154 
155 
162 
169 
174 const char *GWEN_DBIO_GetName(const GWEN_DBIO *dbio);
175 
180 const char *GWEN_DBIO_GetDescription(const GWEN_DBIO *dbio);
181 
191 
200 GWEN_DBIO *GWEN_DBIO_GetPlugin(const char *modname);
201 
205 #ifdef __cplusplus
206 }
207 #endif
208 
209 
210 #endif /* GWENHYWFAR_DBIO_H */
211 
212 
struct GWEN_DB_NODE GWEN_DB_NODE
Definition: db.h:228
GWENHYWFAR_API GWEN_DBIO * GWEN_DBIO_Plugin_Factory(GWEN_PLUGIN *pl)
GWENHYWFAR_API const char * GWEN_DBIO_GetDescription(const GWEN_DBIO *dbio)
GWENHYWFAR_API GWEN_DBIO_CHECKFILE_RESULT GWEN_DBIO_CheckFile(GWEN_DBIO *dbio, const char *fname)
GWENHYWFAR_API int GWEN_DBIO_Export(GWEN_DBIO *dbio, GWEN_SYNCIO *sio, GWEN_DB_NODE *db, GWEN_DB_NODE *params, uint32_t flags)
GWENHYWFAR_API void GWEN_DBIO_Attach(GWEN_DBIO *dbio)
GWEN_DBIO_CHECKFILE_RESULT
Definition: dbio.h:79
@ GWEN_DBIO_CheckFileResultUnknown
Definition: dbio.h:82
@ GWEN_DBIO_CheckFileResultNotOk
Definition: dbio.h:81
@ GWEN_DBIO_CheckFileResultOk
Definition: dbio.h:80
GWENHYWFAR_API int GWEN_DBIO_ExportToBuffer(GWEN_DBIO *dbio, GWEN_BUFFER *buf, GWEN_DB_NODE *db, GWEN_DB_NODE *params, uint32_t flags)
struct GWEN_DBIO GWEN_DBIO
Definition: dbio.h:43
GWENHYWFAR_API int GWEN_DBIO_ImportFromFile(GWEN_DBIO *dbio, const char *fname, GWEN_DB_NODE *db, GWEN_DB_NODE *params, uint32_t flags)
GWENHYWFAR_API int GWEN_DBIO_ExportToFile(GWEN_DBIO *dbio, const char *fname, GWEN_DB_NODE *db, GWEN_DB_NODE *params, uint32_t flags)
GWENHYWFAR_API int GWEN_DBIO_Import(GWEN_DBIO *dbio, GWEN_SYNCIO *sio, GWEN_DB_NODE *db, GWEN_DB_NODE *params, uint32_t flags)
GWENHYWFAR_API GWEN_DBIO * GWEN_DBIO_GetPlugin(const char *modname)
GWENHYWFAR_API const char * GWEN_DBIO_GetName(const GWEN_DBIO *dbio)
GWENHYWFAR_API void GWEN_DBIO_free(GWEN_DBIO *dbio)
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition: buffer.h:38
#define GWENHYWFAR_API
Definition: gwenhywfarapi.h:67
#define GWEN_INHERIT_FUNCTION_LIB_DEFS(t, decl)
Definition: inherit.h:125
#define GWEN_LIST_FUNCTION_LIB_DEFS(t, pr, decl)
Definition: list1.h:348
struct GWEN_PLUGIN GWEN_PLUGIN
Definition: plugin.h:36
struct GWEN_SYNCIO GWEN_SYNCIO
Definition: syncio.h:40