add some reusable List functions
This commit is contained in:
1 parent
42459486f7
commit
3b5c3a85f0
2 files changed
+48
No files matched your search
@@ -16,6 +16,8 @@
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#define JENV (*env)
|
||||
|
||||
#define SIGAR_PACKAGE "org/hyperic/sigar/"
|
||||
@@ -30,3 +32,20 @@
|
||||
#define SIGAR_CLASS_SIG(name) \
|
||||
"L" SIGAR_PACKAGE name ";"
|
||||
|
||||
typedef struct {
|
||||
JNIEnv *env;
|
||||
jobject obj;
|
||||
jmethodID id;
|
||||
} jsigar_list_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int jsigar_init_list(JNIEnv *env, jsigar_list_t *obj);
|
||||
|
||||
int jsigar_list_add(void *data, char *value, int len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user