YAZ  5.23.1
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

#define Z_External_acfDes1   24

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

Referenced by z_External().

#define Z_External_acfKrb1   25

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

Referenced by z_External().

#define Z_External_acfPrompt1   23

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

Referenced by z_External().

#define Z_External_arbitrary   2

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

Referenced by z_External().

#define Z_External_charSetandLanguageNegotiation   22
#define Z_External_CQL   27
#define Z_External_dateTime   17

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

Referenced by z_External().

#define Z_External_diag1   11
#define Z_External_ESAdmin   19

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

Referenced by create_admin_package(), process_ESRequest(), and z_External().

#define Z_External_espec1   12

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

Referenced by z_External().

#define Z_External_explainRecord   4

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

Referenced by z_ext_record_oid_nmem(), and z_External().

#define Z_External_exportInvocation   33

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

Referenced by z_External().

#define Z_External_exportSpecification   32

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

Referenced by z_External().

#define Z_External_extendedService   9

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

Referenced by handle_Z3950_es_response(), z_ext_record_oid_nmem(), and z_External().

#define Z_External_grs1   8

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

Referenced by return_record_wrbuf(), z_ext_record_oid_nmem(), and z_External().

#define Z_External_itemOrder   10

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

Referenced by process_ESRequest(), z_External(), ZOOM_package_send(), and ztest_esrequest().

#define Z_External_multisrch2   26

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

Referenced by z_External().

#define Z_External_OCLCUserInfo   28

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

Referenced by z_External().

#define Z_External_octet   1
#define Z_External_OPAC   14
#define Z_External_periodicQuerySchedule   31

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

Referenced by z_External().

#define Z_External_persistentQuery   30

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

Referenced by z_External().

#define Z_External_persistentResultSet   29

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

Referenced by z_External().

#define Z_External_promptObject1   7

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

Referenced by z_External().

#define Z_External_resourceReport1   5

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

Referenced by z_External().

#define Z_External_resourceReport2   6

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

Referenced by z_External().

#define Z_External_searchResult1   15

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

Referenced by z_External(), and ZOOM_handle_search_result().

#define Z_External_single   0

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

Referenced by encode_ill_request(), z_ext_record_oid_any(), and z_External().

#define Z_External_summary   13

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

Referenced by z_ext_record_oid_nmem(), and z_External().

#define Z_External_sutrs   3

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

Referenced by return_record_wrbuf(), z_ext_record_oid_nmem(), z_External(), and ztest_esrequest().

#define Z_External_universeReport   18

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

Referenced by z_External().

#define Z_External_update   16
#define Z_External_update0   20

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

Referenced by process_ESRequest(), and z_External().

#define Z_External_userFacets   34
#define Z_External_userInfo1   21

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

Referenced by yaz_decode_init_diag(), z_External(), and zget_init_diagnostics().

Typedef Documentation

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_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_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 
)
Z_External* z_ext_record_oid_nmem ( NMEM  nmem,
const Odr_oid oid,
const char *  buf,
int  len 
)
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.

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