X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e55610dd2918408455219046143c795cf1a6de57..ce9cbf0e2aea0198cb08a735a3ad36c6471f5468:/src/bindings/java/jmsg_host.cpp diff --git a/src/bindings/java/jmsg_host.cpp b/src/bindings/java/jmsg_host.cpp index 8211551449..cecd8a2017 100644 --- a/src/bindings/java/jmsg_host.cpp +++ b/src/bindings/java/jmsg_host.cpp @@ -1,21 +1,13 @@ /* Functions related to the java host instances. */ -/* Copyright (c) 2007-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include -#include -#include -#include - -#include - -#include +#include "simgrid/plugins/energy.h" +#include "simgrid/s4u/host.hpp" -#include "simgrid/msg.h" #include "jmsg.h" #include "jmsg_host.h" #include "jxbt_utilities.h" @@ -50,19 +42,6 @@ msg_host_t jhost_get_native(JNIEnv * env, jobject jhost) { return (msg_host_t) (uintptr_t) env->GetLongField(jhost, jhost_field_Host_bind); } -const char *jhost_get_name(jobject jhost, JNIEnv * env) { - msg_host_t host = jhost_get_native(env, jhost); - return host->cname(); -} - -jboolean jhost_is_valid(jobject jhost, JNIEnv * env) { - if (env->GetLongField(jhost, jhost_field_Host_bind)) { - return JNI_TRUE; - } else { - return JNI_FALSE; - } -} - JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_nativeInit(JNIEnv *env, jclass cls) { jclass class_Host = env->FindClass("org/simgrid/msg/Host"); jhost_method_Host_constructor = env->GetMethodID(class_Host, "", "()V"); @@ -368,7 +347,6 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_setAsyncMailbox(JNIEnv * env, j env->ReleaseStringUTFChars((jstring) jname, name); } -#include "simgrid/plugins/energy.h" JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Host_getConsumedEnergy (JNIEnv *env, jobject jhost) { msg_host_t host = jhost_get_native(env, jhost);