Rise
The Vieneo Province
Loading...
Searching...
No Matches
isteamgamecoordinator.h
Go to the documentation of this file.
1//====== Copyright ©, Valve Corporation, All rights reserved. =======
2//
3// Purpose: interface to the game coordinator for this application
4//
5//=============================================================================
6
7#ifndef ISTEAMGAMECOORDINATOR
8#define ISTEAMGAMECOORDINATOR
9#ifdef _WIN32
10#pragma once
11#endif
12
13#include "steam_api_common.h"
14
15
16// list of possible return values from the ISteamGameCoordinator API
18{
20 k_EGCResultNoMessage = 1, // There is no message in the queue
21 k_EGCResultBufferTooSmall = 2, // The buffer is too small for the requested message
22 k_EGCResultNotLoggedOn = 3, // The client is not logged onto Steam
23 k_EGCResultInvalidMessage = 4, // Something was wrong with the message being sent with SendMessage
24};
25
26
27//-----------------------------------------------------------------------------
28// Purpose: Functions for sending and receiving messages from the Game Coordinator
29// for this application
30//-----------------------------------------------------------------------------
32{
33public:
34
35 // sends a message to the Game Coordinator
36 virtual EGCResults SendMessage( uint32 unMsgType, const void *pubData, uint32 cubData ) = 0;
37
38 // returns true if there is a message waiting from the game coordinator
39 virtual bool IsMessageAvailable( uint32 *pcubMsgSize ) = 0;
40
41 // fills the provided buffer with the first message in the queue and returns k_EGCResultOK or
42 // returns k_EGCResultNoMessage if there is no message waiting. pcubMsgSize is filled with the message size.
43 // If the provided buffer is not large enough to fit the entire message, k_EGCResultBufferTooSmall is returned
44 // and the message remains at the head of the queue.
45 virtual EGCResults RetrieveMessage( uint32 *punMsgType, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0;
46
47};
48#define STEAMGAMECOORDINATOR_INTERFACE_VERSION "SteamGameCoordinator001"
49
50// callbacks
51#if defined( VALVE_CALLBACK_PACK_SMALL )
52#pragma pack( push, 4 )
53#elif defined( VALVE_CALLBACK_PACK_LARGE )
54#pragma pack( push, 8 )
55#else
56#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
57#endif
58
59// callback notification - A new message is available for reading from the message queue
65
66// callback notification - A message failed to make it to the GC. It may be down temporarily
71
72#pragma pack( pop )
73
74#endif // ISTEAMGAMECOORDINATOR
virtual EGCResults RetrieveMessage(uint32 *punMsgType, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize)=0
virtual bool IsMessageAvailable(uint32 *pcubMsgSize)=0
virtual EGCResults SendMessage(uint32 unMsgType, const void *pubData, uint32 cubData)=0
@ k_EGCResultNotLoggedOn
@ k_EGCResultInvalidMessage
@ k_EGCResultNoMessage
@ k_EGCResultOK
@ k_EGCResultBufferTooSmall
const char *typedef uint32(S_CALLTYPE *SteamAPI_CheckCallbackRegistered_t)(int iCallbackNum)
@ k_iSteamGameCoordinatorCallbacks