summaryrefslogtreecommitdiffstats
path: root/source/WebPlugin.h
blob: 22587b89249cf2483d9b2fb2797711e87649fe80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

#pragma once

struct lua_State;
struct HTTPRequest;





// tolua_begin
class cWebPlugin
{
public:
	// tolua_end
	cWebPlugin();
	virtual ~cWebPlugin();

	// tolua_begin
	virtual const AString GetWebTitle(void) const = 0;
	
	virtual AString HandleWebRequest(const 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; }

	typedef std::list< std::pair<AString, AString> > TabNameList;
	TabNameList GetTabNames(); // >> EXPORTED IN MANUALBINDINGS <<
	std::pair< AString, AString > GetTabNameForRequest(const HTTPRequest* a_Request );

private:
	TabList m_Tabs;
};  // tolua_export




clau