15 #define dim_Dbg_MEMORY dim_Dbg_SERIALIZER 16 #define dim_Dbg_MUTABLE_MEMORY dim_Dbg_SERIALIZER 17 #define dim_Dbg_MEMORY_ALLOCATE dim_Dbg_SERIALIZER 30 #ifdef JNI_VERSION_1_4 31 #define JNI_VERSION JNI_VERSION_1_4 33 #ifdef JNI_VERSION_1_3 34 #define JNI_VERSION JNI_VERSION_1_3 36 #ifdef JNI_VERSION_1_2 37 #define JNI_VERSION JNI_VERSION_1_2 39 #define JNI_VERSION 0x00010001 43 #define dim_JNI_version DIM_VERSION_NUMBER 56 #define DBG_filter 0xFFFFFFFF 59 #define DBG_filter dim_Dbg_MODULE 63 #define DBG(test) if(((test&DBG_filter) & DBG_mask ) !=0) 64 #define DBGe(test) if(((test&DBG_filter) & DBGe_trap ) !=0) DBG_Trap(test); DBG(test) 65 #define DBGm(test) if(((test&DBG_filter) & DBGm_trap ) !=0) DBG_Trap(test); DBG(test) 66 #define DBGx(test) if(((test&DBG_filter) & DBGx_trap ) !=0) DBG_Trap(test); DBG(test) 145 #define NOT_STAMPED 0 159 void send_callback(jobject* _aCompletionHandler,
int* _status);
175 tid = GetCurrentThreadId();
179 tid = pthread_self();
190 (*theJavaVM)->AttachCurrentThread(
theJavaVM, (
void *)env, NULL);
198 JNIEXPORT jint JNICALL
213 #ifdef develop_a_better_understanding_of_java 218 test_cid = (*env)->FindClass(env,
"dim/test/Ntest$static_class");
219 test_mid = (*env)->GetMethodID(env,test_cid,
"instance_method",
"()V");
220 test_mid = (*env)->GetMethodID(env,test_cid,
"<init>",
"()V");
221 test_mid = (*env)->GetStaticMethodID(env,test_cid,
"static_method",
"()V");
222 if ((*env)->ExceptionOccurred(env)) (*env)->ExceptionDescribe(env);
224 test_cid = (*env)->FindClass(env,
"dim/test/Ntest$instance_class");
225 test_mid = (*env)->GetMethodID(env,test_cid,
"instance_method",
"()V");
226 test_mid = (*env)->GetMethodID(env,test_cid,
"<init>",
"()V");
227 if ((*env)->ExceptionOccurred(env)) (*env)->ExceptionDescribe(env);
229 test_cid = (*env)->FindClass(env,
"dim/test/Ntest$method_class");
230 test_mid = (*env)->GetMethodID(env,test_cid,
"instance_method",
"()V");
231 test_mid = (*env)->GetMethodID(env,test_cid,
"<init>",
"()V");
232 if ((*env)->ExceptionOccurred(env)) (*env)->ExceptionDescribe(env);
242 if ((*env)->ExceptionOccurred(env)) {bugs++; (*env)->ExceptionDescribe(env);}
246 if ((*env)->ExceptionOccurred(env)) {bugs++; (*env)->ExceptionDescribe(env);}
253 if ((*env)->ExceptionOccurred(env)) {bugs++; (*env)->ExceptionDescribe(env);}
260 if ((*env)->ExceptionOccurred(env)) {bugs++; (*env)->ExceptionDescribe(env);}
265 if ((*env)->ExceptionOccurred(env)) {bugs++; (*env)->ExceptionDescribe(env);}
270 if ((*env)->ExceptionOccurred(env)) {bugs++; (*env)->ExceptionDescribe(env);}
275 if ((*env)->ExceptionOccurred(env)) {bugs++; (*env)->ExceptionDescribe(env);}
280 if ((*env)->ExceptionOccurred(env)) {bugs++; (*env)->ExceptionDescribe(env);}
288 if ((*env)->ExceptionOccurred(env)) {bugs++; (*env)->ExceptionDescribe(env);}
296 if ((*env)->ExceptionOccurred(env)) {bugs++; (*env)->ExceptionDescribe(env);}
298 NativeDimExit = (*env)->FindClass(env,
"dim/DimExitHandler$DimExit");
304 if ((*env)->ExceptionOccurred(env)) {bugs++; (*env)->ExceptionDescribe(env);}
311 JNIEXPORT jint JNICALL
351 (JNIEnv* env, jclass nativeClass)
357 (*env)->GetJavaVM(env, &jvm);
367 (JNIEnv* env, jclass nativeClass)
383 (JNIEnv *env, jclass nativeClass, jint dbg_mask)
388 printf(
"DimJNI: debug mask changed from %08x to %08x\n",
DBG_mask, dbg_mask);
398 (JNIEnv *env, jclass nativeClass)
415 jobject theCompletionHandler = *_theCompletionHandler;
425 (*env)->DeleteGlobalRef(env, theCompletionHandler);
428 (*theJavaVM)->DetachCurrentThread(
theJavaVM);
437 (JNIEnv *env, jstring
name, jobject theCompletionHandler, jint
mode, jint timeout,
void* data_address,
int data_size)
441 void (*callback_funct)();
442 jobject callback_param;
443 jobject theSendSynchronizer;
447 const char* cmnd = (*env)->GetStringUTFChars(env, name, 0);
457 callback_param = (*env)->NewGlobalRef(env, theSendSynchronizer);
460 else if(theCompletionHandler)
463 callback_param = (*env)->NewGlobalRef(env, theCompletionHandler);
473 ret =
request_command((
char *)cmnd, data_address, data_size, callback_funct, (
dim_long)callback_param, stamped);
474 DBGx(
dim_Dbg_SEND_NATIVE) printf(
"DimJNI: Client.Send(%s,(%s) 0x%x) returns %d \n", cmnd, send_data_format, * (
int*) data_address, ret);
477 (*env)->ReleaseStringUTFChars(env, name, cmnd);
480 if(!ret && callback_param)
486 if(mode & dim_Native_F_WAIT)
503 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jboolean
data)
507 return send_data(env, name, theCompletionHandler, mode, timeout, &data,
sizeof(data));
517 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jchar data)
521 return send_data(env, name, theCompletionHandler, mode, timeout, &data,
sizeof(data));
531 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jbyte data)
535 return send_data(env, name, theCompletionHandler, mode, timeout, &data,
sizeof(data));
545 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jshort data)
549 return send_data(env, name, theCompletionHandler, mode, timeout, &data,
sizeof(data));
559 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jint data)
563 return send_data(env, name, theCompletionHandler, mode, timeout, &data,
sizeof(data));
573 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jlong data)
577 return send_data(env, name, theCompletionHandler, mode, timeout, &data,
sizeof(data));
587 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jfloat data)
591 return send_data(env, name, theCompletionHandler, mode, timeout, &data,
sizeof(data));
601 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jdouble data)
605 return send_data(env, name, theCompletionHandler, mode, timeout, &data,
sizeof(data));
615 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jstring sdata)
618 const char* data = (*env)->GetStringUTFChars(env, sdata, 0);
622 ret =
send_data(env, name, theCompletionHandler, mode, timeout, (
void*) data, (
int)strlen(data)+1);
624 (*env)->ReleaseStringUTFChars(env,sdata, data);
635 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jbooleanArray dataArray)
637 jboolean* nativeDataArray;
641 nativeDataArray = (*env)->GetBooleanArrayElements(env,dataArray,0);
642 length = (jint)(*env)->GetArrayLength(env,dataArray) * (jint)
sizeof(*nativeDataArray);
646 ret =
send_data(env, name, theCompletionHandler, mode, timeout, nativeDataArray, length);
648 (*env)->ReleaseBooleanArrayElements(env,dataArray,nativeDataArray,JNI_ABORT);
659 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jcharArray dataArray)
661 jchar* nativeDataArray;
665 nativeDataArray = (*env)->GetCharArrayElements(env,dataArray,0);
666 length = (jint)(*env)->GetArrayLength(env,dataArray) * (jint)
sizeof(*nativeDataArray);
670 ret =
send_data(env, name, theCompletionHandler, mode, timeout, nativeDataArray, length);
672 (*env)->ReleaseCharArrayElements(env,dataArray,nativeDataArray,JNI_ABORT);
683 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jbyteArray dataArray)
685 jbyte* nativeDataArray;
689 nativeDataArray = (*env)->GetByteArrayElements(env,dataArray,0);
690 length = (jint)(*env)->GetArrayLength(env,dataArray) * (jint)
sizeof(*nativeDataArray);
694 ret =
send_data(env, name, theCompletionHandler, mode, timeout, nativeDataArray, length);
696 (*env)->ReleaseByteArrayElements(env,dataArray,nativeDataArray,JNI_ABORT);
707 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jshortArray dataArray)
709 jshort* nativeDataArray;
713 nativeDataArray = (*env)->GetShortArrayElements(env,dataArray,0);
714 length = (jint)(*env)->GetArrayLength(env,dataArray) * (jint)
sizeof(*nativeDataArray);
718 ret =
send_data(env, name, theCompletionHandler, mode, timeout, nativeDataArray, length);
720 (*env)->ReleaseShortArrayElements(env,dataArray,nativeDataArray,JNI_ABORT);
731 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jintArray dataArray)
733 jint* nativeDataArray;
737 nativeDataArray = (*env)->GetIntArrayElements(env,dataArray,0);
738 length = (jint)(*env)->GetArrayLength(env,dataArray) * (jint)
sizeof(*nativeDataArray);
742 ret =
send_data(env, name, theCompletionHandler, mode, timeout, nativeDataArray, length);
744 (*env)->ReleaseIntArrayElements(env,dataArray,nativeDataArray,JNI_ABORT);
755 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jlongArray dataArray)
757 jlong* nativeDataArray;
761 nativeDataArray = (*env)->GetLongArrayElements(env,dataArray,0);
762 length = (jint)(*env)->GetArrayLength(env,dataArray) * (jint)
sizeof(*nativeDataArray);
766 ret =
send_data(env, name, theCompletionHandler, mode, timeout, nativeDataArray, length);
768 (*env)->ReleaseLongArrayElements(env,dataArray,nativeDataArray,JNI_ABORT);
779 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jfloatArray dataArray)
781 jfloat* nativeDataArray;
785 nativeDataArray = (*env)->GetFloatArrayElements(env,dataArray,0);
786 length = (jint)(*env)->GetArrayLength(env,dataArray) * (jint)
sizeof(*nativeDataArray);
790 ret =
send_data(env, name, theCompletionHandler, mode, timeout, nativeDataArray, length);
792 (*env)->ReleaseFloatArrayElements(env,dataArray,nativeDataArray,JNI_ABORT);
803 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jdoubleArray dataArray)
805 jdouble* nativeDataArray;
809 nativeDataArray = (*env)->GetDoubleArrayElements(env,dataArray,0);
810 length = (jint)(*env)->GetArrayLength(env,dataArray) * (jint)
sizeof(*nativeDataArray);
814 ret =
send_data(env, name, theCompletionHandler, mode, timeout, nativeDataArray, length);
816 (*env)->ReleaseDoubleArrayElements(env,dataArray,nativeDataArray,JNI_ABORT);
827 (JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jlong nativeDataBlock, jint nativeDataSize)
832 return send_data(env, name, theCompletionHandler, mode, timeout, (
void*) nativeDataBlock, nativeDataSize);
838 void decodeData(jobject* _theDataDecoder,
void* dataAddress,
int* _dataSize,
int cleanup)
840 jobject theDataDecoder = *_theDataDecoder;
841 int dataSize = *_dataSize;
847 if(dataAddress == NULL)
858 if(cleanup) (*env)->DeleteGlobalRef(env, theDataDecoder);
860 (*theJavaVM)->DetachCurrentThread(
theJavaVM);
872 decodeData(_theDataDecoder, dataAddress, _dataSize, 0);
881 decodeData(_theDataDecoder, dataAddress, _dataSize, 1);
897 (*theJavaVM)->DetachCurrentThread(
theJavaVM);
917 (jint)severity, (jint)code, (jstring)(*env)->NewStringUTF(env, msg));
919 (*theJavaVM)->DetachCurrentThread(
theJavaVM);
938 (jint)severity, (jint)code, (jstring)(*env)->NewStringUTF(env, msg));
940 (*theJavaVM)->DetachCurrentThread(
theJavaVM);
961 (*theJavaVM)->DetachCurrentThread(
theJavaVM);
977 (JNIEnv *env, jclass This, jstring name, jobject theNativeDataDecoder, jint mode, jint timeout)
982 int service_type = mode & 0x0FFF;
983 void (*callback_function)();
984 jobject callback_param;
985 jobject theReceiveSynchronizer;
986 const char* info = (*env)->GetStringUTFChars(env, name, 0);
987 extern unsigned request_service(
char *,
int,
int ,
void *,
int ,
void (*)(),
998 callback_param = (*env)->NewGlobalRef(env, theReceiveSynchronizer);
1002 callback_param = (*env)->NewGlobalRef(env, theNativeDataDecoder);
1011 ret = (jint)
request_service((
char *)info, service_type, timeout, 0, 0, callback_function, (
dim_long)callback_param, &no_link, 0, stamped);
1012 DBGx(
dim_Dbg_INFO_SERVICE) printf(
"DimJNI: client infoService(%s, DataDecoder@0x%08lx, mode=%d, timeout=%d ) returns %d\n", info, (
dim_long)theNativeDataDecoder, mode, timeout, ret);
1013 (*env)->ReleaseStringUTFChars(env, name, info);
1015 if(mode & dim_Native_F_WAIT)
1031 (JNIEnv *env, jclass This, jobject aDimTimer, jint secs)
1033 jobject callback_param;
1034 void (*callback_function)();
1037 callback_param = (*env)->NewGlobalRef(env, aDimTimer);
1043 return (jlong)callback_param;
1053 (JNIEnv *env, jclass This, jlong aDimTimer)
1055 jobject callback_param;
1061 callback_param = (jobject) aDimTimer;
1077 (JNIEnv* env, jclass This, jint sid)
1096 (*env)->DeleteGlobalRef(env, (jobject) servp->
tag);
1110 (JNIEnv* env, jclass This)
1125 (JNIEnv* env, jclass This, jint sid)
1138 (JNIEnv* env, jclass This)
1154 (JNIEnv* env, jclass This, jint sid)
1170 (JNIEnv* env, jclass This, jint sid)
1172 int mysecs, mymilli;
1185 (JNIEnv* env, jclass This, jint sid)
1187 int mysecs, mymilli;
1205 const char* serverNameUTF = (*env)->GetStringUTFChars(env, serverName, 0);
1213 (*env)->ReleaseStringUTFChars(env, serverName, serverNameUTF);
1223 (JNIEnv* env, jclass This)
1243 jobject dataEncoder = *_dataEncoder;
1254 if(theMemory == NULL)
1267 if ((*env)->ExceptionOccurred(env)) (*env)->ExceptionDescribe(env);
1269 (*theJavaVM)->DetachCurrentThread(
theJavaVM);
1281 (JNIEnv* env, jclass This)
1296 (JNIEnv* env, jclass This)
1304 return (*env)->NewStringUTF(env, name);
1315 (JNIEnv* env, jclass This)
1334 (JNIEnv* env, jclass This)
1352 (JNIEnv* env, jclass This)
1365 (JNIEnv* env, jclass This)
1371 return (*env)->NewStringUTF(env, name);
1382 (JNIEnv* env, jclass This)
1399 (JNIEnv* env, jclass This, jstring serviceName, jstring serviceType, jobject dataEncoder)
1401 const char* serviceNameUTF = (*env)->GetStringUTFChars(env, serviceName, 0);
1402 const char* serviceTypeUTF = (*env)->GetStringUTFChars(env, serviceType, 0);
1408 dataEncoder = (*env)->NewGlobalRef(env, dataEncoder);
1413 (*env)->ReleaseStringUTFChars(env, serviceName, serviceNameUTF);
1414 (*env)->ReleaseStringUTFChars(env, serviceType, serviceTypeUTF);
1424 decodeData(_theDataDecoder, dataAddress, _dataSize, 0);
1434 (JNIEnv* env, jclass This, jstring serviceName, jstring serviceType, jobject dataDecoder)
1436 const char* serviceNameUTF = (*env)->GetStringUTFChars(env, serviceName, 0);
1437 const char* serviceTypeUTF = (*env)->GetStringUTFChars(env, serviceType, 0);
1442 dataDecoder = (*env)->NewGlobalRef(env, dataDecoder);
1445 DBGx(
dim_Dbg_ADD_CMND) printf(
"DimJNI: Server.addCmnd(%s,%s, @%08lx) = %d\n",serviceNameUTF, serviceTypeUTF, (
dim_long) dataDecoder, sid);
1447 (*env)->ReleaseStringUTFChars(env, serviceName, serviceNameUTF);
1448 (*env)->ReleaseStringUTFChars(env, serviceType, serviceTypeUTF);
1459 (JNIEnv* env, jclass This, jint sid, jintArray clients)
1465 if(clients==NULL) clientArray = NULL;
1466 else clientArray = (*env)->GetIntArrayElements(env,clients,0);
1471 if(clientArray!=NULL) (*env)->ReleaseIntArrayElements(env,clients,clientArray,JNI_ABORT);
1483 (JNIEnv* env, jclass This, jint sid)
1498 (JNIEnv* env, jclass This)
1513 (JNIEnv* env, jclass This)
1516 void (*callback_function)();
1533 (JNIEnv* env, jclass This)
1536 void (*callback_function)();
1553 (JNIEnv* env, jclass This)
1556 void (*callback_function)();
1573 (JNIEnv* env, jclass This)
1588 (JNIEnv* env, jclass This)
1603 (JNIEnv* env, jclass This)
1618 (JNIEnv* env, jclass This)
1633 (JNIEnv* env, jclass This, jstring nodes)
1635 const char* nodesUTF = (*env)->GetStringUTFChars(env, nodes, 0);
1649 (JNIEnv* env, jclass This, jint port)
1663 (JNIEnv* env, jclass This, jstring nodes)
1665 const char* nodesUTF = (*env)->GetStringUTFChars(env, nodes, 0);
1680 (JNIEnv* env, jclass This, jint port)
1694 (JNIEnv* env, jclass This)
1700 return (*env)->NewStringUTF(env, (
char*)nodes);
1709 (JNIEnv* env, jclass This)
1715 return (*env)->NewStringUTF(env, (
char*)nodes);
1724 (JNIEnv* env, jclass This)
1738 (JNIEnv* env, jclass This)
1752 (JNIEnv* env, jclass This, jint sid, jint qual)
1768 (JNIEnv* env, jclass This, jint sid, jint secs, jint millisecs)
1785 (JNIEnv *env, jclass nativeClass, jlong internalDataAddress, jint internalDataSize, jint dumpOptions)
1788 int* data = (
int*) internalDataAddress;
1789 int leng = (int)internalDataSize/(
int)
sizeof(int);
1795 for (i=0;i<leng;i++)
1797 if((i%8)==0) printf(
"%04x:",i);
1798 printf(
" %08x", *(data++));
1799 if((i%8)==7) printf(
"\n");
1801 if((leng%8)!=0) printf(
"\n");
1813 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress)
1818 return *(jboolean*)nativeDataAddress;
1827 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress)
1832 return *(jchar*)nativeDataAddress;
1841 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress)
1846 return *(jbyte*)nativeDataAddress;
1855 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress)
1860 return *(jshort*)nativeDataAddress;
1869 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress)
1874 return *(jint*)nativeDataAddress;
1883 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress)
1888 return *(jlong*)nativeDataAddress;
1897 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress)
1902 return *(jfloat*)nativeDataAddress;
1911 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress)
1916 return *(jdouble*)nativeDataAddress;
1926 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jint maxSize)
1932 return (*env)->NewStringUTF(env, (
char*)nativeDataAddress);
1942 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jbooleanArray array, jint arrayOffset, jint length)
1946 (*env)->SetBooleanArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
1956 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jcharArray array, jint arrayOffset, jint length)
1960 (*env)->SetCharArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
1970 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jbyteArray array, jint arrayOffset, jint length)
1974 (*env)->SetByteArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
1984 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jshortArray array, jint arrayOffset, jint length)
1988 (*env)->SetShortArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
1998 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jintArray array, jint arrayOffset, jint length)
2002 (*env)->SetIntArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2012 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jlongArray array, jint arrayOffset, jint length)
2016 (*env)->SetLongArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2026 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jfloatArray array, jint arrayOffset, jint length)
2030 (*env)->SetFloatArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2040 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jdoubleArray array, jint arrayOffset, jint length)
2044 (*env)->SetDoubleArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2059 (JNIEnv* env, jclass nativeClass, jint
size)
2076 (JNIEnv* env, jclass nativeClass, jlong desc)
2092 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jboolean data)
2097 *(jboolean*)nativeDataAddress = data;
2106 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jchar data)
2111 *(jchar*)nativeDataAddress = data;
2120 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jbyte data)
2125 *(jbyte*)nativeDataAddress = data;
2134 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jshort data)
2139 *(jshort*)nativeDataAddress = data;
2148 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jint data)
2153 *(jint*)nativeDataAddress = data;
2162 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jlong data)
2167 *(jlong*)nativeDataAddress = data;
2176 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jfloat data)
2181 *(jfloat*)nativeDataAddress = data;
2190 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jdouble data)
2195 *(jdouble*)nativeDataAddress = data;
2204 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jstring data)
2206 const char* charData = (*env)->GetStringUTFChars(env, data, 0);
2211 strcpy((
char*)nativeDataAddress, charData);
2212 (*env)->ReleaseStringUTFChars(env, data, charData);
2222 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jbooleanArray array, jint arrayOffset, jint length)
2226 (*env)->GetBooleanArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2236 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jcharArray array, jint arrayOffset, jint length)
2240 (*env)->GetCharArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2250 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jbyteArray array, jint arrayOffset, jint length)
2254 (*env)->GetByteArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2264 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jshortArray array, jint arrayOffset, jint length)
2268 (*env)->GetShortArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2278 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jintArray array, jint arrayOffset, jint length)
2282 (*env)->GetIntArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2292 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jlongArray array, jint arrayOffset, jint length)
2296 (*env)->GetLongArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2306 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jfloatArray array, jint arrayOffset, jint length)
2310 (*env)->GetFloatArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2320 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jdoubleArray array, jint arrayOffset, jint length)
2324 (*env)->GetDoubleArrayRegion(env, array, arrayOffset, length, (
void*) nativeDataAddress);
2334 (JNIEnv* env, jclass nativeClass, jlong destinationDataAddress, jlong sourceDataAddress, jint length)
2339 memcpy((
void *)destinationDataAddress, (
void *)sourceDataAddress, (
size_t)length);
2351 f_boolean,
f_byte,
f_char,
f_short,
f_int,
f_long,
f_float,
f_double,
f_string,
f_object,
2352 a_boolean,
a_byte,
a_char,
a_short,
a_int,
a_long,
a_float,
a_double,
a_string,
a_object,
2382 (JNIEnv* env, jclass nativeClass, jclass objectClass, jint maxEntries)
2391 if(maxEntries==0) maxEntries = 10;
2394 descriptor->
objectClass = (*env)->NewGlobalRef(env, objectClass);
2408 if(entry==NULL)
return NULL;
2410 descriptor->
entry = entry;
2424 (JNIEnv* env, jclass nativeClass, jlong desc, jstring fieldName, jstring fieldType, jint
offset)
2428 const char* name = (*env)->GetStringUTFChars(env, fieldName, 0);
2429 const char*
type = (*env)->GetStringUTFChars(env, fieldType, 0);
2452 entry->
length =
sizeof(jboolean);
2458 entry->
length =
sizeof(jbyte);
2465 entry->
length =
sizeof(jchar);
2472 entry->
length =
sizeof(jshort);
2479 entry->
length =
sizeof(jint);
2486 entry->
length =
sizeof(jlong);
2493 entry->
length =
sizeof(jfloat);
2500 entry->
length =
sizeof(jdouble);
2510 printf(
"DimJNI: addFieldToObjectDescriptor - type %s not yet supported. (field %s)\n", name, type);
2515 (*env)->ReleaseStringUTFChars(env, fieldName, name);
2516 (*env)->ReleaseStringUTFChars(env, fieldType, type);
2527 (JNIEnv* env, jclass nativeClass, jlong desc)
2533 (*env)->DeleteGlobalRef(env, descriptor->
objectClass);
2548 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jobject theObject, jlong desc)
2560 if((*env)->IsInstanceOf(env, theObject, objectClass) != JNI_TRUE)
2563 jclass exceptionClass = (*env)->FindClass(env,
"java/lang/IllegalArgumentException");
2564 (*env)->ThrowNew(env, exceptionClass,
" (Sorry...)");
2569 entry = descriptor->
entry;
2570 for (i=0; i<descriptor->
entries; i++)
2572 switch (entry->
type)
2575 (*env)->SetBooleanField(env, theObject, entry->
fieldID, *(jboolean*) (nativeDataAddress+entry->
offset));
2578 (*env)->SetByteField( env, theObject, entry->
fieldID, *(jbyte*) (nativeDataAddress+entry->
offset));
2581 (*env)->SetCharField( env, theObject, entry->
fieldID, *(jchar*) (nativeDataAddress+entry->
offset));
2584 (*env)->SetShortField( env, theObject, entry->
fieldID, *(jshort*) (nativeDataAddress+entry->
offset));
2587 (*env)->SetIntField( env, theObject, entry->
fieldID, *(jint*) (nativeDataAddress+entry->
offset));
2590 (*env)->SetLongField( env, theObject, entry->
fieldID, *(jlong*) (nativeDataAddress+entry->
offset));
2593 (*env)->SetFloatField( env, theObject, entry->
fieldID, *(jfloat*) (nativeDataAddress+entry->
offset));
2596 (*env)->SetDoubleField( env, theObject, entry->
fieldID, *(jdouble*) (nativeDataAddress+entry->
offset));
2620 (JNIEnv* env, jclass nativeClass, jlong nativeDataAddress, jobject theObject, jlong desc)
2632 if((*env)->IsInstanceOf(env, theObject, objectClass) != JNI_TRUE)
2635 jclass exceptionClass = (*env)->FindClass(env,
"java/lang/IllegalArgumentException");
2636 (*env)->ThrowNew(env, exceptionClass,
" (Sorry...)");
2641 entry = descriptor->
entry;
2642 for (i=0; i<descriptor->
entries; i++)
2644 switch (entry->
type)
2647 *(jboolean*) (nativeDataAddress+entry->
offset) = (*env)->GetBooleanField(env, theObject, entry->
fieldID);
2650 *(jbyte*) (nativeDataAddress+entry->
offset) = (*env)->GetByteField(env, theObject, entry->
fieldID);
2653 *(jchar*) (nativeDataAddress+entry->
offset) = (*env)->GetCharField(env, theObject, entry->
fieldID);
2656 *(jshort*) (nativeDataAddress+entry->
offset) = (*env)->GetShortField(env, theObject, entry->
fieldID);
2659 *(jint*) (nativeDataAddress+entry->
offset) = (*env)->GetIntField(env, theObject, entry->
fieldID);
2662 *(jlong*) (nativeDataAddress+entry->
offset) = (*env)->GetLongField(env, theObject, entry->
fieldID);
2665 *(jfloat*) (nativeDataAddress+entry->
offset) = (*env)->GetFloatField(env, theObject, entry->
fieldID);
2668 *(jdouble*) (nativeDataAddress+entry->
offset) = (*env)->GetDoubleField(env, theObject, entry->
fieldID);
2708 _RPT1(_CRT_ERROR,
"Invalid allocation size: %u bytes.\n", nSize);
JNIEXPORT void JNICALL Java_dim_MutableMemory_copyFromByteArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jbyteArray array, jint arrayOffset, jint length)
JNIEXPORT jint JNICALL Java_dim_ObjectDescriptor_addFieldToObjectDescriptor(JNIEnv *env, jclass nativeClass, jlong desc, jstring fieldName, jstring fieldType, jint offset)
JNIEXPORT void JNICALL Java_dim_MutableMemory_copyFromCharArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jcharArray array, jint arrayOffset, jint length)
#define dim_Dbg_CMND_CALLBACK
JNIEXPORT void JNICALL Java_dim_MutableMemory_copyFromDoubleArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jdoubleArray array, jint arrayOffset, jint length)
JNIEXPORT void JNICALL Java_dim_DimServer_enableAST(JNIEnv *env, jclass This)
jmethodID NativeDataDecoder_decodeNativeData
#define dim_Native_F_STAMPED
jmethodID NativeDimTimer_timerHandler
objectDescriptorEntry_type * getNextDescriptorEntry(objectDescriptor_type *descriptor)
#define dis_remove_service
JNIEXPORT void JNICALL Java_dim_Memory_copyIntoBooleanArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jbooleanArray array, jint arrayOffset, jint length)
JNIEXPORT void JNICALL Java_dim_MutableMemory_copyFromFloatArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jfloatArray array, jint arrayOffset, jint length)
void dic_add_error_handler(void(*user_routine)())
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2II_3I(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jintArray dataArray)
void dis_disable_padding()
JNIEXPORT void JNICALL Java_dim_Memory_copyIntoByteArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jbyteArray array, jint arrayOffset, jint length)
JNIEXPORT jint JNICALL Java_dim_Memory_getInt(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress)
JNIEXPORT jchar JNICALL Java_dim_Memory_getChar(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress)
JNIEXPORT void JNICALL Java_dim_DimClient_disableAST(JNIEnv *env, jclass This)
JNIEXPORT void JNICALL Java_dim_MutableMemory_setInt(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jint data)
JNIEXPORT void JNICALL Java_dim_Client_releaseService(JNIEnv *env, jclass This, jint sid)
JNIEXPORT void JNICALL Java_dim_DimServer_setDnsNode(JNIEnv *env, jclass This, jstring nodes)
#define dim_Dbg_INFO_SERVICE
int dis_set_dns_port(int port)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2IIC(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jchar data)
#define dim_Dbg_MUTABLE_MEMORY
#define dim_Dbg_DESCRIPTORS
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2IILjava_lang_String_2(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jstring sdata)
JNIEXPORT jstring JNICALL Java_dim_Client_getServer(JNIEnv *env, jclass This)
void server_cmnd_callback(jobject *_theDataDecoder, void *dataAddress, int *_dataSize)
JNIEXPORT void JNICALL Java_dim_Client_stop(JNIEnv *env, jclass This)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2IIJ(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jlong data)
JNIEXPORT jint JNICALL Java_dim_Native_stop(JNIEnv *env, jclass nativeClass)
void timer_callback(jobject *_aDimTimer)
jobject ourNativeDimCltError
jmethodID NativeDimExit_new
#define dim_Dbg_TRANSACTIONS
JNIEXPORT jboolean JNICALL Java_dim_Memory_getBoolean(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress)
JNIEXPORT jstring JNICALL Java_dim_DimClient_getDnsNode(JNIEnv *env, jclass This)
JNIEXPORT void JNICALL Java_dim_MutableMemory_setString(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jstring data)
JNIEXPORT jint JNICALL Java_dim_Server_addService(JNIEnv *env, jclass This, jstring serviceName, jstring serviceType, jobject dataEncoder)
void * id_get_ptr(int id, SRC_TYPES type)
#define dim_Dbg_MEMORY_ALLOCATE
JNIEXPORT jint JNICALL Java_dim_Server_addCommand(JNIEnv *env, jclass This, jstring serviceName, jstring serviceType, jobject dataDecoder)
JNIEXPORT jshort JNICALL Java_dim_Memory_getShort(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2II_3B(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jbyteArray dataArray)
void client_error_callback(int severity, int code, char *msg)
JNIEXPORT jlong JNICALL Java_dim_Memory_getLong(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress)
#define dim_Dbg_SEND_CALLBACK
void info_service_callback_with_cleanup(jobject *_aDataDecoder, void *data, int *_size)
JNIEXPORT void JNICALL Java_dim_MutableMemory_copyFromShortArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jshortArray array, jint arrayOffset, jint length)
JNIEXPORT jstring JNICALL Java_dim_Client_getFormat(JNIEnv *env, jclass This, jint sid)
JNIEXPORT jint JNICALL Java_dim_Server_getClientConnID(JNIEnv *env, jclass This)
jmethodID ReceiveSynchronizer_decodeNativeData
JNIEXPORT void JNICALL Java_dim_MutableMemory_setByte(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jbyte data)
jmethodID NativeDimSrvError_new
jobject ourNativeDimSrvError
int dic_set_dns_node(char *node)
JNIEXPORT void JNICALL Java_dim_DimTimer_stop(JNIEnv *env, jclass This, jlong aDimTimer)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2II_3F(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jfloatArray dataArray)
#define dim_Dbg_ADD_SERVICE
JNIEXPORT jlong JNICALL Java_dim_DimTimer_start(JNIEnv *env, jclass This, jobject aDimTimer, jint secs)
JNIEXPORT jint JNICALL Java_dim_DimServer_getDnsPort(JNIEnv *env, jclass This)
JNIEXPORT jstring JNICALL Java_dim_Memory_getString(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jint maxSize)
jmethodID SendSynchronizer_new
jclass ReceiveSynchronizer
jmethodID ReceiveSynchronizer_getCompletionCode
int dic_get_server(char *name)
JNIEXPORT void JNICALL Java_dim_MutableMemory_setLong(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jlong data)
JNIEXPORT jlong JNICALL Java_dim_ObjectDescriptor_newObjectDescriptor(JNIEnv *env, jclass nativeClass, jclass objectClass, jint maxEntries)
JNIEXPORT jint JNICALL Java_dim_Server_selectiveUpdateService(JNIEnv *env, jclass This, jint sid, jintArray clients)
jmethodID SendSynchronizer_setCompletionCode
jint send_data(JNIEnv *env, jstring name, jobject theCompletionHandler, jint mode, jint timeout, void *data_address, int data_size)
void callServerErrorHandler(int severity, int code, char *msg)
void server_error_callback(int severity, int code, char *msg)
unsigned request_service(char *serv_name, int req_type, int req_timeout, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, void *fill_addr, int fill_size, int stamped)
JNIEXPORT void JNICALL Java_dim_DimErrorHandler_addSrvErrorHandler(JNIEnv *env, jclass This)
#define dis_set_timestamp
JNIEXPORT void JNICALL Java_dim_MutableMemory_setFloat(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jfloat data)
int dic_get_quality(unsigned serv_id)
JNIEXPORT jstring JNICALL Java_dim_Server_getClient(JNIEnv *env, jclass This)
JNIEXPORT void JNICALL Java_dim_Memory_copyIntoFloatArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jfloatArray array, jint arrayOffset, jint length)
jfieldID NativeDataMemory_dataSize
JNIEXPORT void JNICALL Java_dim_MutableMemory_setShort(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jshort data)
JNIEXPORT void JNICALL Java_dim_DimServer_disableAST(JNIEnv *env, jclass This)
void server_setCmnd_callback(jobject *_aDataDecoder, void *address, int *size)
#define dim_Dbg_GETCLIENT
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2IIS(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jshort data)
JNIEXPORT void JNICALL Java_dim_Memory_copyIntoLongArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jlongArray array, jint arrayOffset, jint length)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2IIF(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jfloat data)
JNIEXPORT void JNICALL Java_dim_DimClient_setDnsNode(JNIEnv *env, jclass This, jstring nodes)
void dis_add_error_handler(void(*user_routine)())
static char * send_data_format
int do_update_service(unsigned service_id, int *client_ids)
#define dim_Dbg_UPDATE_SERVICE
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2IIZ(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jboolean data)
int dic_set_dns_port(int port)
JNIEXPORT jint JNICALL Java_dim_Client_getServerConnID(JNIEnv *env, jclass This)
#define dim_Dbg_SERVICE_CALLBACK
JNIEXPORT jint JNICALL Java_dim_Client_getServerPID(JNIEnv *env, jclass This)
#define dim_Dbg_INFO_CALLBACK
JNIEXPORT jint JNICALL Java_dim_Server_startServing(JNIEnv *env, jclass This, jstring serverName)
int dic_get_server_pid(int *pid)
JNIEXPORT jfloat JNICALL Java_dim_Memory_getFloat(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress)
JNIEXPORT jint JNICALL Java_dim_Native_init(JNIEnv *env, jclass nativeClass)
JNIEXPORT jint JNICALL Java_dim_DimInfo_getQuality(JNIEnv *env, jclass This, jint sid)
char * dic_get_server_services(int conn_id)
char * dis_get_client_services(int conn_id)
JNIEXPORT void JNICALL Java_dim_DimService_setQuality(JNIEnv *env, jclass This, jint sid, jint qual)
jmethodID SendSynchronizer_getCompletionCode
void dtq_start_timer(int time, void(*user_routine)(), dim_long tag)
jmethodID NativeDimCltError_errorHandler
int dic_get_dns_node(char *node)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2II_3S(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jshortArray dataArray)
JNIEXPORT void JNICALL Java_dim_ObjectDescriptor_copyFromObject(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jobject theObject, jlong desc)
JNIEXPORT jbyte JNICALL Java_dim_Memory_getByte(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress)
int dtq_stop_timer(dim_long tag)
void server_getInfo_callback(jobject *_aDataEncoder, void **address, int *size)
#define dis_start_serving
JNIEXPORT jdouble JNICALL Java_dim_Memory_getDouble(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress)
void callClientErrorHandler(int severity, int code, char *msg)
void send_callback(jobject *_aCompletionHandler, int *_status)
JNIEXPORT void JNICALL Java_dim_DimServer_setDnsPort(JNIEnv *env, jclass This, jint port)
JNIEXPORT void JNICALL Java_dim_MutableMemory_copyFromBooleanArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jbooleanArray array, jint arrayOffset, jint length)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2IIB(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jbyte data)
JNIEXPORT void JNICALL Java_dim_Memory_dumpInternalData(JNIEnv *env, jclass nativeClass, jlong internalDataAddress, jint internalDataSize, jint dumpOptions)
JNIEXPORT void JNICALL Java_dim_Server_stopServing(JNIEnv *env, jclass This)
JNIEXPORT void JNICALL Java_dim_Memory_copyIntoShortArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jshortArray array, jint arrayOffset, jint length)
JNIEXPORT jlong JNICALL Java_dim_MutableMemory_allocateNativeDataBlock(JNIEnv *env, jclass nativeClass, jint size)
jmethodID NativeDimExit_exitHandler
jmethodID NativeDataEncoder_encodeNativeData
JNIEXPORT void JNICALL Java_dim_MutableMemory_copyNativeDataBlock(JNIEnv *env, jclass nativeClass, jlong destinationDataAddress, jlong sourceDataAddress, jint length)
JNIEXPORT jstring JNICALL Java_dim_DimServer_getDnsNode(JNIEnv *env, jclass This)
jobject ourNativeMemoryObject
void callServerExitHandler(int code)
int dis_get_dns_node(char *node)
JNIEXPORT void JNICALL Java_dim_MutableMemory_setChar(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jchar data)
void info_service_callback(jobject *_aDataDecoder, void *data, int *_size)
void dic_disable_padding()
JNIEXPORT void JNICALL Java_dim_DimClient_setDnsPort(JNIEnv *env, jclass This, jint port)
JNIEXPORT void JNICALL Java_dim_ObjectDescriptor_copyIntoObject(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jobject theObject, jlong desc)
void callTimerHandler(jobject *_aDimTimer)
JNIEXPORT void JNICALL Java_dim_Client_noPadding(JNIEnv *env, jclass This)
JNIEXPORT void JNICALL Java_dim_DimClient_enableAST(JNIEnv *env, jclass This)
JNIEXPORT jint JNICALL Java_dim_Dbg_getMask(JNIEnv *env, jclass nativeClass)
JNIEXPORT void JNICALL Java_dim_Memory_copyIntoDoubleArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jdoubleArray array, jint arrayOffset, jint length)
void server_exit_callback(int *code)
int dis_set_dns_node(char *node)
JNIEXPORT jint JNICALL Java_dim_DimInfo_getTimestamp(JNIEnv *env, jclass This, jint sid)
JNIEXPORT jint JNICALL Java_dim_Client_infoService(JNIEnv *env, jclass This, jstring name, jobject theNativeDataDecoder, jint mode, jint timeout)
jmethodID NativeDimCltError_new
JNIEXPORT void JNICALL Java_dim_MutableMemory_setBoolean(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jboolean data)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2II_3C(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jcharArray dataArray)
JNIEXPORT jint JNICALL JNI_OnUnLoad(JNIEnv *env, void *reserved)
#define dim_Dbg_SEND_NATIVE
JNIEXPORT void JNICALL Java_dim_MutableMemory_setDouble(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jdouble data)
void decodeData(jobject *_theDataDecoder, void *dataAddress, int *_dataSize, int cleanup)
JNIEXPORT void JNICALL Java_dim_Memory_copyIntoIntArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jintArray array, jint arrayOffset, jint length)
jmethodID ReceiveSynchronizer_new
JNIEXPORT void JNICALL Java_dim_DimService_setTimestamp(JNIEnv *env, jclass This, jint sid, jint secs, jint millisecs)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2IID(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jdouble data)
#define dis_add_exit_handler
JNIEXPORT jstring JNICALL Java_dim_Client_getServices(JNIEnv *env, jclass This)
JNIEXPORT jint JNICALL Java_dim_DimClient_getDnsPort(JNIEnv *env, jclass This)
JNIEXPORT void JNICALL Java_dim_DimErrorHandler_addCltErrorHandler(JNIEnv *env, jclass This)
int dim_jni_attachThread(JNIEnv **env)
static void DBG_Trap(int code)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2III(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jint data)
jmethodID NativeDimSrvError_errorHandler
JNIEXPORT void JNICALL Java_dim_ObjectDescriptor_deleteObjectDescriptor(JNIEnv *env, jclass nativeClass, jlong desc)
int request_command(char *serv_name, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, int stamped)
JNIEXPORT void JNICALL Java_dim_MutableMemory_releaseNativeDataBlock(JNIEnv *env, jclass nativeClass, jlong desc)
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved)
JNIEXPORT void JNICALL Java_dim_MutableMemory_copyFromIntArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jintArray array, jint arrayOffset, jint length)
void dic_release_service(unsigned service_id)
objectDescriptorEntry_type * entry
#define dim_Dbg_RELEASE_SERVICE
jmethodID CompletionHandler_setCompletionCode
JNIEXPORT jstring JNICALL Java_dim_Server_getServices(JNIEnv *env, jclass This)
JNIEXPORT jint JNICALL Java_dim_DimInfo_getTimestampMillisecs(JNIEnv *env, jclass This, jint sid)
char * dic_get_format(unsigned serv_id)
JNIEXPORT void JNICALL Java_dim_DimExitHandler_addExitHandler(JNIEnv *env, jclass This)
#define dim_Native_ONCE_ONLY
jmethodID NativeDataMemory_decodeData
JNIEXPORT void JNICALL Java_dim_MutableMemory_copyFromLongArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jlongArray array, jint arrayOffset, jint length)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2IIJI(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jlong nativeDataBlock, jint nativeDataSize)
JNIEXPORT void JNICALL Java_dim_Dbg_setMask(JNIEnv *env, jclass nativeClass, jint dbg_mask)
#define dim_Native_F_WAIT
JNIEXPORT jint JNICALL Java_dim_Server_removeService(JNIEnv *env, jclass This, jint sid)
jfieldID NativeDataMemory_dataAddress
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2II_3D(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jdoubleArray dataArray)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2II_3J(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jlongArray dataArray)
JNIEXPORT void JNICALL Java_dim_Memory_copyIntoCharArray(JNIEnv *env, jclass nativeClass, jlong nativeDataAddress, jcharArray array, jint arrayOffset, jint length)
JNIEXPORT void JNICALL Java_dim_Server_noPadding(JNIEnv *env, jclass This)
JNIEXPORT jint JNICALL Java_dim_Client_send__Ljava_lang_String_2Ldim_CompletionHandler_2II_3Z(JNIEnv *env, jclass This, jstring name, jobject theCompletionHandler, jint mode, jint timeout, jbooleanArray dataArray)
jmethodID NativeDataMemory_new
int dic_get_timestamp(unsigned serv_id, int *secs, int *milisecs)