From e643067ee49c6ff9e8000fb027e9769ccafb9e5c Mon Sep 17 00:00:00 2001 From: Richard Cordovano <rcordovano@basistech.com> Date: Sun, 24 Jan 2016 15:58:11 -0500 Subject: [PATCH] Add data source id support to Java bindings --- bindings/java/jni/dataModel_SleuthkitJNI.cpp | 2 +- bindings/java/jni/dataModel_SleuthkitJNI.h | 3 +++ bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bindings/java/jni/dataModel_SleuthkitJNI.cpp b/bindings/java/jni/dataModel_SleuthkitJNI.cpp index d85658734..4a1fbe520 100644 --- a/bindings/java/jni/dataModel_SleuthkitJNI.cpp +++ b/bindings/java/jni/dataModel_SleuthkitJNI.cpp @@ -1091,7 +1091,7 @@ JNIEXPORT void JNICALL * @param imgPath The full path to the image * @param timezone the timezone the image is from */ -JNIEXPORT void JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_runAddImgNat(JNIEnv * env, jclass obj, jlong process, jstring dataSrcId, jstring imgPath, jstring timeZone) { +JNIEXPORT void JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_runAddDataSourceNat(JNIEnv * env, jclass obj, jlong process, jstring dataSrcId, jstring imgPath, jstring timeZone) { // Validate arguments. TskAutoDb *tskAuto = ((TskAutoDb *) process); diff --git a/bindings/java/jni/dataModel_SleuthkitJNI.h b/bindings/java/jni/dataModel_SleuthkitJNI.h index 157e40267..99955d937 100644 --- a/bindings/java/jni/dataModel_SleuthkitJNI.h +++ b/bindings/java/jni/dataModel_SleuthkitJNI.h @@ -225,6 +225,9 @@ JNIEXPORT jlong JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_initAddImgNat JNIEXPORT void JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_runAddImgNat (JNIEnv *, jclass, jlong, jobjectArray, jint, jstring); +JNIEXPORT void JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_runAddDataSourceNat + (JNIEnv *, jclass, jlong, jstring, jstring, jstring); + /* * Class: org_sleuthkit_datamodel_SleuthkitJNI * Method: stopAddImgNat diff --git a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java index 5b88b6a67..b3c7952bc 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java +++ b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java @@ -102,7 +102,7 @@ public class SleuthkitJNI { private static native void runAddImgNat(long process, String[] imgPath, int splits, String timezone) throws TskCoreException, TskDataException; // if runAddImg finishes without being stopped, revertAddImg or commitAddImg MUST be called - private static native void runAddImgNat(long process, String dataSourceId, String imgPath, String timezone) throws TskCoreException, TskDataException; // if runAddImg finishes without being stopped, revertAddImg or commitAddImg MUST be called + private static native void runAddDataSourceNat(long process, String dataSourceId, String imgPath, String timezone) throws TskCoreException, TskDataException; // if runAddImg finishes without being stopped, revertAddImg or commitAddImg MUST be called private static native void stopAddImgNat(long process) throws TskCoreException; @@ -294,7 +294,7 @@ public void run(String dataSourceId, String imagePath) throws TskCoreException, //additional check in case initAddImgNat didn't throw exception throw new TskCoreException("AddImgProcess::run: AutoDB pointer is NULL after initAddImgNat"); } - runAddImgNat(autoDbPointer, dataSourceId, imagePath, timezone); + runAddDataSourceNat(autoDbPointer, dataSourceId, imagePath, timezone); } /** -- GitLab