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