1 /* This file is part of Pazpar2.
2 Copyright (C) 2006-2010 Index Data
4 Pazpar2 is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #include "pazpar2_config.h"
28 // This is a recipe for sorting. First node in list has highest priority
29 struct reclist_sortparms
32 enum conf_sortkey_type type;
34 struct reclist_sortparms *next;
37 struct reclist *reclist_create(NMEM);
38 void reclist_destroy(struct reclist *l);
39 struct record_cluster *reclist_insert(struct reclist *tl,
40 struct conf_service *service,
41 struct record *record,
42 const char *merge_key, int *total);
43 void reclist_sort(struct reclist *l, struct reclist_sortparms *parms);
44 struct record_cluster *reclist_read_record(struct reclist *l);
45 void reclist_enter(struct reclist *l);
46 void reclist_leave(struct reclist *l);
47 struct reclist_sortparms *reclist_parse_sortparms(NMEM nmem, const char *parms,
48 struct conf_service *service);
50 int reclist_get_num_records(struct reclist *l);
51 struct record_cluster *reclist_get_cluster(struct reclist *l, int i);
58 * c-file-style: "Stroustrup"
59 * indent-tabs-mode: nil
61 * vim: shiftwidth=4 tabstop=8 expandtab