CppCMS

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

- File List
- File Members

session_sid.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_SID_H
9 #define CPPCMS_SESSION_SID_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 <cppcms/session_storage.h>
16
17 namespace cppcms {
18 namespace sessions {
19
20 namespace impl { class sid_generator; }
21
25 class CPPCMS_API session_sid : public session_api {
26 public:
30 session_sid(booster::shared_ptr<session_storage> s);
34 ~session_sid();
38 virtual void save(session_interface &,std::string const &data,time_t timeout,bool,bool);
42 virtual bool load(session_interface &,std::string &data,time_t &timeout);
46 virtual bool is_blocking();
50 virtual void clear(session_interface &);
51
52 private:
53
54 std::string get_new_sid();
55 bool valid_sid(std::string const &cookie,std::string &id);
56
57 struct _data;
58 booster::hold_ptr<_data> d;
59 booster::shared_ptr<session_storage> storage_;
60 };
61
62 } // sessions
63 } // cppcms
64
65
66 #endif
cppcms::sessions::session_sid
An implementation of session_api that stores the data using session_storage and unique session id...
Definition: session_sid.h:25
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
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