From 85513aab61cd6a51f33bcf49cff49a124740b559 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Tue, 20 Jul 2010 09:27:53 +0200 Subject: [PATCH] Helper functions for Facets. --- include/yaz/facet.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/yaz/facet.h b/include/yaz/facet.h index 4d83251..d5ae035 100644 --- a/include/yaz/facet.h +++ b/include/yaz/facet.h @@ -3,7 +3,9 @@ #define YAZ_FACET_H #include +#include #include +#include #include YAZ_BEGIN_CDECL @@ -46,4 +48,22 @@ void limitattr ( Z_AttributeElement *ae, struct attrvalues *av ); YAZ_EXPORT void facetattrs( Z_AttributeList *attributes, struct attrvalues *av ); +YAZ_EXPORT +Z_Term *term_create(ODR odr, const char *cstr); + +YAZ_EXPORT +Z_FacetTerm* facet_term_create(ODR odr, Z_Term *term, int freq); + +YAZ_EXPORT +Z_FacetField* facet_field_create(ODR odr, Z_AttributeList *attributes, int num_terms); + +YAZ_EXPORT +void facet_field_term_set(ODR odr, Z_FacetField *field, Z_FacetTerm *facetTerm, int index); + +YAZ_EXPORT +Z_FacetList* facet_list_create(ODR odr, int num_facets); + +YAZ_EXPORT +void facet_list_field_set(ODR odr, Z_FacetList *list, Z_FacetField *field, int index); + #endif -- 1.7.10.4