ChipMaster's trial hacks on C++CMS starting with v1.2.1. Not sure I'll follow on with the v2 since it looks to be breaking and mostly frivolous.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

81 lines
2.1 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
  4. //
  5. // See accompanying file COPYING.TXT file for licensing details.
  6. //
  7. ///////////////////////////////////////////////////////////////////////////////
  8. #ifndef CPPCMS_SERVICE_IMPL_H
  9. #define CPPCMS_SERVICE_IMPL_H
  10. #include <cppcms/json.h>
  11. #include <cppcms/localization.h>
  12. #include <booster/aio/io_service.h>
  13. #include <booster/aio/stream_socket.h>
  14. #include <booster/shared_ptr.h>
  15. #include <booster/auto_ptr_inc.h>
  16. namespace cppcms {
  17. class service;
  18. class applications_pool;
  19. class application;
  20. class thread_pool;
  21. class session_pool;
  22. namespace plugin { class scope; }
  23. namespace impl {
  24. struct cached_settings;
  25. class prefork_acceptor;
  26. namespace cgi {
  27. class acceptor;
  28. }
  29. class service : public booster::noncopyable {
  30. public:
  31. service();
  32. ~service();
  33. booster::aio::io_service &get_io_service()
  34. {
  35. return *io_service_;
  36. }
  37. private:
  38. friend class cppcms::service;
  39. std::auto_ptr<booster::aio::io_service> io_service_;
  40. std::vector<booster::shared_ptr<cgi::acceptor> > acceptors_;
  41. #ifndef CPPCMS_WIN32
  42. std::auto_ptr<prefork_acceptor> prefork_acceptor_;
  43. #endif
  44. std::auto_ptr<json::value> settings_;
  45. std::auto_ptr<applications_pool> applications_pool_;
  46. std::auto_ptr<thread_pool> thread_pool_;
  47. std::auto_ptr<locale::generator> locale_generator_;
  48. std::auto_ptr<views::manager> views_pool_;
  49. std::auto_ptr<cache_pool> cache_pool_;
  50. std::auto_ptr<session_pool> session_pool_;
  51. std::auto_ptr<cppcms::forwarder> forwarder_;
  52. std::auto_ptr<impl::cached_settings> cached_settings_;
  53. std::locale default_locale_;
  54. std::vector<booster::function<void()> > on_fork_;
  55. int id_;
  56. booster::aio::native_type notification_socket_;
  57. std::auto_ptr<booster::aio::stream_socket> sig_,breaker_;
  58. std::vector<std::string> args_;
  59. booster::hold_ptr<plugin::scope> plugins_;
  60. };
  61. }
  62. } // cppcms
  63. #endif