File indexing completed on 2025-03-09 03:54:59

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2007-06-07
0007  * Description : Face database backend
0008  *
0009  * SPDX-FileCopyrightText: 2007-2010 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_FACE_DB_BACKEND_H
0017 #define DIGIKAM_FACE_DB_BACKEND_H
0018 
0019 // Local includes
0020 
0021 #include "digikam_export.h"
0022 #include "dbenginebackend.h"
0023 
0024 namespace Digikam
0025 {
0026 
0027 class FaceDbSchemaUpdater;
0028 class FaceDbBackendPrivate;
0029 
0030 class DIGIKAM_GUI_EXPORT FaceDbBackend : public BdEngineBackend
0031 {
0032     Q_OBJECT
0033 
0034 public:
0035 
0036     explicit FaceDbBackend(DbEngineLocking* const locking,
0037                            const QString& backendName = QLatin1String("faceDatabase-"));
0038     ~FaceDbBackend() override;
0039 
0040     /**
0041      * Initialize the database schema to the current version,
0042      * carry out upgrades if necessary.
0043      * Shall only be called from the thread that called open().
0044      */
0045     bool initSchema(FaceDbSchemaUpdater* const updater);
0046 
0047 private:
0048 
0049     // Disable
0050     explicit FaceDbBackend(QObject*) = delete;
0051 
0052     Q_DECLARE_PRIVATE(BdEngineBackend)
0053 };
0054 
0055 } // namespace Digikam
0056 
0057 #endif // DIGIKAM_FACE_DB_BACKEND_H