SOAP, SRW codecs and HTTP transport for YAZ using libxml2.
[yaz-moved-to-github.git] / srw / srw-server.c
diff --git a/srw/srw-server.c b/srw/srw-server.c
deleted file mode 100644 (file)
index 5a2ab0a..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-
-#include <yaz/srw-util.h>
-#include <yaz/xmalloc.h>
-
-struct srw_info {
-    int (*sr_h)(void *userinfo,
-                struct soap * soap,
-                xsd__string  *query,
-                struct xcql__operandType *xQuery,      
-                xsd__string *sortKeys,
-                struct xsort__xSortKeysType *xSortKeys,
-                xsd__integer *startRecord,
-                xsd__integer *maximumRecords,
-                xsd__string *recordSchema,
-                xsd__string *recordPacking,
-                struct zs__searchRetrieveResponse *res);
-    int (*e_h)(void *userinfo,
-              struct soap *soap,
-              struct zs__explainResponse *explainResponse);
-    void *userinfo;
-};
-
-int zs__explainRequest (struct soap *soap,
-                       struct zs__explainResponse *explainResponse)
-{
-    struct srw_info *info = (struct srw_info *) soap->user;
-    return (*info->e_h)(info->userinfo, soap, explainResponse);
-}
-
-int zs__searchRetrieveRequest(struct soap * soap,
-                              xsd__string  *query,
-                             struct xcql__operandType *xQuery, 
-                              xsd__string *sortKeys,
-                             struct xsort__xSortKeysType *xSortKeys,
-                              xsd__integer *startRecord,
-                              xsd__integer *maximumRecords,
-                              xsd__string *recordSchema,
-                              xsd__string *recordPacking,
-                              struct zs__searchRetrieveResponse *res)
-{
-    struct srw_info *info = (struct srw_info *) soap->user;
-    return (*info->sr_h)(info->userinfo, soap,
-                         query, xQuery, sortKeys, xSortKeys,
-                         startRecord, maximumRecords,
-                         recordSchema, recordPacking,
-                         res);
-}
-
-void yaz_srw_serve (struct soap *soap,
-                    int (*sr_h)(void *userinfo,
-                                struct soap * soap,
-                                xsd__string  *query,
-                                struct xcql__operandType *xQuery,      
-                                xsd__string *sortKeys,
-                                struct xsort__xSortKeysType *xSortKeys,
-                                xsd__integer *startRecord,
-                                xsd__integer *maximumRecords,
-                                xsd__string *recordSchema,
-                                xsd__string *recordPacking,
-                                struct zs__searchRetrieveResponse *res),
-                    int (*e_h)(void *userinfo,
-                                struct soap *soap,
-                               struct zs__explainResponse *explainResponse))
-{
-    struct srw_info info;
-
-    info.sr_h = sr_h;
-    info.e_h = e_h;
-    info.userinfo = soap->user;
-    soap->user = &info;
-    soap->namespaces = srw_namespaces;
-    soap_serve(soap);
-}
-