CppCMS

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

session_api.h
1 //
3 // Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
4 //
5 // See accompanying file COPYING.TXT file for licensing details.
6 //
8 #ifndef CPPCMS_SESSION_API_H
9 #define CPPCMS_SESSION_API_H
10
11 #include <cppcms/defs.h>
12 #include <booster/noncopyable.h>
13 #include <booster/shared_ptr.h>
14 #include <string>
15
16 namespace cppcms {
17
18 class session_interface;
19
20
32 class session_api : public booster::noncopyable
33 {
34 public:
44 virtual void save(session_interface &iface,std::string const &data,time_t timeout, bool new_data, bool on_server) = 0;
45
53 virtual bool load(session_interface &iface,std::string &data,time_t &timeout) = 0;
59 virtual void clear(session_interface &iface) = 0;
60
64 virtual bool is_blocking() = 0;
65
69 virtual ~session_api() {}
70 };
71
72
76 class session_api_factory {
77 public:
82 virtual bool requires_gc() = 0;
86 virtual void gc() = 0;
87
91 virtual booster::shared_ptr<session_api> get() = 0;
92
96 virtual ~session_api_factory() {}
97 };
98
99
100 } // cppcms
101
102 #endif
cppcms::session_api::save
virtual void save(session_interface &iface, std::string const &data, time_t timeout, bool new_data, bool on_server)=0
cppcms::session_api::load
virtual bool load(session_interface &iface, std::string &data, time_t &timeout)=0
cppcms::session_api::clear
virtual void clear(session_interface &iface)=0
cppcms::session_interface
This class provides an access to an application for session management.
Definition: session_interface.h:107
cppcms::session_api::~session_api
virtual ~session_api()
Definition: session_api.h:69
cppcms
This is the namespace where all CppCMS functionality is placed.
Definition: application.h:19
cppcms::session_api_factory::~session_api_factory
virtual ~session_api_factory()
Definition: session_api.h:96
booster::shared_ptr
Definition: log.h:25
cppcms::session_api_factory
the factory object that generates custom implemented session_api objects
Definition: session_api.h:76
cppcms::session_api
This class represents the most generic implementation of session storage device.
Definition: session_api.h:32
cppcms::session_api::is_blocking
virtual bool is_blocking()=0
booster::noncopyable
This class makes impossible to copy any class derived from this one.
Definition: noncopyable.h:15