73e4baa32e07915ee2b78ec1bc0db4e008dfdd51
[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.6  1999-02-02 14:51:12  adam
8  * Updated WIN32 code specific sections. Changed header.
9  *
10  * Revision 1.5  1998/06/08 14:43:16  adam
11  * Added suport for EXPLAIN Proxy servers - added settings databasePath
12  * and explainDatabase to facilitate this. Increased maximum number
13  * of databases and attributes in one register.
14  *
15  * Revision 1.4  1998/05/20 10:12:21  adam
16  * Implemented automatic EXPLAIN database maintenance.
17  * Modified Zebra to work with ASN.1 compiled version of YAZ.
18  *
19  * Revision 1.3  1998/03/05 08:45:13  adam
20  * New result set model and modular ranking system. Moved towards
21  * descent server API. System information stored as "SGML" records.
22  *
23  * Revision 1.2  1996/05/22 08:22:00  adam
24  * Added public ZebDatabaseInfo structure.
25  *
26  * Revision 1.1  1996/05/13 14:23:07  adam
27  * Work on compaction of set/use bytes in dictionary.
28  *
29  */
30 #ifndef ZINFO_H
31 #define ZINFO_H
32
33 #include <data1.h>
34 #include "recindex.h"
35
36 typedef struct zebraExplainInfo *ZebraExplainInfo;
37 typedef struct zebDatabaseInfo ZebDatabaseInfo;
38 ZebraExplainInfo zebraExplain_open (Records records, data1_handle dh,
39                                     Res res,
40                                     int writeFlag,
41                                     void *updateHandle,
42                                     int (*updateFunc)(void *handle,
43                                                       Record drec,
44                                                       data1_node *n));
45 void zebraExplain_close (ZebraExplainInfo zei, int writeFlag,
46                          int (*updateH)(Record drec, data1_node *n));
47 int zebraExplain_curDatabase (ZebraExplainInfo zei, const char *database);
48 int zebraExplain_newDatabase (ZebraExplainInfo zei, const char *database,
49                               int explain_database);
50 int zebraExplain_lookupSU (ZebraExplainInfo zei, int set, int use);
51 int zebraExplain_addSU (ZebraExplainInfo zei, int set, int use);
52 void zebraExplain_addSchema (ZebraExplainInfo zei, Odr_oid *oid);
53 void zebraExplain_recordCountIncrement (ZebraExplainInfo zei, int adjust_num);
54 void zebraExplain_recordBytesIncrement (ZebraExplainInfo zei, int adjust_num);
55 int zebraExplain_runNumberIncrement (ZebraExplainInfo zei, int adjust_num);
56 void zebraExplain_loadAttsets (data1_handle dh, Res res);
57
58 typedef struct {
59     int recordSize;
60     int recordOffset;
61     int runNumber;
62 } RecordAttr;
63 RecordAttr *rec_init_attr (ZebraExplainInfo zei, Record rec);
64
65 #endif