session_dual.h
//
// Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
//
// See accompanying file COPYING.TXT file for licensing details.
//
#ifndef CPPCMS_SESSION_DUAL_H
#define CPPCMS_SESSION_DUAL_H
#include <cppcms/session_api.h>
#include <cppcms/defs.h>
#include <booster/hold_ptr.h>
#include <booster/shared_ptr.h>
#include <memory>
namespace cppcms {
namespace sessions {
class session_storage;
class session_sid;
class session_cookies;
class encryptor;
class CPPCMS_API session_dual : public session_api {
public:
session_dual( std::auto_ptr<encryptor> enc,
booster::shared_ptr<session_storage> storage,
size_t data_size_limit);
virtual ~session_dual();
virtual void save(session_interface &,std::string const &data,time_t timeout,bool new_session,bool on_server);
virtual bool load(session_interface &,std::string &data,time_t &timeout);
virtual void clear(session_interface &);
virtual bool is_blocking();
private:
struct _data;
booster::hold_ptr<_data> d;
booster::shared_ptr<session_cookies> client_;
booster::shared_ptr<session_sid> server_;
size_t data_size_limit_;
};
} // sessions
} // cppcms
#endif
booster::hold_ptr< _data >
cppcms::session_interface
This class provides an access to an application for session management.
Definition: session_interface.h:69
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