Housekeeping
[yaz-moved-to-github.git] / include / oid.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: oid.h,v $
27  * Revision 1.21  1997-08-19 08:43:49  quinn
28  * Housekeeping
29  *
30  * Revision 1.19  1997/07/28 12:34:42  adam
31  * Added new OID entries (RVDM).
32  *
33  * Revision 1.18  1997/05/14 06:53:42  adam
34  * C++ support.
35  *
36  * Revision 1.17  1997/05/02 08:39:27  quinn
37  * Support for private OID table added. Thanks to Ronald van der Meer
38  *
39  * Revision 1.16  1997/04/30 08:52:08  quinn
40  * Null
41  *
42  * Revision 1.15  1996/10/09  15:54:57  quinn
43  * Added SearchInfoReport
44  *
45  * Revision 1.14  1996/10/07  15:29:17  quinn
46  * Added SOIF support
47  *
48  * Revision 1.13  1996/02/20  17:57:53  adam
49  * Added const to oid_getvalbyname.
50  *
51  * Revision 1.12  1996/02/20  12:52:37  quinn
52  * Various
53  *
54  * Revision 1.11  1996/01/02  08:57:30  quinn
55  * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
56  *
57  * Revision 1.10  1995/11/13  09:27:31  quinn
58  * Fiddling with the variant stuff.
59  *
60  * Revision 1.9  1995/10/12  10:34:45  quinn
61  * Added Espec-1.
62  *
63  * Revision 1.8  1995/10/10  16:27:08  quinn
64  * *** empty log message ***
65  *
66  * Revision 1.7  1995/09/29  17:12:05  quinn
67  * Smallish
68  *
69  * Revision 1.6  1995/09/27  15:02:48  quinn
70  * Modified function heads & prototypes.
71  *
72  * Revision 1.5  1995/09/12  11:31:46  quinn
73  * Added some oids.
74  *
75  * Revision 1.4  1995/06/27  13:20:32  quinn
76  * Added SUTRS support
77  *
78  * Revision 1.3  1995/05/29  08:11:33  quinn
79  * Moved oid from odr/asn to util.
80  *
81  * Revision 1.2  1995/05/16  08:50:35  quinn
82  * License, documentation, and memory fixes
83  *
84  * Revision 1.1  1995/03/30  09:39:41  quinn
85  * Moved .h files to include directory
86  *
87  * Revision 1.1  1995/03/27  08:32:13  quinn
88  * Added OID database
89  *
90  *
91  */
92
93 #ifndef OID_H
94 #define OID_H
95
96 #include <yconfig.h>
97
98 #ifdef __cplusplus
99 extern "C" {
100 #endif
101
102 #define OID_SIZE 100
103     
104 typedef enum oid_proto
105 {
106     PROTO_Z3950,
107     PROTO_SR,
108     PROTO_GENERAL,
109     PROTO_WAIS
110 } oid_proto;
111
112 typedef enum oid_class
113 {
114     CLASS_APPCTX,
115     CLASS_ABSYN,
116     CLASS_ATTSET,
117     CLASS_TRANSYN,
118     CLASS_DIAGSET,
119     CLASS_RECSYN,
120     CLASS_RESFORM,
121     CLASS_ACCFORM,
122     CLASS_EXTSERV,
123     CLASS_USERINFO,
124     CLASS_ELEMSPEC,
125     CLASS_VARSET,
126     CLASS_SCHEMA,
127     CLASS_TAGSET
128 } oid_class;
129
130 typedef enum oid_value
131 {
132     VAL_APDU,
133     VAL_BER,
134     VAL_BASIC_CTX,
135     VAL_BIB1,
136     VAL_EXP1,
137     VAL_EXT1,
138     VAL_CCL1,
139     VAL_GILS,
140     VAL_WAIS,
141     VAL_STAS,
142     VAL_COLLECT1,
143     VAL_CIMI1,
144     VAL_GEO,
145     VAL_DIAG1,
146     VAL_ISO2709,
147     VAL_UNIMARC,
148     VAL_INTERMARC,
149     VAL_CCF,
150     VAL_USMARC,
151     VAL_UKMARC,
152     VAL_NORMARC,
153     VAL_LIBRISMARC,
154     VAL_DANMARC,
155     VAL_FINMARC,
156     VAL_MAB,
157     VAL_CANMARC,
158     VAL_SBN,
159     VAL_PICAMARC,
160     VAL_AUSMARC,
161     VAL_IBERMARC,
162     VAL_CATMARC,
163     VAL_MALMARC,
164     VAL_EXPLAIN,
165     VAL_SUTRS,
166     VAL_OPAC,
167     VAL_SUMMARY,
168     VAL_GRS0,
169     VAL_GRS1,
170     VAL_EXTENDED,
171     VAL_FRAGMENT,
172     VAL_RESOURCE1,
173     VAL_RESOURCE2,
174     VAL_PROMPT1,
175     VAL_DES1,
176     VAL_KRB1,
177     VAL_PRESSET,
178     VAL_PQUERY,
179     VAL_PCQUERY,
180     VAL_ITEMORDER,
181     VAL_DBUPDATE,
182     VAL_EXPORTSPEC,
183     VAL_EXPORTINV,
184     VAL_NONE,
185     VAL_SETM,
186     VAL_SETG,
187     VAL_VAR1,
188     VAL_ESPEC1,
189     VAL_SOIF,
190     VAL_SEARCHRES1
191 } oid_value;
192
193 typedef struct oident
194 {
195     oid_proto proto;
196     oid_class oclass;
197     oid_value value;
198     int oidsuffix[20];
199     char *desc;
200 } oident;
201
202 int *oid_getoidbyent(struct oident *ent);
203 struct oident *oid_getentbyoid(int *o);
204 void oid_oidcpy(int *t, int *s);
205 void oid_oidcat(int *t, int *s);
206 int oid_oidcmp(int *o1, int *o2);
207 int oid_oidlen(int *o);
208 oid_value oid_getvalbyname(const char *name);
209 void oid_setprivateoids(oident *list);
210
211 #ifdef __cplusplus
212 }
213 #endif
214
215 #endif