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

View file

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