Commit | Line | Data |
---|---|---|
e0080b78 BS |
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 | ||
4de6a9b8 BS |
13 | #include "service.hpp" |
14 | #include "logger.hpp" | |
e0080b78 | 15 | |
ca5d6889 | 16 | #include <boost/serialization/list.hpp> |
c1b8cb79 | 17 | #include <boost/serialization/vector.hpp> |
4553e833 | 18 | #include <boost/serialization/map.hpp> |
ca5d6889 BS |
19 | #include <boost/serialization/shared_ptr.hpp> |
20 | #include <boost/serialization/export.hpp> | |
21 | ||
e0080b78 | 22 | #include <boost/shared_ptr.hpp> |
ca5d6889 BS |
23 | #include <list> |
24 | ||
4de6a9b8 BS |
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" | |
ca5d6889 | 33 | |
e0080b78 BS |
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> | |
ca5d6889 BS |
44 | void serialize(Archive & ar, const unsigned int version) |
45 | { | |
46 | ar & ContainingServices; | |
47 | } | |
e0080b78 BS |
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 |