the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 170 lines 6.6 kB view raw
1/******************************************************** 2* * 3* Copyright (C) Microsoft. All rights reserved. * 4* * 5********************************************************/ 6 7// Sentient Client DynamicConfig API 8// 9// Include this to get access to all DynamicConfig-related Sentient features 10 11#pragma once 12 13#include "SenClientSys.h" 14 15namespace Sentient 16{ 17 18 /// @brief Gets the size of a config file, so memory can be allocated 19 /// 20 /// @param[in] titleID 21 /// Which title's config file to search for. 22 /// 23 /// @param[in] resourceID 24 /// Which config file to find. 25 /// 26 /// @param[out] out_size 27 /// The size of the file, in bytes. 28 /// 29 /// @param[in] userCallback 30 /// If this call returns a success code, the userCallback will be called at the end of the asynchronous process. 31 /// 32 /// @param[in] userCallbackData 33 /// Data to be passed to the @a userCallback on completion. 34 /// 35 /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: 36 /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. 37 /// E_POINTER: size is NULL. 38 /// E_FAIL: Failed to spawn server call. 39 /// S_OK: Server call spawned successfully. 40 /// 41 /// @details Search the service for a specific config file at the current time. 42 /// 43 /// @related SenDynamicConfigFileGetBytes() 44 /// 45 HRESULT SenDynamicConfigGetSize( 46 __in unsigned int titleID, 47 __in unsigned int resourceID, 48 __out size_t* out_size, 49 __in SenSysCompletedCallback userCallback, 50 __in void *userCallbackData ); 51 52 53 /// @brief Gets the size of a config file, so memory can be allocated 54 /// 55 /// @param[in] resourceID 56 /// Which config file to find. 57 /// 58 /// @param[out] out_size 59 /// The size of the file, in bytes. 60 /// 61 /// @param[in] userCallback 62 /// If this call returns a success code, the userCallback will be called at the end of the asynchronous process. 63 /// 64 /// @param[in] userCallbackData 65 /// Data to be passed to the @a userCallback on completion. 66 /// 67 /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: 68 /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. 69 /// E_POINTER: size is NULL. 70 /// E_FAIL: Failed to spawn server call. 71 /// S_OK: Server call spawned successfully. 72 /// 73 /// @details Search the service for a specific config file at the current time. 74 /// 75 /// @related SenDynamicConfigFileGetBytes() 76 /// 77 __inline HRESULT SenDynamicConfigGetSize( 78 __in unsigned int resourceID, 79 __out size_t* out_size, 80 __in SenSysCompletedCallback userCallback, 81 __in void *userCallbackData ) 82 { 83 return SenDynamicConfigGetSize(SenSysTitleID_This, resourceID, out_size, userCallback, userCallbackData); 84 } 85 86 87 /// @brief Gets the contents of a config file 88 /// 89 /// @param[in] titleID 90 /// Which title's config file to search for. 91 /// 92 /// @param[in] resourceID 93 /// Which config file to return. 94 /// 95 /// @param[in] dataSizeMax 96 /// Maximum number of bytes to return. 97 /// 98 /// @param[out] out_bytesWritten 99 /// The number of bytes written into the buffer. 100 /// 101 /// @param[out] out_data 102 /// The buffer that receives the contents of the file. 103 /// 104 /// @param[in] userCallback 105 /// If this call returns a success code, the userCallback will be called at the end of the asynchronous process. 106 /// 107 /// @param[in] userCallbackData 108 /// Data to be passed to the @a userCallback on completion. 109 /// 110 /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: 111 /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. 112 /// E_POINTER: out_data is NULL. 113 /// E_FAIL: Failed to spawn server call. 114 /// S_OK: Server call spawned successfully. 115 /// 116 /// @details Search the service for a specific config file at the current time. 117 /// 118 /// @related SenDynamicConfigFileGetSize() 119 /// 120 HRESULT SenDynamicConfigGetBytes( 121 __in unsigned int titleID, 122 __in unsigned int resourceID, 123 __in size_t dataSizeMax, 124 __out_opt size_t* out_bytesWritten, 125 __out void *out_data, 126 __in SenSysCompletedCallback userCallback, 127 __in void *userCallbackData ); 128 129 130 /// @brief Gets the contents of a config file 131 /// 132 /// @param[in] resourceID 133 /// Which config file to return. 134 /// 135 /// @param[in] dataSizeMax 136 /// Maximum number of bytes to return. 137 /// 138 /// @param[out] out_bytesWritten 139 /// The number of bytes written into the buffer. 140 /// 141 /// @param[out] out_data 142 /// The buffer that receives the contents of the file. 143 /// 144 /// @param[in] userCallback 145 /// If this call returns a success code, the userCallback will be called at the end of the asynchronous process. 146 /// 147 /// @param[in] userCallbackData 148 /// Data to be passed to the @a userCallback on completion. 149 /// 150 /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: 151 /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. 152 /// E_POINTER: out_data is NULL. 153 /// E_FAIL: Failed to spawn server call. 154 /// S_OK: Server call spawned successfully. 155 /// 156 /// @details Search the service for a specific config file at the current time. 157 /// 158 /// @related SenDynamicConfigFileGetSize() 159 /// 160 __inline HRESULT SenDynamicConfigGetBytes( 161 __in unsigned int resourceID, 162 __in size_t dataSizeMax, 163 __out_opt size_t* out_bytesWritten, 164 __out void *out_data, 165 __in SenSysCompletedCallback userCallback, 166 __in void *userCallbackData ) 167 { 168 return SenDynamicConfigGetBytes(SenSysTitleID_This, resourceID, dataSizeMax, out_bytesWritten, out_data, userCallback, userCallbackData); 169 } 170}