Skip to content
Snippets Groups Projects
Commit 5b0859a6 authored by apriestman's avatar apriestman
Browse files

Removed unnecessary addImageName method

parent 679bde48
Branches
Tags
No related merge requests found
...@@ -84,11 +84,6 @@ TskAutoDbJava::initializeJni(JNIEnv * jniEnv, jobject jobj) { ...@@ -84,11 +84,6 @@ TskAutoDbJava::initializeJni(JNIEnv * jniEnv, jobject jobj) {
return TSK_ERR; return TSK_ERR;
} }
m_addImageNameMethodID = m_jniEnv->GetMethodID(m_callbackClass, "addImageName", "(JLjava/lang/String;J)I");
if (m_addImageNameMethodID == NULL) {
return TSK_ERR;
}
m_addVolumeSystemMethodID = m_jniEnv->GetMethodID(m_callbackClass, "addVsInfo", "(JIJJ)J"); m_addVolumeSystemMethodID = m_jniEnv->GetMethodID(m_callbackClass, "addVsInfo", "(JIJJ)J");
if (m_addVolumeSystemMethodID == NULL) { if (m_addVolumeSystemMethodID == NULL) {
return TSK_ERR; return TSK_ERR;
...@@ -227,29 +222,6 @@ TskAutoDbJava::addImageInfo(int type, TSK_OFF_T ssize, int64_t & objId, const st ...@@ -227,29 +222,6 @@ TskAutoDbJava::addImageInfo(int type, TSK_OFF_T ssize, int64_t & objId, const st
return TSK_OK; return TSK_OK;
} }
/**
* Adds one image name
* @param objId The object ID of the image
* @param imgName The image name
* @param sequence The sequence number for this image name
* @returns TSK_ERR on error, TSK_OK on success
*/
TSK_RETVAL_ENUM
TskAutoDbJava::addImageName(int64_t objId, char const* imgName, int sequence) {
jstring imgNamej = m_jniEnv->NewStringUTF(imgName);
jint res = m_jniEnv->CallIntMethod(m_javaDbObj, m_addImageNameMethodID,
objId, imgNamej, (int64_t)sequence);
if (res == 0) {
return TSK_OK;
}
else {
return TSK_ERR;
}
}
/** /**
* Adds volume system to database. Object ID for new vs stored in objId. * Adds volume system to database. Object ID for new vs stored in objId.
* *
......
...@@ -134,30 +134,6 @@ long addImageInfo(int type, long ssize, String timezone, ...@@ -134,30 +134,6 @@ long addImageInfo(int type, long ssize, String timezone,
} }
} }
/**
* Add an image name to the database.
* Intended to be called from the native code during the add image process.
*
* @param objId The object id of the image.
* @param name The file name for the image
* @param sequence The sequence number of this file.
*
* @return 0 if successful, -1 if not
*/
int addImageName(long objId, String name, long sequence) {
try {
beginTransaction();
caseDb.addImageNameJNI(objId, name, sequence, trans);
commitTransaction();
return 0;
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error adding image name to the database - image obj ID: " + objId + ", image name: " + name
+ ", sequence: " + sequence, ex);
revertTransaction();
return -1;
}
}
/** /**
* Add a volume system to the database. * Add a volume system to the database.
* Intended to be called from the native code during the add image process. * Intended to be called from the native code during the add image process.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment