/* * Class: net_cp_jlibical_ICalProperty * Method: get_duration * Signature: ()Lnet/cp/jlibical/ICalDurationType; */ JNIEXPORT jobject JNICALL Java_net_cp_jlibical_ICalProperty_get_1duration (JNIEnv *env, jobject jobj) { jobject result = 0; ICalProperty* cObj = getSubjectAsICalProperty(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL); if (cObj != NULL) { // get the dtend time from CObj icaldurationtype aDuration = cObj->get_duration(); // create a new surrogate, using aTime as the subject. result = createNewICalDurationType(env,&aDuration); } return (result); }
/* * Class: net_cp_jlibical_ICalValue * Method: get_duration * Signature: ()Lnet/cp/jlibical/ICalDurationType; */ JNIEXPORT jobject JNICALL Java_net_cp_jlibical_ICalValue_get_1duration (JNIEnv *env, jobject jobj) { jobject result = 0; // get the c++ object from the jobj ICalValue* cObj = getSubjectAsICalValue(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL); if (cObj != NULL) { // get the duration from CObj icaldurationtype aDuration = cObj->get_duration(); // create a new surrogate, using aDuration as the subject. result = createNewICalDurationType(env,&aDuration); } return (result); }