e9122795aa95befedc6ee65e8074e608a7c504e8
[yazpp-moved-to-github.git] / README.txt
1 YAZ++ - A C++ library for YAZ
2
3 $Id: README.txt,v 1.8 2001-01-10 09:14:08 adam Exp $
4  
5 o Introduction
6
7 YAZ++ is a C++ layer for YAZ and implements the ANSI Z39.50
8 protocol for information retrieval (client - and server side).
9 YAZ homepage is: http://www.indexdata.dk/yaz/
10
11 YAZ++ uses the same license as YAZ - see LICENSE file for details.
12
13 o Overview
14
15 YAZ++ builds a programmers' library libyaz++.lib and a few
16 example applications:
17   yaz-client++       basic client
18   yaz-server++       basic server
19   yaz-proxy          proxy server
20
21 Description in HTML format of object model can be found in the sub
22 directory doc. The top-page of the documentaion is index.html. The
23 documentation was auto-generated from YAZ++ source using doc++.
24
25 Directory structure of the YAZ++ package.
26
27   -- src (C++ source)
28   -- include (C++ headers) 
29   -- doc (documentation)
30   -- win (Windows build files)
31
32 o Installation, Unix
33
34 Make sure you have a C - and C++ compiler available. gcc and g++ works fine.
35
36 Before compilation can take place YAZ must be installed. It goes, roughly,
37 like this:
38
39   $ cd yaz-<version>
40   $ ./configure
41   $ make
42   $ cd ..
43
44 Then, build YAZ++:
45
46   $ cd yaz++-<version>
47   $ ./configure
48   $ make
49
50 o Installation, Windows
51
52 YAZ++ for WIN32 should run on Windows 95/98/2K and Windows NT 4.0.
53 Yaz++ was built using Microsoft Visual C++ 6.0. Other compilers
54 should work but makefile/project files will have to be created for
55 those compilers.
56
57   Workspace yazxx.dsw includes the projects
58     yazxx.dsp       -   builds yazxx.dll
59     yazclient.dsp   -   builds yazclient.exe
60     yazserver.dsp   -   builds yazserver.exe
61     yazproxy.dsp    -   builds yazproxy.exe
62
63 o About the proxy..
64
65 For the proxy the actual target is determined in by the OtherInfo
66 part of the InitRequest. We've defined an OID for this which we call
67 PROXY. OID is 1.2.840.10003.10.1000.81.1. 
68
69   OtherInformation   ::= [201] IMPLICIT SEQUENCE OF SEQUENCE{
70     category            [1]   IMPLICIT InfoCategory OPTIONAL, 
71     information        CHOICE{
72       characterInfo        [2]  IMPLICIT InternationalString,
73       binaryInfo        [3]  IMPLICIT OCTET STRING,
74       externallyDefinedInfo    [4]  IMPLICIT EXTERNAL,
75       oid          [5]  IMPLICIT OBJECT IDENTIFIER}}
76 --
77   InfoCategory ::= SEQUENCE{
78       categoryTypeId  [1]   IMPLICIT OBJECT IDENTIFIER OPTIONAL,
79       categoryValue  [2]   IMPLICIT INTEGER}
80
81 The InfoCategory is present with categoryTypeId set to the PROXY OID
82 and categoryValue set to 0. The information in OtherInformation uses
83 characterInfo to represent the target using the form target[:port][/db].
84
85 For the client that doesn't set the PROXY OtherInformation, a default
86 target can be specified using option -t for proxy.
87
88 Example:
89   We start the proxy so that it listens on port 9000. The default
90   target is Bell Labs Library unless it is specified by a client in
91   the InitRequest.
92
93      $ ./yaz-proxy -t z3950.bell-labs.com/books @:9000
94
95   The client is started and talks to the proxy without specifying
96   a target. Hence this client will talk to the Bell Labs server.
97      $ ./yaz-client localhost:9000
98
99   The client is started and it specifies the actual target itself.
100      $ ./yaz-client -p localhost:9000 bagel.indexdata.dk/gils
101
102   For ZAP the equivalent would be
103      proxy=localhost:9000
104      target=bagel.indexdata.dk/gils
105   Simple, huh!