Correct exports; add some file serialization; fix service base object serialization

This commit is contained in:
Hamish Milne 2020-01-08 22:13:56 +00:00 committed by zhupengfei
parent f2de70c3fb
commit 996aba39fe
52 changed files with 197 additions and 33 deletions

View file

@ -19,6 +19,17 @@ struct FileSessionSlot : public Kernel::SessionRequestHandler::SessionDataBase {
u64 offset; ///< Offset that this session will start reading from.
u64 size; ///< Max size of the file that this session is allowed to access
bool subfile; ///< Whether this file was opened via OpenSubFile or not.
private:
template <class Archive>
void serialize(Archive& ar, const unsigned int) {
ar& boost::serialization::base_object<Kernel::SessionRequestHandler::SessionDataBase>(
*this);
ar& priority;
ar& offset;
ar& size;
ar& subfile;
}
};
// TODO: File is not a real service, but it can still utilize ServiceFramework::RegisterHandlers.

View file

@ -26,6 +26,8 @@ struct ClientSlot : public Kernel::SessionRequestHandler::SessionDataBase {
private:
template <class Archive>
void serialize(Archive& ar, const unsigned int) {
ar& boost::serialization::base_object<Kernel::SessionRequestHandler::SessionDataBase>(
*this);
ar& program_id;
}
friend class boost::serialization::access;