legacy/experimental/java-libburnia/src/jni/libisofs/IsoExclude.c

75 lines
1.7 KiB
C

/*
* IsoTreeNode.c
*
* Copyright (c) 2007 Vreixo Formoso
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* See COPYING file for details.
*/
#include "org_pykix_libburnia_libisofs_IsoExclude.h"
#include "libisofs.h"
/*
* Class: org_pykix_libburnia_libisofs_IsoExclude
* Method: iso_exclude_add_path
* Signature: (Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL
Java_org_pykix_libburnia_libisofs_IsoExclude_iso_1exclude_1add_1path
(
JNIEnv *env, jclass cls, jstring path
)
{
const char *cpath;
cpath = (*env)->GetStringUTFChars(env, path, NULL);
if ( cpath == NULL ) {
return; /* OutOfMemoryError already thrown */
}
iso_exclude_add_path(cpath);
(*env)->ReleaseStringUTFChars(env, path, cpath);
}
/*
* Class: org_pykix_libburnia_libisofs_IsoExclude
* Method: iso_exclude_remove_path
* Signature: (Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL
Java_org_pykix_libburnia_libisofs_IsoExclude_iso_1exclude_1remove_1path
(
JNIEnv *env, jclass cls, jstring path
)
{
const char *cpath;
cpath = (*env)->GetStringUTFChars(env, path, NULL);
if ( cpath == NULL ) {
return; /* OutOfMemoryError already thrown */
}
iso_exclude_remove_path(cpath);
(*env)->ReleaseStringUTFChars(env, path, cpath);
}
/*
* Class: org_pykix_libburnia_libisofs_IsoExclude
* Method: iso_exclude_empty
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_org_pykix_libburnia_libisofs_IsoExclude_iso_1exclude_1empty
(
JNIEnv *env, jclass cls
)
{
iso_exclude_empty();
}