Remove unused PrivaciesSequence 89/239189/2
authorYunjin Lee <yunjin-.lee@samsung.com>
Wed, 22 Jul 2020 10:24:59 +0000 (19:24 +0900)
committerYunjin Lee <yunjin-.lee@samsung.com>
Wed, 22 Jul 2020 10:34:00 +0000 (19:34 +0900)
- It seems that the PrivaciesSequence is called at nowhere and it
declines line coverage.

Change-Id: Id0b09db9d4a31c95d080f5a070853b0a47941db7
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
src/notification-daemon/CMakeLists.txt
src/notification-daemon/PrivaciesSequence.cpp [deleted file]
src/notification-daemon/PrivaciesSequence.h [deleted file]

index 9ae0227ddd6e35e619b7644a2085c5d5b5b7bbc7..b5d131442c9d062a0fe77e2750674308f83b603b 100644 (file)
@@ -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 (file)
index 7b859d3..0000000
+++ /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 <z.abramowska@samsung.com>
- * @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<Privacy> &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 (file)
index a566db1..0000000
+++ /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 <z.abramowska@samsung.com>
- * @brief       The definition of PrivaciesSequence
- */
-#pragma once
-
-#include <string>
-#include <vector>
-
-#include <types/PolicyTypes.h>
-
-namespace AskUser {
-
-namespace Notification {
-
-/*
- * Container allowing sequential access to privacy vector
- */
-class PrivaciesSequence {
-public:
-    PrivaciesSequence();
-    void setPrivacies(const std::vector<Privacy> &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<Privacy> PrivacyVector;
-    PrivacyVector m_privacies;
-    PrivacyVector::iterator m_currentPrivacy;
-    PrivacyVector::iterator m_nextPrivacy;
-};
-
-}
-
-}