From 1d88cc1a3680e80dc7996abe5a6e0a99f9ef3d1b Mon Sep 17 00:00:00 2001 From: ian Date: Tue, 14 Mar 2000 09:19:49 +0000 Subject: [PATCH] Added admin extended service encoders & decoders. --- include/yaz/Makefile.am | 4 +- include/yaz/Makefile.in | 4 +- include/yaz/oid.h | 3 +- include/yaz/prt-ext.h | 6 ++- include/yaz/z-proto.h | 6 ++- include/yaz/zes-admin.h | 106 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 122 insertions(+), 7 deletions(-) create mode 100644 include/yaz/zes-admin.h diff --git a/include/yaz/Makefile.am b/include/yaz/Makefile.am index ea8ebd2..fd840ee 100644 --- a/include/yaz/Makefile.am +++ b/include/yaz/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.7 2000-03-01 11:06:09 adam Exp $ +## $Id: Makefile.am,v 1.8 2000-03-14 09:19:49 ian Exp $ pkginclude_HEADERS= backend.h ccl.h comstack.h \ d1_attset.h d1_map.h data1.h diagbib1.h \ @@ -9,7 +9,7 @@ pkginclude_HEADERS= backend.h ccl.h comstack.h \ ill.h ill-core.h item-req.h z-accdes1.h z-accform1.h \ z-acckrb1.h z-core.h z-date.h z-diag1.h z-espec1.h z-estask.h z-exp.h \ z-grs.h z-opac.h z-proto.h z-rrf1.h z-rrf2.h z-sum.h z-sutrs.h z-uifr1.h \ - z-univ.h zes-expi.h zes-exps.h zes-order.h zes-pquery.h zes-psched.h \ + z-univ.h zes-expi.h zes-exps.h zes-order.h zes-pquery.h zes-psched.h zes-admin.h \ \ zes-pset.h zes-update.h zes-update0.h \ prt-acc.h prt-add.h prt-arc.h prt-dat.h prt-dia.h prt-esp.h \ diff --git a/include/yaz/Makefile.in b/include/yaz/Makefile.in index 791d2ba..7b65fdc 100644 --- a/include/yaz/Makefile.in +++ b/include/yaz/Makefile.in @@ -68,7 +68,7 @@ RANLIB = @RANLIB@ SUBDIRS_VAR = @SUBDIRS_VAR@ VERSION = @VERSION@ -pkginclude_HEADERS = backend.h ccl.h comstack.h d1_attset.h d1_map.h data1.h diagbib1.h log.h logrpn.h marcdisp.h nmem.h odr.h oid.h options.h otherinfo.h pquery.h prt-ext.h readconf.h statserv.h tcpip.h tpath.h wrbuf.h xmalloc.h yaz-ccl.h yaz-util.h yaz-version.h yconfig.h proto.h ill.h ill-core.h item-req.h z-accdes1.h z-accform1.h z-acckrb1.h z-core.h z-date.h z-diag1.h z-espec1.h z-estask.h z-exp.h z-grs.h z-opac.h z-proto.h z-rrf1.h z-rrf2.h z-sum.h z-sutrs.h z-uifr1.h z-univ.h zes-expi.h zes-exps.h zes-order.h zes-pquery.h zes-psched.h zes-pset.h zes-update.h zes-update0.h prt-acc.h prt-add.h prt-arc.h prt-dat.h prt-dia.h prt-esp.h prt-exd.h prt-exp.h prt-grs.h prt-proto.h prt-rsc.h prt-univ.h +pkginclude_HEADERS = backend.h ccl.h comstack.h d1_attset.h d1_map.h data1.h diagbib1.h log.h logrpn.h marcdisp.h nmem.h odr.h oid.h options.h otherinfo.h pquery.h prt-ext.h readconf.h statserv.h tcpip.h tpath.h wrbuf.h xmalloc.h yaz-ccl.h yaz-util.h yaz-version.h yconfig.h proto.h ill.h ill-core.h item-req.h z-accdes1.h z-accform1.h z-acckrb1.h z-core.h z-date.h z-diag1.h z-espec1.h z-estask.h z-exp.h z-grs.h z-opac.h z-proto.h z-rrf1.h z-rrf2.h z-sum.h z-sutrs.h z-uifr1.h z-univ.h zes-expi.h zes-exps.h zes-order.h zes-pquery.h zes-psched.h zes-admin.h zes-pset.h zes-update.h zes-update0.h prt-acc.h prt-add.h prt-arc.h prt-dat.h prt-dia.h prt-esp.h prt-exd.h prt-exp.h prt-grs.h prt-proto.h prt-rsc.h prt-univ.h mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = @@ -148,7 +148,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/include/yaz/oid.h b/include/yaz/oid.h index c0d5e40..4c60ce0 100644 --- a/include/yaz/oid.h +++ b/include/yaz/oid.h @@ -23,7 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Id: oid.h,v 1.5 2000-02-28 11:20:06 adam Exp $ + * $Id: oid.h,v 1.6 2000-03-14 09:19:49 ian Exp $ */ #ifndef OID_H @@ -166,6 +166,7 @@ typedef enum oid_value VAL_SIGLEMARC, VAL_ISDSMARC, VAL_RUSMARC, + VAL_ADMINSERVICE, /* add new types here... */ /* VAL_DYNAMIC must have highest value */ diff --git a/include/yaz/prt-ext.h b/include/yaz/prt-ext.h index 0aab672..d3e5bf8 100644 --- a/include/yaz/prt-ext.h +++ b/include/yaz/prt-ext.h @@ -77,6 +77,7 @@ struct Z_External #define Z_External_update 16 #define Z_External_dateTime 17 #define Z_External_universeReport 18 +#define Z_External_ESAdmin 19 union { /* Generic types */ @@ -99,7 +100,10 @@ struct Z_External Z_SearchInfoReport *searchResult1; Z_IUUpdate *update; Z_DateTime *dateTime; - Z_UniverseReport *universeReport; + Z_UniverseReport *universeReport; +#ifdef ASN_COMPILED + Z_Admin *adminService; +#endif } u; }; diff --git a/include/yaz/z-proto.h b/include/yaz/z-proto.h index 018834d..4662f91 100644 --- a/include/yaz/z-proto.h +++ b/include/yaz/z-proto.h @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: z-proto.h,v $ - * Revision 1.3 2000-02-28 11:20:06 adam + * Revision 1.4 2000-03-14 09:19:49 ian + * Added admin extended service encoders & decoders. + * + * Revision 1.3 2000/02/28 11:20:06 adam * Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL. * * Revision 1.2 1999/12/16 23:36:19 adam @@ -55,6 +58,7 @@ #include #include #include +#include #include #include diff --git a/include/yaz/zes-admin.h b/include/yaz/zes-admin.h new file mode 100644 index 0000000..4415486 --- /dev/null +++ b/include/yaz/zes-admin.h @@ -0,0 +1,106 @@ +/* Generated automatically by the YAZ ASN.1 Compiler 0.3 */ +/* Module-H ESFormat-Admin */ + +#ifndef zes_admin_H +#define zes_admin_H + +#include +#include +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct Z_AdminEsRequest Z_AdminEsRequest; +YAZ_EXPORT int z_AdminEsRequest (ODR o, Z_AdminEsRequest **p, int opt, const char *name); + +typedef struct Z_AdminTaskPackage Z_AdminTaskPackage; +YAZ_EXPORT int z_AdminTaskPackage (ODR o, Z_AdminTaskPackage **p, int opt, const char *name); + +typedef struct Z_Admin Z_Admin; +YAZ_EXPORT int z_Admin (ODR o, Z_Admin **p, int opt, const char *name); + +typedef struct Z_ESAdminOriginPartToKeep Z_ESAdminOriginPartToKeep; +YAZ_EXPORT int z_ESAdminOriginPartToKeep (ODR o, Z_ESAdminOriginPartToKeep **p, int opt, const char *name); + +typedef struct Z_ESAdminOriginPartNotToKeep Z_ESAdminOriginPartNotToKeep; +YAZ_EXPORT int z_ESAdminOriginPartNotToKeep (ODR o, Z_ESAdminOriginPartNotToKeep **p, int opt, const char *name); + +typedef struct Z_ESAdminTargetPart Z_ESAdminTargetPart; +YAZ_EXPORT int z_ESAdminTargetPart (ODR o, Z_ESAdminTargetPart **p, int opt, const char *name); + +typedef struct Z_ImportParameters Z_ImportParameters; +YAZ_EXPORT int z_ImportParameters (ODR o, Z_ImportParameters **p, int opt, const char *name); +#ifdef __cplusplus +} +#endif +#ifdef __cplusplus +extern "C" { +#endif +struct Z_AdminEsRequest { + Z_ESAdminOriginPartToKeep *toKeep; + Z_ESAdminOriginPartNotToKeep *notToKeep; +}; + +struct Z_AdminTaskPackage { + Z_ESAdminOriginPartToKeep *originPart; + Z_ESAdminTargetPart *targetPart; +}; + +struct Z_Admin { + int which; + union { + Z_AdminEsRequest *esRequest; + Z_AdminTaskPackage *taskPackage; +#define Z_Admin_esRequest 1 +#define Z_Admin_taskPackage 2 + } u; +}; + +struct Z_ESAdminOriginPartToKeep { + int which; + union { + Odr_null *reIndex; + Odr_null *truncate; + Odr_null *delete; + Odr_null *create; + Z_ImportParameters *import; + Odr_null *refresh; + Odr_null *commit; +#define Z_ESAdminOriginPartToKeep_reIndex 1 +#define Z_ESAdminOriginPartToKeep_truncate 2 +#define Z_ESAdminOriginPartToKeep_delete 3 +#define Z_ESAdminOriginPartToKeep_create 4 +#define Z_ESAdminOriginPartToKeep_import 5 +#define Z_ESAdminOriginPartToKeep_refresh 6 +#define Z_ESAdminOriginPartToKeep_commit 7 + } u; + Z_InternationalString *databaseName; /* OPT */ +}; + +struct Z_ESAdminOriginPartNotToKeep { + int which; + union { + Z_Segment *records; + Odr_null *recordsWillFollow; +#define Z_ESAdminOriginPartNotToKeep_records 1 +#define Z_ESAdminOriginPartNotToKeep_recordsWillFollow 2 + } u; +}; + +struct Z_ESAdminTargetPart { +#define Z_ESAdminTargetPart_success 1 +#define Z_ESAdminTargetPart_partial 2 +#define Z_ESAdminTargetPart_failure 3 + int *updateStatus; + int num_globalDiagnostics; + Z_DiagRec **globalDiagnostics; /* OPT */ +}; + +struct Z_ImportParameters { + Z_InternationalString *recordType; +}; + +#ifdef __cplusplus +} +#endif +#endif -- 1.7.10.4