aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src/java/ICalDurationType.java
blob: 2dcc23442e15c0260e08404c7b79f05d131f6e82 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*======================================================================
 FILE: ICalDurationType.java
 CREATOR: structConverter 01/11/02
 (C) COPYRIGHT 2002, Critical Path
======================================================================*/

package net.cp.jlibical;

/** struct icaldurationtype */
public class ICalDurationType
{
    /**
     * Constructor for pre-existing native icaldurationtype.
     * @param obj c++ pointer
     */
    ICalDurationType(long obj)
    {
        init(obj);
    }

    /**
     * Constructor for default ICalDurationType
     */
    public ICalDurationType()
    {
    }

    public void setIs_neg(int lcl_arg0)
    {
    is_neg = lcl_arg0;
    }
    public int getIs_neg()
    {
    return is_neg;
    }

    public void setDays(long lcl_arg0)
    {
    days = lcl_arg0;
    }
    public long getDays()
    {
    return days;
    }

    public void setWeeks(long lcl_arg0)
    {
    weeks = lcl_arg0;
    }
    public long getWeeks()
    {
    return weeks;
    }

    public void setHours(long lcl_arg0)
    {
    hours = lcl_arg0;
    }
    public long getHours()
    {
    return hours;
    }

    public void setMinutes(long lcl_arg0)
    {
    minutes = lcl_arg0;
    }
    public long getMinutes()
    {
    return minutes;
    }

    public void setSeconds(long lcl_arg0)
    {
    seconds = lcl_arg0;
    }
    public long getSeconds()
    {
    return seconds;
    }

    // --------------------------------------------------------
    // Initialization
    // --------------------------------------------------------

    /**
     * native code inits from an existing struct.
     */
    private native void init(long aDuration);

    /**
    * optimization: init field id cache,
    */
    private native static void initFIDs();

    /**
    * load the jni library for this class
    */
    static {
        System.loadLibrary("ical_jni");
        initFIDs();
    }

    // --------------------------------------------------------
    // Fields
    // --------------------------------------------------------

    private int is_neg;
    private long    days;   //  unsigned int
    private long    weeks;  //  unsigned int
    private long    hours;  //  unsigned int
    private long    minutes;    //  unsigned int
    private long    seconds;    //  unsigned int
}