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.

66 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: defines a RCon class used to send rcon commands to remote servers
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef RULESINFO_H
  8. #define RULESINFO_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "server.h"
  13. #include "netadr.h"
  14. class CSocket;
  15. class IResponse;
  16. #include <VGUI_PropertyPage.h>
  17. #include <VGUI_Frame.h>
  18. #include <VGUI_ListPanel.h>
  19. #include <VGUI_KeyValues.h>
  20. class CRulesInfo
  21. {
  22. public:
  23. CRulesInfo(IResponse *target,serveritem_t &server);
  24. ~CRulesInfo();
  25. // send an rcon command to a server
  26. void Query();
  27. void Refresh();
  28. bool IsRefreshing();
  29. serveritem_t &GetServer();
  30. void RunFrame();
  31. bool Refreshed();
  32. void UpdateServer(netadr_t *adr, CUtlVector<vgui::KeyValues *> *Rules);
  33. CUtlVector<vgui::KeyValues *> *Rules();
  34. int serverID;
  35. int received;
  36. private:
  37. serveritem_t m_Server;
  38. CSocket *m_pQuery; // Game server query socket
  39. IResponse *m_pResponseTarget;
  40. bool m_bIsRefreshing;
  41. float m_fSendTime;
  42. bool m_bRefreshed;
  43. CUtlVector<vgui::KeyValues *> *m_vRules;
  44. };
  45. #endif // RULESINFO_H