Hello All,
First off: Emscripten is wonderful product, i was able to compile without
too many problems my c-library to JavaScript. and have a demo app run with
it.
Next off I wanted to provide JavaScript bindings for my library.
I saw there were quite a few options for C++ bindings, but could not
directly find any C bindings.
I am hoping you could help me further when I explain the details of my API
typedef struct {
char *merchant_account;
char *user_id;
char *password;
char *app_id;
} register_app_request;
typedef struct {
int AppRegisteredForOfflineUsage; // offline storage was a success ,
will return 0 also if loaded offline
RESULT parsed_result;
} register_app_response;
// register the device
ADYLibraryResult register_app(register_app_request*
register_app_request_ptr, void (*callback_function)(register_app_response
*, void *), void * echo_struct);
register_app_request * register_app_allocate();
Basically the "register_app_allocate()" function returns a structure which
the user should fill
Then the user calls "register_app()" with the structure and a callback
function.
I am wondering how to expose the structure part to javascript and how I can
provide an javascript callback function to the "register_app" call itself.
Kind regards,
Sebastiaan Pierrot
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.