1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     fs_FileInputStream.h
4 
5   Copyright (C)2009-2012 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 46347 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_FS_FS_FILEINPUTSTREAM_H_
17 #define NN_FS_FS_FILEINPUTSTREAM_H_
18 
19 #include <nn/fs/fs_IInputStream.h>
20 #include <nn/fs/fs_FileBase.h>
21 #include <nn/fnd/fnd_Storage.h>
22 
23 namespace nn { namespace fs {
24 
25 /* Please see man pages for details
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 */
37 class FileInputStream : public IInputStream, public detail::FileBase, private nn::util::NonCopyable<FileInputStream>
38 {
39 public:
40 
41     /* Please see man pages for details
42 
43 
44 
45 
46 
47 
48 
49     */
FileInputStream()50     FileInputStream() {}
51 
52     /* Please see man pages for details
53 
54 
55 
56 
57 
58 
59 
60     */
FileInputStream(const wchar_t * pathName)61     explicit FileInputStream(const wchar_t* pathName) : detail::FileBase(pathName, OPEN_MODE_READ) {}
62 
63     /* Please see man pages for details
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74     */
FileInputStream(const char * pathName)75     explicit FileInputStream(const char* pathName) : detail::FileBase(pathName, OPEN_MODE_READ) {}
76 
77     /* Please see man pages for details
78 
79 
80 
81 
82 
83 
84 
85 
86     */
Initialize(const wchar_t * pathName)87     void Initialize(const wchar_t* pathName) { detail::FileBase::Initialize(pathName, OPEN_MODE_READ); }
88 
89     /* Please see man pages for details
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101     */
Initialize(const char * pathName)102     void Initialize(const char* pathName) { detail::FileBase::Initialize(pathName, OPEN_MODE_READ); }
103 
104     /* Please see man pages for details
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
117     */
TryInitialize(const wchar_t * pathName)118     Result TryInitialize(const wchar_t* pathName) { return detail::FileBase::TryInitialize(pathName, OPEN_MODE_READ); }
119 
120     /* Please see man pages for details
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136     */
TryInitialize(const char * pathName)137     Result TryInitialize(const char* pathName) { return detail::FileBase::TryInitialize(pathName, OPEN_MODE_READ); }
138 
139     /* Please see man pages for details
140 
141 
142 
143     */
Finalize()144     void Finalize() { detail::FileBase::Finalize(); }
145 
146     /* Please see man pages for details
147 
148 
149 
150     */
~FileInputStream()151     virtual ~FileInputStream() {}
152 
153     /* Please see man pages for details
154 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165     */
Read(void * buffer,size_t size)166     virtual s32 Read(void* buffer, size_t size) { return detail::FileBase::Read(buffer, size); }
167 
168     /* Please see man pages for details
169 
170 
171 
172 
173 
174 
175 
176 
177 
178 
179 
180 
181     */
TryRead(s32 * pOut,void * buffer,size_t size)182     virtual Result TryRead(s32* pOut, void* buffer, size_t size) { return detail::FileBase::TryRead(pOut, buffer, size); }
183 
184     /* Please see man pages for details
185 
186 
187 
188 
189 
190 
191     */
Seek(s64 position,PositionBase base)192     virtual void Seek(s64 position, PositionBase base) { detail::FileBase::Seek(position, base); }
193 
194     /* Please see man pages for details
195 
196 
197 
198 
199 
200 
201 
202 
203     */
TrySeek(s64 position,PositionBase base)204     virtual Result TrySeek(s64 position, PositionBase base) { return detail::FileBase::TrySeek(position, base); }
205 
206     /* Please see man pages for details
207 
208 
209 
210     */
GetPosition()211     virtual s64 GetPosition() const { return detail::FileBase::GetPosition(); }
212 
213     /* Please see man pages for details
214 
215 
216 
217 
218 
219     */
TryGetPosition(s64 * pOut)220     virtual Result TryGetPosition(s64* pOut) const { return detail::FileBase::TryGetPosition(pOut); }
221 
222     /* Please see man pages for details
223 
224 
225 
226 
227 
228 
229     */
SetPosition(s64 position)230     virtual void SetPosition(s64 position) { detail::FileBase::SetPosition(position); }
231 
232     /* Please see man pages for details
233 
234 
235 
236 
237 
238     */
TrySetPosition(s64 position)239     virtual Result TrySetPosition(s64 position) { return detail::FileBase::TrySetPosition(position); }
240 
241     /* Please see man pages for details
242 
243 
244 
245     */
GetSize()246     virtual s64 GetSize() const { return detail::FileBase::GetSize(); }
247 
248     /* Please see man pages for details
249 
250 
251 
252 
253 
254     */
TryGetSize(s64 * pOut)255     virtual Result TryGetSize(s64* pOut) const { return detail::FileBase::TryGetSize(pOut); }
256 
257     /* Please see man pages for details
258 
259 
260 
261 
262 
263 
264 
265     */
SetPriority(s32 priority)266     void SetPriority(s32 priority) { detail::FileBase::SetPriority(priority); }
267 
268     /* Please see man pages for details
269 
270 
271 
272 
273 
274 
275 
276 
277 
278     */
TrySetPriority(s32 priority)279     Result TrySetPriority(s32 priority) { return detail::FileBase::TrySetPriority(priority); }
280 
281 
282     /* Please see man pages for details
283 
284 
285 
286 
287 
288 
289 
290     */
GetPriority(s32 * pOut)291     void GetPriority(s32* pOut) const { detail::FileBase::GetPriority(pOut); }
292 
293     /* Please see man pages for details
294 
295 
296 
297 
298 
299 
300 
301 
302 
303 
304     */
TryGetPriority(s32 * pOut)305     Result TryGetPriority(s32* pOut) const { return detail::FileBase::TryGetPriority(pOut); }
306 };
307 
308 }}
309 
310 #endif
311