X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fpquery.h;h=026baa9abeb178bee2b1cb2a3698acc3713319d9;hp=b1ec2acf68439ab121c46172a15abc5e6e6149ac;hb=77aaeaf4801a896d3eaa93b8d76a81be82d95bad;hpb=964580242e2e0b2e570f652afa58bfb90ad0bb5e diff --git a/include/yaz/pquery.h b/include/yaz/pquery.h index b1ec2ac..026baa9 100644 --- a/include/yaz/pquery.h +++ b/include/yaz/pquery.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 1995-2006, Index Data +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2011 Index Data. * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -24,7 +24,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: pquery.h,v 1.9 2006-10-09 21:02:41 adam Exp $ */ /** * \file pquery.h @@ -41,21 +40,28 @@ YAZ_BEGIN_CDECL typedef struct yaz_pqf_parser *YAZ_PQF_Parser; -YAZ_EXPORT Z_RPNQuery *p_query_rpn (ODR o, oid_proto proto, const char *qbuf); +YAZ_EXPORT Z_RPNQuery *p_query_rpn(ODR o, const char *qbuf); + +YAZ_EXPORT YAZ_PQF_Parser yaz_pqf_create(void); +YAZ_EXPORT Z_RPNQuery *yaz_pqf_parse(YAZ_PQF_Parser p, ODR o, + const char *qbuf); +YAZ_EXPORT Z_AttributesPlusTerm *yaz_pqf_scan(YAZ_PQF_Parser p, ODR o, + Odr_oid **attributeSetId, + const char *qbuf); + +YAZ_EXPORT Z_AttributeList *yaz_pqf_scan_attribute_list(YAZ_PQF_Parser p, ODR o, + Odr_oid **attributeSetId, + const char *qbuf); + +YAZ_EXPORT +Z_FacetList *yaz_pqf_parse_facet_list(ODR odr, const char *args ); -YAZ_EXPORT Z_AttributesPlusTerm *p_query_scan (ODR o, oid_proto proto, - Odr_oid **attributeSetP, const char *qbuf); -YAZ_EXPORT int p_query_attset (const char *arg); +YAZ_EXPORT void yaz_pqf_destroy(YAZ_PQF_Parser p); -YAZ_EXPORT YAZ_PQF_Parser yaz_pqf_create (void); -YAZ_EXPORT Z_RPNQuery *yaz_pqf_parse (YAZ_PQF_Parser p, ODR o, - const char *qbuf); -YAZ_EXPORT Z_AttributesPlusTerm *yaz_pqf_scan (YAZ_PQF_Parser p, ODR o, - Odr_oid **attributeSetId, - const char *qbuf); -YAZ_EXPORT void yaz_pqf_destroy (YAZ_PQF_Parser p); +YAZ_EXPORT int yaz_pqf_error(YAZ_PQF_Parser p, const char **msg, size_t *off); -YAZ_EXPORT int yaz_pqf_error (YAZ_PQF_Parser p, const char **msg, size_t *off); +YAZ_EXPORT +Z_Term *z_Term_create(ODR o, int term_type, const char *buf, size_t len); /* no error */ @@ -91,6 +97,7 @@ YAZ_END_CDECL /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab