Initial commit
[yaz4j-moved-to-github.git] / dependencies / yaz-2.1.28 / include / yaz / z-date.h
1 /** \file z-date.h
2     \brief ASN.1 Module UserInfoFormat-dateTime
3
4     Generated automatically by YAZ ASN.1 Compiler 0.4
5 */
6
7 #ifndef z_date_H
8 #define z_date_H
9
10 #include <yaz/odr.h>
11 #include <yaz/z-core.h>
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 typedef struct Z_DateTime Z_DateTime;
17 YAZ_EXPORT int z_DateTime (ODR o, Z_DateTime **p, int opt, const char *name);
18
19 typedef struct Z_DateMonthAndDay Z_DateMonthAndDay;
20 YAZ_EXPORT int z_DateMonthAndDay (ODR o, Z_DateMonthAndDay **p, int opt, const char *name);
21
22 typedef struct Z_DateQuarter Z_DateQuarter;
23 YAZ_EXPORT int z_DateQuarter (ODR o, Z_DateQuarter **p, int opt, const char *name);
24
25 typedef struct Z_DateSeason Z_DateSeason;
26 YAZ_EXPORT int z_DateSeason (ODR o, Z_DateSeason **p, int opt, const char *name);
27
28 typedef struct Z_Era Z_Era;
29 YAZ_EXPORT int z_Era (ODR o, Z_Era **p, int opt, const char *name);
30
31 typedef struct Z_DateFlags Z_DateFlags;
32 YAZ_EXPORT int z_DateFlags (ODR o, Z_DateFlags **p, int opt, const char *name);
33
34 typedef struct Z_Date Z_Date;
35 YAZ_EXPORT int z_Date (ODR o, Z_Date **p, int opt, const char *name);
36
37 typedef struct Z_Time Z_Time;
38 YAZ_EXPORT int z_Time (ODR o, Z_Time **p, int opt, const char *name);
39 #ifdef __cplusplus
40 }
41 #endif
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 struct Z_DateTime {
46         Z_Date *date; /* OPT */
47         Z_Time *time; /* OPT */
48 };
49
50 struct Z_DateMonthAndDay {
51         int *month;
52         int *day; /* OPT */
53 };
54
55 struct Z_DateQuarter {
56         int which;
57         union {
58                 Odr_null *first;
59                 Odr_null *second;
60                 Odr_null *third;
61                 Odr_null *fourth;
62 #define Z_DateQuarter_first 1
63 #define Z_DateQuarter_second 2
64 #define Z_DateQuarter_third 3
65 #define Z_DateQuarter_fourth 4
66         } u;
67 };
68
69 struct Z_DateSeason {
70         int which;
71         union {
72                 Odr_null *winter;
73                 Odr_null *spring;
74                 Odr_null *summer;
75                 Odr_null *autumn;
76 #define Z_DateSeason_winter 1
77 #define Z_DateSeason_spring 2
78 #define Z_DateSeason_summer 3
79 #define Z_DateSeason_autumn 4
80         } u;
81 };
82
83 struct Z_Era {
84         int which;
85         union {
86                 Odr_null *decade;
87                 Odr_null *century;
88                 Odr_null *millennium;
89 #define Z_Era_decade 1
90 #define Z_Era_century 2
91 #define Z_Era_millennium 3
92         } u;
93 };
94
95 struct Z_DateFlags {
96         Odr_null *circa; /* OPT */
97         Z_Era *era; /* OPT */
98 };
99
100 struct Z_Date {
101         int *year;
102         int which;
103         union {
104                 Z_DateMonthAndDay *monthAndDay;
105                 int *julianDay;
106                 int *weekNumber;
107                 Z_DateQuarter *quarter;
108                 Z_DateSeason *season;
109 #define Z_Date_monthAndDay 1
110 #define Z_Date_julianDay 2
111 #define Z_Date_weekNumber 3
112 #define Z_Date_quarter 4
113 #define Z_Date_season 5
114         } u; /* OPT */
115         Z_DateFlags *flags; /* OPT */
116 };
117
118 struct Z_Time {
119         int *hour;
120         int *minute; /* OPT */
121         int *second; /* OPT */
122         Z_IntUnit *partOfSecond; /* OPT */
123         int which;
124         union {
125                 Odr_null *local;
126                 Odr_null *utc;
127                 int *utcOffset;
128 #define Z_Time_local 1
129 #define Z_Time_utc 2
130 #define Z_Time_utcOffset 3
131         } u;
132 };
133
134 #ifdef __cplusplus
135 }
136 #endif
137 #endif