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