digiKam
thumbsdbaccess.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 : 2009-05-29
7  * Description : Thumbnail database access wrapper.
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_THUMBS_DB_ACCESS_H
26 #define DIGIKAM_THUMBS_DB_ACCESS_H
27 
28 // Local includes
29 
30 #include "digikam_export.h"
31 #include "dbengineparameters.h"
32 
33 namespace Digikam
34 {
35 
36 class DbEngineErrorHandler;
37 class InitializationObserver;
38 class ThumbsDb;
39 class ThumbsDbAccessStaticPriv;
40 class ThumbsDbBackend;
41 
42 class DIGIKAM_EXPORT ThumbsDbAccess
43 {
44 public:
45 
52  ~ThumbsDbAccess();
53 
54  ThumbsDb* db() const;
55  ThumbsDbBackend* backend() const;
56  QString lastError() const;
57 
61  void setLastError(const QString& error);
62 
63  static DbEngineParameters parameters();
64 
65 public:
66 
67  static void initDbEngineErrorHandler(DbEngineErrorHandler* const errorhandler);
68  static void setParameters(const DbEngineParameters& parameters);
69  static bool checkReadyForUse(InitializationObserver* const observer);
70  static bool isInitialized();
71  static void cleanUpDatabase();
72 
73 private:
74 
75  explicit ThumbsDbAccess(bool);
76 
77  static ThumbsDbAccessStaticPriv* d;
78 };
79 
80 } // namespace Digikam
81 
82 #endif // DIGIKAM_THUMBS_DB_ACCESS_H
Definition: dbengineerrorhandler.h:60
Definition: dbengineparameters.h:49
Definition: collectionscannerobserver.h:57
Definition: thumbsdbaccess.h:43
Definition: thumbsdbbackend.h:39
Definition: thumbsdb.h:83
Definition: datefolderview.cpp:43