platform/core/api/webapi-plugins.git
4 years ago[Utils] Remove invalid line 40/245940/1
Rafal Walczyna [Tue, 20 Oct 2020 07:43:27 +0000 (09:43 +0200)]
[Utils] Remove invalid line

Line occurred due to merge issue. It caused LightWeightWeb engine to fail.

Change-Id: I78ed5b083cfa007c2e396464b9a50ad6398f3bcc
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years ago[Mediacontroller] Added refreshing the list of handles 23/243123/12 accepted/tizen/unified/20201007.090611 submit/tizen/20201006.121826
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 3 Sep 2020 08:35:44 +0000 (10:35 +0200)]
[Mediacontroller] Added refreshing the list of handles

[Bug] If native application (e.g. service) adds the playlist,
web api is able to gather it, but cannot perform any actions on it,
because web API stores only handles to playlists created by itself.

[Solution] Added functionality of refreshing handles always when gathering
a playlists handles using native API

[Verification] Code compiles without errors.

Change-Id: I9bb757f50c3bc4167b0a97c923d49a1ccbbe0195

4 years ago[Bluetooth][bugfix] Call success callbacks in registerService() 40/245140/1 submit/tizen/20201005.050422
Pawel Wasowski [Fri, 2 Oct 2020 16:28:27 +0000 (18:28 +0200)]
[Bluetooth][bugfix] Call success callbacks in registerService()

registerService() used to call successCallback only when registered
service had at least 1 component with read/write value request callback.
Now, the function will call successCallback even, if the service
has no components with such read/write value request calbacks.

[Verification] registerService() calls successCallback when no
read/write value request callbacks are registered

Change-Id: I4f4af260179fb21ac785dc1ccb0f5dab6d986496
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years agoMerge branch tizen_5.5 into tizen 35/245135/4
Piotr Kosko [Fri, 2 Oct 2020 15:36:00 +0000 (17:36 +0200)]
Merge branch tizen_5.5 into tizen

Change-Id: I24dccce98a2419a5e75f16b446f450820bb792a7
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years agoMerge branch 'tizen_5.0' into tizen_5.5 34/245134/3
Piotr Kosko [Fri, 2 Oct 2020 11:32:28 +0000 (13:32 +0200)]
Merge branch 'tizen_5.0' into tizen_5.5

Change-Id: I9a43855f32b1354ddbce403583d949e675c58073

4 years agoMerge branch 'tizen_4.0' into tizen_5.0 32/245132/1
Piotr Kosko [Fri, 2 Oct 2020 11:07:26 +0000 (13:07 +0200)]
Merge branch 'tizen_4.0' into tizen_5.0

Change-Id: Ic5b2736ab945e3c39cea6f32aae8d5532dd74558

4 years agoMerge branch 'tizen_3.0' into tizen_4.0 31/245131/1
Piotr Kosko [Fri, 2 Oct 2020 10:39:10 +0000 (12:39 +0200)]
Merge branch 'tizen_3.0' into tizen_4.0

Change-Id: I5424b41f13b345d9ff8b831f99b884f4a541b882

4 years ago[version] 2.45 27/245127/1
Piotr Kosko [Fri, 2 Oct 2020 10:20:21 +0000 (12:20 +0200)]
[version] 2.45

Change-Id: Ib116dd26b482abb5892e894f280141787f978435

4 years ago[Common] Fixed possible memory leak 26/245126/1
Piotr Kosko [Fri, 2 Oct 2020 10:19:32 +0000 (12:19 +0200)]
[Common] Fixed possible memory leak

[verification] Code compiles without errors

Change-Id: Ib8c7843461a575fd05d3b28e4db1fab35cc08ccb

4 years ago[version] 2.75 07/245107/1
Piotr Kosko [Fri, 2 Oct 2020 07:11:47 +0000 (09:11 +0200)]
[version] 2.75

Change-Id: Iadceec85547a133bfac39c77a6737714ea54a779

4 years ago[Bluetooth] Fixed code formatting 06/245106/1
Piotr Kosko [Fri, 2 Oct 2020 06:42:31 +0000 (08:42 +0200)]
[Bluetooth] Fixed code formatting

Change-Id: I2770d3735b9d606c5dd64fec877070b85942025c

4 years ago[Common] Applied some modifications from vd_fork 05/245105/1
Piotr Kosko [Fri, 2 Oct 2020 06:36:28 +0000 (08:36 +0200)]
[Common] Applied some modifications from vd_fork

* deprecation warninig mechanism
* systeminfo string keys

Change-Id: Iaaf87a0ab4e8a9b1d37628c21b5b6e339e81f982

4 years agoMerge "[Bluetooth] Add callbacks registering to GATTServer::registerService" into... accepted/tizen/unified/20200923.142546 submit/tizen/20200923.101308
Piotr Kosko [Wed, 23 Sep 2020 09:18:58 +0000 (09:18 +0000)]
Merge "[Bluetooth] Add callbacks registering to GATTServer::registerService" into tizen

4 years ago[Bluetooth] Add callbacks registering to GATTServer::registerService 48/244548/7
Rafal Walczyna [Mon, 21 Sep 2020 09:44:22 +0000 (11:44 +0200)]
[Bluetooth] Add callbacks registering to GATTServer::registerService

Register BluetoothGATT{Characteristic, Descriptor}::{read, write}ValueRequestCallbacks
in BluetoothGATTServer::registerService()

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-263
[TASK] https://code.sec.samsung.net/jira/browse/XWALK-2166

[Verification] Tested in Chrome developer console

Change-Id: Iee9a9b03627c5fb3d2b3c7941b128c4483953535
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years agoMerge branch 'tizen_5.5' into tizen 00/244700/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Sep 2020 08:37:15 +0000 (10:37 +0200)]
Merge branch 'tizen_5.5' into tizen

Change-Id: I8883a87450ef33eb55f363ce3841dc8a9861657e

4 years agoMerge branch 'tizen_5.0' into tizen_5.5 99/244699/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Sep 2020 08:27:57 +0000 (10:27 +0200)]
Merge branch 'tizen_5.0' into tizen_5.5

Change-Id: Ie3cfe5484b05a717edc31754efab8cf54faef126

4 years agoMerge branch 'tizen_4.0' into tizen_5.0 98/244698/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Sep 2020 08:26:55 +0000 (10:26 +0200)]
Merge branch 'tizen_4.0' into tizen_5.0

Change-Id: I2d5d3c4758a7181f8b66dce90a67485083866ed0

4 years ago[version] 2.44 95/244695/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Sep 2020 07:38:14 +0000 (09:38 +0200)]
[version] 2.44

Change-Id: I0caaa6af3791ad65fa165c45dfe37e5e01239b1b

4 years ago[Humanactivitymonitor] Fixed wrong behaviour of isGestureSupported() 96/244696/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Sep 2020 07:32:14 +0000 (09:32 +0200)]
[Humanactivitymonitor] Fixed wrong behaviour of  isGestureSupported()

https://code.sec.samsung.net/jira/browse/XWALK-2175

Implementation should not throw NotSupportedError, but return true/false

[Verification] Code compiles without errors.

Change-Id: Ia19893338f9b573a29639b667b3b0b52c6584554

4 years ago[Bluetooth] Prevent crash in BLE advertising 26/244626/1
Pawel Wasowski [Wed, 16 Sep 2020 18:02:29 +0000 (20:02 +0200)]
[Bluetooth] Prevent crash in BLE advertising

bt_advertiser_h pointer was freed twice in some cases, which lead to
crashes. Setting it to a nullptr after the first destruction fixes the
problem.

[Verification] Tested crashing scenario in Chrome DevTools Console and
no crashes occurred with the change.
tct-tizen-bluetooth-tests: 100 % pass rate (auto; manual were not run,
because they don't test BluetoothLEAdapter APIs)

Change-Id: Ie0d3de744075a4c08e5266fed274e98a0d9567b8
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Bluetooth] Stop server after unregistering last service 70/244470/3
Rafal Walczyna [Fri, 18 Sep 2020 13:10:28 +0000 (15:10 +0200)]
[Bluetooth] Stop server after unregistering last service

GATTServer has to be stopped in case of last service unregistration.

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-263
[TASK] https://code.sec.samsung.net/jira/browse/XWALK-2163

[Verification] Build successful. Tested in Chrome Console.
               Server stops when last service is unregistered.

Change-Id: I756bf9d944937e03f7e808c929e31140f4145add
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years agoImplement BluetoothGATTServer::unregisterAllServices() 74/244474/4
Dawid Juszczak [Fri, 18 Sep 2020 15:09:15 +0000 (17:09 +0200)]
Implement BluetoothGATTServer::unregisterAllServices()

[ACR]
https://code.sec.samsung.net/jira/browse/TWDAPI-263

[Verification]
Tested manually on chrome console

Change-Id: Ice5bfbd3fa4a8da75119db6b8e47849ca4259c26
Signed-off-by: Dawid Juszczak <d.juszczak@samsung.com>
4 years ago[Bluetooth] Reregister read/write value request callbacks on server start 81/244281/6
Pawel Wasowski [Wed, 16 Sep 2020 04:04:54 +0000 (06:04 +0200)]
[Bluetooth] Reregister read/write value request callbacks on server start

This commit implements reregistering read/write value callbacks,
that were once registered before a BluetoothGATTServer::stop() call.

[Verification] Tested in Chrome DevTools, callbacks are reregistered
after restarting the server

Change-Id: If67ee9ccf56b1aaac65a6c830b0b24ddf6e39b36
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years agoMerge "[Bluetooth] Clear all GATT data after unregistering all services" into tizen
Piotr Kosko [Mon, 21 Sep 2020 08:14:55 +0000 (08:14 +0000)]
Merge "[Bluetooth] Clear all GATT data after unregistering all services" into tizen

4 years ago[Bluetooth] Clear all GATT data after unregistering all services 73/244473/3
Pawel Wasowski [Wed, 16 Sep 2020 10:03:50 +0000 (12:03 +0200)]
[Bluetooth] Clear all GATT data after unregistering all services

This commit clears_id->gatt_h and _id->callback names mappings from
BluetoothGATTServerService when the server is stopped.

[Verification] This change is tested together with the commit
implementing reregistration of read/write callbacks and works fine.

Change-Id: I4c16674f4856bb1fa74f4db74b6bbe9119f3b29f
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years agoMerge "[Bluetooth] Bugfix: prevent memory leak" into tizen
Piotr Kosko [Mon, 21 Sep 2020 08:01:28 +0000 (08:01 +0000)]
Merge "[Bluetooth] Bugfix: prevent memory leak" into tizen

4 years agoMerge "[Bluetooth] Remove redundant Destroy* functions" into tizen
Piotr Kosko [Mon, 21 Sep 2020 08:01:22 +0000 (08:01 +0000)]
Merge "[Bluetooth] Remove redundant Destroy* functions" into tizen

4 years ago[Bluetooth] Bugfix: prevent memory leak 81/244481/2
Pawel Wasowski [Wed, 16 Sep 2020 14:11:26 +0000 (16:11 +0200)]
[Bluetooth] Bugfix: prevent memory leak

In the previous implementation if a service was successfully created,
but its registration failed, the resources associated with its handle
were not released.
Such a situation has occurred when Bluetooth was disabled and
BluetoothGATTServer::registerService() was called.
This commit adds the missing line that destroys the handle.

[Verification] The code compiles.
Tested in chrome console - server is successfully created and reports
errors in case of disabled bluetooth adapter. No crash or other issues observed.

Change-Id: I85741e51638abd6b5443d7f7ce5d84e9279fc498
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Bluetooth] Remove redundant Destroy* functions 80/244480/3
Pawel Wasowski [Wed, 16 Sep 2020 14:03:51 +0000 (16:03 +0200)]
[Bluetooth] Remove redundant Destroy* functions

Destroy* functions from BluetoothGATTServer class were removed, because
they internally destroyed nested GATT objects.
Such behavior is safe, but redundant, because the native methods already
destroy nested objects.
Their usages were replaced by their counterparts from
BluetoothGATTServerService class.

[Verification] The code compiles. Tested in chrome console together with
https://review.tizen.org/gerrit/#/c/platform/core/api/webapi-plugins/+/244481/
No issues observed.

Change-Id: Ied428687fd4467fe9418afa9f87446c3a9b5b147
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years agoMerge branch 'tizen_5.0' into tizen_5.5 69/244469/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 18 Sep 2020 12:55:00 +0000 (14:55 +0200)]
Merge branch 'tizen_5.0' into tizen_5.5

Change-Id: Id032af991b0670d09d5ff35aa4c142669cd26959

4 years agoMerge branch 'tizen_4.0' into tizen_5.0 64/244464/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 18 Sep 2020 12:51:12 +0000 (14:51 +0200)]
Merge branch 'tizen_4.0' into tizen_5.0

Change-Id: I5f25a22be8b2092b9f290b916bd3e47aa61828ab

4 years agoMerge "[Bluetooth] Add bluetooth power off listener for GATTServer" into tizen accepted/tizen/unified/20200921.042427 submit/tizen/20200918.124009
Piotr Kosko [Fri, 18 Sep 2020 12:32:29 +0000 (12:32 +0000)]
Merge "[Bluetooth] Add bluetooth power off listener for GATTServer" into tizen

4 years agoMerge branch 'tizen_3.0' into tizen_4.0 60/244460/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 18 Sep 2020 12:14:28 +0000 (14:14 +0200)]
Merge branch 'tizen_3.0' into tizen_4.0

Change-Id: I0abc0ed3a4c04aa1df20e4ef1b804cad4aed2088

4 years ago[version] 2.43 59/244459/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 18 Sep 2020 12:08:38 +0000 (14:08 +0200)]
[version] 2.43

Change-Id: I1f760b29b975107288cf2b5595f94db168148f4e

4 years ago[Bluetooth][Pre-6.0] Fix BluetoothLEDevice::getServiceAllUuids() 58/244458/1
Pawel Wasowski [Wed, 5 Feb 2020 13:00:47 +0000 (14:00 +0100)]
[Bluetooth][Pre-6.0] Fix BluetoothLEDevice::getServiceAllUuids()

[Bug] When some remote device advertises non-standard UUID, it was invalidly
translated to 16bit UUID. Which caused "NotFoundError: Service not found" error
in case of reading this service.

Inlcudes:
* fix for BluetoothLEDevice::getServiceAllUuids based on 6.0 implementation
* moving toLowerCase() from messaging to common module (needed for a fix)

[Verification]
Auto TCT 100% pass.

Tested in console:

Precondition:
Remote device need to have a GATT server advertising some non-standard UUID service, e.g.
"12341234-1234-1234-1234-123412341234". Below code should work if your remote device "MyDevice"
has proper service with a characteristic.

Last result will be something like "Value read from 1 characteristic -> 116,101,115,116"

var testDeviceName = "MyDevice";
var nonStandardUUID = "12341234-1234-1234-1234-123412341234";

var device;
function testBle(name) {
    var adapter = tizen.bluetooth.getLEAdapter();

    adapter.startScan(function (device_) {
        device = device_;
        //Item one occurs here:
        if (device.name)
            console.log("Found: " + JSON.stringify(device))
        if (device.name === name) {
            console.log("[Found device] address: " + JSON.stringify(device));
            adapter.stopScan();

            device.connect(function () {
                console.log("[Connected]");
                uuids = device.getServiceAllUuids();
                console.log("all UUIDS\n" + JSON.stringify(uuids))

                if (uuids.includes(nonStandardUUID)) {
                    console.log("Reading: " + nonStandardUUID);
                    var service = device.getService(nonStandardUUID);
                    if (service.characteristics.length > 0) {
                        for (j = 0; j < service.characteristics.length; ++j) {
                            var characteristic = service.characteristics[j];
                            characteristic.readValue(function (val) {
                                console.log("Value read from " + j + " characteristic -> " + val);
                            });
                        }
                    } else {
                        console.log("no characteristics found for service: " + uuid)
                    }
                } else {
                    console.error("UUID " + nonStandardUUID + " not found ");
                }
            }, (e) => console.log(e));
        }
    }, (e) => console.log(e))
}
testBle(testDeviceName)

Change-Id: I38494b6b5037cf06ee7c4bc32d2f8f5e8e6ce97e

4 years ago[Bluetooth] Add bluetooth power off listener for GATTServer 54/244454/2
Rafal Walczyna [Fri, 18 Sep 2020 11:25:33 +0000 (13:25 +0200)]
[Bluetooth] Add bluetooth power off listener for GATTServer

GATTServer has to be stopped in case of bluetooth power off.

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-263
[TASK] https://code.sec.samsung.net/jira/browse/XWALK-2161

[Verification] Tested in Chrome developer console

Change-Id: I92cca9dec5b7847b5073e88845846ce5e8446474
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years ago[Bluetooth] Implement BluetoothGATTServerCharacteristic::notifyAboutValueChange() 94/242894/12
Dawid Juszczak [Tue, 1 Sep 2020 18:43:19 +0000 (20:43 +0200)]
[Bluetooth] Implement BluetoothGATTServerCharacteristic::notifyAboutValueChange()
https://code.sec.samsung.net/jira/browse/TWDAPI-263

[Verification]
TODO

Change-Id: Id8e09ed2adee2c1e400c0979672569ae6f3f49c2
Signed-off-by: Dawid Juszczak <d.juszczak@samsung.com>
4 years ago[Spec] Fixing conditional statement while generate rpm 07/244407/1
Lukasz Bardeli [Fri, 4 Sep 2020 10:39:26 +0000 (12:39 +0200)]
[Spec] Fixing conditional statement while generate rpm

At begining of spec file emulator feature flags are defined.
If any profile parameter was passed to spec file from command line then if statement
with emultor feature flag were always true.

[Verification] Code compiles without error

Change-Id: I83a82334e9f4655590fd96c1fc558e1888cb928d
(cherry picked from commit 46ed227bbc81256cc3d88fed2995e70f2659131e)

4 years ago[Spec] Fixing conditional statement while generate rpm 03/244403/1
Lukasz Bardeli [Fri, 4 Sep 2020 10:39:26 +0000 (12:39 +0200)]
[Spec] Fixing conditional statement while generate rpm

At begining of spec file emulator feature flags are defined.
If any profile parameter was passed to spec file from command line then if statement
with emultor feature flag were always true.

[Verification] Code compiles without error

Change-Id: I83a82334e9f4655590fd96c1fc558e1888cb928d
(cherry picked from commit 46ed227bbc81256cc3d88fed2995e70f2659131e)

4 years ago[Bluetooth] Make error message more precise 79/244479/2
Pawel Wasowski [Wed, 16 Sep 2020 13:51:09 +0000 (15:51 +0200)]
[Bluetooth] Make error message more precise

[Verification] Code compiles

Change-Id: I252f82a0aede03297b852b9ad1e17bf5c71ec1b6
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Bluetooth] Change default error used by server's getConnectionMtu() 09/244409/2
Pawel Wasowski [Wed, 16 Sep 2020 05:26:14 +0000 (07:26 +0200)]
[Bluetooth] Change default error used by server's getConnectionMtu()

According to the API reference, the default error used by
BluetoothGATTServer::getConnectionMtu() should be AbortError and
not UnknownError.
This commit fixes that.

[Verification] Code compiles, getConnectionMtu() works fine in console.

Change-Id: Ice6c7ac1a75418069ede94c3d8203cbb781f3d57
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years agoMerge "[Bluetooth] Added servicesData to BluetoothLEAdvertiseData" into tizen
Lukasz Bardeli [Fri, 18 Sep 2020 07:45:41 +0000 (07:45 +0000)]
Merge "[Bluetooth] Added servicesData to BluetoothLEAdvertiseData" into tizen

4 years ago[Bluetooth] Added servicesData to BluetoothLEAdvertiseData 38/244338/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 17 Sep 2020 09:01:43 +0000 (11:01 +0200)]
[Bluetooth] Added servicesData to BluetoothLEAdvertiseData

servicesData has a higher priority of usage over serviceData.
To avoid problems with duplicated datas in both sets, deprecated member
serviceData is used only if servicesData is null or undefined.

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-267

[Verification] Auto Bluetooth TCTs pass.

Change-Id: I4bb9e9a5e953a660f60d8e2b863291f848eae38f

4 years agoAdd BluetoothGATTServer::isRunning implementation 17/244317/3
Rafal Walczyna [Thu, 17 Sep 2020 07:32:14 +0000 (09:32 +0200)]
Add BluetoothGATTServer::isRunning implementation

Property isRunning has been added to JS BluetoothGATTServer
Changes of property are handled by C++ function
BluetoothGATTServer::SetRunningState. It should be called instead
of changing BluetoothGATTServer::running_ value manually.

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-263

[Verification] Tested in Chrome developer console

Change-Id: I423dee736624df61d2cd98096407f33e6003e6ea
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years agoMerge "[Bluetooth] Fix writeValue method from BluetoothGATT" into tizen
Piotr Kosko [Wed, 16 Sep 2020 11:32:34 +0000 (11:32 +0000)]
Merge "[Bluetooth] Fix writeValue method from BluetoothGATT" into tizen

4 years ago[Bluetooth] Implement BluetoothGATTServer{Characteristic|Descriptor}::setWriteValueRe... 68/243868/6
Arkadiusz Pietraszek [Thu, 10 Sep 2020 16:59:10 +0000 (18:59 +0200)]
[Bluetooth] Implement BluetoothGATTServer{Characteristic|Descriptor}::setWriteValueRequestCallback

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-263

[Verification] Basic use cases were tested in Chrome Dev Tools and run
               properly. More thorough verification should yet be done.

Change-Id: I676dd8f06f8a9b19c2c98ffeaf21cfc9e3fd19d3
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Bluetooth] Implement BluetoothGATTServerDescriptor::setReadValueRequestCallback() 86/244186/3
Pawel Wasowski [Tue, 15 Sep 2020 14:37:55 +0000 (16:37 +0200)]
[Bluetooth] Implement BluetoothGATTServerDescriptor::setReadValueRequestCallback()

This commit isolates the implementation of setReadValueRequestCallback,
which is common for GATT characteristic and descriptor and adds it to
both these interfaces.

[Verification] Tested manually in Chrome DevTools. It works fine

Change-Id: I721db57deb597634dedad3b947590ad7a6e116b7
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Bluetooth][Bugfix] Copy value we don't own before passing to a worker 85/244185/1
Pawel Wasowski [Tue, 15 Sep 2020 15:24:04 +0000 (17:24 +0200)]
[Bluetooth][Bugfix] Copy value we don't own before passing to a worker

const char *remote_address is passed as an argument from
Native API to our callback, that adds a job to the Bluetooth's
worker.
Previously, the remote_address pointer was passed straight
to the worker. When referenced, it was already garbage.
This commit adds a copy of this value, so that the worker gets
proper data.

[Validation] Tested in Chrome DevTools. remoteAddress in JS is
a valid MAC address.

Change-Id: Id571296861775fee70d93ca94c4da0b496f9d3c8
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Bluetooth] Fix writeValue method from BluetoothGATT 84/244184/1
Rafal Walczyna [Tue, 15 Sep 2020 13:27:31 +0000 (15:27 +0200)]
[Bluetooth] Fix writeValue method from BluetoothGATT

There was an exception when user has not provided callbacks parameters.
successCallback and errorCallback was set to undefined, what caused
validator to fail.

Added array validate to toDOMString method of BluetoothManager

[Verification] tct-bluetooth auto: 100% pass
BluetoothGATTCombined: 100% pass

Change-Id: If0aa54fee7f19850d3bc94d8936476c0b322dc39
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years ago[Bluetooth] Implement BluetoothGATTServerCharacteristic::setReadValueRequestCallback 83/241383/16
Pawel Wasowski [Tue, 18 Aug 2020 15:17:01 +0000 (17:17 +0200)]
[Bluetooth] Implement BluetoothGATTServerCharacteristic::setReadValueRequestCallback

[Verification] Basic use cases were tested in Chrome Dev Tools and run
               properly. More thorough verification should yet be done.

Change-Id: I4d59ac356889c132fc0901435a2fd0d7e7c5c9df
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
4 years ago[Bluetooth] BLEAdapter isScanning and BLEDevice new functions. 35/235535/19
Arkadiusz Pietraszek [Mon, 13 Jul 2020 12:20:35 +0000 (14:20 +0200)]
[Bluetooth] BLEAdapter isScanning and BLEDevice new functions.

[ACR] TWDAPI-264

Bluetooth module can be upgraded with these functions provided by native layer:
BluetoothLEAdapter
bool isScanning ()

BluetoothLEDevice
bool isConnected ()
unsigned long getAttMtu ()
void requestAttMtuChange (unsigned long newAttMtu)
long addAttMtuChangeListener (ConnectionMTUCallback callback)
void removeAttMtuChangeListener (long watchId)

[Verification] New functionality has been tested on TW2 device in
developer console.

Change-Id: Id5f56ee4d67591b6d917552c6b7a09d2a5a06386
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
4 years ago[Bluetooth] Implement BluetoothGATTServerService::unregister() 09/241209/10
Pawel Wasowski [Tue, 18 Aug 2020 03:08:55 +0000 (05:08 +0200)]
[Bluetooth] Implement BluetoothGATTServerService::unregister()

This commit implements Implement BluetoothGATTServerService::unregister()
in JS and native layers.

[Verification] Basic tests in Chrome Dev Tools have shown that it works.
               More thorough tests may be needed.

Change-Id: I0d0cd99ea2e11337ac19970d07ec92730c1cb2a0
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Bluetooth] Representation of binary data unification - exceptions fix 84/243984/1
Arkadiusz Pietraszek [Fri, 11 Sep 2020 17:18:59 +0000 (19:18 +0200)]
[Bluetooth] Representation of binary data unification - exceptions fix

Fixed misarg case. Before TypeError was thrown.
Corrected to TypeMismachError.

[Verification] Errors tested in developer console.

[ACR] TWDAPI-259

Change-Id: Ifdfc9682ed31f2cbb9f16d0d63cb2056412a9236
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
4 years ago[Bluetooth] Added checking for null data 26/243826/1 accepted/tizen/unified/20200911.143315 submit/tizen/20200911.055107
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 10 Sep 2020 09:10:18 +0000 (11:10 +0200)]
[Bluetooth] Added checking for null data

[Verification] BT auto 100%
Manual test BluetoothSocket - subtest BluetoothSocket_writeData_misarg fixed.

Change-Id: I44f27a5f5bee1dae73017ce736709b4c464471c2

4 years agoMerge "[Utils] Change Utils.prototype.assert method to more generic" into tizen
Piotr Kosko [Wed, 9 Sep 2020 10:07:18 +0000 (10:07 +0000)]
Merge "[Utils] Change Utils.prototype.assert method to more generic" into tizen

4 years ago[Utils] Change Utils.prototype.assert method to more generic 22/243722/1
Rafal Walczyna [Wed, 9 Sep 2020 09:44:46 +0000 (11:44 +0200)]
[Utils] Change Utils.prototype.assert method to more generic

Starfish engine, which is used in WebWidgets, does not support console.assert

[Verification] WebWidgetTCT runs succesfully

Change-Id: I6286537c6bc8995b5fd3c0a60f22b2d2595ed787
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years ago[version] 2.73 97/243697/1 accepted/tizen/unified/20200910.123927 submit/tizen/20200909.074050
Piotr Kosko [Wed, 9 Sep 2020 07:28:28 +0000 (09:28 +0200)]
[version] 2.73

Change-Id: I18dd6d47c83cafcfad79fd56688e263457a65bd7

4 years ago[Bluetooth] Implement re-registering GATT services on server start 87/240887/14
Pawel Wasowski [Wed, 12 Aug 2020 10:48:16 +0000 (12:48 +0200)]
[Bluetooth] Implement re-registering GATT services on server start

The services, that are once successfully registered on the local GATT
server will be present on it and re-registered on each start() call.
This commit implements re-registering services on start.

[Verification] Reregistering works - services that were present before
stop() are reregistered in the server after start().

Change-Id: I973ab73f652a8faa72fa2c933ae27666e1fe611a
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[HAM] Remove WRIST_UP gesture 83/243583/2
Rafal Walczyna [Tue, 8 Sep 2020 08:37:44 +0000 (10:37 +0200)]
[HAM] Remove WRIST_UP gesture

WRIST_UP is not supported natively since Tizen 6.0.

TWDAPI-269

[Verification] Build successful
Two tests fails - start and stop WRIST_UP (TypeMismatchError)

Change-Id: If09be9c1ce578adab1ec518b03be2884ea07ed51
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years agoMerge "[HAM] Deprecate gesture and activity methods" into tizen
Piotr Kosko [Tue, 8 Sep 2020 07:21:54 +0000 (07:21 +0000)]
Merge "[HAM] Deprecate gesture and activity methods" into tizen

4 years ago[Spec] Fixing conditional statement while generate rpm 95/243295/2
Lukasz Bardeli [Fri, 4 Sep 2020 10:39:26 +0000 (12:39 +0200)]
[Spec] Fixing conditional statement while generate rpm

At begining of spec file emulator feature flags are defined.
If any profile parameter was passed to spec file from command line then if statement
with emultor feature flag were always true.

[Verification] Code compiles without error

Change-Id: I83a82334e9f4655590fd96c1fc558e1888cb928d

4 years ago[HAM] Deprecate gesture and activity methods 15/243015/2
Rafal Walczyna [Wed, 2 Sep 2020 11:36:33 +0000 (13:36 +0200)]
[HAM] Deprecate gesture and activity methods

Native function are deprecated.

[ACR] TWDAPI-268

Change-Id: I4146362481542c47879413abc59aa2850eb17095
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years ago[MediaController] Add locks for variable used in different threads 43/242843/1
Rafal Walczyna [Tue, 25 Aug 2020 07:29:53 +0000 (09:29 +0200)]
[MediaController] Add locks for variable used in different threads

Handles for client and server can be used in different threads.
It may cause segmentation fault when already freed handle will be used.

Verification: Build successful

Change-Id: Iba90d1a85be51710ccda169389ce393f5ce1d1a3
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years ago[MediaController] Add locks for variable used in different threads 42/242842/1
Rafal Walczyna [Tue, 25 Aug 2020 07:29:53 +0000 (09:29 +0200)]
[MediaController] Add locks for variable used in different threads

Handles for client and server can be used in different threads.
It may cause segmentation fault when already freed handle will be used.

Verification: Build successful

Change-Id: Iba90d1a85be51710ccda169389ce393f5ce1d1a3
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years ago[MediaController] Add locks for variable used in different threads 37/242837/1
Rafal Walczyna [Tue, 25 Aug 2020 07:29:53 +0000 (09:29 +0200)]
[MediaController] Add locks for variable used in different threads

Handles for client and server can be used in different threads.
It may cause segmentation fault when already freed handle will be used.

Verification: Build successful

Change-Id: Iba90d1a85be51710ccda169389ce393f5ce1d1a3
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years ago[MediaController] Add locks for variable used in different threads 33/242833/2
Rafal Walczyna [Tue, 25 Aug 2020 07:29:53 +0000 (09:29 +0200)]
[MediaController] Add locks for variable used in different threads

Handles for client and server can be used in different threads.
It may cause segmentation fault when already freed handle will be used.

Verification: Build successful

Change-Id: Iba90d1a85be51710ccda169389ce393f5ce1d1a3
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years agoMerge "[MediaController] Add locks for variable used in different threads" into tizen accepted/tizen/unified/20200901.160650 submit/tizen/20200831.125703
Piotr Kosko [Thu, 27 Aug 2020 10:07:17 +0000 (10:07 +0000)]
Merge "[MediaController] Add locks for variable used in different threads" into tizen

4 years ago[MediaController] Add locks for variable used in different threads 49/242249/4
Rafal Walczyna [Tue, 25 Aug 2020 07:29:53 +0000 (09:29 +0200)]
[MediaController] Add locks for variable used in different threads

Handles for client and server can be used in different threads.
It may cause segmentation fault when already freed handle will be used.

Verification: tct-mediacontroller 100% pass

Change-Id: Iba90d1a85be51710ccda169389ce393f5ce1d1a3
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
4 years ago[Bluetooth][gatt] Add registerService method 82/239782/27
Pawel Wasowski [Wed, 12 Aug 2020 11:25:10 +0000 (13:25 +0200)]
[Bluetooth][gatt] Add registerService method

https://code.sec.samsung.net/jira/browse/TWDAPI-263

[Description]
Added:
+ BluetoothGATTServer::RegisterService()
+ BluetoothGATTServer::services getter

[Verification]
tested on chrome console

Change-Id: I9588d6c613293d3c5f139263c0e8703de8ab02c3
Signed-off-by: Dawid Juszczak <d.juszczak@samsung.com>
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years agoMerge "[Bluetooth] Add validators for BluetoothGATTServer*InitData objects" into...
Piotr Kosko [Wed, 26 Aug 2020 09:31:33 +0000 (09:31 +0000)]
Merge "[Bluetooth] Add validators for BluetoothGATTServer*InitData objects" into tizen

4 years agoMerge "[Bluetooth] Add BluetoothGATTServer{Service, Characteristic, Descriptor}"...
Piotr Kosko [Wed, 26 Aug 2020 09:31:24 +0000 (09:31 +0000)]
Merge "[Bluetooth] Add BluetoothGATTServer{Service, Characteristic, Descriptor}" into tizen

4 years agoMerge "[Bluetooth] Rename BluetoothGATTService to BluetoothGATTClientService" into...
Piotr Kosko [Wed, 26 Aug 2020 09:31:15 +0000 (09:31 +0000)]
Merge "[Bluetooth] Rename BluetoothGATTService to BluetoothGATTClientService" into tizen

4 years ago[Bluetooth] Implement BluetoothGATTServer::getConnectionMtu() 31/237931/6
Pawel Wasowski [Mon, 6 Jul 2020 14:24:35 +0000 (16:24 +0200)]
[Bluetooth] Implement BluetoothGATTServer::getConnectionMtu()

Related ACR: TWDAPI-263

[Verification] The function was tested in Chrome Dev Tool and worked
               fine.

Change-Id: I2fd9c719e8871cb5db86e2bc65f8fbbc853fa47d
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Bluetooth] Add BLEAdapter::{add,remove}ConnectStateChangeListener 93/237793/6
Pawel Wasowski [Thu, 2 Jul 2020 13:55:00 +0000 (15:55 +0200)]
[Bluetooth] Add BLEAdapter::{add,remove}ConnectStateChangeListener

Related ACR: TWDAPI-263

This commit adds methods for registering listeners called when the
device running the web app connects to a remote GATT server or a remote
GATT client connects to the local GATT server hosted on the device.

[Verification] I have tested methods in Chrome Dev Tools console and
               they work fine

Change-Id: I5a65c7e4b14654b2a0754a6d1440eb7be67dec5b
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years agoMerge "[Bluetooth][fix] Small fix of crash in ParseServiceData" into tizen
Piotr Kosko [Wed, 26 Aug 2020 06:04:58 +0000 (06:04 +0000)]
Merge "[Bluetooth][fix] Small fix of crash in ParseServiceData" into tizen

4 years ago[Bluetooth] Add validators for BluetoothGATTServer*InitData objects 08/240708/15
Pawel Wasowski [Wed, 12 Aug 2020 10:47:26 +0000 (12:47 +0200)]
[Bluetooth] Add validators for BluetoothGATTServer*InitData objects

This commit adds ValidateBluetoothGATT*Init() functions, that validate
BluetoothGATT{Service, Characteristic, Descriptor}Init objects and fill
optional fields with default values.

Verification: webapi-plugins build succeeds. Instantiating
tizen.bluetooth in Chrome Dev Tools succeeds.
The code will be further verified together with the code that relies on
it. Verification results will be reported in the next commits.

Change-Id: I1fc2017a8c970bd24a3cc3ef0a0c85ca7faf7569
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Bluetooth] Add BluetoothGATTServer{Service, Characteristic, Descriptor} 93/240893/9
Pawel Wasowski [Wed, 12 Aug 2020 11:19:08 +0000 (13:19 +0200)]
[Bluetooth] Add BluetoothGATTServer{Service, Characteristic, Descriptor}

This commit adds 3 interfaces, used to represent GATT objects exposed by
the local server.

[Verification] webapi-plugins build succeeds. Instantiating
tizen.bluetooth in Chrome Dev Tools succeeds.
The code will be further verified together with the code that
relies on it. Verification results will be reported in the next commits.

Change-Id: I8c5dd6a6da6d213518d0eb46d3bb0ca3e37b4629
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Bluetooth] Rename BluetoothGATTService to BluetoothGATTClientService 42/236842/13
Dawid Juszczak [Wed, 22 Jul 2020 16:11:06 +0000 (18:11 +0200)]
[Bluetooth] Rename BluetoothGATTService to BluetoothGATTClientService

[Verification] Each method implemented by BluetoothGATTClientService was
called in Chrome Dev Tools.
All auto Bluetooth and manual BLE tests pass.

Change-Id: I530e94aa40b294d43525aed50c9a19dde3c2a1c4
Signed-off-by: Dawid Juszczak <d.juszczak@samsung.com>
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years agoMerge "[Bluetooth] Add BluetoothGATTServer. Implement start, stop and getServer"...
Piotr Kosko [Tue, 25 Aug 2020 10:23:48 +0000 (10:23 +0000)]
Merge "[Bluetooth] Add BluetoothGATTServer. Implement start, stop and getServer" into tizen

4 years ago[Common] Fixed initialization of non-static members 21/242121/1 accepted/tizen/unified/20200826.133110 submit/tizen/20200825.050155
Piotr Kosko [Mon, 24 Aug 2020 08:23:29 +0000 (10:23 +0200)]
[Common] Fixed initialization of non-static members

Related Coverity issue: 1146371

[Verification] Code compiles without errors.

Change-Id: I91da0bcdc083b83caa08ff69d9a9e31244aa1e0e

4 years ago[Bluetooth] Add BluetoothGATTServer. Implement start, stop and getServer 89/235889/13
Pawel Wasowski [Mon, 6 Jul 2020 18:36:21 +0000 (20:36 +0200)]
[Bluetooth] Add BluetoothGATTServer. Implement start, stop and getServer

ACR: TWDAPI-263

This commit adds BluetoothGATTServer class in C++ and implements JS
APIs:
- tizen.bluetooth.getGATTServer()
- BluetoothGATTServer.start()
- BluetoothGATTServer.stop()

Verification: The code tested in the Chrome DevTools console works fine

Change-Id: I688df55298be1b5ec997a5ae8ff42877f1bd6a24
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Bluetooth][fix] Small fix of crash in ParseServiceData 76/240876/1
Arkadiusz Pietraszek [Wed, 12 Aug 2020 09:13:42 +0000 (11:13 +0200)]
[Bluetooth][fix] Small fix of crash in ParseServiceData

There was a small mistake that caused crash when advertising with BLE
adapter and using service data.

[Verification] Code compiles and executes without crash or errors.

Change-Id: I4254e800ee7fda21e6eb71c7f7f03d6b4a399beb
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
4 years ago[version] 2.72 74/239774/1 accepted/tizen/unified/20200730.130821 submit/tizen/20200730.063627
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 29 Jul 2020 12:33:42 +0000 (14:33 +0200)]
[version] 2.72

Change-Id: I55fb5aba0b6d4f43eebe205b9f1d0605d10b075b

4 years agoMerge "[Common] Added cache for JS privilege checking" into tizen
Piotr Kosko [Wed, 29 Jul 2020 08:57:22 +0000 (08:57 +0000)]
Merge "[Common] Added cache for JS privilege checking" into tizen

4 years ago[Common] Added cache for JS privilege checking 48/239648/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Tue, 28 Jul 2020 10:38:04 +0000 (12:38 +0200)]
[Common] Added cache for JS privilege checking

Commit improves the performance of asking for application privileges.
Values are cached.

[Verification]
Code compiles without errors.
Privilege TCT passrate 100%

Change-Id: Id1772d9b14e4d4ff07e6a7ca0993027b98a4f2f4

4 years ago[Bookmark] Removed whole implementation of module. 58/238558/1
Piotr Kosko [Wed, 15 Jul 2020 05:10:46 +0000 (07:10 +0200)]
[Bookmark] Removed whole implementation of module.

By HQ decision whole module was removed.

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-266

[Verification] Code compiles without errors.

Change-Id: Icff7a08dfb7250c2029de677be0373236e98812f

4 years ago[version] 2.71 56/238556/1 accepted/tizen/unified/20200720.125625 submit/tizen/20200715.055037
Piotr Kosko [Wed, 15 Jul 2020 05:02:39 +0000 (07:02 +0200)]
[version] 2.71

Change-Id: I2fdcec5a0ca7e43cf24be3b8863f24b99b939dca

4 years agoMerge "[common][utils] Add new helper methods" into tizen
Piotr Kosko [Wed, 15 Jul 2020 04:50:06 +0000 (04:50 +0000)]
Merge "[common][utils] Add new helper methods" into tizen

4 years ago[utils] Remove of unused functions ValidateMethod and ValidateArguments 06/238506/1
Arkadiusz Pietraszek [Tue, 14 Jul 2020 15:25:28 +0000 (17:25 +0200)]
[utils] Remove of unused functions ValidateMethod and ValidateArguments

ValidateMethod and ValidateArguments functions located in utils_api.js are not used anywhere in Web API code.

[Verification] Grep search does not find any occurences of those
functions.

Change-Id: Ifad5f7005e82fb31e1c44c73dbed3a363d25d4ad
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
4 years agoMerge "[6.0][Bluetooth] Representation of binary data unification" into tizen
Piotr Kosko [Tue, 14 Jul 2020 10:13:25 +0000 (10:13 +0000)]
Merge "[6.0][Bluetooth] Representation of binary data unification" into tizen

4 years ago[6.0][Bluetooth] Representation of binary data unification 59/231859/10
Arkadiusz Pietraszek [Fri, 24 Apr 2020 13:38:11 +0000 (15:38 +0200)]
[6.0][Bluetooth] Representation of binary data unification

Currently binary data is passed to functions and received in return as different types.
This API change has been designed to unify binary data handling across Bluetooth module.

Adding type:
  typedef (byte[] or DOMString or Uint8Array) Bytes;

Adding functions:
  byte[] toByteArray(Bytes);
  DOMString toDOMString(Bytes);
  Uint8Array toUint8Array(Bytes);

Changing functions signatures:
  BluetoothLEServiceData(DOMString uuid, Bytes data);
  BluetoothLEManufacturerData(DOMString uuid, Bytes data);
  void BluetoothGATTCharacteristic::writeValue (Bytes value, optional SuccessCallback? successCallback, optional ErrorCallback? errorCallback);
  void BluetoothGATTDescriptor::writeValue (Bytes value, optional SuccessCallback? successCallback, optional ErrorCallback? errorCallback);
  unsigned long BluetoothSocket::writeData(Bytes);

[ACR]
https://code.sec.samsung.net/jira/browse/TWDAPI-259

[Verification]
Automatic bluetooth tct pass rate 100%
Unit tests for new functions added

Change-Id: I31e436149ecab6c4b7223ba493d13638cd707851
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
4 years ago[6.0] Replace deprecated validateMethod with validateArgs 17/233717/3
Arkadiusz Pietraszek [Mon, 4 May 2020 12:03:12 +0000 (14:03 +0200)]
[6.0] Replace deprecated validateMethod with validateArgs

https://code.sec.samsung.net/jira/browse/XWALK-2102

Changed modules:
alarm
application
humanactivitymonitor
inputdevice
iotcon
playerutil
power
time
tvinputdevice
widgetservice

[verification]
tct-pass rate did not change.
It is 100% for all changed modules, except playerutil, that crashes after argument validation.
Related task: https://code.sec.samsung.net/jira/browse/TSIX-3440

Change-Id: I805e92857cea9da7580c2bd3117227b1a5abb514
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
4 years ago[version] 2.70 92/238092/2 accepted/tizen/unified/20200709.164720 submit/tizen/20200708.105445
Piotr Kosko [Wed, 8 Jul 2020 09:23:30 +0000 (11:23 +0200)]
[version] 2.70

Change-Id: Ibdd3c4eef53bedffdb629532b162e9c987ae9630

4 years ago[Bluetooth] Fix build break for disabled APP_CONTROL_SETTINGS_SUPPORT 91/238091/2
Piotr Kosko [Wed, 8 Jul 2020 09:22:14 +0000 (11:22 +0200)]
[Bluetooth] Fix build break for disabled APP_CONTROL_SETTINGS_SUPPORT

[Verification] Plugins for TV platform build with the change and
               APP_CONTROL_SETTINGS_SUPPORT flag.

Change-Id: I23b87954b877ae278970446a03bc94ffe16c9aed

4 years ago[Metadata] Changed path property to uri 14/238014/4
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Tue, 7 Jul 2020 10:50:31 +0000 (12:50 +0200)]
[Metadata] Changed path property to uri

* removed not used variables in js file
* path renamed with uri
* some helper functions moved from instance.cc to metadata_file_handle.cc

[Verification] Checked in chrome console

Change-Id: I560cd2b4c2c176b5386c53dd94d50b20a274732b

4 years ago[Metadata] Implementation of get() and release() 46/237846/3
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 6 Jul 2020 05:16:50 +0000 (07:16 +0200)]
[Metadata] Implementation of get() and release()

Implementation supports release() which frees all resources allocated
for metadata extraction.
Implementation supports get() for gathering metadata values. If get is called
after release(), API automatically recreates all handles for file.

[ACR]  https://code.sec.samsung.net/jira/browse/TWDAPI-265

[Verification] Chcecked in chrome console:
> m = tizen.metadata.createFileHandle("file:///home/owner/media/Videos/mp4video_mp3audio.mp4")
> m.get("DURATION")
> m.release()
> m.get("DURATION")
> m.get("VIDEO_WIDTH")
> m.release()

Change-Id: I2ed27a7c8009325817c32c993f5f8d4f00cd063e

4 years ago[common][utils] Add new helper methods 59/236159/3
Pawel Wasowski [Mon, 15 Jun 2020 08:14:00 +0000 (10:14 +0200)]
[common][utils] Add new helper methods

This commit adds 2 helper methods, that may be used from all modules:
- (JS) NativeManager.getErrorObjectAndValidate(), that creates a
WebAPIException from the data sent from C++ layer. If the exception is
not among valid exceptions passed to this function, it is replaced with
a default value (e.g. UnknownError). A list of exceptions/errors,
defined for a function in the documentation can be passed as the list of
valid exceptions to ensure, that the function will only report errors
defined in the documentation.
- (C++) PlatformResult::SetMessage() method to set the error message.

This commit also allows to use JS console.assert() through
xwalk.utils.assert().

[Verification] The code compiles. I use it in the next commit and the
               code works fine.

Change-Id: If2291a4123b3235971ff1f1f1c69320bbb1ee167
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
4 years ago[Metadata] Implementation of handles management 74/237174/5
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 25 Jun 2020 12:36:21 +0000 (14:36 +0200)]
[Metadata] Implementation of handles management

Implementation supports creation a handle for a file, with returned
basic structure of MetadataFileHandle.

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-265

[Verifcation] Code compiles without errors.
Checked with Chrome console.

Change-Id: I421afbed3b618e7d376b9a93a8cf484d334a72b2

4 years ago[Metadata] Created template of module 22/237022/5
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 24 Jun 2020 05:58:41 +0000 (07:58 +0200)]
[Metadata] Created template of module

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-265

[verification] Code compiles and module is visible in Web application.

Change-Id: Ic4697a0e5af8dc6a4204a7fd5947f1cdadc8c477

4 years ago[Bluetooth] Add or modify uuid fields of BLE GATT objects 26/223426/19
Pawel Wasowski [Wed, 29 Jan 2020 14:38:38 +0000 (15:38 +0100)]
[Bluetooth] Add or modify uuid fields of BLE GATT objects

This commit adds uuid field to BluetoothGATTCharacteristic and
BluetoothGATTDescriptor objects and serviceUuid to BluetoothGATTService.
uuid values of BluetoothGATT{Characteristic, Descriptor} and
BluetoothGATTService::serviceUuid default to null,
if Web API implementation is unable to retrieve them from Native API.

There are more UUID fields in Bluetooth API objects, but have not been
made nullable. We expect values of BluetoothLEServiceData::uuid,
BluetoothSocket::uuid, BluetoothServiceHandler::uuid fields
to be valid, if the objects containing them are created successfully.

Related ACR: TWDAPI-255

[Verification] tct-bluetooth-tizen-tests auto: 100%;
               manual Bluetooth04_BLE_wearable: 100%

Change-Id: I4c7fe4e8b4507f07f58c0fb043081eb6d93c933c
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>