the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1/********************************************************
2* *
3* Copyright (C) Microsoft. All rights reserved. *
4* *
5********************************************************/
6
7// Sentient Client ConfigFile API
8//
9// Include this to get access to all ConfigFile-related Sentient features.
10
11#pragma once
12
13#include "SenClientRawData.h"
14#include "SenClientResource.h"
15#include "SenClientSys.h"
16
17
18namespace Sentient
19{
20 //==============================//
21 // //
22 // Game Config File Types //
23 // //
24 //==============================//
25
26 /// @brief Basic config file information.
27 ///
28 /// @details This structure contains the original uploaded info plus any info implied by the raw data that was uploaded (e.g. data sizes).
29 ///
30 struct SenConfigInfo : public SenResourceInfo
31 {
32 SenRawDataTransferInfo config; ///< Points to a generic data block, whose format is determined by the game.
33 };
34
35
36 //==================================//
37 // //
38 // Game Config File Functions //
39 // //
40 //==================================//
41
42 /// @brief Find a config file by ID.
43 ///
44 /// @param[in] resourceID
45 /// Which config file to find, e.g. "SenResourceID_Config_0 + 4".
46 ///
47 /// @param[out] out_configInfo
48 /// The structure to fill in with the found information.
49 ///
50 /// @param[in] userCallback
51 /// If this call returns a success code, the userCallback will be called at the end of the asynchronous process.
52 ///
53 /// @param[in] userCallbackData
54 /// Data to be passed to the @a userCallback on completion.
55 ///
56 /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
57 /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
58 /// E_POINTER: out_configInfo is NULL.
59 /// E_FAIL: Failed to spawn server call.
60 /// S_OK: Server call spawned successfully.
61 ///
62 /// @details Search the database for a specific config file at the current time.
63 ///
64 /// @deprecated This function is deprecated. Use SenDynamicConfigGetSize() instead
65 ///
66 /// @related SenConfigFileDownload()
67 ///
68 __declspec(deprecated("Use SenDynamicConfigGetSize() instead"))
69 HRESULT SenConfigFileFind(
70 SenResourceID resourceID,
71 SenConfigInfo *out_configInfo,
72 SenSysCompletedCallback userCallback,
73 void *userCallbackData );
74
75 /// @brief Download the raw config file data to the client.
76 ///
77 /// @param[in] configInfo
78 /// The info describing the attributes and data of the config file.
79 /// This is obtained from SenConfigFileFind().
80 ///
81 /// @param[in] dataSizeMax
82 /// Used to indicate the size of the buffer pointed to by @a out_data.
83 /// If the actual size of the data exceeds this, you will receive an error.
84 /// It is assumed that this is at least @a configInfo.config.GetBufferSize() bytes.
85 ///
86 /// @param[out] out_data
87 /// The buffer to fill in with the raw image data.
88 ///
89 /// @param[in] userCallback
90 /// If this call returns a success code, the userCallback will be called at the end of the asynchronous process.
91 ///
92 /// @param[in] userCallbackData
93 /// Data to be passed to the @a userCallback on completion.
94 ///
95 /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
96 /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
97 /// E_INVALIDARG: configInfo.resourceID or configInfo.config is invalid.
98 /// E_POINTER: out_data is NULL.
99 /// E_FAIL: Failed to spawn server call.
100 /// S_OK: Server call spawned successfully.
101 ///
102 /// @details The data format is determined entirely by the game code and is never examined or processed by Sentient.
103 ///
104 /// @deprecated This function is deprecated. Use SenDynamicConfigGetSize() instead
105 ///
106 /// @related SenConfigFileFind()
107 ///
108 __declspec(deprecated("Use SenDynamicConfigGetBytes() instead"))
109 HRESULT SenConfigFileDownload(
110 const SenConfigInfo &configInfo,
111 size_t dataSizeMax,
112 void *out_data,
113 SenSysCompletedCallback userCallback,
114 void *userCallbackData );
115
116} // namespace Sentient