4 * Copyright 2006,2007 Martin Quinson, Malek Cherier All right reserved.
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.
9 * This contains the declarations of the functions in relation with the java
20 * This function returns a global reference to the java task instance
21 * specified by the parameter jtask.
23 * @param jtask The original java task instance.
24 * @param env The environment of the current thread.
26 * @return The global reference to the original java task
30 jtask_new_global_ref(jobject jtask,JNIEnv* env);
33 * This function delete a global reference to a java task instance.
35 * @param The global refernce to delete.
36 * @param env The environment of the current thread.
39 jtask_delete_global_ref(jobject jtask,JNIEnv* env);
42 * This function associated a native task to a java task instance.
44 * @param jtask The java task instance.
45 * @param task The native task to bind.
46 * @param env The environment of the current thread.
48 * @exception If the class Task is not found the function throws
49 * the ClassNotFoundException. If the field bind of
50 * this class is not found the function throws the exception
51 * NotSuchFieldException.
54 jtask_bind(jobject jtask,m_task_t task,JNIEnv* env);
57 * This function returns a native task from a java task instance.
59 * @param jtask The java task object from which get the native task.
60 * @param env The environment of the current thread.
62 * @return The function returns the native task associated to the
65 * @exception If the class Task is not found the function throws
66 * the ClassNotFoundException. If the field bind of
67 * this class is not found the function throws the exception
68 * NotSuchFieldException.
71 jtask_to_native_task(jobject jtask,JNIEnv* env);
74 * This function tests if a java task instance is valid.
75 * A java task object is valid if it is bind to a native
78 * @param jtask The java task to test the validity.
79 * @param env The environment of the current thread.
81 * @return If the java task is valid the function returns true.
82 * Otherwise the function returns false.
85 jtask_is_valid(jobject jtask,JNIEnv* env);
87 #endif /* !MSG_JTASK_H */