OSDN Git Service

XAudio2を試す前のバックアップ。
[shooting3/shootinggame.git] / ShootingGame / BasicReaderWriter.h
1 //// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
2 //// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3 //// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
4 //// PARTICULAR PURPOSE.
5 ////
6 //// Copyright (c) Microsoft Corporation. All rights reserved
7
8 #pragma once
9
10 // Define the arguments for the async callbacks.
11 delegate void ReadDataAsyncCallback(Platform::Array<byte>^, Windows::Foundation::AsyncStatus);
12 delegate void WriteDataAsyncCallback(Windows::Foundation::AsyncStatus);
13
14 ref class BasicReaderWriter
15 {
16 private:
17     Windows::Storage::StorageFolder^ m_location;
18     Platform::String^ m_locationPath;
19
20 public:
21     BasicReaderWriter();
22     BasicReaderWriter(
23         _In_ Windows::Storage::StorageFolder^ folder
24         );
25
26     Platform::Array<byte>^ ReadData(
27         _In_ Platform::String^ filename
28         );
29
30     void ReadDataAsync(
31         _In_ Platform::String^ filename,
32         _In_ ReadDataAsyncCallback^ callback
33         );
34
35     uint32 WriteData(
36         _In_ Platform::String^ filename,
37         _In_ Platform::Array<byte>^ fileData
38         );
39
40     void WriteDataAsync(
41         _In_ Platform::String^ filename,
42         _In_ Platform::Array<byte>^ fileData,
43         _In_ WriteDataAsyncCallback^ callback
44         );
45 };