static int cmd_update_Z3950(int version, int action_no, const char *recid,
char *rec_buf, int rec_len);
+#if YAZ_HAVE_XML2
static int cmd_update_SRW(int action_no, const char *recid,
char *rec_buf, int rec_len);
+#endif
static int cmd_update_common(const char *arg, int version)
{
return 0;
}
+#if YAZ_HAVE_XML2
static int yaz_base64decode(const char *in, char *out)
{
const char *map = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
*out = '\0';
return olen;
}
+#endif
int yaz_srw_check_content_type(Z_HTTP_Response *hres)
{
* Look for authentication tokens in HTTP Basic parameters or in x-username/x-password
* parameters. Added by SH.
*/
+#if YAZ_HAVE_XML2
static void yaz_srw_decodeauth(Z_SRW_PDU *sr, Z_HTTP_Request *hreq,
char *username, char *password, ODR decode)
{
sr->password = odr_strdup(decode, pbuf);
}
}
+#endif
void yaz_uri_val_int(const char *path, const char *name, ODR o, int **intp)
{
return 2;
}
+#if YAZ_HAVE_XML2
static int yaz_sru_decode_integer(ODR odr, const char *pname,
const char *valstr, int **valp,
Z_SRW_diagnostic **diag, int *num_diag,
*valp = odr_intdup(odr, ival);
return 1;
}
+#endif
/**
http://www.loc.gov/z3950/agency/zing/srw/service.html
}
#endif
+#if YAZ_HAVE_XML2
static struct gfs_server * gfs_server_new(void)
{
struct gfs_server *n = (struct gfs_server *)
n->directory = 0;
n->docpath = 0;
n->stylesheet = 0;
-#if YAZ_HAVE_XML2
n->retrieval = yaz_retrieval_create();
-#endif
return n;
}
+#endif
+#if YAZ_HAVE_XML2
static struct gfs_listen * gfs_listen_new(const char *id,
const char *address)
{
n->address = nmem_strdup(gfs_nmem, address);
return n;
}
+#endif
static void gfs_server_chdir(struct gfs_server *gfs)
{
return 1;
}
+#if YAZ_HAVE_XML2
static void xml_config_read(void)
{
struct gfs_server **gfsp = &gfs_server_list;
struct gfs_listen **gfslp = &gfs_listen_list;
-#if YAZ_HAVE_XML2
xmlNodePtr ptr = xml_config_get_root();
if (!ptr)
gfsp = &(*gfsp)->next;
}
}
-#endif
*gfsp = 0;
}
+#endif
static void xml_config_open(void)
{
}
#endif
-
-static Z_SRW_PDU *ZOOM_srw_get_pdu(ZOOM_connection c, int type) {
+#if YAZ_HAVE_XML2
+static Z_SRW_PDU *ZOOM_srw_get_pdu(ZOOM_connection c, int type)
+{
Z_SRW_PDU *sr = yaz_srw_get_pdu(c->odr_out, type, c->sru_version);
sr->username = c->user;
sr->password = c->password;
return sr;
}
+#endif
#if YAZ_HAVE_XML2
static zoom_ret ZOOM_connection_srw_send_search(ZOOM_connection c)