summaryrefslogtreecommitdiff
path: root/src/serverlist.h
diff options
context:
space:
mode:
authorproller <proller@github.com>2013-02-22 02:00:44 +0400
committerIlya Zhuravlev <zhuravlevilya@ya.ru>2013-02-22 02:04:53 +0400
commitee07c3f7cf638e854518d2cfcb9c11a64412cc72 (patch)
tree18ecc46deebf58d0a4a6ca93df6a526e2720ae69 /src/serverlist.h
parentef6b8bee07b9cefe7d463fabd199548d37ff2bee (diff)
downloadminetest-ee07c3f7cf638e854518d2cfcb9c11a64412cc72.tar.gz
minetest-ee07c3f7cf638e854518d2cfcb9c11a64412cc72.tar.bz2
minetest-ee07c3f7cf638e854518d2cfcb9c11a64412cc72.zip
new auto masterserver
Diffstat (limited to 'src/serverlist.h')
-rw-r--r--src/serverlist.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/serverlist.h b/src/serverlist.h
index a040d53e3..52549e97a 100644
--- a/src/serverlist.h
+++ b/src/serverlist.h
@@ -19,17 +19,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <iostream>
#include "config.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
{
@@ -41,6 +36,11 @@ namespace ServerList
bool insert(ServerListSpec server);
std::vector<ServerListSpec> deSerialize(std::string liststring);
std::string serialize(std::vector<ServerListSpec>);
+ std::vector<ServerListSpec> deSerializeJson(std::string liststring);
+ std::string serializeJson(std::vector<ServerListSpec>);
+ #if USE_CURL
+ void sendAnnounce(std::string action = "", u16 clients = 0);
+ #endif
} //ServerList namespace
#endif