2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: proto.h,v 1.21 2005-06-25 15:46:03 adam Exp $
9 * \brief Header for Z39.50 Protocol
15 #define ASN_COMPILED 1
17 #include <yaz/yaz-version.h>
18 #include <yaz/z-accdes1.h>
19 #include <yaz/z-accform1.h>
20 #include <yaz/z-acckrb1.h>
21 #include <yaz/z-core.h>
22 #include <yaz/z-diag1.h>
23 #include <yaz/z-espec1.h>
24 #include <yaz/z-estask.h>
25 #include <yaz/z-exp.h>
26 #include <yaz/z-grs.h>
27 #include <yaz/z-opac.h>
28 #include <yaz/z-rrf1.h>
29 #include <yaz/z-rrf2.h>
30 #include <yaz/z-sum.h>
31 #include <yaz/z-sutrs.h>
32 #include <yaz/z-uifr1.h>
33 #include <yaz/zes-expi.h>
34 #include <yaz/zes-exps.h>
35 #include <yaz/zes-order.h>
36 #include <yaz/zes-pquery.h>
37 #include <yaz/zes-psched.h>
38 #include <yaz/zes-pset.h>
39 #include <yaz/zes-update.h>
40 #include <yaz/zes-admin.h>
41 #include <yaz/z-date.h>
42 #include <yaz/z-univ.h>
43 #include <yaz/zes-update0.h>
44 #include <yaz/z-charneg.h>
45 #include <yaz/z-mterm2.h>
47 #include <yaz/wrbuf.h>
49 #include <yaz/z-oclcui.h>
51 #include <yaz/marcdisp.h>
55 #define Z_PRES_SUCCESS Z_PresentStatus_success
56 #define Z_PRES_PARTIAL_1 Z_PresentStatus_partial_1
57 #define Z_PRES_PARTIAL_2 Z_PresentStatus_partial_2
58 #define Z_PRES_PARTIAL_3 Z_PresentStatus_partial_3
59 #define Z_PRES_PARTIAL_4 Z_PresentStatus_partial_4
60 #define Z_PRES_FAILURE Z_PresentStatus_failure
62 #define Z_RES_SUBSET Z_SearchResponse_subset
63 #define Z_RES_INTERIM Z_SearchResponse_interim
64 #define Z_RES_NONE Z_SearchResponse_none
66 #define Z_SortStatus_success Z_SortResponse_success
67 #define Z_SortStatus_partial_1 Z_SortResponse_partial_1
68 #define Z_SortStatus_failure Z_SortResponse_failure
70 #define Z_SortRelation_ascending Z_SortKeySpec_ascending
71 #define Z_SortRelation_descending Z_SortKeySpec_descending
72 #define Z_SortRelation_ascendingByFreq Z_SortKeySpec_ascendingByFrequency
73 #define Z_SortRelation_descendingByFreq Z_SortKeySpec_descendingByfrequency
75 #define Z_SortCase_caseSensitive Z_SortKeySpec_caseSensitive
76 #define Z_SortCase_caseInsensitive Z_SortKeySpec_caseInsensitive
78 #define Z_TriggerResourceCtrl_resourceReport Z_TriggerResourceControlRequest_resourceReport
79 #define Z_TriggerResourceCtrl_resourceControl Z_TriggerResourceControlRequest_resourceControl
80 #define Z_TriggerResourceCtrl_cancel Z_TriggerResourceControlRequest_cancel
82 #define Z_DeleteRequest_list Z_DeleteResultSetRequest_list
83 #define Z_DeleteRequest_all Z_DeleteResultSetRequest_all
85 #define Z_AccessRequest_simpleForm Z_AccessControlRequest_simpleForm
86 #define Z_AccessRequest_externallyDefined Z_AccessControlRequest_externallyDefined
88 #define Z_AccessResponse_simpleForm Z_AccessControlResponse_simpleForm
89 #define Z_AccessResponse_externallyDefined Z_AccessControlResponse_externallyDefined
91 #define Z_ResourceReportStatus_success Z_ResourceReportResponse_success
92 #define Z_ResourceReportStatus_partial Z_ResourceReportResponse_partial
93 #define Z_ResourceReportStatus_failure_1 Z_ResourceReportResponse_failure_1
94 #define Z_ResourceReportStatus_failure_2 Z_ResourceReportResponse_failure_2
95 #define Z_ResourceReportStatus_failure_3 Z_ResourceReportResponse_failure_3
96 #define Z_ResourceReportStatus_failure_4 Z_ResourceReportResponse_failure_4
97 #define Z_ResourceReportStatus_failure_5 Z_ResourceReportResponse_failure_5
98 #define Z_ResourceReportStatus_failure_6 Z_ResourceReportResponse_failure_6
100 #define Z_SortResultSetStatus_empty Z_SortResponse_empty
101 #define Z_SortResultSetStatus_interim Z_SortResponse_interim
102 #define Z_SortResultSetStatus_unchanged Z_SortResponse_unchanged
103 #define Z_SortResultSetStatus_none Z_SortResponse_none
106 typedef Z_External Z_DatabaseRecord;
107 typedef struct Z_IOItemOrder Z_ItemOrder;
109 YAZ_EXPORT Z_APDU *zget_APDU(ODR o, int which);
110 YAZ_EXPORT Z_Close *zget_Close (ODR o);
111 YAZ_EXPORT Odr_oid *yaz_oidval_to_z3950oid (ODR o, int oid_class,
113 YAZ_EXPORT Odr_oid *yaz_str_to_z3950oid (ODR o, int oid_class,
115 YAZ_EXPORT const char *yaz_z3950oid_to_str (Odr_oid *oid, int *oid_class);
117 YAZ_EXPORT const char* yaz_z3950_oid_value_to_str(oid_value ov, oid_class oc);
119 /** \brief Performs "pretty" display of GRS-1 record to WRBUF */
120 YAZ_EXPORT void yaz_display_grs1(WRBUF wrbuf, Z_GenericRecord *r, int flags);
122 /** \brief Performs "pretty" display of OPAC record to WRBUF */
123 YAZ_EXPORT void yaz_display_OPAC(WRBUF wrbuf, Z_OPACRecord *r, int flags);
125 /** \brief Performs "pretty" display of OPAC record to WRBUF using marc_t */
126 void yaz_opac_decode_wrbuf(yaz_marc_t mt, Z_OPACRecord *r, WRBUF wrbuf);
128 /** \brief Encodes Z39.50 Init OPtions based on string mnemonics */
129 YAZ_EXPORT int yaz_init_opt_encode(Z_Options *opt, const char *opt_str,
132 /** \brief Decodes Z39.50 Init Options - for printing */
133 YAZ_EXPORT void yaz_init_opt_decode(Z_Options *opt,
134 void (*pr)(const char *name,
137 /** \brief Creates Default Diag Format Diagnostic */
139 Z_DefaultDiagFormat *zget_DefaultDiagFormat(ODR o, int error,
140 const char *addinfo);
142 /** \brief Creates Surrogate Diagnostic Records */
144 Z_NamePlusRecord *zget_surrogateDiagRec(ODR o, const char *dbname,
145 int error, const char *addinfo);
147 /** \brief Creates Initialize Response diagnostics */
149 Z_External *zget_init_diagnostics(ODR odr, int error, const char *addinfo);
151 /** \brief Creates Initialize Response diagnostics (Octet-aligned EXTERNAL) */
153 Z_External *zget_init_diagnostics_octet(ODR odr, int error, const char *addinfo);
155 /** \brief Creates Diagnostic record - Z_DiagRecs type */
157 Z_DiagRecs *zget_DiagRecs(ODR o, int error, const char *addinfo);
159 /** \brief Creates Diagnostic record - Z_DiagRecs type */
161 Z_DiagRec *zget_DiagRec(ODR o, int error, const char *addinfo);
165 #include <yaz/prt-ext.h>
171 * indent-tabs-mode: nil
173 * vim: shiftwidth=4 tabstop=8 expandtab