X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fserverlist.h;h=4a0bd5efacef66b524cbd38b7f967dd174a20d58;hb=d82d18bfb1a51e0f2f0a89999474e98890addf7e;hp=a040d53e30ce1f5c1367d9fcf740e39d78e561d9;hpb=6f93c01af942d75db105eac6afcd7d477967ccb6;p=minetest.git diff --git a/src/serverlist.h b/src/serverlist.h index a040d53e3..4a0bd5efa 100644 --- a/src/serverlist.h +++ b/src/serverlist.h @@ -1,6 +1,6 @@ /* -Minetest-c55 -Copyright (C) 2011 celeron55, Perttu Ahola +Minetest +Copyright (C) 2013 celeron55, Perttu Ahola 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,21 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include "config.h" +#include "content/mods.h" +#include -#ifndef SERVERLIST_HEADER -#define SERVERLIST_HEADER - -struct ServerListSpec -{ - std::string name; - std::string address; - std::string port; - std::string description; -}; +#pragma once namespace ServerList { - std::vector getLocal(); - #if USE_CURL - std::vector getOnline(); - #endif - bool deleteEntry(ServerListSpec server); - bool insert(ServerListSpec server); - std::vector deSerialize(std::string liststring); - std::string serialize(std::vector); -} //ServerList namespace - +#if USE_CURL +enum AnnounceAction {AA_START, AA_UPDATE, AA_DELETE}; +void sendAnnounce(AnnounceAction, u16 port, + const std::vector &clients_names = std::vector(), + double uptime = 0, u32 game_time = 0, float lag = 0, + const std::string &gameid = "", const std::string &mg_name = "", + const std::vector &mods = std::vector(), + bool dedicated = false); #endif + +} // namespace ServerList