1 # $Id: ZOOM.pm,v 1.6 2005-12-21 16:56:59 mike Exp $
3 package Net::Z3950::ZOOM;
12 XSLoader::load('Net::Z3950::ZOOM', $VERSION);
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>
18 # Error codes, as returned from connection_error()
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 }
34 # Event types, as returned from connection_last_event()
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 }
49 Net::Z3950::ZOOM - Perl extension for invoking the ZOOM-C API.
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");
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/
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
75 The C<ZOOM> module, included in the same distribution as this one.
79 Mike Taylor, E<lt>mike@indexdata.comE<gt>
81 =head1 COPYRIGHT AND LICENCE
83 Copyright (C) 2005 by Index Data.
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.