Remove Universal Switch from settings 30/233430/1 accepted/tizen/unified/20200520.111254 submit/tizen/20200518.065950 submit/tizen/20200520.101418
authorArtur Świgoń <a.swigon@samsung.com>
Thu, 14 May 2020 14:40:25 +0000 (16:40 +0200)
committerArtur Świgoń <a.swigon@samsung.com>
Thu, 14 May 2020 15:01:29 +0000 (17:01 +0200)
Change-Id: Iaada0a4e53812d8d7555b54a6a0cde80b1f526a2

117 files changed:
po/en.po
src/main.cpp
src/model/AddAccessoriesSwitchesPageModel.cpp [deleted file]
src/model/AddAccessoriesSwitchesPageModel.hpp [deleted file]
src/model/AddSwitchPageModel.cpp [deleted file]
src/model/AddSwitchPageModel.hpp [deleted file]
src/model/AutoMoveIntervalModel.cpp [deleted file]
src/model/AutoMoveIntervalModel.hpp [deleted file]
src/model/AutoScanModel.cpp [deleted file]
src/model/AutoScanModel.hpp [deleted file]
src/model/AutoTapModel.cpp [deleted file]
src/model/AutoTapModel.hpp [deleted file]
src/model/CameraSwitchesPageModel.cpp [deleted file]
src/model/CameraSwitchesPageModel.hpp [deleted file]
src/model/CursorColorModel.cpp [deleted file]
src/model/CursorColorModel.hpp [deleted file]
src/model/ManageMenuOptionsPageModel.cpp [deleted file]
src/model/ManageMenuOptionsPageModel.hpp [deleted file]
src/model/NumberOfAutoScanLoopsModel.cpp [deleted file]
src/model/NumberOfAutoScanLoopsModel.hpp [deleted file]
src/model/PauseOnFirstModel.cpp [deleted file]
src/model/PauseOnFirstModel.hpp [deleted file]
src/model/PointScanSpeedModel.cpp [deleted file]
src/model/PointScanSpeedModel.hpp [deleted file]
src/model/RemoveSwitchesModel.cpp [deleted file]
src/model/RemoveSwitchesModel.hpp [deleted file]
src/model/ScanDirectionModel.cpp [deleted file]
src/model/ScanDirectionModel.hpp [deleted file]
src/model/ScanMethodModel.cpp [deleted file]
src/model/ScanMethodModel.hpp [deleted file]
src/model/SelectActionPageModel.cpp [deleted file]
src/model/SelectActionPageModel.hpp [deleted file]
src/model/SingleInteractionIntervalModel.cpp [deleted file]
src/model/SingleInteractionIntervalModel.hpp [deleted file]
src/model/SoundModel.cpp [deleted file]
src/model/SoundModel.hpp [deleted file]
src/model/SwitchesPageModel.cpp [deleted file]
src/model/SwitchesPageModel.hpp [deleted file]
src/model/TapDurationModel.cpp [deleted file]
src/model/TapDurationModel.hpp [deleted file]
src/model/UniversalSwitchPageModel.cpp [deleted file]
src/model/UniversalSwitchPageModel.hpp [deleted file]
src/model/UniversalSwitchSettingsPageModel.cpp [deleted file]
src/model/UniversalSwitchSettingsPageModel.hpp [deleted file]
src/model/UpdateAccessoriesSwitchPageModel.cpp [deleted file]
src/model/UpdateAccessoriesSwitchPageModel.hpp [deleted file]
src/model/VoiceModel.cpp [deleted file]
src/model/VoiceModel.hpp [deleted file]
src/presenter/AddAccessoriesSwitchesPagePresenter.cpp [deleted file]
src/presenter/AddAccessoriesSwitchesPagePresenter.hpp [deleted file]
src/presenter/AddSwitchPagePresenter.cpp [deleted file]
src/presenter/AddSwitchPagePresenter.hpp [deleted file]
src/presenter/AlreadyMappedSwitchModalPresenter.cpp [deleted file]
src/presenter/AlreadyMappedSwitchModalPresenter.hpp [deleted file]
src/presenter/AutoMoveIntervalPresenter.cpp [deleted file]
src/presenter/AutoMoveIntervalPresenter.hpp [deleted file]
src/presenter/AutoScanIntervalPresenter.cpp [deleted file]
src/presenter/AutoScanIntervalPresenter.hpp [deleted file]
src/presenter/AutoTapPresenter.cpp [deleted file]
src/presenter/AutoTapPresenter.hpp [deleted file]
src/presenter/CameraSwitchesPagePresenter.cpp [deleted file]
src/presenter/CameraSwitchesPagePresenter.hpp [deleted file]
src/presenter/CursorColorPagePresenter.cpp [deleted file]
src/presenter/CursorColorPagePresenter.hpp [deleted file]
src/presenter/EntryNameModalPresenter.cpp [deleted file]
src/presenter/EntryNameModalPresenter.hpp [deleted file]
src/presenter/MainPagePresenter.cpp
src/presenter/MainPagePresenter.hpp
src/presenter/ManageMenuOptionsPagePresenter.cpp [deleted file]
src/presenter/ManageMenuOptionsPagePresenter.hpp [deleted file]
src/presenter/NoSwitchesModalPresenter.cpp [deleted file]
src/presenter/NoSwitchesModalPresenter.hpp [deleted file]
src/presenter/NumberOfAutoScanLoopsPresenter.cpp [deleted file]
src/presenter/NumberOfAutoScanLoopsPresenter.hpp [deleted file]
src/presenter/PauseOnFirstPresenter.cpp [deleted file]
src/presenter/PauseOnFirstPresenter.hpp [deleted file]
src/presenter/PointScanSpeedPresenter.cpp [deleted file]
src/presenter/PointScanSpeedPresenter.hpp [deleted file]
src/presenter/RemoveSwitchesModalPresenter.cpp [deleted file]
src/presenter/RemoveSwitchesModalPresenter.hpp [deleted file]
src/presenter/RemoveSwitchesPagePresenter.cpp [deleted file]
src/presenter/RemoveSwitchesPagePresenter.hpp [deleted file]
src/presenter/ScanDirectionPresenter.cpp [deleted file]
src/presenter/ScanDirectionPresenter.hpp [deleted file]
src/presenter/ScanMethodPresenter.cpp [deleted file]
src/presenter/ScanMethodPresenter.hpp [deleted file]
src/presenter/SelectActionPagePresenter.cpp [deleted file]
src/presenter/SelectActionPagePresenter.hpp [deleted file]
src/presenter/SingleInteractionIntervalPresenter.cpp [deleted file]
src/presenter/SingleInteractionIntervalPresenter.hpp [deleted file]
src/presenter/SoundPresenter.cpp [deleted file]
src/presenter/SoundPresenter.hpp [deleted file]
src/presenter/SwitchesPagePresenter.cpp [deleted file]
src/presenter/SwitchesPagePresenter.hpp [deleted file]
src/presenter/TapDurationPresenter.cpp [deleted file]
src/presenter/TapDurationPresenter.hpp [deleted file]
src/presenter/UniversalSwitchPagePresenter.cpp [deleted file]
src/presenter/UniversalSwitchPagePresenter.hpp [deleted file]
src/presenter/UniversalSwitchSettingsPagePresenter.cpp [deleted file]
src/presenter/UniversalSwitchSettingsPagePresenter.hpp [deleted file]
src/presenter/UpdateAccessoriesSwitchPagePresenter.cpp [deleted file]
src/presenter/UpdateAccessoriesSwitchPagePresenter.hpp [deleted file]
src/presenter/VoicePresenter.cpp [deleted file]
src/presenter/VoicePresenter.hpp [deleted file]
src/service/UniversalSwitchSentinel.cpp [deleted file]
src/service/UniversalSwitchSentinel.hpp [deleted file]
src/utils/UniversalSwitchConstants.hpp [deleted file]
src/utils/UniversalSwitchTypes.hpp [deleted file]
tests/no-ui-scenarios/EntryNameModalPresenterTest.cpp [deleted file]
tests/no-ui-scenarios/NoSwitchesModalPresenterTest.cpp [deleted file]
tests/no-ui-scenarios/NumberOfAutoScanLoopsPresenterTest.cpp [deleted file]
tests/no-ui-scenarios/PauseOnFirstPresenterTest.cpp [deleted file]
tests/no-ui-scenarios/PointScanSpeedPresenterTest.cpp [deleted file]
tests/no-ui-scenarios/RemoveSwitchesModalPresenterTest.cpp [deleted file]
tests/no-ui-scenarios/SingleInteractionIntervalPresenterTest.cpp [deleted file]
tests/no-ui-scenarios/TapDurationPresenterTest.cpp [deleted file]
tests/no-ui-scenarios/TranslatedStringTests.cpp

index feab158742a1cd79c5c8d6c005bd00d1a9aa7311..13b5882fa047ffd1632bfdb27cd5264c78e9f015 100644 (file)
--- a/po/en.po
+++ b/po/en.po
@@ -298,309 +298,6 @@ msgstr "Try again."
 msgid "IDS_TPLATFORM_OPT_BLUETOOTH"
 msgstr "Bluetooth"
 
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH"
-msgstr "Universal switch"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_HINT"
-msgstr "Control your device with your customized switches."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ON"
-msgstr "On"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_OFF"
-msgstr "Off"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_COMMENT"
-msgstr "Use customizable switches to interact with the device and select items shown on the screen.You can set your personal interaction method by connecting external accessories, tapping the screen or using the front camera to detect the rotation of your head, the opening of your mouth and the blinking of your eyes."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS"
-msgstr "Universal switch settings"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_POPUP_ADD"
-msgstr "Add switch"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_CANCEL"
-msgstr "Cancel"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SAVE"
-msgstr "Save"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_NAME"
-msgstr "Name"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ACTION"
-msgstr "Action"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES"
-msgstr "Switches"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES_ADD_SWITCH"
-msgstr "Add switch"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES_DELETE"
-msgstr "DELETE"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING"
-msgstr "Scanning"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_AUTO_SCAN"
-msgstr "Auto scan"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_AUTO_SCAN_INT"
-msgstr "Auto scan interval"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_NUM_OF_SCANS"
-msgstr "Number of auto scan loops"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD"
-msgstr "Scan method"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD_POINT"
-msgstr "Point"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD_ROW"
-msgstr "Row"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR"
-msgstr "Scan direction"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR_TB"
-msgstr "Top to bottom"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR_BT"
-msgstr "Bottom to top"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_PT_SPEED"
-msgstr "Point scan speed"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS"
-msgstr "Additional settings"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_PAUSE_ON_FIRST"
-msgstr "Pause on first item"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_TAP_DURATION"
-msgstr "Tap duration"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_SGL_IACTION_INT"
-msgstr "Single interaction interval"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP"
-msgstr "Auto tap"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_MOVE_INT"
-msgstr "Auto move interval"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP_KBD"
-msgstr "Auto tap keyboard"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP_KBD_SUB"
-msgstr "Do not show a menu of additional actions when the keyboard is tapped while using Row scan."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK"
-msgstr "Feedback"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL"
-msgstr "Cursor color"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_RED"
-msgstr "Red"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_ORANGE"
-msgstr "Orange"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_YELLOW"
-msgstr "Yellow"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_GREEN"
-msgstr "Green"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_BLUE"
-msgstr "Blue"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_GRAY"
-msgstr "Gray"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND"
-msgstr "Sound"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND_VOLUME"
-msgstr "Volume"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE"
-msgstr "Voice"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE_SPEECH_RATE"
-msgstr "Speech rate"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE_SPEECH_VOLUME"
-msgstr "Speech volume"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_OPTIONS"
-msgstr "Options"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE"
-msgstr "Manage menu options"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_SUB"
-msgstr "Select which menu options to show in Universal switch."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_GESTURES"
-msgstr "Gestures"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_ACTIONS"
-msgstr "Actions"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_SETTINGS"
-msgstr "Settings"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_RECENT_APPS"
-msgstr "Recent apps"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_HOME_SCREEN"
-msgstr "Home screen"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_BACK"
-msgstr "Back"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_BUTTONS_AND_KEYS"
-msgstr "Buttons and keys"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_CONTEXTUAL_MENU"
-msgstr "Contextual menu"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_CONTEXTUAL_MENU_DESC"
-msgstr "Place contextual menu on the first row depending on the activity"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"
-msgstr "%.1f seconds"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON"
-msgstr "On"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"
-msgstr "Off"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_UNDEFINED"
-msgstr "Undefined"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SWITCHES"
-msgstr "%d Switches"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_AUTO_SCAN_INT"
-msgstr "Select the length of the time to wait before the next item is highlighted."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_NUM_OF_SCANS"
-msgstr "Select the number of times the screen is scanned automatically for interactive items when there is no interaction."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_SCAN_SPEED"
-msgstr "Select the movement speed of the vertical and horizontal screen scanning lines."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_PAUSE_ON_FIRST"
-msgstr "Select how much more time you want the 1st item to stay highlighted for while Auto scan is turned on. This will be added to the Auto scan interval time (%.1f seconds). The 1st item will stay highlighted for %.1f seconds in total."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_TAP_DURATION"
-msgstr "Select how long you need to hold an interaction for it to be recognized as a tap.<br> This duration must be less than the Auto tap time."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_SGL_IACTION_INT"
-msgstr "Select the minimum length of time that must pass between interactions for them to be recognized as separate."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_AUTO_TAP"
-msgstr "Select how long to wait before a selected item is tapped automatically. Use the Select item switch again during this time to show menu options instead."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_AUTO_MOVE_INT"
-msgstr "Select how long a switch must be held before the highlight skips to the next or previous item. This function cannot be used while Auto scan is turned on."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_FEEDBACK_SOUND"
-msgstr "Select the volume of the sound feedback."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_FEEDBACK_VOICE"
-msgstr "Select the volume and speed of voice feedback."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_SELECT_ACTION"
-msgstr "Select switch action"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH"
-msgstr "Add switch"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES"
-msgstr "Delete switches"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_DELETE_ALL_SWITCHES_DESC"
-msgstr "All switches will be removed. Universal Switch will be disabled."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES_DESC"
-msgstr "switches will be removed."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_OK"
-msgstr "Ok"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_UNABLE_TO_ADD"
-msgstr "Unable to add accessory"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ALREADY_ADDED"
-msgstr "This accessory has already been added. Try adding another accessory."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_NAME"
-msgstr "Switch name"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_SCREEN"
-msgstr "Screen"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_SCREEN_HINT"
-msgstr "Tap anywhere on the screen."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_ACCESSORIES"
-msgstr "Accessories"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_ACCESSORIES_HINT"
-msgstr "Connect accessories before adding switches."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA"
-msgstr "Camera"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_HINT"
-msgstr "Set your device to detect the movement of your head, eyes and moth."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_SCREEN_TITLE"
-msgstr "Screen"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_ACCESSORIES_TITLE"
-msgstr "Accessories"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_ACCESSORIES_DESC"
-msgstr "Connect an accessory and press any of its buttons."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_TITLE"
-msgstr "Camera"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_COMMENT"
-msgstr "Control your device with gestures and motions via the camera. Note that these camera switches cannot be used while using the camera hardware in any app."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD"
-msgstr "Head"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD_LEFT"
-msgstr "Turn head left"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD_RIGHT"
-msgstr "Turn head right"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD_UP"
-msgstr "Move head up"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD_DOWN"
-msgstr "Move head down"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD_BLINK"
-msgstr "Blink"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD_BLINK_SUB"
-msgstr "Close your eyes for at least 2.0 seconds to allow the device to recognise this switch."
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD_MOUTH"
-msgstr "Open mouth"
-
 msgid  "IDS_ACCS_SELECT_ITEMS"
 msgstr "Select items"
 
@@ -615,9 +312,3 @@ msgstr "DELETE"
 
 msgid  "IDS_ACCS_SETTINGS_CAPS"
 msgstr "SETTINGS"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_NO_SWITCHES_TITLE"
-msgstr "Add switch?"
-
-msgid  "IDS_ACCS_UNIVERSAL_SWITCH_NO_SWITCHES_TEXT"
-msgstr "To turn on Universal switch, at least one switch needs to be added."
index de030c718d2c6f0c23c033e1dba8f780b6618320..9bfaffaa06b040bb2ac1cce1ca0c0e254582f53b 100644 (file)
@@ -19,7 +19,6 @@
 #include "MainPagePresenter.hpp"
 #include "NavigationContext.hpp"
 #include "Singleton.hpp"
-#include "UniversalSwitchSettingsPagePresenter.hpp"
 
 #include <app.h>
 #include <appcore-common.h>
@@ -59,12 +58,7 @@ static void on_app_resume(void *priv)
 
 static void on_app_control(app_control_h service, void *priv)
 {
-       char *value = NULL;
-       if (!app_control_get_extra_data(service, "SHOW_US_SETTINGS", &value) && value != NULL && strcmp(value, "1") == 0)
-               Singleton<AppContext>::instance().push(std::make_unique<UniversalSwitchSettingsPagePresenter>());
-       else
-               Singleton<AppContext>::instance().push(std::make_unique<MainPagePresenter>());
-       free(value);
+       Singleton<AppContext>::instance().push(std::make_unique<MainPagePresenter>());
 }
 
 static void _lang_changed(app_event_info_h event_info, void *data)
diff --git a/src/model/AddAccessoriesSwitchesPageModel.cpp b/src/model/AddAccessoriesSwitchesPageModel.cpp
deleted file mode 100644 (file)
index 5d420c1..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "AddAccessoriesSwitchesPageModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-AddAccessoriesSwitchesPageModel::AddAccessoriesSwitchesPageModel()
-{
-       dBusClient_ = DBus::DBusClient{BUS, PATH, IFACE, DBus::ConnectionType::SESSION};
-}
-
-AddAccessoriesSwitchesPageModel::~AddAccessoriesSwitchesPageModel()
-{
-       cancelCaptureSwitch();
-}
-
-void AddAccessoriesSwitchesPageModel::captureSwitch(std::function<void(std::string)> onCapture, std::string providerId)
-{
-       dBusClient_.method<std::string(std::string)>("captureSwitch").timeout(DBus::InfinitiveTimeout).asyncCall([onCapture](DBus::ValueOrError<std::string> msg) {
-               if (msg) {
-                       onCapture(std::get<0>(msg));
-               } else {
-                       ERROR("Error on function captureSwitch asyncCall");
-                       ERROR("failed '%s'", msg.getError().message.c_str());
-               }
-       },
-               providerId);
-}
-
-void AddAccessoriesSwitchesPageModel::cancelCaptureSwitch()
-{
-       auto reply = dBusClient_.method<DBus::ValueOrError<>()>("cancelCaptureSwitch").call();
-       if (!reply) {
-               ERROR("Error on function cancelCaptureSwitch call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-}
-
-bool AddAccessoriesSwitchesPageModel::isConfigured(const std::string &switchId)
-{
-       auto reply = dBusClient_.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string, ChangeType>>>()>("getAllSwitchConfigurationItems").call();
-       if (reply) {
-               for (auto &item : std::get<0>(reply))
-                       if (std::get<0>(item) == switchId)
-                               return true;
-       } else {
-               ERROR("Error on function getAllSwitchConfigurationItems call");
-               ERROR("%s", reply.getError().message.c_str());
-               ASSERT(0, "unable to know that switch is configured");
-       }
-       return false;
-}
diff --git a/src/model/AddAccessoriesSwitchesPageModel.hpp b/src/model/AddAccessoriesSwitchesPageModel.hpp
deleted file mode 100644 (file)
index 82e853c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ADD_ACCESSORIES_SWITCHES_PAGE_MODEL_HPP
-#define ADD_ACCESSORIES_SWITCHES_PAGE_MODEL_HPP
-
-#include "DBus.hpp"
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchTypes.hpp"
-#include "VConf.hpp"
-
-#include <chrono>
-
-class AddAccessoriesSwitchesPageModel
-{
-       public:
-       AddAccessoriesSwitchesPageModel();
-       ~AddAccessoriesSwitchesPageModel();
-       void captureSwitch(std::function<void(std::string)> onCapture, std::string providerId);
-       void cancelCaptureSwitch();
-       bool isConfigured(const std::string &switchId);
-
-       private:
-       DBus::DBusClient dBusClient_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/AddSwitchPageModel.cpp b/src/model/AddSwitchPageModel.cpp
deleted file mode 100644 (file)
index e66b973..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "AddSwitchPageModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-AddSwitchPageModel::AddSwitchPageModel()
-{
-       dBusClient_ = DBus::DBusClient(BUS, PATH, IFACE, DBus::ConnectionType::SESSION);
-       synchronizeProviders();
-       dBusClient_.addSignal<void()>(std::string{"switchesConfigurationChanged"}, [this]() {
-               this->switchesConfigurationChanged_ = std::chrono::system_clock::now();
-       });
-}
-
-void AddSwitchPageModel::synchronizeProviders()
-{
-       providers_.clear();
-       auto reply = dBusClient_.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string>>>()>("getAllSwitchProviders").call();
-       if (reply) {
-               for (auto provider : std::get<0>(reply))
-                       providers_.push_back(InfoType{std::get<0>(provider), std::get<1>(provider), std::get<2>(provider)});
-       } else {
-               ERROR("Error on function getAllSwitchProviders call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-}
-
-bool AddSwitchPageModel::areAllSwitchesConfigured(const InfoType &switchProvider)
-{
-       auto configuredSwitches = getAllSwitchConfigurationItems();
-       auto isSwitchConfigured = [&](const InfoType &switchItem) {
-               for (auto &configured : configuredSwitches) {
-                       if (switchItem.id == configured.switchId)
-                               return true;
-               }
-               return false;
-       };
-       for (auto &aSwitch : getAllSwitchesByProviderId(switchProvider.id)) {
-               if (!isSwitchConfigured(aSwitch))
-                       return false;
-       }
-       return true;
-}
-
-const std::vector<InfoType> &AddSwitchPageModel::getProviders()
-{
-       return providers_;
-}
-
-std::vector<InfoType> AddSwitchPageModel::getAllSwitchesByProviderId(const std::string &providerId)
-{
-       std::vector<InfoType> allSwitches;
-       auto reply = dBusClient_.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string>>>(std::string)>("getAllSwitchesByProviderId").call(providerId);
-       if (reply) {
-               for (auto aSwitch : std::get<0>(reply))
-                       allSwitches.push_back(InfoType{std::get<0>(aSwitch), std::get<1>(aSwitch), std::get<2>(aSwitch)});
-       } else {
-               ERROR("Error on function getAllSwitchProviders call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-       return allSwitches;
-}
-
-std::vector<SwitchConfigurationItem> AddSwitchPageModel::getAllSwitchConfigurationItems()
-{
-       std::vector<SwitchConfigurationItem> configurationItems{};
-       auto reply = dBusClient_.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string, ChangeType>>>()>("getAllSwitchConfigurationItems").call();
-       if (reply) {
-               for (auto item : std::get<0>(reply))
-                       configurationItems.push_back(SwitchConfigurationItem{std::get<0>(item), std::get<1>(item), std::get<2>(item)});
-       } else {
-               ERROR("Error on function getAllSwitchConfigurationItems call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-       return configurationItems;
-}
diff --git a/src/model/AddSwitchPageModel.hpp b/src/model/AddSwitchPageModel.hpp
deleted file mode 100644 (file)
index fa422f1..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ADD_SWITCH_PAGE_MODEL_HPP
-#define ADD_SWITCH_PAGE_MODEL_HPP
-
-#include "DBus.hpp"
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchTypes.hpp"
-#include "VConf.hpp"
-
-#include <chrono>
-
-class AddSwitchPageModel
-{
-       public:
-       AddSwitchPageModel();
-       const std::vector<InfoType> &getProviders();
-       bool areAllSwitchesConfigured(const InfoType &switchProvider);
-       ObservableProperty<std::chrono::system_clock::time_point> switchesConfigurationChanged_;
-       std::vector<InfoType> getAllSwitchesByProviderId(const std::string &providerId);
-
-       private:
-       void synchronizeProviders();
-       std::vector<SwitchConfigurationItem> getAllSwitchConfigurationItems();
-
-       DBus::DBusClient dBusClient_;
-       std::vector<InfoType> providers_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/AutoMoveIntervalModel.cpp b/src/model/AutoMoveIntervalModel.cpp
deleted file mode 100644 (file)
index 092cab9..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "AutoMoveIntervalModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-AutoMoveIntervalModel::AutoMoveIntervalModel()
-{
-       stateHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_STATE, defaultState_, [this](auto val) {
-               this->state_ = val;
-       });
-
-       state_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_STATE, val);
-       });
-
-       valueHandle_ = Singleton<VConfInterface>::instance().registerAndGet<double>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_VALUE, defaultValue_, [this](auto val) {
-               this->value_ = val;
-       });
-
-       value_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_VALUE, val);
-       });
-}
\ No newline at end of file
diff --git a/src/model/AutoMoveIntervalModel.hpp b/src/model/AutoMoveIntervalModel.hpp
deleted file mode 100644 (file)
index d4665c1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef AUTO_MOVE_INTERVAL_MODEL_HPP_
-#define AUTO_MOVE_INTERVAL_MODEL_HPP_
-
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-#include "utils.hpp"
-
-class AutoMoveIntervalModel
-{
-       public:
-       AutoMoveIntervalModel();
-       ObservableProperty<bool> state_;
-       ObservableProperty<double> value_;
-
-       const utils::Range<double> range_ = {0.1, 5.0};
-
-       const double step_ = 0.1;
-       const double defaultValue_ = 1.0;
-
-       const bool defaultState_ = false;
-
-       private:
-       VConfInterface::CallbackHandle stateHandle_;
-       VConfInterface::CallbackHandle valueHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/AutoScanModel.cpp b/src/model/AutoScanModel.cpp
deleted file mode 100644 (file)
index 283bd4b..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "AutoScanModel.hpp"
-
-#include "Singleton.hpp"
-
-AutoScanModel::AutoScanModel()
-{
-       enabledHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>("db/setting/accessibility/universal-switch/AUTO_SCAN_ENABLED", true, [this](auto val) {
-               this->enabled_ = val;
-       });
-
-       enabled_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set("db/setting/accessibility/universal-switch/AUTO_SCAN_ENABLED", val);
-       });
-
-       intervalHandle_ = Singleton<VConfInterface>::instance().registerAndGet<double>("db/setting/accessibility/universal-switch/AUTO_SCAN_INTERVAL", 1, [this](auto val) {
-               this->interval_ = val;
-       });
-
-       interval_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set("db/setting/accessibility/universal-switch/AUTO_SCAN_INTERVAL", val);
-       });
-}
\ No newline at end of file
diff --git a/src/model/AutoScanModel.hpp b/src/model/AutoScanModel.hpp
deleted file mode 100644 (file)
index a8bc631..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef AUTO_SCAN_MODEL_HPP
-#define AUTO_SCAN_MODEL_HPP
-
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-#include "utils.hpp"
-
-class AutoScanModel
-{
-       public:
-       AutoScanModel();
-       ObservableProperty<bool> enabled_;
-       ObservableProperty<double> interval_;
-
-       const utils::Range<double> range_ = {0.5, 9.9};
-       const double step_ = 0.1;
-
-       private:
-       VConfInterface::CallbackHandle enabledHandle_;
-       VConfInterface::CallbackHandle intervalHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/AutoTapModel.cpp b/src/model/AutoTapModel.cpp
deleted file mode 100644 (file)
index dcd7939..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "AutoTapModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-AutoTapModel::AutoTapModel()
-{
-       stateHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_STATE, defaultState_, [this](auto val) {
-               this->state_ = val;
-       });
-
-       state_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_STATE, val);
-       });
-
-       valueHandle_ = Singleton<VConfInterface>::instance().registerAndGet<double>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_VALUE, defaultValue_, [this](auto val) {
-               this->value_ = val;
-       });
-
-       value_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_VALUE, val);
-       });
-}
\ No newline at end of file
diff --git a/src/model/AutoTapModel.hpp b/src/model/AutoTapModel.hpp
deleted file mode 100644 (file)
index a34ed70..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef AUTO_TAP_MODEL_HPP_
-#define AUTO_TAP_MODEL_HPP_
-
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-#include "utils.hpp"
-
-class AutoTapModel
-{
-       public:
-       AutoTapModel();
-       ObservableProperty<bool> state_;
-       ObservableProperty<double> value_;
-
-       const utils::Range<double> range_ = {0.5, 5.0};
-
-       const double step_ = 0.1;
-       const double defaultValue_ = 1.0;
-
-       const bool defaultState_ = false;
-
-       private:
-       VConfInterface::CallbackHandle stateHandle_;
-       VConfInterface::CallbackHandle valueHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/CameraSwitchesPageModel.cpp b/src/model/CameraSwitchesPageModel.cpp
deleted file mode 100644 (file)
index f8fddb2..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "CameraSwitchesPageModel.hpp"
-
-#include "DBus.hpp"
-#include "UniversalSwitchConstants.hpp"
-
-std::vector<InfoType> CameraSwitchesPageModel::getAllSwitchesByProvider(const std::string &providerId)
-{
-       std::vector<InfoType> allSwitches;
-       auto reply = DBus::DBusClient{BUS, PATH, IFACE, DBus::ConnectionType::SESSION}.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string>>>(std::string)>("getAllSwitchesByProviderId").call(providerId);
-       if (reply) {
-               for (auto aSwitch : std::get<0>(reply))
-                       allSwitches.push_back(InfoType{std::get<0>(aSwitch), std::get<1>(aSwitch), std::get<2>(aSwitch)});
-       } else {
-               ERROR("Error on function getAllSwitchesByProviderId call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-       return allSwitches;
-}
-
-bool CameraSwitchesPageModel::isSwitchConfigured(const std::string &switchId)
-{
-       auto reply = DBus::DBusClient{BUS, PATH, IFACE, DBus::ConnectionType::SESSION}.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string>>>()>("getAllSwitchConfigurationItems").call();
-       if (reply) {
-               for (auto item : std::get<0>(reply))
-                       if (std::get<0>(item) == switchId)
-                               return true;
-       } else {
-               ERROR("Error on function getAllSwitchConfigurationItems call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-       return false;
-}
diff --git a/src/model/CameraSwitchesPageModel.hpp b/src/model/CameraSwitchesPageModel.hpp
deleted file mode 100644 (file)
index 64d0b4c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef CAMERA_SWITCHES_PAGE_MODEL_HPP
-#define CAMERA_SWITCHES_PAGE_MODEL_HPP
-
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchTypes.hpp"
-#include "VConf.hpp"
-
-class CameraSwitchesPageModel
-{
-       public:
-       std::vector<InfoType> getAllSwitchesByProvider(const std::string &provider);
-       bool isSwitchConfigured(const std::string &switchId);
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/CursorColorModel.cpp b/src/model/CursorColorModel.cpp
deleted file mode 100644 (file)
index 158b54a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "CursorColorModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-CursorColorModel::CursorColorModel()
-{
-       vconfHandle_ = Singleton<VConfInterface>::instance().registerAndGet<int>(
-               VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_CURSOR_COLOR,
-               DEFAULT_FEEDBACK_CURSOR_COLOR,
-               [this](auto value) {
-                       this->cursorColor_ = Color::fromABGR(value);
-               });
-       cursorColor_.attach([this](auto value) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_CURSOR_COLOR, value.toABGRInt());
-       });
-}
-
-std::string CursorColorModel::getColorText(Color color)
-{
-       if (color == Color::RED)
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_RED";
-       if (color == Color::ORANGE)
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_ORANGE";
-       if (color == Color::YELLOW)
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_YELLOW";
-       if (color == Color::GREEN)
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_GREEN";
-       if (color == Color::BLUE)
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_BLUE";
-       if (color == Color::GRAY)
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL_GRAY";
-
-       return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_UNDEFINED";
-}
\ No newline at end of file
diff --git a/src/model/CursorColorModel.hpp b/src/model/CursorColorModel.hpp
deleted file mode 100644 (file)
index 85dabcc..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef CURSOR_COLOR_MODEL_HPP
-#define CURSOR_COLOR_MODEL_HPP
-
-#include "Geometry.hpp"
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-
-class CursorColorModel
-{
-       public:
-       CursorColorModel();
-       ObservableProperty<Color> cursorColor_;
-       std::string getColorText(Color color);
-
-       private:
-       VConfInterface::CallbackHandle vconfHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/ManageMenuOptionsPageModel.cpp b/src/model/ManageMenuOptionsPageModel.cpp
deleted file mode 100644 (file)
index 120e685..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ManageMenuOptionsPageModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-ManageMenuOptionsPageModel::ManageMenuOptionsPageModel()
-{
-       std::vector<std::string> vconfKeys{
-               {VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_ACTIONS},
-               {VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_SETTINGS},
-               {VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_HOMESCREEN},
-               {VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_KEYS},
-               {VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_CONTEXTUAL_MENU},
-               {VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_GESTURES},
-               {VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_RECENT_APPS},
-               {VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_BACK}};
-       manageMenuOptionStates_.resize(ManageMenuOptionsCount);
-       vconfHandles_.resize(ManageMenuOptionsCount);
-
-       for (auto i = 0u; i < ManageMenuOptionsCount; ++i) {
-               auto key = vconfKeys[i];
-               vconfHandles_[i] = Singleton<VConfInterface>::instance().registerAndGet<bool>(
-                       key,
-                       false,
-                       [this, i](auto value) {
-                               this->manageMenuOptionStates_[i] = value;
-                       });
-
-               manageMenuOptionStates_[i].attach([this, key](auto newValue) {
-                       Singleton<VConfInterface>::instance().set(key, newValue);
-               });
-       }
-}
\ No newline at end of file
diff --git a/src/model/ManageMenuOptionsPageModel.hpp b/src/model/ManageMenuOptionsPageModel.hpp
deleted file mode 100644 (file)
index 0641767..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef MANAGE_MENU_OPTIONS_PAGE_MODEL_HPP
-#define MANAGE_MENU_OPTIONS_PAGE_MODEL_HPP
-
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-
-class ManageMenuOptionsPageModel
-{
-       public:
-       static const int ManageMenuOptionsCount = 8;
-       ManageMenuOptionsPageModel();
-       std::vector<ObservableProperty<bool>> manageMenuOptionStates_;
-
-       private:
-       std::vector<VConfInterface::CallbackHandle> vconfHandles_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/NumberOfAutoScanLoopsModel.cpp b/src/model/NumberOfAutoScanLoopsModel.cpp
deleted file mode 100644 (file)
index dfa76bc..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "NumberOfAutoScanLoopsModel.hpp"
-#include "Singleton.hpp"
-#include "UniversalSwitchConstants.hpp"
-
-NumberOfAutoScanLoopsModel::NumberOfAutoScanLoopsModel()
-{
-       valueHandle_ = Singleton<VConfInterface>::instance().registerAndGet<int>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_NUM_OF_SCANS, defaultValue_, [this](auto val) {
-               this->value_ = val;
-       });
-
-       value_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_NUM_OF_SCANS, val);
-       });
-}
diff --git a/src/model/NumberOfAutoScanLoopsModel.hpp b/src/model/NumberOfAutoScanLoopsModel.hpp
deleted file mode 100644 (file)
index 09a2daf..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef NUMBER_OF_AUTO_SCAN_LOOPS_MODEL_HPP_
-#define NUMBER_OF_AUTO_SCAN_LOOPS_MODEL_HPP_
-
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchConstants.hpp"
-#include "VConf.hpp"
-#include "utils.hpp"
-
-class NumberOfAutoScanLoopsModel
-{
-       public:
-       NumberOfAutoScanLoopsModel();
-       ObservableProperty<int> value_;
-
-       const utils::Range<double> range_ = {RANGE_MIN_SCANS_NUM, RANGE_MAX_SCANS_NUM};
-       const double step_ = STEP_SCANS_NUM;
-       const double defaultValue_ = DEFAULT_AUTO_SCAN_NUMBER;
-
-       private:
-       VConfInterface::CallbackHandle valueHandle_;
-};
-
-#endif
diff --git a/src/model/PauseOnFirstModel.cpp b/src/model/PauseOnFirstModel.cpp
deleted file mode 100644 (file)
index 573cd7a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "PauseOnFirstModel.hpp"
-
-PauseOnFirstModel::PauseOnFirstModel()
-{
-       stateHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>("db/setting/accessibility/universal-switch/PAUSE_ON_FIRST_ELEMENT_ENABLED", false, [this](auto val) {
-               this->state_ = val;
-       });
-
-       state_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set("db/setting/accessibility/universal-switch/PAUSE_ON_FIRST_ELEMENT_ENABLED", val);
-       });
-
-       valueHandle_ = Singleton<VConfInterface>::instance().registerAndGet<double>("db/setting/accessibility/universal-switch/PAUSE_ON_FIRST_ELEMENT_TIME", 1, [this](auto val) {
-               this->value_ = val;
-       });
-
-       value_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set("db/setting/accessibility/universal-switch/PAUSE_ON_FIRST_ELEMENT_TIME", val);
-       });
-}
\ No newline at end of file
diff --git a/src/model/PauseOnFirstModel.hpp b/src/model/PauseOnFirstModel.hpp
deleted file mode 100644 (file)
index 9c83650..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef PAUSE_ON_FIRST_MODEL_HPP_
-#define PAUSE_ON_FIRST_MODEL_HPP_
-
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-#include "utils.hpp"
-
-class PauseOnFirstModel
-{
-       public:
-       PauseOnFirstModel();
-       ObservableProperty<bool> state_;
-       ObservableProperty<double> value_;
-
-       const utils::Range<double> range_ = {0.1, 5.0};
-       const double step_ = 0.1;
-
-       private:
-       VConfInterface::CallbackHandle stateHandle_;
-       VConfInterface::CallbackHandle valueHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/PointScanSpeedModel.cpp b/src/model/PointScanSpeedModel.cpp
deleted file mode 100644 (file)
index e748e5c..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "PointScanSpeedModel.hpp"
-#include "Singleton.hpp"
-
-PointScanSpeedModel::PointScanSpeedModel()
-{
-       valueHandle_ = Singleton<VConfInterface>::instance().registerAndGet<int>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_PT_SPEED, DEFAULT_SCAN_PT_SPEED, [this](auto val) {
-               this->value_ = val;
-       });
-
-       value_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_PT_SPEED, val);
-       });
-}
diff --git a/src/model/PointScanSpeedModel.hpp b/src/model/PointScanSpeedModel.hpp
deleted file mode 100644 (file)
index fb4971d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef POINT_SCAN_SPEED_MODEL_HPP_
-#define POINT_SCAN_SPEED_MODEL_HPP_
-
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchConstants.hpp"
-#include "VConf.hpp"
-#include "utils.hpp"
-
-class PointScanSpeedModel
-{
-       public:
-       PointScanSpeedModel();
-       ObservableProperty<int> value_;
-
-       const utils::Range<double> range_ = {RANGE_MIN_SCAN_SPEED, RANGE_MAX_SCAN_SPEED};
-       const double step_ = STEP_SCAN_SPEED;
-       const double defaultValue_ = DEFAULT_SCAN_PT_SPEED;
-
-       private:
-       VConfInterface::CallbackHandle valueHandle_;
-};
-
-#endif
diff --git a/src/model/RemoveSwitchesModel.cpp b/src/model/RemoveSwitchesModel.cpp
deleted file mode 100644 (file)
index 0a88224..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "RemoveSwitchesModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-RemoveSwitchesModel::RemoveSwitchesModel()
-{
-       isUniversalSwitchActiveHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, false, [this](auto val) {
-               this->isUniversalSwitchActive_ = val;
-       });
-
-       isUniversalSwitchActive_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, val);
-       });
-}
-
-void RemoveSwitchesModel::removeSwitches(std::vector<std::string> &switchesIds)
-{
-       auto dBusClient_ = DBus::DBusClient(BUS, PATH, IFACE, DBus::ConnectionType::SESSION);
-       for (auto &s : switchesIds) {
-               DEBUG("removing: %s", s.c_str());
-               dBusClient_.method<void(std::string)>("removeSwitchConfigurationItem").call(s);
-       }
-}
\ No newline at end of file
diff --git a/src/model/RemoveSwitchesModel.hpp b/src/model/RemoveSwitchesModel.hpp
deleted file mode 100644 (file)
index a6c5621..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef REMOVE_SWITCHES_MODEL_HPP
-#define REMOVE_SWITCHES_MODEL_HPP
-
-#include "DBus.hpp"
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-
-class RemoveSwitchesModel
-{
-       public:
-       RemoveSwitchesModel();
-       ObservableProperty<bool> isUniversalSwitchActive_;
-       void removeSwitches(std::vector<std::string> &switchesIds);
-
-       private:
-       VConfInterface::CallbackHandle isUniversalSwitchActiveHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/ScanDirectionModel.cpp b/src/model/ScanDirectionModel.cpp
deleted file mode 100644 (file)
index bcd0385..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ScanDirectionModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-ScanDirectionModel::ScanDirectionModel()
-{
-       vconfHandle_ = Singleton<VConfInterface>::instance().registerAndGet<int>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_DIR_VERTICAL,
-               static_cast<int>(DEFAULT_SCAN_DIR),
-               [this](auto value) {
-                       this->direction_ = static_cast<ScanDirection>(value);
-               });
-
-       direction_.attach([this](auto value) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_DIR_VERTICAL, static_cast<int>(value));
-       });
-}
\ No newline at end of file
diff --git a/src/model/ScanDirectionModel.hpp b/src/model/ScanDirectionModel.hpp
deleted file mode 100644 (file)
index 8705d5f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SCAN_DIRECTION_MODEL_HPP
-#define SCAN_DIRECTION_MODEL_HPP
-
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchTypes.hpp"
-#include "VConf.hpp"
-
-class ScanDirectionModel
-{
-       public:
-       ScanDirectionModel();
-       ObservableProperty<ScanDirection> direction_;
-
-       private:
-       VConfInterface::CallbackHandle vconfHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/ScanMethodModel.cpp b/src/model/ScanMethodModel.cpp
deleted file mode 100644 (file)
index 2cde538..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ScanMethodModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-ScanMethodModel::ScanMethodModel()
-{
-       vconfHandle_ = Singleton<VConfInterface>::instance().registerAndGet<int>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_METHOD,
-               static_cast<int>(DEFAULT_SCAN_METHOD),
-               [this](auto value) {
-                       this->method_ = static_cast<ScanMethod>(value);
-               });
-
-       method_.attach([this](auto value) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_METHOD, static_cast<int>(value));
-       });
-}
\ No newline at end of file
diff --git a/src/model/ScanMethodModel.hpp b/src/model/ScanMethodModel.hpp
deleted file mode 100644 (file)
index fb97ed9..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SCAN_METHOD_MODEL_HPP
-#define SCAN_METHOD_MODEL_HPP
-
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchTypes.hpp"
-#include "VConf.hpp"
-
-class ScanMethodModel
-{
-       public:
-       ScanMethodModel();
-       ObservableProperty<ScanMethod> method_;
-
-       private:
-       VConfInterface::CallbackHandle vconfHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/SelectActionPageModel.cpp b/src/model/SelectActionPageModel.cpp
deleted file mode 100644 (file)
index 0ff0347..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "SelectActionPageModel.hpp"
-
-#include "DBus.hpp"
-#include "UniversalSwitchConstants.hpp"
-
-std::vector<InfoType> SelectActionPageModel::getBindableActivityTypes()
-{
-       std::vector<InfoType> bindableActivities{};
-       auto dBusClient = DBus::DBusClient{BUS, PATH, IFACE, DBus::ConnectionType::SESSION};
-       auto reply = dBusClient.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string>>>()>("getBindableActivityTypes").call();
-       if (reply) {
-               for (auto activity : std::get<0>(reply))
-                       bindableActivities.push_back(InfoType{std::get<0>(activity), std::get<1>(activity), std::get<2>(activity)});
-       } else {
-               ERROR("Error on function getBindableActivityTypes call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-       return bindableActivities;
-}
-
-void SelectActionPageModel::updateSwitch(const SwitchConfigurationItem &item)
-{
-       auto dBusClient = DBus::DBusClient{BUS, PATH, IFACE, DBus::ConnectionType::SESSION};
-       auto reply = dBusClient.method<DBus::ValueOrError<>(std::string, std::string, std::string)>("updateSwitchConfigurationItem").call(item.switchId, item.userName, item.activityType);
-       if (reply)
-               DEBUG("Switch: %s updated successfully", item.switchId.c_str());
-       else {
-               ERROR("Error on function updateSwitchConfigurationItem call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-}
-
-void SelectActionPageModel::addSwitch(const SwitchConfigurationItem &item)
-{
-       auto dBusClient = DBus::DBusClient{BUS, PATH, IFACE, DBus::ConnectionType::SESSION};
-       auto reply = dBusClient.method<DBus::ValueOrError<>(std::string, std::string, std::string)>("addSwitchConfigurationItem").call(item.switchId, item.userName, item.activityType);
-       if (reply)
-               DEBUG("Switch: %s added successfully", item.switchId.c_str());
-       else {
-               ERROR("Error on function addSwitchConfigurationItem call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-}
\ No newline at end of file
diff --git a/src/model/SelectActionPageModel.hpp b/src/model/SelectActionPageModel.hpp
deleted file mode 100644 (file)
index 969cb04..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SELECT_ACTION_PAGE_MODEL_HPP
-#define SELECT_ACTION_PAGE_MODEL_HPP
-
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchTypes.hpp"
-#include "VConf.hpp"
-
-class SelectActionPageModel
-{
-       public:
-       std::vector<InfoType> getBindableActivityTypes();
-       void updateSwitch(const SwitchConfigurationItem &item);
-       void addSwitch(const SwitchConfigurationItem &item);
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/SingleInteractionIntervalModel.cpp b/src/model/SingleInteractionIntervalModel.cpp
deleted file mode 100644 (file)
index 616cf3a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "SingleInteractionIntervalModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-SingleInteractionIntervalModel::SingleInteractionIntervalModel()
-{
-       stateHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_STATE, defaultState_, [this](auto val) {
-               this->state_ = val;
-       });
-
-       state_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_STATE, val);
-       });
-
-       valueHandle_ = Singleton<VConfInterface>::instance().registerAndGet<double>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_VALUE, defaultValue_, [this](auto val) {
-               this->value_ = val;
-       });
-
-       value_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_VALUE, val);
-       });
-}
\ No newline at end of file
diff --git a/src/model/SingleInteractionIntervalModel.hpp b/src/model/SingleInteractionIntervalModel.hpp
deleted file mode 100644 (file)
index 059bde4..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SINGLE_INTERACTION_INTERVAL_HPP_
-#define SINGLE_INTERACTION_INTERVAL_HPP_
-
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-#include "utils.hpp"
-
-class SingleInteractionIntervalModel
-{
-       public:
-       SingleInteractionIntervalModel();
-       ObservableProperty<bool> state_;
-       ObservableProperty<double> value_;
-
-       const utils::Range<double> range_ = {0.1, 2.5};
-
-       const double step_ = 0.1;
-       const double defaultValue_ = 1.0;
-
-       const bool defaultState_ = false;
-
-       private:
-       VConfInterface::CallbackHandle stateHandle_;
-       VConfInterface::CallbackHandle valueHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/SoundModel.cpp b/src/model/SoundModel.cpp
deleted file mode 100644 (file)
index 606c74b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "SoundModel.hpp"
-
-SoundModel::SoundModel()
-{
-       stateHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>("db/setting/accessibility/universal-switch/FEEDBACK_SOUND_ENABLED", false, [this](auto val) {
-               this->state_ = val;
-       });
-
-       state_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set("db/setting/accessibility/universal-switch/FEEDBACK_SOUND_ENABLED", val);
-       });
-
-       valueHandle_ = Singleton<VConfInterface>::instance().registerAndGet<double>("db/setting/accessibility/universal-switch/FEEDBACK_SOUND_VOLUME", 1.0, [this](auto val) {
-               this->value_ = val;
-       });
-
-       value_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set("db/setting/accessibility/universal-switch/FEEDBACK_SOUND_VOLUME", val);
-       });
-}
\ No newline at end of file
diff --git a/src/model/SoundModel.hpp b/src/model/SoundModel.hpp
deleted file mode 100644 (file)
index f3895b4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SOUND_MODEL_HPP
-#define SOUND_MODEL_HPP
-
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-
-class SoundModel
-{
-       public:
-       SoundModel();
-
-       ObservableProperty<bool> state_;
-       ObservableProperty<double> value_;
-
-       private:
-       VConfInterface::CallbackHandle stateHandle_;
-       VConfInterface::CallbackHandle valueHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/SwitchesPageModel.cpp b/src/model/SwitchesPageModel.cpp
deleted file mode 100644 (file)
index 5cd4af7..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "SwitchesPageModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-SwitchesPageModel::SwitchesPageModel()
-{
-       dBusClient_ = DBus::DBusClient(BUS, PATH, IFACE, DBus::ConnectionType::SESSION);
-       dBusClient_.addSignal<void()>(std::string{"switchesConfigurationChanged"}, [this]() {
-               this->switchesConfigurationChanged_ = std::chrono::system_clock::now();
-       });
-       synchronizeBindableActivities();
-}
-
-std::vector<SwitchConfigurationItem> SwitchesPageModel::getAllSwitchConfigurationItems()
-{
-       std::vector<SwitchConfigurationItem> configurationItems{};
-       auto reply = dBusClient_.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string, ChangeType>>>()>("getAllSwitchConfigurationItems").call();
-       if (reply) {
-               for (auto item : std::get<0>(reply))
-                       configurationItems.push_back(SwitchConfigurationItem{std::get<0>(item), std::get<1>(item), std::get<2>(item)});
-       } else {
-               ERROR("Error on function getAllSwitchConfigurationItems call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-       return configurationItems;
-}
-
-std::string SwitchesPageModel::getActivityName(std::string activityType)
-{
-       for (auto activity : bindableActivities_)
-               if (activity.id == activityType)
-                       return activity.name;
-       return {};
-}
-
-void SwitchesPageModel::synchronizeBindableActivities()
-{
-       bindableActivities_.clear();
-       auto reply = dBusClient_.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string>>>()>("getBindableActivityTypes").call();
-       if (reply) {
-               for (auto activity : std::get<0>(reply))
-                       bindableActivities_.push_back(InfoType{std::get<0>(activity), std::get<1>(activity), std::get<2>(activity)});
-       } else {
-               ERROR("Error on function getBindableActivityTypes call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-}
\ No newline at end of file
diff --git a/src/model/SwitchesPageModel.hpp b/src/model/SwitchesPageModel.hpp
deleted file mode 100644 (file)
index 19d3f38..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SWITCHES_PAGE_MODEL_HPP
-#define SWITCHES_PAGE_MODEL_HPP
-
-#include "DBus.hpp"
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchTypes.hpp"
-#include "VConf.hpp"
-
-#include <chrono>
-
-class SwitchesPageModel
-{
-       public:
-       SwitchesPageModel();
-       ObservableProperty<std::chrono::system_clock::time_point> switchesConfigurationChanged_;
-       std::vector<SwitchConfigurationItem> getAllSwitchConfigurationItems();
-       std::string getActivityName(std::string activityType);
-
-       private:
-       void synchronizeBindableActivities();
-       std::vector<InfoType> bindableActivities_;
-       DBus::DBusClient dBusClient_;
-};
-
-#endif
diff --git a/src/model/TapDurationModel.cpp b/src/model/TapDurationModel.cpp
deleted file mode 100644 (file)
index be810fb..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "TapDurationModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-TapDurationModel::TapDurationModel()
-{
-       stateHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_STATE, defaultState_, [this](auto val) {
-               this->state_ = val;
-       });
-
-       state_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_STATE, val);
-       });
-
-       valueHandle_ = Singleton<VConfInterface>::instance().registerAndGet<double>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_VALUE, defaultValue_, [this](auto val) {
-               this->value_ = val;
-       });
-
-       value_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_VALUE, val);
-       });
-}
\ No newline at end of file
diff --git a/src/model/TapDurationModel.hpp b/src/model/TapDurationModel.hpp
deleted file mode 100644 (file)
index 08d5558..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef TAP_DURATION_MODEL_HPP_
-#define TAP_DURATION_MODEL_HPP_
-
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-#include "utils.hpp"
-
-class TapDurationModel
-{
-       public:
-       TapDurationModel();
-       ObservableProperty<bool> state_;
-       ObservableProperty<double> value_;
-
-       const utils::Range<double> range_ = {0.5, 5.0};
-
-       const double step_ = 0.1;
-       const double defaultValue_ = 1.0;
-
-       const bool defaultState_ = false;
-
-       private:
-       VConfInterface::CallbackHandle stateHandle_;
-       VConfInterface::CallbackHandle valueHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/UniversalSwitchPageModel.cpp b/src/model/UniversalSwitchPageModel.cpp
deleted file mode 100644 (file)
index 378fc86..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "UniversalSwitchPageModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-UniversalSwitchPageModel::UniversalSwitchPageModel()
-{
-       connectionPtr_ = DBus::getDBusConnectionByType(DBus::ConnectionType::SESSION);
-       sentinel_ = Singleton<UniversalSwitchSentinelService>::instance().getSentinel();
-       sentinel_->setConfigurationServiceState(true);
-}
-
-bool UniversalSwitchPageModel::atLeastOneSwitchConfigured()
-{
-       DBus::DBusClient client{BUS, PATH, IFACE, connectionPtr_};
-       auto reply = client.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string, int32_t>>>()>("getAllSwitchConfigurationItems").call();
-       if (reply) {
-               return std::get<0>(reply).size() > 0;
-       }
-       ERROR("Error on function getAllSwitchConfigurationItems call");
-       ERROR("%s", reply.getError().message.c_str());
-       return false;
-}
\ No newline at end of file
diff --git a/src/model/UniversalSwitchPageModel.hpp b/src/model/UniversalSwitchPageModel.hpp
deleted file mode 100644 (file)
index 245e4d4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef UNIVERSAL_SWITCH_PAGE_MODEL_HPP
-#define UNIVERSAL_SWITCH_PAGE_MODEL_HPP
-
-#include "DBus.hpp"
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchSentinel.hpp"
-#include "VConf.hpp"
-
-class UniversalSwitchPageModel
-{
-       public:
-       UniversalSwitchPageModel();
-       bool atLeastOneSwitchConfigured();
-       UniversalSwitchSentinel sentinel_;
-
-       private:
-       DBus::DBusWrapper::ConnectionPtr connectionPtr_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/UniversalSwitchSettingsPageModel.cpp b/src/model/UniversalSwitchSettingsPageModel.cpp
deleted file mode 100644 (file)
index b6a3f6f..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "UniversalSwitchSettingsPageModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-UniversalSwitchSettingsPageModel::UniversalSwitchSettingsPageModel()
-{
-       synchronizePropertyWithVConf(autoTapKeyboardState_, VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_KBD_STATE, DEFAULT_AUTO_TAP_KEYBOARD_STATE);
-
-       sentinel_ = Singleton<UniversalSwitchSentinelService>::instance().getSentinel();
-       sentinel_->setConfigurationServiceState(true);
-       sentinel_->configurationServiceState_.attach([this](auto val) {
-               this->initDbusClient();
-       });
-
-       if (sentinel_->configurationServiceState_.value())
-               initDbusClient();
-}
-
-void UniversalSwitchSettingsPageModel::initDbusClient()
-{
-       connectionPtr_ = DBus::getDBusConnectionByType(DBus::ConnectionType::SESSION);
-       dBusClient_ = DBus::DBusClient{BUS, PATH, IFACE, connectionPtr_};
-
-       dBusClient_.addSignal<void()>(std::string{"switchesConfigurationChanged"}, [this]() {
-               getConfiguredSwitchesCount();
-       });
-       getConfiguredSwitchesCount();
-}
-
-void UniversalSwitchSettingsPageModel::getConfiguredSwitchesCount()
-{
-       auto reply = dBusClient_.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string, int32_t>>>()>("getAllSwitchConfigurationItems").call();
-       if (reply) {
-               configuredSwitchesCount_ = std::get<0>(reply).size();
-       } else {
-               ERROR("Error on function getAllSwitchConfigurationItems call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-}
\ No newline at end of file
diff --git a/src/model/UniversalSwitchSettingsPageModel.hpp b/src/model/UniversalSwitchSettingsPageModel.hpp
deleted file mode 100644 (file)
index 8634e77..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef UNIVERSAL_SWITCH_SETTINGS_PAGE_MODEL_HPP
-#define UNIVERSAL_SWITCH_SETTINGS_PAGE_MODEL_HPP
-
-#include "DBus.hpp"
-#include "Geometry.hpp"
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchSentinel.hpp"
-#include "UniversalSwitchTypes.hpp"
-#include "VConf.hpp"
-
-class UniversalSwitchSettingsPageModel
-{
-       public:
-       UniversalSwitchSettingsPageModel();
-
-       ObservableProperty<int> configuredSwitchesCount_;
-       ObservableProperty<bool> autoTapKeyboardState_;
-       UniversalSwitchSentinel sentinel_;
-
-       private:
-       template <typename T>
-       void synchronizePropertyWithVConf(ObservableProperty<T> &property, const std::string &vconfKey, T defaultValue)
-       {
-               vconfHandles_.push_back(Singleton<VConfInterface>::instance().registerAndGet<T>(
-                       vconfKey,
-                       defaultValue,
-                       [&property](auto value) {
-                               property = value;
-                       }));
-
-               property.attach([this, vconfKey](auto newValue) {
-                       Singleton<VConfInterface>::instance().set(vconfKey, newValue);
-               });
-       }
-       std::vector<VConfInterface::CallbackHandle> vconfHandles_;
-       DBus::DBusWrapper::ConnectionPtr connectionPtr_;
-       DBus::DBusClient dBusClient_;
-       void initDbusClient();
-       void getConfiguredSwitchesCount();
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/UpdateAccessoriesSwitchPageModel.cpp b/src/model/UpdateAccessoriesSwitchPageModel.cpp
deleted file mode 100644 (file)
index a7590f2..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "UpdateAccessoriesSwitchPageModel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-UpdateAccessoriesSwitchPageModel::UpdateAccessoriesSwitchPageModel()
-{
-}
-
-SwitchConfigurationItem UpdateAccessoriesSwitchPageModel::getDetailsForSwitchConfigurationItem(const std::string &switchId)
-{
-       auto reply = DBus::DBusClient{BUS, PATH, IFACE, DBus::ConnectionType::SESSION}.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string>>>()>("getAllSwitchConfigurationItems").call();
-       if (reply) {
-               for (auto &item : std::get<0>(reply))
-                       if (std::get<0>(item) == switchId)
-                               return SwitchConfigurationItem{std::get<0>(item), std::get<1>(item), std::get<2>(item)};
-       } else {
-               ERROR("Error on function getAllSwitchConfigurationItems call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-       return {};
-}
-
-InfoType UpdateAccessoriesSwitchPageModel::getActivityDetails(const std::string &activityId)
-{
-       auto dBusClient = DBus::DBusClient{BUS, PATH, IFACE, DBus::ConnectionType::SESSION};
-       auto reply = dBusClient.method<DBus::ValueOrError<std::vector<std::tuple<std::string, std::string, std::string>>>()>("getBindableActivityTypes").call();
-       if (reply) {
-               for (auto &activity : std::get<0>(reply))
-                       if (std::get<0>(activity) == activityId)
-                               return InfoType{std::get<0>(activity), std::get<1>(activity), std::get<2>(activity)};
-       } else {
-               ERROR("Error on function getBindableActivityTypes call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-       return {};
-}
-
-void UpdateAccessoriesSwitchPageModel::updateSwitch(const SwitchConfigurationItem &item)
-{
-       auto dBusClient = DBus::DBusClient{BUS, PATH, IFACE, DBus::ConnectionType::SESSION};
-       auto reply = dBusClient.method<DBus::ValueOrError<>(std::string, std::string, std::string)>("updateSwitchConfigurationItem").call(item.switchId, item.userName, item.activityType);
-       if (reply)
-               DEBUG("Switch: %s updated successfully", item.switchId.c_str());
-       else {
-               ERROR("Error on function updateSwitchConfigurationItem call");
-               ERROR("%s", reply.getError().message.c_str());
-       }
-}
\ No newline at end of file
diff --git a/src/model/UpdateAccessoriesSwitchPageModel.hpp b/src/model/UpdateAccessoriesSwitchPageModel.hpp
deleted file mode 100644 (file)
index bdc1382..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef UPDATE_ACCESSORIES_SWITCH_PAGE_MODEL_HPP
-#define UPDATE_ACCESSORIES_SWITCH_PAGE_MODEL_HPP
-
-#include "DBus.hpp"
-#include "ObservableProperty.hpp"
-#include "UniversalSwitchTypes.hpp"
-#include "VConf.hpp"
-
-#include <chrono>
-
-class UpdateAccessoriesSwitchPageModel
-{
-       public:
-       UpdateAccessoriesSwitchPageModel();
-       SwitchConfigurationItem getDetailsForSwitchConfigurationItem(const std::string &switchId);
-       InfoType getActivityDetails(const std::string &actionId);
-       void updateSwitch(const SwitchConfigurationItem &item);
-};
-
-#endif
\ No newline at end of file
diff --git a/src/model/VoiceModel.cpp b/src/model/VoiceModel.cpp
deleted file mode 100644 (file)
index 0a08244..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "VoiceModel.hpp"
-
-VoiceModel::VoiceModel()
-{
-       stateHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>("db/setting/accessibility/universal-switch/FEEDBACK_VOICE_ENABLED", false, [this](auto val) {
-               this->state_ = val;
-       });
-
-       state_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set("db/setting/accessibility/universal-switch/FEEDBACK_VOICE_ENABLED", val);
-       });
-
-       rateHandle_ = Singleton<VConfInterface>::instance().registerAndGet<int>("db/setting/accessibility/universal-switch/FEEDBACK_VOICE_SPEECH_RATE", 7, [this](auto val) {
-               this->rate_ = utils::rescale<int, double>(val, utils::Range<int>{0, 15}, this->range_);
-       });
-
-       rate_.attach([this](auto val) {
-               Singleton<VConfInterface>::instance().set("db/setting/accessibility/universal-switch/FEEDBACK_VOICE_SPEECH_RATE", utils::rescale<double, int>(val, this->range_, utils::Range<int>{0, 15}));
-       });
-
-       volumeHandle_ = Singleton<VConfInterface>::instance().registerAndGet<double>("db/setting/accessibility/universal-switch/FEEDBACK_VOICE_SPEECH_VOLUME", 1.0, [this](auto val) {
-               this->volume_ = val;
-       });
-
-       volume_.attach([](auto val) {
-               Singleton<VConfInterface>::instance().set("db/setting/accessibility/universal-switch/FEEDBACK_VOICE_SPEECH_VOLUME", val);
-       });
-}
\ No newline at end of file
diff --git a/src/model/VoiceModel.hpp b/src/model/VoiceModel.hpp
deleted file mode 100644 (file)
index 82280e5..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef VOICE_MODEL_HPP
-#define VOICE_MODEL_HPP
-
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-#include "utils.hpp"
-
-class VoiceModel
-{
-       public:
-       VoiceModel();
-
-       const utils::Range<double> range_ = {0.0, 1.0};
-       const double step_ = 0.1;
-
-       ObservableProperty<bool> state_;
-       ObservableProperty<double> rate_;
-       ObservableProperty<double> volume_;
-
-       private:
-       VConfInterface::CallbackHandle stateHandle_;
-       VConfInterface::CallbackHandle rateHandle_;
-       VConfInterface::CallbackHandle volumeHandle_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/AddAccessoriesSwitchesPagePresenter.cpp b/src/presenter/AddAccessoriesSwitchesPagePresenter.cpp
deleted file mode 100644 (file)
index 7160ac8..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "AddAccessoriesSwitchesPagePresenter.hpp"
-
-#include "AlreadyMappedSwitchModalPresenter.hpp"
-#include "AppContext.hpp"
-#include "EntryNameModalPresenter.hpp"
-#include "Singleton.hpp"
-#include "UniversalSwitchConstants.hpp"
-
-AddAccessoriesSwitchesPagePresenter::AddAccessoriesSwitchesPagePresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_ACCESSORIES_TITLE");
-       labelText_ = "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_ACCESSORIES_DESC";
-}
-
-void AddAccessoriesSwitchesPagePresenter::onTop()
-{
-       model_.captureSwitch([this](auto switchId) {
-               this->onSwitchCapture(switchId);
-       },
-               ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER);
-}
-
-void AddAccessoriesSwitchesPagePresenter::notOnTop()
-{
-       model_.cancelCaptureSwitch();
-}
-
-void AddAccessoriesSwitchesPagePresenter::onSwitchCapture(const std::string &switchId)
-{
-       notOnTop();
-       if (model_.isConfigured(switchId))
-               Singleton<AppContext>::instance().pushModal(std::make_unique<AlreadyMappedSwitchModalPresenter>());
-       else
-               Singleton<AppContext>::instance().pushModal(std::make_unique<EntryNameModalPresenter>(switchId));
-}
diff --git a/src/presenter/AddAccessoriesSwitchesPagePresenter.hpp b/src/presenter/AddAccessoriesSwitchesPagePresenter.hpp
deleted file mode 100644 (file)
index 0d3b1c3..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ADD_ACCESSORIES_SWITCHES_PAGE_PRESENTER
-#define ADD_ACCESSORIES_SWITCHES_PAGE_PRESENTER
-
-#include "AddAccessoriesSwitchesPageModel.hpp"
-#include "LabelPresenter.hpp"
-
-class AddAccessoriesSwitchesPagePresenter : public LabelPresenter
-{
-       public:
-       AddAccessoriesSwitchesPagePresenter();
-
-       private:
-       void onTop() override;
-       void notOnTop() override;
-       void onSwitchCapture(const std::string &switchId);
-       AddAccessoriesSwitchesPageModel model_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/AddSwitchPagePresenter.cpp b/src/presenter/AddSwitchPagePresenter.cpp
deleted file mode 100644 (file)
index d1bd0ef..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "AddSwitchPagePresenter.hpp"
-
-#include "AddAccessoriesSwitchesPagePresenter.hpp"
-#include "AppContext.hpp"
-#include "CameraSwitchesPagePresenter.hpp"
-#include "SelectActionPagePresenter.hpp"
-#include "UniversalSwitchConstants.hpp"
-
-AddSwitchPagePresenter::AddSwitchPagePresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES");
-       groups_.emplace_back("");
-       auto &items = groups_.back().items_;
-       for (auto &provider : model_.getProviders()) {
-               items.push_back(std::make_unique<ListItem>(
-                       provider.name,
-                       provider.description,
-                       [=](auto item) {
-                               this->createPageForProvider(provider);
-                       }));
-       }
-       auto onConfigurationChange = [this](auto changeTime) {
-               auto providers = this->model_.getProviders();
-               auto size = providers.size();
-               for (auto i = 0u; i < size; ++i)
-                       this->groups_.back().items_[i]->enabled_ = !this->model_.areAllSwitchesConfigured(providers[i]);
-       };
-       model_.switchesConfigurationChanged_.attach(onConfigurationChange);
-       onConfigurationChange(std::chrono::system_clock::now());
-}
-
-void AddSwitchPagePresenter::createPageForProvider(const InfoType &provider)
-{
-       if (provider.id == ACCESSIBILITY_UNIVERSAL_SWITCH_SCREEN_SWITCH_PROVIDER) {
-               createPageForScreenProvider();
-               return;
-       }
-       if (provider.id == ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER) {
-               createPageForAccessoriesProvider();
-               return;
-       }
-       if (provider.id == ACCESSIBILITY_UNIVERSAL_SWITCH_CAMERA_SWITCH_PROVIDER) {
-               createPageForCameraProvider();
-               return;
-       }
-}
-
-void AddSwitchPagePresenter::createPageForScreenProvider()
-{
-       auto switches = model_.getAllSwitchesByProviderId(ACCESSIBILITY_UNIVERSAL_SWITCH_SCREEN_SWITCH_PROVIDER);
-       if (switches.size() != 1)
-               return;
-       auto screenSwitch = switches[0];
-       Singleton<AppContext>::instance().push(std::make_unique<SelectActionPagePresenter>(screenSwitch.id, ACCESSIBILITY_UNIVERSAL_SWITCH_SCREEN, ChangeType::ADD, 1));
-}
-
-void AddSwitchPagePresenter::createPageForAccessoriesProvider()
-{
-       Singleton<AppContext>::instance().push(std::make_unique<AddAccessoriesSwitchesPagePresenter>());
-}
-
-void AddSwitchPagePresenter::createPageForCameraProvider()
-{
-       Singleton<AppContext>::instance().push(std::make_unique<CameraSwitchesPagePresenter>());
-}
\ No newline at end of file
diff --git a/src/presenter/AddSwitchPagePresenter.hpp b/src/presenter/AddSwitchPagePresenter.hpp
deleted file mode 100644 (file)
index 9af2216..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ADD_SWITCH_PAGE_PRESENTER_HPP
-#define ADD_SWITCH_PAGE_PRESENTER_HPP
-
-#include "AddSwitchPageModel.hpp"
-#include "ListPresenter.hpp"
-#include "UniversalSwitchTypes.hpp"
-
-class AddSwitchPagePresenter : public ListPresenter
-{
-       public:
-       AddSwitchPagePresenter();
-
-       private:
-       AddSwitchPageModel model_;
-       void createPageForProvider(const InfoType &provider);
-       void createPageForScreenProvider();
-       void createPageForAccessoriesProvider();
-       void createPageForCameraProvider();
-};
-
-#endif
diff --git a/src/presenter/AlreadyMappedSwitchModalPresenter.cpp b/src/presenter/AlreadyMappedSwitchModalPresenter.cpp
deleted file mode 100644 (file)
index 405077a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "AlreadyMappedSwitchModalPresenter.hpp"
-
-#include "AppContext.hpp"
-#include "Singleton.hpp"
-
-AlreadyMappedSwitchModalPresenter::AlreadyMappedSwitchModalPresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_UNABLE_TO_ADD");
-       text_ = "IDS_ACCS_UNIVERSAL_SWITCH_ALREADY_ADDED";
-       addAction(std::make_unique<Action>("doneAction", "IDS_ACCS_UNIVERSAL_SWITCH_OK", [](auto action) {
-               Singleton<AppContext>::instance().popModal();
-       }));
-}
diff --git a/src/presenter/AlreadyMappedSwitchModalPresenter.hpp b/src/presenter/AlreadyMappedSwitchModalPresenter.hpp
deleted file mode 100644 (file)
index 9915da0..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ALREADY_MAPPED_SWITCH_MODAL_PRESENTER
-#define ALREADY_MAPPED_SWITCH_MODAL_PRESENTER
-
-#include "ModalPresenter.hpp"
-
-class AlreadyMappedSwitchModalPresenter : public ModalPresenter
-{
-       public:
-       AlreadyMappedSwitchModalPresenter();
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/AutoMoveIntervalPresenter.cpp b/src/presenter/AutoMoveIntervalPresenter.cpp
deleted file mode 100644 (file)
index 1361222..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "AutoMoveIntervalPresenter.hpp"
-
-AutoMoveIntervalPresenter::AutoMoveIntervalPresenter()
-       : SpinnerPresenterWithToggle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_MOVE_INT")
-{
-       state_ = model_.state_.value();
-       state_.attach([this](auto state) {
-               model_.state_ = state;
-       });
-
-       value_ = model_.value_.value();
-       value_.attach([this](auto val) {
-               model_.value_ = val;
-       });
-}
-
-utils::Range<double> AutoMoveIntervalPresenter::getRange()
-{
-       return model_.range_;
-}
-
-double AutoMoveIntervalPresenter::getStep()
-{
-       return model_.step_;
-}
-
-std::string AutoMoveIntervalPresenter::getFormat()
-{
-       return "%1.1f seconds";
-}
-
-std::string AutoMoveIntervalPresenter::getLabel()
-{
-       return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_MOVE_INT";
-}
\ No newline at end of file
diff --git a/src/presenter/AutoMoveIntervalPresenter.hpp b/src/presenter/AutoMoveIntervalPresenter.hpp
deleted file mode 100644 (file)
index 1aa9450..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef AUTO_MOVE_INTERVAL_PRESENTER_HPP_
-#define AUTO_MOVE_INTERVAL_PRESENTER_HPP_
-
-#include "AutoMoveIntervalModel.hpp"
-#include "SpinnerPresenterWithToggle.hpp"
-
-class AutoMoveIntervalPresenter : public SpinnerPresenterWithToggle
-{
-       public:
-       AutoMoveIntervalPresenter();
-
-       utils::Range<double> getRange() override;
-       double getStep() override;
-       std::string getLabel() override;
-       std::string getFormat() override;
-
-       private:
-       AutoMoveIntervalModel model_;
-};
-#endif
\ No newline at end of file
diff --git a/src/presenter/AutoScanIntervalPresenter.cpp b/src/presenter/AutoScanIntervalPresenter.cpp
deleted file mode 100644 (file)
index d86d55f..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "AutoScanIntervalPresenter.hpp"
-
-AutoScanIntervalPresenter::AutoScanIntervalPresenter()
-       : SpinnerPresenter("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_AUTO_SCAN_INT")
-{
-       value_ = model_.interval_;
-       value_.attach([this](auto val) {
-               model_.interval_ = val;
-       });
-}
-
-utils::Range<double> AutoScanIntervalPresenter::getRange()
-{
-       return model_.range_;
-}
-
-double AutoScanIntervalPresenter::getStep()
-{
-       return model_.step_;
-}
-
-std::string AutoScanIntervalPresenter::getLabel()
-{
-       return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_AUTO_SCAN_INT";
-}
-
-std::string AutoScanIntervalPresenter::getFormat()
-{
-       return "%1.1f seconds";
-}
\ No newline at end of file
diff --git a/src/presenter/AutoScanIntervalPresenter.hpp b/src/presenter/AutoScanIntervalPresenter.hpp
deleted file mode 100644 (file)
index 0b00d49..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef AUTO_SCAN_INTERVAL_PRESENTER
-#define AUTO_SCAN_INTERVAL_PRESENTER
-
-#include "AutoScanModel.hpp"
-#include "SpinnerPresenter.hpp"
-
-class AutoScanIntervalPresenter : public SpinnerPresenter
-{
-       public:
-       AutoScanIntervalPresenter();
-       utils::Range<double> getRange() override;
-       double getStep() override;
-       std::string getLabel() override;
-       std::string getFormat() override;
-
-       private:
-       AutoScanModel model_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/AutoTapPresenter.cpp b/src/presenter/AutoTapPresenter.cpp
deleted file mode 100644 (file)
index d442d8c..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "AutoTapPresenter.hpp"
-
-AutoTapPresenter::AutoTapPresenter()
-       : SpinnerPresenterWithToggle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP")
-{
-       state_ = model_.state_.value();
-       state_.attach([this](auto state) {
-               model_.state_ = state;
-       });
-
-       value_ = model_.value_.value();
-       value_.attach([this](auto val) {
-               model_.value_ = val;
-       });
-}
-
-utils::Range<double> AutoTapPresenter::getRange()
-{
-       return model_.range_;
-}
-
-double AutoTapPresenter::getStep()
-{
-       return model_.step_;
-}
-
-std::string AutoTapPresenter::getFormat()
-{
-       return "%1.1f seconds";
-}
-
-std::string AutoTapPresenter::getLabel()
-{
-       return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP";
-}
\ No newline at end of file
diff --git a/src/presenter/AutoTapPresenter.hpp b/src/presenter/AutoTapPresenter.hpp
deleted file mode 100644 (file)
index 64a0774..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef AUTO_TAP_PRESENTER_HPP_
-#define AUTO_TAP_PRESENTER_HPP_
-
-#include "AutoTapModel.hpp"
-#include "SpinnerPresenterWithToggle.hpp"
-
-class AutoTapPresenter : public SpinnerPresenterWithToggle
-{
-       public:
-       AutoTapPresenter();
-
-       utils::Range<double> getRange() override;
-       double getStep() override;
-       std::string getLabel() override;
-       std::string getFormat() override;
-
-       private:
-       AutoTapModel model_;
-};
-#endif
\ No newline at end of file
diff --git a/src/presenter/CameraSwitchesPagePresenter.cpp b/src/presenter/CameraSwitchesPagePresenter.cpp
deleted file mode 100644 (file)
index 83b6d5d..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "CameraSwitchesPagePresenter.hpp"
-
-#include "AppContext.hpp"
-#include "SelectActionPagePresenter.hpp"
-#include "UniversalSwitchConstants.hpp"
-
-CameraSwitchesPagePresenter::CameraSwitchesPagePresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_TITLE");
-       groups_.emplace_back("");
-       groups_.back().items_.push_back(std::make_unique<ListItem>(
-               std::string{},
-               "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_COMMENT"));
-
-       groups_.emplace_back("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD");
-       auto &items = groups_.back().items_;
-       for (auto &aSwitch : model_.getAllSwitchesByProvider(ACCESSIBILITY_UNIVERSAL_SWITCH_CAMERA_SWITCH_PROVIDER)) {
-               items.push_back(std::make_unique<ListItem>(
-                       aSwitch.name,
-                       aSwitch.description,
-                       [=](auto item) {
-                               this->createSelectActionPageForSwitch(aSwitch);
-                       }));
-               items.back()->enabled_ = !model_.isSwitchConfigured(aSwitch.id);
-       }
-}
-
-void CameraSwitchesPagePresenter::createSelectActionPageForSwitch(const InfoType &aSwitch)
-{
-       Singleton<AppContext>::instance().push(std::make_unique<SelectActionPagePresenter>(aSwitch.id, aSwitch.name, ChangeType::ADD, 2));
-}
\ No newline at end of file
diff --git a/src/presenter/CameraSwitchesPagePresenter.hpp b/src/presenter/CameraSwitchesPagePresenter.hpp
deleted file mode 100644 (file)
index e19b180..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef CAMERA_SWITCHES_PAGE_PRESENTER_HPP
-#define CAMERA_SWITCHES_PAGE_PRESENTER_HPP
-
-#include "CameraSwitchesPageModel.hpp"
-#include "ListPresenter.hpp"
-
-class CameraSwitchesPagePresenter : public ListPresenter
-{
-       public:
-       CameraSwitchesPagePresenter();
-
-       private:
-       CameraSwitchesPageModel model_;
-       void createSelectActionPageForSwitch(const InfoType &aSwitch);
-};
-
-#endif
diff --git a/src/presenter/CursorColorPagePresenter.cpp b/src/presenter/CursorColorPagePresenter.cpp
deleted file mode 100644 (file)
index 2dca90e..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "CursorColorPagePresenter.hpp"
-
-#include "AppContext.hpp"
-
-CursorColorPagePresenter::CursorColorPagePresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL");
-       groups_.emplace_back("");
-       auto &items = groups_.back().items_;
-       for (auto color : colors_) {
-               items.push_back(std::make_unique<ListItem>(
-                       model_.getColorText(color),
-                       std::string{},
-                       [this, color](auto item) {
-                               this->model_.cursorColor_ = color;
-                               Singleton<AppContext>::instance().pop();
-                       },
-                       ListItem::WidgetType::radio,
-                       std::function<void(ListItem * item)>{},
-                       std::function<void(ListItem * item)>{},
-                       color == model_.cursorColor_.value()));
-       }
-}
\ No newline at end of file
diff --git a/src/presenter/CursorColorPagePresenter.hpp b/src/presenter/CursorColorPagePresenter.hpp
deleted file mode 100644 (file)
index 1067ff8..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef CURSOR_COLOR_PAGE_PRESENTER_HPP
-#define CURSOR_COLOR_PAGE_PRESENTER_HPP
-
-#include "CursorColorModel.hpp"
-#include "ListPresenter.hpp"
-
-#include <vector>
-
-class CursorColorPagePresenter : public ListPresenter
-{
-       public:
-       CursorColorPagePresenter();
-
-       private:
-       CursorColorModel model_;
-       std::vector<Color> colors_ = {
-               Color::RED,
-               Color::ORANGE,
-               Color::YELLOW,
-               Color::GREEN,
-               Color::BLUE,
-               Color::GRAY};
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/EntryNameModalPresenter.cpp b/src/presenter/EntryNameModalPresenter.cpp
deleted file mode 100644 (file)
index c34485c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "EntryNameModalPresenter.hpp"
-
-#include "AppContext.hpp"
-#include "SelectActionPagePresenter.hpp"
-#include "Singleton.hpp"
-
-EntryNameModalPresenter::EntryNameModalPresenter(std::string switchId)
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH");
-       entryAction_ = addAction(std::make_unique<Action>("modalEntry", "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_NAME", [this](auto action) {
-               doneAction_->enabled_ = !entryAction_->title_.value().empty();
-       }));
-
-       addAction(std::make_unique<Action>("cancelAction", "IDS_ACCS_UNIVERSAL_SWITCH_CANCEL", std::function<void(Action *)>{}));
-       doneAction_ = addAction(std::make_unique<Action>("doneAction", "IDS_ACCS_UNIVERSAL_SWITCH_SAVE", [this, switchId](auto action) {
-               auto switchUserName = this->entryAction_->title_.value();
-               Singleton<AppContext>::instance().popModal();
-               Singleton<AppContext>::instance().push(std::make_unique<SelectActionPagePresenter>(switchId, switchUserName, ChangeType::ADD, 2));
-       },
-               false));
-}
\ No newline at end of file
diff --git a/src/presenter/EntryNameModalPresenter.hpp b/src/presenter/EntryNameModalPresenter.hpp
deleted file mode 100644 (file)
index 9fb0ab4..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ENTRY_NAME_MODAL_PRESENTER_HPP
-#define ENTRY_NAME_MODAL_PRESENTER_HPP
-
-#include "ModalPresenter.hpp"
-
-class EntryNameModalPresenter : public ModalPresenter
-{
-       public:
-       EntryNameModalPresenter(std::string switchId);
-
-       private:
-       Action *entryAction_ = nullptr;
-       Action *doneAction_ = nullptr;
-};
-
-#endif
\ No newline at end of file
index 63a503751cf4465ab1df3ec67f6077590aec09b4..721586791c965982423a471dae2c8f2c289346ca 100644 (file)
@@ -32,10 +32,6 @@ MainPagePresenter::MainPagePresenter()
                std::function<void(ListItem * item)>{},
                std::function<void(ListItem * item)>{},
                model_.state_.value()));
-       groups_.back().items_.push_back(std::make_unique<ListItem>(
-               "IDS_ACCS_UNIVERSAL_SWITCH",
-               "IDS_ACCS_UNIVERSAL_SWITCH_HINT",
-               [this](auto item) { Singleton<AppContext>::instance().push(std::make_unique<UniversalSwitchPagePresenter>()); }));
 
        onPopCallback_ = [this]() {
                screenReaderStateHandle_ = {};
index 7e0fb45a8fc5490251c8bc3de9111bbccde09c41..66975118bd06b5f05cfe7dea9336d75eedf7261e 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "ListPresenter.hpp"
 #include "ScreenReaderModel.hpp"
-#include "UniversalSwitchPagePresenter.hpp"
 #include "VConf.hpp"
 
 class MainPagePresenter : public ListPresenter
diff --git a/src/presenter/ManageMenuOptionsPagePresenter.cpp b/src/presenter/ManageMenuOptionsPagePresenter.cpp
deleted file mode 100644 (file)
index 335db14..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ManageMenuOptionsPagePresenter.hpp"
-
-ManageMenuOptionsPagePresenter::ManageMenuOptionsPagePresenter()
-{
-       std::vector<std::pair<std::string, std::string>> titleAndDescription =
-               {
-                       {"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_GESTURES", ""},
-                       {"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_ACTIONS", ""},
-                       {"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_SETTINGS", ""},
-                       {"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_RECENT_APPS", ""},
-                       {"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_HOME_SCREEN", ""},
-                       {"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_BACK", ""},
-                       {"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_BUTTONS_AND_KEYS", ""},
-                       {"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_CONTEXTUAL_MENU", "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_CONTEXTUAL_MENU_DESC"}};
-
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE");
-       groups_.emplace_back("");
-
-       for (auto i = 0u; i < ManageMenuOptionsPageModel::ManageMenuOptionsCount; ++i) {
-               groups_.back().items_.push_back(std::make_unique<ListItem>(
-                       titleAndDescription[i].first,
-                       titleAndDescription[i].second,
-                       [this, i](auto item) {
-                               model_.manageMenuOptionStates_[i] = item->widgetState_.value();
-                       },
-                       ListItem::WidgetType::toggle,
-                       std::function<void(ListItem * item)>{},
-                       std::function<void(ListItem * item)>{},
-                       model_.manageMenuOptionStates_[i].value()));
-               auto item = groups_.back().items_.back().get();
-               model_.manageMenuOptionStates_[i].attach([item](auto state) {
-                       item->widgetState_ = state;
-               });
-       }
-}
\ No newline at end of file
diff --git a/src/presenter/ManageMenuOptionsPagePresenter.hpp b/src/presenter/ManageMenuOptionsPagePresenter.hpp
deleted file mode 100644 (file)
index b0e09ce..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef MANAGE_MENU_OPTIONS_PAGE_PRESENTER_HPP
-#define MANAGE_MENU_OPTIONS_PAGE_PRESENTER_HPP
-
-#include "ListPresenter.hpp"
-#include "ManageMenuOptionsPageModel.hpp"
-
-#include <vector>
-
-class ManageMenuOptionsPagePresenter : public ListPresenter
-{
-       public:
-       ManageMenuOptionsPagePresenter();
-
-       private:
-       ManageMenuOptionsPageModel model_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/NoSwitchesModalPresenter.cpp b/src/presenter/NoSwitchesModalPresenter.cpp
deleted file mode 100644 (file)
index da6fed7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "NoSwitchesModalPresenter.hpp"
-
-#include "AddSwitchPagePresenter.hpp"
-#include "AppContext.hpp"
-
-NoSwitchesModalPresenter::NoSwitchesModalPresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_NO_SWITCHES_TITLE");
-       text_ = "IDS_ACCS_UNIVERSAL_SWITCH_NO_SWITCHES_TEXT";
-
-       addAction(std::make_unique<Action>("cancelAction", "IDS_ACCS_UNIVERSAL_SWITCH_CANCEL", std::function<void(Action *)>{}));
-       addAction(std::make_unique<Action>("doneAction", "IDS_ACCS_UNIVERSAL_SWITCH_POPUP_ADD", [this](auto action) {
-               Singleton<AppContext>::instance().popModal();
-               Singleton<AppContext>::instance().push(std::make_unique<AddSwitchPagePresenter>());
-       }));
-}
\ No newline at end of file
diff --git a/src/presenter/NoSwitchesModalPresenter.hpp b/src/presenter/NoSwitchesModalPresenter.hpp
deleted file mode 100644 (file)
index 98593f7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef NO_SWITCHES_MODAL_PRESENTER_HPP
-#define NO_SWITCHES_MODAL_PRESENTER_HPP
-
-#include "ModalPresenter.hpp"
-
-class NoSwitchesModalPresenter : public ModalPresenter
-{
-       public:
-       NoSwitchesModalPresenter();
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/NumberOfAutoScanLoopsPresenter.cpp b/src/presenter/NumberOfAutoScanLoopsPresenter.cpp
deleted file mode 100644 (file)
index 45cca34..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "NumberOfAutoScanLoopsPresenter.hpp"
-
-NumberOfAutoScanLoopsPresenter::NumberOfAutoScanLoopsPresenter()
-       : SpinnerPresenter("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_NUM_OF_SCANS")
-{
-       value_ = model_.value_.value();
-       value_.attach([this](auto val) {
-               model_.value_ = val;
-       });
-}
-
-utils::Range<double> NumberOfAutoScanLoopsPresenter::getRange()
-{
-       return model_.range_;
-}
-
-double NumberOfAutoScanLoopsPresenter::getStep()
-{
-       return model_.step_;
-}
-
-std::string NumberOfAutoScanLoopsPresenter::getFormat()
-{
-       return "%d times";
-}
-
-std::string NumberOfAutoScanLoopsPresenter::getLabel()
-{
-       return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_NUM_OF_SCANS";
-}
diff --git a/src/presenter/NumberOfAutoScanLoopsPresenter.hpp b/src/presenter/NumberOfAutoScanLoopsPresenter.hpp
deleted file mode 100644 (file)
index e11923e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef NUMBER_OF_AUTO_SCAN_LOOPS_PRESENTER_HPP_
-#define NUMBER_OF_AUTO_SCAN_LOOPS_PRESENTER_HPP_
-
-#include "NumberOfAutoScanLoopsModel.hpp"
-#include "SpinnerPresenter.hpp"
-
-class NumberOfAutoScanLoopsPresenter : public SpinnerPresenter
-{
-       public:
-       NumberOfAutoScanLoopsPresenter();
-
-       utils::Range<double> getRange();
-       double getStep();
-       std::string getFormat();
-       std::string getLabel();
-
-       private:
-       NumberOfAutoScanLoopsModel model_;
-};
-
-#endif
diff --git a/src/presenter/PauseOnFirstPresenter.cpp b/src/presenter/PauseOnFirstPresenter.cpp
deleted file mode 100644 (file)
index ef31337..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "PauseOnFirstPresenter.hpp"
-
-PauseOnFirstPresenter::PauseOnFirstPresenter()
-       : SpinnerPresenterWithToggle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_PAUSE_ON_FIRST")
-{
-       state_ = model_.state_.value();
-       state_.attach([this](auto state) {
-               model_.state_ = state;
-       });
-
-       value_ = model_.value_.value();
-       value_.attach([this](auto val) {
-               model_.value_ = val;
-       });
-}
-
-utils::Range<double> PauseOnFirstPresenter::getRange()
-{
-       return model_.range_;
-}
-
-double PauseOnFirstPresenter::getStep()
-{
-       return model_.step_;
-}
-
-std::string PauseOnFirstPresenter::getLabel()
-{
-       return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_PAUSE_ON_FIRST";
-}
-
-std::string PauseOnFirstPresenter::getFormat()
-{
-       return "%1.1f seconds";
-}
\ No newline at end of file
diff --git a/src/presenter/PauseOnFirstPresenter.hpp b/src/presenter/PauseOnFirstPresenter.hpp
deleted file mode 100644 (file)
index c988f2f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef PAUSE_ON_FIRST_PRESENTER_HPP_
-#define PAUSE_ON_FIRST_PRESENTER_HPP_
-
-#include "PauseOnFirstModel.hpp"
-#include "SpinnerPresenterWithToggle.hpp"
-
-class PauseOnFirstPresenter : public SpinnerPresenterWithToggle
-{
-       public:
-       PauseOnFirstPresenter();
-
-       utils::Range<double> getRange() override;
-       double getStep() override;
-       std::string getLabel() override;
-       std::string getFormat() override;
-
-       private:
-       PauseOnFirstModel model_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/PointScanSpeedPresenter.cpp b/src/presenter/PointScanSpeedPresenter.cpp
deleted file mode 100644 (file)
index 785a650..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "PointScanSpeedPresenter.hpp"
-
-PointScanSpeedPresenter::PointScanSpeedPresenter()
-       : SpinnerPresenter("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_PT_SPEED")
-{
-       value_ = model_.value_.value();
-       value_.attach([this](auto val) {
-               model_.value_ = val;
-       });
-}
-
-utils::Range<double> PointScanSpeedPresenter::getRange()
-{
-       return model_.range_;
-}
-
-double PointScanSpeedPresenter::getStep()
-{
-       return model_.step_;
-}
-
-std::string PointScanSpeedPresenter::getFormat()
-{
-       return "%d";
-}
-
-std::string PointScanSpeedPresenter::getLabel()
-{
-       return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_SCAN_SPEED";
-}
diff --git a/src/presenter/PointScanSpeedPresenter.hpp b/src/presenter/PointScanSpeedPresenter.hpp
deleted file mode 100644 (file)
index 1e65e2a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef POINT_SCAN_SPEED_PRESENTER_HPP_
-#define POINT_SCAN_SPEED_PRESENTER_HPP_
-
-#include "PointScanSpeedModel.hpp"
-#include "SpinnerPresenter.hpp"
-
-class PointScanSpeedPresenter : public SpinnerPresenter
-{
-       public:
-       PointScanSpeedPresenter();
-
-       utils::Range<double> getRange() override;
-       double getStep() override;
-       std::string getFormat() override;
-       std::string getLabel() override;
-
-       private:
-       PointScanSpeedModel model_;
-};
-
-#endif
diff --git a/src/presenter/RemoveSwitchesModalPresenter.cpp b/src/presenter/RemoveSwitchesModalPresenter.cpp
deleted file mode 100644 (file)
index f972508..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "RemoveSwitchesModalPresenter.hpp"
-
-#include "AppContext.hpp"
-
-RemoveSwitchesModalPresenter::RemoveSwitchesModalPresenter(std::vector<SwitchConfigurationItem> switches, std::vector<std::string> switchesToRemove)
-       : switches_(std::move(switches)), switchesToRemove_(std::move(switchesToRemove))
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES");
-
-       if (switchesToRemove_.size() == switches_.size() && model_.isUniversalSwitchActive_.value()) {
-               text_ = "IDS_ACCS_UNIVERSAL_SWITCH_DELETE_ALL_SWITCHES_DESC";
-       } else {
-               text_ = std::to_string(switchesToRemove_.size()) + " " + TranslatedString{"IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES_DESC"}.str();
-       }
-
-       addAction(std::make_unique<Action>("cancelAction", "IDS_ST_BUTTON_CANCEL", std::function<void(Action *)>{}));
-       addAction(std::make_unique<Action>("doneAction", "IDS_ACCS_DELETE", [this](auto action) {
-               model_.removeSwitches(switchesToRemove_);
-               Singleton<AppContext>::instance().popModal();
-               Singleton<AppContext>::instance().pop();
-       }));
-}
\ No newline at end of file
diff --git a/src/presenter/RemoveSwitchesModalPresenter.hpp b/src/presenter/RemoveSwitchesModalPresenter.hpp
deleted file mode 100644 (file)
index 8bf325c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef REMOVE_SWITCHES_MODAL_PRESENTER_HPP
-#define REMOVE_SWITCHES_MODAL_PRESENTER_HPP
-
-#include "ModalPresenter.hpp"
-#include "RemoveSwitchesModel.hpp"
-#include "UniversalSwitchTypes.hpp"
-
-class RemoveSwitchesModalPresenter : public ModalPresenter
-{
-       public:
-       RemoveSwitchesModalPresenter(std::vector<SwitchConfigurationItem> switches, std::vector<std::string> switchesToRemove);
-
-       private:
-       RemoveSwitchesModel model_;
-       std::vector<SwitchConfigurationItem> switches_;
-       std::vector<std::string> switchesToRemove_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/RemoveSwitchesPagePresenter.cpp b/src/presenter/RemoveSwitchesPagePresenter.cpp
deleted file mode 100644 (file)
index bd3ab35..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "RemoveSwitchesPagePresenter.hpp"
-
-#include "AppContext.hpp"
-#include "RemoveSwitchesModalPresenter.hpp"
-
-RemoveSwitchesPagePresenter::RemoveSwitchesPagePresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES");
-       groups_.emplace_back("");
-
-       deleteAction_ = addAction(std::make_unique<Action>("titleRightAction", "IDS_ACCS_DELETE_CAPS", [this](auto action) {
-               std::vector<std::string> toRemove;
-               for (auto i = 0u; i < groups_[0].items_.size(); ++i) {
-                       if (groups_[0].items_[i]->widgetState_.value())
-                               toRemove.push_back(switches_[i].switchId);
-               }
-
-               Singleton<AppContext>::instance().pushModal(std::make_unique<RemoveSwitchesModalPresenter>(switches_, toRemove));
-       },
-               false));
-
-       selectAllAction_ = addAction(std::make_unique<Action>("selectAll", std::string{}, [this](auto action) {
-               if (!changeAllSelectedItems_) {
-                       changeAllSelectedItems_ = true;
-                       return;
-               }
-
-               for (auto &it : groups_[0].items_) {
-                       it->widgetState_ = action->state_.value();
-               }
-               selectedNo_ = action->state_.value() ? groups_[0].items_.size() : 0;
-
-               if (selectedNo_ == 0)
-                       deleteAction_->enabled_ = false;
-               else
-                       deleteAction_->enabled_ = true;
-       },
-               true));
-
-       addItemsToList();
-       model_.switchesConfigurationChanged_.attach([this](auto timeStamp) {
-               groups_.back().items_.clear();
-               this->addItemsToList();
-               if (this->onListUpdate_)
-                       this->onListUpdate_();
-       });
-}
-
-void RemoveSwitchesPagePresenter::addItemsToList()
-{
-       auto &items = groups_.back().items_;
-       switches_ = model_.getAllSwitchConfigurationItems();
-       for (auto oneSwitch : switches_) {
-               items.push_back(std::make_unique<ListItem>(
-                       oneSwitch.userName,
-                       model_.getActivityName(oneSwitch.activityType),
-                       [this](auto item) {
-                               if (item->widgetState_.value())
-                                       ++selectedNo_;
-                               else
-                                       --selectedNo_;
-
-                               if (selectedNo_ == groups_[0].items_.size() && !selectAllAction_->state_.value()) {
-                                       changeAllSelectedItems_ = false;
-                                       selectAllAction_->state_ = true;
-                               } else if (selectedNo_ < groups_[0].items_.size() && selectAllAction_->state_.value()) {
-                                       changeAllSelectedItems_ = false;
-                                       selectAllAction_->state_ = false;
-                               }
-                               if (selectedNo_ == 0)
-                                       deleteAction_->enabled_ = false;
-                               else
-                                       deleteAction_->enabled_ = true;
-                       },
-                       ListItem::WidgetType::check));
-       }
-}
diff --git a/src/presenter/RemoveSwitchesPagePresenter.hpp b/src/presenter/RemoveSwitchesPagePresenter.hpp
deleted file mode 100644 (file)
index 86290b0..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef REMOVE_SWITCHES_PAGE_PRESENTER_HPP
-#define REMOVE_SWITCHES_PAGE_PRESENTER_HPP
-
-#include "Action.hpp"
-#include "ListPresenter.hpp"
-#include "SwitchesPageModel.hpp"
-
-class RemoveSwitchesPagePresenter : public ListPresenter
-{
-       public:
-       RemoveSwitchesPagePresenter();
-
-       private:
-       SwitchesPageModel model_;
-       void addItemsToList();
-
-       Action *deleteAction_ = nullptr;
-       Action *selectAllAction_ = nullptr;
-       std::vector<SwitchConfigurationItem> switches_;
-       size_t selectedNo_ = 0;
-       bool changeAllSelectedItems_ = true;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/ScanDirectionPresenter.cpp b/src/presenter/ScanDirectionPresenter.cpp
deleted file mode 100644 (file)
index c907517..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ScanDirectionPresenter.hpp"
-
-#include "AppContext.hpp"
-
-ScanDirectionPresenter::ScanDirectionPresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR");
-       groups_.emplace_back("");
-       auto &items = groups_.back().items_;
-       for (auto direction : directions_) {
-               items.push_back(std::make_unique<ListItem>(
-                       scanDirectionToString(direction),
-                       std::string{},
-                       [this, direction](auto item) {
-                               this->model_.direction_ = direction;
-                               Singleton<AppContext>::instance().pop();
-                       },
-                       ListItem::WidgetType::radio,
-                       std::function<void(ListItem * item)>{},
-                       std::function<void(ListItem * item)>{},
-                       direction == model_.direction_.value()));
-       }
-}
-
-std::string ScanDirectionPresenter::scanDirectionToString(ScanDirection scanDirection)
-{
-       switch (scanDirection) {
-       case ScanDirection::TO_BOTTOM:
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR_TB";
-       case ScanDirection::TO_TOP:
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR_BT";
-       default:
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_UNDEFINED";
-       }
-}
\ No newline at end of file
diff --git a/src/presenter/ScanDirectionPresenter.hpp b/src/presenter/ScanDirectionPresenter.hpp
deleted file mode 100644 (file)
index 75d8738..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SCAN_DIRECTION_PRESENTER_HPP
-#define SCAN_DIRECTION_PRESENTER_HPP
-
-#include "ListPresenter.hpp"
-#include "ScanDirectionModel.hpp"
-
-class ScanDirectionPresenter : public ListPresenter
-{
-       public:
-       ScanDirectionPresenter();
-       static std::string scanDirectionToString(ScanDirection scanDirection);
-
-       private:
-       ScanDirectionModel model_;
-       std::vector<ScanDirection> directions_ = {
-               ScanDirection::TO_BOTTOM,
-               ScanDirection::TO_TOP};
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/ScanMethodPresenter.cpp b/src/presenter/ScanMethodPresenter.cpp
deleted file mode 100644 (file)
index b921f0a..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "ScanMethodPresenter.hpp"
-
-#include "AppContext.hpp"
-
-ScanMethodPresenter::ScanMethodPresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD");
-       groups_.emplace_back("");
-       auto &items = groups_.back().items_;
-       for (auto method : methods_) {
-               items.push_back(std::make_unique<ListItem>(
-                       scanMethodToString(method),
-                       std::string{},
-                       [this, method](auto item) {
-                               this->model_.method_ = method;
-                               Singleton<AppContext>::instance().pop();
-                       },
-                       ListItem::WidgetType::radio,
-                       std::function<void(ListItem * item)>{},
-                       std::function<void(ListItem * item)>{},
-                       method == model_.method_.value()));
-       }
-}
-
-std::string ScanMethodPresenter::scanMethodToString(ScanMethod scanMethod)
-{
-       switch (scanMethod) {
-       case ScanMethod::POINT:
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD_POINT";
-       case ScanMethod::ROW:
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD_ROW";
-       default:
-               return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_UNDEFINED";
-       }
-}
\ No newline at end of file
diff --git a/src/presenter/ScanMethodPresenter.hpp b/src/presenter/ScanMethodPresenter.hpp
deleted file mode 100644 (file)
index 47d0d6f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SCAN_METHOD_PRESENTER_HPP
-#define SCAN_METHOD_PRESENTER_HPP
-
-#include "ListPresenter.hpp"
-#include "ScanMethodModel.hpp"
-
-class ScanMethodPresenter : public ListPresenter
-{
-       public:
-       ScanMethodPresenter();
-       static std::string scanMethodToString(ScanMethod scanMethod);
-
-       private:
-       ScanMethodModel model_;
-       std::vector<ScanMethod> methods_ = {
-               ScanMethod::POINT,
-               ScanMethod::ROW};
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/SelectActionPagePresenter.cpp b/src/presenter/SelectActionPagePresenter.cpp
deleted file mode 100644 (file)
index 5eab792..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "SelectActionPagePresenter.hpp"
-
-#include "AppContext.hpp"
-
-SelectActionPagePresenter::SelectActionPagePresenter(std::string switchId, std::string userName, ChangeType changeType, size_t countOfPagesToPop, std::string activityId, bool locally)
-       : switchId_(std::move(switchId)), userName_(std::move(userName)), changeType_(changeType), countOfPagesToPop_(countOfPagesToPop)
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_SELECT_ACTION");
-       groups_.emplace_back("");
-       auto &items = groups_.back().items_;
-
-       for (auto &activity : model_.getBindableActivityTypes()) {
-               items.push_back(std::make_unique<ListItem>(
-                       activity.name,
-                       std::string{},
-                       [=](auto item) {
-                               this->addOrUpdateSwitchConfigurationItem(activity.id, locally);
-                       },
-                       ListItem::WidgetType::radio,
-                       std::function<void(ListItem * item)>{},
-                       std::function<void(ListItem * item)>{},
-                       activityId == activity.id));
-       }
-}
-
-void SelectActionPagePresenter::addOrUpdateSwitchConfigurationItem(const std::string &activityType, bool locally)
-{
-       switch (changeType_) {
-       case ChangeType::ADD:
-               model_.addSwitch({switchId_, userName_, activityType});
-               break;
-       case ChangeType::UPDATE:
-               if (locally)
-                       Singleton<AppContext>::instance().sharedPreferences.insert_or_assign(switchId_, activityType);
-               else
-                       model_.updateSwitch({switchId_, userName_, activityType});
-               break;
-       default:
-               ASSERT(0, "Unhandled change type");
-               break;
-       }
-       Singleton<AppContext>::instance().pop(countOfPagesToPop_ + 1);
-}
\ No newline at end of file
diff --git a/src/presenter/SelectActionPagePresenter.hpp b/src/presenter/SelectActionPagePresenter.hpp
deleted file mode 100644 (file)
index 1fc3429..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SELECT_ACTION_PAGE_PRESENTER_HPP
-#define SELECT_ACTION_PAGE_PRESENTER_HPP
-
-#include "ListPresenter.hpp"
-#include "SelectActionPageModel.hpp"
-#include "UniversalSwitchTypes.hpp"
-
-class SelectActionPagePresenter : public ListPresenter
-{
-       public:
-       SelectActionPagePresenter(std::string switchId, std::string userName, ChangeType changeType, size_t countOfPagesToPop, std::string activityId = {}, bool locally = false);
-
-       private:
-       void addOrUpdateSwitchConfigurationItem(const std::string &activityType, bool locally);
-       const std::string switchId_;
-       const std::string userName_;
-       ChangeType changeType_;
-       const size_t countOfPagesToPop_;
-       SelectActionPageModel model_;
-};
-
-#endif
diff --git a/src/presenter/SingleInteractionIntervalPresenter.cpp b/src/presenter/SingleInteractionIntervalPresenter.cpp
deleted file mode 100644 (file)
index dabce5e..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "SingleInteractionIntervalPresenter.hpp"
-
-SingleInteractionIntervalPresenter::SingleInteractionIntervalPresenter()
-       : SpinnerPresenterWithToggle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_SGL_IACTION_INT")
-{
-       state_ = model_.state_.value();
-       state_.attach([this](auto state) {
-               model_.state_ = state;
-       });
-
-       value_ = model_.value_.value();
-       value_.attach([this](auto val) {
-               model_.value_ = val;
-       });
-}
-
-utils::Range<double> SingleInteractionIntervalPresenter::getRange()
-{
-       return model_.range_;
-}
-double SingleInteractionIntervalPresenter::getStep()
-{
-       return model_.step_;
-}
-
-std::string SingleInteractionIntervalPresenter::getFormat()
-{
-       return "%1.1f seconds";
-}
-
-std::string SingleInteractionIntervalPresenter::getLabel()
-{
-       return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_SGL_IACTION_INT";
-}
\ No newline at end of file
diff --git a/src/presenter/SingleInteractionIntervalPresenter.hpp b/src/presenter/SingleInteractionIntervalPresenter.hpp
deleted file mode 100644 (file)
index e4a93ab..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SINGLE_INTERACTION_INTERVAL_PRESENTER_HPP_
-#define SINGLE_INTERACTION_INTERVAL_PRESENTER_HPP_
-
-#include "SingleInteractionIntervalModel.hpp"
-#include "SpinnerPresenterWithToggle.hpp"
-
-class SingleInteractionIntervalPresenter : public SpinnerPresenterWithToggle
-{
-       public:
-       SingleInteractionIntervalPresenter();
-
-       utils::Range<double> getRange() override;
-       double getStep() override;
-       std::string getLabel() override;
-       std::string getFormat() override;
-
-       private:
-       SingleInteractionIntervalModel model_;
-};
-#endif
\ No newline at end of file
diff --git a/src/presenter/SoundPresenter.cpp b/src/presenter/SoundPresenter.cpp
deleted file mode 100644 (file)
index 5f62328..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "SoundPresenter.hpp"
-
-SoundPresenter::SoundPresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND");
-
-       groups_.emplace_back("");
-       auto &items = groups_.back().items_;
-
-       items.push_back(std::make_unique<ListItem>(
-               model_.state_.value() ? "IDS_ST_BODY_ON" : "IDS_ST_BODY_OFF",
-               std::string{},
-               [this](auto item) {
-                       this->model_.state_ = item->widgetState_.value();
-               },
-               ListItem::WidgetType::toggle,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.state_.value()));
-       model_.state_.attach([this](auto val) {
-               groups_[0].items_[0]->title_ = val ? "IDS_ST_BODY_ON" : "IDS_ST_BODY_OFF";
-       });
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{},
-               "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_FEEDBACK_SOUND"));
-
-       groups_.emplace_back("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND_VOLUME");
-       auto &radioItems = groups_.back().items_;
-
-       radioItems.push_back(std::make_unique<ListItem>(
-               "Match media volume",
-               std::string{},
-               [this](auto item) {
-                       this->model_.value_ = 1.0;
-                       this->updateRadioItems();
-               },
-               ListItem::WidgetType::radio,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.value_.value() == 1.0));
-
-       radioItems.push_back(std::make_unique<ListItem>(
-               "75% of media volume",
-               std::string{},
-               [this](auto item) {
-                       this->model_.value_ = 0.75;
-                       this->updateRadioItems();
-               },
-               ListItem::WidgetType::radio,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.value_.value() == 0.75));
-
-       radioItems.push_back(std::make_unique<ListItem>(
-               "50% of media volume",
-               std::string{},
-               [this](auto item) {
-                       this->model_.value_ = 0.50;
-                       this->updateRadioItems();
-               },
-               ListItem::WidgetType::radio,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.value_.value() == 0.50));
-
-       radioItems.push_back(std::make_unique<ListItem>(
-               "25% of media volume",
-               std::string{},
-               [this](auto item) {
-                       this->model_.value_ = 0.25;
-                       this->updateRadioItems();
-               },
-               ListItem::WidgetType::radio,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.value_.value() == 0.25));
-}
-
-void SoundPresenter::updateRadioItems()
-{
-       for (auto i = 1; i <= 4; ++i) {
-               auto idx = 4 - i;
-               groups_[1].items_[idx]->widgetState_ = model_.value_.value() == 0.25 * i;
-       }
-}
\ No newline at end of file
diff --git a/src/presenter/SoundPresenter.hpp b/src/presenter/SoundPresenter.hpp
deleted file mode 100644 (file)
index dda93e9..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SOUND_PRESENTER_HPP
-#define SOUND_PRESENTER_HPP
-
-#include "ListPresenter.hpp"
-#include "SoundModel.hpp"
-
-class SoundPresenter : public ListPresenter
-{
-       public:
-       SoundPresenter();
-
-       private:
-       void updateRadioItems();
-
-       SoundModel model_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/SwitchesPagePresenter.cpp b/src/presenter/SwitchesPagePresenter.cpp
deleted file mode 100644 (file)
index 60b38fd..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "SwitchesPagePresenter.hpp"
-
-#include "AddSwitchPagePresenter.hpp"
-#include "AppContext.hpp"
-#include "RemoveSwitchesPagePresenter.hpp"
-#include "SelectActionPagePresenter.hpp"
-#include "UniversalSwitchConstants.hpp"
-#include "UpdateAccessoriesSwitchPagePresenter.hpp"
-
-SwitchesPagePresenter::SwitchesPagePresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES");
-       groups_.emplace_back("");
-
-       deleteSwitchesAction_ = addAction(std::make_unique<Action>("titleRightAction", "IDS_ACCS_DELETE_CAPS", [this](auto action) {
-               Singleton<AppContext>::instance().push(std::make_unique<RemoveSwitchesPagePresenter>());
-       },
-               true));
-       updateSwitchDeleteAction();
-       addItemsToList();
-       model_.switchesConfigurationChanged_.attach([this](auto timeStamp) {
-               this->updateSwitchDeleteAction();
-               groups_.back().items_.clear();
-               this->addItemsToList();
-               if (this->onListUpdate_)
-                       this->onListUpdate_();
-       });
-}
-
-void SwitchesPagePresenter::addItemsToList()
-{
-       auto &items = groups_.back().items_;
-       auto switches = model_.getAllSwitchConfigurationItems();
-       for (auto &oneSwitch : switches) {
-               items.push_back(std::make_unique<ListItem>(
-                       oneSwitch.userName,
-                       model_.getActivityName(oneSwitch.activityType),
-                       [this, oneSwitch](auto item) {
-                               this->createUpdatePage(oneSwitch);
-                       }));
-       }
-       items.push_back(std::make_unique<ListItem>(
-               "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES_ADD_SWITCH",
-               std::string{},
-               [this](auto item) {
-                       Singleton<AppContext>::instance().push(std::make_unique<AddSwitchPagePresenter>());
-               },
-               ListItem::WidgetType::icon,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               true,
-               ACCESSIBILITY_UNIVERSAL_SWITCH_PLUS_ICON));
-}
-
-void SwitchesPagePresenter::createUpdatePage(const SwitchConfigurationItem &item)
-{
-       auto tokens = utils::stringSplitByDelimiter(item.switchId, '_');
-       if (!tokens.empty()) {
-               if (tokens[0] == ACCESSIBILITY_UNIVERSAL_SWITCH_SCREEN_SWITCH_PROVIDER) {
-                       Singleton<AppContext>::instance().push(std::make_unique<SelectActionPagePresenter>(item.switchId, item.userName, ChangeType::UPDATE, 0, item.activityType));
-                       return;
-               }
-               if (tokens[0] == ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER) {
-                       Singleton<AppContext>::instance().push(std::make_unique<UpdateAccessoriesSwitchPagePresenter>(item.switchId));
-                       return;
-               }
-               if (tokens[0] == ACCESSIBILITY_UNIVERSAL_SWITCH_CAMERA_SWITCH_PROVIDER) {
-                       Singleton<AppContext>::instance().push(std::make_unique<SelectActionPagePresenter>(item.switchId, item.userName, ChangeType::UPDATE, 0, item.activityType));
-                       return;
-               }
-       }
-}
-
-void SwitchesPagePresenter::updateSwitchDeleteAction()
-{
-       if (model_.getAllSwitchConfigurationItems().size() == 0)
-               deleteSwitchesAction_->enabled_ = false;
-       else
-               deleteSwitchesAction_->enabled_ = true;
-}
\ No newline at end of file
diff --git a/src/presenter/SwitchesPagePresenter.hpp b/src/presenter/SwitchesPagePresenter.hpp
deleted file mode 100644 (file)
index d67654e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef SWITCHES_PAGE_PRESENTER_HPP
-#define SWITCHES_PAGE_PRESENTER_HPP
-
-#include "ListPresenter.hpp"
-#include "SwitchesPageModel.hpp"
-
-class SwitchesPagePresenter : public ListPresenter
-{
-       public:
-       SwitchesPagePresenter();
-
-       private:
-       void addItemsToList();
-       void createUpdatePage(const SwitchConfigurationItem &item);
-       void updateSwitchDeleteAction();
-       SwitchesPageModel model_;
-       Action *deleteSwitchesAction_ = nullptr;
-};
-
-#endif
diff --git a/src/presenter/TapDurationPresenter.cpp b/src/presenter/TapDurationPresenter.cpp
deleted file mode 100644 (file)
index f0a36a4..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "TapDurationPresenter.hpp"
-
-TapDurationPresenter::TapDurationPresenter()
-       : SpinnerPresenterWithToggle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_TAP_DURATION")
-{
-       state_ = model_.state_.value();
-       state_.attach([this](auto state) {
-               model_.state_ = state;
-       });
-
-       value_ = model_.value_.value();
-       value_.attach([this](auto val) {
-               model_.value_ = val;
-       });
-}
-
-utils::Range<double> TapDurationPresenter::getRange()
-{
-       return model_.range_;
-}
-
-double TapDurationPresenter::getStep()
-{
-       return model_.step_;
-}
-
-std::string TapDurationPresenter::getFormat()
-{
-       return "%1.1f seconds";
-}
-
-std::string TapDurationPresenter::getLabel()
-{
-       return "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_TAP_DURATION";
-}
\ No newline at end of file
diff --git a/src/presenter/TapDurationPresenter.hpp b/src/presenter/TapDurationPresenter.hpp
deleted file mode 100644 (file)
index f2fdd72..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef TAP_DURATION_PRESENTER_HPP_
-#define TAP_DURATION_PRESENTER_HPP_
-
-#include "SpinnerPresenterWithToggle.hpp"
-#include "TapDurationModel.hpp"
-
-class TapDurationPresenter : public SpinnerPresenterWithToggle
-{
-       public:
-       TapDurationPresenter();
-
-       utils::Range<double> getRange() override;
-       double getStep() override;
-       std::string getLabel() override;
-       std::string getFormat() override;
-
-       private:
-       TapDurationModel model_;
-};
-#endif
\ No newline at end of file
diff --git a/src/presenter/UniversalSwitchPagePresenter.cpp b/src/presenter/UniversalSwitchPagePresenter.cpp
deleted file mode 100644 (file)
index 1b6cfb2..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "UniversalSwitchPagePresenter.hpp"
-
-#include "AppContext.hpp"
-#include "NoSwitchesModalPresenter.hpp"
-#include "UniversalSwitchSettingsPagePresenter.hpp"
-
-UniversalSwitchPagePresenter::UniversalSwitchPagePresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH");
-       groups_.emplace_back("");
-       auto &items = groups_.back().items_;
-       items.push_back(std::make_unique<ListItem>(
-               model_.sentinel_->interactionServiceState_.value() ? "IDS_ST_BODY_ON" : "IDS_ST_BODY_OFF",
-               std::string{},
-               [this](auto item) {
-                       if (!item->widgetState_.value())
-                               model_.sentinel_->setInteractionServiceState(false);
-                       else if (model_.atLeastOneSwitchConfigured())
-                               model_.sentinel_->setInteractionServiceState(true);
-                       else {
-                               item->widgetState_ = false;
-                               DEBUG("No switch configured");
-                               Singleton<AppContext>::instance().pushModal(std::make_unique<NoSwitchesModalPresenter>());
-                       }
-               },
-               ListItem::WidgetType::toggle,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.sentinel_->interactionServiceState_.value()));
-       items.back()->enabled_ = model_.sentinel_->configurationServiceState_.value();
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{},
-               "IDS_ACCS_UNIVERSAL_SWITCH_COMMENT"));
-       items.back()->enabled_ = false;
-
-       addAction(std::make_unique<Action>("titleRightAction", "IDS_ACCS_SETTINGS_CAPS", [this](auto action) {
-               Singleton<AppContext>::instance().push(std::make_unique<UniversalSwitchSettingsPagePresenter>());
-       },
-               model_.sentinel_->configurationServiceState_.value()));
-
-       model_.sentinel_->configurationServiceState_.attach([this, &items](auto value) {
-               this->getAction("titleRightAction")->enabled_ = value;
-               items.front()->enabled_ = value;
-       });
-
-       model_.sentinel_->interactionServiceState_.attach([this, &items](auto value) {
-               items.front()->title_ = value ? "IDS_ST_BODY_ON" : "IDS_ST_BODY_OFF";
-               items.front()->widgetState_ = value;
-       });
-}
diff --git a/src/presenter/UniversalSwitchPagePresenter.hpp b/src/presenter/UniversalSwitchPagePresenter.hpp
deleted file mode 100644 (file)
index e2f046d..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef UNIVERSAL_SWITCH_PAGE_PRESENTER_HPP
-#define UNIVERSAL_SWITCH_PAGE_PRESENTER_HPP
-
-#include "ListPresenter.hpp"
-#include "UniversalSwitchPageModel.hpp"
-
-class UniversalSwitchPagePresenter : public ListPresenter
-{
-       public:
-       UniversalSwitchPagePresenter();
-
-       private:
-       UniversalSwitchPageModel model_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/UniversalSwitchSettingsPagePresenter.cpp b/src/presenter/UniversalSwitchSettingsPagePresenter.cpp
deleted file mode 100644 (file)
index 6a2d374..0000000
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "UniversalSwitchSettingsPagePresenter.hpp"
-
-#include "AppContext.hpp"
-#include "AutoMoveIntervalPresenter.hpp"
-#include "AutoScanIntervalPresenter.hpp"
-#include "AutoTapPresenter.hpp"
-#include "CursorColorPagePresenter.hpp"
-#include "ManageMenuOptionsPagePresenter.hpp"
-#include "NumberOfAutoScanLoopsPresenter.hpp"
-#include "PauseOnFirstPresenter.hpp"
-#include "PointScanSpeedPresenter.hpp"
-#include "ScanDirectionPresenter.hpp"
-#include "ScanMethodPresenter.hpp"
-#include "SingleInteractionIntervalPresenter.hpp"
-#include "SoundPresenter.hpp"
-#include "SwitchesPagePresenter.hpp"
-#include "TapDurationPresenter.hpp"
-#include "UniversalSwitchTypes.hpp"
-#include "VoicePresenter.hpp"
-
-UniversalSwitchSettingsPagePresenter::UniversalSwitchSettingsPagePresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS");
-       createSwitchesGroup();
-       createScanningGropu();
-       createAdditionalSettingsGroup();
-       createFeedbackGroup();
-}
-
-void UniversalSwitchSettingsPagePresenter::createSwitchesGroup()
-{
-       groups_.emplace_back("");
-       groups_.back().items_.push_back(std::make_unique<ListItem>(std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES"},
-               TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SWITCHES", model_.configuredSwitchesCount_.value()).str(),
-               [this](auto item) {
-                       Singleton<AppContext>::instance().push(std::make_unique<SwitchesPagePresenter>());
-                       DEBUG("Switches page");
-               }));
-       auto item = groups_.back().items_.back().get();
-       model_.configuredSwitchesCount_.attach([item](auto value) {
-               item->description_ = TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SWITCHES", value).str();
-       });
-       model_.sentinel_->configurationServiceState_.attach([this, item](auto value) {
-               item->enabled_ = value;
-               item->description_ = TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SWITCHES", model_.configuredSwitchesCount_.value()).str();
-       });
-       item->enabled_ = model_.sentinel_->configurationServiceState_.value();
-}
-
-void UniversalSwitchSettingsPagePresenter::createScanningGropu()
-{
-       groups_.emplace_back("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING");
-
-       auto &items = groups_.back().items_;
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_AUTO_SCAN"},
-               std::string{},
-               [this](auto item) {
-                       DEBUG("Auto scan");
-               },
-               ListItem::WidgetType::toggle,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               autoScanModel_.enabled_.value()));
-       auto item = items.back().get();
-       autoScanModel_.enabled_.attach([item](auto value) {
-               item->widgetState_ = value;
-       });
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_AUTO_SCAN_INT"},
-               TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", autoScanModel_.interval_.value()).str(),
-               [this](auto item) {
-                       DEBUG("Auto scan interval");
-                       Singleton<AppContext>::instance().push(std::make_unique<AutoScanIntervalPresenter>());
-               }));
-       item = items.back().get();
-       autoScanModel_.interval_.attach([item](auto value) {
-               item->description_ = TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", value).str();
-       });
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_NUM_OF_SCANS"},
-               std::to_string(autoScanLoopsModel_.value_.value()),
-               [this](auto item) {
-                       DEBUG("Scan num");
-                       Singleton<AppContext>::instance().push(std::make_unique<NumberOfAutoScanLoopsPresenter>());
-               }));
-       item = items.back().get();
-       autoScanLoopsModel_.value_.attach([item](auto value) {
-               item->description_ = std::to_string(value);
-       });
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD"},
-               ScanMethodPresenter::scanMethodToString(scanMethodModel_.method_.value()),
-               [this](auto item) {
-                       DEBUG("Scan method");
-                       Singleton<AppContext>::instance().push(std::make_unique<ScanMethodPresenter>());
-               }));
-       item = items.back().get();
-       scanMethodModel_.method_.attach([item, this](auto value) {
-               item->description_ = ScanMethodPresenter::scanMethodToString(value);
-       });
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR"},
-               ScanDirectionPresenter::scanDirectionToString(scanDirectionModel_.direction_.value()),
-               [this](auto item) {
-                       DEBUG("Scan dir");
-                       Singleton<AppContext>::instance().push(std::make_unique<ScanDirectionPresenter>());
-               }));
-       item = items.back().get();
-       scanDirectionModel_.direction_.attach([item, this](auto value) {
-               item->description_ = ScanDirectionPresenter::scanDirectionToString(value);
-       });
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_PT_SPEED"},
-               std::to_string(pointScanSpeedModel_.value_.value()),
-               [this](auto item) {
-                       DEBUG("Scan point speed");
-                       Singleton<AppContext>::instance().push(std::make_unique<PointScanSpeedPresenter>());
-               }));
-       item = items.back().get();
-       pointScanSpeedModel_.value_.attach([item](auto value) {
-               item->description_ = std::to_string(value);
-       });
-}
-
-void UniversalSwitchSettingsPagePresenter::createAdditionalSettingsGroup()
-{
-       groups_.emplace_back("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS");
-       auto &items = groups_.back().items_;
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_PAUSE_ON_FIRST"},
-               pauseOnFirstModel_.state_.value() ? TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", pauseOnFirstModel_.value_.value()).str()
-                                                                                 : std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"},
-               [this](auto item) {
-                       DEBUG("Pause on first");
-                       Singleton<AppContext>::instance().push(std::make_unique<PauseOnFirstPresenter>());
-               },
-               ListItem::WidgetType::toggle,
-               [this](auto item) {
-                       pauseOnFirstModel_.state_ = item->widgetState_.value();
-               },
-               std::function<void(ListItem * item)>{},
-               pauseOnFirstModel_.state_.value()));
-       auto item = items.back().get();
-       auto pauseOnFirstCb = [this, item](auto value) {
-               item->widgetState_ = pauseOnFirstModel_.state_.value();
-               if (pauseOnFirstModel_.state_.value())
-                       item->description_ = TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", pauseOnFirstModel_.value_.value()).str();
-               else
-                       item->description_ = "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF";
-       };
-       pauseOnFirstModel_.state_.attach(pauseOnFirstCb);
-       pauseOnFirstModel_.value_.attach(pauseOnFirstCb);
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_TAP_DURATION"},
-               tapDurationModel_.state_.value() ? TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", tapDurationModel_.value_.value()).str()
-                                                                                : std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"},
-               [this](auto item) {
-                       DEBUG("tap duration widget");
-                       Singleton<AppContext>::instance().push(std::make_unique<TapDurationPresenter>());
-               },
-               ListItem::WidgetType::toggle,
-               [this](auto item) {
-                       DEBUG("tap duration");
-                       tapDurationModel_.state_ = item->widgetState_.value();
-               },
-               std::function<void(ListItem * item)>{},
-               tapDurationModel_.state_.value()));
-       item = items.back().get();
-       auto tapDurationCb = [this, item](auto value) {
-               item->widgetState_ = tapDurationModel_.state_.value();
-               if (tapDurationModel_.state_.value())
-                       item->description_ = TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", tapDurationModel_.value_.value()).str();
-               else
-                       item->description_ = "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF";
-       };
-       tapDurationModel_.state_.attach(tapDurationCb);
-       tapDurationModel_.value_.attach(tapDurationCb);
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_SGL_IACTION_INT"},
-               singleInteractionIntervalModel_.state_.value() ? TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", singleInteractionIntervalModel_.value_.value()).str()
-                                                                                                          : std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"},
-               [this](auto item) {
-                       DEBUG("single interaction interval widget");
-                       Singleton<AppContext>::instance().push(std::make_unique<SingleInteractionIntervalPresenter>());
-               },
-               ListItem::WidgetType::toggle,
-               [this](auto item) {
-                       singleInteractionIntervalModel_.state_ = item->widgetState_.value();
-               },
-               std::function<void(ListItem * item)>{},
-               singleInteractionIntervalModel_.state_.value()));
-       item = items.back().get();
-       auto snglIntCb = [this, item](auto value) {
-               item->widgetState_ = singleInteractionIntervalModel_.state_.value();
-               if (singleInteractionIntervalModel_.state_.value())
-                       item->description_ = TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", singleInteractionIntervalModel_.value_.value()).str();
-               else
-                       item->description_ = "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF";
-       };
-       singleInteractionIntervalModel_.state_.attach(snglIntCb);
-       singleInteractionIntervalModel_.value_.attach(snglIntCb);
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP"},
-               autoTapModel_.state_.value() ? TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", autoTapModel_.value_.value()).str()
-                                                                        : std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"},
-               [this](auto item) {
-                       DEBUG("auto tap widget");
-                       Singleton<AppContext>::instance().push(std::make_unique<AutoTapPresenter>());
-               },
-               ListItem::WidgetType::toggle,
-               [this](auto item) {
-                       autoTapModel_.state_ = item->widgetState_.value();
-                       DEBUG("auto tap");
-               },
-               std::function<void(ListItem * item)>{},
-               autoTapModel_.state_.value()));
-       item = items.back().get();
-       auto autoTapCb = [this, item](auto value) {
-               item->widgetState_ = autoTapModel_.state_.value();
-               if (autoTapModel_.state_.value())
-                       item->description_ = TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", autoTapModel_.value_.value()).str();
-               else
-                       item->description_ = "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF";
-       };
-       autoTapModel_.state_.attach(autoTapCb);
-       autoTapModel_.value_.attach(autoTapCb);
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_MOVE_INT"},
-               autoMoveIntervalModel_.state_.value() ? TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", autoMoveIntervalModel_.value_.value()).str()
-                                                                                         : std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"},
-               [this](auto item) {
-                       DEBUG("auto move widget");
-                       Singleton<AppContext>::instance().push(std::make_unique<AutoMoveIntervalPresenter>());
-               },
-               ListItem::WidgetType::toggle,
-               [this](auto item) {
-                       autoMoveIntervalModel_.state_ = item->widgetState_.value();
-                       DEBUG("auto move");
-               },
-               std::function<void(ListItem * item)>{},
-               autoMoveIntervalModel_.state_.value()));
-       item = items.back().get();
-       auto autoMoveCb = [this, item](auto value) {
-               item->widgetState_ = autoMoveIntervalModel_.state_.value();
-               if (autoMoveIntervalModel_.state_.value())
-                       item->description_ = TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", autoMoveIntervalModel_.value_.value()).str();
-               else
-                       item->description_ = "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF";
-       };
-       autoMoveIntervalModel_.state_.attach(autoMoveCb);
-       autoMoveIntervalModel_.value_.attach(autoMoveCb);
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP_KBD"},
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP_KBD_SUB"},
-               [this](auto item) {
-                       model_.autoTapKeyboardState_ = item->widgetState_.value();
-               },
-               ListItem::WidgetType::toggle,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.autoTapKeyboardState_.value()));
-       item = items.back().get();
-       model_.autoTapKeyboardState_.attach([item, this](auto value) {
-               item->widgetState_ = value;
-       });
-}
-
-void UniversalSwitchSettingsPagePresenter::createFeedbackGroup()
-{
-       groups_.emplace_back("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK");
-       auto &items = groups_.back().items_;
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_CURSOR_CL"},
-               cursorColorModel_.getColorText(cursorColorModel_.cursorColor_.value()),
-               [this](auto item) {
-                       Singleton<AppContext>::instance().push(std::make_unique<CursorColorPagePresenter>());
-               }));
-       auto item = items.back().get();
-       cursorColorModel_.cursorColor_.attach([item, this](auto value) {
-               item->description_ = this->cursorColorModel_.getColorText(value);
-       });
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND"},
-               soundModel_.state_.value() ? utils::doubleToPercent(soundModel_.value_.value()) + " of media volume" : std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"},
-               [this](auto item) {
-                       DEBUG("feedback sound widget");
-                       Singleton<AppContext>::instance().push(std::make_unique<SoundPresenter>());
-               },
-               ListItem::WidgetType::toggle,
-               [this](auto item) {
-                       DEBUG("feedback sound");
-                       soundModel_.state_ = item->widgetState_.value();
-               },
-               std::function<void(ListItem * item)>{},
-               soundModel_.state_.value()));
-       item = items.back().get();
-       soundModel_.state_.attach([item, this](auto value) {
-               item->widgetState_ = value;
-               item->description_ = value ? utils::doubleToPercent(soundModel_.value_.value()) + " of media volume" : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF";
-       });
-       soundModel_.value_.attach([item, this](auto value) {
-               item->description_ = soundModel_.state_.value() ? utils::doubleToPercent(soundModel_.value_.value()) + " of media volume" : "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF";
-       });
-
-       auto speechRate = "Speech rate: " + utils::doubleToString(voiceModel_.rate_.value(), 1);
-       auto mediaVolume = "Speech volume: " + utils::doubleToPercent(voiceModel_.volume_.value()) + " of media volume";
-       auto desc = voiceModel_.state_.value() ? speechRate + "<br>" + mediaVolume : std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"};
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE"},
-               desc,
-               [this](auto item) {
-                       DEBUG("feedback sound widget");
-                       Singleton<AppContext>::instance().push(std::make_unique<VoicePresenter>());
-               },
-               ListItem::WidgetType::toggle,
-               [this](auto item) {
-                       DEBUG("auto move");
-                       voiceModel_.state_ = item->widgetState_.value();
-               },
-               std::function<void(ListItem * item)>{},
-               voiceModel_.state_.value()));
-       item = items.back().get();
-       voiceModel_.state_.attach([item, this](auto value) {
-               item->widgetState_ = value;
-               auto speechRate = "Speech rate: " + utils::doubleToPercent(voiceModel_.rate_.value());
-               auto mediaVolume = "Speech volume: " + utils::doubleToPercent(voiceModel_.volume_.value()) + " of media volume";
-               auto desc = voiceModel_.state_.value() ? speechRate + "<br>" + mediaVolume : std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"};
-               item->description_ = desc;
-       });
-       voiceModel_.rate_.attach([item, this](auto value) {
-               auto speechRate = "Speech rate: " + utils::doubleToPercent(voiceModel_.rate_.value());
-               auto mediaVolume = "Speech volume: " + utils::doubleToPercent(voiceModel_.volume_.value()) + " of media volume";
-               auto desc = voiceModel_.state_.value() ? speechRate + "<br>" + mediaVolume : std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"};
-               item->description_ = desc;
-       });
-       voiceModel_.volume_.attach([item, this](auto value) {
-               auto speechRate = "Speech rate: " + utils::doubleToPercent(voiceModel_.rate_.value());
-               auto mediaVolume = "Speech volume: " + utils::doubleToPercent(voiceModel_.volume_.value()) + " of media volume";
-               auto desc = voiceModel_.state_.value() ? speechRate + "<br>" + mediaVolume : std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"};
-               item->description_ = desc;
-       });
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE"},
-               std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_SUB"},
-               [this](auto item) {
-                       Singleton<AppContext>::instance().push(std::make_unique<ManageMenuOptionsPagePresenter>());
-               }));
-}
diff --git a/src/presenter/UniversalSwitchSettingsPagePresenter.hpp b/src/presenter/UniversalSwitchSettingsPagePresenter.hpp
deleted file mode 100644 (file)
index 8cd9917..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef UNIVERSAL_SWITCH_SETTINGS_PAGE_PRESENTER_HPP
-#define UNIVERSAL_SWITCH_SETTINGS_PAGE_PRESENTER_HPP
-
-#include "AutoMoveIntervalModel.hpp"
-#include "AutoScanModel.hpp"
-#include "AutoTapModel.hpp"
-#include "CursorColorModel.hpp"
-#include "ListPresenter.hpp"
-#include "NumberOfAutoScanLoopsModel.hpp"
-#include "PauseOnFirstModel.hpp"
-#include "PointScanSpeedModel.hpp"
-#include "ScanDirectionModel.hpp"
-#include "ScanMethodModel.hpp"
-#include "SingleInteractionIntervalModel.hpp"
-#include "SoundModel.hpp"
-#include "TapDurationModel.hpp"
-#include "UniversalSwitchSettingsPageModel.hpp"
-#include "UniversalSwitchTypes.hpp"
-#include "VoiceModel.hpp"
-
-class UniversalSwitchSettingsPagePresenter : public ListPresenter
-{
-       public:
-       UniversalSwitchSettingsPagePresenter();
-
-       private:
-       void createSwitchesGroup();
-       void createScanningGropu();
-       void createAdditionalSettingsGroup();
-       void createFeedbackGroup();
-
-       UniversalSwitchSettingsPageModel model_;
-       AutoScanModel autoScanModel_;
-       NumberOfAutoScanLoopsModel autoScanLoopsModel_;
-       PointScanSpeedModel pointScanSpeedModel_;
-       PauseOnFirstModel pauseOnFirstModel_;
-       TapDurationModel tapDurationModel_;
-       SingleInteractionIntervalModel singleInteractionIntervalModel_;
-       AutoTapModel autoTapModel_;
-       AutoMoveIntervalModel autoMoveIntervalModel_;
-       SoundModel soundModel_;
-       VoiceModel voiceModel_;
-       CursorColorModel cursorColorModel_;
-       ScanMethodModel scanMethodModel_;
-       ScanDirectionModel scanDirectionModel_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/UpdateAccessoriesSwitchPagePresenter.cpp b/src/presenter/UpdateAccessoriesSwitchPagePresenter.cpp
deleted file mode 100644 (file)
index 6492e59..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "UpdateAccessoriesSwitchPagePresenter.hpp"
-
-#include "AppContext.hpp"
-#include "SelectActionPagePresenter.hpp"
-
-UpdateAccessoriesSwitchPagePresenter::UpdateAccessoriesSwitchPagePresenter(std::string switchId) : switchId_(std::move(switchId))
-{
-       cancelAction_ = addAction(std::make_unique<Action>("cancelAction",
-               "IDS_ACCS_UNIVERSAL_SWITCH_CANCEL",
-               [this](auto action) {
-                       Singleton<AppContext>::instance().pop();
-               }));
-       saveAction_ = addAction(std::make_unique<Action>("saveAction",
-               "IDS_ACCS_UNIVERSAL_SWITCH_SAVE",
-               [this](auto action) {
-                       model_.updateSwitch(SwitchConfigurationItem{switchId_, entryItem_->entryText_.value(), activityId_});
-                       Singleton<AppContext>::instance().pop();
-               }));
-       groups_.emplace_back("");
-       auto &items = groups_.back().items_;
-
-       items.push_back(std::make_unique<ListItem>(
-               "IDS_ACCS_UNIVERSAL_SWITCH_NAME",
-               std::string{},
-               std::function<void(ListItem *)>{},
-               ListItem::WidgetType::entry,
-               std::function<void(ListItem *)>{},
-               [this](auto item) {
-                       if (item->entryText_.value().empty())
-                               saveAction_->enabled_ = false;
-                       else
-                               saveAction_->enabled_ = true;
-               }));
-
-       entryItem_ = items.back().get();
-       auto switchInfo = model_.getDetailsForSwitchConfigurationItem(switchId_);
-       entryItem_->entryText_ = switchInfo.userName;
-       activityId_ = switchInfo.activityType;
-
-       items.push_back(std::make_unique<ListItem>(
-               "IDS_ACCS_UNIVERSAL_SWITCH_ACTION",
-               model_.getActivityDetails(switchInfo.activityType).name,
-               [this](auto item) {
-                       Singleton<AppContext>::instance().push(std::make_unique<SelectActionPagePresenter>(switchId_, entryItem_->entryText_.value(), ChangeType::UPDATE, 0, activityId_, true));
-               },
-               ListItem::WidgetType::none,
-               std::function<void(ListItem *)>{},
-               std::function<void(ListItem *)>{},
-               false));
-       actionItem_ = items.back().get();
-}
-
-void UpdateAccessoriesSwitchPagePresenter::onTop()
-{
-       auto &sharedPreferences = Singleton<AppContext>::instance().sharedPreferences;
-       auto val = sharedPreferences.find(switchId_);
-       if (val != sharedPreferences.end()) {
-               activityId_ = val->second;
-               actionItem_->description_ = model_.getActivityDetails(activityId_).name;
-       }
-}
-
-UpdateAccessoriesSwitchPagePresenter::~UpdateAccessoriesSwitchPagePresenter()
-{
-       Singleton<AppContext>::instance().sharedPreferences.erase(switchId_);
-}
\ No newline at end of file
diff --git a/src/presenter/UpdateAccessoriesSwitchPagePresenter.hpp b/src/presenter/UpdateAccessoriesSwitchPagePresenter.hpp
deleted file mode 100644 (file)
index 453c638..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef UPDATE_ACCESSORIES_SWITCH_PAGE_PRESENTER
-#define UPDATE_ACCESSORIES_SWITCH_PAGE_PRESENTER
-
-#include "ListPresenter.hpp"
-#include "UpdateAccessoriesSwitchPageModel.hpp"
-
-class UpdateAccessoriesSwitchPagePresenter : public ListPresenter
-{
-       public:
-       UpdateAccessoriesSwitchPagePresenter(std::string switchId);
-       ~UpdateAccessoriesSwitchPagePresenter();
-
-       private:
-       void onTop() override;
-       std::string switchId_;
-       std::string activityId_;
-       Action *saveAction_ = nullptr;
-       Action *cancelAction_ = nullptr;
-       ListItem *entryItem_ = nullptr;
-       ListItem *actionItem_ = nullptr;
-       UpdateAccessoriesSwitchPageModel model_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/presenter/VoicePresenter.cpp b/src/presenter/VoicePresenter.cpp
deleted file mode 100644 (file)
index fa01b84..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "VoicePresenter.hpp"
-
-VoicePresenter::VoicePresenter()
-{
-       setTitle("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE");
-
-       groups_.emplace_back("");
-       auto &items = groups_.back().items_;
-
-       items.push_back(std::make_unique<ListItem>(
-               model_.state_.value() ? "IDS_ST_BODY_ON" : "IDS_ST_BODY_OFF",
-               std::string{},
-               [this](auto item) {
-                       this->model_.state_ = item->widgetState_.value();
-               },
-               ListItem::WidgetType::toggle,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.state_.value()));
-       model_.state_.attach([this](auto val) {
-               groups_[0].items_[0]->title_ = val ? "IDS_ST_BODY_ON" : "IDS_ST_BODY_OFF";
-       });
-
-       items.push_back(std::make_unique<ListItem>(
-               std::string{},
-               "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_FEEDBACK_VOICE"));
-
-       groups_.emplace_back("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE_SPEECH_RATE");
-       auto speechRateItem = std::make_unique<ListItem>(
-               std::string{},
-               std::string{},
-               std::function<void(ListItem * item)>{},
-               ListItem::WidgetType::slider,
-               std::function<void(ListItem * item)>{},
-               [this](auto item) {
-                       this->model_.rate_ = item->value_;
-               });
-       speechRateItem->value_ = model_.rate_.value();
-       speechRateItem->range_ = {model_.range_.begin, model_.range_.end};
-       speechRateItem->step_ = model_.step_;
-
-       groups_.back().items_.push_back(std::move(speechRateItem));
-
-       groups_.emplace_back("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE_SPEECH_VOLUME");
-       auto &radioItems = groups_.back().items_;
-
-       radioItems.push_back(std::make_unique<ListItem>(
-               "Match media volume",
-               std::string{},
-               [this](auto item) {
-                       this->model_.volume_ = 1.0;
-                       this->updateRadioItems();
-               },
-               ListItem::WidgetType::radio,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.volume_.value() == 1.0));
-
-       radioItems.push_back(std::make_unique<ListItem>(
-               "75% of media volume",
-               std::string{},
-               [this](auto item) {
-                       this->model_.volume_ = 0.75;
-                       this->updateRadioItems();
-               },
-               ListItem::WidgetType::radio,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.volume_.value() == 0.75));
-
-       radioItems.push_back(std::make_unique<ListItem>(
-               "50% of media volume",
-               std::string{},
-               [this](auto item) {
-                       this->model_.volume_ = 0.50;
-                       this->updateRadioItems();
-               },
-               ListItem::WidgetType::radio,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.volume_.value() == 0.50));
-
-       radioItems.push_back(std::make_unique<ListItem>(
-               "25% of media volume",
-               std::string{},
-               [this](auto item) {
-                       this->model_.volume_ = 0.25;
-                       this->updateRadioItems();
-               },
-               ListItem::WidgetType::radio,
-               std::function<void(ListItem * item)>{},
-               std::function<void(ListItem * item)>{},
-               model_.volume_.value() == 0.25));
-}
-
-void VoicePresenter::updateRadioItems()
-{
-       for (auto i = 1; i <= 4; ++i) {
-               auto idx = 4 - i;
-               groups_[2].items_[idx]->widgetState_ = model_.volume_.value() == 0.25 * i;
-       }
-}
\ No newline at end of file
diff --git a/src/presenter/VoicePresenter.hpp b/src/presenter/VoicePresenter.hpp
deleted file mode 100644 (file)
index 56e4450..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef VOICE_PRESENTER_HPP
-#define VOICE_PRESENTER_HPP
-
-#include "ListPresenter.hpp"
-#include "VoiceModel.hpp"
-
-class VoicePresenter : public ListPresenter
-{
-       public:
-       VoicePresenter();
-
-       private:
-       void updateRadioItems();
-
-       VoiceModel model_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/service/UniversalSwitchSentinel.cpp b/src/service/UniversalSwitchSentinel.cpp
deleted file mode 100644 (file)
index 9e43043..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "UniversalSwitchSentinel.hpp"
-
-#include "UniversalSwitchConstants.hpp"
-
-UniversalSwitchState::UniversalSwitchState()
-{
-       interactionServiceStateHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, false, [this](auto state) {
-               this->vconfInteractionState_ = state;
-               this->syncInteractionServiceState();
-       });
-
-       configurationServiceStateHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_CONFIGURATION_SERVICE, false, [this](auto state) {
-               this->vconfConfigurationState_ = state;
-               this->syncConfigurationServiceState();
-       });
-
-       connectionPtr_ = DBus::getDBusConnectionByType(DBus::ConnectionType::SESSION);
-       ownerNameCallbackHandle_ = DBus::registerNameOwnerChangedCallback(connectionPtr_, BUS, [this](std::string oldID, std::string newID) {
-               dbusConfigurationServiceState_ = true;
-               syncInteractionServiceState();
-               syncConfigurationServiceState();
-       });
-}
-
-UniversalSwitchState::~UniversalSwitchState()
-{
-       Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_CONFIGURATION_SERVICE, false);
-}
-
-void UniversalSwitchState::syncInteractionServiceState()
-{
-       auto v = vconfInteractionState_ && dbusConfigurationServiceState_;
-       if (this->interactionServiceState_.value_ != v) {
-               this->interactionServiceState_.value_ = v;
-               this->interactionServiceState_.notify(v);
-       }
-}
-
-void UniversalSwitchState::syncConfigurationServiceState()
-{
-       auto v = vconfConfigurationState_ && dbusConfigurationServiceState_;
-       if (this->configurationServiceState_.value_ != v) {
-               this->configurationServiceState_.value_ = v;
-               this->configurationServiceState_.notify(v);
-       }
-}
-
-void UniversalSwitchState::setInteractionServiceState(bool state)
-{
-       Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, state);
-}
-
-void UniversalSwitchState::setConfigurationServiceState(bool state)
-{
-       Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_CONFIGURATION_SERVICE, state);
-}
-
-UniversalSwitchSentinel UniversalSwitchSentinelService::getSentinel()
-{
-       if (auto s = sentinel_.lock()) {
-               return s;
-       } else {
-               auto x = std::make_shared<UniversalSwitchState>();
-               sentinel_ = x;
-               return x;
-       }
-}
\ No newline at end of file
diff --git a/src/service/UniversalSwitchSentinel.hpp b/src/service/UniversalSwitchSentinel.hpp
deleted file mode 100644 (file)
index 5958a7d..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef UNIVERSAL_SWITCH_SENTINEL_HPP
-#define UNIVERSAL_SWITCH_SENTINEL_HPP
-
-#include "DBus.hpp"
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-
-#include <memory>
-
-class UniversalSwitchState
-{
-       public:
-       class ReadOnlyProperty : public Observable<bool>
-       {
-               friend class UniversalSwitchState;
-
-               public:
-               ReadOnlyProperty() = default;
-               ReadOnlyProperty(bool val)
-                       : value_(val)
-               {}
-
-               bool value() const
-               {
-                       return value_;
-               }
-
-               private:
-               bool value_ = false;
-       };
-
-       UniversalSwitchState();
-       ~UniversalSwitchState();
-       ReadOnlyProperty interactionServiceState_;
-       ReadOnlyProperty configurationServiceState_;
-
-       void setInteractionServiceState(bool state);
-       void setConfigurationServiceState(bool state);
-
-       private:
-       void syncInteractionServiceState();
-       void syncConfigurationServiceState();
-
-       VConfInterface::CallbackHandle interactionServiceStateHandle_;
-       VConfInterface::CallbackHandle configurationServiceStateHandle_;
-       DBus::OwnerNameCallbackHandle ownerNameCallbackHandle_;
-       DBus::DBusWrapper::ConnectionPtr connectionPtr_;
-       bool dbusConfigurationServiceState_ = false;
-       bool vconfConfigurationState_ = false;
-       bool vconfInteractionState_ = false;
-};
-
-using UniversalSwitchSentinel = std::shared_ptr<UniversalSwitchState>;
-
-class UniversalSwitchSentinelService
-{
-       public:
-       UniversalSwitchSentinel getSentinel();
-
-       private:
-       std::weak_ptr<UniversalSwitchState> sentinel_;
-};
-
-#endif
\ No newline at end of file
diff --git a/src/utils/UniversalSwitchConstants.hpp b/src/utils/UniversalSwitchConstants.hpp
deleted file mode 100644 (file)
index 9b19fbf..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef UNIVERSAL_SWITCH_CONSTANTS_HPP
-#define UNIVERSAL_SWITCH_CONSTANTS_HPP
-
-#define VCONF_MEMORY_TYPE "db/"
-#define VCONF_PROJECT_NAME "setting/accessibility/universal-switch/"
-#define VCONF_PROJECT_PREFIX VCONF_MEMORY_TYPE VCONF_PROJECT_NAME
-
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_SCAN_ENABLED VCONF_PROJECT_PREFIX "AUTO_SCAN_ENABLED"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_SCAN_INT VCONF_PROJECT_PREFIX "AUTO_SCAN_INTERVAL"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_NUM_OF_SCANS VCONF_PROJECT_PREFIX "LOOP_LIMIT_TO_INACTION"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_METHOD VCONF_PROJECT_PREFIX "SCAN_METHOD"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_DIR_VERTICAL VCONF_PROJECT_PREFIX "SCAN_DIRECTION_VERTICAL"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_DIR_HORIZONTA VCONF_PROJECT_PREFIX "SCAN_DIRECTION_HORIZONTAL"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_PT_SPEED VCONF_PROJECT_PREFIX "SCAN_PT_SPEED"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_PAUSE_ON_FIRST_STATE VCONF_PROJECT_PREFIX "PAUSE_ON_FIRST_ELEMENT_ENABLED"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_PAUSE_ON_FIRST_VALUE VCONF_PROJECT_PREFIX "PAUSE_ON_FIRST_ELEMENT_TIME"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_STATE VCONF_PROJECT_PREFIX "TAP_DURATION_ENABLED"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_VALUE VCONF_PROJECT_PREFIX "TAP_DURATION_VALUE"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_STATE VCONF_PROJECT_PREFIX "SGL_INACTION_INT_ENABLED"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_VALUE VCONF_PROJECT_PREFIX "SGL_INACTION_INT_VALUE"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_STATE VCONF_PROJECT_PREFIX "AUTO_TAP_ENABLED"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_VALUE VCONF_PROJECT_PREFIX "AUTO_TAP_WAITING_TIME"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_STATE VCONF_PROJECT_PREFIX "AUTO_MOVE_INT_ENABLED"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_VALUE VCONF_PROJECT_PREFIX "AUTO_MOVE_INT_VALUE"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_KBD_STATE VCONF_PROJECT_PREFIX "AUTO_TAP_KBD_ENABLED"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_CURSOR_COLOR VCONF_PROJECT_PREFIX "FEEDBACK_CURSOR_COLOR"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_STATE VCONF_PROJECT_PREFIX "FEEDBACK_SOUND_ENABLED"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_VOLUME VCONF_PROJECT_PREFIX "FEEDBACK_SOUND_VOLUME"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_STATE VCONF_PROJECT_PREFIX "FEEDBACK_VOICE_ENABLED"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_SPEECH_RATE VCONF_PROJECT_PREFIX "FEEDBACK_VOICE_SPEECH_RATE"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_SPEECH_VOLUME VCONF_PROJECT_PREFIX "FEEDBACK_VOICE_SPEECH_VOLUME"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_SCROLL_ENABLED VCONF_PROJECT_PREFIX "AUTO_SCROLL_ENABLED"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_GRANULARITY_UNIT VCONF_PROJECT_PREFIX "GRANULARITY_UNIT"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_ACTIONS VCONF_PROJECT_PREFIX "SHOW_ACTIONS_MENU_ITEM"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_SETTINGS VCONF_PROJECT_PREFIX "SHOW_SETTINGS_MENU_ITEM"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_HOMESCREEN VCONF_PROJECT_PREFIX "SHOW_HOME_SCREEN_MENU_ITEM"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_KEYS VCONF_PROJECT_PREFIX "SHOW_BUTTONS_AND_KEYS_MENU_ITEM"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_CONTEXTUAL_MENU VCONF_PROJECT_PREFIX "SHOW_CONTEXTUAL_MENU"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_GESTURES VCONF_PROJECT_PREFIX "SHOW_GESTURES_MENU_ITEM"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_RECENT_APPS VCONF_PROJECT_PREFIX "SHOW_RECENT_APPS_MENU_ITEM"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_BACK VCONF_PROJECT_PREFIX "SHOW_BACK_MENU_ITEM"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_CONFIGURATION_SERVICE VCONF_PROJECT_PREFIX "configuration-service"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE VCONF_PROJECT_PREFIX "interaction-service"
-
-#define DEFAULT_AUTO_SCAN_STATE true
-#define DEFAULT_AUTO_SCAN_INTERVAL 2.0
-#define DEFAULT_AUTO_SCAN_NUMBER 5
-#define DEFAULT_SCAN_METHOD ScanMethod::POINT
-#define DEFAULT_SCAN_DIR ScanDirection::TO_BOTTOM
-#define DEFAULT_SCAN_PT_SPEED 10
-#define DEFAULT_PAUSE_ON_FIRST_STATE false
-#define DEFAULT_PAUSE_ON_FIRST_VALUE 1.0
-#define DEFAULT_TAP_DURATION_STATE false
-#define DEFAULT_TAP_DURATION_VALUE 0.5
-#define DEFAULT_SGL_IACTION_INT_STATE false
-#define DEFAULT_SGL_IACTION_INT_VALUE 0.5
-#define DEFAULT_AUTO_TAP_STATE false
-#define DEFAULT_AUTO_TAP_VALUE 1.0
-#define DEFAULT_AUTO_MOVE_INT_STATE false
-#define DEFAULT_AUTO_MOVE_INT_VALUE 1.0
-#define DEFAULT_AUTO_TAP_KEYBOARD_STATE false
-#define DEFAULT_FEEDBACK_CURSOR_COLOR 0xffff0000
-#define DEFAULT_FEEDBACK_SOUND_STATE true
-#define DEFAULT_FEEDBACK_SOUND_VOLUME 0.5
-#define DEFAULT_FEEDBACK_VOICE_STATE false
-#define DEFAULT_FEEDBACK_VOICE_SPEECH_RATE 0.5
-#define DEFAULT_FEEDBACK_VOICE_SPEECH_VOLUME 0.5
-
-#define RANGE_MIN_SCANS_NUM 1
-#define RANGE_MAX_SCANS_NUM 10
-#define RANGE_MIN_SCAN_SPEED 1
-#define RANGE_MAX_SCAN_SPEED 30
-
-#define STEP_SCANS_NUM 1
-#define STEP_SCAN_SPEED 1
-
-#define BUS "org.tizen.UniversalSwitch"
-#define PATH "/org/tizen/UniversalSwitch"
-#define IFACE "org.tizen.UniversalSwitch"
-
-#define ACCESSIBILITY_UNIVERSAL_SWITCH_PLUS_ICON RESDIR "/icons/plus.png"
-
-#define ACCESSIBILITY_UNIVERSAL_SWITCH_SCREEN_SWITCH_PROVIDER "ScreenSwitchProvider"
-#define ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER "AccessoriesSwitchProvider"
-#define ACCESSIBILITY_UNIVERSAL_SWITCH_CAMERA_SWITCH_PROVIDER "CameraSwitchProvider"
-#define ACCESSIBILITY_UNIVERSAL_SWITCH_SCREEN "Screen"
-
-#endif
diff --git a/src/utils/UniversalSwitchTypes.hpp b/src/utils/UniversalSwitchTypes.hpp
deleted file mode 100644 (file)
index e06e78f..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef UNIVERSAL_SWITCH_TYPES_HPP
-#define UNIVERSAL_SWITCH_TYPES_HPP
-
-#include <string>
-
-enum class ChangeType : int32_t
-{
-       ADD,
-       UPDATE,
-       REMOVE,
-       NONE
-};
-
-enum class ScanMethod
-{
-       POINT = 1,
-       ROW
-};
-
-enum class ScanDirection
-{
-       TO_BOTTOM = 1,
-       TO_TOP
-};
-
-struct SwitchConfigurationItem
-{
-       std::string switchId;
-       std::string userName;
-       std::string activityType;
-};
-
-struct InfoType
-{
-       std::string id;
-       std::string name;
-       std::string description;
-};
-
-#endif
\ No newline at end of file
diff --git a/tests/no-ui-scenarios/EntryNameModalPresenterTest.cpp b/tests/no-ui-scenarios/EntryNameModalPresenterTest.cpp
deleted file mode 100644 (file)
index 21e9a6e..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2017  Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "EntryNameModalPresenter.hpp"
-
-#include <gtest/gtest.h>
-
-TEST(EntryNameModalPresenter, testConstructor)
-{
-       auto enmp = std::make_unique<EntryNameModalPresenter>("testSwitchID");
-       EXPECT_STRCASEEQ("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH", enmp->getTitle().c_str());
-}
-
-TEST(EntryNameModalPresenter, testAction)
-{
-       auto enmp = std::make_unique<EntryNameModalPresenter>("testSwitchID");
-
-       auto modal_action = enmp->getAction("modalEntry");
-       ASSERT_NE(modal_action, nullptr);
-       EXPECT_EQ(modal_action->actionId_, std::string("modalEntry"));
-       EXPECT_EQ(modal_action->title_.value(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_NAME"));
-       EXPECT_TRUE(modal_action->enabled_.value());
-       EXPECT_FALSE(modal_action->state_.value());
-
-       auto cancel_action = enmp->getAction("cancelAction");
-
-       ASSERT_NE(cancel_action, nullptr);
-       EXPECT_EQ(cancel_action->actionId_, std::string("cancelAction"));
-       EXPECT_EQ(cancel_action->title_.value(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_CANCEL"));
-       EXPECT_TRUE(cancel_action->enabled_.value());
-       EXPECT_FALSE(cancel_action->state_.value());
-
-       auto save_action = enmp->getAction("doneAction");
-
-       ASSERT_NE(save_action, nullptr);
-       EXPECT_EQ(save_action->actionId_, std::string("doneAction"));
-       EXPECT_EQ(save_action->title_.value(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_SAVE"));
-       EXPECT_FALSE(save_action->enabled_.value());
-       EXPECT_FALSE(save_action->state_.value());
-       if (modal_action->onInvoke_)
-               modal_action->onInvoke_(modal_action);
-       EXPECT_TRUE(save_action->enabled_.value());
-}
-
-int main(int argc, char *argv[])
-{
-       try {
-               ::testing::InitGoogleTest(&argc, argv);
-               return RUN_ALL_TESTS();
-       } catch (...) {
-               return 1;
-       }
-}
diff --git a/tests/no-ui-scenarios/NoSwitchesModalPresenterTest.cpp b/tests/no-ui-scenarios/NoSwitchesModalPresenterTest.cpp
deleted file mode 100644 (file)
index a95b2b1..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2017  Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "NoSwitchesModalPresenter.hpp"
-
-#include <gtest/gtest.h>
-
-TEST(NoSwitchesModalPresenter, testConstructor)
-{
-       auto nsmp = new NoSwitchesModalPresenter();
-       EXPECT_STRCASEEQ("IDS_ACCS_UNIVERSAL_SWITCH_NO_SWITCHES_TEXT", nsmp->getText().c_str());
-}
-
-TEST(NoSwitchesModalPresenter, testAction)
-{
-       auto nsmp = new NoSwitchesModalPresenter();
-
-       auto cancel_action = nsmp->getAction("cancelAction");
-
-       ASSERT_NE(cancel_action, nullptr);
-       EXPECT_EQ(cancel_action->actionId_, std::string("cancelAction"));
-       EXPECT_EQ(cancel_action->title_.value(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_CANCEL"));
-       EXPECT_TRUE(cancel_action->enabled_.value());
-       EXPECT_FALSE(cancel_action->state_.value());
-
-       auto done_action = nsmp->getAction("doneAction");
-
-       ASSERT_NE(done_action, nullptr);
-       EXPECT_EQ(done_action->actionId_, std::string("doneAction"));
-       EXPECT_EQ(done_action->title_.value(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_POPUP_ADD"));
-       EXPECT_TRUE(done_action->enabled_.value());
-       EXPECT_FALSE(done_action->state_.value());
-}
-
-int main(int argc, char *argv[])
-{
-       try {
-               ::testing::InitGoogleTest(&argc, argv);
-               return RUN_ALL_TESTS();
-       } catch (...) {
-               return 1;
-       }
-}
diff --git a/tests/no-ui-scenarios/NumberOfAutoScanLoopsPresenterTest.cpp b/tests/no-ui-scenarios/NumberOfAutoScanLoopsPresenterTest.cpp
deleted file mode 100644 (file)
index a995bc1..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2017  Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "presenter/NumberOfAutoScanLoopsPresenter.hpp"
-
-#include <gtest/gtest.h>
-
-TEST(NumberOfAutoScanLoopsPresenter, testConstructor)
-{
-       NumberOfAutoScanLoopsPresenter presenter;
-
-       EXPECT_EQ(presenter.getTitle().str(), TranslatedString("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_NUM_OF_SCANS").str());
-}
-
-TEST(NumberOfAutoScanLoopsPresenter, testGetFormat)
-{
-       NumberOfAutoScanLoopsPresenter presenter;
-
-       EXPECT_EQ(presenter.getFormat(), std::string("%d times"));
-}
-
-TEST(NumberOfAutoScanLoopsPresenter, testGetLabel)
-{
-       NumberOfAutoScanLoopsPresenter presenter;
-
-       EXPECT_EQ(presenter.getLabel(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_NUM_OF_SCANS"));
-}
-
-int main(int argc, char *argv[])
-{
-       try {
-               ::testing::InitGoogleTest(&argc, argv);
-               return RUN_ALL_TESTS();
-       } catch (...) {
-               return 1;
-       }
-}
diff --git a/tests/no-ui-scenarios/PauseOnFirstPresenterTest.cpp b/tests/no-ui-scenarios/PauseOnFirstPresenterTest.cpp
deleted file mode 100644 (file)
index dbc37aa..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2017  Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "presenter/PauseOnFirstPresenter.hpp"
-
-#include <gtest/gtest.h>
-
-TEST(PauseOnFirstPresenter, testConstructor)
-{
-       PauseOnFirstPresenter presenter;
-
-       EXPECT_EQ(presenter.getTitle().str(), TranslatedString("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_PAUSE_ON_FIRST").str());
-}
-
-TEST(PauseOnFirstPresenter, testGetFormat)
-{
-       PauseOnFirstPresenter presenter;
-
-       EXPECT_EQ(presenter.getFormat(), std::string("%1.1f seconds"));
-}
-
-TEST(PauseOnFirstPresenter, testGetLabel)
-{
-       PauseOnFirstPresenter presenter;
-
-       EXPECT_EQ(presenter.getLabel(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_PAUSE_ON_FIRST"));
-}
-
-int main(int argc, char *argv[])
-{
-       try {
-               ::testing::InitGoogleTest(&argc, argv);
-               return RUN_ALL_TESTS();
-       } catch (...) {
-               return 1;
-       }
-}
diff --git a/tests/no-ui-scenarios/PointScanSpeedPresenterTest.cpp b/tests/no-ui-scenarios/PointScanSpeedPresenterTest.cpp
deleted file mode 100644 (file)
index e02599b..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2017  Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "presenter/PointScanSpeedPresenter.hpp"
-
-#include <gtest/gtest.h>
-
-TEST(PointScanSpeedPresenter, testConstructor)
-{
-       PointScanSpeedPresenter presenter;
-       EXPECT_EQ(presenter.getTitle().str(), TranslatedString("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_PT_SPEED").str());
-}
-
-TEST(PointScanSpeedPresenter, testGetFormat)
-{
-       PointScanSpeedPresenter presenter;
-
-       EXPECT_EQ(presenter.getFormat(), std::string("%d"));
-}
-
-TEST(PointScanSpeedPresenter, testGetLabel)
-{
-       PointScanSpeedPresenter presenter;
-
-       EXPECT_EQ(presenter.getLabel(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_SCAN_SPEED"));
-}
-
-int main(int argc, char *argv[])
-{
-       try {
-               ::testing::InitGoogleTest(&argc, argv);
-               return RUN_ALL_TESTS();
-       } catch (...) {
-               return 1;
-       }
-}
diff --git a/tests/no-ui-scenarios/RemoveSwitchesModalPresenterTest.cpp b/tests/no-ui-scenarios/RemoveSwitchesModalPresenterTest.cpp
deleted file mode 100644 (file)
index aa57a32..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright 2017  Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "presenter/RemoveSwitchesModalPresenter.hpp"
-
-#include <gtest/gtest.h>
-
-static bool isUniversalSwitchActive_state = false;
-
-//RemoveSwitchesModel Mock implementation
-RemoveSwitchesModel::RemoveSwitchesModel()
-{
-       isUniversalSwitchActive_ = isUniversalSwitchActive_state;
-}
-
-void RemoveSwitchesModel::removeSwitches(std::vector<std::string> &switchesIds)
-{}
-
-TEST(RemoveSwitchesModalPresenter, testConstructor)
-{
-       std::vector<SwitchConfigurationItem> switches;
-       std::vector<std::string> switchesToRemove;
-       isUniversalSwitchActive_state = true;
-
-       {
-               RemoveSwitchesModalPresenter presenter(switches, switchesToRemove);
-               EXPECT_EQ(presenter.getTitle().str(), TranslatedString("IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES").str());
-               EXPECT_EQ(presenter.getText(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_DELETE_ALL_SWITCHES_DESC"));
-       }
-
-       switches.push_back(SwitchConfigurationItem());
-
-       {
-               RemoveSwitchesModalPresenter presenter(switches, switchesToRemove);
-               EXPECT_EQ(presenter.getText(), std::string("0 ") + TranslatedString{"IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES_DESC"}.str());
-       }
-
-       switchesToRemove.push_back("Switch1");
-
-       {
-               RemoveSwitchesModalPresenter presenter(switches, switchesToRemove);
-               EXPECT_EQ(presenter.getText(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_DELETE_ALL_SWITCHES_DESC"));
-       }
-
-       switchesToRemove.push_back("Switch2");
-
-       {
-               RemoveSwitchesModalPresenter presenter(switches, switchesToRemove);
-               EXPECT_EQ(presenter.getText(), std::string("2 ") + TranslatedString{"IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES_DESC"}.str());
-       }
-
-       switches.clear();
-       switchesToRemove.clear();
-       isUniversalSwitchActive_state = false;
-
-       {
-               RemoveSwitchesModalPresenter presenter(switches, switchesToRemove);
-               EXPECT_EQ(presenter.getText(), std::string("0 ") + TranslatedString{"IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES_DESC"}.str());
-       }
-
-       switches.push_back(SwitchConfigurationItem());
-       switchesToRemove.push_back("Switch1");
-
-       {
-               RemoveSwitchesModalPresenter presenter(switches, switchesToRemove);
-               EXPECT_EQ(presenter.getText(), std::string("1 ") + TranslatedString{"IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES_DESC"}.str());
-       }
-}
-
-int main(int argc, char *argv[])
-{
-       try {
-               ::testing::InitGoogleTest(&argc, argv);
-               return RUN_ALL_TESTS();
-       } catch (...) {
-               return 1;
-       }
-}
diff --git a/tests/no-ui-scenarios/SingleInteractionIntervalPresenterTest.cpp b/tests/no-ui-scenarios/SingleInteractionIntervalPresenterTest.cpp
deleted file mode 100644 (file)
index f4b15de..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2017  Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "presenter/SingleInteractionIntervalPresenter.hpp"
-
-#include <gtest/gtest.h>
-
-TEST(SingleInteractionIntervalPresenter, testConstructor)
-{
-       SingleInteractionIntervalPresenter presenter;
-
-       EXPECT_EQ(presenter.getTitle().str(), TranslatedString("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_SGL_IACTION_INT").str());
-}
-
-TEST(SingleInteractionIntervalPresenter, testGetFormat)
-{
-       SingleInteractionIntervalPresenter presenter;
-
-       EXPECT_EQ(presenter.getFormat(), std::string("%1.1f seconds"));
-}
-
-TEST(SingleInteractionIntervalPresenter, testGetLabel)
-{
-       SingleInteractionIntervalPresenter presenter;
-
-       EXPECT_EQ(presenter.getLabel(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_SGL_IACTION_INT"));
-}
-
-int main(int argc, char *argv[])
-{
-       try {
-               ::testing::InitGoogleTest(&argc, argv);
-               return RUN_ALL_TESTS();
-       } catch (...) {
-               return 1;
-       }
-}
diff --git a/tests/no-ui-scenarios/TapDurationPresenterTest.cpp b/tests/no-ui-scenarios/TapDurationPresenterTest.cpp
deleted file mode 100644 (file)
index c0a23b5..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2017  Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "presenter/TapDurationPresenter.hpp"
-
-#include <gtest/gtest.h>
-
-TEST(TapDurationPresenter, testConstructor)
-{
-       TapDurationPresenter presenter;
-
-       EXPECT_EQ(presenter.getTitle().str(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_TAP_DURATION"));
-}
-
-TEST(TapDurationPresenter, testGetFormat)
-{
-       TapDurationPresenter presenter;
-
-       EXPECT_EQ(presenter.getFormat(), std::string("%1.1f seconds"));
-}
-
-TEST(TapDurationPresenter, testGetLabel)
-{
-       TapDurationPresenter presenter;
-
-       EXPECT_EQ(presenter.getLabel(), std::string("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_TAP_DURATION"));
-}
-
-int main(int argc, char *argv[])
-{
-       try {
-               ::testing::InitGoogleTest(&argc, argv);
-               return RUN_ALL_TESTS();
-       } catch (...) {
-               return 1;
-       }
-}
index 3d7cac7c2b112aab56210a8dad487387ad8a80f8..d9e21ba76825ed83dd46cdc80155bc4abc87a901 100644 (file)
@@ -34,22 +34,6 @@ TEST(TranslatedString, translationNotExistingKey)
        EXPECT_EQ(TranslatedString{"IDS_ACCESSIBILITY_TEST_KEY"}.str(), std::string{"IDS_ACCESSIBILITY_TEST_KEY"});
 }
 
-TEST(TranslatedString, createFormatedStringDouble)
-{
-       EXPECT_TRUE(setlocale(LC_ALL, "C"));
-       EXPECT_EQ(TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", 0.11).str(), std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"});
-       EXPECT_TRUE(setlocale(LC_ALL, "en_GB.UTF-8"));
-       EXPECT_EQ(TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS", 0.11).str(), std::string{"0.1 seconds"});
-}
-
-TEST(TranslatedString, createFormatedStringInt)
-{
-       EXPECT_TRUE(setlocale(LC_ALL, "C"));
-       EXPECT_EQ(TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SWITCHES", 5).str(), std::string{"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SWITCHES"});
-       EXPECT_TRUE(setlocale(LC_ALL, "en_GB.UTF-8"));
-       EXPECT_EQ(TranslatedString::create("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SWITCHES", 5).str(), std::string{"5 Switches"});
-}
-
 TEST(TranslatedString, addTranslatedString)
 {
        EXPECT_TRUE(setlocale(LC_ALL, "C"));