source: trunk/gsdl/packages/yaz/z39.50/zes-psched.c@ 1343

Last change on this file since 1343 was 1343, checked in by johnmcp, 24 years ago

Added the YAZ toolkit source to the packages directory (for z39.50 stuff)

  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1/* Generated automatically by the YAZ ASN.1 Compiler 0.3 */
2/* Module-C: ESFormat-PeriodicQuerySchedule */
3
4#include <yaz/zes-psched.h>
5
6int z_PQSPeriodicQueryScheduleEsRequest (ODR o, Z_PQSPeriodicQueryScheduleEsRequest **p, int opt, const char *name)
7{
8 if (!odr_sequence_begin (o, p, sizeof(**p), name))
9 return opt && odr_ok (o);
10 return
11 odr_explicit_tag (o, z_PQSOriginPartToKeep,
12 &(*p)->toKeep, ODR_CONTEXT, 1, 0, "toKeep") &&
13 odr_explicit_tag (o, z_PQSOriginPartNotToKeep,
14 &(*p)->notToKeep, ODR_CONTEXT, 2, 0, "notToKeep") &&
15 odr_sequence_end (o);
16}
17
18int z_PQSPeriodicQueryScheduleTaskPackage (ODR o, Z_PQSPeriodicQueryScheduleTaskPackage **p, int opt, const char *name)
19{
20 if (!odr_sequence_begin (o, p, sizeof(**p), name))
21 return opt && odr_ok (o);
22 return
23 odr_explicit_tag (o, z_PQSOriginPartToKeep,
24 &(*p)->originPart, ODR_CONTEXT, 1, 0, "originPart") &&
25 odr_explicit_tag (o, z_PQSTargetPart,
26 &(*p)->targetPart, ODR_CONTEXT, 2, 0, "targetPart") &&
27 odr_sequence_end (o);
28}
29
30int z_PQSPeriodicQuerySchedule (ODR o, Z_PQSPeriodicQuerySchedule **p, int opt, const char *name)
31{
32 static Odr_arm arm[] = {
33 {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_PQSPeriodicQuerySchedule_esRequest,
34 (Odr_fun) z_PQSPeriodicQueryScheduleEsRequest, "esRequest"},
35 {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_PQSPeriodicQuerySchedule_taskPackage,
36 (Odr_fun) z_PQSPeriodicQueryScheduleTaskPackage, "taskPackage"},
37 {-1, -1, -1, -1, (Odr_fun) 0, 0}
38 };
39 if (!odr_initmember(o, p, sizeof(**p)))
40 return opt && odr_ok(o);
41 if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
42 return 1;
43 *p = 0;
44 return opt && odr_ok(o);
45}
46
47int z_PQSOriginPartToKeep (ODR o, Z_PQSOriginPartToKeep **p, int opt, const char *name)
48{
49 static Odr_arm arm[] = {
50 {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_PQSOriginPartToKeep_packageName,
51 (Odr_fun) z_InternationalString, "packageName"},
52 {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_PQSOriginPartToKeep_exportPackage,
53 (Odr_fun) z_ESExportSpecification, "exportPackage"},
54 {-1, -1, -1, -1, (Odr_fun) 0, 0}
55 };
56 if (!odr_sequence_begin (o, p, sizeof(**p), name))
57 return opt && odr_ok (o);
58 return
59 odr_implicit_tag (o, odr_bool,
60 &(*p)->activeFlag, ODR_CONTEXT, 1, 0, "activeFlag") &&
61 odr_implicit_settag (o, ODR_CONTEXT, 2) &&
62 (odr_sequence_of(o, (Odr_fun) z_InternationalString, &(*p)->databaseNames,
63 &(*p)->num_databaseNames, "databaseNames") || odr_ok(o)) &&
64 odr_implicit_tag (o, odr_integer,
65 &(*p)->resultSetDisposition, ODR_CONTEXT, 3, 1, "resultSetDisposition") &&
66 odr_explicit_tag (o, z_ESDestination,
67 &(*p)->alertDestination, ODR_CONTEXT, 4, 1, "alertDestination") &&
68 ((odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 5, "exportParameters") &&
69 odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) &&
70 odr_constructed_end (o)) || odr_ok(o)) &&
71 odr_sequence_end (o);
72}
73
74int z_PQSOriginPartNotToKeep (ODR o, Z_PQSOriginPartNotToKeep **p, int opt, const char *name)
75{
76 static Odr_arm arm[] = {
77 {ODR_EXPLICIT, ODR_CONTEXT, 1, Z_PQSOriginPartNotToKeep_actualQuery,
78 (Odr_fun) z_Query, "actualQuery"},
79 {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_PQSOriginPartNotToKeep_packageName,
80 (Odr_fun) z_InternationalString, "packageName"},
81 {-1, -1, -1, -1, (Odr_fun) 0, 0}
82 };
83 if (!odr_sequence_begin (o, p, sizeof(**p), name))
84 return opt && odr_ok (o);
85 return
86 ((odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 1, "querySpec") &&
87 odr_choice (o, arm, &(*p)->u, &(*p)->which, 0) &&
88 odr_constructed_end (o)) || odr_ok(o)) &&
89 odr_explicit_tag (o, z_PQSPeriod,
90 &(*p)->originSuggestedPeriod, ODR_CONTEXT, 2, 1, "originSuggestedPeriod") &&
91 odr_implicit_tag (o, odr_generalizedtime,
92 &(*p)->expiration, ODR_CONTEXT, 3, 1, "expiration") &&
93 odr_implicit_tag (o, z_InternationalString,
94 &(*p)->resultSetPackage, ODR_CONTEXT, 4, 1, "resultSetPackage") &&
95 odr_sequence_end (o);
96}
97
98int z_PQSTargetPart (ODR o, Z_PQSTargetPart **p, int opt, const char *name)
99{
100 if (!odr_sequence_begin (o, p, sizeof(**p), name))
101 return opt && odr_ok (o);
102 return
103 odr_explicit_tag (o, z_Query,
104 &(*p)->actualQuery, ODR_CONTEXT, 1, 0, "actualQuery") &&
105 odr_explicit_tag (o, z_PQSPeriod,
106 &(*p)->targetStatedPeriod, ODR_CONTEXT, 2, 0, "targetStatedPeriod") &&
107 odr_implicit_tag (o, odr_generalizedtime,
108 &(*p)->expiration, ODR_CONTEXT, 3, 1, "expiration") &&
109 odr_implicit_tag (o, z_InternationalString,
110 &(*p)->resultSetPackage, ODR_CONTEXT, 4, 1, "resultSetPackage") &&
111 odr_implicit_tag (o, odr_generalizedtime,
112 &(*p)->lastQueryTime, ODR_CONTEXT, 5, 0, "lastQueryTime") &&
113 odr_implicit_tag (o, odr_integer,
114 &(*p)->lastResultNumber, ODR_CONTEXT, 6, 0, "lastResultNumber") &&
115 odr_implicit_tag (o, odr_integer,
116 &(*p)->numberSinceModify, ODR_CONTEXT, 7, 1, "numberSinceModify") &&
117 odr_sequence_end (o);
118}
119
120int z_PQSPeriod (ODR o, Z_PQSPeriod **p, int opt, const char *name)
121{
122 static Odr_arm arm[] = {
123 {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_PQSPeriod_unit,
124 (Odr_fun) z_IntUnit, "unit"},
125 {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_PQSPeriod_businessDaily,
126 (Odr_fun) odr_null, "businessDaily"},
127 {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_PQSPeriod_continuous,
128 (Odr_fun) odr_null, "continuous"},
129 {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_PQSPeriod_other,
130 (Odr_fun) z_InternationalString, "other"},
131 {-1, -1, -1, -1, (Odr_fun) 0, 0}
132 };
133 if (!odr_initmember(o, p, sizeof(**p)))
134 return opt && odr_ok(o);
135 if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
136 return 1;
137 *p = 0;
138 return opt && odr_ok(o);
139}
Note: See TracBrowser for help on using the repository browser.