From f3bba7968d0048c2a7dffa4a8479ec4b353cf26b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 20 Feb 2016 09:07:50 +0100 Subject: [PATCH] yhook: move ctor/dtor to cpp Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/07b39de268f41c675d8649f7964e500b6c4251e2 Author: vanhofen Date: 2016-02-20 (Sat, 20 Feb 2016) Origin message was: ------------------ - yhook: move ctor/dtor to cpp --- src/nhttpd/yhttpd_core/yhook.cpp | 22 ++++++++++++++++++++++ src/nhttpd/yhttpd_core/yhook.h | 6 +++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/nhttpd/yhttpd_core/yhook.cpp b/src/nhttpd/yhttpd_core/yhook.cpp index b4aa79e0a..d7a46bf4b 100644 --- a/src/nhttpd/yhttpd_core/yhook.cpp +++ b/src/nhttpd/yhttpd_core/yhook.cpp @@ -13,6 +13,28 @@ #include "ylogging.h" #include "helper.h" +//============================================================================= +// Constructor & Ceconstructor +//============================================================================= +CyhookHandler::CyhookHandler() +{ + ContentLength = 0; + RangeStart = 0; + RangeEnd = -1; + cached = false; + keep_alive = 0; + _outIndent = 0; + status = HANDLED_NONE; + Method = M_UNKNOWN; + httpStatus = HTTP_NIL; + outType = plain; + LastModified=0; +} + +CyhookHandler::~CyhookHandler() +{ +} + //============================================================================= // Initialization of static variables //============================================================================= diff --git a/src/nhttpd/yhttpd_core/yhook.h b/src/nhttpd/yhttpd_core/yhook.h index f7074198b..d5556a043 100644 --- a/src/nhttpd/yhttpd_core/yhook.h +++ b/src/nhttpd/yhttpd_core/yhook.h @@ -123,6 +123,9 @@ class CyhookHandler protected: static THookList HookList; public: + CyhookHandler(); + ~CyhookHandler(); + // Output std::string yresult; // content for response output THandleStatus status; // status of Hook handling @@ -144,9 +147,6 @@ public: CStringList WebserverConfigList; // Reference (writable) to ConfigList CStringList HookVarList; // Variables in Hook-Handling passing to other Hooks THttp_Method Method; // HTTP Method (requested) - // constructor & deconstructor - CyhookHandler(){ContentLength = 0; RangeStart = 0; RangeEnd = -1; cached = false; keep_alive = 0; _outIndent = 0;status = HANDLED_NONE;Method = M_UNKNOWN;httpStatus = HTTP_NIL;outType = plain;LastModified=0;}; - virtual ~CyhookHandler(){}; // hook slot handler static void attach(Cyhook *yh) // attach a Hook-Class to HookHandler