summaryrefslogtreecommitdiff
path: root/src/gui/whoisonline.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-30 18:13:03 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-30 20:09:16 +0300
commit7c6621108b54fd66fbb7aa87be067a34abcc3ced (patch)
tree5859964db8917a35ebb244a0114d5d3cf6578ae0 /src/gui/whoisonline.h
parent8871ef8ba38a11213de3cc7f35f5f9f0f3000dc0 (diff)
downloadmv-7c6621108b54fd66fbb7aa87be067a34abcc3ced.tar.gz
mv-7c6621108b54fd66fbb7aa87be067a34abcc3ced.tar.bz2
mv-7c6621108b54fd66fbb7aa87be067a34abcc3ced.tar.xz
mv-7c6621108b54fd66fbb7aa87be067a34abcc3ced.zip
Add server side online players list support.
Diffstat (limited to 'src/gui/whoisonline.h')
-rw-r--r--src/gui/whoisonline.h17
1 files changed, 16 insertions, 1 deletions
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<std::string> &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<std::string> &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<std::string> &friends,
+ std::vector<std::string> &neutral,
+ std::vector<std::string> &disregard,
+ std::vector<std::string> enemy,
+ int numOnline);
+
enum DownloadStatus
{
UPDATE_ERROR = 0,
@@ -137,4 +150,6 @@ private:
bool mUpdateOnlineList;
};
+extern WhoIsOnline *whoIsOnline;
+
#endif