Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename xbt/xbt_context.h to xbt/context.h, and add src/include/xbt/context.h to the...
[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   jmethodID id  = jxbt_get_smethod(env, "simgrid/msg/Channel", "getId", "()I");
19         
20   if(!id)
21     return -1;
22         
23   return (*env)->CallIntMethod(env,jchannel, id);               
24 }