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