/** @file * @brief SerializeServiceContainer class header. This class holds Service objects in a list for serialization. * * * * @copyright Intra2net AG * @license GPLv2 */ #ifndef SERIALIZESERVICECONTAINER_H #define SERIALIZESERVICECONTAINER_H #include "service.h" #include "logger.h" #include #include #include #include #include #include #include "service_dhs.h" #include "service_ods.h" #include "service_dyndns.h" #include "service_dyns.h" #include "service_easydns.h" #include "service_tzo.h" #include "service_zoneedit.h" #include "service_gnudip.h" // Following boost macros are needed for serialization of derived classes through a base class pointer (Service *). BOOST_CLASS_EXPORT_GUID(ServiceOds, "ServiceOds") BOOST_CLASS_EXPORT_GUID(ServiceDhs, "ServiceDhs") BOOST_CLASS_EXPORT_GUID(ServiceDyns, "ServiceDyns") BOOST_CLASS_EXPORT_GUID(ServiceDyndns, "ServiceDyndns") BOOST_CLASS_EXPORT_GUID(ServiceEasydns, "ServiceEasydns") BOOST_CLASS_EXPORT_GUID(ServiceTzo, "ServiceTzo") BOOST_CLASS_EXPORT_GUID(ServiceZoneedit, "ServiceZoneedit") BOOST_CLASS_EXPORT_GUID(ServiceGnudip, "ServiceGnudip") class SerializeServiceContainer { private: std::list ContainingServices; friend class boost::serialization::access; template void serialize(Archive & ar, const unsigned int version) { ar & ContainingServices; } public: typedef boost::shared_ptr Ptr; SerializeServiceContainer(); ~SerializeServiceContainer(); void add_service(Service::Ptr service); std::list get_containing_services() const; }; #endif