service/cecd: Add missing SessionData serialization

This commit is contained in:
zhupengfei 2020-02-14 17:15:08 +08:00
parent 7e8041df28
commit 57efc41973
No known key found for this signature in database
GPG Key ID: DD129E108BD09378
2 changed files with 15 additions and 0 deletions

View File

@ -27,6 +27,7 @@
SERVICE_CONSTRUCT_IMPL(Service::CECD::Module)
SERIALIZE_EXPORT_IMPL(Service::CECD::Module)
SERIALIZE_EXPORT_IMPL(Service::CECD::Module::SessionData)
namespace Service::CECD {

View File

@ -248,6 +248,19 @@ public:
FileSys::Path path;
std::unique_ptr<FileSys::FileBackend> file;
private:
template <class Archive>
void serialize(Archive& ar, const unsigned int) {
ar& boost::serialization::base_object<Kernel::SessionRequestHandler::SessionDataBase>(
*this);
ar& ncch_program_id;
ar& data_path_type;
ar& open_mode.raw;
ar& path;
ar& file;
}
friend class boost::serialization::access;
};
class Interface : public ServiceFramework<Interface, SessionData> {
@ -626,3 +639,4 @@ void InstallInterfaces(Core::System& system);
SERVICE_CONSTRUCT(Service::CECD::Module)
BOOST_CLASS_EXPORT_KEY(Service::CECD::Module)
BOOST_CLASS_EXPORT_KEY(Service::CECD::Module::SessionData)