* Sebastian Hammer, Adam Dickmeiss
*
* $Log: proto.h,v $
- * Revision 1.2 2002-02-11 23:25:26 adam
+ * Revision 1.3 2002-08-29 19:36:09 ja7
+ * Added
+ * YAZ_EXPORT const char* yaz_z3950_oid_value_to_str(oid_value ov, oid_class oc);
+ * Used for gettting ui friendly names for oid_value's
+ *
+ * Revision 1.2 2002/02/11 23:25:26 adam
* Rustam's patch
*
* Revision 1.1 2001/10/23 21:00:19 adam
#include <yaz/z-univ.h>
#include <yaz/zes-update0.h>
#include <yaz/z-charneg.h>
+#include <yaz/oid.h>
YAZ_BEGIN_CDECL
const char *str);
YAZ_EXPORT const char *yaz_z3950oid_to_str (Odr_oid *oid, int *oid_class);
+YAZ_EXPORT const char* yaz_z3950_oid_value_to_str(oid_value ov, oid_class oc);
+
YAZ_END_CDECL
#include <yaz/prt-ext.h>
* Copyright (c) 1995-2002, Index Data
* See the file LICENSE for details.
*
- * $Id: z3950oid.c,v 1.2 2002-01-28 09:27:17 adam Exp $
+ * $Id: z3950oid.c,v 1.3 2002-08-29 19:36:09 ja7 Exp $
*/
#if HAVE_CONFIG_H
*oid_class = ident->oclass;
return ident->desc;
}
+
+
+const char* yaz_z3950_oid_value_to_str(oid_value ov, oid_class oc) {
+ struct oident tmpentry;
+ int tmp_oid[OID_SIZE];
+
+
+ tmpentry.proto = PROTO_Z3950;
+ tmpentry.oclass = oc;
+ tmpentry.value = ov;
+
+ if( oid_ent_to_oid(&tmpentry,tmp_oid) )
+ {
+ return tmpentry.desc;
+ }
+ else
+ {
+ return "";
+ };
+};
+
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ */