From 83cead7c9feed66e09bccc3698fae793f3dcdedc Mon Sep 17 00:00:00 2001 From: Tomasz Iwanek Date: Wed, 21 Nov 2012 15:46:37 +0100 Subject: [PATCH] Unused code 2 [Issue#] N/A [Bug] There is unused code [Cause] N/A [Solution] Remove that code. [Verification] Build repository or check buildbot status Change-Id: Idf35a3742cac662699ff3e542e97115077a74a14 --- src/domain/global_context.cpp | 2 - src/domain/user_callback_controller.cpp | 69 ------- src/domain/user_callback_controller.h | 35 ---- src/domain/user_callback_logic.cpp | 49 ----- src/domain/user_callback_logic.h | 223 --------------------- src/framework/DESCRIPTION | 1 - src/view/common/scheme.cpp | 4 - src/view/common/scheme.h | 1 - .../common/view_logic_web_notification_support.cpp | 6 - .../common/view_logic_web_notification_support.h | 1 - src/view/webkit/CMakeLists.txt | 2 - 11 files changed, 393 deletions(-) delete mode 100644 src/domain/user_callback_controller.cpp delete mode 100644 src/domain/user_callback_controller.h delete mode 100644 src/domain/user_callback_logic.cpp delete mode 100644 src/domain/user_callback_logic.h delete mode 100644 src/framework/DESCRIPTION diff --git a/src/domain/global_context.cpp b/src/domain/global_context.cpp index 16555bc..efe7e86 100644 --- a/src/domain/global_context.cpp +++ b/src/domain/global_context.cpp @@ -21,7 +21,6 @@ */ #include #include -#include #include namespace GlobalContext { @@ -31,7 +30,6 @@ void TouchArchitecture() // Touch all WebRuntime controllers // Remember to always add here new singletons! GlobalLogicSingleton::Instance().GetGlobalModel(); - UserCallbackModule::initialize(); DPL::Popup::PopupControllerSingleton::Instance().Touch(); // Start UI process rpc server } diff --git a/src/domain/user_callback_controller.cpp b/src/domain/user_callback_controller.cpp deleted file mode 100644 index c516d32..0000000 --- a/src/domain/user_callback_controller.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @file user_callback_controller.cpp - * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com) - * @version 1.0 - * @brief Implementation file for user callback controller - */ -#include -#include -#include -#include -#include -#include - -namespace UserCallbackControllerEvents { -/** - * Send guarded user callback - * - * @brief This event send asynchronous user callback call event - * - * After user callback is emmited, user callback will be deleted by logic. - */ -DECLARE_GENERIC_EVENT_1(EmitUserCallbackEvent, UserCallbackCall *) -} // namespace UserCallbackControllerEvents - -class UserCallbackController : - public DPL::Event::Controller::Type> -{ - UserCallbackController() {} - virtual ~UserCallbackController() {} - virtual void OnEventReceived( - const UserCallbackControllerEvents::EmitUserCallbackEvent &event) - { - UserCallbackCall *userCallback = event.GetArg0(); - m_userCallbackLogic.EmitUserCallback(userCallback); - } - UserCallbackLogic m_userCallbackLogic; - friend class DPL::Singleton; -}; -typedef DPL::Singleton UserCallbackControllerSingleton; -IMPLEMENT_SINGLETON(UserCallbackController) - - -void POST_USER_CALLBACK(UserCallbackCall *call) -{ - CONTROLLER_POST_EVENT(UserCallbackController, - UserCallbackControllerEvents::EmitUserCallbackEvent( - call)); -} - -void UserCallbackModule::initialize() -{ - UserCallbackControllerSingleton::Instance().Touch(); -} diff --git a/src/domain/user_callback_controller.h b/src/domain/user_callback_controller.h deleted file mode 100644 index 744fbac..0000000 --- a/src/domain/user_callback_controller.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @file user_callback_controller.h - * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com) - * @version 1.0 - * @brief Header file for user callback controller - */ -#ifndef USER_CALLBACK_CONTROLLER_H -#define USER_CALLBACK_CONTROLLER_H - -#include - -namespace UserCallbackModule -{ -void initialize(); -} - -void POST_USER_CALLBACK(UserCallbackCall *call); - - -#endif // USER_CALLBACK_CONTROLLER_H diff --git a/src/domain/user_callback_logic.cpp b/src/domain/user_callback_logic.cpp deleted file mode 100644 index 7a5efe1..0000000 --- a/src/domain/user_callback_logic.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @file user_callback_logic.cpp - * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com) - * @version 1.0 - * @brief Implementation file for user callback logic - */ -#include -#include -#include - -UserCallbackLogic::UserCallbackLogic() -{ -} - -UserCallbackLogic::~UserCallbackLogic() -{ -} - -void UserCallbackLogic::EmitUserCallback(const UserCallbackCall *callback) -{ - LogDebug("Calling user callback..."); - - // Guard user callback call - UNHANDLED_EXCEPTION_HANDLER_BEGIN - { - callback->Exec(); - } - UNHANDLED_EXCEPTION_HANDLER_END - - // Delete abstract usercallback - delete callback; - - LogDebug("User callback called."); -} diff --git a/src/domain/user_callback_logic.h b/src/domain/user_callback_logic.h deleted file mode 100644 index 469194f..0000000 --- a/src/domain/user_callback_logic.h +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @file user_callback_logic.h - * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com) - * @version 1.0 - * @brief Implementation file for user callback logic - */ -#ifndef USER_CALLBACK_LOGIC_H -#define USER_CALLBACK_LOGIC_H - -#include -#include - -class UserCallbackCall -{ - public: - virtual ~UserCallbackCall() - { - } - virtual void Exec() const = 0; -}; - -template -class GenericUserCallbackCall0 : - public UserCallbackCall -{ - private: - Callback m_callback; - - public: - GenericUserCallbackCall0(Callback callback) : - m_callback(callback) - { - } - - virtual void Exec() const - { - Assert(m_callback != NULL); - m_callback(); - } -}; - -template -class GenericUserCallbackCall1 : - public UserCallbackCall -{ - private: - Callback m_callback; - Arg0 m_arg0; - - public: - GenericUserCallbackCall1(Callback callback, - Arg0 arg0) : - m_callback(callback), - m_arg0(arg0) - { - } - - virtual void Exec() const - { - Assert(m_callback != NULL); - m_callback(m_arg0); - } -}; - -template -class GenericUserCallbackCall2 : - public UserCallbackCall -{ - private: - Callback m_callback; - Arg0 m_arg0; - Arg1 m_arg1; - - public: - GenericUserCallbackCall2(Callback callback, - Arg0 arg0, - Arg1 arg1) : - m_callback(callback), - m_arg0(arg0), - m_arg1(arg1) - { - } - - virtual void Exec() const - { - Assert(m_callback != NULL); - m_callback(m_arg0, m_arg1); - } -}; - -template -class GenericUserCallbackCall3 : - public UserCallbackCall -{ - private: - Callback m_callback; - Arg0 m_arg0; - Arg1 m_arg1; - Arg2 m_arg2; - - public: - GenericUserCallbackCall3(Callback callback, - Arg0 arg0, - Arg1 arg1, - Arg2 arg2) : - m_callback(callback), - m_arg0(arg0), - m_arg1(arg1), - m_arg2(arg2) - { - } - - virtual void Exec() const - { - Assert(m_callback != NULL); - m_callback(m_arg0, m_arg1, m_arg2); - } -}; - -template -class GenericUserCallbackCall4 : - public UserCallbackCall -{ - private: - Callback m_callback; - Arg0 m_arg0; - Arg1 m_arg1; - Arg2 m_arg2; - Arg3 m_arg3; - - public: - GenericUserCallbackCall4(Callback callback, - Arg0 arg0, - Arg1 arg1, - Arg2 arg2, - Arg3 arg3) : - m_callback(callback), - m_arg0(arg0), - m_arg1(arg1), - m_arg2(arg2), - m_arg3(arg3) - { - } - - virtual void Exec() const - { - Assert(m_callback != NULL); - m_callback(m_arg0, m_arg1, m_arg2, m_arg3); - } -}; - -template -class GenericUserCallbackCall5 : - public UserCallbackCall -{ - private: - Callback m_callback; - Arg0 m_arg0; - Arg1 m_arg1; - Arg2 m_arg2; - Arg3 m_arg3; - Arg4 m_arg4; - - public: - GenericUserCallbackCall5(Callback callback, - Arg0 arg0, - Arg1 arg1, - Arg2 arg2, - Arg3 arg3, - Arg4 arg4) : - m_callback(callback), - m_arg0(arg0), - m_arg1(arg1), - m_arg2(arg2), - m_arg3(arg3), - m_arg4(arg4) - { - } - - virtual void Exec() const - { - Assert(m_callback != NULL); - m_callback(m_arg0, m_arg1, m_arg2, m_arg3, m_arg4); - } -}; - -/** - * @brief User callback logic - */ -class UserCallbackLogic -{ - public: - virtual ~UserCallbackLogic(); - - /** - * This method send user callback from separate context - */ - void EmitUserCallback(const UserCallbackCall *callback); - - private: - UserCallbackLogic(); - - friend class UserCallbackController; -}; - -#endif // WIDGET_LOGIC_H diff --git a/src/framework/DESCRIPTION b/src/framework/DESCRIPTION deleted file mode 100644 index 383eeb2..0000000 --- a/src/framework/DESCRIPTION +++ /dev/null @@ -1 +0,0 @@ -Collective headers for main libraries (EFL and WebKit) diff --git a/src/view/common/scheme.cpp b/src/view/common/scheme.cpp index 3944449..b366190 100644 --- a/src/view/common/scheme.cpp +++ b/src/view/common/scheme.cpp @@ -61,10 +61,6 @@ Scheme::Scheme(const std::string& name) : m_name(name), m_type(INVALID) { m_type = GetType(name); } -Scheme::Scheme(Type type) : m_type(type) { - m_name = GetName(type); -} - std::string Scheme::GetName (Type type) { Assert(type >= FILE && type < COUNT); diff --git a/src/view/common/scheme.h b/src/view/common/scheme.h index 60b39b9..5bc5729 100644 --- a/src/view/common/scheme.h +++ b/src/view/common/scheme.h @@ -46,7 +46,6 @@ public: }; explicit Scheme(const std::string& name); - explicit Scheme(Type type); virtual ~Scheme() {} std::string GetName() const { return m_name; } diff --git a/src/view/common/view_logic_web_notification_support.cpp b/src/view/common/view_logic_web_notification_support.cpp index 9d6dddc..80fbeb1 100644 --- a/src/view/common/view_logic_web_notification_support.cpp +++ b/src/view/common/view_logic_web_notification_support.cpp @@ -63,12 +63,6 @@ bool showWebNotification(WebNotificationDataPtr notiData) return notificationShow(notiData); } -bool cancelWebNotification(WebNotificationDataPtr /*notiData*/) -{ - LogInfo("cancelWebNotification called"); - return false; -} - bool notificationShow(WebNotificationDataPtr notiData) { LogDebug("notificationShow called"); diff --git a/src/view/common/view_logic_web_notification_support.h b/src/view/common/view_logic_web_notification_support.h index 5837e5d..ca6129c 100644 --- a/src/view/common/view_logic_web_notification_support.h +++ b/src/view/common/view_logic_web_notification_support.h @@ -57,7 +57,6 @@ class Exception { bool showWebNotification(WebNotificationDataPtr notiData); -bool cancelWebNotification(WebNotificationDataPtr notiData); } // namespace SecuritySupport } // namespace WebNotification diff --git a/src/view/webkit/CMakeLists.txt b/src/view/webkit/CMakeLists.txt index 9204f70..33b3325 100644 --- a/src/view/webkit/CMakeLists.txt +++ b/src/view/webkit/CMakeLists.txt @@ -41,8 +41,6 @@ PKG_CHECK_MODULES(SYS_VIEW_MODULE_DEP SET(VIEW_MODULE_SOURCES ${PROJECT_SOURCE_DIR}/src/global_logic/global_logic.cpp #TODO this should be moved to separate module ${PROJECT_SOURCE_DIR}/src/global_logic/global_model.cpp #TODO this should be moved to separate module - ${PROJECT_SOURCE_DIR}/src/domain/user_callback_controller.cpp #TODO this should be moved to separate module - ${PROJECT_SOURCE_DIR}/src/domain/user_callback_logic.cpp #TODO this should be moved to separate module ${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic.cpp ${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic_filesystem_support.cpp ${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic_scheme_support.cpp -- 2.7.4