FACT++  1.0
void decodeData ( jobject *  _theDataDecoder,
void *  dataAddress,
int *  _dataSize,
int  cleanup 
)

Definition at line 838 of file dim_jni.c.

References dim_jni_attachThread(), NativeDataDecoder_decodeNativeData, NativeDataMemory_decodeData, ourNativeMemoryObject, and theJavaVM.

Referenced by info_service_callback(), info_service_callback_with_cleanup(), and server_cmnd_callback().

839 {
840  jobject theDataDecoder = *_theDataDecoder;
841  int dataSize = *_dataSize;
842  JNIEnv* env;
843  int doit;
844 
845  doit = dim_jni_attachThread(&env);
846 // (*theJavaVM)->AttachCurrentThread(theJavaVM, (void *)&env, NULL);
847  if(dataAddress == NULL)
848  {
849  (*env)->CallVoidMethod(env, theDataDecoder, NativeDataDecoder_decodeNativeData, NULL);
850  }
851  else
852  {
853  /* the decode method will further complete the Memory object and call the decodeData method of the DataDecoder object */
854  (*env)->CallVoidMethod(env, ourNativeMemoryObject, NativeDataMemory_decodeData, (jlong) dataAddress, (jint) dataSize, theDataDecoder);
855  }
856 
857  /* and cleanup */
858  if(cleanup) (*env)->DeleteGlobalRef(env, theDataDecoder);
859  if(doit)
860  (*theJavaVM)->DetachCurrentThread(theJavaVM);
861 
862  return;
863 }
JavaVM * theJavaVM
Definition: dim_jni.c:85
jmethodID NativeDataDecoder_decodeNativeData
Definition: dim_jni.c:109
jobject ourNativeMemoryObject
Definition: dim_jni.c:132
int dim_jni_attachThread(JNIEnv **env)
Definition: dim_jni.c:171
jmethodID NativeDataMemory_decodeData
Definition: dim_jni.c:89

+ Here is the call graph for this function:

+ Here is the caller graph for this function: