8 #ifndef CPPCMS_HTTP_CONTEXT_H 9 #define CPPCMS_HTTP_CONTEXT_H 11 #include <cppcms/defs.h> 12 #include <booster/hold_ptr.h> 13 #include <booster/intrusive_ptr.h> 14 #include <booster/shared_ptr.h> 15 #include <booster/enable_shared_from_this.h> 16 #include <booster/callback.h> 17 #include <booster/noncopyable.h> 24 class application_specific_pool;
25 class cache_interface;
26 class session_interface;
27 namespace json {
class value; }
28 namespace impl {
namespace cgi {
class connection; } }
56 impl::cgi::connection &connection();
100 void locale(std::locale
const &new_locale);
107 void locale(std::string
const &name);
122 void skin(std::string
const &name);
137 void complete_response();
144 void async_complete_response();
154 void async_flush_output(handler
const &h);
197 struct holder {
virtual ~holder() {} };
199 struct specific_holder :
public holder {
200 specific_holder(T *ptr) : p(ptr) {}
201 virtual ~specific_holder() {}
213 specific_holder<T> *sh=
dynamic_cast<specific_holder<T> *
>(get_holder());
229 specific_holder<T> *sh=
dynamic_cast<specific_holder<T> *
>(get_holder());
234 specific_holder<T> *sh =
new specific_holder<T>(ptr);
246 specific_holder<T> *sh=
dynamic_cast<specific_holder<T> *
>(get_holder());
255 void set_holder(holder *p);
256 holder *get_holder();
258 friend class impl::cgi::connection;
259 int on_content_progress(
size_t n);
260 int on_headers_ready();
261 int translate_exception();
262 void make_error_message(std::exception
const &e);
263 void on_request_ready(
bool error);
267 void try_restart(
bool e);
completion_type
Definition: http_context.h:125
This class is central representation of json objects.
Definition: json.h:140
a smart pointer similar to std::auto_ptr but it is non-copyable and underlying object has same constn...
Definition: hold_ptr.h:18
void reset_specific(T *ptr=0)
Definition: http_context.h:223
This class represent the central event loop of the CppCMS applications.
Definition: service.h:62
Definition: callback.h:18
This class provides an access to an application for session management.
Definition: session_interface.h:107
This is the namespace where all CppCMS functionality is placed.
Definition: application.h:19
context is a central class that holds all specific connection related information. It encapsulates CGI request and response, cache, session and locale information
Definition: http_context.h:47
T * get_specific()
Definition: http_context.h:211
intrusive_ptr is the class taken as-is from boost.
Definition: intrusive_ptr.h:42
Asynchronous operation completed successfully.
Definition: http_context.h:126
This is the main namespace that encloses all localization classes.
Definition: locale_fwd.h:14
this class represents all HTTP/CGI response related API, generation of output content and HTTP header...
Definition: http_response.h:36
This class is the major gateway of the application to CppCMS caching abilities. Any access too cache ...
Definition: cache_interface.h:139
This class is borrowed from boost.
Definition: enable_shared_from_this.h:30
T * release_specific()
Definition: http_context.h:243
This class makes impossible to copy any class derived from this one.
Definition: noncopyable.h:15
This class represents all information related to the HTTP/CGI request.
Definition: http_request.h:37