summaryrefslogtreecommitdiff
path: root/tracker/common/IGameList.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /tracker/common/IGameList.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'tracker/common/IGameList.h')
-rw-r--r--tracker/common/IGameList.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/tracker/common/IGameList.h b/tracker/common/IGameList.h
new file mode 100644
index 0000000..8b7a008
--- /dev/null
+++ b/tracker/common/IGameList.h
@@ -0,0 +1,69 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================
+
+#ifndef IGAMELIST_H
+#define IGAMELIST_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+struct serveritem_t;
+#include "FindSteamServers.h"
+
+#define EMPTY_SERVER_NAME "0.0.0.0:0"
+
+//-----------------------------------------------------------------------------
+// Purpose: Interface to accessing a game list
+//-----------------------------------------------------------------------------
+class IGameList
+{
+public:
+
+ enum InterfaceItem_e
+ {
+ FILTERS,
+ GETNEWLIST,
+ ADDSERVER,
+ ADDCURRENTSERVER,
+ };
+
+ // returns true if the game list supports the specified ui elements
+ virtual bool SupportsItem(InterfaceItem_e item) = 0;
+
+ // starts the servers refreshing
+ virtual void StartRefresh() = 0;
+
+ // gets a new server list
+ virtual void GetNewServerList() = 0;
+
+ // stops current refresh/GetNewServerList()
+ virtual void StopRefresh() = 0;
+
+ // returns true if the list is currently refreshing servers
+ virtual bool IsRefreshing() = 0;
+
+ // gets information about specified server
+ virtual serveritem_t &GetServer(unsigned int serverID) = 0;
+
+ // adds a new server to list
+ virtual void AddNewServer(serveritem_t &server) = 0;
+
+ // marks that server list has been fully received
+ virtual void ListReceived(bool moreAvailable, const char *lastUniqueIP, ESteamServerType serverType) = 0;
+
+ // called when Connect button is pressed
+ virtual void OnBeginConnect() = 0;
+
+ // reapplies filters
+ virtual void ApplyFilters() = 0;
+
+ // invalid server index
+ virtual int GetInvalidServerListID() = 0;
+};
+
+
+#endif // IGAMELIST_H