YAZ  5.34.0
Data Structures | Macros | Typedefs | Functions
prt-ext.h File Reference

Header for utilities that handle Z39.50 EXTERNALs. More...

#include <yaz/yconfig.h>
#include <yaz/oid_util.h>

Go to the source code of this file.

Data Structures

struct  Z_ext_typeent
 
struct  Z_External
 structure for all known EXTERNALs More...
 

Macros

#define Z_External_single   0
 
#define Z_External_octet   1
 
#define Z_External_arbitrary   2
 
#define Z_External_sutrs   3
 
#define Z_External_explainRecord   4
 
#define Z_External_resourceReport1   5
 
#define Z_External_resourceReport2   6
 
#define Z_External_promptObject1   7
 
#define Z_External_grs1   8
 
#define Z_External_extendedService   9
 
#define Z_External_itemOrder   10
 
#define Z_External_diag1   11
 
#define Z_External_espec1   12
 
#define Z_External_summary   13
 
#define Z_External_OPAC   14
 
#define Z_External_searchResult1   15
 
#define Z_External_update   16
 
#define Z_External_dateTime   17
 
#define Z_External_universeReport   18
 
#define Z_External_ESAdmin   19
 
#define Z_External_update0   20
 
#define Z_External_userInfo1   21
 
#define Z_External_charSetandLanguageNegotiation   22
 
#define Z_External_acfPrompt1   23
 
#define Z_External_acfDes1   24
 
#define Z_External_acfKrb1   25
 
#define Z_External_multisrch2   26
 
#define Z_External_CQL   27
 
#define Z_External_OCLCUserInfo   28
 
#define Z_External_persistentResultSet   29
 
#define Z_External_persistentQuery   30
 
#define Z_External_periodicQuerySchedule   31
 
#define Z_External_exportSpecification   32
 
#define Z_External_exportInvocation   33
 
#define Z_External_userFacets   34
 

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_typeentz_ext_getentbyref (const Odr_oid *oid)
 returns type information for 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_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_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...
 

Detailed Description

Header for utilities that handle Z39.50 EXTERNALs.

Definition in file prt-ext.h.

Macro Definition Documentation

◆ Z_External_acfDes1

#define Z_External_acfDes1   24

Definition at line 90 of file prt-ext.h.

◆ Z_External_acfKrb1

#define Z_External_acfKrb1   25

Definition at line 91 of file prt-ext.h.

◆ Z_External_acfPrompt1

#define Z_External_acfPrompt1   23

Definition at line 89 of file prt-ext.h.

◆ Z_External_arbitrary

#define Z_External_arbitrary   2

Definition at line 67 of file prt-ext.h.

◆ Z_External_charSetandLanguageNegotiation

#define Z_External_charSetandLanguageNegotiation   22

Definition at line 88 of file prt-ext.h.

◆ Z_External_CQL

#define Z_External_CQL   27

Definition at line 93 of file prt-ext.h.

◆ Z_External_dateTime

#define Z_External_dateTime   17

Definition at line 83 of file prt-ext.h.

◆ Z_External_diag1

#define Z_External_diag1   11

Definition at line 77 of file prt-ext.h.

◆ Z_External_ESAdmin

#define Z_External_ESAdmin   19

Definition at line 85 of file prt-ext.h.

◆ Z_External_espec1

#define Z_External_espec1   12

Definition at line 78 of file prt-ext.h.

◆ Z_External_explainRecord

#define Z_External_explainRecord   4

Definition at line 70 of file prt-ext.h.

◆ Z_External_exportInvocation

#define Z_External_exportInvocation   33

Definition at line 99 of file prt-ext.h.

◆ Z_External_exportSpecification

#define Z_External_exportSpecification   32

Definition at line 98 of file prt-ext.h.

◆ Z_External_extendedService

#define Z_External_extendedService   9

Definition at line 75 of file prt-ext.h.

◆ Z_External_grs1

#define Z_External_grs1   8

Definition at line 74 of file prt-ext.h.

◆ Z_External_itemOrder

#define Z_External_itemOrder   10

Definition at line 76 of file prt-ext.h.

◆ Z_External_multisrch2

#define Z_External_multisrch2   26

Definition at line 92 of file prt-ext.h.

◆ Z_External_OCLCUserInfo

#define Z_External_OCLCUserInfo   28

Definition at line 94 of file prt-ext.h.

◆ Z_External_octet

#define Z_External_octet   1

Definition at line 66 of file prt-ext.h.

◆ Z_External_OPAC

#define Z_External_OPAC   14

Definition at line 80 of file prt-ext.h.

◆ Z_External_periodicQuerySchedule

#define Z_External_periodicQuerySchedule   31

Definition at line 97 of file prt-ext.h.

◆ Z_External_persistentQuery

#define Z_External_persistentQuery   30

Definition at line 96 of file prt-ext.h.

◆ Z_External_persistentResultSet

#define Z_External_persistentResultSet   29

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

◆ Z_External_promptObject1

#define Z_External_promptObject1   7

Definition at line 73 of file prt-ext.h.

◆ Z_External_resourceReport1

#define Z_External_resourceReport1   5

Definition at line 71 of file prt-ext.h.

◆ Z_External_resourceReport2

#define Z_External_resourceReport2   6

Definition at line 72 of file prt-ext.h.

◆ Z_External_searchResult1

#define Z_External_searchResult1   15

Definition at line 81 of file prt-ext.h.

◆ Z_External_single

#define Z_External_single   0

Definition at line 65 of file prt-ext.h.

◆ Z_External_summary

#define Z_External_summary   13

Definition at line 79 of file prt-ext.h.

◆ Z_External_sutrs

#define Z_External_sutrs   3

Definition at line 69 of file prt-ext.h.

◆ Z_External_universeReport

#define Z_External_universeReport   18

Definition at line 84 of file prt-ext.h.

◆ Z_External_update

#define Z_External_update   16

Definition at line 82 of file prt-ext.h.

◆ Z_External_update0

#define Z_External_update0   20

Definition at line 86 of file prt-ext.h.

◆ Z_External_userFacets

#define Z_External_userFacets   34

Definition at line 100 of file prt-ext.h.

◆ Z_External_userInfo1

#define Z_External_userInfo1   21

Definition at line 87 of file prt-ext.h.

Typedef Documentation

◆ Z_ext_typeent

typedef struct Z_ext_typeent Z_ext_typeent

Used to keep track of known External definitions (a loose approach to DEFINED_BY).

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

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.

  [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.

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