mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 16:57:16 +01:00
4a6bfc086c
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
57 lines
1.1 KiB
C++
57 lines
1.1 KiB
C++
//
|
|
// ApacheApplication.h
|
|
//
|
|
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#ifndef ApacheConnector_ApacheApplication_INCLUDED
|
|
#define ApacheConnector_ApacheApplication_INCLUDED
|
|
|
|
|
|
#include "ApacheRequestHandlerFactory.h"
|
|
#include "Poco/Util/Application.h"
|
|
#include "Poco/Mutex.h"
|
|
|
|
|
|
class ApacheApplication: public Poco::Util::Application
|
|
{
|
|
public:
|
|
ApacheApplication();
|
|
/// Creates the ApacheApplication and sets the
|
|
/// ApacheChannel as the root logger channel.
|
|
|
|
~ApacheApplication();
|
|
/// Destroys the ApacheApplication.
|
|
|
|
void setup();
|
|
/// Initializes the application if called for the first
|
|
/// time; does nothing in later calls.
|
|
|
|
ApacheRequestHandlerFactory& factory();
|
|
/// Returns the ApacheRequestHandlerFactory.
|
|
|
|
static ApacheApplication& instance();
|
|
/// Returns the application instance.
|
|
|
|
private:
|
|
bool _ready;
|
|
ApacheRequestHandlerFactory _factory;
|
|
Poco::FastMutex _mutex;
|
|
};
|
|
|
|
|
|
//
|
|
// inlines
|
|
//
|
|
inline ApacheRequestHandlerFactory& ApacheApplication::factory()
|
|
{
|
|
return _factory;
|
|
}
|
|
|
|
|
|
#endif // ApacheConnector_ApacheApplication_INCLUDED
|