Service.
# Copyright (C) 1995-1998, Index Data I/S
# All rights reserved.
# Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile,v 1.26 1998-01-29 13:13:39 adam Exp $
+# $Id: Makefile,v 1.27 1998-02-10 15:31:46 adam Exp $
SHELL=/bin/sh
INCLUDE=-I../include -I.
DEFS=$(INCLUDE) $(CDEFS)
LIB=$(LIBDIR)/libasn.a
PO = proto.o diagbib1.o zget.o prt-rsc.o prt-acc.o prt-exp.o prt-ext.o \
- prt-grs.o prt-exd.o prt-dia.o prt-esp.o prt-arc.o prt-add.o
+ prt-grs.o prt-exd.o prt-dia.o prt-esp.o prt-arc.o prt-add.o prt-dat.o
CPP=$(CC) -E
RANLIB=ranlib
--- /dev/null
+/*
+ * This file is part of the YAZ toolkit:
+ * Copyright (c) 1998, Index Data.
+ * See the file LICENSE for details.
+ * Sebastian Hammer, Adam Dickmeiss
+ *
+ * Contribution by Ronald van Der Meer (RVDM):
+ * Databasix Information Systems B.V., Utrecht, The Netherlands.
+ *
+ * $Log: prt-dat.c,v $
+ * Revision 1.1 1998-02-10 15:31:46 adam
+ * Implemented date and time structure. Changed the Update Extended
+ * Service.
+ *
+ */
+
+#include <proto.h>
+
+int z_MonthAndDay(ODR o, Z_MonthAndDay **p, int opt)
+{
+ if (!odr_sequence_begin(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ return
+ odr_implicit(o, odr_integer, &(*p)->month, ODR_CONTEXT, 2, 0) &&
+ odr_implicit(o, odr_integer, &(*p)->day, ODR_CONTEXT, 3, 1) &&
+ odr_sequence_end(o);
+}
+
+int z_Quarter(ODR o, Z_Quarter **p, int opt)
+{
+ static Odr_arm arm[] =
+ {
+ {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Quarter_first, odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Quarter_second, odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Quarter_third, odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_Quarter_fourth, odr_null},
+ {-1, -1, -1, -1, 0}
+ };
+
+ if (!odr_initmember(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
+ return 1;
+ *p = 0;
+ return opt && odr_ok(o);
+}
+
+int z_Season(ODR o, Z_Season **p, int opt)
+{
+ static Odr_arm arm[] =
+ {
+ {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Season_winter, odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Season_spring, odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Season_summer, odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_Season_autumn, odr_null},
+ {-1, -1, -1, -1, 0}
+ };
+
+ if (!odr_initmember(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
+ return 1;
+ *p = 0;
+ return opt && odr_ok(o);
+}
+
+int z_PartOfYear(ODR o, Z_PartOfYear **p, int opt)
+{
+ static Odr_arm arm[] =
+ {
+ {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_PartOfYear_monthAndDay, z_MonthAndDay},
+ {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_PartOfYear_julianDay, odr_integer},
+ {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_PartOfYear_weekNumber, odr_integer},
+ {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_PartOfYear_quarter, z_Quarter},
+ {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_PartOfYear_season, z_Season},
+ {-1, -1, -1, -1, 0}
+ };
+
+ if (!odr_initmember(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
+ return 1;
+ *p = 0;
+ return opt && odr_ok(o);
+}
+
+int z_Era(ODR o, Z_Era **p, int opt)
+{
+ static Odr_arm arm[] =
+ {
+ {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Era_decade, odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Era_century, odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Era_millennium, odr_null},
+ {-1, -1, -1, -1, 0}
+ };
+
+ if (!odr_initmember(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
+ return 1;
+ *p = 0;
+ return opt && odr_ok(o);
+}
+
+int z_DateFlags(ODR o, Z_DateFlags **p, int opt)
+{
+ if (!odr_sequence_begin(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ return
+ odr_implicit(o, odr_null, &(*p)->circa, ODR_CONTEXT, 1, 1) &&
+ odr_implicit(o, z_Era, &(*p)->era, ODR_CONTEXT, 2, 1) &&
+ odr_sequence_end(o);
+}
+
+int z_Date(ODR o, Z_Date **p, int opt)
+{
+ if (!odr_sequence_begin(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ return
+ odr_implicit(o, odr_integer, &(*p)->year, ODR_CONTEXT, 1, 0) &&
+ odr_implicit(o, z_PartOfYear, &(*p)->partOfYear, ODR_CONTEXT, 1, 1) &&
+ odr_implicit(o, z_DateFlags, &(*p)->flags, ODR_CONTEXT, 2, 1) &&
+ odr_sequence_end(o);
+}
+
+int z_Zone(ODR o, Z_Zone **p, int opt)
+{
+ static Odr_arm arm[] =
+ {
+ {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_Zone_local, odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_Zone_utc, odr_null},
+ {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_Zone_utcOffset, odr_integer},
+ {-1, -1, -1, -1, 0}
+ };
+
+ if (!odr_initmember(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
+ return 1;
+ *p = 0;
+ return opt && odr_ok(o);
+}
+
+int z_Time(ODR o, Z_Time **p, int opt)
+{
+ if (!odr_sequence_begin(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ return
+ odr_implicit(o, odr_integer, &(*p)->hour, ODR_CONTEXT, 1, 0) &&
+ odr_implicit(o, odr_integer, &(*p)->minute, ODR_CONTEXT, 2, 1) &&
+ odr_implicit(o, odr_integer, &(*p)->second, ODR_CONTEXT, 3, 1) &&
+ odr_implicit(o, z_IntUnit, &(*p)->partOfSecond, ODR_CONTEXT, 4, 1) &&
+ odr_implicit(o, z_Zone, &(*p)->zone, ODR_CONTEXT, 5, 1) &&
+ odr_sequence_end(o);
+}
+
+int z_DateTime(ODR o, Z_DateTime **p, int opt)
+{
+ if (!odr_sequence_begin(o, p, sizeof(**p)))
+ return opt && odr_ok(o);
+ return
+ odr_implicit(o, z_Date, &(*p)->z3950Date, ODR_CONTEXT, 1, 1) &&
+ odr_implicit(o, z_Time, &(*p)->z3950Time, ODR_CONTEXT, 2, 1) &&
+ odr_sequence_end(o);
+}
+
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: prt-esp.c,v $
- * Revision 1.1 1995-10-12 10:34:37 quinn
+ * Revision 1.2 1998-02-10 15:31:46 adam
+ * Implemented date and time structure. Changed the Update Extended
+ * Service.
+ *
+ * Revision 1.1 1995/10/12 10:34:37 quinn
* Added Espec-1.
*
*
if (!odr_sequence_begin(o, p, sizeof(**p)))
return opt && odr_ok(o);
return
+ odr_implicit(o, odr_oid, &(*p)->schemaId, ODR_CONTEXT, 0, 1) &&
odr_implicit(o, odr_integer, &(*p)->tagType, ODR_CONTEXT, 1, 1) &&
odr_explicit(o, z_StringOrNumeric, &(*p)->tagValue, ODR_CONTEXT,
2, 0) &&
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: prt-exd.c,v $
- * Revision 1.6 1998-01-05 09:04:57 adam
+ * Revision 1.7 1998-02-10 15:31:46 adam
+ * Implemented date and time structure. Changed the Update Extended
+ * Service.
+ *
+ * Revision 1.6 1998/01/05 09:04:57 adam
* Fixed bugs in encoders/decoders - Not operator (!) missing.
*
* Revision 1.5 1997/04/30 08:52:02 quinn
static Odr_arm arm[] = {
{ODR_IMPLICIT, ODR_CONTEXT, 1, Z_IUTaskPackageRecordStructure_record,
odr_external},
- {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_IUTaskPackageRecordStructure_diagnostic,
- z_DiagRec},
+ {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_IUTaskPackageRecordStructure_surrogateDiagnostics,
+ z_DiagRecs},
{-1, -1, -1, -1, 0}
};
if (!odr_sequence_begin (o, p, sizeof(**p)))
&(*p)->correlationInfo, ODR_CONTEXT, 2, 1) &&
odr_implicit (o, odr_integer,
&(*p)->recordStatus, ODR_CONTEXT, 3, 0) &&
+ odr_implicit (o, z_DiagRecs,
+ &(*p)->supplementalDiagnostics, ODR_CONTEXT, 4, 1) &&
odr_sequence_end (o);
}
&(*p)->schema, ODR_CONTEXT, 3, 1) &&
odr_implicit (o, z_InternationalString,
&(*p)->elementSetName, ODR_CONTEXT, 4, 1) &&
+ odr_implicit (o, odr_external,
+ &(*p)->actionQualifier, ODR_CONTEXT, 5, 1) &&
odr_sequence_end (o);
}
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: prt-ext.c,v $
- * Revision 1.14 1998-01-05 09:04:57 adam
+ * Revision 1.15 1998-02-10 15:31:46 adam
+ * Implemented date and time structure. Changed the Update Extended
+ * Service.
+ *
+ * Revision 1.14 1998/01/05 09:04:57 adam
* Fixed bugs in encoders/decoders - Not operator (!) missing.
*
* Revision 1.13 1997/05/14 06:53:22 adam
{VAL_OPAC, Z_External_OPAC, z_OPACRecord},
{VAL_SEARCHRES1, Z_External_searchResult1, z_SearchInfoReport},
{VAL_DBUPDATE, Z_External_update, z_IUUpdate},
+ {VAL_DATETIME, Z_External_dateTime, z_DateTime},
{VAL_NONE, 0, 0}
};
{ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_searchResult1,
z_SearchInfoReport},
{ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_update, z_IUUpdate},
+ {ODR_EXPLICIT, ODR_CONTEXT, 0, Z_External_dateTime, z_DateTime},
{-1, -1, -1, -1, 0}
};
* OF THIS SOFTWARE.
*
* $Log: oid.h,v $
- * Revision 1.24 1997-09-29 13:18:59 adam
+ * Revision 1.25 1998-02-10 15:31:52 adam
+ * Implemented date and time structure. Changed the Update Extended
+ * Service.
+ *
+ * Revision 1.24 1997/09/29 13:18:59 adam
* Added function, oid_ent_to_oid, to replace the function
* oid_getoidbyent, which is not thread safe.
*
VAL_ESPEC1,
VAL_SOIF,
VAL_SEARCHRES1,
- VAL_THESAURUS
+ VAL_THESAURUS,
+ VAL_CHARLANG,
+ VAL_USERINFO1,
+ VAL_MULTISRCH1,
+ VAL_MULTISRCH2,
+ VAL_DATETIME,
+ VAL_SQLRS,
+ VAL_PDF,
+ VAL_POSTSCRIPT,
+ VAL_HTML,
+ VAL_TIFF,
+ VAL_GIF,
+ VAL_JPEG,
+ VAL_PNG,
+ VAL_MPEG,
+ VAL_SGML,
+ VAL_TIFFB,
+ VAL_WAV,
+ VAL_UPDATEES
} oid_value;
typedef struct oident
/*
- * Copyright (c) 1995, Index Data.
+ * Copyright (c) 1995-1998, Index Data.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation, in whole or in part, for any purpose, is hereby granted,
* OF THIS SOFTWARE.
*
* $Log: proto.h,v $
- * Revision 1.40 1997-09-01 08:49:50 adam
+ * Revision 1.41 1998-02-10 15:31:52 adam
+ * Implemented date and time structure. Changed the Update Extended
+ * Service.
+ *
+ * Revision 1.40 1997/09/01 08:49:50 adam
* New windows NT/95 port using MSV5.0. To export DLL functions the
* YAZ_EXPORT modifier was added. Defined in yconfig.h.
*
YAZ_EXPORT int z_Specification(ODR o, Z_Specification **p, int opt);
YAZ_EXPORT int z_Permissions(ODR o, Z_Permissions **p, int opt);
YAZ_EXPORT int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
+YAZ_EXPORT int z_DiagRecs(ODR o, Z_DiagRecs **p, int opt);
YAZ_EXPORT int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
YAZ_EXPORT int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
YAZ_EXPORT Z_APDU *zget_APDU(ODR o, int which);
#include <prt-add.h>
#include <prt-ext.h>
+#include <prt-dat.h>
#endif
--- /dev/null
+/*
+ * This file is part of the YAZ toolkit:
+ * Copyright (c) 1998, Index Data.
+ * See the file LICENSE for details.
+ * Sebastian Hammer, Adam Dickmeiss
+ *
+ * Contribution by Ronald van Der Meer (RVDM):
+ * Databasix Information Systems B.V., Utrecht, The Netherlands.
+ *
+ * $Log: prt-dat.h,v $
+ * Revision 1.1 1998-02-10 15:31:52 adam
+ * Implemented date and time structure. Changed the Update Extended
+ * Service.
+ *
+ */
+
+#ifndef __PRT_DAT_H
+#define __PRT_DAT_H
+
+#include <yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Z_MonthAndDay
+{
+ int *month;
+ int *day; /* OPTIONAL */
+} Z_MonthAndDay;
+
+typedef struct Z_Quarter
+{
+ int which;
+#define Z_Quarter_first 0
+#define Z_Quarter_second 1
+#define Z_Quarter_third 2
+#define Z_Quarter_fourth 3
+ union
+ {
+ Odr_null *first;
+ Odr_null *second;
+ Odr_null *third;
+ Odr_null *fourth;
+ } u;
+} Z_Quarter;
+
+typedef struct Z_Season
+{
+ int which;
+#define Z_Season_winter 0
+#define Z_Season_spring 1
+#define Z_Season_summer 2
+#define Z_Season_autumn 3
+ union
+ {
+ Odr_null *winter;
+ Odr_null *spring;
+ Odr_null *summer;
+ Odr_null *autumn;
+ } u;
+} Z_Season;
+
+typedef struct Z_PartOfYear
+{
+ int which;
+#define Z_PartOfYear_monthAndDay 0
+#define Z_PartOfYear_julianDay 1
+#define Z_PartOfYear_weekNumber 2
+#define Z_PartOfYear_quarter 3
+#define Z_PartOfYear_season 4
+ union
+ {
+ Z_MonthAndDay *monthAndDay;
+ int *julianDay;
+ int *weekNumber;
+ Z_Quarter *quarter;
+ Z_Season *season;
+ } u;
+} Z_PartOfYear;
+
+typedef struct Z_Era
+{
+ int which;
+#define Z_Era_decade 0
+#define Z_Era_century 1
+#define Z_Era_millennium 2
+ union
+ {
+ Odr_null *decade;
+ Odr_null *century;
+ Odr_null *millennium;
+ } u;
+} Z_Era;
+
+typedef struct Z_DateFlags
+{
+ Odr_null *circa; /* OPTIONAL */
+ Z_Era *era; /* OPTIONAL */
+} Z_DateFlags;
+
+typedef struct Z_Date
+{
+ int *year;
+ Z_PartOfYear *partOfYear; /* OPTIONAL */
+ Z_DateFlags *flags; /* OPTIONAL */
+} Z_Date;
+
+typedef struct Z_Zone
+{
+ int which;
+#define Z_Zone_local 0
+#define Z_Zone_utc 1
+#define Z_Zone_utcOffset 2
+ union
+ {
+ Odr_null *local;
+ Odr_null *utc;
+ int *utcOffset;
+ } u;
+} Z_Zone;
+
+typedef struct Z_Time
+{
+ int *hour;
+ int *minute; /* OPTIONAL */
+ int *second; /* OPTIONAL */
+ Z_IntUnit *partOfSecond; /* OPTIONAL */
+ Z_Zone *zone; /* OPTIONAL */
+} Z_Time;
+
+typedef struct Z_DateTime
+{
+ Z_Date *z3950Date; /* OPTIONAL */
+ Z_Time *z3950Time; /* OPTIONAL */
+} Z_DateTime;
+
+YAZ_EXPORT int z_DateTime(ODR o, Z_DateTime **p, int opt);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
typedef struct Z_SpecificTag
{
+ Odr_oid *schemaId; /* OPTIONAL */
int *tagType; /* OPTIONAL */
Z_StringOrNumeric *tagValue;
Z_Occurrences *occurrences; /* OPTIONAL */
#define Z_IUOriginPartToKeep_recordReplace 2
#define Z_IUOriginPartToKeep_recordDelete 3
#define Z_IUOriginPartToKeep_elementUpdate 4
+#define Z_IUOriginPartToKeep_specialUpdate 5
char *databaseName;
- Odr_oid *schema; /* OPTIONAL */
- char *elementSetName; /* OPTIONAL */
+ Odr_oid *schema; /* OPTIONAL */
+ char *elementSetName; /* OPTIONAL */
+ Odr_external *actionQualifier; /* OPTIONAL */
} Z_IUOriginPartToKeep;
typedef struct Z_IUTaskPackageRecordStructure
{
int which;
#define Z_IUTaskPackageRecordStructure_record 1
-#define Z_IUTaskPackageRecordStructure_diagnostic 2
+#define Z_IUTaskPackageRecordStructure_surrogateDiagnostics 2
union {
Odr_external *record;
- Z_DiagRec *diagnostic;
+ Z_DiagRecs *surrogateDiagnostics;
} u; /* OPTIONAL */
Z_IUCorrelationInfo *correlationInfo; /* OPTIONAL */
int *recordStatus;
#define Z_IUTaskPackageRecordStructureS_queued 2
#define Z_IUTaskPackageRecordStructureS_inProcess 3
#define Z_IUTaskPackageRecordStructureS_failure 4
+ Z_DiagRecs *supplementalDiagnostics; /* OPTIONAL */
} Z_IUTaskPackageRecordStructure;
typedef struct Z_IUTargetPart
#define PRT_EXT_H
#include <yconfig.h>
+#include <prt-dat.h>
#ifdef __cplusplus
extern "C" {
#define Z_External_OPAC 14
#define Z_External_searchResult1 15
#define Z_External_update 16
+#define Z_External_dateTime 17
union
{
/* Generic types */
Z_BriefBib *summary;
Z_SearchInfoReport *searchResult1;
Z_IUUpdate *update;
+ Z_DateTime *dateTime;
} u;
};