upm/src/upm.i
sisinty sasmita patra b2aa2515b0 upm_version: Added get version functionality for UPM as provided by MRAA
* Renamed version.c to version.hpp
    * Updated CMakelist file
    * Updated upm.i file to support version
    * Updated/modified src Cmakelists to support base upm and wrapper dependency

Signed-off-by: sisinty sasmita patra <sisinty.s.patra@intel.com>
2017-04-20 13:49:13 -07:00

41 lines
952 B
OpenEdge ABL

%include "std_string.i"
%include "stdint.i"
%include "upm_exception.i"
%{
#include "version.hpp"
%}
%include "version.hpp"
%apply int { speed_t };
%apply int { mraa_result_t };
%apply int { mraa::Result };
%apply int { upm_result_t };
#if (SWIG_JAVASCRIPT_V8)
%{
// Because there's no guarantee that v8 will ever call garbage collection,
// we're adding a function that will allow a user to call it manually
void cleanUp()
{
// Call the v8 garbage collector as long as there is memory to clean up
// See https://codereview.chromium.org/412163003 for this API change
#if (SWIG_V8_VERSION < 0x032838)
while (!v8::V8::IdleNotification())
#else
while (!v8::Isolate::GetCurrent()->IdleNotification(1000))
#endif
{;}
}
%}
void cleanUp();
#endif
#if (SWIGJAVA)
%typemap(jtype) jobject runnable "java.lang.Runnable"
%typemap(jstype) jobject runnable "java.lang.Runnable"
#endif
// Disable nested struct warnings
#pragma SWIG nowarn=312,325