61c58b7c43229f01ab6bc26d6c0c514ce25cbf89
[bpdyndnsd] / src / service_zoneedit.hpp
1 /** @file
2  * @brief ZONEEDIT Service class header. This class represents the ZONEEDIT service.
3  *
4  *
5  *
6  * @copyright Intra2net AG
7  * @license GPLv2
8 */
9
10 #ifndef ServiceZoneedit_H
11 #define ServiceZoneedit_H
12
13 #include "service.hpp"
14 #include "logger.hpp"
15 #include "httphelper.hpp"
16
17 #include <boost/shared_ptr.hpp>
18 #include <string>
19
20
21 class ServiceZoneedit : public Service
22 {
23
24 private:
25
26     friend class boost::serialization::access;
27     template<class Archive>
28     void serialize(Archive & ar, const unsigned int version)
29     {
30         ar & boost::serialization::base_object<Service>(*this);
31     }
32
33     std::string BaseUrl;
34
35     HTTPHelper::Ptr HTTPHelp;
36
37     std::string assemble_base_url(const std::string& fqhn) const;
38
39 public:
40
41     typedef boost::shared_ptr<ServiceZoneedit> Ptr;
42
43     ServiceZoneedit();
44
45     ServiceZoneedit(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, const std::string& proxy, const int proxy_port);
46
47     ~ServiceZoneedit();
48
49     int perform_update(const std::string& ip);
50 };
51
52 #endif