1
0
Fork 0

Added FRD service serialization

This commit is contained in:
Hamish Milne 2019-12-26 19:09:55 +00:00 committed by zhupengfei
parent 4354179156
commit d1096de245
6 changed files with 44 additions and 2 deletions

2
TODO
View File

@ -77,7 +77,7 @@
✔ DLP @done(19-12-26 18:02)
✔ DSP @done(19-12-26 18:10)
✔ ERR @done(19-12-26 18:14)
☐ FRD
✔ FRD @done(19-12-26 19:09)
☐ FS
☐ GSP
☐ HID

View File

@ -18,10 +18,28 @@ struct FriendKey {
u32 friend_id;
u32 unknown;
u64 friend_code;
private:
template <class Archive>
void serialize(Archive& ar, const unsigned int)
{
ar & friend_id;
ar & unknown;
ar & friend_code;
}
friend class boost::serialization::access;
};
struct MyPresence {
u8 unknown[0x12C];
private:
template <class Archive>
void serialize(Archive& ar, const unsigned int)
{
ar & unknown;
}
friend class boost::serialization::access;
};
struct Profile {
@ -130,13 +148,21 @@ public:
*/
void SetClientSdkVersion(Kernel::HLERequestContext& ctx);
private:
protected:
std::shared_ptr<Module> frd;
};
private:
FriendKey my_friend_key = {0, 0, 0ull};
MyPresence my_presence = {};
template <class Archive>
void serialize(Archive& ar, const unsigned int)
{
ar & my_friend_key;
ar & my_presence;
}
friend class boost::serialization::access;
};
void InstallInterfaces(Core::System& system);

View File

@ -3,6 +3,9 @@
// Refer to the license.txt file included.
#include "core/hle/service/frd/frd_a.h"
#include "common/archives.h"
SERIALIZE_EXPORT_IMPL(Service::FRD::FRD_A)
namespace Service::FRD {

View File

@ -11,6 +11,11 @@ namespace Service::FRD {
class FRD_A final : public Module::Interface {
public:
explicit FRD_A(std::shared_ptr<Module> frd);
private:
SERVICE_SERIALIZATION(FRD_A, frd, Module)
};
} // namespace Service::FRD
BOOST_CLASS_EXPORT_KEY(Service::FRD::FRD_A)
BOOST_SERIALIZATION_CONSTRUCT(Service::FRD::FRD_A)

View File

@ -3,6 +3,9 @@
// Refer to the license.txt file included.
#include "core/hle/service/frd/frd_u.h"
#include "common/archives.h"
SERIALIZE_EXPORT_IMPL(Service::FRD::FRD_U)
namespace Service::FRD {

View File

@ -11,6 +11,11 @@ namespace Service::FRD {
class FRD_U final : public Module::Interface {
public:
explicit FRD_U(std::shared_ptr<Module> frd);
private:
SERVICE_SERIALIZATION(FRD_U, frd, Module)
};
} // namespace Service::FRD
BOOST_CLASS_EXPORT_KEY(Service::FRD::FRD_U)
BOOST_SERIALIZATION_CONSTRUCT(Service::FRD::FRD_U)