2 * Copyright (c) 1995, Index Data
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.2 1997-04-30 08:52:02 quinn
10 * Revision 1.1 1996/10/10 11:52:18 quinn
11 * Added SearchResult additionalInfo
18 int z_ResultsByDBList (ODR o, Z_ResultsByDBList **p, int opt)
20 if (odr_initmember (o, p, sizeof(**p)))
21 return opt && odr_ok(o);
22 if (odr_sequence_of (o, z_DatabaseName, &(*p)->elements,
26 return opt && odr_ok(o);
29 int z_ResultsByDB_elem (ODR o, Z_ResultsByDB_elem **p, int opt)
31 static Odr_arm arm[] = {
32 {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ResultsByDB_all, odr_null},
33 {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ResultsByDB_list, z_ResultsByDBList},
36 if (!odr_sequence_begin (o, p, sizeof(**p)))
37 return opt && odr_ok (o);
39 odr_constructed_begin (o, &(*p)->u, ODR_CONTEXT, 1) &&
40 odr_choice (o, arm, &(*p)->u, &(*p)->which) &&
41 odr_constructed_end (o) &&
42 odr_implicit (o, odr_integer,
43 &(*p)->count, ODR_CONTEXT, 2, 1) &&
44 odr_implicit (o, z_InternationalString,
45 &(*p)->resultSetName, ODR_CONTEXT, 3, 1) &&
49 int z_ResultsByDB (ODR o, Z_ResultsByDB **p, int opt)
51 if (odr_initmember (o, p, sizeof(**p)))
52 return opt && odr_ok(o);
53 if (odr_sequence_of (o, z_ResultsByDB_elem, &(*p)->elements,
57 return opt && odr_ok(o);
60 int z_QueryExpressionTerm (ODR o, Z_QueryExpressionTerm **p, int opt)
62 if (!odr_sequence_begin (o, p, sizeof(**p)))
63 return opt && odr_ok (o);
65 odr_explicit (o, z_Term,
66 &(*p)->queryTerm, ODR_CONTEXT, 1, 0) &&
67 odr_implicit (o, z_InternationalString,
68 &(*p)->termComment, ODR_CONTEXT, 2, 1) &&
72 int z_QueryExpression (ODR o, Z_QueryExpression **p, int opt)
74 static Odr_arm arm[] = {
75 {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_QueryExpression_term,
76 z_QueryExpressionTerm},
77 {ODR_EXPLICIT, ODR_CONTEXT, 2, Z_QueryExpression_query, z_Query},
80 if (!odr_initmember(o, p, sizeof(**p)))
81 return opt && odr_ok(o);
82 if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
85 return opt && odr_ok(o);
88 int z_SearchInfoReport_elem (ODR o, Z_SearchInfoReport_elem **p, int opt)
90 if (!odr_sequence_begin (o, p, sizeof(**p)))
91 return opt && odr_ok (o);
93 odr_implicit (o, z_InternationalString,
94 &(*p)->subqueryId, ODR_CONTEXT, 1, 1) &&
95 odr_implicit (o, odr_bool,
96 &(*p)->fullQuery, ODR_CONTEXT, 2, 0) &&
97 odr_explicit (o, z_QueryExpression,
98 &(*p)->subqueryExpression, ODR_CONTEXT, 3, 1) &&
99 odr_explicit (o, z_QueryExpression,
100 &(*p)->subqueryInterpretation, ODR_CONTEXT, 4, 1) &&
101 odr_explicit (o, z_QueryExpression,
102 &(*p)->subqueryRecommendation, ODR_CONTEXT, 5, 1) &&
103 odr_implicit (o, odr_integer,
104 &(*p)->subqueryCount, ODR_CONTEXT, 6, 1) &&
105 odr_implicit (o, z_IntUnit,
106 &(*p)->subqueryWeight, ODR_CONTEXT, 7, 1) &&
107 odr_implicit (o, z_ResultsByDB,
108 &(*p)->resultsByDB, ODR_CONTEXT, 8, 1) &&
109 odr_sequence_end (o);
112 int z_SearchInfoReport (ODR o, Z_SearchInfoReport **p, int opt)
114 if (odr_initmember (o, p, sizeof(**p)))
115 return opt && odr_ok(o);
116 if (odr_sequence_of (o, z_SearchInfoReport_elem, &(*p)->elements,
120 return opt && odr_ok(o);