0e89d78e0203cfae4e6606dde98701e6011027a4
[bpdyndnsd] / src / serializeservicecontainer.hpp
1 /** @file
2  * @brief SerializeServiceContainer class header. This class holds Service objects in a list for serialization.
3  *
4  *
5  *
6  * @copyright Intra2net AG
7  * @license GPLv2
8 */
9
10 #ifndef SERIALIZESERVICECONTAINER_H
11 #define SERIALIZESERVICECONTAINER_H
12
13 #include "service.hpp"
14 #include "logger.hpp"
15
16 #include <boost/serialization/list.hpp>
17 #include <boost/serialization/vector.hpp>
18 #include <boost/serialization/map.hpp>
19 #include <boost/serialization/shared_ptr.hpp>
20 #include <boost/serialization/export.hpp>
21
22 #include <boost/shared_ptr.hpp>
23 #include <list>
24
25 #include "service_dhs.hpp"
26 #include "service_ods.hpp"
27 #include "service_dyndns.hpp"
28 #include "service_dyns.hpp"
29 #include "service_easydns.hpp"
30 #include "service_tzo.hpp"
31 #include "service_zoneedit.hpp"
32 #include "service_gnudip.hpp"
33
34
35 class SerializeServiceContainer
36 {
37
38 private:
39
40     std::list<Service::Ptr> ContainingServices;
41
42     friend class boost::serialization::access;
43     template<class Archive>
44     void serialize(Archive & ar, const unsigned int version)
45     {
46         ar & ContainingServices;
47     }
48
49 public:
50
51     typedef boost::shared_ptr<SerializeServiceContainer> Ptr;
52
53     SerializeServiceContainer();
54
55     ~SerializeServiceContainer();
56
57     void add_service(Service::Ptr service);
58
59     std::list<Service::Ptr> get_containing_services() const;
60
61 };
62
63 #endif