forked from artyom-beilis/cppcms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservice_impl.h
80 lines (63 loc) · 2.09 KB
/
service_impl.h
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <[email protected]>
//
// See accompanying file COPYING.TXT file for licensing details.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef CPPCMS_SERVICE_IMPL_H
#define CPPCMS_SERVICE_IMPL_H
#include <cppcms/json.h>
#include <cppcms/localization.h>
#include <booster/aio/io_service.h>
#include <booster/aio/stream_socket.h>
#include <booster/shared_ptr.h>
#include <booster/auto_ptr_inc.h>
namespace cppcms {
class service;
class applications_pool;
class application;
class thread_pool;
class session_pool;
namespace plugin { class scope; }
namespace impl {
struct cached_settings;
class prefork_acceptor;
namespace cgi {
class acceptor;
}
class service : public booster::noncopyable {
public:
service();
~service();
booster::aio::io_service &get_io_service()
{
return *io_service_;
}
private:
friend class cppcms::service;
std::auto_ptr<booster::aio::io_service> io_service_;
std::vector<booster::shared_ptr<cgi::acceptor> > acceptors_;
#ifndef CPPCMS_WIN32
std::auto_ptr<prefork_acceptor> prefork_acceptor_;
#endif
std::auto_ptr<json::value> settings_;
std::auto_ptr<applications_pool> applications_pool_;
std::auto_ptr<thread_pool> thread_pool_;
std::auto_ptr<locale::generator> locale_generator_;
std::auto_ptr<views::manager> views_pool_;
std::auto_ptr<cache_pool> cache_pool_;
std::auto_ptr<session_pool> session_pool_;
std::auto_ptr<cppcms::forwarder> forwarder_;
std::auto_ptr<impl::cached_settings> cached_settings_;
std::locale default_locale_;
std::vector<booster::function<void()> > on_fork_;
int id_;
booster::aio::native_type notification_socket_;
std::auto_ptr<booster::aio::stream_socket> sig_,breaker_;
std::vector<std::string> args_;
booster::hold_ptr<plugin::scope> plugins_;
};
}
} // cppcms
#endif