KVIrc
4.9.2
DeveloperAPIs
|
#include <DccBroker.h>
Public Slots | |
void | activeCanvasExecute (DccDialog *box, DccDescriptor *dcc) |
void | activeVideoExecute (DccDialog *box, DccDescriptor *dcc) |
void | activeVoiceExecute (DccDialog *box, DccDescriptor *dcc) |
void | cancelDcc (DccDialog *box, DccDescriptor *dcc) |
void | cancelDcc (DccDescriptor *dcc) |
void | chooseSaveFileName (DccDialog *box, DccDescriptor *dcc) |
void | executeChat (DccDialog *box, DccDescriptor *dcc) |
void | recvFileExecute (DccDialog *box, DccDescriptor *dcc) |
void | renameDccSendFile (DccDialog *box, DccDescriptor *dcc) |
void | renameOverwriteResume (DccDialog *box, DccDescriptor *dcc) |
void | rsendExecute (DccDialog *box, DccDescriptor *dcc) |
void | rsendExecute (DccDescriptor *dcc) |
void | sendFileExecute (DccDialog *box, DccDescriptor *dcc) |
Public Member Functions | |
void | activeVideoManage (DccDescriptor *dcc) |
void | activeVoiceManage (DccDescriptor *dcc) |
KviDccZeroPortTag * | addZeroPortTag () |
bool | canUnload () |
unsigned int | dccBoxCount () |
DccBroker () | |
unsigned int | dccWindowsCount () |
KviDccZeroPortTag * | findZeroPortTag (const QString &szTag) |
void | handleChatRequest (DccDescriptor *dcc) |
bool | handleResumeAccepted (const char *filename, const char *port, const char *szZeroPortTag) |
bool | handleResumeRequest (KviDccRequest *dcc, const char *filename, const char *port, unsigned long filePos, const char *szZeroPortTag) |
void | passiveVideoExecute (DccDescriptor *dcc) |
void | passiveVoiceExecute (DccDescriptor *dcc) |
void | recvFileManage (DccDescriptor *dcc) |
void | removeZeroPortTag (const QString &szTag) |
void | rsendAskForFileName (DccDescriptor *dcc) |
void | rsendManage (DccDescriptor *dcc) |
void | sendFileManage (DccDescriptor *dcc) |
void | unregisterDccBox (DccDialog *box) |
void | unregisterDccWindow (KviWindow *dcc) |
~DccBroker () | |
Protected Attributes | |
KviPointerList< DccDialog > * | m_pBoxList |
KviPointerList< KviWindow > * | m_pDccWindowList |
KviPointerHashTable< QString, KviDccZeroPortTag > * | m_pZeroPortTags |
DccBroker::DccBroker | ( | ) |
DccBroker::~DccBroker | ( | ) |
References DccFileTransfer::done(), KviPointerList< T >::first(), m_pBoxList, m_pDccWindowList, and m_pZeroPortTags.
|
slot |
Referenced by passiveVideoExecute().
|
slot |
References KviApplication::activeConsole(), KviMainWindow::addWindow(), KviPointerList< T >::append(), DccDescriptor::bAutoAccept, DccDescriptor::bOverrideMinimize, DccDescriptor::bShowMinimized, DccDescriptor::console(), DccDialog::forgetDescriptor(), KviCString::Format, g_pApp, g_pMainWindow, KVI_OPTION_BOOL, KviOption_boolCreateMinimizedDccVideo, KviOption_boolCreateMinimizedDccVideoWhenAutoAccepted, m_pDccWindowList, DccDescriptor::setConsole(), DccDescriptor::szIp, DccDescriptor::szNick, DccDescriptor::szPort, v, and KviApplication::windowExists().
Referenced by activeVideoManage(), and dcc_kvs_cmd_video().
void DccBroker::activeVideoManage | ( | DccDescriptor * | dcc | ) |
|
slot |
References KviApplication::activeConsole(), KviMainWindow::addWindow(), KviPointerList< T >::append(), DccDescriptor::bAutoAccept, DccDescriptor::bOverrideMinimize, DccDescriptor::bShowMinimized, DccDescriptor::console(), DccDialog::forgetDescriptor(), KviCString::Format, g_pApp, g_pMainWindow, KVI_OPTION_BOOL, KviOption_boolCreateMinimizedDccVoice, KviOption_boolCreateMinimizedDccVoiceWhenAutoAccepted, m_pDccWindowList, DccDescriptor::setConsole(), DccDescriptor::szIp, DccDescriptor::szNick, DccDescriptor::szPort, v, and KviApplication::windowExists().
Referenced by activeVoiceManage(), and dcc_kvs_cmd_voice().
void DccBroker::activeVoiceManage | ( | DccDescriptor * | dcc | ) |
KviDccZeroPortTag * DccBroker::addZeroPortTag | ( | ) |
References KviPointerHashTable< Key, T >::insert(), m_pZeroPortTags, KviDccZeroPortTag::m_szTag, KviDccZeroPortTag::m_tTimestamp, KviDccZeroPortTag::m_uResumePosition, and t().
Referenced by dcc_kvs_cmd_chat(), and rsendExecute().
|
slot |
|
slot |
bool DccBroker::canUnload | ( | ) |
References KviPointerList< T >::count(), m_pBoxList, m_pDccWindowList, and DccFileTransfer::transferCount().
Referenced by dcc_module_can_unload().
|
slot |
References __tr2qs_ctx(), _OUTPUT_VERBOSE, KviFileUtils::adjustFilePath(), KviFileDialog::askForSaveFileName(), KviApplication::Avatars, DccDescriptor::bAutoAccept, DccDescriptor::bIsIncomingAvatar, cancelDcc(), KviFileUtils::cleanFileName(), DccDescriptor::console(), KviFileUtils::directoryExists(), KviQString::ensureLastCharIs(), KviMediaManager::findMediaType(), DccDialog::forgetDescriptor(), g_pApp, g_pMainWindow, g_pMediaManager, KviApplication::getLocalKvircDirectory(), KviApplication::Incoming, KVI_OPTION_BOOL, KVI_OUT_DCCMSG, KVI_PATH_SEPARATOR_CHAR, KviOption_boolSortReceivedByDccFilesByNicks, KviOption_boolUseIncomingDccMediaTypeSavePath, KviMutex::lock(), KviFileUtils::makeDir(), KviWindow::output(), renameOverwriteResume(), DccDescriptor::szFileName, DccDescriptor::szLocalFileName, DccDescriptor::szNick, DccDescriptor::szType, and KviMutex::unlock().
Referenced by recvFileManage().
unsigned int DccBroker::dccBoxCount | ( | ) |
References KviPointerList< T >::count(), and m_pBoxList.
Referenced by dcc_module_check_limits().
|
inline |
References KviPointerList< T >::count(), and m_pDccWindowList.
Referenced by dcc_module_check_limits().
|
slot |
References KviApplication::activeConsole(), KviMainWindow::addWindow(), KviPointerList< T >::append(), DccDescriptor::bAutoAccept, DccDescriptor::bOverrideMinimize, DccDescriptor::bShowMinimized, DccDescriptor::console(), DccDialog::forgetDescriptor(), g_pApp, g_pMainWindow, KVI_OPTION_BOOL, KviOption_boolCreateMinimizedDccChat, KviOption_boolCreateMinimizedDccChatWhenAutoAccepted, m_pDccWindowList, KviCString::ptr(), DccDescriptor::setConsole(), DccDescriptor::szIp, DccDescriptor::szNick, DccDescriptor::szPort, DccDescriptor::szType, KviCString::toLower(), and KviApplication::windowExists().
Referenced by dcc_kvs_cmd_chat(), and handleChatRequest().
KviDccZeroPortTag * DccBroker::findZeroPortTag | ( | const QString & | szTag | ) |
References KviPointerHashTable< Key, T >::find(), m_pZeroPortTags, KviDccZeroPortTag::m_tTimestamp, KviPointerHashTable< Key, T >::remove(), and t().
Referenced by dccModuleParseDccChat(), dccModuleParseDccSend(), and handleResumeRequest().
void DccBroker::handleChatRequest | ( | DccDescriptor * | dcc | ) |
References __tr2qs_ctx(), KviPointerList< T >::append(), DccDescriptor::bAutoAccept, cancelDcc(), connect(), executeChat(), DccDescriptor::isZeroPortRequest(), m_pBoxList, DccDescriptor::szHost, DccDescriptor::szIp, DccDescriptor::szNick, DccDescriptor::szPort, DccDescriptor::szType, and DccDescriptor::szUser.
Referenced by dccModuleParseDccChat().
bool DccBroker::handleResumeAccepted | ( | const char * | filename, |
const char * | port, | ||
const char * | szZeroPortTag | ||
) |
References DccFileTransfer::handleResumeAccepted().
Referenced by dccModuleParseDccAccept().
bool DccBroker::handleResumeRequest | ( | KviDccRequest * | dcc, |
const char * | filename, | ||
const char * | port, | ||
unsigned long | filePos, | ||
const char * | szZeroPortTag | ||
) |
References KviWindow::connection(), KviIrcMessage::console(), _KviDccRequest::ctcpMsg, KviIrcServerParser::encodeCtcpParameter(), KviIrcConnection::encodeText(), findZeroPortTag(), DccFileTransfer::handleResumeRequest(), kvi_strEqualCI(), KviDccZeroPortTag::m_uFileSize, KviDccZeroPortTag::m_uResumePosition, _KviCtcpMessage::msg, KviIrcMask::nick(), _KviCtcpMessage::pSource, KviCString::ptr(), KviIrcConnection::sendFmtData(), and t().
Referenced by dccModuleParseDccResume().
void DccBroker::passiveVideoExecute | ( | DccDescriptor * | dcc | ) |
References __tr2qs_ctx(), activeCanvasExecute(), KviApplication::activeConsole(), KviMainWindow::addWindow(), KviPointerList< T >::append(), DccDescriptor::bAutoAccept, DccDescriptor::bOverrideMinimize, DccDescriptor::bShowMinimized, cancelDcc(), connect(), DccDescriptor::console(), DccDialog::forgetDescriptor(), KviCString::Format, g_pApp, g_pMainWindow, KVI_OPTION_BOOL, KviOption_boolCreateMinimizedDccChat, KviOption_boolCreateMinimizedDccChatWhenAutoAccepted, m_pBoxList, m_pDccWindowList, DccDescriptor::setConsole(), DccDescriptor::szHost, DccDescriptor::szIp, DccDescriptor::szNick, DccDescriptor::szPort, DccDescriptor::szUser, and KviApplication::windowExists().
Referenced by dcc_kvs_cmd_video().
void DccBroker::passiveVoiceExecute | ( | DccDescriptor * | dcc | ) |
References KviMainWindow::addWindow(), KviPointerList< T >::append(), DccDescriptor::bOverrideMinimize, DccDescriptor::bShowMinimized, KviCString::Format, g_pMainWindow, KVI_OPTION_BOOL, KviOption_boolCreateMinimizedDccChat, m_pDccWindowList, DccDescriptor::szIp, DccDescriptor::szNick, DccDescriptor::szPort, and v.
Referenced by dcc_kvs_cmd_voice().
|
slot |
References KviApplication::activeConsole(), DccDescriptor::bAutoAccept, DccDescriptor::bOverrideMinimize, DccDescriptor::bShowMinimized, DccDescriptor::console(), DccDialog::forgetDescriptor(), g_pApp, KviFileTransfer::invokeTransferWindow(), KVI_OPTION_BOOL, KviOption_boolCreateMinimizedDccSend, KviOption_boolCreateMinimizedDccSendWhenAutoAccepted, DccDescriptor::setConsole(), and KviApplication::windowExists().
Referenced by renameDccSendFile(), and renameOverwriteResume().
void DccBroker::recvFileManage | ( | DccDescriptor * | dcc | ) |
References __tr2qs_ctx(), _OUTPUT_VERBOSE, KviPointerList< T >::append(), DccDescriptor::bActive, DccDescriptor::bAutoAccept, DccDescriptor::bIsIncomingAvatar, cancelDcc(), chooseSaveFileName(), connect(), DccDescriptor::console(), KVI_OPTION_UINT, KVI_OUT_DCCMSG, KviOption_uintMaximumRequestedAvatarSize, m_pBoxList, KviQString::makeSizeReadable(), KviWindow::output(), DccDescriptor::szFileName, DccDescriptor::szFileSize, DccDescriptor::szHost, DccDescriptor::szIp, DccDescriptor::szNick, DccDescriptor::szPort, DccDescriptor::szType, and DccDescriptor::szUser.
Referenced by dcc_kvs_cmd_recv(), dcc_kvs_cmd_send(), dccModuleParseDccRSend(), and dccModuleParseDccSend().
void DccBroker::removeZeroPortTag | ( | const QString & | szTag | ) |
References m_pZeroPortTags, and KviPointerHashTable< Key, T >::remove().
Referenced by dccModuleParseDccChat(), and dccModuleParseDccSend().
|
slot |
References __tr2qs_ctx(), _OUTPUT_VERBOSE, DccDescriptor::console(), KviCString::findLastIdx(), DccDialog::forgetDescriptor(), i, KVI_OUT_DCCMSG, KviCString::left(), KviCString::len(), KviWindow::output(), KviCString::ptr(), recvFileExecute(), KviCString::right(), KviCString::setNum(), DccDescriptor::szLocalFileName, and DccDescriptor::szLocalFileSize.
Referenced by renameOverwriteResume().
|
slot |
References __tr2qs_ctx(), KviPointerList< T >::append(), DccDescriptor::bAutoAccept, DccDescriptor::bResume, cancelDcc(), connect(), DccDescriptor::console(), DccDialog::forgetDescriptor(), KVI_OPTION_BOOL, KVI_OUT_DCCMSG, KviOption_boolAutoResumeDccSendWhenAutoAccepted, m_pBoxList, KviQString::makeSizeReadable(), DccFileTransfer::nonFailedTransferWithLocalFileName(), KviWindow::output(), recvFileExecute(), renameDccSendFile(), DccDescriptor::szFileSize, DccDescriptor::szLocalFileName, and DccDescriptor::szLocalFileSize.
Referenced by chooseSaveFileName().
void DccBroker::rsendAskForFileName | ( | DccDescriptor * | dcc | ) |
References __tr2qs_ctx(), KviFileDialog::askForOpenFileNames(), cancelDcc(), d, g_pMainWindow, rsendExecute(), and DccDescriptor::szLocalFileName.
Referenced by rsendManage().
|
slot |
References DccDialog::forgetDescriptor().
Referenced by rsendAskForFileName(), and rsendManage().
|
slot |
References __tr2qs_ctx(), KviApplication::activeConsole(), KviSharedFilesManager::addSharedFile(), addZeroPortTag(), KviWindow::connection(), DccDescriptor::console(), KviIrcConnection::encodeText(), g_pApp, g_pSharedFilesManager, DccDescriptor::isZeroPortRequest(), KVI_OUT_DCCERROR, KviDccZeroPortTag::m_szTag, KviDccZeroPortTag::m_uFileSize, KviWindow::output(), KviIrcConnection::sendFmtData(), DccDescriptor::setZeroPortRequestTag(), DccDescriptor::szFileName, DccDescriptor::szLocalFileName, DccDescriptor::szNick, DccDescriptor::szType, t(), and KviApplication::windowExists().
void DccBroker::rsendManage | ( | DccDescriptor * | dcc | ) |
References rsendAskForFileName(), rsendExecute(), and DccDescriptor::szLocalFileName.
Referenced by dcc_kvs_cmd_rsend().
|
slot |
References __tr2qs_ctx(), KviApplication::activeConsole(), DccDescriptor::bOverrideMinimize, DccDescriptor::bShowMinimized, DccDescriptor::console(), DccDialog::forgetDescriptor(), g_pApp, KviFileTransfer::invokeTransferWindow(), KVI_OPTION_BOOL, KVI_OUT_DCCERROR, KviOption_boolCreateMinimizedDccSend, KviWindow::output(), DccDescriptor::setConsole(), DccDescriptor::szFileName, DccDescriptor::szLocalFileName, DccDescriptor::szLocalFileSize, and KviApplication::windowExists().
Referenced by dcc_kvs_cmd_send(), dccModuleParseDccGet(), dccModuleParseDccRecv(), and sendFileManage().
void DccBroker::sendFileManage | ( | DccDescriptor * | dcc | ) |
References __tr2qs_ctx(), KviFileDialog::askForOpenFileNames(), cancelDcc(), d, g_pMainWindow, sendFileExecute(), and DccDescriptor::szLocalFileName.
Referenced by dcc_kvs_cmd_send().
void DccBroker::unregisterDccBox | ( | DccDialog * | box | ) |
References m_pBoxList, and KviPointerList< T >::removeRef().
Referenced by DccDialog::~DccDialog().
void DccBroker::unregisterDccWindow | ( | KviWindow * | dcc | ) |
References m_pDccWindowList, and KviPointerList< T >::removeRef().
Referenced by DccChatWindow::~DccChatWindow(), DccVideoWindow::~DccVideoWindow(), and DccVoiceWindow::~DccVoiceWindow().
|
protected |
|
protected |
|
protected |
Referenced by addZeroPortTag(), DccBroker(), findZeroPortTag(), removeZeroPortTag(), and ~DccBroker().