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