From 30fe2bfe38fb251989acb50df561ba512d9f27b6 Mon Sep 17 00:00:00 2001 From: Hamish Milne Date: Thu, 26 Dec 2019 18:02:59 +0000 Subject: [PATCH] Added DLP service serialization --- TODO | 2 +- src/core/hle/service/dlp/dlp_clnt.cpp | 3 +++ src/core/hle/service/dlp/dlp_clnt.h | 9 +++++++++ src/core/hle/service/dlp/dlp_fkcl.cpp | 3 +++ src/core/hle/service/dlp/dlp_fkcl.h | 9 +++++++++ src/core/hle/service/dlp/dlp_srvr.cpp | 3 +++ src/core/hle/service/dlp/dlp_srvr.h | 9 +++++++++ 7 files changed, 37 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index e485f33a7..27f720dca 100644 --- a/TODO +++ b/TODO @@ -74,7 +74,7 @@ ☐ CFG Also needs archive backend.. ✔ CSND @started(19-12-26 17:51) @done(19-12-26 17:56) @lasted(5m30s) - ☐ DLP + ✔ DLP @done(19-12-26 18:02) ☐ DSP ☐ ERR ☐ FRD diff --git a/src/core/hle/service/dlp/dlp_clnt.cpp b/src/core/hle/service/dlp/dlp_clnt.cpp index 63308f57e..df5b755e1 100644 --- a/src/core/hle/service/dlp/dlp_clnt.cpp +++ b/src/core/hle/service/dlp/dlp_clnt.cpp @@ -4,6 +4,9 @@ #include "core/hle/ipc_helpers.h" #include "core/hle/service/dlp/dlp_clnt.h" +#include "common/archives.h" + +SERIALIZE_EXPORT_IMPL(Service::DLP::DLP_CLNT) namespace Service::DLP { diff --git a/src/core/hle/service/dlp/dlp_clnt.h b/src/core/hle/service/dlp/dlp_clnt.h index db506b985..3f9020863 100644 --- a/src/core/hle/service/dlp/dlp_clnt.h +++ b/src/core/hle/service/dlp/dlp_clnt.h @@ -12,6 +12,15 @@ class DLP_CLNT final : public ServiceFramework { public: DLP_CLNT(); ~DLP_CLNT() = default; +private: + template + void serialize(Archive& ar, const unsigned int) + { + ar & boost::serialization::base_object(*this); + } + friend class boost::serialization::access; }; } // namespace Service::DLP + +BOOST_CLASS_EXPORT_KEY(Service::DLP::DLP_CLNT) diff --git a/src/core/hle/service/dlp/dlp_fkcl.cpp b/src/core/hle/service/dlp/dlp_fkcl.cpp index 30a98c4bf..607c211d4 100644 --- a/src/core/hle/service/dlp/dlp_fkcl.cpp +++ b/src/core/hle/service/dlp/dlp_fkcl.cpp @@ -4,6 +4,9 @@ #include "core/hle/ipc_helpers.h" #include "core/hle/service/dlp/dlp_fkcl.h" +#include "common/archives.h" + +SERIALIZE_EXPORT_IMPL(Service::DLP::DLP_FKCL) namespace Service::DLP { diff --git a/src/core/hle/service/dlp/dlp_fkcl.h b/src/core/hle/service/dlp/dlp_fkcl.h index a3b2ac86d..ae26b6220 100644 --- a/src/core/hle/service/dlp/dlp_fkcl.h +++ b/src/core/hle/service/dlp/dlp_fkcl.h @@ -12,6 +12,15 @@ class DLP_FKCL final : public ServiceFramework { public: DLP_FKCL(); ~DLP_FKCL() = default; +private: + template + void serialize(Archive& ar, const unsigned int) + { + ar & boost::serialization::base_object(*this); + } + friend class boost::serialization::access; }; } // namespace Service::DLP + +BOOST_CLASS_EXPORT_KEY(Service::DLP::DLP_FKCL) diff --git a/src/core/hle/service/dlp/dlp_srvr.cpp b/src/core/hle/service/dlp/dlp_srvr.cpp index 9d7405941..0cff2e2bc 100644 --- a/src/core/hle/service/dlp/dlp_srvr.cpp +++ b/src/core/hle/service/dlp/dlp_srvr.cpp @@ -7,6 +7,9 @@ #include "core/hle/ipc_helpers.h" #include "core/hle/result.h" #include "core/hle/service/dlp/dlp_srvr.h" +#include "common/archives.h" + +SERIALIZE_EXPORT_IMPL(Service::DLP::DLP_SRVR) namespace Service::DLP { diff --git a/src/core/hle/service/dlp/dlp_srvr.h b/src/core/hle/service/dlp/dlp_srvr.h index 50d8d92b2..6af350c8e 100644 --- a/src/core/hle/service/dlp/dlp_srvr.h +++ b/src/core/hle/service/dlp/dlp_srvr.h @@ -15,6 +15,15 @@ public: private: void IsChild(Kernel::HLERequestContext& ctx); + + template + void serialize(Archive& ar, const unsigned int) + { + ar & boost::serialization::base_object(*this); + } + friend class boost::serialization::access; }; } // namespace Service::DLP + +BOOST_CLASS_EXPORT_KEY(Service::DLP::DLP_SRVR)