[15425] | 1 | /**********************************************************************
|
---|
| 2 | *
|
---|
| 3 | * z3950server.h --
|
---|
| 4 | * Copyright (C) 2000 The New Zealand Digital Library Project
|
---|
| 5 | *
|
---|
| 6 | * A component of the Greenstone digital library software
|
---|
| 7 | * from the New Zealand Digital Library Project at the
|
---|
| 8 | * University of Waikato, New Zealand.
|
---|
| 9 | *
|
---|
| 10 | * This program is free software; you can redistribute it and/or modify
|
---|
| 11 | * it under the terms of the GNU General Public License as published by
|
---|
| 12 | * the Free Software Foundation; either version 2 of the License, or
|
---|
| 13 | * (at your option) any later version.
|
---|
| 14 | *
|
---|
| 15 | * This program is distributed in the hope that it will be useful,
|
---|
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 18 | * GNU General Public License for more details.
|
---|
| 19 | *
|
---|
| 20 | * You should have received a copy of the GNU General Public License
|
---|
| 21 | * along with this program; if not, write to the Free Software
|
---|
| 22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
| 23 | *
|
---|
| 24 | *********************************************************************/
|
---|
| 25 |
|
---|
| 26 | #ifndef Z3950SERVER_H
|
---|
[21323] | 27 | #define Z3950SERVER_H
|
---|
[15425] | 28 |
|
---|
| 29 | #include <string>
|
---|
| 30 | #include <list>
|
---|
| 31 |
|
---|
| 32 | #include <stdio.h>
|
---|
| 33 | #include <stdlib.h>
|
---|
| 34 | #include <ctype.h>
|
---|
| 35 | #include <time.h>
|
---|
| 36 |
|
---|
| 37 | // Greenstone headers
|
---|
| 38 | #include "fileutil.h"
|
---|
| 39 |
|
---|
| 40 | // the maximum number of hits allowed
|
---|
| 41 | #define MAXHITS 10000
|
---|
| 42 |
|
---|
| 43 | // These globals are local to each thread: one Z39.50 connection = one thread.
|
---|
| 44 |
|
---|
| 45 | extern text_t gsdlhome; // this is specified externally when Greenstone is installed
|
---|
| 46 | extern list<FilterResponse_t> Response_tlist; // list of response sets
|
---|
| 47 | extern list<text_t> Response_tlist_colnames; // collection names for the above
|
---|
| 48 | extern list<int> Response_tlist_sizes; // sizes (number of records) for the above
|
---|
| 49 | extern z3950Server *Server;
|
---|
| 50 | extern collectset *Cservers;
|
---|
| 51 | extern nullproto *Protocol;
|
---|
| 52 | extern map<text_t, gsdlCollection> Collection_map; // info and tools for collections
|
---|
| 53 | extern map<text_t, text_t> Resultsets; // mapping from ResultSetId to GSQuery
|
---|
| 54 |
|
---|
| 55 | extern int z3950_verbosity_;
|
---|
| 56 |
|
---|
| 57 | bend_initresult *bend_init(bend_initrequest *q);
|
---|
| 58 | void bend_close(void *handle);
|
---|
| 59 |
|
---|
| 60 | Z_GenericRecord *read_grs1(FILE *f, ODR o);
|
---|
| 61 |
|
---|
| 62 | int ztest_search (void *handle, bend_search_rr *rr);
|
---|
| 63 | int ztest_sort (void *handle, bend_sort_rr *rr);
|
---|
| 64 | int ztest_present (void *handle, bend_present_rr *rr);
|
---|
| 65 | int ztest_esrequest (void *handle, bend_esrequest_rr *rr);
|
---|
| 66 | int ztest_delete (void *handle, bend_delete_rr *rr);
|
---|
| 67 | int ztest_fetch(void *handle, bend_fetch_rr *r);
|
---|
| 68 | int ztest_scan(void *handle, bend_scan_rr *q);
|
---|
| 69 |
|
---|
| 70 |
|
---|
| 71 | #endif
|
---|