00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00032 #ifndef OID_DB_H
00033 #define OID_DB_H
00034
00035 #include <yaz/yconfig.h>
00036 #include <yaz/oid_util.h>
00037 #include <yaz/odr.h>
00038
00039 YAZ_BEGIN_CDECL
00040
00042 typedef struct yaz_oid_db *yaz_oid_db_t;
00043
00044
00045 typedef enum oid_class
00046 {
00047 CLASS_NOP=0,
00048 CLASS_APPCTX,
00049 CLASS_ABSYN,
00050 CLASS_ATTSET,
00051 CLASS_TRANSYN,
00052 CLASS_DIAGSET,
00053 CLASS_RECSYN,
00054 CLASS_RESFORM,
00055 CLASS_ACCFORM,
00056 CLASS_EXTSERV,
00057 CLASS_USERINFO,
00058 CLASS_ELEMSPEC,
00059 CLASS_VARSET,
00060 CLASS_SCHEMA,
00061 CLASS_TAGSET,
00062 CLASS_GENERAL,
00063 CLASS_NEGOT
00064 } oid_class;
00065
00066
00070 YAZ_EXPORT
00071 yaz_oid_db_t yaz_oid_std(void);
00072
00083 YAZ_EXPORT
00084 const Odr_oid *yaz_string_to_oid(yaz_oid_db_t oid_db,
00085 oid_class oclass, const char *name);
00086
00087
00095 YAZ_EXPORT
00096 Odr_oid *yaz_string_to_oid_nmem(yaz_oid_db_t oid_db,
00097 oid_class oclass, const char *name, NMEM nmem);
00098
00106 YAZ_EXPORT
00107 Odr_oid *yaz_string_to_oid_odr(yaz_oid_db_t oid_db,
00108 oid_class oclass, const char *name, ODR odr);
00109
00116 YAZ_EXPORT
00117 const char *yaz_oid_to_string(yaz_oid_db_t oid_db,
00118 const Odr_oid *oid, oid_class *oclass);
00119
00120
00127 YAZ_EXPORT
00128 const char *yaz_oid_to_string_buf(const Odr_oid *oid,
00129 oid_class *oclass, char *buf);
00130
00131
00138 YAZ_EXPORT
00139 char *oid_name_to_dotstring(oid_class oclass, const char *name, char *oid_buf);
00140
00141
00147 YAZ_EXPORT void yaz_oid_trav(yaz_oid_db_t oid_db,
00148 void (*func)(const Odr_oid *oid,
00149 oid_class oclass, const char *name,
00150 void *client_data),
00151 void *client_data);
00152
00158 YAZ_EXPORT
00159 int yaz_oid_is_iso2709(const Odr_oid *oid);
00160
00169 YAZ_EXPORT
00170 int yaz_oid_add(yaz_oid_db_t oid_db, oid_class oclass, const char *name,
00171 const Odr_oid *new_oid);
00172
00173
00177 YAZ_EXPORT
00178 yaz_oid_db_t yaz_oid_db_new(void);
00179
00183 YAZ_EXPORT
00184 void yaz_oid_db_destroy(yaz_oid_db_t oid_db);
00185
00186 struct yaz_oid_entry {
00187 enum oid_class oclass;
00188 const Odr_oid *oid;
00189 char *name;
00190 };
00191
00192 YAZ_END_CDECL
00193
00194 #define Z3950_PREFIX 1, 2, 840, 10003
00195
00196 #include <yaz/oid_std.h>
00197
00198 #endif
00199
00200
00201
00202
00203
00204
00205
00206