From: dubfa <du...@ho...> - 2012-07-18 05:18:28
|
Hello, I used swig to generate a wrapper for the spotify library (https://developer.spotify.com/technologies/libspotify/) in java. The header file contains typedef struct sp_session_config { ... const void *application_key; ///< Your application key ... that should allow me to set in java the application key: sp_session_config cfg = new sp_session_config(); cfg.setApplication_key(appkey); The key in c is declared like this const uint8_t g_appkey[] = {0x01, 0xB4, 0xF9, 0x33, .... } The problem is that I don't know how to create the key in java. The type of appkey must be swigtype_p_void. I tried to add in the .i file %include "carrays.i" %array_functions(uint8_t, uint8Array); to be able to create c arrays in java with these functions new_uint8Array uint8Array_setitem without success. Somebody could help me to resolve my problem? A small simple example is also welcome. Many thanks in advance Fazerty |