X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fquassel.h;h=30e02b201fa932013c05c6040bdad6c14f763ae7;hb=f9a73e3ad8142212028a39b26ced62456e575b7a;hp=b42ee47d38503907ba89d9404f2346fcc8878408;hpb=7aa691713f4185fe142f54e14d6b623ee706f77a;p=quassel.git diff --git a/src/common/quassel.h b/src/common/quassel.h index b42ee47d..30e02b20 100644 --- a/src/common/quassel.h +++ b/src/common/quassel.h @@ -27,6 +27,8 @@ #include "abstractcliparser.h" +class QFile; + class Quassel { Q_DECLARE_TR_FUNCTIONS(Quassel) @@ -67,8 +69,9 @@ public: */ enum Feature { SynchronizedMarkerLine = 0x0001, + SaslAuthentication = 0x0002, - NumFeatures = 0x0001 + NumFeatures = 0x0002 }; Q_DECLARE_FLAGS(Features, Feature); @@ -120,6 +123,17 @@ public: static bool DEBUG; + enum LogLevel { + DebugLevel, + InfoLevel, + WarningLevel, + ErrorLevel + }; + + static inline LogLevel logLevel(); + static inline QFile *logFile(); + static inline bool logToSyslog(); + static void logFatalMessage(const char *msg); protected: @@ -149,6 +163,10 @@ private: static QString _configDirPath; static QStringList _dataDirPaths; static QString _translationDirPath; + + static LogLevel _logLevel; + static QFile *_logFile; + static bool _logToSyslog; }; Q_DECLARE_OPERATORS_FOR_FLAGS(Quassel::Features); @@ -164,4 +182,8 @@ AbstractCliParser *Quassel::cliParser() { return _cliParser; } QString Quassel::optionValue(const QString &key) { return cliParser()->value(key); } bool Quassel::isOptionSet(const QString &key) { return cliParser()->isSet(key); } +Quassel::LogLevel Quassel::logLevel() { return _logLevel; } +QFile *Quassel::logFile() { return _logFile; } +bool Quassel::logToSyslog() { return _logToSyslog; } + #endif