#ifndef HTTP_SESSION_H #define HTTP_SESSION_H #include #include "core/reference.h" #include "core/string.h" #include "core/variant.h" #include "core/threading/mutex.h" class HTTPSession : public Reference { RCPP_OBJECT(HTTPSession, Reference); public: void add(const String &key, const Variant &value); void remove(const String &key); bool has(const String &key); Variant get(const String &key); const Variant &get_const(const String &key); Object *get_object(const String &key); Ref get_reference(const String &key); int get_int(const String &key); String session_id; int id; void clear(); void reset(); std::map *get_data(); HTTPSession(); ~HTTPSession(); protected: Mutex _mutex; std::map _data; }; #endif