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