File indexing completed on 2025-01-05 03:54:13
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2010-01-08 0007 * Description : database server starter 0008 * 0009 * SPDX-FileCopyrightText: 2009-2010 by Holger Foerster <Hamsi2k at freenet dot de> 0010 * SPDX-FileCopyrightText: 2016 by Swati Lodha <swatilodha27 at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_DATABASE_SERVER_STARTER_H 0017 #define DIGIKAM_DATABASE_SERVER_STARTER_H 0018 0019 // Qt includes 0020 0021 #include <QString> 0022 0023 // Local includes 0024 0025 #include "digikam_export.h" 0026 #include "databaseservererror.h" 0027 #include "dbengineparameters.h" 0028 0029 namespace Digikam 0030 { 0031 0032 class DIGIKAM_EXPORT DatabaseServerStarter : public QObject 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 0038 /** 0039 * Global instance of internal server starter. All accessor methods are thread-safe. 0040 */ 0041 static DatabaseServerStarter* instance(); 0042 0043 DatabaseServerError startServerManagerProcess(const DbEngineParameters& parameters) const; 0044 void stopServerManagerProcess(); 0045 0046 private: 0047 0048 // Disable 0049 DatabaseServerStarter(); 0050 explicit DatabaseServerStarter(QObject*) = delete; 0051 ~DatabaseServerStarter() override; 0052 0053 private: 0054 0055 class Private; 0056 Private* const d; 0057 0058 friend class DatabaseServerStarterCreator; 0059 }; 0060 0061 } // namespace Digikam 0062 0063 #endif // DIGIKAM_DATABASE_SERVER_STARTER_H