Fixed GetHTMLEscapedString() binding, removed obsolete memory function from API.
This commit is contained in:
parent
b571294b6e
commit
5174d9cbd6
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
** Lua binding: AllToLua
|
** Lua binding: AllToLua
|
||||||
** Generated automatically by tolua++-1.0.92 on 10/20/13 13:59:04.
|
** Generated automatically by tolua++-1.0.92 on 10/21/13 13:17:19.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
|
@ -19164,34 +19164,6 @@ static int tolua_set_sWebAdminPage_TabName(lua_State* tolua_S)
|
||||||
}
|
}
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
#endif //#ifndef TOLUA_DISABLE
|
||||||
|
|
||||||
/* method: GetMemoryUsage of class cWebAdmin */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_AllToLua_cWebAdmin_GetMemoryUsage00
|
|
||||||
static int tolua_AllToLua_cWebAdmin_GetMemoryUsage00(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_Error tolua_err;
|
|
||||||
if (
|
|
||||||
!tolua_isusertable(tolua_S,1,"cWebAdmin",0,&tolua_err) ||
|
|
||||||
!tolua_isnoobj(tolua_S,2,&tolua_err)
|
|
||||||
)
|
|
||||||
goto tolua_lerror;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
{
|
|
||||||
int tolua_ret = (int) cWebAdmin::GetMemoryUsage();
|
|
||||||
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'GetMemoryUsage'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: GetPage of class cWebAdmin */
|
/* method: GetPage of class cWebAdmin */
|
||||||
#ifndef TOLUA_DISABLE_tolua_AllToLua_cWebAdmin_GetPage00
|
#ifndef TOLUA_DISABLE_tolua_AllToLua_cWebAdmin_GetPage00
|
||||||
static int tolua_AllToLua_cWebAdmin_GetPage00(lua_State* tolua_S)
|
static int tolua_AllToLua_cWebAdmin_GetPage00(lua_State* tolua_S)
|
||||||
|
@ -19310,7 +19282,7 @@ static int tolua_AllToLua_cWebAdmin_GetHTMLEscapedString00(lua_State* tolua_S)
|
||||||
#ifndef TOLUA_RELEASE
|
#ifndef TOLUA_RELEASE
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
if (
|
if (
|
||||||
!tolua_isusertype(tolua_S,1,"cWebAdmin",0,&tolua_err) ||
|
!tolua_isusertable(tolua_S,1,"cWebAdmin",0,&tolua_err) ||
|
||||||
!tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
|
!tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
|
||||||
!tolua_isnoobj(tolua_S,3,&tolua_err)
|
!tolua_isnoobj(tolua_S,3,&tolua_err)
|
||||||
)
|
)
|
||||||
|
@ -19318,13 +19290,9 @@ static int tolua_AllToLua_cWebAdmin_GetHTMLEscapedString00(lua_State* tolua_S)
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
cWebAdmin* self = (cWebAdmin*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
const AString a_Input = ((const AString) tolua_tocppstring(tolua_S,2,0));
|
const AString a_Input = ((const AString) tolua_tocppstring(tolua_S,2,0));
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHTMLEscapedString'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
AString tolua_ret = (AString) self->GetHTMLEscapedString(a_Input);
|
AString tolua_ret = (AString) cWebAdmin::GetHTMLEscapedString(a_Input);
|
||||||
tolua_pushcppstring(tolua_S,(const char*)tolua_ret);
|
tolua_pushcppstring(tolua_S,(const char*)tolua_ret);
|
||||||
tolua_pushcppstring(tolua_S,(const char*)a_Input);
|
tolua_pushcppstring(tolua_S,(const char*)a_Input);
|
||||||
}
|
}
|
||||||
|
@ -31010,7 +30978,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
|
||||||
tolua_endmodule(tolua_S);
|
tolua_endmodule(tolua_S);
|
||||||
tolua_cclass(tolua_S,"cWebAdmin","cWebAdmin","cHTTPServer::cCallbacks",NULL);
|
tolua_cclass(tolua_S,"cWebAdmin","cWebAdmin","cHTTPServer::cCallbacks",NULL);
|
||||||
tolua_beginmodule(tolua_S,"cWebAdmin");
|
tolua_beginmodule(tolua_S,"cWebAdmin");
|
||||||
tolua_function(tolua_S,"GetMemoryUsage",tolua_AllToLua_cWebAdmin_GetMemoryUsage00);
|
|
||||||
tolua_function(tolua_S,"GetPage",tolua_AllToLua_cWebAdmin_GetPage00);
|
tolua_function(tolua_S,"GetPage",tolua_AllToLua_cWebAdmin_GetPage00);
|
||||||
tolua_function(tolua_S,"GetDefaultPage",tolua_AllToLua_cWebAdmin_GetDefaultPage00);
|
tolua_function(tolua_S,"GetDefaultPage",tolua_AllToLua_cWebAdmin_GetDefaultPage00);
|
||||||
tolua_function(tolua_S,"GetBaseURL",tolua_AllToLua_cWebAdmin_GetBaseURL00);
|
tolua_function(tolua_S,"GetBaseURL",tolua_AllToLua_cWebAdmin_GetBaseURL00);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
** Lua binding: AllToLua
|
** Lua binding: AllToLua
|
||||||
** Generated automatically by tolua++-1.0.92 on 10/20/13 13:59:05.
|
** Generated automatically by tolua++-1.0.92 on 10/21/13 13:17:20.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported function */
|
/* Exported function */
|
||||||
|
|
|
@ -270,7 +270,7 @@ void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPReque
|
||||||
Content += "\n<p><a href='" + BaseURL + "'>Go back</a></p>";
|
Content += "\n<p><a href='" + BaseURL + "'>Go back</a></p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
int MemUsageKiB = GetMemoryUsage();
|
int MemUsageKiB = cRoot::GetPhysicalRAMUsage();
|
||||||
if (MemUsageKiB > 0)
|
if (MemUsageKiB > 0)
|
||||||
{
|
{
|
||||||
ReplaceString(Template, "{MEM}", Printf("%.02f", (double)MemUsageKiB / 1024));
|
ReplaceString(Template, "{MEM}", Printf("%.02f", (double)MemUsageKiB / 1024));
|
||||||
|
@ -446,16 +446,6 @@ AString cWebAdmin::GetBaseURL(const AStringVector & a_URLSplit)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int cWebAdmin::GetMemoryUsage(void)
|
|
||||||
{
|
|
||||||
LOGWARNING("%s: This function is obsolete, use cRoot::GetPhysicalRAMUsage() or cRoot::GetVirtualRAMUsage() instead", __FUNCTION__);
|
|
||||||
return cRoot::GetPhysicalRAMUsage();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cWebAdmin::OnRequestBegun(cHTTPConnection & a_Connection, cHTTPRequest & a_Request)
|
void cWebAdmin::OnRequestBegun(cHTTPConnection & a_Connection, cHTTPRequest & a_Request)
|
||||||
{
|
{
|
||||||
const AString & URL = a_Request.GetURL();
|
const AString & URL = a_Request.GetURL();
|
||||||
|
|
|
@ -118,26 +118,25 @@ public:
|
||||||
void RemovePlugin( cWebPlugin* a_Plugin );
|
void RemovePlugin( cWebPlugin* a_Plugin );
|
||||||
|
|
||||||
// TODO: Convert this to the auto-locking callback mechanism used for looping players in worlds and such
|
// TODO: Convert this to the auto-locking callback mechanism used for looping players in worlds and such
|
||||||
PluginList GetPlugins() const { return m_Plugins; } // >> EXPORTED IN MANUALBINDINGS <<
|
PluginList GetPlugins() const { return m_Plugins; } // >> EXPORTED IN MANUALBINDINGS <<
|
||||||
|
|
||||||
// tolua_begin
|
// tolua_begin
|
||||||
|
|
||||||
/// Returns the amount of currently used memory, in KiB, or -1 if it cannot be queried
|
sWebAdminPage GetPage(const HTTPRequest & a_Request);
|
||||||
static int GetMemoryUsage(void);
|
|
||||||
|
|
||||||
sWebAdminPage GetPage(const HTTPRequest& a_Request);
|
|
||||||
|
|
||||||
/// Returns the contents of the default page - the list of plugins and players
|
/// Returns the contents of the default page - the list of plugins and players
|
||||||
AString GetDefaultPage(void);
|
AString GetDefaultPage(void);
|
||||||
|
|
||||||
AString GetBaseURL(const AString& a_URL);
|
/// Returns the prefix needed for making a link point to the webadmin root from the given URL ("../../../webadmin"-style)
|
||||||
|
AString GetBaseURL(const AString & a_URL);
|
||||||
|
|
||||||
// Escapes text passed into it, so it can be embedded into html.
|
/// Escapes text passed into it, so it can be embedded into html.
|
||||||
AString GetHTMLEscapedString( const AString& a_Input );
|
static AString GetHTMLEscapedString(const AString & a_Input);
|
||||||
|
|
||||||
// tolua_end
|
// tolua_end
|
||||||
|
|
||||||
AString GetBaseURL(const AStringVector& a_URLSplit);
|
/// Returns the prefix needed for making a link point to the webadmin root from the given URL ("../../../webadmin"-style)
|
||||||
|
AString GetBaseURL(const AStringVector& a_URLSplit);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Common base class for request body data handlers
|
/// Common base class for request body data handlers
|
||||||
|
|
Loading…
Reference in New Issue
Block a user