return _capabilities["files_sharing"].toMap()["resharing"].toBool();
}
-QList<QByteArray> Capabilities::supportedChecksumTypesRaw() const
+QList<QByteArray> Capabilities::supportedChecksumTypesAdvertised() const
{
return QList<QByteArray>();
}
QList<QByteArray> Capabilities::supportedChecksumTypes() const
{
- auto list = supportedChecksumTypesRaw();
+ auto list = supportedChecksumTypesAdvertised();
QByteArray cfgType = ConfigFile().transmissionChecksum().toLatin1();
if (!cfgType.isEmpty()) {
list.prepend(cfgType);
bool shareResharing() const;
/// Returns the checksum types the server explicitly advertises
- QList<QByteArray> supportedChecksumTypesRaw() const;
+ QList<QByteArray> supportedChecksumTypesAdvertised() const;
/// Like supportedChecksumTypesRaw(), but includes the type from the config
QList<QByteArray> supportedChecksumTypes() const;
// If we already have a checksum header and the checksum type is supported
// by the server, we keep that - otherwise recompute.
+ //
+ // Note: Currently we *always* recompute because we usually only upload
+ // files that have changed and thus have a new checksum. But if an earlier
+ // phase computed a checksum, this is where we would make use of it.
if (!_item->_transmissionChecksumType.isEmpty()) {
if (supportedChecksumTypes.contains(_item->_transmissionChecksumType)) {
// TODO: We could validate the old checksum and thereby determine whether