platform/core/connectivity/ua-manager.git
19 months agoRemove code duplicacy in database operations 29/282029/1 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix accepted/tizen_8.0_unified tizen_7.0 tizen_7.0_hotfix tizen_8.0 accepted/tizen/7.0/unified/20221110.061845 accepted/tizen/7.0/unified/hotfix/20221116.105228 accepted/tizen/8.0/unified/20231005.093249 accepted/tizen/unified/20220927.132408 tizen_7.0_m2_release tizen_8.0_m2_release
Abhay Agarwal [Mon, 26 Sep 2022 08:40:57 +0000 (14:10 +0530)]
Remove code duplicacy in database operations

Change-Id: Ie2359dd70cb27288f2e48c810406e852d83c267a
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
19 months agoRemove code duplicacy in service add/remove user 28/282028/1
Abhay Agarwal [Mon, 26 Sep 2022 08:40:25 +0000 (14:10 +0530)]
Remove code duplicacy in service add/remove user

Change-Id: Id4440a883d83b76dbfb95f0491e1ae5e09df7ae9
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
19 months agoRemove code duplicacy in ua-api 27/282027/1
Abhay Agarwal [Mon, 26 Sep 2022 07:33:21 +0000 (13:03 +0530)]
Remove code duplicacy in ua-api

Change-Id: I491677f3a2fd73c61f369798570576b4512f1209
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
19 months agoRemove duplicacy in searching user device tech 26/282026/1
Abhay Agarwal [Mon, 26 Sep 2022 08:48:55 +0000 (14:18 +0530)]
Remove duplicacy in searching user device tech

Change-Id: Ibfcad179872f31565702ec91ffbe23a41bb93fb7
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
19 months agoRemove duplicay in validating plugin interface 25/282025/1
Abhay Agarwal [Mon, 19 Sep 2022 09:12:25 +0000 (14:42 +0530)]
Remove duplicay in validating plugin interface

Change-Id: I088a0c14152d92f4ea4133441c82d318d4505f50
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
19 months agoRemove code duplicacy in converting detection mode 24/282024/1
Abhay Agarwal [Fri, 16 Sep 2022 08:55:38 +0000 (14:25 +0530)]
Remove code duplicacy in converting detection mode

Change-Id: I05d5d3af3bf8b34c750267eb37b6ce4ec1a7c987
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
19 months agoFix user, device, tech search 23/282023/1
Abhay Agarwal [Mon, 26 Sep 2022 08:46:25 +0000 (14:16 +0530)]
Fix user, device, tech search

Change-Id: Ia7aa0f4ede46eba9c8dc662e518be652c173b520
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
19 months agoFix device addition 22/282022/1
Abhay Agarwal [Tue, 20 Sep 2022 09:17:47 +0000 (14:47 +0530)]
Fix device addition

Change-Id: I568933e3860c8b82c578c28fb183541b42834bf8
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
19 months agoRefactoring to improve SAM-DC score 97/281197/1
hyunuk.tak [Wed, 14 Sep 2022 05:21:38 +0000 (14:21 +0900)]
Refactoring to improve SAM-DC score

Change-Id: I9f3490dbb97d31a8f6f292152ec50b944014a322
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
22 months agoAdd debug logs in plugin manager 73/276773/2 accepted/tizen/unified/20220629.152547 submit/tizen/20220629.005451
Abhay Agarwal [Fri, 24 Jun 2022 08:49:21 +0000 (14:19 +0530)]
Add debug logs in plugin manager

Change-Id: I50448156fc18c0840e9a57d484115857a50dfa8e
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2 years agoMerge changes I3d885690,Id51a9bd6 into tizen accepted/tizen/unified/20220620.131739 submit/tizen/20220616.085110
Pyun DoHyun [Tue, 3 May 2022 02:38:44 +0000 (02:38 +0000)]
Merge changes I3d885690,Id51a9bd6 into tizen

* changes:
  Fix device search for multiple apps
  Fix device addition for multiple apps

2 years agoFix device search for multiple apps 19/274119/1
Abhay Agarwal [Thu, 21 Apr 2022 12:13:09 +0000 (17:43 +0530)]
Fix device search for multiple apps

Change-Id: I3d8856902dc87bf8d5b0d54a1980b414a859a3ce
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2 years agoFix device addition for multiple apps 01/274101/1
Abhay Agarwal [Thu, 21 Apr 2022 07:32:17 +0000 (13:02 +0530)]
Fix device addition for multiple apps

Change-Id: Id51a9bd6cadee423c3c58bd258d9feb1a753a5ca
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2 years agoFix to uniquely identify caller daemon 53/274053/1
Abhay Agarwal [Wed, 20 Apr 2022 10:57:11 +0000 (16:27 +0530)]
Fix to uniquely identify caller daemon

Change-Id: If1760a6f2bef5a8d1c1690d3569a4878c1091e5e
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2 years agoReplace g_memdup to g_memdup2 47/267947/1 accepted/tizen/unified/20211222.230529 submit/tizen/20211212.233427
hyunuk.tak [Tue, 14 Dec 2021 00:12:47 +0000 (09:12 +0900)]
Replace g_memdup to g_memdup2

Change-Id: I0b3fb7d8946b7eb97b16a98191c9875a615b5006

2 years agoFix a error for format overflow 38/262438/1 accepted/tizen_6.5_unified tizen_6.5 accepted/tizen/6.5/unified/20211028.101042 accepted/tizen/unified/20210812.131701 submit/tizen/20210811.082802 submit/tizen_6.5/20211028.162201 tizen_6.5.m2_release
hyunuk.tak [Wed, 11 Aug 2021 01:28:46 +0000 (10:28 +0900)]
Fix a error for format overflow

Change-Id: I0c37587028541f2d8656dd1505d12d8ace76f10c
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
2 years agoRemove unnecessary syntax 91/262391/1 submit/tizen/20210810.224132 submit/tizen/20210810.230218
hyunuk.tak [Mon, 9 Aug 2021 22:35:49 +0000 (07:35 +0900)]
Remove unnecessary syntax

Change-Id: I58e4e0cf5de0ccfca43d9a182109b40feb57976e
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
2 years agoUpdate wait time to terminate ua-manager 19/261219/2 accepted/tizen/unified/20210720.062507 submit/tizen/20210719.231231
Abhay Agarwal [Tue, 13 Jul 2021 09:43:49 +0000 (15:13 +0530)]
Update wait time to terminate ua-manager

This patch increases the wait time to terminate ua-manager
daemon from 5 seconds to 5 minutes to avoid frequent
termination of ua-manager.

Change-Id: I9c6c2f609d867078d287f9c40a6e1b757a915a31
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2 years agoHandle location detection event 88/260388/1 accepted/tizen/unified/20210630.144044 submit/tizen/20210629.001718
Abhay Agarwal [Mon, 17 May 2021 05:53:43 +0000 (11:23 +0530)]
Handle location detection event

Change-Id: Iabe4f904c98237948e83eac894893a04fea8f3c4
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2 years agoplugin manager: Add support for start/stop location detection 87/260387/1
Abhay Agarwal [Fri, 7 May 2021 10:14:38 +0000 (15:44 +0530)]
plugin manager: Add support for start/stop location detection

Change-Id: I82932df8e53fae4b06db1f4ad251bdb669b921c2
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2 years agoua-daemon: Add support for start/stop location detection 86/260386/1
Abhay Agarwal [Thu, 24 Jun 2021 04:14:13 +0000 (09:44 +0530)]
ua-daemon: Add support for start/stop location detection

Change-Id: Id9b51720b4918f32e5ed679940743c66844873f5
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2 years agoua-api: Add support for start/stop location detection 85/260385/1
Abhay Agarwal [Tue, 4 May 2021 05:29:48 +0000 (10:59 +0530)]
ua-api: Add support for start/stop location detection

Change-Id: I8d626d1d43c96da90385934759483ffd96071432
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2 years agoAdd UWB plugin support 84/260384/1
Abhay Agarwal [Tue, 9 Mar 2021 09:01:12 +0000 (14:31 +0530)]
Add UWB plugin support

This patch updates the enums and convert functions
to support UWB plugin.

Change-Id: I51db435f5bfe4413ddb9e9437dff73f46b1ea22f
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2 years agoAdd wifi location plugin support 83/260383/1
Abhay Agarwal [Wed, 6 Jan 2021 09:48:46 +0000 (15:18 +0530)]
Add wifi location plugin support

This patch updates the enums, convert functions to
support wifi-location plugin.

Change-Id: I7f8d398708d5d6c4559d7f4d4c0fedd7ca6af6ee
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2 years agoAdd multi-application support for service api's 96/259796/2
rohit singh [Mon, 14 Jun 2021 11:05:39 +0000 (16:35 +0530)]
Add multi-application support for service api's

This patch adds the multi-applcation support for service
based api's and methods.

Change-Id: I21f73c208825161d547f052eb2eebfd4c37c1c21
Signed-off-by: rohit.singh <rohit.singh@samsung.com>
2 years agoFix derefencing of null pointer issue 51/259551/1 accepted/tizen/unified/20210615.120246 submit/tizen/20210613.223512
rohit singh [Wed, 9 Jun 2021 10:38:47 +0000 (16:08 +0530)]
Fix derefencing of null pointer issue

Return value of a function '__search_device' is dereferenced
inside __init_svc_user_mapping() function.

Change-Id: Ibeb9cdc49dc5fdfa8c94f036dca5c6802c0929eb
Signed-off-by: rohit.singh <rohit.singh@samsung.com>
2 years agoModify ua_service_foreach_users 14/259414/2
rohit singh [Mon, 7 Jun 2021 12:00:57 +0000 (17:30 +0530)]
Modify ua_service_foreach_users

This patch modifies ua_service_foreach_users based on
service->user->device hierarchy.

Change-Id: I31ac658cc553ffa3e98ab26f57ab5c8b08ca2ed1
Signed-off-by: rohit.singh <rohit.singh@samsung.com>
2 years agoFix style issues 60/259060/2 submit/tizen/20210601.231319
rohit singh [Mon, 31 May 2021 10:32:41 +0000 (16:02 +0530)]
Fix style issues

This patches fixes the styles issues as shown
in the check-patch script.

Change-Id: Iccf3afcab19debd2850b5d8fd1a3250ee894a36d
Signed-off-by: rohit.singh <rohit.singh@samsung.com>
2 years agoModify service-user based API's 59/259059/3
rohit singh [Thu, 27 May 2021 05:16:12 +0000 (10:46 +0530)]
Modify service-user based API's

This patch modifies:
1) ua_service_remove_user
2) adds the app_num attribute support to the
service-user hierarchy based API's.

Change-Id: I6d080b0356b9fb8a3632c0c09e8f057698673faa
Signed-off-by: rohit.singh <rohit.singh@samsung.com>
2 years agoFix for ua_foreach_service 26/258426/3
rohit singh [Mon, 17 May 2021 12:03:19 +0000 (17:33 +0530)]
Fix for ua_foreach_service

Issue: In a scenario when a service is registered and when
ua_foreach_service() is called it failed to get the newly registered
services though the service got persisted to db.

Solution: Logical error fix w.r.t app_num attribute of struct
uam_service_info_s at the daemon side solved the issue.

Change-Id: I055779441191e9439e66ab715c173f91c16b2817

2 years agoMerge "Change implentation for ua_service_add_user" into tizen
Anupam Roy [Tue, 25 May 2021 11:51:13 +0000 (11:51 +0000)]
Merge "Change implentation for ua_service_add_user" into tizen

2 years agoChange implentation for ua_service_add_user 14/258414/10
rohit singh [Sun, 16 May 2021 13:21:34 +0000 (18:51 +0530)]
Change implentation for ua_service_add_user

Issue: Earlier ua_service_add_user is not having the support for Service -> User -> Device
hierarchy structure.

Solution: Added implementation to maintain service_user mapping at the daemon side so that
whenever a device gets added to user it automatically gets added to the respective
service with which the user is mapped to.

Change-Id: I4cfca7db3f6e8fa6616d68c0570f86f23838022c
Signed-off-by: rohit.singh <rohit.singh@samsung.com>
2 years agoDead default in switch 76/258676/2
rohit singh [Mon, 24 May 2021 05:53:55 +0000 (11:23 +0530)]
Dead default in switch

Issue: The statements in the default case are never executed.

Solution: Removal of the retv statement will solve the issue.

Change-Id: I74cc0d357acbb7bc5ce986ef532f5684b3ab74fa
Signed-off-by: rohit.singh <rohit.singh@samsung.com>
2 years agoFix for __uam_manager_get_device_type 33/258233/3
rohit singh [Wed, 12 May 2021 11:52:29 +0000 (17:22 +0530)]
Fix for __uam_manager_get_device_type

Issue: Return type mismatch issue. Inside function __uam_manager_get_device_type()
enum UAM_SENSOR_BITMASK_* is used instead of UAM_TECH_TYPE-*, which was inconsistent
to the function calling __uam_manager_get_device_type().

Solution: Changed UAM_SENSOR_BITMASK_* to UAM_TECH_TYPE-*.

Change-Id: I1df188dd713379e8c594de86707bf39e05a7fec9

3 years agoModify to check privilege 69/255969/2 accepted/tizen/unified/20210331.054046 submit/tizen/20210330.060456
hyunuk.tak [Thu, 25 Mar 2021 23:37:44 +0000 (08:37 +0900)]
Modify to check privilege

Change privilege as below
userawareness, userawareness.admin
=> bluetooth, network.get, location

Add request for adding/removing sensor

Change-Id: Iedd72ba46ac0a93b1ba320f637a9b0aa464686d1
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
3 years agoModify default policy for dbus 06/255706/7 submit/tizen/20210330.042707
hyunuk.tak [Mon, 22 Mar 2021 23:59:30 +0000 (08:59 +0900)]
Modify default policy for dbus

Change-Id: I3a02f401a9c7614d42bb7919e41a1b4c89fac522
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
3 years agoFix the security configuration issue (Shell Script) 93/254193/2 accepted/tizen/unified/20210226.131923 submit/tizen/20210225.094448
DoHyun Pyun [Wed, 24 Feb 2021 23:20:16 +0000 (08:20 +0900)]
Fix the security configuration issue (Shell Script)

All command line tools in any shell script should be executed
in designated location or executed as absolute path.

Change-Id: I8f9548f7fda0db656ede895be2fd7c92e2c9161f
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoua-daemon: Add support for product API's 92/253392/1 submit/tizen/20210210.041708
Abhay Agarwal [Tue, 9 Feb 2021 06:18:59 +0000 (11:48 +0530)]
ua-daemon: Add support for product API's

This patch adds support in ua-daemon to handle product API's.

Change-Id: Ic37f326f04bbcdd6c67734ae5ae7f48ab677afa7
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoua-api: Add support for product API's 91/253391/1
Abhay Agarwal [Fri, 5 Feb 2021 09:14:52 +0000 (14:44 +0530)]
ua-api: Add support for product API's

This patch adds support in ua-api to handle product API's.

Change-Id: Ied7769ad1f550a81e643a7ab894625860924c5ba
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoAdd some patches 07/250707/3 accepted/tizen/unified/20210201.055431 accepted/tizen/unified/20210203.145513 submit/tizen/20210112.005356 submit/tizen/20210131.225751 submit/tizen/20210203.045513
hyunuk.tak [Mon, 4 Jan 2021 04:19:31 +0000 (13:19 +0900)]
Add some patches

Fix circleCI script
Undefined OS type , OS updation for single device ID fix
OS_update in plugin bug fix
Fix to not to use docker image
Fix device detection failure due to payload
Change the plugin path to RO area
Fix stop detection event
Fix user absence event
Fix set service detection cycle functionality
Remove implicit call of stop_detection before start_detection
Send unique payloads to plugins in registered device list
Add scan mode functionality for start detection
Terminate ua-manager if no client is referencing it

Change-Id: I5bd6d8d421071d534991818d3e0128c5d68ce8d6
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
3 years agoAdd ifndef flag for sqlite 3.33.0 71/249071/1 accepted/tizen/unified/20201207.123247 submit/tizen/20201207.014950
Jihoon Jung [Mon, 7 Dec 2020 01:09:21 +0000 (10:09 +0900)]
Add ifndef flag for sqlite 3.33.0

Change-Id: Ib36af3e1001371d1440a1d842a6c9a0308085a40
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
3 years agoModify the package version 49/240049/3 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.120611 accepted/tizen/6.0/unified/hotfix/20201103.050049 accepted/tizen/unified/20200810.123044 submit/tizen/20200806.040127 submit/tizen/20200809.234730 submit/tizen_6.0/20201029.205103 submit/tizen_6.0_hotfix/20201102.192503 submit/tizen_6.0_hotfix/20201103.114803 tizen_6.0.m2_release
DoHyun Pyun [Mon, 3 Aug 2020 01:39:53 +0000 (10:39 +0900)]
Modify the package version

In order to distinguish the package history as tizen version,
we manage the package version from now.

Change-Id: I3d40228067053f313fa695e56c42453c0b1263d2
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoStop scan on sensor when no monitoring application 53/225153/1 accepted/tizen/unified/20200218.145853 submit/tizen/20200218.012430
Abhay Agarwal [Mon, 17 Feb 2020 08:43:39 +0000 (14:13 +0530)]
Stop scan on sensor when no monitoring application

Issue: Presence/absence scanning on BLE/wifi plugin was not able to
stop in case only presence or only absence was started by application.

Reason: Even if only presence or only absence is started by application
ua-manager simultaneoulsy starts both presence and absence to keep their
detection cycle in sync.

Solution: Stop both presence and absence detection when stop detection
is called, if no application is monitioring on this sensor.

Change-Id: I1e54bad283932dfe3128628e98369a0070f9e623
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
4 years agoua-daemon: Fix memory leak during init 34/224234/1 accepted/tizen/unified/20200210.131729 submit/tizen/20200210.035428
Abhay Agarwal [Thu, 30 Jan 2020 11:33:48 +0000 (17:03 +0530)]
ua-daemon: Fix memory leak during init

Change-Id: I2284a7de845bfbfc88bdffa6de30f0fc8700757c
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
4 years agoua-db: Fix negative returns 33/224233/1
Abhay Agarwal [Thu, 30 Jan 2020 06:19:48 +0000 (11:49 +0530)]
ua-db: Fix negative returns

If payload device uid length is negative, assign this length as 0

Change-Id: I2bda321b6d27df2962771d809a0459c15724aaff
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
4 years agoua-daemon: Fix resource leak, possible NULL derefernce and coverity issues 32/224232/1
Abhay Agarwal [Thu, 30 Jan 2020 05:39:36 +0000 (11:09 +0530)]
ua-daemon: Fix resource leak, possible NULL derefernce and coverity issues

Change-Id: Ib94b45ee765549198c5b56f0967a78e6ac121c06
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
4 years agoplugin handler: Fix resource leak because of payload 31/224231/1
Abhay Agarwal [Wed, 29 Jan 2020 05:22:23 +0000 (10:52 +0530)]
plugin handler: Fix resource leak because of payload

Change-Id: Ife96b4762153e52fc26babff1ddf6ce0a79f9f3b
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
4 years agoSimultaneously start presence and absence detection 66/223266/1
Abhay Agarwal [Tue, 21 Jan 2020 05:40:44 +0000 (11:10 +0530)]
Simultaneously start presence and absence detection

Issue: when presence detection is follwed by absence detection,
       absence callback is missed in first cycle.
Solution: start both presence and absence detection

Change-Id: I353a2ecd985c86afefb322cad47283695853896c
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
4 years agoAdd support to report light sensor status change 18/222518/1
Abhay Agarwal [Tue, 14 Jan 2020 09:35:31 +0000 (15:05 +0530)]
Add support to report light sensor status change

This patch add support of light sensor in existing functionality
to report sensor status change to application

Change-Id: Ie237eeecc1fbf15c3ccb08b35b91ec5e597e60d3
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
4 years agoFix check for db file size 17/222517/1
Abhay Agarwal [Tue, 14 Jan 2020 11:38:58 +0000 (17:08 +0530)]
Fix check for db file size

Database file should not be 0 after db creation

Change-Id: I93803f853ffd6b3afed3b18010cc556da7eb3417
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
4 years agoFix device payload update query accepted/tizen/unified/20200101.120602 submit/tizen/20191230.073018
Abhay agarwal [Fri, 27 Dec 2019 03:24:19 +0000 (08:54 +0530)]
Fix device payload update query

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoFix device service list in ua-manager for NULL payloads
Abhay agarwal [Thu, 26 Dec 2019 15:53:33 +0000 (21:23 +0530)]
Fix device service list in ua-manager for NULL payloads

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoStore payload device user data in database
Abhay agarwal [Thu, 26 Dec 2019 13:48:33 +0000 (19:18 +0530)]
Store payload device user data in database

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoSet length for payload device uid
Abhay agarwal [Thu, 26 Dec 2019 04:24:44 +0000 (09:54 +0530)]
Set length for payload device uid

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoFix payload copy functions
Abhay agarwal [Tue, 24 Dec 2019 13:34:28 +0000 (19:04 +0530)]
Fix payload copy functions

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoupdate handle device detected for payload handling
Abhay agarwal [Tue, 24 Dec 2019 09:39:00 +0000 (15:09 +0530)]
update handle device detected for payload handling

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoupdate svc_dev list while registering device to service
Abhay agarwal [Mon, 23 Dec 2019 13:45:09 +0000 (19:15 +0530)]
update svc_dev list while registering device to service

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoUpdate registered device list to plugin with payload information
Abhay agarwal [Mon, 23 Dec 2019 12:16:10 +0000 (17:46 +0530)]
Update registered device list to plugin with payload information

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoUpdate svc_dev info while adding payload to service
Abhay agarwal [Fri, 20 Dec 2019 12:49:30 +0000 (18:19 +0530)]
Update svc_dev info while adding payload to service

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoAdd service-device-payload list in device tech
Abhay agarwal [Thu, 19 Dec 2019 12:02:50 +0000 (17:32 +0530)]
Add service-device-payload list in device tech

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoFix copy function of payload
Abhay agarwal [Wed, 18 Dec 2019 09:29:29 +0000 (14:59 +0530)]
Fix copy function of payload

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoDo not return from uam core initialization if no data in database
Abhay agarwal [Tue, 17 Dec 2019 14:24:08 +0000 (19:54 +0530)]
Do not return from uam core initialization if no data in database

- All the database tables must be checked before returning from
  uam_core_init function
- Some/All of tables of uam database may be empty and can be
  updated by application

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoUpdate core payload list from database during init
Abhay agarwal [Tue, 17 Dec 2019 12:27:35 +0000 (17:57 +0530)]
Update core payload list from database during init

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoAdd database API to get all payloads
Abhay agarwal [Tue, 17 Dec 2019 11:22:47 +0000 (16:52 +0530)]
Add database API to get all payloads

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoAdd API to get payloads list
Abhay agarwal [Thu, 12 Dec 2019 09:55:02 +0000 (15:25 +0530)]
Add API to get payloads list

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoAdd database APIs to update device service payload info
Abhay agarwal [Fri, 6 Dec 2019 04:07:56 +0000 (09:37 +0530)]
Add database APIs to update device service payload info

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoFix device payload insert
Abhay agarwal [Wed, 4 Dec 2019 08:50:22 +0000 (14:20 +0530)]
Fix device payload insert

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoAdd ua-manager core API to insert payload information to a service
Abhay agarwal [Mon, 2 Dec 2019 10:06:53 +0000 (15:36 +0530)]
Add ua-manager core API to insert payload information to a service

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoAdd database API to insert device payload
Abhay agarwal [Fri, 29 Nov 2019 08:51:15 +0000 (14:21 +0530)]
Add database API to insert device payload

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoAdd ua-manager core APIs to insert payload information
Abhay agarwal [Fri, 29 Nov 2019 05:52:07 +0000 (11:22 +0530)]
Add ua-manager core APIs to insert payload information

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoRemove payload from device
Abhay agarwal [Thu, 28 Nov 2019 11:35:41 +0000 (17:05 +0530)]
Remove payload from device

payload would be added to device-service instead of only being device specific

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoSeperate payload database table from device table
Abhay agarwal [Thu, 28 Nov 2019 10:48:30 +0000 (16:18 +0530)]
Seperate payload database table from device table

For a device, each service can have different payload.

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoRename duid to device_uid
Abhay agarwal [Thu, 28 Nov 2019 04:23:38 +0000 (09:53 +0530)]
Rename duid to device_uid

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoRename ble payload purpose to secondary key
Abhay agarwal [Wed, 27 Nov 2019 06:36:02 +0000 (12:06 +0530)]
Rename ble payload purpose to secondary key

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoRename ble payload service_id to primary_key
Abhay agarwal [Wed, 27 Nov 2019 06:08:41 +0000 (11:38 +0530)]
Rename ble payload service_id to primary_key

Renamed to hide SEC BLE Adv format

Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
4 years agoFix crash issue accepted/tizen/unified/20191213.042448 submit/tizen/20191212.070841
saerome.kim [Thu, 12 Dec 2019 06:10:38 +0000 (15:10 +0900)]
Fix crash issue

- problem: Crash takes place when doing adding a device and detection
  simultaneously.
- Cause: timer callback tries to remove freed memory.
- Solution: Remove timer when removing an async request.

Change-Id: I24be2a3c53ee18e8f3c97be46348a05b03a0782d
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoChange UAM_ASYNC_REQUEST_TIMEOUT to 11 from 10 sec
Lokesh [Wed, 11 Dec 2019 10:19:41 +0000 (15:49 +0530)]
Change UAM_ASYNC_REQUEST_TIMEOUT to 11 from 10 sec

Problem: While adding wifi device with broadcast mac address, and device is not
discoverable, the request_list is cleaned by __uam_request_context_timeout_cb()
before plugin callback came (within 10 sec).
Solution: Plugin tries for 10 seconds, so wait for 11 seconds.

Change-Id: I2bbfc38ccfec65035ecfbb61bf30c20749ee44dd
Signed-off-by: Lokesh <l.kasana@samsung.com>
4 years agoRemove unnecessary error log accepted/tizen/unified/20191205.142656 submit/tizen/20191205.122156
saerome.kim [Thu, 5 Dec 2019 10:25:17 +0000 (19:25 +0900)]
Remove unnecessary error log

Change-Id: I4fa6b31e6511ccef0e3b827b939663146eb9a4bc
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoFix that the device is not added while detecting devices.
saerome.kim [Thu, 5 Dec 2019 09:22:22 +0000 (18:22 +0900)]
Fix that the device is not added while detecting devices.

- Problem: If adding a device while detecting the device, the first device
  detection callback is not called.
- Cause: If the broadcast MAC is used as a source filed in APR Request packet,
  can't distinguish ARP Response whether the device detected or the device added.
- Solution: Modified the device is not added while detecting devices.

Change-Id: Iad779411cecc89869b1aa77522cefd22e7106ecb
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoIncrease 'enable' method timeout
saerome.kim [Thu, 5 Dec 2019 08:35:55 +0000 (17:35 +0900)]
Increase 'enable' method timeout

- Problem: At the time of booting, failt to start ua-manager.
- Cause: It takes a long time for sensor framework to operate.
- Solution: Temporarily increase the response waiting time of the enable method
  to start ua-amanger.

Change-Id: I136d689180535ffe86431c97ad82eb00fb259632
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoFix the issue that MAC cannot be updated when adding a device to broadcast MAC
saerome.kim [Thu, 5 Dec 2019 05:38:06 +0000 (14:38 +0900)]
Fix the issue that MAC cannot be updated when adding a device to broadcast MAC

- Problem: The actual MAC is not applied even if the ARP response is received
  from the device added with broadcast MAC.
- Cause: MAC is managed as a unique key.
- Solution: Modified so that MAC can be changed.

Change-Id: Ic9f1b1b0a9b5694b9275302354df9e36a78d3da4
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoRevert "Add DB functionality for device users mapping"
Lokesh [Wed, 4 Dec 2019 08:49:57 +0000 (14:19 +0530)]
Revert "Add DB functionality for device users mapping"

This reverts commit 1afd2d3aeb9758f4f894c3aa917874da82d33c3b.

Change-Id: I5a76569e7190643c7dfc726dbdeca01d1cb27723

4 years agoRevert "Identify whether device is already registered and not"
Lokesh [Wed, 4 Dec 2019 08:49:12 +0000 (14:19 +0530)]
Revert "Identify whether device is already registered and not"

This reverts commit 5ac8bb7cef537a0db489b1a364c4bffbf8ca0dbf.

Change-Id: I5164eb00ff30c9006786ce963ba1810023588364

4 years agoRevert "Fix the problem that can't access the device-users table"
Lokesh [Wed, 4 Dec 2019 08:47:51 +0000 (14:17 +0530)]
Revert "Fix the problem that can't access the device-users table"

This reverts commit 798a02d0faca05dc6a7a5124c382471e43efd381.

Change-Id: Iae2c03b1fa6c9826c420f9e3d9a6de07820643a4
Signed-off-by: Lokesh <l.kasana@samsung.com>
4 years agoFix memory leak
saerome.kim [Tue, 3 Dec 2019 12:29:45 +0000 (21:29 +0900)]
Fix memory leak

- Problem: Even clients app. died, ua-manager keeps dead client's
  monitor handle.
- Cause: ua-manager does not care for the dead client app.
- Solution: Remove the client's monitor handle if the client requests un-initialization.

Change-Id: I992bf5a6234675fbc3b81fad7f97b530e4019ae4
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years ago[Fix] Write service specific device last_seen in DB accepted/tizen/unified/20191201.221537 submit/tizen/20191129.113310
Lokesh [Fri, 29 Nov 2019 08:19:46 +0000 (13:49 +0530)]
[Fix] Write service specific device last_seen in DB

Issue:
On device detection, update service specific device last_seen in DB.
At time of service_add_device/user(), this last_seen must initialisze from 0,
as per jira statement(https://code.sec.samsung.net/jira/browse/TSYSCON-1948).

Change-Id: I4c7d46fc6ff43f6a09d27df671805eb5f33bfb69
Signed-off-by: Lokesh <l.kasana@samsung.com>
4 years agoFix the problem that can't access the device-users table submit/tizen/20191129.055159
saerome.kim [Fri, 29 Nov 2019 04:43:17 +0000 (13:43 +0900)]
Fix the problem that can't access the device-users table

- Problem: After DB reset, ua-manager can't create the device-users table.
- Cause: Attempt to access a table that does not exist.
- Solution: Modified the device-users table name as intended.

Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoRemove error-logging when removing un-opened DB accepted/tizen/unified/20191126.124635 submit/tizen/20191126.004258
saerome.kim [Mon, 25 Nov 2019 11:43:29 +0000 (20:43 +0900)]
Remove error-logging when removing un-opened DB

- Problem: An error is displayed while attempting to delete an unopened DB.
- Cause: vendor plugin tried to clear DB but ua-manager did not open DB file.
- Solution: If the DB is not open, the error is returned.

Change-Id: Ifc3f13cc18ab362ebd1c18910ee6a430449b0732
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoMake unclear code as clear
saerome.kim [Mon, 25 Nov 2019 11:33:14 +0000 (20:33 +0900)]
Make unclear code as clear

- Problem: The Coverity regarded that ua-manager refering freed() pointer.
- Cause: The input param and the param in the list may not be the same value.
- Solution: Clarify variable name.

Change-Id: I13597ecfcd79843e7ba7222b2282e6e5dd8b6dc3
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoIdentify whether device is already registered and not
Lokesh [Fri, 22 Nov 2019 02:04:04 +0000 (07:34 +0530)]
Identify whether device is already registered and not

Change-Id: I14be9dd70c03f3d40e2b4d4e953b5ad72c2c5c33
Signed-off-by: Lokesh <l.kasana@samsung.com>
4 years agoAdd DB functionality for device users mapping
Lokesh [Fri, 22 Nov 2019 02:04:04 +0000 (07:34 +0530)]
Add DB functionality for device users mapping

Change-Id: Id41e248ce14ed1f1fdb75fec2aa2680077e5855d
Signed-off-by: Lokesh <l.kasana@samsung.com>
4 years agoFix build error occurred in sensor plugins accepted/tizen/unified/20191125.135542 submit/tizen/20191122.014017
saerome.kim [Fri, 22 Nov 2019 01:31:15 +0000 (10:31 +0900)]
Fix build error occurred in sensor plugins

- Problem: Build break took place when building Light/Motion plugins.
- Cause: member variable name had been changed in uas_sensor_info_t.
- Solution: Backout the change.

Change-Id: Id8c10d798a28427451d81b16772603490f24dcd0
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoProvide pending request TRUE only for already registered but not verified device.
Nishant Chaprana [Thu, 21 Nov 2019 14:12:36 +0000 (19:42 +0530)]
Provide pending request TRUE only for already registered but not verified device.

- Problem: Pending request returns TRUE when last registered device which is not
           yet verified by plugin, even for different device.
- Cause: __uam_manager_is_request_pending() only checks for matching function
         before returning result.
- Solution: Match device_id for UAM_REQUEST_ADD_DEVICE before returning result.

Change-Id: Ie0d148f821932eb195547c47939917bb7bdbba60
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
4 years agoFix handle leak when loading plugins
Nishant Chaprana [Thu, 21 Nov 2019 14:04:41 +0000 (19:34 +0530)]
Fix handle leak when loading plugins

- Problem: dlopen() returned handle was leaking when loading plugins in loop.
- Cause: dlcose() not called when plugin add operation fails.
- Solution: Call dlcose() when plugin add operation fails.

Change-Id: Id3c1d9a42fb2ef8b9b9e5b64393c40f6e771d9fc
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
4 years agoFix crash issue
saerome.kim [Thu, 21 Nov 2019 08:33:14 +0000 (17:33 +0900)]
Fix crash issue

- Problem: A crash may occur in a multi-client environment.
- Cause: A crash may occur if a request is deleted in the middle while
  processing the async request included in the list.
- Solution: Modified so that the list is not broken by deleting the request
  while processing the request.

Change-Id: Ic51e4571ea10d7922b429d2712b8a3ed4dccc512
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoUpdate a missing column for device-services table
saerome.kim [Thu, 21 Nov 2019 08:29:56 +0000 (17:29 +0900)]
Update a missing column for device-services table

Change-Id: I1f9b7864cc44bb37e63c51dc713e7c0c38d07194
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoChange the last seen that has never been added or detected by the service to 0
saerome.kim [Thu, 21 Nov 2019 04:39:37 +0000 (13:39 +0900)]
Change the last seen that has never been added or detected by the service to 0

- Problem: The last_seen information may not be 0 even if the service is not executed.
- Cause: We are adding the last_seen info regardless the service.
- Solution: The device information added to the service is initialized to 0.

Change-Id: I14249599db420b25e47098c83eaa17ed1d65182e
Signed-off-by: Lokesh <l.kasana@samsung.com>
4 years agoFix the problem that can't add a device from next time once add_device_failed.
saerome.kim [Thu, 21 Nov 2019 04:39:37 +0000 (13:39 +0900)]
Fix the problem that can't add a device from next time once add_device_failed.

- Problem: Once add_device failed, we can't add the device anymore.
- Cause: The request stored in the internal queue is not deleted.
- Solution: If the request is not processed for a certain period of time,
  remove the request from the queue

Change-Id: I14990e3854d599ca3adfed491f64bb215e94d232
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoModify to store last seen information of device added by service in DB
saerome.kim [Wed, 20 Nov 2019 11:10:56 +0000 (20:10 +0900)]
Modify to store last seen information of device added by service in DB

- Problem: Once a client app restarts, the previous last seen information is 0.
- Cause: As a requirement, last seen information of service-specific device
  should be stored in DB
- Solution: Save the last seen information to the DB.

Change-Id: Ifd1e41c0c822b2274262d3aea6c723e192945822
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
4 years agoReduce calls to _uam_get_timestamp() accepted/tizen/unified/20191119.133204 submit/tizen/20191119.082254
Lokesh [Tue, 19 Nov 2019 05:36:17 +0000 (11:06 +0530)]
Reduce calls to _uam_get_timestamp()

Instead use the value stored in tech->timestamp

Change-Id: I1017043c45a0fd53cd2f962c6168a1e7a902c7d2
Signed-off-by: Lokesh <l.kasana@samsung.com>