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