session_sid.h
//
// Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
//
// See accompanying file COPYING.TXT file for licensing details.
//
#ifndef CPPCMS_SESSION_SID_H
#define CPPCMS_SESSION_SID_H
#include <cppcms/session_api.h>
#include <cppcms/defs.h>
#include <booster/hold_ptr.h>
#include <booster/shared_ptr.h>
#include <cppcms/session_storage.h>
namespace cppcms {
namespace sessions {
namespace impl { class sid_generator; }
class CPPCMS_API session_sid : public session_api {
public:
session_sid(booster::shared_ptr<session_storage> s);
~session_sid();
virtual void save(session_interface &,std::string const &data,time_t timeout,bool,bool);
virtual bool load(session_interface &,std::string &data,time_t &timeout);
virtual bool is_blocking();
virtual void clear(session_interface &);
private:
std::string get_new_sid();
bool valid_sid(std::string const &cookie,std::string &id);
struct _data;
booster::hold_ptr<_data> d;
booster::shared_ptr<session_storage> storage_;
};
} // sessions
} // cppcms
#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:69
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