-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathc_dbxml.h
77 lines (53 loc) · 2.29 KB
/
c_dbxml.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef C_DBXML_H
#define C_DBXML_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct c_dbxml_t *c_dbxml;
typedef struct c_dbxml_result_t *c_dbxml_result;
typedef struct c_dbxml_docs_t *c_dbxml_docs;
typedef struct c_dbxml_query_t *c_dbxml_query;
c_dbxml c_dbxml_open(char const *filename, int, int);
void c_dbxml_free(c_dbxml db);
int c_dbxml_error(c_dbxml db);
char const * c_dbxml_errstring(c_dbxml db);
/**** RESULTS ****/
void c_dbxml_result_free(c_dbxml_result r);
int c_dbxml_result_error(c_dbxml_result r);
char const *c_dbxml_result_string(c_dbxml_result r);
/**** WRITE ****/
/* replace if replace != 0
*/
c_dbxml_result c_dbxml_put_file(c_dbxml db, char const *filename, int replace);
/* replace if replace != 0
*/
c_dbxml_result c_dbxml_put_xml(c_dbxml db, char const *name, char const *data, int replace);
/* replace if replace != 0
*/
c_dbxml_result c_dbxml_merge(c_dbxml db, char const *dbxmlfile, int replace);
c_dbxml_result c_dbxml_remove(c_dbxml db, char const *name);
/**** READ ****/
c_dbxml_result c_dbxml_get(c_dbxml db, char const * name);
unsigned long long c_dbxml_size(c_dbxml db);
c_dbxml_docs c_dbxml_get_all(c_dbxml db);
int c_dbxml_get_query_error(c_dbxml_docs docs);
char const *c_dbxml_get_query_errstring(c_dbxml_docs docs);
int c_dbxml_docs_next(c_dbxml_docs docs);
char const * c_dbxml_docs_name(c_dbxml_docs docs);
char const * c_dbxml_docs_content(c_dbxml_docs docs);
char const * c_dbxml_docs_match(c_dbxml_docs docs);
char const * c_dbxml_docs_value(c_dbxml_docs docs);
void c_dbxml_docs_free(c_dbxml_docs docs);
c_dbxml_query c_dbxml_prepare_query(c_dbxml db, char const *query, int useImplicitCollection, char const **namespaces);
c_dbxml_docs c_dbxml_run_query(c_dbxml_query query);
void c_dbxml_cancel_query(c_dbxml_query query);
void c_dbxml_query_free(c_dbxml_query query);
int c_dbxml_get_prepared_error(c_dbxml_query query);
char const *c_dbxml_get_prepared_errstring(c_dbxml_query query);
/**** CHECK ****/
c_dbxml_result c_dbxml_check(char const *query, char const **namespaces);
void c_dbxml_version(int *major, int *minor, int *patch);
#ifdef __cplusplus
}
#endif
#endif /* C_DBXML_H */