From: Yunjin Lee Date: Wed, 22 Jul 2020 10:24:59 +0000 (+0900) Subject: Remove unused PrivaciesSequence X-Git-Tag: submit/tizen/20200805.121506~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d49e7e317448df4fd566ce1f34a91133f5d7b52;p=platform%2Fcore%2Fsecurity%2Faskuser.git Remove unused PrivaciesSequence - It seems that the PrivaciesSequence is called at nowhere and it declines line coverage. Change-Id: Id0b09db9d4a31c95d080f5a070853b0a47941db7 Signed-off-by: Yunjin Lee --- diff --git a/src/notification-daemon/CMakeLists.txt b/src/notification-daemon/CMakeLists.txt index 9ae0227..b5d1314 100644 --- a/src/notification-daemon/CMakeLists.txt +++ b/src/notification-daemon/CMakeLists.txt @@ -29,7 +29,6 @@ SET(ASKUSER_NOTIFICATION_SOURCES ${NOTIF_PATH}/main.cpp ${NOTIF_PATH}/Logic.cpp ${NOTIF_PATH}/PolicyUpdater.cpp - ${NOTIF_PATH}/PrivaciesSequence.cpp ${NOTIF_PATH}/ServerCallbacks.cpp ${NOTIF_PATH}/ui/UIAppInvoker.cpp ) diff --git a/src/notification-daemon/PrivaciesSequence.cpp b/src/notification-daemon/PrivaciesSequence.cpp deleted file mode 100644 index 7b859d3..0000000 --- a/src/notification-daemon/PrivaciesSequence.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2017 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 PrivaciesSequence.cpp - * @author Zofia Grzelewska - * @brief The implementation of PrivaciesSequence - */ - -#include "PrivaciesSequence.h" - -namespace AskUser { - -namespace Notification { - -PrivaciesSequence::PrivaciesSequence() : m_currentPrivacy(m_privacies.begin()), m_nextPrivacy(m_privacies.begin()) -{} - -void PrivaciesSequence::rewind() { - m_currentPrivacy = m_privacies.begin(); - m_nextPrivacy = m_privacies.begin(); -} - -void PrivaciesSequence::setPrivacies(const std::vector &privacies) { - m_privacies = privacies; - m_currentPrivacy = m_privacies.begin(); - m_nextPrivacy = m_privacies.begin(); -} - -bool PrivaciesSequence::getCurrentPrivacy(Privacy &privacy) { - if (m_currentPrivacy == m_privacies.end()) - return false; - privacy = *m_currentPrivacy; - return true; -} - -bool PrivaciesSequence::getNextPrivacy(Privacy &privacy) { - m_currentPrivacy = m_nextPrivacy; - if (m_currentPrivacy == m_privacies.end()) - return false; - privacy = *m_currentPrivacy; - m_nextPrivacy++; - return true; -} - -size_t PrivaciesSequence::size() { - return m_privacies.size(); -} - -} // namespace Notification - -} // namespace AskUser diff --git a/src/notification-daemon/PrivaciesSequence.h b/src/notification-daemon/PrivaciesSequence.h deleted file mode 100644 index a566db1..0000000 --- a/src/notification-daemon/PrivaciesSequence.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2017 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 PrivaciesSequence.h - * @author Zofia Grzelewska - * @brief The definition of PrivaciesSequence - */ -#pragma once - -#include -#include - -#include - -namespace AskUser { - -namespace Notification { - -/* - * Container allowing sequential access to privacy vector - */ -class PrivaciesSequence { -public: - PrivaciesSequence(); - void setPrivacies(const std::vector &privacies); - /* - * Get next privacy in sequence. Returns false, when there is no more privacies. - */ - bool getNextPrivacy(Privacy &privacy); - - /* - * Get current privacy in sequence. - */ - bool getCurrentPrivacy(Privacy &privacy); - - /* - * Rewind to the beginning of privacy sequence. - */ - void rewind(); - - /* - * Returns Privacies count - */ - size_t size(); - - virtual ~PrivaciesSequence() {} -private: - typedef std::vector PrivacyVector; - PrivacyVector m_privacies; - PrivacyVector::iterator m_currentPrivacy; - PrivacyVector::iterator m_nextPrivacy; -}; - -} - -}