pazpar2  1.14.1
Enumerations | Functions
client.h File Reference

Z39.50 client. More...

#include "facet_limit.h"
#include "reclists.h"

Go to the source code of this file.

Enumerations

enum  client_state {
  Client_Connecting , Client_Idle , Client_Working , Client_Error ,
  Client_Failed , Client_Disconnected
}
 

Functions

int clients_get_count (void)
 
int client_show_raw_begin (struct client *cl, int position, const char *syntax, const char *esn, void *data, void(*error_handler)(void *data, const char *addinfo), void(*record_handler)(void *data, const char *buf, size_t sz), int binary, const char *nativesyntax)
 
void client_show_raw_remove (struct client *cl, void *rr)
 
const char * client_get_state_str (struct client *cl)
 
enum client_state client_get_state (struct client *cl)
 
void client_set_state (struct client *cl, enum client_state st)
 
void client_set_state_nb (struct client *cl, enum client_state st)
 
struct connectionclient_get_connection (struct client *cl)
 
struct session_databaseclient_get_database (struct client *cl)
 
void client_set_database (struct client *cl, struct session_database *db)
 
struct sessionclient_get_session (struct client *cl)
 
void client_search_response (struct client *cl)
 
void client_record_response (struct client *cl, int *got_records)
 
struct clientclient_create (const char *url)
 
int client_destroy (struct client *c)
 
void client_set_connection (struct client *cl, struct connection *con)
 
void client_disconnect (struct client *cl)
 
void client_mark_dead (struct client *cl)
 
int client_prep_connection (struct client *cl, int operation_timeout, int session_timeout, iochan_man_t iochan, const struct timeval *abstime)
 
int client_start_search (struct client *cl)
 
int client_fetch_more (struct client *cl)
 
int client_parse_init (struct client *cl, int same_search)
 
int client_parse_range (struct client *cl, const char *startrecs, const char *maxrecs)
 
int client_parse_sort (struct client *cl, struct reclist_sortparms *sp, int *has_sortmap)
 
void client_set_session (struct client *cl, struct session *se)
 
int client_is_active (struct client *cl)
 
int client_is_active_preferred (struct client *cl)
 
struct clientclient_next_in_session (struct client *cl)
 
int client_parse_query (struct client *cl, const char *query, facet_limits_t facet_limits, const char **error_msg)
 
Odr_int client_get_hits (struct client *cl)
 
Odr_int client_get_approximation (struct client *cl)
 
int client_get_num_records (struct client *cl, int *filtered, int *ingest, int *failed)
 
int client_get_diagnostic (struct client *cl, const char **message, const char **addinfo)
 
void client_set_diagnostic (struct client *cl, int diagnostic, const char *message, const char *addinfo)
 
const char * client_get_id (struct client *cl)
 
int client_get_maxrecs (struct client *cl)
 
void client_remove_from_session (struct client *c)
 
void client_incref (struct client *c)
 
void client_got_records (struct client *c)
 
void client_lock (struct client *c)
 
void client_unlock (struct client *c)
 
void client_stop (struct client *c)
 
int client_has_facet (struct client *cl, const char *name)
 
int client_reingest (struct client *cl)
 
const char * client_get_facet_limit_local (struct client *cl, struct session_database *sdb, int *l, NMEM nmem, int *num, char ***values)
 
const char * client_get_suggestions_xml (struct client *cl, WRBUF wrbuf)
 
void client_update_show_stat (struct client *cl, int cmd)
 
void client_store_xdoc (struct client *cl, int record_no, xmlDoc *xdoc)
 
const char * client_get_query (struct client *cl, const char **type, NMEM nmem)
 

Detailed Description

Z39.50 client.

Definition in file client.h.

Enumeration Type Documentation

◆ client_state

Enumerator
Client_Connecting 
Client_Idle 
Client_Working 
Client_Error 
Client_Failed 
Client_Disconnected 

Definition at line 33 of file client.h.

Function Documentation

◆ client_create()

struct client* client_create ( const char *  url)

◆ client_destroy()

int client_destroy ( struct client c)

◆ client_disconnect()

void client_disconnect ( struct client cl)

◆ client_fetch_more()

int client_fetch_more ( struct client cl)

◆ client_get_approximation()

Odr_int client_get_approximation ( struct client cl)

Definition at line 1751 of file client.c.

References client_get_id(), client::filtered, client::hits, and client::record_offset.

Referenced by hitsbytarget_nb(), and show_range_start().

◆ client_get_connection()

struct connection* client_get_connection ( struct client cl)

◆ client_get_database()

struct session_database* client_get_database ( struct client cl)

◆ client_get_diagnostic()

int client_get_diagnostic ( struct client cl,
const char **  message,
const char **  addinfo 
)

Definition at line 1789 of file client.c.

References client::addinfo, client::diagnostic, and client::message.

Referenced by hitsbytarget_nb().

◆ client_get_facet_limit_local()

const char* client_get_facet_limit_local ( struct client cl,
struct session_database sdb,
int *  l,
NMEM  nmem,
int *  num,
char ***  values 
)

◆ client_get_hits()

Odr_int client_get_hits ( struct client cl)

◆ client_get_id()

const char* client_get_id ( struct client cl)

◆ client_get_maxrecs()

int client_get_maxrecs ( struct client cl)

Definition at line 1838 of file client.c.

References client::maxrecs.

Referenced by ingest_to_cluster().

◆ client_get_num_records()

int client_get_num_records ( struct client cl,
int *  filtered,
int *  ingest,
int *  failed 
)

◆ client_get_query()

const char* client_get_query ( struct client cl,
const char **  type,
NMEM  nmem 
)

Definition at line 894 of file client.c.

References client::cqlquery, and client::pquery.

Referenced by hitsbytarget_nb().

◆ client_get_session()

struct session* client_get_session ( struct client cl)

◆ client_get_state()

enum client_state client_get_state ( struct client cl)

Definition at line 161 of file client.c.

References client_states, and client::state.

Referenced by session_fetch_more(), session_sort(), and statistics().

◆ client_get_state_str()

const char* client_get_state_str ( struct client cl)

Definition at line 161 of file client.c.

Referenced by hitsbytarget_nb(), and session_fetch_more().

◆ client_get_suggestions_xml()

const char* client_get_suggestions_xml ( struct client cl,
WRBUF  wrbuf 
)

Definition at line 1799 of file client.c.

References suggestions::num, suggestions::passthrough, and client::suggestions.

Referenced by hitsbytarget_nb().

◆ client_got_records()

void client_got_records ( struct client c)

◆ client_has_facet()

int client_has_facet ( struct client cl,
const char *  name 
)

◆ client_incref()

void client_incref ( struct client c)

Definition at line 1101 of file client.c.

References client_get_id(), client::mutex, pazpar2_incref(), and client::ref_count.

Referenced by client_set_connection().

◆ client_is_active()

int client_is_active ( struct client cl)

◆ client_is_active_preferred()

int client_is_active_preferred ( struct client cl)

◆ client_lock()

void client_lock ( struct client c)

◆ client_mark_dead()

void client_mark_dead ( struct client cl)

Definition at line 1170 of file client.c.

References client::connection, and connection_mark_dead().

Referenced by session_remove_cached_clients().

◆ client_next_in_session()

struct client* client_next_in_session ( struct client cl)

◆ client_parse_init()

int client_parse_init ( struct client cl,
int  same_search 
)

Definition at line 867 of file client.c.

References client::same_search.

Referenced by session_sort().

◆ client_parse_query()

int client_parse_query ( struct client cl,
const char *  query,
facet_limits_t  facet_limits,
const char **  error_msg 
)

◆ client_parse_range()

int client_parse_range ( struct client cl,
const char *  startrecs,
const char *  maxrecs 
)

Definition at line 876 of file client.c.

References client::maxrecs, client::same_search, and client::startrecs.

◆ client_parse_sort()

int client_parse_sort ( struct client cl,
struct reclist_sortparms sp,
int *  has_sortmap 
)

◆ client_prep_connection()

int client_prep_connection ( struct client cl,
int  operation_timeout,
int  session_timeout,
iochan_man_t  iochan,
const struct timeval *  abstime 
)

◆ client_record_response()

void client_record_response ( struct client cl,
int *  got_records 
)

◆ client_reingest()

int client_reingest ( struct client cl)

◆ client_remove_from_session()

void client_remove_from_session ( struct client c)

◆ client_search_response()

void client_search_response ( struct client cl)

◆ client_set_connection()

void client_set_connection ( struct client cl,
struct connection con 
)

◆ client_set_database()

void client_set_database ( struct client cl,
struct session_database db 
)

Definition at line 1828 of file client.c.

References client::database.

Referenced by select_targets_callback(), and session_remove_cached_clients().

◆ client_set_diagnostic()

void client_set_diagnostic ( struct client cl,
int  diagnostic,
const char *  message,
const char *  addinfo 
)

Definition at line 1777 of file client.c.

References client::addinfo, client::diagnostic, and client::message.

Referenced by connection_connect(), non_block_events(), and prepare_cclmap().

◆ client_set_session()

void client_set_session ( struct client cl,
struct session se 
)

◆ client_set_state()

void client_set_state ( struct client cl,
enum client_state  st 
)

◆ client_set_state_nb()

void client_set_state_nb ( struct client cl,
enum client_state  st 
)

Definition at line 171 of file client.c.

References client::state.

Referenced by connection_connect(), and prepare_cclmap().

◆ client_show_raw_begin()

int client_show_raw_begin ( struct client cl,
int  position,
const char *  syntax,
const char *  esn,
void *  data,
void(*)(void *data, const char *addinfo)  error_handler,
void(*)(void *data, const char *buf, size_t sz)  record_handler,
int  binary,
const char *  nativesyntax 
)

◆ client_show_raw_remove()

void client_show_raw_remove ( struct client cl,
void *  rr 
)

Definition at line 381 of file client.c.

References client_show_raw_delete(), show_raw::data, show_raw::next, and client::show_raw.

◆ client_start_search()

int client_start_search ( struct client cl)

◆ client_stop()

void client_stop ( struct client c)

◆ client_store_xdoc()

void client_store_xdoc ( struct client cl,
int  record_no,
xmlDoc *  xdoc 
)

Definition at line 228 of file client.c.

References client::xdoc, and XDOC_CACHE_SIZE.

Referenced by ingest_record().

◆ client_unlock()

void client_unlock ( struct client c)

◆ client_update_show_stat()

void client_update_show_stat ( struct client cl,
int  cmd 
)

Definition at line 814 of file client.c.

References client::show_stat_no.

Referenced by show_range_start().

◆ clients_get_count()

int clients_get_count ( void  )

Definition at line 93 of file client.c.

References client_use().

Referenced by cmd_info().