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.

45 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef VMPI_TOOLS_SHARED_H
  7. #define VMPI_TOOLS_SHARED_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. // Packet IDs.
  12. #define VMPI_SUBPACKETID_DIRECTORIES 0 // qdir directories.
  13. #define VMPI_SUBPACKETID_DBINFO 1 // MySQL database info.
  14. #define VMPI_SUBPACKETID_CRASH 3 // A worker saying it crashed.
  15. #define VMPI_SUBPACKETID_MULTICAST_ADDR 4 // Filesystem multicast address.
  16. class CDBInfo;
  17. class CIPAddr;
  18. // Send/receive the qdir info.
  19. void SendQDirInfo();
  20. void RecvQDirInfo();
  21. void SendDBInfo( const CDBInfo *pInfo, unsigned long jobPrimaryID );
  22. void RecvDBInfo( CDBInfo *pInfo, unsigned long *pJobPrimaryID );
  23. void SendMulticastIP( const CIPAddr *pAddr );
  24. void RecvMulticastIP( CIPAddr *pAddr );
  25. void VMPI_HandleCrash( const char *pMessage, void *pvExceptionInfo, bool bAssert );
  26. // Call this from an exception handler (set by SetUnhandledExceptionHandler).
  27. // uCode = ExceptionInfo->ExceptionRecord->ExceptionCode.
  28. // pvExceptionInfo = ExceptionInfo
  29. void VMPI_ExceptionFilter( unsigned long uCode, void *pvExceptionInfo );
  30. void HandleMPIDisconnect( int procID, const char *pReason );
  31. #endif // VMPI_TOOLS_SHARED_H