Correct exports; add some file serialization; fix service base object serialization
This commit is contained in:
parent
f2de70c3fb
commit
996aba39fe
52 changed files with 197 additions and 33 deletions
|
@ -13,11 +13,7 @@ public:
|
|||
CAM_Q();
|
||||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::CAM
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace Service::CFG {
|
|||
class CFG_NOR final : public ServiceFramework<CFG_NOR> {
|
||||
public:
|
||||
CFG_NOR();
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::CFG
|
||||
|
|
|
@ -14,11 +14,7 @@ public:
|
|||
~DLP_CLNT() = default;
|
||||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::DLP
|
||||
|
|
|
@ -14,11 +14,7 @@ public:
|
|||
~DLP_FKCL() = default;
|
||||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::DLP
|
||||
|
|
|
@ -16,11 +16,7 @@ public:
|
|||
private:
|
||||
void IsChild(Kernel::HLERequestContext& ctx);
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::DLP
|
||||
|
|
|
@ -35,11 +35,7 @@ private:
|
|||
|
||||
Core::System& system;
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
void InstallInterfaces(Core::System& system);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -203,6 +203,8 @@ public:
|
|||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler::SessionDataBase>(
|
||||
*this);
|
||||
ar& gsp;
|
||||
ar& interrupt_event;
|
||||
ar& thread_id;
|
||||
|
|
|
@ -240,6 +240,8 @@ struct SessionData : 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& current_http_context;
|
||||
ar& session_id;
|
||||
ar& num_http_contexts;
|
||||
|
|
|
@ -18,6 +18,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& loaded_crs;
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace Service::MIC {
|
|||
|
||||
template <class Archive>
|
||||
void MIC_U::serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
|
||||
ar&* impl.get();
|
||||
}
|
||||
SERIALIZE_IMPL(MIC_U)
|
||||
|
|
|
@ -14,11 +14,7 @@ public:
|
|||
~MVD_STD() = default;
|
||||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::MVD
|
||||
|
|
|
@ -24,6 +24,8 @@ private:
|
|||
* 2 : Number of notifications
|
||||
*/
|
||||
void GetTotalNotifications(Kernel::HLERequestContext& ctx);
|
||||
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::NEWS
|
||||
|
|
|
@ -12,6 +12,9 @@ namespace Service::NEWS {
|
|||
class NEWS_U final : public ServiceFramework<NEWS_U> {
|
||||
public:
|
||||
NEWS_U();
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::NEWS
|
||||
|
|
|
@ -12,6 +12,9 @@ class NIM_AOC final : public ServiceFramework<NIM_AOC> {
|
|||
public:
|
||||
NIM_AOC();
|
||||
~NIM_AOC();
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::NIM
|
||||
|
|
|
@ -12,6 +12,9 @@ class NIM_S final : public ServiceFramework<NIM_S> {
|
|||
public:
|
||||
NIM_S();
|
||||
~NIM_S();
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::NIM
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace Service::NWM {
|
|||
class NWM_CEC final : public ServiceFramework<NWM_CEC> {
|
||||
public:
|
||||
NWM_CEC();
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::NWM
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace Service::NWM {
|
|||
class NWM_EXT final : public ServiceFramework<NWM_EXT> {
|
||||
public:
|
||||
NWM_EXT();
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::NWM
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace Service::NWM {
|
|||
class NWM_INF final : public ServiceFramework<NWM_INF> {
|
||||
public:
|
||||
NWM_INF();
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::NWM
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace Service::NWM {
|
|||
class NWM_SAP final : public ServiceFramework<NWM_SAP> {
|
||||
public:
|
||||
NWM_SAP();
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::NWM
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace Service::NWM {
|
|||
class NWM_SOC final : public ServiceFramework<NWM_SOC> {
|
||||
public:
|
||||
NWM_SOC();
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::NWM
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace Service::NWM {
|
|||
class NWM_TST final : public ServiceFramework<NWM_TST> {
|
||||
public:
|
||||
NWM_TST();
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::NWM
|
||||
|
|
|
@ -28,6 +28,7 @@ namespace Service::NWM {
|
|||
|
||||
template <class Archive>
|
||||
void NWM_UDS::serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
|
||||
ar& node_map;
|
||||
ar& connection_event;
|
||||
ar& received_beacons;
|
||||
|
|
|
@ -12,6 +12,9 @@ class PM_APP final : public ServiceFramework<PM_APP> {
|
|||
public:
|
||||
PM_APP();
|
||||
~PM_APP() = default;
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::PM
|
||||
|
|
|
@ -12,6 +12,9 @@ class PM_DBG final : public ServiceFramework<PM_DBG> {
|
|||
public:
|
||||
PM_DBG();
|
||||
~PM_DBG() = default;
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::PM
|
||||
|
|
|
@ -18,6 +18,8 @@ public:
|
|||
~PS_PS() = default;
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
|
||||
/**
|
||||
* PS_PS::SignRsaSha256 service function
|
||||
* Inputs:
|
||||
|
|
|
@ -13,6 +13,9 @@ class DEV final : public ServiceFramework<DEV> {
|
|||
public:
|
||||
DEV();
|
||||
~DEV();
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::PXI
|
||||
|
|
|
@ -12,6 +12,9 @@ class QTM_C final : public ServiceFramework<QTM_C> {
|
|||
public:
|
||||
QTM_C();
|
||||
~QTM_C() = default;
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::QTM
|
||||
|
|
|
@ -12,6 +12,9 @@ class QTM_S final : public ServiceFramework<QTM_S> {
|
|||
public:
|
||||
QTM_S();
|
||||
~QTM_S() = default;
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::QTM
|
||||
|
|
|
@ -12,6 +12,9 @@ class QTM_SP final : public ServiceFramework<QTM_SP> {
|
|||
public:
|
||||
QTM_SP();
|
||||
~QTM_SP() = default;
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::QTM
|
||||
|
|
|
@ -12,6 +12,9 @@ class QTM_U final : public ServiceFramework<QTM_U> {
|
|||
public:
|
||||
QTM_U();
|
||||
~QTM_U() = default;
|
||||
|
||||
private:
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
} // namespace Service::QTM
|
||||
|
|
|
@ -219,6 +219,13 @@ extern const std::array<ServiceModuleInfo, 40> service_module_map;
|
|||
friend class boost::serialization::access; \
|
||||
friend class ::construct_access;
|
||||
|
||||
#define SERVICE_SERIALIZATION_SIMPLE \
|
||||
template <class Archive> \
|
||||
void serialize(Archive& ar, const unsigned int) { \
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this); \
|
||||
} \
|
||||
friend class boost::serialization::access;
|
||||
|
||||
#define SERVICE_CONSTRUCT(T) \
|
||||
namespace boost::serialization { \
|
||||
template <class Archive> \
|
||||
|
|
|
@ -23,6 +23,8 @@ private:
|
|||
|
||||
// TODO: Implement a proper CSPRNG in the future when actual security is needed
|
||||
std::mt19937 rand_gen;
|
||||
|
||||
SERVICE_SERIALIZATION_SIMPLE
|
||||
};
|
||||
|
||||
void InstallInterfaces(Core::System& system);
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace Service::Y2R {
|
|||
|
||||
template <class Archive>
|
||||
void Y2R_U::serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
|
||||
ar& completion_event;
|
||||
ar& conversion;
|
||||
ar& dithering_weight_params;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue