From 7c6621108b54fd66fbb7aa87be067a34abcc3ced Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 30 Nov 2011 18:13:03 +0300 Subject: Add server side online players list support. --- src/gui/whoisonline.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/gui/whoisonline.h') diff --git a/src/gui/whoisonline.h b/src/gui/whoisonline.h index 72063b183..112ad35ba 100644 --- a/src/gui/whoisonline.h +++ b/src/gui/whoisonline.h @@ -65,7 +65,9 @@ class WhoIsOnline : public Window, /** * Loads and display online list from the memory buffer. */ - void loadList(); + void loadWebList(); + + void loadList(std::vector &list); void handleLink(const std::string& link, gcn::MouseEvent *event); @@ -83,6 +85,10 @@ class WhoIsOnline : public Window, void optionChanged(const std::string &name); + void updateList(std::vector &list); + + void readFromWeb(); + private: void download(); @@ -101,6 +107,13 @@ private: const std::string prepareNick(std::string nick, int level, std::string color) const; + + void updateWindow(std::vector &friends, + std::vector &neutral, + std::vector &disregard, + std::vector enemy, + int numOnline); + enum DownloadStatus { UPDATE_ERROR = 0, @@ -137,4 +150,6 @@ private: bool mUpdateOnlineList; }; +extern WhoIsOnline *whoIsOnline; + #endif -- cgit v1.2.3-70-g09d2