1 /* This file is part of Pazpar2.
2 Copyright (C) 2006-2013 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
27 #include "facet_limit.h"
43 int clients_count(void);
44 int client_show_raw_begin(struct client *cl, int position,
45 const char *syntax, const char *esn,
47 void (*error_handler)(void *data, const char *addinfo),
48 void (*record_handler)(void *data, const char *buf,
51 const char *nativesyntax);
53 void client_show_raw_remove(struct client *cl, void *rr);
55 const char *client_get_state_str(struct client *cl);
56 enum client_state client_get_state(struct client *cl);
57 void client_set_state(struct client *cl, enum client_state st);
58 void client_set_state_nb(struct client *cl, enum client_state st);
59 struct connection *client_get_connection(struct client *cl);
60 struct session_database *client_get_database(struct client *cl);
61 void client_set_database(struct client *cl, struct session_database *db);
62 struct session *client_get_session(struct client *cl);
64 void client_search_response(struct client *cl);
65 void client_record_response(struct client *cl, int *got_records);
67 struct client *client_create(const char *url);
68 int client_destroy(struct client *c);
70 void client_set_connection(struct client *cl, struct connection *con);
71 void client_disconnect(struct client *cl);
72 int client_prep_connection(struct client *cl,
73 int operation_timeout, int session_timeout,
75 const struct timeval *abstime);
76 int client_start_search(struct client *cl);
77 int client_fetch_more(struct client *cl);
78 int client_parse_init(struct client *cl, int same_search);
79 int client_parse_range(struct client *cl, const char *startrecs, const char *maxrecs);
80 int client_parse_sort(struct client *cl, struct reclist_sortparms *sp);
81 void client_set_session(struct client *cl, struct session *se);
82 int client_is_active(struct client *cl);
83 int client_is_active_preferred(struct client *cl);
84 struct client *client_next_in_session(struct client *cl);
86 int client_parse_query(struct client *cl, const char *query,
87 facet_limits_t facet_limits, const char **error_msg);
88 Odr_int client_get_hits(struct client *cl);
89 Odr_int client_get_approximation(struct client *cl);
90 int client_get_num_records(struct client *cl);
91 int client_get_num_records_filtered(struct client *cl);
92 int client_get_diagnostic(struct client *cl,
93 const char **message, const char **addinfo);
94 void client_set_diagnostic(struct client *cl, int diagnostic,
95 const char *message, const char *addinfo);
96 void client_set_database(struct client *cl, struct session_database *db);
97 const char *client_get_id(struct client *cl);
98 int client_get_maxrecs(struct client *cl);
99 void client_remove_from_session(struct client *c);
100 void client_incref(struct client *c);
101 void client_got_records(struct client *c);
102 void client_lock(struct client *c);
103 void client_unlock(struct client *c);
105 int client_has_facet(struct client *cl, const char *name);
106 void client_check_preferred_watch(struct client *cl);
107 int client_reingest(struct client *cl);
108 const char *client_get_facet_limit_local(struct client *cl,
109 struct session_database *sdb,
111 NMEM nmem, int *num, char ***values);
113 void client_update_show_stat(struct client *cl, int cmd);
120 * c-file-style: "Stroustrup"
121 * indent-tabs-mode: nil
123 * vim: shiftwidth=4 tabstop=8 expandtab