YAZ
5.34.0
|
Header for OID basic functions. More...
#include <yaz/yconfig.h>
Go to the source code of this file.
Macros | |
#define | OID_SIZE 20 |
#define | OID_STR_MAX 256 |
Typedefs | |
typedef short | Odr_oid |
typedef enum oid_proto | oid_proto |
Enumerations | |
enum | oid_proto { PROTO_NOP =0 , PROTO_Z3950 , PROTO_HTTP } |
Functions | |
void | oid_oidcpy (Odr_oid *t, const Odr_oid *s) |
copies OID More... | |
void | oid_oidcat (Odr_oid *t, const Odr_oid *s) |
appends to OID More... | |
int | oid_oidcmp (const Odr_oid *o1, const Odr_oid *o2) |
compares OIDs More... | |
int | oid_oidlen (const Odr_oid *o) |
returns length of OIDs More... | |
char * | oid_oid_to_dotstring (const Odr_oid *oid, char *oidbuf) |
converts OID to string (dot notation) More... | |
int | oid_dotstring_to_oid (const char *name, Odr_oid *oid) |
converts dot string to OID More... | |
Header for OID basic functions.
Definition in file oid_util.h.
#define OID_SIZE 20 |
Definition at line 39 of file oid_util.h.
#define OID_STR_MAX 256 |
Definition at line 40 of file oid_util.h.
typedef short Odr_oid |
Definition at line 42 of file oid_util.h.
enum oid_proto |
Enumerator | |
---|---|
PROTO_NOP | |
PROTO_Z3950 | |
PROTO_HTTP |
Definition at line 44 of file oid_util.h.
int oid_dotstring_to_oid | ( | const char * | name, |
Odr_oid * | oid | ||
) |
converts dot string to OID
name | dot string OID, e.g. "1.2.840.10003.2.1" |
oid | resulting OID buffer which should be at least of size OID_SIZE |
0 | OK |
-1 | failure |
Definition at line 75 of file oid_util.c.
References name, OID_SIZE, and yaz_isdigit.
Referenced by odr_getoidbystr_nmem().
char* oid_oid_to_dotstring | ( | const Odr_oid * | oid, |
char * | oidbuf | ||
) |
converts OID to string (dot notation)
oid | OID |
oidbuf | resulting buffer which should be at least of size OID_STR_MAX |
Definition at line 59 of file oid_util.c.
References OID_SIZE, and yaz_snprintf().
Referenced by my_fetch(), oid_name_to_dotstring(), retrieve_fetch(), yaz_oid_to_string_buf(), yaz_retrieval_request(), and ztest_fetch().
compares OIDs
o1 | first OID |
o2 | second OID |
0 | equal |
>0 | o1 greater than o2 |
<0 | o1 less than o2 |
Definition at line 34 of file oid_util.c.
Referenced by cql_lookup_reverse(), my_fetch(), retrieve_fetch(), return_record_wrbuf(), yaz_del_charneg_record(), yaz_get_charneg_record(), yaz_oi_update(), yaz_oid_to_string(), yaz_retrieval_request(), z_ext_getentbyref(), z_ext_record_oid_nmem(), ztest_esrequest(), and ztest_fetch().
copies OID
t | destination OID |
s | source OID |
Definition at line 22 of file oid_util.c.
Referenced by odr_getoidbystr_nmem(), odr_oiddup_nmem(), and yaz_oid_add().
int oid_oidlen | ( | const Odr_oid * | o | ) |
returns length of OIDs
o | OID |
Definition at line 49 of file oid_util.c.
Referenced by odr_getoidbystr_nmem(), odr_oiddup_nmem(), set_form(), yaz_oid_add(), and yaz_oid_is_iso2709().