YAZ
5.34.0
|
Internal header for ZOOM implementation. More...
#include <yaz/proto.h>
#include <yaz/oid_db.h>
#include <yaz/comstack.h>
#include <yaz/wrbuf.h>
#include <yaz/zoom.h>
#include <yaz/srw.h>
#include <yaz/cookie.h>
#include <yaz/mutex.h>
Go to the source code of this file.
Data Structures | |
struct | ZOOM_connection_p |
struct | ZOOM_resultset_p |
struct | facet_term_p |
struct | ZOOM_facet_field_p |
struct | ZOOM_scanset_p |
struct | ZOOM_package_p |
struct | ZOOM_task_p |
Macros | |
#define | SHPTR 1 |
#define | STATE_IDLE 0 |
#define | STATE_CONNECTING 1 |
#define | STATE_ESTABLISHED 2 |
#define | RECORD_HASH_SIZE 131 |
#define | ZOOM_TASK_SEARCH 1 |
#define | ZOOM_TASK_CONNECT 3 |
#define | ZOOM_TASK_SCAN 4 |
#define | ZOOM_TASK_PACKAGE 5 |
#define | ZOOM_TASK_SORT 6 |
Typedefs | |
typedef struct ZOOM_Event_p * | ZOOM_Event |
typedef struct ZOOM_task_p * | ZOOM_task |
typedef struct ZOOM_record_cache_p * | ZOOM_record_cache |
Enumerations | |
enum | zoom_sru_mode { zoom_sru_error , zoom_sru_soap , zoom_sru_get , zoom_sru_post , zoom_sru_solr } |
enum | zoom_ret { zoom_pending , zoom_complete } |
Internal header for ZOOM implementation.
Definition in file zoom-p.h.
typedef struct ZOOM_Event_p* ZOOM_Event |
typedef struct ZOOM_record_cache_p* ZOOM_record_cache |
typedef struct ZOOM_task_p* ZOOM_task |
enum zoom_sru_mode |
zoom_ret send_Z3950_sort | ( | ZOOM_connection | c, |
ZOOM_resultset | resultset | ||
) |
Definition at line 1517 of file zoom-z3950.c.
References ZOOM_connection_p::error, Z_SortRequest::inputResultSetNames, ZOOM_connection_p::log_details, Z_SortRequest::num_inputResultSetNames, odr_malloc(), ZOOM_connection_p::odr_out, odr_strdup(), ZOOM_resultset_p::r_sort_spec, send_APDU(), ZOOM_resultset_p::setname, Z_SortRequest::sortedResultSetName, Z_APDU::sortRequest, Z_SortRequest::sortSequence, Z_APDU::u, yaz_log(), Z_APDU_sortRequest, zget_APDU(), and zoom_complete.
Referenced by send_Z3950_sort_present(), and ZOOM_connection_exec_task().
ZOOM_task ZOOM_connection_add_task | ( | ZOOM_connection | c, |
int | which | ||
) |
Definition at line 153 of file zoom-c.c.
References clear_error(), ZOOM_task_p::next, ZOOM_connection_p::tasks, and xmalloc.
Referenced by ZOOM_connection_connect(), ZOOM_connection_scan1(), ZOOM_connection_search(), ZOOM_package_send(), ZOOM_resultset_retrieve(), and ZOOM_resultset_sort1().
char** ZOOM_connection_get_databases | ( | ZOOM_connection | con, |
ZOOM_options | options, | ||
int * | num, | ||
ODR | odr | ||
) |
Definition at line 322 of file zoom-c.c.
References cs_get_host_args(), ZOOM_connection_p::host_port, nmem_strsplit(), odr_getmem, options(), and ZOOM_options_get().
Referenced by create_admin_package(), create_update_package(), ZOOM_connection_scan1(), and ZOOM_connection_search().
ZOOM_Event ZOOM_connection_get_event | ( | ZOOM_connection | c | ) |
Definition at line 52 of file zoom-event.c.
References ZOOM_connection_p::last_event, ZOOM_connection_p::m_queue_back, ZOOM_connection_p::m_queue_front, ZOOM_Event_p::next, ZOOM_Event_p::prev, and ZOOM_EVENT_NONE.
Referenced by ZOOM_connection_process(), and ZOOM_connection_remove_events().
void ZOOM_connection_put_event | ( | ZOOM_connection | c, |
ZOOM_Event | event | ||
) |
Definition at line 73 of file zoom-event.c.
References ZOOM_connection_p::m_queue_back, ZOOM_connection_p::m_queue_front, ZOOM_Event_p::next, and ZOOM_Event_p::prev.
Referenced by do_connect_host(), do_read(), do_write_ex(), handle_srw_response(), handle_Z3950_search_response(), record_cache_add(), send_APDU(), send_package(), ZOOM_connection_do_io(), ZOOM_connection_remove_task(), ZOOM_memcached_search(), ZOOM_record_cache_lookup(), ZOOM_send_GDU(), and ZOOM_test_reconnect().
void ZOOM_connection_remove_events | ( | ZOOM_connection | c | ) |
Definition at line 95 of file zoom-event.c.
References ZOOM_connection_get_event(), and ZOOM_Event_destroy().
Referenced by clear_error(), and ZOOM_connection_destroy().
void ZOOM_connection_remove_task | ( | ZOOM_connection | c | ) |
Definition at line 183 of file zoom-c.c.
References ZOOM_task_p::next, ZOOM_task_p::package, resultset_destroy(), ZOOM_task_p::scan, ZOOM_task_p::search, ZOOM_task_p::sort, ZOOM_connection_p::tasks, ZOOM_task_p::u, ZOOM_task_p::which, xfree, ZOOM_connection_put_event(), ZOOM_Event_create(), ZOOM_EVENT_END, ZOOM_package_destroy(), ZOOM_query_destroy(), ZOOM_scanset_destroy(), ZOOM_TASK_CONNECT, ZOOM_TASK_PACKAGE, ZOOM_TASK_SCAN, ZOOM_TASK_SEARCH, and ZOOM_TASK_SORT.
Referenced by do_connect_host(), handle_http(), ZOOM_connection_do_io(), ZOOM_connection_exec_task(), ZOOM_connection_remove_tasks(), and ZOOM_handle_Z3950_apdu().
void ZOOM_connection_remove_tasks | ( | ZOOM_connection | c | ) |
Definition at line 223 of file zoom-c.c.
References ZOOM_connection_p::tasks, and ZOOM_connection_remove_task().
Referenced by handle_Z3950_records(), handle_Z3950_sort_response(), ZOOM_connection_connect(), ZOOM_connection_destroy(), and ZOOM_connection_exec_task().
zoom_ret ZOOM_connection_srw_send_scan | ( | ZOOM_connection | c | ) |
Definition at line 92 of file zoom-sru.c.
References Z_SRW_scanRequest::maximumTerms, odr_intdup(), ZOOM_connection_p::odr_out, odr_strdup(), ZOOM_scanset_p::options, ZOOM_scanset_p::query, Z_SRW_scanRequest::queryType, Z_SRW_scanRequest::responsePosition, ZOOM_task_p::scan, Z_SRW_PDU::scan_request, Z_SRW_scanRequest::scanClause, send_srw(), ZOOM_connection_p::tasks, Z_SRW_PDU::u, ZOOM_task_p::u, Z_Query::which, ZOOM_task_p::which, yaz_encode_sru_extra(), Z_Query_type_1, Z_Query_type_101, Z_Query_type_104, Z_SRW_scan_request, zoom_complete, ZOOM_ERROR_UNSUPPORTED_QUERY, ZOOM_options_get(), ZOOM_options_get_int(), ZOOM_query_get_query_string(), ZOOM_query_get_Z_Query(), ZOOM_set_error(), ZOOM_srw_get_pdu(), and ZOOM_TASK_SCAN.
Referenced by ZOOM_connection_exec_task().
zoom_ret ZOOM_connection_srw_send_search | ( | ZOOM_connection | c | ) |
Definition at line 145 of file zoom-sru.c.
References Z_External::cql, ZOOM_connection_p::error, Z_SRW_searchRetrieveRequest::facetList, ZOOM_resultset_p::live_set, Z_SRW_searchRetrieveRequest::maximumRecords, ZOOM_resultset_p::odr, odr_intdup(), ZOOM_connection_p::odr_out, odr_strdup(), odr_strdup_null(), ZOOM_resultset_p::options, Z_SRW_searchRetrieveRequest::query, ZOOM_resultset_p::query, Z_SRW_searchRetrieveRequest::queryType, Z_SRW_searchRetrieveRequest::recordPacking, Z_SRW_searchRetrieveRequest::recordSchema, ZOOM_resultset_p::req_facets, Z_SRW_PDU::request, ZOOM_task_p::search, send_srw(), ZOOM_resultset_p::setname, ZOOM_resultset_p::size, Z_SRW_searchRetrieveRequest::sort, Z_SRW_searchRetrieveRequest::sort_type, Z_SRW_searchRetrieveRequest::sortKeys, Z_SRW_searchRetrieveRequest::startRecord, ZOOM_resultset_p::step, ZOOM_connection_p::tasks, Z_Query::type_1, Z_Query::type_104, Z_External::u, Z_SRW_PDU::u, Z_Query::u, ZOOM_task_p::u, Z_External::which, Z_Query::which, ZOOM_task_p::which, yaz_encode_sru_extra(), yaz_pqf_parse_facet_list(), Z_External_CQL, Z_Query_type_1, Z_Query_type_104, Z_SRW_searchRetrieve_request, Z_SRW_sort_type_sort, zoom_complete, ZOOM_ERROR_UNSUPPORTED_QUERY, ZOOM_memcached_search(), ZOOM_options_set(), ZOOM_query_get_query_string(), ZOOM_query_get_sru11(), ZOOM_query_get_Z_Query(), ZOOM_record_cache_lookup(), ZOOM_resultset_option_get(), ZOOM_set_error(), ZOOM_srw_get_pdu(), and ZOOM_TASK_SEARCH.
Referenced by handle_srw_response(), and ZOOM_connection_exec_task().
zoom_ret ZOOM_connection_Z3950_search | ( | ZOOM_connection | c | ) |
Definition at line 1627 of file zoom-z3950.c.
References ZOOM_connection_p::error, ZOOM_resultset_p::live_set, ZOOM_connection_p::log_details, ZOOM_task_p::search, ZOOM_resultset_p::size, yaz_facet_attr::start, ZOOM_connection_p::tasks, ZOOM_task_p::u, ZOOM_task_p::which, YAZ_BIB1_PRESENT_REQUEST_OUT_OF_RANGE, yaz_log(), Z3950_send_present(), Z3950_send_search(), zoom_complete, ZOOM_memcached_search(), ZOOM_record_cache_lookup(), ZOOM_set_dset_error(), ZOOM_TASK_SEARCH, and ZOOM_TASK_SORT.
Referenced by send_Z3950_sort_present(), ZOOM_connection_exec_task(), and ZOOM_handle_Z3950_apdu().
zoom_ret ZOOM_connection_Z3950_send_init | ( | ZOOM_connection | c | ) |
Definition at line 570 of file zoom-z3950.c.
References ZOOM_connection_p::charset, Z_OtherInformationUnit::externallyDefinedInfo, ZOOM_connection_p::group, Z_IdPass::groupId, ZOOM_connection_p::host_port, Z_InitRequest::idAuthentication, Z_IdAuthentication::idPass, Z_InitRequest::implementationId, Z_InitRequest::implementationName, Z_InitRequest::implementationVersion, Z_OtherInformationUnit::information, Z_APDU::initRequest, ZOOM_connection_p::lang, ZOOM_connection_p::maximum_record_size, Z_InitRequest::maximumRecordSize, odr_malloc(), ODR_MASK_SET, ZOOM_connection_p::odr_out, odr_prepend(), odr_strdup(), odr_strdup_null(), Z_IdAuthentication::open, Z_InitRequest::options, ZOOM_connection_p::options, Z_InitRequest::otherInfo, Z_IdPass::password, ZOOM_connection_p::password, ZOOM_connection_p::preferred_message_size, Z_InitRequest::preferredMessageSize, Z_InitRequest::protocolVersion, ZOOM_connection_p::proxy_mode, send_APDU(), Z_APDU::u, Z_IdAuthentication::u, ZOOM_connection_p::user, Z_IdPass::userId, Z_IdAuthentication::which, Z_OtherInformationUnit::which, yaz_oi_APDU(), yaz_oi_set_string_oid(), yaz_oi_update(), yaz_oid_userinfo_proxy, yaz_set_proposal_charneg_list(), Z_APDU_initRequest, Z_IdAuthentication_idPass, Z_IdAuthentication_open, Z_Options_extendedServices, Z_Options_namedResultSets, Z_Options_negotiationModel, Z_Options_present, Z_Options_scan, Z_Options_search, Z_Options_sort, Z_OtherInfo_externallyDefinedInfo, Z_ProtocolVersion_1, Z_ProtocolVersion_2, Z_ProtocolVersion_3, zget_APDU(), and ZOOM_options_get().
Referenced by do_connect_host(), and ZOOM_connection_do_io().
zoom_ret ZOOM_connection_Z3950_send_scan | ( | ZOOM_connection | c | ) |
Definition at line 819 of file zoom-z3950.c.
References Z_ScanRequest::attributeSet, Z_RPNQuery::attributeSetId, Z_Operand::attributesPlusTerm, Z_ScanRequest::databaseNames, ZOOM_scanset_p::databaseNames, ZOOM_connection_p::log_details, Z_ScanRequest::num_databaseNames, ZOOM_scanset_p::num_databaseNames, Z_ScanRequest::numberOfTermsRequested, odr_intdup(), odr_oiddup(), ZOOM_connection_p::odr_out, ZOOM_scanset_p::options, Z_ScanRequest::preferredPositionInResponse, ZOOM_scanset_p::query, Z_RPNQuery::RPNStructure, ZOOM_task_p::scan, Z_APDU::scanRequest, send_APDU(), Z_RPNStructure::simple, Z_ScanRequest::stepSize, ZOOM_connection_p::tasks, Z_ScanRequest::termListAndStartPoint, Z_Query::type_1, Z_APDU::u, Z_Query::u, Z_RPNStructure::u, Z_Operand::u, ZOOM_task_p::u, Z_Query::which, Z_RPNStructure::which, Z_Operand::which, ZOOM_task_p::which, yaz_copy_z_RPNQuery(), yaz_iconv_close(), yaz_iconv_open(), yaz_log(), yaz_oid_attset_bib_1, yaz_query_charset_convert_rpnquery(), Z_APDU_scanRequest, Z_Operand_APT, Z_Query_type_1, Z_Query_type_101, Z_RPNStructure_simple, zget_APDU(), zoom_complete, ZOOM_ERROR_INVALID_QUERY, ZOOM_ERROR_UNSUPPORTED_QUERY, ZOOM_options_get(), ZOOM_options_get_int(), ZOOM_query_get_Z_Query(), ZOOM_set_error(), and ZOOM_TASK_SCAN.
Referenced by ZOOM_connection_exec_task().
ZOOM_Event ZOOM_Event_create | ( | int | kind | ) |
Definition at line 42 of file zoom-event.c.
References xmalloc.
Referenced by do_connect_host(), do_read(), do_write_ex(), handle_srw_response(), handle_Z3950_search_response(), record_cache_add(), send_APDU(), send_package(), ZOOM_connection_do_io(), ZOOM_connection_remove_task(), ZOOM_memcached_search(), ZOOM_record_cache_lookup(), ZOOM_send_GDU(), and ZOOM_test_reconnect().
void ZOOM_Event_destroy | ( | ZOOM_Event | event | ) |
Definition at line 90 of file zoom-event.c.
References xfree.
Referenced by ZOOM_connection_process(), and ZOOM_connection_remove_events().
void ZOOM_handle_facet_list | ( | ZOOM_resultset | r, |
Z_FacetList * | fl | ||
) |
Definition at line 1190 of file zoom-z3950.c.
References Z_FacetList::elements, ZOOM_resultset_p::facets_names, get_zoom_facet_field(), Z_FacetList::num, ZOOM_resultset_p::num_res_facets, ZOOM_resultset_p::odr, odr_malloc(), ZOOM_resultset_p::res_facets, yaz_log(), YLOG_DEBUG, and ZOOM_facet_field_name().
Referenced by handle_srw_response(), and ZOOM_handle_facet_result().
void ZOOM_handle_facet_result | ( | ZOOM_connection | c, |
ZOOM_resultset | r, | ||
Z_OtherInformation * | o | ||
) |
Definition at line 1211 of file zoom-z3950.c.
References Z_OtherInformationUnit::externallyDefinedInfo, Z_External::facetList, Z_OtherInformationUnit::information, Z_OtherInformation::list, Z_OtherInformation::num_elements, Z_External::u, Z_External::which, Z_OtherInformationUnit::which, Z_External_userFacets, Z_OtherInfo_externallyDefinedInfo, and ZOOM_handle_facet_list().
Referenced by handle_Z3950_search_response(), and ZOOM_memcached_search().
void ZOOM_handle_search_result | ( | ZOOM_connection | c, |
ZOOM_resultset | resultset, | ||
Z_OtherInformation * | o | ||
) |
Definition at line 1266 of file zoom-z3950.c.
References Z_SearchInfoReport::elements, Z_OtherInformationUnit::externallyDefinedInfo, handle_queryExpression(), Z_OtherInformationUnit::information, Z_OtherInformation::list, Z_SearchInfoReport::num, Z_OtherInformation::num_elements, ZOOM_resultset_p::options, Z_External::searchResult1, Z_SearchInfoReport_s::subqueryCount, Z_SearchInfoReport_s::subqueryExpression, Z_SearchInfoReport_s::subqueryId, Z_SearchInfoReport_s::subqueryInterpretation, Z_SearchInfoReport_s::subqueryRecommendation, Z_External::u, Z_External::which, Z_OtherInformationUnit::which, yaz_snprintf(), Z_External_searchResult1, Z_OtherInfo_externallyDefinedInfo, ZOOM_options_set(), and ZOOM_options_set_int().
Referenced by handle_Z3950_search_response(), and ZOOM_memcached_search().
int ZOOM_handle_sru | ( | ZOOM_connection | c, |
Z_HTTP_Response * | hres, | ||
zoom_ret * | cret, | ||
char ** | addinfo | ||
) |
Definition at line 417 of file zoom-sru.c.
References Z_HTTP_Response::code, Z_HTTP_Response::content_buf, Z_HTTP_Response::content_len, Z_SRW_PDU::extraResponseData_buf, Z_SRW_PDU::extraResponseData_len, Z_SOAP::fault, Z_SOAP_Fault::fault_code, Z_SOAP_Fault::fault_string, Z_SOAP::generic, handle_srw_response(), handle_srw_scan_response(), ZOOM_connection_p::odr_in, odr_malloc(), ZOOM_connection_p::options, Z_SOAP_Generic::p, Z_SRW_PDU::response, Z_SRW_PDU::scan_response, ZOOM_connection_p::sru_mode, Z_SRW_PDU::srw_version, Z_SOAP::u, Z_SRW_PDU::u, Z_SOAP::which, Z_SRW_PDU::which, yaz_solr_decode_response(), yaz_srw_check_content_type(), yaz_srw_codec(), YAZ_XMLNS_SRU_v1_response, YAZ_XMLNS_SRU_v2_mask, z_soap_codec(), Z_SOAP_error, Z_SOAP_fault, Z_SOAP_generic, Z_SRW_scan_response, Z_SRW_searchRetrieve_response, ZOOM_options_set(), ZOOM_options_setl(), ZOOM_set_HTTP_error(), and zoom_sru_solr.
Referenced by handle_http().
void ZOOM_handle_Z3950_apdu | ( | ZOOM_connection | c, |
Z_APDU * | apdu | ||
) |
Definition at line 1699 of file zoom-z3950.c.
References Z_APDU::close, Z_Close::diagnosticInformation, Z_APDU::extendedServicesResponse, handle_Z3950_es_response(), handle_Z3950_present_response(), handle_Z3950_scan_response(), handle_Z3950_search_response(), handle_Z3950_sort_response(), Z_InitResponse::implementationId, Z_InitResponse::implementationName, Z_InitResponse::implementationVersion, Z_APDU::initResponse, ZOOM_connection_p::log_api, ZOOM_connection_p::log_details, nmem_create(), nmem_destroy(), ODR_MASK_GET, Z_InitResponse::options, Z_InitResponse::otherInfo, Z_APDU::presentResponse, Z_InitResponse::protocolVersion, response_default_diag(), Z_InitResponse::result, Z_APDU::scanResponse, Z_APDU::searchResponse, send_Z3950_sort_present(), set_init_option(), Z_APDU::sortResponse, Z_APDU::u, Z_APDU::which, xfree, xstrdup, yaz_decode_init_diag(), yaz_get_charneg_record(), yaz_get_response_charneg(), yaz_init_opt_decode(), yaz_log(), yaz_oi_get_string_oid(), yaz_oid_userinfo_cookie, Z_APDU_close, Z_APDU_extendedServicesResponse, Z_APDU_initResponse, Z_APDU_presentResponse, Z_APDU_scanResponse, Z_APDU_searchResponse, Z_APDU_sortResponse, Z_Options_namedResultSets, Z_Options_negotiationModel, Z_ProtocolVersion_3, zoom_complete, ZOOM_connection_close(), ZOOM_connection_exec_task(), ZOOM_connection_option_set(), ZOOM_connection_remove_task(), ZOOM_connection_set_mask(), ZOOM_connection_Z3950_search(), ZOOM_ERROR_CONNECTION_LOST, ZOOM_ERROR_DECODE, ZOOM_ERROR_INIT, ZOOM_set_dset_error(), ZOOM_set_error(), ZOOM_TASK_CONNECT, and ZOOM_test_reconnect().
Referenced by do_read().
void ZOOM_memcached_add | ( | ZOOM_resultset | r, |
Z_NamePlusRecord * | npr, | ||
int | pos, | ||
const char * | syntax, | ||
const char * | elementSetName, | ||
const char * | schema, | ||
Z_SRW_diagnostic * | diag | ||
) |
Definition at line 424 of file zoom-memcached.c.
References ZOOM_resultset_p::connection, ZOOM_connection_p::expire_record, ZOOM_connection_p::expire_search, ZOOM_resultset_p::mc_key, odr_createmem(), odr_destroy(), ODR_ENCODE, odr_getbuf(), Z_NamePlusRecord::which, wrbuf_alloc(), wrbuf_buf, wrbuf_cstr(), wrbuf_destroy(), wrbuf_len, wrbuf_printf(), wrbuf_sha1_write(), wrbuf_write(), yaz_log(), YLOG_LOG, z_NamePlusRecord(), and Z_NamePlusRecord_databaseRecord.
Referenced by ZOOM_record_cache_add().
int ZOOM_memcached_configure | ( | ZOOM_connection | c | ) |
Definition at line 132 of file zoom-memcached.c.
References ZOOM_connection_p::expire_record, ZOOM_connection_p::expire_search, ZOOM_connection_p::options, ZOOM_ERROR_MEMCACHED, ZOOM_options_get(), and ZOOM_set_error().
Referenced by ZOOM_connection_connect().
void ZOOM_memcached_destroy | ( | ZOOM_connection | c | ) |
Definition at line 35 of file zoom-memcached.c.
Referenced by ZOOM_connection_destroy().
void ZOOM_memcached_hitcount | ( | ZOOM_connection | c, |
ZOOM_resultset | result, | ||
Z_OtherInformation * | oi, | ||
const char * | precision | ||
) |
Definition at line 342 of file zoom-memcached.c.
References ZOOM_connection_p::expire_search, ZOOM_resultset_p::live_set, ZOOM_resultset_p::mc_key, odr_createmem(), odr_destroy(), ODR_ENCODE, odr_getbuf(), ODR_INT_PRINTF, odr_malloc(), ZOOM_resultset_p::size, wrbuf_buf, wrbuf_cstr(), wrbuf_len, yaz_log(), YLOG_LOG, and z_OtherInformation().
Referenced by handle_srw_response(), and handle_Z3950_search_response().
void ZOOM_memcached_init | ( | ZOOM_connection | c | ) |
Definition at line 23 of file zoom-memcached.c.
References ZOOM_connection_p::expire_record, and ZOOM_connection_p::expire_search.
Referenced by ZOOM_connection_create().
Z_NamePlusRecord* ZOOM_memcached_lookup | ( | ZOOM_resultset | r, |
int | pos, | ||
const char * | syntax, | ||
const char * | elementSetName, | ||
const char * | schema | ||
) |
Definition at line 535 of file zoom-memcached.c.
References ZOOM_resultset_p::connection, free(), ZOOM_resultset_p::mc_key, ZOOM_resultset_p::odr, odr_setbuf(), wrbuf_alloc(), wrbuf_buf, wrbuf_cstr(), wrbuf_destroy(), wrbuf_len, wrbuf_printf(), wrbuf_write(), yaz_log(), YLOG_LOG, and z_NamePlusRecord().
Referenced by ZOOM_record_cache_lookup().
void ZOOM_memcached_resultset | ( | ZOOM_resultset | r, |
ZOOM_query | q | ||
) |
Definition at line 203 of file zoom-memcached.c.
References ZOOM_resultset_p::connection, ZOOM_connection_p::group, ZOOM_connection_p::host_port, ZOOM_resultset_p::mc_key, ZOOM_connection_p::password, ZOOM_resultset_p::req_facets, ZOOM_connection_p::user, wrbuf_alloc(), wrbuf_cstr(), wrbuf_destroy(), wrbuf_puts(), wrbuf_sha1_puts(), wrbuf_vary_puts(), ZOOM_query_get_hash(), and ZOOM_resultset_option_get().
Referenced by ZOOM_connection_search().
void ZOOM_memcached_search | ( | ZOOM_connection | c, |
ZOOM_resultset | r | ||
) |
Definition at line 230 of file zoom-memcached.c.
References free(), ZOOM_resultset_p::live_set, ZOOM_resultset_p::mc_key, ZOOM_resultset_p::odr, odr_atoi(), odr_setbuf(), ZOOM_resultset_p::size, wrbuf_buf, wrbuf_cstr(), wrbuf_len, yaz_log(), YLOG_LOG, YLOG_WARN, z_OtherInformation(), ZOOM_connection_put_event(), ZOOM_Event_create(), ZOOM_EVENT_RECV_SEARCH, ZOOM_handle_facet_result(), and ZOOM_handle_search_result().
Referenced by ZOOM_connection_srw_send_search(), and ZOOM_connection_Z3950_search().
void ZOOM_options_addref | ( | ZOOM_options | opt | ) |
Definition at line 113 of file zoom-opt.c.
References opt.
void ZOOM_query_get_hash | ( | ZOOM_query | s, |
WRBUF | w | ||
) |
Definition at line 144 of file zoom-query.c.
References ZOOM_query_p::query_string, ZOOM_query_p::query_type, ZOOM_query_p::sort_spec, ZOOM_query_p::sort_strategy, wrbuf_printf(), wrbuf_puts(), and yaz_sort_spec_to_type7().
Referenced by ZOOM_memcached_resultset().
const char* ZOOM_query_get_query_string | ( | ZOOM_query | s | ) |
Definition at line 139 of file zoom-query.c.
References ZOOM_query_p::full_query, and wrbuf_cstr().
Referenced by ZOOM_connection_srw_send_scan(), and ZOOM_connection_srw_send_search().
Z_SortKeySpecList* ZOOM_query_get_sortspec | ( | ZOOM_query | s | ) |
Definition at line 134 of file zoom-query.c.
References ZOOM_query_p::sort_spec, ZOOM_query_p::sort_strategy, and SORT_STRATEGY_Z3950.
Referenced by ZOOM_connection_exec_task(), and ZOOM_connection_search().
const char* ZOOM_query_get_sru11 | ( | ZOOM_query | s | ) |
Definition at line 122 of file zoom-query.c.
References ZOOM_query_p::sru11_sort_spec, wrbuf_cstr(), and wrbuf_len.
Referenced by ZOOM_connection_srw_send_search().
Z_Query* ZOOM_query_get_Z_Query | ( | ZOOM_query | s | ) |
Definition at line 129 of file zoom-query.c.
References ZOOM_query_p::z_query.
Referenced by Z3950_send_search(), ZOOM_connection_scan1(), ZOOM_connection_srw_send_scan(), ZOOM_connection_srw_send_search(), and ZOOM_connection_Z3950_send_scan().
void ZOOM_record_cache_add | ( | ZOOM_resultset | r, |
Z_NamePlusRecord * | npr, | ||
int | pos, | ||
const char * | syntax, | ||
const char * | elementSetName, | ||
const char * | schema, | ||
Z_SRW_diagnostic * | diag | ||
) |
Definition at line 124 of file zoom-record-cache.c.
References ZOOM_record_p::npr, record_cache_add(), ZOOM_record_p::schema, and ZOOM_memcached_add().
Referenced by handle_srw_response(), and handle_Z3950_records().
ZOOM_record ZOOM_record_cache_lookup | ( | ZOOM_resultset | r, |
int | pos, | ||
const char * | syntax, | ||
const char * | elementSetName, | ||
const char * | schema | ||
) |
Definition at line 157 of file zoom-record-cache.c.
References ZOOM_resultset_p::connection, ZOOM_record_p::npr, record_cache_add(), ZOOM_record_p::schema, ZOOM_connection_put_event(), ZOOM_Event_create(), ZOOM_EVENT_RECV_RECORD, ZOOM_memcached_lookup(), and ZOOM_record_cache_lookup_i().
Referenced by handle_srw_response(), ZOOM_connection_srw_send_search(), and ZOOM_connection_Z3950_search().
ZOOM_record ZOOM_record_cache_lookup_i | ( | ZOOM_resultset | r, |
int | pos, | ||
const char * | syntax, | ||
const char * | elementSetName, | ||
const char * | schema | ||
) |
Definition at line 134 of file zoom-record-cache.c.
References ZOOM_record_cache_p::elementSetName, ZOOM_record_cache_p::next, ZOOM_record_cache_p::pos, ZOOM_record_cache_p::rec, record_hash(), ZOOM_resultset_p::record_hash, ZOOM_record_p::schema, ZOOM_record_cache_p::schema, ZOOM_record_cache_p::syntax, and yaz_strcmp_null().
Referenced by ZOOM_record_cache_lookup(), and ZOOM_resultset_record_immediate().
zoom_ret ZOOM_send_buf | ( | ZOOM_connection | c | ) |
Definition at line 1763 of file zoom-c.c.
References ZOOM_connection_p::buf_out, do_write_ex(), and ZOOM_connection_p::len_out.
Referenced by send_APDU(), send_package(), ZOOM_connection_do_io(), and ZOOM_send_GDU().
zoom_ret ZOOM_send_GDU | ( | ZOOM_connection | c, |
Z_GDU * | gdu | ||
) |
Definition at line 1526 of file zoom-c.c.
References ZOOM_connection_p::buf_out, ZOOM_connection_p::len_out, odr_getbuf(), ZOOM_connection_p::odr_out, ZOOM_connection_p::odr_print, odr_reset(), ZOOM_connection_p::odr_save, z_GDU(), zoom_complete, ZOOM_connection_put_event(), ZOOM_Event_create(), ZOOM_EVENT_SEND_APDU, and ZOOM_send_buf().
Referenced by send_HTTP_redirect(), and send_srw().
void ZOOM_set_dset_error | ( | ZOOM_connection | c, |
int | error, | ||
const char * | dset, | ||
const char * | addinfo, | ||
const char * | addinfo2 | ||
) |
Definition at line 54 of file zoom-c.c.
References ZOOM_connection_p::addinfo, ZOOM_connection_p::diagset, ZOOM_connection_p::error, ZOOM_connection_p::host_port, ZOOM_connection_p::log_api, xfree, xmalloc, xstrdup, yaz_log(), and ZOOM_ERROR_NONE.
Referenced by response_default_diag(), set_SRU_error(), ZOOM_connection_Z3950_search(), ZOOM_handle_Z3950_apdu(), ZOOM_set_error(), and ZOOM_set_HTTP_error().
void ZOOM_set_error | ( | ZOOM_connection | c, |
int | error, | ||
const char * | addinfo | ||
) |
Definition at line 98 of file zoom-c.c.
References ZOOM_set_dset_error().
Referenced by clear_error(), cql2pqf(), create_update_package(), do_connect_host(), do_read(), do_write_ex(), encode_APDU(), handle_http(), handle_Z3950_es_response(), handle_Z3950_records(), response_diag(), Z3950_send_search(), ZOOM_connection_connect(), ZOOM_connection_create(), ZOOM_connection_do_io(), ZOOM_connection_srw_send_scan(), ZOOM_connection_srw_send_search(), ZOOM_connection_Z3950_send_scan(), ZOOM_handle_Z3950_apdu(), and ZOOM_memcached_configure().
void ZOOM_set_HTTP_error | ( | ZOOM_connection | c, |
int | error, | ||
const char * | addinfo, | ||
const char * | addinfo2 | ||
) |
Definition at line 1546 of file zoom-c.c.
References ZOOM_set_dset_error().
Referenced by handle_http(), and ZOOM_handle_sru().
int ZOOM_test_reconnect | ( | ZOOM_connection | c | ) |
Definition at line 904 of file zoom-c.c.
References ZOOM_connection_p::reconnect_ok, ZOOM_task_p::running, ZOOM_connection_p::tasks, ZOOM_connection_close(), ZOOM_connection_insert_task(), ZOOM_connection_put_event(), ZOOM_EVENT_CONNECT, ZOOM_Event_create(), and ZOOM_TASK_CONNECT.
Referenced by do_read(), do_write_ex(), ZOOM_connection_do_io(), and ZOOM_handle_Z3950_apdu().
int ZOOM_uri_to_code | ( | const char * | uri | ) |
Definition at line 89 of file zoom-c.c.
Referenced by set_SRU_error(), and ZOOM_record_error().