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 Package API
8//
9// Include this to get access to all Package-related Sentient features.
10
11#pragma once
12
13#include "SenClientTypes.h"
14
15
16namespace Sentient
17{
18 //==========================//
19 // //
20 // Package Data Types //
21 // //
22 //==========================//
23
24 /// Private.
25 struct SenPackageInfo;
26
27 /// @brief Basic file transfer information.
28 ///
29 /// @details Resource-specific data structures use this, or a SenFileTransferInfo,
30 /// to indicate how one can transfer a file to the console.
31 /// The internal package file download routine takes this structure directly.
32 ///
33 struct SenPackageFileTransferInfo
34 {
35 const SenPackageInfo *package;
36 const char *filename;
37 SenSysFileSize fileSize;
38
39 /// @brief Test to see if this contains a real file.
40 ///
41 /// @details Returns true if this structure appears to refer to an actual file,
42 /// but does not tell you if the file actually exists in a package.
43 /// Attempt to download the file to determine whether or not it exists.
44 ///
45 bool IsValid() const;
46
47 /// @brief Get the actual data size.
48 ///
49 /// @details Returns the exact size of the data--no rounding. Do NOT use this for
50 /// allocating destination buffers. Use GetBufferSize() for that.
51 ///
52 SenSysFileSize GetFileSize() const;
53
54 /// @brief Get the buffer size necessary to download the data.
55 ///
56 /// @details This will return a size which is greater than or equal to the data size.
57 /// It may be rounded up somewhat (to, e.g. a 2k boundary) for the purposes
58 /// of more efficient data transfers. Make absolutely certain that you use
59 /// THIS size for allocating destination buffers, and NOT GetFileSize().
60 ///
61 SenSysFileSize GetBufferSize() const;
62 };
63
64
65 //=========================//
66 // //
67 // Package Functions //
68 // //
69 //=========================//
70
71 // None at the moment.
72
73} // namespace Sentient