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.

94 lines
2.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // The copyright to the contents herein is the property of Valve, L.L.C.
  4. // The contents may be used and/or copied only with the written permission of
  5. // Valve, L.L.C., or in accordance with the terms and conditions stipulated in
  6. // the agreement/contract under which the contents have been supplied.
  7. //
  8. //*****************************************************************************
  9. //
  10. // Contents:
  11. //
  12. //
  13. //
  14. // Authors: Taylor Sherman
  15. //
  16. // Target restrictions:
  17. //
  18. // Tool restrictions:
  19. //
  20. // Things to do:
  21. //
  22. //
  23. //
  24. //*****************************************************************************
  25. #ifndef INCLUDED_STEAM_FINDSTEAMSERVERS_H
  26. #define INCLUDED_STEAM_FINDSTEAMSERVERS_H
  27. #if defined(_MSC_VER) && (_MSC_VER > 1000)
  28. #pragma once
  29. #endif
  30. #ifdef STEAM_FINDSERVERS_STATIC_LIB
  31. #define STEAM_FSS_CALL
  32. #define STEAM_FSS_API
  33. #else
  34. #ifndef STEAM_API
  35. #ifdef STEAM_EXPORTS
  36. #define STEAM_API __declspec(dllexport)
  37. #else
  38. #define STEAM_API __declspec(dllimport)
  39. #endif
  40. #endif
  41. #ifndef STEAM_CALL
  42. #define STEAM_CALL __cdecl
  43. #endif
  44. #define STEAM_FSS_CALL STEAM_CALL
  45. #define STEAM_FSS_API STEAM_API
  46. #endif
  47. #include <limits.h>
  48. #include "steamcommon.h"
  49. /******************************************************************************
  50. **
  51. ** Types
  52. **
  53. ******************************************************************************/
  54. #ifdef __cplusplus
  55. extern "C"
  56. {
  57. #endif
  58. enum
  59. {
  60. eSteamFindSteamServersLibraryError = -1,
  61. eSteamFindSteamServersLibraryBusy = -2
  62. };
  63. // returns number of IP addresses returned by the GDS for this server type
  64. // negative return means error
  65. STEAM_FSS_API int STEAM_FSS_CALL SteamFindServersNumServers(ESteamServerType eServerType);
  66. // Get nth ipaddr:port for this server type
  67. // buffer needs to be 22 chars long: aaa.bbb.ccc.ddd:12345 plus null
  68. //
  69. // returns 0 if succsessful, negative is error
  70. STEAM_FSS_API int STEAM_FSS_CALL SteamFindServersIterateServer(ESteamServerType eServerType, unsigned int nServer, char *szIpAddrPort, int szIpAddrPortLen);
  71. STEAM_FSS_API const char * STEAM_FSS_CALL SteamFindServersGetErrorString();
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75. #endif /* #ifndef INCLUDED_STEAM_COMMON_STEAMCOMMON_H */