2 /*======================================================================
3 FILE: net_cp_jlibical_VComponent_cxx.cpp
4 CREATOR: gnorman 1/10/02
5 (C) COPYRIGHT 2002, Critical Path
6 ======================================================================*/
8 #ifndef NET_CP_JLIBICAL_VCOMPONENT_CXX_H
9 #include "net_cp_jlibical_VComponent_cxx.h"
12 #ifndef JLIBICAL_CONSTS_CXX_H
13 #include "jlibical_consts_cxx.h"
16 #ifndef JLIBICAL_UTILS_CXX_H
17 #include "jlibical_utils_cxx.h"
20 #ifndef VCOMPONENT_CXX_H
21 #include "vcomponent.h"
24 #ifndef ICALPROPERTY_CXX_H
25 #include "icalproperty_cxx.h"
29 * Class: net_cp_jlibical_VComponent
30 * Method: as_ical_string
31 * Signature: ()Ljava/lang/String;
33 JNIEXPORT jstring JNICALL Java_net_cp_jlibical_VComponent_as_1ical_1string
34 (JNIEnv *env, jobject jobj)
36 jstring result = NULL;
37 // get the VComponent c++ object from jobj
38 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
42 char* icalStr = cObj->as_ical_string();
49 result = env->NewStringUTF(icalStr);
56 * Class: net_cp_jlibical_VComponent
60 JNIEXPORT jint JNICALL Java_net_cp_jlibical_VComponent_isa
61 (JNIEnv *env, jobject jobj)
64 // get the VComponent c++ object from jobj
65 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
76 * Class: net_cp_jlibical_VComponent
77 * Method: isa_component
78 * Signature: (Ljava/lang/Object;)Z
80 JNIEXPORT jboolean JNICALL Java_net_cp_jlibical_VComponent_isa_1component
81 (JNIEnv *env, jobject jobj, jobject candidateObj)
85 // get the VComponent c++ object from jobj
86 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
89 void* candidateValue = 0;
91 if (candidateObj != NULL)
93 // get the c++ object from candidateObj (as long)
94 candidateValue = getCObjectPtr(env,candidateObj);
97 // get the result from the c++ object (candidateValue can be 0, it's cObj's responsibility to handle this if an error).
98 result = cObj->isa_component(candidateValue) != 0;
105 * Class: net_cp_jlibical_VComponent
106 * Method: add_property
107 * Signature: (Lnet/cp/jlibical/ICalProperty;)V
109 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_add_1property
110 (JNIEnv *env, jobject jobj, jobject jprop)
112 // get the VComponent c++ object from jobj
113 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
116 // get the ICalProperty c++ object from jprop
117 ICalProperty* icalProperty = getSubjectAsICalProperty(env,jprop,JLIBICAL_ERR_ILLEGAL_ARGUMENT);
119 if (icalProperty != NULL)
121 cObj->add_property(icalProperty);
127 * Class: net_cp_jlibical_VComponent
128 * Method: remove_property
129 * Signature: (Lnet/cp/jlibical/ICalProperty;)V
131 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_remove_1property
132 (JNIEnv *env, jobject jobj, jobject jprop)
134 // get the VComponent c++ object from jobj
135 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
138 // get the ICalProperty c++ object from jprop
139 ICalProperty* icalProperty = getSubjectAsICalProperty(env,jprop,JLIBICAL_ERR_ILLEGAL_ARGUMENT);
141 if (icalProperty != NULL)
143 cObj->remove_property(icalProperty);
149 * Class: net_cp_jlibical_VComponent
150 * Method: count_properties
153 JNIEXPORT jint JNICALL Java_net_cp_jlibical_VComponent_count_1properties
154 (JNIEnv *env, jobject jobj, jint kind)
158 // get the VComponent c++ object from jobj
159 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
162 result = cObj->count_properties((icalproperty_kind)kind);
169 * Class: net_cp_jlibical_VComponent
170 * Method: get_current_property
171 * Signature: ()Lnet/cp/jlibical/ICalProperty;
173 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1current_1property
174 (JNIEnv *env, jobject jobj)
177 // get the VComponent c++ object from jobj
178 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
182 // get the current property from CObj
183 ICalProperty* aProperty = cObj->get_current_property();
185 // create a new surrogate, using aProperty as the subject (returns NULL if subject is NULL).
186 result = createNewICalPropertySurrogate(env,aProperty);
193 * Class: net_cp_jlibical_VComponent
194 * Method: get_first_property
195 * Signature: (I)Lnet/cp/jlibical/ICalProperty;
197 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1first_1property
198 (JNIEnv *env, jobject jobj, jint kind)
201 // get the VComponent c++ object from jobj
202 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
206 // get the first property from CObj
207 ICalProperty* aProperty = cObj->get_first_property((icalproperty_kind)kind);
209 // create a new surrogate, using aProperty as the subject (returns NULL if subject is NULL).
210 result = createNewICalPropertySurrogate(env,aProperty);
217 * Class: net_cp_jlibical_VComponent
218 * Method: get_next_property
219 * Signature: (I)Lnet/cp/jlibical/ICalProperty;
221 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1next_1property
222 (JNIEnv *env, jobject jobj, jint kind)
225 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
229 // get the next property from CObj
230 ICalProperty* aProperty = cObj->get_next_property((icalproperty_kind)kind);
232 // create a new surrogate, using aProperty as the subject (returns NULL if subject is NULL).
233 result = createNewICalPropertySurrogate(env,aProperty);
240 * Class: net_cp_jlibical_VComponent
242 * Signature: ()Lnet/cp/jlibical/VComponent;
244 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1inner
245 (JNIEnv *env, jobject jobj)
248 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
252 // get the next property from CObj
253 VComponent* inner = cObj->get_inner();
255 // create a new surrogate, using inner as the subject (returns NULL if subject is NULL).
256 result = createNewVComponentSurrogate(env,inner);
263 * Class: net_cp_jlibical_VComponent
264 * Method: add_component
265 * Signature: (Lnet/cp/jlibical/VComponent;)V
267 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_add_1component
268 (JNIEnv *env, jobject jobj, jobject jcomp)
270 // get the VComponent c++ object from jobj
271 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
274 // get the VComponent c++ object from jcomp
275 VComponent* aComponent = getSubjectAsVComponent(env,jcomp,JLIBICAL_ERR_ILLEGAL_ARGUMENT);
277 if (aComponent != NULL)
279 cObj->add_component(aComponent);
285 * Class: net_cp_jlibical_VComponent
286 * Method: remove_component
287 * Signature: (Lnet/cp/jlibical/VComponent;)V
289 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_remove_1component
290 (JNIEnv *env, jobject jobj, jobject jcomp)
292 // get the VComponent c++ object from jobj
293 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
296 // get the VComponent c++ object from jcomp
297 VComponent* aComponent = getSubjectAsVComponent(env,jcomp,JLIBICAL_ERR_ILLEGAL_ARGUMENT);
299 if (aComponent != NULL)
301 cObj->remove_component(aComponent);
307 * Class: net_cp_jlibical_VComponent
308 * Method: count_components
311 JNIEXPORT jint JNICALL Java_net_cp_jlibical_VComponent_count_1components
312 (JNIEnv *env, jobject jobj, jint kind)
316 // get the VComponent c++ object from jobj
317 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
320 result = cObj->count_components((icalcomponent_kind)kind);
327 * Class: net_cp_jlibical_VComponent
328 * Method: get_current_component
329 * Signature: ()Lnet/cp/jlibical/VComponent;
331 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1current_1component
332 (JNIEnv *env, jobject jobj)
335 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
339 // get the next property from CObj
340 VComponent* aComponent = cObj->get_current_component();
342 // create a new surrogate, using aComponent as the subject (returns NULL if subject is NULL).
343 result = createNewVComponentSurrogate(env,aComponent);
350 * Class: net_cp_jlibical_VComponent
351 * Method: get_first_component
352 * Signature: (I)Lnet/cp/jlibical/VComponent;
354 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1first_1component
355 (JNIEnv *env, jobject jobj, jint kind)
358 // get the VComponent c++ object from jobj
359 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
363 // get the first component from CObj
364 VComponent* aComponent = cObj->get_first_component((icalcomponent_kind)kind);
366 // create a new surrogate, using aComponent as the subject (returns NULL if subject is NULL).
367 result = createNewVComponentSurrogate(env,aComponent);
374 * Class: net_cp_jlibical_VComponent
375 * Method: get_next_component
376 * Signature: (I)Lnet/cp/jlibical/VComponent;
378 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1next_1component
379 (JNIEnv *env, jobject jobj, jint kind)
382 // get the VComponent c++ object from jobj
383 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
387 // get the first component from CObj
388 VComponent* aComponent = cObj->get_next_component((icalcomponent_kind)kind);
390 // create a new surrogate, using aComponent as the subject (returns NULL if subject is NULL).
391 result = createNewVComponentSurrogate(env,aComponent);
398 * Class: net_cp_jlibical_VComponent
399 * Method: get_dtstart
400 * Signature: ()Lnet/cp/jlibical/ICalTimeType;
402 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1dtstart
403 (JNIEnv *env, jobject jobj)
406 // get the VComponent c++ object from jobj
407 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
411 // get the dtstart time from CObj
412 icaltimetype aTime = cObj->get_dtstart();
414 // create a new surrogate, using aTime as the subject.
415 result = createNewICalTimeType(env,&aTime);
422 * Class: net_cp_jlibical_VComponent
423 * Method: set_dtstart
424 * Signature: (Lnet/cp/jlibical/ICalTimeType;)V
426 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_set_1dtstart
427 (JNIEnv *env, jobject jobj, jobject dtstart)
430 // get the VComponent c++ object from jobj
431 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
435 icaltimetype aStartTime;
437 if (copyObjToicaltimetype(env,dtstart,&aStartTime))
439 cObj->set_dtstart(aStartTime);
445 * Class: net_cp_jlibical_VComponent
447 * Signature: ()Lnet/cp/jlibical/ICalTimeType;
449 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1dtend
450 (JNIEnv *env, jobject jobj)
453 // get the VComponent c++ object from jobj
454 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
458 // get the dtend time from CObj
459 icaltimetype aTime = cObj->get_dtend();
461 // create a new surrogate, using aTime as the subject.
462 result = createNewICalTimeType(env,&aTime);
470 * Class: net_cp_jlibical_VComponent
472 * Signature: (Lnet/cp/jlibical/ICalTimeType;)V
474 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_set_1dtend
475 (JNIEnv *env, jobject jobj, jobject dtend)
478 // get the VComponent c++ object from jobj
479 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
483 icaltimetype anEndTime;
485 if (copyObjToicaltimetype(env,dtend,&anEndTime))
487 cObj->set_dtend(anEndTime);
493 * Class: net_cp_jlibical_VComponent
494 * Method: get_duration
495 * Signature: ()Lnet/cp/jlibical/ICalDurationType;
497 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1duration
498 (JNIEnv *env, jobject jobj)
501 // get the VComponent c++ object from jobj
502 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
506 // get the duration time from CObj
507 icaldurationtype aDuration = cObj->get_duration();
509 // create a new surrogate, using aDuration as the subject.
510 result = createNewICalDurationType(env,&aDuration);
517 * Class: net_cp_jlibical_VComponent
518 * Method: set_duration
519 * Signature: (Lnet/cp/jlibical/ICalDurationType;)V
521 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_set_1duration
522 (JNIEnv *env, jobject jobj, jobject duration)
525 // get the VComponent c++ object from jobj
526 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
530 icaldurationtype aDuration;
532 if (copyObjToicaldurationtype(env,duration,&aDuration))
534 cObj->set_duration(aDuration);
540 * Class: net_cp_jlibical_VComponent
544 JNIEXPORT jint JNICALL Java_net_cp_jlibical_VComponent_get_1method
545 (JNIEnv *env, jobject jobj)
548 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
552 result = cObj->get_method();
559 * Class: net_cp_jlibical_VComponent
563 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_set_1method
564 (JNIEnv *env, jobject jobj, jint value)
566 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
570 cObj->set_method((icalproperty_method)value);
575 * Class: net_cp_jlibical_VComponent
576 * Method: get_summary
577 * Signature: ()Ljava/lang/String;
579 JNIEXPORT jstring JNICALL Java_net_cp_jlibical_VComponent_get_1summary
580 (JNIEnv *env, jobject jobj)
582 jstring result = NULL;
583 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
587 char* icalStr = cObj->get_summary();
594 result = env->NewStringUTF(icalStr);
601 * Class: net_cp_jlibical_VComponent
602 * Method: set_summary
603 * Signature: (Ljava/lang/String;)V
605 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_set_1summary
606 (JNIEnv *env, jobject jobj, jstring str)
608 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
612 const char* szTemp = env->GetStringUTFChars(str,NULL);
614 cObj->set_summary((char*)szTemp);
615 env->ReleaseStringUTFChars(str,szTemp);
620 * Class: net_cp_jlibical_VComponent
621 * Method: get_dtstamp
622 * Signature: ()Lnet/cp/jlibical/ICalTimeType;
624 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1dtstamp
625 (JNIEnv *env, jobject jobj)
628 // get the VComponent c++ object from jobj
629 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
633 // get the recurrenceid from CObj
634 icaltimetype aDTStamp = cObj->get_dtstamp();
636 // create a new surrogate, using aRecurrenceId as the subject.
637 result = createNewICalTimeType(env,&aDTStamp);
644 * Class: net_cp_jlibical_VComponent
645 * Method: set_dtstamp
646 * Signature: (Lnet/cp/jlibical/ICalTimeType;)V
648 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_set_1dtstamp
649 (JNIEnv *env, jobject jobj, jobject dtstamp)
651 // get the VComponent c++ object from jobj
652 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
656 icaltimetype aDTStamp;
658 if (copyObjToicaltimetype(env,dtstamp,&aDTStamp))
660 cObj->set_dtstamp(aDTStamp);
666 * Class: net_cp_jlibical_VComponent
667 * Method: get_location
668 * Signature: ()Ljava/lang/String;
670 JNIEXPORT jstring JNICALL Java_net_cp_jlibical_VComponent_get_1location
671 (JNIEnv *env, jobject jobj)
673 jstring result = NULL;
674 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
678 char* icalStr = cObj->get_location();
685 result = env->NewStringUTF(icalStr);
692 * Class: net_cp_jlibical_VComponent
693 * Method: set_location
694 * Signature: (Ljava/lang/String;)V
696 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_set_1location
697 (JNIEnv *env, jobject jobj, jstring str)
699 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
703 const char* szTemp = env->GetStringUTFChars(str,NULL);
705 cObj->set_summary((char*)szTemp);
706 env->ReleaseStringUTFChars(str,szTemp);
711 * Class: net_cp_jlibical_VComponent
712 * Method: get_description
713 * Signature: ()Ljava/lang/String;
715 JNIEXPORT jstring JNICALL Java_net_cp_jlibical_VComponent_get_1description
716 (JNIEnv *env, jobject jobj)
718 jstring result = NULL;
719 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
723 char* icalStr = cObj->get_description();
730 result = env->NewStringUTF(icalStr);
737 * Class: net_cp_jlibical_VComponent
738 * Method: set_description
739 * Signature: (Ljava/lang/String;)V
741 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_set_1description
742 (JNIEnv *env, jobject jobj, jstring str)
744 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
748 const char* szTemp = env->GetStringUTFChars(str,NULL);
750 cObj->set_summary((char*)szTemp);
751 env->ReleaseStringUTFChars(str,szTemp);
755 * Class: net_cp_jlibical_VComponent
757 * Signature: ()Ljava/lang/String;
759 JNIEXPORT jstring JNICALL Java_net_cp_jlibical_VComponent_get_1uid
760 (JNIEnv *env, jobject jobj)
762 jstring result = NULL;
763 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
767 char* icalStr = cObj->get_uid();
774 result = env->NewStringUTF(icalStr);
781 * Class: net_cp_jlibical_VComponent
783 * Signature: (Ljava/lang/String;)V
785 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_set_1uid
786 (JNIEnv *env, jobject jobj, jstring str)
788 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
792 const char* szTemp = env->GetStringUTFChars(str,NULL);
794 cObj->set_uid((char*)szTemp);
795 env->ReleaseStringUTFChars(str,szTemp);
800 * Class: net_cp_jlibical_VComponent
801 * Method: get_first_real_component
802 * Signature: ()Lnet/cp/jlibical/VComponent;
804 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1first_1real_1component
805 (JNIEnv *env, jobject jobj)
808 // get the VComponent c++ object from jobj
809 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
813 // get the first component from CObj
814 VComponent* aComponent = cObj->get_first_real_component();
816 // create a new surrogate, using aComponent as the subject (returns NULL if subject is NULL).
817 result = createNewVComponentSurrogate(env,aComponent);
824 * Class: net_cp_jlibical_VComponent
828 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_init__
829 (JNIEnv *env, jobject jobj)
831 setCObjectPtr(env,jobj,new VComponent());
835 * Class: net_cp_jlibical_VComponent
837 * Signature: (Ljava/lang/String;)V
839 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_init__Ljava_lang_String_2
840 (JNIEnv *env, jobject jobj, jstring str)
844 const char* szTemp = env->GetStringUTFChars(str,NULL);
846 setCObjectPtr(env,jobj,new VComponent((char*)szTemp));
847 env->ReleaseStringUTFChars(str,szTemp);
851 throwException( env, JLIBICAL_ERR_ILLEGAL_ARGUMENT );
856 * Class: net_cp_jlibical_VComponent
860 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_init__I
861 (JNIEnv *env, jobject jobj, jint kind)
863 setCObjectPtr(env,jobj,new VComponent((icalcomponent_kind)kind));
867 * Class: net_cp_jlibical_VComponent
868 * Method: set_relcalid
869 * Signature: (Ljava/lang/String;)V
871 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_set_1relcalid
872 (JNIEnv *env, jobject jobj, jstring str)
874 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
878 const char* szTemp = env->GetStringUTFChars(str,NULL);
880 cObj->set_relcalid((char*)szTemp);
881 env->ReleaseStringUTFChars(str,szTemp);
886 * Class: net_cp_jlibical_VComponent
887 * Method: get_relcalid
888 * Signature: ()Ljava/lang/String;
890 JNIEXPORT jstring JNICALL Java_net_cp_jlibical_VComponent_get_1relcalid
891 (JNIEnv *env, jobject jobj)
893 jstring result = NULL;
894 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
898 char* icalStr = cObj->get_relcalid();
905 result = env->NewStringUTF(icalStr);
912 * Class: net_cp_jlibical_VComponent
913 * Method: get_recurrenceid
914 * Signature: ()Lnet/cp/jlibical/ICalTimeType;
916 JNIEXPORT jobject JNICALL Java_net_cp_jlibical_VComponent_get_1recurrenceid
917 (JNIEnv *env, jobject jobj)
920 // get the VComponent c++ object from jobj
921 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
925 // get the recurrenceid from CObj
926 icaltimetype aRecurrenceId = cObj->get_recurrenceid();
928 // create a new surrogate, using aRecurrenceId as the subject.
929 result = createNewICalTimeType(env,&aRecurrenceId);
936 * Class: net_cp_jlibical_VComponent
937 * Method: set_recurrenceid
938 * Signature: (Lnet/cp/jlibical/ICalTimeType;)V
940 JNIEXPORT void JNICALL Java_net_cp_jlibical_VComponent_set_1recurrenceid
941 (JNIEnv *env, jobject jobj, jobject recurrenceid)
944 // get the VComponent c++ object from jobj
945 VComponent* cObj = getSubjectAsVComponent(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);
949 icaltimetype aRecurrenceId;
951 if (copyObjToicaltimetype(env,recurrenceid,&aRecurrenceId))
953 cObj->set_recurrenceid(aRecurrenceId);