1 /** \file zes-exps.c
2 \brief ASN.1 Module ESFormat-ExportSpecification
3
4 Generated automatically by YAZ ASN.1 Compiler 0.4
5 */
6 #if HAVE_CONFIG_H
7 #include <config.h>
8 #endif
9
10 #include <yaz/zes-exps.h>
11
z_ESExportSpecificationEsRequest(ODR o,Z_ESExportSpecificationEsRequest ** p,int opt,const char * name)12 int z_ESExportSpecificationEsRequest(ODR o, Z_ESExportSpecificationEsRequest **p, int opt, const char *name)
13 {
14 if (!odr_sequence_begin(o, p, sizeof(**p), name))
15 return odr_missing(o, opt, name) && odr_ok (o);
16 return
17 odr_explicit_tag(o, z_ESOriginPartToKeep,
18 &(*p)->toKeep, ODR_CONTEXT, 1, 0, "toKeep") &&
19 odr_implicit_tag(o, odr_null,
20 &(*p)->notToKeep, ODR_CONTEXT, 2, 0, "notToKeep") &&
21 odr_sequence_end(o);
22 }
23
z_ESExportSpecificationTaskPackage(ODR o,Z_ESExportSpecificationTaskPackage ** p,int opt,const char * name)24 int z_ESExportSpecificationTaskPackage(ODR o, Z_ESExportSpecificationTaskPackage **p, int opt, const char *name)
25 {
26 if (!odr_sequence_begin(o, p, sizeof(**p), name))
27 return odr_missing(o, opt, name) && odr_ok (o);
28 return
29 odr_explicit_tag(o, z_ESOriginPartToKeep,
30 &(*p)->originPart, ODR_CONTEXT, 1, 0, "originPart") &&
31 odr_implicit_tag(o, odr_null,
32 &(*p)->targetPart, ODR_CONTEXT, 2, 0, "targetPart") &&
33 odr_sequence_end(o);
34 }
35
z_ESExportSpecification(ODR o,Z_ESExportSpecification ** p,int opt,const char * name)36 int z_ESExportSpecification(ODR o, Z_ESExportSpecification **p, int opt, const char *name)
37 {
38 static Odr_arm arm[] = {
39 {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ESExportSpecification_esRequest,
40 (Odr_fun) z_ESExportSpecificationEsRequest, "esRequest"},
41 {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ESExportSpecification_taskPackage,
42 (Odr_fun) z_ESExportSpecificationTaskPackage, "taskPackage"},
43 {-1, -1, -1, -1, (Odr_fun) 0, 0}
44 };
45 if (!odr_initmember(o, p, sizeof(**p)))
46 return odr_missing(o, opt, name);
47 if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
48 return 1;
49 if (o->direction == ODR_DECODE)
50 *p = 0;
51 return odr_missing(o, opt, name);
52 }
53
z_ESOriginPartToKeep(ODR o,Z_ESOriginPartToKeep ** p,int opt,const char * name)54 int z_ESOriginPartToKeep(ODR o, Z_ESOriginPartToKeep **p, int opt, const char *name)
55 {
56 if (!odr_sequence_begin(o, p, sizeof(**p), name))
57 return odr_missing(o, opt, name) && odr_ok (o);
58 return
59 odr_implicit_tag(o, z_CompSpec,
60 &(*p)->composition, ODR_CONTEXT, 1, 0, "composition") &&
61 odr_explicit_tag(o, z_ESDestination,
62 &(*p)->exportDestination, ODR_CONTEXT, 2, 0, "exportDestination") &&
63 odr_sequence_end(o);
64 }
65
z_ESDestinationOther(ODR o,Z_ESDestinationOther ** p,int opt,const char * name)66 int z_ESDestinationOther(ODR o, Z_ESDestinationOther **p, int opt, const char *name)
67 {
68 if (!odr_sequence_begin(o, p, sizeof(**p), name))
69 return odr_missing(o, opt, name) && odr_ok (o);
70 return
71 odr_implicit_tag(o, z_InternationalString,
72 &(*p)->vehicle, ODR_CONTEXT, 1, 1, "vehicle") &&
73 odr_implicit_tag(o, z_InternationalString,
74 &(*p)->destination, ODR_CONTEXT, 2, 0, "destination") &&
75 odr_sequence_end(o);
76 }
77
z_ESDestination(ODR o,Z_ESDestination ** p,int opt,const char * name)78 int z_ESDestination(ODR o, Z_ESDestination **p, int opt, const char *name)
79 {
80 static Odr_arm arm[] = {
81 {ODR_IMPLICIT, ODR_CONTEXT, 1, Z_ESDestination_phoneNumber,
82 (Odr_fun) z_InternationalString, "phoneNumber"},
83 {ODR_IMPLICIT, ODR_CONTEXT, 2, Z_ESDestination_faxNumber,
84 (Odr_fun) z_InternationalString, "faxNumber"},
85 {ODR_IMPLICIT, ODR_CONTEXT, 3, Z_ESDestination_x400address,
86 (Odr_fun) z_InternationalString, "x400address"},
87 {ODR_IMPLICIT, ODR_CONTEXT, 4, Z_ESDestination_emailAddress,
88 (Odr_fun) z_InternationalString, "emailAddress"},
89 {ODR_IMPLICIT, ODR_CONTEXT, 5, Z_ESDestination_pagerNumber,
90 (Odr_fun) z_InternationalString, "pagerNumber"},
91 {ODR_IMPLICIT, ODR_CONTEXT, 6, Z_ESDestination_ftpAddress,
92 (Odr_fun) z_InternationalString, "ftpAddress"},
93 {ODR_IMPLICIT, ODR_CONTEXT, 7, Z_ESDestination_ftamAddress,
94 (Odr_fun) z_InternationalString, "ftamAddress"},
95 {ODR_IMPLICIT, ODR_CONTEXT, 8, Z_ESDestination_printerAddress,
96 (Odr_fun) z_InternationalString, "printerAddress"},
97 {ODR_IMPLICIT, ODR_CONTEXT, 100, Z_ESDestination_other,
98 (Odr_fun) z_ESDestinationOther, "other"},
99 {-1, -1, -1, -1, (Odr_fun) 0, 0}
100 };
101 if (!odr_initmember(o, p, sizeof(**p)))
102 return odr_missing(o, opt, name);
103 if (odr_choice(o, arm, &(*p)->u, &(*p)->which, name))
104 return 1;
105 if (o->direction == ODR_DECODE)
106 *p = 0;
107 return odr_missing(o, opt, name);
108 }
109