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> |
ca5d6889 BS |
18 | #include <boost/serialization/shared_ptr.hpp> |
19 | #include <boost/serialization/export.hpp> | |
20 | ||
e0080b78 | 21 | #include <boost/shared_ptr.hpp> |
ca5d6889 BS |
22 | #include <list> |
23 | ||
4de6a9b8 BS |
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" | |
ca5d6889 | 32 | |
e0080b78 BS |
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> | |
ca5d6889 BS |
43 | void serialize(Archive & ar, const unsigned int version) |
44 | { | |
45 | ar & ContainingServices; | |
46 | } | |
e0080b78 BS |
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 |