I have C code where is method defines like this:
//! Definition of the verify appliance notification function.
typedef void (STDCALL *pfNotifyVerifyAppliance)(mdp_sdk_handle_t handle, const char* hostname, bool is_verified, const availableappliance_t* appliance, void* context);
//! Function to specify a function that should be called when an available appliance is verified. Appliance is only valid when is_verified is true.
EXTERN void STDCALL mdp_sdk_notify_verify_appliance(mdp_sdk_handle_t handle, pfNotifyVerifyAppliance NotifyVerifyAppliance);
The NotifyVerifyAppliance
is in C code sample a function callback like this:
static void STDCALL NotifyVerifyAppliance(mdp_sdk_handle_t handle, const char* hostname, bool is_verified, const availableappliance_t* appliance, void* context)
{
...
}
I have generated Java wrapper for the function and the generated callback class looks like this:
public class SWIGTYPE_p_f_p_struct_mdp_sdk_handle_dummystruct_p_q_const__char_bool_p_q_const__availableappliance_t_p_void__void {
private transient long swigCPtr;
protected SWIGTYPE_p_f_p_struct_mdp_sdk_handle_dummystruct_p_q_const__char_bool_p_q_const__availableappliance_t_p_void__void(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_f_p_struct_mdp_sdk_handle_dummystruct_p_q_const__char_bool_p_q_const__availableappliance_t_p_void__void() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_f_p_struct_mdp_sdk_handle_dummystruct_p_q_const__char_bool_p_q_const__availableappliance_t_p_void__void obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
My callback class is instantiated but I do not know to to access data. There are no arguments that original callback C method gets. How should I improve Swig generation to get this?