*/
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.
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);