NVIDIAGeForceExperienceSDK
isdk_cpp.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
2 *
3 * NVIDIA CORPORATION and its licensors retain all intellectual property
4 * and proprietary rights in and to this software, related documentation
5 * and any modifications thereto. Any use, reproduction, disclosure or
6 * distribution of this software and related documentation without an express
7 * license agreement from NVIDIA CORPORATION is strictly prohibited.
8 */
9 
15 #ifndef GFESDK_ISDK_CPP_H
16 #define GFESDK_ISDK_CPP_H
17 
18 #include "sdk_types_cpp.h"
19 
20 namespace GfeSDK
21 {
22 // Avoid polluting global namespace with C api, so put it inside namespace
23 #include <gfesdk/isdk.h>
24 
25 // Static functions that don't depend on an instance of the SDK
26 // Giving an alias to these to remove the NVGSDK_ prefix in lieu of the namespace
28 inline NVGSDK_RetCode SetFileLogLevel(NVGSDK_LogLevel level) { return NVGSDK_SetLogLevel(level); }
30 inline NVGSDK_RetCode AttachLogListener(NVGSDK_LoggingCallback callback) { return NVGSDK_AttachLogListener(callback); }
32 inline NVGSDK_RetCode SetListenerLogLevel(NVGSDK_LogLevel level) { return NVGSDK_SetListenerLogLevel(level); }
34 inline const char* RetCodeToString(NVGSDK_RetCode rc) { return NVGSDK_RetCodeToString(rc); }
35 
37 class Core
38 {
39 public:
41  static Core* Create(CreateInputParams const&, CreateResponse&);
42  virtual ~Core() {}
43 
45  virtual NVGSDK_RetCode Poll(void) = 0;
47  virtual void RequestPermissionsAsync(RequestPermissionsParams const&, TCallback cb = nullptr, void* cbContext = nullptr) = 0;
49  virtual void GetUILanguageAsync(TGetUILanguageCallback cb = nullptr, void* cbContext = nullptr) = 0;
50 
51  // Return the C API handle;
52  virtual NVGSDK_HANDLE* GetHandle() = 0;
53 };
54 }
55 
56 #endif //GFESDK_ISDK_CPP_H
virtual void GetUILanguageAsync(TGetUILanguageCallback cb=nullptr, void *cbContext=nullptr)=0
NVGSDK_RetCode SetListenerLogLevel(NVGSDK_LogLevel level)
Definition: isdk_cpp.h:32
const char * RetCodeToString(NVGSDK_RetCode rc)
Definition: isdk_cpp.h:34
C++ binding for NVGSDK_CreateResponse.
Definition: sdk_types_cpp.h:60
virtual void RequestPermissionsAsync(RequestPermissionsParams const &, TCallback cb=nullptr, void *cbContext=nullptr)=0
NVGSDK_EXPORT NVGSDK_RetCode NVGSDKApi NVGSDK_AttachLogListener(NVGSDK_LoggingCallback callback)
virtual NVGSDK_RetCode Poll(void)=0
NVGSDK_RetCode SetFileLogLevel(NVGSDK_LogLevel level)
Definition: isdk_cpp.h:28
void(__stdcall * NVGSDK_LoggingCallback)(NVGSDK_LogLevel level, char const *message)
Definition: sdk_types.h:58
static Core * Create(CreateInputParams const &, CreateResponse &)
Definition: isdk_cpp_impl.h:64
NVGSDK_RetCode AttachLogListener(NVGSDK_LoggingCallback callback)
Definition: isdk_cpp.h:30
NVGSDK_LogLevel
Definition: sdk_types.h:39
NVGSDK_EXPORT NVGSDK_RetCode NVGSDKApi NVGSDK_SetLogLevel(NVGSDK_LogLevel fileLevel)
NVGSDK_EXPORT NVGSDK_RetCode NVGSDKApi NVGSDK_SetListenerLogLevel(NVGSDK_LogLevel level)