File indexing completed on 2024-04-14 03:51:42

0001 /*
0002     SPDX-FileCopyrightText: 2016-2021 Harald Sitter <sitter@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KCRASH_CORECONFIG_H
0008 #define KCRASH_CORECONFIG_H
0009 
0010 #include <QString>
0011 
0012 namespace KCrash
0013 {
0014 class CoreConfig
0015 {
0016 public:
0017     CoreConfig(const QString &path = QStringLiteral("/proc/sys/kernel/core_pattern"));
0018 
0019     bool isProcess() const;
0020     // should this need expansion please refactor to enum. could also store cmdline and compare in kcrash.cpp
0021     bool isCoredumpd() const;
0022 
0023 private:
0024     bool m_supported = false;
0025     bool m_process = false;
0026     bool m_coredumpd = false;
0027 };
0028 
0029 } // namespace KCrash
0030 
0031 #endif // KCRASH_CORECONFIG_H