-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHttpLoggingService
More file actions
49 lines (39 loc) · 1.26 KB
/
HttpLoggingService
File metadata and controls
49 lines (39 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Copyright (C) 2021 Frank Mertens.
*
* Distribution and use is allowed under the terms of the GNU General Public License version 3
* (see CoreComponents/LICENSE-gpl-3.0).
*
*/
#pragma once
#include <cc/HttpLoggingServiceConfigPrototype>
#include <cc/HttpLoggingServiceInstance>
namespace cc {
/** \class HttpLoggingService cc/HttpLoggingService
* \ingroup http_server
* \brief Logging service
*/
class HttpLoggingService: public Object
{
public:
/** %Create a null logging service
*/
HttpLoggingService() = default;
/** %Configuration prototype if this logging service
*/
HttpLoggingServiceConfigPrototype configPrototype() const { return me().configPrototype(); }
/** %Create a new instance of this logging service
*/
HttpLoggingServiceInstance createInstance(const MetaObject &config) const { return me().createInstance(config); }
protected:
struct State: public Object::State
{
virtual HttpLoggingServiceConfigPrototype configPrototype() const = 0;
virtual HttpLoggingServiceInstance createInstance(const MetaObject &config) const = 0;
};
HttpLoggingService(State *newState):
Object{newState}
{}
const State &me() const { return Object::me.as<State>(); }
};
} // namespace cc