X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/83803fce1bb1e3657b8e5697df09d73b551bab05..0062810c4d947182d063333a1e949f89a3647dd8:/src/jmsg_host.h diff --git a/src/jmsg_host.h b/src/jmsg_host.h index d4ddd1d910..0dc01c25da 100644 --- a/src/jmsg_host.h +++ b/src/jmsg_host.h @@ -1,6 +1,6 @@ /* Functions related to the java host instances. */ -/* Copyright (c) 2007, 2009, 2010. The SimGrid Team. +/* Copyright (c) 2007-2012. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -57,7 +57,7 @@ void jhost_unref(JNIEnv * env, jobject jhost); * this class is not found the function throws the exception * NotSuchFieldException. */ -void jhost_bind(jobject jhost, m_host_t host, JNIEnv * env); +void jhost_bind(jobject jhost, msg_host_t host, JNIEnv * env); /** * This function returns a native host from a java host instance. @@ -73,7 +73,7 @@ void jhost_bind(jobject jhost, m_host_t host, JNIEnv * env); * this class is not found the function throws the exception * NotSuchFieldException. */ -m_host_t jhost_get_native(JNIEnv * env, jobject jhost); +msg_host_t jhost_get_native(JNIEnv * env, jobject jhost); /** * This function returns the name of a MSG host. @@ -96,9 +96,16 @@ const char *jhost_get_name(jobject jhost, JNIEnv * env); * Otherwise the function returns false. */ jboolean jhost_is_valid(jobject jhost, JNIEnv * env); +/* + * Class org_simgrid_msg_Host + * Method nativeInit + * Signature (); + */ +JNIEXPORT void JNICALL +Java_org_simgrid_msg_Host_nativeInit(JNIEnv *env, jclass cls); /* - * Class simgrid_msg_Host + * Class org_simgrid_msg_Host * Method getByName * Signature (Ljava/lang/String;)Lsimgrid/msg/Host; */ @@ -106,22 +113,14 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Host_getByName (JNIEnv *, jclass, jstring); /* - * Class simgrid_msg_Host + * Class org_simgrid_msg_Host * Method currentHost * Signature ()Lsimgrid/msg/Host; */ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Host_currentHost (JNIEnv *, jclass); - /* - * Class simgrid_msg_Host - * Method getName - * Signature ()Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_org_simgrid_msg_Host_getName - (JNIEnv *, jobject); -/* - * Class simgrid_msg_Host + * Class org_simgrid_msg_Host * Method getCount * Signature ()I */ @@ -129,27 +128,47 @@ JNIEXPORT jint JNICALL Java_org_simgrid_msg_Host_getCount (JNIEnv *, jclass); /* - * Class simgrid_msg_Host + * Class org_simgrid_msg_Host * Method getSpeed * Signature ()D */ JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Host_getSpeed (JNIEnv *, jobject); /* - * Class simgrid_msg_Host + * Class org_simgrid_msg_Host * Method getLoad * Signature ()I */ JNIEXPORT jint JNICALL Java_org_simgrid_msg_Host_getLoad(JNIEnv * env, jobject jhost); - /* - * Class simgrid_msg_Msg + * Class org_simgrid_msg_Host + * Method getProperty + * Signature (Ljava/lang/String;)Ljava/lang/String; + */ +JNIEXPORT jobject JNICALL +Java_org_simgrid_msg_Host_getProperty(JNIEnv *env, jobject jhost, jobject jname); +/* + * Class org_simgrid_msg_Host + * Method setProperty + * Signature (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + */ +JNIEXPORT void JNICALL +Java_org_simgrid_msg_Host_setProperty(JNIEnv *env, jobject jhost, jobject jname, jobject jvalue); +/* + * Class org_simgrid_msg_Host * Method isAvail * Signature ()Z */ JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Host_isAvail (JNIEnv *, jobject); +/** + * Class org_simgrid_msg_Host + * Method all + */ +JNIEXPORT jobjectArray JNICALL +Java_org_simgrid_msg_Host_all(JNIEnv *, jclass); + #endif /*!MSG_JHOST_H */