summaryrefslogtreecommitdiff
path: root/common/ServerBrowser/IServerBrowser.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 /common/ServerBrowser/IServerBrowser.h
downloadarchived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz
archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip
Diffstat (limited to 'common/ServerBrowser/IServerBrowser.h')
-rw-r--r--common/ServerBrowser/IServerBrowser.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/common/ServerBrowser/IServerBrowser.h b/common/ServerBrowser/IServerBrowser.h
new file mode 100644
index 0000000..32d1b44
--- /dev/null
+++ b/common/ServerBrowser/IServerBrowser.h
@@ -0,0 +1,57 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef ISERVERBROWSER_H
+#define ISERVERBROWSER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "interface.h"
+
+//-----------------------------------------------------------------------------
+// Purpose: Interface to server browser module
+//-----------------------------------------------------------------------------
+abstract_class IServerBrowser
+{
+public:
+ // activates the server browser window, brings it to the foreground
+ virtual bool Activate() = 0;
+
+ // joins a game directly
+ virtual bool JoinGame( uint32 unGameIP, uint16 usGamePort, const char *pszConnectCode ) = 0;
+
+ // joins a specified game - game info dialog will only be opened if the server is fully or passworded
+ virtual bool JoinGame( uint64 ulSteamIDFriend, const char *pszConnectCode ) = 0;
+
+ // opens a game info dialog to watch the specified server; associated with the friend 'userName'
+ virtual bool OpenGameInfoDialog( uint64 ulSteamIDFriend, const char *pszConnectCode ) = 0;
+
+ // forces the game info dialog closed
+ virtual void CloseGameInfoDialog( uint64 ulSteamIDFriend ) = 0;
+
+ // closes all the game info dialogs
+ virtual void CloseAllGameInfoDialogs() = 0;
+
+ /// Given a map name, strips off some stuff and returns the "friendly" name of the map.
+ /// Returns the cleaned out map name into the caller's buffer, and returns the friendly
+ /// game type name.
+ virtual const char *GetMapFriendlyNameAndGameType( const char *pszMapName, char *szFriendlyMapName, int cchFriendlyName ) = 0;
+
+ // Enable filtering of workshop maps, requires the game/tool loading us to feed subscription data. This is a
+ // slightly ugly workaround to TF2 not yet having native workshop UI in quickplay, once that is in place this should
+ // either be stripped back out or expanded to be directly aware of the steam workshop without being managed.
+ virtual void SetWorkshopEnabled( bool bManaged ) = 0;
+ virtual void AddWorkshopSubscribedMap( const char *pszMapName ) = 0;
+ virtual void RemoveWorkshopSubscribedMap( const char *pszMapName ) = 0;
+};
+
+#define SERVERBROWSER_INTERFACE_VERSION "ServerBrowser005"
+
+
+
+#endif // ISERVERBROWSER_H