This commit is contained in:
FluorescentCIAAfricanAmerican
2020-04-22 12:56:21 -04:00
commit 3bf9df6b27
15370 changed files with 5489726 additions and 0 deletions
@@ -0,0 +1,33 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================
#ifndef IGAMECOORDINATOR_H
#define IGAMECOORDINATOR_H
#ifdef _WIN32
#pragma once
#endif
typedef uint32 AppId_t;
class CSteamID;
class IGameCoordinatorHost;
class IGCSQLResultSetList;
class IGameCoordinator
{
public:
virtual bool BInit( AppId_t unAppID, const char *pchAppPath, IGameCoordinatorHost *pHost ) = 0;
virtual bool BMainLoopOncePerFrame( uint64 ulLimitMicroseconds ) = 0;
virtual bool BMainLoopUntilFrameCompletion( uint64 ulLimitMicroseconds ) = 0;
virtual void Shutdown() = 0;
virtual void Uninit() = 0;
virtual void MessageFromClient( const CSteamID & senderID, uint32 unMsgType, void *pubData, uint32 cubData ) = 0;
virtual void Validate( CValidator &validator, const char *pchName ) = 0;
virtual void SQLResults( GID_t gidContextID ) = 0;
};
#define GAMECOORDINATOR_INTERFACE_VERSION "GAMECOORDINATOR003"
#endif // IGAMECOORDINATOR_H
@@ -0,0 +1,31 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Provides an interface that the server hosting a GC must implement
//
// $NoKeywords: $
//=============================================================================
#ifndef IGAMECOORDINATORHOST_H
#define IGAMECOORDINATORHOST_H
#ifdef _WIN32
#pragma once
#endif
class CSteamID;
class IGCSQLQuery;
class IGameCoordinatorHost
{
public:
virtual bool BSendMessageToClient( AppId_t unAppID, const CSteamID & steamIDTarget, uint32 unMsgType, const void *pubData, uint32 cubData ) = 0;
virtual GID_t GenerateGID() = 0;
virtual void EmitMessage( const char *pchGroupName, SpewType_t spewType, int iSpewLevel, int iLevelLog, const char *pchMsg ) = 0;
virtual void SQLQuery( GID_t gidContextID, IGCSQLQuery *pQuery, int eSchemaCatalog ) = 0;
virtual void StartupComplete( bool bSuccess ) = 0;
virtual void ShutdownComplete() = 0;
virtual EUniverse GetUniverse() = 0;
};
#define GAMECOORDINATORHOST_INTERFACE_VERSION "GAMECOORDINATORHOST002"
#endif // IGAMECOORDINATORHOST_H
@@ -0,0 +1,67 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#ifndef IGCSQLQUERY_H
#define IGCSQLQUERY_H
#ifdef _WIN32
#pragma once
#endif
// the type of the parameter
enum EGCSQLType
{
k_EGCSQLTypeInvalid = -1,
// Variable length types
k_EGCSQLType_Blob,
k_EGCSQLType_String,
// fixed length types
k_EGCSQLType_int8, // also uint8
k_EGCSQLType_int16, // also uint16
k_EGCSQLType_int32, // also uint32
k_EGCSQLType_int64, // also uint64
k_EGCSQLType_float,
k_EGCSQLType_double,
k_EGCSQLType_Binary, // raw binary data of fixed size (i.e. a C struct).
k_EGCSQLType_Image,
k_EGCSQLType_bool,
};
class IGCSQLResultSetList;
class IGCSQLQuery
{
protected:
// call Destroy() instead of deleting this object directly
virtual ~IGCSQLQuery() {}
public:
// returns the number of statements in the transaction
// represented by this query object
virtual uint32 GetStatementCount() = 0;
// returns a string that represents where in the GC this
// query came from. Usually this is FILE_AND_LINE.
virtual const char *PchName() = 0;
// get the null-terminated query string itself
virtual const char *PchCommand( uint32 unStatement ) = 0;
// gets the parameter data
virtual uint32 CnParams( uint32 unStatement ) = 0;
virtual EGCSQLType EParamType( uint32 unStatement, uint32 uIndex ) = 0;
virtual byte *PubParam( uint32 unStatement, uint32 uIndex ) = 0;
virtual uint32 CubParam( uint32 unStatement, uint32 uIndex ) = 0;
// reports the result
virtual void SetResults( IGCSQLResultSetList *pResults ) = 0;
};
#endif // IGCSQLQUERY_H
@@ -0,0 +1,62 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#ifndef IGCSQLRESULTSETLIST_H
#define IGCSQLRESULTSETLIST_H
#ifdef _WIN32
#pragma once
#endif
#include "igcsqlquery.h"
enum EGCSQLError
{
k_EGCSQLErrorNone = 0,
k_EGCSQLErrorUnknown,
k_EGCSQLErrorBacklog,
k_EGCSQLErrorBadQueryParameters,
k_EGCSQLErrorConnectionError,
k_EGCSQLErrorDataTruncated,
k_EGCSQLErrorDeadlockLoser,
k_EGCSQLErrorDuplicateKey,
k_EGCSQLErrorGenericError,
k_EGCSQLErrorNoResultSet,
k_EGCSQLErrorSyntaxError,
k_EGCSQLErrorTableOrViewNotFound,
k_EGCSQLErrorTimeout,
k_EGCSQLErrorConstraintViolation,
k_EGCSQLErrorNumericValueOutOfRange,
k_EGCSQLErrorRollbackFailed,
k_EGCSQLErrorColumnNotFound,
};
class IGCSQLResultSet
{
public:
virtual uint32 GetColumnCount() = 0;
virtual EGCSQLType GetColumnType( uint32 nColumn ) = 0;
virtual const char *GetColumnName( uint32 nColumn ) = 0;
virtual uint32 GetRowCount() = 0;
virtual bool GetData( uint32 unRow, uint32 unColumn, uint8 **ppData, uint32 *punSize ) = 0;
};
class IGCSQLResultSetList
{
public:
virtual EGCSQLError GetError() = 0;
virtual uint32 GetResultSetCount() = 0;
virtual IGCSQLResultSet *GetResultSet( uint32 nResultSetIndex ) = 0;
virtual uint32 GetRowsAffected( uint32 unWhichStatement ) = 0;
virtual void Destroy() = 0;
virtual const char *GetErrorText() = 0;
};
#endif // IGCSQLRESULTSETLIST_H