CppCMS
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:
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;
60  };
61 
62 } // sessions
63 } // cppcms
64 
65 
66 #endif
An implementation of session_api that stores the data using session_storage and unique session id...
Definition: session_sid.h:25
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
Definition: log.h:25
This class represents the most generic implementation of session storage device.
Definition: session_api.h:32