a80eb08c932fb8c429fcdb96f2d3b88f9170900f
[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/shared_ptr.hpp>
19 #include <boost/serialization/export.hpp>
20
21 #include <boost/shared_ptr.hpp>
22 #include <list>
23
24 #include "service_dhs.hpp"
25 #include "service_ods.hpp"
26 #include "service_dyndns.hpp"
27 #include "service_dyns.hpp"
28 #include "service_easydns.hpp"
29 #include "service_tzo.hpp"
30 #include "service_zoneedit.hpp"
31 #include "service_gnudip.hpp"
32
33
34 class SerializeServiceContainer
35 {
36
37 private:
38
39     std::list<Service::Ptr> ContainingServices;
40
41     friend class boost::serialization::access;
42     template<class Archive>
43     void serialize(Archive & ar, const unsigned int version)
44     {
45         ar & ContainingServices;
46     }
47
48 public:
49
50     typedef boost::shared_ptr<SerializeServiceContainer> Ptr;
51
52     SerializeServiceContainer();
53
54     ~SerializeServiceContainer();
55
56     void add_service(Service::Ptr service);
57
58     std::list<Service::Ptr> get_containing_services() const;
59
60 };
61
62 #endif