Logo Search packages:      
Sourcecode: yaz version File versions

zoom-c.c File Reference


Detailed Description

Implements ZOOM C interface.

Definition in file zoom-c.c.

#include <assert.h>
#include <string.h>
#include "zoom-p.h"
#include <yaz/yaz-util.h>
#include <yaz/xmalloc.h>
#include <yaz/otherinfo.h>
#include <yaz/log.h>
#include <yaz/pquery.h>
#include <yaz/marcdisp.h>
#include <yaz/diagbib1.h>
#include <yaz/charneg.h>
#include <yaz/ill.h>
#include <yaz/srw.h>

Go to the source code of this file.

Enumerations

enum  zoom_ret { zoom_pending, zoom_complete }

Functions

static void clear_error (ZOOM_connection c)
Z_APDU * create_admin_package (ZOOM_package p, int type, Z_ESAdminOriginPartToKeep **toKeepP, Z_ESAdminOriginPartNotToKeep **notToKeepP)
static Z_APDU * create_es_package (ZOOM_package p, int type)
static Z_APDU * create_update_package (ZOOM_package p)
static void do_close (ZOOM_connection c)
static zoom_ret do_connect (ZOOM_connection c)
static int do_read (ZOOM_connection c)
static zoom_ret do_write (ZOOM_connection c)
static zoom_ret do_write_ex (ZOOM_connection c, char *buf_out, int len_out)
static int encode_APDU (ZOOM_connection c, Z_APDU *a, ODR out)
static Z_External * encode_ill_request (ZOOM_package p)
static Z_ItemOrder * encode_item_order (ZOOM_package p)
static int es_response (ZOOM_connection c, Z_ExtendedServicesResponse *res)
static void get_cert (ZOOM_connection c)
static void handle_apdu (ZOOM_connection c, Z_APDU *apdu)
static void handle_present_response (ZOOM_connection c, Z_PresentResponse *pr)
static void handle_records (ZOOM_connection c, Z_Records *sr, int present_phase)
static void handle_search_response (ZOOM_connection c, Z_SearchResponse *sr)
static const char * ill_array_lookup (void *clientData, const char *idx)
static const char * marc_iconv_return (ZOOM_record rec, int marc_type, int *len, const char *buf, int sz, const char *record_charset)
static void otherInfo_attach (ZOOM_connection c, Z_APDU *a, ODR out)
static void record_cache_add (ZOOM_resultset r, Z_NamePlusRecord *npr, int pos)
static ZOOM_record record_cache_lookup (ZOOM_resultset r, int pos)
static const char * record_iconv_return (ZOOM_record rec, int *len, const char *buf, int sz, const char *record_charset)
static void response_diag (ZOOM_connection c, Z_DiagRec *p)
static int scan_response (ZOOM_connection c, Z_ScanResponse *res)
static zoom_ret send_APDU (ZOOM_connection c, Z_APDU *a)
static zoom_ret send_package (ZOOM_connection c)
static zoom_ret send_present (ZOOM_connection c)
static zoom_ret send_scan (ZOOM_connection c)
static zoom_ret send_sort (ZOOM_connection c, ZOOM_resultset resultset)
static zoom_ret send_sort_present (ZOOM_connection c)
static char ** set_DatabaseNames (ZOOM_connection con, ZOOM_options options, int *num)
static void set_dset_error (ZOOM_connection c, int error, const char *dset, const char *addinfo, const char *addinfo2)
static void set_ZOOM_error (ZOOM_connection c, int error, const char *addinfo)
static void sort_response (ZOOM_connection c, Z_SortResponse *res)
static int strcmp_null (const char *v1, const char *v2)
int z3950_connection_mask (ZOOM_connection c)
int z3950_connection_socket (ZOOM_connection c)
ZOOM_task ZOOM_connection_add_task (ZOOM_connection c, int which)
 ZOOM_connection_addinfo (ZOOM_connection c)
 ZOOM_connection_connect (ZOOM_connection c, const char *host, int portnum)
 ZOOM_connection_create (ZOOM_options options)
 ZOOM_connection_destroy (ZOOM_connection c)
static int ZOOM_connection_do_io (ZOOM_connection c, int mask)
 ZOOM_connection_errcode (ZOOM_connection c)
 ZOOM_connection_errmsg (ZOOM_connection c)
 ZOOM_connection_error (ZOOM_connection c, const char **cp, const char **addinfo)
 ZOOM_connection_error_x (ZOOM_connection c, const char **cp, const char **addinfo, const char **diagset)
static int ZOOM_connection_exec_task (ZOOM_connection c)
static ZOOM_Event ZOOM_connection_get_event (ZOOM_connection c)
ZOOM_task ZOOM_connection_insert_task (ZOOM_connection c, int which)
 ZOOM_connection_last_event (ZOOM_connection cs)
 ZOOM_connection_new (const char *host, int portnum)
 ZOOM_connection_option_get (ZOOM_connection c, const char *key)
 ZOOM_connection_option_set (ZOOM_connection c, const char *key, const char *val)
 ZOOM_connection_option_setl (ZOOM_connection c, const char *key, const char *val, int len)
 ZOOM_connection_package (ZOOM_connection c, ZOOM_options options)
static void ZOOM_connection_put_event (ZOOM_connection c, ZOOM_Event event)
void ZOOM_connection_remove_task (ZOOM_connection c)
void ZOOM_connection_remove_tasks (ZOOM_connection c)
 ZOOM_connection_scan (ZOOM_connection c, const char *start)
 ZOOM_connection_search (ZOOM_connection c, ZOOM_query q)
 ZOOM_connection_search_pqf (ZOOM_connection c, const char *q)
static zoom_ret ZOOM_connection_send_init (ZOOM_connection c)
static zoom_ret ZOOM_connection_send_search (ZOOM_connection c)
static zoom_ret ZOOM_connection_srw_send_search (ZOOM_connection c)
 ZOOM_diag_str (int error)
 ZOOM_event (int no, ZOOM_connection *cs)
static ZOOM_Event ZOOM_Event_create (int kind)
static void ZOOM_Event_destroy (ZOOM_Event event)
 ZOOM_package_destroy (ZOOM_package p)
 ZOOM_package_option_get (ZOOM_package p, const char *key)
 ZOOM_package_option_set (ZOOM_package p, const char *key, const char *val)
 ZOOM_package_send (ZOOM_package p, const char *type)
 ZOOM_query_cql (ZOOM_query s, const char *str)
 ZOOM_query_create (void)
 ZOOM_query_destroy (ZOOM_query s)
 ZOOM_query_prefix (ZOOM_query s, const char *str)
 ZOOM_query_sortby (ZOOM_query s, const char *criteria)
 ZOOM_record_clone (ZOOM_record srec)
 ZOOM_record_destroy (ZOOM_record rec)
 ZOOM_record_get (ZOOM_record rec, const char *type_spec, int *len)
void ZOOM_resultset_addref (ZOOM_resultset r)
 ZOOM_resultset_cache_reset (ZOOM_resultset r)
ZOOM_resultset ZOOM_resultset_create ()
 ZOOM_resultset_destroy (ZOOM_resultset r)
 ZOOM_resultset_option_get (ZOOM_resultset r, const char *key)
 ZOOM_resultset_option_set (ZOOM_resultset r, const char *key, const char *val)
 ZOOM_resultset_record (ZOOM_resultset r, size_t pos)
 ZOOM_resultset_record_immediate (ZOOM_resultset s, size_t pos)
 ZOOM_resultset_records (ZOOM_resultset r, ZOOM_record *recs, size_t start, size_t count)
static void ZOOM_resultset_retrieve (ZOOM_resultset r, int force_sync, int start, int count)
 ZOOM_resultset_size (ZOOM_resultset r)
 ZOOM_resultset_sort (ZOOM_resultset r, const char *sort_type, const char *sort_spec)
 ZOOM_scanset_destroy (ZOOM_scanset scan)
 ZOOM_scanset_display_term (ZOOM_scanset scan, size_t pos, int *occ, int *len)
 ZOOM_scanset_option_get (ZOOM_scanset scan, const char *key)
 ZOOM_scanset_option_set (ZOOM_scanset scan, const char *key, const char *val)
 ZOOM_scanset_size (ZOOM_scanset scan)
 ZOOM_scanset_term (ZOOM_scanset scan, size_t pos, int *occ, int *len)

Variables

static int log_level = 0
static int log_level_initialized = 0


Generated by  Doxygen 1.6.0   Back to index