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-04-26 0007 * Description : database server error reporting 0008 * 0009 * SPDX-FileCopyrightText: 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_ERROR_H 0017 #define DIGIKAM_DATABASE_SERVER_ERROR_H 0018 0019 // Qt includes 0020 0021 #include <QString> 0022 #include <QVariant> 0023 0024 // Local includes 0025 0026 #include "digikam_export.h" 0027 0028 namespace Digikam 0029 { 0030 0031 class DIGIKAM_EXPORT DatabaseServerError 0032 { 0033 public: 0034 0035 enum DatabaseServerErrorEnum 0036 { 0037 /** 0038 * No errors occurred while starting the database server 0039 */ 0040 NoErrors = 0, 0041 0042 /** 0043 * The requested database type is not supported. 0044 */ 0045 NotSupported, 0046 0047 /** 0048 * A error has occurred while starting the database server executable. 0049 */ 0050 StartError 0051 }; 0052 0053 public: 0054 0055 explicit DatabaseServerError(DatabaseServerErrorEnum errorType = NoErrors, 0056 const QString& errorText = QString()); 0057 DatabaseServerError(const DatabaseServerError& dbServerError); 0058 ~DatabaseServerError(); 0059 0060 int getErrorType() const; 0061 void setErrorType(DatabaseServerErrorEnum errorType); 0062 QString getErrorText() const; 0063 void setErrorText(const QString& errorText); 0064 0065 private: 0066 0067 QString m_ErrorText; 0068 int m_ErrorType; 0069 }; 0070 0071 } // namespace Digikam 0072 0073 #endif // DIGIKAM_DATABASE_SERVER_ERROR_H