First work on Separate search and present queries
[mp-sparql-moved-to-github.git] / src / sparql.h
1 #ifndef SPARQL_H_INCLUDED
2 #define SPARQL_H_INCLUDED
3
4 #include <yaz/wrbuf.h>
5 #include <yaz/z-core.h>
6 #include <yaz/nmem.h>
7
8 YAZ_BEGIN_CDECL
9
10 typedef struct yaz_sparql_s *yaz_sparql_t;
11
12 YAZ_EXPORT
13 yaz_sparql_t yaz_sparql_create(void);
14
15 YAZ_EXPORT
16 void yaz_sparql_destroy(yaz_sparql_t s);
17
18 YAZ_EXPORT
19 int yaz_sparql_add_pattern(yaz_sparql_t s, const char *pattern,
20                            const char *value);
21
22 YAZ_EXPORT
23 int yaz_sparql_from_rpn_stream(yaz_sparql_t s,
24                                WRBUF addinfo,
25                                void (*pr)(const char *buf,
26                                           void *client_data),
27                                void *client_data,
28                                Z_RPNQuery *q);
29
30 YAZ_EXPORT
31 int yaz_sparql_from_rpn_wrbuf(yaz_sparql_t s, WRBUF addinfo, WRBUF w,
32                               Z_RPNQuery *q);
33
34
35 YAZ_EXPORT
36 int yaz_sparql_from_uri_stream(yaz_sparql_t s,
37                                WRBUF addinfo,
38                                void (*pr)(const char *buf, void *client_data),
39                                void *client_data,
40                                const char *uri, const char *schema);
41
42 YAZ_EXPORT
43 int yaz_sparql_from_uri_wrbuf(yaz_sparql_t s, WRBUF addinfo, WRBUF w,
44                               const char *uri, const char *schema);
45
46 YAZ_END_CDECL
47
48 #endif
49 /* CQL_H_INCLUDED */
50 /*
51  * Local variables:
52  * c-basic-offset: 4
53  * c-file-style: "Stroustrup"
54  * indent-tabs-mode: nil
55  * End:
56  * vim: shiftwidth=4 tabstop=8 expandtab
57  */
58