Initial checkin of proxy 2 code
[yazproxy-moved-to-github.git] / src / p2_backend.h
diff --git a/src/p2_backend.h b/src/p2_backend.h
new file mode 100644 (file)
index 0000000..b5864b3
--- /dev/null
@@ -0,0 +1,31 @@
+
+#ifndef P2_BACKEND_H
+#define P2_BACKEND_H
+
+#include <yaz++/z-query.h>
+
+class IP2_BackendSet {
+public:
+    virtual ~IP2_BackendSet();
+    virtual int get(int start, int number) = 0;
+};
+
+class IP2_Backend {
+ public:
+    virtual ~IP2_Backend();
+    virtual int search(yazpp_1::Yaz_Z_Query *q, IP2_BackendSet **rset, int *hits) = 0;
+};
+
+struct P2_ModuleInterface0 {
+    IP2_Backend *(*create)(const char *address);
+};
+    
+struct P2_ModuleEntry {
+    int version;
+    const char *name;
+    const char *description;
+    void *interface_ptr;
+};
+
+    
+#endif