YAZ  5.25.0
Macros | Functions | Variables
prt-ext.c File Reference

Implements handling of various Z39.50 Externals. More...

#include <yaz/proto.h>
#include <yaz/oid_db.h>
#include "odr-priv.h"

Go to the source code of this file.


#define PRT_EXT_DEBUG   0


Z_ext_typeentz_ext_getentbyref (const Odr_oid *oid)
 returns type information for OID (NULL if not known) More...
int z_External (ODR o, Z_External **p, int opt, const char *name)
 codec for BER EXTERNAL More...
Z_Externalz_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_Externalz_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_Externalz_ext_record_oid_any (ODR o, const Odr_oid *oid, const char *buf, int len)
 encodes EXTERNAL record as ANY More...
Z_Externalz_ext_record_xml (ODR o, const char *buf, int len)
 encodes EXTERNAL XML record More...
Z_Externalz_ext_record_sutrs (ODR o, const char *buf, int len)
 encodes EXTERNAL SUTRS record More...
Z_Externalz_ext_record_usmarc (ODR o, const char *buf, int len)
 encodes EXTERNAL USMARC/MARC21 record More...


static Z_ext_typeent type_table []

Detailed Description

Implements handling of various Z39.50 Externals.

Definition in file prt-ext.c.

Macro Definition Documentation


#define PRT_EXT_DEBUG   0

Definition at line 17 of file prt-ext.c.

Function Documentation

◆ z_ext_getentbyref()

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, and oid_oidcmp().

Referenced by z_External().

◆ z_ext_record_oid()

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_ext_record_oid_any()

Z_External* z_ext_record_oid_any ( ODR  o,
const Odr_oid oid,
const char *  buf,
int  len 

◆ z_ext_record_oid_nmem()

Z_External* z_ext_record_oid_nmem ( NMEM  nmem,
const Odr_oid oid,
const char *  buf,
int  len 

◆ z_ext_record_sutrs()

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_ext_record_usmarc()

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_ext_record_xml()

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().

◆ z_External()

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.

  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.

Definition at line 95 of file prt-ext.c.

References Odr_private::bp, Odr_private::buf, odr_oct::buf, odr::direction, Z_ext_typeent::fun, odr_oct::len, odr_any(), odr_bitstring(), odr_choice(), odr_choice_bias(), ODR_CONTEXT, ODR_DECODE, ODR_EXPLICIT, ODR_EXTERNAL, odr_graphicstring(), ODR_IMPLICIT, odr_implicit_settag(), odr_implicit_tag, odr_integer(), odr_octetstring(), odr_oid(), odr_ok, odr_peektag(), odr_sequence_begin(), odr_sequence_end(), ODR_UNIVERSAL, odr::op, Odr_private::size, type, Z_ext_typeent::what, odr_arm::which, yaz_log(), YLOG_LOG, z_Admin(), z_BriefBib(), z_CharSetandLanguageNegotiation(), z_DateTime(), z_DES_RN_Object(), z_DiagnosticFormat(), z_EIExportInvocation(), z_ESExportSpecification(), z_Espec1(), z_ExplainRecord(), z_ext_getentbyref(), Z_External_acfDes1, Z_External_acfKrb1, Z_External_acfPrompt1, Z_External_arbitrary, Z_External_charSetandLanguageNegotiation, Z_External_CQL, Z_External_dateTime, Z_External_diag1, Z_External_ESAdmin, Z_External_espec1, Z_External_explainRecord, Z_External_exportInvocation, Z_External_exportSpecification, Z_External_extendedService, Z_External_grs1, Z_External_itemOrder, Z_External_multisrch2, Z_External_OCLCUserInfo, Z_External_octet, Z_External_OPAC, Z_External_periodicQuerySchedule, Z_External_persistentQuery, Z_External_persistentResultSet, Z_External_promptObject1, Z_External_resourceReport1, Z_External_resourceReport2, Z_External_searchResult1, Z_External_single, Z_External_summary, Z_External_sutrs, Z_External_universeReport, Z_External_update, Z_External_update0, Z_External_userFacets, Z_External_userInfo1, z_FacetList(), z_GenericRecord(), z_InternationalString(), z_IOItemOrder(), z_IU0Update(), z_IUUpdate(), z_KRBObject(), z_MultipleSearchTerms_2(), z_OCLC_UserInformation(), z_OPACRecord(), z_OtherInformation(), z_PQSPeriodicQuerySchedule(), z_PQueryPersistentQuery(), z_PromptObject1(), z_PRPersistentResultSet(), z_ResourceReport1(), z_ResourceReport2(), z_SearchInfoReport(), z_SUTRS(), z_TaskPackage(), and z_UniverseReport().

Referenced by z_AccessControlRequest(), z_AccessControlResponse(), z_ChallengeUnit1(), z_DiagRec(), z_DuplicateDetectionCriterion(), z_DuplicateDetectionRequest(), z_ElementData(), z_ElementMetaData(), z_ElementSpec(), z_ExtendedServicesInfo(), z_ExtendedServicesRequest(), z_ExtendedServicesResponse(), z_FragmentSyntax(), z_HoldingsRecord(), z_IdAuthentication(), z_InitRequest(), z_InitResponse(), z_IOBilling(), z_IOOriginPartNotToKeep(), z_IOOriginPartToKeep(), z_IOTargetPart(), z_IU0SuppliedRecords_elem(), z_IU0SuppliedRecordsId(), z_IU0TaskPackageRecordStructure(), z_IUOriginPartToKeep(), z_IUSuppliedRecords_elem(), z_IUSuppliedRecordsId(), z_IUTaskPackageRecordStructure(), z_NamePlusRecord(), z_OPACRecord(), z_OtherInformationUnit(), z_PrivateCharacterSet(), z_ProcessingInformation(), z_Query(), z_ResourceReport(), z_TaskPackage(), and z_Term().

Variable Documentation

◆ type_table

Z_ext_typeent type_table[]

Definition at line 28 of file prt-ext.c.