plugin manager: Add support for start/stop location detection 87/260387/1
authorAbhay Agarwal <ay.agarwal@samsung.com>
Fri, 7 May 2021 10:14:38 +0000 (15:44 +0530)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Thu, 24 Jun 2021 05:27:31 +0000 (10:57 +0530)
Change-Id: I82932df8e53fae4b06db1f4ad251bdb669b921c2
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
ua-daemon/include/ua-plugin-manager.h
ua-daemon/src/pm/ua-plugin-manager.c
ua-plugins/include/ua-plugin.h

index 5f571991189542fdf662f63cb1f08b97b08eae0a..4177b55bd3d822833e7e58951851eaf338566bc2 100644 (file)
@@ -30,7 +30,7 @@ extern "C" {
 typedef enum {
        UAM_DETECT_PRESENCE = 0x01,
        UAM_DETECT_ABSENCE = 0x02,
-       UAM_DETECT_LOCATION = 0x03,
+       UAM_DETECT_LOCATION = 0x04,
 } uam_pm_detection_mode_e;
 
 int _uam_pm_init(void);
index 8af601b5ea402e4ed298584efd2c7b067e925670..0a895a9f9f7de5cff1d2442c883e581631a28a06 100644 (file)
@@ -534,6 +534,9 @@ int _uam_pm_start_detection(unsigned int detection_mode, unsigned int bitmask)
        case UAM_DETECT_ABSENCE:
                type = UAS_ABSENCE;
                break;
+       case UAM_DETECT_LOCATION:
+               type = UAS_LOCATION;
+               break;
        default:
                type = UAS_PRESENCE | UAS_ABSENCE;
        }
@@ -585,6 +588,9 @@ int _uam_pm_stop_detection(unsigned int detection_mode, unsigned int bitmask)
        case UAM_DETECT_ABSENCE:
                type = UAS_ABSENCE;
                break;
+       case UAM_DETECT_LOCATION:
+               type = UAS_LOCATION;
+               break;
        default:
                type = UAS_PRESENCE | UAS_ABSENCE;
        }
index d96951a183a61b7a1a49d89694445480e2aa73f9..74a964d0a81b48c5acf466f5d69f0c794c9b6b3f 100644 (file)
@@ -98,7 +98,8 @@ typedef enum {
 /* Detection event types */
 typedef enum {
        UAS_PRESENCE = 0x01, /**< Presence event */
-       UAS_ABSENCE = 0x02 /**< Absence event */
+       UAS_ABSENCE = 0x02, /**< Absence event */
+       UAS_LOCATION = 0x04 /**< Location event */
 } uas_detection_type_e;
 
 /* Device address information structure */