Sources: Run clang-format on everything.

This commit is contained in:
Emmanuel Gil Peyrot 2016-09-18 09:38:01 +09:00
parent fe948af095
commit dc8479928c
386 changed files with 19560 additions and 18080 deletions

View file

@ -6,19 +6,19 @@
#include "common/logging/log.h"
#include "core/hle/service/service.h"
#include "core/hle/service/am/am.h"
#include "core/hle/service/am/am_app.h"
#include "core/hle/service/am/am_net.h"
#include "core/hle/service/am/am_sys.h"
#include "core/hle/service/am/am_u.h"
#include "core/hle/service/service.h"
namespace Service {
namespace AM {
static std::array<u32, 3> am_content_count = { 0, 0, 0 };
static std::array<u32, 3> am_titles_count = { 0, 0, 0 };
static std::array<u32, 3> am_titles_list_count = { 0, 0, 0 };
static std::array<u32, 3> am_content_count = {0, 0, 0};
static std::array<u32, 3> am_titles_count = {0, 0, 0};
static std::array<u32, 3> am_titles_list_count = {0, 0, 0};
static u32 am_ticket_count = 0;
static u32 am_ticket_list_count = 0;
@ -29,7 +29,8 @@ void GetTitleCount(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = am_titles_count[media_type];
LOG_WARNING(Service_AM, "(STUBBED) media_type=%u, title_count=0x%08x", media_type, am_titles_count[media_type]);
LOG_WARNING(Service_AM, "(STUBBED) media_type=%u, title_count=0x%08x", media_type,
am_titles_count[media_type]);
}
void FindContentInfos(Service::Interface* self) {
@ -43,8 +44,10 @@ void FindContentInfos(Service::Interface* self) {
am_content_count[media_type] = cmd_buff[4];
cmd_buff[1] = RESULT_SUCCESS.raw;
LOG_WARNING(Service_AM, "(STUBBED) media_type=%u, title_id=0x%016llx, content_cound=%u, content_ids_pointer=0x%08x, content_info_pointer=0x%08x",
media_type, title_id, am_content_count[media_type], content_ids_pointer, content_info_pointer);
LOG_WARNING(Service_AM, "(STUBBED) media_type=%u, title_id=0x%016llx, content_cound=%u, "
"content_ids_pointer=0x%08x, content_info_pointer=0x%08x",
media_type, title_id, am_content_count[media_type], content_ids_pointer,
content_info_pointer);
}
void ListContentInfos(Service::Interface* self) {
@ -59,8 +62,10 @@ void ListContentInfos(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = am_content_count[media_type];
LOG_WARNING(Service_AM, "(STUBBED) media_type=%u, content_count=%u, title_id=0x%016" PRIx64 ", start_index=0x%08x, content_info_pointer=0x%08X",
media_type, am_content_count[media_type], title_id, start_index, content_info_pointer);
LOG_WARNING(Service_AM, "(STUBBED) media_type=%u, content_count=%u, title_id=0x%016" PRIx64
", start_index=0x%08x, content_info_pointer=0x%08X",
media_type, am_content_count[media_type], title_id, start_index,
content_info_pointer);
}
void DeleteContents(Service::Interface* self) {
@ -73,8 +78,9 @@ void DeleteContents(Service::Interface* self) {
am_content_count[media_type] = cmd_buff[4];
cmd_buff[1] = RESULT_SUCCESS.raw;
LOG_WARNING(Service_AM, "(STUBBED) media_type=%u, title_id=0x%016" PRIx64 ", content_count=%u, content_ids_pointer=0x%08x",
media_type, title_id, am_content_count[media_type], content_ids_pointer);
LOG_WARNING(Service_AM, "(STUBBED) media_type=%u, title_id=0x%016" PRIx64
", content_count=%u, content_ids_pointer=0x%08x",
media_type, title_id, am_content_count[media_type], content_ids_pointer);
}
void GetTitleList(Service::Interface* self) {
@ -87,8 +93,10 @@ void GetTitleList(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = am_titles_list_count[media_type];
LOG_WARNING(Service_AM, "(STUBBED) media_type=%u, titles_list_count=0x%08X, title_ids_output_pointer=0x%08X",
media_type, am_titles_list_count[media_type], title_ids_output_pointer);
LOG_WARNING(
Service_AM,
"(STUBBED) media_type=%u, titles_list_count=0x%08X, title_ids_output_pointer=0x%08X",
media_type, am_titles_list_count[media_type], title_ids_output_pointer);
}
void GetTitleInfo(Service::Interface* self) {
@ -101,7 +109,8 @@ void GetTitleInfo(Service::Interface* self) {
am_titles_count[media_type] = cmd_buff[2];
cmd_buff[1] = RESULT_SUCCESS.raw;
LOG_WARNING(Service_AM, "(STUBBED) media_type=%u, total_titles=0x%08X, title_id_list_pointer=0x%08X, title_list_pointer=0x%08X",
LOG_WARNING(Service_AM, "(STUBBED) media_type=%u, total_titles=0x%08X, "
"title_id_list_pointer=0x%08X, title_list_pointer=0x%08X",
media_type, am_titles_count[media_type], title_id_list_pointer, title_list_pointer);
}
@ -122,8 +131,9 @@ void ListDataTitleTicketInfos(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = am_ticket_count;
LOG_WARNING(Service_AM, "(STUBBED) ticket_count=0x%08X, title_id=0x%016" PRIx64 ", start_index=0x%08X, ticket_info_pointer=0x%08X",
am_ticket_count, title_id, start_index, ticket_info_pointer);
LOG_WARNING(Service_AM, "(STUBBED) ticket_count=0x%08X, title_id=0x%016" PRIx64
", start_index=0x%08X, ticket_info_pointer=0x%08X",
am_ticket_count, title_id, start_index, ticket_info_pointer);
}
void GetNumContentInfos(Service::Interface* self) {
@ -140,7 +150,7 @@ void DeleteTicket(Service::Interface* self) {
u64 title_id = (static_cast<u64>(cmd_buff[2]) << 32) | cmd_buff[1];
cmd_buff[1] = RESULT_SUCCESS.raw;
LOG_WARNING(Service_AM, "(STUBBED) called title_id=0x%016" PRIx64 "",title_id);
LOG_WARNING(Service_AM, "(STUBBED) called title_id=0x%016" PRIx64 "", title_id);
}
void GetTicketCount(Service::Interface* self) {
@ -148,7 +158,7 @@ void GetTicketCount(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = am_ticket_count;
LOG_WARNING(Service_AM, "(STUBBED) called ticket_count=0x%08x",am_ticket_count);
LOG_WARNING(Service_AM, "(STUBBED) called ticket_count=0x%08x", am_ticket_count);
}
void GetTicketList(Service::Interface* self) {
@ -161,8 +171,10 @@ void GetTicketList(Service::Interface* self) {
cmd_buff[1] = RESULT_SUCCESS.raw;
cmd_buff[2] = am_ticket_list_count;
LOG_WARNING(Service_AM, "(STUBBED) ticket_list_count=0x%08x, num_of_skip=0x%08x, ticket_list_pointer=0x%08x",
am_ticket_list_count, num_of_skip, ticket_list_pointer);
LOG_WARNING(
Service_AM,
"(STUBBED) ticket_list_count=0x%08x, num_of_skip=0x%08x, ticket_list_pointer=0x%08x",
am_ticket_list_count, num_of_skip, ticket_list_pointer);
}
void Init() {
@ -175,7 +187,6 @@ void Init() {
}
void Shutdown() {
}
} // namespace AM

View file

@ -9,14 +9,14 @@ namespace Service {
namespace AM {
const Interface::FunctionInfo FunctionTable[] = {
{0x100100C0, GetNumContentInfos, "GetNumContentInfos"},
{0x10020104, FindContentInfos, "FindContentInfos"},
{0x10030142, ListContentInfos, "ListContentInfos"},
{0x10040102, DeleteContents, "DeleteContents"},
{0x10050084, GetDataTitleInfos, "GetDataTitleInfos"},
{0x10070102, ListDataTitleTicketInfos, "ListDataTitleTicketInfos"},
{0x100900C0, nullptr, "IsDataTitleInUse"},
{0x100A0000, nullptr, "IsExternalTitleDatabaseInitialized"},
{0x100100C0, GetNumContentInfos, "GetNumContentInfos"},
{0x10020104, FindContentInfos, "FindContentInfos"},
{0x10030142, ListContentInfos, "ListContentInfos"},
{0x10040102, DeleteContents, "DeleteContents"},
{0x10050084, GetDataTitleInfos, "GetDataTitleInfos"},
{0x10070102, ListDataTitleTicketInfos, "ListDataTitleTicketInfos"},
{0x100900C0, nullptr, "IsDataTitleInUse"},
{0x100A0000, nullptr, "IsExternalTitleDatabaseInitialized"},
};
AM_APP_Interface::AM_APP_Interface() {

View file

@ -9,61 +9,61 @@ namespace Service {
namespace AM {
const Interface::FunctionInfo FunctionTable[] = {
{0x00010040, GetTitleCount, "GetTitleCount"},
{0x00020082, GetTitleList, "GetTitleList"},
{0x00030084, GetTitleInfo, "GetTitleInfo"},
{0x000400C0, nullptr, "DeleteApplicationTitle"},
{0x000500C0, nullptr, "GetTitleProductCode"},
{0x000600C0, nullptr, "GetTitleExtDataId"},
{0x00070080, DeleteTicket, "DeleteTicket"},
{0x00080000, GetTicketCount, "GetTicketCount"},
{0x00090082, GetTicketList, "GetTicketList"},
{0x000A0000, nullptr, "GetDeviceID"},
{0x000D0084, nullptr, "GetPendingTitleInfo"},
{0x000E00C0, nullptr, "DeletePendingTitle"},
{0x00140040, nullptr, "FinalizePendingTitles"},
{0x00150040, nullptr, "DeleteAllPendingTitles"},
{0x00180080, nullptr, "InitializeTitleDatabase"},
{0x00190040, nullptr, "ReloadDBS"},
{0x001A00C0, nullptr, "GetDSiWareExportSize"},
{0x001B0144, nullptr, "ExportDSiWare"},
{0x001C0084, nullptr, "ImportDSiWare"},
{0x00230080, nullptr, "TitleIDListGetTotal2"},
{0x002400C2, nullptr, "GetTitleIDList2"},
{0x04010080, nullptr, "InstallFIRM"},
{0x04020040, nullptr, "StartInstallCIADB0"},
{0x04030000, nullptr, "StartInstallCIADB1"},
{0x04040002, nullptr, "AbortCIAInstall"},
{0x04050002, nullptr, "CloseCIAFinalizeInstall"},
{0x04060002, nullptr, "CloseCIA"},
{0x040700C2, nullptr, "FinalizeTitlesInstall"},
{0x04080042, nullptr, "GetCiaFileInfo"},
{0x040E00C2, nullptr, "InstallTitlesFinish"},
{0x040F0000, nullptr, "InstallNATIVEFIRM"},
{0x041000C0, nullptr, "DeleteTitle"},
{0x04120000, nullptr, "Initialize"},
{0x041700C0, nullptr, "MigrateAGBtoSAV"},
{0x08010000, nullptr, "OpenTicket"},
{0x08020002, nullptr, "TicketAbortInstall"},
{0x08030002, nullptr, "TicketFinalizeInstall"},
{0x08040100, nullptr, "InstallTitleBegin"},
{0x08050000, nullptr, "InstallTitleAbort"},
{0x080600C0, nullptr, "InstallTitleResume"},
{0x08070000, nullptr, "InstallTitleAbortTMD"},
{0x08080000, nullptr, "InstallTitleFinish"},
{0x080A0000, nullptr, "OpenTMD"},
{0x080B0002, nullptr, "TMDAbortInstall"},
{0x080C0042, nullptr, "TMDFinalizeInstall"},
{0x080E0040, nullptr, "OpenContentCreate"},
{0x080F0002, nullptr, "ContentAbortInstall"},
{0x08100040, nullptr, "OpenContentResume"},
{0x08120002, nullptr, "ContentFinalizeInstall"},
{0x08130000, nullptr, "GetTotalContents"},
{0x08140042, nullptr, "GetContentIndexes"},
{0x08150044, nullptr, "GetContentsInfo"},
{0x08180042, nullptr, "GetCTCert"},
{0x08190108, nullptr, "SetCertificates"},
{0x081B00C2, nullptr, "InstallTitlesFinish"},
{0x00010040, GetTitleCount, "GetTitleCount"},
{0x00020082, GetTitleList, "GetTitleList"},
{0x00030084, GetTitleInfo, "GetTitleInfo"},
{0x000400C0, nullptr, "DeleteApplicationTitle"},
{0x000500C0, nullptr, "GetTitleProductCode"},
{0x000600C0, nullptr, "GetTitleExtDataId"},
{0x00070080, DeleteTicket, "DeleteTicket"},
{0x00080000, GetTicketCount, "GetTicketCount"},
{0x00090082, GetTicketList, "GetTicketList"},
{0x000A0000, nullptr, "GetDeviceID"},
{0x000D0084, nullptr, "GetPendingTitleInfo"},
{0x000E00C0, nullptr, "DeletePendingTitle"},
{0x00140040, nullptr, "FinalizePendingTitles"},
{0x00150040, nullptr, "DeleteAllPendingTitles"},
{0x00180080, nullptr, "InitializeTitleDatabase"},
{0x00190040, nullptr, "ReloadDBS"},
{0x001A00C0, nullptr, "GetDSiWareExportSize"},
{0x001B0144, nullptr, "ExportDSiWare"},
{0x001C0084, nullptr, "ImportDSiWare"},
{0x00230080, nullptr, "TitleIDListGetTotal2"},
{0x002400C2, nullptr, "GetTitleIDList2"},
{0x04010080, nullptr, "InstallFIRM"},
{0x04020040, nullptr, "StartInstallCIADB0"},
{0x04030000, nullptr, "StartInstallCIADB1"},
{0x04040002, nullptr, "AbortCIAInstall"},
{0x04050002, nullptr, "CloseCIAFinalizeInstall"},
{0x04060002, nullptr, "CloseCIA"},
{0x040700C2, nullptr, "FinalizeTitlesInstall"},
{0x04080042, nullptr, "GetCiaFileInfo"},
{0x040E00C2, nullptr, "InstallTitlesFinish"},
{0x040F0000, nullptr, "InstallNATIVEFIRM"},
{0x041000C0, nullptr, "DeleteTitle"},
{0x04120000, nullptr, "Initialize"},
{0x041700C0, nullptr, "MigrateAGBtoSAV"},
{0x08010000, nullptr, "OpenTicket"},
{0x08020002, nullptr, "TicketAbortInstall"},
{0x08030002, nullptr, "TicketFinalizeInstall"},
{0x08040100, nullptr, "InstallTitleBegin"},
{0x08050000, nullptr, "InstallTitleAbort"},
{0x080600C0, nullptr, "InstallTitleResume"},
{0x08070000, nullptr, "InstallTitleAbortTMD"},
{0x08080000, nullptr, "InstallTitleFinish"},
{0x080A0000, nullptr, "OpenTMD"},
{0x080B0002, nullptr, "TMDAbortInstall"},
{0x080C0042, nullptr, "TMDFinalizeInstall"},
{0x080E0040, nullptr, "OpenContentCreate"},
{0x080F0002, nullptr, "ContentAbortInstall"},
{0x08100040, nullptr, "OpenContentResume"},
{0x08120002, nullptr, "ContentFinalizeInstall"},
{0x08130000, nullptr, "GetTotalContents"},
{0x08140042, nullptr, "GetContentIndexes"},
{0x08150044, nullptr, "GetContentsInfo"},
{0x08180042, nullptr, "GetCTCert"},
{0x08190108, nullptr, "SetCertificates"},
{0x081B00C2, nullptr, "InstallTitlesFinish"},
};
AM_NET_Interface::AM_NET_Interface() {

View file

@ -8,29 +8,27 @@
namespace Service {
namespace AM {
const Interface::FunctionInfo FunctionTable[] = {
{0x00010040, GetTitleCount, "GetTitleCount"},
{0x00020082, GetTitleList, "GetTitleList"},
{0x00030084, GetTitleInfo, "GetTitleInfo"},
{0x000400C0, nullptr, "DeleteApplicationTitle"},
{0x000500C0, nullptr, "GetTitleProductCode"},
{0x000600C0, nullptr, "GetTitleExtDataId"},
{0x00070080, DeleteTicket, "DeleteTicket"},
{0x00080000, GetTicketCount, "GetTicketCount"},
{0x00090082, GetTicketList, "GetTicketList"},
{0x000A0000, nullptr, "GetDeviceID"},
{0x000D0084, nullptr, "GetPendingTitleInfo"},
{0x000E00C0, nullptr, "DeletePendingTitle"},
{0x00140040, nullptr, "FinalizePendingTitles"},
{0x00150040, nullptr, "DeleteAllPendingTitles"},
{0x00180080, nullptr, "InitializeTitleDatabase"},
{0x00190040, nullptr, "ReloadDBS"},
{0x001A00C0, nullptr, "GetDSiWareExportSize"},
{0x001B0144, nullptr, "ExportDSiWare"},
{0x001C0084, nullptr, "ImportDSiWare"},
{0x00230080, nullptr, "GetPendingTitleCount"},
{0x002400C2, nullptr, "GetPendingTitleList"}
};
const Interface::FunctionInfo FunctionTable[] = {{0x00010040, GetTitleCount, "GetTitleCount"},
{0x00020082, GetTitleList, "GetTitleList"},
{0x00030084, GetTitleInfo, "GetTitleInfo"},
{0x000400C0, nullptr, "DeleteApplicationTitle"},
{0x000500C0, nullptr, "GetTitleProductCode"},
{0x000600C0, nullptr, "GetTitleExtDataId"},
{0x00070080, DeleteTicket, "DeleteTicket"},
{0x00080000, GetTicketCount, "GetTicketCount"},
{0x00090082, GetTicketList, "GetTicketList"},
{0x000A0000, nullptr, "GetDeviceID"},
{0x000D0084, nullptr, "GetPendingTitleInfo"},
{0x000E00C0, nullptr, "DeletePendingTitle"},
{0x00140040, nullptr, "FinalizePendingTitles"},
{0x00150040, nullptr, "DeleteAllPendingTitles"},
{0x00180080, nullptr, "InitializeTitleDatabase"},
{0x00190040, nullptr, "ReloadDBS"},
{0x001A00C0, nullptr, "GetDSiWareExportSize"},
{0x001B0144, nullptr, "ExportDSiWare"},
{0x001C0084, nullptr, "ImportDSiWare"},
{0x00230080, nullptr, "GetPendingTitleCount"},
{0x002400C2, nullptr, "GetPendingTitleList"}};
AM_SYS_Interface::AM_SYS_Interface() {
Register(FunctionTable);

View file

@ -8,42 +8,40 @@
namespace Service {
namespace AM {
const Interface::FunctionInfo FunctionTable[] = {
{0x00010040, GetTitleCount, "GetTitleCount"},
{0x00020082, GetTitleList, "GetTitleList"},
{0x00030084, GetTitleInfo, "GetTitleInfo"},
{0x000400C0, nullptr, "DeleteApplicationTitle"},
{0x000500C0, nullptr, "GetTitleProductCode"},
{0x000600C0, nullptr, "GetTitleExtDataId"},
{0x00070080, DeleteTicket, "DeleteTicket"},
{0x00080000, GetTicketCount, "GetTicketCount"},
{0x00090082, GetTicketList, "GetTicketList"},
{0x000A0000, nullptr, "GetDeviceID"},
{0x000D0084, nullptr, "GetPendingTitleInfo"},
{0x000E00C0, nullptr, "DeletePendingTitle"},
{0x00140040, nullptr, "FinalizePendingTitles"},
{0x00150040, nullptr, "DeleteAllPendingTitles"},
{0x00180080, nullptr, "InitializeTitleDatabase"},
{0x00190040, nullptr, "ReloadDBS"},
{0x001A00C0, nullptr, "GetDSiWareExportSize"},
{0x001B0144, nullptr, "ExportDSiWare"},
{0x001C0084, nullptr, "ImportDSiWare"},
{0x00230080, nullptr, "TitleIDListGetTotal2"},
{0x002400C2, nullptr, "GetTitleIDList2"},
{0x04010080, nullptr, "InstallFIRM"},
{0x04020040, nullptr, "StartInstallCIADB0"},
{0x04030000, nullptr, "StartInstallCIADB1"},
{0x04040002, nullptr, "AbortCIAInstall"},
{0x04050002, nullptr, "CloseCIAFinalizeInstall"},
{0x04060002, nullptr, "CloseCIA"},
{0x040700C2, nullptr, "FinalizeTitlesInstall"},
{0x04080042, nullptr, "GetCiaFileInfo"},
{0x040E00C2, nullptr, "InstallTitlesFinish"},
{0x040F0000, nullptr, "InstallNATIVEFIRM"},
{0x041000C0, nullptr, "DeleteTitle"},
{0x04120000, nullptr, "Initialize"},
{0x041700C0, nullptr, "MigrateAGBtoSAV"}
};
const Interface::FunctionInfo FunctionTable[] = {{0x00010040, GetTitleCount, "GetTitleCount"},
{0x00020082, GetTitleList, "GetTitleList"},
{0x00030084, GetTitleInfo, "GetTitleInfo"},
{0x000400C0, nullptr, "DeleteApplicationTitle"},
{0x000500C0, nullptr, "GetTitleProductCode"},
{0x000600C0, nullptr, "GetTitleExtDataId"},
{0x00070080, DeleteTicket, "DeleteTicket"},
{0x00080000, GetTicketCount, "GetTicketCount"},
{0x00090082, GetTicketList, "GetTicketList"},
{0x000A0000, nullptr, "GetDeviceID"},
{0x000D0084, nullptr, "GetPendingTitleInfo"},
{0x000E00C0, nullptr, "DeletePendingTitle"},
{0x00140040, nullptr, "FinalizePendingTitles"},
{0x00150040, nullptr, "DeleteAllPendingTitles"},
{0x00180080, nullptr, "InitializeTitleDatabase"},
{0x00190040, nullptr, "ReloadDBS"},
{0x001A00C0, nullptr, "GetDSiWareExportSize"},
{0x001B0144, nullptr, "ExportDSiWare"},
{0x001C0084, nullptr, "ImportDSiWare"},
{0x00230080, nullptr, "TitleIDListGetTotal2"},
{0x002400C2, nullptr, "GetTitleIDList2"},
{0x04010080, nullptr, "InstallFIRM"},
{0x04020040, nullptr, "StartInstallCIADB0"},
{0x04030000, nullptr, "StartInstallCIADB1"},
{0x04040002, nullptr, "AbortCIAInstall"},
{0x04050002, nullptr, "CloseCIAFinalizeInstall"},
{0x04060002, nullptr, "CloseCIA"},
{0x040700C2, nullptr, "FinalizeTitlesInstall"},
{0x04080042, nullptr, "GetCiaFileInfo"},
{0x040E00C2, nullptr, "InstallTitlesFinish"},
{0x040F0000, nullptr, "InstallNATIVEFIRM"},
{0x041000C0, nullptr, "DeleteTitle"},
{0x04120000, nullptr, "Initialize"},
{0x041700C0, nullptr, "MigrateAGBtoSAV"}};
AM_U_Interface::AM_U_Interface() {
Register(FunctionTable);