I have header (fingisdk.h) file like this:
#ifndef FINGISDK_H_
#define FINGISDK_H_
#include "fingienum.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*fingi_event)(FINGI_EVENT_ID eventId, char* msg);
FINGI_EVENT_ID start_fingi_sdk(char* ini_file_location);
FINGI_EVENT_ID download_room_info(char** roominfo);
void register_fingi_sdk_status_event_listener(fingi_event pointer_to_listener_fnc);
#ifdef __cplusplus
}
#endif
#endif
And then i have written a python Wrapper for this one:
#include <fingisdk.h>
#include <fingienum.h>
#include <boost/python.hpp>
BOOST_PYTHON_MODULE(libpythonWrapper)
{
using namespace boost::python;
def("start_fingi_sdk", start_fingi_sdk);
}
And python file for calling it is like this:
import libpythonWrapper
print libpythonWrapper.start_fingi_sdk('file_location.ini')
So far this works fine. However, i can not find out how to expose double the double pointer function :
FINGI_EVENT_ID download_room_info(char** roominfo);
And callback function :
void register_fingi_sdk_status_event_listener(fingi_event pointer_to_listener_fnc);
Can anyone point me to some documentation or help me solve it
Thankyou
EDIT 1:
After messing around a bit, i figured out how to do the pointer to pointer function . Python does not support pointer , so have to wrap the download_room_info(char** roominfo) to return simple string:
std::string download_room_info_python_wrapper() {
char * value;
FINGI_EVENT_ID result = download_room_info(&value);
return std::string(value);
}
And then:
def("download_room_info", download_room_info_python_wrapper);
Still looking for solution for callback function