Fix only one texture being updated on window resize breaking sidebyside and topbottom...
[oweals/minetest.git] / src / serverlist.h
index a040d53e30ce1f5c1367d9fcf740e39d78e561d9..aa3f1d6104f6d31a2bcc7a78580cf82245b17958 100644 (file)
@@ -1,6 +1,6 @@
 /*
-Minetest-c55
-Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
+Minetest
+Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
@@ -19,28 +19,31 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include <iostream>
 #include "config.h"
+#include "mods.h"
+#include "json/json.h"
 
 #ifndef SERVERLIST_HEADER
 #define SERVERLIST_HEADER
 
-struct ServerListSpec
-{
-       std::string name;
-       std::string address;
-       std::string port;
-       std::string description;
-};
+typedef Json::Value ServerListSpec;
 
 namespace ServerList
 {
        std::vector<ServerListSpec> getLocal();
-       #if USE_CURL
        std::vector<ServerListSpec> getOnline();
+       bool deleteEntry(const ServerListSpec &server);
+       bool insert(const ServerListSpec &server);
+       std::vector<ServerListSpec> deSerialize(const std::string &liststring);
+       const std::string serialize(const std::vector<ServerListSpec> &serverlist);
+       std::vector<ServerListSpec> deSerializeJson(const std::string &liststring);
+       const std::string serializeJson(const std::vector<ServerListSpec> &serverlist);
+       #if USE_CURL
+       void sendAnnounce(const std::string &action,
+                       const std::vector<std::string> &clients_names = std::vector<std::string>(),
+                       const double uptime = 0, const u32 game_time = 0,
+                       const float lag = 0, const std::string &gameid = "",
+                       const std::vector<ModSpec> &mods = std::vector<ModSpec>());
        #endif
-       bool deleteEntry(ServerListSpec server);
-       bool insert(ServerListSpec server);
-       std::vector<ServerListSpec> deSerialize(std::string liststring);
-       std::string serialize(std::vector<ServerListSpec>);
-} //ServerList namespace
+} // ServerList namespace
 
 #endif