mirror of
https://bitbucket.org/King_DuckZ/keepupnpup.git
synced 2024-11-07 21:29:00 +00:00
Drop unused files
This commit is contained in:
parent
560b27b1bf
commit
26df148c12
4 changed files with 1 additions and 93 deletions
|
@ -42,7 +42,6 @@ set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14)
|
||||||
add_library(${PROJECT_NAME}_implem STATIC
|
add_library(${PROJECT_NAME}_implem STATIC
|
||||||
src/upnp.cpp
|
src/upnp.cpp
|
||||||
src/upnpexceptions.cpp
|
src/upnpexceptions.cpp
|
||||||
src/find_redirections.cpp
|
|
||||||
src/settings.cpp
|
src/settings.cpp
|
||||||
)
|
)
|
||||||
set_property(TARGET ${PROJECT_NAME}_implem PROPERTY CXX_EXTENSIONS OFF)
|
set_property(TARGET ${PROJECT_NAME}_implem PROPERTY CXX_EXTENSIONS OFF)
|
||||||
|
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "find_redirections.hpp"
|
|
||||||
#include <ciso646>
|
|
||||||
|
|
||||||
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
|
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "redirection.hpp"
|
|
||||||
#include <vector>
|
|
||||||
#include <boost/range/adaptor/filtered.hpp>
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
namespace kuu {
|
|
||||||
using RedirectionsList = std::vector<Redirection>;
|
|
||||||
|
|
||||||
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
|
|
|
@ -18,7 +18,6 @@
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "rapidcheck/gtest.h"
|
#include "rapidcheck/gtest.h"
|
||||||
#include "redirection.hpp"
|
#include "redirection.hpp"
|
||||||
#include "find_redirections.hpp"
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -35,7 +34,7 @@ namespace {
|
||||||
;
|
;
|
||||||
return oss.str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
rc::Gen<std::string> generate_lan_ip() {
|
rc::Gen<std::string> generate_lan_ip() {
|
||||||
using namespace rc;
|
using namespace rc;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue