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