Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TCivetweb.h
Go to the documentation of this file.
1 // $Id$
2 // Author: Sergey Linev 21/12/2013
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TCivetweb
13 #define ROOT_TCivetweb
14 
15 #include "THttpEngine.h"
16 #include "TString.h"
17 
18 class TCivetweb : public THttpEngine {
19 protected:
20  void *fCtx{nullptr}; ///<! civetweb context
21  void *fCallbacks{nullptr}; ///<! call-back table for civetweb webserver
22  TString fTopName; ///<! name of top item
23  Bool_t fDebug{kFALSE}; ///<! debug mode
24  Bool_t fTerminating{kFALSE}; ///<! server doing shutdown and not react on requests
25  Bool_t fOnlySecured{kFALSE}; ///<! if server should run only https protocol
26  Int_t fMaxAge{3600}; ///<! max-age parameter
27 
28  virtual void Terminate() { fTerminating = kTRUE; }
29 
30  Bool_t IsSecured() const { return fOnlySecured; }
31 
32 public:
33  TCivetweb(Bool_t only_secured = kFALSE);
34  virtual ~TCivetweb();
35 
36  virtual Bool_t Create(const char *args);
37 
38  const char *GetTopName() const { return fTopName.Data(); }
39 
40  Bool_t IsDebugMode() const { return fDebug; }
41 
42  Bool_t IsTerminating() const { return fTerminating; }
43 
44  Int_t ProcessLog(const char *message);
45 
46  Int_t GetMaxAge() const { return fMaxAge; }
47 };
48 
49 #endif