Implement Long Write Operations for Tizen TV 42/252142/4
authorAyush Garg <ayush.garg@samsung.com>
Sat, 23 Jan 2021 09:20:06 +0000 (14:50 +0530)
committerAyush Garg <ayush.garg@samsung.com>
Wed, 27 Jan 2021 13:56:59 +0000 (19:26 +0530)
commit3432ebdccf1001aa2d1b07b91d7c6d29e241adb5
treea71c154997362004a2d4ab4d21d4733e55f8bf18
parenta97bce8622f95e66254b5927b6561185515519e1
Implement Long Write Operations for Tizen TV

In Tizen Platform, For long write operations, bluez handles
all the ATT_Prepare_Write_Req packets and sends the complete
data to the BT-Service when ATT_EXEC_WRITE_REQ is received.

Where as in Tizen TV, Bluedroid works in a different manner.
It sends every ATT_Prepare_Write_Req packet to bt-service using
OAL_EVENT_GATTS_REQUEST_WRITE event with flag is_prep=1 and thus,
allows upper layers to handle long write operation on its own.

This change will perform all the below operations(in case of bluedroid)
at bt-service level which bluez performs for GATT long write:
1. Appending all the Prepare_Write_Req data in a list and send
   prepare_write_resp.
2. Passing the complete data to the capi when
   OAL_EVENT_GATTS_EXEC_REQUEST_WRITE event comes.

Thus this change will help in maintaining uniformity at CAPI level
irrespective of Bluez or Bluedroid.

Change-Id: Iae005dc3643d54783dbd3ddd8c1dc70a1684be99
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
bt-oal/include/oal-event.h
bt-service/services/bt-service-event-receiver.c
bt-service/services/gatt/bt-service-gatt.c