BOSS service serialization
This commit is contained in:
parent
5265c79056
commit
1185d62792
2
TODO
2
TODO
|
@ -65,7 +65,7 @@
|
||||||
✔ ACT @done(19-12-24 23:17)
|
✔ ACT @done(19-12-24 23:17)
|
||||||
✔ AM @started(19-12-24 23:17) @done(19-12-24 23:53) @lasted(36m8s)
|
✔ AM @started(19-12-24 23:17) @done(19-12-24 23:53) @lasted(36m8s)
|
||||||
✔ APT @done(19-12-25 21:41)
|
✔ APT @done(19-12-25 21:41)
|
||||||
☐ BOSS
|
✔ BOSS @started(19-12-25 21:48) @done(19-12-25 23:18) @lasted(1h30m14s)
|
||||||
☐ CAM
|
☐ CAM
|
||||||
☐ CECD
|
☐ CECD
|
||||||
☐ CGF
|
☐ CGF
|
||||||
|
|
|
@ -608,6 +608,14 @@ public:
|
||||||
protected:
|
protected:
|
||||||
bool application_reset_prepared{};
|
bool application_reset_prepared{};
|
||||||
std::shared_ptr<Module> apt;
|
std::shared_ptr<Module> apt;
|
||||||
|
|
||||||
|
private:
|
||||||
|
template <class Archive>
|
||||||
|
void serialize(Archive& ar, const unsigned int)
|
||||||
|
{
|
||||||
|
ar & application_reset_prepared;
|
||||||
|
}
|
||||||
|
friend class boost::serialization::access;
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <boost/serialization/shared_ptr.hpp>
|
||||||
#include "core/hle/kernel/event.h"
|
#include "core/hle/kernel/event.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
#include "core/global.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
class System;
|
class System;
|
||||||
|
@ -952,19 +954,45 @@ public:
|
||||||
*/
|
*/
|
||||||
void GetNsDataNewFlagPrivileged(Kernel::HLERequestContext& ctx);
|
void GetNsDataNewFlagPrivileged(Kernel::HLERequestContext& ctx);
|
||||||
|
|
||||||
private:
|
protected:
|
||||||
std::shared_ptr<Module> boss;
|
std::shared_ptr<Module> boss;
|
||||||
|
|
||||||
|
private:
|
||||||
u8 new_arrival_flag;
|
u8 new_arrival_flag;
|
||||||
u8 ns_data_new_flag;
|
u8 ns_data_new_flag;
|
||||||
u8 ns_data_new_flag_privileged;
|
u8 ns_data_new_flag_privileged;
|
||||||
u8 output_flag;
|
u8 output_flag;
|
||||||
|
|
||||||
|
template <class Archive>
|
||||||
|
void serialize(Archive& ar, const unsigned int)
|
||||||
|
{
|
||||||
|
ar & new_arrival_flag;
|
||||||
|
ar & ns_data_new_flag;
|
||||||
|
ar & ns_data_new_flag_privileged;
|
||||||
|
ar & output_flag;
|
||||||
|
}
|
||||||
|
friend class boost::serialization::access;
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<Kernel::Event> task_finish_event;
|
std::shared_ptr<Kernel::Event> task_finish_event;
|
||||||
|
|
||||||
|
template <class Archive>
|
||||||
|
void serialize(Archive& ar, const unsigned int)
|
||||||
|
{
|
||||||
|
ar & task_finish_event;
|
||||||
|
}
|
||||||
|
friend class boost::serialization::access;
|
||||||
};
|
};
|
||||||
|
|
||||||
void InstallInterfaces(Core::System& system);
|
void InstallInterfaces(Core::System& system);
|
||||||
|
|
||||||
} // namespace Service::BOSS
|
} // namespace Service::BOSS
|
||||||
|
|
||||||
|
namespace boost::serialization {
|
||||||
|
template <class Archive>
|
||||||
|
inline void load_construct_data(Archive& ar, Service::BOSS::Module* t, const unsigned int)
|
||||||
|
{
|
||||||
|
::new(t)Service::BOSS::Module(Core::Global<Core::System>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "core/hle/service/boss/boss_p.h"
|
#include "core/hle/service/boss/boss_p.h"
|
||||||
|
#include "common/archives.h"
|
||||||
|
|
||||||
namespace Service::BOSS {
|
namespace Service::BOSS {
|
||||||
|
|
||||||
|
@ -84,3 +85,5 @@ BOSS_P::BOSS_P(std::shared_ptr<Module> boss)
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::BOSS
|
} // namespace Service::BOSS
|
||||||
|
|
||||||
|
SERIALIZE_EXPORT_IMPL(Service::BOSS::BOSS_P)
|
||||||
|
|
|
@ -11,6 +11,12 @@ namespace Service::BOSS {
|
||||||
class BOSS_P final : public Module::Interface {
|
class BOSS_P final : public Module::Interface {
|
||||||
public:
|
public:
|
||||||
explicit BOSS_P(std::shared_ptr<Module> boss);
|
explicit BOSS_P(std::shared_ptr<Module> boss);
|
||||||
|
|
||||||
|
private:
|
||||||
|
SERVICE_SERIALIZATION(BOSS_P, boss, Module)
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::BOSS
|
} // namespace Service::BOSS
|
||||||
|
|
||||||
|
BOOST_CLASS_EXPORT_KEY(Service::BOSS::BOSS_P)
|
||||||
|
BOOST_SERIALIZATION_CONSTRUCT(Service::BOSS::BOSS_P)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "core/hle/service/boss/boss_u.h"
|
#include "core/hle/service/boss/boss_u.h"
|
||||||
|
#include "common/archives.h"
|
||||||
|
|
||||||
namespace Service::BOSS {
|
namespace Service::BOSS {
|
||||||
|
|
||||||
|
@ -72,3 +73,5 @@ BOSS_U::BOSS_U(std::shared_ptr<Module> boss)
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::BOSS
|
} // namespace Service::BOSS
|
||||||
|
|
||||||
|
SERIALIZE_EXPORT_IMPL(Service::BOSS::BOSS_U)
|
||||||
|
|
|
@ -11,6 +11,12 @@ namespace Service::BOSS {
|
||||||
class BOSS_U final : public Module::Interface {
|
class BOSS_U final : public Module::Interface {
|
||||||
public:
|
public:
|
||||||
explicit BOSS_U(std::shared_ptr<Module> boss);
|
explicit BOSS_U(std::shared_ptr<Module> boss);
|
||||||
|
|
||||||
|
private:
|
||||||
|
SERVICE_SERIALIZATION(BOSS_U, boss, Module)
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::BOSS
|
} // namespace Service::BOSS
|
||||||
|
|
||||||
|
BOOST_CLASS_EXPORT_KEY(Service::BOSS::BOSS_U)
|
||||||
|
BOOST_SERIALIZATION_CONSTRUCT(Service::BOSS::BOSS_U)
|
||||||
|
|
Reference in New Issue