Advertisement
Zac_McDonald

CgSDK.x64_2015.h

Sep 29th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.41 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include "CgSDK.x64_2015Global.h"
  4. #include <cstdint>
  5.  
  6. #ifdef __cplusplus
  7. extern "C"
  8. {
  9. #endif
  10.  
  11.     enum CorsairAccessMode      // contains list of available SDK access modes
  12.     {
  13.         CAM_ExclusiveLightingControl = 0
  14.     };
  15.  
  16.     enum CorsairError           // contains shared list of all errors which could happen during calling of Corsair* functions
  17.     {
  18.         CE_Success,                     // if previously called function completed successfully
  19.         CE_ServerNotFound,              // CUE is not running or was shut down or third-party control is disabled in CUE settings(runtime error)
  20.         CE_NoControl,                   // if some other client has or took over exclusive control (runtime error)
  21.         CE_ProtocolHandshakeMissing,    // if developer did not perform protocol handshake(developer error)
  22.         CE_IncompatibleProtocol,        // if developer is calling the function that is not supported by the server(either because protocol has broken by server or client or because the function is new and server is too old. Check CorsairProtocolDetails for details) (developer error)
  23.         CE_InvalidArguments,            // if developer supplied invalid arguments to the function(for specifics look at function descriptions). (developer error)
  24.     };
  25.  
  26.     struct CorsairProtocolDetails // contains information about SDK and CUE versions
  27.     {
  28.         const char* sdkVersion;         // null - terminated string containing version of SDK(like “1.0.0.1”). Always contains valid value even if there was no CUE found
  29.         const char* serverVersion;      // null - terminated string containing version of CUE(like “1.0.0.1”) or NULL if CUE was not found.
  30.         int sdkProtocolVersion;         // integer number that specifies version of protocol that is implemented by current SDK. Numbering starts from 1. Always contains valid value even if there was no CUE found
  31.         int serverProtocolVersion;      // integer number that specifies version of protocol that is implemented by CUE. Numbering starts from 1. If CUE was not found then this value will be 0
  32.         bool breakingChanges;           // boolean value that specifies if there were breaking changes between version of protocol implemented by server and client
  33.     };
  34.  
  35.     //  requestes control using specified access mode. By default client has shared control over lighting so there is no need to call CorsairRequestControl unless client requires exclusive control
  36.     CORSAIR_GAME_SDK bool CgSdkRequestControl(CorsairAccessMode accessMode);
  37.  
  38.     // checks file and protocol version of CUE to understand which of SDK functions can be used with this version of CUE
  39.     CORSAIR_GAME_SDK CorsairProtocolDetails CgSdkPerformProtocolHandshake();
  40.  
  41.     // returns last error that occured while using any of Corsair* functions
  42.     CORSAIR_GAME_SDK CorsairError CgSdkGetLastError();
  43.  
  44.     //releases previously requested control for specified access mode
  45.     CORSAIR_GAME_SDK bool CgSdkReleaseControl(CorsairAccessMode accessMode);
  46.  
  47.  
  48.     CORSAIR_GAME_SDK bool CgSdkSetGame();
  49.  
  50.     CORSAIR_GAME_SDK bool CgSdkSetState();
  51.  
  52.     CORSAIR_GAME_SDK bool CgSdkSetStateWithKey();
  53.  
  54.     CORSAIR_GAME_SDK bool CgSdkSetEvent();
  55.  
  56.     CORSAIR_GAME_SDK bool CgSdkSetEventWithKey();
  57.  
  58.     CORSAIR_GAME_SDK bool CgSdkSetProgressBarValue();
  59.  
  60.     CORSAIR_GAME_SDK bool CgSdkShowProgressBar();
  61.  
  62.     CORSAIR_GAME_SDK bool CgSdkHideProgressBar();
  63.    
  64.     CORSAIR_GAME_SDK bool CgSdkClearState();
  65.  
  66.     CORSAIR_GAME_SDK bool CgSdkClearStateWithKey();
  67.  
  68.     CORSAIR_GAME_SDK bool CgSdkClearAllStates();
  69.  
  70.     CORSAIR_GAME_SDK bool CgSdkClearAllEvents();
  71.  
  72. #ifdef __cplusplus
  73. } //exten "C"
  74. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement