From 26df148c12d6b043915a5590d84ede1f26ec80c6 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Wed, 21 Sep 2016 01:34:50 +0200 Subject: [PATCH] Drop unused files --- CMakeLists.txt | 1 - src/find_redirections.cpp | 49 --------------------------------------- src/find_redirections.hpp | 41 -------------------------------- test/unit/test_upnp.cpp | 3 +-- 4 files changed, 1 insertion(+), 93 deletions(-) delete mode 100644 src/find_redirections.cpp delete mode 100644 src/find_redirections.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index c0f38e1..7b7d574 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,6 @@ set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) add_library(${PROJECT_NAME}_implem STATIC src/upnp.cpp src/upnpexceptions.cpp - src/find_redirections.cpp src/settings.cpp ) set_property(TARGET ${PROJECT_NAME}_implem PROPERTY CXX_EXTENSIONS OFF) diff --git a/src/find_redirections.cpp b/src/find_redirections.cpp deleted file mode 100644 index f07bd57..0000000 --- a/src/find_redirections.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2016, Michele Santullo - * This file is part of "keepupnpup". - * - * "keepupnpup" is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * "keepupnpup" is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with "keepupnpup". If not, see . - */ - -#include "find_redirections.hpp" -#include - -namespace kuu { - auto redirections_for_localaddr ( - const RedirectionsList& parRedirs, - const std::string& parAddr, - uint16_t parPort, - Protocol parProto - ) { - return parRedirs | boost::adaptors::filtered([=](const Redirection& parRedir) { - return parRedir.internal_port == parPort and - parRedir.protocol == parProto and - parRedir.internal_client == parAddr - ; - }); - } - - auto redirections_not_for_localaddr ( - const RedirectionsList& parRedirs, - const std::string& parAddr, - uint16_t parPort, - Protocol parProto - ) { - return parRedirs | boost::adaptors::filtered([=](const Redirection& parRedir) { - return parRedir.internal_port == parPort and - parRedir.protocol == parProto and - parRedir.internal_client != parAddr - ; - }); - } -} //namespace kuu diff --git a/src/find_redirections.hpp b/src/find_redirections.hpp deleted file mode 100644 index 5886b35..0000000 --- a/src/find_redirections.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2016, Michele Santullo - * This file is part of "keepupnpup". - * - * "keepupnpup" is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * "keepupnpup" is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with "keepupnpup". If not, see . - */ - -#pragma once - -#include "redirection.hpp" -#include -#include -#include - -namespace kuu { - using RedirectionsList = std::vector; - - auto redirections_for_localaddr ( - const RedirectionsList& parRedirs, - const std::string& parAddr, - uint16_t parPort, - Protocol parProto - ); - - auto redirections_not_for_localaddr ( - const RedirectionsList& parRedirs, - const std::string& parAddr, - uint16_t parPort, - Protocol parProto - ); -} //namespace kuu diff --git a/test/unit/test_upnp.cpp b/test/unit/test_upnp.cpp index f493512..bfd899e 100644 --- a/test/unit/test_upnp.cpp +++ b/test/unit/test_upnp.cpp @@ -18,7 +18,6 @@ #include "gtest/gtest.h" #include "rapidcheck/gtest.h" #include "redirection.hpp" -#include "find_redirections.hpp" #include #include #include @@ -35,7 +34,7 @@ namespace { ; return oss.str(); } - + rc::Gen generate_lan_ip() { using namespace rc;