#include <DccFileTransfer.h>
Enumerator |
---|
Connecting |
|
Transferring |
|
Success |
|
Failure |
|
References __tr2qs_ctx(), KviPointerList< T >::append(), DccDescriptor::bIsTdcc, DccDescriptor::bRecvFile, connect(), connected(), Connecting, connectionInProgress(), DccMarshalOutputContext::DccMarshal, handleMarshalError(), init(), KVI_OPTION_BOOL, KVI_OPTION_UINT, KviOption_boolLimitDccRecvSpeed, KviOption_boolLimitDccSendSpeed, KviOption_uintMaxDccRecvSpeed, KviOption_uintMaxDccSendSpeed, m_eGeneralStatus, m_pBandwidthDialog, m_pDescriptor, m_pMarshal, m_pResumeTimer, m_pSlaveRecvThread, m_pSlaveSendThread, m_szDccType, m_szStatusString, m_szTransferIdString, m_tTransferEndTime, m_tTransferStartTime, m_uMaxBandwidth, m_uTotalFileSize, MAX_DCC_BANDWIDTH_LIMIT, KviCString::prepend(), DccDescriptor::setTransfer(), sslError(), startConnection(), startingSSLHandshake(), DccDescriptor::szFileSize, and DccDescriptor::szLocalFileSize.
DccFileTransfer::~DccFileTransfer |
( |
| ) |
|
void DccFileTransfer::abort |
( |
| ) |
|
|
slot |
References __tr2qs_ctx(), __tr_ctx, DccMarshal::abort(), DccDescriptor::bRecvFile, KviFileTransfer::displayUpdate(), eventWindow(), Failure, KviApplication::fileDownloadTerminated(), g_pApp, DccDescriptor::idString(), KVI_OUT_DCCERROR, kvi_unixTime, KviEvent_OnDCCFileTransferFailed, KVS_TRIGGER_EVENT_3, m_eGeneralStatus, m_pDescriptor, m_pMarshal, m_pSlaveRecvThread, m_pSlaveSendThread, m_szStatusString, m_tTransferEndTime, outputAndLog(), DccRecvThread::receivedBytes(), DccSendThread::sentBytes(), DccDescriptor::szFileName, DccDescriptor::szLocalFileName, DccDescriptor::szNick, and KviSensitiveThread::terminate().
Referenced by dcc_kvs_cmd_abort(), fillContextPopup(), retryDCC(), retryRevDCC(), and retryTDCC().
bool DccFileTransfer::active |
( |
| ) |
|
|
virtual |
void DccFileTransfer::addToTransferLog |
( |
const QString & |
s | ) |
|
|
protected |
unsigned int DccFileTransfer::averageSpeed |
( |
| ) |
|
void DccFileTransfer::bandwidthDialogDestroyed |
( |
| ) |
|
|
protectedslot |
int DccFileTransfer::bandwidthLimit |
( |
| ) |
|
References DccSendThread::bandwidthLimit(), DccRecvThread::bandwidthLimit(), DccDescriptor::bRecvFile, DccSendThread::doneGetInfo(), DccRecvThread::doneGetInfo(), DccSendThread::initGetInfo(), DccRecvThread::initGetInfo(), m_pDescriptor, m_pSlaveRecvThread, m_pSlaveSendThread, m_uMaxBandwidth, and MAX_DCC_BANDWIDTH_LIMIT.
Referenced by DccFileTransferBandwidthDialog::DccFileTransferBandwidthDialog().
void DccFileTransfer::configureBandwidth |
( |
| ) |
|
|
protectedslot |
void DccFileTransfer::connected |
( |
| ) |
|
|
protectedslot |
References __tr2qs_ctx(), DccDescriptor::bActive, _KviDccSendThreadOptions::bFastSend, _KviDccSendThreadOptions::bIsTdcc, DccDescriptor::bIsTdcc, _KviDccRecvThreadOptions::bIsTdcc, _KviDccSendThreadOptions::bNoAcks, _KviDccRecvThreadOptions::bNoAcks, DccDescriptor::bNoAcks, DccDescriptor::bRecvFile, _KviDccRecvThreadOptions::bResume, DccDescriptor::bResume, _KviDccRecvThreadOptions::bSend64BitAck, _KviDccRecvThreadOptions::bSendZeroAck, KviFileTransfer::displayUpdate(), eventWindow(), DccDescriptor::idString(), _KviDccSendThreadOptions::iIdleStepLengthInMSec, _KviDccRecvThreadOptions::iIdleStepLengthInMSec, _KviDccSendThreadOptions::iPacketSize, KVI_OPTION_BOOL, KVI_OPTION_UINT, kvi_unixTime, KviEvent_OnDCCFileTransferBegin, KviOption_boolDccSendForceIdleStep, KviOption_boolSend64BitAckInDccRecv, KviOption_boolSendZeroAckInDccRecv, KviOption_boolUseFastDccSend, KviOption_uintDccSendIdleStepInMSec, KviOption_uintDccSendPacketSize, KVS_TRIGGER_EVENT_1, DccMarshal::localIp(), DccMarshal::localPort(), m_eGeneralStatus, m_pDescriptor, m_pMarshal, m_pSlaveRecvThread, m_pSlaveSendThread, m_szStatusString, m_tTransferStartTime, m_uMaxBandwidth, o, outputAndLog(), DccMarshal::releaseSocket(), DccMarshal::remoteIp(), DccMarshal::remotePort(), s, KviThread::start(), _KviDccSendThreadOptions::szFileName, _KviDccRecvThreadOptions::szFileName, DccDescriptor::szFileSize, DccDescriptor::szHost, DccDescriptor::szIp, DccDescriptor::szLocalFileName, DccDescriptor::szPort, Transferring, _KviDccSendThreadOptions::uMaxBandwidth, _KviDccRecvThreadOptions::uMaxBandwidth, _KviDccSendThreadOptions::uStartPosition, and _KviDccRecvThreadOptions::uTotalFileSize.
Referenced by DccFileTransfer().
void DccFileTransfer::connectionInProgress |
( |
| ) |
|
|
protectedslot |
References __tr2qs_ctx(), DccDescriptor::bActive, DccDescriptor::bIsTdcc, DccDescriptor::bSendRequest, KviWindow::connection(), DccDescriptor::console(), KviQString::cutToLast(), KviFileTransfer::displayUpdate(), KviIrcServerParser::encodeCtcpParameter(), KviIrcConnection::encodeText(), eventWindow(), KviIrcConnectionUserInfo::hostIp(), DccDescriptor::idString(), KviNetUtils::isRoutableIpString(), DccDescriptor::isZeroPortRequest(), KVI_OPTION_BOOL, KviEvent_OnDCCFileTransferConnectionInProgress, KviOption_boolDCCFileTransferReplaceOutgoingSpacesWithUnderscores, KviOption_boolDccGuessIpFromServerWhenLocalIsUnroutable, KVS_TRIGGER_EVENT_1, DccMarshal::localIp(), DccMarshal::localPort(), m_pDescriptor, m_pMarshal, m_szDccType, m_szStatusString, outputAndLog(), KviCString::prepend(), KviCString::ptr(), KviIrcConnection::sendFmtData(), KviNetUtils::stringIpToBinaryIp(), DccDescriptor::szFakeIp, DccDescriptor::szFakePort, DccDescriptor::szFileName, DccDescriptor::szFileSize, DccDescriptor::szIp, DccDescriptor::szListenIp, DccDescriptor::szLocalFileSize, DccDescriptor::szNick, DccDescriptor::szPort, KviIrcConnection::userInfo(), and DccDescriptor::zeroPortRequestTag().
Referenced by DccFileTransfer().
const char * DccFileTransfer::dccMarshalOutputContextString |
( |
| ) |
|
|
virtual |
KviWindow * DccFileTransfer::dccMarshalOutputWindow |
( |
| ) |
|
|
virtual |
int DccFileTransfer::displayHeight |
( |
int |
iLineSpacing | ) |
|
|
virtual |
void DccFileTransfer::displayPaint |
( |
QPainter * |
p, |
|
|
int |
column, |
|
|
QRect |
rect |
|
) |
| |
|
virtual |
Implements KviFileTransfer.
References __tr2qs_ctx(), DccSendThread::ackedBytes(), DccSendThread::averageSpeed(), DccRecvThread::averageSpeed(), DccDescriptor::bNoAcks, DccDescriptor::bRecvFile, COLUMN_FILEINFO, COLUMN_PROGRESS, COLUMN_TRANSFERTYPE, Connecting, DccSendThread::doneGetInfo(), DccRecvThread::doneGetInfo(), Failure, DccSendThread::filePosition(), DccRecvThread::filePosition(), KviCString::Format, KviNetUtils::formatNetworkBandwidthString(), KviTimeUtils::formatTimeInterval(), g_pDccFileTransferIcon, DccSendThread::initGetInfo(), DccRecvThread::initGetInfo(), DccSendThread::instantSpeed(), DccRecvThread::instantSpeed(), kvi_timeSpan, m_eGeneralStatus, m_pDescriptor, m_pSlaveRecvThread, m_pSlaveSendThread, m_szStatusString, m_tTransferEndTime, m_tTransferStartTime, m_uTotalFileSize, KviQString::makeSizeReadable(), KviTimeUtils::NoLeadingEmptyIntervals, KviTimeUtils::NoLeadingZeroes, Success, DccDescriptor::szFileName, DccDescriptor::szIp, DccDescriptor::szLocalFileName, DccDescriptor::szNick, DccDescriptor::szPort, and Transferring.
void DccFileTransfer::done |
( |
| ) |
|
|
static |
bool DccFileTransfer::doResume |
( |
const char * |
filename, |
|
|
const char * |
port, |
|
|
quint64 |
filePos |
|
) |
| |
References __tr2qs_ctx(), _OUTPUT_VERBOSE, DccDescriptor::bRecvFile, KviWindow::connection(), DccDescriptor::console(), DccMarshal::dccPort(), KviIrcServerParser::encodeCtcpParameter(), KviIrcConnection::encodeText(), KviQString::equalCI(), KVI_OPTION_BOOL, KVI_OUT_DCCERROR, KVI_OUT_DCCMSG, KviOption_boolAcceptBrokenFileNameDccResumeRequests, KviOption_boolAcceptMismatchedPortDccResumeRequests, m_pDescriptor, m_pMarshal, m_pSlaveRecvThread, m_pSlaveSendThread, outputAndLog(), KviCString::ptr(), KviIrcConnection::sendFmtData(), DccDescriptor::szFileName, DccDescriptor::szFileSize, DccDescriptor::szLocalFileSize, and DccDescriptor::szNick.
bool DccFileTransfer::event |
( |
QEvent * |
e | ) |
|
|
virtual |
References __tr2qs_ctx(), __tr_no_xgettext_ctx, KviApplication::activeConsole(), DccDescriptor::bIsTdcc, DccDescriptor::bRecvFile, c, DccDescriptor::console(), KviFileTransfer::die(), KviFileTransfer::displayUpdate(), eventWindow(), Failure, KviApplication::fileDownloadTerminated(), g_pApp, KviError::getDescription(), DccDescriptor::idString(), KVI_DCC_THREAD_EVENT_ERROR, KVI_DCC_THREAD_EVENT_MESSAGE, KVI_DCC_THREAD_EVENT_SUCCESS, KVI_OPTION_BOOL, KVI_OUT_DCCERROR, KVI_OUT_DCCMSG, KVI_THREAD_EVENT, kvi_unixTime, KviEvent_OnDCCFileTransferFailed, KviEvent_OnDCCFileTransferSuccess, KviOption_boolAutoCloseDccSendOnSuccess, KviOption_boolNotifyDccSendSuccessInConsole, KVS_TRIGGER_EVENT_2, KVS_TRIGGER_EVENT_3, m_eGeneralStatus, m_pDescriptor, m_pResumeTimer, m_pSlaveRecvThread, m_pSlaveSendThread, m_szStatusString, m_tTransferEndTime, KviWindow::output(), outputAndLog(), KviCString::ptr(), DccRecvThread::receivedBytes(), DccSendThread::sentBytes(), Success, DccDescriptor::szFileName, DccDescriptor::szIp, DccDescriptor::szLocalFileName, DccDescriptor::szNick, DccDescriptor::szPort, and KviApplication::windowExists().
void DccFileTransfer::fillContextPopup |
( |
QMenu * |
m | ) |
|
|
virtual |
void DccFileTransfer::fillStatusString |
( |
QString & |
szBuffer | ) |
|
|
virtual |
DccThread * DccFileTransfer::getSlaveThread |
( |
| ) |
|
|
virtual |
References __tr2qs_ctx(), KviFileTransfer::displayUpdate(), eventWindow(), Failure, KviError::getDescription(), DccDescriptor::idString(), KviEvent_OnDCCFileTransferFailed, KVS_TRIGGER_EVENT_3, m_eGeneralStatus, m_pDescriptor, m_szStatusString, and outputAndLog().
Referenced by DccFileTransfer(), listenOrConnect(), and resumeTimedOut().
bool DccFileTransfer::handleResumeAccepted |
( |
const char * |
filename, |
|
|
const char * |
port, |
|
|
const char * |
szZeroPortTag |
|
) |
| |
|
static |
bool DccFileTransfer::handleResumeRequest |
( |
const char * |
filename, |
|
|
const char * |
port, |
|
|
quint64 |
filePos |
|
) |
| |
|
static |
void DccFileTransfer::init |
( |
| ) |
|
|
static |
unsigned int DccFileTransfer::instantSpeed |
( |
| ) |
|
bool DccFileTransfer::isFileUpload |
( |
| ) |
|
|
inline |
void DccFileTransfer::listenOrConnect |
( |
| ) |
|
|
protected |
References DccDescriptor::bActive, DccDescriptor::bDoTimeout, DccMarshal::dccConnect(), DccMarshal::dccListen(), KviFileTransfer::displayUpdate(), handleMarshalError(), m_pDescriptor, m_pMarshal, KviError::Success, DccDescriptor::szIp, DccDescriptor::szListenIp, DccDescriptor::szListenPort, and DccDescriptor::szPort.
Referenced by resumeAccepted(), and startConnection().
QString DccFileTransfer::localFileName |
( |
| ) |
|
|
virtual |
DccFileTransfer * DccFileTransfer::nonFailedTransferWithLocalFileName |
( |
const QString & |
szLocalFileName | ) |
|
|
static |
void DccFileTransfer::outputAndLog |
( |
const QString & |
s | ) |
|
|
protected |
References addToTransferLog(), KVI_OUT_DCCMSG, m_szTransferIdString, KviWindow::output(), and KviFileTransfer::transferWindow().
Referenced by abort(), connected(), connectionInProgress(), doResume(), event(), handleMarshalError(), resumeAccepted(), sslError(), startConnection(), and startingSSLHandshake().
void DccFileTransfer::outputAndLog |
( |
int |
msgtype, |
|
|
const QString & |
s |
|
) |
| |
|
protected |
bool DccFileTransfer::resumeAccepted |
( |
const char * |
filename, |
|
|
const char * |
port, |
|
|
const char * |
szZeroPortTag |
|
) |
| |
References __tr2qs_ctx(), DccDescriptor::bRecvFile, DccDescriptor::bResume, KVI_OPTION_BOOL, kvi_strEqualCI(), KviOption_boolAcceptBrokenFileNameDccResumeRequests, listenOrConnect(), m_pDescriptor, m_pResumeTimer, m_pSlaveRecvThread, outputAndLog(), DccDescriptor::szFileName, DccDescriptor::szLocalFileSize, DccDescriptor::szPort, and DccDescriptor::zeroPortRequestTag().
void DccFileTransfer::resumeTimedOut |
( |
| ) |
|
|
protectedslot |
void DccFileTransfer::retryDCC |
( |
| ) |
|
|
slot |
void DccFileTransfer::retryRevDCC |
( |
| ) |
|
|
slot |
void DccFileTransfer::retryTDCC |
( |
| ) |
|
|
slot |
unsigned int DccFileTransfer::runningTransfersCount |
( |
| ) |
|
|
static |
void DccFileTransfer::setBandwidthLimit |
( |
int |
iVal | ) |
|
References DccDescriptor::bRecvFile, DccSendThread::doneGetInfo(), DccRecvThread::doneGetInfo(), DccSendThread::initGetInfo(), DccRecvThread::initGetInfo(), m_pDescriptor, m_pSlaveRecvThread, m_pSlaveSendThread, m_uMaxBandwidth, MAX_DCC_BANDWIDTH_LIMIT, DccSendThread::setBandwidthLimit(), and DccRecvThread::setBandwidthLimit().
Referenced by dcc_kvs_cmd_setBandwidthLimit(), and DccFileTransferBandwidthDialog::okClicked().
void DccFileTransfer::sslError |
( |
const char * |
msg | ) |
|
|
protectedslot |
void DccFileTransfer::startConnection |
( |
| ) |
|
|
protected |
References __tr2qs_ctx(), DccDescriptor::bActive, DccDescriptor::bRecvFile, DccDescriptor::bResume, connect(), KviWindow::connection(), DccDescriptor::console(), KviFileTransfer::displayUpdate(), KviIrcServerParser::encodeCtcpParameter(), KviIrcConnection::encodeText(), DccDescriptor::isZeroPortRequest(), KVI_OPTION_UINT, KviOption_uintDccSocketTimeout, listenOrConnect(), m_pDescriptor, m_pResumeTimer, m_szDccType, m_szStatusString, outputAndLog(), KviCString::ptr(), resumeTimedOut(), KviIrcConnection::sendFmtData(), DccDescriptor::szFileName, DccDescriptor::szLocalFileSize, DccDescriptor::szNick, DccDescriptor::szPort, and DccDescriptor::zeroPortRequestTag().
Referenced by DccFileTransfer().
void DccFileTransfer::startingSSLHandshake |
( |
| ) |
|
|
protectedslot |
QString DccFileTransfer::tipText |
( |
| ) |
|
|
virtual |
unsigned int DccFileTransfer::transferCount |
( |
| ) |
|
|
static |
unsigned int DccFileTransfer::transferredBytes |
( |
| ) |
|
Referenced by abort(), averageSpeed(), bandwidthLimit(), connected(), connectionInProgress(), DccFileTransfer(), displayPaint(), doResume(), event(), eventWindow(), getSlaveThread(), handleMarshalError(), instantSpeed(), isFileUpload(), listenOrConnect(), localFileName(), resumeAccepted(), retryDCC(), retryRevDCC(), retryTDCC(), setBandwidthLimit(), startConnection(), transferredBytes(), and ~DccFileTransfer().
QTimer* DccFileTransfer::m_pResumeTimer |
|
private |
Referenced by abort(), averageSpeed(), bandwidthLimit(), connected(), DccFileTransfer(), displayPaint(), doResume(), event(), getSlaveThread(), instantSpeed(), resumeAccepted(), setBandwidthLimit(), transferredBytes(), and ~DccFileTransfer().
Referenced by abort(), averageSpeed(), bandwidthLimit(), connected(), DccFileTransfer(), displayPaint(), doResume(), event(), getSlaveThread(), instantSpeed(), setBandwidthLimit(), transferredBytes(), and ~DccFileTransfer().
QString DccFileTransfer::m_szStatusString |
|
private |
QString DccFileTransfer::m_szTransferIdString |
|
private |
QString DccFileTransfer::m_szTransferLog |
|
private |
unsigned int DccFileTransfer::m_uMaxBandwidth |
|
private |
quint64 DccFileTransfer::m_uTotalFileSize |
|
private |
The documentation for this class was generated from the following files: