File indexing completed on 2024-12-01 04:33:18
0001 /************************************************************************** 0002 * Copyright (C) 2009-2011 Matthias Fuchs <mat69@gmx.net> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify * 0005 * it under the terms of the GNU General Public License as published by * 0006 * the Free Software Foundation; either version 2 of the License, or * 0007 * (at your option) any later version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, * 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0012 * GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License * 0015 * along with this program; if not, write to the * 0016 * Free Software Foundation, Inc., * 0017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 0018 ***************************************************************************/ 0019 0020 #ifndef VERIFIER_P_H 0021 #define VERIFIER_P_H 0022 0023 class PartialChecksums; 0024 class Verifier; 0025 0026 #include "verificationthread.h" 0027 #include "verifier.h" 0028 0029 struct VerifierPrivate { 0030 VerifierPrivate(Verifier *verifier) 0031 : q(verifier) 0032 , model(nullptr) 0033 { 0034 } 0035 0036 ~VerifierPrivate(); 0037 0038 static QString calculatePartialChecksum(QFile *file, 0039 const QString &type, 0040 KIO::fileoffset_t startOffset, 0041 int pieceLength, 0042 KIO::filesize_t fileSize = 0, 0043 bool *abortPtr = nullptr); 0044 QStringList orderChecksumTypes(Verifier::ChecksumStrength strength) const; 0045 0046 Verifier *q; 0047 0048 QString dBusObjectPath; 0049 VerificationModel *model; 0050 QUrl dest; 0051 Verifier::VerificationStatus status; 0052 0053 QHash<QString, PartialChecksums *> partialSums; 0054 0055 mutable VerificationThread thread; 0056 0057 static const int PARTSIZE; 0058 }; 0059 0060 #endif