1 /*======================================================================
3 CREATOR: gnorman 01/10/02
4 (C) COPYRIGHT 2002, Critical Path
5 ======================================================================*/
7 package net.cp.jlibical;
11 /** It's not typesafe, but it's simple to understand! */
12 public interface ICalValueKind
15 int ICAL_ANY_VALUE=5000;
16 int ICAL_BOOLEAN_VALUE=5001;
17 int ICAL_UTCOFFSET_VALUE=5002;
18 int ICAL_RECUR_VALUE=5003;
19 int ICAL_METHOD_VALUE=5004;
20 int ICAL_CALADDRESS_VALUE=5005;
21 int ICAL_PERIOD_VALUE=5006;
22 int ICAL_STATUS_VALUE=5007;
23 int ICAL_BINARY_VALUE=5008;
24 int ICAL_TEXT_VALUE=5009;
25 int ICAL_DATETIMEDATE_VALUE=5010;
26 int ICAL_DURATION_VALUE=5011;
27 int ICAL_DATETIMEPERIOD_VALUE=5012;
28 int ICAL_INTEGER_VALUE=5013;
29 int ICAL_TIME_VALUE=5014;
30 int ICAL_URI_VALUE=5015;
31 int ICAL_TRIGGER_VALUE=5016;
32 int ICAL_ATTACH_VALUE=5017;
33 int ICAL_CLASS_VALUE=5018;
34 int ICAL_FLOAT_VALUE=5019;
35 int ICAL_QUERY_VALUE=5020;
36 int ICAL_STRING_VALUE=5021;
37 int ICAL_TRANSP_VALUE=5022;
38 int ICAL_X_VALUE=5023;
39 int ICAL_DATETIME_VALUE=5024;
40 int ICAL_GEO_VALUE=5025;
41 int ICAL_DATE_VALUE=5026;
42 int ICAL_ACTION_VALUE=5027;
43 int ICAL_NO_VALUE=5028;
47 * Constructor for ICalValue
48 * @param obj c++ pointer
50 private ICalValue(long obj)
60 public ICalValue(/* ICalValueKind */ int kind)
65 public ICalValue(/* ICalValueKind */ int kind, String str)
70 public native String as_ical_string();
71 //public native boolean is_valid();
72 public native /* ICalValueKind */ int isa();
73 public native boolean isa_value(Object value);
75 /* Special, non autogenerated value accessors */
76 //void set_recur(struct icalrecurrencetype v);
77 //struct icalrecurrencetype get_recur();
79 public native void set_trigger(ICalTriggerType v);
80 public native ICalTriggerType get_trigger();
82 //void set_datetimeperiod(struct icaldatetimeperiodtype v);
83 //struct icaldatetimeperiodtype get_datetimeperiod();
85 //public native static /* ICalParameterXLicCompareType */ int compare(ICalValue a, ICalValue b);
87 /* Convert enumerations */
88 //public native static /* ICalValueKind */ int string_to_kind(String str);
89 //public native String kind_to_string(/* ICalValueKind */ int kind);
92 //public native int get_boolean();
93 //public native void set_boolean(int v);
96 //public native int get_utcoffset();
97 //public native void set_utcoffset(int v);
100 public native /* ICalPropertyMethod */ int get_method();
101 public native void set_method(/* ICalPropertyMethod */ int v);
104 //public native String get_caladdress();
105 //public native void set_caladdress(String v);
108 //struct icalperiodtype get_period();
109 //void set_period(struct icalperiodtype v);
112 //public native /* ICalPropertyStatus */ int get_status();
113 //public native void set_status(/* ICalPropertyStatus */ int v);
116 //public native String get_binary();
117 //public native void set_binary(String v);
120 public native String get_text();
121 public native void set_text(String v);
124 //ICalTimeType get_datetimedate();
125 //void set_datetimedate(ICalTimeType v);
128 public native ICalDurationType get_duration();
129 public native void set_duration(ICalDurationType v);
132 //public native int get_integer();
133 //public native void set_integer(int v);
136 //ICalTimeType get_time();
137 //void set_time(ICalTimeType v);
140 //public native String get_uri();
141 //public native void set_uri(String v);
144 //struct icalattachtype get_attach();
145 //void set_attach(struct icalattachtype v);
148 //public native /* ICalPropertyClass */ int get_class();
149 //public native void set_class(/* ICalPropertyClass */ int v);
152 //public native float get_float();
153 //public native void set_float(float v);
156 public native String get_query();
157 public native void set_query(String v);
160 //public native String get_string();
161 //public native void set_string(String v);
164 //public native /* ICalPropertyTransp */ int get_transp();
165 //public native void set_transp(/* ICalPropertyTransp */ int v);
168 public native ICalTimeType get_datetime();
169 public native void set_datetime(ICalTimeType v);
172 //struct icalgeotype get_geo();
173 //void set_geo(struct icalgeotype v);
176 //ICalTimeType get_date();
177 //void set_date(ICalTimeType v);
180 public native /* ICalPropertyAction */ int get_action();
181 public native void set_action(/* ICalPropertyAction */ int v);
184 * init the native class
186 private void init(long obj)
191 private native void init();
192 private native void init(/* ICalValueKind */ int kind, String str);
193 private native void init(/* ICalValueKind */ int kind);
196 * load the jni library for this class
199 System.loadLibrary("ical_jni");
202 public static void main(String[] args)
204 System.out.println("*** ICalValue main called ok.");
207 /** pointer to C++ object */
208 private long m_Obj = 0;