libaurum: Deprecate press* methods 04/305404/1
authorWoochan Lee <wc0917.lee@samsung.com>
Thu, 1 Feb 2024 07:27:42 +0000 (16:27 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Thu, 1 Feb 2024 07:27:42 +0000 (16:27 +0900)
It does not defined at IDevice.h
Addtional keys will be added in KeyType then use generateKey() method
instead of press*

Change-Id: I3726916bcf69c580d8d520455815bd7c7bc7c819

libaurum/inc/UiDevice.h
libaurum/src/UiDevice.cc

index 344857c..d2e6ae5 100644 (file)
@@ -385,6 +385,22 @@ public:
      */
     bool generateKey(KeyType keyType, KeyRequestType keyReqestType);
 
+    /**
+     * @brief Simulates a hardware key.
+     *
+     * @param[in] type one of @KeyRequestType
+     *
+     * @return true if the press back succeeded else false
+     *
+     * @deprecated Since 9.0
+     */
+    bool pressBack(KeyRequestType type);
+    bool pressHome(KeyRequestType type);
+    bool pressMenu(KeyRequestType type);
+    bool pressVolUp(KeyRequestType type);
+    bool pressVolDown(KeyRequestType type);
+    bool pressPower(KeyRequestType type);
+
 private:
     /**
      * @brief Waits process idle.
index c53ee3f..98d98bc 100644 (file)
@@ -349,6 +349,36 @@ bool UiDevice::generateKey(KeyType keyType, KeyRequestType keyReqestType)
     return result;
 }
 
+bool UiDevice::pressBack(KeyRequestType type)
+{
+    return generateKey(KeyType::BACK, type);
+}
+
+bool UiDevice::pressHome(KeyRequestType type)
+{
+    return generateKey(KeyType::HOME, type);
+}
+
+bool UiDevice::pressMenu(KeyRequestType type)
+{
+    return generateKey(KeyType::MENU, type);
+}
+
+bool UiDevice::pressVolUp(KeyRequestType type)
+{
+    return generateKey(KeyType::VOLUP, type);
+}
+
+bool UiDevice::pressVolDown(KeyRequestType type)
+{
+    return generateKey(KeyType::VOLDOWN, type);
+}
+
+bool UiDevice::pressPower(KeyRequestType type)
+{
+    return generateKey(KeyType::POWER, type);
+}
+
 bool UiDevice::pressKeyCode(std::string keycode, KeyRequestType type)
 {
     bool result =  mDeviceImpl->pressKeyCode(keycode, type);