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