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 XML API
8//
9// Include this to get access to all XML Sentient features.
10
11#pragma once
12
13#include "SenClientTypes.h"
14
15
16namespace Sentient
17{
18 //======================//
19 // //
20 // XML Data Types //
21 // //
22 //======================//
23
24 /// @brief An easy-to-access pre-parsed XML.
25 ///
26 /// @details This holds some easily-traversible, easily-searchible representations
27 /// of the content of a raw UTF-8 XML buffer.
28 ///
29 /// @related SenXMLParse()
30 /// @related SenXMLDestroy()
31 ///
32 struct SenXML
33 {
34 void *reserved;
35 };
36
37
38 //=====================//
39 // //
40 // XML Functions //
41 // //
42 //=====================//
43
44 /// @brief Parse a raw UTF-8 XML buffer into a more useful format.
45 ///
46 /// @param[in] source
47 /// The raw UTF-8 XML buffer to be parsed.
48 ///
49 /// @param[out] out_senXML
50 /// The (private) object to hold the parsed data.
51 ///
52 /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
53 /// E_POINTER: Bad pointer to the raw XML buffer.
54 /// E_OUTOFMEMORY: Couldn't parse due to lack of memory.
55 /// E_FAIL: Failed to parse for unspecified reason.
56 /// S_OK: Parsed successfully.
57 ///
58 /// @details It is expensive to parse an XML file directly for each attribute fetch.
59 /// Thus, we pre-parse the whole thing once after (down)loading it and then
60 /// pass the parsed data to the fetch routines.
61 ///
62 /// @related SenXMLDestroy()
63 ///
64 HRESULT SenXMLParse(
65 const char *source,
66 SenXML *out_senXML );
67
68 /// @brief Free the resources/memory associated with a parsed XML file.
69 ///
70 /// @param[in] senXML
71 /// The (private) object holding the parsed data to be freed.
72 ///
73 /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
74 /// E_INVALIDARG: senXML is not a parsed XML.
75 /// S_OK: Destroyed/freed successfully.
76 ///
77 /// @details A parsed XML takes up some extra memory. Once done with its contents,
78 /// you should call this routine to free it up.
79 ///
80 /// @related SenXMLParse()
81 ///
82 HRESULT SenXMLDestroy(
83 SenXML &senXML );
84
85} // namespace Sentient