00001 00002 // Program Name: htmlserver.h 00003 // Created : Mar. 9, 2011 00004 // 00005 // Purpose : Http server extension to serve up static html content 00006 // 00007 // Copyright (c) 2011 David Blain <dblain@mythtv.org> 00008 // 00009 // Licensed under the GPL v2 or later, see COPYING for details 00010 // 00012 00013 #ifndef __HTMLSERVER_H__ 00014 #define __HTMLSERVER_H__ 00015 00016 #include "httpserver.h" 00017 #include "serverSideScripting.h" 00018 00021 // 00022 // HtmlExtension Class Definition 00023 // 00026 00027 class UPNP_PUBLIC HtmlServerExtension : public HttpServerExtension 00028 { 00029 private: 00030 00031 QString m_sAbsoluteSharePath; 00032 ServerSideScripting m_Scripting; 00033 QString m_IndexFilename; 00034 00035 public: 00036 HtmlServerExtension( const QString sSharePath, 00037 const QString sApplicationPrefix); 00038 virtual ~HtmlServerExtension( ); 00039 00040 // Special case, this extension is called if no other extension 00041 // processes the request. 00042 00043 virtual QStringList GetBasePaths() { return QStringList(); } 00044 00045 bool ProcessRequest( HTTPRequest *pRequest ); 00046 00047 QScriptEngine* ScriptEngine() 00048 { 00049 return &(m_Scripting.m_engine); 00050 } 00051 00052 }; 00053 00054 #endif
1.6.3