summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-10-07Update description of user callbacks to the doxygen commentssubmit/tizen/20191007.022831accepted/tizen/unified/20191007.234842Abhay Agarwal1-4/+14
Change-Id: I986d13362ec310957df7faa82832aa292b0c9df5 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-10-04Provide sensor info in user absence detected callbackAbhay Agarwal3-57/+73
Change-Id: I5c7164a7dd9f8e71f7b5a6654f736ef71acd0a59 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-10-04Provide sensor information in user detection callbackAbhay Agarwal7-5/+145
Change-Id: I79c1256f8bd1ea21f8421d3964b573d6eba45cef Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-10-04Add API to get service specific device discriminantAbhay Agarwal3-2/+78
Change-Id: I4651c96e27ac8fae5f98ceae4e198becc444260a Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-10-04service specific device discriminantAbhay Agarwal4-2/+91
Change-Id: Idff3ea4d729aa408c51152dee5bfd49c4bf3bf98 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-10-02Fixed coverity issuessubmit/tizen/20191002.073539accepted/tizen/unified/20191004.003621saerome.kim7-19/+46
1087645 leaked_storage: Variable sensor_info going out of scope leaks the storage it points to 1087646 var_deref_model: Passing null pointer sensor_info to __send_sensor_presence_event, which dereferences it. 1087649 leaked_storage: Variable sensor_info going out of scope leaks the storage it points to Change-Id: I7c5a080c876c2f43ac3b6ab4fde008bba97894fd Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-10-01Free the unused memory for sensor info structsubmit/tizen/20191001.125608Abhay Agarwal2-3/+19
This commit fix the issue of memory corruption because of unused memory by ua_sensor_info_s struct and free the memory. Change-Id: I9f8b0bfea9e51f9993b81c79f1e706452a56b40c Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-10-01Add API set to get sensor information from sensor handleAbhay Agarwal4-11/+157
This commit add an API set which can be used by the application to get the detected sensor information of the sensor using sensor handle. Change-Id: I10dec7bd427ab5d616bb6860f68e4d318d1234fe Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-10-01use sensor handle to send sensor information to applicationAbhay Agarwal6-45/+162
This commit provides the sensor information to application using a sensor handle instead of providing directly using sensor struct, so that sensor struct need not to be disclosed to the application. Change-Id: Iab7ff5c6898404412f0fbb3d2d3586f2306d3237 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-10-01Provide sensor info in absence callbackAbhay Agarwal5-17/+50
Change-Id: I82a70cbe2312d035f3167fe8f789f92b0eae1148 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-10-01Modify callback signature for sensor_presence_cbAbhay Agarwal3-12/+12
This patch modify callback sensor_presence_cb to not provide sensor information using user data and add a seprate field for this parameter. Change-Id: Ia0c6159225be99595516f9dc10ecf58f2e16fa16 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-10-01Provide detected sensor information in ALL Modesubmit/tizen/20191001.112138accepted/tizen/unified/20191002.013420Abhay Agarwal3-16/+21
Change-Id: Ia5247115d8ecf22faff6cc48f826775ec77c55c5 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-09-30Send only device handle instead of list during sensor callbackAbhay Agarwal3-69/+39
Change-Id: I81cb02c458ffe49da531bb70d336ff3e041e0dfe Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-09-30Provide device information in sensor callbackAbhay Agarwal6-12/+79
Change-Id: I16046cb0154bf143fb59c6f420b77db663136bad Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-09-27[Crash Fix] Set global list variables back to NULL after g_slist_free_full() ↵submit/tizen/20190927.055416accepted/tizen/unified/20190929.221445Nishant Chaprana1-1/+7
operation. Change-Id: I219130622e4d5471cf6f9ee6b30f911c8ff44d83 Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
2019-09-26Fix buffer overflow issueAbhay Agarwal2-3/+3
Change-Id: I2e2ffc47bf5517015e0bbcad9b2cda9951a69b5f Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-09-26Add API to set light detection thresholdAbhay Agarwal5-7/+91
Change-Id: Idef67a2c512af01aa3c14669c9c275a724946777 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-09-26Changed presence_detected_cb in ua-test.saerome.kim1-9/+19
This version display sensor information when be called sensor callback. So we changed the name of the exsiting __device_presence_detected_cb and __device_absence_cb to __sensor_presence/absence_cb. Change-Id: I5b384d7e1917cad57d1545eab314ae653f0a675b Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-09-26[Fix] Allocate and free memory for sensor infoAbhay Agarwal1-1/+2
Change-Id: I7a1a2639c3b06e98fd3a2757d73e9fb6ef1b10e2 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-09-26Modified test app for sensor info in callbackAbhay Agarwal8-15/+93
Change-Id: I79de27fcc552a788f348ffca6ad63c3edcec2539 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-09-26Support sensor info in detection callbackAbhay Agarwal2-4/+8
Change-Id: I36d14926f676cc6ff1e3ffd988b670f0fad01e0d Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-09-23Support Add/Remove sensor during detectionAbhay Agarwal2-18/+22
Change-Id: I7337191785ac65c251a549f058c294d7d19da7d1 Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-09-23call stop presence detection only if startedAbhay Agarwal2-3/+4
Change-Id: I569ea947646588105b5bf0cc7f987656f6e754cb Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
2019-09-17Chaged default detection cycle at ua-test app.saerome.kim2-2/+2
Change-Id: I0a4ad435dc7d9e93265f67917b1c87fcebbdc7ea Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-09-16Update detection cycle/window timesubmit/tizen/20190916.120818accepted/tizen/unified/20190917.034102Abhay agarwal4-7/+7
Change-Id: I43823c1502e9381c7476d10d974a81208a1e26e9 Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
2019-09-16Fix __ua_send_absence_detection() to store monitor->absence_detected_bitmaskLokesh5-69/+97
1/ fix user_sensor_bitmask in __ua_monitor_send_user_absence_cb() 2/ _uam_to_ua_sensor() is newly named Changed uat-detection menu. 1/ change default detection type: ANY 2/ removed stop presence/detection menu Change-Id: I30c3df499d080a080f22186c412aab3e447aaa9d Signed-off-by: Lokesh <l.kasana@samsung.com>
2019-09-16filter list of found_devices of a user based on sensors mentioned in AND/OR ↵Lokesh5-2/+73
conditions Change-Id: I49c00ab54aa734506e4403b08f58fc04b2a4e9d7 Signed-off-by: Lokesh <l.kasana@samsung.com>
2019-09-16Make '__ua_monitor_send_user_absence_cb' consistent with ↵Lokesh2-8/+8
'__ua_monitor_send_user_presence_cb' Pass user_state pointer as the method parameter. Change-Id: I7a10855f2aa3b12eee156b4855124255fe3e8ed0 Signed-off-by: Lokesh <l.kasana@samsung.com>
2019-09-16Changed 'env_absence_bm' to 'env_absence_bitmask'Lokesh2-7/+7
user_handle is checked to be non-null in __ua_monitor_send_user_presence_cb() Change-Id: Ic0382c0c8a03887026943f78aebd5c1e2cdc1d16 Signed-off-by: Lokesh <l.kasana@samsung.com>
2019-09-16Fixed problem that cant'receive PRESENCE/ABSENCE if a least one devicesaerome.kim2-7/+7
is not deceted. Problem: PRESENCE/ABSENCE callback are not called if no device is detected. Cause: monitor->presence_detected_bitmask might be updated in __a_sensor_presence_detected() according to the monitor->presence_mode. However, this function __ua_monitor_send_user_presence_cb() can be called before it is updated when "account" is valid. Soultion: remove checking user_handle in __ua_monitor_send_user_presence_cb() Change-Id: I6ce39a3e12c22d098a54d86abc165722495c43a7 Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-09-16Combined bitmask conditions menu and detection menu into one.saerome.kim2-30/+93
Change-Id: Ibf8b870dfdaff8d4952966e0ecd8523313f7c3f5 Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-09-16Added logical conjunction operator in between AND/OR conditions of user_cbLokesh5-59/+121
1/ Added enum 'ua_condition_conjunction_e' Change-Id: I3b665d1a7610197945a4005ee7f0c92d78af429b Signed-off-by: Lokesh <l.kasana@samsung.com>
2019-09-16Fix in 'env_presence/absence_bm' in send_user_presence/absence_cb()Lokesh3-12/+15
Change-Id: I7c1e0d3cccb84559a43beb05ff21285d334b8201 Signed-off-by: Lokesh <l.kasana@samsung.com>
2019-09-16Fix absence_user_cb AND/OR conditionsLokesh2-12/+24
Incorporate environmental sensors Change-Id: Ia3835de7b8f2442e1c94594904b812fc2a1ac915 Signed-off-by: Lokesh <l.kasana@samsung.com>
2019-09-16Fix presence_user_cb AND/OR conditionLokesh5-65/+82
1/ Incorporate environmental sensors 2/ Send only one presence_user_cb for a user within a cycle Change-Id: I0510fe074e4da808c3078d8ff15f20fc1ae4716f Signed-off-by: Lokesh <l.kasana@samsung.com>
2019-09-16Fixed dexter issuesLokesh6-12/+14
Checker: 'sec_bof_strncat' Defect ID: 33, 34 and 36. Change-Id: I46c9bd3da8ffbc74567a94d0c0b22e87b9c6b7f7 Signed-off-by: Lokesh <l.kasana@samsung.com>
2019-09-04Fixed svace & coverity issues.submit/tizen/20190904.113521accepted/tizen/unified/20190904.224506saerome.kim3-3/+8
- Coverity 1079311: check_return: Calling ua_user_get_account without checking return value. - Svace 406760: INVARIANT_RESULT.OP_ZERO Change-Id: I52d347f6430aa08846da5aec674b35cd30786108 Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-09-04[Fix] Compare mac in device list only when device id matchesAbhay agarwal2-6/+6
Change-Id: Iffa16e906c81fb4b23b5ea3e895c2fb4f3b0b0fd Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
2019-08-30Added 'ua_add_ibeacon_adv_data()' APIsubmit/tizen/20190830.050936accepted/tizen/unified/20190830.110646Lokesh4-16/+117
Change-Id: Ib959f3aeac1de4d15c233bf6606b4615d5960fcf Signed-off-by: Lokesh <l.kasana@samsung.com>
2019-08-29Fixed a coverity issue.submit/tizen/20190829.080217accepted/tizen/unified/20190830.040748saerome.kim1-2/+2
1078723 Copy-paste error Change-Id: Id0983ab4b5197264c088b3da0449bdc0cea107d6 Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-08-29Fixed coverity issues.submit/tizen/20190829.070918saerome.kim2-3/+17
1076181 Resource leak. 1076152 Resource leak. Change-Id: Ia19998552ed4822fb3ad4e01a80425c631dbd33d Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-08-27Resolved Dexter defectssubmit/tizen/20190827.131417accepted/tizen/unified/20190829.101443Lokesh3-10/+10
Checker: 'invalidprintfargtype_sint' DID: 35, 37, 38 Change-Id: Ib982638fbc2a5da85a25582221b3f0ed3e1d7e9b Signed-off-by: Lokesh <l.kasana@samsung.com>
2019-08-27Incresed SAM scoresubmit/tizen/20190827.050311saerome.kim10-2774/+2752
- clean codes and remove redundant code as a function. - separate the codes related to the user and device in user-awareness-user.c into two files. Change-Id: I8a3351edc2cd7a3cf9fc07470d8724ab209db5e8 Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-08-27Added an error code when user tries to remove a device.saerome.kim1-0/+3
- return error code: UA_ERROR_RESOURCE_BUSY - applied APIs. . ua_user_remove_device . ua_user_remove_device_by_device_id . ua_user_remove_device_by_mac_address Change-Id: Ibe4becc4657ecb4c79dfa6801b694f0202882d18 Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-08-26Applied the error code added to ua-manager.submit/tizen/20190826.140219accepted/tizen/unified/20190826.225910saerome.kim1-8/+8
- ua-manager added UAM_ERROR_RESOURCE_BUSY. Change-Id: I0498cffec7eafe00851828d8864a1132390d0200 Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-08-26Fixed missing memory leak problem.saerome.kim1-0/+2
Change-Id: I8562188442ac18ed099709cf611d178a7eef1583 Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-08-26Fixed the Coverity & Svace issues.saerome.kim4-10/+30
1078724 Leaked_storage: Variable mac going out of scope leaks the storage it points to. 1078723 copy_paste_error: g_presence_and_cond looks like a copy-paste error. 1078720 Check return: Calling ua_device_get_mac_address without checking return value. 1078717 Check_return:Calling ua_device_get_mac_type without checking return value. 1076181 Leaked_storage: Variable service going out of scope leaks the storage it points to. 1076152 Leaked_storage: Variable service going out of scope leaks the storage it points to. 405915 Leaked_storage: Variable mac going out of scope leaks the storage it points to Change-Id: I1c8d80568c0df9901abcdc0c26a5318b7faa3a6b Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-08-26Fixed a crash problme when removing a device from user using thesaerome.kim2-3/+6
device's handle. Change-Id: I2464e14a712f47aa8d3c1ff37aba09bd9d5b1022 Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-08-22Changed the unit of the parameters ofsaerome.kim2-3/+3
ua_monitor_set_brightness_threshold() from lux_value to lux. Change-Id: I15176bb46b762f74309e8364cb7797b3c102d365 Signed-off-by: saerome.kim <saerome.kim@samsung.com>
2019-08-22Fixed Doxygen issues in header file.submit/tizen/20190822.051725accepted/tizen/unified/20190822.105945Nishant Chaprana1-13/+17
Change-Id: I451507a3399669cabfa73ef8db109c7fbdeee7a2 Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>