00001
00007 #include <yaz/zes-pset.h>
00008
00009 int z_PRPersistentResultSetEsRequest (ODR o, Z_PRPersistentResultSetEsRequest **p, int opt, const char *name)
00010 {
00011 if (!odr_sequence_begin (o, p, sizeof(**p), name))
00012 return odr_missing(o, opt, name) && odr_ok (o);
00013 return
00014 odr_implicit_tag (o, odr_null,
00015 &(*p)->toKeep, ODR_CONTEXT, 1, 0, "toKeep") &&
00016 odr_explicit_tag (o, z_PROriginPartNotToKeep,
00017 &(*p)->notToKeep, ODR_CONTEXT, 2, 1, "notToKeep") &&
00018 odr_sequence_end (o);
00019 }
00020
00021 int z_PRPersistentResultSetTaskPackage (ODR o, Z_PRPersistentResultSetTaskPackage **p, int opt, const char *name)
00022 {
00023 if (!odr_sequence_begin (o, p, sizeof(**p), name))
00024 return odr_missing(o, opt, name) && odr_ok (o);
00025 return
00026 odr_implicit_tag (o, odr_null,
00027 &(*p)->originPart, ODR_CONTEXT, 1, 0, "originPart") &&
00028 odr_explicit_tag (o, z_PRTargetPart,
00029 &(*p)->targetPart, ODR_CONTEXT, 2, 1, "targetPart") &&
00030 odr_sequence_end (o);
00031 }
00032
00033 int z_PRPersistentResultSet (ODR o, Z_PRPersistentResultSet **p, int opt, const char *name)
00034 {
00035 static Odr_arm arm[] = {
00036 {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_PRPersistentResultSet_esRequest,
00037 (Odr_fun) z_PRPersistentResultSetEsRequest, "esRequest"},
00038 {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_PRPersistentResultSet_taskPackage,
00039 (Odr_fun) z_PRPersistentResultSetTaskPackage, "taskPackage"},
00040 {-1, -1, -1, -1, (Odr_fun) 0, 0}
00041 };
00042 if (!odr_initmember(o, p, sizeof(**p)))
00043 return odr_missing(o, opt, name);
00044 if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
00045 return 1;
00046 if(o->direction == ODR_DECODE)
00047 *p = 0;
00048 return odr_missing(o, opt, name);
00049 }
00050
00051 int z_PROriginPartNotToKeep (ODR o, Z_PROriginPartNotToKeep **p, int opt, const char *name)
00052 {
00053 if (!odr_sequence_begin (o, p, sizeof(**p), name))
00054 return odr_missing(o, opt, name) && odr_ok (o);
00055 return
00056 odr_implicit_tag (o, z_InternationalString,
00057 &(*p)->originSuppliedResultSet, ODR_CONTEXT, 1, 1, "originSuppliedResultSet") &&
00058 odr_implicit_tag (o, odr_integer,
00059 &(*p)->replaceOrAppend, ODR_CONTEXT, 2, 1, "replaceOrAppend") &&
00060 odr_sequence_end (o);
00061 }
00062
00063 int z_PRTargetPart (ODR o, Z_PRTargetPart **p, int opt, const char *name)
00064 {
00065 if (!odr_sequence_begin (o, p, sizeof(**p), name))
00066 return odr_missing(o, opt, name) && odr_ok (o);
00067 return
00068 odr_implicit_tag (o, z_InternationalString,
00069 &(*p)->targetSuppliedResultSet, ODR_CONTEXT, 1, 1, "targetSuppliedResultSet") &&
00070 odr_implicit_tag (o, odr_integer,
00071 &(*p)->numberOfRecords, ODR_CONTEXT, 2, 1, "numberOfRecords") &&
00072 odr_sequence_end (o);
00073 }