YAZ
5.34.0
|
Header for utilities that handle Z39.50 EXTERNALs. More...
Go to the source code of this file.
Data Structures | |
struct | Z_ext_typeent |
struct | Z_External |
structure for all known EXTERNALs More... | |
Typedefs | |
typedef struct Z_ext_typeent | Z_ext_typeent |
Functions | |
int | z_External (ODR o, Z_External **p, int opt, const char *name) |
codec for BER EXTERNAL More... | |
Z_ext_typeent * | z_ext_getentbyref (const Odr_oid *oid) |
returns type information for OID (NULL if not known) More... | |
Z_External * | z_ext_record_oid (ODR o, const Odr_oid *oid, const char *buf, int len) |
encodes EXTERNAL record based on OID (NULL if not known) More... | |
Z_External * | z_ext_record_oid_nmem (NMEM nmem, const Odr_oid *oid, const char *buf, int len) |
encodes EXTERNAL record based on OID (NULL if not known) More... | |
Z_External * | z_ext_record_oid_any (ODR o, const Odr_oid *oid, const char *buf, int len) |
encodes EXTERNAL record as ANY More... | |
Z_External * | z_ext_record_xml (ODR o, const char *buf, int len) |
encodes EXTERNAL XML record More... | |
Z_External * | z_ext_record_sutrs (ODR o, const char *buf, int len) |
encodes EXTERNAL SUTRS record More... | |
Z_External * | z_ext_record_usmarc (ODR o, const char *buf, int len) |
encodes EXTERNAL USMARC/MARC21 record More... | |
Header for utilities that handle Z39.50 EXTERNALs.
Definition in file prt-ext.h.
typedef struct Z_ext_typeent Z_ext_typeent |
Used to keep track of known External definitions (a loose approach to DEFINED_BY).
Z_ext_typeent* z_ext_getentbyref | ( | const Odr_oid * | oid | ) |
returns type information for OID (NULL if not known)
Definition at line 66 of file prt-ext.c.
References Z_ext_typeent::oid, oid_oidcmp(), and type_table.
Referenced by z_External().
Z_External* z_ext_record_oid | ( | ODR | o, |
const Odr_oid * | oid, | ||
const char * | buf, | ||
int | len | ||
) |
encodes EXTERNAL record based on OID (NULL if not known)
Definition at line 338 of file prt-ext.c.
References odr::mem, and z_ext_record_oid_nmem().
Referenced by create_update_package(), pack_records(), process_ESRequest(), z_ext_record_sutrs(), z_ext_record_usmarc(), and z_ext_record_xml().
Z_External* z_ext_record_oid_any | ( | ODR | o, |
const Odr_oid * | oid, | ||
const char * | buf, | ||
int | len | ||
) |
encodes EXTERNAL record as ANY
Definition at line 344 of file prt-ext.c.
References odr_oct::buf, Z_External::descriptor, Z_External::direct_reference, Z_External::indirect_reference, odr_oct::len, odr_malloc(), odr_oiddup(), Z_External::single_ASN1_type, Z_External::u, Z_External::which, and Z_External_single.
Referenced by create_update_package().
Z_External* z_ext_record_oid_nmem | ( | NMEM | nmem, |
const Odr_oid * | oid, | ||
const char * | buf, | ||
int | len | ||
) |
encodes EXTERNAL record based on OID (NULL if not known)
Definition at line 262 of file prt-ext.c.
References odr_oct::buf, Z_External::descriptor, Z_External::direct_reference, Z_External::grs1, Z_External::indirect_reference, odr_oct::len, nmem_malloc(), Z_External::octet_aligned, odr_oiddup_nmem(), oid_oidcmp(), Z_External::sutrs, Z_External::u, Z_External::which, yaz_oid_recsyn_explain, yaz_oid_recsyn_extended, yaz_oid_recsyn_grs_1, yaz_oid_recsyn_opac, yaz_oid_recsyn_summary, yaz_oid_recsyn_sutrs, Z_External_explainRecord, Z_External_extendedService, Z_External_grs1, Z_External_octet, Z_External_OPAC, Z_External_summary, and Z_External_sutrs.
Referenced by bibliographicRecord(), and z_ext_record_oid().
Z_External* z_ext_record_sutrs | ( | ODR | o, |
const char * | buf, | ||
int | len | ||
) |
encodes EXTERNAL SUTRS record
Definition at line 373 of file prt-ext.c.
References yaz_oid_recsyn_sutrs, and z_ext_record_oid().
Referenced by ztest_esrequest().
Z_External* z_ext_record_usmarc | ( | ODR | o, |
const char * | buf, | ||
int | len | ||
) |
encodes EXTERNAL USMARC/MARC21 record
Definition at line 378 of file prt-ext.c.
References yaz_oid_recsyn_usmarc, and z_ext_record_oid().
Referenced by dummy_opac(), and replace_node().
Z_External* z_ext_record_xml | ( | ODR | o, |
const char * | buf, | ||
int | len | ||
) |
encodes EXTERNAL XML record
Definition at line 368 of file prt-ext.c.
References yaz_oid_recsyn_xml, and z_ext_record_oid().
Referenced by encode_item_order(), replace_node(), and ztest_esrequest().
int z_External | ( | ODR | o, |
Z_External ** | p, | ||
int | opt, | ||
const char * | name | ||
) |
codec for BER EXTERNAL
This routine is the BER codec for the EXTERNAL type. It handles information in single-ASN1-type and octet-aligned for known structures.
[UNIVERSAL 8] IMPLICIT SEQUENCE { direct-reference OBJECT IDENTIFIER OPTIONAL, indirect-reference INTEGER OPTIONAL, data-value-descriptor ObjectDescriptor OPTIONAL, encoding CHOICE { single-ASN1-type [0] ABSTRACT_SYNTAX.&Type, octet-aligned [1] IMPLICIT OCTET STRING, arbitrary [2] IMPLICIT BIT STRING } }
arbitrary BIT STRING not handled yet.