1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
/* This file is part of the KDE project
Copyright (C) 2008 Manolo Valdes <nolis71cu@gmail.com>
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.
*/
#include "transferdatasource.h"
#include <kdebug.h>
TransferDataSource::TransferDataSource(const KUrl &srcUrl, QObject *parent)
: QObject(parent),
m_sourceUrl(srcUrl),
m_speed(0),
m_supposedSize(0),
m_paralellSegments(1),
m_currentSegments(0),
m_capabilities(0)
{
kDebug(5001) ;
}
TransferDataSource::~TransferDataSource()
{
kDebug(5001) ;
}
Transfer::Capabilities TransferDataSource::capabilities() const
{
return m_capabilities;
}
void TransferDataSource::setCapabilities(Transfer::Capabilities capabilities)
{
m_capabilities = capabilities;
emit capabilitiesChanged();
}
void TransferDataSource::findFileSize(KIO::fileoffset_t segmentSize)
{
Q_UNUSED(segmentSize);
}
QPair<int, int> TransferDataSource::removeConnection()
{
return QPair<int, int>(-1, -1);
}
QList<QPair<int, int> > TransferDataSource::assignedSegments() const
{
return QList<QPair<int, int> >();
}
int TransferDataSource::countUnfinishedSegments() const
{
return 0;
}
QPair<int, int> TransferDataSource::split()
{
return QPair<int, int>(-1, -1);
}
int TransferDataSource::paralellSegments() const
{
return m_paralellSegments;
}
void TransferDataSource::setParalellSegments(int paralellSegments)
{
m_paralellSegments = paralellSegments;
}
int TransferDataSource::currentSegments() const
{
return m_currentSegments;
}
int TransferDataSource::changeNeeded() const
{
return paralellSegments() - currentSegments();
}
#include "transferdatasource.moc"
|