Updater class.
[bpdyndnsd] / src / updater.cpp
1 //
2 // C++ Implementation: updater
3 //
4 // Description: 
5 //
6 //
7 // Author: Bjoern Sikora <bjoern.sikora@intra2net.com>, (C) 2009
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12 #include "updater.h"
13
14 #include <boost/foreach.hpp>
15
16
17 Updater::Updater()
18 {
19 }
20
21
22 Updater::Updater(Config* conf)
23 {
24     this->conf = conf;
25 }
26
27
28 Updater::~Updater()
29 {
30 }
31
32
33 void Updater::set_config(Config* conf)
34 {
35     this->conf = conf;
36 }
37
38
39 Config* Updater::get_config()
40 {
41     return this->conf;
42 }
43
44
45 void Updater::update_services()
46 {
47     list<Service*> services = this->conf->get_services();
48
49     string ip = "192.168.1.1";
50
51     BOOST_FOREACH( Service * service, services )
52     {
53         service->update(ip);
54     }
55 }