9ac6bf310f877a64f027dedb60ed141ecd927985
[bpdyndnsd] / src / service_ods.hpp
1 /** @file
2  * @brief ODS Service class header. This class represents the ODS service.
3  *
4  *
5  *
6  * @copyright Intra2net AG
7  * @license GPLv2
8 */
9
10 #ifndef ServiceOds_H
11 #define ServiceOds_H
12
13 #include "service.hpp"
14 #include "logger.hpp"
15
16 #include <boost/shared_ptr.hpp>
17 #include <string>
18
19
20 class ServiceOds : public Service
21 {
22
23 private:
24
25     friend class boost::serialization::access;
26     template<class Archive>
27     void serialize(Archive & ar, const unsigned int version)
28     {
29         ar & boost::serialization::base_object<Service>(*this);
30     }
31
32     std::string UpdateServer;
33     std::string Port;
34
35 public:
36
37     typedef boost::shared_ptr<ServiceOds> Ptr;
38
39     ServiceOds();
40
41     ServiceOds(const std::string& _protocol, const std::string& _hostname, const std::string& _login, const std::string& _password, const Logger::Ptr& _logger, const int _update_interval, const int _max_updates_within_interval, const int dns_cache_ttl);
42
43     ~ServiceOds();
44
45     int perform_update(const std::string& ip);
46 };
47
48 #endif