gwenhywfar  4.11.0beta
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 {
84 
85 
86 
91 typedef GWEN_DBIO* (*GWEN_DBIO_PLUGIN_FACTORYFN)(GWEN_PLUGIN *pl);
92 
109 int GWEN_DBIO_Import(GWEN_DBIO *dbio,
110  GWEN_SYNCIO *sio,
111  GWEN_DB_NODE *db,
112  GWEN_DB_NODE *params,
113  uint32_t flags);
114 
117  const char *fname,
118  GWEN_DB_NODE *db,
119  GWEN_DB_NODE *params,
120  uint32_t flags);
121 
127 int GWEN_DBIO_Export(GWEN_DBIO *dbio,
128  GWEN_SYNCIO *sio,
129  GWEN_DB_NODE *db,
130  GWEN_DB_NODE *params,
131  uint32_t flags);
132 
135  const char *fname,
136  GWEN_DB_NODE *db,
137  GWEN_DB_NODE *params,
138  uint32_t flags);
139 
142  GWEN_BUFFER *buf,
143  GWEN_DB_NODE *db,
144  GWEN_DB_NODE *params,
145  uint32_t flags);
146 
147 
153 
154 
160 void GWEN_DBIO_free(GWEN_DBIO *dbio);
161 
167 void GWEN_DBIO_Attach(GWEN_DBIO *dbio);
168 
173 const char *GWEN_DBIO_GetName(const GWEN_DBIO *dbio);
174 
179 const char *GWEN_DBIO_GetDescription(const GWEN_DBIO *dbio);
180 
190 
199 GWEN_DBIO *GWEN_DBIO_GetPlugin(const char *modname);
200 
204 #ifdef __cplusplus
205 }
206 #endif
207 
208 
209 #endif /* GWENHYWFAR_DBIO_H */
210 
211