C++ Web Framework  3.0
Public Member Functions | List of all members
Configuration Class Reference

All classes of C++ Web Framework are contained within the namespace CWF. More...

#include <configuration.h>

Public Member Functions

 Configuration (const QString &serverFilesPath="")
 Will make reading the CPPWeb.ini file and extract all of its properties. More...
 
int getTimeOut () const noexcept
 Returns the timeOut property that will be used by the server to expire threads that are not in use. Such threads will be restarted as needed. The default timeOut is 30000 milliseconds (30 seconds). If timeOut is negative, newly created threads will not expire, e.g., they will not exit until the thread pool is destroyed. More...
 
int getSessionExpirationTime () const noexcept
 Returns the Session Expiration Time. More...
 
int getCleanupInterval () const noexcept
 Returns the clean up interval Time. More...
 
int getPort () const noexcept
 Returns the port number. More...
 
QHostAddress getHost () const noexcept
 Returns the address. More...
 
int getMaxThread () const noexcept
 Returns the max thread number. More...
 
QString getSslKeyFile () const noexcept
 Returns the ssl key file. More...
 
QString getSslCertFile () const noexcept
 Returns the ssl cert file. More...
 
QString getPath () const noexcept
 Returns the path to the server's folder. More...
 
QString getLogFilePath () const noexcept
 Returns the log file path. More...
 
qint64 getMaxUploadFile () const noexcept
 Returns max upload file size supported by the server. More...
 
qint64 getMaxLogFile () const noexcept
 getMaxLogFile the max file log More...
 
QString getIndexPage () const noexcept
 Returns the index page. More...
 
bool getAccessServerPages () const noexcept
 Returns the access server page. More...
 
QByteArray getSslPassPhrase () const noexcept
 Returns the ssl pass phrase. More...
 
bool isValid () const noexcept
 Returns true if the Configuration is ok. Otherwise returns false. More...
 
QSsl::KeyAlgorithm getSslKeyAlgorithm () const noexcept
 Returns the SSL Key Algorithm. The RSA is defined by default. More...
 
QSsl::KeyType getSslKeyType () const noexcept
 Returns the SSL Key Type. The private is defined by default. More...
 
QSsl::EncodingFormat getSslEncodingFormat () const noexcept
 Returns the SSL Encoding Format. The PEM is defined by default. More...
 
QSslSocket::PeerVerifyMode getSslPeerVerifyMode () const noexcept
 Returns the SSL Peer Veryfy Mode. The VerifyNone is defined by default. More...
 
QSsl::SslProtocol getSslProtocol () const noexcept
 Returns the SSL Protocol. The TlsV1SslV3 is defined by default. More...
 

Detailed Description

All classes of C++ Web Framework are contained within the namespace CWF.

This class is responsable to read a ini file and extract its information.

Constructor & Destructor Documentation

◆ Configuration()

CWF_BEGIN_NAMESPACE Configuration::Configuration ( const QString &  serverFilesPath = "")
explicit

Will make reading the CPPWeb.ini file and extract all of its properties.

Parameters
QStringserverFilesPath : You should always points to the directory server.
Example
#include <QCoreApplication>
#include <cwf/cppwebapplication.h>
int main(int argc, char *argv[])
{
CWF::CppWebApplication a(argc, argv, "PATH_TO_SERVER_FOLDER");
return a.start();
}

Member Function Documentation

◆ getAccessServerPages()

bool Configuration::getAccessServerPages ( ) const
inlinenoexcept

Returns the access server page.

Returns
bool : Access server pages.

◆ getCleanupInterval()

int Configuration::getCleanupInterval ( ) const
inlinenoexcept

Returns the clean up interval Time.

Parameters
int: Time in milliseconds.

◆ getHost()

QHostAddress Configuration::getHost ( ) const
inlinenoexcept

Returns the address.

Parameters
QHostAddress: host.

◆ getIndexPage()

QString Configuration::getIndexPage ( ) const
inlinenoexcept

Returns the index page.

Returns
QString : index page name.

◆ getLogFilePath()

QString Configuration::getLogFilePath ( ) const
inlinenoexcept

Returns the log file path.

Parameters
QString: log file.

◆ getMaxLogFile()

qint64 Configuration::getMaxLogFile ( ) const
inlinenoexcept

getMaxLogFile the max file log

Returns
qint64 : Max file log in bytes.

◆ getMaxThread()

int Configuration::getMaxThread ( ) const
inlinenoexcept

Returns the max thread number.

Parameters
int: max.

◆ getMaxUploadFile()

qint64 Configuration::getMaxUploadFile ( ) const
inlinenoexcept

Returns max upload file size supported by the server.

Parameters
qint64max file size.

◆ getPath()

QString Configuration::getPath ( ) const
inlinenoexcept

Returns the path to the server's folder.

Parameters
QString: path.

◆ getPort()

int Configuration::getPort ( ) const
inlinenoexcept

Returns the port number.

Parameters
int: port.

◆ getSessionExpirationTime()

int Configuration::getSessionExpirationTime ( ) const
inlinenoexcept

Returns the Session Expiration Time.

Parameters
int: Time in milliseconds.

◆ getSslCertFile()

QString Configuration::getSslCertFile ( ) const
inlinenoexcept

Returns the ssl cert file.

Parameters
QString: sslCertFile name.

◆ getSslEncodingFormat()

QSsl::EncodingFormat Configuration::getSslEncodingFormat ( ) const
inlinenoexcept

Returns the SSL Encoding Format. The PEM is defined by default.

Parameters
QSsl::EncodingFormat: SSL key Encoding Format.

◆ getSslKeyAlgorithm()

QSsl::KeyAlgorithm Configuration::getSslKeyAlgorithm ( ) const
inlinenoexcept

Returns the SSL Key Algorithm. The RSA is defined by default.

Parameters
QSsl::KeyAlgorithm: SSL key Algorithm.

◆ getSslKeyFile()

QString Configuration::getSslKeyFile ( ) const
inlinenoexcept

Returns the ssl key file.

Parameters
QString: sslKeyFile name.

◆ getSslKeyType()

QSsl::KeyType Configuration::getSslKeyType ( ) const
inlinenoexcept

Returns the SSL Key Type. The private is defined by default.

Parameters
QSsl::KeyType: SSL key Type.

◆ getSslPassPhrase()

QByteArray Configuration::getSslPassPhrase ( ) const
inlinenoexcept

Returns the ssl pass phrase.

Returns
QByteArray : sslPassPhrase.

◆ getSslPeerVerifyMode()

QSslSocket::PeerVerifyMode Configuration::getSslPeerVerifyMode ( ) const
inlinenoexcept

Returns the SSL Peer Veryfy Mode. The VerifyNone is defined by default.

Parameters
QSslSocket::PeerVerifyMode: Peer Veryfy Mode;

◆ getSslProtocol()

QSsl::SslProtocol Configuration::getSslProtocol ( ) const
inlinenoexcept

Returns the SSL Protocol. The TlsV1SslV3 is defined by default.

Parameters
QSsl::SslProtocol: SSL Protocol;

◆ getTimeOut()

int Configuration::getTimeOut ( ) const
inlinenoexcept

Returns the timeOut property that will be used by the server to expire threads that are not in use. Such threads will be restarted as needed. The default timeOut is 30000 milliseconds (30 seconds). If timeOut is negative, newly created threads will not expire, e.g., they will not exit until the thread pool is destroyed.

Parameters
int: Time in milliseconds.

◆ isValid()

bool Configuration::isValid ( ) const
inlinenoexcept

Returns true if the Configuration is ok. Otherwise returns false.

Parameters
bool: is valid.

The documentation for this class was generated from the following files: