1
0
cuberite-2a/source/cWebPlugin.h
madmaxoft@gmail.com 263ce31bd6 Added plugin name to deprecation messages
Removed duplicate inheritance of m_Name in cPlugin_NewLua by making cWebPlugin interface-only

git-svn-id: http://mc-server.googlecode.com/svn/trunk@782 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-23 20:49:21 +00:00

48 lines
726 B
C++

#pragma once
struct lua_State;
struct HTTPRequest;
// tolua_begin
class cWebPlugin
{
public:
// tolua_end
cWebPlugin();
virtual ~cWebPlugin();
virtual const AString & GetName(void) const = 0;
// tolua_begin
virtual AString HandleWebRequest( HTTPRequest * a_Request ) = 0;
static AString SafeString( const AString & a_String );
//tolua_end
struct sWebPluginTab
{
std::string Title;
std::string SafeTitle;
int UserData;
};
typedef std::list< sWebPluginTab* > TabList;
TabList & GetTabs() { return m_Tabs; }
std::list< std::pair<AString, AString> > GetTabNames();
std::pair< AString, AString > GetTabNameForRequest( HTTPRequest* a_Request );
private:
TabList m_Tabs;
}; // tolua_export