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