CMS 3D CMS Logo

WebInterface.h

Go to the documentation of this file.
00001 #ifndef _DQM_TrackerCommon_WebInterface_h_
00002 #define _DQM_TrackerCommon_WebInterface_h_
00003 
00004 #include "xgi/Method.h"
00005 #include "xdata/UnsignedLong.h"
00006 #include "cgicc/HTMLClasses.h"
00007 
00008 #include "xdaq/Application.h"
00009 #include "xgi/Utils.h"
00010 #include "xgi/Method.h"
00011 
00012 #include "DQM/TrackerCommon/interface/WebPage.h"
00013 #include "DQM/TrackerCommon/interface/MessageDispatcher.h"
00014 #include "DQM/TrackerCommon/interface/ME_MAP.h"
00015 
00016 #include <string>
00017 #include <map>
00018 
00019 class DQMOldReceiver;
00020 class WebInterface
00021 {
00022 
00023  private:
00024 
00025   std::string exeURL;
00026   std::string appURL;
00027   std::multimap<std::string, std::string> conf_map;
00028 
00029   MessageDispatcher msg_dispatcher;
00030 
00031  protected:
00032 
00033   DQMOldReceiver ** mui_p;
00034   WebPage * page_p;
00035 
00036  public:
00037 
00038   WebInterface(std::string _exeURL, 
00039                std::string _appURL, 
00040                DQMOldReceiver ** _mui_p)
00041     {
00042       exeURL = _exeURL;
00043       appURL = _appURL;
00044       mui_p = _mui_p;
00045       
00046 
00047       std::cout << "created a WebInterface for the DQMClient, the url = " << appURL << std::endl;
00048       std::cout << "within context = " << exeURL << std::endl;
00049     }
00050 
00051   virtual ~WebInterface() 
00052     {
00053     }
00054 
00055   std::string getContextURL()     { return exeURL; }
00056   std::string getApplicationURL() { return appURL; }
00057 
00058   void handleRequest        (xgi::Input * in, xgi::Output * out ) throw (xgi::exception::Exception);
00059   void handleStandardRequest(xgi::Input * in, xgi::Output * out ) throw (xgi::exception::Exception);
00060 
00061   virtual void handleCustomRequest(xgi::Input * in, xgi::Output * out ) throw (xgi::exception::Exception)
00062     {
00063     };
00064 
00066   virtual void Default(xgi::Input * in, xgi::Output * out ) throw (xgi::exception::Exception);
00067 
00069   void Configure(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00070   
00072   void Open(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00073 //  void Subscribe(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00074 //  void Unsubscribe(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00075 
00077   void printNavigatorXML(std::string directory, xgi::Output * out);
00078   
00080   void ContentsOpen(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00081   void printContentViewerXML(std::string current, xgi::Output * out);
00082 
00084   void printMessagesXML(xgi::Output *out);
00085 
00087   void DrawGif(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00088   void printMap(ME_MAP view_map, std::string id);
00089 
00091   void add(std::string, WebElement *);
00092 
00094   void sendMessage(std::string the_title, std::string the_text, MessageType the_type);
00095 
00096   std::string get_from_multimap(std::multimap<std::string, std::string> &mymap, std::string key);
00097 
00098 };
00099 
00100 #endif

Generated on Tue Jun 9 17:33:41 2009 for CMSSW by  doxygen 1.5.4