From 27ffda3b67d172afca2cb85387fad27e78719480 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 29 Mar 2022 23:28:05 +0200 Subject: Split Session from HttpServlet --- NetEx/HttpServlet.h | 54 +++++++---------------------------------------------- 1 file changed, 7 insertions(+), 47 deletions(-) (limited to 'NetEx/HttpServlet.h') diff --git a/NetEx/HttpServlet.h b/NetEx/HttpServlet.h index aedfb09..eb706ea 100644 --- a/NetEx/HttpServlet.h +++ b/NetEx/HttpServlet.h @@ -3,26 +3,21 @@ Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors Copyright (c) 1997-2006, Destroyer Studios LLC. - AUTHOR: John DiCamillo + AUTHOR: John DiCamillo - OVERVIEW - ======== - Network Server Pump for HTTP Server + OVERVIEW + ======== + Network Server Pump for HTTP Server */ - #ifndef HttpServlet_h #define HttpServlet_h -#include "HttpServer.h" - -// +-------------------------------------------------------------------+ - -class HttpServlet; -class HttpSession; +#include "HttpRequest.h" +#include "HttpResponse.h" +#include "HttpSession.h" -// +-------------------------------------------------------------------+ class HttpServlet { @@ -45,40 +40,5 @@ protected: HttpSession* session; }; -// +-------------------------------------------------------------------+ - -class HttpSession -{ -public: - static const char* TYPENAME() { return "HttpSession"; } - - HttpSession(); - virtual ~HttpSession(); - - int operator == (const HttpSession& s) const { return id == s.id; } - - Text GenerateUniqueID(); - - Text GetID() const { return id; } - void SetID(const char* i) { id = i; } - int GetLastAccess() const { return access_time;} - void Access(); - - List& GetAttributes() { return attributes; } - - Text GetAttribute(const char* name); - void SetAttribute(const char* name, const char* value); - void DelAttribute(const char* name); - - int GetIntAttribute(const char* name); - void SetIntAttribute(const char* name, int value); - void DelIntAttribute(const char* name); - -protected: - Text id; - int access_time; - List attributes; -}; - #endif // HttpServlet_h -- cgit v1.1