summaryrefslogtreecommitdiff
path: root/src/serverlist.h
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-02-28 18:03:28 +0100
committerWeblate <42@minetest.ru>2013-02-28 18:03:28 +0100
commit22e186b4aa88b585e71500c4e9a03bf69b0b6191 (patch)
tree14c5b7a73cf144ba7cf3066caac088a200f81a72 /src/serverlist.h
parent372acf7b8eca0614a4a0da93cfbaccbcd459b36b (diff)
parentd31f07bd4b83f858cce589faac56922e12ba670f (diff)
downloadminetest-22e186b4aa88b585e71500c4e9a03bf69b0b6191.tar.gz
minetest-22e186b4aa88b585e71500c4e9a03bf69b0b6191.tar.bz2
minetest-22e186b4aa88b585e71500c4e9a03bf69b0b6191.zip
Merge remote branch 'origin/master'
Diffstat (limited to 'src/serverlist.h')
-rw-r--r--src/serverlist.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/serverlist.h b/src/serverlist.h
index a040d53e3..e81e64c5b 100644
--- a/src/serverlist.h
+++ b/src/serverlist.h
@@ -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,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