Changeset 8:8702f8de147f in rrlib_jni


Ignore:
Timestamp:
04.07.2011 17:46:36 (9 years ago)
Author:
Max Reichardt <reichardt@…>
Branch:
default
Phase:
public
Message:

Adapted to new Java directory structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tJNICalls_JNI.cpp

    r3 r8  
    3030extern "C" 
    3131{ 
    32   JNIEXPORT void JNICALL Java_org_finroc_jc_jni_JNICalls_deleteJNIWrappable(JNIEnv* env, jclass class_, jlong pointer) 
     32  JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_deleteJNIWrappable(JNIEnv* env, jclass class_, jlong pointer) 
    3333  { 
    3434    finroc::util::tJNIWrappable* obj = (finroc::util::tJNIWrappable*)pointer; 
     
    3636    delete obj; 
    3737  } 
    38   JNIEXPORT jlong JNICALL Java_org_finroc_jc_jni_JNICalls_getBufferPointer(JNIEnv* env, jclass class_, jobject buf) 
     38  JNIEXPORT jlong JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getBufferPointer(JNIEnv* env, jclass class_, jobject buf) 
    3939  { 
    4040    return (jlong)env->GetDirectBufferAddress(buf); 
    4141  } 
    42   JNIEXPORT jbyte JNICALL Java_org_finroc_jc_jni_JNICalls_getByte(JNIEnv* env, jclass class_, jlong ptr) 
     42  JNIEXPORT jbyte JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getByte(JNIEnv* env, jclass class_, jlong ptr) 
    4343  { 
    4444    return *((jbyte*)ptr); 
    4545  } 
    46   JNIEXPORT jobject JNICALL Java_org_finroc_jc_jni_JNICalls_getCByteBuffer(JNIEnv* env, jclass class_, jlong ptr, jint size) 
     46  JNIEXPORT jobject JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getCByteBuffer(JNIEnv* env, jclass class_, jlong ptr, jint size) 
    4747  { 
    4848    jobject result; 
     
    5050    return result; 
    5151  } 
    52   JNIEXPORT jdouble JNICALL Java_org_finroc_jc_jni_JNICalls_getDouble(JNIEnv* env, jclass class_, jlong ptr) 
     52  JNIEXPORT jdouble JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getDouble(JNIEnv* env, jclass class_, jlong ptr) 
    5353  { 
    5454    return *((jdouble*)ptr); 
    5555  } 
    56   JNIEXPORT jfloat JNICALL Java_org_finroc_jc_jni_JNICalls_getFloat(JNIEnv* env, jclass class_, jlong ptr) 
     56  JNIEXPORT jfloat JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getFloat(JNIEnv* env, jclass class_, jlong ptr) 
    5757  { 
    5858    return *((jfloat*)ptr); 
    5959  } 
    60   JNIEXPORT jint JNICALL Java_org_finroc_jc_jni_JNICalls_getInt(JNIEnv* env, jclass class_, jlong ptr) 
     60  JNIEXPORT jint JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getInt(JNIEnv* env, jclass class_, jlong ptr) 
    6161  { 
    6262    return *((jint*)ptr); 
    6363  } 
    64   JNIEXPORT jlong JNICALL Java_org_finroc_jc_jni_JNICalls_getJavaVM(JNIEnv* env, jclass class_) 
     64  JNIEXPORT jlong JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getJavaVM(JNIEnv* env, jclass class_) 
    6565  { 
    6666    JavaVM* jvm = finroc::util::tJNIHelper::GetJavaVM(); 
     
    7474    return (jlong)jvm; 
    7575  } 
    76   JNIEXPORT jlong JNICALL Java_org_finroc_jc_jni_JNICalls_getLong(JNIEnv* env, jclass class_, jlong ptr) 
     76  JNIEXPORT jlong JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getLong(JNIEnv* env, jclass class_, jlong ptr) 
    7777  { 
    7878    return *((jlong*)ptr); 
    7979  } 
    80   JNIEXPORT jlong JNICALL Java_org_finroc_jc_jni_JNICalls_getPointer(JNIEnv* env, jclass class_, jlong address, jint index) 
     80  JNIEXPORT jlong JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getPointer(JNIEnv* env, jclass class_, jlong address, jint index) 
    8181  { 
    8282    void** array = (void**)address; 
    8383    return (jlong)array[index]; 
    8484  } 
    85   JNIEXPORT jshort JNICALL Java_org_finroc_jc_jni_JNICalls_getShort(JNIEnv* env, jclass class_, jlong ptr) 
     85  JNIEXPORT jshort JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_getShort(JNIEnv* env, jclass class_, jlong ptr) 
    8686  { 
    8787    return *((jshort*)ptr); 
    8888  } 
    89   JNIEXPORT void JNICALL Java_org_finroc_jc_jni_JNICalls_memcpy(JNIEnv* env, jclass class_, jlong dest, jlong src, jint length) 
     89  JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_memcpy(JNIEnv* env, jclass class_, jlong dest, jlong src, jint length) 
    9090  { 
    9191    memcpy((void*)src, (void*)dest, (int)length); 
    9292  } 
    93   JNIEXPORT void JNICALL Java_org_finroc_jc_jni_JNICalls_setByte(JNIEnv* env, jclass class_, jlong ptr, jbyte val) 
     93  JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setByte(JNIEnv* env, jclass class_, jlong ptr, jbyte val) 
    9494  { 
    9595    *((jbyte*)ptr) = val; 
    9696  } 
    97   JNIEXPORT void JNICALL Java_org_finroc_jc_jni_JNICalls_setDouble(JNIEnv* env, jclass class_, jlong ptr, jdouble val) 
     97  JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setDouble(JNIEnv* env, jclass class_, jlong ptr, jdouble val) 
    9898  { 
    9999    *((jdouble*)ptr) = val; 
    100100  } 
    101   JNIEXPORT void JNICALL Java_org_finroc_jc_jni_JNICalls_setFloat(JNIEnv* env, jclass class_, jlong ptr, jfloat val) 
     101  JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setFloat(JNIEnv* env, jclass class_, jlong ptr, jfloat val) 
    102102  { 
    103103    *((jfloat*)ptr) = val; 
    104104  } 
    105   JNIEXPORT void JNICALL Java_org_finroc_jc_jni_JNICalls_setInt(JNIEnv* env, jclass class_, jlong ptr, jint val) 
     105  JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setInt(JNIEnv* env, jclass class_, jlong ptr, jint val) 
    106106  { 
    107107    *((jint*)ptr) = val; 
    108108  } 
    109   JNIEXPORT void JNICALL Java_org_finroc_jc_jni_JNICalls_setJavaObject(JNIEnv* env, jclass class_, jlong pointer, jobject object, jboolean java_responsible) 
     109  JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setJavaObject(JNIEnv* env, jclass class_, jlong pointer, jobject object, jboolean java_responsible) 
    110110  { 
    111111    finroc::util::tJNIWrappable* obj = (finroc::util::tJNIWrappable*)pointer; 
    112112    obj->SetJavaWrapper(object, !java_responsible); 
    113113  } 
    114   JNIEXPORT void JNICALL Java_org_finroc_jc_jni_JNICalls_setLong(JNIEnv* env, jclass class_, jlong ptr, jlong val) 
     114  JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setLong(JNIEnv* env, jclass class_, jlong ptr, jlong val) 
    115115  { 
    116116    *((jlong*)ptr) = val; 
    117117  } 
    118   JNIEXPORT void JNICALL Java_org_finroc_jc_jni_JNICalls_setPointer(JNIEnv* env, jclass class_, jlong arraypointer, jint index, jlong pointer) 
     118  JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setPointer(JNIEnv* env, jclass class_, jlong arraypointer, jint index, jlong pointer) 
    119119  { 
    120120    void** array = (void**)arraypointer; 
    121121    array[index] = (void*)pointer; 
    122122  } 
    123   JNIEXPORT void JNICALL Java_org_finroc_jc_jni_JNICalls_setShort(JNIEnv* env, jclass class_, jlong ptr, jshort val) 
     123  JNIEXPORT void JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_setShort(JNIEnv* env, jclass class_, jlong ptr, jshort val) 
    124124  { 
    125125    *((jshort*)ptr) = val; 
    126126  } 
    127   JNIEXPORT jint JNICALL Java_org_finroc_jc_jni_JNICalls_sizeOfPointer(JNIEnv* env, jclass class_) 
     127  JNIEXPORT jint JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_sizeOfPointer(JNIEnv* env, jclass class_) 
    128128  { 
    129129    return sizeof(void*); 
    130130  } 
    131   JNIEXPORT jint JNICALL Java_org_finroc_jc_jni_JNICalls_strlen(JNIEnv* env, jclass class_, jlong ptr) 
     131  JNIEXPORT jint JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_strlen(JNIEnv* env, jclass class_, jlong ptr) 
    132132  { 
    133133    return strlen((char*)ptr); 
    134134  } 
    135   JNIEXPORT jstring JNICALL Java_org_finroc_jc_jni_JNICalls_toString(JNIEnv* env, jclass class_, jlong pointer) 
     135  JNIEXPORT jstring JNICALL Java_org_rrlib_finroc_1core_1utils_jc_jni_JNICalls_toString(JNIEnv* env, jclass class_, jlong pointer) 
    136136  { 
    137137    jstring result; 
Note: See TracChangeset for help on using the changeset viewer.