From a120507be027ba18d5443e76061b47e0c624f229 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 8 Oct 2013 20:12:34 +0200 Subject: Implemented the two memory-statistics functions in cRoot. This fixes #185. cWebAdmin::GetMemoryUsage() is accessible but deprecated (with a warning output to the screen). --- source/Root.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source/Root.h') diff --git a/source/Root.h b/source/Root.h index e5197ce2b..2b15d3461 100644 --- a/source/Root.h +++ b/source/Root.h @@ -105,8 +105,18 @@ public: /// Finds a player from a partial or complete player name and calls the callback - case-insensitive bool FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS << + // tolua_begin + /// Returns the textual description of the protocol version: 49 -> "1.4.4". Provided specifically for Lua API - static AString GetProtocolVersionTextFromInt(int a_ProtocolVersionNum); // tolua_export + static AString GetProtocolVersionTextFromInt(int a_ProtocolVersionNum); + + /// Returns the amount of virtual RAM used, in KiB. Returns a negative number on error + static int GetVirtualRAMUsage(void); + + /// Returns the amount of virtual RAM used, in KiB. Returns a negative number on error + static int GetPhysicalRAMUsage(void); + + // tolua_end private: class cCommand -- cgit v1.2.3