CppCMS

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

- File List
- File Members

session_dual.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_DUAL_H
9 #define CPPCMS_SESSION_DUAL_H
10
11 #include <cppcms/session_api.h>
12 #include <cppcms/defs.h>
13 #include <booster/hold_ptr.h>
14 #include <booster/shared_ptr.h>
15 #include <booster/auto_ptr_inc.h>
16
17 namespace cppcms {
18 namespace sessions {
19
20 class session_storage;
21 class session_sid;
22 class session_cookies;
23 class encryptor;
24
28 class CPPCMS_API session_dual : public session_api {
29 public:
35 session_dual( std::auto_ptr<encryptor> enc,
36 booster::shared_ptr<session_storage> storage,
37 size_t data_size_limit);
41 virtual ~session_dual();
45 virtual void save(session_interface &,std::string const &data,time_t timeout,bool new_session,bool on_server);
49 virtual bool load(session_interface &,std::string &data,time_t &timeout);
53 virtual void clear(session_interface &);
54
58 virtual bool is_blocking();
59 private:
60 struct _data;
61 booster::hold_ptr<_data> d;
62 booster::shared_ptr<session_cookies> client_;
63 booster::shared_ptr<session_sid> server_;
64 size_t data_size_limit_;
65 };
66
67 } // sessions
68 } // cppcms
69
70
71 #endif
booster::hold_ptr< _data >
cppcms::session_interface
This class provides an access to an application for session management.
Definition: session_interface.h:107
cppcms
This is the namespace where all CppCMS functionality is placed.
Definition: application.h:19
cppcms::sessions::session_dual
Client and Server side storage implementation of session_api.
Definition: session_dual.h:28
booster::shared_ptr
Definition: log.h:25
cppcms::session_api
This class represents the most generic implementation of session storage device.
Definition: session_api.h:32