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 RawData API
8//
9// Include this to get access to all RawData-related Sentient features.
10
11#pragma once
12
13#include "SenClientFile.h"
14#include "SenClientPackage.h"
15
16
17namespace Sentient
18{
19 //==========================//
20 // //
21 // RawData Data Types //
22 // //
23 //==========================//
24
25 /// @brief Raw data transfer information type.
26 ///
27 /// @details Used to denote what kind of raw data is being described in a SenRawDataTransferInfo.
28 ///
29 enum SenRawDataType
30 {
31 /// A SenRawDataTransferInfo with this type contains nothing.
32 SenRawDataType_Invalid,
33
34 /// A SenRawDataTransferInfo with this type contains a SenFileTransferInfo.
35 SenRawDataType_File,
36
37 /// A SenRawDataTransferInfo with this type contains a SenPackageFileTransferInfo.
38 SenRawDataType_Package,
39 };
40
41 /// @brief Basic raw data transfer information.
42 ///
43 /// @details This structure contains enough information to retrieve any data.
44 /// Note: The choice of package vs. file is made internally.
45 /// Developers may use these struct contents for debugging purposes, but
46 /// should never rely on anything below the level of this struct and its
47 /// methods in their own code. All manipulation/exploration should be API-based.
48 ///
49 struct SenRawDataTransferInfo
50 {
51 SenRawDataType type; ///< Indicates which part of the union below to use.
52 union
53 {
54 SenFileTransferInfo file; ///< Only valid if type == SenRawDataType_File;
55 SenPackageFileTransferInfo package; ///< Only valid if type == SenRawDataType_Package;
56 };
57
58 /// @brief Test to see if this contains a real file.
59 ///
60 /// @details Returns true if this structure appears to refer to an actual file,
61 /// but does not tell you if the file actually exists.
62 /// Attempt to download the file to determine whether or not it exists.
63 ///
64 bool IsValid() const;
65
66 /// @brief Get the actual data size.
67 ///
68 /// @details Returns the exact size of the data--no rounding. Do NOT use this for
69 /// allocating destination buffers. Use GetBufferSize() for that.
70 ///
71 SenSysFileSize GetFileSize() const;
72
73 /// @brief Get the buffer size necessary to download the data.
74 ///
75 /// @details This will return a size which is greater than or equal to the data size.
76 /// It may be rounded up somewhat (to, e.g. a 2k boundary) for the purposes
77 /// of more efficient data transfers. Make absolutely certain that you use
78 /// THIS size for allocating destination buffers, and NOT GetFileSize().
79 ///
80 SenSysFileSize GetBufferSize() const;
81 };
82
83} // namespace Sentient