Improved installation. Moved header files to include/yaz.
[yaz-moved-to-github.git] / include / yaz / prt-rsc.h
1 /*
2  * Copyright (c) 1995, Index Data.
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and
5  * its documentation, in whole or in part, for any purpose, is hereby granted,
6  * provided that:
7  *
8  * 1. This copyright and permission notice appear in all copies of the
9  * software and its documentation. Notices of copyright or attribution
10  * which appear at the beginning of any file must remain unchanged.
11  *
12  * 2. The name of Index Data or the individual authors may not be used to
13  * endorse or promote products derived from this software without specific
14  * prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
18  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
19  * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
20  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
21  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
22  * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
23  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
24  * OF THIS SOFTWARE.
25  *
26  * $Log: prt-rsc.h,v $
27  * Revision 1.1  1999-11-30 13:47:11  adam
28  * Improved installation. Moved header files to include/yaz.
29  *
30  * Revision 1.7  1999/04/20 09:56:48  adam
31  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
32  * Modified all encoders/decoders to reflect this change.
33  *
34  * Revision 1.6  1997/05/14 06:53:50  adam
35  * C++ support.
36  *
37  * Revision 1.5  1995/09/29 17:12:11  quinn
38  * Smallish
39  *
40  * Revision 1.4  1995/09/27  15:02:52  quinn
41  * Modified function heads & prototypes.
42  *
43  * Revision 1.3  1995/08/17  12:45:17  quinn
44  * Fixed minor problems with GRS-1. Added support in c&s.
45  *
46  * Revision 1.2  1995/06/02  09:49:50  quinn
47  * Add access control
48  *
49  * Revision 1.1  1995/06/01  11:24:52  quinn
50  * Resource Control
51  *
52  *
53  */
54
55 #ifndef PRT_RSC_H
56 #define PRT_RSC_H
57
58 #include <yaz/yconfig.h>
59
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63
64 /* -------------------- Resource-1 -------------------- */
65
66 #define Z_EstimateType_currentSearchRecords           1
67 #define Z_EstimateType_finalSearchRecords             2
68 #define Z_EstimateType_currentPresentRecords          3
69 #define Z_EstimateType_finalPresentRecords            4
70 #define Z_EstimateType_currentOpTimeProcessing        5
71 #define Z_EstimateType_finalOpTimeProcessing          6
72 #define Z_EstimateType_currentAssocTime               7
73 #define Z_EstimateType_currentOperationCost           8
74 #define Z_EstimateType_finalOperationCost             9
75 #define Z_EstimateType_currentAssocCost              10
76 #define Z_EstimateType_finalOpTimeElapsed            11
77 #define Z_EstimateType_percentComplete               12
78 #define Z_EstimateType_currentSearchAssCost          13
79 #define Z_EstimateType_currentPresentAssCost         14
80 #define Z_EstimateType_currentConnectAssCost         15
81 #define Z_EstimateType_currentOtherAssCost           16
82
83 typedef struct Z_Estimate1
84 {
85     int *type;
86     int *value;
87     int *currencyCode;             /* OPTIONAL */
88 } Z_Estimate1;
89
90 typedef struct Z_ResourceReport1
91 {
92     int num_estimates;
93     Z_Estimate1 **estimates;
94     char *message;
95 } Z_ResourceReport1;
96
97 int z_ResourceReport1(ODR o, Z_ResourceReport1 **p, int opt, const char *name);
98
99 /* -------------------- Resource-2 -------------------- */
100
101 typedef struct Z_Estimate2
102 {
103     Z_StringOrNumeric *type;      /* same as in estimate1, if numeric */
104     Z_IntUnit *value;
105 } Z_Estimate2;
106
107 typedef struct Z_ResourceReport2
108 {
109     int num_estimates;
110     Z_Estimate2 **estimates;             /* OPTIONAL */
111     char *message;                       /* OPTIONAL */
112 } Z_ResourceReport2;
113
114 int z_ResourceReport2(ODR o, Z_ResourceReport2 **p, int opt, const char *name);
115
116 #ifdef __cplusplus
117 }
118 #endif
119
120 #endif