Make DiscIO/ mostly IWYU clean (and fix errors in rest of the project detected by this change).

This commit is contained in:
Pierre Bourdon 2014-02-21 01:47:53 +01:00
parent 83b7bb64aa
commit c698c07755
45 changed files with 219 additions and 50 deletions

View File

@ -6,6 +6,7 @@
#include "Common/CommonPaths.h"
#include "Common/FileUtil.h"
#include "Common/NandPaths.h"
#include "Core/ConfigManager.h"
#include "Core/PatchEngine.h"

View File

@ -7,6 +7,7 @@
#include "Common/CommonPaths.h"
#include "Common/FileUtil.h"
#include "Common/NandPaths.h"
#include "Common/SettingsHandler.h"
#include "Common/StringUtil.h"

View File

@ -2,16 +2,20 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include "Common/FileUtil.h"
#include <cstddef>
#include "DiscIO/BannerLoader.h"
#include "DiscIO/BannerLoaderGC.h"
#include "DiscIO/BannerLoaderWii.h"
#include "DiscIO/Filesystem.h"
#include "DiscIO/VolumeCreator.h"
namespace DiscIO
{
class IBannerLoader;
class IVolume;
IBannerLoader* CreateBannerLoader(DiscIO::IFileSystem& _rFileSystem, DiscIO::IVolume *pVolume)
{
if (IsVolumeWiiDisc(pVolume) || IsVolumeWadFile(pVolume))

View File

@ -7,10 +7,14 @@
#include <string>
#include <vector>
#include "DiscIO/Filesystem.h"
#include "Common/CommonTypes.h"
namespace DiscIO
{
class IFileSystem;
class IVolume;
class IBannerLoader
{
public:
@ -33,4 +37,5 @@ class IBannerLoader
};
IBannerLoader* CreateBannerLoader(DiscIO::IFileSystem& _rFileSystem, DiscIO::IVolume *pVolume);
} // namespace
} // namespace DiscIO

View File

@ -2,9 +2,16 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <cstddef>
#include <string>
#include <vector>
#include "Common/ColorUtil.h"
#include "Common/CommonTypes.h"
#include "Common/Common.h"
#include "DiscIO/BannerLoaderGC.h"
#include "DiscIO/Filesystem.h"
#include "DiscIO/Volume.h"
namespace DiscIO
{

View File

@ -4,13 +4,21 @@
#pragma once
#include "Common/StringUtil.h"
#include <cstring>
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
#include "DiscIO/BannerLoader.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeGC.h"
namespace DiscIO
{
class IFileSystem;
class CBannerLoaderGC
: public IBannerLoader
{

View File

@ -3,15 +3,19 @@
// Refer to the license.txt file included.
#include <algorithm>
#include <cstddef>
#include <cstdio>
#include <string>
#include <vector>
#include "Common/ColorUtil.h"
#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "Common/StringUtil.h"
#include "DiscIO/BannerLoaderWii.h"
#include "DiscIO/FileHandlerARC.h"
#include "DiscIO/VolumeCreator.h"
#include "DiscIO/Volume.h"
namespace DiscIO
{

View File

@ -4,10 +4,17 @@
#pragma once
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
#include "DiscIO/BannerLoader.h"
namespace DiscIO
{
class IVolume;
class CBannerLoaderWii
: public IBannerLoader
{
@ -60,4 +67,5 @@ class CBannerLoaderWii
bool GetStringFromComments(const CommentIndex index, std::string& s);
};
} // namespace

View File

@ -2,7 +2,12 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <cstddef>
#include <cstring>
#include <string>
#include "Common/CDUtils.h"
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "DiscIO/Blob.h"

View File

@ -3,9 +3,10 @@
// Refer to the license.txt file included.
#include <algorithm>
#include <cmath>
#include <cstdio>
#include "DiscIO/Blob.h"
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "DiscIO/CISOBlob.h"
namespace DiscIO

View File

@ -4,6 +4,9 @@
#pragma once
#include <cstdio>
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "DiscIO/Blob.h"

View File

@ -5,15 +5,19 @@
#ifdef _WIN32
#include <io.h>
#include <windows.h>
#else
#include <unistd.h>
#endif
#include <algorithm>
#include <cinttypes>
#include <cstdio>
#include <cstring>
#include <string>
#include <zlib.h>
#include "Common/Common.h"
#include "Common/FileUtil.h"
#include "Common/Hash.h"
#include "DiscIO/Blob.h"
#include "DiscIO/CompressedBlob.h"
#include "DiscIO/DiscScrubber.h"

View File

@ -16,6 +16,7 @@
#include <string>
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "DiscIO/Blob.h"

View File

@ -2,11 +2,18 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <algorithm>
#include <cinttypes>
#include <cstddef>
#include <cstdio>
#include <string>
#include <vector>
#include "Common/Common.h"
#include "Common/FileUtil.h"
#include "DiscIO/DiscScrubber.h"
#include "DiscIO/Filesystem.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeCreator.h"
namespace DiscIO

View File

@ -14,8 +14,8 @@
#pragma once
#include "Common/CommonTypes.h"
#include "DiscIO/Blob.h"
namespace File { class IOFile; }
namespace DiscIO
{

View File

@ -2,9 +2,18 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include "Common/StringUtil.h"
#include <cstdio>
#include <cstring>
#include "Common/Common.h"
#include "Common/FileUtil.h"
#include "DiscIO/Blob.h"
#include "DiscIO/DriveBlob.h"
#ifdef _WIN32
#include "Common/StringUtil.h"
#endif
namespace DiscIO
{

View File

@ -4,6 +4,7 @@
#pragma once
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "DiscIO/Blob.h"

View File

@ -4,6 +4,9 @@
#pragma once
#include <cstdio>
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "DiscIO/Blob.h"

View File

@ -2,10 +2,16 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <cstddef>
#include <cstdio>
#include <cstring>
#include <string>
#include "Common/Common.h"
#include "Common/FileUtil.h"
#include "Common/StringUtil.h"
#include "DiscIO/Blob.h"
#include "DiscIO/FileHandlerARC.h"
#include "DiscIO/Filesystem.h"
#define ARC_ID 0x55aa382d

View File

@ -4,6 +4,7 @@
#pragma once
#include <cstddef>
#include <string>
#include <vector>

View File

@ -3,18 +3,21 @@
// Refer to the license.txt file included.
#include <algorithm>
#include <iostream>
#include <cctype>
#include <cstring>
#include <string>
#include <vector>
#include "Common/Common.h"
#include "Common/IniFile.h"
#include "Common/LogManager.h"
#include "Common/StringUtil.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/Boot/Boot.h"
#include "DiscIO/FileSystemGCWii.h"
#include "DiscIO/Filesystem.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeCreator.h"
namespace FileMon

View File

@ -4,10 +4,9 @@
#pragma once
#include <iostream> // System: For std
#include "Common/Common.h" // Common: For u64
#include <string>
#include "Common/CommonTypes.h"
namespace FileMon
{

View File

@ -4,6 +4,8 @@
#include <algorithm>
#include <cinttypes>
#include <cstddef>
#include <cstring>
#include <string>
#include <vector>
@ -11,7 +13,9 @@
#include "Common/FileUtil.h"
#include "Common/StringUtil.h"
#include "DiscIO/Filesystem.h"
#include "DiscIO/FileSystemGCWii.h"
#include "DiscIO/Volume.h"
namespace DiscIO
{

View File

@ -4,13 +4,18 @@
#pragma once
#include <cstddef>
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
#include "DiscIO/Filesystem.h"
namespace DiscIO
{
class IVolume;
class CFileSystemGCWii : public IFileSystem
{
public:

View File

@ -4,7 +4,6 @@
#include "DiscIO/Filesystem.h"
#include "DiscIO/FileSystemGCWii.h"
#include "DiscIO/VolumeCreator.h"
namespace DiscIO
{

View File

@ -4,11 +4,17 @@
#pragma once
#include "DiscIO/Volume.h"
#include <cstddef>
#include <cstring>
#include <vector>
#include "Common/CommonTypes.h"
namespace DiscIO
{
class IVolume;
// file info of an FST entry
struct SFileInfo
{

View File

@ -2,16 +2,25 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <algorithm>
#include <cctype>
#include <cstddef>
#include <cstdio>
#include <cstring>
#include <functional>
#include <map>
#include <string>
#include <utility>
#include <vector>
#include <polarssl/aes.h>
#include "Common/Common.h"
#include "Common/FileUtil.h"
#include "Common/Log.h"
#include "Common/MathUtil.h"
#include "Common/NandPaths.h"
#include "Common/StringUtil.h"
#include "DiscIO/NANDContentLoader.h"
#include "DiscIO/Volume.h"
#include "DiscIO/WiiWad.h"
namespace DiscIO

View File

@ -4,15 +4,12 @@
#pragma once
#include <cstddef>
#include <map>
#include <string>
#include <vector>
#include "Common/Common.h"
#include "Common/FileUtil.h"
#include "Common/NandPaths.h"
#include "DiscIO/Blob.h"
#include "DiscIO/Volume.h"
namespace DiscIO

View File

@ -8,7 +8,6 @@
#include <vector>
#include "Common/Common.h"
#include "Common/StringUtil.h"
namespace DiscIO
{

View File

@ -2,6 +2,10 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <string>
#include <vector>
#include "Common/Common.h"
#include "DiscIO/Volume.h"
namespace DiscIO

View File

@ -2,15 +2,18 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <cstddef>
#include <cstring>
#include <string>
#include <vector>
#include <polarssl/aes.h>
#include "Common/Hash.h"
#include "Common/Common.h"
#include "Common/StringUtil.h"
#include "DiscIO/Blob.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeCreator.h"
#include "DiscIO/VolumeDirectory.h"
#include "DiscIO/VolumeGC.h"
#include "DiscIO/VolumeWad.h"

View File

@ -4,12 +4,18 @@
#pragma once
#include "DiscIO/Volume.h"
#include <string>
#include "Common/CommonTypes.h"
namespace DiscIO
{
class IVolume;
IVolume* CreateVolumeFromFilename(const std::string& _rFilename, u32 _PartitionGroup = 0, u32 _VolumeNum = -1);
IVolume* CreateVolumeFromDirectory(const std::string& _rDirectory, bool _bIsWii, const std::string& _rApploader = "", const std::string& _rDOL = "");
bool IsVolumeWiiDisc(const IVolume *_rVolume);
bool IsVolumeWadFile(const IVolume *_rVolume);
} // namespace

View File

@ -2,10 +2,20 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include "Common/CommonPaths.h"
#include "Common/MathUtil.h"
#include <algorithm>
#include <cstddef>
#include <cstring>
#include <map>
#include <string>
#include <utility>
#include <vector>
#include "Common/Common.h"
#include "Common/CommonPaths.h"
#include "Common/FileUtil.h"
#include "Common/MathUtil.h"
#include "DiscIO/FileBlob.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeDirectory.h"
namespace DiscIO

View File

@ -6,10 +6,13 @@
#include <map>
#include <string>
#include <vector>
#include "Common/FileUtil.h"
#include "Common/CommonTypes.h"
#include "DiscIO/Volume.h"
namespace File { struct FSTEntry; }
//
// --- this volume type is used for reading files directly from the hard drive ---
//

View File

@ -2,8 +2,15 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <cstddef>
#include <string>
#include <vector>
#include "Common/Common.h"
#include "Common/StringUtil.h"
#include "DiscIO/Blob.h"
#include "DiscIO/FileMonitor.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeGC.h"
namespace DiscIO

View File

@ -4,13 +4,19 @@
#pragma once
#include "DiscIO/Blob.h"
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
#include "DiscIO/Volume.h"
// --- this volume type is used for GC disc images ---
namespace DiscIO
{
class IBlobReader;
class CVolumeGC : public IVolume
{
public:

View File

@ -3,10 +3,15 @@
// Refer to the license.txt file included.
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <string>
#include <vector>
#include "Common/Common.h"
#include "Common/MathUtil.h"
#include "Common/StringUtil.h"
#include "DiscIO/Blob.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeWad.h"
#define ALIGN_40(x) ROUND_UP(Common::swap32(x), 0x40)

View File

@ -4,8 +4,10 @@
#pragma once
#include "DiscIO/Blob.h"
#include "DiscIO/NANDContentLoader.h"
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
#include "DiscIO/Volume.h"
// --- this volume type is used for Wad files ---
@ -14,6 +16,9 @@
namespace DiscIO
{
class IBlobReader;
class CVolumeWAD : public IVolume
{
public:

View File

@ -2,9 +2,16 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <cstddef>
#include <cstring>
#include <string>
#include <vector>
#include <polarssl/aes.h>
#include <polarssl/sha1.h>
#include "Common/StringUtil.h"
#include "Common/Common.h"
#include "DiscIO/Blob.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeGC.h"
#include "DiscIO/VolumeWiiCrypted.h"

View File

@ -4,15 +4,20 @@
#pragma once
#include <string>
#include <vector>
#include <polarssl/aes.h>
#include "DiscIO/Blob.h"
#include "Common/CommonTypes.h"
#include "DiscIO/Volume.h"
// --- this volume type is used for encrypted Wii images ---
namespace DiscIO
{
class IBlobReader;
class CVolumeWiiCrypted : public IVolume
{
public:

View File

@ -2,6 +2,13 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include "Common/Common.h"
#include "Common/FileUtil.h"
#include "DiscIO/WbfsBlob.h"

View File

@ -4,14 +4,15 @@
#pragma once
#include <vector>
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "DiscIO/Blob.h"
namespace DiscIO
{
struct wbfs_head_t;
class WbfsFileReader : public IBlobReader
{
WbfsFileReader(const char* filename);

View File

@ -3,13 +3,14 @@
// Refer to the license.txt file included.
#include <algorithm>
#include <cctype>
#include <cstddef>
#include <string>
#include "Common/Common.h"
#include "Common/FileUtil.h"
#include "Common/Log.h"
#include "Common/MathUtil.h"
#include "DiscIO/NANDContentLoader.h"
#include "DiscIO/Blob.h"
#include "DiscIO/WiiWad.h"
namespace DiscIO

View File

@ -4,17 +4,15 @@
#pragma once
#include <map>
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
#include "DiscIO/Blob.h"
#include "DiscIO/Volume.h"
namespace DiscIO
{
class IBlobReader;
class WiiWAD
{
public:

View File

@ -23,6 +23,7 @@ Core::GetWindowHandle().
#include "Common/Common.h"
#include "Common/FileSearch.h"
#include "Common/FileUtil.h"
#include "Common/NandPaths.h"
#include "Common/Timer.h"
#include "Core/BootManager.h"