2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
struct lua_State;
|
|
|
|
struct HTTPRequest;
|
2012-08-23 16:49:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// tolua_begin
|
2012-06-14 09:06:06 -04:00
|
|
|
class cWebPlugin
|
|
|
|
{
|
|
|
|
public:
|
2012-08-23 16:49:21 -04:00
|
|
|
// tolua_end
|
2012-08-22 10:22:21 -04:00
|
|
|
cWebPlugin();
|
2012-06-14 09:06:06 -04:00
|
|
|
virtual ~cWebPlugin();
|
|
|
|
|
2013-01-11 23:46:01 -05:00
|
|
|
virtual const AString & GetWebTitle(void) const = 0;
|
2012-08-23 16:49:21 -04:00
|
|
|
// tolua_begin
|
|
|
|
|
|
|
|
virtual AString HandleWebRequest( HTTPRequest * a_Request ) = 0;
|
2012-08-22 10:22:21 -04:00
|
|
|
|
|
|
|
static AString SafeString( const AString & a_String );
|
2013-01-11 23:46:01 -05:00
|
|
|
// tolua_end
|
2012-06-14 09:06:06 -04:00
|
|
|
|
2012-08-22 10:22:21 -04:00
|
|
|
struct sWebPluginTab
|
|
|
|
{
|
|
|
|
std::string Title;
|
|
|
|
std::string SafeTitle;
|
|
|
|
|
|
|
|
int UserData;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::list< sWebPluginTab* > TabList;
|
|
|
|
TabList & GetTabs() { return m_Tabs; }
|
|
|
|
|
2012-08-22 19:29:15 -04:00
|
|
|
std::list< std::pair<AString, AString> > GetTabNames();
|
|
|
|
std::pair< AString, AString > GetTabNameForRequest( HTTPRequest* a_Request );
|
2012-08-22 10:22:21 -04:00
|
|
|
|
2012-06-14 09:06:06 -04:00
|
|
|
private:
|
2012-08-22 10:22:21 -04:00
|
|
|
TabList m_Tabs;
|
2012-08-23 16:49:21 -04:00
|
|
|
}; // tolua_export
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|