~registry/dolphin-emu/triforce

« back to all changes in this revision

Viewing changes to Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.h

  • Committer: Sérgio Benjamim
  • Date: 2015-02-13 05:54:40 UTC
  • Revision ID: sergio_br2@yahoo.com.br-20150213055440-ey2rt3sjpy27km78
Dolphin Triforce branch from code.google, commit b957980 (4.0-315).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2013 Dolphin Emulator Project
 
2
// Licensed under GPLv2
 
3
// Refer to the license.txt file included.
 
4
 
 
5
#ifndef _WII_IPC_HLE_DEVICE_FS_H_
 
6
#define _WII_IPC_HLE_DEVICE_FS_H_
 
7
 
 
8
#include "WII_IPC_HLE_Device.h"
 
9
 
 
10
struct NANDStat
 
11
{
 
12
        u32 BlockSize;
 
13
        u32 FreeUserBlocks;
 
14
        u32 UsedUserBlocks;
 
15
        u32 FreeSysBlocks;
 
16
        u32 UsedSysBlocks;
 
17
        u32 Free_INodes;
 
18
        u32 Used_Inodes;
 
19
};
 
20
 
 
21
enum {
 
22
        FS_RESULT_OK                    =  0,
 
23
        FS_INVALID                              = -4,
 
24
        FS_DIRFILE_NOT_FOUND    = -6,
 
25
        FS_RESULT_FATAL                 = -101,
 
26
        FS_NO_ACCESS                    = -102,
 
27
        FS_FILE_EXIST                   = -105,
 
28
        FS_FILE_NOT_EXIST               = -106,
 
29
        FS_NO_HANDLE                    = -106,
 
30
};
 
31
 
 
32
class CWII_IPC_HLE_Device_fs : public IWII_IPC_HLE_Device
 
33
{
 
34
public:
 
35
 
 
36
        CWII_IPC_HLE_Device_fs(u32 _DeviceID, const std::string& _rDeviceName);
 
37
        virtual ~CWII_IPC_HLE_Device_fs();
 
38
 
 
39
        virtual void DoState(PointerWrap& p);
 
40
 
 
41
        virtual bool Open(u32 _CommandAddress, u32 _Mode);
 
42
        virtual bool Close(u32 _CommandAddress, bool _bForce);
 
43
 
 
44
        virtual bool IOCtl(u32 _CommandAddress);
 
45
        virtual bool IOCtlV(u32 _CommandAddress);
 
46
        
 
47
        virtual int GetCmdDelay(u32);
 
48
 
 
49
private:
 
50
 
 
51
        enum
 
52
        {
 
53
                IOCTL_GET_STATS         = 0x02,
 
54
                IOCTL_CREATE_DIR        = 0x03,
 
55
                IOCTLV_READ_DIR         = 0x04,
 
56
                IOCTL_SET_ATTR          = 0x05,
 
57
                IOCTL_GET_ATTR          = 0x06,
 
58
                IOCTL_DELETE_FILE       = 0x07,
 
59
                IOCTL_RENAME_FILE       = 0x08,
 
60
                IOCTL_CREATE_FILE       = 0x09,
 
61
                IOCTLV_GETUSAGE         = 0x0C,
 
62
                IOCTL_SHUTDOWN          = 0x0D
 
63
        };
 
64
 
 
65
        s32 ExecuteCommand(u32 Parameter, u32 _BufferIn, u32 _BufferInSize, u32 _BufferOut, u32 _BufferOutSize);
 
66
};
 
67
 
 
68
#endif
 
69