summaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-map-bmessage.c
AgeCommit message (Collapse)AuthorFilesLines
2019-09-09parsing: change AFB_INFO to AFB_DEBUG to reduce logsMatt Ranostay1-1/+1
Messaging length parsing reporting is only really useful in debugging, and shouldn't be logged AFB_INFO. Bug-AGL: SPEC-2422 Change-Id: Ifbfd55aee33de2d1e6a5834af570890c0fa9ed76 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2019-09-06fix: Remove -Wformat= & -Woverflow warningLi Xiaoming1-2/+2
/work/agl-service-bluetooth-map/binding/bluetooth-map-bmessage.c:206:11: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] AFB_INFO("Parsing incoming bMessage of length %lu", strlen(bmessage)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ /work/agl-service-bluetooth-map/binding/bluetooth-map-bmessage.c: In function ‘bmessage_encoder’: /work/agl-service-bluetooth-map/binding/bluetooth-map-bmessage.c:293:34: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] tmp = g_strdup_printf("LENGTH:%lu", ~~^ %u strlen(BEGINMSG) + msg->len + strlen(ENDMSG)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 33%] Building C object binding/CMakeFiles/bluetooth-map-binding.dir/ bluetooth-map-util.c.o /work/agl-service-bluetooth-map/binding/bluetooth-map-util.c: In function ‘simple_gvariant_to_json’: /work/agl-service-bluetooth-map/binding/bluetooth-map-util.c:170:14: warning: integer overflow in expression ‘-2147483648’ of type ‘long int’ results in ‘-2147483648’ [-Woverflow] if (i64 >= -(1L << 31) && i64 < (1L << 31)) ^ In file included from /xdt/sdk/sysroots/armv7vet2hf-neon-vfpv4-agl-linux -gnueabi/usr/include/afb/afb-binding.h:116, from /work/agl-service-bluetooth-map/binding/bluetooth -map-util.c:36: /work/agl-service-bluetooth-map/binding/bluetooth-map-util.c:291:16: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘gsize’ {aka ‘unsigned int’} [-Wformat=] AFB_WARNING("Can't handle variants with more than one children (%lu)" ,nitems); Bug-AGL: SPEC-2422 Change-Id: Icebf98f1857ee02abe80f3d2b42099dcd7c702cc Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
2019-06-11binding: bluetooth-map: add parsing functionality to sent messagesMatt Ranostay1-15/+38
Sent messages have a slightly different ordering of tags, and the parser needs to take that into account. Bug-AGL: SPEC-2512 Change-Id: I21e120ab7674831fbaca93bb6fe060ef6661fd26 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2019-05-13binding: bluetooth-map: change recipient entry to senderhalibut_7.99.1halibut/7.99.17.99.1Matt Ranostay1-3/+3
In notification event it is the sender's vCard that is displayed change the naming to reflect that. Bug-AGL: SPEC-2351 SPEC-2392 Change-Id: Id7c7addee7c72a0b6dcfe1a0f50a6b9843d5797a Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2019-05-13binding: bluetooth-map: add encoder for bMessage composingMatt Ranostay1-0/+89
Bug-AGL: SPEC-2351 SPEC-2392 Change-Id: I40425ed3dff4aabacfc520e5e3887e93f82a7b5e Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2019-05-12binding: bluetooth-map: remove training newline from message parsingMatt Ranostay1-0/+3
Bug-AGL: SPEC-2351 SPEC-2392 Change-Id: I17713334bfcf941a9d766acb34cdde7c26fcf701 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2019-05-12binding: bluetooth-map: add parser for bMessage outputMatt Ranostay1-0/+194
Parser to output more user-readable JSON of incoming messages Bug-AGL: SPEC-2351 SPEC-2392 Change-Id: Ib758f8901ff01579899112c75119596c4a0726be Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>