summaryrefslogtreecommitdiff
path: root/gcsdk/steamextra/gamecoordinator
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /gcsdk/steamextra/gamecoordinator
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'gcsdk/steamextra/gamecoordinator')
-rw-r--r--gcsdk/steamextra/gamecoordinator/igamecoordinator.h33
-rw-r--r--gcsdk/steamextra/gamecoordinator/igamecoordinatorhost.h31
-rw-r--r--gcsdk/steamextra/gamecoordinator/igcsqlquery.h67
-rw-r--r--gcsdk/steamextra/gamecoordinator/igcsqlresultsetlist.h62
4 files changed, 193 insertions, 0 deletions
diff --git a/gcsdk/steamextra/gamecoordinator/igamecoordinator.h b/gcsdk/steamextra/gamecoordinator/igamecoordinator.h
new file mode 100644
index 0000000..80eb7a4
--- /dev/null
+++ b/gcsdk/steamextra/gamecoordinator/igamecoordinator.h
@@ -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
diff --git a/gcsdk/steamextra/gamecoordinator/igamecoordinatorhost.h b/gcsdk/steamextra/gamecoordinator/igamecoordinatorhost.h
new file mode 100644
index 0000000..d94f306
--- /dev/null
+++ b/gcsdk/steamextra/gamecoordinator/igamecoordinatorhost.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
diff --git a/gcsdk/steamextra/gamecoordinator/igcsqlquery.h b/gcsdk/steamextra/gamecoordinator/igcsqlquery.h
new file mode 100644
index 0000000..cdfd3ad
--- /dev/null
+++ b/gcsdk/steamextra/gamecoordinator/igcsqlquery.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
diff --git a/gcsdk/steamextra/gamecoordinator/igcsqlresultsetlist.h b/gcsdk/steamextra/gamecoordinator/igcsqlresultsetlist.h
new file mode 100644
index 0000000..ced12f2
--- /dev/null
+++ b/gcsdk/steamextra/gamecoordinator/igcsqlresultsetlist.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