Added Espec-1.
[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.9  1995-10-12 10:34:45  quinn
28  * Added Espec-1.
29  *
30  * Revision 1.8  1995/10/10  16:27:08  quinn
31  * *** empty log message ***
32  *
33  * Revision 1.7  1995/09/29  17:12:05  quinn
34  * Smallish
35  *
36  * Revision 1.6  1995/09/27  15:02:48  quinn
37  * Modified function heads & prototypes.
38  *
39  * Revision 1.5  1995/09/12  11:31:46  quinn
40  * Added some oids.
41  *
42  * Revision 1.4  1995/06/27  13:20:32  quinn
43  * Added SUTRS support
44  *
45  * Revision 1.3  1995/05/29  08:11:33  quinn
46  * Moved oid from odr/asn to util.
47  *
48  * Revision 1.2  1995/05/16  08:50:35  quinn
49  * License, documentation, and memory fixes
50  *
51  * Revision 1.1  1995/03/30  09:39:41  quinn
52  * Moved .h files to include directory
53  *
54  * Revision 1.1  1995/03/27  08:32:13  quinn
55  * Added OID database
56  *
57  *
58  */
59
60 #ifndef OID_H
61 #define OID_H
62
63 #include <yconfig.h>
64
65 #define OID_SIZE 100
66
67 typedef struct oident
68 {
69     enum oid_proto
70     {
71         PROTO_Z3950,
72         PROTO_SR,
73         PROTO_GENERAL
74     } proto;
75     enum oid_class
76     {
77         CLASS_APPCTX,
78         CLASS_ABSYN,
79         CLASS_ATTSET,
80         CLASS_TRANSYN,
81         CLASS_DIAGSET,
82         CLASS_RECSYN,
83         CLASS_RESFORM,
84         CLASS_ACCFORM,
85         CLASS_EXTSERV,
86         CLASS_USERINFO,
87         CLASS_ELEMSPEC,
88         CLASS_VARSET,
89         CLASS_DBSCHEMA,
90         CLASS_TAGSET
91     } class;
92     enum oid_value
93     {
94         VAL_APDU,
95         VAL_BER,
96         VAL_BASIC_CTX,
97         VAL_BIB1,
98         VAL_EXP1,
99         VAL_EXT1,
100         VAL_CCL1,
101         VAL_GILS,
102         VAL_STAS,
103         VAL_DIAG1,
104         VAL_ISO2709,
105         VAL_UNIMARC,
106         VAL_INTERMARC,
107         VAL_CCF,
108         VAL_USMARC,
109         VAL_UKMARC,
110         VAL_NORMARC,
111         VAL_LIBRISMARC,
112         VAL_DANMARC,
113         VAL_FINMARC,
114         VAL_MAB,
115         VAL_CANMARC,
116         VAL_SBN,
117         VAL_PICAMARC,
118         VAL_AUSMARC,
119         VAL_IBERMARC,
120         VAL_EXPLAIN,
121         VAL_SUTRS,
122         VAL_OPAC,
123         VAL_SUMMARY,
124         VAL_GRS0,
125         VAL_GRS1,
126         VAL_EXTENDED,
127         VAL_RESOURCE1,
128         VAL_RESOURCE2,
129         VAL_PROMPT1,
130         VAL_DES1,
131         VAL_KRB1,
132         VAL_PRESSET,
133         VAL_PQUERY,
134         VAL_PCQUERY,
135         VAL_ITEMORDER,
136         VAL_DBUPDATE,
137         VAL_EXPORTSPEC,
138         VAL_EXPORTINV,
139         VAL_NONE,
140         VAL_SETM,
141         VAL_SETG,
142         VAL_VAR1,
143         VAL_ESPEC1
144     } value;
145     int oidsuffix[20];
146     char *desc;
147 } oident;
148
149 typedef enum oid_proto oid_proto;
150 typedef enum oid_class oid_class;
151 typedef enum oid_value oid_value;
152
153 int *oid_getoidbyent(struct oident *ent);
154 struct oident *oid_getentbyoid(int *o);
155 void oid_oidcpy(int *t, int *s);
156 void oid_oidcat(int *t, int *s);
157 int oid_oidcmp(int *o1, int *o2);
158 int oid_oidlen(int *o);
159 oid_value oid_getvalbyname(char *name);
160
161 #endif