add new protocol variation "gnudip-fullhostname", used by provider dynu.com
[bpdyndnsd] / src / serializeservicecontainer.cpp
1 /** @file
2  * @brief SerializeServiceContainer class implementation. This class contains Service objects in a list for serialization.
3  *
4  *
5  *
6  * @copyright Intra2net AG
7  * @license GPLv2
8 */
9
10 #include "serializeservicecontainer.hpp"
11
12 // Following boost macros are needed for serialization of derived classes through a base class pointer (Service *).
13 BOOST_CLASS_EXPORT_GUID(ServiceOds, "ServiceOds")
14 BOOST_CLASS_EXPORT_GUID(ServiceDhs, "ServiceDhs")
15 BOOST_CLASS_EXPORT_GUID(ServiceDyns, "ServiceDyns")
16 BOOST_CLASS_EXPORT_GUID(ServiceDyndns, "ServiceDyndns")
17 BOOST_CLASS_EXPORT_GUID(ServiceEasydns, "ServiceEasydns")
18 BOOST_CLASS_EXPORT_GUID(ServiceTzo, "ServiceTzo")
19 BOOST_CLASS_EXPORT_GUID(ServiceZoneedit, "ServiceZoneedit")
20 BOOST_CLASS_EXPORT_GUID(ServiceGnudip, "ServiceGnudip")
21 BOOST_CLASS_EXPORT_GUID(ServiceGnudipFullhostname, "ServiceGnudipFullhostname")
22
23
24 SerializeServiceContainer::SerializeServiceContainer()
25 {
26 }
27
28
29 SerializeServiceContainer::~SerializeServiceContainer()
30 {
31 }
32
33 /**
34  * Serialize function needed by boost/serialization to define which members should be stored as the object state.
35  * In this case the STL list of Service pointers will be serialized.
36  * @param ar Archive
37  * @param version Version
38  */
39 /*
40 template<class Archive>
41 void SerializeServiceContainer::serialize(Archive & ar, const unsigned int version)
42 {
43     ar & ContainingServices;
44 }
45 */
46
47 void SerializeServiceContainer::add_service(Service::Ptr service)
48 {
49     ContainingServices.push_back(service);
50 }
51
52
53 std::list<Service::Ptr> SerializeServiceContainer::get_containing_services() const
54 {
55     return ContainingServices;
56 }