mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 08:29:26 -05:00
removed cache transfers from the GUI
This commit is contained in:
parent
02d2fb42b7
commit
53c65fff9f
@ -44,11 +44,6 @@ const int ftserverzone = 29539;
|
||||
#include "pqi/p3notify.h"
|
||||
#include "rsserver/p3face.h"
|
||||
|
||||
|
||||
// Includes CacheStrapper / FiMonitor / FiStore for us.
|
||||
|
||||
#include "ft/ftdbase.h"
|
||||
|
||||
#include "pqi/pqi.h"
|
||||
#include "pqi/p3linkmgr.h"
|
||||
|
||||
@ -299,14 +294,6 @@ bool ftServer::FileClearCompleted()
|
||||
{
|
||||
return mFtController->FileClearCompleted();
|
||||
}
|
||||
void ftServer::setMinPrioritizedTransfers(uint32_t s)
|
||||
{
|
||||
mFtController->setMinPrioritizedTransfers(s) ;
|
||||
}
|
||||
uint32_t ftServer::getMinPrioritizedTransfers()
|
||||
{
|
||||
return mFtController->getMinPrioritizedTransfers() ;
|
||||
}
|
||||
void ftServer::setQueueSize(uint32_t s)
|
||||
{
|
||||
mFtController->setQueueSize(s) ;
|
||||
|
@ -47,7 +47,6 @@
|
||||
#include "turtle/turtleclientservice.h"
|
||||
#include "services/p3service.h"
|
||||
#include "retroshare/rsfiles.h"
|
||||
//#include "dbase/cachestrapper.h"
|
||||
|
||||
#include "pqi/pqi.h"
|
||||
#include "pqi/p3cfgmgr.h"
|
||||
@ -55,10 +54,6 @@
|
||||
class p3ConnectMgr;
|
||||
class p3FileDatabase;
|
||||
|
||||
class CacheStrapper;
|
||||
class CacheTransfer;
|
||||
|
||||
class ftCacheStrapper;
|
||||
class ftFiStore;
|
||||
class ftFiMonitor;
|
||||
|
||||
@ -145,8 +140,6 @@ public:
|
||||
/***
|
||||
* Control of Downloads Priority.
|
||||
***/
|
||||
virtual uint32_t getMinPrioritizedTransfers() ;
|
||||
virtual void setMinPrioritizedTransfers(uint32_t s) ;
|
||||
virtual uint32_t getQueueSize() ;
|
||||
virtual void setQueueSize(uint32_t s) ;
|
||||
virtual bool changeQueuePosition(const RsFileHash& hash, QueueMove queue_mv);
|
||||
|
@ -371,7 +371,6 @@ HEADERS += ft/ftchunkmap.h \
|
||||
ft/ftcontroller.h \
|
||||
ft/ftdata.h \
|
||||
ft/ftdatamultiplex.h \
|
||||
ft/ftdbase.h \
|
||||
ft/ftextralist.h \
|
||||
ft/ftfilecreator.h \
|
||||
ft/ftfileprovider.h \
|
||||
@ -531,7 +530,6 @@ HEADERS += util/folderiterator.h \
|
||||
SOURCES += ft/ftchunkmap.cc \
|
||||
ft/ftcontroller.cc \
|
||||
ft/ftdatamultiplex.cc \
|
||||
ft/ftdbase.cc \
|
||||
ft/ftextralist.cc \
|
||||
ft/ftfilecreator.cc \
|
||||
ft/ftfileprovider.cc \
|
||||
|
@ -410,7 +410,8 @@ void RsPluginManager::slowTickPlugins(time_t seconds)
|
||||
|
||||
void RsPluginManager::registerCacheServices()
|
||||
{
|
||||
#warning this code should go
|
||||
// this is removed since the old cache syste is gone, but we need to make it register new GXS group services instead.
|
||||
#ifdef REMOVED
|
||||
std::cerr << " Registering cache services." << std::endl;
|
||||
|
||||
for(uint32_t i=0;i<_plugins.size();++i)
|
||||
@ -419,6 +420,7 @@ void RsPluginManager::registerCacheServices()
|
||||
//rsFiles->getCacheStrapper()->addCachePair(CachePair(_plugins[i].plugin->rs_cache_service(),_plugins[i].plugin->rs_cache_service(),CacheId(_plugins[i].plugin->rs_service_id(), 0))) ;
|
||||
std::cerr << " adding new cache pair for plugin " << _plugins[i].plugin->getPluginName() << ", with RS_ID " << _plugins[i].plugin->rs_service_id() << std::endl ;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void RsPluginManager::registerClientServices(p3ServiceServer *pqih)
|
||||
@ -547,14 +549,6 @@ bool RsPluginManager::saveList(bool& cleanup, std::list<RsItem*>& list)
|
||||
return true;
|
||||
}
|
||||
|
||||
// RsCacheService::RsCacheService(uint16_t service_type,uint32_t tick_delay, RsPluginHandler* pgHandler)
|
||||
// : CacheSource(service_type, true, pgHandler->getFileServer()->getCacheStrapper(), pgHandler->getLocalCacheDir()),
|
||||
// CacheStore (service_type, true, pgHandler->getFileServer()->getCacheStrapper(), pgHandler->getFileServer()->getCacheTransfer(), pgHandler->getRemoteCacheDir()),
|
||||
// p3Config(),
|
||||
// _tick_delay_in_seconds(tick_delay)
|
||||
// {
|
||||
// }
|
||||
|
||||
RsPQIService::RsPQIService(uint16_t /*service_type*/, uint32_t /*tick_delay_in_seconds*/, RsPluginHandler* /*pgHandler*/)
|
||||
: p3Service(),p3Config()
|
||||
{
|
||||
|
@ -37,8 +37,6 @@ class RsFiles;
|
||||
extern RsFiles *rsFiles;
|
||||
|
||||
namespace RsRegularExpression { class Expression; }
|
||||
class CacheStrapper ;
|
||||
class CacheTransfer;
|
||||
|
||||
/* These are used mainly by ftController at the moment */
|
||||
const uint32_t RS_FILE_CTRL_PAUSE = 0x00000100;
|
||||
@ -147,8 +145,6 @@ class RsFiles
|
||||
/***
|
||||
* Control of Downloads Priority.
|
||||
***/
|
||||
virtual uint32_t getMinPrioritizedTransfers() = 0 ;
|
||||
virtual void setMinPrioritizedTransfers(uint32_t s) = 0 ;
|
||||
virtual uint32_t getQueueSize() = 0 ;
|
||||
virtual void setQueueSize(uint32_t s) = 0 ;
|
||||
virtual bool changeQueuePosition(const RsFileHash& hash, QueueMove mv) = 0;
|
||||
|
@ -1675,11 +1675,6 @@ int RsServer::StartupRetroShare()
|
||||
/**************************************************************************/
|
||||
std::cerr << "(2) Load configuration files" << std::endl;
|
||||
|
||||
/* NOTE: CacheStrapper's load causes Cache Files to be
|
||||
* loaded into all the CacheStores/Sources. This happens
|
||||
* after all the other configurations have happened.
|
||||
*/
|
||||
|
||||
mConfigMgr->loadConfiguration();
|
||||
|
||||
/**************************************************************************/
|
||||
|
@ -349,9 +349,6 @@ TransfersDialog::TransfersDialog(QWidget *parent)
|
||||
// ui.tunnelInfoWidget->setFocusPolicy(Qt::NoFocus);
|
||||
|
||||
/** Setup the actions for the context menu */
|
||||
toggleShowCacheTransfersAct = new QAction(tr( "Show file list transfers" ), this );
|
||||
toggleShowCacheTransfersAct->setCheckable(true) ;
|
||||
connect(toggleShowCacheTransfersAct,SIGNAL(triggered()),this,SLOT(toggleShowCacheTransfers())) ;
|
||||
|
||||
// Actions. Only need to be defined once.
|
||||
pauseAct = new QAction(QIcon(IMAGE_PAUSE), tr("Pause"), this);
|
||||
@ -519,12 +516,6 @@ UserNotify *TransfersDialog::getUserNotify(QObject *parent)
|
||||
return new TransferUserNotify(parent);
|
||||
}
|
||||
|
||||
void TransfersDialog::toggleShowCacheTransfers()
|
||||
{
|
||||
_show_cache_transfers = !_show_cache_transfers ;
|
||||
insertTransfers() ;
|
||||
}
|
||||
|
||||
void TransfersDialog::processSettings(bool bLoad)
|
||||
{
|
||||
m_bProcessSettings = true;
|
||||
@ -537,9 +528,6 @@ void TransfersDialog::processSettings(bool bLoad)
|
||||
if (bLoad) {
|
||||
// load settings
|
||||
|
||||
// state of checks
|
||||
_show_cache_transfers = Settings->value("showCacheTransfers", false).toBool();
|
||||
|
||||
// state of the lists
|
||||
DLHeader->restoreState(Settings->value("downloadList").toByteArray());
|
||||
ULHeader->restoreState(Settings->value("uploadList").toByteArray());
|
||||
@ -565,9 +553,6 @@ void TransfersDialog::processSettings(bool bLoad)
|
||||
} else {
|
||||
// save settings
|
||||
|
||||
// state of checks
|
||||
Settings->setValue("showCacheTransfers", _show_cache_transfers);
|
||||
|
||||
// state of the lists
|
||||
Settings->setValue("downloadList", DLHeader->saveState());
|
||||
Settings->setValue("uploadList", ULHeader->saveState());
|
||||
@ -801,9 +786,6 @@ void TransfersDialog::downloadListCustomPopupMenu( QPoint /*point*/ )
|
||||
|
||||
contextMnu.addSeparator() ;//-----------------------------------------------
|
||||
|
||||
contextMnu.addAction( toggleShowCacheTransfersAct ) ;
|
||||
toggleShowCacheTransfersAct->setChecked(_show_cache_transfers) ;
|
||||
|
||||
collCreateAct->setEnabled(true) ;
|
||||
collModifAct->setEnabled(single && add_CollActions) ;
|
||||
collViewAct->setEnabled(single && add_CollActions) ;
|
||||
|
@ -199,7 +199,6 @@ private:
|
||||
QAction *chunkProgressiveAct;
|
||||
QAction *chunkStreamingAct;
|
||||
QAction *detailsFileAct;
|
||||
QAction *toggleShowCacheTransfersAct;
|
||||
QAction *renameFileAct;
|
||||
QAction *specifyDestinationDirectoryAct;
|
||||
QAction *expandAllAct;
|
||||
@ -249,7 +248,6 @@ private:
|
||||
/** Qt Designer generated object */
|
||||
Ui::TransfersDialog ui;
|
||||
|
||||
bool _show_cache_transfers ;
|
||||
public slots:
|
||||
// these two functions add entries to the transfers dialog, and return the row id of the entry modified/added
|
||||
//
|
||||
@ -259,7 +257,6 @@ public slots:
|
||||
int addUploadItem(const QString& symbol, const QString& name, const QString& coreID, qlonglong size, const FileProgressInfo& pinfo, double dlspeed, const QString& sources,const QString& source_id, const QString& status, qlonglong completed, qlonglong remaining);
|
||||
|
||||
void showFileDetails() ;
|
||||
void toggleShowCacheTransfers() ;
|
||||
|
||||
double getProgress(int row, QStandardItemModel *model);
|
||||
double getSpeed(int row, QStandardItemModel *model);
|
||||
|
@ -36,7 +36,6 @@ TransferPage::TransferPage(QWidget * parent, Qt::WindowFlags flags)
|
||||
ui.setupUi(this);
|
||||
|
||||
ui._queueSize_SB->setValue(rsFiles->getQueueSize()) ;
|
||||
ui._minPrioritized_SB->setValue(rsFiles->getMinPrioritizedTransfers()) ;
|
||||
|
||||
switch(rsFiles->defaultChunkStrategy())
|
||||
{
|
||||
@ -48,7 +47,6 @@ TransferPage::TransferPage(QWidget * parent, Qt::WindowFlags flags)
|
||||
ui._diskSpaceLimit_SB->setValue(rsFiles->freeDiskSpaceLimit()) ;
|
||||
|
||||
QObject::connect(ui._queueSize_SB,SIGNAL(valueChanged(int)),this,SLOT(updateQueueSize(int))) ;
|
||||
QObject::connect(ui._minPrioritized_SB,SIGNAL(valueChanged(int)),this,SLOT(updateMinPrioritized(int))) ;
|
||||
QObject::connect(ui._defaultStrategy_CB,SIGNAL(activated(int)),this,SLOT(updateDefaultStrategy(int))) ;
|
||||
QObject::connect(ui._diskSpaceLimit_SB,SIGNAL(valueChanged(int)),this,SLOT(updateDiskSizeLimit(int))) ;
|
||||
QObject::connect(ui._max_tr_up_per_sec_SB, SIGNAL( valueChanged( int ) ), this, SLOT( updateMaxTRUpRate(int) ) );
|
||||
@ -80,15 +78,7 @@ void TransferPage::updateDiskSizeLimit(int s)
|
||||
rsFiles->setFreeDiskSpaceLimit(s) ;
|
||||
}
|
||||
|
||||
void TransferPage::updateMinPrioritized(int s)
|
||||
{
|
||||
rsFiles->setMinPrioritizedTransfers(s) ;
|
||||
}
|
||||
void TransferPage::updateQueueSize(int s)
|
||||
{
|
||||
if(ui._minPrioritized_SB->value() > s)
|
||||
{
|
||||
ui._minPrioritized_SB->setValue(s) ;
|
||||
}
|
||||
rsFiles->setQueueSize(s) ;
|
||||
}
|
||||
|
@ -46,7 +46,6 @@ class TransferPage: public ConfigPage
|
||||
|
||||
public slots:
|
||||
void updateQueueSize(int) ;
|
||||
void updateMinPrioritized(int) ;
|
||||
void updateDefaultStrategy(int) ;
|
||||
void updateDiskSizeLimit(int) ;
|
||||
void updateMaxTRUpRate(int);
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>604</width>
|
||||
<height>340</height>
|
||||
<width>700</width>
|
||||
<height>356</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
@ -28,13 +28,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Slots reserved for non-cache transfers:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
@ -76,19 +69,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="_minPrioritized_SB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>You can use this to force RetroShare to download your files rather <br/>than cache files for as many slots as requested. Setting that number <br/>to be equal to the queue size above will always prioritize your files<br/>over cache. <br/><br/>It is however recommended to leave at least a few slots for cache files. For now, cache files are only used to transfer friend file lists.</p></body></html></string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>3</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="_defaultStrategy_CB">
|
||||
<property name="enabled">
|
||||
@ -168,12 +148,12 @@
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:8pt; font-weight:600;">RetroShare</span><span style=" font-family:'Sans'; font-size:8pt;"> is capable of transferring data and search requests between peers that are not necessarily friends. This traffic however only transits through a connected list of friends and is anonymous.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:8pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:8pt;">You can separately setup share flags for each shared directory in the shared files dialog to be:</span></p>
|
||||
<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-family:'Sans'; font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Browsable by friends</span>: files are seen by your friends.</li>
|
||||
<li style=" font-family:'Sans'; font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Anonymously shared</span>: files are anonymously reachable through distant F2F tunnels.</li></ul></body></html></string>
|
||||
</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">RetroShare</span><span style=" font-size:8pt;"> is capable of transferring data and search requests between peers that are not necessarily friends. This traffic however only transits through a connected list of friends and is anonymous.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">You can separately setup share flags for each shared directory in the shared files dialog to be:</span></p>
|
||||
<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Browsable by friends</span>: files are seen by your friends.</li>
|
||||
<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Anonymously shared</span>: files are anonymously reachable through distant F2F tunnels.</li></ul></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user