summaryrefslogtreecommitdiff
path: root/game/client/ipresence.h
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 /game/client/ipresence.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/ipresence.h')
-rw-r--r--game/client/ipresence.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/game/client/ipresence.h b/game/client/ipresence.h
new file mode 100644
index 0000000..e61cb31
--- /dev/null
+++ b/game/client/ipresence.h
@@ -0,0 +1,34 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Interface for setting Rich Presence contexts and properties.
+//
+//=============================================================================
+
+#ifndef IPRESENCE_H
+#define IPRESENCE_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+//--------------------------------------------------------------------
+// Purpose: Rich Presence interface
+//--------------------------------------------------------------------
+class IPresence
+{
+public:
+ virtual void UserSetContext( unsigned int nUserIndex, unsigned int nContextId, unsigned int nContextValue, bool bAsync = false ) = 0;
+ virtual void UserSetProperty( unsigned int nUserIndex, unsigned int nPropertyId, unsigned int nBytes, const void *pvValue, bool bAsync = false ) = 0;
+ virtual void SetupGameProperties( CUtlVector< XUSER_CONTEXT > &contexts, CUtlVector< XUSER_PROPERTY > &properties ) = 0;
+ virtual uint GetPresenceID( const char *pIDName ) = 0;
+ virtual const char *GetPropertyIdString( const uint id ) = 0;
+ virtual void GetPropertyDisplayString( uint id, uint value, char *pOutput, int nBytes ) = 0;
+
+ // Stats reporting
+ virtual void StartStatsReporting( HANDLE handle, bool bArbitrated ) = 0;
+ virtual void SetStat( uint iPropertyId, int iPropertyValue, int dataType ) = 0;
+ virtual void UploadStats() = 0;
+};
+
+extern IPresence *presence;
+
+#endif // IPRESENCE_H