service/cecd: Fixed enum item naming style

This commit is contained in:
NarcolepticK 2018-09-07 19:36:33 -04:00
parent 69b3217394
commit ff1beca74a
2 changed files with 180 additions and 180 deletions

View File

@ -47,10 +47,10 @@ void Module::Interface::Open(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
switch (path_type) { switch (path_type) {
case CecDataPathType::ROOT_DIR: case CecDataPathType::RootDir:
case CecDataPathType::MBOX_DIR: case CecDataPathType::MboxDir:
case CecDataPathType::INBOX_DIR: case CecDataPathType::InboxDir:
case CecDataPathType::OUTBOX_DIR: { case CecDataPathType::OutboxDir: {
auto dir_result = auto dir_result =
Service::FS::OpenDirectoryFromArchive(cecd->cecd_system_save_data_archive, path); Service::FS::OpenDirectoryFromArchive(cecd->cecd_system_save_data_archive, path);
if (dir_result.Failed()) { if (dir_result.Failed()) {
@ -93,7 +93,7 @@ void Module::Interface::Open(Kernel::HLERequestContext& ctx) {
rb.Push<u32>(session_data->file->backend->GetSize()); // Return file size rb.Push<u32>(session_data->file->backend->GetSize()); // Return file size
} }
if (path_type == CecDataPathType::MBOX_PROGRAM_ID) { if (path_type == CecDataPathType::MboxProgramId) {
std::vector<u8> program_id(8); std::vector<u8> program_id(8);
u64_le le_program_id = Kernel::g_current_process->codeset->program_id; u64_le le_program_id = Kernel::g_current_process->codeset->program_id;
std::memcpy(program_id.data(), &le_program_id, sizeof(u64)); std::memcpy(program_id.data(), &le_program_id, sizeof(u64));
@ -128,10 +128,10 @@ void Module::Interface::Read(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2); IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
switch (session_data->data_path_type) { switch (session_data->data_path_type) {
case CecDataPathType::ROOT_DIR: case CecDataPathType::RootDir:
case CecDataPathType::MBOX_DIR: case CecDataPathType::MboxDir:
case CecDataPathType::INBOX_DIR: case CecDataPathType::InboxDir:
case CecDataPathType::OUTBOX_DIR: case CecDataPathType::OutboxDir:
rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::CEC, rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::CEC,
ErrorSummary::NotFound, ErrorLevel::Status)); ErrorSummary::NotFound, ErrorLevel::Status));
rb.Push<u32>(0); // No bytes read rb.Push<u32>(0); // No bytes read
@ -169,8 +169,8 @@ void Module::Interface::ReadMessage(Kernel::HLERequestContext& ctx) {
message_id_buffer.Read(id_buffer.data(), 0, message_id_size); message_id_buffer.Read(id_buffer.data(), 0, message_id_size);
FileSys::Path message_path = FileSys::Path message_path =
cecd->GetCecDataPathTypeAsString(is_outbox ? CecDataPathType::OUTBOX_MSG cecd->GetCecDataPathTypeAsString(is_outbox ? CecDataPathType::OutboxMsg
: CecDataPathType::INBOX_MSG, : CecDataPathType::InboxMsg,
ncch_program_id, id_buffer) ncch_program_id, id_buffer)
.data(); .data();
@ -221,8 +221,8 @@ void Module::Interface::ReadMessageWithHMAC(Kernel::HLERequestContext& ctx) {
message_id_buffer.Read(id_buffer.data(), 0, message_id_size); message_id_buffer.Read(id_buffer.data(), 0, message_id_size);
FileSys::Path message_path = FileSys::Path message_path =
cecd->GetCecDataPathTypeAsString(is_outbox ? CecDataPathType::OUTBOX_MSG cecd->GetCecDataPathTypeAsString(is_outbox ? CecDataPathType::OutboxMsg
: CecDataPathType::INBOX_MSG, : CecDataPathType::InboxMsg,
ncch_program_id, id_buffer) ncch_program_id, id_buffer)
.data(); .data();
@ -273,10 +273,10 @@ void Module::Interface::Write(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2); IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
switch (session_data->data_path_type) { switch (session_data->data_path_type) {
case CecDataPathType::ROOT_DIR: case CecDataPathType::RootDir:
case CecDataPathType::MBOX_DIR: case CecDataPathType::MboxDir:
case CecDataPathType::INBOX_DIR: case CecDataPathType::InboxDir:
case CecDataPathType::OUTBOX_DIR: case CecDataPathType::OutboxDir:
rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::CEC, rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::CEC,
ErrorSummary::NotFound, ErrorLevel::Status)); ErrorSummary::NotFound, ErrorLevel::Status));
break; break;
@ -317,8 +317,8 @@ void Module::Interface::WriteMessage(Kernel::HLERequestContext& ctx) {
message_id_buffer.Read(id_buffer.data(), 0, message_id_size); message_id_buffer.Read(id_buffer.data(), 0, message_id_size);
FileSys::Path message_path = FileSys::Path message_path =
cecd->GetCecDataPathTypeAsString(is_outbox ? CecDataPathType::OUTBOX_MSG cecd->GetCecDataPathTypeAsString(is_outbox ? CecDataPathType::OutboxMsg
: CecDataPathType::INBOX_MSG, : CecDataPathType::InboxMsg,
ncch_program_id, id_buffer) ncch_program_id, id_buffer)
.data(); .data();
@ -370,8 +370,8 @@ void Module::Interface::WriteMessageWithHMAC(Kernel::HLERequestContext& ctx) {
message_id_buffer.Read(id_buffer.data(), 0, message_id_size); message_id_buffer.Read(id_buffer.data(), 0, message_id_size);
FileSys::Path message_path = FileSys::Path message_path =
cecd->GetCecDataPathTypeAsString(is_outbox ? CecDataPathType::OUTBOX_MSG cecd->GetCecDataPathTypeAsString(is_outbox ? CecDataPathType::OutboxMsg
: CecDataPathType::INBOX_MSG, : CecDataPathType::InboxMsg,
ncch_program_id, id_buffer) ncch_program_id, id_buffer)
.data(); .data();
@ -418,10 +418,10 @@ void Module::Interface::Delete(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2); IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
switch (path_type) { switch (path_type) {
case CecDataPathType::ROOT_DIR: case CecDataPathType::RootDir:
case CecDataPathType::MBOX_DIR: case CecDataPathType::MboxDir:
case CecDataPathType::INBOX_DIR: case CecDataPathType::InboxDir:
case CecDataPathType::OUTBOX_DIR: case CecDataPathType::OutboxDir:
rb.Push(Service::FS::DeleteDirectoryRecursivelyFromArchive( rb.Push(Service::FS::DeleteDirectoryRecursivelyFromArchive(
cecd->cecd_system_save_data_archive, path)); cecd->cecd_system_save_data_archive, path));
break; break;
@ -433,8 +433,8 @@ void Module::Interface::Delete(Kernel::HLERequestContext& ctx) {
message_id_buffer.Read(id_buffer.data(), 0, message_id_size); message_id_buffer.Read(id_buffer.data(), 0, message_id_size);
FileSys::Path message_path = FileSys::Path message_path =
cecd->GetCecDataPathTypeAsString(is_outbox ? CecDataPathType::OUTBOX_MSG cecd->GetCecDataPathTypeAsString(is_outbox ? CecDataPathType::OutboxMsg
: CecDataPathType::INBOX_MSG, : CecDataPathType::InboxMsg,
ncch_program_id, id_buffer) ncch_program_id, id_buffer)
.data(); .data();
rb.Push(Service::FS::DeleteFileFromArchive(cecd->cecd_system_save_data_archive, rb.Push(Service::FS::DeleteFileFromArchive(cecd->cecd_system_save_data_archive,
@ -557,7 +557,7 @@ void Module::Interface::GetCecdState(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS); rb.Push(RESULT_SUCCESS);
rb.PushEnum(CecdState::NDM_STATUS_IDLE); rb.PushEnum(CecdState::NdmStatusIdle);
LOG_WARNING(Service_CECD, "(STUBBED) called"); LOG_WARNING(Service_CECD, "(STUBBED) called");
} }
@ -599,10 +599,10 @@ void Module::Interface::OpenAndWrite(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2); IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
switch (path_type) { switch (path_type) {
case CecDataPathType::ROOT_DIR: case CecDataPathType::RootDir:
case CecDataPathType::MBOX_DIR: case CecDataPathType::MboxDir:
case CecDataPathType::INBOX_DIR: case CecDataPathType::InboxDir:
case CecDataPathType::OUTBOX_DIR: case CecDataPathType::OutboxDir:
rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::CEC, rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::CEC,
ErrorSummary::NotFound, ErrorLevel::Status)); ErrorSummary::NotFound, ErrorLevel::Status));
break; break;
@ -654,10 +654,10 @@ void Module::Interface::OpenAndRead(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2); IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
switch (path_type) { switch (path_type) {
case CecDataPathType::ROOT_DIR: case CecDataPathType::RootDir:
case CecDataPathType::MBOX_DIR: case CecDataPathType::MboxDir:
case CecDataPathType::INBOX_DIR: case CecDataPathType::InboxDir:
case CecDataPathType::OUTBOX_DIR: case CecDataPathType::OutboxDir:
rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::CEC, rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::CEC,
ErrorSummary::NotFound, ErrorLevel::Status)); ErrorSummary::NotFound, ErrorLevel::Status));
rb.Push<u32>(0); // No entries read rb.Push<u32>(0); // No entries read
@ -721,33 +721,33 @@ std::string Module::EncodeBase64(const std::vector<u8>& in, const std::string& d
std::string Module::GetCecDataPathTypeAsString(const CecDataPathType type, const u32 program_id, std::string Module::GetCecDataPathTypeAsString(const CecDataPathType type, const u32 program_id,
const std::vector<u8>& msg_id) const { const std::vector<u8>& msg_id) const {
switch (type) { switch (type) {
case CecDataPathType::MBOX_LIST: case CecDataPathType::MboxList:
return "/CEC/MBoxList____"; return "/CEC/MBoxList____";
case CecDataPathType::MBOX_INFO: case CecDataPathType::MboxInfo:
return fmt::format("/CEC/{:08x}/MBoxInfo____", program_id); return fmt::format("/CEC/{:08x}/MBoxInfo____", program_id);
case CecDataPathType::INBOX_INFO: case CecDataPathType::InboxInfo:
return fmt::format("/CEC/{:08x}/InBox___/BoxInfo_____", program_id); return fmt::format("/CEC/{:08x}/InBox___/BoxInfo_____", program_id);
case CecDataPathType::OUTBOX_INFO: case CecDataPathType::OutboxInfo:
return fmt::format("/CEC/{:08x}/OutBox__/BoxInfo_____", program_id); return fmt::format("/CEC/{:08x}/OutBox__/BoxInfo_____", program_id);
case CecDataPathType::OUTBOX_INDEX: case CecDataPathType::OutboxIndex:
return fmt::format("/CEC/{:08x}/OutBox__/OBIndex_____", program_id); return fmt::format("/CEC/{:08x}/OutBox__/OBIndex_____", program_id);
case CecDataPathType::INBOX_MSG: case CecDataPathType::InboxMsg:
return fmt::format("/CEC/{:08x}/InBox___/_{}", program_id, return fmt::format("/CEC/{:08x}/InBox___/_{}", program_id,
EncodeBase64(msg_id, base64_dict)); EncodeBase64(msg_id, base64_dict));
case CecDataPathType::OUTBOX_MSG: case CecDataPathType::OutboxMsg:
return fmt::format("/CEC/{:08x}/OutBox__/_{}", program_id, return fmt::format("/CEC/{:08x}/OutBox__/_{}", program_id,
EncodeBase64(msg_id, base64_dict)); EncodeBase64(msg_id, base64_dict));
case CecDataPathType::ROOT_DIR: case CecDataPathType::RootDir:
return "/CEC"; return "/CEC";
case CecDataPathType::MBOX_DIR: case CecDataPathType::MboxDir:
return fmt::format("/CEC/{:08x}", program_id); return fmt::format("/CEC/{:08x}", program_id);
case CecDataPathType::INBOX_DIR: case CecDataPathType::InboxDir:
return fmt::format("/CEC/{:08x}/InBox___", program_id); return fmt::format("/CEC/{:08x}/InBox___", program_id);
case CecDataPathType::OUTBOX_DIR: case CecDataPathType::OutboxDir:
return fmt::format("/CEC/{:08x}/OutBox__", program_id); return fmt::format("/CEC/{:08x}/OutBox__", program_id);
case CecDataPathType::MBOX_DATA: case CecDataPathType::MboxData:
case CecDataPathType::MBOX_ICON: case CecDataPathType::MboxIcon:
case CecDataPathType::MBOX_TITLE: case CecDataPathType::MboxTitle:
default: default:
return fmt::format("/CEC/{:08x}/MBoxData.{:03}", program_id, static_cast<u32>(type) - 100); return fmt::format("/CEC/{:08x}/MBoxData.{:03}", program_id, static_cast<u32>(type) - 100);
} }
@ -755,50 +755,50 @@ std::string Module::GetCecDataPathTypeAsString(const CecDataPathType type, const
std::string Module::GetCecCommandAsString(const CecCommand command) const { std::string Module::GetCecCommandAsString(const CecCommand command) const {
switch (command) { switch (command) {
case CecCommand::NONE: case CecCommand::None:
return "NONE"; return "None";
case CecCommand::START: case CecCommand::Start:
return "START"; return "Start";
case CecCommand::RESET_START: case CecCommand::ResetStart:
return "RESET_START"; return "ResetStart";
case CecCommand::READYSCAN: case CecCommand::ReadyScan:
return "READYSCAN"; return "ReadyScan";
case CecCommand::READYSCANWAIT: case CecCommand::ReadyScanWait:
return "READYSCANWAIT"; return "ReadyScanWait";
case CecCommand::STARTSCAN: case CecCommand::StartScan:
return "STARTSCAN"; return "StartScan";
case CecCommand::RESCAN: case CecCommand::Rescan:
return "RESCAN"; return "Rescan";
case CecCommand::NDM_RESUME: case CecCommand::NdmResume:
return "RESUME"; return "NdmResume";
case CecCommand::NDM_SUSPEND: case CecCommand::NdmSuspend:
return "NDM_SUSPEND"; return "NdmSuspend";
case CecCommand::NDM_SUSPEND_IMMEDIATE: case CecCommand::NdmSuspendImmediate:
return "NDM_SUSPEND_IMMEDIATE"; return "NdmSuspendImmediate";
case CecCommand::STOPWAIT: case CecCommand::StopWait:
return "STOPWAIT"; return "StopWait";
case CecCommand::STOP: case CecCommand::Stop:
return "STOP"; return "Stop";
case CecCommand::STOP_FORCE: case CecCommand::StopForce:
return "STOP_FORCE"; return "StopForce";
case CecCommand::STOP_FORCE_WAIT: case CecCommand::StopForceWait:
return "STOP_FORCE_WAIT"; return "StopForceWait";
case CecCommand::RESET_FILTER: case CecCommand::ResetFilter:
return "RESET_FILTER"; return "ResetFilter";
case CecCommand::DAEMON_STOP: case CecCommand::DaemonStop:
return "DAEMON_STOP"; return "DaemonStop";
case CecCommand::DAEMON_START: case CecCommand::DaemonStart:
return "DAEMON_START"; return "DaemonStart";
case CecCommand::EXIT: case CecCommand::Exit:
return "EXIT"; return "Exit";
case CecCommand::OVER_BOSS: case CecCommand::OverBoss:
return "OVER_BOSS"; return "OverBoss";
case CecCommand::OVER_BOSS_FORCE: case CecCommand::OverBossForce:
return "OVER_BOSS_FORCE"; return "OverBossForce";
case CecCommand::OVER_BOSS_FORCE_WAIT: case CecCommand::OverBossForceWait:
return "OVER_BOSS_FORCE_WAIT"; return "OverBossForceWait";
case CecCommand::END: case CecCommand::End:
return "END"; return "End";
default: default:
return "Unknown"; return "Unknown";
} }
@ -812,7 +812,7 @@ void Module::CheckAndUpdateFile(const CecDataPathType path_type, const u32 ncch_
const u32 file_size = file_buffer.size(); const u32 file_size = file_buffer.size();
switch (path_type) { switch (path_type) {
case CecDataPathType::MBOX_LIST: { case CecDataPathType::MboxList: {
CecMBoxListHeader mbox_list_header = {}; CecMBoxListHeader mbox_list_header = {};
std::memcpy(&mbox_list_header, file_buffer.data(), sizeof(CecMBoxListHeader)); std::memcpy(&mbox_list_header, file_buffer.data(), sizeof(CecMBoxListHeader));
@ -875,7 +875,7 @@ void Module::CheckAndUpdateFile(const CecDataPathType path_type, const u32 ncch_
/// are activated. The num_of_titles = (total_read_count) - 1, to adjust for /// are activated. The num_of_titles = (total_read_count) - 1, to adjust for
/// the MBoxList____ file that is present in the directory as well. /// the MBoxList____ file that is present in the directory as well.
FileSys::Path root_path( FileSys::Path root_path(
GetCecDataPathTypeAsString(CecDataPathType::ROOT_DIR, 0).data()); GetCecDataPathTypeAsString(CecDataPathType::RootDir, 0).data());
auto dir_result = auto dir_result =
Service::FS::OpenDirectoryFromArchive(cecd_system_save_data_archive, root_path); Service::FS::OpenDirectoryFromArchive(cecd_system_save_data_archive, root_path);
@ -907,7 +907,7 @@ void Module::CheckAndUpdateFile(const CecDataPathType path_type, const u32 ncch_
std::memcpy(file_buffer.data(), &mbox_list_header, sizeof(CecMBoxListHeader)); std::memcpy(file_buffer.data(), &mbox_list_header, sizeof(CecMBoxListHeader));
break; break;
} }
case CecDataPathType::MBOX_INFO: { case CecDataPathType::MboxInfo: {
CecMBoxInfoHeader mbox_info_header = {}; CecMBoxInfoHeader mbox_info_header = {};
std::memcpy(&mbox_info_header, file_buffer.data(), sizeof(CecMBoxInfoHeader)); std::memcpy(&mbox_info_header, file_buffer.data(), sizeof(CecMBoxInfoHeader));
@ -935,7 +935,7 @@ void Module::CheckAndUpdateFile(const CecDataPathType path_type, const u32 ncch_
std::memcpy(file_buffer.data(), &mbox_info_header, sizeof(CecMBoxInfoHeader)); std::memcpy(file_buffer.data(), &mbox_info_header, sizeof(CecMBoxInfoHeader));
break; break;
} }
case CecDataPathType::INBOX_INFO: { case CecDataPathType::InboxInfo: {
CecInOutBoxInfoHeader inbox_info_header = {}; CecInOutBoxInfoHeader inbox_info_header = {};
std::memcpy(&inbox_info_header, file_buffer.data(), sizeof(CecInOutBoxInfoHeader)); std::memcpy(&inbox_info_header, file_buffer.data(), sizeof(CecInOutBoxInfoHeader));
@ -987,7 +987,7 @@ void Module::CheckAndUpdateFile(const CecDataPathType path_type, const u32 ncch_
std::memcpy(file_buffer.data(), &inbox_info_header, sizeof(CecInOutBoxInfoHeader)); std::memcpy(file_buffer.data(), &inbox_info_header, sizeof(CecInOutBoxInfoHeader));
break; break;
} }
case CecDataPathType::OUTBOX_INFO: { case CecDataPathType::OutboxInfo: {
CecInOutBoxInfoHeader outbox_info_header = {}; CecInOutBoxInfoHeader outbox_info_header = {};
std::memcpy(&outbox_info_header, file_buffer.data(), sizeof(CecInOutBoxInfoHeader)); std::memcpy(&outbox_info_header, file_buffer.data(), sizeof(CecInOutBoxInfoHeader));
@ -1037,7 +1037,7 @@ void Module::CheckAndUpdateFile(const CecDataPathType path_type, const u32 ncch_
std::memcpy(file_buffer.data(), &outbox_info_header, sizeof(CecInOutBoxInfoHeader)); std::memcpy(file_buffer.data(), &outbox_info_header, sizeof(CecInOutBoxInfoHeader));
break; break;
} }
case CecDataPathType::OUTBOX_INDEX: { case CecDataPathType::OutboxIndex: {
CecOBIndexHeader obindex_header = {}; CecOBIndexHeader obindex_header = {};
std::memcpy(&obindex_header, file_buffer.data(), sizeof(CecOBIndexHeader)); std::memcpy(&obindex_header, file_buffer.data(), sizeof(CecOBIndexHeader));
@ -1067,18 +1067,18 @@ void Module::CheckAndUpdateFile(const CecDataPathType path_type, const u32 ncch_
std::memcpy(file_buffer.data(), &obindex_header, sizeof(CecOBIndexHeader)); std::memcpy(file_buffer.data(), &obindex_header, sizeof(CecOBIndexHeader));
break; break;
} }
case CecDataPathType::INBOX_MSG: case CecDataPathType::InboxMsg:
break; break;
case CecDataPathType::OUTBOX_MSG: case CecDataPathType::OutboxMsg:
break; break;
case CecDataPathType::ROOT_DIR: case CecDataPathType::RootDir:
case CecDataPathType::MBOX_DIR: case CecDataPathType::MboxDir:
case CecDataPathType::INBOX_DIR: case CecDataPathType::InboxDir:
case CecDataPathType::OUTBOX_DIR: case CecDataPathType::OutboxDir:
break; break;
case CecDataPathType::MBOX_DATA: case CecDataPathType::MboxData:
case CecDataPathType::MBOX_ICON: case CecDataPathType::MboxIcon:
case CecDataPathType::MBOX_TITLE: case CecDataPathType::MboxTitle:
default: {} default: {}
} }
} }
@ -1116,7 +1116,7 @@ Module::Module() {
/// Now that the archive is formatted, we need to create the root CEC directory, /// Now that the archive is formatted, we need to create the root CEC directory,
/// eventlog.dat, and CEC/MBoxList____ /// eventlog.dat, and CEC/MBoxList____
const FileSys::Path root_dir_path( const FileSys::Path root_dir_path(
GetCecDataPathTypeAsString(CecDataPathType::ROOT_DIR, 0).data()); GetCecDataPathTypeAsString(CecDataPathType::RootDir, 0).data());
Service::FS::CreateDirectoryFromArchive(*archive_result, root_dir_path); Service::FS::CreateDirectoryFromArchive(*archive_result, root_dir_path);
FileSys::Mode mode; FileSys::Mode mode;
@ -1150,7 +1150,7 @@ Module::Module() {
/// being the magic number. The rest of the file is filled with zeroes, until the end of /// being the magic number. The rest of the file is filled with zeroes, until the end of
/// file at offset 0x18b /// file at offset 0x18b
FileSys::Path mboxlist_path( FileSys::Path mboxlist_path(
GetCecDataPathTypeAsString(CecDataPathType::MBOX_LIST, 0).data()); GetCecDataPathTypeAsString(CecDataPathType::MboxList, 0).data());
auto mboxlist_result = auto mboxlist_result =
Service::FS::OpenFileFromArchive(*archive_result, mboxlist_path, mode); Service::FS::OpenFileFromArchive(*archive_result, mboxlist_path, mode);

View File

@ -19,28 +19,28 @@ public:
~Module(); ~Module();
enum class CecCommand : u32 { enum class CecCommand : u32 {
NONE = 0, None = 0,
START = 1, Start = 1,
RESET_START = 2, ResetStart = 2,
READYSCAN = 3, ReadyScan = 3,
READYSCANWAIT = 4, ReadyScanWait = 4,
STARTSCAN = 5, StartScan = 5,
RESCAN = 6, Rescan = 6,
NDM_RESUME = 7, NdmResume = 7,
NDM_SUSPEND = 8, NdmSuspend = 8,
NDM_SUSPEND_IMMEDIATE = 9, NdmSuspendImmediate = 9,
STOPWAIT = 0x0A, StopWait = 0x0A,
STOP = 0x0B, Stop = 0x0B,
STOP_FORCE = 0x0C, StopForce = 0x0C,
STOP_FORCE_WAIT = 0x0D, StopForceWait = 0x0D,
RESET_FILTER = 0x0E, ResetFilter = 0x0E,
DAEMON_STOP = 0x0F, DaemonStop = 0x0F,
DAEMON_START = 0x10, DaemonStart = 0x10,
EXIT = 0x11, Exit = 0x11,
OVER_BOSS = 0x12, OverBoss = 0x12,
OVER_BOSS_FORCE = 0x13, OverBossForce = 0x13,
OVER_BOSS_FORCE_WAIT = 0x14, OverBossForceWait = 0x14,
END = 0x15, End = 0x15,
}; };
/** /**
@ -50,52 +50,52 @@ public:
* data:/CEC/test * data:/CEC/test
*/ */
enum class CecDataPathType : u32 { enum class CecDataPathType : u32 {
INVALID = 0, Invalid = 0,
MBOX_LIST = 1, /// data:/CEC/MBoxList____ MboxList = 1, /// data:/CEC/MBoxList____
MBOX_INFO = 2, /// data:/CEC/<id>/MBoxInfo____ MboxInfo = 2, /// data:/CEC/<id>/MBoxInfo____
INBOX_INFO = 3, /// data:/CEC/<id>/InBox___/BoxInfo_____ InboxInfo = 3, /// data:/CEC/<id>/InBox___/BoxInfo_____
OUTBOX_INFO = 4, /// data:/CEC/<id>/OutBox__/BoxInfo_____ OutboxInfo = 4, /// data:/CEC/<id>/OutBox__/BoxInfo_____
OUTBOX_INDEX = 5, /// data:/CEC/<id>/OutBox__/OBIndex_____ OutboxIndex = 5, /// data:/CEC/<id>/OutBox__/OBIndex_____
INBOX_MSG = 6, /// data:/CEC/<id>/InBox___/_<message_id> InboxMsg = 6, /// data:/CEC/<id>/InBox___/_<message_id>
OUTBOX_MSG = 7, /// data:/CEC/<id>/OutBox__/_<message_id> OutboxMsg = 7, /// data:/CEC/<id>/OutBox__/_<message_id>
ROOT_DIR = 10, /// data:/CEC RootDir = 10, /// data:/CEC
MBOX_DIR = 11, /// data:/CEC/<id> MboxDir = 11, /// data:/CEC/<id>
INBOX_DIR = 12, /// data:/CEC/<id>/InBox___ InboxDir = 12, /// data:/CEC/<id>/InBox___
OUTBOX_DIR = 13, /// data:/CEC/<id>/OutBox__ OutboxDir = 13, /// data:/CEC/<id>/OutBox__
MBOX_DATA = 100, /// data:/CEC/<id>/MBoxData.0<i-100> MboxData = 100, /// data:/CEC/<id>/MBoxData.0<i-100>
MBOX_ICON = 101, /// data:/CEC/<id>/MBoxData.001 MboxIcon = 101, /// data:/CEC/<id>/MBoxData.001
MBOX_TITLE = 110, /// data:/CEC/<id>/MBoxData.010 MboxTitle = 110, /// data:/CEC/<id>/MBoxData.010
MBOX_PROGRAM_ID = 150, /// data:/CEC/<id>/MBoxData.050 MboxProgramId = 150, /// data:/CEC/<id>/MBoxData.050
}; };
enum class CecState : u32 { enum class CecState : u32 {
NONE = 0, None = 0,
INIT = 1, Init = 1,
WIRELESS_PARAM_SETUP = 2, WirelessParamSetup = 2,
WIRELESS_READY = 3, WirelessReady = 3,
WIRELESS_START_CONFIG = 4, WirelessStartConfig = 4,
SCAN = 5, Scan = 5,
SCANNING = 6, Scanning = 6,
CONNECT = 7, Connect = 7,
CONNECTING = 8, Connecting = 8,
CONNECTED = 9, Connected = 9,
CONNECT_TCP = 10, ConnectTcp = 10,
CONNECTING_TCP = 11, ConnectingTcp = 11,
CONNECTED_TCP = 12, ConnectedTcp = 12,
NEGOTIATION = 13, Negotiation = 13,
SEND_RECV_START = 14, SendRecvStart = 14,
SEND_RECV_INIT = 15, SendRecvInit = 15,
SEND_READY = 16, SendReady = 16,
RECEIVE_READY = 17, ReceiveReady = 17,
RECEIVE = 18, Receive = 18,
CONNECTION_FINISH_TCP = 19, ConnectionFinishTcp = 19,
CONNECTION_FINISH = 20, ConnectionFinish = 20,
SEND_POST = 21, SendPost = 21,
RECEIVE_POST = 22, ReceivePost = 22,
FINISHING = 23, Finishing = 23,
FINISH = 24, Finish = 24,
OVER_BOSS = 25, OverBoss = 25,
IDLE = 26 Idle = 26
}; };
enum class CecSystemInfoType : u32 { EulaVersion = 1, Eula = 2, ParentControl = 3 }; enum class CecSystemInfoType : u32 { EulaVersion = 1, Eula = 2, ParentControl = 3 };
@ -202,10 +202,10 @@ public:
static_assert(sizeof(CecOBIndexHeader) == 0x08, "CecOBIndexHeader struct has incorrect size."); static_assert(sizeof(CecOBIndexHeader) == 0x08, "CecOBIndexHeader struct has incorrect size.");
enum class CecdState : u32 { enum class CecdState : u32 {
NDM_STATUS_WORKING = 0, NdmStatusWorking = 0,
NDM_STATUS_IDLE = 1, NdmStatusIdle = 1,
NDM_STATUS_SUSPENDING = 2, NdmStatusSuspending = 2,
NDM_STATUS_SUSPENDED = 3, NdmStatusSuspended = 3,
}; };
union CecOpenMode { union CecOpenMode {