Files
yacreader/YACReaderLibrary/server/static.h
luisangelsm 3709b6e737
Some checks failed
Build / Initialization (push) Has been cancelled
Build / Code Format Validation (push) Has been cancelled
Build / Linux (Qt6) (push) Has been cancelled
Build / Linux (Qt6 + 7zip) (push) Has been cancelled
Build / macOS (Qt6 Universal) (push) Has been cancelled
Build / Windows x64 (Qt6) (push) Has been cancelled
Build / Windows ARM64 (Qt6) (push) Has been cancelled
Build / Docker amd64 Image (push) Has been cancelled
Build / Docker arm64 Image (push) Has been cancelled
Build / Publish Dev Builds (push) Has been cancelled
Build / Publish Release (push) Has been cancelled
Build / Publish YACReader10 Pre-release Builds (push) Has been cancelled
Format includes using clang-format
2026-03-13 18:21:38 +01:00

58 lines
1.5 KiB
C++

/**
@file
@author Stefan Frings
*/
#ifndef STATIC_H
#define STATIC_H
#include "staticfilecontroller.h"
#include "yacreader_http_session_store.h"
#include <QString>
/**
This class contains some static resources that are used by the application.
*/
class Static
{
public:
/**
Search the main config file and return its full path.
On the first call, the INI file gets searched. If not found,
the application aborts with an error message.
<p>
The filename is the applications name plus the ending ".ini". It is searched
in the following directories:
- Same directory as the applications executable file
- In ../etc relative to the applications executable file
- In ../../etc relative to the applications executable file
- In /etc/xdg/{organisation name} on the root drive
- In /etc/opt on the root drive
- In /etc on the root drive
*/
static QString getConfigFileName();
/**
Gets the directory where the main config file is located.
On the first call, the INI file gets searched. If not found,
the application aborts with an error message.
@see getConfigFileName()
*/
static QString getConfigDir();
static YACReaderHttpSessionStore *yacreaderSessionStore;
/** Controller for static files */
static stefanfrings::StaticFileController *staticFileController;
private:
/** Directory of the main config file */
static QString configDir;
};
#endif // STATIC_H