pazpar2
1.6.31
Main Page
Data Structures
Files
File List
Globals
src
reclists.h
Go to the documentation of this file.
1
/* This file is part of Pazpar2.
2
Copyright (C) 2006-2013 Index Data
3
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
7
version.
8
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
12
for more details.
13
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
17
18
*/
19
20
#ifndef RECLISTS_H
21
#define RECLISTS_H
22
23
#include "
pazpar2_config.h
"
24
#include "
record.h
"
25
26
struct
reclist
;
27
28
// This is a recipe for sorting. First node in list has highest priority
29
struct
reclist_sortparms
30
{
31
int
offset
;
32
enum
conf_sortkey_type
type
;
33
int
increasing
;
34
char
*
name
;
35
struct
reclist_sortparms
*
next
;
36
};
37
38
struct
reclist
*
reclist_create
(NMEM);
39
void
reclist_destroy
(
struct
reclist
*l);
40
void
reclist_limit
(
struct
reclist
*l,
struct
session
*
session
);
41
struct
record_cluster
*
reclist_insert
(
struct
reclist
*tl,
42
struct
conf_service
*service,
43
struct
record
*
record
,
44
const
char
*
merge_key
,
int
*total);
45
void
reclist_sort
(
struct
reclist
*l,
struct
reclist_sortparms
*parms);
46
struct
record_cluster
*
reclist_read_record
(
struct
reclist
*l);
47
void
reclist_enter
(
struct
reclist
*l);
48
void
reclist_leave
(
struct
reclist
*l);
49
struct
reclist_sortparms
*
reclist_parse_sortparms
(NMEM nmem,
const
char
*parms,
50
struct
conf_service
*service);
51
52
int
reclist_get_num_records
(
struct
reclist
*l);
53
struct
record_cluster
*
reclist_get_cluster
(
struct
reclist
*l,
int
i);
54
int
reclist_sortparms_cmp
(
struct
reclist_sortparms
*sort1,
struct
reclist_sortparms
*sort2);
55
56
#endif
57
58
/*
59
* Local variables:
60
* c-basic-offset: 4
61
* c-file-style: "Stroustrup"
62
* indent-tabs-mode: nil
63
* End:
64
* vim: shiftwidth=4 tabstop=8 expandtab
65
*/
66
Generated on Fri May 24 2013 10:47:20 for pazpar2 by
1.8.1.2