2 * @brief GNUDIP Service class header. This class represents the GNUDIP service.
6 * @copyright Intra2net AG
10 #ifndef ServiceGnudip_H
11 #define ServiceGnudip_H
15 #include "httphelper.h"
17 #include <boost/shared_ptr.hpp>
22 class ServiceGnudip : public Service
27 friend class boost::serialization::access;
28 template<class Archive>
29 void serialize(Archive & ar, const unsigned int version)
31 ar & boost::serialization::base_object<Service>(*this);
34 std::string GnudipServer;
37 HTTPHelper::Ptr HTTPHelp;
39 std::string assemble_base_url(const std::string& gnudip_server) const;
40 std::map<std::string,std::string> parse_initial_request(const std::string& curl_data) const;
41 std::string assemble_update_url(const std::string& salt, const std::string& curr_time, const std::string& sign, const std::string& secret, const std::string& ip) const;
45 typedef boost::shared_ptr<ServiceGnudip> Ptr;
49 ServiceGnudip(const std::string& _protocol, const std::string& _gnudip_server ,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);
53 int perform_update(const std::string& ip);