From: Dennis Schafroth Date: Tue, 20 Jul 2010 07:27:53 +0000 (+0200) Subject: Helper functions for Facets. X-Git-Tag: v4.0.12~38 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=85513aab61cd6a51f33bcf49cff49a124740b559;p=yaz-moved-to-github.git Helper functions for Facets. --- 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