Пример #1
0
/*
 * Class:     net_cp_jlibical_ICalProperty
 * Method:    set_duration
 * Signature: (Lnet/cp/jlibical/ICalDurationType;)V
 */
JNIEXPORT void JNICALL Java_net_cp_jlibical_ICalProperty_set_1duration
  (JNIEnv *env, jobject jobj, jobject arg)
{
	ICalProperty* cObj = getSubjectAsICalProperty(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);

	if (cObj != NULL)
	{
		icaldurationtype aDuration;

		if (copyObjToicaldurationtype(env,arg,&aDuration))
		{
			cObj->set_duration(aDuration);
		}
	}
}
/*
 * Class:     net_cp_jlibical_ICalValue
 * Method:    set_duration
 * Signature: (Lnet/cp/jlibical/ICalDurationType;)V
 */
JNIEXPORT void JNICALL Java_net_cp_jlibical_ICalValue_set_1duration
  (JNIEnv *env, jobject jobj, jobject arg)
{
	// get the c++ object from the jobj
	ICalValue* cObj = getSubjectAsICalValue(env,jobj,JLIBICAL_ERR_CLIENT_INTERNAL);

	if (cObj != NULL)
	{
		icaldurationtype aDuration;

		if (copyObjToicaldurationtype(env,arg,&aDuration))
		{
			cObj->set_duration(aDuration);
		}
	}
}