Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
4b3d34cbec1101c749cd4353b3a1696d0643b2e5
[simgrid.git] / src / java / jmsg_channel.c
1 /*
2  * $Id$
3  *
4  * Copyright 2006,2007 Martin Quinson, Malek Cherier All right reserved. 
5  *
6  * This program is free software; you can redistribute it and/or modify it 
7  * under the terms of the license (GNU LGPL) which comes with this package.
8  *
9  * This contains the implementation of the functions in relation with the java
10  * channel instance. 
11  */
12
13 #include "jmsg_channel.h"
14 #include "jmsg.h"
15 #include "jxbt_utilities.h"
16
17 jint jchannel_get_id(jobject jchannel, JNIEnv * env)
18 {
19   jmethodID id = jxbt_get_smethod(env, "simgrid/msg/Channel", "getId", "()I");
20
21   if (!id)
22     return -1;
23
24   return (*env)->CallIntMethod(env, jchannel, id);
25 }