From 22aeb52bc62626705e05b9e13ae8c6aed9a59364 Mon Sep 17 00:00:00 2001 From: Igor Olshevskyi Date: Thu, 10 Aug 2017 09:50:57 +0300 Subject: [PATCH] TizenRefApp-9088 [Call UI] Refactor project directory structure Change-Id: I543fa5f7087fd7a8a61c80fc41cbfd86ab8412c3 --- .cproject | 250 +++++++++++++++--- {src => call-ui}/common.h | 8 +- {inc => call-ui}/config.h | 8 +- {src => call-ui}/helpers.h | 6 +- {src => call-ui}/helpers.hpp | 0 {src => call-ui}/main.cpp | 0 {src => call-ui}/model/CallUIBuilder.cpp | 6 +- {inc => call-ui}/model/CallUIBuilder.h | 10 +- {inc => call-ui}/model/IActiveCall.h | 11 +- {inc => call-ui}/model/IBaseCallInfo.h | 8 +- {inc => call-ui}/model/ICallInfo.h | 12 +- {inc => call-ui}/model/ICallListener.h | 8 +- {inc => call-ui}/model/ICallManager.h | 15 +- {inc => call-ui}/model/ICallUI.h | 13 +- {inc => call-ui}/model/IConferenceCallInfo.h | 8 +- {inc => call-ui}/model/IContactInfo.h | 8 +- {inc => call-ui}/model/IEndCall.h | 10 +- {inc => call-ui}/model/IHeldCall.h | 11 +- {inc => call-ui}/model/IIncomingCall.h | 12 +- .../model/IIndicatorStateListener.h | 8 +- .../model/IIndicatorStateProvider.h | 12 +- {inc => call-ui}/model/IRejectMsg.h | 8 +- {inc => call-ui}/model/IRejectMsgProvider.h | 13 +- {inc => call-ui}/model/ISoundManager.h | 8 +- {inc => call-ui}/model/IndicatorState.h | 6 +- .../model/impl}/ActiveCall.cpp | 4 - .../model => call-ui/model/impl}/ActiveCall.h | 17 +- .../model/impl}/BatteryStateSource.cpp | 0 .../model/impl}/BatteryStateSource.h | 14 +- .../model/impl}/BluetoothManager.cpp | 4 +- .../model/impl}/BluetoothManager.h | 17 +- .../model/impl}/CallClient.cpp | 0 .../model => call-ui/model/impl}/CallClient.h | 10 +- .../model => call-ui/model/impl}/CallInfo.cpp | 6 - {src/model => call-ui/model/impl}/CallInfo.h | 16 +- .../model/impl}/CallManager.cpp | 14 - .../model/impl}/CallManager.h | 20 +- {src/model => call-ui/model/impl}/CallUI.cpp | 14 - {src/model => call-ui/model/impl}/CallUI.h | 25 +- .../model/impl}/ConferenceCallInfo.cpp | 5 - .../model/impl}/ConferenceCallInfo.h | 14 +- .../model/impl}/ConnectionStateSource.cpp | 2 +- .../model/impl}/ConnectionStateSource.h | 10 +- .../model/impl}/ContactInfo.cpp | 4 +- .../model/impl}/ContactInfo.h | 14 +- .../model/impl}/ContactInfoProvider.cpp | 2 - .../model/impl}/ContactInfoProvider.h | 12 +- {src/model => call-ui/model/impl}/EndCall.cpp | 2 - {src/model => call-ui/model/impl}/EndCall.h | 14 +- .../model/impl}/HdVoiceStateSource.cpp | 0 .../model/impl}/HdVoiceStateSource.h | 8 +- .../model => call-ui/model/impl}/HeldCall.cpp | 3 - {src/model => call-ui/model/impl}/HeldCall.h | 15 +- .../model/impl}/ICallManagerListener.h | 10 +- .../model/impl}/IIndicatorStateSource.h | 12 +- .../model/impl}/IncomingCall.cpp | 4 - .../model/impl}/IncomingCall.h | 15 +- .../model/impl}/IndicatorStateProvider.cpp | 3 - .../model/impl}/IndicatorStateProvider.h | 14 +- .../model/impl}/MsgClient.cpp | 0 {src/model => call-ui/model/impl}/MsgClient.h | 10 +- .../model/impl}/RejectMsg.cpp | 2 - {src/model => call-ui/model/impl}/RejectMsg.h | 14 +- .../model/impl}/RejectMsgProvider.cpp | 3 +- .../model/impl}/RejectMsgProvider.h | 14 +- .../model/impl}/RssiStateSource.cpp | 0 .../model/impl}/RssiStateSource.h | 10 +- .../model/impl}/SimSlotStateSource.cpp | 0 .../model/impl}/SimSlotStateSource.h | 8 +- .../model/impl}/SoundManager.cpp | 3 - .../model/impl}/SoundManager.h | 21 +- .../model/impl}/VoiceControlStateProvider.cpp | 10 +- .../model/impl}/VoiceControlStateProvider.h | 10 +- .../model/impl}/VoiceControlStateSource.cpp | 2 - .../model/impl}/VoiceControlStateSource.h | 12 +- {src/model => call-ui/model/impl}/common.h | 8 +- {src/model => call-ui/model/impl}/helpers.h | 8 +- {src/model => call-ui/model/impl}/helpers.hpp | 0 call-ui/model/impl/types.h | 43 +++ {inc => call-ui}/model/types.h | 37 +-- {src => call-ui}/presenters/Instance.cpp | 14 +- {inc => call-ui}/presenters/Instance.h | 11 +- .../presenters/InstanceManager.cpp | 4 +- {inc => call-ui}/presenters/InstanceManager.h | 8 +- .../presenters/base}/Page.cpp | 2 +- .../presenters/base}/Page.h | 8 +- .../presenters/base}/Page.hpp | 0 call-ui/presenters/base/common.h | 22 ++ {src => call-ui}/presenters/common.h | 14 +- .../presenters/dialogs}/AcceptDialog.cpp | 31 +-- .../presenters/dialogs}/AcceptDialog.h | 36 ++- call-ui/presenters/dialogs/common.h | 22 ++ .../misc}/AcceptRejectPresenter.cpp | 16 +- .../presenters/misc}/AcceptRejectPresenter.h | 18 +- .../presenters/misc}/AccessoryPresenter.cpp | 42 ++- .../presenters/misc}/AccessoryPresenter.h | 15 +- .../presenters/misc}/AtspiHighlightHelper.cpp | 2 +- .../presenters/misc}/AtspiHighlightHelper.h | 8 +- .../presenters/misc}/CallInfoPresenter.cpp | 13 +- .../presenters/misc}/CallInfoPresenter.h | 11 +- .../presenters/misc}/CallStatusPresenter.cpp | 6 +- .../presenters/misc}/CallStatusPresenter.h | 10 +- .../presenters/misc}/DeviceStatePresenter.cpp | 2 +- .../presenters/misc}/DeviceStatePresenter.h | 22 +- .../presenters/misc}/IndicatorPresenter.cpp | 4 +- .../presenters/misc}/IndicatorPresenter.h | 11 +- .../presenters/misc}/MoreOptionsPresenter.cpp | 14 +- .../presenters/misc}/MoreOptionsPresenter.h | 14 +- .../misc}/MotionSensorPresenter.cpp | 6 +- .../presenters/misc}/MotionSensorPresenter.h | 14 +- .../presenters/misc}/RejectMsgPresenter.cpp | 39 ++- .../presenters/misc}/RejectMsgPresenter.h | 45 ++-- call-ui/presenters/misc/common.h | 22 ++ .../presenters/misc}/helpers.cpp | 0 .../presenters/misc}/helpers.h | 6 +- call-ui/presenters/misc/types.h | 33 +++ .../presenters/pages}/KeypadPage.cpp | 29 +- .../presenters/pages}/KeypadPage.h | 19 +- .../presenters/pages}/MainPage.cpp | 44 +-- .../presenters/pages}/MainPage.h | 27 +- call-ui/presenters/pages/common.h | 22 ++ call-ui/presenters/types.h | 23 ++ {src => call-ui}/resources.cpp | 2 +- {inc => call-ui}/resources.h | 6 +- {src => call-ui}/types.cpp | 0 {inc => call-ui}/types.h | 6 +- {src => call-ui}/view/AcceptRejectWidget.cpp | 4 +- {inc => call-ui}/view/AcceptRejectWidget.h | 8 +- {src => call-ui}/view/Slider.cpp | 2 +- {inc => call-ui}/view/Slider.h | 8 +- {src => call-ui}/view/VolumeControl.cpp | 14 +- {inc => call-ui}/view/VolumeControl.h | 27 +- {src => call-ui}/view/common.h | 10 +- {src => call-ui}/view/helpers.cpp | 2 +- {inc => call-ui}/view/helpers.h | 6 +- {inc => call-ui}/view/types.h | 19 +- inc/presenters/types.h | 90 ------- project_def.prop | 2 +- src/model/implTypes.h | 84 ------ 139 files changed, 1150 insertions(+), 847 deletions(-) rename {src => call-ui}/common.h (88%) rename {inc => call-ui}/config.h (85%) rename {src => call-ui}/helpers.h (91%) rename {src => call-ui}/helpers.hpp (100%) rename {src => call-ui}/main.cpp (100%) rename {src => call-ui}/model/CallUIBuilder.cpp (91%) rename {inc => call-ui}/model/CallUIBuilder.h (78%) rename {inc => call-ui}/model/IActiveCall.h (80%) rename {inc => call-ui}/model/IBaseCallInfo.h (84%) rename {inc => call-ui}/model/ICallInfo.h (81%) rename {inc => call-ui}/model/ICallListener.h (82%) rename {inc => call-ui}/model/ICallManager.h (76%) rename {inc => call-ui}/model/ICallUI.h (79%) rename {inc => call-ui}/model/IConferenceCallInfo.h (78%) rename {inc => call-ui}/model/IContactInfo.h (83%) rename {inc => call-ui}/model/IEndCall.h (82%) rename {inc => call-ui}/model/IHeldCall.h (81%) rename {inc => call-ui}/model/IIncomingCall.h (79%) rename {inc => call-ui}/model/IIndicatorStateListener.h (78%) rename {inc => call-ui}/model/IIndicatorStateProvider.h (75%) rename {inc => call-ui}/model/IRejectMsg.h (82%) rename {inc => call-ui}/model/IRejectMsgProvider.h (73%) rename {inc => call-ui}/model/ISoundManager.h (91%) rename {inc => call-ui}/model/IndicatorState.h (89%) rename {src/model => call-ui/model/impl}/ActiveCall.cpp (97%) rename {src/model => call-ui/model/impl}/ActiveCall.h (81%) rename {src/model => call-ui/model/impl}/BatteryStateSource.cpp (100%) rename {src/model => call-ui/model/impl}/BatteryStateSource.h (88%) rename {src/model => call-ui/model/impl}/BluetoothManager.cpp (98%) rename {src/model => call-ui/model/impl}/BluetoothManager.h (80%) rename {src/model => call-ui/model/impl}/CallClient.cpp (100%) rename {src/model => call-ui/model/impl}/CallClient.h (82%) rename {src/model => call-ui/model/impl}/CallInfo.cpp (97%) rename {src/model => call-ui/model/impl}/CallInfo.h (86%) rename {src/model => call-ui/model/impl}/CallManager.cpp (97%) rename {src/model => call-ui/model/impl}/CallManager.h (86%) rename {src/model => call-ui/model/impl}/CallUI.cpp (95%) rename {src/model => call-ui/model/impl}/CallUI.h (78%) rename {src/model => call-ui/model/impl}/ConferenceCallInfo.cpp (96%) rename {src/model => call-ui/model/impl}/ConferenceCallInfo.h (81%) rename {src/model => call-ui/model/impl}/ConnectionStateSource.cpp (99%) rename {src/model => call-ui/model/impl}/ConnectionStateSource.h (89%) rename {src/model => call-ui/model/impl}/ContactInfo.cpp (100%) rename {src/model => call-ui/model/impl}/ContactInfo.h (83%) rename {src/model => call-ui/model/impl}/ContactInfoProvider.cpp (99%) rename {src/model => call-ui/model/impl}/ContactInfoProvider.h (78%) rename {src/model => call-ui/model/impl}/EndCall.cpp (97%) rename {src/model => call-ui/model/impl}/EndCall.h (82%) rename {src/model => call-ui/model/impl}/HdVoiceStateSource.cpp (100%) rename {src/model => call-ui/model/impl}/HdVoiceStateSource.h (85%) rename {src/model => call-ui/model/impl}/HeldCall.cpp (97%) rename {src/model => call-ui/model/impl}/HeldCall.h (83%) rename {src/model => call-ui/model/impl}/ICallManagerListener.h (76%) rename {src/model => call-ui/model/impl}/IIndicatorStateSource.h (76%) rename {src/model => call-ui/model/impl}/IncomingCall.cpp (96%) rename {src/model => call-ui/model/impl}/IncomingCall.h (82%) rename {src/model => call-ui/model/impl}/IndicatorStateProvider.cpp (96%) rename {src/model => call-ui/model/impl}/IndicatorStateProvider.h (81%) rename {src/model => call-ui/model/impl}/MsgClient.cpp (100%) rename {src/model => call-ui/model/impl}/MsgClient.h (83%) rename {src/model => call-ui/model/impl}/RejectMsg.cpp (99%) rename {src/model => call-ui/model/impl}/RejectMsg.h (81%) rename {src/model => call-ui/model/impl}/RejectMsgProvider.cpp (97%) rename {src/model => call-ui/model/impl}/RejectMsgProvider.h (79%) rename {src/model => call-ui/model/impl}/RssiStateSource.cpp (100%) rename {src/model => call-ui/model/impl}/RssiStateSource.h (88%) rename {src/model => call-ui/model/impl}/SimSlotStateSource.cpp (100%) rename {src/model => call-ui/model/impl}/SimSlotStateSource.h (85%) rename {src/model => call-ui/model/impl}/SoundManager.cpp (99%) rename {src/model => call-ui/model/impl}/SoundManager.h (86%) rename {src/model => call-ui/model/impl}/VoiceControlStateProvider.cpp (90%) rename {src/model => call-ui/model/impl}/VoiceControlStateProvider.h (83%) rename {src/model => call-ui/model/impl}/VoiceControlStateSource.cpp (98%) rename {src/model => call-ui/model/impl}/VoiceControlStateSource.h (86%) rename {src/model => call-ui/model/impl}/common.h (80%) rename {src/model => call-ui/model/impl}/helpers.h (90%) rename {src/model => call-ui/model/impl}/helpers.hpp (100%) create mode 100644 call-ui/model/impl/types.h rename {inc => call-ui}/model/types.h (67%) rename {src => call-ui}/presenters/Instance.cpp (95%) rename {inc => call-ui}/presenters/Instance.h (90%) rename {src => call-ui}/presenters/InstanceManager.cpp (92%) rename {inc => call-ui}/presenters/InstanceManager.h (82%) rename {src/presenters => call-ui/presenters/base}/Page.cpp (99%) rename {inc/presenters => call-ui/presenters/base}/Page.h (92%) rename {inc/presenters => call-ui/presenters/base}/Page.hpp (100%) create mode 100644 call-ui/presenters/base/common.h rename {src => call-ui}/presenters/common.h (78%) rename {src/presenters => call-ui/presenters/dialogs}/AcceptDialog.cpp (89%) rename {inc/presenters => call-ui/presenters/dialogs}/AcceptDialog.h (73%) create mode 100644 call-ui/presenters/dialogs/common.h rename {src/presenters => call-ui/presenters/misc}/AcceptRejectPresenter.cpp (94%) rename {inc/presenters => call-ui/presenters/misc}/AcceptRejectPresenter.h (81%) rename {src/presenters => call-ui/presenters/misc}/AccessoryPresenter.cpp (95%) rename {inc/presenters => call-ui/presenters/misc}/AccessoryPresenter.h (90%) rename {src/presenters => call-ui/presenters/misc}/AtspiHighlightHelper.cpp (98%) rename {inc/presenters => call-ui/presenters/misc}/AtspiHighlightHelper.h (89%) rename {src/presenters => call-ui/presenters/misc}/CallInfoPresenter.cpp (98%) rename {inc/presenters => call-ui/presenters/misc}/CallInfoPresenter.h (91%) rename {src/presenters => call-ui/presenters/misc}/CallStatusPresenter.cpp (98%) rename {inc/presenters => call-ui/presenters/misc}/CallStatusPresenter.h (88%) rename {src/presenters => call-ui/presenters/misc}/DeviceStatePresenter.cpp (99%) rename {inc/presenters => call-ui/presenters/misc}/DeviceStatePresenter.h (80%) rename {src/presenters => call-ui/presenters/misc}/IndicatorPresenter.cpp (99%) rename {inc/presenters => call-ui/presenters/misc}/IndicatorPresenter.h (89%) rename {src/presenters => call-ui/presenters/misc}/MoreOptionsPresenter.cpp (98%) rename {inc/presenters => call-ui/presenters/misc}/MoreOptionsPresenter.h (90%) rename {src/presenters => call-ui/presenters/misc}/MotionSensorPresenter.cpp (94%) rename {inc/presenters => call-ui/presenters/misc}/MotionSensorPresenter.h (73%) rename {src/presenters => call-ui/presenters/misc}/RejectMsgPresenter.cpp (94%) rename {inc/presenters => call-ui/presenters/misc}/RejectMsgPresenter.h (75%) create mode 100644 call-ui/presenters/misc/common.h rename {src/presenters => call-ui/presenters/misc}/helpers.cpp (100%) rename {src/presenters => call-ui/presenters/misc}/helpers.h (87%) create mode 100644 call-ui/presenters/misc/types.h rename {src/presenters => call-ui/presenters/pages}/KeypadPage.cpp (96%) rename {inc/presenters => call-ui/presenters/pages}/KeypadPage.h (85%) rename {src/presenters => call-ui/presenters/pages}/MainPage.cpp (96%) rename {inc/presenters => call-ui/presenters/pages}/MainPage.h (82%) create mode 100644 call-ui/presenters/pages/common.h create mode 100644 call-ui/presenters/types.h rename {src => call-ui}/resources.cpp (99%) rename {inc => call-ui}/resources.h (96%) rename {src => call-ui}/types.cpp (100%) rename {inc => call-ui}/types.h (92%) rename {src => call-ui}/view/AcceptRejectWidget.cpp (99%) rename {inc => call-ui}/view/AcceptRejectWidget.h (96%) rename {src => call-ui}/view/Slider.cpp (98%) rename {inc => call-ui}/view/Slider.h (90%) rename {src => call-ui}/view/VolumeControl.cpp (95%) rename {inc => call-ui}/view/VolumeControl.h (80%) rename {src => call-ui}/view/common.h (85%) rename {src => call-ui}/view/helpers.cpp (99%) rename {inc => call-ui}/view/helpers.h (94%) rename {inc => call-ui}/view/types.h (65%) delete mode 100644 inc/presenters/types.h delete mode 100644 src/model/implTypes.h diff --git a/.cproject b/.cproject index c3ed9e8..74dfbc8 100644 --- a/.cproject +++ b/.cproject @@ -24,13 +24,13 @@ - + - + - @@ -424,15 +525,106 @@ - + + + - - - + @@ -780,9 +963,8 @@ - + - diff --git a/src/common.h b/call-ui/common.h similarity index 88% rename from src/common.h rename to call-ui/common.h index 1d8b345..43fd570 100644 --- a/src/common.h +++ b/call-ui/common.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_COMMON_H__ -#define __CALLUI_COMMON_H__ +#ifndef __CALL_UI_COMMON_H__ +#define __CALL_UI_COMMON_H__ #include @@ -37,8 +37,10 @@ namespace callui { using namespace ucl; + constexpr auto PACKAGE = "w-call-ui"; + constexpr SmartEvent WIN_POWER_KEY_UP_EVENT {"callui,powerkey,up"}; } -#endif // __CALLUI_COMMON_H__ +#endif // __CALL_UI_COMMON_H__ diff --git a/inc/config.h b/call-ui/config.h similarity index 85% rename from inc/config.h rename to call-ui/config.h index fd664e0..4950266 100644 --- a/inc/config.h +++ b/call-ui/config.h @@ -14,18 +14,16 @@ * limitations under the License. */ -#ifndef __CALLUI_CONFIG_H__ -#define __CALLUI_CONFIG_H__ +#ifndef __CALL_UI_CONFIG_H__ +#define __CALL_UI_CONFIG_H__ #define CALLUI_LOG_TAG "CALLUI" namespace callui { - constexpr auto PACKAGE = "w-call-ui"; - constexpr auto WINDOW_NAME = "org.tizen.call-ui"; constexpr auto BASE_SCALE = 1.3; } -#endif // __CALLUI_CONFIG_H__ +#endif // __CALL_UI_CONFIG_H__ diff --git a/src/helpers.h b/call-ui/helpers.h similarity index 91% rename from src/helpers.h rename to call-ui/helpers.h index 4bb49d6..85c104f 100644 --- a/src/helpers.h +++ b/call-ui/helpers.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_HELPERS_H__ -#define __CALLUI_HELPERS_H__ +#ifndef __CALL_UI_HELPERS_H__ +#define __CALL_UI_HELPERS_H__ #include "types.h" @@ -33,4 +33,4 @@ namespace callui { namespace util { #include "helpers.hpp" -#endif // __CALLUI_HELPERS_H__ +#endif // __CALL_UI_HELPERS_H__ diff --git a/src/helpers.hpp b/call-ui/helpers.hpp similarity index 100% rename from src/helpers.hpp rename to call-ui/helpers.hpp diff --git a/src/main.cpp b/call-ui/main.cpp similarity index 100% rename from src/main.cpp rename to call-ui/main.cpp diff --git a/src/model/CallUIBuilder.cpp b/call-ui/model/CallUIBuilder.cpp similarity index 91% rename from src/model/CallUIBuilder.cpp rename to call-ui/model/CallUIBuilder.cpp index 5a9d5ba..0168cbb 100644 --- a/src/model/CallUIBuilder.cpp +++ b/call-ui/model/CallUIBuilder.cpp @@ -14,11 +14,11 @@ * limitations under the License. */ -#include "model/CallUIBuilder.h" +#include "CallUIBuilder.h" -#include "CallUI.h" +#include "impl/CallUI.h" -#include "common.h" +#include "call-ui/common.h" namespace callui { diff --git a/inc/model/CallUIBuilder.h b/call-ui/model/CallUIBuilder.h similarity index 78% rename from inc/model/CallUIBuilder.h rename to call-ui/model/CallUIBuilder.h index ddcb11e..bf23998 100644 --- a/inc/model/CallUIBuilder.h +++ b/call-ui/model/CallUIBuilder.h @@ -14,13 +14,17 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_CALL_UI_BUILDER_H__ -#define __CALLUI_MODEL_CALL_UI_BUILDER_H__ +#ifndef __CALL_UI_MODEL_CALL_UI_BUILDER_H__ +#define __CALL_UI_MODEL_CALL_UI_BUILDER_H__ + +#include "ICallUI.h" #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(CallUIBuilder); + class CallUIBuilder { public: CallUIBuilder(); @@ -29,4 +33,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_CALL_UI_BUILDER_H__ +#endif // __CALL_UI_MODEL_CALL_UI_BUILDER_H__ diff --git a/inc/model/IActiveCall.h b/call-ui/model/IActiveCall.h similarity index 80% rename from inc/model/IActiveCall.h rename to call-ui/model/IActiveCall.h index 2d58a09..1e1db18 100644 --- a/inc/model/IActiveCall.h +++ b/call-ui/model/IActiveCall.h @@ -14,13 +14,18 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_ACTIVE_CALL_H__ -#define __CALLUI_MODEL_I_ACTIVE_CALL_H__ +#ifndef __CALL_UI_MODEL_I_ACTIVE_CALL_H__ +#define __CALL_UI_MODEL_I_ACTIVE_CALL_H__ + +#include "ICallInfo.h" +#include "IConferenceCallInfo.h" #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(IActiveCall); + class IActiveCall : public ucl::Polymorphic { public: virtual ICallInfoSCRef getInfo() const = 0; @@ -32,4 +37,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_I_ACTIVE_CALL_H__ +#endif // __CALL_UI_MODEL_I_ACTIVE_CALL_H__ diff --git a/inc/model/IBaseCallInfo.h b/call-ui/model/IBaseCallInfo.h similarity index 84% rename from inc/model/IBaseCallInfo.h rename to call-ui/model/IBaseCallInfo.h index 3d1dd6a..4987d99 100644 --- a/inc/model/IBaseCallInfo.h +++ b/call-ui/model/IBaseCallInfo.h @@ -14,8 +14,10 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_BASE_CALL_INFO_H__ -#define __CALLUI_MODEL_I_BASE_CALL_INFO_H__ +#ifndef __CALL_UI_MODEL_I_BASE_CALL_INFO_H__ +#define __CALL_UI_MODEL_I_BASE_CALL_INFO_H__ + +#include "IContactInfo.h" #include "types.h" @@ -30,4 +32,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_I_BASE_CALL_INFO_H__ +#endif // __CALL_UI_MODEL_I_BASE_CALL_INFO_H__ diff --git a/inc/model/ICallInfo.h b/call-ui/model/ICallInfo.h similarity index 81% rename from inc/model/ICallInfo.h rename to call-ui/model/ICallInfo.h index f0f0ba8..559d939 100644 --- a/inc/model/ICallInfo.h +++ b/call-ui/model/ICallInfo.h @@ -14,17 +14,23 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_CALL_INFO_H__ -#define __CALLUI_MODEL_I_CALL_INFO_H__ +#ifndef __CALL_UI_MODEL_I_CALL_INFO_H__ +#define __CALL_UI_MODEL_I_CALL_INFO_H__ #include "IBaseCallInfo.h" #include +#include "IConferenceCallInfo.h" + #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(ICallInfo); + + using ConfMemberList = std::vector; + class ICallInfo : public IBaseCallInfo { public: virtual struct tm getDuration() const = 0; @@ -41,4 +47,4 @@ namespace callui { bool isUnknownCaller(const ICallInfo &info); } -#endif // __CALLUI_MODEL_I_CALL_INFO_H__ +#endif // __CALL_UI_MODEL_I_CALL_INFO_H__ diff --git a/inc/model/ICallListener.h b/call-ui/model/ICallListener.h similarity index 82% rename from inc/model/ICallListener.h rename to call-ui/model/ICallListener.h index 0c72b73..a1e5931 100644 --- a/inc/model/ICallListener.h +++ b/call-ui/model/ICallListener.h @@ -14,13 +14,15 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_CALL_LISTENER_H__ -#define __CALLUI_MODEL_I_CALL_LISTENER_H__ +#ifndef __CALL_UI_MODEL_I_CALL_LISTENER_H__ +#define __CALL_UI_MODEL_I_CALL_LISTENER_H__ #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(ICallListener); + class ICallListener : public ucl::Polymorphic { public: virtual void onCallEvent(CallEventType type) = 0; @@ -29,4 +31,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_I_CALL_LISTENER_H__ +#endif // __CALL_UI_MODEL_I_CALL_LISTENER_H__ diff --git a/inc/model/ICallManager.h b/call-ui/model/ICallManager.h similarity index 76% rename from inc/model/ICallManager.h rename to call-ui/model/ICallManager.h index 6fbcaa6..bbd1a06 100644 --- a/inc/model/ICallManager.h +++ b/call-ui/model/ICallManager.h @@ -14,13 +14,22 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_STATE_PROVIDER_H__ -#define __CALLUI_MODEL_I_STATE_PROVIDER_H__ +#ifndef __CALL_UI_MODEL_I_STATE_PROVIDER_H__ +#define __CALL_UI_MODEL_I_STATE_PROVIDER_H__ + +#include "types.h" + +#include "IIncomingCall.h" +#include "IActiveCall.h" +#include "IHeldCall.h" +#include "IEndCall.h" #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(ICallManager); + class ICallManager : public ucl::Polymorphic { public: virtual IIncomingCallSRef getIncomingCall() = 0; @@ -31,4 +40,4 @@ namespace callui { }; } -#endif // __CALLUI_MODEL_I_STATE_PROVIDER_H__ +#endif // __CALL_UI_MODEL_I_STATE_PROVIDER_H__ diff --git a/inc/model/ICallUI.h b/call-ui/model/ICallUI.h similarity index 79% rename from inc/model/ICallUI.h rename to call-ui/model/ICallUI.h index 06deda1..e94cb11 100644 --- a/inc/model/ICallUI.h +++ b/call-ui/model/ICallUI.h @@ -14,15 +14,22 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_CALL_UI_H__ -#define __CALLUI_MODEL_I_CALL_UI_H__ +#ifndef __CALL_UI_MODEL_I_CALL_UI_H__ +#define __CALL_UI_MODEL_I_CALL_UI_H__ #include +#include "ISoundManager.h" +#include "ICallManager.h" +#include "IIndicatorStateProvider.h" +#include "ICallListener.h" + #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(ICallUI); + class ICallUI : public ucl::Polymorphic { public: virtual void setListener(const ICallListenerWRef &listener) = 0; @@ -33,4 +40,4 @@ namespace callui { }; } -#endif // __CALLUI_MODEL_I_CALL_UI_H__ +#endif // __CALL_UI_MODEL_I_CALL_UI_H__ diff --git a/inc/model/IConferenceCallInfo.h b/call-ui/model/IConferenceCallInfo.h similarity index 78% rename from inc/model/IConferenceCallInfo.h rename to call-ui/model/IConferenceCallInfo.h index c2c24b9..387dc7b 100644 --- a/inc/model/IConferenceCallInfo.h +++ b/call-ui/model/IConferenceCallInfo.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_CONFERENCE_CALL_INFO_H__ -#define __CALLUI_MODEL_I_CONFERENCE_CALL_INFO_H__ +#ifndef __CALL_UI_MODEL_I_CONFERENCE_CALL_INFO_H__ +#define __CALL_UI_MODEL_I_CONFERENCE_CALL_INFO_H__ #include "IBaseCallInfo.h" @@ -23,8 +23,10 @@ namespace callui { + UCL_DECLARE_REF_ALIASES(IConferenceCallInfo); + class IConferenceCallInfo : public IBaseCallInfo { }; } -#endif // __CALLUI_MODEL_I_CONFERENCE_CALL_INFO_H__ +#endif // __CALL_UI_MODEL_I_CONFERENCE_CALL_INFO_H__ diff --git a/inc/model/IContactInfo.h b/call-ui/model/IContactInfo.h similarity index 83% rename from inc/model/IContactInfo.h rename to call-ui/model/IContactInfo.h index a71fc9c..0af6b74 100644 --- a/inc/model/IContactInfo.h +++ b/call-ui/model/IContactInfo.h @@ -14,13 +14,15 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_CONTACT_INFO_H__ -#define __CALLUI_MODEL_I_CONTACT_INFO_H__ +#ifndef __CALL_UI_MODEL_I_CONTACT_INFO_H__ +#define __CALL_UI_MODEL_I_CONTACT_INFO_H__ #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(IContactInfo); + class IContactInfo : public ucl::Polymorphic { public: virtual const std::string &getName() const = 0; @@ -29,4 +31,4 @@ namespace callui { }; } -#endif // __CALLUI_MODEL_I_CONTACT_INFO_H__ +#endif // __CALL_UI_MODEL_I_CONTACT_INFO_H__ diff --git a/inc/model/IEndCall.h b/call-ui/model/IEndCall.h similarity index 82% rename from inc/model/IEndCall.h rename to call-ui/model/IEndCall.h index bb16cab..39d2b66 100644 --- a/inc/model/IEndCall.h +++ b/call-ui/model/IEndCall.h @@ -14,13 +14,17 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_END_CALL_H__ -#define __CALLUI_MODEL_I_END_CALL_H__ +#ifndef __CALL_UI_MODEL_I_END_CALL_H__ +#define __CALL_UI_MODEL_I_END_CALL_H__ + +#include "ICallInfo.h" #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(IEndCall); + class IEndCall : public ucl::Polymorphic { public: virtual ICallInfoSCRef getInfo() const = 0; @@ -29,4 +33,4 @@ namespace callui { }; } -#endif // __CALLUI_MODEL_I_END_CALL_H__ +#endif // __CALL_UI_MODEL_I_END_CALL_H__ diff --git a/inc/model/IHeldCall.h b/call-ui/model/IHeldCall.h similarity index 81% rename from inc/model/IHeldCall.h rename to call-ui/model/IHeldCall.h index 030ae5d..5a7d1a0 100644 --- a/inc/model/IHeldCall.h +++ b/call-ui/model/IHeldCall.h @@ -14,13 +14,18 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_HELD_CALL_H__ -#define __CALLUI_MODEL_I_HELD_CALL_H__ +#ifndef __CALL_UI_MODEL_I_HELD_CALL_H__ +#define __CALL_UI_MODEL_I_HELD_CALL_H__ + +#include "ICallInfo.h" +#include "IConferenceCallInfo.h" #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(IHeldCall); + class IHeldCall : public ucl::Polymorphic { public: virtual ICallInfoSCRef getInfo() const = 0; @@ -32,4 +37,4 @@ namespace callui { }; } -#endif // __CALLUI_MODEL_I_HELD_CALL_H__ +#endif // __CALL_UI_MODEL_I_HELD_CALL_H__ diff --git a/inc/model/IIncomingCall.h b/call-ui/model/IIncomingCall.h similarity index 79% rename from inc/model/IIncomingCall.h rename to call-ui/model/IIncomingCall.h index 35d6b90..b90cfed 100644 --- a/inc/model/IIncomingCall.h +++ b/call-ui/model/IIncomingCall.h @@ -14,13 +14,19 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_INCOMING_CALL_H__ -#define __CALLUI_MODEL_I_INCOMING_CALL_H__ +#ifndef __CALL_UI_MODEL_I_INCOMING_CALL_H__ +#define __CALL_UI_MODEL_I_INCOMING_CALL_H__ + +#include "ICallInfo.h" +#include "IRejectMsgProvider.h" +#include "IRejectMsg.h" #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(IIncomingCall); + class IIncomingCall : public ucl::Polymorphic { public: virtual ICallInfoSCRef getInfo() const = 0; @@ -32,4 +38,4 @@ namespace callui { }; } -#endif // __CALLUI_MODEL_I_INCOMING_CALL_H__ +#endif // __CALL_UI_MODEL_I_INCOMING_CALL_H__ diff --git a/inc/model/IIndicatorStateListener.h b/call-ui/model/IIndicatorStateListener.h similarity index 78% rename from inc/model/IIndicatorStateListener.h rename to call-ui/model/IIndicatorStateListener.h index 3f88a75..cf45cbd 100644 --- a/inc/model/IIndicatorStateListener.h +++ b/call-ui/model/IIndicatorStateListener.h @@ -14,13 +14,15 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_INDICATOR_STATE_LISTENER_H__ -#define __CALLUI_MODEL_I_INDICATOR_STATE_LISTENER_H__ +#ifndef __CALL_UI_MODEL_I_INDICATOR_STATE_LISTENER_H__ +#define __CALL_UI_MODEL_I_INDICATOR_STATE_LISTENER_H__ #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(IIndicatorStateListener); + class IIndicatorStateListener: public ucl::Polymorphic { public: virtual void onStateChanged(IndicatorProperty property) = 0; @@ -28,4 +30,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_I_INDICATOR_STATE_LISTENER_H__ +#endif // __CALL_UI_MODEL_I_INDICATOR_STATE_LISTENER_H__ diff --git a/inc/model/IIndicatorStateProvider.h b/call-ui/model/IIndicatorStateProvider.h similarity index 75% rename from inc/model/IIndicatorStateProvider.h rename to call-ui/model/IIndicatorStateProvider.h index 11255b6..391c0ec 100644 --- a/inc/model/IIndicatorStateProvider.h +++ b/call-ui/model/IIndicatorStateProvider.h @@ -14,14 +14,18 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_INDICATOR_STATE_PROVIDER_H__ -#define __CALLUI_MODEL_I_INDICATOR_STATE_PROVIDER_H__ +#ifndef __CALL_UI_MODEL_I_INDICATOR_STATE_PROVIDER_H__ +#define __CALL_UI_MODEL_I_INDICATOR_STATE_PROVIDER_H__ + +#include "IndicatorState.h" +#include "IIndicatorStateListener.h" -#include #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(IIndicatorStateProvider); + class IIndicatorStateProvider : public ucl::Polymorphic { public: virtual IndicatorState getState(IndicatorProperty property) const = 0; @@ -30,4 +34,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_I_INDICATOR_STATE_PROVIDER_H__ +#endif // __CALL_UI_MODEL_I_INDICATOR_STATE_PROVIDER_H__ diff --git a/inc/model/IRejectMsg.h b/call-ui/model/IRejectMsg.h similarity index 82% rename from inc/model/IRejectMsg.h rename to call-ui/model/IRejectMsg.h index 364fc1c..a250e44 100644 --- a/inc/model/IRejectMsg.h +++ b/call-ui/model/IRejectMsg.h @@ -14,13 +14,15 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_REJECT_MSG_H__ -#define __CALLUI_MODEL_I_REJECT_MSG_H__ +#ifndef __CALL_UI_MODEL_I_REJECT_MSG_H__ +#define __CALL_UI_MODEL_I_REJECT_MSG_H__ #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(IRejectMsg); + class IRejectMsg : public ucl::Polymorphic { public: virtual std::string getText() const = 0; @@ -29,4 +31,4 @@ namespace callui { } -#endif // __CALLUI_I_REJECT_MSG_H__ +#endif // __CALL_UI_I_REJECT_MSG_H__ diff --git a/inc/model/IRejectMsgProvider.h b/call-ui/model/IRejectMsgProvider.h similarity index 73% rename from inc/model/IRejectMsgProvider.h rename to call-ui/model/IRejectMsgProvider.h index 15db628..6e7ffd0 100644 --- a/inc/model/IRejectMsgProvider.h +++ b/call-ui/model/IRejectMsgProvider.h @@ -14,14 +14,21 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_REJECT_MSG_PROVIDER_H__ -#define __CALLUI_MODEL_I_REJECT_MSG_PROVIDER_H__ +#ifndef __CALL_UI_MODEL_I_REJECT_MSG_PROVIDER_H__ +#define __CALL_UI_MODEL_I_REJECT_MSG_PROVIDER_H__ + +#include "IRejectMsg.h" #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(IRejectMsgProvider); + class IRejectMsgProvider : public ucl::Polymorphic { + public: + using RejectMsgList = std::vector; + public: virtual RejectMsgList getMsgList() const = 0; virtual int getMsgCount() const = 0; @@ -29,4 +36,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_I_REJECT_MSG_PROVIDER_H__ +#endif // __CALL_UI_MODEL_I_REJECT_MSG_PROVIDER_H__ diff --git a/inc/model/ISoundManager.h b/call-ui/model/ISoundManager.h similarity index 91% rename from inc/model/ISoundManager.h rename to call-ui/model/ISoundManager.h index bced75a..6b4e54c 100644 --- a/inc/model/ISoundManager.h +++ b/call-ui/model/ISoundManager.h @@ -14,13 +14,15 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_SOUND_MANAGER_H__ -#define __CALLUI_MODEL_I_SOUND_MANAGER_H__ +#ifndef __CALL_UI_MODEL_I_SOUND_MANAGER_H__ +#define __CALL_UI_MODEL_I_SOUND_MANAGER_H__ #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(ISoundManager); + class ISoundManager: public ucl::Polymorphic { public: virtual ucl::Result setSpeakerState(bool isEnable) = 0; @@ -54,4 +56,4 @@ namespace callui { }; } -#endif // __CALLUI_MODEL_I_SOUND_MANAGER_H__ +#endif // __CALL_UI_MODEL_I_SOUND_MANAGER_H__ diff --git a/inc/model/IndicatorState.h b/call-ui/model/IndicatorState.h similarity index 89% rename from inc/model/IndicatorState.h rename to call-ui/model/IndicatorState.h index da7e45f..1fa6a05 100644 --- a/inc/model/IndicatorState.h +++ b/call-ui/model/IndicatorState.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_INDICATOR_STATE_H__ -#define __CALLUI_MODEL_INDICATOR_STATE_H__ +#ifndef __CALL_UI_MODEL_INDICATOR_STATE_H__ +#define __CALL_UI_MODEL_INDICATOR_STATE_H__ #include "types.h" @@ -38,4 +38,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_INDICATOR_STATE_H__ +#endif // __CALL_UI_MODEL_INDICATOR_STATE_H__ diff --git a/src/model/ActiveCall.cpp b/call-ui/model/impl/ActiveCall.cpp similarity index 97% rename from src/model/ActiveCall.cpp rename to call-ui/model/impl/ActiveCall.cpp index 7e19f94..898fab0 100644 --- a/src/model/ActiveCall.cpp +++ b/call-ui/model/impl/ActiveCall.cpp @@ -16,11 +16,7 @@ #include "ActiveCall.h" -#include - #include "CallManager.h" -#include "CallClient.h" -#include "CallInfo.h" #include "common.h" diff --git a/src/model/ActiveCall.h b/call-ui/model/impl/ActiveCall.h similarity index 81% rename from src/model/ActiveCall.h rename to call-ui/model/impl/ActiveCall.h index ee2e22e..e005f7d 100644 --- a/src/model/ActiveCall.h +++ b/call-ui/model/impl/ActiveCall.h @@ -14,17 +14,24 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_ACTIVE_CALL_H__ -#define __CALLUI_MODEL_ACTIVE_CALL_H__ +#ifndef __CALL_UI_MODEL_IMPL_ACTIVE_CALL_H__ +#define __CALL_UI_MODEL_IMPL_ACTIVE_CALL_H__ #include -#include "model/IActiveCall.h" +#include "call-ui/model/IActiveCall.h" -#include "implTypes.h" +#include "CallClient.h" +#include "CallInfo.h" + +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(CallManager); + + UCL_DECLARE_REF_ALIASES(ActiveCall); + class ActiveCall final : public IActiveCall { public: static ActiveCallSRef newInstance(CallManagerWRef cm, cm_call_data_h callData); @@ -52,4 +59,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_ACTIVE_CALL_H__ +#endif // __CALL_UI_MODEL_IMPL_ACTIVE_CALL_H__ diff --git a/src/model/BatteryStateSource.cpp b/call-ui/model/impl/BatteryStateSource.cpp similarity index 100% rename from src/model/BatteryStateSource.cpp rename to call-ui/model/impl/BatteryStateSource.cpp diff --git a/src/model/BatteryStateSource.h b/call-ui/model/impl/BatteryStateSource.h similarity index 88% rename from src/model/BatteryStateSource.h rename to call-ui/model/impl/BatteryStateSource.h index 09c2a79..47b30c9 100644 --- a/src/model/BatteryStateSource.h +++ b/call-ui/model/impl/BatteryStateSource.h @@ -14,17 +14,19 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_BATTERY_STATE_SOURCE_H__ -#define __CALLUI_MODEL_BATTERY_STATE_SOURCE_H__ - -#include "IIndicatorStateSource.h" +#ifndef __CALL_UI_MODEL_IMPL_BATTERY_STATE_SOURCE_H__ +#define __CALL_UI_MODEL_IMPL_BATTERY_STATE_SOURCE_H__ #include -#include "implTypes.h" +#include "IIndicatorStateSource.h" + +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(BatteryStateSource); + class BatteryStateSource final : public IIndicatorStateSource { public: static BatteryStateSourceSRef newInstance(); @@ -73,4 +75,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_BATTERY_STATE_SOURCE_H__ +#endif // __CALL_UI_MODEL_IMPL_BATTERY_STATE_SOURCE_H__ diff --git a/src/model/BluetoothManager.cpp b/call-ui/model/impl/BluetoothManager.cpp similarity index 98% rename from src/model/BluetoothManager.cpp rename to call-ui/model/impl/BluetoothManager.cpp index 27bdaed..a9144b3 100644 --- a/src/model/BluetoothManager.cpp +++ b/call-ui/model/impl/BluetoothManager.cpp @@ -25,8 +25,6 @@ namespace callui { namespace { namespace impl { - using namespace ucl; - constexpr auto BT_VOLUME_MAX = 15; }}} @@ -117,7 +115,7 @@ namespace callui { } void BluetoothManager::setVolumeStateHandler( - const BluetoothVolumeHandler &handler) + const VolumeStateHandler &handler) { m_btVolumeHandler = handler; } diff --git a/src/model/BluetoothManager.h b/call-ui/model/impl/BluetoothManager.h similarity index 80% rename from src/model/BluetoothManager.h rename to call-ui/model/impl/BluetoothManager.h index e020a1c..35029e2 100644 --- a/src/model/BluetoothManager.h +++ b/call-ui/model/impl/BluetoothManager.h @@ -14,16 +14,21 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_BLUETOOTH_MANAGER_H__ -#define __CALLUI_MODEL_BLUETOOTH_MANAGER_H__ +#ifndef __CALL_UI_MODEL_IMPL_BLUETOOTH_MANAGER_H__ +#define __CALL_UI_MODEL_IMPL_BLUETOOTH_MANAGER_H__ #include -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(BluetoothManager); + class BluetoothManager final { + public: + using VolumeStateHandler = ucl::WeakDelegate; + public: static BluetoothManagerSRef newInstance(); @@ -31,7 +36,7 @@ namespace callui { int getMaxVolume() const; ucl::Result setVolume(int volume); - void setVolumeStateHandler(const BluetoothVolumeHandler &handler); + void setVolumeStateHandler(const VolumeStateHandler &handler); bool isHeadsetConnected() const; void setHeadsetConnectionChangeHandler(const NotiHandler &handler); @@ -58,7 +63,7 @@ namespace callui { void onHeadsetConnectionChanged(keynode_t *node); private: - BluetoothVolumeHandler m_btVolumeHandler; + VolumeStateHandler m_btVolumeHandler; NotiHandler m_btConnectionHandler; bool m_btInitialized; bool m_btAudioInitialized; @@ -66,4 +71,4 @@ namespace callui { }; } -#endif // __CALLUI_MODEL_BLUETOOTH_MANAGER_H__ +#endif // __CALL_UI_MODEL_IMPL_BLUETOOTH_MANAGER_H__ diff --git a/src/model/CallClient.cpp b/call-ui/model/impl/CallClient.cpp similarity index 100% rename from src/model/CallClient.cpp rename to call-ui/model/impl/CallClient.cpp diff --git a/src/model/CallClient.h b/call-ui/model/impl/CallClient.h similarity index 82% rename from src/model/CallClient.h rename to call-ui/model/impl/CallClient.h index 6a375ae..9f430ed 100644 --- a/src/model/CallClient.h +++ b/call-ui/model/impl/CallClient.h @@ -14,15 +14,17 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_CALL_CLIENT_H__ -#define __CALLUI_MODEL_CALL_CLIENT_H__ +#ifndef __CALL_UI_MODEL_IMPL_CALL_CLIENT_H__ +#define __CALL_UI_MODEL_IMPL_CALL_CLIENT_H__ #include -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(CallClient); + class CallClient { public: static CallClientSRef newInstance(); @@ -40,4 +42,4 @@ namespace callui { }; } -#endif // __CALLUI_MODEL_CALL_CLIENT_H__ +#endif // __CALL_UI_MODEL_IMPL_CALL_CLIENT_H__ diff --git a/src/model/CallInfo.cpp b/call-ui/model/impl/CallInfo.cpp similarity index 97% rename from src/model/CallInfo.cpp rename to call-ui/model/impl/CallInfo.cpp index 2f7a1d3..53804b5 100644 --- a/src/model/CallInfo.cpp +++ b/call-ui/model/impl/CallInfo.cpp @@ -16,16 +16,10 @@ #include "CallInfo.h" -#include #include #include #include -#include "CallClient.h" -#include "ContactInfoProvider.h" -#include "ContactInfo.h" -#include "ConferenceCallInfo.h" - #include "common.h" namespace callui { namespace { namespace impl { diff --git a/src/model/CallInfo.h b/call-ui/model/impl/CallInfo.h similarity index 86% rename from src/model/CallInfo.h rename to call-ui/model/impl/CallInfo.h index 345a6f7..5fe7ee0 100644 --- a/src/model/CallInfo.h +++ b/call-ui/model/impl/CallInfo.h @@ -14,17 +14,23 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_CALL_INFO_H__ -#define __CALLUI_MODEL_CALL_INFO_H__ +#ifndef __CALL_UI_MODEL_IMPL_CALL_INFO_H__ +#define __CALL_UI_MODEL_IMPL_CALL_INFO_H__ #include -#include "model/ICallInfo.h" +#include "call-ui/model/ICallInfo.h" -#include "implTypes.h" +#include "CallClient.h" +#include "ContactInfoProvider.h" +#include "ConferenceCallInfo.h" + +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(CallInfo); + class CallInfo final : public ICallInfo { public: static CallInfoSRef newInstance(CallClient &client, @@ -70,4 +76,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_CALL_INFO_H__ +#endif // __CALL_UI_MODEL_IMPL_CALL_INFO_H__ diff --git a/src/model/CallManager.cpp b/call-ui/model/impl/CallManager.cpp similarity index 97% rename from src/model/CallManager.cpp rename to call-ui/model/impl/CallManager.cpp index 8c9c7bd..b0eb13a 100644 --- a/src/model/CallManager.cpp +++ b/call-ui/model/impl/CallManager.cpp @@ -16,20 +16,6 @@ #include "CallManager.h" -#include "ICallManagerListener.h" - -#include "CallClient.h" -#include "RejectMsgProvider.h" -#include "IncomingCall.h" -#include "ActiveCall.h" -#include "HeldCall.h" -#include "EndCall.h" - -#include "ContactInfoProvider.h" - -#include "CallInfo.h" -#include "ConferenceCallInfo.h" - #include "common.h" namespace callui { namespace { namespace impl { diff --git a/src/model/CallManager.h b/call-ui/model/impl/CallManager.h similarity index 86% rename from src/model/CallManager.h rename to call-ui/model/impl/CallManager.h index 985a7b8..b73acb8 100644 --- a/src/model/CallManager.h +++ b/call-ui/model/impl/CallManager.h @@ -14,17 +14,27 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_CALL_MANAGER_H__ -#define __CALLUI_MODEL_CALL_MANAGER_H__ +#ifndef __CALL_UI_MODEL_IMPL_CALL_MANAGER_H__ +#define __CALL_UI_MODEL_IMPL_CALL_MANAGER_H__ #include -#include "model/ICallManager.h" +#include "call-ui/model/ICallManager.h" -#include "implTypes.h" +#include "ICallManagerListener.h" +#include "CallClient.h" +#include "RejectMsgProvider.h" +#include "IncomingCall.h" +#include "ActiveCall.h" +#include "HeldCall.h" +#include "EndCall.h" + +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(CallManager); + class CallManager final : public ucl::RefCountAware, public ICallManager { @@ -95,4 +105,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_CALL_MANAGER_H__ +#endif // __CALL_UI_MODEL_IMPL_CALL_MANAGER_H__ diff --git a/src/model/CallUI.cpp b/call-ui/model/impl/CallUI.cpp similarity index 95% rename from src/model/CallUI.cpp rename to call-ui/model/impl/CallUI.cpp index 11eb494..4c91a65 100644 --- a/src/model/CallUI.cpp +++ b/call-ui/model/impl/CallUI.cpp @@ -18,13 +18,6 @@ #include -#include "model/ICallListener.h" -#include "model/IIncomingCall.h" -#include "model/IActiveCall.h" -#include "model/IHeldCall.h" -#include "model/IEndCall.h" -#include "model/ICallInfo.h" - #include "CallClient.h" #include "CallManager.h" #include "SoundManager.h" @@ -32,13 +25,6 @@ #include "VoiceControlStateProvider.h" #include "IndicatorStateProvider.h" -#include "ConnectionStateSource.h" -#include "RssiStateSource.h" -#include "BatteryStateSource.h" -#include "VoiceControlStateSource.h" -#include "SimSlotStateSource.h" -#include "HdVoiceStateSource.h" - #include "common.h" namespace callui { diff --git a/src/model/CallUI.h b/call-ui/model/impl/CallUI.h similarity index 78% rename from src/model/CallUI.h rename to call-ui/model/impl/CallUI.h index 1be1aa3..dc62078 100644 --- a/src/model/CallUI.h +++ b/call-ui/model/impl/CallUI.h @@ -14,19 +14,28 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_CALL_UI_H__ -#define __CALLUI_MODEL_CALL_UI_H__ +#ifndef __CALL_UI_MODEL_IMPL_CALL_UI_H__ +#define __CALL_UI_MODEL_IMPL_CALL_UI_H__ -#include "model/ICallUI.h" +#include "call-ui/model/ICallUI.h" +#include "CallManager.h" #include "ICallManagerListener.h" - -#include "types.h" +#include "SoundManager.h" +#include "ConnectionStateSource.h" +#include "RssiStateSource.h" +#include "BatteryStateSource.h" +#include "VoiceControlStateSource.h" +#include "SimSlotStateSource.h" +#include "HdVoiceStateSource.h" +#include "IndicatorStateProvider.h" +#include "VoiceControlStateProvider.h" + +#include "call-ui/model/types.h" namespace callui { - UCL_DECLARE_REF_ALIASES(CallManager); - UCL_DECLARE_REF_ALIASES(SoundManager); + UCL_DECLARE_REF_ALIASES(CallUI); class CallUI final : public ucl::RefCountAware, @@ -75,4 +84,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_CALL_UI_H__ +#endif // __CALL_UI_MODEL_IMPL_CALL_UI_H__ diff --git a/src/model/ConferenceCallInfo.cpp b/call-ui/model/impl/ConferenceCallInfo.cpp similarity index 96% rename from src/model/ConferenceCallInfo.cpp rename to call-ui/model/impl/ConferenceCallInfo.cpp index fcc88ef..d20592c 100644 --- a/src/model/ConferenceCallInfo.cpp +++ b/call-ui/model/impl/ConferenceCallInfo.cpp @@ -16,11 +16,6 @@ #include "ConferenceCallInfo.h" -#include - -#include "ContactInfoProvider.h" -#include "ContactInfo.h" - #include "common.h" namespace callui { diff --git a/src/model/ConferenceCallInfo.h b/call-ui/model/impl/ConferenceCallInfo.h similarity index 81% rename from src/model/ConferenceCallInfo.h rename to call-ui/model/impl/ConferenceCallInfo.h index 8404602..940b2bc 100644 --- a/src/model/ConferenceCallInfo.h +++ b/call-ui/model/impl/ConferenceCallInfo.h @@ -14,17 +14,21 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_CONFERENCE_CALL_INFO_H__ -#define __CALLUI_MODEL_CONFERENCE_CALL_INFO_H__ +#ifndef __CALL_UI_MODEL_IMPL_CONFERENCE_CALL_INFO_H__ +#define __CALL_UI_MODEL_IMPL_CONFERENCE_CALL_INFO_H__ #include -#include "model/IConferenceCallInfo.h" +#include "call-ui/model/IConferenceCallInfo.h" -#include "implTypes.h" +#include "ContactInfoProvider.h" + +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(ConferenceCallInfo); + class ConferenceCallInfo final : public IConferenceCallInfo { public: static ConferenceCallInfoSRef newInstance( @@ -52,4 +56,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_CONFERENCE_CALL_INFO_H__ +#endif // __CALL_UI_MODEL_IMPL_CONFERENCE_CALL_INFO_H__ diff --git a/src/model/ConnectionStateSource.cpp b/call-ui/model/impl/ConnectionStateSource.cpp similarity index 99% rename from src/model/ConnectionStateSource.cpp rename to call-ui/model/impl/ConnectionStateSource.cpp index d2399e5..9044431 100644 --- a/src/model/ConnectionStateSource.cpp +++ b/call-ui/model/impl/ConnectionStateSource.cpp @@ -16,7 +16,7 @@ #include "ConnectionStateSource.h" -#include "model/IndicatorState.h" +#include "call-ui/model/IndicatorState.h" #include "common.h" diff --git a/src/model/ConnectionStateSource.h b/call-ui/model/impl/ConnectionStateSource.h similarity index 89% rename from src/model/ConnectionStateSource.h rename to call-ui/model/impl/ConnectionStateSource.h index 041e397..1a99cdb 100644 --- a/src/model/ConnectionStateSource.h +++ b/call-ui/model/impl/ConnectionStateSource.h @@ -14,17 +14,19 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_CONNECTION_STATE_SOURCE_H__ -#define __CALLUI_MODEL_CONNECTION_STATE_SOURCE_H__ +#ifndef __CALL_UI_MODEL_IMPL_CONNECTION_STATE_SOURCE_H__ +#define __CALL_UI_MODEL_IMPL_CONNECTION_STATE_SOURCE_H__ #include "IIndicatorStateSource.h" #include -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(ConnectionStateSource); + class ConnectionStateSource final : public IIndicatorStateSource { public: static ConnectionStateSourceSRef newInstance(); @@ -81,4 +83,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_CONNECTION_STATE_SOURCE_H__ +#endif // __CALL_UI_MODEL_IMPL_CONNECTION_STATE_SOURCE_H__ diff --git a/src/model/ContactInfo.cpp b/call-ui/model/impl/ContactInfo.cpp similarity index 100% rename from src/model/ContactInfo.cpp rename to call-ui/model/impl/ContactInfo.cpp index 2724f57..ef36d03 100644 --- a/src/model/ContactInfo.cpp +++ b/call-ui/model/impl/ContactInfo.cpp @@ -14,10 +14,10 @@ * limitations under the License. */ -#include - #include "ContactInfo.h" +#include + #include "common.h" namespace callui { diff --git a/src/model/ContactInfo.h b/call-ui/model/impl/ContactInfo.h similarity index 83% rename from src/model/ContactInfo.h rename to call-ui/model/impl/ContactInfo.h index 48cfad9..aa93d64 100644 --- a/src/model/ContactInfo.h +++ b/call-ui/model/impl/ContactInfo.h @@ -14,17 +14,19 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_CONTACT_INFO_H__ -#define __CALLUI_MODEL_CONTACT_INFO_H__ +#ifndef __CALL_UI_MODEL_IMPL_CONTACT_INFO_H__ +#define __CALL_UI_MODEL_IMPL_CONTACT_INFO_H__ -#include "contacts_types.h" +#include -#include "model/IContactInfo.h" +#include "call-ui/model/IContactInfo.h" -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(ContactInfo); + class ContactInfo final : public IContactInfo { public: static ContactInfoSRef newInstance(int personId, @@ -55,4 +57,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_CONTACT_INFO_H__ +#endif // __CALL_UI_MODEL_IMPL_CONTACT_INFO_H__ diff --git a/src/model/ContactInfoProvider.cpp b/call-ui/model/impl/ContactInfoProvider.cpp similarity index 99% rename from src/model/ContactInfoProvider.cpp rename to call-ui/model/impl/ContactInfoProvider.cpp index 3cffba2..3703209 100644 --- a/src/model/ContactInfoProvider.cpp +++ b/call-ui/model/impl/ContactInfoProvider.cpp @@ -20,8 +20,6 @@ #include #include -#include "ContactInfo.h" - #include "common.h" namespace callui { namespace { namespace impl { diff --git a/src/model/ContactInfoProvider.h b/call-ui/model/impl/ContactInfoProvider.h similarity index 78% rename from src/model/ContactInfoProvider.h rename to call-ui/model/impl/ContactInfoProvider.h index 9add61d..0a2e6de 100644 --- a/src/model/ContactInfoProvider.h +++ b/call-ui/model/impl/ContactInfoProvider.h @@ -14,13 +14,17 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_CONTACT_INFO_PROVIDER_H__ -#define __CALLUI_MODEL_CONTACT_INFO_PROVIDER_H__ +#ifndef __CALL_UI_MODEL_IMPL_CONTACT_INFO_PROVIDER_H__ +#define __CALL_UI_MODEL_IMPL_CONTACT_INFO_PROVIDER_H__ -#include "implTypes.h" +#include "ContactInfo.h" + +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(ContactInfoProvider); + class ContactInfoProvider { public: static ContactInfoProviderSRef newInstance(); @@ -39,4 +43,4 @@ namespace callui { }; } -#endif // __CALLUI_MODEL_CONTACT_INFO_PROVIDER_H__ +#endif // __CALL_UI_MODEL_IMPL_CONTACT_INFO_PROVIDER_H__ diff --git a/src/model/EndCall.cpp b/call-ui/model/impl/EndCall.cpp similarity index 97% rename from src/model/EndCall.cpp rename to call-ui/model/impl/EndCall.cpp index 1442ccf..4071021 100644 --- a/src/model/EndCall.cpp +++ b/call-ui/model/impl/EndCall.cpp @@ -16,9 +16,7 @@ #include "EndCall.h" -#include "CallClient.h" #include "CallManager.h" -#include "CallInfo.h" #include "common.h" diff --git a/src/model/EndCall.h b/call-ui/model/impl/EndCall.h similarity index 82% rename from src/model/EndCall.h rename to call-ui/model/impl/EndCall.h index 190d056..34c3e9c 100644 --- a/src/model/EndCall.h +++ b/call-ui/model/impl/EndCall.h @@ -14,18 +14,20 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_END_CALL_H__ -#define __CALLUI_MODEL_END_CALL_H__ +#ifndef __CALL_UI_MODEL_IMPL_END_CALL_H__ +#define __CALL_UI_MODEL_IMPL_END_CALL_H__ #include -#include "model/IEndCall.h" +#include "call-ui/model/IEndCall.h" -#include "implTypes.h" +#include "types.h" namespace callui { - class CallManager; + UCL_DECLARE_REF_ALIASES(CallManager); + + UCL_DECLARE_REF_ALIASES(EndCall); class EndCall final : public IEndCall { public: @@ -53,4 +55,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_END_CALL_H__ +#endif // __CALL_UI_MODEL_IMPL_END_CALL_H__ diff --git a/src/model/HdVoiceStateSource.cpp b/call-ui/model/impl/HdVoiceStateSource.cpp similarity index 100% rename from src/model/HdVoiceStateSource.cpp rename to call-ui/model/impl/HdVoiceStateSource.cpp diff --git a/src/model/HdVoiceStateSource.h b/call-ui/model/impl/HdVoiceStateSource.h similarity index 85% rename from src/model/HdVoiceStateSource.h rename to call-ui/model/impl/HdVoiceStateSource.h index 7b98b7e..103ba1f 100644 --- a/src/model/HdVoiceStateSource.h +++ b/call-ui/model/impl/HdVoiceStateSource.h @@ -14,13 +14,15 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_HD_VOICE_STATE_SOURCE_H__ -#define __CALLUI_MODEL_HD_VOICE_STATE_SOURCE_H__ +#ifndef __CALL_UI_MODEL_IMPL_HD_VOICE_STATE_SOURCE_H__ +#define __CALL_UI_MODEL_IMPL_HD_VOICE_STATE_SOURCE_H__ #include "IIndicatorStateSource.h" namespace callui { + UCL_DECLARE_REF_ALIASES(HdVoiceStateSource); + class HdVoiceStateSource final : public IIndicatorStateSource { public: HdVoiceStateSource(bool isEnable); @@ -51,4 +53,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_HD_VOICE_STATE_SOURCE_H__ +#endif // __CALL_UI_MODEL_IMPL_HD_VOICE_STATE_SOURCE_H__ diff --git a/src/model/HeldCall.cpp b/call-ui/model/impl/HeldCall.cpp similarity index 97% rename from src/model/HeldCall.cpp rename to call-ui/model/impl/HeldCall.cpp index 1064899..011c667 100644 --- a/src/model/HeldCall.cpp +++ b/call-ui/model/impl/HeldCall.cpp @@ -16,10 +16,7 @@ #include "HeldCall.h" -#include "CallClient.h" #include "CallManager.h" -#include "CallInfo.h" -#include "CallClient.h" #include "common.h" diff --git a/src/model/HeldCall.h b/call-ui/model/impl/HeldCall.h similarity index 83% rename from src/model/HeldCall.h rename to call-ui/model/impl/HeldCall.h index bbb7866..4d4fbc8 100644 --- a/src/model/HeldCall.h +++ b/call-ui/model/impl/HeldCall.h @@ -14,17 +14,22 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_HELD_CALL_H__ -#define __CALLUI_MODEL_HELD_CALL_H__ +#ifndef __CALL_UI_MODEL_IMPL_HELD_CALL_H__ +#define __CALL_UI_MODEL_IMPL_HELD_CALL_H__ #include -#include "model/IHeldCall.h" +#include "call-ui/model/IHeldCall.h" +#include "CallInfo.h" -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(CallManager); + + UCL_DECLARE_REF_ALIASES(HeldCall); + class HeldCall final : public IHeldCall { public: static HeldCallSRef newInstance(CallManagerWRef cm, cm_call_data_h callData); @@ -52,4 +57,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_HELD_CALL_H__ +#endif // __CALL_UI_MODEL_IMPL_HELD_CALL_H__ diff --git a/src/model/ICallManagerListener.h b/call-ui/model/impl/ICallManagerListener.h similarity index 76% rename from src/model/ICallManagerListener.h rename to call-ui/model/impl/ICallManagerListener.h index 5d66a7c..82a7609 100644 --- a/src/model/ICallManagerListener.h +++ b/call-ui/model/impl/ICallManagerListener.h @@ -14,13 +14,15 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_CALL_MANAGER_LISTENER_H__ -#define __CALLUI_MODEL_I_CALL_MANAGER_LISTENER_H__ +#ifndef __CALL_UI_MODEL_IMPL_I_CALL_MANAGER_LISTENER_H__ +#define __CALL_UI_MODEL_IMPL_I_CALL_MANAGER_LISTENER_H__ -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(ICallManagerListener); + class ICallManagerListener : public ucl::Polymorphic { public: virtual void onCallEvent(CallEventType type) = 0; @@ -29,4 +31,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_I_CALL_MANAGER_LISTENER_H__ +#endif // __CALL_UI_MODEL_IMPL_I_CALL_MANAGER_LISTENER_H__ diff --git a/src/model/IIndicatorStateSource.h b/call-ui/model/impl/IIndicatorStateSource.h similarity index 76% rename from src/model/IIndicatorStateSource.h rename to call-ui/model/impl/IIndicatorStateSource.h index 53eb2cc..7752035 100644 --- a/src/model/IIndicatorStateSource.h +++ b/call-ui/model/impl/IIndicatorStateSource.h @@ -14,15 +14,17 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_I_STATE_SOURCE_H__ -#define __CALLUI_MODEL_I_STATE_SOURCE_H__ +#ifndef __CALL_UI_MODEL_IMPL_I_STATE_SOURCE_H__ +#define __CALL_UI_MODEL_IMPL_I_STATE_SOURCE_H__ -#include "implTypes.h" +#include "types.h" -#include "model/IndicatorState.h" +#include "call-ui/model/IndicatorState.h" namespace callui { + UCL_DECLARE_REF_ALIASES(IIndicatorStateSource); + class IIndicatorStateSource : public ucl::Polymorphic { public: virtual IndicatorState getState() const = 0; @@ -30,4 +32,4 @@ namespace callui { }; } -#endif // __CALLUI_MODEL_I_STATE_SOURCE_H__ +#endif // __CALL_UI_MODEL_IMPL_I_STATE_SOURCE_H__ diff --git a/src/model/IncomingCall.cpp b/call-ui/model/impl/IncomingCall.cpp similarity index 96% rename from src/model/IncomingCall.cpp rename to call-ui/model/impl/IncomingCall.cpp index c3e784e..783446f 100644 --- a/src/model/IncomingCall.cpp +++ b/call-ui/model/impl/IncomingCall.cpp @@ -16,11 +16,7 @@ #include "IncomingCall.h" -#include "CallClient.h" #include "CallManager.h" -#include "CallClient.h" -#include "CallInfo.h" -#include "RejectMsgProvider.h" #include "RejectMsg.h" #include "common.h" diff --git a/src/model/IncomingCall.h b/call-ui/model/impl/IncomingCall.h similarity index 82% rename from src/model/IncomingCall.h rename to call-ui/model/impl/IncomingCall.h index db7c1b6..7b1e3e0 100644 --- a/src/model/IncomingCall.h +++ b/call-ui/model/impl/IncomingCall.h @@ -14,17 +14,22 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_ICOMING_CALL_H__ -#define __CALLUI_MODEL_ICOMING_CALL_H__ +#ifndef __CALL_UI_MODEL_IMPL_ICOMING_CALL_H__ +#define __CALL_UI_MODEL_IMPL_ICOMING_CALL_H__ #include -#include "model/IIncomingCall.h" +#include "call-ui/model/IIncomingCall.h" +#include "CallInfo.h" -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(CallManager); + + UCL_DECLARE_REF_ALIASES(IncomingCall); + class IncomingCall final : public IIncomingCall { public: static IncomingCallSRef newInstance(CallManagerWRef cm, cm_call_data_h callData); @@ -53,4 +58,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_ICOMING_CALL_H__ +#endif // __CALL_UI_MODEL_IMPL_ICOMING_CALL_H__ diff --git a/src/model/IndicatorStateProvider.cpp b/call-ui/model/impl/IndicatorStateProvider.cpp similarity index 96% rename from src/model/IndicatorStateProvider.cpp rename to call-ui/model/impl/IndicatorStateProvider.cpp index 4ef85e7..7c89d9b 100644 --- a/src/model/IndicatorStateProvider.cpp +++ b/call-ui/model/impl/IndicatorStateProvider.cpp @@ -16,9 +16,6 @@ #include "IndicatorStateProvider.h" -#include "model/IIndicatorStateListener.h" -#include "IIndicatorStateSource.h" - #include "common.h" namespace callui { diff --git a/src/model/IndicatorStateProvider.h b/call-ui/model/impl/IndicatorStateProvider.h similarity index 81% rename from src/model/IndicatorStateProvider.h rename to call-ui/model/impl/IndicatorStateProvider.h index fd091a6..e80d447 100644 --- a/src/model/IndicatorStateProvider.h +++ b/call-ui/model/impl/IndicatorStateProvider.h @@ -14,16 +14,18 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_INDICATOR_STATE_PROVIDER_H__ -#define __CALLUI_MODEL_INDICATOR_STATE_PROVIDER_H__ +#ifndef __CALL_UI_MODEL_IMPL_INDICATOR_STATE_PROVIDER_H__ +#define __CALL_UI_MODEL_IMPL_INDICATOR_STATE_PROVIDER_H__ -#include "model/IIndicatorStateProvider.h" +#include "call-ui/model/IIndicatorStateProvider.h" -#include "implTypes.h" +#include "IIndicatorStateSource.h" + +#include "types.h" namespace callui { - class IIndicatorStateListener; + UCL_DECLARE_REF_ALIASES(IndicatorStateProvider); class IndicatorStateProvider final: public IIndicatorStateProvider { public: @@ -60,4 +62,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_INDICATOR_STATE_PROVIDER_H__ +#endif // __CALL_UI_MODEL_IMPL_INDICATOR_STATE_PROVIDER_H__ diff --git a/src/model/MsgClient.cpp b/call-ui/model/impl/MsgClient.cpp similarity index 100% rename from src/model/MsgClient.cpp rename to call-ui/model/impl/MsgClient.cpp diff --git a/src/model/MsgClient.h b/call-ui/model/impl/MsgClient.h similarity index 83% rename from src/model/MsgClient.h rename to call-ui/model/impl/MsgClient.h index 1fdd2e0..9992820 100644 --- a/src/model/MsgClient.h +++ b/call-ui/model/impl/MsgClient.h @@ -14,15 +14,17 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_MSG_CLIENT_H__ -#define __CALLUI_MODEL_MSG_CLIENT_H__ +#ifndef __CALL_UI_MODEL_IMPL_MSG_CLIENT_H__ +#define __CALL_UI_MODEL_IMPL_MSG_CLIENT_H__ #include -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(MsgClient); + class MsgClient { public: static MsgClientSRef newInstance(); @@ -42,4 +44,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_MSG_CLIENT_H__ +#endif // __CALL_UI_MODEL_IMPL_MSG_CLIENT_H__ diff --git a/src/model/RejectMsg.cpp b/call-ui/model/impl/RejectMsg.cpp similarity index 99% rename from src/model/RejectMsg.cpp rename to call-ui/model/impl/RejectMsg.cpp index c1f6d52..e6d3fd3 100644 --- a/src/model/RejectMsg.cpp +++ b/call-ui/model/impl/RejectMsg.cpp @@ -19,8 +19,6 @@ #include #include -#include "MsgClient.h" - #include "common.h" namespace callui { diff --git a/src/model/RejectMsg.h b/call-ui/model/impl/RejectMsg.h similarity index 81% rename from src/model/RejectMsg.h rename to call-ui/model/impl/RejectMsg.h index acc4a9b..b82f19b 100644 --- a/src/model/RejectMsg.h +++ b/call-ui/model/impl/RejectMsg.h @@ -14,17 +14,21 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_REJECT_MSG_H__ -#define __CALLUI_MODEL_REJECT_MSG_H__ +#ifndef __CALL_UI_MODEL_IMPL_REJECT_MSG_H__ +#define __CALL_UI_MODEL_IMPL_REJECT_MSG_H__ -#include "model/IRejectMsg.h" +#include "call-ui/model/IRejectMsg.h" #include "ucl/misc/TString.h" -#include "implTypes.h" +#include "MsgClient.h" + +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(RejectMsg); + class RejectMsg : public IRejectMsg { public: static RejectMsgSRef newInstance(MsgClientWRef client, const ucl::TString &string); @@ -48,4 +52,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_REJECT_MSG_H__ +#endif // __CALL_UI_MODEL_IMPL_REJECT_MSG_H__ diff --git a/src/model/RejectMsgProvider.cpp b/call-ui/model/impl/RejectMsgProvider.cpp similarity index 97% rename from src/model/RejectMsgProvider.cpp rename to call-ui/model/impl/RejectMsgProvider.cpp index fe33f19..c0a4d93 100644 --- a/src/model/RejectMsgProvider.cpp +++ b/call-ui/model/impl/RejectMsgProvider.cpp @@ -18,7 +18,6 @@ #include -#include "MsgClient.h" #include "RejectMsg.h" #include "common.h" @@ -86,7 +85,7 @@ namespace callui { return msg; } - RejectMsgList RejectMsgProvider::getMsgList() const + IRejectMsgProvider::RejectMsgList RejectMsgProvider::getMsgList() const { RejectMsgList list; int count = getMsgCount(); diff --git a/src/model/RejectMsgProvider.h b/call-ui/model/impl/RejectMsgProvider.h similarity index 79% rename from src/model/RejectMsgProvider.h rename to call-ui/model/impl/RejectMsgProvider.h index b1cc8b1..e60d584 100644 --- a/src/model/RejectMsgProvider.h +++ b/call-ui/model/impl/RejectMsgProvider.h @@ -14,15 +14,19 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_REJECT_MSG_PROVIDER_H__ -#define __CALLUI_MODEL_REJECT_MSG_PROVIDER_H__ +#ifndef __CALL_UI_MODEL_IMPL_REJECT_MSG_PROVIDER_H__ +#define __CALL_UI_MODEL_IMPL_REJECT_MSG_PROVIDER_H__ -#include "model/IRejectMsgProvider.h" +#include "call-ui/model/IRejectMsgProvider.h" -#include "implTypes.h" +#include "MsgClient.h" + +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(RejectMsgProvider); + class RejectMsgProvider : public IRejectMsgProvider { public: static RejectMsgProviderSRef newInstance(); @@ -46,4 +50,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_REJECT_MSG_PROVIDER_H__ +#endif // __CALL_UI_MODEL_IMPL_REJECT_MSG_PROVIDER_H__ diff --git a/src/model/RssiStateSource.cpp b/call-ui/model/impl/RssiStateSource.cpp similarity index 100% rename from src/model/RssiStateSource.cpp rename to call-ui/model/impl/RssiStateSource.cpp diff --git a/src/model/RssiStateSource.h b/call-ui/model/impl/RssiStateSource.h similarity index 88% rename from src/model/RssiStateSource.h rename to call-ui/model/impl/RssiStateSource.h index 967bf25..f20a1ef 100644 --- a/src/model/RssiStateSource.h +++ b/call-ui/model/impl/RssiStateSource.h @@ -14,17 +14,19 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_RSSI_STATE_SOURCE_H__ -#define __CALLUI_MODEL_RSSI_STATE_SOURCE_H__ +#ifndef __CALL_UI_MODEL_IMPL_RSSI_STATE_SOURCE_H__ +#define __CALL_UI_MODEL_IMPL_RSSI_STATE_SOURCE_H__ #include "IIndicatorStateSource.h" #include -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(RssiStateSource); + class RssiStateSource final : public IIndicatorStateSource { public: static RssiStateSourceSRef newInstance(); @@ -72,4 +74,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_RSSI_STATE_SOURCE_H__ +#endif // __CALL_UI_MODEL_IMPL_RSSI_STATE_SOURCE_H__ diff --git a/src/model/SimSlotStateSource.cpp b/call-ui/model/impl/SimSlotStateSource.cpp similarity index 100% rename from src/model/SimSlotStateSource.cpp rename to call-ui/model/impl/SimSlotStateSource.cpp diff --git a/src/model/SimSlotStateSource.h b/call-ui/model/impl/SimSlotStateSource.h similarity index 85% rename from src/model/SimSlotStateSource.h rename to call-ui/model/impl/SimSlotStateSource.h index 686eb01..c1b6b32 100644 --- a/src/model/SimSlotStateSource.h +++ b/call-ui/model/impl/SimSlotStateSource.h @@ -14,13 +14,15 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_SIM_SLOT_STATE_SOURCE_H__ -#define __CALLUI_MODEL_SIM_SLOT_STATE_SOURCE_H__ +#ifndef __CALL_UI_MODEL_IMPL_SIM_SLOT_STATE_SOURCE_H__ +#define __CALL_UI_MODEL_IMPL_SIM_SLOT_STATE_SOURCE_H__ #include "IIndicatorStateSource.h" namespace callui { + UCL_DECLARE_REF_ALIASES(SimSlotStateSource); + class SimSlotStateSource final : public IIndicatorStateSource { public: SimSlotStateSource(SimSlot slot, bool isForwarded); @@ -52,4 +54,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_SIM_SLOT_STATE_SOURCE_H__ +#endif // __CALL_UI_MODEL_IMPL_SIM_SLOT_STATE_SOURCE_H__ diff --git a/src/model/SoundManager.cpp b/call-ui/model/impl/SoundManager.cpp similarity index 99% rename from src/model/SoundManager.cpp rename to call-ui/model/impl/SoundManager.cpp index dd9cb62..a29f12e 100644 --- a/src/model/SoundManager.cpp +++ b/call-ui/model/impl/SoundManager.cpp @@ -16,9 +16,6 @@ #include "SoundManager.h" -#include "BluetoothManager.h" -#include "CallClient.h" - #include "common.h" namespace callui { namespace { namespace impl { diff --git a/src/model/SoundManager.h b/call-ui/model/impl/SoundManager.h similarity index 86% rename from src/model/SoundManager.h rename to call-ui/model/impl/SoundManager.h index 4e993d8..224c90c 100644 --- a/src/model/SoundManager.h +++ b/call-ui/model/impl/SoundManager.h @@ -14,18 +14,23 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_SOUND_MANAGER_H__ -#define __CALLUI_MODEL_SOUND_MANAGER_H__ +#ifndef __CALL_UI_MODEL_IMPL_SOUND_MANAGER_H__ +#define __CALL_UI_MODEL_IMPL_SOUND_MANAGER_H__ + +#include "call-ui/model/ISoundManager.h" #include #include -#include "model/ISoundManager.h" +#include "BluetoothManager.h" +#include "CallClient.h" -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(SoundManager); + class SoundManager final : public ucl::RefCountAware, public ISoundManager { @@ -90,13 +95,13 @@ namespace callui { private: CallClientSRef m_client; BluetoothManagerSRef m_btManager; - AudioStateEvent m_audioStateEvent; - MuteStateEvent m_muteStateEvent; - VolumeLevelEvent m_volumeLevelEvent; + ucl::Event m_audioStateEvent; + ucl::Event m_muteStateEvent; + ucl::Event m_volumeLevelEvent; ucl::Event m_btVoiceDeviceConnEvent; int m_deviceVolumeCbID; }; } -#endif // __CALLUI_MODEL_SOUND_MANAGER_H__ +#endif // __CALL_UI_MODEL_IMPL_SOUND_MANAGER_H__ diff --git a/src/model/VoiceControlStateProvider.cpp b/call-ui/model/impl/VoiceControlStateProvider.cpp similarity index 90% rename from src/model/VoiceControlStateProvider.cpp rename to call-ui/model/impl/VoiceControlStateProvider.cpp index d52999d..e05f9ca 100644 --- a/src/model/VoiceControlStateProvider.cpp +++ b/call-ui/model/impl/VoiceControlStateProvider.cpp @@ -55,7 +55,8 @@ namespace callui { { auto val = 0; if (vconf_get_bool(VCONFKEY_CISSAPPL_CALL_VOICE_ANSWER, &val) != 0) { - LOG_RETURN(RES_FAIL, "vconf_get_bool() failed!"); + LOG_RETURN(RES_FAIL, "vconf_get_bool() failed!" + "err[%d]", vconf_get_ext_errno()); } updateState(val); @@ -84,7 +85,9 @@ namespace callui { if (vconf_notify_key_changed(VCONFKEY_CISSAPPL_CALL_VOICE_ANSWER, CALLBACK_B(VoiceControlStateProvider::onStateChanged), this) != 0) { - LOG_RETURN(RES_FAIL, "vconf_notify_key_changed() failed"); + + LOG_RETURN(RES_FAIL, "vconf_notify_key_changed() failed. " + "err[%d]", vconf_get_ext_errno()); } return RES_OK; } @@ -100,7 +103,8 @@ namespace callui { { auto val = 0; if (vconf_get_bool(VCONFKEY_CISSAPPL_CALL_VOICE_ANSWER, &val) != 0) { - LOG_RETURN_VOID(RES_FAIL, "vconf_get_bool() failed!"); + LOG_RETURN_VOID(RES_FAIL, "vconf_get_bool() failed!" + "err[%d]", vconf_get_ext_errno()); } if (updateState(val) && !m_event.isEmpty()) { diff --git a/src/model/VoiceControlStateProvider.h b/call-ui/model/impl/VoiceControlStateProvider.h similarity index 83% rename from src/model/VoiceControlStateProvider.h rename to call-ui/model/impl/VoiceControlStateProvider.h index f0d493c..ad37ddd 100644 --- a/src/model/VoiceControlStateProvider.h +++ b/call-ui/model/impl/VoiceControlStateProvider.h @@ -14,15 +14,17 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_VOICE_CONTROL_STATE_PROVIDER_H__ -#define __CALLUI_MODEL_VOICE_CONTROL_STATE_PROVIDER_H__ +#ifndef __CALL_UI_MODEL_IMPL_VOICE_CONTROL_STATE_PROVIDER_H__ +#define __CALL_UI_MODEL_IMPL_VOICE_CONTROL_STATE_PROVIDER_H__ #include -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(VoiceControlStateProvider); + class VoiceControlStateProvider final { public: static VoiceControlStateProviderSRef newInstance(); @@ -52,4 +54,4 @@ namespace callui { } -#endif // __CALLUI_MODEL_VOICE_CONTROL_STATE_PROVIDER_H__ +#endif // __CALL_UI_MODEL_IMPL_VOICE_CONTROL_STATE_PROVIDER_H__ diff --git a/src/model/VoiceControlStateSource.cpp b/call-ui/model/impl/VoiceControlStateSource.cpp similarity index 98% rename from src/model/VoiceControlStateSource.cpp rename to call-ui/model/impl/VoiceControlStateSource.cpp index 5009110..51d7719 100644 --- a/src/model/VoiceControlStateSource.cpp +++ b/call-ui/model/impl/VoiceControlStateSource.cpp @@ -16,8 +16,6 @@ #include "VoiceControlStateSource.h" -#include "VoiceControlStateProvider.h" - #include "common.h" namespace callui { diff --git a/src/model/VoiceControlStateSource.h b/call-ui/model/impl/VoiceControlStateSource.h similarity index 86% rename from src/model/VoiceControlStateSource.h rename to call-ui/model/impl/VoiceControlStateSource.h index b0864bb..47487e6 100644 --- a/src/model/VoiceControlStateSource.h +++ b/call-ui/model/impl/VoiceControlStateSource.h @@ -14,17 +14,19 @@ * limitations under the License. */ -#ifndef __CALLUI_VOICE_CONTROL_STATE_SOURCE_H__ -#define __CALLUI_VOICE_CONTROL_STATE_SOURCE_H__ +#ifndef __CALL_UI_VOICE_CONTROL_STATE_SOURCE_H__ +#define __CALL_UI_VOICE_CONTROL_STATE_SOURCE_H__ #include "IIndicatorStateSource.h" -#include +#include "VoiceControlStateProvider.h" -#include "implTypes.h" +#include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(VoiceControlStateSource); + class VoiceControlStateSource final : public IIndicatorStateSource, public ucl::RefCountAware { @@ -70,4 +72,4 @@ namespace callui { } -#endif // __CALLUI_VOICE_ANSWER_STATE_SOURCE_H__ +#endif // __CALL_UI_VOICE_ANSWER_STATE_SOURCE_H__ diff --git a/src/model/common.h b/call-ui/model/impl/common.h similarity index 80% rename from src/model/common.h rename to call-ui/model/impl/common.h index 569d6af..4f3d655 100644 --- a/src/model/common.h +++ b/call-ui/model/impl/common.h @@ -14,11 +14,11 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_COMMON_H__ -#define __CALLUI_MODEL_COMMON_H__ +#ifndef __CALL_UI_MODEL_IMPL_COMMON_H__ +#define __CALL_UI_MODEL_IMPL_COMMON_H__ -#include "../common.h" +#include "call-ui/common.h" #include "helpers.h" -#endif // __CALLUI_MODEL_COMMON_H__ +#endif // __CALL_UI_MODEL_IMPL_COMMON_H__ diff --git a/src/model/helpers.h b/call-ui/model/impl/helpers.h similarity index 90% rename from src/model/helpers.h rename to call-ui/model/impl/helpers.h index d92e149..7c631fb 100644 --- a/src/model/helpers.h +++ b/call-ui/model/impl/helpers.h @@ -14,13 +14,13 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_HELPERS_H__ -#define __CALLUI_MODEL_HELPERS_H__ +#ifndef __CALL_UI_MODEL_IMPL_HELPERS_H__ +#define __CALL_UI_MODEL_IMPL_HELPERS_H__ #include #include -#include "implTypes.h" +#include "types.h" namespace callui { @@ -49,4 +49,4 @@ namespace callui { #include "helpers.hpp" -#endif // __CALLUI_MODEL_HELPERS_H__ +#endif // __CALL_UI_MODEL_IMPL_HELPERS_H__ diff --git a/src/model/helpers.hpp b/call-ui/model/impl/helpers.hpp similarity index 100% rename from src/model/helpers.hpp rename to call-ui/model/impl/helpers.hpp diff --git a/call-ui/model/impl/types.h b/call-ui/model/impl/types.h new file mode 100644 index 0000000..b8fe106 --- /dev/null +++ b/call-ui/model/impl/types.h @@ -0,0 +1,43 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * 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 __CALL_UI_MODEL_IMPL_TYPES_H__ +#define __CALL_UI_MODEL_IMPL_TYPES_H__ + +#include "call-ui/model/types.h" +#include "ucl/misc/Event.h" +#include "ucl/util/smartDelegation.h" + +namespace callui { + + enum class CallReleaseType { + BY_CALL_HANDLE, + ALL, + ALL_HOLD, + ALL_ACTIVE + }; + + enum class CallManagerErr { + DIAL_CANCEL, + DIAL_FAIL, + DIAL_FAIL_SS, + DIAL_FAIL_FDN, + DIAL_FLIGHT_MODE + }; + +} + +#endif // __CALL_UI_MODEL_IMPL_IMPL_TYPES_H__ diff --git a/inc/model/types.h b/call-ui/model/types.h similarity index 67% rename from inc/model/types.h rename to call-ui/model/types.h index 3283943..32c0c4c 100644 --- a/inc/model/types.h +++ b/call-ui/model/types.h @@ -14,12 +14,12 @@ * limitations under the License. */ -#ifndef __CALLUI_MODEL_TYPES_H__ -#define __CALLUI_MODEL_TYPES_H__ +#ifndef __CALL_UI_MODEL_TYPES_H__ +#define __CALL_UI_MODEL_TYPES_H__ #include -#include "../types.h" +#include "call-ui/types.h" namespace callui { @@ -140,33 +140,10 @@ namespace callui { HD_VOICE }; - UCL_DECLARE_REF_ALIASES(ICallUI); - UCL_DECLARE_REF_ALIASES(ICallListener); + using AudioStateHandler = ucl::WeakDelegate; + using MuteStateHandler = ucl::WeakDelegate; + using VolumeLevelHandler = ucl::WeakDelegate; - UCL_DECLARE_REF_ALIASES(ICallManager); - UCL_DECLARE_REF_ALIASES(ISoundManager); - - UCL_DECLARE_REF_ALIASES(IIncomingCall); - UCL_DECLARE_REF_ALIASES(IActiveCall); - UCL_DECLARE_REF_ALIASES(IHeldCall); - UCL_DECLARE_REF_ALIASES(IEndCall); - - UCL_DECLARE_REF_ALIASES(ICallInfo); - UCL_DECLARE_REF_ALIASES(IContactInfo); - UCL_DECLARE_REF_ALIASES(IConferenceCallInfo); - - UCL_DECLARE_REF_ALIASES(IRejectMsgProvider); - UCL_DECLARE_REF_ALIASES(IRejectMsg); - - UCL_DECLARE_REF_ALIASES(IIndicatorStateProvider); - UCL_DECLARE_REF_ALIASES(IIndicatorStateListener); - - using AudioStateHandler = ucl::Delegate; - using MuteStateHandler = ucl::Delegate; - using VolumeLevelHandler = ucl::Delegate; - - using ConfMemberList = std::vector; - using RejectMsgList = std::vector; } -#endif // __CALLUI_MODEL_TYPES_H__ +#endif // __CALL_UI_MODEL_TYPES_H__ diff --git a/src/presenters/Instance.cpp b/call-ui/presenters/Instance.cpp similarity index 95% rename from src/presenters/Instance.cpp rename to call-ui/presenters/Instance.cpp index accfc96..58f62dd 100644 --- a/src/presenters/Instance.cpp +++ b/call-ui/presenters/Instance.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "presenters/Instance.h" +#include "Instance.h" #include "ucl/util/memory.h" #include "ucl/appfw/SysEventProvider.h" @@ -22,12 +22,12 @@ #include -#include "model/CallUIBuilder.h" -#include "model/ICallUI.h" -#include "model/ICallManager.h" -#include "presenters/MainPage.h" +#include "call-ui/model/CallUIBuilder.h" +#include "call-ui/model/ICallUI.h" +#include "call-ui/model/ICallManager.h" +#include "pages/MainPage.h" -#include "resources.h" +#include "call-ui/resources.h" #include "common.h" namespace callui { namespace { namespace impl { @@ -122,7 +122,7 @@ namespace callui { setNaviframe(m_navi). setCallUI(m_call). build(WEAK_DELEGATE(Instance::onPageExitRequest, - asWeak(this))); + asWeak(*this))); if (!page) { ELOG("Create page failed! Exit application"); m_context->exitApp(); diff --git a/inc/presenters/Instance.h b/call-ui/presenters/Instance.h similarity index 90% rename from inc/presenters/Instance.h rename to call-ui/presenters/Instance.h index 0c15077..73ddcce 100644 --- a/inc/presenters/Instance.h +++ b/call-ui/presenters/Instance.h @@ -14,17 +14,18 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_INSTANCE_H__ -#define __CALLUI_PRESENTERS_INSTANCE_H__ +#ifndef __CALL_UI_PRESENTERS_INSTANCE_H__ +#define __CALL_UI_PRESENTERS_INSTANCE_H__ #include "ucl/appfw/IInstance.h" #include "ucl/appfw/IInstanceAppControlExt.h" #include "ucl/appfw/SysEventProvider.h" - #include "ucl/gui/Theme.h" #include "ucl/gui/Naviframe.h" -#include "types.h" +#include "call-ui/model/ICallUI.h" + +#include "base/Page.h" namespace callui { @@ -71,4 +72,4 @@ namespace callui { }; } -#endif // __CALLUI_PRESENTERS_INSTANCE_H__ +#endif // __CALL_UI_PRESENTERS_INSTANCE_H__ diff --git a/src/presenters/InstanceManager.cpp b/call-ui/presenters/InstanceManager.cpp similarity index 92% rename from src/presenters/InstanceManager.cpp rename to call-ui/presenters/InstanceManager.cpp index 7022bed..36f5a11 100644 --- a/src/presenters/InstanceManager.cpp +++ b/call-ui/presenters/InstanceManager.cpp @@ -14,9 +14,9 @@ * limitations under the License. */ -#include "presenters/InstanceManager.h" +#include "InstanceManager.h" -#include "presenters/Instance.h" +#include "Instance.h" namespace callui { diff --git a/inc/presenters/InstanceManager.h b/call-ui/presenters/InstanceManager.h similarity index 82% rename from inc/presenters/InstanceManager.h rename to call-ui/presenters/InstanceManager.h index c58389e..11d7b83 100644 --- a/inc/presenters/InstanceManager.h +++ b/call-ui/presenters/InstanceManager.h @@ -14,10 +14,10 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_INSTANCE_MANAGER_H__ -#define __CALLUI_PRESENTERS_INSTANCE_MANAGER_H__ +#ifndef __CALL_UI_PRESENTERS_INSTANCE_MANAGER_H__ +#define __CALL_UI_PRESENTERS_INSTANCE_MANAGER_H__ -#include "types.h" +#include "call-ui/model/types.h" #include "ucl/appfw/InstanceManagerBase.h" @@ -33,4 +33,4 @@ namespace callui { }; } -#endif // __CALLUI_PRESENTERS_INSTANCE_MANAGER_H__ +#endif // __CALL_UI_PRESENTERS_INSTANCE_MANAGER_H__ diff --git a/src/presenters/Page.cpp b/call-ui/presenters/base/Page.cpp similarity index 99% rename from src/presenters/Page.cpp rename to call-ui/presenters/base/Page.cpp index 1f5e85d..f2f1fa3 100644 --- a/src/presenters/Page.cpp +++ b/call-ui/presenters/base/Page.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "presenters/Page.h" +#include "Page.h" #include "common.h" diff --git a/inc/presenters/Page.h b/call-ui/presenters/base/Page.h similarity index 92% rename from inc/presenters/Page.h rename to call-ui/presenters/base/Page.h index b25fc3a..ef039b3 100644 --- a/inc/presenters/Page.h +++ b/call-ui/presenters/base/Page.h @@ -14,13 +14,15 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_PAGE_H__ -#define __CALLUI_PRESENTERS_PAGE_H__ +#ifndef __CALL_UI_PRESENTERS_BASE_PAGE_H__ +#define __CALL_UI_PRESENTERS_BASE_PAGE_H__ #include "ucl/gui/Naviframe.h" #include "ucl/mvp/GuiPresenter.h" +#include "call-ui/types.h" + namespace callui { UCL_DECLARE_REF_ALIASES(Page); @@ -90,4 +92,4 @@ namespace callui { #include "Page.hpp" -#endif // __CALLUI_PRESENTERS_PAGE_H__ +#endif // __CALL_UI_PRESENTERS_BASE_PAGE_H__ diff --git a/inc/presenters/Page.hpp b/call-ui/presenters/base/Page.hpp similarity index 100% rename from inc/presenters/Page.hpp rename to call-ui/presenters/base/Page.hpp diff --git a/call-ui/presenters/base/common.h b/call-ui/presenters/base/common.h new file mode 100644 index 0000000..06b0262 --- /dev/null +++ b/call-ui/presenters/base/common.h @@ -0,0 +1,22 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * 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 __CALL_UI_PRESENTERS_BASE_COMMON_H__ +#define __CALL_UI_PRESENTERS_BASE_COMMON_H__ + +#include "call-ui/presenters/common.h" + +#endif // __CALL_UI_PRESENTERS_BASE_COMMON_H__ diff --git a/src/presenters/common.h b/call-ui/presenters/common.h similarity index 78% rename from src/presenters/common.h rename to call-ui/presenters/common.h index 49f910e..16f8ab0 100644 --- a/src/presenters/common.h +++ b/call-ui/presenters/common.h @@ -14,18 +14,16 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_COMMON_H__ -#define __CALLUI_PRESENTERS_COMMON_H__ +#ifndef __CALL_UI_PRESENTERS_COMMON_H__ +#define __CALL_UI_PRESENTERS_COMMON_H__ #include "ucl/gui/stdTheme.h" -#include "view/helpers.h" +#include "call-ui/view/helpers.h" -#include "helpers.h" +#include "misc/helpers.h" -#include "../common.h" - -#include "../view/common.h" +#include "call-ui/view/common.h" namespace callui { constexpr auto CALL_VC_TIMER_INTERVAL = 1.5; @@ -33,4 +31,4 @@ namespace callui { constexpr auto VOLUME_LEVEL_MIN = 1; } -#endif // __CALLUI_PRESENTERS_COMMON_H__ +#endif // __CALL_UI_PRESENTERS_COMMON_H__ diff --git a/src/presenters/AcceptDialog.cpp b/call-ui/presenters/dialogs/AcceptDialog.cpp similarity index 89% rename from src/presenters/AcceptDialog.cpp rename to call-ui/presenters/dialogs/AcceptDialog.cpp index 424ae39..b6b31e9 100644 --- a/src/presenters/AcceptDialog.cpp +++ b/call-ui/presenters/dialogs/AcceptDialog.cpp @@ -14,9 +14,10 @@ * limitations under the License. */ -#include "presenters/AcceptDialog.h" +#include "AcceptDialog.h" + +#include "call-ui/resources.h" -#include "resources.h" #include "common.h" namespace callui { namespace { namespace impl { @@ -29,14 +30,14 @@ namespace callui { namespace { namespace impl { constexpr EdjePart PART_SWL_CONTENT{"elm.swallow.content"}; - void *asData(const AcceptDialogEvent event) + void *asData(const AcceptDialog::Event event) { return reinterpret_cast(static_cast(event)); } - AcceptDialogEvent asEvent(void *const data) + AcceptDialog::Event asEvent(void *const data) { - return static_cast( + return static_cast( reinterpret_cast(data)); } @@ -55,7 +56,7 @@ namespace callui { } AcceptDialog::Builder & - AcceptDialog::Builder::setHandler(AcceptDialogHandler handler) + AcceptDialog::Builder::setHandler(EventHandler handler) { m_handler = handler; return *this; @@ -75,7 +76,7 @@ namespace callui { } AcceptDialog::AcceptDialog(IRefCountObj &rc, - const AcceptDialogHandler &handler): + const EventHandler &handler): GuiPresenter(rc), m_handler(handler), m_isDismissed(false) @@ -180,15 +181,15 @@ namespace callui { return RES_OK; } - Result AcceptDialog::addGenlistTextItem(AcceptDialogEvent event) + Result AcceptDialog::addGenlistTextItem(Event event) { static Elm_Genlist_Item_Class textItc = utils::createGenlistItemClass("1text.1icon", [](void *data, Evas_Object *obj, const char *part) -> char * { switch (impl::asEvent(data)) { - case AcceptDialogEvent::HOLD_AND_ACCEPT: + case Event::HOLD_AND_ACCEPT: return strdup(STR_HOLD_AND_ACCEPT.translate()); - case AcceptDialogEvent::END_AND_ACCEPT: + case Event::END_AND_ACCEPT: return strdup(STR_END_AND_ACCEPT.translate()); default: return nullptr; @@ -228,10 +229,10 @@ namespace callui { { FAIL_RETURN(addGenlistTitleItem(), "addGenlistTitleItem() failed!"); - FAIL_RETURN(addGenlistTextItem(AcceptDialogEvent::HOLD_AND_ACCEPT), + FAIL_RETURN(addGenlistTextItem(Event::HOLD_AND_ACCEPT), "addGenlistTextItem() failed!"); - FAIL_RETURN(addGenlistTextItem(AcceptDialogEvent::END_AND_ACCEPT), + FAIL_RETURN(addGenlistTextItem(Event::END_AND_ACCEPT), "addGenlistTextItem() failed!"); FAIL_RETURN(addGenlistBottomItem(), "addGenlistBottomItem() failed!"); @@ -239,7 +240,7 @@ namespace callui { return RES_OK; } - void AcceptDialog::handleEvent(AcceptDialogEvent event) + void AcceptDialog::handleEvent(Event event) { const auto keepAliver = asShared(*this); if (dispatchEvent(event)) { @@ -247,7 +248,7 @@ namespace callui { } } - bool AcceptDialog::dispatchEvent(AcceptDialogEvent event) + bool AcceptDialog::dispatchEvent(Event event) { if (!m_handler) { WLOG("Handler was destroyed!"); @@ -264,7 +265,7 @@ namespace callui { void AcceptDialog::onPopupHWBackKey(Evas_Object *obj, void *eventInfo) { if (!m_isDismissed) { - handleEvent(AcceptDialogEvent::BACK); + handleEvent(Event::BACK); } } diff --git a/inc/presenters/AcceptDialog.h b/call-ui/presenters/dialogs/AcceptDialog.h similarity index 73% rename from inc/presenters/AcceptDialog.h rename to call-ui/presenters/dialogs/AcceptDialog.h index e10dc02..c89c3ed 100644 --- a/inc/presenters/AcceptDialog.h +++ b/call-ui/presenters/dialogs/AcceptDialog.h @@ -14,30 +14,39 @@ * limitations under the License. */ -#ifndef __CALLUI_VIEW_ACCEPT_DIALOG_H__ -#define __CALLUI_VIEW_ACCEPT_DIALOG_H__ +#ifndef __CALL_UI_PRESENTERS_DIALOGS_ACCEPT_DIALOG_H__ +#define __CALL_UI_PRESENTERS_DIALOGS_ACCEPT_DIALOG_H__ #include "ucl/mvp/GuiPresenter.h" #include "ucl/gui/StyledWidget.h" -#include "ucl/gui/ElmWidget.h" -#include "ucl/gui/ElmWidget.h" -#include "types.h" +#include "call-ui/types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(AcceptDialog); + class AcceptDialog final : public ucl::GuiPresenter, public ucl::IDisposable { + public: + enum class Event { + HOLD_AND_ACCEPT, + END_AND_ACCEPT, + BACK + }; + using EventHandler = ucl::WeakDelegate; + public: class Builder { public: Builder(); ~Builder(); - Builder &setHandler(AcceptDialogHandler handler); + Builder &setHandler(EventHandler handler); AcceptDialogWRef build(ucl::ElmWidget &parent) const; private: - AcceptDialogHandler m_handler; + EventHandler m_handler; }; public: @@ -53,7 +62,7 @@ namespace callui { private: friend class ucl::ReffedObj; AcceptDialog(ucl::IRefCountObj &rc, - const AcceptDialogHandler &handler); + const EventHandler &handler); ucl::Result prepare(ucl::ElmWidget &parent); @@ -61,11 +70,11 @@ namespace callui { ucl::Result createGenlist(); ucl::Result fillGenlist(); ucl::Result addGenlistTitleItem(); - ucl::Result addGenlistTextItem(AcceptDialogEvent event); + ucl::Result addGenlistTextItem(Event event); ucl::Result addGenlistBottomItem(); - void handleEvent(AcceptDialogEvent event); - bool dispatchEvent(AcceptDialogEvent event); + void handleEvent(Event event); + bool dispatchEvent(Event event); void onPopupDismissed(ucl::Widget &widget, void *eventInfo); void onPopupHWBackKey(Evas_Object *obj, void *eventInfo); @@ -75,11 +84,10 @@ namespace callui { private: ucl::StyledWidgetSRef m_popup; ucl::StyledWidgetSRef m_genlist; - AcceptDialogHandler m_handler; + EventHandler m_handler; AcceptDialogSRef m_selfRef; bool m_isDismissed; }; - } -#endif // __CALLUI_VIEW_ACCEPT_DIALOG_H__ +#endif // __CALL_UI_PRESENTERS_DIALOGS_ACCEPT_DIALOG_H__ diff --git a/call-ui/presenters/dialogs/common.h b/call-ui/presenters/dialogs/common.h new file mode 100644 index 0000000..c46d968 --- /dev/null +++ b/call-ui/presenters/dialogs/common.h @@ -0,0 +1,22 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * 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 __CALL_UI_PRESENTERS_DIALOGS_COMMON_H__ +#define __CALL_UI_PRESENTERS_DIALOGS_COMMON_H__ + +#include "call-ui/presenters/common.h" + +#endif // __CALL_UI_PRESENTERS_DIALOGS_COMMON_H__ diff --git a/src/presenters/AcceptRejectPresenter.cpp b/call-ui/presenters/misc/AcceptRejectPresenter.cpp similarity index 94% rename from src/presenters/AcceptRejectPresenter.cpp rename to call-ui/presenters/misc/AcceptRejectPresenter.cpp index 19ebff1..4192e75 100644 --- a/src/presenters/AcceptRejectPresenter.cpp +++ b/call-ui/presenters/misc/AcceptRejectPresenter.cpp @@ -14,15 +14,7 @@ * limitations under the License. */ -#include "presenters/AcceptRejectPresenter.h" - -#include "model/IIncomingCall.h" -#include "model/ISoundManager.h" - -#include "presenters/AcceptDialog.h" -#include "presenters/MotionSensorPresenter.h" - -#include "view/AcceptRejectWidget.h" +#include "AcceptRejectPresenter.h" #include "common.h" @@ -214,18 +206,18 @@ namespace callui { } bool AcceptRejectPresenter::onAcceptPopupEvent(AcceptDialog &popup, - AcceptDialogEvent event) + AcceptDialog::Event event) { m_widget->reset(); switch (event) { - case AcceptDialogEvent::HOLD_AND_ACCEPT: + case AcceptDialog::Event::HOLD_AND_ACCEPT: FAIL_RETURN_VALUE( m_call->answer(CallAnswerType::HOLD_ACTIVE_AND_ACCEPT), true, "incom->answer() failed!"); return false; - case AcceptDialogEvent::END_AND_ACCEPT: + case AcceptDialog::Event::END_AND_ACCEPT: FAIL_RETURN_VALUE( m_call->answer(CallAnswerType::RELEASE_ACTIVE_AND_ACCEPT), true, diff --git a/inc/presenters/AcceptRejectPresenter.h b/call-ui/presenters/misc/AcceptRejectPresenter.h similarity index 81% rename from inc/presenters/AcceptRejectPresenter.h rename to call-ui/presenters/misc/AcceptRejectPresenter.h index 49ad4e1..800b4d0 100644 --- a/inc/presenters/AcceptRejectPresenter.h +++ b/call-ui/presenters/misc/AcceptRejectPresenter.h @@ -14,18 +14,26 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_ACCEPT_REJECT_PRESENTER_H__ -#define __CALLUI_PRESENTERS_ACCEPT_REJECT_PRESENTER_H__ +#ifndef __CALL_UI_PRESENTERS_MISC_ACCEPT_REJECT_PRESENTER_H__ +#define __CALL_UI_PRESENTERS_MISC_ACCEPT_REJECT_PRESENTER_H__ #include "ucl/mvp/GuiPresenter.h" #include "ucl/gui/Layout.h" #include "ucl/gui/StyledWidget.h" +#include "call-ui/model/IIncomingCall.h" +#include "call-ui/model/ISoundManager.h" +#include "call-ui/view/AcceptRejectWidget.h" +#include "call-ui/presenters/dialogs/AcceptDialog.h" +#include "MotionSensorPresenter.h" + #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(AcceptRejectPresenter); + class AcceptRejectPresenter final : public ucl::GuiPresenter { public: class Builder { @@ -75,7 +83,7 @@ namespace callui { void onMotionEvent(); - bool onAcceptPopupEvent(AcceptDialog &popup, AcceptDialogEvent event); + bool onAcceptPopupEvent(AcceptDialog &popup, AcceptDialog::Event event); void onAcceptEvent(); void onRejectEvent(); void onBTHeadsetConnectionChanged(); @@ -95,6 +103,4 @@ namespace callui { }; } - - -#endif // __CALLUI_PRESENTERS_ACCEPT_REJECT_PRESENTER_H__ +#endif // __CALL_UI_PRESENTERS_MISC_ACCEPT_REJECT_PRESENTER_H__ diff --git a/src/presenters/AccessoryPresenter.cpp b/call-ui/presenters/misc/AccessoryPresenter.cpp similarity index 95% rename from src/presenters/AccessoryPresenter.cpp rename to call-ui/presenters/misc/AccessoryPresenter.cpp index 7e15a90..61c8eab 100644 --- a/src/presenters/AccessoryPresenter.cpp +++ b/call-ui/presenters/misc/AccessoryPresenter.cpp @@ -14,19 +14,11 @@ * limitations under the License. */ -#include "presenters/AccessoryPresenter.h" +#include "AccessoryPresenter.h" #include "ucl/appfw/types.h" -#include "model/ISoundManager.h" -#include "model/ICallManager.h" -#include "model/IActiveCall.h" -#include "model/IEndCall.h" -#include "model/ICallInfo.h" - -#include "view/VolumeControl.h" - -#include "resources.h" +#include "call-ui/resources.h" #include "common.h" #define CU_APP_CONTROL_MIME_CONTACT "application/vnd.tizen.contact" @@ -525,14 +517,14 @@ namespace callui { addRotaryEventHandler(CALLBACK_A( AccessoryPresenter::onRotaryEvent), this); - m_sm->addAudioStateHandler(DELEGATE( - AccessoryPresenter::onAudioStateChanged, this)); + m_sm->addAudioStateHandler(WEAK_DELEGATE( + AccessoryPresenter::onAudioStateChanged, asWeak(*this))); - m_sm->addVolumeStateHandler(DELEGATE( - AccessoryPresenter::onVolumeLevelChanged, this)); + m_sm->addVolumeStateHandler(WEAK_DELEGATE( + AccessoryPresenter::onVolumeLevelChanged, asWeak(*this))); - m_sm->addMuteStateHandler(DELEGATE( - AccessoryPresenter::onMuteStateChanged, this)); + m_sm->addMuteStateHandler(WEAK_DELEGATE( + AccessoryPresenter::onMuteStateChanged, asWeak(*this))); } void AccessoryPresenter::unregisterCallbacks() @@ -540,14 +532,14 @@ namespace callui { delRotaryEventHandler( CALLBACK_A(AccessoryPresenter::onRotaryEvent), this); - m_sm->delAudioStateHandler(DELEGATE( - AccessoryPresenter::onAudioStateChanged, this)); + m_sm->delAudioStateHandler(WEAK_DELEGATE( + AccessoryPresenter::onAudioStateChanged, asWeak(*this))); - m_sm->delVolumeStateHandler(DELEGATE( - AccessoryPresenter::onVolumeLevelChanged, this)); + m_sm->delVolumeStateHandler(WEAK_DELEGATE( + AccessoryPresenter::onVolumeLevelChanged, asWeak(*this))); - m_sm->delMuteStateHandler(DELEGATE( - AccessoryPresenter::onMuteStateChanged, this)); + m_sm->delMuteStateHandler(WEAK_DELEGATE( + AccessoryPresenter::onMuteStateChanged, asWeak(*this))); } Eina_Bool AccessoryPresenter::onVCTimerCb() @@ -619,7 +611,7 @@ namespace callui { return EINA_TRUE; } - void AccessoryPresenter::onVolumeControlEventCb(VolumeControlEvent event) + void AccessoryPresenter::onVolumeControlEventCb(VolumeControl::Event event) { if (!isActive()) { LOG_RETURN_VOID(RES_OK, "Presenter is not active. Ignore"); @@ -633,10 +625,10 @@ namespace callui { restartVCTimer(); switch (event) { - case VolumeControlEvent::INCREASE: + case VolumeControl::Event::INCREASE: tryIncreaseVolume(); break; - case VolumeControlEvent::DECREASE: + case VolumeControl::Event::DECREASE: tryDecreaseVolume(); break; default: diff --git a/inc/presenters/AccessoryPresenter.h b/call-ui/presenters/misc/AccessoryPresenter.h similarity index 90% rename from inc/presenters/AccessoryPresenter.h rename to call-ui/presenters/misc/AccessoryPresenter.h index 2a3d573..2fee270 100644 --- a/inc/presenters/AccessoryPresenter.h +++ b/call-ui/presenters/misc/AccessoryPresenter.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_ACCESSORY_PRESENTER_H__ -#define __CALLUI_PRESENTERS_ACCESSORY_PRESENTER_H__ +#ifndef __CALL_UI_PRESENTERS_MISC_ACCESSORY_PRESENTER_H__ +#define __CALL_UI_PRESENTERS_MISC_ACCESSORY_PRESENTER_H__ #include "ucl/mvp/GuiPresenter.h" @@ -24,10 +24,17 @@ #include +#include "call-ui/model/ISoundManager.h" +#include "call-ui/model/ICallManager.h" +#include "call-ui/view/VolumeControl.h" +#include "call-ui/view/Slider.h" + #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(AccessoryPresenter); + class AccessoryPresenter final : public ucl::GuiPresenter { public: class Builder { @@ -97,7 +104,7 @@ namespace callui { void registerCallbacks(); void unregisterCallbacks(); - void onVolumeControlEventCb(VolumeControlEvent event); + void onVolumeControlEventCb(VolumeControl::Event event); Eina_Bool onRotaryEvent(Eext_Rotary_Event_Info *info); bool checkPossibilityToModifyVolume(int volume, @@ -150,4 +157,4 @@ namespace callui { }; } -#endif // __CALLUI_PRESENTERS_ACCESSORY_PRESENTER_H__ +#endif // __CALL_UI_PRESENTERS_MISC_ACCESSORY_PRESENTER_H__ diff --git a/src/presenters/AtspiHighlightHelper.cpp b/call-ui/presenters/misc/AtspiHighlightHelper.cpp similarity index 98% rename from src/presenters/AtspiHighlightHelper.cpp rename to call-ui/presenters/misc/AtspiHighlightHelper.cpp index b44c679..8d1c13d 100644 --- a/src/presenters/AtspiHighlightHelper.cpp +++ b/call-ui/presenters/misc/AtspiHighlightHelper.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "presenters/AtspiHighlightHelper.h" +#include "AtspiHighlightHelper.h" #include "common.h" diff --git a/inc/presenters/AtspiHighlightHelper.h b/call-ui/presenters/misc/AtspiHighlightHelper.h similarity index 89% rename from inc/presenters/AtspiHighlightHelper.h rename to call-ui/presenters/misc/AtspiHighlightHelper.h index e6d127d..0ff1ff3 100644 --- a/inc/presenters/AtspiHighlightHelper.h +++ b/call-ui/presenters/misc/AtspiHighlightHelper.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_ATSPI_HIGHLIGHT_HELPER_H__ -#define __CALLUI_PRESENTERS_ATSPI_HIGHLIGHT_HELPER_H__ +#ifndef __CALL_UI_PRESENTERS_MISC_ATSPI_HIGHLIGHT_HELPER_H__ +#define __CALL_UI_PRESENTERS_MISC_ATSPI_HIGHLIGHT_HELPER_H__ #include "ucl/mvp/GuiPresenter.h" @@ -23,6 +23,8 @@ namespace callui { + UCL_DECLARE_REF_ALIASES(AtspiHighlightHelper); + class AtspiHighlightHelper final : public ucl::GuiPresenter { public: using RelationEventHandler = ucl::WeakDelegate #include diff --git a/inc/presenters/DeviceStatePresenter.h b/call-ui/presenters/misc/DeviceStatePresenter.h similarity index 80% rename from inc/presenters/DeviceStatePresenter.h rename to call-ui/presenters/misc/DeviceStatePresenter.h index 217ddb2..5cdfa04 100644 --- a/inc/presenters/DeviceStatePresenter.h +++ b/call-ui/presenters/misc/DeviceStatePresenter.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_DEVICE_STATE_PRESENTER_H__ -#define __CALLUI_PRESENTERS_DEVICE_STATE_PRESENTER_H__ +#ifndef __CALL_UI_PRESENTERS_MISC_DEVICE_STATE_PRESENTER_H__ +#define __CALL_UI_PRESENTERS_MISC_DEVICE_STATE_PRESENTER_H__ #include "ucl/gui/Window.h" @@ -23,7 +23,23 @@ namespace callui { + UCL_DECLARE_REF_ALIASES(DeviceStatePresenter); + class DeviceStatePresenter final { + public: + enum class DisplayState { + UNDEFINED, + ON, + OFF, + DIM + }; + + enum class DisplayMode { + UNDEFINED, + REGULAR, + TOP_PRIORITY + }; + public: class Builder { public: @@ -61,4 +77,4 @@ namespace callui { }; } -#endif // __CALLUI_PRESENTERS_DEVICE_STATE_PRESENTER_H__ +#endif // __CALL_UI_PRESENTERS_MISC_DEVICE_STATE_PRESENTER_H__ diff --git a/src/presenters/IndicatorPresenter.cpp b/call-ui/presenters/misc/IndicatorPresenter.cpp similarity index 99% rename from src/presenters/IndicatorPresenter.cpp rename to call-ui/presenters/misc/IndicatorPresenter.cpp index 531afe8..983d0fe 100644 --- a/src/presenters/IndicatorPresenter.cpp +++ b/call-ui/presenters/misc/IndicatorPresenter.cpp @@ -14,12 +14,10 @@ * limitations under the License. */ -#include "presenters/IndicatorPresenter.h" +#include "IndicatorPresenter.h" #include -#include "model/IIndicatorStateProvider.h" - #include "common.h" namespace callui { namespace { namespace impl { diff --git a/inc/presenters/IndicatorPresenter.h b/call-ui/presenters/misc/IndicatorPresenter.h similarity index 89% rename from inc/presenters/IndicatorPresenter.h rename to call-ui/presenters/misc/IndicatorPresenter.h index 47a098e..6569db2 100644 --- a/inc/presenters/IndicatorPresenter.h +++ b/call-ui/presenters/misc/IndicatorPresenter.h @@ -14,19 +14,22 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_INDICATOR_PRESENTER_H__ -#define __CALLUI_PRESENTERS_INDICATOR_PRESENTER_H__ +#ifndef __CALL_UI_PRESENTERS_MISC_MISC_INDICATOR_PRESENTER_H__ +#define __CALL_UI_PRESENTERS_MISC_MISC_INDICATOR_PRESENTER_H__ #include "ucl/mvp/GuiPresenter.h" -#include "model/IIndicatorStateListener.h" #include "ucl/gui/Layout.h" #include "ucl/gui/StyledWidget.h" +#include "call-ui/model/IIndicatorStateProvider.h" + #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(IndicatorPresenter); + class IndicatorPresenter final : public ucl::GuiPresenter, public IIndicatorStateListener { public: @@ -93,4 +96,4 @@ namespace callui { ucl::EdjeSignal getConnectionSignal(ConnectionType type); } -#endif // __CALLUI_PRESENTERS_INDICATOR_PRESENTER_H__ +#endif // __CALL_UI_PRESENTERS_MISC_MISC_INDICATOR_PRESENTER_H__ diff --git a/src/presenters/MoreOptionsPresenter.cpp b/call-ui/presenters/misc/MoreOptionsPresenter.cpp similarity index 98% rename from src/presenters/MoreOptionsPresenter.cpp rename to call-ui/presenters/misc/MoreOptionsPresenter.cpp index 13f6049..a220ee1 100644 --- a/src/presenters/MoreOptionsPresenter.cpp +++ b/call-ui/presenters/misc/MoreOptionsPresenter.cpp @@ -14,23 +14,15 @@ * limitations under the License. */ -#include "presenters/MoreOptionsPresenter.h" +#include "MoreOptionsPresenter.h" #include -#include "ucl/gui/Layout.h" #include "ucl/appfw/types.h" -#include "model/ICallManager.h" -#include "model/IHeldCall.h" -#include "model/IActiveCall.h" -#include "model/ICallInfo.h" -#include "model/ISoundManager.h" +#include "call-ui/presenters/pages/KeypadPage.h" -#include "presenters/KeypadPage.h" -#include "presenters/AtspiHighlightHelper.h" - -#include "resources.h" +#include "call-ui/resources.h" #include "common.h" namespace callui { namespace { namespace impl { diff --git a/inc/presenters/MoreOptionsPresenter.h b/call-ui/presenters/misc/MoreOptionsPresenter.h similarity index 90% rename from inc/presenters/MoreOptionsPresenter.h rename to call-ui/presenters/misc/MoreOptionsPresenter.h index e1b62dd..f2c4fb5 100644 --- a/inc/presenters/MoreOptionsPresenter.h +++ b/call-ui/presenters/misc/MoreOptionsPresenter.h @@ -14,21 +14,25 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_MORE_OPTIONS_PRESENTER_H__ -#define __CALLUI_PRESENTERS_MORE_OPTIONS_PRESENTER_H__ +#ifndef __CALL_UI_PRESENTERS_MISC_MORE_OPTIONS_PRESENTER_H__ +#define __CALL_UI_PRESENTERS_MISC_MORE_OPTIONS_PRESENTER_H__ #include "ucl/mvp/GuiPresenter.h" #include "ucl/gui/Layout.h" -#include "ucl/gui/StyledWidget.h" #include "ucl/gui/Naviframe.h" -#include "Page.h" +#include "call-ui/model/ICallManager.h" +#include "call-ui/model/ISoundManager.h" +#include "call-ui/presenters/base/Page.h" +#include "AtspiHighlightHelper.h" #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(MoreOptionsPresenter); + class MoreOptionsPresenter final : public ucl::GuiPresenter { public: class Builder { @@ -145,4 +149,4 @@ namespace callui { }; } -#endif // __CALLUI_PRESENTERS_MORE_OPTIONS_PRESENTER_H__ +#endif // __CALL_UI_PRESENTERS_MISC_MORE_OPTIONS_PRESENTER_H__ diff --git a/src/presenters/MotionSensorPresenter.cpp b/call-ui/presenters/misc/MotionSensorPresenter.cpp similarity index 94% rename from src/presenters/MotionSensorPresenter.cpp rename to call-ui/presenters/misc/MotionSensorPresenter.cpp index 4914528..7a76433 100644 --- a/src/presenters/MotionSensorPresenter.cpp +++ b/call-ui/presenters/misc/MotionSensorPresenter.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "presenters/MotionSensorPresenter.h" +#include "MotionSensorPresenter.h" #include "common.h" @@ -32,7 +32,7 @@ namespace callui { MotionSensorPresenterSRef MotionSensorPresenter::Builder::build( - const MotionSensorHandler handler) const + const NotiHandler handler) const { auto result = makeShared(handler); FAIL_RETURN_VALUE(result->prepare(), @@ -41,7 +41,7 @@ namespace callui { } MotionSensorPresenter::MotionSensorPresenter( - const MotionSensorHandler &handler): + const NotiHandler &handler): m_handler(handler), m_gesture(nullptr) { diff --git a/inc/presenters/MotionSensorPresenter.h b/call-ui/presenters/misc/MotionSensorPresenter.h similarity index 73% rename from inc/presenters/MotionSensorPresenter.h rename to call-ui/presenters/misc/MotionSensorPresenter.h index 0805c38..e80f2d9 100644 --- a/inc/presenters/MotionSensorPresenter.h +++ b/call-ui/presenters/misc/MotionSensorPresenter.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_MOTION_SENSOR_PRESENTER_H__ -#define __CALLUI_PRESENTERS_MOTION_SENSOR_PRESENTER_H__ +#ifndef __CALL_UI_PRESENTERS_MISC_MOTION_SENSOR_PRESENTER_H__ +#define __CALL_UI_PRESENTERS_MISC_MOTION_SENSOR_PRESENTER_H__ #include @@ -23,17 +23,19 @@ namespace callui { + UCL_DECLARE_REF_ALIASES(MotionSensorPresenter); + class MotionSensorPresenter final { public: class Builder { public: Builder(); ~Builder(); - MotionSensorPresenterSRef build(const MotionSensorHandler handler) const; + MotionSensorPresenterSRef build(const NotiHandler handler) const; }; private: friend class ucl::ReffedObj; - MotionSensorPresenter(const MotionSensorHandler &handler); + MotionSensorPresenter(const NotiHandler &handler); virtual ~MotionSensorPresenter(); ucl::Result prepare(); @@ -44,10 +46,10 @@ namespace callui { gesture_error_e error); private: - MotionSensorHandler m_handler; + NotiHandler m_handler; gesture_h m_gesture; }; } -#endif // __CALLUI_PRESENTERS_MOTION_SENSOR_PRESENTER_H__ +#endif // __CALL_UI_PRESENTERS_MISC_MOTION_SENSOR_PRESENTER_H__ diff --git a/src/presenters/RejectMsgPresenter.cpp b/call-ui/presenters/misc/RejectMsgPresenter.cpp similarity index 94% rename from src/presenters/RejectMsgPresenter.cpp rename to call-ui/presenters/misc/RejectMsgPresenter.cpp index f5e7c03..c3864d3 100644 --- a/src/presenters/RejectMsgPresenter.cpp +++ b/call-ui/presenters/misc/RejectMsgPresenter.cpp @@ -14,14 +14,9 @@ * limitations under the License. */ -#include "presenters/RejectMsgPresenter.h" +#include "RejectMsgPresenter.h" -#include "model/IRejectMsgProvider.h" -#include "model/IRejectMsg.h" - -#include "presenters/AtspiHighlightHelper.h" - -#include "resources.h" +#include "call-ui/resources.h" #include "common.h" namespace callui { namespace { namespace impl { @@ -100,7 +95,7 @@ namespace callui { RejectMsgPresenter::Builder & RejectMsgPresenter::Builder::setStateHandler( - const RejectMsgStateHandler &handler) + const StateHandler &handler) { m_stateHandler = handler; return *this; @@ -108,7 +103,7 @@ namespace callui { RejectMsgPresenter::Builder & RejectMsgPresenter::Builder::setSelectHandler( - const RejectMsgSelectHandler &handler) + const SelectHandler &handler) { m_selectHandler = handler; return *this; @@ -140,14 +135,14 @@ namespace callui { RejectMsgPresenter::RejectMsgPresenter(IRefCountObj &rc, const IRejectMsgProviderSRef &provider, - const RejectMsgStateHandler &stateHandler, - const RejectMsgSelectHandler &selectHandler): + const StateHandler &stateHandler, + const SelectHandler &selectHandler): GuiPresenter(rc), m_circleEo(nullptr), m_provider(provider), m_stateHandler(stateHandler), m_selectHandler(selectHandler), - m_state(RejectMsgState::HIDDEN) + m_state(State::HIDDEN) { } @@ -217,11 +212,11 @@ namespace callui { auto prevState = m_state; if (ev->rel_y == 1.0) { - m_state = RejectMsgState::SHOWN; + m_state = State::SHOWN; // Prevent panel scrolling elm_object_scroll_freeze_push(m_panel->getEo()); } else if (ev->rel_y == 0.0) { - m_state = RejectMsgState::HIDDEN; + m_state = State::HIDDEN; m_genlist.reset(); } else { if (!m_genlist) { @@ -229,20 +224,20 @@ namespace callui { "createGenlist() failed!"); } - m_state = RejectMsgState::IN_TRANSITION; + m_state = State::IN_TRANSITION; const auto alphaValue = static_cast(impl::ALPHA_CHANNEL_MAX * ev->rel_y); m_panelBg->setColor(0, alphaValue); } if (prevState != m_state) { - if (m_state == RejectMsgState::SHOWN) { + if (m_state == State::SHOWN) { activateBy(m_widget.get()); } else { deactivateBy(m_widget.get()); } - if (m_state == RejectMsgState::HIDDEN) { + if (m_state == State::HIDDEN) { sendActivate(*m_widget); } else { sendDeactivate(*m_widget); @@ -464,7 +459,7 @@ namespace callui { return *m_widget; } - RejectMsgState RejectMsgPresenter::getState() + RejectMsgPresenter::State RejectMsgPresenter::getState() { return m_state; } @@ -472,7 +467,7 @@ namespace callui { void RejectMsgPresenter::showPanel() { DLOG(); - if (m_state != RejectMsgState::SHOWN) { + if (m_state != State::SHOWN) { DLOG("Panel state [NOT SHOWN]"); elm_panel_hidden_set(m_panel->getEo(), EINA_FALSE); } @@ -481,7 +476,7 @@ namespace callui { void RejectMsgPresenter::hidePanel() { DLOG(); - if (m_state == RejectMsgState::SHOWN) { + if (m_state == State::SHOWN) { DLOG("Panel state [SHOWN]"); elm_object_scroll_freeze_pop(m_panel->getEo()); elm_panel_hidden_set(m_panel->getEo(), EINA_TRUE); @@ -489,13 +484,13 @@ namespace callui { } void RejectMsgPresenter::setStateHandler( - const RejectMsgStateHandler &handler) + const RejectMsgPresenter::StateHandler &handler) { m_stateHandler = handler; } void RejectMsgPresenter::setSelectHandler( - const RejectMsgSelectHandler &handler) + const SelectHandler &handler) { m_selectHandler = handler; } diff --git a/inc/presenters/RejectMsgPresenter.h b/call-ui/presenters/misc/RejectMsgPresenter.h similarity index 75% rename from inc/presenters/RejectMsgPresenter.h rename to call-ui/presenters/misc/RejectMsgPresenter.h index d04558a..bd6b952 100644 --- a/inc/presenters/RejectMsgPresenter.h +++ b/call-ui/presenters/misc/RejectMsgPresenter.h @@ -14,34 +14,49 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_REJECT_MESSAGE_PRESENTER_H__ -#define __CALLUI_PRESENTERS_REJECT_MESSAGE_PRESENTER_H__ +#ifndef __CALL_UI_PRESENTERS_MISC_REJECT_MESSAGE_PRESENTER_H__ +#define __CALL_UI_PRESENTERS_MISC_REJECT_MESSAGE_PRESENTER_H__ #include "ucl/mvp/GuiPresenter.h" #include "ucl/gui/Layout.h" #include "ucl/gui/StyledWidget.h" +#include "call-ui/model/IRejectMsgProvider.h" +#include "AtspiHighlightHelper.h" + #include "types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(RejectMsgPresenter); + class RejectMsgPresenter final : public ucl::GuiPresenter { + public: + enum class State { + HIDDEN, + IN_TRANSITION, + SHOWN + }; + using StateHandler = ucl::WeakDelegate; + using SelectHandler = ucl::WeakDelegate; + public: class Builder { public: Builder(); virtual ~Builder(); Builder &setProvider(const IRejectMsgProviderSRef &provider); - Builder &setStateHandler(const RejectMsgStateHandler &handler); - Builder &setSelectHandler(const RejectMsgSelectHandler &handler); + Builder &setStateHandler(const StateHandler &handler); + Builder &setSelectHandler(const SelectHandler &handler); Builder &setParentWidget(const ucl::ElmWidgetSRef &parentWidget); RejectMsgPresenterSRef build(ucl::GuiPresenter &parent) const; private: IRejectMsgProviderSRef m_provider; - RejectMsgStateHandler m_stateHandler; - RejectMsgSelectHandler m_selectHandler; + StateHandler m_stateHandler; + SelectHandler m_selectHandler; ucl::ElmWidgetSRef m_parentWidget; }; @@ -50,13 +65,13 @@ namespace callui { ucl::Widget &getWidget(); - RejectMsgState getState(); + State getState(); void showPanel(); void hidePanel(); - void setStateHandler(const RejectMsgStateHandler &handler); - void setSelectHandler(const RejectMsgSelectHandler &handler); + void setStateHandler(const StateHandler &handler); + void setSelectHandler(const SelectHandler &handler); private: class RejectMsgItem; @@ -65,8 +80,8 @@ namespace callui { friend class ucl::ReffedObj; RejectMsgPresenter(ucl::IRefCountObj &rc, const IRejectMsgProviderSRef &provider, - const RejectMsgStateHandler &stateHandler, - const RejectMsgSelectHandler &selectHandler); + const StateHandler &stateHandler, + const SelectHandler &selectHandler); ucl::Result prepare(ucl::GuiPresenter &parent, ucl::ElmWidget &parentWidget); @@ -118,9 +133,9 @@ namespace callui { Evas_Object *m_circleEo; IRejectMsgProviderSRef m_provider; - RejectMsgStateHandler m_stateHandler; - RejectMsgSelectHandler m_selectHandler; - RejectMsgState m_state; + StateHandler m_stateHandler; + SelectHandler m_selectHandler; + State m_state; // Screen Reader AtspiHighlightHelperSRef m_atspiHelper; @@ -128,4 +143,4 @@ namespace callui { } -#endif // __CALLUI_PRESENTERS_REJECT_MESSAGE_PRESENTER_H__ +#endif // __CALL_UI_PRESENTERS_MISC_REJECT_MESSAGE_PRESENTER_H__ diff --git a/call-ui/presenters/misc/common.h b/call-ui/presenters/misc/common.h new file mode 100644 index 0000000..638f819 --- /dev/null +++ b/call-ui/presenters/misc/common.h @@ -0,0 +1,22 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * 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 __CALL_UI_PRESENTERS_MISC_MISC_COMMON_H__ +#define __CALL_UI_PRESENTERS_MISC_MISC_COMMON_H__ + +#include "call-ui/presenters/common.h" + +#endif // __CALL_UI_PRESENTERS_MISC_MISC_COMMON_H__ diff --git a/src/presenters/helpers.cpp b/call-ui/presenters/misc/helpers.cpp similarity index 100% rename from src/presenters/helpers.cpp rename to call-ui/presenters/misc/helpers.cpp diff --git a/src/presenters/helpers.h b/call-ui/presenters/misc/helpers.h similarity index 87% rename from src/presenters/helpers.h rename to call-ui/presenters/misc/helpers.h index 9a0081c..9a1c16b 100644 --- a/src/presenters/helpers.h +++ b/call-ui/presenters/misc/helpers.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_HELPERS_H__ -#define __CALLUI_PRESENTERS_HELPERS_H__ +#ifndef __CALL_UI_PRESENTERS_MISC_HELPERS_H__ +#define __CALL_UI_PRESENTERS_MISC_HELPERS_H__ #include #include @@ -36,4 +36,4 @@ namespace callui { } -#endif // __CALLUI_PRESENTERS_HELPERS_H__ +#endif // __CALL_UI_PRESENTERS_MISC_HELPERS_H__ diff --git a/call-ui/presenters/misc/types.h b/call-ui/presenters/misc/types.h new file mode 100644 index 0000000..385fe3e --- /dev/null +++ b/call-ui/presenters/misc/types.h @@ -0,0 +1,33 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * 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 __CALL_UI_PRESENTERS_MISC_TYPES_H__ +#define __CALL_UI_PRESENTERS_MISC_TYPES_H__ + +#include "call-ui/model/types.h" + +namespace callui { + + enum class CallMode { + UNDEFINED, + INCOMING, + OUTGOING, + DURING, + END + }; +} + +#endif // __CALL_UI_PRESENTERS_MISC_TYPES_H__ diff --git a/src/presenters/KeypadPage.cpp b/call-ui/presenters/pages/KeypadPage.cpp similarity index 96% rename from src/presenters/KeypadPage.cpp rename to call-ui/presenters/pages/KeypadPage.cpp index 04f0ebe..ca920b1 100644 --- a/src/presenters/KeypadPage.cpp +++ b/call-ui/presenters/pages/KeypadPage.cpp @@ -14,12 +14,9 @@ * limitations under the License. */ -#include "presenters/KeypadPage.h" -#include "view/VolumeControl.h" +#include "KeypadPage.h" -#include "presenters/AtspiHighlightHelper.h" - -#include "resources.h" +#include "call-ui/resources.h" #include "common.h" namespace callui { namespace { namespace impl { @@ -367,7 +364,7 @@ namespace callui { } } - void KeypadPage::onVolumeControlEventCb(VolumeControlEvent event) + void KeypadPage::onVolumeControlEventCb(VolumeControl::Event event) { if (!isActive()) { LOG_RETURN_VOID(RES_OK, "Presenter is not active. Ignore"); @@ -381,10 +378,10 @@ namespace callui { restartVCTimer(); switch (event) { - case VolumeControlEvent::INCREASE: + case VolumeControl::Event::INCREASE: tryIncreaseVolume(); break; - case VolumeControlEvent::DECREASE: + case VolumeControl::Event::DECREASE: tryDecreaseVolume(); break; default: @@ -524,11 +521,11 @@ namespace callui { addRotaryEventHandler(CALLBACK_A( KeypadPage::onRotaryEvent), this); - m_sm->addAudioStateHandler(DELEGATE( - KeypadPage::onAudioStateChanged, this)); + m_sm->addAudioStateHandler(WEAK_DELEGATE( + KeypadPage::onAudioStateChanged, asWeak(*this))); - m_sm->addVolumeStateHandler(DELEGATE( - KeypadPage::onVolumeLevelChanged, this)); + m_sm->addVolumeStateHandler(WEAK_DELEGATE( + KeypadPage::onVolumeLevelChanged, asWeak(*this))); } void KeypadPage::unregisterCallbacks() @@ -536,11 +533,11 @@ namespace callui { delRotaryEventHandler( CALLBACK_A(KeypadPage::onRotaryEvent), this); - m_sm->delAudioStateHandler(DELEGATE( - KeypadPage::onAudioStateChanged, this)); + m_sm->delAudioStateHandler(WEAK_DELEGATE( + KeypadPage::onAudioStateChanged, asWeak(*this))); - m_sm->delVolumeStateHandler(DELEGATE( - KeypadPage::onVolumeLevelChanged, this)); + m_sm->delVolumeStateHandler(WEAK_DELEGATE( + KeypadPage::onVolumeLevelChanged, asWeak(*this))); } // Screen Reader diff --git a/inc/presenters/KeypadPage.h b/call-ui/presenters/pages/KeypadPage.h similarity index 85% rename from inc/presenters/KeypadPage.h rename to call-ui/presenters/pages/KeypadPage.h index 2ca6a1b..d3c8441 100644 --- a/inc/presenters/KeypadPage.h +++ b/call-ui/presenters/pages/KeypadPage.h @@ -14,20 +14,23 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_KEYPAD_PAGE_H__ -#define __CALLUI_PRESENTERS_KEYPAD_PAGE_H__ +#ifndef __CALL_UI_PRESENTERS_PAGES_KEYPAD_PAGE_H__ +#define __CALL_UI_PRESENTERS_PAGES_KEYPAD_PAGE_H__ -#include "Page.h" +#include "call-ui/presenters/base/Page.h" #include "ucl/gui/Layout.h" -#include "ucl/gui/NaviItem.h" -#include "types.h" +#include "call-ui/model/ISoundManager.h" +#include "call-ui/view/VolumeControl.h" +#include "call-ui/presenters/misc/AtspiHighlightHelper.h" -#include "model/ISoundManager.h" +#include "call-ui/presenters/misc/types.h" namespace callui { + UCL_DECLARE_REF_ALIASES(KeypadPage); + class KeypadPage final : public Page { public: class Builder { @@ -65,7 +68,7 @@ namespace callui { void stopDtmf(); void onAudioStateChanged(AudioStateType state); - void onVolumeControlEventCb(VolumeControlEvent event); + void onVolumeControlEventCb(VolumeControl::Event event); Eina_Bool onVCTimerCb(); void startVCTimer(); void restartVCTimer(); @@ -113,4 +116,4 @@ namespace callui { }; } -#endif // __CALLUI_PRESENTERS_KEYPAD_PAGE_H__ +#endif // __CALL_UI_PRESENTERS_PAGES_KEYPAD_PAGE_H__ diff --git a/src/presenters/MainPage.cpp b/call-ui/presenters/pages/MainPage.cpp similarity index 96% rename from src/presenters/MainPage.cpp rename to call-ui/presenters/pages/MainPage.cpp index 689ddeb..8a16351 100644 --- a/src/presenters/MainPage.cpp +++ b/call-ui/presenters/pages/MainPage.cpp @@ -14,32 +14,12 @@ * limitations under the License. */ -#include "presenters/MainPage.h" +#include "MainPage.h" #include "ucl/gui/Window.h" #include "ucl/gui/Widget.h" -#include "model/ICallUI.h" -#include "model/ICallManager.h" -#include "model/IIncomingCall.h" -#include "model/IActiveCall.h" -#include "model/IHeldCall.h" -#include "model/IEndCall.h" -#include "model/IIndicatorStateProvider.h" -#include "model/ICallInfo.h" -#include "model/IRejectMsgProvider.h" - -#include "presenters/IndicatorPresenter.h" -#include "presenters/AcceptRejectPresenter.h" -#include "presenters/CallInfoPresenter.h" -#include "presenters/RejectMsgPresenter.h" -#include "presenters/AccessoryPresenter.h" -#include "presenters/MoreOptionsPresenter.h" -#include "presenters/DeviceStatePresenter.h" - -#include "presenters/AtspiHighlightHelper.h" - -#include "resources.h" +#include "call-ui/resources.h" #include "common.h" namespace callui { namespace { namespace impl { @@ -486,16 +466,20 @@ namespace callui { Result MainPage::updateDeviceState(CallMode prevMode, CallMode curMode) { if (curMode == CallMode::INCOMING && curMode != prevMode) { - m_devicePrs->setDisplayState(DisplayState::ON); - m_devicePrs->setDisplayMode(DisplayMode::TOP_PRIORITY); + m_devicePrs->setDisplayState( + DeviceStatePresenter::DisplayState::ON); + m_devicePrs->setDisplayMode( + DeviceStatePresenter::DisplayMode::TOP_PRIORITY); m_devicePrs->setCpuLockState(true); } else if (prevMode == CallMode::INCOMING && prevMode != curMode) { - m_devicePrs->setDisplayMode(DisplayMode::REGULAR); + m_devicePrs->setDisplayMode( + DeviceStatePresenter::DisplayMode::REGULAR); m_devicePrs->setCpuLockState(false); } if (curMode == CallMode::END) { - m_devicePrs->setDisplayState(DisplayState::ON); + m_devicePrs->setDisplayState( + DeviceStatePresenter::DisplayState::ON); } return RES_OK; @@ -543,7 +527,7 @@ namespace callui { } m_devicePrs = DeviceStatePresenter::Builder(). - setDisplayState(DisplayState::ON). + setDisplayState(DeviceStatePresenter::DisplayState::ON). build(asShared(win)); if (!m_devicePrs) { @@ -636,9 +620,9 @@ namespace callui { return RES_OK; } - void MainPage::RejectMsgStateCb(RejectMsgState state) + void MainPage::RejectMsgPresenterStateCb(RejectMsgPresenter::State state) { - if (state == RejectMsgState::HIDDEN) { + if (state == RejectMsgPresenter::State::HIDDEN) { show(*m_rmLy); show(*m_rmCueAo); } else { @@ -660,7 +644,7 @@ namespace callui { { m_rmPrs = RejectMsgPresenter::Builder(). setProvider(provider). - setStateHandler(WEAK_DELEGATE(MainPage::RejectMsgStateCb, + setStateHandler(WEAK_DELEGATE(MainPage::RejectMsgPresenterStateCb, asWeak(*this))). setSelectHandler(WEAK_DELEGATE(MainPage::RejectMsgSelectCb, asWeak(*this))). diff --git a/inc/presenters/MainPage.h b/call-ui/presenters/pages/MainPage.h similarity index 82% rename from inc/presenters/MainPage.h rename to call-ui/presenters/pages/MainPage.h index 03747c0..92c7eed 100644 --- a/inc/presenters/MainPage.h +++ b/call-ui/presenters/pages/MainPage.h @@ -14,20 +14,29 @@ * limitations under the License. */ -#ifndef __CALLUI_PRESENTERS_MAIN_PAGE_H__ -#define __CALLUI_PRESENTERS_MAIN_PAGE_H__ +#ifndef __CALL_UI_PRESENTERS_PAGES_MAIN_PAGE_H__ +#define __CALL_UI_PRESENTERS_PAGES_MAIN_PAGE_H__ -#include "Page.h" -#include "model/ICallListener.h" +#include "call-ui/presenters/base/Page.h" +#include "call-ui/model/ICallListener.h" #include "ucl/gui/Layout.h" -#include "ucl/gui/StyledWidget.h" -#include "ucl/gui/NaviItem.h" -#include "types.h" +#include "call-ui/model/ICallUI.h" + +#include "call-ui/presenters/misc/IndicatorPresenter.h" +#include "call-ui/presenters/misc/AcceptRejectPresenter.h" +#include "call-ui/presenters/misc/CallInfoPresenter.h" +#include "call-ui/presenters/misc/RejectMsgPresenter.h" +#include "call-ui/presenters/misc/AccessoryPresenter.h" +#include "call-ui/presenters/misc/MoreOptionsPresenter.h" +#include "call-ui/presenters/misc/DeviceStatePresenter.h" +#include "call-ui/presenters/misc/AtspiHighlightHelper.h" namespace callui { + UCL_DECLARE_REF_ALIASES(MainPage); + class MainPage final : public Page, public ICallListener { public: @@ -68,7 +77,7 @@ namespace callui { const IRejectMsgProviderSRef &provider); ucl::Result createRejectMsgCue(); - void RejectMsgStateCb(RejectMsgState state); + void RejectMsgPresenterStateCb(RejectMsgPresenter::State state); void RejectMsgSelectCb(const IRejectMsgSRef &rm); ucl::Result createBottomBtn(const ucl::ElmStyle &style, @@ -143,4 +152,4 @@ namespace callui { }; } -#endif // __CALLUI_PRESENTERS_MAIN_PAGE_H__ +#endif // __CALL_UI_PRESENTERS_PAGES_MAIN_PAGE_H__ diff --git a/call-ui/presenters/pages/common.h b/call-ui/presenters/pages/common.h new file mode 100644 index 0000000..28cd174 --- /dev/null +++ b/call-ui/presenters/pages/common.h @@ -0,0 +1,22 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * 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 __CALL_UI_PRESENTERS_PAGES_PAGES_COMMON_H__ +#define __CALL_UI_PRESENTERS_PAGES_PAGES_COMMON_H__ + +#include "call-ui/presenters/common.h" + +#endif // __CALL_UI_PRESENTERS_PAGES_PAGES_COMMON_H__ diff --git a/call-ui/presenters/types.h b/call-ui/presenters/types.h new file mode 100644 index 0000000..c7beb84 --- /dev/null +++ b/call-ui/presenters/types.h @@ -0,0 +1,23 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * 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 __CALL_UI_PRESENTERS_TYPES_H__ +#define __CALL_UI_PRESENTERS_TYPES_H__ + +#include "call-ui/view/types.h" +#include "call-ui/model/types.h" + +#endif // __CALL_UI_PRESENTERS_TYPES_H__ diff --git a/src/resources.cpp b/call-ui/resources.cpp similarity index 99% rename from src/resources.cpp rename to call-ui/resources.cpp index fbac1f1..8c9a684 100644 --- a/src/resources.cpp +++ b/call-ui/resources.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "resources.h" +#include "call-ui/resources.h" namespace callui { diff --git a/inc/resources.h b/call-ui/resources.h similarity index 96% rename from inc/resources.h rename to call-ui/resources.h index cbc2b05..aa7a774 100644 --- a/inc/resources.h +++ b/call-ui/resources.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_RESOURCES_H__ -#define __CALLUI_RESOURCES_H__ +#ifndef __CALL_UI_RESOURCES_H__ +#define __CALL_UI_RESOURCES_H__ #include "ucl/misc/TString.h" @@ -77,4 +77,4 @@ namespace callui { } -#endif // __CALLUI_RESOURCES_H__ +#endif // __CALL_UI_RESOURCES_H__ diff --git a/src/types.cpp b/call-ui/types.cpp similarity index 100% rename from src/types.cpp rename to call-ui/types.cpp diff --git a/inc/types.h b/call-ui/types.h similarity index 92% rename from inc/types.h rename to call-ui/types.h index 6bf8e12..6bbb1c3 100644 --- a/inc/types.h +++ b/call-ui/types.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_TYPES_H__ -#define __CALLUI_TYPES_H__ +#ifndef __CALL_UI_TYPES_H__ +#define __CALL_UI_TYPES_H__ #include "config.h" @@ -39,4 +39,4 @@ namespace callui { using NotiHandler = ucl::WeakDelegate; } -#endif // __CALLUI_TYPES_H__ +#endif // __CALL_UI_TYPES_H__ diff --git a/src/view/AcceptRejectWidget.cpp b/call-ui/view/AcceptRejectWidget.cpp similarity index 99% rename from src/view/AcceptRejectWidget.cpp rename to call-ui/view/AcceptRejectWidget.cpp index 0049890..ed7c2aa 100644 --- a/src/view/AcceptRejectWidget.cpp +++ b/call-ui/view/AcceptRejectWidget.cpp @@ -14,10 +14,10 @@ * limitations under the License. */ -#include "view/AcceptRejectWidget.h" +#include "call-ui/view/AcceptRejectWidget.h" #include "common.h" -#include "resources.h" +#include "call-ui/resources.h" #define CU_COL_TRANSPARENT 0, 0, 0, 0 #define CU_COL_WHITE 255, 255, 255, 255 diff --git a/inc/view/AcceptRejectWidget.h b/call-ui/view/AcceptRejectWidget.h similarity index 96% rename from inc/view/AcceptRejectWidget.h rename to call-ui/view/AcceptRejectWidget.h index a304047..0bbe173 100644 --- a/inc/view/AcceptRejectWidget.h +++ b/call-ui/view/AcceptRejectWidget.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_VIEW_ACCEPT_REJECT_WIDGET_H__ -#define __CALLUI_VIEW_ACCEPT_REJECT_WIDGET_H__ +#ifndef __CALL_UI_VIEW_ACCEPT_REJECT_WIDGET_H__ +#define __CALL_UI_VIEW_ACCEPT_REJECT_WIDGET_H__ #include "ucl/gui/ElmWidget.h" @@ -27,6 +27,8 @@ namespace callui { + UCL_DECLARE_REF_ALIASES(AcceptRejectWidget); + class AcceptRejectWidget final : public ucl::ElmWidget { public: class Builder { @@ -189,4 +191,4 @@ namespace callui { } -#endif // __CALLUI_VIEW_ACCEPT_REJECT_WIDGET_H__ +#endif // __CALL_UI_VIEW_ACCEPT_REJECT_WIDGET_H__ diff --git a/src/view/Slider.cpp b/call-ui/view/Slider.cpp similarity index 98% rename from src/view/Slider.cpp rename to call-ui/view/Slider.cpp index 17205e3..3c5b7f0 100644 --- a/src/view/Slider.cpp +++ b/call-ui/view/Slider.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "view/Slider.h" +#include "call-ui/view/Slider.h" #include "common.h" diff --git a/inc/view/Slider.h b/call-ui/view/Slider.h similarity index 90% rename from inc/view/Slider.h rename to call-ui/view/Slider.h index 58ef7cc..63cfddf 100644 --- a/inc/view/Slider.h +++ b/call-ui/view/Slider.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_VIEW_SLIDER_H__ -#define __CALLUI_VIEW_SLIDER_H__ +#ifndef __CALL_UI_VIEW_SLIDER_H__ +#define __CALL_UI_VIEW_SLIDER_H__ #include "ucl/gui/Layout.h" @@ -23,6 +23,8 @@ namespace callui { + UCL_DECLARE_REF_ALIASES(Slider); + class Slider : public ucl::ElmWidget { public: class Builder { @@ -61,4 +63,4 @@ namespace callui { } -#endif // __CALLUI_VIEW_SLIDER_H__ +#endif // __CALL_UI_VIEW_SLIDER_H__ diff --git a/src/view/VolumeControl.cpp b/call-ui/view/VolumeControl.cpp similarity index 95% rename from src/view/VolumeControl.cpp rename to call-ui/view/VolumeControl.cpp index 355aae1..2e5cfaf 100644 --- a/src/view/VolumeControl.cpp +++ b/call-ui/view/VolumeControl.cpp @@ -14,10 +14,10 @@ * limitations under the License. */ -#include "view/VolumeControl.h" +#include "call-ui/view/VolumeControl.h" +#include "call-ui/resources.h" #include "common.h" -#include "resources.h" namespace callui { namespace { namespace impl { @@ -67,7 +67,7 @@ namespace callui { } VolumeControl::Builder &VolumeControl::Builder::setEventHandler( - const VolumeControlEventHandler &handler) + const EventHandler &handler) { m_handler = handler; return *this; @@ -99,7 +99,7 @@ namespace callui { const TString &info, int maxValue, int curValue, - const VolumeControlEventHandler &handler): + const EventHandler &handler): Slider(rc, layout, maxValue, curValue), m_decreaseBtn(elm_button_add(*m_layout)), m_increaseBtn(elm_button_add(*m_layout)), @@ -171,7 +171,7 @@ namespace callui { } void VolumeControl::setEventHandler( - const VolumeControlEventHandler &handler) + const EventHandler &handler) { m_handler = handler; } @@ -179,14 +179,14 @@ namespace callui { void VolumeControl::onDecreaseBtnClickedCb(Widget &widget, void *eventInfo) { if (m_handler) { - m_handler(VolumeControlEvent::DECREASE); + m_handler(Event::DECREASE); } } void VolumeControl::onIncreaseBtnClickedCb(Widget &widget, void *eventInfo) { if (m_handler) { - m_handler(VolumeControlEvent::INCREASE); + m_handler(Event::INCREASE); } } diff --git a/inc/view/VolumeControl.h b/call-ui/view/VolumeControl.h similarity index 80% rename from inc/view/VolumeControl.h rename to call-ui/view/VolumeControl.h index 98fbccb..adbf500 100644 --- a/inc/view/VolumeControl.h +++ b/call-ui/view/VolumeControl.h @@ -14,10 +14,10 @@ * limitations under the License. */ -#ifndef __CALLUI_VIEW_VOLUME_CONTROL_H__ -#define __CALLUI_VIEW_VOLUME_CONTROL_H__ +#ifndef __CALL_UI_VIEW_VOLUME_CONTROL_H__ +#define __CALL_UI_VIEW_VOLUME_CONTROL_H__ -#include "view/Slider.h" +#include "call-ui/view/Slider.h" #include "ucl/gui/StyledWidget.h" #include "ucl/gui/Layout.h" @@ -26,7 +26,16 @@ namespace callui { + UCL_DECLARE_REF_ALIASES(VolumeControl); + class VolumeControl final : public Slider { + public: + enum class Event { + INCREASE, + DECREASE + }; + + using EventHandler = ucl::WeakDelegate; public: class Builder { public: @@ -34,21 +43,21 @@ namespace callui { Builder &setInfoText(const ucl::TString &info); Builder &setMaxValue(int maxValue); Builder &setValue(int curValue); - Builder &setEventHandler(const VolumeControlEventHandler &handler); + Builder &setEventHandler(const EventHandler &handler); VolumeControlSRef build(ucl::ElmWidget &parent) const; private: ucl::TString m_info; int m_maxValue; int m_curValue; - VolumeControlEventHandler m_handler; + EventHandler m_handler; }; public: void setInfoText(const ucl::TString &info); void setDecreaseBtnEnable(bool isEnable); void setIncreaseBtnEnable(bool isEnable); - void setEventHandler(const VolumeControlEventHandler &handler); + void setEventHandler(const EventHandler &handler); // Slider @@ -66,7 +75,7 @@ namespace callui { const ucl::TString &info, int maxValue, int curValue, - const VolumeControlEventHandler &handler); + const EventHandler &handler); virtual ~VolumeControl(); @@ -84,7 +93,7 @@ namespace callui { private: ucl::StyledWidget m_decreaseBtn; ucl::StyledWidget m_increaseBtn; - VolumeControlEventHandler m_handler; + EventHandler m_handler; // Screen Reader ucl::ElmWidgetSRef m_valueTxtAo; @@ -92,4 +101,4 @@ namespace callui { } -#endif // __CALLUI_VIEW_VOLUME_CONTROL_H__ +#endif // __CALL_UI_VIEW_VOLUME_CONTROL_H__ diff --git a/src/view/common.h b/call-ui/view/common.h similarity index 85% rename from src/view/common.h rename to call-ui/view/common.h index 7c795fe..cf9b0d4 100644 --- a/src/view/common.h +++ b/call-ui/view/common.h @@ -14,15 +14,15 @@ * limitations under the License. */ -#ifndef __CALLUI_VIEW_COMMON_H__ -#define __CALLUI_VIEW_COMMON_H__ +#ifndef __CALL_UI_VIEW_COMMON_H__ +#define __CALL_UI_VIEW_COMMON_H__ #include "ucl/gui/stdTheme.h" #include "ucl/gui/helpers.h" -#include "view/helpers.h" +#include "call-ui/view/helpers.h" -#include "../common.h" +#include "call-ui/common.h" #define DEL_TRANSIT(ptr) \ do { \ @@ -39,4 +39,4 @@ namespace callui { constexpr ucl::SmartEvent ATSPI_HIGHLIGHTED {"atspi,highlighted"}; } -#endif // __CALLUI_VIEW_COMMON_H__ +#endif // __CALL_UI_VIEW_COMMON_H__ diff --git a/src/view/helpers.cpp b/call-ui/view/helpers.cpp similarity index 99% rename from src/view/helpers.cpp rename to call-ui/view/helpers.cpp index 6f6a196..153e8ad 100644 --- a/src/view/helpers.cpp +++ b/call-ui/view/helpers.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "view/helpers.h" +#include "call-ui/view/helpers.h" #include "ucl/gui/Window.h" #include "ucl/gui/Naviframe.h" diff --git a/inc/view/helpers.h b/call-ui/view/helpers.h similarity index 94% rename from inc/view/helpers.h rename to call-ui/view/helpers.h index 4ebd3d7..8c4fe6e 100644 --- a/inc/view/helpers.h +++ b/call-ui/view/helpers.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __CALLUI_VIEW_HELPERS_H__ -#define __CALLUI_VIEW_HELPERS_H__ +#ifndef __CALL_UI_VIEW_HELPERS_H__ +#define __CALL_UI_VIEW_HELPERS_H__ #include @@ -62,4 +62,4 @@ namespace callui { } -#endif // __CALLUI_VIEW_HELPERS_H__ +#endif // __CALL_UI_VIEW_HELPERS_H__ diff --git a/inc/view/types.h b/call-ui/view/types.h similarity index 65% rename from inc/view/types.h rename to call-ui/view/types.h index 8354b06..eb12962 100644 --- a/inc/view/types.h +++ b/call-ui/view/types.h @@ -14,32 +14,21 @@ * limitations under the License. */ -#ifndef __CALLUI_VIEW_TYPES_H__ -#define __CALLUI_VIEW_TYPES_H__ +#ifndef __CALL_UI_VIEW_TYPES_H__ +#define __CALL_UI_VIEW_TYPES_H__ #include #include "ucl/gui/types.h" -#include "../types.h" +#include "call-ui/types.h" namespace callui { - enum class VolumeControlEvent { - INCREASE, - DECREASE - }; - enum class AcceptButtonType { SIMPLE, BT_HEADSET }; - - UCL_DECLARE_REF_ALIASES(Slider); - UCL_DECLARE_REF_ALIASES(VolumeControl); - UCL_DECLARE_REF_ALIASES(AcceptRejectWidget); - - using VolumeControlEventHandler = ucl::WeakDelegate; } -#endif // __CALLUI_VIEW_TYPES_H__ +#endif // __CALL_UI_VIEW_TYPES_H__ diff --git a/inc/presenters/types.h b/inc/presenters/types.h deleted file mode 100644 index e2dadb9..0000000 --- a/inc/presenters/types.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2017 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.1 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://floralicense.org/license/ - * - * 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 __CALLUI_PRESENTERS_TYPES_H__ -#define __CALLUI_PRESENTERS_TYPES_H__ - -#include "../types.h" - -#include "view/types.h" -#include "model/types.h" - -namespace callui { - - enum class AcceptDialogEvent { - HOLD_AND_ACCEPT, - END_AND_ACCEPT, - BACK - }; - - enum class CallMode { - UNDEFINED, - INCOMING, - OUTGOING, - DURING, - END - }; - - enum class RejectMsgState { - HIDDEN, - IN_TRANSITION, - SHOWN - }; - - enum class DisplayState { - UNDEFINED, - ON, - OFF, - DIM - }; - - enum class DisplayMode { - UNDEFINED, - REGULAR, - TOP_PRIORITY - }; - - using AccessoryBtnMask = int; - - UCL_DECLARE_REF_ALIASES(Page); - - UCL_DECLARE_REF_ALIASES(MainPage); - UCL_DECLARE_REF_ALIASES(KeypadPage); - - UCL_DECLARE_REF_ALIASES(AcceptRejectPresenter); - UCL_DECLARE_REF_ALIASES(AcceptDialog); - - UCL_DECLARE_REF_ALIASES(IndicatorPresenter); - UCL_DECLARE_REF_ALIASES(CallInfoPresenter); - UCL_DECLARE_REF_ALIASES(CallStatusPresenter); - - UCL_DECLARE_REF_ALIASES(RejectMsgPresenter); - - UCL_DECLARE_REF_ALIASES(AccessoryPresenter); - UCL_DECLARE_REF_ALIASES(MoreOptionsPresenter); - - UCL_DECLARE_REF_ALIASES(DeviceStatePresenter); - UCL_DECLARE_REF_ALIASES(MotionSensorPresenter); - - UCL_DECLARE_REF_ALIASES(AtspiHighlightHelper); - - using AcceptDialogHandler = ucl::WeakDelegate; - using RejectMsgStateHandler = ucl::WeakDelegate; - using RejectMsgSelectHandler = ucl::WeakDelegate; - using MotionSensorHandler = ucl::WeakDelegate; -} - -#endif // __CALLUI_PRESENTERS_TYPES_H__ diff --git a/project_def.prop b/project_def.prop index 7bc0ea9..0260b0b 100644 --- a/project_def.prop +++ b/project_def.prop @@ -36,7 +36,7 @@ USER_OBJS = USER_C_INC_DIRS = USER_INC_FILES = ## C++ Compiler -USER_CPP_INC_DIRS = inc ucl/inc +USER_CPP_INC_DIRS = . ucl/inc USER_CPP_INC_FILES = USER_INC_DIRS = $(USER_C_INC_DIRS) $(USER_CPP_INC_DIRS) diff --git a/src/model/implTypes.h b/src/model/implTypes.h deleted file mode 100644 index 7e2b341..0000000 --- a/src/model/implTypes.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2017 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.1 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://floralicense.org/license/ - * - * 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 __CALLUI_MODEL_IMPL_TYPES_H__ -#define __CALLUI_MODEL_IMPL_TYPES_H__ - -#include "model/types.h" -#include "ucl/misc/Event.h" -#include "ucl/util/smartDelegation.h" - -namespace callui { - - enum class CallReleaseType { - BY_CALL_HANDLE, - ALL, - ALL_HOLD, - ALL_ACTIVE - }; - - enum class CallManagerErr { - DIAL_CANCEL, - DIAL_FAIL, - DIAL_FAIL_SS, - DIAL_FAIL_FDN, - DIAL_FLIGHT_MODE - }; - - UCL_DECLARE_REF_ALIASES(CallClient); - - UCL_DECLARE_REF_ALIASES(SoundManager); - UCL_DECLARE_REF_ALIASES(CallManager); - - UCL_DECLARE_REF_ALIASES(ICallManagerListener); - - UCL_DECLARE_REF_ALIASES(IncomingCall); - UCL_DECLARE_REF_ALIASES(ActiveCall); - UCL_DECLARE_REF_ALIASES(HeldCall); - UCL_DECLARE_REF_ALIASES(EndCall); - - UCL_DECLARE_REF_ALIASES(CallInfo); - UCL_DECLARE_REF_ALIASES(ContactInfo); - UCL_DECLARE_REF_ALIASES(ConferenceCallInfo); - - UCL_DECLARE_REF_ALIASES(MsgClient); - UCL_DECLARE_REF_ALIASES(RejectMsgProvider); - UCL_DECLARE_REF_ALIASES(RejectMsg); - - UCL_DECLARE_REF_ALIASES(IndicatorStateProvider); - UCL_DECLARE_REF_ALIASES(IIndicatorStateSource); - - UCL_DECLARE_REF_ALIASES(ConnectionStateSource); - UCL_DECLARE_REF_ALIASES(RssiStateSource); - UCL_DECLARE_REF_ALIASES(BatteryStateSource); - UCL_DECLARE_REF_ALIASES(SimSlotStateSource); - UCL_DECLARE_REF_ALIASES(HdVoiceStateSource); - UCL_DECLARE_REF_ALIASES(VoiceControlStateSource); - - UCL_DECLARE_REF_ALIASES(VoiceControlStateProvider); - - UCL_DECLARE_REF_ALIASES(ContactInfoProvider); - - UCL_DECLARE_REF_ALIASES(BluetoothManager); - - using AudioStateEvent = ucl::Event; - using MuteStateEvent = ucl::Event; - using VolumeLevelEvent = ucl::Event; - - using BluetoothVolumeHandler = ucl::WeakDelegate; -} - -#endif // __CALLUI_MODEL_IMPL_TYPES_H__ -- 2.34.1