Added remote record import using Z39.50 extended services and Segment
[idzebra-moved-to-github.git] / index / zinfo.h
1 /*
2  * Copyright (C) 1994-1999, Index Data
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: zinfo.h,v $
7  * Revision 1.9  2000-03-20 19:08:36  adam
8  * Added remote record import using Z39.50 extended services and Segment
9  * Requests.
10  *
11  * Revision 1.8  1999/11/30 13:48:03  adam
12  * Improved installation. Updated for inclusion of YAZ header files.
13  *
14  * Revision 1.7  1999/05/26 07:49:13  adam
15  * C++ compilation.
16  *
17  * Revision 1.6  1999/02/02 14:51:12  adam
18  * Updated WIN32 code specific sections. Changed header.
19  *
20  * Revision 1.5  1998/06/08 14:43:16  adam
21  * Added suport for EXPLAIN Proxy servers - added settings databasePath
22  * and explainDatabase to facilitate this. Increased maximum number
23  * of databases and attributes in one register.
24  *
25  * Revision 1.4  1998/05/20 10:12:21  adam
26  * Implemented automatic EXPLAIN database maintenance.
27  * Modified Zebra to work with ASN.1 compiled version of YAZ.
28  *
29  * Revision 1.3  1998/03/05 08:45:13  adam
30  * New result set model and modular ranking system. Moved towards
31  * descent server API. System information stored as "SGML" records.
32  *
33  * Revision 1.2  1996/05/22 08:22:00  adam
34  * Added public ZebDatabaseInfo structure.
35  *
36  * Revision 1.1  1996/05/13 14:23:07  adam
37  * Work on compaction of set/use bytes in dictionary.
38  *
39  */
40 #ifndef ZINFO_H
41 #define ZINFO_H
42
43 #include <yaz/data1.h>
44 #include "recindex.h"
45
46 YAZ_BEGIN_CDECL
47
48 typedef struct zebraExplainInfo *ZebraExplainInfo;
49 typedef struct zebDatabaseInfo ZebDatabaseInfo;
50 ZebraExplainInfo zebraExplain_open (Records records, data1_handle dh,
51                                     Res res,
52                                     int writeFlag,
53                                     void *updateHandle,
54                                     int (*updateFunc)(void *handle,
55                                                       Record drec,
56                                                       data1_node *n));
57 void zebraExplain_close (ZebraExplainInfo zei, int writeFlag /*,
58                                                                int (*updateH)(Record drec, data1_node *n)*/);
59 int zebraExplain_curDatabase (ZebraExplainInfo zei, const char *database);
60 int zebraExplain_newDatabase (ZebraExplainInfo zei, const char *database,
61                               int explain_database);
62 int zebraExplain_lookupSU (ZebraExplainInfo zei, int set, int use);
63 int zebraExplain_addSU (ZebraExplainInfo zei, int set, int use);
64 void zebraExplain_addSchema (ZebraExplainInfo zei, Odr_oid *oid);
65 void zebraExplain_recordCountIncrement (ZebraExplainInfo zei, int adjust_num);
66 void zebraExplain_recordBytesIncrement (ZebraExplainInfo zei, int adjust_num);
67 int zebraExplain_runNumberIncrement (ZebraExplainInfo zei, int adjust_num);
68 void zebraExplain_loadAttsets (data1_handle dh, Res res);
69 void zebraExplain_flush (ZebraExplainInfo zei, int writeFlag,
70                          void *updateHandle);
71
72 typedef struct {
73     int recordSize;
74     int recordOffset;
75     int runNumber;
76 } RecordAttr;
77 RecordAttr *rec_init_attr (ZebraExplainInfo zei, Record rec);
78
79 YAZ_END_CDECL
80
81 #endif