Bump version number.
[ZOOM-Perl-moved-to-github.git] / lib / Net / Z3950 / ZOOM.pm
1 # $Id: ZOOM.pm,v 1.7 2006-01-04 17:23:43 mike Exp $
2
3 package Net::Z3950::ZOOM; 
4
5 use 5.008;
6 use strict;
7 use warnings;
8
9 our $VERSION = '1.02';
10
11 require XSLoader;
12 XSLoader::load('Net::Z3950::ZOOM', $VERSION);
13
14
15 # The only thing this module does is define the following constants,
16 # which MUST BE KEPT SYNCHRONISED with the definitions in <yaz/zoom.h>
17
18 # Error codes, as returned from connection_error()
19 sub ERROR_NONE { 0 }
20 sub ERROR_CONNECT { 10000 }
21 sub ERROR_MEMORY { 10001 }
22 sub ERROR_ENCODE { 10002 }
23 sub ERROR_DECODE { 10003 }
24 sub ERROR_CONNECTION_LOST { 10004 }
25 sub ERROR_INIT { 10005 }
26 sub ERROR_INTERNAL { 10006 }
27 sub ERROR_TIMEOUT { 10007 }
28 sub ERROR_UNSUPPORTED_PROTOCOL { 10008 }
29 sub ERROR_UNSUPPORTED_QUERY { 10009 }
30 sub ERROR_INVALID_QUERY { 10010 }
31 sub ERROR_CQL_PARSE { 10011 }
32 sub ERROR_CQL_TRANSFORM { 10012 }
33
34 # Event types, as returned from connection_last_event()
35 sub EVENT_NONE { 0 }
36 sub EVENT_CONNECT { 1 }
37 sub EVENT_SEND_DATA { 2 }
38 sub EVENT_RECV_DATA { 3 }
39 sub EVENT_TIMEOUT { 4 }
40 sub EVENT_UNKNOWN { 5 }
41 sub EVENT_SEND_APDU { 6 }
42 sub EVENT_RECV_APDU { 7 }
43 sub EVENT_RECV_RECORD { 8 }
44 sub EVENT_RECV_SEARCH { 9 }
45
46
47 =head1 NAME
48
49 Net::Z3950::ZOOM - Perl extension for invoking the ZOOM-C API.
50
51 =head1 SYNOPSIS
52
53  use Net::Z3950::ZOOM;
54  $conn = Net::Z3950::ZOOM::connection_new($host, $port);
55  $errcode = Net::Z3950::ZOOM::connection_error($conn, $errmsg, $addinfo);
56  Net::Z3950::ZOOM::connection_option_set($conn, databaseName => "foo");
57  # etc.
58
59 =head1 DESCRIPTION
60
61 This module provides a simple thin-layer through to the ZOOM-C
62 functions in the YAZ toolkit for Z39.50 and SRW/U communication.  You
63 should not be using this very nasty, low-level API.  You should be
64 using the C<ZOOM> module instead, which implements a nice, Perlish API
65 on top of this module, conformant to the ZOOM Abstract API described at
66 http://zoom.z3950.org/api/
67
68 To enforce the don't-use-this-module prohibition, I am not even going
69 to document it.  If you really, really, really want to use it, then it
70 pretty much follows the API described in the ZOOM-C documentation at
71 http://www.indexdata.dk/yaz/doc/zoom.tkl
72
73 =head1 SEE ALSO
74
75 The C<ZOOM> module, included in the same distribution as this one.
76
77 =head1 AUTHOR
78
79 Mike Taylor, E<lt>mike@indexdata.comE<gt>
80
81 =head1 COPYRIGHT AND LICENCE
82
83 Copyright (C) 2005 by Index Data.
84
85 This library is free software; you can redistribute it and/or modify
86 it under the same terms as Perl itself, either Perl version 5.8.4 or,
87 at your option, any later version of Perl 5 you may have available.
88
89 =cut
90
91 1;