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