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