bump to 1.0.0 and clean up spec file
[platform/upstream/libical.git] / src / java / ICalDurationType.java
1 /*======================================================================
2  FILE: ICalDurationType.java
3  CREATOR: structConverter 01/11/02
4  (C) COPYRIGHT 2002, Critical Path
5 ======================================================================*/
6
7 package net.cp.jlibical;
8
9 /** struct icaldurationtype */
10 public class ICalDurationType
11 {
12         /**
13          * Constructor for pre-existing native icaldurationtype.
14          * @param obj c++ pointer
15          */
16         ICalDurationType(long obj)
17         {
18                 init(obj);
19         }
20
21         /**
22          * Constructor for default ICalDurationType
23          */
24         public ICalDurationType()
25         {
26         }
27
28         public void setIs_neg(int lcl_arg0)
29         {
30         is_neg = lcl_arg0;
31         }
32         public int getIs_neg()
33         {
34         return is_neg;
35         }
36
37         public void setDays(long lcl_arg0)
38         {
39         days = lcl_arg0;
40         }
41         public long getDays()
42         {
43         return days;
44         }
45
46         public void setWeeks(long lcl_arg0)
47         {
48         weeks = lcl_arg0;
49         }
50         public long getWeeks()
51         {
52         return weeks;
53         }
54
55         public void setHours(long lcl_arg0)
56         {
57         hours = lcl_arg0;
58         }
59         public long getHours()
60         {
61         return hours;
62         }
63
64         public void setMinutes(long lcl_arg0)
65         {
66         minutes = lcl_arg0;
67         }
68         public long getMinutes()
69         {
70         return minutes;
71         }
72
73         public void setSeconds(long lcl_arg0)
74         {
75         seconds = lcl_arg0;
76         }
77         public long getSeconds()
78         {
79         return seconds;
80         }
81
82         // --------------------------------------------------------
83         // Initialization
84         // --------------------------------------------------------
85
86         /**
87          * native code inits from an existing struct.
88          */
89         private native void init(long aDuration);
90
91         /**
92         * optimization: init field id cache,
93         */
94         private native static void initFIDs();
95
96         /**
97         * load the jni library for this class
98         */
99         static {
100                 System.loadLibrary("ical_jni");
101                 initFIDs();
102         }
103
104         // --------------------------------------------------------
105         // Fields
106         // --------------------------------------------------------
107
108         private int     is_neg;
109         private long    days;   //  unsigned int
110         private long    weeks;  //  unsigned int
111         private long    hours;  //  unsigned int
112         private long    minutes;        //  unsigned int
113         private long    seconds;        //  unsigned int
114 }