Example #1
0
/*
 * Class:     Jsyringe
 * Method:    download_file_from_zip
 * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
 */
JNIEXPORT jint JNICALL Java_Jsyringe_download_1file_1from_1zip
  (JNIEnv * env, jclass jClassObj, jstring Jurl, jstring Jpath, jstring Joutput)
{
	jint result = -1;
	const char *url, *path, *output;
	J2C(url);
	J2C(path);
	J2C(output);

	result = download_file_from_zip(url, path, output, NULL /*no callback just yet*/);

	JFREE(url);
	JFREE(path);
	JFREE(output);
	return result;
}
Example #2
0
/*
 * Class:     Jsyringe
 * Method:    restore_bundle
 * Signature: (Ljava/lang/String;)Z
 */
JNIEXPORT jboolean JNICALL Java_Jsyringe_restore_1bundle
  (JNIEnv * env, jclass jClass, jstring JbundlePath)
{
	jboolean jresult = JNI_FALSE;
	const char *bundlePath;
	J2C(bundlePath);
	if (!itmd_ensure())
		goto cleanup;
	itmd_restoreBundle(bundlePath);
	jresult = JNI_TRUE;
cleanup:
	JFREE(bundlePath);
	return jresult;
}
Example #3
0
/*
 * Class:     Jsyringe
 * Method:    fuzzy_patch
 * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Z
 */
JNIEXPORT jboolean JNICALL Java_Jsyringe_fuzzy_1patch
  (JNIEnv * env, jclass jClass, jstring Jorig, jstring Jpatched, jstring Jdelta, jint fuzz)
{
	jboolean result = JNI_FALSE;
	const char *orig, *patched, *delta;

	J2C(orig);
	J2C(patched);
	J2C(delta);

	init_diff_byte_rating();

	g_patcher_fuzzLevel = fuzz;

	if (0 == patchFiles(orig, patched, delta)) {
		result = JNI_TRUE;
	}
	
	JFREE(orig);
	JFREE(patched);
	JFREE(delta);

	return result;
}
Example #4
0
jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
{
  JFREE(object);
}
Example #5
0
jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
{
  JFREE(object);
}