I have a similar change that was for our objective-c/darwin/ios branch. I didn?t use a full structure thought(just a callbackParam), because the app is responsible for unregisterResource and know when to delete its context.
If it?s blocking you I can try pushing that change. On 5/6/15, 7:02 PM, "Schulhof, Gabriel" <gabriel.schulhof at intel.com> wrote: >Hi! > >Would it be possible to modify the signature for OCCreateResource and >OCEntityHandler such that it works the same way as OCDoResource - i.e. >OCCreateResource accepts a structure similar to OCCallbackData (maybe >OCResourceCallbackData or something) which contains a callback, a >context, and a deleter, and the entity handler has a third parameter >which is the context. > >This would greatly improve the ease of writing bindings. Currently, I >have to rely on libffi's implementation of C closures to pass an extra >parameter to the callback containing the javascript callback I wish to >execute. I'd very gladly avoid relying on such libraries if the >iotivity C API were to allow such a context parameter for the entity >handler. > >Cheers! > > > >Gabriel >_______________________________________________ >iotivity-dev mailing list >iotivity-dev at lists.iotivity.org >https://lists.iotivity.org/mailman/listinfo/iotivity-dev -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5859 bytes Desc: not available URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150506/82b9c204/attachment.p7s>
