Moved SWIG code from C++ files (hpp and cxx) to SWIG interface files (.i). Added getter/setter methods for classes with protected or private vars.

This commit is contained in:
Serban Waltter
2018-01-17 14:20:32 +02:00
committed by Noel Eck
parent 2551596309
commit 63b2b33df7
39 changed files with 351 additions and 367 deletions

View File

@ -8,3 +8,5 @@
%include "rpr220.hpp"
JAVA_JNI_LOADLIBRARY(javaupm_rpr220)
JAVA_ADD_INSTALLISR(upm::RPR220)

View File

@ -49,12 +49,7 @@ bool RPR220::blackDetected()
return rpr220_black_detected(m_rpr220);
}
#ifdef JAVACALLBACK
void RPR220::installISR(jobject runnable)
{
installISR(mraa_java_isr_callback, runnable);
}
#endif
void RPR220::installISR(void (*isr)(void *), void *arg)
{
@ -65,4 +60,3 @@ void RPR220::uninstallISR()
{
rpr220_uninstall_isr(m_rpr220);
}

View File

@ -83,9 +83,7 @@ namespace upm {
*/
bool blackDetected();
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
void installISR(jobject runnable);
#else
/**
* Installs an ISR to be called when
* black is detected
@ -95,7 +93,6 @@ namespace upm {
* argument to the ISR.
*/
void installISR(void (*isr)(void *), void *arg);
#endif
/**
* Uninstalls the previously installed ISR
@ -110,10 +107,5 @@ namespace upm {
rpr220_context m_rpr220;
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
void installISR(void (*isr)(void *), void *arg);
#endif
};
}