b5864b37972aea83eab6bb75b71f6499582d5916
[yazproxy-moved-to-github.git] / src / p2_backend.h
1
2 #ifndef P2_BACKEND_H
3 #define P2_BACKEND_H
4
5 #include <yaz++/z-query.h>
6
7 class IP2_BackendSet {
8 public:
9     virtual ~IP2_BackendSet();
10     virtual int get(int start, int number) = 0;
11 };
12
13 class IP2_Backend {
14  public:
15     virtual ~IP2_Backend();
16     virtual int search(yazpp_1::Yaz_Z_Query *q, IP2_BackendSet **rset, int *hits) = 0;
17 };
18
19 struct P2_ModuleInterface0 {
20     IP2_Backend *(*create)(const char *address);
21 };
22     
23 struct P2_ModuleEntry {
24     int version;
25     const char *name;
26     const char *description;
27     void *interface_ptr;
28 };
29
30     
31 #endif