platform/shared/ruby/ext/rho/rhoruby.h in rhodes-2.0.3 vs platform/shared/ruby/ext/rho/rhoruby.h in rhodes-2.1.0
- old
+ new
@@ -12,11 +12,10 @@
#if defined(__cplusplus)
extern "C" {
#endif
#include "common/RhoDefs.h"
-#include "common/rhoparams.h"
#ifdef __SYMBIAN32__
#include <sys/types.h>
#endif //__SYMBIAN32__
@@ -34,10 +33,11 @@
void RhoRubyStart();
void RhoRubyInitApp();
//void RhoRubyThreadStart();
//void RhoRubyThreadStop();
void rho_ruby_activateApp();
+void rho_ruby_deactivateApp();
void rho_ruby_loadserversources(const char* szData);
void rho_ruby_start_threadidle();
void rho_ruby_stop_threadidle();
VALUE rho_ruby_createHash();
@@ -45,18 +45,19 @@
VALUE addIntToHash(VALUE hash, const char* key, int val);
VALUE addStrToHash(VALUE hash, const char* key, const char* val);
VALUE addStrToHashLen(VALUE hash, const char* key, const char* val, int len);
VALUE addHashToHash(VALUE hash, const char* key, VALUE val);
-rho_param *valueToRhoParam(VALUE v);
-
char* getStringFromValue(VALUE val);
int getStringLenFromValue(VALUE val);
void rho_ruby_holdValue(VALUE val);
-void rho_ruby_releaseValue(VALUE val);
+void rho_ruby_releaseValue(VALUE val);
+VALUE rho_ruby_disable_gc();
+void rho_ruby_enable_gc(VALUE val);
+
VALUE callFramework(VALUE hashReq);
VALUE callServeIndex(char* index_name);
void RhoRubyStop();
@@ -67,20 +68,18 @@
VALUE rho_ruby_create_boolean(unsigned char b);
VALUE rho_ruby_create_integer(__int64 i);
VALUE rho_ruby_create_double(double d);
void rho_ruby_add_to_array(VALUE ar, VALUE val);
-char* RhoRuby_getRhoDBVersion();
+const char* rho_ruby_getRhoDBVersion();
typedef void rho_hash_eachstr_func(const char*, const char*, void*);
void rho_ruby_enum_strhash(VALUE hash, rho_hash_eachstr_func *, void* data);
typedef void rho_ary_eachstr_func(const char*, void*);
void rho_ruby_enum_strary(VALUE ary, rho_ary_eachstr_func *, void* data);
-void rho_ruby_set_const(const char* szName, const char* szVal);
-
struct CRhoRubyStringOrInt
{
const char* m_szStr;
uint64__ m_nInt;
};
@@ -95,9 +94,48 @@
void rho_ruby_destroy_mutex(VALUE val);
VALUE rho_ruby_main_thread();
VALUE rho_ruby_current_thread();
void rho_ruby_lock_mutex(VALUE val);
void rho_ruby_unlock_mutex(VALUE val);
+
+#define RHO_PARAM_UNKNWON 0
+#define RHO_PARAM_STRING 1
+#define RHO_PARAM_ARRAY 2
+#define RHO_PARAM_HASH 3
+
+struct rho_param_t;
+
+typedef struct rho_array_t
+{
+ int size;
+ struct rho_param_t **value;
+} rho_array;
+
+typedef struct rho_hash_t
+{
+ int size;
+ char **name;
+ struct rho_param_t **value;
+} rho_hash;
+
+typedef struct rho_param_t
+{
+ int type;
+ union {
+ char *string;
+ rho_array *array;
+ rho_hash *hash;
+ } v;
+} rho_param;
+
+rho_param *rho_param_str(char *s);
+rho_param *rho_param_array(int size);
+rho_param *rho_param_hash(int size);
+
+rho_param *rho_param_dup(rho_param *p);
+void rho_param_free(rho_param *p);
+
+rho_param *rho_param_fromvalue(VALUE v);
#if defined(__cplusplus)
}
struct CHoldRubyValue