aboutsummaryrefslogtreecommitdiffstats
path: root/include/afb/c++/binding-wrap.hpp
AgeCommit message (Collapse)AuthorFilesLines
2021-07-12gcc 11.x fixesneedlefish_13.93.0needlefish/13.93.0marlin_12.93.0marlin_12.92.0marlin_12.91.0marlin_12.90.1marlin/12.93.0marlin/12.92.0marlin/12.91.0marlin/12.90.113.93.012.93.012.92.012.91.012.90.1Scott Murray1-1/+2
Changes for compiling with gcc 11.x: - g++ now seems to instantiate duplicate entries for the set member function in the contextclass template class in binding-wrap.hpp. The use of a closure as a default argument value seems to be the culprit, as it seems there are longstanding issues with respect to using closures like that and resulting symbol names (i.e. the use of a closure isn't necessarily recognized as generating unique instantiations). In theory, C++17 should explicitly allow this when the closure has no captures, but bumping up to -std=gnu++17 did not fix the issue. To avoid it, replace the closure usage with a private static member function. - In afb-hook.c, tweaked the ignoring of the writev return code to make the stricter checking in gcc 11 happy. - In decode_base64 in wrap-json.c, initialize u16 as gcc now seems to miss that it will be initialized on the first loop iteration. Bug-AGL: SPEC-3819 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I8876db196b46cc35ecd2798e20d5ec3425df865e
2020-05-06Fix includes of C++ headerjellyfish_9.99.1jellyfish/9.99.19.99.1José Bollo1-0/+1
The include of <string> was missing in the C++ header. This produced errors on some builds. Bug-AGL: SPEC-3358 Signed-off-by: José Bollo <jose.bollo@iot.bzh> Change-Id: I928e8ab267d27710177a7a314ea8b8cdfa83e2f3
2020-03-03Fix bug in C++ wrapperJose Bollo1-1/+1
Address of the function is much better than adress of the pointer in the stack. BUG-AGL: SPEC-3220 Change-Id: I860b66ac7b8581af5229201556333edcde1f089f Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2020-01-08Update copyright datesJosé Bollo1-1/+1
Signed-off-by: José Bollo <jose.bollo@iot.bzh> Change-Id: I01a566a693b8ec6239209c9323ae4ff15a07f737
2019-07-09Fix syntax error in a constexpr functionLoïc Collignon1-25/+7
The function declaration contains a syntax error that was somehow ignored but raise an error about an illegal cast in a constexpr function. Fixed this error and clean up a bit surrounding code to be more concise. Bug-AGL: SPEC-2615 Change-Id: I931b086c96b093b3de4465c51dfc3e865f7ece3b Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-04-23binding-wrap: Rework of context handlingJose Bollo1-12/+48
The C++ wrapper for handling contexts has to be improved. This is a proposition of improvement. Change-Id: I7df36383f427d109356bdf4df573cba4b6e6ec05 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-04-17change style initialization of struct afb_authPhong Tran1-9/+9
This is for fixing warning: suggest braces around initialization of subobject [-Wmissing-braces] Change-Id: Id24d9bb09e46d59df7d043ed931e00bb5ec9469a Signed-off-by: Phong Tran <tranmanphong@gmail.com>
2019-03-11c++: Add the wrapper class 'afb::api'Loïc Collignon1-1/+155
New 'api' wrapper for 'afb_api_t' related functions. Change-Id: I695b65ff3d27b0ecc0f95f660a13b7a98fd92223 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-03-11c++: Reworked the event classLoïc Collignon1-8/+11
Added move semantic and remove invalidation method as it's not used anymore since we drop the support of APIv2. Change-Id: If53840010d6f24d410712915051386190f55b504 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-03-11c++: Fix multiple definition and castLoïc Collignon1-6/+3
The function was defined as many time as the header was included. Making it a weak function fix the issue. Also, a plain old C cast is required to make this constexpr valid. Change-Id: I278f376e00ec6728272df4fde8ca8984195dd533 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-03-11c++: Add verb initialisation for C++Jose Bollo1-0/+34
This new constexpr initialisation method accepts a callback receiving a afb::req instead of a afb_req_t. Change-Id: I752e670b5545a9d7956987984e725b468196a6e9 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-03-11c++: Fix a wrong callback versionLoïc Collignon1-1/+1
It used the legacy callback definition of apiv2 instead of the apiv3 one. Change-Id: Iab281131a923ae59cfbbb50cf72fd4a5c3f11d65 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-03-11c++: Drop support of binding APIv2Loïc Collignon1-87/+3
The C++ interface is currently used only in APIv3. Change-Id: Id1a3bca5dc8e69c1af229871e7f33192395230e7 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-03-11c++: Avoid relative path when including headersLoïc Collignon1-1/+1
Prefer the system path to include headers. Change-Id: I08a64e8d27808084ea4592988f36b7e5099a7fc6 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2019-03-11c++: New C++ API for bindingsLoïc Collignon1-0/+692
You can implement a C++ binding API by inheriting the templated base class 'base_api_t' and overriding the methods you want. At the same time, the c++ files are now located in in their own subdirectory: afb/c++ Change-Id: Ie02535961ec6b4b5ae21390cb520acb1fdc44c9e Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>