2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
struct lua_State;
|
|
|
|
struct HTTPRequest;
|
|
|
|
//tolua_begin
|
|
|
|
class cWebPlugin
|
|
|
|
{
|
|
|
|
public:
|
2012-08-22 10:22:21 -04:00
|
|
|
cWebPlugin();
|
2012-06-14 09:06:06 -04:00
|
|
|
virtual ~cWebPlugin();
|
|
|
|
|
|
|
|
void SetName( std::string a_Name ) { m_Name = a_Name; }
|
|
|
|
std::string GetName() { return m_Name; }
|
|
|
|
|
2012-08-22 10:22:21 -04:00
|
|
|
virtual std::string HandleWebRequest( HTTPRequest* a_Request ) = 0;
|
|
|
|
|
|
|
|
static AString SafeString( const AString & a_String );
|
2012-06-14 09:06:06 -04:00
|
|
|
//tolua_end
|
|
|
|
|
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; }
|
|
|
|
|
|
|
|
std::list< std::pair<std::string, std::string> > GetTabNames();
|
|
|
|
std::pair< std::string, std::string > GetTabNameForRequest( HTTPRequest* a_Request );
|
|
|
|
|
2012-06-14 09:06:06 -04:00
|
|
|
private:
|
2012-08-22 10:22:21 -04:00
|
|
|
TabList m_Tabs;
|
2012-06-14 09:06:06 -04:00
|
|
|
std::string m_Name;
|
2011-10-03 14:41:19 -04:00
|
|
|
}; //tolua_export
|