mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Use nested namespaces for IOS HLE
Pretty much all of the source files contain the following:
namespace IOS
{
namespace HLE
{
namespace <name>
{
// actual code here
} // namespace <name>
} // namespace HLE
} // namespace IOS
which is really verbose boilerplate, because most of the files inside
of Core/IOS are for IOS HLE.
This commit replaces that with a more concise `namespace IOS::HLE`
or `namespace IOS::HLE::(name)`.
This commit is contained in:
@@ -20,11 +20,7 @@
|
||||
#include "Core/IOS/ES/Formats.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
DI::DI(Kernel& ios, const std::string& device_name) : Device(ios, device_name)
|
||||
{
|
||||
@@ -123,6 +119,4 @@ IPCCommandResult DI::IOCtlV(const IOCtlVRequest& request)
|
||||
}
|
||||
return GetDefaultReply(return_value);
|
||||
}
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -18,11 +18,7 @@ namespace DVDInterface
|
||||
enum DIInterruptType : int;
|
||||
}
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
class DI : public Device
|
||||
{
|
||||
@@ -41,6 +37,4 @@ private:
|
||||
|
||||
std::deque<u32> m_commands_to_execute;
|
||||
};
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#include "Core/HW/SystemTimers.h"
|
||||
#include "Core/IOS/IOS.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
namespace IOS::HLE
|
||||
{
|
||||
Request::Request(const u32 address_) : address(address_)
|
||||
{
|
||||
@@ -205,5 +203,4 @@ IPCCommandResult Device::GetNoReply()
|
||||
return {IPC_SUCCESS, false, 0};
|
||||
}
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/IOS/IOS.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
namespace IOS::HLE
|
||||
{
|
||||
enum ReturnCode : s32
|
||||
{
|
||||
@@ -213,5 +211,4 @@ private:
|
||||
IPCCommandResult Unsupported(const Request& request);
|
||||
};
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE
|
||||
|
||||
@@ -6,11 +6,7 @@
|
||||
|
||||
#include "Common/Logging/Log.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
IPCCommandResult Stub::Open(const OpenRequest& request)
|
||||
{
|
||||
@@ -30,6 +26,4 @@ IPCCommandResult Stub::IOCtlV(const IOCtlVRequest& request)
|
||||
WARN_LOG(IOS, "%s faking IOCtlV()", m_name.c_str());
|
||||
return GetDefaultReply(IPC_SUCCESS);
|
||||
}
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -10,11 +10,7 @@
|
||||
#include "Core/IOS/Device.h"
|
||||
#include "Core/IOS/IOS.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
class Stub final : public Device
|
||||
{
|
||||
@@ -25,6 +21,4 @@ public:
|
||||
IPCCommandResult IOCtl(const IOCtlRequest& request) override;
|
||||
IPCCommandResult IOCtlV(const IOCtlVRequest& request) override;
|
||||
};
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -26,11 +26,7 @@
|
||||
#include "Core/IOS/Uids.h"
|
||||
#include "Core/IOS/VersionInfo.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
// Title to launch after IOS has been reset and reloaded (similar to /sys/launch.sys).
|
||||
static u64 s_title_to_launch;
|
||||
@@ -992,6 +988,4 @@ ReturnCode ES::VerifyContainer(VerifyContainerType type, VerifyMode mode,
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
struct TitleContext
|
||||
{
|
||||
@@ -365,6 +361,4 @@ private:
|
||||
ContextArray m_contexts;
|
||||
TitleContext m_title_context{};
|
||||
};
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
#include "Core/IOS/IOSC.h"
|
||||
#include "Core/IOS/Uids.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace ES
|
||||
namespace IOS::ES
|
||||
{
|
||||
constexpr size_t CONTENT_VIEW_SIZE = 0x10;
|
||||
|
||||
@@ -771,5 +769,4 @@ std::map<std::string, CertReader> ParseCertChain(const std::vector<u8>& chain)
|
||||
}
|
||||
return certs;
|
||||
}
|
||||
} // namespace ES
|
||||
} // namespace IOS
|
||||
} // namespace IOS::ES
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
#include "Core/IOS/IOSC.h"
|
||||
#include "Core/IOS/Uids.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
ReturnCode ES::GetDeviceId(u32* device_id) const
|
||||
{
|
||||
@@ -213,6 +209,4 @@ IPCCommandResult ES::VerifySign(const IOCtlVRequest& request)
|
||||
|
||||
return GetDefaultReply(VerifySign(hash, ecc_signature, certs));
|
||||
}
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -20,11 +20,7 @@
|
||||
#include "Core/IOS/ES/Formats.h"
|
||||
#include "Core/IOS/Uids.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
static IOS::ES::TMDReader FindTMD(FS::FileSystem* fs, u64 title_id, const std::string& tmd_path)
|
||||
{
|
||||
@@ -376,6 +372,4 @@ std::string ES::GetContentPath(const u64 title_id, const IOS::ES::Content& conte
|
||||
IOS::ES::SharedContentMap map{m_ios.GetFS()};
|
||||
return GetContentPath(title_id, content, map);
|
||||
}
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -14,11 +14,7 @@
|
||||
#include "Core/IOS/ES/Formats.h"
|
||||
#include "Core/IOS/Uids.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
s32 ES::OpenContent(const IOS::ES::TMDReader& tmd, u16 content_index, u32 uid)
|
||||
{
|
||||
@@ -168,6 +164,4 @@ IPCCommandResult ES::SeekContent(u32 uid, const IOCtlVRequest& request)
|
||||
|
||||
return GetDefaultReply(SeekContent(cfd, offset, mode, uid));
|
||||
}
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -13,11 +13,7 @@
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IOS/ES/Formats.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
// Used by the GetStoredContents ioctlvs. This assumes that the first output vector
|
||||
// is used for the content count (u32).
|
||||
@@ -243,6 +239,4 @@ IPCCommandResult ES::GetSharedContents(const IOCtlVRequest& request) const
|
||||
INFO_LOG(IOS_ES, "GetSharedContents: %u contents (%u requested)", count, max_count);
|
||||
return GetDefaultReply(IPC_SUCCESS);
|
||||
}
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -22,11 +22,7 @@
|
||||
#include "Core/IOS/FS/FileSystem.h"
|
||||
#include "Core/IOS/Uids.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
static ReturnCode WriteTicket(FS::FileSystem* fs, const IOS::ES::TicketReader& ticket)
|
||||
{
|
||||
@@ -851,6 +847,4 @@ IPCCommandResult ES::DeleteSharedContent(const IOCtlVRequest& request)
|
||||
Memory::CopyFromEmu(sha1.data(), request.in_vectors[0].address, request.in_vectors[0].size);
|
||||
return GetDefaultReply(DeleteSharedContent(sha1));
|
||||
}
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -19,11 +19,7 @@
|
||||
#include "Core/IOS/ES/Formats.h"
|
||||
#include "Core/IOS/VersionInfo.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
// HACK: Since we do not want to require users to install disc updates when launching
|
||||
// Wii games from the game list (which is the inaccurate game boot path anyway),
|
||||
@@ -412,6 +408,4 @@ IPCCommandResult ES::DIGetTMD(const IOCtlVRequest& request)
|
||||
Memory::CopyToEmu(request.io_vectors[0].address, tmd_bytes.data(), tmd_bytes.size());
|
||||
return GetDefaultReply(IPC_SUCCESS);
|
||||
}
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -95,9 +95,7 @@ static_assert(sizeof(BootMiiKeyDump) == 0x400, "Wrong size");
|
||||
#pragma pack(pop)
|
||||
} // end of anonymous namespace
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
namespace IOS::HLE
|
||||
{
|
||||
constexpr u32 DEFAULT_DEVICE_ID = 0x0403AC68;
|
||||
constexpr u32 DEFAULT_KEY_ID = 0x6AAB8C59;
|
||||
@@ -655,5 +653,4 @@ void IOSC::KeyEntry::DoState(PointerWrap& p)
|
||||
p.Do(data);
|
||||
p.Do(owner_mask);
|
||||
}
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE
|
||||
|
||||
@@ -23,11 +23,7 @@
|
||||
#include "Core/PowerPC/PPCSymbolDB.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace MIOS
|
||||
namespace IOS::HLE::MIOS
|
||||
{
|
||||
static void ReinitHardware()
|
||||
{
|
||||
@@ -81,6 +77,4 @@ bool Load()
|
||||
DVDInterface::UpdateRunningGameMetadata();
|
||||
return true;
|
||||
}
|
||||
} // namespace MIOS
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::MIOS
|
||||
|
||||
@@ -4,13 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace MIOS
|
||||
namespace IOS::HLE::MIOS
|
||||
{
|
||||
bool Load();
|
||||
} // namespace MIOS
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::MIOS
|
||||
|
||||
@@ -55,11 +55,7 @@
|
||||
#define UNSUPPORTED_WSAPOLL 0
|
||||
#endif
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
{
|
||||
namespace Device
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
enum SOResultCode : s32
|
||||
{
|
||||
@@ -1111,6 +1107,4 @@ IPCCommandResult NetIPTop::HandleICMPPingRequest(const IOCtlVRequest& request)
|
||||
// TODO proper error codes
|
||||
return GetDefaultReply(0);
|
||||
}
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE::Device
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
namespace HLE
|
||||
namespace IOS::HLE
|
||||
{
|
||||
enum NET_IOCTL
|
||||
{
|
||||
@@ -100,5 +98,4 @@ private:
|
||||
#endif
|
||||
};
|
||||
} // namespace Device
|
||||
} // namespace HLE
|
||||
} // namespace IOS
|
||||
} // namespace IOS::HLE
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user