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