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