/*
- * Copyright (c) 1995-2001, Index Data
+ * Copyright (c) 1995-2002, Index Data
* See the file LICENSE for details.
*
- * $Id: z3950oid.c,v 1.1 2001-09-25 07:35:37 adam Exp $
+ * $Id: z3950oid.c,v 1.3 2002-08-29 19:36:09 ja7 Exp $
*/
#if HAVE_CONFIG_H
int oid[OID_SIZE];
ident.proto = PROTO_Z3950;
- ident.oclass = oid_class;
- ident.value = oid_value;
+ ident.oclass = (enum oid_class) oid_class;
+ ident.value = (enum oid_value) oid_value;
if (ident.value == VAL_NONE)
return 0;
int oid[OID_SIZE];
ident.proto = PROTO_Z3950;
- ident.oclass = oid_class;
+ ident.oclass = (enum oid_class) oid_class;
ident.value = oid_getvalbyname(str);
if (ident.value == VAL_NONE)
*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:
+ */