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.

39 lines
949 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef MESSAGEMGR_H
  8. #define MESSAGEMGR_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #define MSGMGR_VERSION 52314
  13. #define MSGMGR_BROADCAST_PORT 22511
  14. #define MSGMGR_PACKETID_MSG 0
  15. #define MSGMGR_PACKETID_ANNOUNCE_PRESENCE 1 // followed by version # and port
  16. // IMessageMgr provides a simple interface apps can use to generate output. Apps
  17. // on the network can connect to the messagemgr to get its output and display it.
  18. class IMessageMgr
  19. {
  20. public:
  21. virtual bool Init() = 0;
  22. virtual void Term() = 0;
  23. virtual void Print( const char *pMsg ) = 0;
  24. };
  25. // Get the message manager. It's a global singleton so this will always
  26. // return the same value (null if the manager can't initialize).
  27. IMessageMgr* GetMessageMgr();
  28. #endif // MESSAGEMGR_H