mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-05 17:52:29 +00:00
Moved ChunkManager out of public header directory.
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <torrent/torrent.h>
|
||||
#include <torrent/chunk_manager.h>
|
||||
#include <torrent/data/file_manager.h>
|
||||
#include <torrent/data/chunk_utils.h>
|
||||
#include <torrent/runtime/runtime.h>
|
||||
|
||||
+4
-7
@@ -3,7 +3,6 @@
|
||||
#include <cassert>
|
||||
|
||||
#include <torrent/exceptions.h>
|
||||
#include <torrent/chunk_manager.h>
|
||||
#include <torrent/throttle.h>
|
||||
#include <torrent/torrent.h>
|
||||
#include <torrent/data/file_list.h>
|
||||
@@ -31,10 +30,10 @@
|
||||
|
||||
namespace ui {
|
||||
|
||||
Download::Download(core::Download* d) :
|
||||
m_download(d) {
|
||||
Download::Download(core::Download* d)
|
||||
: m_download(d) {
|
||||
|
||||
m_windowDownloadStatus = new WDownloadStatus(d);
|
||||
m_windowDownloadStatus = std::make_unique<WDownloadStatus>(d);
|
||||
m_windowDownloadStatus->set_bottom(true);
|
||||
|
||||
m_uiArray[DISPLAY_MENU] = create_menu();
|
||||
@@ -60,8 +59,6 @@ Download::~Download() {
|
||||
assert(!is_active() && "ui::Download::~Download() called on an active object.");
|
||||
|
||||
std::for_each(m_uiArray, m_uiArray + DISPLAY_MAX_SIZE, [](ElementBase* eb) { delete eb; });
|
||||
|
||||
delete m_windowDownloadStatus;
|
||||
}
|
||||
|
||||
inline ElementBase*
|
||||
@@ -171,7 +168,7 @@ Download::activate(display::Frame* frame, [[maybe_unused]] bool focus) {
|
||||
m_frame = frame;
|
||||
m_frame->initialize_row(2);
|
||||
|
||||
m_frame->frame(1)->initialize_window(m_windowDownloadStatus);
|
||||
m_frame->frame(1)->initialize_window(m_windowDownloadStatus.get());
|
||||
m_windowDownloadStatus->set_active(true);
|
||||
|
||||
activate_display_menu(DISPLAY_PEER_LIST);
|
||||
|
||||
+1
-35
@@ -1,37 +1,3 @@
|
||||
// rTorrent - BitTorrent client
|
||||
// Copyright (C) 2005-2011, Jari Sundell
|
||||
//
|
||||
// This program 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 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program 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 this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// In addition, as a special exception, the copyright holders give
|
||||
// permission to link the code of portions of this program with the
|
||||
// OpenSSL library under certain conditions as described in each
|
||||
// individual source file, and distribute linked combinations
|
||||
// including the two.
|
||||
//
|
||||
// You must obey the GNU General Public License in all respects for
|
||||
// all of the code used other than OpenSSL. If you modify file(s)
|
||||
// with this exception, you may extend this exception to your version
|
||||
// of the file(s), but you are not obligated to do so. If you do not
|
||||
// wish to do so, delete this exception statement from your version.
|
||||
// If you delete this exception statement from all source files in the
|
||||
// program, then also delete it here.
|
||||
//
|
||||
// Contact: Jari Sundell <sundell.software@gmail.com>
|
||||
|
||||
|
||||
#ifndef RTORRENT_UI_DOWNLOAD_H
|
||||
#define RTORRENT_UI_DOWNLOAD_H
|
||||
|
||||
@@ -113,7 +79,7 @@ private:
|
||||
|
||||
bool m_focusDisplay{};
|
||||
|
||||
WDownloadStatus* m_windowDownloadStatus;
|
||||
std::unique_ptr<WDownloadStatus> m_windowDownloadStatus;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -15,13 +15,13 @@ namespace ui {
|
||||
|
||||
class ElementLogComplete : public ElementBase {
|
||||
public:
|
||||
typedef display::WindowLogComplete WLogComplete;
|
||||
using WLogComplete = display::WindowLogComplete;
|
||||
|
||||
ElementLogComplete(torrent::log_buffer* l);
|
||||
~ElementLogComplete() override;
|
||||
|
||||
void activate(display::Frame* frame, bool focus = true);
|
||||
void disable();
|
||||
void activate(display::Frame* frame, bool focus = true) override;
|
||||
void disable() override;
|
||||
|
||||
display::Window* window();
|
||||
|
||||
@@ -32,7 +32,9 @@ private:
|
||||
|
||||
torrent::log_buffer* m_log;
|
||||
|
||||
align_cacheline std::atomic<bool> m_log_updating{};
|
||||
align_cacheline
|
||||
|
||||
std::atomic<bool> m_log_updating{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user