2#ifdef TF_USE_GUI_MODULE
5#include <QCoreApplication>
8#include "qplatformdefs.h"
18#ifdef TF_USE_GUI_MODULE
21 :
public QCoreApplication
37 bool webRootExists()
const;
38 QString publicPath()
const;
39 QString configPath()
const;
40 QString libPath()
const;
41 QString logPath()
const;
42 QString pluginPath()
const;
43 QString tmpPath()
const;
45 void setDatabaseEnvironment(
const QString &environment);
47 bool appSettingsFileExists()
const;
48 QString appSettingsFilePath()
const;
49 const QVariantMap &sqlDatabaseSettings(
int databaseId)
const;
50 int sqlDatabaseSettingsCount()
const;
53 bool cacheEnabled()
const;
54 QString cacheBackend()
const;
55 int databaseIdForCache()
const;
58 QString validationErrorMessage(
int rule)
const;
59 QByteArray internetMediaType(
const QString &ext,
bool appendCharset =
false);
60 MultiProcessingModule multiProcessingModule()
const;
62 int maxNumberOfAppServers()
const;
63 int maxNumberOfThreadsPerAppServer()
const;
64 QString routesConfigFilePath()
const;
65 QString systemLogFilePath()
const;
66 QString accessLogFilePath()
const;
67 QString sqlQueryLogFilePath()
const;
71 QThread *databaseContextMainThread()
const;
73 const QVariantMap &getConfig(
const QString &configName);
74 QVariant getConfigValue(
const QString &configName,
const QString &key,
const QVariant &defaultValue = QVariant());
75 void initializeCache();
79 void watchUnixSignal(
int sig,
bool watch =
true);
80 void ignoreUnixSignal(
int sig,
bool ignore =
true);
84 void watchConsoleSignal();
85 void ignoreConsoleSignal();
86 void watchLocalSocket();
87 static bool sendLocalCtrlMessage(
const QByteArray &msg,
int targetProcess);
90 void recvLocalSocket();
94 void timerEvent(QTimerEvent *event);
95 static int signalNumber();
98 QString _webRootAbsolutePath;
99 QString _dbEnvironment;
100 QVector<QVariantMap> _sqlSettings;
102 QVariantMap _loggerSetting;
103 QVariantMap _validationSetting;
104 QVariantMap _mediaTypes;
105 QStringConverter::Encoding _encodingInternal {QStringConverter::Utf8};
106 QStringConverter::Encoding _encodingHttp {QStringConverter::Utf8};
108 int _appServerId {-1};
110 QMap<QString, QVariantMap> _configMap;
111 int _cacheSqlDbIndex {-1};
114 static void resetSignalNumber();
127 _dbEnvironment = environment;
132#include <QAbstractNativeEventFilter>
134class T_CORE_EXPORT TNativeEventFilter :
public QAbstractNativeEventFilter {
136 virtual bool nativeEventFilter(
const QByteArray &eventType,
void *message, qintptr *);
The TDatabaseContext class is the base class of contexts for database access.
Definition tdatabasecontext.h:11
The TWebApplication class provides an event loop for TreeFrog applications.
Definition twebapplication.h:23
QString databaseEnvironment() const
Returns the database environment, which string is used to load the settings in database....
Definition twebapplication.h:44
QStringConverter::Encoding encodingForInternal() const
Definition twebapplication.h:68
void setMultiProcessingModule(MultiProcessingModule mpm)
Definition twebapplication.h:61
MultiProcessingModule
Definition twebapplication.h:26
int applicationServerId() const
Definition twebapplication.h:70
QStringConverter::Encoding encodingForHttpOutput() const
Definition twebapplication.h:69
const QVariantMap & validationSettings() const
Returns a reference to the QSettings object for settings of the validation, which file is validation....
Definition twebapplication.h:57
QString webRootPath() const
Returns the absolute path of the web root directory.
Definition twebapplication.h:36
const QVariantMap & loggerSettings() const
Returns a reference to the QSettings object for settings of the logger, which file is logger....
Definition twebapplication.h:56
void setDatabaseEnvironment(const QString &environment)
Sets the database environment to environment.
Definition twebapplication.h:125
@ Invalid
Definition tfnamespace.h:22
KvsEngine
Definition tfnamespace.h:239
@ MultiProcessingModule
Definition tfnamespace.h:143
#define T_CORE_EXPORT
Definition tdeclexport.h:28
#define T_DISABLE_COPY(Class)
Definition tdeclexport.h:37
#define T_DISABLE_MOVE(Class)
Definition tdeclexport.h:41