mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-16 00:31:12 +00:00
@@ -23,6 +23,12 @@ constexpr std::size_t profile_username_size{32};
|
|||||||
using ProfileUsername = std::array<u8, profile_username_size>;
|
using ProfileUsername = std::array<u8, profile_username_size>;
|
||||||
using UserIDArray = std::array<Common::UUID, MAX_USERS>;
|
using UserIDArray = std::array<Common::UUID, MAX_USERS>;
|
||||||
|
|
||||||
|
// This is nn::account::Uid
|
||||||
|
struct Uid {
|
||||||
|
std::array<u8, 0x10> unk0;
|
||||||
|
};
|
||||||
|
static_assert(sizeof(Uid) == 0x10);
|
||||||
|
|
||||||
/// Contains extra data related to a user.
|
/// Contains extra data related to a user.
|
||||||
/// TODO: RE this structure
|
/// TODO: RE this structure
|
||||||
struct UserData {
|
struct UserData {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/kernel/k_client_session.h"
|
#include "core/hle/kernel/k_client_session.h"
|
||||||
#include "core/hle/result.h"
|
#include "core/hle/result.h"
|
||||||
|
#include "core/hle/service/acc/profile_manager.h"
|
||||||
#include "core/hle/service/cmif_types.h"
|
#include "core/hle/service/cmif_types.h"
|
||||||
#include "core/hle/service/cmif_serialization.h"
|
#include "core/hle/service/cmif_serialization.h"
|
||||||
#include "core/hle/service/ipc_helpers.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
@@ -171,38 +172,44 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct UndefinedIUserShimScopedObjectParam {
|
struct SaveDataHandle {
|
||||||
std::array<u8, 0x10> unk0;
|
u64 unk0;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(UndefinedIUserShimScopedObjectParam) == 0x10);
|
static_assert(sizeof(SaveDataHandle) == 0x08);
|
||||||
|
|
||||||
class IUserShimScopedObject final : public ServiceFramework<IUserShimScopedObject> {
|
class IUserShimScopedObject final : public ServiceFramework<IUserShimScopedObject> {
|
||||||
public:
|
public:
|
||||||
explicit IUserShimScopedObject(Core::System& system_) : ServiceFramework(system_, "IUserShimScopedObject") {
|
explicit IUserShimScopedObject(Core::System& system_) : ServiceFramework(system_, "IUserShimScopedObject") {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{450, nullptr, "Cmd450"},
|
{450, nullptr, "InitializeForSaveData"},
|
||||||
{451, nullptr, "Cmd451"},
|
{451, nullptr, "FinalizeForSaveData"},
|
||||||
{452, D<&IUserShimScopedObject::Cmd452>, "Cmd451"},
|
{452, D<&IUserShimScopedObject::OpenSaveData>, "OpenSaveData"},
|
||||||
{453, nullptr, "Cmd453"},
|
{453, nullptr, "CloseSaveData"},
|
||||||
{454, D<&IUserShimScopedObject::Cmd454>, "Cmd454"},
|
{454, D<&IUserShimScopedObject::ReadSaveSlot>, "ReadSaveSlot"},
|
||||||
{455, nullptr, "Cmd455"},
|
{455, D<&IUserShimScopedObject::WriteSaveSlot>, "WriteSaveSlot"},
|
||||||
{456, nullptr, "Cmd456"},
|
{456, nullptr, "FlushSaveSlot"},
|
||||||
{457, nullptr, "Cmd457"},
|
{457, nullptr, "CommitSaveData"},
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result Cmd452(UndefinedIUserShimScopedObjectParam unk0, Out<u64> unk1) {
|
Result OpenSaveData(Account::Uid unk0, Out<SaveDataHandle> unk1) {
|
||||||
LOG_WARNING(Service_NGC, "stubbed");
|
LOG_WARNING(Service_NGC, "stubbed");
|
||||||
R_THROW(IPC::ResultNotSupported);
|
R_THROW(IPC::ResultNotSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result Cmd454(UndefinedIUserShimScopedObjectParam unk0, Out<u32> unk1, OutBuffer<BufferAttr_HipcAutoSelect> unk2) {
|
Result ReadSaveSlot(s32 offset, SaveDataHandle handle, OutBuffer<BufferAttr_HipcAutoSelect> out_data, Out<u32> out_size) {
|
||||||
LOG_WARNING(Service_NGC, "stubbed");
|
LOG_WARNING(Service_NGC, "stubbed");
|
||||||
R_THROW(IPC::ResultNotSupported);
|
R_THROW(IPC::ResultNotSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result WriteSaveSlot(s32 offset, SaveDataHandle handle, InBuffer<BufferAttr_HipcAutoSelect> out_data) {
|
||||||
|
LOG_WARNING(Service_NGC, "stubbed");
|
||||||
|
// to implement
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class IUserService final : public ServiceFramework<IUserService> {
|
class IUserService final : public ServiceFramework<IUserService> {
|
||||||
@@ -215,7 +222,7 @@ public:
|
|||||||
// clang-format on
|
// clang-format on
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
Result Cmd0(OutInterface<IUserShimScopedObject> out_interface) {
|
Result Cmd0(u32 unk0, OutInterface<IUserShimScopedObject> out_interface) {
|
||||||
LOG_WARNING(Service_NGC, "stubbed");
|
LOG_WARNING(Service_NGC, "stubbed");
|
||||||
*out_interface = std::make_shared<IUserShimScopedObject>(system);
|
*out_interface = std::make_shared<IUserShimScopedObject>(system);
|
||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
|
|||||||
Reference in New Issue
Block a user