Sha256: 4443d5e9de1aaba8e45639cb465e8145dfc098293a9d5269d789e63f12284bcc

Contents?: true

Size: 1.8 KB

Versions: 12

Compression:

Stored size: 1.8 KB

Contents

#ifndef RHO_JNI_RHODES_57d3a700b706402190ead97fd1383bee
#define RHO_JNI_RHODES_57d3a700b706402190ead97fd1383bee

#include <assert.h>
#include <stdlib.h>

#include <rhodes.h>

#include <ruby.h>
#include <ruby/ext/rho/rhoruby.h>

#include <common/RhoDefs.h>
#include <logging/RhoLogConf.h>
#include <logging/RhoLog.h>

#include <genconfig.h>

static int const RHO_FD_BASE = 512;

JavaVM *jvm();
void store_thr_jnienv(JNIEnv *env);

enum rho_java_class_t {
#define RHODES_DEFINE_JAVA_CLASS(x, name) x,
#include <rhodes/details/rhojava.inc>
#undef RHODES_DEFINE_JAVA_CLASS
};

extern const char *rho_java_class[];

jclass getJNIClass(int n);
jclass getJNIObjectClass(JNIEnv *env, jobject obj);
jfieldID getJNIClassField(JNIEnv *env, jclass cls, const char *name, const char *signature);
jfieldID getJNIClassStaticField(JNIEnv *env, jclass cls, const char *name, const char *signature);
jmethodID getJNIClassMethod(JNIEnv *env, jclass cls, const char *name, const char *signature);
jmethodID getJNIClassStaticMethod(JNIEnv *env, jclass cls, const char *name, const char *signature);

VALUE convertJavaMapToRubyHash(jobject objMap);

#define RHO_NOT_IMPLEMENTED RAWLOG_ERROR3("WARNING: Call not implemented function: \"%s\" (defined here: %s:%d)", __PRETTY_FUNCTION__, __FILE__, __LINE__)

#define RHO_LOG_CALLBACK RAWLOG_INFO1("Callback \"%s\" called", __PRETTY_FUNCTION__)
#define RHO_LOG_JNI_CALL RAWLOG_INFO1("JNI method \"%s\" called", __PRETTY_FUNCTION__)

class RhoValueConverter
{
private:
    jclass clsHashMap;
    jclass clsVector;

    jmethodID midHashMapConstructor;
    jmethodID midVectorConstructor;
    jmethodID midPut;
    jmethodID midAddElement;

    JNIEnv *env;
    bool init;

public:
    RhoValueConverter(JNIEnv *e);

    jobject createObject(rho_param *p);
};

#endif // RHO_JNI_RHODES_57d3a700b706402190ead97fd1383bee

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rhodes-2.2.4.beta.1 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
rhodes-2.2.3 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
rhodes-2.2.3.beta.1 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
rhodes-2.2.2 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
rhodes-2.2.2.beta.1 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
rhodes-2.2.1 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
rhodes-2.2.1.beta.2 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
rhodes-2.2.1.beta.1 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
rhodes-2.2.0 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
rhodes-2.2.0.beta.3 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
rhodes-2.2.0.beta.2 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
rhodes-2.2.0.beta.1 platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h