digiKam
coredbbackend.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2007-04-15
7  * Description : Core database abstract backend.
8  *
9  * Copyright (C) 2007-2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2010-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_CORE_DB_BACKEND_H
26 #define DIGIKAM_CORE_DB_BACKEND_H
27 
28 // Local includes
29 
30 #include "digikam_export.h"
31 #include "dbenginebackend.h"
32 #include "coredbchangesets.h"
33 
34 namespace Digikam
35 {
36 
37 class CoreDbSchemaUpdater;
38 class CoreDbWatch;
39 class CoreDbBackendPrivate;
40 
41 class DIGIKAM_DATABASE_EXPORT CoreDbBackend : public BdEngineBackend
42 {
43  Q_OBJECT
44 
45 public:
46 
47  explicit CoreDbBackend(DbEngineLocking* const locking,
48  const QString& backendName = QLatin1String("digikamDatabase-"));
49  ~CoreDbBackend() override;
50 
54  void setCoreDbWatch(CoreDbWatch* watch);
55 
61  bool initSchema(CoreDbSchemaUpdater* updater);
62 
66  void recordChangeset(const ImageChangeset& changeset);
67  void recordChangeset(const ImageTagChangeset& changeset);
68  void recordChangeset(const CollectionImageChangeset& changeset);
69  void recordChangeset(const AlbumChangeset& changeset);
70  void recordChangeset(const TagChangeset& changeset);
71  void recordChangeset(const AlbumRootChangeset& changeset);
72  void recordChangeset(const SearchChangeset& changeset);
73 
74 private:
75 
76  // Disable
77  explicit CoreDbBackend(QObject*) = delete;
78 
79  Q_DECLARE_PRIVATE(CoreDbBackend)
80 };
81 
82 } // namespace Digikam
83 
84 #endif // DIGIKAM_CORE_DB_BACKEND_H
Definition: coredbchangesets.h:262
Definition: coredbchangesets.h:337
Definition: dbenginebackend.h:66
Definition: coredbchangesets.h:152
Definition: coredbbackend.h:42
Definition: coredbschemaupdater.h:47
Definition: coredbwatch.h:44
Definition: dbenginebackend.h:52
Definition: coredbchangesets.h:48
Definition: coredbchangesets.h:80
Definition: coredbchangesets.h:372
Definition: coredbchangesets.h:298
Definition: datefolderview.cpp:43