* under the terms of the license (GNU LGPL) which comes with this package. */
#include <msg/msg.h>
-#include <simix/context.h>
+#include <simgrid/simix.h>
#include <surf/surfxml_parse.h>
#include "smx_context_java.h"
XBT_DEBUG("Looking for host '%s'",name);
/* get the host by name (the hosts are created during the grid resolution) */
host = MSG_get_host_by_name(name);
- XBT_DEBUG("MSG gave %p as native host (simdata=%p)", host,host? host->simdata:NULL);
+ XBT_DEBUG("MSG gave %p as native host (smx_host=%p)", host,host? host->smx_host:NULL);
if (!host) { /* invalid name */
jxbt_throw_host_not_found(env, name);
/* Cleanup java hosts */
hosts = MSG_hosts_as_dynar();
for (index = 0; index < xbt_dynar_length(hosts) - 1; index++) {
- jhost = (jobject) xbt_dynar_get_as(hosts,index,m_host_t)->data;
+ jhost = (jobject) MSG_host_get_data(xbt_dynar_get_as(hosts,index,m_host_t));
if (jhost)
jhost_unref(env, jhost);
const char *jhost_get_name(jobject jhost, JNIEnv * env)
{
m_host_t host = jhost_get_native(env, jhost);
- return (const char *) host->name;
-}
-
-void jhost_set_name(jobject jhost, jstring jname, JNIEnv * env)
-{
- const char *name;
- m_host_t host = jhost_get_native(env, jhost);
-
- name = (*env)->GetStringUTFChars(env, jname, 0);
-
- if (host->name)
- free(host->name);
-
- host->name = xbt_strdup(name);
- (*env)->ReleaseStringUTFChars(env, jname, name);
+ return MSG_host_get_name(host);
}
jboolean jhost_is_valid(jobject jhost, JNIEnv * env)
*/
const char *jhost_get_name(jobject jhost, JNIEnv * env);
-
-/**
- * This function sets the name of a MSG host.
- *
- * @param host The host concerned by the operation.
- * @param jname The new name of the host.
- * @param env The environment of the current thread
- */
-void jhost_set_name(jobject jhost, jstring jname, JNIEnv * env);
-
/**
* This function tests if a java host instance is valid.
* A java host object is valid if it is bind to a native host.
#define MSG_JPROCESS_H
#include <jni.h>
-#include "msg/msg.h"
-#include "simix/simix.h"
+#include <msg/msg.h>
+#include <simgrid/simix.h>
/**
* This function returns a global reference to the java process instance
#include <xbt/function_types.h>
-#include <simix/simix.h>
+#include <simgrid/simix.h>
#include "smx_context_java.h"
#include "xbt/dynar.h"
#define _XBT_CONTEXT_JAVA_H
#include <xbt/misc.h>
-#include <simix/context.h>
+#include <simgrid/simix.h>
#include "jmsg.h"
#include "jmsg_process.h"