From a15bcab8ceb668d59bfdf0cd7d9eb62c58028dc0 Mon Sep 17 00:00:00 2001 From: Luca Marchesano Date: Tue, 27 Nov 2018 16:44:37 +0100 Subject: [PATCH] Delete cbmpeer.cpp --- cbmpeer.cpp | 91 ----------------------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 cbmpeer.cpp diff --git a/cbmpeer.cpp b/cbmpeer.cpp deleted file mode 100644 index 94c164b..0000000 --- a/cbmpeer.cpp +++ /dev/null @@ -1,91 +0,0 @@ -// -// cbmpeer.cpp -// xlxd -// -// ---------------------------------------------------------------------------- -// This file is part of xlxd. -// -// xlxd 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. -// -// xlxd 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 Foobar. If not, see . -// ---------------------------------------------------------------------------- - -#include "main.h" -#include -#include "creflector.h" -#include "cbmpeer.h" -#include "cbmclient.h" - - -//////////////////////////////////////////////////////////////////////////////////////// -// constructor - - -CBmPeer::CBmPeer() -{ -} - -CBmPeer::CBmPeer(const CCallsign &callsign, const CIp &ip, char *modules, const CVersion &version) -: CPeer(callsign, ip, modules, version) -{ - std::cout << "Adding BM peer" << std::endl; - - // and construct all xlx clients - for ( unsigned int i = 0; i < ::strlen(modules); i++ ) - { - // create - CBmClient *client = new CBmClient(callsign, ip, modules[i]); - // and append to vector - m_Clients.push_back(client); - } -} - -CBmPeer::CBmPeer(const CBmPeer &peer) -: CPeer(peer) -{ - for ( unsigned int i = 0; i < peer.m_Clients.size(); i++ ) - { - CBmClient *client = new CBmClient((const CBmClient &)*(peer.m_Clients[i])); - // grow vector capacity if needed - if ( m_Clients.capacity() == m_Clients.size() ) - { - m_Clients.reserve(m_Clients.capacity()+10); - } - // and append - m_Clients.push_back(client); - - } -} - -//////////////////////////////////////////////////////////////////////////////////////// -// destructors - -CBmPeer::~CBmPeer() -{ -} - -//////////////////////////////////////////////////////////////////////////////////////// -// status - -bool CBmPeer::IsAlive(void) const -{ - return (m_LastKeepaliveTime.DurationSinceNow() < XLX_KEEPALIVE_TIMEOUT); -} - -//////////////////////////////////////////////////////////////////////////////////////// -// revision helper - -int CBmPeer::GetProtocolRevision(const CVersion &version) -{ - return XLX_PROTOCOL_REVISION_2; -} -