Changed the way implementationName - and version is set.
[yaz-moved-to-github.git] / include / oid.h
1 /*
2  * Copyright (c) 1995-1999, 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  * $Id: oid.h,v 1.34 1999-09-13 12:51:14 adam Exp $
27  */
28
29 #ifndef OID_H
30 #define OID_H
31
32 #include <yconfig.h>
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #define OID_SIZE 20
39     
40 typedef enum oid_proto
41 {
42     PROTO_NOP=0,
43     PROTO_Z3950,
44     PROTO_SR,
45     PROTO_GENERAL,
46     PROTO_WAIS
47 } oid_proto;
48
49 typedef enum oid_class
50 {
51     CLASS_NOP=0,
52     CLASS_APPCTX,
53     CLASS_ABSYN,
54     CLASS_ATTSET,
55     CLASS_TRANSYN,
56     CLASS_DIAGSET,
57     CLASS_RECSYN,
58     CLASS_RESFORM,
59     CLASS_ACCFORM,
60     CLASS_EXTSERV,
61     CLASS_USERINFO,
62     CLASS_ELEMSPEC,
63     CLASS_VARSET,
64     CLASS_SCHEMA,
65     CLASS_TAGSET,
66     CLASS_GENERAL
67 } oid_class;
68
69 typedef enum oid_value
70 {
71     VAL_NOP=0,
72     VAL_APDU,
73     VAL_BER,
74     VAL_BASIC_CTX,
75     VAL_BIB1,
76     VAL_EXP1,
77     VAL_EXT1,
78     VAL_CCL1,
79     VAL_GILS,
80     VAL_WAIS,
81     VAL_STAS,
82     VAL_COLLECT1,
83     VAL_CIMI1,
84     VAL_GEO,
85     VAL_DIAG1,
86     VAL_ISO2709,
87     VAL_UNIMARC,
88     VAL_INTERMARC,
89     VAL_CCF,
90     VAL_USMARC,
91     VAL_UKMARC,
92     VAL_NORMARC,
93     VAL_LIBRISMARC,
94     VAL_DANMARC,
95     VAL_FINMARC,
96     VAL_MAB,
97     VAL_CANMARC,
98     VAL_SBN,
99     VAL_PICAMARC,
100     VAL_AUSMARC,
101     VAL_IBERMARC,
102     VAL_CATMARC,
103     VAL_MALMARC,
104     VAL_EXPLAIN,
105     VAL_SUTRS,
106     VAL_OPAC,
107     VAL_SUMMARY,
108     VAL_GRS0,
109     VAL_GRS1,
110     VAL_EXTENDED,
111     VAL_FRAGMENT,
112     VAL_RESOURCE1,
113     VAL_RESOURCE2,
114     VAL_PROMPT1,
115     VAL_DES1,
116     VAL_KRB1,
117     VAL_PRESSET,
118     VAL_PQUERY,
119     VAL_PCQUERY,
120     VAL_ITEMORDER,
121     VAL_DBUPDATE0,
122     VAL_DBUPDATE,
123     VAL_EXPORTSPEC,
124     VAL_EXPORTINV,
125     VAL_NONE,
126     VAL_SETM,
127     VAL_SETG,
128     VAL_VAR1,
129     VAL_ESPEC1,
130     VAL_SOIF,
131     VAL_SEARCHRES1,
132     VAL_THESAURUS,
133     VAL_CHARLANG,
134     VAL_USERINFO1,
135     VAL_MULTISRCH1,
136     VAL_MULTISRCH2,
137     VAL_DATETIME,
138     VAL_SQLRS,
139     VAL_PDF,
140     VAL_POSTSCRIPT,
141     VAL_HTML,
142     VAL_TIFF,
143     VAL_GIF,
144     VAL_JPEG,
145     VAL_PNG,
146     VAL_MPEG,
147     VAL_SGML,
148     VAL_TIFFB,
149     VAL_WAV,
150     VAL_UPDATEES,
151     VAL_TEXT_XML,
152     VAL_APPLICATION_XML,
153     VAL_UNIVERSE_REPORT,
154     VAL_PROXY,
155     VAL_COOKIE,
156     VAL_CLIENT_IP,
157 /* add new types here... */
158
159 /* VAL_DYNAMIC must have highest value */
160     VAL_DYNAMIC,
161     VAL_MAX = VAL_DYNAMIC+30
162 } oid_value;
163
164 typedef struct oident
165 {
166     oid_proto proto;
167     oid_class oclass;
168     oid_value value;
169     int oidsuffix[OID_SIZE];
170     char *desc;
171 } oident;
172
173 YAZ_EXPORT int *oid_getoidbyent(struct oident *ent);
174 YAZ_EXPORT int *oid_ent_to_oid(struct oident *ent, int *dst);
175 YAZ_EXPORT struct oident *oid_getentbyoid(int *o);
176 YAZ_EXPORT void oid_oidcpy(int *t, int *s);
177 YAZ_EXPORT void oid_oidcat(int *t, int *s);
178 YAZ_EXPORT int oid_oidcmp(int *o1, int *o2);
179 YAZ_EXPORT int oid_oidlen(int *o);
180 YAZ_EXPORT oid_value oid_getvalbyname(const char *name);
181 YAZ_EXPORT void oid_setprivateoids(oident *list);
182 YAZ_EXPORT struct oident *oid_addent (int *oid, enum oid_proto proto,
183                                       enum oid_class oclass,
184                                       const char *desc, int value);
185
186 #ifdef __cplusplus
187 }
188 #endif
189
190 #endif