aboutsummaryrefslogtreecommitdiff
path: root/ThirdParty/NVIDIAGfeSDK/Include
diff options
context:
space:
mode:
authorGrigoriy <[email protected]>2018-03-12 00:30:49 +0300
committerGrigoriy <[email protected]>2018-03-12 00:30:49 +0300
commit2415f5df72265afb368d5189b91cbe6242da4e5f (patch)
treefa8a83d9e74b9d1c276e2f34f5a71fe7d6e91680 /ThirdParty/NVIDIAGfeSDK/Include
parentDelete .gitignore (diff)
downloadgfesdk-ue4plugin-2415f5df72265afb368d5189b91cbe6242da4e5f.tar.xz
gfesdk-ue4plugin-2415f5df72265afb368d5189b91cbe6242da4e5f.zip
First commit
Diffstat (limited to 'ThirdParty/NVIDIAGfeSDK/Include')
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/highlights_types_cpp.h112
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/ihighlights_cpp.h53
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/ihighlights_cpp_impl.h196
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/isdk_cpp.h56
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/isdk_cpp_impl.h219
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/sdk_types_cpp.h95
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/config.h25
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/gfe3_product_version.h44
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/highlights/highlights_types.h132
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/highlights/ihighlights.h157
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/isdk.h158
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/os_defines.h34
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/sdk_types.h146
-rw-r--r--ThirdParty/NVIDIAGfeSDK/Include/gfesdk/sdk_types_ipc.h224
14 files changed, 1651 insertions, 0 deletions
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/highlights_types_cpp.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/highlights_types_cpp.h
new file mode 100644
index 0000000..69dbb88
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/highlights_types_cpp.h
@@ -0,0 +1,112 @@
+/* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef HIGHLIGHTS_TYPES_CPP_H
+#define HIGHLIGHTS_TYPES_CPP_H
+
+#include <gfesdk/bindings/cpp/sdk_types_cpp.h>
+
+// Avoid polluting global namespace with C api
+namespace GfeSDK
+{
+#include <gfesdk/highlights/highlights_types.h>
+}
+
+namespace GfeSDK
+{
+
+//! C++ binding for @ref NVGSDK_Highlight
+struct HighlightDefinition
+{
+ std::string id;
+ bool userDefaultInterest;
+ NVGSDK_HighlightType highlightTags;
+ NVGSDK_HighlightSignificance significance;
+ TTranslationTable nameLocaleTable; //!< Locale/translation pairs
+ HighlightDefinition() : highlightTags(static_cast<NVGSDK_HighlightType>(0)), significance(static_cast<NVGSDK_HighlightSignificance>(0)), userDefaultInterest(true) {}
+};
+
+//! C++ binding for @ref NVGSDK_HighlightConfigParams
+struct HighlightConfigParams
+{
+ std::vector<HighlightDefinition> highlightDefinitions;
+ std::string defaultLocale;
+};
+
+//! C++ binding for @ref NVGSDK_HighlightOpenGroupParams
+struct HighlightOpenGroupParams
+{
+ std::string groupId;
+ TTranslationTable groupDescriptionLocaleTable;
+};
+
+//! C++ binding for @ref NVGSDK_HighlightCloseGroupParams
+struct HighlightCloseGroupParams
+{
+ std::string groupId;
+ bool destroyHighlights;
+};
+
+//! C++ binding for @ref NVGSDK_ScreenshotHighlightParams
+struct ScreenshotHighlightParams
+{
+ std::string groupId;
+ std::string highlightId;
+};
+
+//! C++ binding for @ref NVGSDK_VideoHighlightParams
+struct VideoHighlightParams
+{
+ std::string groupId;
+ std::string highlightId;
+ int32_t startDelta;
+ int32_t endDelta;
+};
+
+//! C++ binding for @ref NVGSDK_GroupView
+struct GroupView
+{
+ std::string groupId;
+ NVGSDK_HighlightType tagsFilter;
+ NVGSDK_HighlightSignificance significanceFilter;
+ GroupView() : tagsFilter(NVGSDK_HighlightType(0)), significanceFilter(NVGSDK_HighlightSignificance(0)) {}
+};
+
+//! C++ binding for @ref NVGSDK_SummaryParams
+struct SummaryParams
+{
+ std::vector<GroupView> groupViews;
+};
+
+//! C++ binding for @ref NVGSDK_HighlightUserSetting
+struct HighlightUserSetting
+{
+ std::string highlightId; //!< Unique id for game event.
+ bool enabled; //!< Boolean for whether the user wants to record this type of highlight
+};
+
+/////////////// Responses from API calls
+
+//! C++ binding for @ref NVGSDK_GetNumberOfHighlightsResponse
+struct GetNumberOfHighlightsResponse
+{
+ uint16_t numHighlights;
+};
+typedef std::function<void(NVGSDK_RetCode rc, GetNumberOfHighlightsResponse const*, void*)> TGetNumberOfHighlightsCallback;
+
+//! C++ binding for @ref NVGSDK_Highlights_GetUserSettingsResponse
+struct GetUserSettingsResponse
+{
+ std::vector<HighlightUserSetting> highlightSettings;
+};
+typedef std::function<void(NVGSDK_RetCode rc, GetUserSettingsResponse const*, void*)> TGetUserSettingsCallback;
+
+}
+
+#endif //HIGHLIGHTS_TYPES_CPP_H
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/ihighlights_cpp.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/ihighlights_cpp.h
new file mode 100644
index 0000000..f15d12a
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/ihighlights_cpp.h
@@ -0,0 +1,53 @@
+/* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+/*!
+* \file
+* C++ bindings for GfeSDK.
+* Implemented in the header to avoid ABI incompatibilities
+*/
+
+#ifndef GFESDK_IHIGHLIGHTS_CPP_H
+#define GFESDK_IHIGHLIGHTS_CPP_H
+
+#include <gfesdk/bindings/cpp/isdk_cpp.h>
+#include <gfesdk/bindings/cpp/highlights/highlights_types_cpp.h>
+
+namespace GfeSDK
+{
+// Avoid polluting global namespace with C api, so put it inside namespace
+#include <gfesdk/highlights/ihighlights.h>
+
+/*! C++ Highlights interface */
+class Highlights
+{
+public:
+ static Highlights* Create(Core* core);
+ virtual ~Highlights() {}
+
+ /*! C++ binding for \ref NVGSDK_Highlights_ConfigureAsync */
+ virtual void ConfigureAsync(HighlightConfigParams const& params, TCallback cb = nullptr, void* cbContext = nullptr) = 0;
+ /*! C++ binding for \ref NVGSDK_Highlights_GetUserSettingsAsync */
+ virtual void GetUserSettingsAsync(TGetUserSettingsCallback cb = nullptr, void* cbContext = nullptr) const = 0;
+ /*! C++ binding for \ref NVGSDK_Highlights_OpenGroupAsync */
+ virtual void OpenGroupAsync(HighlightOpenGroupParams const& params, TCallback cb = nullptr, void* cbContext = nullptr) = 0;
+ /*! C++ binding for \ref NVGSDK_Highlights_CloseGroupAsync */
+ virtual void CloseGroupAsync(HighlightCloseGroupParams const& params, TCallback cb = nullptr, void* cbContext = nullptr) = 0;
+ /*! C++ binding for \ref NVGSDK_Highlights_SetScreenshotHighlightAsync */
+ virtual void SetScreenshotHighlightAsync(ScreenshotHighlightParams const& params, TCallback cb = nullptr, void* cbContext = nullptr) = 0;
+ /*! C++ binding for \ref NVGSDK_Highlights_SetVideoHighlightAsync */
+ virtual void SetVideoHighlightAsync(VideoHighlightParams const& params, TCallback cb = nullptr, void* cbContext = nullptr) = 0;
+ /*! C++ binding for \ref NVGSDK_Highlights_OpenSummaryAsync */
+ virtual void OpenSummaryAsync(SummaryParams const& params, TCallback cb = nullptr, void* cbContext = nullptr) = 0;
+ /*! C++ binding for \ref NVGSDK_Highlights_GetNumberOfHighlightsAsync */
+ virtual void GetNumberOfHighlightsAsync(GroupView const& params, TGetNumberOfHighlightsCallback cb = nullptr, void* cbContext = nullptr) = 0;
+};
+}
+
+#endif //GFESDK_IHIGHLIGHTS_CPP_H
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/ihighlights_cpp_impl.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/ihighlights_cpp_impl.h
new file mode 100644
index 0000000..6af42c1
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/highlights/ihighlights_cpp_impl.h
@@ -0,0 +1,196 @@
+/* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+/*!
+* \file
+* C++ bindings for GfeSDK Highlights.
+* Implemented in the header to avoid ABI incompatibilities
+*/
+
+#ifndef GFESDK_IHIGHLIGHTS_CPP_IMPL_H
+#define GFESDK_IHIGHLIGHTS_CPP_IMPL_H
+
+#include "ihighlights_cpp.h"
+#include <gfesdk/bindings/cpp/isdk_cpp_impl.h>
+
+#include <memory>
+
+namespace GfeSDK
+{
+class HighlightsImpl : public Highlights
+{
+public:
+ /*! C++ binding for \ref NVGSDK_Highlights_ConfigureAsync */
+ virtual void ConfigureAsync(HighlightConfigParams const& params, TCallback cb = nullptr, void* cbContext = nullptr);
+ /*! C++ binding for \ref NVGSDK_Highlights_GetUserSettingsAsync */
+ virtual void GetUserSettingsAsync(TGetUserSettingsCallback cb = nullptr, void* cbContext = nullptr) const;
+ /*! C++ binding for \ref NVGSDK_Highlights_OpenGroupAsync */
+ virtual void OpenGroupAsync(HighlightOpenGroupParams const& params, TCallback cb = nullptr, void* cbContext = nullptr);
+ /*! C++ binding for \ref NVGSDK_Highlights_CloseGroupAsync */
+ virtual void CloseGroupAsync(HighlightCloseGroupParams const& params, TCallback cb = nullptr, void* cbContext = nullptr);
+ /*! C++ binding for \ref NVGSDK_Highlights_SetScreenshotHighlightAsync */
+ virtual void SetScreenshotHighlightAsync(ScreenshotHighlightParams const& params, TCallback cb = nullptr, void* cbContext = nullptr);
+ /*! C++ binding for \ref NVGSDK_Highlights_SetVideoHighlightAsync */
+ virtual void SetVideoHighlightAsync(VideoHighlightParams const& params, TCallback cb = nullptr, void* cbContext = nullptr);
+ /*! C++ binding for \ref NVGSDK_Highlights_OpenSummaryAsync */
+ virtual void OpenSummaryAsync(SummaryParams const& params, TCallback cb = nullptr, void* cbContext = nullptr);
+ /*! C++ binding for \ref NVGSDK_Highlights_GetNumberOfHighlightsAsync */
+ virtual void GetNumberOfHighlightsAsync(GroupView const& params, TGetNumberOfHighlightsCallback cb = nullptr, void* cbContext = nullptr);
+
+ friend class Highlights;
+private:
+ // Remove default construct, copy and assignment operators
+ HighlightsImpl(Core* core) : m_handle(core ? core->GetHandle() : nullptr) {}
+ HighlightsImpl(const HighlightsImpl& other) {}
+ HighlightsImpl& operator=(const HighlightsImpl& other) {}
+
+private:
+ NVGSDK_HANDLE* m_handle;
+};
+
+inline Highlights* Highlights::Create(Core* core)
+{
+ return new HighlightsImpl(core);
+}
+
+inline void HighlightsImpl::ConfigureAsync(HighlightConfigParams const& params, TCallback callback, void* context)
+{
+ NVGSDK_HighlightConfigParams cParams;
+ std::vector<NVGSDK_Highlight> cHighlights;
+ std::vector<std::vector<NVGSDK_LocalizedPair>> cLocaleMaps;
+ for (auto it = params.highlightDefinitions.begin(); it != params.highlightDefinitions.end(); ++it)
+ {
+ cLocaleMaps.push_back(std::vector<NVGSDK_LocalizedPair>());
+ for (auto localeIt = it->nameLocaleTable.begin(); localeIt != it->nameLocaleTable.end(); ++localeIt)
+ {
+ cLocaleMaps.back().push_back({
+ localeIt->first.c_str(),
+ localeIt->second.c_str()
+ });
+ }
+ cHighlights.push_back({
+ it->id.c_str(),
+ it->userDefaultInterest,
+ it->highlightTags,
+ it->significance,
+ &cLocaleMaps.back()[0],
+ it->nameLocaleTable.size()
+ });
+ }
+ cParams.highlightDefinitionTable = &cHighlights[0];
+ cParams.highlightTableSize = cHighlights.size();
+ cParams.defaultLocale = params.defaultLocale.c_str();
+ NVGSDK_Highlights_ConfigureAsync(m_handle, &cParams, CoreImpl::callbackWrapper, new CoreImpl::CallbackContext<TCallback>({ callback, context }));
+}
+
+inline void HighlightsImpl::GetUserSettingsAsync(TGetUserSettingsCallback callback, void* context) const
+{
+ NVGSDK_Highlights_GetUserSettingsAsync(m_handle, [](NVGSDK_RetCode rc, NVGSDK_Highlights_UserSettings const* data, void* context) {
+ std::unique_ptr<CoreImpl::CallbackContext<TGetUserSettingsCallback>> callbackContext(reinterpret_cast<CoreImpl::CallbackContext<TGetUserSettingsCallback>*>(context));
+ if (!callbackContext->callback) return;
+
+ if (NVGSDK_FAILED(rc))
+ {
+ return callbackContext->callback(rc, nullptr, callbackContext->appContext);
+ }
+
+ GetUserSettingsResponse r;
+ for (size_t i = 0; i < data->highlightSettingTableSize; ++i)
+ {
+ r.highlightSettings.push_back({
+ data->highlightSettingTable[i].id,
+ data->highlightSettingTable[i].enabled
+ });
+ }
+ callbackContext->callback(rc, &r, callbackContext->appContext);
+ }, new CoreImpl::CallbackContext<TGetUserSettingsCallback>({ callback, context }));
+}
+
+inline void HighlightsImpl::OpenGroupAsync(HighlightOpenGroupParams const& params, TCallback callback, void* context)
+{
+ NVGSDK_HighlightOpenGroupParams cParams;
+
+ std::vector<NVGSDK_LocalizedPair> localePairs;
+ CoreImpl::translateLocaleTable(params.groupDescriptionLocaleTable, localePairs);
+ cParams.groupId = params.groupId.c_str();
+ cParams.groupDescriptionTable = &localePairs[0];
+ cParams.groupDescriptionTableSize = localePairs.size();
+
+ NVGSDK_Highlights_OpenGroupAsync(m_handle, &cParams, CoreImpl::callbackWrapper, new CoreImpl::CallbackContext<TCallback>({ callback, context }));
+}
+
+inline void HighlightsImpl::CloseGroupAsync(HighlightCloseGroupParams const& params, TCallback callback, void* context)
+{
+ NVGSDK_HighlightCloseGroupParams cParams;
+ cParams.groupId = params.groupId.c_str();
+ cParams.destroyHighlights = params.destroyHighlights;
+
+ NVGSDK_Highlights_CloseGroupAsync(m_handle, &cParams, CoreImpl::callbackWrapper, new CoreImpl::CallbackContext<TCallback>({ callback, context }));
+}
+
+inline void HighlightsImpl::SetScreenshotHighlightAsync(ScreenshotHighlightParams const& params, TCallback callback, void* context)
+{
+ NVGSDK_ScreenshotHighlightParams cParams;
+ cParams.groupId = params.groupId.c_str();
+ cParams.highlightId = params.highlightId.c_str();
+ NVGSDK_Highlights_SetScreenshotHighlightAsync(m_handle, &cParams, CoreImpl::callbackWrapper, new CoreImpl::CallbackContext<TCallback>({ callback, context }));
+}
+
+inline void HighlightsImpl::SetVideoHighlightAsync(VideoHighlightParams const& params, TCallback callback, void* context)
+{
+ NVGSDK_VideoHighlightParams cParams;
+ cParams.groupId = params.groupId.c_str();
+ cParams.highlightId = params.highlightId.c_str();
+ cParams.startDelta = params.startDelta;
+ cParams.endDelta = params.endDelta;
+ NVGSDK_Highlights_SetVideoHighlightAsync(m_handle, &cParams, CoreImpl::callbackWrapper, new CoreImpl::CallbackContext<TCallback>({ callback, context }));
+}
+
+inline void HighlightsImpl::OpenSummaryAsync(SummaryParams const& params, TCallback callback, void* context)
+{
+ std::vector<NVGSDK_GroupView> cGroupViews;
+ for (auto it = params.groupViews.begin(); it != params.groupViews.end(); ++it)
+ {
+ cGroupViews.push_back({
+ it->groupId.c_str(),
+ it->tagsFilter,
+ it->significanceFilter
+ });
+ }
+
+ NVGSDK_SummaryParams cParams;
+ cParams.groupSummaryTable = &cGroupViews[0];
+ cParams.groupSummaryTableSize = cGroupViews.size();
+ NVGSDK_Highlights_OpenSummaryAsync(m_handle, &cParams, CoreImpl::callbackWrapper, new CoreImpl::CallbackContext<TCallback>({ callback, context }));
+}
+
+inline void HighlightsImpl::GetNumberOfHighlightsAsync(GroupView const& params, TGetNumberOfHighlightsCallback callback, void* context)
+{
+ NVGSDK_GroupView cParams;
+ cParams.groupId = params.groupId.c_str();
+ cParams.tagsFilter = params.tagsFilter;
+ cParams.significanceFilter = params.significanceFilter;
+ NVGSDK_Highlights_GetNumberOfHighlightsAsync(m_handle, &cParams, [](NVGSDK_RetCode rc, NVGSDK_Highlights_NumberOfHighlights const* data, void* context) {
+ std::unique_ptr<CoreImpl::CallbackContext<TGetNumberOfHighlightsCallback>> callbackContext(reinterpret_cast<CoreImpl::CallbackContext<TGetNumberOfHighlightsCallback>*>(context));
+ if (!callbackContext->callback) return;
+
+ if (NVGSDK_FAILED(rc))
+ {
+ return callbackContext->callback(rc, nullptr, callbackContext->appContext);
+ }
+
+ GetNumberOfHighlightsResponse num;
+ num.numHighlights = data->numberOfHighlights;
+ callbackContext->callback(rc, &num, callbackContext->appContext);
+ }, new CoreImpl::CallbackContext<TGetNumberOfHighlightsCallback>({ callback, context }));
+}
+
+}
+
+#endif //GFESDK_IHIGHLIGHTS_CPP_IMPL_H
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/isdk_cpp.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/isdk_cpp.h
new file mode 100644
index 0000000..f2c0d03
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/isdk_cpp.h
@@ -0,0 +1,56 @@
+/* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+/*!
+ * \file
+ * C++ bindings for GfeSDK.
+ */
+
+#ifndef GFESDK_ISDK_CPP_H
+#define GFESDK_ISDK_CPP_H
+
+#include "sdk_types_cpp.h"
+
+namespace GfeSDK
+{
+// Avoid polluting global namespace with C api, so put it inside namespace
+#include <gfesdk/isdk.h>
+
+// Static functions that don't depend on an instance of the SDK
+// Giving an alias to these to remove the NVGSDK_ prefix in lieu of the namespace
+/*! C++ binding for \ref NVGSDK_SetLogLevel */
+inline NVGSDK_RetCode SetFileLogLevel(NVGSDK_LogLevel level) { return NVGSDK_SetLogLevel(level); }
+/*! C++ binding for \ref NVGSDK_AttachLogListener */
+inline NVGSDK_RetCode AttachLogListener(NVGSDK_LoggingCallback callback) { return NVGSDK_AttachLogListener(callback); }
+/*! C++ binding for \ref NVGSDK_SetListenerLogLevel */
+inline NVGSDK_RetCode SetListenerLogLevel(NVGSDK_LogLevel level) { return NVGSDK_SetListenerLogLevel(level); }
+/*! C++ binding for NVGSDK_RetCodeToString */
+inline const char* RetCodeToString(NVGSDK_RetCode rc) { return NVGSDK_RetCodeToString(rc); }
+
+/*! C++ Core interface */
+class Core
+{
+public:
+ /*! C++ binding for \ref NVGSDK_Create */
+ static Core* Create(CreateInputParams const&, CreateResponse&);
+ virtual ~Core() {}
+
+ /*! C++ binding for \ref NVGSDK_Poll */
+ virtual NVGSDK_RetCode Poll(void) = 0;
+ /*! C++ binding for \ref NVGSDK_RequestPermissionsAsync */
+ virtual void RequestPermissionsAsync(RequestPermissionsParams const&, TCallback cb = nullptr, void* cbContext = nullptr) = 0;
+ /*! C++ binding for \ref NVGSDK_GetUILanguageAsync */
+ virtual void GetUILanguageAsync(TGetUILanguageCallback cb = nullptr, void* cbContext = nullptr) = 0;
+
+ // Return the C API handle;
+ virtual NVGSDK_HANDLE* GetHandle() = 0;
+};
+}
+
+#endif //GFESDK_ISDK_CPP_H
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/isdk_cpp_impl.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/isdk_cpp_impl.h
new file mode 100644
index 0000000..f5eb3a9
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/isdk_cpp_impl.h
@@ -0,0 +1,219 @@
+/* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+/*!
+* \file
+* C++ bindings for GfeSDK.
+* Implemented in the header to avoid ABI incompatibilities
+*/
+
+#ifndef GFESDK_ISDK_CPP_IMPL_H
+#define GFESDK_ISDK_CPP_IMPL_H
+
+#include "isdk_cpp.h"
+
+#include <memory>
+
+namespace GfeSDK
+{
+class CoreImpl : public Core
+{
+public:
+ ~CoreImpl();
+
+ virtual NVGSDK_RetCode Poll(void);
+ virtual void RequestPermissionsAsync(RequestPermissionsParams const&, TCallback cb = nullptr, void* cbContext = nullptr);
+ virtual void GetUILanguageAsync(TGetUILanguageCallback cb = nullptr, void* cbContext = nullptr);
+
+ NVGSDK_HANDLE* GetHandle();
+
+ friend class Core;
+ friend class HighlightsImpl;
+private:
+ // Remove default construct, copy and assignment operators
+ CoreImpl() {}
+ CoreImpl(const CoreImpl& other) {}
+ CoreImpl& operator=(const CoreImpl& other) {}
+
+private:
+ template <typename T>
+ struct CallbackContext
+ {
+ T callback;
+ void* appContext;
+ };
+ struct CallbackNotificationContext
+ {
+ TNotificationCallback callback;
+ void* appContext;
+ };
+ static void __stdcall callbackWrapper(NVGSDK_RetCode rc, void* appContext);
+ static void __stdcall callbackNotificationWrapper(NVGSDK_NotificationType type, NVGSDK_Notification const* data, void* context);
+ static inline void translateLocaleTable(std::map<std::string, std::string> const& localeMap, std::vector<NVGSDK_LocalizedPair>& pairs);
+
+ NVGSDK_HANDLE* m_handle;
+ std::unique_ptr<CallbackNotificationContext> m_notificationCallbackContext;
+};
+
+inline Core* Core::Create(CreateInputParams const& inParams, CreateResponse& outParams)
+{
+ CoreImpl* core = new CoreImpl();
+
+ NVGSDK_CreateInputParams cInputParams;
+ memset(&cInputParams, 0, sizeof(cInputParams));
+ cInputParams.appName = inParams.appName.c_str();
+ cInputParams.pollForCallbacks = inParams.pollForCallbacks;
+ if (!inParams.requiredScopes.empty())
+ {
+ cInputParams.scopeTable = const_cast<NVGSDK_Scope*>(&inParams.requiredScopes[0]);
+ cInputParams.scopeTableSize = inParams.requiredScopes.size();
+ }
+ if (inParams.notificationCallback)
+ {
+ cInputParams.notificationCallback = &CoreImpl::callbackNotificationWrapper;
+ core->m_notificationCallbackContext.reset(new CoreImpl::CallbackNotificationContext({ inParams.notificationCallback, inParams.notificationCallbackContext }));
+ cInputParams.notificationCallbackContext = core->m_notificationCallbackContext.get();
+ }
+ cInputParams.targetPid = inParams.targetPid;
+ if (!inParams.targetPath.empty())
+ {
+ cInputParams.targetPath = inParams.targetPath.c_str();
+ }
+
+ NVGSDK_CreateResponse cOutputParams = { 0 };
+ std::vector<NVGSDK_ScopePermission> cScopePermissionList;
+ cScopePermissionList.resize(inParams.requiredScopes.size());
+
+ if (!inParams.requiredScopes.empty())
+ {
+ cOutputParams.scopePermissionTable = &cScopePermissionList[0];
+ cOutputParams.scopePermissionTableSize = cScopePermissionList.size();
+ }
+
+ outParams.returnCode = NVGSDK_Create(&core->m_handle, &cInputParams, &cOutputParams);
+ outParams.versionMajor = cOutputParams.versionMajor;
+ outParams.versionMinor = cOutputParams.versionMinor;
+ outParams.nvidiaGfeVersion = cOutputParams.gfeVersionStr;
+
+ if (NVGSDK_FAILED(outParams.returnCode))
+ {
+ delete core;
+ return nullptr;
+ }
+
+ if (cOutputParams.scopePermissionTable)
+ {
+ for (size_t i = 0; i < cOutputParams.scopePermissionTableSize; ++i)
+ {
+ NVGSDK_ScopePermission const& scopePermission = cOutputParams.scopePermissionTable[i];
+ outParams.scopePermissions[scopePermission.scope] = scopePermission.permission;
+ }
+ }
+
+ return core;
+}
+
+inline CoreImpl::~CoreImpl()
+{
+ if (!m_handle)
+ {
+ return;
+ }
+
+ NVGSDK_Release(m_handle);
+}
+
+inline NVGSDK_RetCode CoreImpl::Poll(void)
+{
+ return NVGSDK_Poll(m_handle);
+}
+
+inline void CoreImpl::RequestPermissionsAsync(RequestPermissionsParams const& params, TCallback callback, void* context)
+{
+ NVGSDK_RequestPermissionsParams cParams;
+ cParams.scopeTable = const_cast<NVGSDK_Scope*>(&params.scopes[0]);
+ cParams.scopeTableSize = params.scopes.size();
+ return NVGSDK_RequestPermissionsAsync(m_handle, &cParams, callbackWrapper, new CallbackContext<TCallback>({ callback, context }));
+}
+
+inline void CoreImpl::GetUILanguageAsync(TGetUILanguageCallback callback, void* context)
+{
+ NVGSDK_GetUILanguageAsync(m_handle, [](NVGSDK_RetCode rc, NVGSDK_Language const* data, void* context) {
+ std::unique_ptr<CallbackContext<TGetUILanguageCallback>> callbackContext(reinterpret_cast<CallbackContext<TGetUILanguageCallback>*>(context));
+ if (!callbackContext->callback) return;
+
+ if (NVGSDK_FAILED(rc))
+ {
+ return callbackContext->callback(rc, nullptr, callbackContext->appContext);
+ }
+
+ GetUILanguageResponse language;
+ language.cultureCode = data->cultureCode;
+ callbackContext->callback(rc, &language, callbackContext->appContext);
+ }, new CallbackContext<TGetUILanguageCallback>({ callback, context }));
+}
+
+inline NVGSDK_HANDLE* CoreImpl::GetHandle()
+{
+ return m_handle;
+}
+
+inline void CoreImpl::callbackWrapper(NVGSDK_RetCode rc, void* context)
+{
+ std::unique_ptr<CallbackContext<TCallback>> callbackContext(reinterpret_cast<CallbackContext<TCallback>*>(context));
+ if (!callbackContext->callback) return;
+
+ callbackContext->callback(rc, callbackContext->appContext);
+}
+
+inline void CoreImpl::callbackNotificationWrapper(NVGSDK_NotificationType type, NVGSDK_Notification const* data, void* context)
+{
+ CallbackNotificationContext* callbackContext(reinterpret_cast<CallbackNotificationContext*>(context));
+ if (!callbackContext->callback) return;
+
+ switch (type)
+ {
+ case NVGSDK_NOTIFICATION_PERMISSIONS_CHANGED:
+ {
+ PermissionsChangedNotification notification;
+ notification.context = callbackContext->appContext;
+ for (size_t i = 0; i < data->permissionsChanged.scopePermissionTableSize; ++i)
+ {
+ notification.scopePermissions[data->permissionsChanged.scopePermissionTable[i].scope] = data->permissionsChanged.scopePermissionTable[i].permission;
+ }
+ callbackContext->callback(type, notification);
+ break;
+ }
+ case NVGSDK_NOTIFICATION_OVERLAY_STATE_CHANGED:
+ {
+ OverlayStateChangedNotification notification;
+ notification.context = callbackContext->appContext;
+ notification.open = data->overlayStateChanged.open;
+ notification.state = data->overlayStateChanged.state;
+ callbackContext->callback(type, notification);
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+inline void CoreImpl::translateLocaleTable(std::map<std::string, std::string> const& localeMap, std::vector<NVGSDK_LocalizedPair>& pairs)
+{
+ for (auto it = localeMap.begin(); it != localeMap.end(); ++it)
+ {
+ pairs.push_back({
+ it->first.c_str(),
+ it->second.c_str()
+ });
+ }
+}
+}
+
+#endif //GFESDK_ISDK_CPP_H
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/sdk_types_cpp.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/sdk_types_cpp.h
new file mode 100644
index 0000000..fe04f0a
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/bindings/cpp/sdk_types_cpp.h
@@ -0,0 +1,95 @@
+/* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#ifndef GFESDK_SDK_TYPES_CPP_H
+#define GFESDK_SDK_TYPES_CPP_H
+
+// Include these first, so they don't get stuck in the GfeSDK namespace below
+#include <stdint.h>
+#include <stdbool.h>
+
+// Avoid polluting global namespace with C api
+namespace GfeSDK
+{
+#include <gfesdk/sdk_types.h>
+}
+
+#include <string>
+#include <vector>
+#include <map>
+#include <functional>
+
+namespace GfeSDK
+{
+
+struct NotificationBase;
+typedef std::vector<NVGSDK_Scope> TScopes;
+typedef std::map<NVGSDK_Scope, NVGSDK_Permission> TScopePermissions;
+typedef std::map<std::string, std::string> TTranslationTable;
+typedef std::function<void(NVGSDK_NotificationType, NotificationBase const&)> TNotificationCallback;
+
+struct CreateInputParams
+{
+ std::string appName;
+ TScopes requiredScopes;
+ bool pollForCallbacks;
+ TNotificationCallback notificationCallback;
+ void* notificationCallbackContext;
+
+ uint32_t targetPid; //!< Advanced usage
+ std::string targetPath; //!< Advanced usage
+
+ CreateInputParams() : pollForCallbacks(false), notificationCallback(nullptr), notificationCallbackContext(nullptr), targetPid(0) {}
+};
+
+struct RequestPermissionsParams
+{
+ TScopes scopes;
+};
+
+/////////////// Responses from API calls
+typedef std::function<void(NVGSDK_RetCode, void*)> TCallback;
+
+//! C++ binding for @ref NVGSDK_CreateResponse
+struct CreateResponse
+{
+ NVGSDK_RetCode returnCode;
+ uint16_t versionMajor;
+ uint16_t versionMinor;
+ std::string nvidiaGfeVersion;
+ TScopePermissions scopePermissions;
+};
+
+//! C++ binding for @ref NVGSDK_GetUILanguageResponse
+struct GetUILanguageResponse
+{
+ std::string cultureCode;
+};
+typedef std::function<void(NVGSDK_RetCode rc, GetUILanguageResponse const*, void*)> TGetUILanguageCallback;
+
+/////////////// Notifications
+struct NotificationBase
+{
+ void* context;
+};
+
+struct PermissionsChangedNotification : public NotificationBase
+{
+ TScopePermissions scopePermissions;
+};
+
+struct OverlayStateChangedNotification : public NotificationBase
+{
+ bool open;
+ NVGSDK_OverlayState state;
+};
+
+}
+
+#endif //GFESDK_SDK_TYPES_CPP_H
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/config.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/config.h
new file mode 100644
index 0000000..3ae765a
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/config.h
@@ -0,0 +1,25 @@
+/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+// Warning: This file is generated. Do not edit
+
+#ifndef _NVGSDK_CONFIG_H_
+#define _NVGSDK_CONFIG_H_
+
+#include "gfe3_product_version.h"
+
+#define NVGSDK_PROJECT_NAME "GfeSDK"
+
+#define NVGSDK_VERSION_MAJOR 1
+#define NVGSDK_VERSION_MINOR 1
+#define NVGSDK_BUILD_NUMBER 173
+#define NVGSDK_BUILD_HASH 5d889305
+#define NVGSDK_BUILD_HASH_STR "5d889305"
+
+#endif // _NVGSDK_CONFIG_H_
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/gfe3_product_version.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/gfe3_product_version.h
new file mode 100644
index 0000000..64a2a63
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/gfe3_product_version.h
@@ -0,0 +1,44 @@
+//
+// GFE3 product version:
+// - A.B.XY.N, if X > 0
+// - A.B.Y.N, otherwise
+//
+// A - Major release version.
+// B - Minor release version.
+// X - _dev to _rel_next rebase counter.
+// Y - _rel_next to _rel rebase counter.
+// N - Build counter.
+//
+#define NVIDIA_GFE3_VERSION_MAJOR 3
+#define NVIDIA_GFE3_VERSION_MINOR 13
+#define NVIDIA_GFE3_VERSION_DEV_REBASE 0
+#define NVIDIA_GFE3_VERSION_RNEXT_REBASE 0
+#define NVIDIA_GFE3_VERSION_BUILD 47
+
+//
+// Composite version values. We don't concatenate them here automatically because
+// (a) one can't use L-based wchar_t conversion with preprocessor-concatenated terminals; and
+// (b) some build scripts rely upon the explicit value for NVIDIA_GFE3_VERSION / NVIDIA_GFE3_VERSION_STRING_DOT
+//
+
+// Format: A,B,XY,N
+#define NVIDIA_GFE3_VERSION 3,13,0,47
+// Format: A.B.XY.N
+#define NVIDIA_GFE3_VERSION_DOT 3.13.0.47
+// Format: "A.B.XY.N"
+#define NVIDIA_GFE3_VERSION_STRING "3.13.0.47"
+
+//
+// Some common strings
+//
+#define NVIDIA_GFE3_PRODUCT_NAME "NVIDIA GeForce Experience"
+
+//
+// These values are taken from nvVer.h
+//
+#define NV_COMPANY_NAME_STRING_SHORT "NVIDIA"
+#define NV_COMPANY_NAME_STRING_FULL "NVIDIA Corporation"
+#define NV_COMPANY_NAME_STRING NV_COMPANY_NAME_STRING_FULL
+#define NV_COPYRIGHT_YEAR "2017"
+#define NV_COPYRIGHT "(C) " NV_COPYRIGHT_YEAR " " NV_COMPANY_NAME_STRING_FULL ". All rights reserved." // Please do not use the non-ascii copyright symbol for (C).
+
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/highlights/highlights_types.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/highlights/highlights_types.h
new file mode 100644
index 0000000..3ae751c
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/highlights/highlights_types.h
@@ -0,0 +1,132 @@
+/* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+/*!
+* \file
+* Highlights types
+*/
+
+#ifndef HIGHLIGHTS_TYPES_H
+#define HIGHLIGHTS_TYPES_H
+
+#include <gfesdk/sdk_types.h>
+#include <stdint.h>
+#include <stdbool.h>
+
+/*! Possible significance values */
+typedef enum
+{
+ NVGSDK_HIGHLIGHT_SIGNIFICANCE_EXTREMELY_BAD = 0x00000001,
+ NVGSDK_HIGHLIGHT_SIGNIFICANCE_VERY_BAD = 0x00000002,
+ NVGSDK_HIGHLIGHT_SIGNIFICANCE_BAD = 0x00000004,
+ NVGSDK_HIGHLIGHT_SIGNIFICANCE_NEUTRAL = 0x00000010,
+ NVGSDK_HIGHLIGHT_SIGNIFICANCE_GOOD = 0x00000100,
+ NVGSDK_HIGHLIGHT_SIGNIFICANCE_VERY_GOOD = 0x00000200,
+ NVGSDK_HIGHLIGHT_SIGNIFICANCE_EXTREMELY_GOOD = 0x00000400,
+ NVGSDK_HIGHLIGHT_SIGNIFICANCE_MAX = 0x00000800
+} NVGSDK_HighlightSignificance;
+
+/*! Possible highlights that can occur during gameplay */
+typedef struct
+{
+ char const* id; //!< Unique id for game event. Max length @ref NVGSDK_MAX_LENGTH - 1
+ bool userInterest; /*!< Boolean, whether the player is interested in this event.
+ * User can change this setting. This value provides the default. */
+ NVGSDK_HighlightType highlightTags; //!< Tags for this highlight
+ NVGSDK_HighlightSignificance significance; //!< How significant the highlight is
+ NVGSDK_LocalizedPair* nameTable; /*!< An array of locale-highlightName pairs for the user-facing highlight name.
+ * If no names are given, the highlight id will be used as the "name" */
+ size_t nameTableSize; //!< Number of entries in the localeNameTable */
+} NVGSDK_Highlight;
+
+/*! Highlight configuration parameters */
+typedef struct
+{
+ NVGSDK_Highlight* highlightDefinitionTable;
+ size_t highlightTableSize;
+ char const* defaultLocale; //!< Default locality, used for hinting GFE which translation to use. Defaults to en-us
+} NVGSDK_HighlightConfigParams;
+
+/*! Informs the app of the user's highlight choices */
+typedef struct
+{
+ char const* id; //!< Unique id for game event.
+ bool enabled; //!< Boolean for whether the user wants to record this type of highlight
+} NVGSDK_HighlightUserSetting;
+
+/*! Parameters passed into OpenGroup calls */
+typedef struct
+{
+ char const* groupId; /*!< Unique group ID used to refer back to the group for adding Highlights,
+ * or for opening the group Summary later. Max length @ref NVGSDK_MAX_LENGTH - 1 */
+ NVGSDK_LocalizedPair* groupDescriptionTable; /*!< An array of locale-groupDesc pairs for the user-facing group description.
+ * If no names are given, the groupId will be used as the "name" */
+ size_t groupDescriptionTableSize; //!< Number of entries in the groupDescriptionTable */
+} NVGSDK_HighlightOpenGroupParams;
+
+/*! Parameters passed into CloseGroup calls */
+typedef struct
+{
+ char const* groupId; //!< Unique group ID that was used to Open a group previously
+ bool destroyHighlights; /*!< If set to true, deletes the persisted highlights from disk.
+ * Highlights that have been moved to gallery are not removed */
+} NVGSDK_HighlightCloseGroupParams;
+
+/*! Passed into NVGSDK_Highlights_SetScreenshotHighlightAsync */
+typedef struct
+{
+ char const* groupId; //!< Required ID of the group this highlight is attached to.
+ char const* highlightId; //!< Refers to unique highlight id in highlight table
+} NVGSDK_ScreenshotHighlightParams;
+
+/*! Passed into NVGSDK_Highlights_SetVideoHighlightAsync */
+typedef struct
+{
+ char const* groupId; //!< Required ID of the group this highlight is attached to.
+ char const* highlightId; //!< Refers to unique highlight id in highlight table
+ int32_t startDelta; //!< Milliseconds between the time of request, and the start of desired video clip
+ int32_t endDelta; //!< Milliseconds between the time of request, and end of desired video clip
+} NVGSDK_VideoHighlightParams;
+
+/*! Represents a filtered highlight group */
+typedef struct
+{
+ char const* groupId; //!< Unique ID of the group to open
+ NVGSDK_HighlightType tagsFilter; //!< If not zero, represents a bitfield of tags to include
+ NVGSDK_HighlightSignificance significanceFilter; //!< If not zero, represents a bitfield of significance values to include
+} NVGSDK_GroupView;
+
+/*! Choose the highlights to display in the group summary */
+typedef struct
+{
+ NVGSDK_GroupView* groupSummaryTable; //!< Pass in all the groups to display on screen
+ size_t groupSummaryTableSize; //!< Number of groups contained in the table pointer
+} NVGSDK_SummaryParams;
+
+
+/////////////// Responses from API calls
+
+/*! Returned data from NVGSDK_Highlights_GetUserSettings */
+typedef struct
+{
+ NVGSDK_HighlightUserSetting* highlightSettingTable;
+ size_t highlightSettingTableSize;
+} NVGSDK_Highlights_UserSettings;
+/*! Type of callback to provide to NVGSDK_Highlights_GetUserSettings */
+typedef void(__stdcall* NVGSDK_Highlights_GetUserSettingsCallback)(NVGSDK_RetCode, NVGSDK_Highlights_UserSettings const*, void*);
+
+/*! Returned data from NVGSDK_Highlights_GetNumberOfHighlightsAsync */
+typedef struct
+{
+ uint16_t numberOfHighlights;
+} NVGSDK_Highlights_NumberOfHighlights;
+/*! Type of callback to provide to NVGSDK_Highlights_GetNumberOfHighlightsAsync */
+typedef void(__stdcall* NVGSDK_Highlights_GetNumberOfHighlightsCallback)(NVGSDK_RetCode, NVGSDK_Highlights_NumberOfHighlights const*, void*);
+
+#endif // HIGHLIGHTS_TYPES_H
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/highlights/ihighlights.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/highlights/ihighlights.h
new file mode 100644
index 0000000..2439945
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/highlights/ihighlights.h
@@ -0,0 +1,157 @@
+/* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+/*!
+* \file
+* C GfeSDK Highlights API
+*/
+
+#ifndef GFESDK_IHIGHLIGHTS_H
+#define GFESDK_IHIGHLIGHTS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <gfesdk/highlights/highlights_types.h>
+
+/*!
+* Gives a list of possible Highlights to GFE. The user will be able to see this list and determine which of them
+* she cares about. Future calls to \ref NVGSDK_SetVideoHighlight and \ref NVGSDK_SetScreenshotHighlight will refer to an
+* entry in this list by name.
+*
+* \param handle[in] - Valid SDK handle returned by NVGSDK_Create
+* \param config[in] - Table of possible Highlights
+*
+* \param callback[in] - Callback return function as described by \ref section_async
+* \param context[in] - Opaque context pointer as described by \ref section_async
+*
+* \retval NVGSDK_SUCCESS - Call was successful
+* \retval NVGSDK_ERR_INVALID_PARAMETER - Invalid handle or other pointer provided
+*/
+NVGSDK_EXPORT void NVGSDKApi
+NVGSDK_Highlights_ConfigureAsync(NVGSDK_HANDLE* handle, NVGSDK_HighlightConfigParams const* config, NVGSDK_EmptyCallback callback, void* context);
+
+/*!
+* The user is able to enable/disable Highlights. This gives the game that information.
+*
+* \param handle[in] - Valid SDK handle returned by NVGSDK_Create
+* \param userSettings[out] - On NVGSDK_SUCCESS, will be populated with the user settings.
+*
+* \param callback[in] - Callback return function as described by \ref section_async
+* \param context[in] - Opaque context pointer as described by \ref section_async
+*
+* \retval NVGSDK_SUCCESS - Call was successful
+* \retval NVGSDK_ERR_INVALID_PARAMETER - Invalid handle or other pointer provided
+*/
+NVGSDK_EXPORT void NVGSDKApi
+NVGSDK_Highlights_GetUserSettingsAsync(NVGSDK_HANDLE* handle, NVGSDK_Highlights_GetUserSettingsCallback cb, void* cbContext);
+
+/*!
+* Begins a "group" which groups several Highlights together. As an example, an online game will commonly consist
+* of a round of action, followed by a down period sitting in the lobby. The game can choose to define a Group as
+* the time between starting and finishing this round of action. At the end, all of the highlights recorded
+* during that group may be displayed to the user in a group summary.
+*
+* \param handle[in] - Valid SDK handle returned by NVGSDK_Create
+* \param params[in] - Parameter struct containing the name of the group and additional metadata
+*
+* \param callback[in] - Callback return function as described by \ref section_async
+* \param context[in] - Opaque context pointer as described by \ref section_async
+*
+* \retval NVGSDK_SUCCESS - Call was successful
+* \retval NVGSDK_ERR_INVALID_PARAMETER - Invalid handle or other pointer provided
+*/
+NVGSDK_EXPORT void NVGSDKApi
+NVGSDK_Highlights_OpenGroupAsync(NVGSDK_HANDLE* handle, NVGSDK_HighlightOpenGroupParams const* params, NVGSDK_EmptyCallback callback, void* context);
+
+/*!
+* Closes out a group and purges the unsaved contents. See @ref NVGSDK_Highlights_OpenGroupAsync
+*
+* \param handle[in] - Valid SDK handle returned by NVGSDK_Create
+* \param groupName[in] - Parameter struct containing the name of the group and additional close instructions
+*
+* \param callback[in] - Callback return function as described by \ref section_async
+* \param context[in] - Opaque context pointer as described by \ref section_async
+*
+* \retval NVGSDK_SUCCESS - Call was successful
+* \retval NVGSDK_ERR_INVALID_PARAMETER - Invalid handle or other pointer provided
+*/
+NVGSDK_EXPORT void NVGSDKApi
+NVGSDK_Highlights_CloseGroupAsync(NVGSDK_HANDLE* handle, NVGSDK_HighlightCloseGroupParams const* params, NVGSDK_EmptyCallback callback, void* context);
+
+/*!
+* Records a screenshot highlight for the given group. Attached metadata to it to make the Highlight more interesting.
+*
+* \param handle[in] - Valid SDK handle returned by NVGSDK_Create
+* \param params[in] - GroupID and metadata to attach to the highlight
+*
+* \param callback[in] - Callback return function as described by \ref section_async
+* \param context[in] - Opaque context pointer as described by \ref section_async
+*
+* \retval NVGSDK_SUCCESS - Call was successful
+* \retval NVGSDK_ERR_INVALID_PARAMETER - Invalid handle or other pointer provided
+*/
+NVGSDK_EXPORT void NVGSDKApi
+NVGSDK_Highlights_SetScreenshotHighlightAsync(NVGSDK_HANDLE* handle, NVGSDK_ScreenshotHighlightParams const* params, NVGSDK_EmptyCallback callback, void* context);
+
+/*!
+* Records a video highlight for the given group. Attached metadata to it to make the Highlight more interesting.
+* Set the start and end delta to change the length
+* of the video clip.
+*
+* Examples:
+* * The API call is made at T+0, with startDelta at -5000 and endDelta 5000. The start of the desired highlight will be
+* at T-5s, and the clip will be 10s long.
+* * The API call is made at T+0, with startDelta at -10000 and endDelta -5000. The start of the desired highlight will be
+* at T-10s, and the clip will be 5s long.
+* * The API call is made at T+0, with startDelta at 5000 and endDelta 10000. The start of the desired highlight will be
+* at T+5s, and the clip will be 5s long.
+*
+* \param handle[in] - Valid SDK handle returned by NVGSDK_Create
+* \param params[in] - GroupID and metadata to attach to the highlight
+*
+* \param callback[in] - Callback return function as described by \ref section_async
+* \param context[in] - Opaque context pointer as described by \ref section_async
+*
+* \retval NVGSDK_SUCCESS - Call was successful
+* \retval NVGSDK_ERR_INVALID_PARAMETER - Invalid handle or other pointer provided
+*/
+NVGSDK_EXPORT void NVGSDKApi
+NVGSDK_Highlights_SetVideoHighlightAsync(NVGSDK_HANDLE* handle, NVGSDK_VideoHighlightParams const*, NVGSDK_EmptyCallback callback, void* context);
+
+/*!
+* Opens up Summary Dialog for one or more groups
+*
+* \param handle[in] - Valid SDK handle returned by NVGSDK_Create
+* \param params[in] - Struct containing the group names and filter params
+*
+* \param callback[in] - Callback return function as described by \ref section_async
+* \param context[in] - Opaque context pointer as described by \ref section_async
+*/
+NVGSDK_EXPORT void NVGSDKApi
+NVGSDK_Highlights_OpenSummaryAsync(NVGSDK_HANDLE* handle, NVGSDK_SummaryParams const* params, NVGSDK_EmptyCallback callback, void* context);
+
+/*!
+* Retrieves the number of highlights given the group ID and filtering params
+*
+* \param handle[in] - Valid SDK handle returned by NVGSDK_Create
+* \param groupParams[in] - Struct containing the group names and filter params
+*
+* \param callback[in] - Callback return function as described by \ref section_async
+* \param context[in] - Opaque context pointer as described by \ref section_async
+*/
+NVGSDK_EXPORT void NVGSDKApi
+NVGSDK_Highlights_GetNumberOfHighlightsAsync(NVGSDK_HANDLE* handle, NVGSDK_GroupView const* groupParams, NVGSDK_Highlights_GetNumberOfHighlightsCallback cb, void* context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // GFESDK_IHIGHLIGHTS_H
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/isdk.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/isdk.h
new file mode 100644
index 0000000..b1fe6d7
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/isdk.h
@@ -0,0 +1,158 @@
+/* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+/*!
+ * \file
+ * C GFE SDK API
+ */
+
+#ifndef GFESDK_ISDK_H
+#define GFESDK_ISDK_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <gfesdk/os_defines.h>
+#include <gfesdk/sdk_types.h>
+#include <gfesdk/sdk_types_ipc.h>
+#include <gfesdk/config.h>
+#include "stdint.h"
+
+/////////////////// CORE
+
+/*!
+ * Allocates and initializes the SDK interface. This is a synchronous call and
+ * may take tens of milliseconds.
+ *
+ * Importantly, the app must pass a list of required scopes to this call. This
+ * is analagous to an oauth2 type of flow. GfeSDK will choose to allocate
+ * certain resources based on this list. For example, passing
+ * \ref NVGSDK_SCOPE_HIGHLIGHTS to this list will enable all of the calls
+ * starting with NVGSDK_Highlights_*. For more information on permissions, see
+ * \ref section_permissions.
+ *
+ * The next decision for the app is whether to accept asynchronous callbacks on
+ * a GfeSDK-controller thread, or to poll for callbacks on a game-controlled
+ * thread, usually the main game loop. See
+ * \ref NVGSDK_CreateInputParams::pollForCallbacks and
+ * \ref section_threading "Threading". When bringing the SDK up for the first
+ * time, it may be best to start with pollForCallbacks = false, until up and
+ * running, and then move to the more advanced polling model that gives control
+ * to the proper thread.
+ *
+ * Finally, the app can pass in a callback to recieve notifications, and an
+ * opaque pointer that will be passed untouched to be received by the callback.
+ * See \ref section_notifications
+ *
+ * \param handle[out] - Will be populated by the created SDK on success
+ * \param inParams[in] - Input parameters for SDK creation
+ * \param outParams[out] - Output params for SDK creation, will be populated on return. On fatal error, this will be NULL
+ *
+ * \retval NVGSDK_SUCCESS - SDK was successfully created and returned
+ * \retval NVGSDK_ERR_OUT_OF_MEMORY - Could not allocate system resources for handle
+ * \retval NVGSDK_ERR_INVALID_PARAMETER - Invalid handle pointer provided, or no app name provided
+ * \retval NVGSDK_ERR_LOAD_LIBRARY - SDK wasn't able to load dependencies. Perhaps GFE is not installed.
+ * \retval NVGSDK_ERR_CONNECTION - SDK is not able to contact GFE backend service
+ * \retval NVGSDK_ERR_UNHANDLED_EXCEPTION - SDK ran into an unhandled error and caught an exception before it
+ * returned to client code
+ * \retval NVGSDK_IPC_SUCCESS_OLD_SDK - SDK will work properly, but the GfeSDK DLL version is old.
+ See \ref section_version
+ * \retval NVGSDK_IPC_SUCCESS_OLD_GFE - SDK should work properly, but the backend GFE version is older,
+ and may not provide the latest features. See \ref section_version
+ * \retval NVGSDK_ERR_GFE_VERSION - GFE version is too old for communication. User must upgrade GFE.
+ See \ref section_version
+ * \retval NVGSDK_ERR_SDK_VERSION - GfeSDK DLL version is too old. Game must distribute a newer version.
+ See \ref section_version
+ */
+NVGSDK_EXPORT NVGSDK_RetCode NVGSDKApi NVGSDK_Create(NVGSDK_HANDLE** handle, NVGSDK_CreateInputParams const* inParams, NVGSDK_CreateResponse* outParams);
+
+/*!
+ * Release the main SDK interface after create.
+ *
+ * \param pHandle[in] - SDK Handle to release
+ *
+ * \retval NVGSDK_SUCCESS - SDK was successfully released
+ * \retval NVGSDK_ERR_INVALID_PARAMETER - Invalid handle provided
+ * \retval NVGSDK_ERR_UNHANDLED_EXCEPTION - SDK ran into an unhandled error and caught an exception before it
+ * returned to client code
+ */
+NVGSDK_EXPORT NVGSDK_RetCode NVGSDKApi NVGSDK_Release(NVGSDK_HANDLE* handle);
+
+/*!
+ * When \ref NVGSDK_CreateInputParams::pollForCallbacks is set to true, it becomes
+ * the app's responsibility to make calls to this function to recieve asynchronous
+ * callbacks. See \ref section_async for more information.
+ *
+ * \param handle[in] - Valid SDK handle returned by NVGSDK_Create
+ */
+NVGSDK_EXPORT NVGSDK_RetCode NVGSDKApi NVGSDK_Poll(NVGSDK_HANDLE* handle);
+
+/*!
+* Adjusts the logging level of GfeSDK. Log level documentation is found at
+* \ref NVGSDK_LogLevel. See \ref section_log for more information.
+*
+* \param fileLvl[in] - Logs at or above this priority will be written to logfile
+*/
+NVGSDK_EXPORT NVGSDK_RetCode NVGSDKApi NVGSDK_SetLogLevel(NVGSDK_LogLevel fileLevel);
+
+/*!
+ * Pass in a callback function in order to receive the log messages that GfeSDK is
+ * recording. The primary usecase for this is to get the GfeSDK logs into the logfile
+ * of a game engine. See \ref section_log for more information.
+ *
+ * \param[in] callback - Will be called back with log priority and message
+ */
+NVGSDK_EXPORT NVGSDK_RetCode NVGSDKApi NVGSDK_AttachLogListener(NVGSDK_LoggingCallback callback);
+
+/*!
+* Adjusts the listener logging level of GfeSDK. This affects calls to the callback
+* given to \ref NVGSDK_AttachLogListener. See \ref section_log for more information.
+*
+* See \ref NVGSDK_LogLevel for a list of possible levels.
+*
+* \param level[in] - Logs at or above this priority will be sent to callback
+*/
+NVGSDK_EXPORT NVGSDK_RetCode NVGSDKApi NVGSDK_SetListenerLogLevel(NVGSDK_LogLevel level);
+
+/*!
+ * Asks the user for permissions needed by the app. This will open up the
+ * \ref section_igo.
+ *
+ * If the user has already decided to grant or deny permissions for these
+ * scopes, no overlay will be displayed, and the corresponding return value
+ * will be passed into the callback.
+ *
+ * \param callback[in] - Callback return function as described by \ref section_async
+ * \param context[in] - Opaque context pointer as described by \ref section_async
+ */
+NVGSDK_EXPORT void NVGSDKApi NVGSDK_RequestPermissionsAsync(NVGSDK_HANDLE* handle, NVGSDK_RequestPermissionsParams const* params, NVGSDK_EmptyCallback callback, void* context);
+
+/*!
+ * Returns the language set by the user for the onscreen UI
+ *
+ * \param handle[in] - Valid SDK handle returned by NVGSDK_Create
+ * \param language[out] - Will be populated on NVGSDK_SUCCESS
+ *
+ * \param callback[in] - Callback return function as described by \ref section_async
+ * \param context[in] - Opaque context pointer as described by \ref section_async
+ *
+ * \retval NVGSDK_SUCCESS - Call was successful, and lang was populated with the result
+ * \retval NVGSDK_ERR_INVALID_PARAMETER - Invalid handle provided
+ * \retval NVGSDK_ERR_UNHANDLED_EXCEPTION - SDK ran into an unhandled error and caught an exception before it
+ * returned to client code
+ * \retval NVGSDK_IPC_ERR_NOT_SET - The user has not chosen a language and is using the default
+ */
+NVGSDK_EXPORT void NVGSDKApi NVGSDK_GetUILanguageAsync(NVGSDK_HANDLE* handle, NVGSDK_GetUILanguageCallback callback, void* context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // GFESDK_ISDK_H
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/os_defines.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/os_defines.h
new file mode 100644
index 0000000..7cf4688
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/os_defines.h
@@ -0,0 +1,34 @@
+/* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#ifndef GFESDK_OS_DEFINES_H
+#define GFESDK_OS_DEFINES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined _WIN32 || defined _WIN64
+# if defined(NVGSDK_COMPILE_DLL)
+# define NVGSDK_EXPORT __declspec(dllexport)
+# else
+# define NVGSDK_EXPORT __declspec(dllimport)
+# endif
+
+# define NVGSDKApi __cdecl
+# define NVGSDK_INTERFACE struct __declspec(novtable)
+#else
+#error Add the appropriate construct for the platform complier
+#endif
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // GFESDK_OS_DEFINES_H
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/sdk_types.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/sdk_types.h
new file mode 100644
index 0000000..5c9fd44
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/sdk_types.h
@@ -0,0 +1,146 @@
+/* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+/*!
+ * \file
+ * GFE SDK Types. NOTE: Also see sdk_types_ipc.h for types defined by the GFE backend.
+ */
+
+#ifndef GFESDK_SDK_TYPES_H
+#define GFESDK_SDK_TYPES_H
+
+#include <gfesdk/os_defines.h>
+#include <gfesdk/sdk_types_ipc.h>
+#include <stdint.h>
+#include <stdbool.h>
+
+size_t const NVGSDK_MAX_LENGTH = 256;
+size_t const NVGSDK_MAX_LOCALE = 128;
+size_t const NVGSDK_MAX_HIGHLIGHT_TABLE = 128;
+
+struct NVGSDK_HANDLE;
+typedef struct NVGSDK_HANDLE NVGSDK_HANDLE;
+
+/*! Version returned by GfeSDK backend. See \ref section_version for more info */
+typedef struct
+{
+ uint16_t major;
+ uint16_t minor;
+ char const* gfeVersionStr; //!< Current version installed by the user
+} NVGSDK_Version;
+
+/*! Possible log levels */
+typedef enum
+{
+ NVGSDK_LOG_NONE = 0,
+ NVGSDK_LOG_ERROR = 1,
+ NVGSDK_LOG_INFO = 2,
+ NVGSDK_LOG_DEBUG = 3,
+ NVGSDK_LOG_VERBOSE = 4,
+ NVGSDK_LOG_MAX
+} NVGSDK_LogLevel;
+
+/*! Types of unsolicited notifications */
+typedef enum
+{
+ NVGSDK_NOTIFICATION_PERMISSIONS_CHANGED, //!< Sent when the user accepts/denies the permissions dialog, or toggles in GFE3
+ NVGSDK_NOTIFICATION_OVERLAY_STATE_CHANGED, //!< Sent when the in-game overlay is shown or removed
+ NVGSDK_NOTIFICATION_MAX
+} NVGSDK_NotificationType;
+
+/*! Callback function to recieve log messages */
+typedef void (__stdcall* NVGSDK_LoggingCallback)(NVGSDK_LogLevel level, char const* message);
+
+/*! Translation definition */
+typedef struct
+{
+ char const* localeCode; //!< locale code, such as en-us, fr-fr, etc
+ char const* localizedString; //!< String translated for given locale. Max length @ref NVGSDK_MAX_LENGTH - 1
+} NVGSDK_LocalizedPair;
+
+/*! Pairs of scope and the permission level given to them */
+typedef struct
+{
+ NVGSDK_Scope scope;
+ NVGSDK_Permission permission;
+} NVGSDK_ScopePermission;
+
+//////////// Notifications
+
+/*! Notification sent when the user changes their permissions given to the app */
+typedef struct
+{
+ NVGSDK_ScopePermission* scopePermissionTable;
+ size_t scopePermissionTableSize;
+} NVGSDK_PermissionsChangedNotification;
+
+/*! Notification sent when the in-game overlay is shown or removed */
+typedef struct
+{
+ bool open; //!< true if the overlay is opening, false if it is closing
+ NVGSDK_OverlayState state; //!< State the overlay is closing from or opening to
+} NVGSDK_OverlayStateChangedNotification;
+
+/*! Union providing switched data depending on which notification occurred. See \ref section_notifications */
+typedef struct
+{
+ void* context;
+ union
+ {
+ NVGSDK_PermissionsChangedNotification permissionsChanged;
+ NVGSDK_OverlayStateChangedNotification overlayStateChanged;
+ };
+} NVGSDK_Notification;
+typedef void(__stdcall* NVGSDK_NotificationCallback)(NVGSDK_NotificationType, NVGSDK_Notification const* response, void* context);
+
+/*! Parameters used to setup an SDK connection, given to \ref NVGSDK_Create */
+typedef struct
+{
+ char const* appName; //!< Provide the name of the application. Will be used in cases when NVIDIA cannot detect game.
+ NVGSDK_Scope* scopeTable; //!< List of scopes used by the application
+ size_t scopeTableSize; //!< Number of entries in the scope table
+ bool pollForCallbacks; /*!< \brief Set to true to poll for asynchronous callbacks on an app thread.
+ * If false, callbacks will occur on a GfeSDK controlled thread, no polling necessary */
+ NVGSDK_NotificationCallback notificationCallback; //!< Called on unsolicited notifications
+ void* notificationCallbackContext; //!< Passed along unchanged with each notification
+
+ uint32_t targetPid; //!< Advanced usage
+ char const* targetPath; //!< Advanced usage
+} NVGSDK_CreateInputParams;
+
+/*! Parameters given to \ref NVGSDK_RequestPermissionsAsync */
+typedef struct
+{
+ NVGSDK_Scope* scopeTable;
+ size_t scopeTableSize;
+} NVGSDK_RequestPermissionsParams;
+
+/////////////// Responses from API calls
+
+/*! Response from \ref NVGSDK_Create call */
+typedef struct
+{
+ uint16_t versionMajor; //!< Will be populated with SDK major version
+ uint16_t versionMinor; //!< Will be populated with SDK minor version
+ char gfeVersionStr[NVGSDK_MAX_LENGTH]; //!< Must be provided to call. Will be populated by GFE version string
+ NVGSDK_ScopePermission* scopePermissionTable; //!< Must be provided to call. Will be filled with scope/permission pairs
+ size_t scopePermissionTableSize; //!< Must be provided to call.
+} NVGSDK_CreateResponse;
+/*! Type of callback to provide to most asynchronous APIs that don't return extra data */
+typedef void(__stdcall* NVGSDK_EmptyCallback)(NVGSDK_RetCode, void*);
+
+/*! Gets populated with the user's GFE language choice */
+typedef struct
+{
+ char const* cultureCode; //!< Will be populated by the user's GFE language selection
+} NVGSDK_Language;
+/*! Type of callback to provide to NVGSDK_GetUILanguage */
+typedef void(__stdcall* NVGSDK_GetUILanguageCallback)(NVGSDK_RetCode, NVGSDK_Language const*, void*);
+
+#endif // GFESDK_SDK_TYPES_H
diff --git a/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/sdk_types_ipc.h b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/sdk_types_ipc.h
new file mode 100644
index 0000000..03416c2
--- /dev/null
+++ b/ThirdParty/NVIDIAGfeSDK/Include/gfesdk/sdk_types_ipc.h
@@ -0,0 +1,224 @@
+// Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+//
+// NVIDIA CORPORATION and its licensors retain all intellectual property
+// and proprietary rights in and to this software, related documentation
+// and any modifications thereto. Any use, reproduction, disclosure or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA CORPORATION is strictly prohibited.
+
+#ifndef NVSDKAPI_IPC_H
+#define NVSDKAPI_IPC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The API distributed with the game represents a single version of the GfeSDK.
+ * The installed version of GFE may or may not be compatible with this version. A
+ * version check is initiated when the SDK is initialized.
+ *
+ * Whenever the API between the SDK and GFE backend gets updated, one of these version numbers
+ * gets bumped as follows:
+ * MAJOR.MINOR
+ * MINOR - An API has changed, but the old API is still being supported for backward compatibility
+ * Example: An existing call is reconfigured, or an optional field is added
+ * Case 1: SDK DLL version and GFE Backend version are equal. No problem
+ * Creation will return NVGSDK_SUCCESS
+ * Case 2: SDK DLL version is 0.2, and GFE Backend version is 0.1
+ * API is likely to function as expected, but functionality new to 0.2 won't be expected
+ * to work. Game should consider asking the user to upgrade GFE
+ * Creation will return NVGSDK_SUCCESS_VERSION_OLD_GFE
+ * Case 3: SDK DLL version is 0.1 and GFE Backend version is 0.2. The game needs to update
+ * the distributed DLL to get access to the latest feature, but otherwise it will work correctly.
+ * The game should update to latest SDK version when possible.
+ * Creation will return NVGSDK_SUCCESS_VERSION_OLD_SDK
+ * MAJOR - The update will break backward compatibility completely. THIS IS NEVER TO BE USED IF POSSIBLE
+ * Case 1: SDK DLL version and GFE Backend version are equal. No problem
+ * Creation will return NVGSDK_SUCCESS
+ * Case 2: SDK DLL version is 1.0, and GFE Backend version is 0.1.
+ * SDK won't work as expected. GFE3 must be upgraded.
+ * Creation will return NVGSDK_ERR_GFE_VERSION
+ * Case 3: SDK DLL version is 0.1 and GFE Backend version is 1.0.
+ * SDK won't work as expected. Game must ship with a newer SDK DLL.
+ * Creation will return NVGSDK_ERR_SDK_VERSION
+ */
+
+int const NVGSDK_IPC_VERSION_MAJOR = 1;
+int const NVGSDK_IPC_VERSION_MINOR = 1;
+
+/*!
+* \brief Possible return values of all external APIs
+*/
+typedef enum _NVGSDK_RetCode
+{
+ NVGSDK_SUCCESS = 0,
+ NVGSDK_SUCCESS_VERSION_OLD_SDK = 1001,
+ NVGSDK_SUCCESS_VERSION_OLD_GFE = 1002,
+ NVGSDK_SUCCESS_PENDING = 1003,
+ NVGSDK_SUCCESS_USER_NOT_INTERESTED = 1004,
+ NVGSDK_SUCCESS_PERMISSION_GRANTED = 1005,
+
+ NVGSDK_ERR_GENERIC = -1001,
+ NVGSDK_ERR_GFE_VERSION = -1002,
+ NVGSDK_ERR_SDK_VERSION = -1003,
+ NVGSDK_ERR_NOT_IMPLEMENTED = -1004,
+ NVGSDK_ERR_INVALID_PARAMETER = -1005,
+ NVGSDK_ERR_NOT_SET = -1006,
+ NVGSDK_ERR_SHADOWPLAY_IR_DISABLED = -1007,
+ NVGSDK_ERR_SDK_IN_USE = -1008,
+ NVGSDK_ERR_GROUP_NOT_FOUND = -1009,
+ NVGSDK_ERR_FILE_NOT_FOUND = -1010,
+ NVGSDK_ERR_HIGHLIGHTS_SETUP_FAILED = -1011,
+ NVGSDK_ERR_HIGHLIGHTS_NOT_CONFIGURED = -1012,
+ NVGSDK_ERR_HIGHLIGHTS_SAVE_FAILED = -1013,
+ NVGSDK_ERR_UNEXPECTED_EXCEPTION = -1014,
+ NVGSDK_ERR_NO_HIGHLIGHTS = -1015,
+ NVGSDK_ERR_NO_CONNECTION = -1016,
+ NVGSDK_ERR_PERMISSION_NOT_GRANTED = -1017,
+ NVGSDK_ERR_PERMISSION_DENIED = -1018,
+ NVGSDK_ERR_INVALID_HANDLE = -1019,
+ NVGSDK_ERR_UNHANDLED_EXCEPTION = -1020,
+ NVGSDK_ERR_OUT_OF_MEMORY = -1021,
+ NVGSDK_ERR_LOAD_LIBRARY = -1022,
+ NVGSDK_ERR_LIB_CALL_FAILED = -1023,
+ NVGSDK_ERR_IPC_FAILED = -1024,
+ NVGSDK_ERR_CONNECTION = -1025,
+ NVGSDK_ERR_MODULE_NOT_LOADED = -1026,
+ NVGSDK_ERR_LIB_CALL_TIMEOUT = -1027
+} NVGSDK_RetCode;
+
+// not using macros to avoid polluting namespace of SDK unnecessarily
+
+/*! NVGSDK_RetCode success function */
+inline bool NVGSDK_SUCCEEDED(NVGSDK_RetCode r)
+{
+ return r >= 0;
+}
+
+/*! NVGSDK_RetCode failure function */
+inline bool NVGSDK_FAILED(NVGSDK_RetCode r)
+{
+ return r < 0;
+}
+
+/*! Possible values for highlight types */
+typedef enum
+{
+ /*!
+ * Signifies direct progress towards completing the game. (e.g. completing a level)
+ */
+ NVGSDK_HIGHLIGHT_TYPE_MILESTONE = 0x00000001,
+ /*!
+ * Player accomplishment of extra challenges independent of progress in completing a game.
+ * (e.g. perfect score in a level, found the easter egg)
+ */
+ NVGSDK_HIGHLIGHT_TYPE_ACHIEVEMENT = 0x00000002,
+ /*!
+ * Event not significant in competion of game. (e.g. player kills a minion)
+ */
+ NVGSDK_HIGHLIGHT_TYPE_INCIDENT = 0x00000004,
+ /*!
+ * Change in player state, triggered by player or externally by game.
+ * (e.g. equipping a weapon)
+ */
+ NVGSDK_HIGHLIGHT_TYPE_STATE_CHANGE = 0x00000008,
+ /*!
+ * Special highlight type that does not notify the user as it happens, to avoid giving
+ * the user a competetive advantage. e.g. A game doesn't tell the user that they recorded
+ * a kill, but wants the highlight later for the user after the round is over.
+ */
+ NVGSDK_HIGHLIGHT_TYPE_UNANNOUNCED = 0x00000010,
+ //! Invalid default value
+ NVGSDK_HIGHLIGHT_TYPE_MAX = 0x00000020
+} NVGSDK_HighlightType;
+
+/*! Functionality supported by the SDK and possibly requiring user permission */
+typedef enum
+{
+ NVGSDK_SCOPE_HIGHLIGHTS = 0, //!< Scope required to access highlights information, open group summary, etc
+ NVGSDK_SCOPE_HIGHLIGHTS_VIDEO = 1, //!< Scope required to save video highlights
+ NVGSDK_SCOPE_HIGHLIGHTS_SCREENSHOT = 2, //!< Scope required to save screenshot highlights
+ NVGSDK_SCOPE_MAX
+} NVGSDK_Scope;
+
+/*! Possible permissions that may be implicitly given by GFE, or explicitly decided by the user */
+typedef enum
+{
+ NVGSDK_PERMISSION_GRANTED = 0, //!< Requested permission has been granted to the app by the user
+ NVGSDK_PERMISSION_MUST_ASK = 1, //!< Requested permission must be granted by the user.
+ NVGSDK_PERMISSION_DENIED = 2, //!< Requested permission has been denied to the app, feature won't function
+ NVGSDK_PERMISSION_UNKNOWN = 3, //!< Scope does not match list of known scopes. Version mismatch?
+ NVGSDK_PERMISSION_MAX
+} NVGSDK_Permission;
+
+/*! State that the overlay can be in when it opens and closes */
+typedef enum
+{
+ NVGSDK_OVERLAY_STATE_MAIN, //!< Normal overlay menu
+ NVGSDK_OVERLAY_STATE_PERMISSION, //!< Menu that appears to ask user for permissions
+ NVGSDK_OVERLAY_STATE_HIGHLIGHTS_SUMMARY,//!< Menu that appears to show the user the highlights group summary
+ NVGSDK_OVERLAY_STATE_MAX
+} NVGSDK_OverlayState;
+
+/*!
+ * Converts the code returns from an NVGSDK_* API to a printable string
+ */
+inline const char* NVGSDK_RetCodeToString(NVGSDK_RetCode const ret)
+{
+ switch (ret)
+ {
+ case NVGSDK_SUCCESS: return "NVGSDK_SUCCESS";
+ case NVGSDK_SUCCESS_VERSION_OLD_SDK: return "NVGSDK_SUCCESS_VERSION_OLD_SDK";
+ case NVGSDK_SUCCESS_VERSION_OLD_GFE: return "NVGSDK_SUCCESS_VERSION_OLD_GFE";
+ case NVGSDK_SUCCESS_PENDING: return "NVGSDK_SUCCESS_PENDING";
+ case NVGSDK_SUCCESS_USER_NOT_INTERESTED: return "NVGSDK_SUCCESS_USER_NOT_INTERESTED";
+ case NVGSDK_SUCCESS_PERMISSION_GRANTED: return "NVGSDK_SUCCESS_PERMISSION_GRANTED";
+ case NVGSDK_ERR_GENERIC: return "NVGSDK_ERR_GENERIC";
+ case NVGSDK_ERR_GFE_VERSION: return "NVGSDK_ERR_GFE_VERSION";
+ case NVGSDK_ERR_SDK_VERSION: return "NVGSDK_ERR_SDK_VERSION";
+ case NVGSDK_ERR_NOT_IMPLEMENTED: return "NVGSDK_ERR_NOT_IMPLEMENTED";
+ case NVGSDK_ERR_INVALID_PARAMETER: return "NVGSDK_ERR_INVALID_PARAMETER";
+ case NVGSDK_ERR_NOT_SET: return "NVGSDK_ERR_NOT_SET";
+ case NVGSDK_ERR_SHADOWPLAY_IR_DISABLED: return "NVGSDK_ERR_SHADOWPLAY_IR_DISABLED";
+ case NVGSDK_ERR_SDK_IN_USE: return "NVGSDK_ERR_SDK_IN_USE";
+ case NVGSDK_ERR_GROUP_NOT_FOUND: return "NVGSDK_ERR_GROUP_NOT_FOUND";
+ case NVGSDK_ERR_FILE_NOT_FOUND: return "NVGSDK_ERR_FILE_NOT_FOUND";
+ case NVGSDK_ERR_HIGHLIGHTS_SETUP_FAILED: return "NVGSDK_ERR_HIGHLIGHTS_SETUP_FAILED";
+ case NVGSDK_ERR_HIGHLIGHTS_SAVE_FAILED: return "NVGSDK_ERR_HIGHLIGHTS_SAVE_FAILED";
+ case NVGSDK_ERR_UNEXPECTED_EXCEPTION: return "NVGSDK_ERR_UNEXPECTED_EXCEPTION";
+ case NVGSDK_ERR_NO_HIGHLIGHTS: return "NVGSDK_ERR_NO_HIGHLIGHTS";
+ case NVGSDK_ERR_NO_CONNECTION: return "NVGSDK_ERR_NO_CONNECTION";
+ case NVGSDK_ERR_PERMISSION_NOT_GRANTED: return "NVGSDK_ERR_PERMISSION_NOT_GRANTED";
+ case NVGSDK_ERR_PERMISSION_DENIED: return "NVGSDK_ERR_PERMISSION_DENIED";
+ case NVGSDK_ERR_INVALID_HANDLE: return "NVGSDK_ERR_INVALID_HANDLE";
+ case NVGSDK_ERR_UNHANDLED_EXCEPTION: return "NVGSDK_ERR_UNHANDLED_EXCEPTION";
+ case NVGSDK_ERR_OUT_OF_MEMORY: return "NVGSDK_ERR_OUT_OF_MEMORY";
+ case NVGSDK_ERR_LOAD_LIBRARY: return "NVGSDK_ERR_LOAD_LIBRARY";
+ case NVGSDK_ERR_LIB_CALL_FAILED: return "NVGSDK_ERR_LIB_CALL_FAILED";
+ case NVGSDK_ERR_IPC_FAILED: return "NVGSDK_ERR_IPC_FAILED";
+ case NVGSDK_ERR_CONNECTION: return "NVGSDK_ERR_CONNECTION";
+ case NVGSDK_ERR_MODULE_NOT_LOADED: return "NVGSDK_ERR_MODULE_NOT_LOADED";
+ case NVGSDK_ERR_LIB_CALL_TIMEOUT: return "NVGSDK_ERR_LIB_CALL_TIMEOUT";
+ }
+ return "Unknown code";
+}
+
+// All alphanumeric and the hyphen
+char const VALID_GROUPID_CHARS[] = "^[a-zA-Z0-9\\-_ ]+$";
+wchar_t const VALID_GROUPID_WCHARS[] = L"^[a-zA-Z0-9\\-_ ]+$";
+
+char const VALID_HIGHLIGHT_DEF_ID_CHARS[] = "^[a-zA-Z0-9\\-_ ]+$";
+wchar_t const VALID_HIGHLIGHT_DEF_ID_WCHARS[] = L"^[a-zA-Z0-9\\-_ ]+$";
+
+char const VALID_GAMENAME_CHARS[] = "^[a-zA-Z0-9\\-_ ]+$";
+wchar_t const VALID_GAMENAME_WCHARS[] = L"^[a-zA-Z0-9\\-_ ]+$";
+
+size_t const VALID_HIGHLIGHT_SIGNIFICANCE_WIDTH = 0x8FF;
+size_t const VALID_HIGHLIGHT_TAG_WIDTH = 0x1F;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // NVSDKAPI_IPC_H