From: Mike Taylor Date: Fri, 11 Jul 2003 09:51:13 +0000 (+0000) Subject: Add documentation for oid_name_to_oid(), oid_to_dotstring() and oid_name_to_dotstring() X-Git-Tag: YAZ.2.0.4~27 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=e1efa4cdf426e7eb952584ed4b9d3b818c8ff070;p=yaz-moved-to-github.git Add documentation for oid_name_to_oid(), oid_to_dotstring() and oid_name_to_dotstring() --- diff --git a/doc/tools.xml b/doc/tools.xml index 656210c..5e55e41 100644 --- a/doc/tools.xml +++ b/doc/tools.xml @@ -1,4 +1,4 @@ - + Supporting Tools @@ -1664,6 +1664,49 @@ typedef struct oident + Three utility functions are provided for translating OIDs' + symbolic names (e.g. Usmarc into OID structures + (int arrays) and strings containing the OID in dotted notation + (e.g. 1.2.840.10003.9.5.1). They are: + + + + int *oid_name_to_oid(oid_class oclass, const char *name, int *oid); + char *oid_to_dotstring(const int *oid, char *oidbuf); + char *oid_name_to_dotstring(oid_class oclass, const char *name, char *oidbuf); + + + + oid_name_to_oid() + translates the specified symbolic name, + interpreted as being of class oclass. (The + class must be specified as many symbolic names exist within + multiple classes - for example, Zthes is the + symbolic name of an attribute set, a schema and a tag-set.) The + sequence of integers representing the OID is written into the + area oid provided by the caller; it is the + caller's responsibility to ensure that this area is large enough + to contain the translated OID. As a convenience, the address of + the buffer (i.e. the value of oid) is + returned. + + + oid_to_dotstring() + Translates the int-array oid into a dotted + string which is written into the area oidbuf + supplied by the caller; it is the caller's responsibility to + ensure that this area is large enough. The address of the buffer + is returned. + + + oid_name_to_dotstring() + combines the previous two functions to derive a dotted string + representing the OID specified by oclass and + name, writing it into the buffer passed as + oidbuf and returning its address. + + + Finally, the module provides the following utility functions, whose meaning should be obvious: