本文整理汇总了C++中Transfer::ed2kHandle方法的典型用法代码示例。如果您正苦于以下问题:C++ Transfer::ed2kHandle方法的具体用法?C++ Transfer::ed2kHandle怎么用?C++ Transfer::ed2kHandle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transfer
的用法示例。
在下文中一共展示了Transfer::ed2kHandle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_transfer_finished
void FileNode::on_transfer_finished(Transfer t)
{
m_active = true;
m_hash = t.hash();
m_error = libed2k::errors::no_error;
m_parent->drop_transfer_by_file();
// extract add_transfer_parameters to node from transfer
if (!m_atp && t.is_valid()) {
m_atp = new libed2k::add_transfer_params(t.ed2kHandle().delegate().params());
m_atp->seed_mode = true; // libed2k will not check file data
}
Session::instance()->registerNode(this);
Session::instance()->signal_changeNode(this);
}
示例2: transferAboutToBeRemoved
void QED2KSession::deleteTransfer(const QString& hash, bool delete_files)
{
const Transfer t = getTransfer(hash);
if (!t.is_valid()) return;
emit transferAboutToBeRemoved(t, delete_files);
m_session->remove_transfer(
t.ed2kHandle().delegate(),
delete_files ? libed2k::session::delete_files : libed2k::session::none);
if (QFile::remove(QDir(misc::ED2KBackupLocation()).absoluteFilePath(hash + ".fastresume")))
{
qDebug() << "Also deleted temp fast resume data: " << hash;
}
else
{
qDebug() << "fast resume wasn't removed for " << hash;
}
emit deletedTransfer(hash);
}