<<

NAME

C4::Z3950 - Functions dealing with Z39.50 queries

SYNOPSIS

  use C4::Z3950;

DESCRIPTION

This module contains functions for looking up Z39.50 servers, and for entering Z39.50 lookup requests.

FUNCTIONS

getz3950servers
  @servers= &getz3950servers(checked);

Returns the list of declared z3950 servers

$checked should always be true (1) => returns only active servers. If 0 => returns all servers

z3950servername
  $name = &z3950servername($dbh, $server_id, $default_name);

Looks up a Z39.50 server by ID number, and returns its full name. If the server is not found, returns $default_name.

$server_id is the Z39.50 server ID to look up.

$dbh is ignored.

addz3950queue
  $errmsg = &addz3950queue($query, $type, $request_id, @servers);

Adds a Z39.50 search query for the Z39.50 server to look up.

$query is the term to search for.

$type is the query type, e.g. isbn, lccn, etc.

$request_id is a unique string that will identify this query.

@servers is a list of servers to query (obviously, this can be given either as an array, or as a list of scalars). Each element may be either a Z39.50 server ID from the z3950server table of the Koha database, the string DEFAULT or CHECKED, or a complete server specification containing a colon.

DEFAULT and CHECKED are synonymous, and refer to those servers in the z3950servers table whose 'checked' field is set and non-NULL.

Once the query has been submitted to the Z39.50 daemon, &addz3950queue sends a SIGHUP to the daemon to tell it to process this new request.

&addz3950queue returns an error message. If it was successful, the error message is the empty string.

&checkz3950searchdone
  $numberpending= &     &checkz3950searchdone($random);

Returns the number of pending z3950 requests

$random is the random z3950 query number.

AUTHOR

Koha Development Team <http://koha-community.org/>

<<