File indexing completed on 2025-01-19 03:53:29
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2007-11-01 0007 * Description : Core database interface to manage camera item download history. 0008 * 0009 * SPDX-FileCopyrightText: 2007-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0010 * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_CORE_DB_DOWNLOAD_HISTORY_H 0017 #define DIGIKAM_CORE_DB_DOWNLOAD_HISTORY_H 0018 0019 // Qt includes 0020 0021 #include <QString> 0022 #include <QDateTime> 0023 0024 // Local includes 0025 0026 #include "digikam_export.h" 0027 #include "camiteminfo.h" 0028 0029 namespace Digikam 0030 { 0031 0032 class DIGIKAM_DATABASE_EXPORT CoreDbDownloadHistory 0033 { 0034 public: 0035 0036 /** 0037 * Queries the status of a download item that is uniquely described by the four parameters. 0038 * The identifier is recommended to be an MD5 hash of properties describing the camera, 0039 * if available, and the directory path (though you are free to use all four parameters as you want) 0040 */ 0041 static CamItemInfo::DownloadStatus status(const QString& identifier, const QString& name, 0042 qlonglong fileSize, const QDateTime& date); 0043 0044 /** 0045 * Sets the status of the item to Downloaded 0046 */ 0047 static void setDownloaded(const QString& identifier, const QString& name, 0048 qlonglong fileSize, const QDateTime& date); 0049 }; 0050 0051 } // namespace Digikam 0052 0053 #endif // DIGIKAM_CORE_DB_DOWNLOAD_HISTORY_H