summaryrefslogtreecommitdiff
path: root/gcsdk/gcwebapikey.cpp
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/gcwebapikey.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'gcsdk/gcwebapikey.cpp')
-rw-r--r--gcsdk/gcwebapikey.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/gcsdk/gcwebapikey.cpp b/gcsdk/gcwebapikey.cpp
new file mode 100644
index 0000000..7e9e722
--- /dev/null
+++ b/gcsdk/gcwebapikey.cpp
@@ -0,0 +1,50 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: implementation of CWebAPIKey
+//
+//=============================================================================
+
+
+#include "stdafx.h"
+#include "gcsdk/msgprotobuf.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+
+//-----------------------------------------------------------------------------
+// Purpose: Clears key settings
+//-----------------------------------------------------------------------------
+void CWebAPIKey::Clear()
+{
+ m_unAccountID = 0;
+ m_unPublisherGroupID = 0;
+}
+
+
+//-----------------------------------------------------------------------------
+// Purpose: Serializes the request into a message object (for proxying between
+// back-end Steam servers).
+//-----------------------------------------------------------------------------
+void CWebAPIKey::SerializeIntoProtoBuf( CMsgWebAPIKey & apiKey ) const
+{
+ apiKey.set_status( m_eStatus );
+ apiKey.set_account_id( m_unAccountID );
+ apiKey.set_publisher_group_id( m_unPublisherGroupID );
+ apiKey.set_key_id( m_unWebAPIKeyID );
+ apiKey.set_domain( m_sDomain.Get() );
+}
+
+
+//-----------------------------------------------------------------------------
+// Purpose: Deserializes the response from a message object (for proxying between
+// back-end Steam servers).
+//-----------------------------------------------------------------------------
+void CWebAPIKey::DeserializeFromProtoBuf( const CMsgWebAPIKey & apiKey )
+{
+ m_eStatus = (EWebAPIKeyStatus)apiKey.status();
+ m_unAccountID = apiKey.account_id();
+ m_unPublisherGroupID = apiKey.publisher_group_id();
+ m_unWebAPIKeyID = apiKey.key_id();
+ m_sDomain = apiKey.domain().c_str();
+}