2 * @brief Serviceholder class header. This class holds Service and OldService lists.
6 * @copyright Intra2net AG
10 #ifndef SERVICEHOLDER_H
11 #define SERVICEHOLDER_H
13 #include "service.hpp"
14 #include "serializeservicecontainer.hpp"
16 #include "ip_addr_helper.hpp"
18 #include <boost/shared_ptr.hpp>
29 std::list<Service::Ptr> OldServices; // Represents all old Services where the timeout isn't expired (in case the same Service is redefined).
30 std::list<Service::Ptr> Services; // Represents all active Services.
32 IPAddrHelper::Ptr IPAddrHelp;
36 typedef boost::shared_ptr<Serviceholder> Ptr;
40 Serviceholder(Logger::Ptr _log);
44 void add_service(Service::Ptr service);
46 int deserialize_services();
48 int serialize_services() const;
50 void delete_services();
52 void set_ip_addr_helper(IPAddrHelper::Ptr _ip_addr_helper);
54 IPAddrHelper::Ptr get_ip_addr_helper() const;
56 std::list<Service::Ptr> get_services() const;