Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef ADMINSERVER_H
  8. #define ADMINSERVER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "IAdminServer.h"
  13. #include "IVGuiModule.h"
  14. #include <utlvector.h>
  15. class CServerPage;
  16. //-----------------------------------------------------------------------------
  17. // Purpose: Handles the UI and pinging of a half-life game server list
  18. //-----------------------------------------------------------------------------
  19. class CAdminServer : public IAdminServer, public IVGuiModule
  20. {
  21. public:
  22. CAdminServer();
  23. ~CAdminServer();
  24. // IVGui module implementation
  25. virtual bool Initialize(CreateInterfaceFn *factorylist, int numFactories);
  26. virtual bool PostInitialize(CreateInterfaceFn *modules, int factoryCount);
  27. virtual vgui::VPANEL GetPanel();
  28. virtual bool Activate();
  29. virtual bool IsValid();
  30. virtual void Shutdown();
  31. virtual void Deactivate();
  32. virtual void Reactivate();
  33. virtual void SetParent(vgui::VPANEL parent);
  34. // IAdminServer implementation
  35. // opens a manage server dialog for a local server
  36. virtual ManageServerUIHandle_t OpenManageServerDialog(const char *serverName, const char *gameDir);
  37. // opens a manage server dialog to a remote server
  38. virtual ManageServerUIHandle_t OpenManageServerDialog(unsigned int gameIP, unsigned int gamePort, const char *password);
  39. // forces the game info dialog closed
  40. virtual void CloseManageServerDialog(ManageServerUIHandle_t gameDialog);
  41. // Gets a handle to the interface
  42. virtual IManageServer *GetManageServerInterface(ManageServerUIHandle_t handle);
  43. private:
  44. struct OpenedManageDialog_t
  45. {
  46. unsigned long handle;
  47. IManageServer *manageInterface;
  48. };
  49. CUtlVector<OpenedManageDialog_t> m_OpenedManageDialog;
  50. vgui::VPANEL m_hParent;
  51. };
  52. class IVProfExport;
  53. extern IVProfExport *g_pVProfExport;
  54. #endif // AdminServer_H