本文整理汇总了C++中UserConnection::getHubUrl方法的典型用法代码示例。如果您正苦于以下问题:C++ UserConnection::getHubUrl方法的具体用法?C++ UserConnection::getHubUrl怎么用?C++ UserConnection::getHubUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserConnection
的用法示例。
在下文中一共展示了UserConnection::getHubUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getParams
void Transfer::getParams(const UserConnection& aSource, StringMap& params) const {
params["userCID"] = aSource.getUser()->getCID().toBase32();
params["userNI"] = Util::toString(ClientManager::getInstance()->getNicks(aSource.getUser()->getCID(), aSource.getHubUrl()));
params["userI4"] = aSource.getRemoteIp();
StringList hubNames = ClientManager::getInstance()->getHubNames(aSource.getUser()->getCID(), aSource.getHubUrl());
if(hubNames.empty())
hubNames.push_back(STRING(OFFLINE));
params["hub"] = Util::toString(hubNames);
StringList hubs = ClientManager::getInstance()->getHubs(aSource.getUser()->getCID(), aSource.getHubUrl());
if(hubs.empty())
hubs.push_back(STRING(OFFLINE));
params["hubURL"] = Util::toString(hubs);
params["fileSI"] = Util::toString(getSize());
params["fileSIshort"] = Util::formatBytes(getSize());
params["fileSIchunk"] = Util::toString(getPos());
params["fileSIchunkshort"] = Util::formatBytes(getPos());
params["fileSIactual"] = Util::toString(getActual());
params["fileSIactualshort"] = Util::formatBytes(getActual());
params["speed"] = Util::formatBytes(static_cast<int64_t>(getAverageSpeed())) + "/s";
params["time"] = Text::fromT(Util::formatSeconds((GET_TICK() - getStart()) / 1000));
params["fileTR"] = getTTH().toBase32();
}
示例2: getParams
void Transfer::getParams(const UserConnection& aSource, StringMap& params) {
params["userCID"] = aSource.getUser()->getCID().toBase32();
params["userNI"] = Util::toString(ClientManager::getInstance()->getNicks(aSource.getUser()->getCID(), aSource.getHubUrl()));
params["userI4"] = aSource.getRemoteIp();
StringList hubNames = ClientManager::getInstance()->getHubNames(aSource.getUser()->getCID(), aSource.getHubUrl());
if(hubNames.empty())
hubNames.push_back(_("Offline"));
params["hub"] = Util::toString(hubNames);
StringList hubs = ClientManager::getInstance()->getHubs(aSource.getUser()->getCID(), aSource.getHubUrl());
if(hubs.empty())
hubs.push_back(_("Offline"));
params["hubURL"] = Util::toString(hubs);
params["fileSI"] = Util::toString(getSize());
params["fileSIshort"] = Util::formatBytes(getSize());
params["fileSIactual"] = Util::toString(getActual());
params["fileSIactualshort"] = Util::formatBytes(getActual());
params["speed"] = str(F_("%1%/s") % Util::formatBytes(getAverageSpeed()));
params["time"] = Util::formatSeconds((GET_TICK() - getStart()) / 1000);
params["fileTR"] = getTTH().toBase32();
}